altinn_editor_supporting_table module

class AltinnEditorSupportTables

Bases: object

This module provides supporting tables for the Altinn editor.

It adds a button that opens a modal with tabs containing tables with extra informatiion.

Note

Adding your own supporting tables is not supported at this time.

add_default_tables(tables_to_add, conn)

Adds specified default supporting tables to view.

Return type:

None

Parameters:
  • tables_to_add (list[str])

  • conn (Any)

layout()

Returns the layout for the Altinn Editor Support Tables module.

Return type:

Div

module_callbacks()

Registers the callbacks for the Altinn Editor Support Tables module.

Return type:

None

support_components: ClassVar[list[AltinnSupportTable]] = []
support_tables_modal()

Return a modal component containing tab content.

Return type:

Modal

class AltinnSupportTable(label, get_data_func, editor_inputs=None, variableselector=None)

Bases: object

Class for adding a supporting table to the component in AltinnSkjemadataEditor.

In order to use it you need to connect it to inputs, preferably variables contained in the AltinnSkjemadataEditor such as ‘altinnedit-ident’, but it also supports connecting it to the VariableSelector.

Parameters:
  • label (str)

  • get_data_func (Callable[[...], DataFrame])

  • editor_inputs (list[str] | None)

  • variableselector (VariableSelector | None)

is_valid()

Checks that all options added from the editor are activated in the AltinnEditorStateTracker.

Return type:

None

support_table_callbacks()

Adds necessary callbacks.

Return type:

None

support_table_content()

The content to show in the support table.

Return type:

Div

support_table_layout()

Creates the layout.

Return type:

Tab

suptable_id = 0
add_year_diff_support_table(conn)

Adds a table showing difference to previous year.

Return type:

None

Parameters:

conn (Any)