@rxap/material-table-system 19.1.0 → 21.0.1-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +54 -0
- package/compodoc/changelog.html +52 -0
- package/compodoc/components/BooleanCellComponent.html +58 -43
- package/compodoc/components/CheckboxCellComponent.html +79 -88
- package/compodoc/components/CheckboxHeaderCellComponent.html +68 -152
- package/compodoc/components/CopyToClipboardCellComponent.html +48 -36
- package/compodoc/components/DateCellComponent.html +72 -68
- package/compodoc/components/ExpandControlsCellComponent.html +39 -96
- package/compodoc/components/ExpandRowContainerComponent.html +95 -173
- package/compodoc/components/IconCellComponent.html +47 -35
- package/compodoc/components/ImageCellComponent.html +170 -128
- package/compodoc/components/LinkCellComponent.html +140 -80
- package/compodoc/components/OptionsCellComponent.html +119 -250
- package/compodoc/components/TableColumnMenuComponent.html +146 -455
- package/compodoc/components/TableColumnOptionComponent.html +280 -378
- package/compodoc/components/TableSelectControlsComponent.html +30 -93
- package/compodoc/components/TableShowArchivedSlideComponent.html +67 -102
- package/compodoc/components/TreeControlCellComponent.html +63 -71
- package/compodoc/dependencies.html +19 -19
- package/compodoc/directives/AbstractTableRowAction.html +1568 -0
- package/compodoc/directives/ExpandRowContentDirective.html +7 -77
- package/compodoc/directives/ExpandRowDirective.html +76 -184
- package/compodoc/directives/FilterHeaderRowDirective.html +67 -177
- package/compodoc/directives/PersistentPaginatorDirective.html +60 -83
- package/compodoc/directives/SelectedRowsDirective.html +17 -115
- package/compodoc/directives/TableColumnFilterInputDirective.html +67 -100
- package/compodoc/directives/TableCreateButtonDirective.html +53 -194
- package/compodoc/directives/TableDataSourceDirective.html +298 -350
- package/compodoc/directives/TableHeaderButtonDirective.html +290 -435
- package/compodoc/directives/TableRowActionDirective.html +816 -105
- package/compodoc/directives/TableRowActionExecutingDirective.html +11 -80
- package/compodoc/directives/TableRowHeaderActionDirective.html +772 -335
- package/compodoc/graph/dependencies.svg +15 -433
- package/compodoc/injectables/ExpandRowService.html +43 -8
- package/compodoc/injectables/SelectRowService.html +17 -52
- package/compodoc/interfaces/ExpandCellContentDirectiveContext.html +3 -11
- package/compodoc/interfaces/SelectedRowsDirectiveContext.html +15 -40
- package/compodoc/js/menu-wc.js +4 -166
- package/compodoc/js/menu-wc_es5.js +1 -1
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/modules/ExpandRowModule/dependencies.svg +20 -20
- package/compodoc/modules/ExpandRowModule.html +20 -20
- package/compodoc/modules/SelectRowModule/dependencies.svg +4 -4
- package/compodoc/modules/SelectRowModule.html +4 -4
- package/compodoc/modules.html +0 -85
- package/compodoc/overview.html +3 -467
- package/compodoc/pipes/RowActionCheckPipe.html +6 -13
- package/compodoc/properties.html +1 -1
- package/docs/documentation.json +10427 -11802
- package/docs/html/assets/hierarchy.js +1 -1
- package/docs/html/assets/navigation.js +1 -1
- package/docs/html/assets/search.js +1 -1
- package/docs/html/classes/AbstractTableRowAction.html +22 -20
- package/docs/html/classes/BooleanCellComponent.html +2 -2
- package/docs/html/classes/CheckboxCellComponent.html +3 -2
- package/docs/html/classes/CheckboxHeaderCellComponent.html +5 -11
- package/docs/html/classes/CopyToClipboardCellComponent.html +2 -2
- package/docs/html/classes/DateCellComponent.html +2 -2
- package/docs/html/classes/ExpandControlsCellComponent.html +2 -2
- package/docs/html/classes/ExpandRowContainerComponent.html +4 -11
- package/docs/html/classes/ExpandRowContentDirective.html +2 -2
- package/docs/html/classes/ExpandRowDirective.html +3 -3
- package/docs/html/classes/ExpandRowService.html +3 -2
- package/docs/html/classes/FilterHeaderRowDirective.html +74 -58
- package/docs/html/classes/IconCellComponent.html +2 -2
- package/docs/html/classes/ImageCellComponent.html +3 -3
- package/docs/html/classes/LinkCellComponent.html +3 -3
- package/docs/html/classes/OptionsCellComponent.html +2 -17
- package/docs/html/classes/PersistentPaginatorDirective.html +4 -7
- package/docs/html/classes/RowActionCheckPipe.html +2 -2
- package/docs/html/classes/SelectRowService.html +2 -2
- package/docs/html/classes/SelectedRowsDirective.html +2 -11
- package/docs/html/classes/SelectionModel.html +15 -15
- package/docs/html/classes/TableColumnFilterInputDirective.html +2 -9
- package/docs/html/classes/TableColumnFilterService.html +2 -2
- package/docs/html/classes/TableColumnMenuComponent.html +8 -13
- package/docs/html/classes/TableColumnOptionComponent.html +11 -12
- package/docs/html/classes/TableCreateButtonDirective.html +3 -9
- package/docs/html/classes/TableDataSourceDirective.html +14 -11
- package/docs/html/classes/TableFilterService.html +3 -3
- package/docs/html/classes/TableHeaderButtonDirective.html +18 -20
- package/docs/html/classes/TableRowActionDirective.html +22 -20
- package/docs/html/classes/TableRowActionExecutingDirective.html +2 -2
- package/docs/html/classes/TableRowHeaderActionDirective.html +23 -21
- package/docs/html/classes/TableSelectControlsComponent.html +3 -3
- package/docs/html/classes/TableShowArchivedSlideComponent.html +4 -8
- package/docs/html/classes/ToFilterColumnNamesPipe.html +2 -2
- package/docs/html/classes/TreeControlCellComponent.html +3 -9
- package/docs/html/enums/TableHeaderButtonActionStatus.html +2 -2
- package/docs/html/enums/TableRowActionStatus.html +2 -2
- package/docs/html/functions/GetTableHeaderButtonMetadata.html +1 -1
- package/docs/html/functions/GetTableRowActionCheckFunction.html +1 -1
- package/docs/html/functions/GetTableRowActionMetadata.html +1 -1
- package/docs/html/functions/HasTableRowActionCheckFunction.html +1 -1
- package/docs/html/functions/HasTableRowActionMetadata.html +1 -1
- package/docs/html/functions/IsTableRowActionTypeMethod.html +1 -1
- package/docs/html/functions/IsTableRowActionTypeSwitchMethod.html +1 -1
- package/docs/html/functions/NormalizeTableRow.html +3 -3
- package/docs/html/functions/TableActionMethod.html +1 -1
- package/docs/html/functions/TableHeaderButtonMethod.html +1 -1
- package/docs/html/functions/getMultipleValuesInSingleSelectionError.html +2 -2
- package/docs/html/hierarchy.html +1 -1
- package/docs/html/index.html +2 -2
- package/docs/html/interfaces/ExpandCellContentDirectiveContext.html +2 -2
- package/docs/html/interfaces/SelectRowOptions.html +2 -2
- package/docs/html/interfaces/SelectedRowsDirectiveContext.html +2 -2
- package/docs/html/interfaces/SelectionChange.html +5 -5
- package/docs/html/interfaces/TableActionMethodOptions.html +9 -9
- package/docs/html/interfaces/TableHeaderButtonMethodOptions.html +6 -6
- package/docs/html/interfaces/TableRowMetadata.html +3 -3
- package/docs/html/modules.html +1 -1
- package/docs/html/types/RawTableRow.html +1 -1
- package/docs/html/types/RowActionCheckFunction.html +1 -1
- package/docs/html/types/RowIdMapperFunction.html +1 -1
- package/docs/html/types/TableRemoteMethodAdapterFactory.html +1 -1
- package/docs/html/types/TableRowActionMethod.html +1 -1
- package/docs/html/types/TableRowActionTypeMethod.html +1 -1
- package/docs/html/types/TableRowActionTypeSwitchMethod.html +1 -1
- package/docs/html/variables/RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS.html +1 -1
- package/docs/html/variables/RXAP_TABLE_ACTION_METHOD_CHECK_FUNCTION_METADATA.html +2 -2
- package/docs/html/variables/RXAP_TABLE_ACTION_METHOD_METADATA.html +1 -1
- package/docs/html/variables/RXAP_TABLE_ACTION_METHOD_TYPE_METADATA.html +2 -2
- package/docs/html/variables/RXAP_TABLE_FILTER.html +1 -1
- package/docs/html/variables/RXAP_TABLE_FILTER_FORM_DEFINITION.html +1 -1
- package/docs/html/variables/RXAP_TABLE_HEADER_BUTTON_METHOD_METADATA.html +1 -1
- package/docs/html/variables/RXAP_TABLE_METHOD.html +1 -1
- package/docs/html/variables/RXAP_TABLE_ROW_ACTION_METHOD.html +1 -1
- package/docs/html/variables/RowAnimation.html +1 -1
- package/docs/html/variables/TABLE_CREATE_REMOTE_METHOD.html +1 -1
- package/docs/html/variables/TABLE_DATA_SOURCE.html +1 -1
- package/docs/html/variables/TABLE_HEADER_BUTTON_METHOD.html +1 -1
- package/docs/html/variables/TABLE_REMOTE_METHOD.html +2 -2
- package/docs/html/variables/TABLE_REMOTE_METHOD_ADAPTER_FACTORY.html +1 -1
- package/docs/markdown/README.md +1 -1
- package/docs/markdown/classes/AbstractTableRowAction.md +107 -147
- package/docs/markdown/classes/BooleanCellComponent.md +4 -4
- package/docs/markdown/classes/CheckboxCellComponent.md +14 -14
- package/docs/markdown/classes/CheckboxHeaderCellComponent.md +12 -50
- package/docs/markdown/classes/CopyToClipboardCellComponent.md +4 -4
- package/docs/markdown/classes/DateCellComponent.md +6 -6
- package/docs/markdown/classes/ExpandControlsCellComponent.md +6 -14
- package/docs/markdown/classes/ExpandRowContainerComponent.md +12 -67
- package/docs/markdown/classes/ExpandRowContentDirective.md +5 -13
- package/docs/markdown/classes/ExpandRowDirective.md +9 -23
- package/docs/markdown/classes/ExpandRowService.md +14 -6
- package/docs/markdown/classes/FilterHeaderRowDirective.md +339 -227
- package/docs/markdown/classes/IconCellComponent.md +4 -4
- package/docs/markdown/classes/ImageCellComponent.md +13 -13
- package/docs/markdown/classes/LinkCellComponent.md +10 -10
- package/docs/markdown/classes/OptionsCellComponent.md +15 -108
- package/docs/markdown/classes/PersistentPaginatorDirective.md +10 -38
- package/docs/markdown/classes/RowActionCheckPipe.md +5 -11
- package/docs/markdown/classes/SelectRowService.md +9 -15
- package/docs/markdown/classes/SelectedRowsDirective.md +4 -68
- package/docs/markdown/classes/SelectionModel.md +16 -16
- package/docs/markdown/classes/TableColumnFilterInputDirective.md +6 -60
- package/docs/markdown/classes/TableColumnFilterService.md +5 -5
- package/docs/markdown/classes/TableColumnMenuComponent.md +18 -93
- package/docs/markdown/classes/TableColumnOptionComponent.md +40 -103
- package/docs/markdown/classes/TableCreateButtonDirective.md +7 -46
- package/docs/markdown/classes/TableDataSourceDirective.md +49 -84
- package/docs/markdown/classes/TableFilterService.md +11 -11
- package/docs/markdown/classes/TableHeaderButtonDirective.md +88 -124
- package/docs/markdown/classes/TableRowActionDirective.md +136 -160
- package/docs/markdown/classes/TableRowActionExecutingDirective.md +6 -18
- package/docs/markdown/classes/TableRowHeaderActionDirective.md +133 -174
- package/docs/markdown/classes/TableSelectControlsComponent.md +8 -20
- package/docs/markdown/classes/TableShowArchivedSlideComponent.md +8 -46
- package/docs/markdown/classes/ToFilterColumnNamesPipe.md +3 -3
- package/docs/markdown/classes/TreeControlCellComponent.md +10 -33
- package/docs/markdown/enumerations/TableHeaderButtonActionStatus.md +6 -6
- package/docs/markdown/enumerations/TableRowActionStatus.md +6 -6
- package/docs/markdown/functions/GetTableHeaderButtonMetadata.md +2 -2
- package/docs/markdown/functions/GetTableRowActionCheckFunction.md +2 -2
- package/docs/markdown/functions/GetTableRowActionMetadata.md +2 -2
- package/docs/markdown/functions/HasTableRowActionCheckFunction.md +2 -2
- package/docs/markdown/functions/HasTableRowActionMetadata.md +2 -2
- package/docs/markdown/functions/IsTableRowActionTypeMethod.md +2 -2
- package/docs/markdown/functions/IsTableRowActionTypeSwitchMethod.md +2 -2
- package/docs/markdown/functions/NormalizeTableRow.md +3 -3
- package/docs/markdown/functions/TableActionMethod.md +3 -3
- package/docs/markdown/functions/TableHeaderButtonMethod.md +2 -2
- package/docs/markdown/functions/getMultipleValuesInSingleSelectionError.md +2 -2
- package/docs/markdown/globals.md +2 -7
- package/docs/markdown/interfaces/ExpandCellContentDirectiveContext.md +3 -3
- package/docs/markdown/interfaces/SelectRowOptions.md +6 -6
- package/docs/markdown/interfaces/SelectedRowsDirectiveContext.md +3 -3
- package/docs/markdown/interfaces/SelectionChange.md +5 -5
- package/docs/markdown/interfaces/TableActionMethodOptions.md +11 -11
- package/docs/markdown/interfaces/TableHeaderButtonMethodOptions.md +7 -7
- package/docs/markdown/interfaces/TableRowMetadata.md +4 -4
- package/docs/markdown/type-aliases/RawTableRow.md +2 -2
- package/docs/markdown/type-aliases/RowActionCheckFunction.md +2 -2
- package/docs/markdown/type-aliases/RowIdMapperFunction.md +2 -2
- package/docs/markdown/type-aliases/TableRemoteMethodAdapterFactory.md +2 -2
- package/docs/markdown/type-aliases/TableRowActionMethod.md +2 -2
- package/docs/markdown/type-aliases/TableRowActionTypeMethod.md +2 -2
- package/docs/markdown/type-aliases/TableRowActionTypeSwitchMethod.md +2 -2
- package/docs/markdown/variables/RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS.md +2 -2
- package/docs/markdown/variables/RXAP_TABLE_ACTION_METHOD_CHECK_FUNCTION_METADATA.md +2 -2
- package/docs/markdown/variables/RXAP_TABLE_ACTION_METHOD_METADATA.md +2 -2
- package/docs/markdown/variables/RXAP_TABLE_ACTION_METHOD_TYPE_METADATA.md +2 -2
- package/docs/markdown/variables/RXAP_TABLE_FILTER.md +2 -2
- package/docs/markdown/variables/RXAP_TABLE_FILTER_FORM_DEFINITION.md +2 -2
- package/docs/markdown/variables/RXAP_TABLE_HEADER_BUTTON_METHOD_METADATA.md +2 -2
- package/docs/markdown/variables/RXAP_TABLE_METHOD.md +2 -2
- package/docs/markdown/variables/RXAP_TABLE_ROW_ACTION_METHOD.md +2 -2
- package/docs/markdown/variables/RowAnimation.md +2 -2
- package/docs/markdown/variables/TABLE_CREATE_REMOTE_METHOD.md +2 -2
- package/docs/markdown/variables/TABLE_DATA_SOURCE.md +2 -2
- package/docs/markdown/variables/TABLE_HEADER_BUTTON_METHOD.md +2 -2
- package/docs/markdown/variables/TABLE_REMOTE_METHOD.md +2 -2
- package/docs/markdown/variables/TABLE_REMOTE_METHOD_ADAPTER_FACTORY.md +2 -2
- package/docs/wiki/Class.AbstractTableRowAction.md +106 -146
- package/docs/wiki/Class.BooleanCellComponent.md +3 -3
- package/docs/wiki/Class.CheckboxCellComponent.md +13 -13
- package/docs/wiki/Class.CheckboxHeaderCellComponent.md +11 -49
- package/docs/wiki/Class.CopyToClipboardCellComponent.md +3 -3
- package/docs/wiki/Class.DateCellComponent.md +5 -5
- package/docs/wiki/Class.ExpandControlsCellComponent.md +5 -13
- package/docs/wiki/Class.ExpandRowContainerComponent.md +11 -66
- package/docs/wiki/Class.ExpandRowContentDirective.md +4 -12
- package/docs/wiki/Class.ExpandRowDirective.md +8 -22
- package/docs/wiki/Class.ExpandRowService.md +13 -5
- package/docs/wiki/Class.FilterHeaderRowDirective.md +338 -226
- package/docs/wiki/Class.IconCellComponent.md +3 -3
- package/docs/wiki/Class.ImageCellComponent.md +12 -12
- package/docs/wiki/Class.LinkCellComponent.md +9 -9
- package/docs/wiki/Class.OptionsCellComponent.md +14 -107
- package/docs/wiki/Class.PersistentPaginatorDirective.md +9 -37
- package/docs/wiki/Class.RowActionCheckPipe.md +4 -10
- package/docs/wiki/Class.SelectRowService.md +8 -14
- package/docs/wiki/Class.SelectedRowsDirective.md +3 -67
- package/docs/wiki/Class.SelectionModel.md +15 -15
- package/docs/wiki/Class.TableColumnFilterInputDirective.md +5 -59
- package/docs/wiki/Class.TableColumnFilterService.md +4 -4
- package/docs/wiki/Class.TableColumnMenuComponent.md +17 -92
- package/docs/wiki/Class.TableColumnOptionComponent.md +39 -102
- package/docs/wiki/Class.TableCreateButtonDirective.md +6 -45
- package/docs/wiki/Class.TableDataSourceDirective.md +48 -83
- package/docs/wiki/Class.TableFilterService.md +10 -10
- package/docs/wiki/Class.TableHeaderButtonDirective.md +87 -123
- package/docs/wiki/Class.TableRowActionDirective.md +135 -159
- package/docs/wiki/Class.TableRowActionExecutingDirective.md +5 -17
- package/docs/wiki/Class.TableRowHeaderActionDirective.md +132 -173
- package/docs/wiki/Class.TableSelectControlsComponent.md +7 -19
- package/docs/wiki/Class.TableShowArchivedSlideComponent.md +7 -45
- package/docs/wiki/Class.ToFilterColumnNamesPipe.md +2 -2
- package/docs/wiki/Class.TreeControlCellComponent.md +9 -32
- package/docs/wiki/Enumeration.TableHeaderButtonActionStatus.md +5 -5
- package/docs/wiki/Enumeration.TableRowActionStatus.md +5 -5
- package/docs/wiki/Function.GetTableHeaderButtonMetadata.md +1 -1
- package/docs/wiki/Function.GetTableRowActionCheckFunction.md +1 -1
- package/docs/wiki/Function.GetTableRowActionMetadata.md +1 -1
- package/docs/wiki/Function.HasTableRowActionCheckFunction.md +1 -1
- package/docs/wiki/Function.HasTableRowActionMetadata.md +1 -1
- package/docs/wiki/Function.IsTableRowActionTypeMethod.md +1 -1
- package/docs/wiki/Function.IsTableRowActionTypeSwitchMethod.md +1 -1
- package/docs/wiki/Function.NormalizeTableRow.md +2 -2
- package/docs/wiki/Function.TableActionMethod.md +2 -2
- package/docs/wiki/Function.TableHeaderButtonMethod.md +1 -1
- package/docs/wiki/Function.getMultipleValuesInSingleSelectionError.md +1 -1
- package/docs/wiki/Interface.ExpandCellContentDirectiveContext.md +2 -2
- package/docs/wiki/Interface.SelectRowOptions.md +5 -5
- package/docs/wiki/Interface.SelectedRowsDirectiveContext.md +2 -2
- package/docs/wiki/Interface.SelectionChange.md +4 -4
- package/docs/wiki/Interface.TableActionMethodOptions.md +10 -10
- package/docs/wiki/Interface.TableHeaderButtonMethodOptions.md +6 -6
- package/docs/wiki/Interface.TableRowMetadata.md +3 -3
- package/docs/wiki/TypeAlias.RawTableRow.md +1 -1
- package/docs/wiki/TypeAlias.RowActionCheckFunction.md +1 -1
- package/docs/wiki/TypeAlias.RowIdMapperFunction.md +1 -1
- package/docs/wiki/TypeAlias.TableRemoteMethodAdapterFactory.md +1 -1
- package/docs/wiki/TypeAlias.TableRowActionMethod.md +1 -1
- package/docs/wiki/TypeAlias.TableRowActionTypeMethod.md +1 -1
- package/docs/wiki/TypeAlias.TableRowActionTypeSwitchMethod.md +1 -1
- package/docs/wiki/Variable.RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS.md +1 -1
- package/docs/wiki/Variable.RXAP_TABLE_ACTION_METHOD_CHECK_FUNCTION_METADATA.md +1 -1
- package/docs/wiki/Variable.RXAP_TABLE_ACTION_METHOD_METADATA.md +1 -1
- package/docs/wiki/Variable.RXAP_TABLE_ACTION_METHOD_TYPE_METADATA.md +1 -1
- package/docs/wiki/Variable.RXAP_TABLE_FILTER.md +1 -1
- package/docs/wiki/Variable.RXAP_TABLE_FILTER_FORM_DEFINITION.md +1 -1
- package/docs/wiki/Variable.RXAP_TABLE_HEADER_BUTTON_METHOD_METADATA.md +1 -1
- package/docs/wiki/Variable.RXAP_TABLE_METHOD.md +1 -1
- package/docs/wiki/Variable.RXAP_TABLE_ROW_ACTION_METHOD.md +1 -1
- package/docs/wiki/Variable.RowAnimation.md +1 -1
- package/docs/wiki/Variable.TABLE_CREATE_REMOTE_METHOD.md +1 -1
- package/docs/wiki/Variable.TABLE_DATA_SOURCE.md +1 -1
- package/docs/wiki/Variable.TABLE_HEADER_BUTTON_METHOD.md +1 -1
- package/docs/wiki/Variable.TABLE_REMOTE_METHOD.md +1 -1
- package/docs/wiki/Variable.TABLE_REMOTE_METHOD_ADAPTER_FACTORY.md +1 -1
- package/docs/wiki/_Sidebar.md +0 -5
- package/docs/wiki/globals.md +1 -6
- package/fesm2022/rxap-material-table-system.mjs +619 -1198
- package/fesm2022/rxap-material-table-system.mjs.map +1 -1
- package/package.json +49 -48
- package/types/rxap-material-table-system.d.ts +818 -0
- package/docs/html/classes/ExpandRowModule.html +0 -2
- package/docs/html/classes/SelectRowModule.html +0 -2
- package/docs/html/classes/TableColumnMenuModule.html +0 -2
- package/docs/html/classes/TableFilterModule.html +0 -2
- package/docs/html/classes/TableRowActionsModule.html +0 -2
- package/docs/markdown/classes/ExpandRowModule.md +0 -19
- package/docs/markdown/classes/SelectRowModule.md +0 -19
- package/docs/markdown/classes/TableColumnMenuModule.md +0 -19
- package/docs/markdown/classes/TableFilterModule.md +0 -19
- package/docs/markdown/classes/TableRowActionsModule.md +0 -19
- package/docs/wiki/Class.ExpandRowModule.md +0 -15
- package/docs/wiki/Class.SelectRowModule.md +0 -15
- package/docs/wiki/Class.TableColumnMenuModule.md +0 -15
- package/docs/wiki/Class.TableFilterModule.md +0 -15
- package/docs/wiki/Class.TableRowActionsModule.md +0 -15
- package/index.d.ts +0 -55
- package/lib/cells/boolean-cell/boolean-cell.component.d.ts +0 -6
- package/lib/cells/copy-to-clipboard-cell/copy-to-clipboard-cell.component.d.ts +0 -6
- package/lib/cells/date-cell/date-cell.component.d.ts +0 -7
- package/lib/cells/icon-cell/icon-cell.component.d.ts +0 -7
- package/lib/cells/image-cell/image-cell.component.d.ts +0 -11
- package/lib/cells/link-cell/link-cell.component.d.ts +0 -9
- package/lib/cells/options-cell/options-cell.component.d.ts +0 -22
- package/lib/cells/tree-control-cell/tree-control-cell.component.d.ts +0 -16
- package/lib/expand-row/expand-controls-cell/expand-controls-cell.component.d.ts +0 -9
- package/lib/expand-row/expand-row-container/expand-row-container.component.d.ts +0 -18
- package/lib/expand-row/expand-row-container/expand-row-content.directive.d.ts +0 -12
- package/lib/expand-row/expand-row.directive.d.ts +0 -11
- package/lib/expand-row/expand-row.module.d.ts +0 -7
- package/lib/expand-row/expand-row.service.d.ts +0 -11
- package/lib/persistent-paginator.directive.d.ts +0 -18
- package/lib/row-animation.d.ts +0 -1
- package/lib/select-row/checkbox-cell/checkbox-cell.component.d.ts +0 -9
- package/lib/select-row/checkbox-header-cell/checkbox-header-cell.component.d.ts +0 -18
- package/lib/select-row/select-row.module.d.ts +0 -9
- package/lib/select-row/select-row.options.d.ts +0 -6
- package/lib/select-row/select-row.service.d.ts +0 -14
- package/lib/select-row/selected-rows.directive.d.ts +0 -18
- package/lib/select-row/selection-model.d.ts +0 -118
- package/lib/select-row/tokens.d.ts +0 -3
- package/lib/table-column-filter/table-column-filter-input.directive.d.ts +0 -15
- package/lib/table-column-filter/table-column-filter.service.d.ts +0 -10
- package/lib/table-column-menu/table-column-menu.component.d.ts +0 -24
- package/lib/table-column-menu/table-column-menu.module.d.ts +0 -9
- package/lib/table-column-menu/table-column-option/table-column-option.component.d.ts +0 -27
- package/lib/table-column-menu/table-show-archived-slide/table-show-archived-slide.component.d.ts +0 -18
- package/lib/table-create-button/table-create-button.directive.d.ts +0 -18
- package/lib/table-create-button/tokens.d.ts +0 -3
- package/lib/table-data-source.directive.d.ts +0 -61
- package/lib/table-filter/filter-header-row.directive.d.ts +0 -14
- package/lib/table-filter/table-filter.module.d.ts +0 -8
- package/lib/table-filter/table-filter.service.d.ts +0 -25
- package/lib/table-filter/to-filter-column-names.pipe.d.ts +0 -7
- package/lib/table-filter/tokens.d.ts +0 -2
- package/lib/table-header-button/decorators.d.ts +0 -26
- package/lib/table-header-button/table-header-button-action-status.d.ts +0 -6
- package/lib/table-header-button/table-header-button.directive.d.ts +0 -55
- package/lib/table-header-button/tokens.d.ts +0 -3
- package/lib/table-row-actions/abstract-table-row-action.d.ts +0 -76
- package/lib/table-row-actions/decorators.d.ts +0 -47
- package/lib/table-row-actions/row-action-check.pipe.d.ts +0 -10
- package/lib/table-row-actions/table-row-action-executing.directive.d.ts +0 -11
- package/lib/table-row-actions/table-row-action-status.d.ts +0 -6
- package/lib/table-row-actions/table-row-action.directive.d.ts +0 -9
- package/lib/table-row-actions/table-row-action.method.d.ts +0 -8
- package/lib/table-row-actions/table-row-actions.module.d.ts +0 -16
- package/lib/table-row-actions/table-row-header-action.directive.d.ts +0 -22
- package/lib/table-row-actions/tokens.d.ts +0 -2
- package/lib/table-row-actions/types.d.ts +0 -8
- package/lib/table-row-metadata.d.ts +0 -27
- package/lib/table-select-controls/table-select-controls.component.d.ts +0 -14
|
@@ -1,50 +1,43 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken,
|
|
2
|
+
import { InjectionToken, inject, Injectable, ChangeDetectionStrategy, Component, ChangeDetectorRef, input, linkedSignal, isDevMode, Directive, TemplateRef, ViewContainerRef, Renderer2, INJECTOR, computed, contentChild, effect, untracked, Pipe, forwardRef, ElementRef, contentChildren, afterNextRender, DestroyRef } from '@angular/core';
|
|
3
|
+
import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
3
4
|
import { RXAP_WINDOW_REF } from '@rxap/window-system';
|
|
4
|
-
import { map, tap, startWith, debounceTime, distinctUntilChanged
|
|
5
|
-
import { hasIdentifierProperty, getIdentifierPropertyValue, clone, DeleteEmptyProperties, equals,
|
|
6
|
-
import { Subject, ReplaySubject, Subscription, isObservable, BehaviorSubject
|
|
7
|
-
import
|
|
8
|
-
import * as i4 from '@angular/material/button';
|
|
5
|
+
import { map, tap, startWith, debounceTime, distinctUntilChanged } from 'rxjs/operators';
|
|
6
|
+
import { hasIdentifierProperty, getIdentifierPropertyValue, clone, DeleteEmptyProperties, equals, coerceBoolean, coerceArray, dasherize } from '@rxap/utilities';
|
|
7
|
+
import { Subject, ReplaySubject, Subscription, isObservable, BehaviorSubject } from 'rxjs';
|
|
8
|
+
import * as i1 from '@angular/material/button';
|
|
9
9
|
import { MatButtonModule, MatIconButton, MatButton, MatMiniFabButton } from '@angular/material/button';
|
|
10
|
-
import * as i1$1 from '@angular/cdk/overlay';
|
|
11
|
-
import { Overlay } from '@angular/cdk/overlay';
|
|
12
|
-
import * as i3$1 from '@angular/material/snack-bar';
|
|
13
10
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
14
|
-
import * as
|
|
11
|
+
import * as i1$4 from '@angular/material/tooltip';
|
|
15
12
|
import { MatTooltip, MatTooltipModule } from '@angular/material/tooltip';
|
|
16
|
-
import { ConfirmDirective,
|
|
17
|
-
import * as i1 from '@angular/cdk/table';
|
|
13
|
+
import { ConfirmDirective, CopyToClipboardComponent } from '@rxap/components';
|
|
18
14
|
import { CdkTable } from '@angular/cdk/table';
|
|
19
|
-
import * as i3 from '@angular/material/sort';
|
|
20
15
|
import { MatSort } from '@angular/material/sort';
|
|
21
16
|
import { pipeDataSource } from '@rxap/data-source';
|
|
22
|
-
import * as i2 from '@rxap/data-source/table';
|
|
23
17
|
import { RXAP_TABLE_METHOD, DynamicTableDataSource } from '@rxap/data-source/table';
|
|
24
18
|
export { RXAP_TABLE_METHOD } from '@rxap/data-source/table';
|
|
25
19
|
import { ToggleSubject } from '@rxap/rxjs';
|
|
26
20
|
import { setMetadata, getMetadata, hasMetadata } from '@rxap/reflect-metadata';
|
|
27
|
-
import * as i2$2 from '@angular/material/icon';
|
|
28
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
29
|
-
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
30
|
-
import * as i1$4 from '@angular/forms';
|
|
31
21
|
import { ControlContainer, NgModel } from '@angular/forms';
|
|
32
22
|
import { FormDirective } from '@rxap/forms';
|
|
33
|
-
import * as i1$
|
|
34
|
-
import * as i1$3 from '@angular/material/slide-toggle';
|
|
23
|
+
import * as i1$2 from '@angular/material/slide-toggle';
|
|
35
24
|
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
36
25
|
import { StopPropagationDirective, BackgroundSizeOptions, BackgroundRepeatOptions, BackgroundPositionOptions, BackgroundImageDirective } from '@rxap/directives';
|
|
37
|
-
import
|
|
26
|
+
import { NgClass, DatePipe } from '@angular/common';
|
|
27
|
+
import * as i1$1 from '@angular/material/checkbox';
|
|
38
28
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
39
|
-
import * as i2$1 from '@angular/material/
|
|
29
|
+
import * as i2$1 from '@angular/material/icon';
|
|
30
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
31
|
+
import * as i2 from '@angular/material/menu';
|
|
40
32
|
import { MatMenuModule } from '@angular/material/menu';
|
|
41
|
-
import
|
|
42
|
-
import * as i1$
|
|
33
|
+
import { Router } from '@angular/router';
|
|
34
|
+
import * as i1$3 from '@angular/cdk/portal';
|
|
43
35
|
import { TemplatePortal, PortalModule } from '@angular/cdk/portal';
|
|
44
36
|
import { trigger, state, style, transition, animate, sequence } from '@angular/animations';
|
|
45
37
|
import { IconDirective } from '@rxap/material-directives/icon';
|
|
46
38
|
import { MatOption } from '@angular/material/core';
|
|
47
|
-
|
|
39
|
+
import { __decorate } from 'tslib';
|
|
40
|
+
import { MatPaginator } from '@angular/material/paginator';
|
|
48
41
|
/**
|
|
49
42
|
* @license
|
|
50
43
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -261,16 +254,14 @@ class SelectionModel {
|
|
|
261
254
|
function getMultipleValuesInSingleSelectionError() {
|
|
262
255
|
return Error('Cannot pass multiple values into SelectionModel with single-value mode.');
|
|
263
256
|
}
|
|
264
|
-
|
|
265
257
|
const RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS = new InjectionToken('rxap-material/table-system/select-row/options');
|
|
266
|
-
|
|
267
258
|
class SelectRowService {
|
|
268
259
|
get selectedRows() {
|
|
269
260
|
return this.selectionModel.selected;
|
|
270
261
|
}
|
|
271
|
-
constructor(
|
|
272
|
-
|
|
273
|
-
this.selectionModel = new SelectionModel(options?.multiple, options?.selected, options?.emitChanges, options?.compareWith ?? this.compareWith);
|
|
262
|
+
constructor() {
|
|
263
|
+
const options = inject(RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS, { optional: true }) ?? null;
|
|
264
|
+
this.selectionModel = new SelectionModel(options?.multiple ?? false, options?.selected, options?.emitChanges, options?.compareWith ?? this.compareWith);
|
|
274
265
|
this.selectedRows$ = this.selectionModel.changed.pipe(map(() => this.selectionModel.selected));
|
|
275
266
|
}
|
|
276
267
|
clear() {
|
|
@@ -285,23 +276,17 @@ class SelectRowService {
|
|
|
285
276
|
}
|
|
286
277
|
return false;
|
|
287
278
|
}
|
|
288
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
289
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
279
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SelectRowService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
280
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SelectRowService }); }
|
|
290
281
|
}
|
|
291
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
282
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SelectRowService, decorators: [{
|
|
292
283
|
type: Injectable
|
|
293
|
-
}], ctorParameters: () => [
|
|
294
|
-
type: Optional
|
|
295
|
-
}, {
|
|
296
|
-
type: Inject,
|
|
297
|
-
args: [RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS]
|
|
298
|
-
}] }] });
|
|
299
|
-
|
|
284
|
+
}], ctorParameters: () => [] });
|
|
300
285
|
class TableSelectControlsComponent {
|
|
301
|
-
constructor(
|
|
302
|
-
this.selectRows =
|
|
303
|
-
this.windowRef =
|
|
304
|
-
this.hasNotSelected
|
|
286
|
+
constructor() {
|
|
287
|
+
this.selectRows = inject(SelectRowService);
|
|
288
|
+
this.windowRef = inject(RXAP_WINDOW_REF);
|
|
289
|
+
this.hasNotSelected = toSignal(this.selectRows.selectedRows$.pipe(map((selected) => selected.length === 0)), { initialValue: true });
|
|
305
290
|
}
|
|
306
291
|
cancel() {
|
|
307
292
|
this.windowRef.close();
|
|
@@ -309,20 +294,15 @@ class TableSelectControlsComponent {
|
|
|
309
294
|
select() {
|
|
310
295
|
this.windowRef.close(this.selectRows.selectedRows);
|
|
311
296
|
}
|
|
312
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
313
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
297
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableSelectControlsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
298
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: TableSelectControlsComponent, isStandalone: true, selector: "rxap-table-select-controls", ngImport: i0, template: "<div class=\"flex flex-row gap-4\">\n <button (click)=\"cancel()\" class=\"grow-0\" mat-stroked-button type=\"button\">\n <ng-container i18n>Cancel</ng-container>\n </button>\n <button (click)=\"select()\" [disabled]=\"hasNotSelected()\" class=\"grow-0\" mat-raised-button type=\"button\">\n <ng-container i18n>Select</ng-container>\n </button>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
314
299
|
}
|
|
315
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
300
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableSelectControlsComponent, decorators: [{
|
|
316
301
|
type: Component,
|
|
317
302
|
args: [{ selector: 'rxap-table-select-controls', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
318
303
|
MatButtonModule,
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
}], ctorParameters: () => [{ type: SelectRowService }, { type: undefined, decorators: [{
|
|
322
|
-
type: Inject,
|
|
323
|
-
args: [RXAP_WINDOW_REF]
|
|
324
|
-
}] }] });
|
|
325
|
-
|
|
304
|
+
], template: "<div class=\"flex flex-row gap-4\">\n <button (click)=\"cancel()\" class=\"grow-0\" mat-stroked-button type=\"button\">\n <ng-container i18n>Cancel</ng-container>\n </button>\n <button (click)=\"select()\" [disabled]=\"hasNotSelected()\" class=\"grow-0\" mat-raised-button type=\"button\">\n <ng-container i18n>Select</ng-container>\n </button>\n</div>\n" }]
|
|
305
|
+
}] });
|
|
326
306
|
class TableFilterService {
|
|
327
307
|
constructor() {
|
|
328
308
|
this.change = new ReplaySubject(1);
|
|
@@ -365,13 +345,12 @@ class TableFilterService {
|
|
|
365
345
|
ngOnDestroy() {
|
|
366
346
|
this._subscription.unsubscribe();
|
|
367
347
|
}
|
|
368
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
369
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
348
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableFilterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
349
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableFilterService }); }
|
|
370
350
|
}
|
|
371
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
351
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableFilterService, decorators: [{
|
|
372
352
|
type: Injectable
|
|
373
353
|
}], ctorParameters: () => [] });
|
|
374
|
-
|
|
375
354
|
/**
|
|
376
355
|
* @deprecated use TABLE_METHOD instead
|
|
377
356
|
*/
|
|
@@ -380,17 +359,8 @@ const TABLE_REMOTE_METHOD_ADAPTER_FACTORY = new InjectionToken('table-remote-met
|
|
|
380
359
|
const RXAP_TABLE_FILTER = new InjectionToken('rxap/material-table-system/table-filter');
|
|
381
360
|
const TABLE_DATA_SOURCE = new InjectionToken('table-data-source');
|
|
382
361
|
class TableDataSourceDirective {
|
|
383
|
-
/**
|
|
384
|
-
* @deprecated use dataSource instead
|
|
385
|
-
*/
|
|
386
|
-
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
387
|
-
set setDataSource(dataSource) {
|
|
388
|
-
if (typeof dataSource !== 'string') {
|
|
389
|
-
this.dataSource = dataSource;
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
362
|
get lastRefreshed() {
|
|
393
|
-
return this.dataSource?.lastRefreshed ?? null;
|
|
363
|
+
return this.dataSource()?.lastRefreshed ?? null;
|
|
394
364
|
}
|
|
395
365
|
/**
|
|
396
366
|
* @deprecated use method instead
|
|
@@ -404,19 +374,36 @@ class TableDataSourceDirective {
|
|
|
404
374
|
get sourceRemoteMethod() {
|
|
405
375
|
return this.sourceMethod;
|
|
406
376
|
}
|
|
407
|
-
constructor(
|
|
408
|
-
this.matTable =
|
|
409
|
-
this.cdr =
|
|
410
|
-
this.sourceMethod =
|
|
411
|
-
this.sourceDataSource =
|
|
412
|
-
this.matSort =
|
|
413
|
-
this.tableFilter =
|
|
414
|
-
this._tableFilter =
|
|
377
|
+
constructor() {
|
|
378
|
+
this.matTable = inject(CdkTable);
|
|
379
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
380
|
+
this.sourceMethod = inject(RXAP_TABLE_METHOD, { optional: true });
|
|
381
|
+
this.sourceDataSource = inject(TABLE_DATA_SOURCE, { optional: true });
|
|
382
|
+
this.matSort = inject(MatSort, { optional: true });
|
|
383
|
+
this.tableFilter = inject(TableFilterService, { optional: true });
|
|
384
|
+
this._tableFilter = inject(RXAP_TABLE_FILTER, { optional: true });
|
|
385
|
+
/**
|
|
386
|
+
* @deprecated use dataSource instead
|
|
387
|
+
*/
|
|
388
|
+
this.deprecatedDataSource = input('', { ...(ngDevMode ? { debugName: "deprecatedDataSource" } : /* istanbul ignore next */ {}), alias: 'rxapTableDataSource' });
|
|
389
|
+
this.dataSourceInput = input(undefined, { ...(ngDevMode ? { debugName: "dataSourceInput" } : /* istanbul ignore next */ {}), alias: 'dataSource' });
|
|
390
|
+
this.paginator = input(...(ngDevMode ? [undefined, { debugName: "paginator" }] : /* istanbul ignore next */ []));
|
|
415
391
|
this.loading$ = new ToggleSubject(true);
|
|
392
|
+
this.id = input.required(...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
393
|
+
this.parameters = input(...(ngDevMode ? [undefined, { debugName: "parameters" }] : /* istanbul ignore next */ []));
|
|
394
|
+
/**
|
|
395
|
+
* The current data source. Initialised with the dataSource input - if not defined the
|
|
396
|
+
* data source is created from the TABLE_DATA_SOURCE or RXAP_TABLE_METHOD token on init.
|
|
397
|
+
*/
|
|
398
|
+
this.dataSource = linkedSignal(() => {
|
|
399
|
+
const deprecated = this.deprecatedDataSource();
|
|
400
|
+
return this.dataSourceInput() ?? (deprecated !== '' ? deprecated : undefined);
|
|
401
|
+
}, ...(ngDevMode ? [{ debugName: "dataSource" }] : /* istanbul ignore next */ []));
|
|
416
402
|
this.hasError$ = new ToggleSubject();
|
|
417
403
|
this.error$ = new Subject();
|
|
418
404
|
this._subscription = new Subscription();
|
|
419
405
|
this.adapterFactory = null;
|
|
406
|
+
const adapterFactory = inject(TABLE_REMOTE_METHOD_ADAPTER_FACTORY, { optional: true });
|
|
420
407
|
this.matTable.trackBy = this.trackBy;
|
|
421
408
|
this.adapterFactory = adapterFactory;
|
|
422
409
|
this.retry = this.retry.bind(this);
|
|
@@ -428,44 +415,47 @@ class TableDataSourceDirective {
|
|
|
428
415
|
}
|
|
429
416
|
ngOnInit() {
|
|
430
417
|
const tableFilter = this._tableFilter ?? this.tableFilter ?? undefined;
|
|
431
|
-
|
|
418
|
+
let dataSource = this.dataSource();
|
|
419
|
+
if (!dataSource) {
|
|
432
420
|
if (this.sourceDataSource) {
|
|
433
|
-
|
|
421
|
+
dataSource = this.sourceDataSource;
|
|
434
422
|
}
|
|
435
423
|
else if (this.sourceMethod) {
|
|
436
424
|
if (this.adapterFactory) {
|
|
437
|
-
this.method = this.adapterFactory(this.sourceMethod, this.paginator, this.matSort, tableFilter, this.parameters);
|
|
425
|
+
this.method = this.adapterFactory(this.sourceMethod, this.paginator(), this.matSort, tableFilter, this.parameters());
|
|
438
426
|
}
|
|
439
427
|
else {
|
|
440
428
|
this.method = this.sourceMethod;
|
|
441
429
|
}
|
|
442
|
-
|
|
430
|
+
dataSource = new DynamicTableDataSource(this.method, this.paginator(), this.matSort, tableFilter, this.parameters(), this.method.metadata ?? { id: this.id() });
|
|
443
431
|
}
|
|
444
|
-
if (!
|
|
432
|
+
if (!dataSource) {
|
|
445
433
|
throw new Error('The TABLE_DATA_SOURCE and RXAP_TABLE_METHOD token are not defined!');
|
|
446
434
|
}
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
this._subscription.add(
|
|
435
|
+
this.dataSource.set(dataSource);
|
|
436
|
+
}
|
|
437
|
+
dataSource.paginator = this.paginator();
|
|
438
|
+
dataSource.sort = this.matSort ?? undefined;
|
|
439
|
+
dataSource.filter = tableFilter;
|
|
440
|
+
dataSource.parameters = this.parameters();
|
|
441
|
+
const id = this.id();
|
|
442
|
+
if (dataSource instanceof DynamicTableDataSource) {
|
|
443
|
+
dataSource.setPaginator(this.paginator(), id);
|
|
444
|
+
dataSource.setSort(this.matSort, id);
|
|
445
|
+
dataSource.setFilter(tableFilter, id);
|
|
446
|
+
dataSource.setParameters(this.parameters(), id);
|
|
447
|
+
}
|
|
448
|
+
this._subscription.add(dataSource.loading$.pipe(tap(loading => this.loading$.next(!!loading))).subscribe());
|
|
449
|
+
this._subscription.add(dataSource.hasError$.pipe(tap(hasError => this.hasError$.next(!!hasError))).subscribe());
|
|
450
|
+
this._subscription.add(dataSource.error$.pipe(tap(error => this.error$.next(error))).subscribe());
|
|
461
451
|
// create the id property for the mat table component.
|
|
462
452
|
// the instance of the mat table component is used as viewer object
|
|
463
453
|
// with the set of the id property it is possible to use the same data source
|
|
464
454
|
// instance for multiple table component simultaneously
|
|
465
455
|
// on connect the data source can then use the correct paginator/matSort/tableFilter/parameters instance
|
|
466
456
|
// to create the TableEvent objects
|
|
467
|
-
Reflect.set(this.matTable, 'id',
|
|
468
|
-
this.matTable.dataSource = pipeDataSource(
|
|
457
|
+
Reflect.set(this.matTable, 'id', id);
|
|
458
|
+
this.matTable.dataSource = pipeDataSource(dataSource, tap(rowList => {
|
|
469
459
|
if (rowList.some((element) => !element.__metadata__)) {
|
|
470
460
|
if (isDevMode()) {
|
|
471
461
|
console.debug('Ensure to use the NormalizeTableRow function to normalize the table row!');
|
|
@@ -481,98 +471,51 @@ class TableDataSourceDirective {
|
|
|
481
471
|
this._subscription?.unsubscribe();
|
|
482
472
|
}
|
|
483
473
|
refresh() {
|
|
484
|
-
this.dataSource?.refresh();
|
|
474
|
+
this.dataSource()?.refresh();
|
|
485
475
|
}
|
|
486
476
|
retry() {
|
|
487
|
-
this.dataSource?.retry();
|
|
477
|
+
this.dataSource()?.retry();
|
|
488
478
|
}
|
|
489
479
|
reset() {
|
|
490
480
|
if (this.tableFilter) {
|
|
491
481
|
this.tableFilter.reset();
|
|
492
482
|
}
|
|
493
483
|
else {
|
|
494
|
-
this.dataSource?.reset();
|
|
484
|
+
this.dataSource()?.reset();
|
|
495
485
|
}
|
|
496
486
|
}
|
|
497
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
498
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
487
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableDataSourceDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
488
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: TableDataSourceDirective, isStandalone: true, selector: "table[mat-table][rxapTableDataSource],mat-table[rxapTableDataSource]", inputs: { deprecatedDataSource: { classPropertyName: "deprecatedDataSource", publicName: "rxapTableDataSource", isSignal: true, isRequired: false, transformFunction: null }, dataSourceInput: { classPropertyName: "dataSourceInput", publicName: "dataSource", isSignal: true, isRequired: false, transformFunction: null }, paginator: { classPropertyName: "paginator", publicName: "paginator", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: true, transformFunction: null }, parameters: { classPropertyName: "parameters", publicName: "parameters", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["rxapTableDataSource"], ngImport: i0 }); }
|
|
499
489
|
}
|
|
500
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
490
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableDataSourceDirective, decorators: [{
|
|
501
491
|
type: Directive,
|
|
502
492
|
args: [{
|
|
503
493
|
selector: 'table[mat-table][rxapTableDataSource],mat-table[rxapTableDataSource]',
|
|
504
494
|
exportAs: 'rxapTableDataSource',
|
|
505
495
|
standalone: true,
|
|
506
496
|
}]
|
|
507
|
-
}], ctorParameters: () => [{ type:
|
|
508
|
-
type: Inject,
|
|
509
|
-
args: [CdkTable]
|
|
510
|
-
}] }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
|
|
511
|
-
type: Optional
|
|
512
|
-
}, {
|
|
513
|
-
type: Inject,
|
|
514
|
-
args: [RXAP_TABLE_METHOD]
|
|
515
|
-
}] }, { type: i2.AbstractTableDataSource, decorators: [{
|
|
516
|
-
type: Optional
|
|
517
|
-
}, {
|
|
518
|
-
type: Inject,
|
|
519
|
-
args: [TABLE_DATA_SOURCE]
|
|
520
|
-
}] }, { type: undefined, decorators: [{
|
|
521
|
-
type: Optional
|
|
522
|
-
}, {
|
|
523
|
-
type: Inject,
|
|
524
|
-
args: [TABLE_REMOTE_METHOD_ADAPTER_FACTORY]
|
|
525
|
-
}] }, { type: i3.MatSort, decorators: [{
|
|
526
|
-
type: Optional
|
|
527
|
-
}, {
|
|
528
|
-
type: Inject,
|
|
529
|
-
args: [MatSort]
|
|
530
|
-
}] }, { type: TableFilterService, decorators: [{
|
|
531
|
-
type: Optional
|
|
532
|
-
}, {
|
|
533
|
-
type: Inject,
|
|
534
|
-
args: [TableFilterService]
|
|
535
|
-
}] }, { type: undefined, decorators: [{
|
|
536
|
-
type: Optional
|
|
537
|
-
}, {
|
|
538
|
-
type: Inject,
|
|
539
|
-
args: [RXAP_TABLE_FILTER]
|
|
540
|
-
}] }], propDecorators: { setDataSource: [{
|
|
541
|
-
type: Input,
|
|
542
|
-
args: ['rxapTableDataSource']
|
|
543
|
-
}], paginator: [{
|
|
544
|
-
type: Input
|
|
545
|
-
}], id: [{
|
|
546
|
-
type: Input,
|
|
547
|
-
args: [{ required: true }]
|
|
548
|
-
}], parameters: [{
|
|
549
|
-
type: Input
|
|
550
|
-
}], dataSource: [{
|
|
551
|
-
type: Input
|
|
552
|
-
}] } });
|
|
553
|
-
|
|
497
|
+
}], ctorParameters: () => [], propDecorators: { deprecatedDataSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxapTableDataSource", required: false }] }], dataSourceInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataSource", required: false }] }], paginator: [{ type: i0.Input, args: [{ isSignal: true, alias: "paginator", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: true }] }], parameters: [{ type: i0.Input, args: [{ isSignal: true, alias: "parameters", required: false }] }] } });
|
|
554
498
|
class TableRowActionExecutingDirective {
|
|
555
|
-
constructor(
|
|
556
|
-
this.templateRef =
|
|
557
|
-
this.vcr =
|
|
499
|
+
constructor() {
|
|
500
|
+
this.templateRef = inject(TemplateRef);
|
|
501
|
+
this.vcr = inject(ViewContainerRef);
|
|
558
502
|
}
|
|
559
503
|
show() {
|
|
560
|
-
this.vcr.createEmbeddedView(this.templateRef);
|
|
504
|
+
this.vcr.createEmbeddedView(this.templateRef).detectChanges();
|
|
561
505
|
}
|
|
562
506
|
hide() {
|
|
563
507
|
this.vcr.clear();
|
|
564
508
|
}
|
|
565
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
566
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
509
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableRowActionExecutingDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
510
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: TableRowActionExecutingDirective, isStandalone: true, selector: "[rxapTableRowActionExecuting]", ngImport: i0 }); }
|
|
567
511
|
}
|
|
568
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
512
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableRowActionExecutingDirective, decorators: [{
|
|
569
513
|
type: Directive,
|
|
570
514
|
args: [{
|
|
571
515
|
selector: '[rxapTableRowActionExecuting]',
|
|
572
516
|
standalone: true,
|
|
573
517
|
}]
|
|
574
|
-
}]
|
|
575
|
-
|
|
518
|
+
}] });
|
|
576
519
|
var TableRowActionStatus;
|
|
577
520
|
(function (TableRowActionStatus) {
|
|
578
521
|
TableRowActionStatus["EXECUTING"] = "executing";
|
|
@@ -580,7 +523,6 @@ var TableRowActionStatus;
|
|
|
580
523
|
TableRowActionStatus["ERROR"] = "error";
|
|
581
524
|
TableRowActionStatus["SUCCESS"] = "success";
|
|
582
525
|
})(TableRowActionStatus || (TableRowActionStatus = {}));
|
|
583
|
-
|
|
584
526
|
/**
|
|
585
527
|
* @deprecated use RXAP_TABLE_ACTION_METHOD_METADATA instead
|
|
586
528
|
*/
|
|
@@ -615,7 +557,6 @@ function TableActionMethod(typeOrOptions, checkFunction) {
|
|
|
615
557
|
}
|
|
616
558
|
};
|
|
617
559
|
}
|
|
618
|
-
|
|
619
560
|
function IsTableRowActionTypeSwitchMethod(method) {
|
|
620
561
|
return getMetadata(RXAP_TABLE_ACTION_METHOD_METADATA, method.constructor)?.type === undefined;
|
|
621
562
|
}
|
|
@@ -644,65 +585,71 @@ function GetTableRowActionMetadata(method) {
|
|
|
644
585
|
}
|
|
645
586
|
return metadata;
|
|
646
587
|
}
|
|
647
|
-
|
|
648
588
|
const RXAP_TABLE_ROW_ACTION_METHOD = new InjectionToken('rxap-table-row-action-method');
|
|
649
|
-
|
|
589
|
+
/**
|
|
590
|
+
* Subclasses must be decorated with @Directive, declare the `type` signal input and
|
|
591
|
+
* implement `getElementList`. No constructor arguments are required anymore - all
|
|
592
|
+
* dependencies are acquired with inject().
|
|
593
|
+
*/
|
|
650
594
|
class AbstractTableRowAction extends ConfirmDirective {
|
|
651
|
-
constructor(
|
|
652
|
-
super(
|
|
653
|
-
this.
|
|
654
|
-
this.
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
this.
|
|
659
|
-
this.
|
|
660
|
-
this.
|
|
595
|
+
constructor() {
|
|
596
|
+
super();
|
|
597
|
+
this.errorMessage = input(...(ngDevMode ? [undefined, { debugName: "errorMessage" }] : /* istanbul ignore next */ []));
|
|
598
|
+
this.successMessage = input(...(ngDevMode ? [undefined, { debugName: "successMessage" }] : /* istanbul ignore next */ []));
|
|
599
|
+
/**
|
|
600
|
+
* true - after the action is executed the table datasource is refreshed
|
|
601
|
+
*/
|
|
602
|
+
this.refresh = input(...(ngDevMode ? [undefined, { debugName: "refresh" }] : /* istanbul ignore next */ []));
|
|
603
|
+
this.color = input(...(ngDevMode ? [undefined, { debugName: "color" }] : /* istanbul ignore next */ []));
|
|
604
|
+
this.hasConfirmDirective = input(false, { ...(ngDevMode ? { debugName: "hasConfirmDirective" } : /* istanbul ignore next */ {}), alias: 'rxapConfirm', transform: coerceBoolean });
|
|
661
605
|
this.isHeader = false;
|
|
662
|
-
this.
|
|
606
|
+
this.renderer = inject(Renderer2);
|
|
607
|
+
this.vcr = inject(ViewContainerRef);
|
|
608
|
+
this.tableDataSourceDirective = inject(TableDataSourceDirective);
|
|
609
|
+
this.snackBar = inject(MatSnackBar);
|
|
610
|
+
this.matButton = inject(MatIconButton, { optional: true }) ??
|
|
611
|
+
inject(MatButton, { optional: true });
|
|
612
|
+
this.matTooltip = inject(MatTooltip, { optional: true });
|
|
613
|
+
this.injector = inject(INJECTOR);
|
|
614
|
+
this.actionMethodList = coerceArray(inject(RXAP_TABLE_ROW_ACTION_METHOD));
|
|
615
|
+
this.options = computed(() => this.getTableActionOptions(), ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
616
|
+
this.effectiveRefresh = computed(() => this.refresh() ?? this.options()?.refresh ?? false, ...(ngDevMode ? [{ debugName: "effectiveRefresh" }] : /* istanbul ignore next */ []));
|
|
617
|
+
this.effectiveErrorMessage = computed(() => this.errorMessage() ?? this.options()?.errorMessage ?? undefined, ...(ngDevMode ? [{ debugName: "effectiveErrorMessage" }] : /* istanbul ignore next */ []));
|
|
618
|
+
this.effectiveSuccessMessage = computed(() => this.successMessage() ?? this.options()?.successMessage ?? undefined, ...(ngDevMode ? [{ debugName: "effectiveSuccessMessage" }] : /* istanbul ignore next */ []));
|
|
619
|
+
this.effectiveColor = computed(() => this.color() ?? this.options()?.color ?? undefined, ...(ngDevMode ? [{ debugName: "effectiveColor" }] : /* istanbul ignore next */ []));
|
|
620
|
+
this.executingDirective = contentChild(TableRowActionExecutingDirective, ...(ngDevMode ? [{ debugName: "executingDirective" }] : /* istanbul ignore next */ []));
|
|
663
621
|
this._currentStatus = TableRowActionStatus.DONE;
|
|
664
622
|
this._actionDisabled = false;
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
set hasConfirmDirective(value) {
|
|
670
|
-
this._hasConfirmDirective = coerceBoolean(value);
|
|
671
|
-
}
|
|
672
|
-
// eslint-disable-next-line @angular-eslint/contextual-lifecycle
|
|
673
|
-
ngOnInit() {
|
|
674
|
-
this.options = this.getTableActionOptions();
|
|
675
|
-
if (this.options) {
|
|
676
|
-
this.refresh ??= this.options.refresh ?? false;
|
|
677
|
-
this.errorMessage ??= this.options.errorMessage ?? undefined;
|
|
678
|
-
this.successMessage ??= this.options.successMessage ?? undefined;
|
|
679
|
-
if (this.matTooltip && this.options.tooltip) {
|
|
680
|
-
this.matTooltip.message = this.options.tooltip;
|
|
623
|
+
effect(() => {
|
|
624
|
+
const tooltip = this.options()?.tooltip;
|
|
625
|
+
if (this.matTooltip && tooltip) {
|
|
626
|
+
untracked(() => this.matTooltip.message = tooltip);
|
|
681
627
|
}
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
if (this.color) {
|
|
686
|
-
this.matButton.color =
|
|
628
|
+
});
|
|
629
|
+
effect(() => {
|
|
630
|
+
const color = this.effectiveColor();
|
|
631
|
+
if (this.matButton && color) {
|
|
632
|
+
untracked(() => this.matButton.color = color);
|
|
687
633
|
}
|
|
688
|
-
}
|
|
689
|
-
|
|
690
|
-
this.
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
634
|
+
});
|
|
635
|
+
effect(() => {
|
|
636
|
+
const type = this.type();
|
|
637
|
+
const element = this.elementRef.nativeElement;
|
|
638
|
+
untracked(() => {
|
|
639
|
+
this.renderer.addClass(element, this.isHeader ? 'rxap-table-row-header-action' : 'rxap-table-row-action');
|
|
640
|
+
this.renderer.addClass(element, `rxap-action-${dasherize(type)}`);
|
|
641
|
+
});
|
|
642
|
+
});
|
|
696
643
|
}
|
|
697
644
|
onConfirmed() {
|
|
698
645
|
return this.execute();
|
|
699
646
|
}
|
|
700
647
|
onClick($event) {
|
|
701
|
-
$event
|
|
702
|
-
if (!this.
|
|
648
|
+
$event?.stopPropagation();
|
|
649
|
+
if (!this.hasConfirmDirective() && !this.options()?.confirm) {
|
|
703
650
|
return this.execute();
|
|
704
651
|
}
|
|
705
|
-
else if (this.options?.confirm) {
|
|
652
|
+
else if (this.options()?.confirm) {
|
|
706
653
|
this.openConfirmOverly();
|
|
707
654
|
}
|
|
708
655
|
else {
|
|
@@ -723,7 +670,7 @@ class AbstractTableRowAction extends ConfirmDirective {
|
|
|
723
670
|
Promise.all(this.findUntypedActionMethod().map((am) => {
|
|
724
671
|
return am.call({
|
|
725
672
|
element,
|
|
726
|
-
type: this.type,
|
|
673
|
+
type: this.type(),
|
|
727
674
|
});
|
|
728
675
|
})),
|
|
729
676
|
Promise.all(this.findTypedActionMethod().map((am) => {
|
|
@@ -773,39 +720,40 @@ class AbstractTableRowAction extends ConfirmDirective {
|
|
|
773
720
|
* @private
|
|
774
721
|
*/
|
|
775
722
|
findTypedActionMethod() {
|
|
776
|
-
return this.actionMethodList.filter(IsTableRowActionTypeMethod(this.type));
|
|
723
|
+
return this.actionMethodList.filter(IsTableRowActionTypeMethod(this.type()));
|
|
777
724
|
}
|
|
778
725
|
setStatus(status) {
|
|
779
726
|
if (this._currentStatus === status) {
|
|
780
727
|
return;
|
|
781
728
|
}
|
|
782
729
|
this._currentStatus = status;
|
|
730
|
+
const errorMessage = this.effectiveErrorMessage();
|
|
731
|
+
const successMessage = this.effectiveSuccessMessage();
|
|
783
732
|
switch (status) {
|
|
784
733
|
case TableRowActionStatus.EXECUTING:
|
|
785
734
|
this.setButtonDisabled();
|
|
786
|
-
this.executingDirective?.show();
|
|
735
|
+
this.executingDirective()?.show();
|
|
787
736
|
break;
|
|
788
737
|
case TableRowActionStatus.SUCCESS:
|
|
789
|
-
if (this.
|
|
738
|
+
if (this.effectiveRefresh()) {
|
|
790
739
|
this.tableDataSourceDirective.refresh();
|
|
791
740
|
}
|
|
792
|
-
if (
|
|
793
|
-
this.snackBar.open(
|
|
741
|
+
if (successMessage) {
|
|
742
|
+
this.snackBar.open(successMessage, 'ok', { duration: 2560 });
|
|
794
743
|
}
|
|
795
744
|
this.setStatus(TableRowActionStatus.DONE);
|
|
796
745
|
break;
|
|
797
746
|
case TableRowActionStatus.ERROR:
|
|
798
747
|
this.setStatus(TableRowActionStatus.DONE);
|
|
799
|
-
if (
|
|
800
|
-
this.snackBar.open(
|
|
748
|
+
if (errorMessage) {
|
|
749
|
+
this.snackBar.open(errorMessage, 'ok', { duration: 5120 });
|
|
801
750
|
}
|
|
802
751
|
break;
|
|
803
752
|
case TableRowActionStatus.DONE:
|
|
804
753
|
this.setButtonEnabled();
|
|
805
|
-
this.executingDirective?.hide();
|
|
754
|
+
this.executingDirective()?.hide();
|
|
806
755
|
break;
|
|
807
756
|
}
|
|
808
|
-
this.cdr.detectChanges();
|
|
809
757
|
}
|
|
810
758
|
getTableActionOptions() {
|
|
811
759
|
const metadataList = this.actionMethodList.map(actionMethod => GetTableRowActionMetadata(actionMethod));
|
|
@@ -813,75 +761,18 @@ class AbstractTableRowAction extends ConfirmDirective {
|
|
|
813
761
|
return null;
|
|
814
762
|
}
|
|
815
763
|
// TODO : handle multiple metadata or not exist metadata
|
|
816
|
-
return metadataList.filter(metadata => metadata.type === this.type)
|
|
764
|
+
return metadataList.filter(metadata => metadata.type === this.type())
|
|
817
765
|
.sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0))[0];
|
|
818
766
|
}
|
|
819
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
820
|
-
static { this.ɵ
|
|
767
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AbstractTableRowAction, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
768
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.2.9", type: AbstractTableRowAction, isStandalone: true, inputs: { errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, successMessage: { classPropertyName: "successMessage", publicName: "successMessage", isSignal: true, isRequired: false, transformFunction: null }, refresh: { classPropertyName: "refresh", publicName: "refresh", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, hasConfirmDirective: { classPropertyName: "hasConfirmDirective", publicName: "rxapConfirm", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "executingDirective", first: true, predicate: TableRowActionExecutingDirective, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0 }); }
|
|
821
769
|
}
|
|
822
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
823
|
-
type:
|
|
824
|
-
}], ctorParameters: () => [{ type: i0.
|
|
825
|
-
type: Inject,
|
|
826
|
-
args: [Renderer2]
|
|
827
|
-
}] }, { type: i1$1.Overlay, decorators: [{
|
|
828
|
-
type: Inject,
|
|
829
|
-
args: [Overlay]
|
|
830
|
-
}] }, { type: i0.ElementRef, decorators: [{
|
|
831
|
-
type: Inject,
|
|
832
|
-
args: [ElementRef]
|
|
833
|
-
}] }, { type: undefined, decorators: [{
|
|
834
|
-
type: Inject,
|
|
835
|
-
args: [RXAP_TABLE_ROW_ACTION_METHOD]
|
|
836
|
-
}] }, { type: i0.ChangeDetectorRef, decorators: [{
|
|
837
|
-
type: Inject,
|
|
838
|
-
args: [ChangeDetectorRef]
|
|
839
|
-
}] }, { type: i0.ViewContainerRef, decorators: [{
|
|
840
|
-
type: Inject,
|
|
841
|
-
args: [ViewContainerRef]
|
|
842
|
-
}] }, { type: TableDataSourceDirective, decorators: [{
|
|
843
|
-
type: Inject,
|
|
844
|
-
args: [TableDataSourceDirective]
|
|
845
|
-
}] }, { type: i3$1.MatSnackBar, decorators: [{
|
|
846
|
-
type: Inject,
|
|
847
|
-
args: [MatSnackBar]
|
|
848
|
-
}] }, { type: i4.MatIconButton, decorators: [{
|
|
849
|
-
type: Optional
|
|
850
|
-
}, {
|
|
851
|
-
type: Inject,
|
|
852
|
-
args: [MatIconButton]
|
|
853
|
-
}] }, { type: i5.MatTooltip, decorators: [{
|
|
854
|
-
type: Optional
|
|
855
|
-
}, {
|
|
856
|
-
type: Inject,
|
|
857
|
-
args: [MatTooltip]
|
|
858
|
-
}] }, { type: i0.Injector, decorators: [{
|
|
859
|
-
type: Inject,
|
|
860
|
-
args: [INJECTOR]
|
|
861
|
-
}] }], propDecorators: { errorMessage: [{
|
|
862
|
-
type: Input
|
|
863
|
-
}], successMessage: [{
|
|
864
|
-
type: Input
|
|
865
|
-
}], refresh: [{
|
|
866
|
-
type: Input
|
|
867
|
-
}], color: [{
|
|
868
|
-
type: Input
|
|
869
|
-
}], executingDirective: [{
|
|
870
|
-
type: ContentChild,
|
|
871
|
-
args: [TableRowActionExecutingDirective]
|
|
872
|
-
}], hasConfirmDirective: [{
|
|
873
|
-
type: Input,
|
|
874
|
-
args: ['rxapConfirm']
|
|
875
|
-
}], onConfirmed: [{
|
|
876
|
-
type: HostListener,
|
|
877
|
-
args: ['confirmed']
|
|
878
|
-
}], onClick: [{
|
|
879
|
-
type: HostListener,
|
|
880
|
-
args: ['click', ['$event']]
|
|
881
|
-
}] } });
|
|
882
|
-
|
|
770
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AbstractTableRowAction, decorators: [{
|
|
771
|
+
type: Directive
|
|
772
|
+
}], ctorParameters: () => [], propDecorators: { errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], successMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "successMessage", required: false }] }], refresh: [{ type: i0.Input, args: [{ isSignal: true, alias: "refresh", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], hasConfirmDirective: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxapConfirm", required: false }] }], executingDirective: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TableRowActionExecutingDirective), { isSignal: true }] }] } });
|
|
883
773
|
class RowActionCheckPipe {
|
|
884
|
-
constructor(
|
|
774
|
+
constructor() {
|
|
775
|
+
const tableRowActionMethodList = inject(RXAP_TABLE_ROW_ACTION_METHOD, { optional: true });
|
|
885
776
|
this.actionMethodList = coerceArray(tableRowActionMethodList);
|
|
886
777
|
}
|
|
887
778
|
transform(value, type) {
|
|
@@ -903,187 +794,66 @@ class RowActionCheckPipe {
|
|
|
903
794
|
}
|
|
904
795
|
return true;
|
|
905
796
|
}
|
|
906
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
907
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
797
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RowActionCheckPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
798
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: RowActionCheckPipe, isStandalone: true, name: "rxapRowActionCheck" }); }
|
|
908
799
|
}
|
|
909
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
800
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RowActionCheckPipe, decorators: [{
|
|
910
801
|
type: Pipe,
|
|
911
802
|
args: [{
|
|
912
803
|
name: 'rxapRowActionCheck',
|
|
913
804
|
standalone: true,
|
|
914
805
|
}]
|
|
915
|
-
}], ctorParameters: () => [
|
|
916
|
-
type: Optional
|
|
917
|
-
}, {
|
|
918
|
-
type: Inject,
|
|
919
|
-
args: [RXAP_TABLE_ROW_ACTION_METHOD]
|
|
920
|
-
}] }] });
|
|
921
|
-
|
|
806
|
+
}], ctorParameters: () => [] });
|
|
922
807
|
class TableRowActionDirective extends AbstractTableRowAction {
|
|
808
|
+
constructor() {
|
|
809
|
+
super();
|
|
810
|
+
this.type = input.required({ ...(ngDevMode ? { debugName: "type" } : /* istanbul ignore next */ {}), alias: 'rxapTableRowAction' });
|
|
811
|
+
this.element = input.required(...(ngDevMode ? [{ debugName: "element" }] : /* istanbul ignore next */ []));
|
|
812
|
+
}
|
|
923
813
|
getElementList() {
|
|
924
|
-
return [this.element];
|
|
814
|
+
return [this.element()];
|
|
925
815
|
}
|
|
926
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
927
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
816
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableRowActionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
817
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: TableRowActionDirective, isStandalone: true, selector: "button[rxapTableRowAction]", inputs: { type: { classPropertyName: "type", publicName: "rxapTableRowAction", isSignal: true, isRequired: true, transformFunction: null }, element: { classPropertyName: "element", publicName: "element", isSignal: true, isRequired: true, transformFunction: null } }, usesInheritance: true, ngImport: i0 }); }
|
|
928
818
|
}
|
|
929
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
819
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableRowActionDirective, decorators: [{
|
|
930
820
|
type: Directive,
|
|
931
821
|
args: [{
|
|
932
822
|
selector: 'button[rxapTableRowAction]',
|
|
933
823
|
standalone: true,
|
|
934
|
-
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
935
|
-
inputs: ['errorMessage', 'successMessage', 'refresh', 'color'],
|
|
936
824
|
}]
|
|
937
|
-
}], propDecorators: { type: [{
|
|
938
|
-
type: Input,
|
|
939
|
-
args: [{
|
|
940
|
-
required: true,
|
|
941
|
-
alias: 'rxapTableRowAction',
|
|
942
|
-
}]
|
|
943
|
-
}], element: [{
|
|
944
|
-
type: Input,
|
|
945
|
-
args: [{ required: true }]
|
|
946
|
-
}] } });
|
|
947
|
-
|
|
825
|
+
}], ctorParameters: () => [], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxapTableRowAction", required: true }] }], element: [{ type: i0.Input, args: [{ isSignal: true, alias: "element", required: true }] }] } });
|
|
948
826
|
class TableRowHeaderActionDirective extends AbstractTableRowAction {
|
|
949
|
-
constructor(
|
|
950
|
-
super(
|
|
951
|
-
this.selectRowService =
|
|
827
|
+
constructor() {
|
|
828
|
+
super();
|
|
829
|
+
this.selectRowService = inject(SelectRowService, { optional: true });
|
|
952
830
|
this.isHeader = true;
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
this.setButtonDisabled();
|
|
966
|
-
}
|
|
967
|
-
this.cdr.detectChanges();
|
|
968
|
-
}))
|
|
969
|
-
.subscribe();
|
|
970
|
-
}
|
|
971
|
-
else {
|
|
972
|
-
this.setButtonDisabled();
|
|
973
|
-
}
|
|
831
|
+
this.type = input.required({ ...(ngDevMode ? { debugName: "type" } : /* istanbul ignore next */ {}), alias: 'rxapTableRowHeaderAction' });
|
|
832
|
+
this.hasSelectedRows = this.selectRowService ?
|
|
833
|
+
toSignal(this.selectRowService.selectedRows$.pipe(startWith(this.selectRowService.selectedRows), map((rows) => rows.length !== 0)), { initialValue: this.selectRowService.selectedRows.length !== 0 }) :
|
|
834
|
+
() => false;
|
|
835
|
+
effect(() => {
|
|
836
|
+
if (this.hasSelectedRows()) {
|
|
837
|
+
this.setButtonEnabled();
|
|
838
|
+
}
|
|
839
|
+
else {
|
|
840
|
+
this.setButtonDisabled();
|
|
841
|
+
}
|
|
842
|
+
});
|
|
974
843
|
}
|
|
975
844
|
getElementList() {
|
|
976
845
|
return this.selectRowService?.selectedRows ?? [];
|
|
977
846
|
}
|
|
978
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
979
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
847
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableRowHeaderActionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
848
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: TableRowHeaderActionDirective, isStandalone: true, selector: "button[rxapTableRowHeaderAction]", inputs: { type: { classPropertyName: "type", publicName: "rxapTableRowHeaderAction", isSignal: true, isRequired: true, transformFunction: null } }, usesInheritance: true, ngImport: i0 }); }
|
|
980
849
|
}
|
|
981
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
850
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableRowHeaderActionDirective, decorators: [{
|
|
982
851
|
type: Directive,
|
|
983
852
|
args: [{
|
|
984
853
|
selector: 'button[rxapTableRowHeaderAction]',
|
|
985
854
|
standalone: true,
|
|
986
|
-
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
987
|
-
inputs: ['errorMessage', 'successMessage', 'refresh', 'color'],
|
|
988
|
-
}]
|
|
989
|
-
}], ctorParameters: () => [{ type: i0.Renderer2, decorators: [{
|
|
990
|
-
type: Inject,
|
|
991
|
-
args: [Renderer2]
|
|
992
|
-
}] }, { type: i1$1.Overlay, decorators: [{
|
|
993
|
-
type: Inject,
|
|
994
|
-
args: [Overlay]
|
|
995
|
-
}] }, { type: i0.ElementRef, decorators: [{
|
|
996
|
-
type: Inject,
|
|
997
|
-
args: [ElementRef]
|
|
998
|
-
}] }, { type: undefined, decorators: [{
|
|
999
|
-
type: Inject,
|
|
1000
|
-
args: [RXAP_TABLE_ROW_ACTION_METHOD]
|
|
1001
|
-
}] }, { type: i0.ChangeDetectorRef, decorators: [{
|
|
1002
|
-
type: Inject,
|
|
1003
|
-
args: [ChangeDetectorRef]
|
|
1004
|
-
}] }, { type: i0.ViewContainerRef, decorators: [{
|
|
1005
|
-
type: Inject,
|
|
1006
|
-
args: [ViewContainerRef]
|
|
1007
|
-
}] }, { type: TableDataSourceDirective, decorators: [{
|
|
1008
|
-
type: Inject,
|
|
1009
|
-
args: [TableDataSourceDirective]
|
|
1010
|
-
}] }, { type: i3$1.MatSnackBar, decorators: [{
|
|
1011
|
-
type: Inject,
|
|
1012
|
-
args: [MatSnackBar]
|
|
1013
|
-
}] }, { type: i4.MatButton, decorators: [{
|
|
1014
|
-
type: Optional
|
|
1015
|
-
}, {
|
|
1016
|
-
type: Inject,
|
|
1017
|
-
args: [MatButton]
|
|
1018
|
-
}] }, { type: i5.MatTooltip, decorators: [{
|
|
1019
|
-
type: Optional
|
|
1020
|
-
}, {
|
|
1021
|
-
type: Inject,
|
|
1022
|
-
args: [MatTooltip]
|
|
1023
|
-
}] }, { type: i0.Injector, decorators: [{
|
|
1024
|
-
type: Inject,
|
|
1025
|
-
args: [INJECTOR]
|
|
1026
|
-
}] }, { type: SelectRowService, decorators: [{
|
|
1027
|
-
type: Optional
|
|
1028
|
-
}, {
|
|
1029
|
-
type: Inject,
|
|
1030
|
-
args: [SelectRowService]
|
|
1031
|
-
}] }], propDecorators: { type: [{
|
|
1032
|
-
type: Input,
|
|
1033
|
-
args: [{
|
|
1034
|
-
required: true,
|
|
1035
|
-
alias: 'rxapTableRowHeaderAction',
|
|
1036
|
-
}]
|
|
1037
|
-
}] } });
|
|
1038
|
-
|
|
1039
|
-
class TableRowActionsModule {
|
|
1040
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TableRowActionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1041
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.16", ngImport: i0, type: TableRowActionsModule, imports: [TableRowActionDirective,
|
|
1042
|
-
TableRowActionExecutingDirective,
|
|
1043
|
-
TableRowHeaderActionDirective,
|
|
1044
|
-
RowActionCheckPipe,
|
|
1045
|
-
ConfirmModule], exports: [TableRowActionDirective,
|
|
1046
|
-
TableRowHeaderActionDirective,
|
|
1047
|
-
TableRowActionExecutingDirective,
|
|
1048
|
-
RowActionCheckPipe,
|
|
1049
|
-
MatTooltipModule,
|
|
1050
|
-
MatButtonModule,
|
|
1051
|
-
ConfirmModule,
|
|
1052
|
-
MatIconModule,
|
|
1053
|
-
MatProgressBarModule,
|
|
1054
|
-
CommonModule] }); }
|
|
1055
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TableRowActionsModule, imports: [ConfirmModule, MatTooltipModule,
|
|
1056
|
-
MatButtonModule,
|
|
1057
|
-
ConfirmModule,
|
|
1058
|
-
MatIconModule,
|
|
1059
|
-
MatProgressBarModule,
|
|
1060
|
-
CommonModule] }); }
|
|
1061
|
-
}
|
|
1062
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TableRowActionsModule, decorators: [{
|
|
1063
|
-
type: NgModule,
|
|
1064
|
-
args: [{
|
|
1065
|
-
imports: [
|
|
1066
|
-
TableRowActionDirective,
|
|
1067
|
-
TableRowActionExecutingDirective,
|
|
1068
|
-
TableRowHeaderActionDirective,
|
|
1069
|
-
RowActionCheckPipe,
|
|
1070
|
-
ConfirmModule,
|
|
1071
|
-
],
|
|
1072
|
-
exports: [
|
|
1073
|
-
TableRowActionDirective,
|
|
1074
|
-
TableRowHeaderActionDirective,
|
|
1075
|
-
TableRowActionExecutingDirective,
|
|
1076
|
-
RowActionCheckPipe,
|
|
1077
|
-
MatTooltipModule,
|
|
1078
|
-
MatButtonModule,
|
|
1079
|
-
ConfirmModule,
|
|
1080
|
-
MatIconModule,
|
|
1081
|
-
MatProgressBarModule,
|
|
1082
|
-
CommonModule,
|
|
1083
|
-
],
|
|
1084
855
|
}]
|
|
1085
|
-
}] });
|
|
1086
|
-
|
|
856
|
+
}], ctorParameters: () => [], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxapTableRowHeaderAction", required: true }] }] } });
|
|
1087
857
|
const RXAP_TABLE_HEADER_BUTTON_METHOD_METADATA = 'rxap-table-header-button-method-metadata';
|
|
1088
858
|
function TableHeaderButtonMethod(options = {}) {
|
|
1089
859
|
return function (target) {
|
|
@@ -1097,7 +867,6 @@ function GetTableHeaderButtonMetadata(method) {
|
|
|
1097
867
|
}
|
|
1098
868
|
return metadata;
|
|
1099
869
|
}
|
|
1100
|
-
|
|
1101
870
|
var TableHeaderButtonActionStatus;
|
|
1102
871
|
(function (TableHeaderButtonActionStatus) {
|
|
1103
872
|
TableHeaderButtonActionStatus["EXECUTING"] = "executing";
|
|
@@ -1105,35 +874,44 @@ var TableHeaderButtonActionStatus;
|
|
|
1105
874
|
TableHeaderButtonActionStatus["ERROR"] = "error";
|
|
1106
875
|
TableHeaderButtonActionStatus["SUCCESS"] = "success";
|
|
1107
876
|
})(TableHeaderButtonActionStatus || (TableHeaderButtonActionStatus = {}));
|
|
1108
|
-
|
|
1109
877
|
const TABLE_HEADER_BUTTON_METHOD = new InjectionToken('table-header-button-method');
|
|
1110
|
-
|
|
1111
878
|
class TableHeaderButtonDirective extends ConfirmDirective {
|
|
1112
|
-
constructor(
|
|
1113
|
-
super(
|
|
1114
|
-
this.method =
|
|
1115
|
-
this.snackBar =
|
|
1116
|
-
this.matTooltip =
|
|
1117
|
-
this.matButton =
|
|
1118
|
-
this.
|
|
1119
|
-
this.
|
|
879
|
+
constructor() {
|
|
880
|
+
super();
|
|
881
|
+
this.method = inject(TABLE_HEADER_BUTTON_METHOD);
|
|
882
|
+
this.snackBar = inject(MatSnackBar);
|
|
883
|
+
this.matTooltip = inject(MatTooltip, { optional: true });
|
|
884
|
+
this.matButton = inject(MatMiniFabButton, { optional: true });
|
|
885
|
+
this.tableDataSourceDirective = input.required({ ...(ngDevMode ? { debugName: "tableDataSourceDirective" } : /* istanbul ignore next */ {}), alias: "rxapTableHeaderButton" });
|
|
886
|
+
this.errorMessage = input(...(ngDevMode ? [undefined, { debugName: "errorMessage" }] : /* istanbul ignore next */ []));
|
|
887
|
+
this.successMessage = input(...(ngDevMode ? [undefined, { debugName: "successMessage" }] : /* istanbul ignore next */ []));
|
|
888
|
+
/**
|
|
889
|
+
* true - after the action is executed the table datasource is refreshed
|
|
890
|
+
*/
|
|
891
|
+
this.refresh = input(...(ngDevMode ? [undefined, { debugName: "refresh" }] : /* istanbul ignore next */ []));
|
|
892
|
+
this.options = computed(() => this.getTableHeaderButtonOptions(), ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
893
|
+
this.effectiveRefresh = computed(() => this.refresh() ?? this.options()?.refresh ?? false, ...(ngDevMode ? [{ debugName: "effectiveRefresh" }] : /* istanbul ignore next */ []));
|
|
894
|
+
this.effectiveErrorMessage = computed(() => this.errorMessage() ?? this.options()?.errorMessage ?? undefined, ...(ngDevMode ? [{ debugName: "effectiveErrorMessage" }] : /* istanbul ignore next */ []));
|
|
895
|
+
this.effectiveSuccessMessage = computed(() => this.successMessage() ?? this.options()?.successMessage ?? undefined, ...(ngDevMode ? [{ debugName: "effectiveSuccessMessage" }] : /* istanbul ignore next */ []));
|
|
1120
896
|
this._actionDisabled = false;
|
|
1121
897
|
this._currentStatus = TableHeaderButtonActionStatus.DONE;
|
|
1122
|
-
this.
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
898
|
+
this.hasConfirmDirective = input(false, { ...(ngDevMode ? { debugName: "hasConfirmDirective" } : /* istanbul ignore next */ {}), alias: 'rxapConfirm', transform: coerceBoolean });
|
|
899
|
+
effect(() => {
|
|
900
|
+
const tooltip = this.options()?.tooltip;
|
|
901
|
+
if (this.matTooltip && tooltip) {
|
|
902
|
+
untracked(() => this.matTooltip.message = tooltip);
|
|
903
|
+
}
|
|
904
|
+
});
|
|
1127
905
|
}
|
|
1128
906
|
onConfirmed() {
|
|
1129
907
|
return this.execute();
|
|
1130
908
|
}
|
|
1131
909
|
onClick($event) {
|
|
1132
|
-
$event
|
|
1133
|
-
if (!this.
|
|
910
|
+
$event?.stopPropagation();
|
|
911
|
+
if (!this.hasConfirmDirective() && !this.options()?.confirm) {
|
|
1134
912
|
return this.execute();
|
|
1135
913
|
}
|
|
1136
|
-
else if (this.options?.confirm) {
|
|
914
|
+
else if (this.options()?.confirm) {
|
|
1137
915
|
this.openConfirmOverly();
|
|
1138
916
|
}
|
|
1139
917
|
else {
|
|
@@ -1157,17 +935,6 @@ class TableHeaderButtonDirective extends ConfirmDirective {
|
|
|
1157
935
|
this.setStatus(TableHeaderButtonActionStatus.ERROR);
|
|
1158
936
|
}
|
|
1159
937
|
}
|
|
1160
|
-
ngOnInit() {
|
|
1161
|
-
this.options = this.getTableHeaderButtonOptions();
|
|
1162
|
-
if (this.options) {
|
|
1163
|
-
this.refresh ??= this.options.refresh ?? false;
|
|
1164
|
-
this.errorMessage ??= this.options.errorMessage ?? undefined;
|
|
1165
|
-
this.successMessage ??= this.options.successMessage ?? undefined;
|
|
1166
|
-
if (this.matTooltip && this.options.tooltip) {
|
|
1167
|
-
this.matTooltip.message = this.options.tooltip;
|
|
1168
|
-
}
|
|
1169
|
-
}
|
|
1170
|
-
}
|
|
1171
938
|
/**
|
|
1172
939
|
* Disables the action. If the button is pressed the action is NOT executed
|
|
1173
940
|
*
|
|
@@ -1194,105 +961,74 @@ class TableHeaderButtonDirective extends ConfirmDirective {
|
|
|
1194
961
|
return;
|
|
1195
962
|
}
|
|
1196
963
|
this._currentStatus = status;
|
|
964
|
+
const errorMessage = this.effectiveErrorMessage();
|
|
965
|
+
const successMessage = this.effectiveSuccessMessage();
|
|
1197
966
|
switch (status) {
|
|
1198
967
|
case TableHeaderButtonActionStatus.EXECUTING:
|
|
1199
968
|
this.setButtonDisabled();
|
|
1200
969
|
break;
|
|
1201
970
|
case TableHeaderButtonActionStatus.SUCCESS:
|
|
1202
|
-
if (this.
|
|
1203
|
-
this.tableDataSourceDirective.refresh();
|
|
971
|
+
if (this.effectiveRefresh()) {
|
|
972
|
+
this.tableDataSourceDirective().refresh();
|
|
1204
973
|
}
|
|
1205
|
-
if (
|
|
1206
|
-
this.snackBar.open(
|
|
974
|
+
if (successMessage) {
|
|
975
|
+
this.snackBar.open(successMessage, 'ok', { duration: 2560 });
|
|
1207
976
|
}
|
|
1208
977
|
this.setStatus(TableHeaderButtonActionStatus.DONE);
|
|
1209
978
|
break;
|
|
1210
979
|
case TableHeaderButtonActionStatus.ERROR:
|
|
1211
980
|
this.setStatus(TableHeaderButtonActionStatus.DONE);
|
|
1212
|
-
if (
|
|
1213
|
-
this.snackBar.open(
|
|
981
|
+
if (errorMessage) {
|
|
982
|
+
this.snackBar.open(errorMessage, 'ok', { duration: 5120 });
|
|
1214
983
|
}
|
|
1215
984
|
break;
|
|
1216
985
|
case TableHeaderButtonActionStatus.DONE:
|
|
1217
986
|
this.setButtonEnabled();
|
|
1218
987
|
break;
|
|
1219
988
|
}
|
|
1220
|
-
this.cdr.detectChanges();
|
|
1221
989
|
}
|
|
1222
990
|
getTableHeaderButtonOptions() {
|
|
1223
991
|
return GetTableHeaderButtonMetadata(this.method);
|
|
1224
992
|
}
|
|
1225
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1226
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
993
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableHeaderButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
994
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: TableHeaderButtonDirective, isStandalone: true, selector: "button[mat-mini-fab][rxapTableHeaderButton]", inputs: { tableDataSourceDirective: { classPropertyName: "tableDataSourceDirective", publicName: "rxapTableHeaderButton", isSignal: true, isRequired: true, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, successMessage: { classPropertyName: "successMessage", publicName: "successMessage", isSignal: true, isRequired: false, transformFunction: null }, refresh: { classPropertyName: "refresh", publicName: "refresh", isSignal: true, isRequired: false, transformFunction: null }, hasConfirmDirective: { classPropertyName: "hasConfirmDirective", publicName: "rxapConfirm", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 }); }
|
|
1227
995
|
}
|
|
1228
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
996
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableHeaderButtonDirective, decorators: [{
|
|
1229
997
|
type: Directive,
|
|
1230
998
|
args: [{
|
|
1231
999
|
selector: 'button[mat-mini-fab][rxapTableHeaderButton]',
|
|
1232
1000
|
standalone: true,
|
|
1233
1001
|
}]
|
|
1234
|
-
}], ctorParameters: () => [{ type:
|
|
1235
|
-
type: Inject,
|
|
1236
|
-
args: [Overlay]
|
|
1237
|
-
}] }, { type: i0.ElementRef, decorators: [{
|
|
1238
|
-
type: Inject,
|
|
1239
|
-
args: [ElementRef]
|
|
1240
|
-
}] }, { type: undefined, decorators: [{
|
|
1241
|
-
type: Inject,
|
|
1242
|
-
args: [TABLE_HEADER_BUTTON_METHOD]
|
|
1243
|
-
}] }, { type: i3$1.MatSnackBar, decorators: [{
|
|
1244
|
-
type: Inject,
|
|
1245
|
-
args: [MatSnackBar]
|
|
1246
|
-
}] }, { type: i5.MatTooltip, decorators: [{
|
|
1247
|
-
type: Optional
|
|
1248
|
-
}, {
|
|
1249
|
-
type: Inject,
|
|
1250
|
-
args: [MatTooltip]
|
|
1251
|
-
}] }, { type: i4.MatMiniFabButton, decorators: [{
|
|
1252
|
-
type: Optional
|
|
1253
|
-
}, {
|
|
1254
|
-
type: Inject,
|
|
1255
|
-
args: [MatMiniFabButton]
|
|
1256
|
-
}] }, { type: i0.ChangeDetectorRef, decorators: [{
|
|
1257
|
-
type: Inject,
|
|
1258
|
-
args: [ChangeDetectorRef]
|
|
1259
|
-
}] }], propDecorators: { tableDataSourceDirective: [{
|
|
1260
|
-
type: Input,
|
|
1261
|
-
args: [{
|
|
1262
|
-
required: true,
|
|
1263
|
-
alias: 'rxapTableHeaderButton',
|
|
1264
|
-
}]
|
|
1265
|
-
}], errorMessage: [{
|
|
1266
|
-
type: Input
|
|
1267
|
-
}], successMessage: [{
|
|
1268
|
-
type: Input
|
|
1269
|
-
}], refresh: [{
|
|
1270
|
-
type: Input
|
|
1271
|
-
}], hasConfirmDirective: [{
|
|
1272
|
-
type: Input,
|
|
1273
|
-
args: ['rxapConfirm']
|
|
1274
|
-
}], onConfirmed: [{
|
|
1275
|
-
type: HostListener,
|
|
1276
|
-
args: ['confirmed']
|
|
1277
|
-
}], onClick: [{
|
|
1278
|
-
type: HostListener,
|
|
1279
|
-
args: ['click', ['$event']]
|
|
1280
|
-
}] } });
|
|
1281
|
-
|
|
1002
|
+
}], ctorParameters: () => [], propDecorators: { tableDataSourceDirective: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxapTableHeaderButton", required: true }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], successMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "successMessage", required: false }] }], refresh: [{ type: i0.Input, args: [{ isSignal: true, alias: "refresh", required: false }] }], hasConfirmDirective: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxapConfirm", required: false }] }] } });
|
|
1282
1003
|
const RXAP_TABLE_FILTER_FORM_DEFINITION = new InjectionToken('rxap/form-table-system/filter-form-definition');
|
|
1283
|
-
|
|
1284
1004
|
class FilterHeaderRowDirective extends FormDirective {
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1005
|
+
constructor() {
|
|
1006
|
+
super();
|
|
1007
|
+
this.tableFilter = inject(TableFilterService);
|
|
1008
|
+
/**
|
|
1009
|
+
* Optional form definition bound with the selector attribute. Falls back to RXAP_TABLE_FILTER_FORM_DEFINITION.
|
|
1010
|
+
*/
|
|
1011
|
+
this.filterFormDefinition = input('', { ...(ngDevMode ? { debugName: "filterFormDefinition" } : /* istanbul ignore next */ {}), alias: 'rxap-filter-header-row' });
|
|
1012
|
+
const formDefinition = inject(RXAP_TABLE_FILTER_FORM_DEFINITION, { optional: true });
|
|
1013
|
+
if (formDefinition) {
|
|
1014
|
+
this._formDefinition = formDefinition;
|
|
1015
|
+
this.form = formDefinition.rxapFormGroup;
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
applyFilterFormDefinition() {
|
|
1019
|
+
const formDefinition = this.filterFormDefinition();
|
|
1020
|
+
if (formDefinition) {
|
|
1021
|
+
this._formDefinition = formDefinition;
|
|
1022
|
+
this.form = formDefinition.rxapFormGroup;
|
|
1289
1023
|
}
|
|
1290
1024
|
}
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
this.
|
|
1025
|
+
ngOnChanges(changes) {
|
|
1026
|
+
// the form must be set before the FormGroupDirective validates its presence
|
|
1027
|
+
this.applyFilterFormDefinition();
|
|
1028
|
+
super.ngOnChanges(changes);
|
|
1294
1029
|
}
|
|
1295
1030
|
ngOnInit() {
|
|
1031
|
+
this.applyFilterFormDefinition();
|
|
1296
1032
|
super.ngOnInit();
|
|
1297
1033
|
this._subscription = new Subscription();
|
|
1298
1034
|
this._subscription.add(this.tableFilter.reset$.subscribe(() => this.form.reset()));
|
|
@@ -1304,16 +1040,18 @@ class FilterHeaderRowDirective extends FormDirective {
|
|
|
1304
1040
|
super.ngOnDestroy();
|
|
1305
1041
|
this._subscription?.unsubscribe();
|
|
1306
1042
|
}
|
|
1307
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1308
|
-
static {
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1043
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FilterHeaderRowDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1044
|
+
static {
|
|
1045
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: FilterHeaderRowDirective, isStandalone: true, selector: "table[rxap-filter-header-row]", inputs: { filterFormDefinition: { classPropertyName: "filterFormDefinition", publicName: "rxap-filter-header-row", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
1046
|
+
{
|
|
1047
|
+
provide: ControlContainer,
|
|
1048
|
+
// ignore coverage
|
|
1049
|
+
useExisting: forwardRef(() => FilterHeaderRowDirective),
|
|
1050
|
+
},
|
|
1051
|
+
], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
|
|
1052
|
+
}
|
|
1315
1053
|
}
|
|
1316
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1054
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FilterHeaderRowDirective, decorators: [{
|
|
1317
1055
|
type: Directive,
|
|
1318
1056
|
args: [{
|
|
1319
1057
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -1327,62 +1065,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImpo
|
|
|
1327
1065
|
],
|
|
1328
1066
|
standalone: true,
|
|
1329
1067
|
}]
|
|
1330
|
-
}], ctorParameters: () => [
|
|
1331
|
-
type: Optional
|
|
1332
|
-
}, {
|
|
1333
|
-
type: Inject,
|
|
1334
|
-
args: [RXAP_TABLE_FILTER_FORM_DEFINITION]
|
|
1335
|
-
}] }], propDecorators: { useFormDefinition: [{
|
|
1336
|
-
type: Input,
|
|
1337
|
-
args: ['rxap-filter-header-row']
|
|
1338
|
-
}] } });
|
|
1339
|
-
|
|
1068
|
+
}], ctorParameters: () => [], propDecorators: { filterFormDefinition: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxap-filter-header-row", required: false }] }] } });
|
|
1340
1069
|
class ToFilterColumnNamesPipe {
|
|
1341
1070
|
transform(columns) {
|
|
1342
1071
|
return columns.map(column => 'filter_' + column);
|
|
1343
1072
|
}
|
|
1344
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1345
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
1073
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ToFilterColumnNamesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1074
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: ToFilterColumnNamesPipe, isStandalone: true, name: "toFilterColumnNames" }); }
|
|
1346
1075
|
}
|
|
1347
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1076
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ToFilterColumnNamesPipe, decorators: [{
|
|
1348
1077
|
type: Pipe,
|
|
1349
1078
|
args: [{
|
|
1350
1079
|
name: 'toFilterColumnNames',
|
|
1351
1080
|
standalone: true,
|
|
1352
1081
|
}]
|
|
1353
1082
|
}] });
|
|
1354
|
-
|
|
1355
|
-
class TableFilterModule {
|
|
1356
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TableFilterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1357
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.16", ngImport: i0, type: TableFilterModule, imports: [ToFilterColumnNamesPipe,
|
|
1358
|
-
FilterHeaderRowDirective], exports: [ToFilterColumnNamesPipe,
|
|
1359
|
-
FilterHeaderRowDirective] }); }
|
|
1360
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TableFilterModule }); }
|
|
1361
|
-
}
|
|
1362
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TableFilterModule, decorators: [{
|
|
1363
|
-
type: NgModule,
|
|
1364
|
-
args: [{
|
|
1365
|
-
exports: [
|
|
1366
|
-
ToFilterColumnNamesPipe,
|
|
1367
|
-
FilterHeaderRowDirective,
|
|
1368
|
-
],
|
|
1369
|
-
imports: [
|
|
1370
|
-
ToFilterColumnNamesPipe,
|
|
1371
|
-
FilterHeaderRowDirective,
|
|
1372
|
-
],
|
|
1373
|
-
}]
|
|
1374
|
-
}] });
|
|
1375
|
-
|
|
1376
1083
|
const TABLE_CREATE_REMOTE_METHOD = new InjectionToken('table-create-remote-method');
|
|
1377
|
-
|
|
1378
1084
|
class TableCreateButtonDirective {
|
|
1379
|
-
constructor(
|
|
1380
|
-
this.method =
|
|
1381
|
-
this.
|
|
1382
|
-
this.renderer = renderer;
|
|
1383
|
-
}
|
|
1384
|
-
ngOnInit() {
|
|
1385
|
-
this.renderer.setStyle(this.elementRef.nativeElement, 'margin-bottom', '6px');
|
|
1085
|
+
constructor() {
|
|
1086
|
+
this.method = inject(TABLE_CREATE_REMOTE_METHOD);
|
|
1087
|
+
this.dataSource = input.required({ ...(ngDevMode ? { debugName: "dataSource" } : /* istanbul ignore next */ {}), alias: "rxapTableCreate" });
|
|
1386
1088
|
}
|
|
1387
1089
|
ngOnDestroy() {
|
|
1388
1090
|
if (this._createObservable instanceof Subject) {
|
|
@@ -1394,38 +1096,47 @@ class TableCreateButtonDirective {
|
|
|
1394
1096
|
if (isObservable(result)) {
|
|
1395
1097
|
await result.toPromise();
|
|
1396
1098
|
}
|
|
1397
|
-
this.dataSource.refresh();
|
|
1099
|
+
this.dataSource().refresh();
|
|
1398
1100
|
}
|
|
1399
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1400
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
1101
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableCreateButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1102
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: TableCreateButtonDirective, isStandalone: true, selector: "button[rxapTableCreate]", inputs: { dataSource: { classPropertyName: "dataSource", publicName: "rxapTableCreate", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "click": "onClick()" }, styleAttribute: "margin-bottom: 6px" }, ngImport: i0 }); }
|
|
1401
1103
|
}
|
|
1402
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1104
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableCreateButtonDirective, decorators: [{
|
|
1403
1105
|
type: Directive,
|
|
1404
1106
|
args: [{
|
|
1405
1107
|
selector: 'button[rxapTableCreate]',
|
|
1406
1108
|
standalone: true,
|
|
1109
|
+
host: {
|
|
1110
|
+
'(click)': 'onClick()',
|
|
1111
|
+
'style': 'margin-bottom: 6px',
|
|
1112
|
+
},
|
|
1407
1113
|
}]
|
|
1408
|
-
}],
|
|
1409
|
-
type: Inject,
|
|
1410
|
-
args: [TABLE_CREATE_REMOTE_METHOD]
|
|
1411
|
-
}] }, { type: i0.ElementRef, decorators: [{
|
|
1412
|
-
type: Inject,
|
|
1413
|
-
args: [ElementRef]
|
|
1414
|
-
}] }, { type: i0.Renderer2, decorators: [{
|
|
1415
|
-
type: Inject,
|
|
1416
|
-
args: [Renderer2]
|
|
1417
|
-
}] }], propDecorators: { dataSource: [{
|
|
1418
|
-
type: Input,
|
|
1419
|
-
args: [{
|
|
1420
|
-
required: true,
|
|
1421
|
-
alias: 'rxapTableCreate',
|
|
1422
|
-
}]
|
|
1423
|
-
}], onClick: [{
|
|
1424
|
-
type: HostListener,
|
|
1425
|
-
args: ['click']
|
|
1426
|
-
}] } });
|
|
1427
|
-
|
|
1114
|
+
}], propDecorators: { dataSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxapTableCreate", required: true }] }] } });
|
|
1428
1115
|
class TableColumnOptionComponent {
|
|
1116
|
+
constructor() {
|
|
1117
|
+
this._element = inject(ElementRef);
|
|
1118
|
+
this.router = inject(Router);
|
|
1119
|
+
this.name = input.required(...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
1120
|
+
/**
|
|
1121
|
+
* The initial active state. Use the inactive input as shorthand for active = false
|
|
1122
|
+
*/
|
|
1123
|
+
this.activeInput = input(true, { ...(ngDevMode ? { debugName: "activeInput" } : /* istanbul ignore next */ {}), alias: 'active' });
|
|
1124
|
+
this.inactive = input(false, { ...(ngDevMode ? { debugName: "inactive" } : /* istanbul ignore next */ {}), transform: coerceBoolean });
|
|
1125
|
+
this.hidden = input(false, { ...(ngDevMode ? { debugName: "hidden" } : /* istanbul ignore next */ {}), transform: coerceBoolean });
|
|
1126
|
+
this.show = input(true, ...(ngDevMode ? [{ debugName: "show" }] : /* istanbul ignore next */ []));
|
|
1127
|
+
/**
|
|
1128
|
+
* The current active state. Initialised from the active/inactive inputs
|
|
1129
|
+
* and the cached value, can be changed with toggle/activate/deactivate.
|
|
1130
|
+
*/
|
|
1131
|
+
this.active = linkedSignal(() => {
|
|
1132
|
+
const cachedValue = this.cachedValue();
|
|
1133
|
+
if (cachedValue !== null) {
|
|
1134
|
+
return cachedValue;
|
|
1135
|
+
}
|
|
1136
|
+
return this.activeInput() && !this.inactive();
|
|
1137
|
+
}, ...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
1138
|
+
this.isHidden = computed(() => this.hidden() || !this.show(), ...(ngDevMode ? [{ debugName: "isHidden" }] : /* istanbul ignore next */ []));
|
|
1139
|
+
}
|
|
1429
1140
|
/**
|
|
1430
1141
|
* The displayed value of the option. It is necessary to show the selected option in the
|
|
1431
1142
|
* select's trigger.
|
|
@@ -1433,152 +1144,84 @@ class TableColumnOptionComponent {
|
|
|
1433
1144
|
get display() {
|
|
1434
1145
|
return (this._element.nativeElement.textContent || '').trim();
|
|
1435
1146
|
}
|
|
1436
|
-
set inactive(value) {
|
|
1437
|
-
this.active = !coerceBoolean(value);
|
|
1438
|
-
}
|
|
1439
|
-
set hidden(value) {
|
|
1440
|
-
this._hidden = coerceBoolean(value);
|
|
1441
|
-
}
|
|
1442
|
-
get hidden() {
|
|
1443
|
-
return this._hidden;
|
|
1444
|
-
}
|
|
1445
|
-
set show(value) {
|
|
1446
|
-
this._hidden = !value;
|
|
1447
|
-
}
|
|
1448
1147
|
get cacheId() {
|
|
1449
|
-
return this.router.url + '--' + this.name;
|
|
1450
|
-
}
|
|
1451
|
-
constructor(_element, router) {
|
|
1452
|
-
this._element = _element;
|
|
1453
|
-
this.router = router;
|
|
1454
|
-
this.active = true;
|
|
1455
|
-
this._hidden = false;
|
|
1148
|
+
return this.router.url + '--' + this.name();
|
|
1456
1149
|
}
|
|
1457
|
-
|
|
1150
|
+
cachedValue() {
|
|
1458
1151
|
const cachedValue = localStorage.getItem(this.cacheId);
|
|
1459
1152
|
if (cachedValue === 'true') {
|
|
1460
|
-
|
|
1153
|
+
return true;
|
|
1461
1154
|
}
|
|
1462
1155
|
if (cachedValue === 'false') {
|
|
1463
|
-
|
|
1156
|
+
return false;
|
|
1464
1157
|
}
|
|
1158
|
+
return null;
|
|
1465
1159
|
}
|
|
1466
1160
|
toggle() {
|
|
1467
|
-
this.active
|
|
1468
|
-
localStorage.setItem(this.cacheId, this.active ? 'true' : 'false');
|
|
1161
|
+
this.active.update(active => !active);
|
|
1162
|
+
localStorage.setItem(this.cacheId, this.active() ? 'true' : 'false');
|
|
1469
1163
|
}
|
|
1470
1164
|
activate() {
|
|
1471
|
-
this.active
|
|
1165
|
+
this.active.set(true);
|
|
1472
1166
|
localStorage.setItem(this.cacheId, 'true');
|
|
1473
1167
|
}
|
|
1474
1168
|
deactivate() {
|
|
1475
|
-
this.active
|
|
1169
|
+
this.active.set(false);
|
|
1476
1170
|
localStorage.setItem(this.cacheId, 'false');
|
|
1477
1171
|
}
|
|
1478
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1479
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1172
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableColumnOptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1173
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: TableColumnOptionComponent, isStandalone: true, selector: "rxap-table-column-option", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, activeInput: { classPropertyName: "activeInput", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, inactive: { classPropertyName: "inactive", publicName: "inactive", isSignal: true, isRequired: false, transformFunction: null }, hidden: { classPropertyName: "hidden", publicName: "hidden", isSignal: true, isRequired: false, transformFunction: null }, show: { classPropertyName: "show", publicName: "show", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1480
1174
|
}
|
|
1481
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1175
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableColumnOptionComponent, decorators: [{
|
|
1482
1176
|
type: Component,
|
|
1483
|
-
args: [{ selector: 'rxap-table-column-option', standalone: true, template: "<ng-content></ng-content>\n" }]
|
|
1484
|
-
}],
|
|
1485
|
-
type: Inject,
|
|
1486
|
-
args: [ElementRef]
|
|
1487
|
-
}] }, { type: i1$2.Router }], propDecorators: { name: [{
|
|
1488
|
-
type: Input,
|
|
1489
|
-
args: [{ required: true }]
|
|
1490
|
-
}], active: [{
|
|
1491
|
-
type: Input
|
|
1492
|
-
}], inactive: [{
|
|
1493
|
-
type: Input
|
|
1494
|
-
}], hidden: [{
|
|
1495
|
-
type: Input
|
|
1496
|
-
}], show: [{
|
|
1497
|
-
type: Input
|
|
1498
|
-
}] } });
|
|
1499
|
-
|
|
1177
|
+
args: [{ selector: 'rxap-table-column-option', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<ng-content></ng-content>\n" }]
|
|
1178
|
+
}], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }], activeInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], inactive: [{ type: i0.Input, args: [{ isSignal: true, alias: "inactive", required: false }] }], hidden: [{ type: i0.Input, args: [{ isSignal: true, alias: "hidden", required: false }] }], show: [{ type: i0.Input, args: [{ isSignal: true, alias: "show", required: false }] }] } });
|
|
1500
1179
|
class TableColumnMenuComponent {
|
|
1501
1180
|
constructor() {
|
|
1502
|
-
this.
|
|
1503
|
-
this.
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
*/
|
|
1516
|
-
set inline(value) {
|
|
1517
|
-
this._inline = coerceBoolean(value);
|
|
1518
|
-
}
|
|
1519
|
-
set matCard(value) {
|
|
1520
|
-
this._matCardMode = coerceBoolean(value);
|
|
1521
|
-
}
|
|
1522
|
-
ngAfterContentInit() {
|
|
1523
|
-
this.updateDisplayColumns();
|
|
1524
|
-
}
|
|
1525
|
-
updateDisplayColumns() {
|
|
1526
|
-
if (!this.columns) {
|
|
1527
|
-
throw new Error('Could not query content children of TableColumnOptionComponent');
|
|
1528
|
-
}
|
|
1529
|
-
this.displayColumns = this.columns
|
|
1530
|
-
.filter((option) => option.active)
|
|
1531
|
-
.map((option) => option.name);
|
|
1181
|
+
this.columns = contentChildren(TableColumnOptionComponent, ...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
|
|
1182
|
+
this.visibleColumns = computed(() => this.columns().filter((option) => !option.isHidden()), ...(ngDevMode ? [{ debugName: "visibleColumns" }] : /* istanbul ignore next */ []));
|
|
1183
|
+
/**
|
|
1184
|
+
* The names of all currently active columns
|
|
1185
|
+
*/
|
|
1186
|
+
this.displayColumns = computed(() => this.columns()
|
|
1187
|
+
.filter((option) => option.active())
|
|
1188
|
+
.map((option) => option.name()), ...(ngDevMode ? [{ debugName: "displayColumns" }] : /* istanbul ignore next */ []));
|
|
1189
|
+
/**
|
|
1190
|
+
* true - the menu is displayed inline and not absolute
|
|
1191
|
+
*/
|
|
1192
|
+
this.inline = input(false, { ...(ngDevMode ? { debugName: "inline" } : /* istanbul ignore next */ {}), transform: coerceBoolean });
|
|
1193
|
+
this.matCard = input(false, { ...(ngDevMode ? { debugName: "matCard" } : /* istanbul ignore next */ {}), transform: coerceBoolean });
|
|
1532
1194
|
}
|
|
1533
1195
|
activate(columnName) {
|
|
1534
|
-
this.columns
|
|
1535
|
-
|
|
1196
|
+
this.columns()
|
|
1197
|
+
.filter((option) => option.name() === columnName)
|
|
1536
1198
|
.forEach((column) => column.activate());
|
|
1537
|
-
this.updateDisplayColumns();
|
|
1538
1199
|
}
|
|
1539
1200
|
deactivate(columnName) {
|
|
1540
|
-
this.columns
|
|
1541
|
-
|
|
1201
|
+
this.columns()
|
|
1202
|
+
.filter((option) => option.name() === columnName)
|
|
1542
1203
|
.forEach((column) => column.deactivate());
|
|
1543
|
-
this.updateDisplayColumns();
|
|
1544
1204
|
}
|
|
1545
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1546
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1205
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableColumnMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1206
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: TableColumnMenuComponent, isStandalone: true, selector: "rxap-table-column-menu", inputs: { inline: { classPropertyName: "inline", publicName: "inline", isSignal: true, isRequired: false, transformFunction: null }, matCard: { classPropertyName: "matCard", publicName: "matCard", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.inline": "inline()", "class.mat-card-mode": "matCard()" } }, queries: [{ propertyName: "columns", predicate: TableColumnOptionComponent, isSignal: true }], exportAs: ["rxapTableColumns"], ngImport: i0, template: "<button [matMenuTriggerFor]=\"columnMenu\" mat-icon-button type=\"button\">\n <mat-icon>tune</mat-icon>\n</button>\n\n<mat-menu #columnMenu=\"matMenu\">\n @for (column of visibleColumns(); track column) {\n <span\n [disableRipple]=\"true\"\n mat-menu-item\n rxapStopPropagation\n >\n <mat-checkbox\n (change)=\"column.toggle()\"\n [checked]=\"column.active()\">\n {{ column.display }}\n </mat-checkbox>\n </span>\n }\n <ng-content select=\"[mat-menu-item],mat-divider\"></ng-content>\n</mat-menu>\n", styles: [":host.mat-card-mode:not(.inline){position:absolute;inset:8px 8px auto auto}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i2.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: StopPropagationDirective, selector: "[rxapStopPropagation]" }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i1$1.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1547
1207
|
}
|
|
1548
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1208
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableColumnMenuComponent, decorators: [{
|
|
1549
1209
|
type: Component,
|
|
1550
|
-
args: [{ selector: 'rxap-table-column-menu', changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'rxapTableColumns',
|
|
1210
|
+
args: [{ selector: 'rxap-table-column-menu', changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'rxapTableColumns', host: {
|
|
1211
|
+
'[class.inline]': 'inline()',
|
|
1212
|
+
'[class.mat-card-mode]': 'matCard()',
|
|
1213
|
+
}, imports: [
|
|
1551
1214
|
MatButtonModule,
|
|
1552
1215
|
MatMenuModule,
|
|
1553
1216
|
MatIconModule,
|
|
1554
|
-
NgFor,
|
|
1555
1217
|
StopPropagationDirective,
|
|
1556
1218
|
MatCheckboxModule,
|
|
1557
|
-
NgClass
|
|
1558
|
-
], template: "<button [matMenuTriggerFor]=\"columnMenu\" mat-icon-button type=\"button\">\n <mat-icon>tune</mat-icon>\n</button>\n\n<mat-menu #columnMenu=\"matMenu\">\n
|
|
1559
|
-
}], propDecorators: { columns: [{
|
|
1560
|
-
type: ContentChildren,
|
|
1561
|
-
args: [TableColumnOptionComponent]
|
|
1562
|
-
}], _inline: [{
|
|
1563
|
-
type: HostBinding,
|
|
1564
|
-
args: ['class.inline']
|
|
1565
|
-
}], inline: [{
|
|
1566
|
-
type: Input
|
|
1567
|
-
}], matCard: [{
|
|
1568
|
-
type: Input
|
|
1569
|
-
}], _matCardMode: [{
|
|
1570
|
-
type: HostBinding,
|
|
1571
|
-
args: ['class.mat-card-mode']
|
|
1572
|
-
}] } });
|
|
1573
|
-
|
|
1219
|
+
NgClass
|
|
1220
|
+
], template: "<button [matMenuTriggerFor]=\"columnMenu\" mat-icon-button type=\"button\">\n <mat-icon>tune</mat-icon>\n</button>\n\n<mat-menu #columnMenu=\"matMenu\">\n @for (column of visibleColumns(); track column) {\n <span\n [disableRipple]=\"true\"\n mat-menu-item\n rxapStopPropagation\n >\n <mat-checkbox\n (change)=\"column.toggle()\"\n [checked]=\"column.active()\">\n {{ column.display }}\n </mat-checkbox>\n </span>\n }\n <ng-content select=\"[mat-menu-item],mat-divider\"></ng-content>\n</mat-menu>\n", styles: [":host.mat-card-mode:not(.inline){position:absolute;inset:8px 8px auto auto}\n"] }]
|
|
1221
|
+
}], propDecorators: { columns: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TableColumnOptionComponent), { isSignal: true }] }], inline: [{ type: i0.Input, args: [{ isSignal: true, alias: "inline", required: false }] }], matCard: [{ type: i0.Input, args: [{ isSignal: true, alias: "matCard", required: false }] }] } });
|
|
1574
1222
|
class TableShowArchivedSlideComponent {
|
|
1575
|
-
constructor(tableFilter, tableColumnMenu, selectRows) {
|
|
1576
|
-
this.tableFilter = tableFilter;
|
|
1577
|
-
this.tableColumnMenu = tableColumnMenu;
|
|
1578
|
-
this.selectRows = selectRows;
|
|
1579
|
-
}
|
|
1580
1223
|
onChange($event) {
|
|
1581
|
-
this.paginator?.firstPage();
|
|
1224
|
+
this.paginator()?.firstPage();
|
|
1582
1225
|
this.tableFilter?.set('__archived', $event.checked);
|
|
1583
1226
|
this.selectRows?.clear();
|
|
1584
1227
|
if ($event.checked) {
|
|
@@ -1596,60 +1239,50 @@ class TableShowArchivedSlideComponent {
|
|
|
1596
1239
|
this.tableColumnMenu.deactivate('__removed-at');
|
|
1597
1240
|
}
|
|
1598
1241
|
}
|
|
1599
|
-
|
|
1600
|
-
this.
|
|
1601
|
-
this.tableColumnMenu
|
|
1602
|
-
this.
|
|
1603
|
-
this.
|
|
1604
|
-
|
|
1242
|
+
constructor() {
|
|
1243
|
+
this.tableFilter = inject(TableFilterService, { optional: true });
|
|
1244
|
+
this.tableColumnMenu = inject(TableColumnMenuComponent);
|
|
1245
|
+
this.selectRows = inject(SelectRowService, { optional: true });
|
|
1246
|
+
this.paginator = input(...(ngDevMode ? [undefined, { debugName: "paginator" }] : /* istanbul ignore next */ []));
|
|
1247
|
+
afterNextRender(() => {
|
|
1248
|
+
this.tableColumnMenu.deactivate('removedAt');
|
|
1249
|
+
this.tableColumnMenu.deactivate('__removedAt');
|
|
1250
|
+
this.tableColumnMenu.deactivate('__--removed-at');
|
|
1251
|
+
this.tableColumnMenu.deactivate('removed-at');
|
|
1252
|
+
this.tableColumnMenu.deactivate('__removed-at');
|
|
1253
|
+
});
|
|
1605
1254
|
}
|
|
1606
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1607
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1255
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableShowArchivedSlideComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1256
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: TableShowArchivedSlideComponent, isStandalone: true, selector: "rxap-table-show-archived-slide", inputs: { paginator: { classPropertyName: "paginator", publicName: "paginator", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"m-6\" rxapStopPropagation>\n <mat-slide-toggle (change)=\"onChange($event)\">\n <span class=\"mx-2 whitespace-nowrap\" i18n>Show archived documents</span>\n </mat-slide-toggle>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: StopPropagationDirective, selector: "[rxapStopPropagation]" }, { kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i1$2.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1608
1257
|
}
|
|
1609
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1258
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableShowArchivedSlideComponent, decorators: [{
|
|
1610
1259
|
type: Component,
|
|
1611
1260
|
args: [{ selector: 'rxap-table-show-archived-slide', changeDetection: ChangeDetectionStrategy.OnPush, imports: [StopPropagationDirective, MatSlideToggleModule], template: "<div class=\"m-6\" rxapStopPropagation>\n <mat-slide-toggle (change)=\"onChange($event)\">\n <span class=\"mx-2 whitespace-nowrap\" i18n>Show archived documents</span>\n </mat-slide-toggle>\n</div>\n" }]
|
|
1612
|
-
}], ctorParameters: () => [{ type:
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
static { this.ɵ
|
|
1629
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.16", ngImport: i0, type: TableColumnMenuModule, imports: [TableColumnMenuComponent,
|
|
1630
|
-
TableShowArchivedSlideComponent,
|
|
1631
|
-
TableColumnOptionComponent], exports: [TableColumnMenuComponent,
|
|
1632
|
-
TableShowArchivedSlideComponent,
|
|
1633
|
-
TableColumnOptionComponent] }); }
|
|
1634
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TableColumnMenuModule, imports: [TableColumnMenuComponent,
|
|
1635
|
-
TableShowArchivedSlideComponent] }); }
|
|
1261
|
+
}], ctorParameters: () => [], propDecorators: { paginator: [{ type: i0.Input, args: [{ isSignal: true, alias: "paginator", required: false }] }] } });
|
|
1262
|
+
// TODO : move to rxap packages
|
|
1263
|
+
class TableColumnFilterInputDirective {
|
|
1264
|
+
constructor() {
|
|
1265
|
+
this.ngModel = inject(NgModel);
|
|
1266
|
+
this.tableColumnFilterService = inject(RXAP_TABLE_FILTER);
|
|
1267
|
+
this.destroyRef = inject(DestroyRef);
|
|
1268
|
+
this.column = input.required(...(ngDevMode ? [{ debugName: "column" }] : /* istanbul ignore next */ []));
|
|
1269
|
+
afterNextRender(() => {
|
|
1270
|
+
if (!this.ngModel.valueChanges) {
|
|
1271
|
+
throw new Error('Could not access the ngModel value change');
|
|
1272
|
+
}
|
|
1273
|
+
this.ngModel.valueChanges.pipe(debounceTime(500), tap((value) => this.tableColumnFilterService.setFilter(this.column(), value)), takeUntilDestroyed(this.destroyRef)).subscribe();
|
|
1274
|
+
});
|
|
1275
|
+
}
|
|
1276
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableColumnFilterInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1277
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: TableColumnFilterInputDirective, isStandalone: true, selector: "input[ngModel][rxapTableColumnFilterInput]", inputs: { column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 }); }
|
|
1636
1278
|
}
|
|
1637
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1638
|
-
type:
|
|
1279
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableColumnFilterInputDirective, decorators: [{
|
|
1280
|
+
type: Directive,
|
|
1639
1281
|
args: [{
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
TableShowArchivedSlideComponent,
|
|
1643
|
-
TableColumnOptionComponent,
|
|
1644
|
-
],
|
|
1645
|
-
exports: [
|
|
1646
|
-
TableColumnMenuComponent,
|
|
1647
|
-
TableShowArchivedSlideComponent,
|
|
1648
|
-
TableColumnOptionComponent,
|
|
1649
|
-
],
|
|
1282
|
+
selector: 'input[ngModel][rxapTableColumnFilterInput]',
|
|
1283
|
+
standalone: true,
|
|
1650
1284
|
}]
|
|
1651
|
-
}] });
|
|
1652
|
-
|
|
1285
|
+
}], ctorParameters: () => [], propDecorators: { column: [{ type: i0.Input, args: [{ isSignal: true, alias: "column", required: true }] }] } });
|
|
1653
1286
|
// TODO : move to rxap packages
|
|
1654
1287
|
class TableColumnFilterService {
|
|
1655
1288
|
constructor() {
|
|
@@ -1668,66 +1301,21 @@ class TableColumnFilterService {
|
|
|
1668
1301
|
}
|
|
1669
1302
|
this.change.next(next);
|
|
1670
1303
|
}
|
|
1671
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1672
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1304
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableColumnFilterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1305
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableColumnFilterService }); }
|
|
1673
1306
|
}
|
|
1674
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1307
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableColumnFilterService, decorators: [{
|
|
1675
1308
|
type: Injectable
|
|
1676
1309
|
}] });
|
|
1677
|
-
|
|
1678
|
-
// TODO : move to rxap packages
|
|
1679
|
-
class TableColumnFilterInputDirective {
|
|
1680
|
-
constructor(ngModel, tableColumnFilterService) {
|
|
1681
|
-
this.ngModel = ngModel;
|
|
1682
|
-
this.tableColumnFilterService = tableColumnFilterService;
|
|
1683
|
-
}
|
|
1684
|
-
ngOnDestroy() {
|
|
1685
|
-
this._subscription?.unsubscribe();
|
|
1686
|
-
}
|
|
1687
|
-
ngAfterViewInit() {
|
|
1688
|
-
if (!this.ngModel.valueChanges) {
|
|
1689
|
-
throw new Error('Could not access the ngModel value change');
|
|
1690
|
-
}
|
|
1691
|
-
this._subscription = this.ngModel.valueChanges.pipe(debounceTime(500), tap((value) => {
|
|
1692
|
-
this.tableColumnFilterService.setFilter(this.column, value);
|
|
1693
|
-
}))
|
|
1694
|
-
.subscribe();
|
|
1695
|
-
}
|
|
1696
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TableColumnFilterInputDirective, deps: [{ token: NgModel }, { token: RXAP_TABLE_FILTER }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1697
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.16", type: TableColumnFilterInputDirective, isStandalone: true, selector: "input[ngModel][rxapTableColumnFilterInput]", inputs: { column: "column" }, ngImport: i0 }); }
|
|
1698
|
-
}
|
|
1699
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TableColumnFilterInputDirective, decorators: [{
|
|
1700
|
-
type: Directive,
|
|
1701
|
-
args: [{
|
|
1702
|
-
selector: 'input[ngModel][rxapTableColumnFilterInput]',
|
|
1703
|
-
standalone: true,
|
|
1704
|
-
}]
|
|
1705
|
-
}], ctorParameters: () => [{ type: i1$4.NgModel, decorators: [{
|
|
1706
|
-
type: Inject,
|
|
1707
|
-
args: [NgModel]
|
|
1708
|
-
}] }, { type: TableColumnFilterService, decorators: [{
|
|
1709
|
-
type: Inject,
|
|
1710
|
-
args: [RXAP_TABLE_FILTER]
|
|
1711
|
-
}] }], propDecorators: { column: [{
|
|
1712
|
-
type: Input,
|
|
1713
|
-
args: [{ required: true }]
|
|
1714
|
-
}] } });
|
|
1715
|
-
|
|
1716
1310
|
class CheckboxHeaderCellComponent {
|
|
1717
|
-
constructor(
|
|
1718
|
-
this.cdkTable =
|
|
1719
|
-
this.selectRow =
|
|
1720
|
-
this.indeterminate
|
|
1721
|
-
|
|
1722
|
-
this.
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
}
|
|
1726
|
-
ngOnInit() {
|
|
1727
|
-
this.indeterminate$ = this.selectRow.selectedRows$.pipe(map((selectedRows) => !!selectedRows.length &&
|
|
1728
|
-
this.cdkTable['_data']?.length !== selectedRows.length));
|
|
1729
|
-
this.checked$ = this.selectRow.selectedRows$.pipe(map((selectedRows) => !!selectedRows.length &&
|
|
1730
|
-
this.cdkTable['_data']?.length === selectedRows.length));
|
|
1311
|
+
constructor() {
|
|
1312
|
+
this.cdkTable = inject(CdkTable);
|
|
1313
|
+
this.selectRow = inject(SelectRowService);
|
|
1314
|
+
this.indeterminate = toSignal(this.selectRow.selectedRows$.pipe(map((selectedRows) => !!selectedRows.length &&
|
|
1315
|
+
this.cdkTable['_data']?.length !== selectedRows.length)), { initialValue: false });
|
|
1316
|
+
this.checked = toSignal(this.selectRow.selectedRows$.pipe(map((selectedRows) => !!selectedRows.length &&
|
|
1317
|
+
this.cdkTable['_data']?.length === selectedRows.length)), { initialValue: false });
|
|
1318
|
+
this.isMultipleSelection = this.selectRow.selectionModel.isMultipleSelection();
|
|
1731
1319
|
}
|
|
1732
1320
|
onChange($event) {
|
|
1733
1321
|
if ($event.checked) {
|
|
@@ -1737,131 +1325,79 @@ class CheckboxHeaderCellComponent {
|
|
|
1737
1325
|
this.selectRow.selectionModel.clear();
|
|
1738
1326
|
}
|
|
1739
1327
|
}
|
|
1740
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1741
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1328
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CheckboxHeaderCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1329
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: CheckboxHeaderCellComponent, isStandalone: true, selector: "th[rxap-checkbox-header-cell]", ngImport: i0, template: "@if (isMultipleSelection) {\n <mat-checkbox\n (change)=\"onChange($event)\"\n [checked]=\"checked()\"\n [indeterminate]=\"indeterminate()\">\n </mat-checkbox>\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i1$1.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1742
1330
|
}
|
|
1743
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1331
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CheckboxHeaderCellComponent, decorators: [{
|
|
1744
1332
|
type: Component,
|
|
1745
1333
|
args: [{ selector: 'th[rxap-checkbox-header-cell]', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
1746
|
-
NgIf,
|
|
1747
1334
|
MatCheckboxModule,
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
}], ctorParameters: () => [{ type: i1.CdkTable, decorators: [{
|
|
1751
|
-
type: Inject,
|
|
1752
|
-
args: [CdkTable]
|
|
1753
|
-
}] }, { type: SelectRowService }] });
|
|
1754
|
-
|
|
1335
|
+
], template: "@if (isMultipleSelection) {\n <mat-checkbox\n (change)=\"onChange($event)\"\n [checked]=\"checked()\"\n [indeterminate]=\"indeterminate()\">\n </mat-checkbox>\n}\n" }]
|
|
1336
|
+
}] });
|
|
1755
1337
|
class CheckboxCellComponent {
|
|
1756
|
-
constructor(
|
|
1757
|
-
this.selectRow =
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1338
|
+
constructor() {
|
|
1339
|
+
this.selectRow = inject(SelectRowService);
|
|
1340
|
+
this.element = input.required(...(ngDevMode ? [{ debugName: "element" }] : /* istanbul ignore next */ []));
|
|
1341
|
+
this.selectedRows = toSignal(this.selectRow.selectedRows$, { initialValue: this.selectRow.selectedRows });
|
|
1342
|
+
this.isSelected = computed(() => {
|
|
1343
|
+
this.selectedRows();
|
|
1344
|
+
return this.selectRow.selectionModel.isSelected(this.element());
|
|
1345
|
+
}, ...(ngDevMode ? [{ debugName: "isSelected" }] : /* istanbul ignore next */ []));
|
|
1346
|
+
}
|
|
1347
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CheckboxCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1348
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: CheckboxCellComponent, isStandalone: true, selector: "td[rxap-checkbox-cell]", inputs: { element: { classPropertyName: "element", publicName: "element", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<mat-checkbox\n (change)=\"selectRow.selectionModel.toggle(element())\"\n [checked]=\"isSelected()\">\n</mat-checkbox>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i1$1.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1761
1349
|
}
|
|
1762
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1350
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CheckboxCellComponent, decorators: [{
|
|
1763
1351
|
type: Component,
|
|
1764
|
-
args: [{ selector: 'td[rxap-checkbox-cell]', changeDetection: ChangeDetectionStrategy.
|
|
1765
|
-
}],
|
|
1766
|
-
type: Inject,
|
|
1767
|
-
args: [SelectRowService]
|
|
1768
|
-
}] }], propDecorators: { element: [{
|
|
1769
|
-
type: Input,
|
|
1770
|
-
args: [{ required: true }]
|
|
1771
|
-
}] } });
|
|
1772
|
-
|
|
1352
|
+
args: [{ selector: 'td[rxap-checkbox-cell]', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatCheckboxModule], template: "<mat-checkbox\n (change)=\"selectRow.selectionModel.toggle(element())\"\n [checked]=\"isSelected()\">\n</mat-checkbox>\n" }]
|
|
1353
|
+
}], propDecorators: { element: [{ type: i0.Input, args: [{ isSignal: true, alias: "element", required: true }] }] } });
|
|
1773
1354
|
class SelectedRowsDirective {
|
|
1774
|
-
constructor(
|
|
1775
|
-
this.template =
|
|
1776
|
-
this.viewContainerRef =
|
|
1777
|
-
this.
|
|
1778
|
-
this.
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
}
|
|
1789
|
-
this.cdr.detectChanges();
|
|
1790
|
-
})).subscribe();
|
|
1355
|
+
constructor() {
|
|
1356
|
+
this.template = inject(TemplateRef);
|
|
1357
|
+
this.viewContainerRef = inject(ViewContainerRef);
|
|
1358
|
+
this.selectRowService = inject(SelectRowService);
|
|
1359
|
+
this.selectedRows = toSignal(this.selectRowService.selectedRows$.pipe(distinctUntilChanged()));
|
|
1360
|
+
effect(() => {
|
|
1361
|
+
const selectedRows = this.selectedRows();
|
|
1362
|
+
untracked(() => {
|
|
1363
|
+
this.viewContainerRef.clear();
|
|
1364
|
+
if (selectedRows) {
|
|
1365
|
+
this.viewContainerRef.createEmbeddedView(this.template, { $implicit: this.selectRowService.selectedRows });
|
|
1366
|
+
}
|
|
1367
|
+
});
|
|
1368
|
+
});
|
|
1791
1369
|
}
|
|
1792
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1793
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1370
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SelectedRowsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1371
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: SelectedRowsDirective, isStandalone: true, selector: "[rxapSelectedRows]", ngImport: i0 }); }
|
|
1794
1372
|
}
|
|
1795
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1373
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SelectedRowsDirective, decorators: [{
|
|
1796
1374
|
type: Directive,
|
|
1797
1375
|
args: [{
|
|
1798
1376
|
selector: '[rxapSelectedRows]',
|
|
1799
1377
|
standalone: true,
|
|
1800
1378
|
}]
|
|
1801
|
-
}], ctorParameters: () => [
|
|
1802
|
-
type: Inject,
|
|
1803
|
-
args: [TemplateRef]
|
|
1804
|
-
}] }, { type: i0.ViewContainerRef, decorators: [{
|
|
1805
|
-
type: Inject,
|
|
1806
|
-
args: [ViewContainerRef]
|
|
1807
|
-
}] }, { type: i0.ChangeDetectorRef, decorators: [{
|
|
1808
|
-
type: Inject,
|
|
1809
|
-
args: [ChangeDetectorRef]
|
|
1810
|
-
}] }, { type: SelectRowService, decorators: [{
|
|
1811
|
-
type: Inject,
|
|
1812
|
-
args: [SelectRowService]
|
|
1813
|
-
}] }] });
|
|
1814
|
-
|
|
1815
|
-
class SelectRowModule {
|
|
1816
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: SelectRowModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1817
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.16", ngImport: i0, type: SelectRowModule, imports: [SelectedRowsDirective,
|
|
1818
|
-
CheckboxCellComponent,
|
|
1819
|
-
CheckboxHeaderCellComponent], exports: [CheckboxCellComponent,
|
|
1820
|
-
CheckboxHeaderCellComponent,
|
|
1821
|
-
SelectedRowsDirective] }); }
|
|
1822
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: SelectRowModule, imports: [CheckboxCellComponent,
|
|
1823
|
-
CheckboxHeaderCellComponent] }); }
|
|
1824
|
-
}
|
|
1825
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: SelectRowModule, decorators: [{
|
|
1826
|
-
type: NgModule,
|
|
1827
|
-
args: [{
|
|
1828
|
-
exports: [
|
|
1829
|
-
CheckboxCellComponent,
|
|
1830
|
-
CheckboxHeaderCellComponent,
|
|
1831
|
-
SelectedRowsDirective,
|
|
1832
|
-
],
|
|
1833
|
-
imports: [
|
|
1834
|
-
SelectedRowsDirective,
|
|
1835
|
-
CheckboxCellComponent,
|
|
1836
|
-
CheckboxHeaderCellComponent,
|
|
1837
|
-
],
|
|
1838
|
-
}]
|
|
1839
|
-
}] });
|
|
1840
|
-
|
|
1379
|
+
}], ctorParameters: () => [] });
|
|
1841
1380
|
class ExpandRowContentDirective {
|
|
1381
|
+
constructor() {
|
|
1382
|
+
this.template = inject(TemplateRef);
|
|
1383
|
+
}
|
|
1842
1384
|
static ngTemplateContextGuard(dir, ctx) {
|
|
1843
1385
|
return true;
|
|
1844
1386
|
}
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
}
|
|
1848
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: ExpandRowContentDirective, deps: [{ token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1849
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.16", type: ExpandRowContentDirective, isStandalone: true, selector: "[rxapExpandRowContent]", ngImport: i0 }); }
|
|
1387
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ExpandRowContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1388
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: ExpandRowContentDirective, isStandalone: true, selector: "[rxapExpandRowContent]", ngImport: i0 }); }
|
|
1850
1389
|
}
|
|
1851
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1390
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ExpandRowContentDirective, decorators: [{
|
|
1852
1391
|
type: Directive,
|
|
1853
1392
|
args: [{
|
|
1854
1393
|
selector: '[rxapExpandRowContent]',
|
|
1855
1394
|
standalone: true,
|
|
1856
1395
|
}]
|
|
1857
|
-
}]
|
|
1858
|
-
type: Inject,
|
|
1859
|
-
args: [TemplateRef]
|
|
1860
|
-
}] }] });
|
|
1861
|
-
|
|
1396
|
+
}] });
|
|
1862
1397
|
class ExpandRowService {
|
|
1863
1398
|
constructor() {
|
|
1864
1399
|
this.expandedRow = new BehaviorSubject(null);
|
|
1400
|
+
this.expandedRowSignal = toSignal(this.expandedRow, { requireSync: true });
|
|
1865
1401
|
}
|
|
1866
1402
|
toggleRow(row) {
|
|
1867
1403
|
if (this.expandedRow.value === row) {
|
|
@@ -1872,50 +1408,55 @@ class ExpandRowService {
|
|
|
1872
1408
|
}
|
|
1873
1409
|
}
|
|
1874
1410
|
isExpanded(row) {
|
|
1875
|
-
return this.
|
|
1411
|
+
return this.expandedRowSignal() === row;
|
|
1876
1412
|
}
|
|
1877
1413
|
isExpanded$(row) {
|
|
1878
1414
|
return this.expandedRow.pipe(map((expandedRow) => expandedRow === row));
|
|
1879
1415
|
}
|
|
1880
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1881
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1416
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ExpandRowService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1417
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ExpandRowService }); }
|
|
1882
1418
|
}
|
|
1883
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1419
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ExpandRowService, decorators: [{
|
|
1884
1420
|
type: Injectable
|
|
1885
1421
|
}] });
|
|
1886
|
-
|
|
1887
1422
|
class ExpandRowContainerComponent {
|
|
1888
|
-
constructor(
|
|
1889
|
-
this.viewContainerRef =
|
|
1890
|
-
this.expandCell =
|
|
1891
|
-
this.
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1423
|
+
constructor() {
|
|
1424
|
+
this.viewContainerRef = inject(ViewContainerRef);
|
|
1425
|
+
this.expandCell = inject(ExpandRowService);
|
|
1426
|
+
this.element = input.required(...(ngDevMode ? [{ debugName: "element" }] : /* istanbul ignore next */ []));
|
|
1427
|
+
this.expandCellContent = contentChild(ExpandRowContentDirective, ...(ngDevMode ? [{ debugName: "expandCellContent" }] : /* istanbul ignore next */ []));
|
|
1428
|
+
/**
|
|
1429
|
+
* The portal is created with the first expand of the row and then kept.
|
|
1430
|
+
*/
|
|
1431
|
+
this.portal = linkedSignal({ ...(ngDevMode ? { debugName: "portal" } : /* istanbul ignore next */ {}), source: () => ({
|
|
1432
|
+
content: this.expandCellContent(),
|
|
1433
|
+
expanded: this.expandCell.isExpanded(this.element()),
|
|
1434
|
+
}),
|
|
1435
|
+
computation: ({ content, expanded }, previous) => {
|
|
1436
|
+
if (previous?.value) {
|
|
1437
|
+
return previous.value;
|
|
1902
1438
|
}
|
|
1903
|
-
|
|
1904
|
-
|
|
1439
|
+
if (content && expanded) {
|
|
1440
|
+
return new TemplatePortal(content.template, this.viewContainerRef, { $implicit: this.element() });
|
|
1441
|
+
}
|
|
1442
|
+
return null;
|
|
1443
|
+
} });
|
|
1444
|
+
}
|
|
1445
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ExpandRowContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1446
|
+
static {
|
|
1447
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.9", type: ExpandRowContainerComponent, isStandalone: true, selector: "td[rxap-expand-row]", inputs: { element: { classPropertyName: "element", publicName: "element", isSignal: true, isRequired: true, transformFunction: null } }, queries: [{ propertyName: "expandCellContent", first: true, predicate: ExpandRowContentDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<div [@detailExpand]=\"expandCell.isExpanded(element()) ? 'expanded' : 'collapsed'\" class=\"element-detail\">\n <ng-content></ng-content>\n <ng-template [cdkPortalOutlet]=\"portal()\"></ng-template>\n</div>\n", styles: [".element-detail{overflow:hidden;display:flex}\n"], dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i1$3.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], animations: [
|
|
1448
|
+
trigger('detailExpand', [
|
|
1449
|
+
state('collapsed', style({
|
|
1450
|
+
height: '0px',
|
|
1451
|
+
minHeight: '0',
|
|
1452
|
+
})),
|
|
1453
|
+
state('expanded', style({ height: '*' })),
|
|
1454
|
+
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
|
|
1455
|
+
]),
|
|
1456
|
+
], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1905
1457
|
}
|
|
1906
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: ExpandRowContainerComponent, deps: [{ token: ViewContainerRef }, { token: ExpandRowService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1907
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.16", type: ExpandRowContainerComponent, isStandalone: true, selector: "td[rxap-expand-row]", inputs: { element: "element" }, queries: [{ propertyName: "expandCellContent", first: true, predicate: ExpandRowContentDirective, descendants: true }], ngImport: i0, template: "<div [@detailExpand]=\"(expandCell.isExpanded$(element) | async) ? 'expanded' : 'collapsed'\" class=\"element-detail\">\n <ng-content></ng-content>\n <ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n</div>\n", styles: [".element-detail{overflow:hidden;display:flex}\n"], dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i1$5.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], animations: [
|
|
1908
|
-
trigger('detailExpand', [
|
|
1909
|
-
state('collapsed', style({
|
|
1910
|
-
height: '0px',
|
|
1911
|
-
minHeight: '0',
|
|
1912
|
-
})),
|
|
1913
|
-
state('expanded', style({ height: '*' })),
|
|
1914
|
-
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
|
|
1915
|
-
]),
|
|
1916
|
-
], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1917
1458
|
}
|
|
1918
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1459
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ExpandRowContainerComponent, decorators: [{
|
|
1919
1460
|
type: Component,
|
|
1920
1461
|
args: [{ selector: 'td[rxap-expand-row]', changeDetection: ChangeDetectionStrategy.OnPush, animations: [
|
|
1921
1462
|
trigger('detailExpand', [
|
|
@@ -1926,107 +1467,60 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImpo
|
|
|
1926
1467
|
state('expanded', style({ height: '*' })),
|
|
1927
1468
|
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
|
|
1928
1469
|
]),
|
|
1929
|
-
], imports: [PortalModule
|
|
1930
|
-
}],
|
|
1931
|
-
type: Inject,
|
|
1932
|
-
args: [ViewContainerRef]
|
|
1933
|
-
}] }, { type: ExpandRowService, decorators: [{
|
|
1934
|
-
type: Inject,
|
|
1935
|
-
args: [ExpandRowService]
|
|
1936
|
-
}] }], propDecorators: { element: [{
|
|
1937
|
-
type: Input,
|
|
1938
|
-
args: [{ required: true }]
|
|
1939
|
-
}], expandCellContent: [{
|
|
1940
|
-
type: ContentChild,
|
|
1941
|
-
args: [ExpandRowContentDirective]
|
|
1942
|
-
}] } });
|
|
1943
|
-
|
|
1470
|
+
], imports: [PortalModule], template: "<div [@detailExpand]=\"expandCell.isExpanded(element()) ? 'expanded' : 'collapsed'\" class=\"element-detail\">\n <ng-content></ng-content>\n <ng-template [cdkPortalOutlet]=\"portal()\"></ng-template>\n</div>\n", styles: [".element-detail{overflow:hidden;display:flex}\n"] }]
|
|
1471
|
+
}], propDecorators: { element: [{ type: i0.Input, args: [{ isSignal: true, alias: "element", required: true }] }], expandCellContent: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ExpandRowContentDirective), { isSignal: true }] }] } });
|
|
1944
1472
|
class ExpandControlsCellComponent {
|
|
1945
|
-
constructor(
|
|
1946
|
-
this.expandCell =
|
|
1473
|
+
constructor() {
|
|
1474
|
+
this.expandCell = inject(ExpandRowService);
|
|
1475
|
+
this.element = input.required(...(ngDevMode ? [{ debugName: "element" }] : /* istanbul ignore next */ []));
|
|
1947
1476
|
}
|
|
1948
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1949
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1477
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ExpandControlsCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1478
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: ExpandControlsCellComponent, isStandalone: true, selector: "td[rxap-expand-controls-cell]", inputs: { element: { classPropertyName: "element", publicName: "element", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<button type=\"button\" mat-icon-button>\n @if (expandCell.isExpanded(element())) {\n <mat-icon>expand_more</mat-icon>\n } @else {\n <mat-icon>keyboard_arrow_right</mat-icon>\n }\n</button>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1950
1479
|
}
|
|
1951
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1480
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ExpandControlsCellComponent, decorators: [{
|
|
1952
1481
|
type: Component,
|
|
1953
|
-
args: [{ selector: 'td[rxap-expand-controls-cell]', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatButtonModule,
|
|
1954
|
-
}],
|
|
1955
|
-
type: Inject,
|
|
1956
|
-
args: [ExpandRowService]
|
|
1957
|
-
}] }], propDecorators: { element: [{
|
|
1958
|
-
type: Input,
|
|
1959
|
-
args: [{ required: true }]
|
|
1960
|
-
}] } });
|
|
1961
|
-
|
|
1482
|
+
args: [{ selector: 'td[rxap-expand-controls-cell]', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatButtonModule, MatIconModule], template: "<button type=\"button\" mat-icon-button>\n @if (expandCell.isExpanded(element())) {\n <mat-icon>expand_more</mat-icon>\n } @else {\n <mat-icon>keyboard_arrow_right</mat-icon>\n }\n</button>\n" }]
|
|
1483
|
+
}], propDecorators: { element: [{ type: i0.Input, args: [{ isSignal: true, alias: "element", required: true }] }] } });
|
|
1962
1484
|
class ExpandRowDirective {
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
this.expandCell = expandCell;
|
|
1485
|
+
constructor() {
|
|
1486
|
+
this.expandCell = inject(ExpandRowService);
|
|
1487
|
+
this.element = input.required(...(ngDevMode ? [{ debugName: "element" }] : /* istanbul ignore next */ []));
|
|
1488
|
+
this.isExpanded = computed(() => this.expandCell.isExpanded(this.element()), ...(ngDevMode ? [{ debugName: "isExpanded" }] : /* istanbul ignore next */ []));
|
|
1968
1489
|
}
|
|
1969
1490
|
onClick() {
|
|
1970
|
-
this.expandCell.toggleRow(this.element);
|
|
1491
|
+
this.expandCell.toggleRow(this.element());
|
|
1971
1492
|
}
|
|
1972
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1973
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
1493
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ExpandRowDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1494
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: ExpandRowDirective, isStandalone: true, selector: "tr[rxapExpandRow]", inputs: { element: { classPropertyName: "element", publicName: "element", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "click": "onClick()" }, properties: { "class.expanded-row": "isExpanded()" } }, ngImport: i0 }); }
|
|
1974
1495
|
}
|
|
1975
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1496
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ExpandRowDirective, decorators: [{
|
|
1976
1497
|
type: Directive,
|
|
1977
1498
|
args: [{
|
|
1978
1499
|
selector: 'tr[rxapExpandRow]',
|
|
1979
1500
|
standalone: true,
|
|
1501
|
+
host: {
|
|
1502
|
+
'[class.expanded-row]': 'isExpanded()',
|
|
1503
|
+
'(click)': 'onClick()',
|
|
1504
|
+
},
|
|
1980
1505
|
}]
|
|
1981
|
-
}],
|
|
1982
|
-
type: Inject,
|
|
1983
|
-
args: [ExpandRowService]
|
|
1984
|
-
}] }], propDecorators: { isExpanded: [{
|
|
1985
|
-
type: HostListener,
|
|
1986
|
-
args: ['expanded-row']
|
|
1987
|
-
}], element: [{
|
|
1988
|
-
type: Input,
|
|
1989
|
-
args: [{ required: true }]
|
|
1990
|
-
}], onClick: [{
|
|
1991
|
-
type: HostListener,
|
|
1992
|
-
args: ['click']
|
|
1993
|
-
}] } });
|
|
1994
|
-
|
|
1995
|
-
class ExpandRowModule {
|
|
1996
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: ExpandRowModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1997
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.16", ngImport: i0, type: ExpandRowModule, imports: [ExpandRowDirective], exports: [ExpandRowDirective] }); }
|
|
1998
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: ExpandRowModule, providers: [
|
|
1999
|
-
ExpandRowService,
|
|
2000
|
-
] }); }
|
|
2001
|
-
}
|
|
2002
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: ExpandRowModule, decorators: [{
|
|
2003
|
-
type: NgModule,
|
|
2004
|
-
args: [{
|
|
2005
|
-
imports: [ExpandRowDirective],
|
|
2006
|
-
exports: [
|
|
2007
|
-
ExpandRowDirective,
|
|
2008
|
-
],
|
|
2009
|
-
providers: [
|
|
2010
|
-
ExpandRowService,
|
|
2011
|
-
],
|
|
2012
|
-
}]
|
|
2013
|
-
}] });
|
|
2014
|
-
|
|
1506
|
+
}], propDecorators: { element: [{ type: i0.Input, args: [{ isSignal: true, alias: "element", required: true }] }] } });
|
|
2015
1507
|
class TreeControlCellComponent {
|
|
2016
|
-
|
|
2017
|
-
this.offset = (this.element.__node.depth * 24) + 'px';
|
|
2018
|
-
this.
|
|
1508
|
+
constructor() {
|
|
1509
|
+
this.offset = computed(() => (this.element().__node.depth * 24) + 'px', ...(ngDevMode ? [{ debugName: "offset" }] : /* istanbul ignore next */ []));
|
|
1510
|
+
this.element = input(undefined, { ...(ngDevMode ? { debugName: "element" } : /* istanbul ignore next */ {}), alias: "rxap-tree-control-cell" });
|
|
2019
1511
|
}
|
|
1512
|
+
// the tree node state (expanded) is not reactive, therefore the icons must be re-evaluated on each check
|
|
2020
1513
|
ngDoCheck() {
|
|
2021
1514
|
this.updateIcon();
|
|
2022
1515
|
}
|
|
2023
1516
|
toggleExpand() {
|
|
2024
|
-
return this.element.__node.toggleExpand();
|
|
1517
|
+
return this.element().__node.toggleExpand();
|
|
2025
1518
|
}
|
|
2026
1519
|
updateIcon() {
|
|
2027
|
-
this.icon = this.element.icon;
|
|
2028
|
-
|
|
2029
|
-
|
|
1520
|
+
this.icon = this.element().icon;
|
|
1521
|
+
const element = this.element();
|
|
1522
|
+
if (element.__node.hasChildren) {
|
|
1523
|
+
if (element.__node.expanded) {
|
|
2030
1524
|
this.expandIcon = 'expand_more';
|
|
2031
1525
|
}
|
|
2032
1526
|
else {
|
|
@@ -2037,209 +1531,144 @@ class TreeControlCellComponent {
|
|
|
2037
1531
|
this.icon ??= { icon: 'subdirectory_arrow_right' };
|
|
2038
1532
|
}
|
|
2039
1533
|
}
|
|
2040
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2041
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1534
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TreeControlCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1535
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: TreeControlCellComponent, isStandalone: true, selector: "rxap-tree-control-cell, td[rxap-tree-control-cell]", inputs: { element: { classPropertyName: "element", publicName: "rxap-tree-control-cell", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"flex flex-row justify-start items-center\">\n <div class=\"pl-[{{ offset() }}]\">\n <button type=\"button\" (click)=\"toggleExpand()\" mat-icon-button>\n <mat-icon>{{expandIcon}}</mat-icon>\n </button>\n </div>\n @if (icon) {\n <div>\n <mat-icon [rxapIcon]=\"icon\"></mat-icon>\n </div>\n }\n <div class=\"content\">\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: IconDirective, selector: "mat-icon[rxapIcon]", inputs: ["rxapIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2042
1536
|
}
|
|
2043
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1537
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TreeControlCellComponent, decorators: [{
|
|
2044
1538
|
type: Component,
|
|
2045
1539
|
args: [{ selector: 'rxap-tree-control-cell, td[rxap-tree-control-cell]', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
2046
1540
|
MatButtonModule,
|
|
2047
1541
|
MatIconModule,
|
|
2048
|
-
IconDirective
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
}], propDecorators: { element: [{
|
|
2052
|
-
type: Input,
|
|
2053
|
-
args: ['rxap-tree-control-cell']
|
|
2054
|
-
}] } });
|
|
2055
|
-
|
|
1542
|
+
IconDirective
|
|
1543
|
+
], template: "<div class=\"flex flex-row justify-start items-center\">\n <div class=\"pl-[{{ offset() }}]\">\n <button type=\"button\" (click)=\"toggleExpand()\" mat-icon-button>\n <mat-icon>{{expandIcon}}</mat-icon>\n </button>\n </div>\n @if (icon) {\n <div>\n <mat-icon [rxapIcon]=\"icon\"></mat-icon>\n </div>\n }\n <div class=\"content\">\n <ng-content></ng-content>\n </div>\n</div>\n" }]
|
|
1544
|
+
}], propDecorators: { element: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxap-tree-control-cell", required: false }] }] } });
|
|
2056
1545
|
class OptionsCellComponent {
|
|
2057
|
-
constructor(
|
|
2058
|
-
this.renderer =
|
|
2059
|
-
this.
|
|
2060
|
-
|
|
2061
|
-
this.defaultViewValue = ''
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
}
|
|
2070
|
-
setViewValue() {
|
|
2071
|
-
if (this.value === undefined || this.value === null) {
|
|
2072
|
-
this.viewValue = this.emptyViewValue;
|
|
2073
|
-
}
|
|
2074
|
-
else {
|
|
2075
|
-
if (this.options) {
|
|
2076
|
-
this._subscription.add(this.options.changes
|
|
2077
|
-
.pipe(startWith(null), tap(() => (this.viewValue = this.getViewValue())))
|
|
2078
|
-
.subscribe());
|
|
2079
|
-
}
|
|
2080
|
-
else if (isDevMode()) {
|
|
2081
|
-
console.log('Could not load any option');
|
|
2082
|
-
}
|
|
2083
|
-
}
|
|
2084
|
-
}
|
|
2085
|
-
ngOnChanges(changes) {
|
|
2086
|
-
if (this._initialised) {
|
|
2087
|
-
if (changes['value']) {
|
|
2088
|
-
this.setViewValue();
|
|
1546
|
+
constructor() {
|
|
1547
|
+
this.renderer = inject(Renderer2);
|
|
1548
|
+
this.value = input(undefined, { ...(ngDevMode ? { debugName: "value" } : /* istanbul ignore next */ {}), alias: 'rxap-options-cell' });
|
|
1549
|
+
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
1550
|
+
this.defaultViewValue = input('', { ...(ngDevMode ? { debugName: "defaultViewValue" } : /* istanbul ignore next */ {}), alias: 'default' });
|
|
1551
|
+
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
1552
|
+
this.emptyViewValue = input('', { ...(ngDevMode ? { debugName: "emptyViewValue" } : /* istanbul ignore next */ {}), alias: 'empty' });
|
|
1553
|
+
this.options = contentChildren(MatOption, { ...(ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {}), descendants: true });
|
|
1554
|
+
this.viewValue = computed(() => {
|
|
1555
|
+
const value = this.value();
|
|
1556
|
+
if (value === undefined || value === null) {
|
|
1557
|
+
return this.emptyViewValue();
|
|
2089
1558
|
}
|
|
2090
|
-
|
|
1559
|
+
return this.options().find((option) => option.value === value)?.viewValue ?? this.defaultViewValue();
|
|
1560
|
+
}, ...(ngDevMode ? [{ debugName: "viewValue" }] : /* istanbul ignore next */ []));
|
|
1561
|
+
// Hide the mat-option elements
|
|
1562
|
+
effect(() => {
|
|
1563
|
+
const options = this.options();
|
|
1564
|
+
untracked(() => options.forEach(option => this.renderer.setStyle(option._getHostElement(), 'display', 'none')));
|
|
1565
|
+
});
|
|
2091
1566
|
}
|
|
2092
1567
|
getViewValue() {
|
|
2093
|
-
return
|
|
2094
|
-
this.defaultViewValue);
|
|
2095
|
-
}
|
|
2096
|
-
ngOnDestroy() {
|
|
2097
|
-
this._subscription?.unsubscribe();
|
|
1568
|
+
return this.viewValue();
|
|
2098
1569
|
}
|
|
2099
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2100
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1570
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OptionsCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1571
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.9", type: OptionsCellComponent, isStandalone: true, selector: "td[rxap-options-cell]", inputs: { value: { classPropertyName: "value", publicName: "rxap-options-cell", isSignal: true, isRequired: false, transformFunction: null }, defaultViewValue: { classPropertyName: "defaultViewValue", publicName: "default", isSignal: true, isRequired: false, transformFunction: null }, emptyViewValue: { classPropertyName: "emptyViewValue", publicName: "empty", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "options", predicate: MatOption, descendants: true, isSignal: true }], ngImport: i0, template: "{{viewValue()}}\n<ng-content></ng-content>\n", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2101
1572
|
}
|
|
2102
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1573
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OptionsCellComponent, decorators: [{
|
|
2103
1574
|
type: Component,
|
|
2104
|
-
args: [{ selector: 'td[rxap-options-cell]', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "{{viewValue}}\n<ng-content></ng-content>\n" }]
|
|
2105
|
-
}], ctorParameters: () => [{ type: i0.
|
|
2106
|
-
type: Input,
|
|
2107
|
-
args: ['rxap-options-cell']
|
|
2108
|
-
}], defaultViewValue: [{
|
|
2109
|
-
type: Input,
|
|
2110
|
-
args: ['default']
|
|
2111
|
-
}], emptyViewValue: [{
|
|
2112
|
-
type: Input,
|
|
2113
|
-
args: ['empty']
|
|
2114
|
-
}], options: [{
|
|
2115
|
-
type: ContentChildren,
|
|
2116
|
-
args: [MatOption, { descendants: true }]
|
|
2117
|
-
}] } });
|
|
2118
|
-
|
|
1575
|
+
args: [{ selector: 'td[rxap-options-cell]', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "{{viewValue()}}\n<ng-content></ng-content>\n" }]
|
|
1576
|
+
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxap-options-cell", required: false }] }], defaultViewValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "default", required: false }] }], emptyViewValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "empty", required: false }] }], options: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => MatOption), { ...{ descendants: true }, isSignal: true }] }] } });
|
|
2119
1577
|
class LinkCellComponent {
|
|
2120
1578
|
constructor() {
|
|
2121
|
-
this.
|
|
1579
|
+
this.value = input(undefined, { ...(ngDevMode ? { debugName: "value" } : /* istanbul ignore next */ {}), alias: "rxap-link-cell" });
|
|
1580
|
+
this.protocol = input(...(ngDevMode ? [undefined, { debugName: "protocol" }] : /* istanbul ignore next */ []));
|
|
1581
|
+
this.short = input(true, ...(ngDevMode ? [{ debugName: "short" }] : /* istanbul ignore next */ []));
|
|
2122
1582
|
}
|
|
2123
1583
|
get href() {
|
|
2124
|
-
|
|
2125
|
-
|
|
1584
|
+
const protocol = this.protocol();
|
|
1585
|
+
if (protocol) {
|
|
1586
|
+
return [protocol, this.value()].join(':');
|
|
2126
1587
|
}
|
|
2127
|
-
return this.value;
|
|
1588
|
+
return this.value();
|
|
2128
1589
|
}
|
|
2129
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2130
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1590
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LinkCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1591
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: LinkCellComponent, isStandalone: true, selector: "td[rxap-link-cell]", inputs: { value: { classPropertyName: "value", publicName: "rxap-link-cell", isSignal: true, isRequired: false, transformFunction: null }, protocol: { classPropertyName: "protocol", publicName: "protocol", isSignal: true, isRequired: false, transformFunction: null }, short: { classPropertyName: "short", publicName: "short", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (value()) {\n <a [href]=\"href\" [matTooltip]=\"value()\" class=\"link\" target=\"_blank\">\n <span class=\"flex flex-row items-center gap-2\">\n @if (short()) {\n <span class=\"content grow-0\" i18n>Open</span>\n }\n @switch (protocol()) {\n @case ('tel') {\n <mat-icon class=\"grow-0\">call</mat-icon>\n }\n @case ('mailto') {\n <mat-icon class=\"grow-0\">email</mat-icon>\n }\n @default {\n <mat-icon class=\"grow-0\">launch</mat-icon>\n }\n }\n @if (!short()) {\n <span class=\"content grow-0\">{{value()}}</span>\n }\n </span>\n </a>\n}\n<ng-content></ng-content>\n", styles: [".link{text-decoration:none;color:inherit}.link .content{max-width:160px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}\n"], dependencies: [{ kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i1$4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2131
1592
|
}
|
|
2132
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1593
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LinkCellComponent, decorators: [{
|
|
2133
1594
|
type: Component,
|
|
2134
|
-
args: [{ selector: 'td[rxap-link-cell]', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
2135
|
-
}], propDecorators: { value: [{
|
|
2136
|
-
type: Input,
|
|
2137
|
-
args: ['rxap-link-cell']
|
|
2138
|
-
}], protocol: [{
|
|
2139
|
-
type: Input
|
|
2140
|
-
}], short: [{
|
|
2141
|
-
type: Input
|
|
2142
|
-
}] } });
|
|
2143
|
-
|
|
1595
|
+
args: [{ selector: 'td[rxap-link-cell]', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatTooltipModule, MatIconModule], template: "@if (value()) {\n <a [href]=\"href\" [matTooltip]=\"value()\" class=\"link\" target=\"_blank\">\n <span class=\"flex flex-row items-center gap-2\">\n @if (short()) {\n <span class=\"content grow-0\" i18n>Open</span>\n }\n @switch (protocol()) {\n @case ('tel') {\n <mat-icon class=\"grow-0\">call</mat-icon>\n }\n @case ('mailto') {\n <mat-icon class=\"grow-0\">email</mat-icon>\n }\n @default {\n <mat-icon class=\"grow-0\">launch</mat-icon>\n }\n }\n @if (!short()) {\n <span class=\"content grow-0\">{{value()}}</span>\n }\n </span>\n </a>\n}\n<ng-content></ng-content>\n", styles: [".link{text-decoration:none;color:inherit}.link .content{max-width:160px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}\n"] }]
|
|
1596
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxap-link-cell", required: false }] }], protocol: [{ type: i0.Input, args: [{ isSignal: true, alias: "protocol", required: false }] }], short: [{ type: i0.Input, args: [{ isSignal: true, alias: "short", required: false }] }] } });
|
|
2144
1597
|
class ImageCellComponent {
|
|
2145
1598
|
constructor() {
|
|
2146
|
-
this.
|
|
2147
|
-
this.
|
|
2148
|
-
this.
|
|
2149
|
-
this.
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
static { this.ɵ
|
|
1599
|
+
this.preset = input(...(ngDevMode ? [undefined, { debugName: "preset" }] : /* istanbul ignore next */ []));
|
|
1600
|
+
this.size = input(BackgroundSizeOptions.COVER, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
1601
|
+
this.repeat = input(BackgroundRepeatOptions.NO_REPEAT, ...(ngDevMode ? [{ debugName: "repeat" }] : /* istanbul ignore next */ []));
|
|
1602
|
+
this.position = input(BackgroundPositionOptions.CENTER_CENTER, ...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
|
|
1603
|
+
this.value = input(null, { ...(ngDevMode ? { debugName: "value" } : /* istanbul ignore next */ {}), alias: "rxap-image-cell" });
|
|
1604
|
+
}
|
|
1605
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ImageCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1606
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: ImageCellComponent, isStandalone: true, selector: "td[rxap-image-cell]", inputs: { preset: { classPropertyName: "preset", publicName: "preset", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, repeat: { classPropertyName: "repeat", publicName: "repeat", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "rxap-image-cell", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (value()) {\n <div\n [ngClass]=\"[preset()]\"\n [position]=\"position()\"\n [repeat]=\"repeat()\"\n [rxapBackgroundImage]=\"value()\"\n [size]=\"size()\"\n class=\"image\">\n </div>\n}\n<ng-content></ng-content>\n", styles: [".image{width:40px;height:40px}.image.circle{border-radius:24px}.image.rounded{border-radius:8px}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: BackgroundImageDirective, selector: "[rxapBackgroundImage]", inputs: ["rxapBackgroundImage", "placeholderImageUrl", "size", "repeat", "position"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2153
1607
|
}
|
|
2154
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1608
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ImageCellComponent, decorators: [{
|
|
2155
1609
|
type: Component,
|
|
2156
|
-
args: [{ selector: 'td[rxap-image-cell]', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
2157
|
-
}], propDecorators: { preset: [{
|
|
2158
|
-
type: Input
|
|
2159
|
-
}], size: [{
|
|
2160
|
-
type: Input
|
|
2161
|
-
}], repeat: [{
|
|
2162
|
-
type: Input
|
|
2163
|
-
}], position: [{
|
|
2164
|
-
type: Input
|
|
2165
|
-
}], value: [{
|
|
2166
|
-
type: Input,
|
|
2167
|
-
args: ['rxap-image-cell']
|
|
2168
|
-
}] } });
|
|
2169
|
-
|
|
1610
|
+
args: [{ selector: 'td[rxap-image-cell]', changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgClass, BackgroundImageDirective], template: "@if (value()) {\n <div\n [ngClass]=\"[preset()]\"\n [position]=\"position()\"\n [repeat]=\"repeat()\"\n [rxapBackgroundImage]=\"value()\"\n [size]=\"size()\"\n class=\"image\">\n </div>\n}\n<ng-content></ng-content>\n", styles: [".image{width:40px;height:40px}.image.circle{border-radius:24px}.image.rounded{border-radius:8px}\n"] }]
|
|
1611
|
+
}], propDecorators: { preset: [{ type: i0.Input, args: [{ isSignal: true, alias: "preset", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], repeat: [{ type: i0.Input, args: [{ isSignal: true, alias: "repeat", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxap-image-cell", required: false }] }] } });
|
|
2170
1612
|
class IconCellComponent {
|
|
2171
|
-
|
|
2172
|
-
|
|
1613
|
+
constructor() {
|
|
1614
|
+
this.icon = input.required({ ...(ngDevMode ? { debugName: "icon" } : /* istanbul ignore next */ {}), alias: "rxap-icon-cell" });
|
|
1615
|
+
}
|
|
1616
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: IconCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1617
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: IconCellComponent, isStandalone: true, selector: "td[rxap-icon-cell]", inputs: { icon: { classPropertyName: "icon", publicName: "rxap-icon-cell", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@if (icon()) {\n <mat-icon [rxapIcon]=\"icon()\"></mat-icon>\n}\n<ng-content></ng-content>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: IconDirective, selector: "mat-icon[rxapIcon]", inputs: ["rxapIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2173
1618
|
}
|
|
2174
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1619
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: IconCellComponent, decorators: [{
|
|
2175
1620
|
type: Component,
|
|
2176
|
-
args: [{ selector: 'td[rxap-icon-cell]', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
2177
|
-
}], propDecorators: { icon: [{
|
|
2178
|
-
type: Input,
|
|
2179
|
-
args: ['rxap-icon-cell']
|
|
2180
|
-
}] } });
|
|
2181
|
-
|
|
1621
|
+
args: [{ selector: 'td[rxap-icon-cell]', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatIconModule, IconDirective], template: "@if (icon()) {\n <mat-icon [rxapIcon]=\"icon()\"></mat-icon>\n}\n<ng-content></ng-content>\n" }]
|
|
1622
|
+
}], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxap-icon-cell", required: true }] }] } });
|
|
2182
1623
|
class DateCellComponent {
|
|
2183
1624
|
constructor() {
|
|
2184
|
-
this.date = null;
|
|
2185
|
-
this.format = 'dd.MM.yyyy HH:mm';
|
|
1625
|
+
this.date = input(null, { ...(ngDevMode ? { debugName: "date" } : /* istanbul ignore next */ {}), alias: "rxap-date-cell" });
|
|
1626
|
+
this.format = input('dd.MM.yyyy HH:mm', ...(ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []));
|
|
2186
1627
|
}
|
|
2187
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2188
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1628
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DateCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1629
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: DateCellComponent, isStandalone: true, selector: "td[rxap-date-cell]", inputs: { date: { classPropertyName: "date", publicName: "rxap-date-cell", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (date()) {\n {{date() | date:format()}}\n}\n<ng-content></ng-content>\n", styles: [""], dependencies: [{ kind: "pipe", type: DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2189
1630
|
}
|
|
2190
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1631
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DateCellComponent, decorators: [{
|
|
2191
1632
|
type: Component,
|
|
2192
|
-
args: [{ selector: 'td[rxap-date-cell]', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
2193
|
-
}], propDecorators: { date: [{
|
|
2194
|
-
type: Input,
|
|
2195
|
-
args: ['rxap-date-cell']
|
|
2196
|
-
}], format: [{
|
|
2197
|
-
type: Input
|
|
2198
|
-
}] } });
|
|
2199
|
-
|
|
1633
|
+
args: [{ selector: 'td[rxap-date-cell]', changeDetection: ChangeDetectionStrategy.OnPush, imports: [DatePipe], template: "@if (date()) {\n {{date() | date:format()}}\n}\n<ng-content></ng-content>\n" }]
|
|
1634
|
+
}], propDecorators: { date: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxap-date-cell", required: false }] }], format: [{ type: i0.Input, args: [{ isSignal: true, alias: "format", required: false }] }] } });
|
|
2200
1635
|
class CopyToClipboardCellComponent {
|
|
2201
|
-
|
|
2202
|
-
|
|
1636
|
+
constructor() {
|
|
1637
|
+
this.value = input(undefined, { ...(ngDevMode ? { debugName: "value" } : /* istanbul ignore next */ {}), alias: "rxap-copy-to-clipboard-cell" });
|
|
1638
|
+
}
|
|
1639
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CopyToClipboardCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1640
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: CopyToClipboardCellComponent, isStandalone: true, selector: "td[rxap-copy-to-clipboard-cell]", inputs: { value: { classPropertyName: "value", publicName: "rxap-copy-to-clipboard-cell", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (value() !== null && value() !== undefined && value() !== '') {\n <rxap-copy-to-clipboard [value]=\"value()\"\n class=\"copy-to-clipboard\"></rxap-copy-to-clipboard>\n}\n<ng-content></ng-content>\n", styles: ["::ng-deep .copy-to-clipboard .content{max-width:160px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}\n"], dependencies: [{ kind: "component", type: CopyToClipboardComponent, selector: "rxap-copy-to-clipboard", inputs: ["active", "disabled", "value", "containerClass", "position"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2203
1641
|
}
|
|
2204
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1642
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CopyToClipboardCellComponent, decorators: [{
|
|
2205
1643
|
type: Component,
|
|
2206
|
-
args: [{ selector: 'td[rxap-copy-to-clipboard-cell]', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
2207
|
-
}], propDecorators: { value: [{
|
|
2208
|
-
|
|
2209
|
-
args: ['rxap-copy-to-clipboard-cell']
|
|
2210
|
-
}] } });
|
|
2211
|
-
|
|
2212
|
-
class BooleanCellComponent {
|
|
1644
|
+
args: [{ selector: 'td[rxap-copy-to-clipboard-cell]', changeDetection: ChangeDetectionStrategy.OnPush, imports: [CopyToClipboardComponent], template: "@if (value() !== null && value() !== undefined && value() !== '') {\n <rxap-copy-to-clipboard [value]=\"value()\"\n class=\"copy-to-clipboard\"></rxap-copy-to-clipboard>\n}\n<ng-content></ng-content>\n", styles: ["::ng-deep .copy-to-clipboard .content{max-width:160px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}\n"] }]
|
|
1645
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxap-copy-to-clipboard-cell", required: false }] }] } });
|
|
1646
|
+
let BooleanCellComponent = class BooleanCellComponent {
|
|
2213
1647
|
constructor() {
|
|
2214
|
-
this.value = null;
|
|
1648
|
+
this.value = input(null, { ...(ngDevMode ? { debugName: "value" } : /* istanbul ignore next */ {}), alias: "rxap-boolean-cell" });
|
|
2215
1649
|
}
|
|
2216
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2217
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2218
|
-
}
|
|
2219
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1650
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: BooleanCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1651
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: BooleanCellComponent, isStandalone: true, selector: "td[rxap-boolean-cell]", inputs: { value: { classPropertyName: "value", publicName: "rxap-boolean-cell", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "rxap-boolean-cell" }, ngImport: i0, template: "@if (value()) {\n <mat-icon class=\"truthy\">check_circle</mat-icon>\n} @else {\n <mat-icon class=\"falsy\">cancel</mat-icon>\n}\n<ng-content></ng-content>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1652
|
+
};
|
|
1653
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: BooleanCellComponent, decorators: [{
|
|
2220
1654
|
type: Component,
|
|
2221
|
-
args: [{ selector: 'td[rxap-boolean-cell]', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-boolean-cell' }, imports: [
|
|
2222
|
-
}], propDecorators: { value: [{
|
|
2223
|
-
type: Input,
|
|
2224
|
-
args: ['rxap-boolean-cell']
|
|
2225
|
-
}] } });
|
|
2226
|
-
|
|
1655
|
+
args: [{ selector: 'td[rxap-boolean-cell]', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-boolean-cell' }, imports: [MatIconModule], template: "@if (value()) {\n <mat-icon class=\"truthy\">check_circle</mat-icon>\n} @else {\n <mat-icon class=\"falsy\">cancel</mat-icon>\n}\n<ng-content></ng-content>\n" }]
|
|
1656
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "rxap-boolean-cell", required: false }] }] } });
|
|
2227
1657
|
class PersistentPaginatorDirective {
|
|
2228
|
-
constructor(
|
|
2229
|
-
this.matPaginator =
|
|
1658
|
+
constructor() {
|
|
1659
|
+
this.matPaginator = inject(MatPaginator);
|
|
1660
|
+
this.id = input(...(ngDevMode ? [undefined, { debugName: "id" }] : /* istanbul ignore next */ []));
|
|
1661
|
+
this.destroyRef = inject(DestroyRef);
|
|
2230
1662
|
}
|
|
2231
1663
|
ngOnInit() {
|
|
2232
1664
|
const config = this.restoreConfig();
|
|
2233
1665
|
if (config) {
|
|
2234
1666
|
this.matPaginator.pageSize = config.pageSize;
|
|
2235
1667
|
}
|
|
2236
|
-
this.
|
|
2237
|
-
}
|
|
2238
|
-
ngOnDestroy() {
|
|
2239
|
-
this._subscription?.unsubscribe();
|
|
1668
|
+
this.matPaginator.page.pipe(tap(() => this.storeConfig()), takeUntilDestroyed(this.destroyRef)).subscribe();
|
|
2240
1669
|
}
|
|
2241
1670
|
getKey() {
|
|
2242
|
-
return 'rxap_mat-paginator-persistent' + this.id;
|
|
1671
|
+
return 'rxap_mat-paginator-persistent' + this.id();
|
|
2243
1672
|
}
|
|
2244
1673
|
storeConfig() {
|
|
2245
1674
|
const pageSize = this.matPaginator.pageSize;
|
|
@@ -2257,19 +1686,16 @@ class PersistentPaginatorDirective {
|
|
|
2257
1686
|
}
|
|
2258
1687
|
return null;
|
|
2259
1688
|
}
|
|
2260
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2261
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
1689
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: PersistentPaginatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1690
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: PersistentPaginatorDirective, isStandalone: true, selector: "mat-paginator[rxapPersistent]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
2262
1691
|
}
|
|
2263
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1692
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: PersistentPaginatorDirective, decorators: [{
|
|
2264
1693
|
type: Directive,
|
|
2265
1694
|
args: [{
|
|
2266
1695
|
selector: 'mat-paginator[rxapPersistent]',
|
|
2267
1696
|
standalone: true,
|
|
2268
1697
|
}]
|
|
2269
|
-
}],
|
|
2270
|
-
type: Input
|
|
2271
|
-
}] } });
|
|
2272
|
-
|
|
1698
|
+
}], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }] } });
|
|
2273
1699
|
const offset = '50';
|
|
2274
1700
|
const RowAnimation = trigger('rowsAnimation', [
|
|
2275
1701
|
transition('void => *', [
|
|
@@ -2301,20 +1727,15 @@ const RowAnimation = trigger('rowsAnimation', [
|
|
|
2301
1727
|
}),
|
|
2302
1728
|
]),
|
|
2303
1729
|
]);
|
|
2304
|
-
|
|
2305
1730
|
function NormalizeTableRow(row, rowIdOrMapper) {
|
|
2306
1731
|
row.__rowId = typeof rowIdOrMapper === 'string' ? rowIdOrMapper : rowIdOrMapper(row);
|
|
2307
1732
|
row.__metadata__ ??= { loading$: new ToggleSubject() };
|
|
2308
1733
|
row.__metadata__.loading$ ??= new ToggleSubject();
|
|
2309
1734
|
return row;
|
|
2310
1735
|
}
|
|
2311
|
-
|
|
2312
1736
|
// region table-select-controls
|
|
2313
1737
|
// endregion
|
|
2314
|
-
|
|
2315
1738
|
/**
|
|
2316
1739
|
* Generated bundle index. Do not edit.
|
|
2317
1740
|
*/
|
|
2318
|
-
|
|
2319
|
-
export { AbstractTableRowAction, BooleanCellComponent, CheckboxCellComponent, CheckboxHeaderCellComponent, CopyToClipboardCellComponent, DateCellComponent, ExpandControlsCellComponent, ExpandRowContainerComponent, ExpandRowContentDirective, ExpandRowDirective, ExpandRowModule, ExpandRowService, FilterHeaderRowDirective, GetTableHeaderButtonMetadata, GetTableRowActionCheckFunction, GetTableRowActionMetadata, HasTableRowActionCheckFunction, HasTableRowActionMetadata, IconCellComponent, ImageCellComponent, IsTableRowActionTypeMethod, IsTableRowActionTypeSwitchMethod, LinkCellComponent, NormalizeTableRow, OptionsCellComponent, PersistentPaginatorDirective, RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS, RXAP_TABLE_ACTION_METHOD_CHECK_FUNCTION_METADATA, RXAP_TABLE_ACTION_METHOD_METADATA, RXAP_TABLE_ACTION_METHOD_TYPE_METADATA, RXAP_TABLE_FILTER, RXAP_TABLE_FILTER_FORM_DEFINITION, RXAP_TABLE_HEADER_BUTTON_METHOD_METADATA, RXAP_TABLE_ROW_ACTION_METHOD, RowActionCheckPipe, RowAnimation, SelectRowModule, SelectRowService, SelectedRowsDirective, SelectionModel, TABLE_CREATE_REMOTE_METHOD, TABLE_DATA_SOURCE, TABLE_HEADER_BUTTON_METHOD, TABLE_REMOTE_METHOD, TABLE_REMOTE_METHOD_ADAPTER_FACTORY, TableActionMethod, TableColumnFilterInputDirective, TableColumnFilterService, TableColumnMenuComponent, TableColumnMenuModule, TableColumnOptionComponent, TableCreateButtonDirective, TableDataSourceDirective, TableFilterModule, TableFilterService, TableHeaderButtonActionStatus, TableHeaderButtonDirective, TableHeaderButtonMethod, TableRowActionDirective, TableRowActionExecutingDirective, TableRowActionStatus, TableRowActionsModule, TableRowHeaderActionDirective, TableSelectControlsComponent, TableShowArchivedSlideComponent, ToFilterColumnNamesPipe, TreeControlCellComponent, getMultipleValuesInSingleSelectionError };
|
|
2320
|
-
//# sourceMappingURL=rxap-material-table-system.mjs.map
|
|
1741
|
+
export { AbstractTableRowAction, BooleanCellComponent, CheckboxCellComponent, CheckboxHeaderCellComponent, CopyToClipboardCellComponent, DateCellComponent, ExpandControlsCellComponent, ExpandRowContainerComponent, ExpandRowContentDirective, ExpandRowDirective, ExpandRowService, FilterHeaderRowDirective, GetTableHeaderButtonMetadata, GetTableRowActionCheckFunction, GetTableRowActionMetadata, HasTableRowActionCheckFunction, HasTableRowActionMetadata, IconCellComponent, ImageCellComponent, IsTableRowActionTypeMethod, IsTableRowActionTypeSwitchMethod, LinkCellComponent, NormalizeTableRow, OptionsCellComponent, PersistentPaginatorDirective, RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS, RXAP_TABLE_ACTION_METHOD_CHECK_FUNCTION_METADATA, RXAP_TABLE_ACTION_METHOD_METADATA, RXAP_TABLE_ACTION_METHOD_TYPE_METADATA, RXAP_TABLE_FILTER, RXAP_TABLE_FILTER_FORM_DEFINITION, RXAP_TABLE_HEADER_BUTTON_METHOD_METADATA, RXAP_TABLE_ROW_ACTION_METHOD, RowActionCheckPipe, RowAnimation, SelectRowService, SelectedRowsDirective, SelectionModel, TABLE_CREATE_REMOTE_METHOD, TABLE_DATA_SOURCE, TABLE_HEADER_BUTTON_METHOD, TABLE_REMOTE_METHOD, TABLE_REMOTE_METHOD_ADAPTER_FACTORY, TableActionMethod, TableColumnFilterInputDirective, TableColumnFilterService, TableColumnMenuComponent, TableColumnOptionComponent, TableCreateButtonDirective, TableDataSourceDirective, TableFilterService, TableHeaderButtonActionStatus, TableHeaderButtonDirective, TableHeaderButtonMethod, TableRowActionDirective, TableRowActionExecutingDirective, TableRowActionStatus, TableRowHeaderActionDirective, TableSelectControlsComponent, TableShowArchivedSlideComponent, ToFilterColumnNamesPipe, TreeControlCellComponent, getMultipleValuesInSingleSelectionError };
|