@rxap/material-table-system 21.0.1-dev.0 → 21.0.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 +63 -0
- package/compodoc/changelog.html +61 -0
- package/compodoc/components/BooleanCellComponent.html +55 -38
- package/compodoc/components/CheckboxCellComponent.html +79 -88
- package/compodoc/components/CheckboxHeaderCellComponent.html +61 -141
- package/compodoc/components/CopyToClipboardCellComponent.html +44 -33
- package/compodoc/components/DateCellComponent.html +69 -61
- package/compodoc/components/ExpandControlsCellComponent.html +36 -90
- package/compodoc/components/ExpandRowContainerComponent.html +95 -173
- package/compodoc/components/IconCellComponent.html +44 -33
- package/compodoc/components/ImageCellComponent.html +164 -119
- package/compodoc/components/LinkCellComponent.html +121 -64
- package/compodoc/components/OptionsCellComponent.html +119 -250
- package/compodoc/components/TableColumnMenuComponent.html +128 -433
- 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 +54 -62
- package/compodoc/dependencies.html +10 -10
- 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.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 +9700 -11542
- 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 +44 -29
- 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 +245 -181
- 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 -106
- 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 +244 -180
- 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 -105
- 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 +561 -1137
- package/fesm2022/rxap-material-table-system.mjs.map +1 -1
- package/package.json +28 -28
- package/types/rxap-material-table-system.d.ts +389 -439
- 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
|
@@ -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: "21.2.9", ngImport: i0, type: SelectRowService, deps: [
|
|
279
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SelectRowService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
289
280
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SelectRowService }); }
|
|
290
281
|
}
|
|
291
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: "21.2.9", ngImport: i0, type: TableSelectControlsComponent, deps: [
|
|
313
|
-
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
|
|
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
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);
|
|
@@ -371,7 +351,6 @@ class TableFilterService {
|
|
|
371
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,21 +471,21 @@ 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: "21.2.9", ngImport: i0, type: TableDataSourceDirective, deps: [
|
|
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
490
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableDataSourceDirective, decorators: [{
|
|
501
491
|
type: Directive,
|
|
@@ -504,65 +494,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
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: "21.2.9", ngImport: i0, type: TableRowActionExecutingDirective, deps: [
|
|
509
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableRowActionExecutingDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
566
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
512
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableRowActionExecutingDirective, decorators: [{
|
|
@@ -571,8 +515,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
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: "21.2.9", ngImport: i0, type: AbstractTableRowAction, deps: [
|
|
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
770
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AbstractTableRowAction, decorators: [{
|
|
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
|
-
|
|
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,7 +794,7 @@ class RowActionCheckPipe {
|
|
|
903
794
|
}
|
|
904
795
|
return true;
|
|
905
796
|
}
|
|
906
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RowActionCheckPipe, deps: [
|
|
797
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RowActionCheckPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
907
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
800
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RowActionCheckPipe, decorators: [{
|
|
@@ -912,178 +803,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
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: "21.2.9", ngImport: i0, type: TableRowActionDirective, deps:
|
|
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
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: "21.2.9", ngImport: i0, type: TableRowHeaderActionDirective, deps: [
|
|
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
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: "21.2.9", ngImport: i0, type: TableRowActionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1041
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", 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: "21.2.9", 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: "21.2.9", 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,36 +961,37 @@ 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: "21.2.9", ngImport: i0, type: TableHeaderButtonDirective, deps: [
|
|
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
996
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableHeaderButtonDirective, decorators: [{
|
|
1229
997
|
type: Directive,
|
|
@@ -1231,68 +999,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
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,14 +1040,16 @@ 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: "21.2.9", ngImport: i0, type: FilterHeaderRowDirective, deps: [
|
|
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
1054
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: FilterHeaderRowDirective, decorators: [{
|
|
1317
1055
|
type: Directive,
|
|
@@ -1327,16 +1065,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
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);
|
|
@@ -1351,38 +1080,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
1351
1080
|
standalone: true,
|
|
1352
1081
|
}]
|
|
1353
1082
|
}] });
|
|
1354
|
-
|
|
1355
|
-
class TableFilterModule {
|
|
1356
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableFilterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1357
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: TableFilterModule, imports: [ToFilterColumnNamesPipe,
|
|
1358
|
-
FilterHeaderRowDirective], exports: [ToFilterColumnNamesPipe,
|
|
1359
|
-
FilterHeaderRowDirective] }); }
|
|
1360
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableFilterModule }); }
|
|
1361
|
-
}
|
|
1362
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", 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: "21.2.9", ngImport: i0, type: TableCreateButtonDirective, deps: [
|
|
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
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,151 +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: "21.2.9", ngImport: i0, type: TableColumnOptionComponent, deps: [
|
|
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
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
1205
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableColumnMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1546
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: TableColumnMenuComponent, isStandalone: true, selector: "rxap-table-column-menu", inputs: { inline: "inline", matCard: "matCard" }, host: { properties: { "class.inline": "
|
|
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
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
1217
|
StopPropagationDirective,
|
|
1555
1218
|
MatCheckboxModule,
|
|
1556
1219
|
NgClass
|
|
1557
|
-
], 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
|
|
1558
|
-
}], propDecorators: { columns: [{
|
|
1559
|
-
type: ContentChildren,
|
|
1560
|
-
args: [TableColumnOptionComponent]
|
|
1561
|
-
}], _inline: [{
|
|
1562
|
-
type: HostBinding,
|
|
1563
|
-
args: ['class.inline']
|
|
1564
|
-
}], inline: [{
|
|
1565
|
-
type: Input
|
|
1566
|
-
}], matCard: [{
|
|
1567
|
-
type: Input
|
|
1568
|
-
}], _matCardMode: [{
|
|
1569
|
-
type: HostBinding,
|
|
1570
|
-
args: ['class.mat-card-mode']
|
|
1571
|
-
}] } });
|
|
1572
|
-
|
|
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 }] }] } });
|
|
1573
1222
|
class TableShowArchivedSlideComponent {
|
|
1574
|
-
constructor(tableFilter, tableColumnMenu, selectRows) {
|
|
1575
|
-
this.tableFilter = tableFilter;
|
|
1576
|
-
this.tableColumnMenu = tableColumnMenu;
|
|
1577
|
-
this.selectRows = selectRows;
|
|
1578
|
-
}
|
|
1579
1223
|
onChange($event) {
|
|
1580
|
-
this.paginator?.firstPage();
|
|
1224
|
+
this.paginator()?.firstPage();
|
|
1581
1225
|
this.tableFilter?.set('__archived', $event.checked);
|
|
1582
1226
|
this.selectRows?.clear();
|
|
1583
1227
|
if ($event.checked) {
|
|
@@ -1595,60 +1239,50 @@ class TableShowArchivedSlideComponent {
|
|
|
1595
1239
|
this.tableColumnMenu.deactivate('__removed-at');
|
|
1596
1240
|
}
|
|
1597
1241
|
}
|
|
1598
|
-
|
|
1599
|
-
this.
|
|
1600
|
-
this.tableColumnMenu
|
|
1601
|
-
this.
|
|
1602
|
-
this.
|
|
1603
|
-
|
|
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
|
+
});
|
|
1604
1254
|
}
|
|
1605
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableShowArchivedSlideComponent, deps: [
|
|
1606
|
-
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 }); }
|
|
1607
1257
|
}
|
|
1608
1258
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableShowArchivedSlideComponent, decorators: [{
|
|
1609
1259
|
type: Component,
|
|
1610
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" }]
|
|
1611
|
-
}], ctorParameters: () => [{ type:
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
static { this.ɵ
|
|
1628
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: TableColumnMenuModule, imports: [TableColumnMenuComponent,
|
|
1629
|
-
TableShowArchivedSlideComponent,
|
|
1630
|
-
TableColumnOptionComponent], exports: [TableColumnMenuComponent,
|
|
1631
|
-
TableShowArchivedSlideComponent,
|
|
1632
|
-
TableColumnOptionComponent] }); }
|
|
1633
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableColumnMenuModule, imports: [TableColumnMenuComponent,
|
|
1634
|
-
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 }); }
|
|
1635
1278
|
}
|
|
1636
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type:
|
|
1637
|
-
type:
|
|
1279
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableColumnFilterInputDirective, decorators: [{
|
|
1280
|
+
type: Directive,
|
|
1638
1281
|
args: [{
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
TableShowArchivedSlideComponent,
|
|
1642
|
-
TableColumnOptionComponent,
|
|
1643
|
-
],
|
|
1644
|
-
exports: [
|
|
1645
|
-
TableColumnMenuComponent,
|
|
1646
|
-
TableShowArchivedSlideComponent,
|
|
1647
|
-
TableColumnOptionComponent,
|
|
1648
|
-
],
|
|
1282
|
+
selector: 'input[ngModel][rxapTableColumnFilterInput]',
|
|
1283
|
+
standalone: true,
|
|
1649
1284
|
}]
|
|
1650
|
-
}] });
|
|
1651
|
-
|
|
1285
|
+
}], ctorParameters: () => [], propDecorators: { column: [{ type: i0.Input, args: [{ isSignal: true, alias: "column", required: true }] }] } });
|
|
1652
1286
|
// TODO : move to rxap packages
|
|
1653
1287
|
class TableColumnFilterService {
|
|
1654
1288
|
constructor() {
|
|
@@ -1673,60 +1307,15 @@ class TableColumnFilterService {
|
|
|
1673
1307
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableColumnFilterService, decorators: [{
|
|
1674
1308
|
type: Injectable
|
|
1675
1309
|
}] });
|
|
1676
|
-
|
|
1677
|
-
// TODO : move to rxap packages
|
|
1678
|
-
class TableColumnFilterInputDirective {
|
|
1679
|
-
constructor(ngModel, tableColumnFilterService) {
|
|
1680
|
-
this.ngModel = ngModel;
|
|
1681
|
-
this.tableColumnFilterService = tableColumnFilterService;
|
|
1682
|
-
}
|
|
1683
|
-
ngOnDestroy() {
|
|
1684
|
-
this._subscription?.unsubscribe();
|
|
1685
|
-
}
|
|
1686
|
-
ngAfterViewInit() {
|
|
1687
|
-
if (!this.ngModel.valueChanges) {
|
|
1688
|
-
throw new Error('Could not access the ngModel value change');
|
|
1689
|
-
}
|
|
1690
|
-
this._subscription = this.ngModel.valueChanges.pipe(debounceTime(500), tap((value) => {
|
|
1691
|
-
this.tableColumnFilterService.setFilter(this.column, value);
|
|
1692
|
-
}))
|
|
1693
|
-
.subscribe();
|
|
1694
|
-
}
|
|
1695
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableColumnFilterInputDirective, deps: [{ token: NgModel }, { token: RXAP_TABLE_FILTER }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1696
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: TableColumnFilterInputDirective, isStandalone: true, selector: "input[ngModel][rxapTableColumnFilterInput]", inputs: { column: "column" }, ngImport: i0 }); }
|
|
1697
|
-
}
|
|
1698
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TableColumnFilterInputDirective, decorators: [{
|
|
1699
|
-
type: Directive,
|
|
1700
|
-
args: [{
|
|
1701
|
-
selector: 'input[ngModel][rxapTableColumnFilterInput]',
|
|
1702
|
-
standalone: true,
|
|
1703
|
-
}]
|
|
1704
|
-
}], ctorParameters: () => [{ type: i1$4.NgModel, decorators: [{
|
|
1705
|
-
type: Inject,
|
|
1706
|
-
args: [NgModel]
|
|
1707
|
-
}] }, { type: TableColumnFilterService, decorators: [{
|
|
1708
|
-
type: Inject,
|
|
1709
|
-
args: [RXAP_TABLE_FILTER]
|
|
1710
|
-
}] }], propDecorators: { column: [{
|
|
1711
|
-
type: Input,
|
|
1712
|
-
args: [{ required: true }]
|
|
1713
|
-
}] } });
|
|
1714
|
-
|
|
1715
1310
|
class CheckboxHeaderCellComponent {
|
|
1716
|
-
constructor(
|
|
1717
|
-
this.cdkTable =
|
|
1718
|
-
this.selectRow =
|
|
1719
|
-
this.indeterminate
|
|
1720
|
-
|
|
1721
|
-
this.
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
}
|
|
1725
|
-
ngOnInit() {
|
|
1726
|
-
this.indeterminate$ = this.selectRow.selectedRows$.pipe(map((selectedRows) => !!selectedRows.length &&
|
|
1727
|
-
this.cdkTable['_data']?.length !== selectedRows.length));
|
|
1728
|
-
this.checked$ = this.selectRow.selectedRows$.pipe(map((selectedRows) => !!selectedRows.length &&
|
|
1729
|
-
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();
|
|
1730
1319
|
}
|
|
1731
1320
|
onChange($event) {
|
|
1732
1321
|
if ($event.checked) {
|
|
@@ -1736,58 +1325,49 @@ class CheckboxHeaderCellComponent {
|
|
|
1736
1325
|
this.selectRow.selectionModel.clear();
|
|
1737
1326
|
}
|
|
1738
1327
|
}
|
|
1739
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CheckboxHeaderCellComponent, deps: [
|
|
1740
|
-
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]=\"(
|
|
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 }); }
|
|
1741
1330
|
}
|
|
1742
1331
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CheckboxHeaderCellComponent, decorators: [{
|
|
1743
1332
|
type: Component,
|
|
1744
1333
|
args: [{ selector: 'th[rxap-checkbox-header-cell]', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
1745
1334
|
MatCheckboxModule,
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
}], ctorParameters: () => [{ type: i1.CdkTable, decorators: [{
|
|
1749
|
-
type: Inject,
|
|
1750
|
-
args: [CdkTable]
|
|
1751
|
-
}] }, { type: SelectRowService }] });
|
|
1752
|
-
|
|
1335
|
+
], template: "@if (isMultipleSelection) {\n <mat-checkbox\n (change)=\"onChange($event)\"\n [checked]=\"checked()\"\n [indeterminate]=\"indeterminate()\">\n </mat-checkbox>\n}\n" }]
|
|
1336
|
+
}] });
|
|
1753
1337
|
class CheckboxCellComponent {
|
|
1754
|
-
constructor(
|
|
1755
|
-
this.selectRow =
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
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 }); }
|
|
1759
1349
|
}
|
|
1760
1350
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CheckboxCellComponent, decorators: [{
|
|
1761
1351
|
type: Component,
|
|
1762
|
-
args: [{ selector: 'td[rxap-checkbox-cell]', changeDetection: ChangeDetectionStrategy.
|
|
1763
|
-
}],
|
|
1764
|
-
type: Inject,
|
|
1765
|
-
args: [SelectRowService]
|
|
1766
|
-
}] }], propDecorators: { element: [{
|
|
1767
|
-
type: Input,
|
|
1768
|
-
args: [{ required: true }]
|
|
1769
|
-
}] } });
|
|
1770
|
-
|
|
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 }] }] } });
|
|
1771
1354
|
class SelectedRowsDirective {
|
|
1772
|
-
constructor(
|
|
1773
|
-
this.template =
|
|
1774
|
-
this.viewContainerRef =
|
|
1775
|
-
this.
|
|
1776
|
-
this.
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
}
|
|
1787
|
-
this.cdr.detectChanges();
|
|
1788
|
-
})).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
|
+
});
|
|
1789
1369
|
}
|
|
1790
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SelectedRowsDirective, deps: [
|
|
1370
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SelectedRowsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1791
1371
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: SelectedRowsDirective, isStandalone: true, selector: "[rxapSelectedRows]", ngImport: i0 }); }
|
|
1792
1372
|
}
|
|
1793
1373
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SelectedRowsDirective, decorators: [{
|
|
@@ -1796,54 +1376,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
1796
1376
|
selector: '[rxapSelectedRows]',
|
|
1797
1377
|
standalone: true,
|
|
1798
1378
|
}]
|
|
1799
|
-
}], ctorParameters: () => [
|
|
1800
|
-
type: Inject,
|
|
1801
|
-
args: [TemplateRef]
|
|
1802
|
-
}] }, { type: i0.ViewContainerRef, decorators: [{
|
|
1803
|
-
type: Inject,
|
|
1804
|
-
args: [ViewContainerRef]
|
|
1805
|
-
}] }, { type: i0.ChangeDetectorRef, decorators: [{
|
|
1806
|
-
type: Inject,
|
|
1807
|
-
args: [ChangeDetectorRef]
|
|
1808
|
-
}] }, { type: SelectRowService, decorators: [{
|
|
1809
|
-
type: Inject,
|
|
1810
|
-
args: [SelectRowService]
|
|
1811
|
-
}] }] });
|
|
1812
|
-
|
|
1813
|
-
class SelectRowModule {
|
|
1814
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SelectRowModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1815
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: SelectRowModule, imports: [SelectedRowsDirective,
|
|
1816
|
-
CheckboxCellComponent,
|
|
1817
|
-
CheckboxHeaderCellComponent], exports: [CheckboxCellComponent,
|
|
1818
|
-
CheckboxHeaderCellComponent,
|
|
1819
|
-
SelectedRowsDirective] }); }
|
|
1820
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SelectRowModule, imports: [CheckboxCellComponent,
|
|
1821
|
-
CheckboxHeaderCellComponent] }); }
|
|
1822
|
-
}
|
|
1823
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SelectRowModule, decorators: [{
|
|
1824
|
-
type: NgModule,
|
|
1825
|
-
args: [{
|
|
1826
|
-
exports: [
|
|
1827
|
-
CheckboxCellComponent,
|
|
1828
|
-
CheckboxHeaderCellComponent,
|
|
1829
|
-
SelectedRowsDirective,
|
|
1830
|
-
],
|
|
1831
|
-
imports: [
|
|
1832
|
-
SelectedRowsDirective,
|
|
1833
|
-
CheckboxCellComponent,
|
|
1834
|
-
CheckboxHeaderCellComponent,
|
|
1835
|
-
],
|
|
1836
|
-
}]
|
|
1837
|
-
}] });
|
|
1838
|
-
|
|
1379
|
+
}], ctorParameters: () => [] });
|
|
1839
1380
|
class ExpandRowContentDirective {
|
|
1381
|
+
constructor() {
|
|
1382
|
+
this.template = inject(TemplateRef);
|
|
1383
|
+
}
|
|
1840
1384
|
static ngTemplateContextGuard(dir, ctx) {
|
|
1841
1385
|
return true;
|
|
1842
1386
|
}
|
|
1843
|
-
|
|
1844
|
-
this.template = template;
|
|
1845
|
-
}
|
|
1846
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ExpandRowContentDirective, deps: [{ token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1387
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ExpandRowContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1847
1388
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: ExpandRowContentDirective, isStandalone: true, selector: "[rxapExpandRowContent]", ngImport: i0 }); }
|
|
1848
1389
|
}
|
|
1849
1390
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ExpandRowContentDirective, decorators: [{
|
|
@@ -1852,14 +1393,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
1852
1393
|
selector: '[rxapExpandRowContent]',
|
|
1853
1394
|
standalone: true,
|
|
1854
1395
|
}]
|
|
1855
|
-
}]
|
|
1856
|
-
type: Inject,
|
|
1857
|
-
args: [TemplateRef]
|
|
1858
|
-
}] }] });
|
|
1859
|
-
|
|
1396
|
+
}] });
|
|
1860
1397
|
class ExpandRowService {
|
|
1861
1398
|
constructor() {
|
|
1862
1399
|
this.expandedRow = new BehaviorSubject(null);
|
|
1400
|
+
this.expandedRowSignal = toSignal(this.expandedRow, { requireSync: true });
|
|
1863
1401
|
}
|
|
1864
1402
|
toggleRow(row) {
|
|
1865
1403
|
if (this.expandedRow.value === row) {
|
|
@@ -1870,7 +1408,7 @@ class ExpandRowService {
|
|
|
1870
1408
|
}
|
|
1871
1409
|
}
|
|
1872
1410
|
isExpanded(row) {
|
|
1873
|
-
return this.
|
|
1411
|
+
return this.expandedRowSignal() === row;
|
|
1874
1412
|
}
|
|
1875
1413
|
isExpanded$(row) {
|
|
1876
1414
|
return this.expandedRow.pipe(map((expandedRow) => expandedRow === row));
|
|
@@ -1881,37 +1419,42 @@ class ExpandRowService {
|
|
|
1881
1419
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ExpandRowService, decorators: [{
|
|
1882
1420
|
type: Injectable
|
|
1883
1421
|
}] });
|
|
1884
|
-
|
|
1885
1422
|
class ExpandRowContainerComponent {
|
|
1886
|
-
constructor(
|
|
1887
|
-
this.viewContainerRef =
|
|
1888
|
-
this.expandCell =
|
|
1889
|
-
this.
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
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;
|
|
1900
1438
|
}
|
|
1901
|
-
|
|
1902
|
-
|
|
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 });
|
|
1903
1457
|
}
|
|
1904
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ExpandRowContainerComponent, deps: [{ token: ViewContainerRef }, { token: ExpandRowService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1905
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", 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: [
|
|
1906
|
-
trigger('detailExpand', [
|
|
1907
|
-
state('collapsed', style({
|
|
1908
|
-
height: '0px',
|
|
1909
|
-
minHeight: '0',
|
|
1910
|
-
})),
|
|
1911
|
-
state('expanded', style({ height: '*' })),
|
|
1912
|
-
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
|
|
1913
|
-
]),
|
|
1914
|
-
], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1915
1458
|
}
|
|
1916
1459
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ExpandRowContainerComponent, decorators: [{
|
|
1917
1460
|
type: Component,
|
|
@@ -1924,107 +1467,60 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
1924
1467
|
state('expanded', style({ height: '*' })),
|
|
1925
1468
|
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
|
|
1926
1469
|
]),
|
|
1927
|
-
], imports: [PortalModule
|
|
1928
|
-
}],
|
|
1929
|
-
type: Inject,
|
|
1930
|
-
args: [ViewContainerRef]
|
|
1931
|
-
}] }, { type: ExpandRowService, decorators: [{
|
|
1932
|
-
type: Inject,
|
|
1933
|
-
args: [ExpandRowService]
|
|
1934
|
-
}] }], propDecorators: { element: [{
|
|
1935
|
-
type: Input,
|
|
1936
|
-
args: [{ required: true }]
|
|
1937
|
-
}], expandCellContent: [{
|
|
1938
|
-
type: ContentChild,
|
|
1939
|
-
args: [ExpandRowContentDirective]
|
|
1940
|
-
}] } });
|
|
1941
|
-
|
|
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 }] }] } });
|
|
1942
1472
|
class ExpandControlsCellComponent {
|
|
1943
|
-
constructor(
|
|
1944
|
-
this.expandCell =
|
|
1473
|
+
constructor() {
|
|
1474
|
+
this.expandCell = inject(ExpandRowService);
|
|
1475
|
+
this.element = input.required(...(ngDevMode ? [{ debugName: "element" }] : /* istanbul ignore next */ []));
|
|
1945
1476
|
}
|
|
1946
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ExpandControlsCellComponent, deps: [
|
|
1947
|
-
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: "element" }, ngImport: i0, template: "<button type=\"button\" mat-icon-button>\n @if (expandCell.isExpanded
|
|
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 }); }
|
|
1948
1479
|
}
|
|
1949
1480
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ExpandControlsCellComponent, decorators: [{
|
|
1950
1481
|
type: Component,
|
|
1951
|
-
args: [{ selector: 'td[rxap-expand-controls-cell]', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatButtonModule, MatIconModule
|
|
1952
|
-
}],
|
|
1953
|
-
type: Inject,
|
|
1954
|
-
args: [ExpandRowService]
|
|
1955
|
-
}] }], propDecorators: { element: [{
|
|
1956
|
-
type: Input,
|
|
1957
|
-
args: [{ required: true }]
|
|
1958
|
-
}] } });
|
|
1959
|
-
|
|
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 }] }] } });
|
|
1960
1484
|
class ExpandRowDirective {
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
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 */ []));
|
|
1966
1489
|
}
|
|
1967
1490
|
onClick() {
|
|
1968
|
-
this.expandCell.toggleRow(this.element);
|
|
1491
|
+
this.expandCell.toggleRow(this.element());
|
|
1969
1492
|
}
|
|
1970
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ExpandRowDirective, deps: [
|
|
1971
|
-
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 }); }
|
|
1972
1495
|
}
|
|
1973
1496
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ExpandRowDirective, decorators: [{
|
|
1974
1497
|
type: Directive,
|
|
1975
1498
|
args: [{
|
|
1976
1499
|
selector: 'tr[rxapExpandRow]',
|
|
1977
1500
|
standalone: true,
|
|
1501
|
+
host: {
|
|
1502
|
+
'[class.expanded-row]': 'isExpanded()',
|
|
1503
|
+
'(click)': 'onClick()',
|
|
1504
|
+
},
|
|
1978
1505
|
}]
|
|
1979
|
-
}],
|
|
1980
|
-
type: Inject,
|
|
1981
|
-
args: [ExpandRowService]
|
|
1982
|
-
}] }], propDecorators: { isExpanded: [{
|
|
1983
|
-
type: HostListener,
|
|
1984
|
-
args: ['expanded-row']
|
|
1985
|
-
}], element: [{
|
|
1986
|
-
type: Input,
|
|
1987
|
-
args: [{ required: true }]
|
|
1988
|
-
}], onClick: [{
|
|
1989
|
-
type: HostListener,
|
|
1990
|
-
args: ['click']
|
|
1991
|
-
}] } });
|
|
1992
|
-
|
|
1993
|
-
class ExpandRowModule {
|
|
1994
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ExpandRowModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1995
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: ExpandRowModule, imports: [ExpandRowDirective], exports: [ExpandRowDirective] }); }
|
|
1996
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ExpandRowModule, providers: [
|
|
1997
|
-
ExpandRowService,
|
|
1998
|
-
] }); }
|
|
1999
|
-
}
|
|
2000
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ExpandRowModule, decorators: [{
|
|
2001
|
-
type: NgModule,
|
|
2002
|
-
args: [{
|
|
2003
|
-
imports: [ExpandRowDirective],
|
|
2004
|
-
exports: [
|
|
2005
|
-
ExpandRowDirective,
|
|
2006
|
-
],
|
|
2007
|
-
providers: [
|
|
2008
|
-
ExpandRowService,
|
|
2009
|
-
],
|
|
2010
|
-
}]
|
|
2011
|
-
}] });
|
|
2012
|
-
|
|
1506
|
+
}], propDecorators: { element: [{ type: i0.Input, args: [{ isSignal: true, alias: "element", required: true }] }] } });
|
|
2013
1507
|
class TreeControlCellComponent {
|
|
2014
|
-
|
|
2015
|
-
this.offset = (this.element.__node.depth * 24) + 'px';
|
|
2016
|
-
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" });
|
|
2017
1511
|
}
|
|
1512
|
+
// the tree node state (expanded) is not reactive, therefore the icons must be re-evaluated on each check
|
|
2018
1513
|
ngDoCheck() {
|
|
2019
1514
|
this.updateIcon();
|
|
2020
1515
|
}
|
|
2021
1516
|
toggleExpand() {
|
|
2022
|
-
return this.element.__node.toggleExpand();
|
|
1517
|
+
return this.element().__node.toggleExpand();
|
|
2023
1518
|
}
|
|
2024
1519
|
updateIcon() {
|
|
2025
|
-
this.icon = this.element.icon;
|
|
2026
|
-
|
|
2027
|
-
|
|
1520
|
+
this.icon = this.element().icon;
|
|
1521
|
+
const element = this.element();
|
|
1522
|
+
if (element.__node.hasChildren) {
|
|
1523
|
+
if (element.__node.expanded) {
|
|
2028
1524
|
this.expandIcon = 'expand_more';
|
|
2029
1525
|
}
|
|
2030
1526
|
else {
|
|
@@ -2036,7 +1532,7 @@ class TreeControlCellComponent {
|
|
|
2036
1532
|
}
|
|
2037
1533
|
}
|
|
2038
1534
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TreeControlCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2039
|
-
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:
|
|
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 }); }
|
|
2040
1536
|
}
|
|
2041
1537
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TreeControlCellComponent, decorators: [{
|
|
2042
1538
|
type: Component,
|
|
@@ -2044,199 +1540,135 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
2044
1540
|
MatButtonModule,
|
|
2045
1541
|
MatIconModule,
|
|
2046
1542
|
IconDirective
|
|
2047
|
-
], 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" }]
|
|
2048
|
-
}], propDecorators: { element: [{
|
|
2049
|
-
type: Input,
|
|
2050
|
-
args: ['rxap-tree-control-cell']
|
|
2051
|
-
}] } });
|
|
2052
|
-
|
|
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 }] }] } });
|
|
2053
1545
|
class OptionsCellComponent {
|
|
2054
|
-
constructor(
|
|
2055
|
-
this.renderer =
|
|
2056
|
-
this.
|
|
2057
|
-
|
|
2058
|
-
this.defaultViewValue = ''
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
}
|
|
2067
|
-
setViewValue() {
|
|
2068
|
-
if (this.value === undefined || this.value === null) {
|
|
2069
|
-
this.viewValue = this.emptyViewValue;
|
|
2070
|
-
}
|
|
2071
|
-
else {
|
|
2072
|
-
if (this.options) {
|
|
2073
|
-
this._subscription.add(this.options.changes
|
|
2074
|
-
.pipe(startWith(null), tap(() => (this.viewValue = this.getViewValue())))
|
|
2075
|
-
.subscribe());
|
|
2076
|
-
}
|
|
2077
|
-
else if (isDevMode()) {
|
|
2078
|
-
console.log('Could not load any option');
|
|
2079
|
-
}
|
|
2080
|
-
}
|
|
2081
|
-
}
|
|
2082
|
-
ngOnChanges(changes) {
|
|
2083
|
-
if (this._initialised) {
|
|
2084
|
-
if (changes['value']) {
|
|
2085
|
-
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();
|
|
2086
1558
|
}
|
|
2087
|
-
|
|
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
|
+
});
|
|
2088
1566
|
}
|
|
2089
1567
|
getViewValue() {
|
|
2090
|
-
return
|
|
2091
|
-
this.defaultViewValue);
|
|
1568
|
+
return this.viewValue();
|
|
2092
1569
|
}
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
}
|
|
2096
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OptionsCellComponent, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2097
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: OptionsCellComponent, isStandalone: true, selector: "td[rxap-options-cell]", inputs: { value: ["rxap-options-cell", "value"], defaultViewValue: ["default", "defaultViewValue"], emptyViewValue: ["empty", "emptyViewValue"] }, queries: [{ propertyName: "options", predicate: MatOption, descendants: true }], usesOnChanges: true, ngImport: i0, template: "{{viewValue}}\n<ng-content></ng-content>\n", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
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 }); }
|
|
2098
1572
|
}
|
|
2099
1573
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OptionsCellComponent, decorators: [{
|
|
2100
1574
|
type: Component,
|
|
2101
|
-
args: [{ selector: 'td[rxap-options-cell]', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "{{viewValue}}\n<ng-content></ng-content>\n" }]
|
|
2102
|
-
}], ctorParameters: () => [{ type: i0.
|
|
2103
|
-
type: Input,
|
|
2104
|
-
args: ['rxap-options-cell']
|
|
2105
|
-
}], defaultViewValue: [{
|
|
2106
|
-
type: Input,
|
|
2107
|
-
args: ['default']
|
|
2108
|
-
}], emptyViewValue: [{
|
|
2109
|
-
type: Input,
|
|
2110
|
-
args: ['empty']
|
|
2111
|
-
}], options: [{
|
|
2112
|
-
type: ContentChildren,
|
|
2113
|
-
args: [MatOption, { descendants: true }]
|
|
2114
|
-
}] } });
|
|
2115
|
-
|
|
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 }] }] } });
|
|
2116
1577
|
class LinkCellComponent {
|
|
2117
1578
|
constructor() {
|
|
2118
|
-
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 */ []));
|
|
2119
1582
|
}
|
|
2120
1583
|
get href() {
|
|
2121
|
-
|
|
2122
|
-
|
|
1584
|
+
const protocol = this.protocol();
|
|
1585
|
+
if (protocol) {
|
|
1586
|
+
return [protocol, this.value()].join(':');
|
|
2123
1587
|
}
|
|
2124
|
-
return this.value;
|
|
1588
|
+
return this.value();
|
|
2125
1589
|
}
|
|
2126
1590
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LinkCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2127
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: LinkCellComponent, isStandalone: true, selector: "td[rxap-link-cell]", inputs: { value:
|
|
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 }); }
|
|
2128
1592
|
}
|
|
2129
1593
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: LinkCellComponent, decorators: [{
|
|
2130
1594
|
type: Component,
|
|
2131
|
-
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"] }]
|
|
2132
|
-
}], propDecorators: { value: [{
|
|
2133
|
-
type: Input,
|
|
2134
|
-
args: ['rxap-link-cell']
|
|
2135
|
-
}], protocol: [{
|
|
2136
|
-
type: Input
|
|
2137
|
-
}], short: [{
|
|
2138
|
-
type: Input
|
|
2139
|
-
}] } });
|
|
2140
|
-
|
|
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 }] }] } });
|
|
2141
1597
|
class ImageCellComponent {
|
|
2142
1598
|
constructor() {
|
|
2143
|
-
this.
|
|
2144
|
-
this.
|
|
2145
|
-
this.
|
|
2146
|
-
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" });
|
|
2147
1604
|
}
|
|
2148
1605
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ImageCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2149
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: ImageCellComponent, isStandalone: true, selector: "td[rxap-image-cell]", inputs: { preset: "preset", size: "size", repeat: "repeat", position: "position", value:
|
|
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 }); }
|
|
2150
1607
|
}
|
|
2151
1608
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ImageCellComponent, decorators: [{
|
|
2152
1609
|
type: Component,
|
|
2153
|
-
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"] }]
|
|
2154
|
-
}], propDecorators: { preset: [{
|
|
2155
|
-
type: Input
|
|
2156
|
-
}], size: [{
|
|
2157
|
-
type: Input
|
|
2158
|
-
}], repeat: [{
|
|
2159
|
-
type: Input
|
|
2160
|
-
}], position: [{
|
|
2161
|
-
type: Input
|
|
2162
|
-
}], value: [{
|
|
2163
|
-
type: Input,
|
|
2164
|
-
args: ['rxap-image-cell']
|
|
2165
|
-
}] } });
|
|
2166
|
-
|
|
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 }] }] } });
|
|
2167
1612
|
class IconCellComponent {
|
|
1613
|
+
constructor() {
|
|
1614
|
+
this.icon = input.required({ ...(ngDevMode ? { debugName: "icon" } : /* istanbul ignore next */ {}), alias: "rxap-icon-cell" });
|
|
1615
|
+
}
|
|
2168
1616
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: IconCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2169
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: IconCellComponent, isStandalone: true, selector: "td[rxap-icon-cell]", inputs: { icon:
|
|
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 }); }
|
|
2170
1618
|
}
|
|
2171
1619
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: IconCellComponent, decorators: [{
|
|
2172
1620
|
type: Component,
|
|
2173
|
-
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" }]
|
|
2174
|
-
}], propDecorators: { icon: [{
|
|
2175
|
-
type: Input,
|
|
2176
|
-
args: ['rxap-icon-cell']
|
|
2177
|
-
}] } });
|
|
2178
|
-
|
|
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 }] }] } });
|
|
2179
1623
|
class DateCellComponent {
|
|
2180
1624
|
constructor() {
|
|
2181
|
-
this.date = null;
|
|
2182
|
-
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 */ []));
|
|
2183
1627
|
}
|
|
2184
1628
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DateCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2185
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: DateCellComponent, isStandalone: true, selector: "td[rxap-date-cell]", inputs: { date:
|
|
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 }); }
|
|
2186
1630
|
}
|
|
2187
1631
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DateCellComponent, decorators: [{
|
|
2188
1632
|
type: Component,
|
|
2189
|
-
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" }]
|
|
2190
|
-
}], propDecorators: { date: [{
|
|
2191
|
-
type: Input,
|
|
2192
|
-
args: ['rxap-date-cell']
|
|
2193
|
-
}], format: [{
|
|
2194
|
-
type: Input
|
|
2195
|
-
}] } });
|
|
2196
|
-
|
|
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 }] }] } });
|
|
2197
1635
|
class CopyToClipboardCellComponent {
|
|
1636
|
+
constructor() {
|
|
1637
|
+
this.value = input(undefined, { ...(ngDevMode ? { debugName: "value" } : /* istanbul ignore next */ {}), alias: "rxap-copy-to-clipboard-cell" });
|
|
1638
|
+
}
|
|
2198
1639
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CopyToClipboardCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2199
|
-
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:
|
|
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 }); }
|
|
2200
1641
|
}
|
|
2201
1642
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CopyToClipboardCellComponent, decorators: [{
|
|
2202
1643
|
type: Component,
|
|
2203
|
-
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"] }]
|
|
2204
|
-
}], propDecorators: { value: [{
|
|
2205
|
-
|
|
2206
|
-
args: ['rxap-copy-to-clipboard-cell']
|
|
2207
|
-
}] } });
|
|
2208
|
-
|
|
2209
|
-
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 {
|
|
2210
1647
|
constructor() {
|
|
2211
|
-
this.value = null;
|
|
1648
|
+
this.value = input(null, { ...(ngDevMode ? { debugName: "value" } : /* istanbul ignore next */ {}), alias: "rxap-boolean-cell" });
|
|
2212
1649
|
}
|
|
2213
1650
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: BooleanCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2214
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: BooleanCellComponent, isStandalone: true, selector: "td[rxap-boolean-cell]", inputs: { value:
|
|
2215
|
-
}
|
|
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
|
+
};
|
|
2216
1653
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: BooleanCellComponent, decorators: [{
|
|
2217
1654
|
type: Component,
|
|
2218
|
-
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" }]
|
|
2219
|
-
}], propDecorators: { value: [{
|
|
2220
|
-
type: Input,
|
|
2221
|
-
args: ['rxap-boolean-cell']
|
|
2222
|
-
}] } });
|
|
2223
|
-
|
|
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 }] }] } });
|
|
2224
1657
|
class PersistentPaginatorDirective {
|
|
2225
|
-
constructor(
|
|
2226
|
-
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);
|
|
2227
1662
|
}
|
|
2228
1663
|
ngOnInit() {
|
|
2229
1664
|
const config = this.restoreConfig();
|
|
2230
1665
|
if (config) {
|
|
2231
1666
|
this.matPaginator.pageSize = config.pageSize;
|
|
2232
1667
|
}
|
|
2233
|
-
this.
|
|
2234
|
-
}
|
|
2235
|
-
ngOnDestroy() {
|
|
2236
|
-
this._subscription?.unsubscribe();
|
|
1668
|
+
this.matPaginator.page.pipe(tap(() => this.storeConfig()), takeUntilDestroyed(this.destroyRef)).subscribe();
|
|
2237
1669
|
}
|
|
2238
1670
|
getKey() {
|
|
2239
|
-
return 'rxap_mat-paginator-persistent' + this.id;
|
|
1671
|
+
return 'rxap_mat-paginator-persistent' + this.id();
|
|
2240
1672
|
}
|
|
2241
1673
|
storeConfig() {
|
|
2242
1674
|
const pageSize = this.matPaginator.pageSize;
|
|
@@ -2254,8 +1686,8 @@ class PersistentPaginatorDirective {
|
|
|
2254
1686
|
}
|
|
2255
1687
|
return null;
|
|
2256
1688
|
}
|
|
2257
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: PersistentPaginatorDirective, deps: [
|
|
2258
|
-
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 }); }
|
|
2259
1691
|
}
|
|
2260
1692
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: PersistentPaginatorDirective, decorators: [{
|
|
2261
1693
|
type: Directive,
|
|
@@ -2263,10 +1695,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
2263
1695
|
selector: 'mat-paginator[rxapPersistent]',
|
|
2264
1696
|
standalone: true,
|
|
2265
1697
|
}]
|
|
2266
|
-
}],
|
|
2267
|
-
type: Input
|
|
2268
|
-
}] } });
|
|
2269
|
-
|
|
1698
|
+
}], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }] } });
|
|
2270
1699
|
const offset = '50';
|
|
2271
1700
|
const RowAnimation = trigger('rowsAnimation', [
|
|
2272
1701
|
transition('void => *', [
|
|
@@ -2298,20 +1727,15 @@ const RowAnimation = trigger('rowsAnimation', [
|
|
|
2298
1727
|
}),
|
|
2299
1728
|
]),
|
|
2300
1729
|
]);
|
|
2301
|
-
|
|
2302
1730
|
function NormalizeTableRow(row, rowIdOrMapper) {
|
|
2303
1731
|
row.__rowId = typeof rowIdOrMapper === 'string' ? rowIdOrMapper : rowIdOrMapper(row);
|
|
2304
1732
|
row.__metadata__ ??= { loading$: new ToggleSubject() };
|
|
2305
1733
|
row.__metadata__.loading$ ??= new ToggleSubject();
|
|
2306
1734
|
return row;
|
|
2307
1735
|
}
|
|
2308
|
-
|
|
2309
1736
|
// region table-select-controls
|
|
2310
1737
|
// endregion
|
|
2311
|
-
|
|
2312
1738
|
/**
|
|
2313
1739
|
* Generated bundle index. Do not edit.
|
|
2314
1740
|
*/
|
|
2315
|
-
|
|
2316
|
-
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 };
|
|
2317
|
-
//# 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 };
|