@one-paragon/angular-utilities 0.1.21 → 0.1.23
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/action-state/action-state-spinner/action-state-spinner.component.d.ts +12 -0
- package/action-state/action-state-ui/action-state-ui.module.d.ts +9 -0
- package/{src/action-state/index.ts → action-state/index.d.ts} +0 -4
- package/action-state/ngrx-ext/ngrx-ext.module.d.ts +8 -0
- package/action-state/ngrx.d.ts +31 -0
- package/esm2020/action-state/action-state-spinner/action-state-spinner.component.mjs +23 -0
- package/esm2020/action-state/action-state-ui/action-state-ui.module.mjs +28 -0
- package/esm2020/action-state/index.mjs +8 -0
- package/esm2020/action-state/ngrx-ext/ngrx-ext.module.mjs +23 -0
- package/esm2020/action-state/ngrx.mjs +42 -0
- package/esm2020/http-request-state/HttpRequestStateFactory.mjs +27 -0
- package/esm2020/http-request-state/HttpRequestStateStore.mjs +97 -0
- package/esm2020/http-request-state/directives/HttpStateDirectiveBase.mjs +34 -0
- package/esm2020/http-request-state/directives/http-error-state-directive.mjs +29 -0
- package/esm2020/http-request-state/directives/http-inProgress-state-directive.mjs +29 -0
- package/esm2020/http-request-state/directives/http-notStarted-state-directive.mjs +29 -0
- package/esm2020/http-request-state/directives/http-success-state-directive.mjs +29 -0
- package/esm2020/http-request-state/directives/index.mjs +6 -0
- package/esm2020/http-request-state/directives/request-state-directive.mjs +57 -0
- package/esm2020/http-request-state/helpers.mjs +22 -0
- package/esm2020/http-request-state/http-request-state.mjs +39 -0
- package/esm2020/http-request-state/http-state-module.mjs +41 -0
- package/esm2020/http-request-state/index.mjs +7 -0
- package/esm2020/http-request-state/rxjs/getRequestorBody.mjs +4 -0
- package/esm2020/http-request-state/rxjs/getRequestorState.mjs +3 -0
- package/esm2020/http-request-state/rxjs/index.mjs +5 -0
- package/esm2020/http-request-state/rxjs/tapError.mjs +12 -0
- package/esm2020/http-request-state/rxjs/tapSuccess.mjs +12 -0
- package/esm2020/http-request-state/types.mjs +16 -0
- package/esm2020/ngrx/actionable-selector.mjs +76 -0
- package/esm2020/ngrx/index.mjs +2 -0
- package/esm2020/one-paragon-angular-utilities.mjs +5 -0
- package/esm2020/public-api.mjs +19 -0
- package/esm2020/rxjs/defaultShareReplay.mjs +7 -0
- package/esm2020/rxjs/index.mjs +5 -0
- package/esm2020/rxjs/mapError.mjs +8 -0
- package/esm2020/rxjs/rxjs-operators.mjs +91 -0
- package/esm2020/rxjs/subjectifier.mjs +15 -0
- package/esm2020/table-builder/classes/DefaultSettings.mjs +6 -0
- package/esm2020/table-builder/classes/GenericTableDataSource.mjs +13 -0
- package/esm2020/table-builder/classes/MatTableObservableDataSource.mjs +21 -0
- package/esm2020/table-builder/classes/TableBuilderConfig.mjs +3 -0
- package/esm2020/table-builder/classes/TableState.mjs +32 -0
- package/esm2020/table-builder/classes/data-filter.mjs +26 -0
- package/esm2020/table-builder/classes/display-col.mjs +2 -0
- package/esm2020/table-builder/classes/filter-info.mjs +71 -0
- package/esm2020/table-builder/classes/table-builder-general-settings.mjs +68 -0
- package/esm2020/table-builder/classes/table-builder.mjs +61 -0
- package/esm2020/table-builder/classes/table-store.mjs +292 -0
- package/esm2020/table-builder/components/array-column.component.mjs +57 -0
- package/esm2020/table-builder/components/column-builder/column-builder.component.mjs +111 -0
- package/esm2020/table-builder/components/date-filter/date-filter.component.mjs +25 -0
- package/esm2020/table-builder/components/filter/filter.component.mjs +53 -0
- package/esm2020/table-builder/components/filter/in-list/in-list-filter.component.mjs +91 -0
- package/esm2020/table-builder/components/gen-col-displayer/gen-col-displayer.component.mjs +45 -0
- package/esm2020/table-builder/components/generic-table/generic-table.component.mjs +198 -0
- package/esm2020/table-builder/components/generic-table/paginator.component.mjs +74 -0
- package/esm2020/table-builder/components/group-by-list/group-by-list.component.mjs +22 -0
- package/esm2020/table-builder/components/header-menu/header-menu.component.mjs +90 -0
- package/esm2020/table-builder/components/in-filter/in-filter.component.mjs +63 -0
- package/esm2020/table-builder/components/index.mjs +10 -0
- package/esm2020/table-builder/components/initialization-component/initialization-component.mjs +33 -0
- package/esm2020/table-builder/components/link-column.component.mjs +66 -0
- package/esm2020/table-builder/components/number-filter/number-filter.component.mjs +27 -0
- package/esm2020/table-builder/components/sort-menu/sort-menu.component-store.mjs +42 -0
- package/esm2020/table-builder/components/sort-menu/sort-menu.component.mjs +75 -0
- package/esm2020/table-builder/components/table-container/table-container.mjs +312 -0
- package/esm2020/table-builder/components/table-container-filter/filter-list/filter-list.component.mjs +42 -0
- package/esm2020/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.mjs +30 -0
- package/esm2020/table-builder/components/table-container-filter/table-wrapper-filter-store.mjs +25 -0
- package/esm2020/table-builder/directives/custom-cell-directive.mjs +59 -0
- package/esm2020/table-builder/directives/index.mjs +6 -0
- package/esm2020/table-builder/directives/multi-sort.directive.mjs +42 -0
- package/esm2020/table-builder/directives/resize-column.directive.mjs +86 -0
- package/esm2020/table-builder/directives/table-wrapper.directive.mjs +26 -0
- package/esm2020/table-builder/directives/tb-filter.directive.mjs +403 -0
- package/esm2020/table-builder/enums/filterTypes.mjs +59 -0
- package/esm2020/table-builder/functions/boolean-filter-function.mjs +10 -0
- package/esm2020/table-builder/functions/date-filter-function.mjs +32 -0
- package/esm2020/table-builder/functions/download-data.mjs +12 -0
- package/esm2020/table-builder/functions/null-filter-function.mjs +8 -0
- package/esm2020/table-builder/functions/number-filter-function.mjs +32 -0
- package/esm2020/table-builder/functions/sort-data-function.mjs +5 -0
- package/esm2020/table-builder/functions/string-filter-function.mjs +41 -0
- package/esm2020/table-builder/interfaces/ColumnInfo.mjs +2 -0
- package/esm2020/table-builder/interfaces/dictionary.mjs +2 -0
- package/esm2020/table-builder/interfaces/report-def.mjs +34 -0
- package/esm2020/table-builder/material.module.mjs +207 -0
- package/esm2020/table-builder/ngrx/actions.mjs +5 -0
- package/esm2020/table-builder/ngrx/effects.mjs +48 -0
- package/esm2020/table-builder/ngrx/reducer.mjs +52 -0
- package/esm2020/table-builder/ngrx/selectors.mjs +24 -0
- package/esm2020/table-builder/pipes/column-total.pipe.mjs +20 -0
- package/esm2020/table-builder/pipes/format-filter-type.pipe.mjs +18 -0
- package/esm2020/table-builder/pipes/format-filter-value.pipe.mjs +46 -0
- package/esm2020/table-builder/pipes/key-display.mjs +20 -0
- package/esm2020/table-builder/services/export-to-csv.service.mjs +84 -0
- package/esm2020/table-builder/services/link-creator.service.mjs +42 -0
- package/esm2020/table-builder/services/table-template-service.mjs +43 -0
- package/esm2020/table-builder/services/transform-creator.mjs +70 -0
- package/esm2020/table-builder/table-builder.module.mjs +204 -0
- package/esm2020/utilities/directives/auto-focus.directive.mjs +26 -0
- package/esm2020/utilities/directives/clickEmitterDirective.mjs +21 -0
- package/esm2020/utilities/directives/clickSubject.mjs +27 -0
- package/esm2020/utilities/directives/conditional-classes.directive.mjs +35 -0
- package/esm2020/utilities/directives/dialog-service.mjs +25 -0
- package/esm2020/utilities/directives/dialog.mjs +137 -0
- package/esm2020/utilities/directives/mat-toggle-group-directive.mjs +59 -0
- package/esm2020/utilities/directives/prevent-enter.directive.mjs +19 -0
- package/esm2020/utilities/directives/stop-propagation.directive.mjs +25 -0
- package/esm2020/utilities/directives/styler.mjs +26 -0
- package/esm2020/utilities/directives/trim-whitespace.directive.mjs +29 -0
- package/esm2020/utilities/index.mjs +16 -0
- package/esm2020/utilities/module.mjs +91 -0
- package/esm2020/utilities/pipes/function.pipe.mjs +21 -0
- package/esm2020/utilities/pipes/phone.pipe.mjs +20 -0
- package/esm2020/utilities/pipes/space-case.pipes.mjs +28 -0
- package/fesm2015/one-paragon-angular-utilities.mjs +4687 -0
- package/fesm2015/one-paragon-angular-utilities.mjs.map +1 -0
- package/fesm2020/one-paragon-angular-utilities.mjs +4655 -0
- package/fesm2020/one-paragon-angular-utilities.mjs.map +1 -0
- package/http-request-state/HttpRequestStateFactory.d.ts +14 -0
- package/http-request-state/HttpRequestStateStore.d.ts +48 -0
- package/http-request-state/directives/HttpStateDirectiveBase.d.ts +16 -0
- package/http-request-state/directives/http-error-state-directive.d.ts +12 -0
- package/http-request-state/directives/http-inProgress-state-directive.d.ts +12 -0
- package/http-request-state/directives/http-notStarted-state-directive.d.ts +12 -0
- package/http-request-state/directives/http-success-state-directive.d.ts +14 -0
- package/{src/http-request-state/directives/index.ts → http-request-state/directives/index.d.ts} +5 -5
- package/http-request-state/directives/request-state-directive.d.ts +29 -0
- package/http-request-state/helpers.d.ts +9 -0
- package/http-request-state/http-request-state.d.ts +12 -0
- package/http-request-state/http-state-module.d.ts +11 -0
- package/{src/http-request-state/index.ts → http-request-state/index.d.ts} +6 -6
- package/http-request-state/rxjs/getRequestorBody.d.ts +3 -0
- package/http-request-state/rxjs/getRequestorState.d.ts +3 -0
- package/{src/http-request-state/rxjs/index.ts → http-request-state/rxjs/index.d.ts} +4 -4
- package/http-request-state/rxjs/tapError.d.ts +3 -0
- package/http-request-state/rxjs/tapSuccess.d.ts +3 -0
- package/http-request-state/types.d.ts +36 -0
- package/index.d.ts +5 -0
- package/ngrx/actionable-selector.d.ts +15 -0
- package/ngrx/index.d.ts +1 -0
- package/package.json +36 -16
- package/{src/public-api.ts → public-api.d.ts} +3 -21
- package/rxjs/defaultShareReplay.d.ts +2 -0
- package/{src/rxjs/index.ts → rxjs/index.d.ts} +1 -1
- package/rxjs/mapError.d.ts +2 -0
- package/rxjs/rxjs-operators.d.ts +12 -0
- package/rxjs/subjectifier.d.ts +9 -0
- package/table-builder/classes/DefaultSettings.d.ts +8 -0
- package/table-builder/classes/GenericTableDataSource.d.ts +8 -0
- package/table-builder/classes/MatTableObservableDataSource.d.ts +9 -0
- package/table-builder/classes/TableBuilderConfig.d.ts +19 -0
- package/table-builder/classes/TableState.d.ts +46 -0
- package/table-builder/classes/data-filter.d.ts +9 -0
- package/{src/table-builder/classes/display-col.ts → table-builder/classes/display-col.d.ts} +5 -5
- package/table-builder/classes/filter-info.d.ts +40 -0
- package/table-builder/classes/table-builder-general-settings.d.ts +43 -0
- package/table-builder/classes/table-builder.d.ts +14 -0
- package/table-builder/classes/table-store.d.ts +114 -0
- package/table-builder/components/array-column.component.d.ts +14 -0
- package/table-builder/components/column-builder/column-builder.component.d.ts +50 -0
- package/table-builder/components/date-filter/date-filter.component.d.ts +10 -0
- package/table-builder/components/filter/filter.component.d.ts +294 -0
- package/table-builder/components/filter/in-list/in-list-filter.component.d.ts +27 -0
- package/table-builder/components/gen-col-displayer/gen-col-displayer.component.d.ts +16 -0
- package/table-builder/components/generic-table/generic-table.component.d.ts +71 -0
- package/table-builder/components/generic-table/paginator.component.d.ts +28 -0
- package/table-builder/components/group-by-list/group-by-list.component.d.ts +10 -0
- package/table-builder/components/header-menu/header-menu.component.d.ts +25 -0
- package/table-builder/components/in-filter/in-filter.component.d.ts +21 -0
- package/{src/table-builder/components/index.ts → table-builder/components/index.d.ts} +0 -0
- package/table-builder/components/initialization-component/initialization-component.d.ts +12 -0
- package/table-builder/components/link-column.component.d.ts +17 -0
- package/table-builder/components/number-filter/number-filter.component.d.ts +12 -0
- package/table-builder/components/sort-menu/sort-menu.component-store.d.ts +24 -0
- package/table-builder/components/sort-menu/sort-menu.component.d.ts +25 -0
- package/table-builder/components/table-container/table-container.d.ts +65 -0
- package/table-builder/components/table-container-filter/filter-list/filter-list.component.d.ts +17 -0
- package/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.d.ts +14 -0
- package/table-builder/components/table-container-filter/table-wrapper-filter-store.d.ts +14 -0
- package/table-builder/directives/custom-cell-directive.d.ts +19 -0
- package/{src/table-builder/directives/index.ts → table-builder/directives/index.d.ts} +0 -1
- package/table-builder/directives/multi-sort.directive.d.ts +11 -0
- package/table-builder/directives/resize-column.directive.d.ts +43 -0
- package/table-builder/directives/table-wrapper.directive.d.ts +11 -0
- package/table-builder/directives/tb-filter.directive.d.ts +120 -0
- package/table-builder/enums/filterTypes.d.ts +31 -0
- package/table-builder/functions/boolean-filter-function.d.ts +3 -0
- package/table-builder/functions/date-filter-function.d.ts +3 -0
- package/table-builder/functions/download-data.d.ts +1 -0
- package/table-builder/functions/null-filter-function.d.ts +2 -0
- package/table-builder/functions/number-filter-function.d.ts +4 -0
- package/table-builder/functions/sort-data-function.d.ts +3 -0
- package/table-builder/functions/string-filter-function.d.ts +7 -0
- package/{src/table-builder/interfaces/ColumnInfo.ts → table-builder/interfaces/ColumnInfo.d.ts} +6 -7
- package/{src/table-builder/interfaces/dictionary.ts → table-builder/interfaces/dictionary.d.ts} +1 -1
- package/table-builder/interfaces/report-def.d.ts +135 -0
- package/table-builder/material.module.d.ts +32 -0
- package/table-builder/ngrx/actions.d.ts +23 -0
- package/table-builder/ngrx/effects.d.ts +19 -0
- package/table-builder/ngrx/reducer.d.ts +15 -0
- package/table-builder/ngrx/selectors.d.ts +22 -0
- package/table-builder/pipes/column-total.pipe.d.ts +8 -0
- package/table-builder/pipes/format-filter-type.pipe.d.ts +8 -0
- package/table-builder/pipes/format-filter-value.pipe.d.ts +14 -0
- package/table-builder/pipes/key-display.d.ts +11 -0
- package/table-builder/services/export-to-csv.service.d.ts +22 -0
- package/table-builder/services/link-creator.service.d.ts +12 -0
- package/table-builder/services/table-template-service.d.ts +14 -0
- package/table-builder/services/transform-creator.d.ts +19 -0
- package/table-builder/table-builder.module.d.ts +45 -0
- package/utilities/directives/auto-focus.directive.d.ts +10 -0
- package/utilities/directives/clickEmitterDirective.d.ts +7 -0
- package/utilities/directives/clickSubject.d.ts +9 -0
- package/utilities/directives/conditional-classes.directive.d.ts +14 -0
- package/utilities/directives/dialog-service.d.ts +10 -0
- package/utilities/directives/dialog.d.ts +46 -0
- package/utilities/directives/mat-toggle-group-directive.d.ts +21 -0
- package/utilities/directives/prevent-enter.directive.d.ts +6 -0
- package/utilities/directives/stop-propagation.directive.d.ts +7 -0
- package/utilities/directives/styler.d.ts +9 -0
- package/utilities/directives/trim-whitespace.directive.d.ts +9 -0
- package/{src/utilities/index.ts → utilities/index.d.ts} +1 -8
- package/utilities/module.d.ts +19 -0
- package/utilities/pipes/function.pipe.d.ts +7 -0
- package/utilities/pipes/phone.pipe.d.ts +7 -0
- package/utilities/pipes/space-case.pipes.d.ts +17 -0
- package/karma.conf.js +0 -44
- package/ng-package.json +0 -7
- package/src/action-state/action-state-spinner/action-state-spinner.component.css +0 -16
- package/src/action-state/action-state-spinner/action-state-spinner.component.html +0 -3
- package/src/action-state/action-state-spinner/action-state-spinner.component.spec.ts +0 -25
- package/src/action-state/action-state-spinner/action-state-spinner.component.ts +0 -22
- package/src/action-state/action-state-ui/action-state-ui.module.ts +0 -19
- package/src/action-state/ngrx-ext/ngrx-ext.module.ts +0 -15
- package/src/action-state/ngrx.ts +0 -69
- package/src/http-request-state/HttpRequestStateFactory.ts +0 -26
- package/src/http-request-state/HttpRequestStateStore.ts +0 -147
- package/src/http-request-state/directives/HttpStateDirectiveBase.ts +0 -38
- package/src/http-request-state/directives/http-error-state-directive.ts +0 -32
- package/src/http-request-state/directives/http-inProgress-state-directive.ts +0 -32
- package/src/http-request-state/directives/http-notStarted-state-directive.ts +0 -31
- package/src/http-request-state/directives/http-success-state-directive.ts +0 -31
- package/src/http-request-state/directives/request-state-directive.spec.ts +0 -72
- package/src/http-request-state/directives/request-state-directive.ts +0 -70
- package/src/http-request-state/helpers.ts +0 -30
- package/src/http-request-state/http-request-state.ts +0 -69
- package/src/http-request-state/http-state-module.ts +0 -26
- package/src/http-request-state/observable.spec.ts +0 -43
- package/src/http-request-state/rxjs/getRequestorBody.ts +0 -10
- package/src/http-request-state/rxjs/getRequestorState.ts +0 -8
- package/src/http-request-state/rxjs/tapError.ts +0 -16
- package/src/http-request-state/rxjs/tapSuccess.ts +0 -16
- package/src/http-request-state/strategies.spec.ts +0 -42
- package/src/http-request-state/types.ts +0 -50
- package/src/ngrx/actionable-selector.ts +0 -95
- package/src/ngrx/index.ts +0 -1
- package/src/rxjs/defaultShareReplay.ts +0 -8
- package/src/rxjs/mapError.ts +0 -8
- package/src/rxjs/rxjs-operators.ts +0 -130
- package/src/rxjs/subjectifier.ts +0 -15
- package/src/specs/clickSubject.spec.ts +0 -95
- package/src/specs/dialog.spec.ts +0 -101
- package/src/specs/toggleGroupDirective.spec.ts +0 -231
- package/src/table-builder/classes/DefaultSettings.ts +0 -10
- package/src/table-builder/classes/GenericTableDataSource.ts +0 -22
- package/src/table-builder/classes/MatTableObservableDataSource.ts +0 -23
- package/src/table-builder/classes/TableBuilderConfig.ts +0 -19
- package/src/table-builder/classes/TableState.ts +0 -63
- package/src/table-builder/classes/data-filter.spec.ts +0 -72
- package/src/table-builder/classes/data-filter.ts +0 -32
- package/src/table-builder/classes/filter-info.ts +0 -132
- package/src/table-builder/classes/table-builder-general-settings.ts +0 -73
- package/src/table-builder/classes/table-builder.ts +0 -71
- package/src/table-builder/classes/table-store.ts +0 -360
- package/src/table-builder/components/array-column.component.ts +0 -39
- package/src/table-builder/components/column-builder/column-builder.component.html +0 -66
- package/src/table-builder/components/column-builder/column-builder.component.scss +0 -43
- package/src/table-builder/components/column-builder/column-builder.component.spec.ts +0 -51
- package/src/table-builder/components/column-builder/column-builder.component.ts +0 -126
- package/src/table-builder/components/date-filter/date-filter.component.html +0 -24
- package/src/table-builder/components/date-filter/date-filter.component.ts +0 -17
- package/src/table-builder/components/filter/filter.component.html +0 -78
- package/src/table-builder/components/filter/filter.component.scss +0 -64
- package/src/table-builder/components/filter/filter.component.spec.ts +0 -89
- package/src/table-builder/components/filter/filter.component.ts +0 -35
- package/src/table-builder/components/filter/in-list/in-list-filter.component.ts +0 -82
- package/src/table-builder/components/gen-col-displayer/gen-col-displayer.component.html +0 -52
- package/src/table-builder/components/gen-col-displayer/gen-col-displayer.component.scss +0 -57
- package/src/table-builder/components/gen-col-displayer/gen-col-displayer.component.ts +0 -44
- package/src/table-builder/components/generic-table/generic-table.component.html +0 -77
- package/src/table-builder/components/generic-table/generic-table.component.scss +0 -45
- package/src/table-builder/components/generic-table/generic-table.component.ts +0 -221
- package/src/table-builder/components/generic-table/paginator.component.ts +0 -89
- package/src/table-builder/components/group-by-list/group-by-list.component.css +0 -8
- package/src/table-builder/components/group-by-list/group-by-list.component.html +0 -10
- package/src/table-builder/components/group-by-list/group-by-list.component.spec.ts +0 -23
- package/src/table-builder/components/group-by-list/group-by-list.component.ts +0 -16
- package/src/table-builder/components/header-menu/header-menu.component.html +0 -117
- package/src/table-builder/components/header-menu/header-menu.component.scss +0 -92
- package/src/table-builder/components/header-menu/header-menu.component.ts +0 -81
- package/src/table-builder/components/in-filter/in-filter.component.css +0 -3
- package/src/table-builder/components/in-filter/in-filter.component.html +0 -13
- package/src/table-builder/components/in-filter/in-filter.component.ts +0 -60
- package/src/table-builder/components/initialization-component/initialization-component.html +0 -21
- package/src/table-builder/components/initialization-component/initialization-component.ts +0 -15
- package/src/table-builder/components/link-column.component.ts +0 -33
- package/src/table-builder/components/number-filter/number-filter.component.css +0 -10
- package/src/table-builder/components/number-filter/number-filter.component.html +0 -21
- package/src/table-builder/components/number-filter/number-filter.component.spec.ts +0 -30
- package/src/table-builder/components/number-filter/number-filter.component.ts +0 -19
- package/src/table-builder/components/sort-menu/sort-menu.component-store.ts +0 -59
- package/src/table-builder/components/sort-menu/sort-menu.component.html +0 -101
- package/src/table-builder/components/sort-menu/sort-menu.component.scss +0 -119
- package/src/table-builder/components/sort-menu/sort-menu.component.ts +0 -82
- package/src/table-builder/components/table-container/table-container.css +0 -26
- package/src/table-builder/components/table-container/table-container.html +0 -113
- package/src/table-builder/components/table-container/table-container.spec.ts +0 -157
- package/src/table-builder/components/table-container/table-container.ts +0 -344
- package/src/table-builder/components/table-container-filter/filter-list/filter-list.component.html +0 -26
- package/src/table-builder/components/table-container-filter/filter-list/filter-list.component.ts +0 -38
- package/src/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.css +0 -37
- package/src/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.html +0 -8
- package/src/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.spec.ts +0 -88
- package/src/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.ts +0 -27
- package/src/table-builder/components/table-container-filter/table-wrapper-filter-store.ts +0 -23
- package/src/table-builder/directives/custom-cell-directive.ts +0 -45
- package/src/table-builder/directives/multi-sort.directive.spec.ts +0 -124
- package/src/table-builder/directives/multi-sort.directive.ts +0 -41
- package/src/table-builder/directives/resize-column.directive.ts +0 -104
- package/src/table-builder/directives/table-wrapper.directive.ts +0 -16
- package/src/table-builder/directives/tb-filter.directive.ts +0 -363
- package/src/table-builder/enums/filterTypes.ts +0 -65
- package/src/table-builder/functions/boolean-filter-function.ts +0 -13
- package/src/table-builder/functions/date-filter-function.ts +0 -40
- package/src/table-builder/functions/download-data.ts +0 -11
- package/src/table-builder/functions/null-filter-function.ts +0 -9
- package/src/table-builder/functions/number-filter-function.ts +0 -42
- package/src/table-builder/functions/sort-data-function.ts +0 -8
- package/src/table-builder/functions/string-filter-function.ts +0 -52
- package/src/table-builder/interfaces/column-template.ts +0 -9
- package/src/table-builder/interfaces/report-def.ts +0 -131
- package/src/table-builder/material.module.ts +0 -95
- package/src/table-builder/ngrx/actions.ts +0 -7
- package/src/table-builder/ngrx/effects.ts +0 -54
- package/src/table-builder/ngrx/reducer.ts +0 -72
- package/src/table-builder/ngrx/selectors.ts +0 -37
- package/src/table-builder/pipes/column-total.pipe.ts +0 -15
- package/src/table-builder/pipes/format-filter-type.pipe.ts +0 -12
- package/src/table-builder/pipes/format-filter-value.pipe.ts +0 -40
- package/src/table-builder/pipes/key-display.ts +0 -16
- package/src/table-builder/services/export-to-csv.service.ts +0 -92
- package/src/table-builder/services/link-creator.service.ts +0 -48
- package/src/table-builder/services/table-template-service.ts +0 -44
- package/src/table-builder/services/transform-creator.ts +0 -61
- package/src/table-builder/specs/table-custom-filters.spec.ts +0 -262
- package/src/table-builder/styles/collapser.styles.scss +0 -21
- package/src/table-builder/table-builder.module.ts +0 -138
- package/src/test.ts +0 -17
- package/src/utilities/directives/auto-focus.directive.ts +0 -19
- package/src/utilities/directives/clickEmitterDirective.ts +0 -15
- package/src/utilities/directives/clickSubject.ts +0 -19
- package/src/utilities/directives/conditional-classes.directive.ts +0 -35
- package/src/utilities/directives/dialog-service.ts +0 -22
- package/src/utilities/directives/dialog.ts +0 -142
- package/src/utilities/directives/mat-toggle-group-directive.ts +0 -60
- package/src/utilities/directives/prevent-enter.directive.ts +0 -12
- package/src/utilities/directives/stop-propagation.directive.ts +0 -19
- package/src/utilities/directives/styler.ts +0 -16
- package/src/utilities/directives/trim-whitespace.directive.ts +0 -20
- package/src/utilities/module.ts +0 -58
- package/src/utilities/pipes/function.pipe.ts +0 -15
- package/src/utilities/pipes/phone.pipe.ts +0 -15
- package/src/utilities/pipes/space-case.pipes.spec.ts +0 -47
- package/src/utilities/pipes/space-case.pipes.ts +0 -23
- package/tsconfig.lib.json +0 -19
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -17
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
<ng-container *ngIf="columns$ | async as displayCols">
|
|
2
|
-
<span matTooltip="Show/hide columns">
|
|
3
|
-
<button mat-icon-button [matMenuTriggerFor]="menu">
|
|
4
|
-
<mat-icon color="primary">visibility_off</mat-icon>
|
|
5
|
-
</button>
|
|
6
|
-
</span>
|
|
7
|
-
<mat-menu #menu="matMenu" class="my-mat-menu">
|
|
8
|
-
|
|
9
|
-
<button mat-menu-item>
|
|
10
|
-
<span matTooltip="Close">
|
|
11
|
-
<button class="filter-button" mat-icon-button>
|
|
12
|
-
<mat-icon>close</mat-icon>
|
|
13
|
-
</button>
|
|
14
|
-
</span>
|
|
15
|
-
</button>
|
|
16
|
-
|
|
17
|
-
<button mat-menu-item stop-propagation>
|
|
18
|
-
<span matTooltip="Show all columns">
|
|
19
|
-
<button mat-icon-button (click)="reset(displayCols)">
|
|
20
|
-
<mat-icon color="primary">done_all</mat-icon>
|
|
21
|
-
</button>
|
|
22
|
-
</span>
|
|
23
|
-
|
|
24
|
-
<span matTooltip="Hide all columns">
|
|
25
|
-
<button mat-icon-button (click)="unset(displayCols)">
|
|
26
|
-
<mat-icon color="primary">cancel</mat-icon>
|
|
27
|
-
</button>
|
|
28
|
-
</span>
|
|
29
|
-
</button>
|
|
30
|
-
|
|
31
|
-
<div cdkDropList (cdkDropListDropped)="drop($event)" stop-propagation cdkDropListLockAxis='y'>
|
|
32
|
-
<button [class.isHidden]="!col.isVisible" stop-propagation mat-menu-item cdkDrag [cdkDragData]="col"
|
|
33
|
-
*ngFor="let col of displayCols">
|
|
34
|
-
<div (click)="col.isVisible = !col.isVisible; emit(displayCols)" style="display: flex; align-items: center;">
|
|
35
|
-
<button mat-icon-button matTooltip="Hide Column" class="show-hide" *ngIf="col.isVisible; else hidden">
|
|
36
|
-
<mat-icon color="primary">check_box</mat-icon>
|
|
37
|
-
</button>
|
|
38
|
-
<p class="label">
|
|
39
|
-
{{col.displayName || (col.key | spaceCase) }}
|
|
40
|
-
</p>
|
|
41
|
-
|
|
42
|
-
<ng-template #hidden>
|
|
43
|
-
<button mat-icon-button matTooltip="Show Column" class="show-hide">
|
|
44
|
-
<mat-icon>indeterminate_check_box</mat-icon>
|
|
45
|
-
</button>
|
|
46
|
-
</ng-template>
|
|
47
|
-
|
|
48
|
-
</div>
|
|
49
|
-
</button>
|
|
50
|
-
</div>
|
|
51
|
-
</mat-menu>
|
|
52
|
-
</ng-container>
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
.show-hide {
|
|
2
|
-
margin-right: 15px;
|
|
3
|
-
height: 24px;
|
|
4
|
-
width: 24px;
|
|
5
|
-
padding: 4px;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.label {
|
|
9
|
-
color: cornflowerblue;
|
|
10
|
-
text-overflow: ellipsis;
|
|
11
|
-
overflow: hidden;
|
|
12
|
-
white-space: nowrap;
|
|
13
|
-
text-align: left;
|
|
14
|
-
margin: 0;
|
|
15
|
-
font-size: 17px;
|
|
16
|
-
font-weight: 700;
|
|
17
|
-
display: inline-block;
|
|
18
|
-
width: 66%;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.row {
|
|
22
|
-
margin: 0;
|
|
23
|
-
padding: 0;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.isHidden {
|
|
27
|
-
background-color: lightgrey;
|
|
28
|
-
color: darkgray;
|
|
29
|
-
font-weight: 700;
|
|
30
|
-
font-size: 17px;
|
|
31
|
-
white-space: nowrap;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.filter-button {
|
|
35
|
-
margin-top: 10px;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.cdk-drag-preview {
|
|
39
|
-
box-sizing: border-box;
|
|
40
|
-
border-radius: 4px;
|
|
41
|
-
box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2),
|
|
42
|
-
0 8px 10px 1px rgba(0, 0, 0, 0.14),
|
|
43
|
-
0 3px 14px 2px rgba(0, 0, 0, 0.12);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.cdk-drag-placeholder {
|
|
47
|
-
opacity: 0;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.cdk-drag-animating {
|
|
51
|
-
transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
|
|
52
|
-
}
|
|
53
|
-
.mdc-list-item__primary-text{
|
|
54
|
-
display: inline-block;
|
|
55
|
-
width: 100%;
|
|
56
|
-
}
|
|
57
|
-
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Component, ChangeDetectionStrategy} from '@angular/core';
|
|
2
|
-
import { DisplayCol } from '../../classes/display-col';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
import { map } from 'rxjs/operators';
|
|
5
|
-
import { orderViewableMetaData, TableStore } from '../../classes/table-store';
|
|
6
|
-
import {CdkDragDrop} from '@angular/cdk/drag-drop';
|
|
7
|
-
|
|
8
|
-
@Component({
|
|
9
|
-
selector: 'tb-col-displayer',
|
|
10
|
-
templateUrl: './gen-col-displayer.component.html',
|
|
11
|
-
styleUrls: ['./gen-col-displayer.component.scss'],
|
|
12
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
13
|
-
})
|
|
14
|
-
export class GenColDisplayerComponent {
|
|
15
|
-
columns$: Observable< DisplayCol[]>;
|
|
16
|
-
constructor( private tableState: TableStore ) {
|
|
17
|
-
this.columns$ = this.tableState.state$.pipe(
|
|
18
|
-
map( state =>
|
|
19
|
-
orderViewableMetaData(state)
|
|
20
|
-
.map( md => ({
|
|
21
|
-
key: md.key,
|
|
22
|
-
displayName: md.displayName,
|
|
23
|
-
isVisible: !state.hiddenKeys.includes(md.key)
|
|
24
|
-
}))
|
|
25
|
-
),
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
reset(displayCols: DisplayCol[]) {
|
|
30
|
-
displayCols.forEach(c => c.isVisible = true);
|
|
31
|
-
this.emit(displayCols);
|
|
32
|
-
}
|
|
33
|
-
drop(event: CdkDragDrop<string[]>) {
|
|
34
|
-
this.tableState.setUserDefinedOrder({newOrder:event.currentIndex,oldOrder:event.previousIndex})
|
|
35
|
-
}
|
|
36
|
-
unset(displayCols: DisplayCol[]) {
|
|
37
|
-
displayCols.forEach(c => c.isVisible = false);
|
|
38
|
-
this.emit(displayCols);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
emit(displayCols: DisplayCol[]) {
|
|
42
|
-
this.tableState.setHiddenColumns(displayCols.map( c => ({key: c.key, visible: c.isVisible})));
|
|
43
|
-
}
|
|
44
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
<mat-table
|
|
2
|
-
cdkDropList
|
|
3
|
-
cdkDropListLockAxis='x'
|
|
4
|
-
cdkDropListOrientation="horizontal"
|
|
5
|
-
(cdkDropListDropped)="drop($event)"
|
|
6
|
-
class="table-drag-list"
|
|
7
|
-
#table
|
|
8
|
-
[dataSource]="dataSource"
|
|
9
|
-
[trackBy]='trackByFunction'
|
|
10
|
-
[styler]="tableWidth | async"
|
|
11
|
-
>
|
|
12
|
-
|
|
13
|
-
<ng-container matColumnDef="select">
|
|
14
|
-
|
|
15
|
-
<mat-header-cell *matHeaderCellDef class="f-mat-header-cell" style="flex: initial; padding-left: .7rem!important;" >
|
|
16
|
-
<mat-checkbox (change)="$event ? masterToggle() : null"
|
|
17
|
-
[checked]="!!(masterToggleChecked$ | async)"
|
|
18
|
-
[indeterminate]="masterToggleIndeterminate$ | async">
|
|
19
|
-
</mat-checkbox>
|
|
20
|
-
</mat-header-cell>
|
|
21
|
-
|
|
22
|
-
<mat-cell *matCellDef="let row" style="flex: initial; padding-left: .7rem!important;">
|
|
23
|
-
<mat-checkbox *ngIf="!row.isGroupFooter"
|
|
24
|
-
(click)="$event.stopPropagation()"
|
|
25
|
-
(change)="$event ? selection.toggle(row) : null"
|
|
26
|
-
[checked]="selection.isSelected(row)">
|
|
27
|
-
</mat-checkbox>
|
|
28
|
-
</mat-cell>
|
|
29
|
-
|
|
30
|
-
<mat-footer-cell *matFooterCellDef style="flex: initial; padding-left: .7rem!important;">
|
|
31
|
-
{{ selection.selected.length }}
|
|
32
|
-
</mat-footer-cell>
|
|
33
|
-
</ng-container>
|
|
34
|
-
|
|
35
|
-
<ng-container matColumnDef="index">
|
|
36
|
-
<mat-header-cell *matHeaderCellDef class="f-mat-header-cell" >#</mat-header-cell>
|
|
37
|
-
<mat-cell *matCellDef="let i = index;"> {{ (tbPaginator.paginator.pageIndex * tbPaginator.paginator.pageSize) + i + 1 }} </mat-cell>
|
|
38
|
-
<mat-footer-cell *matFooterCellDef></mat-footer-cell>
|
|
39
|
-
|
|
40
|
-
</ng-container>
|
|
41
|
-
|
|
42
|
-
<ng-container matColumnDef="groupHeader">
|
|
43
|
-
<mat-cell *matCellDef="let row">
|
|
44
|
-
<div [style.paddingLeft]="row.padding + 'px !important'" >
|
|
45
|
-
<button mat-icon-button (click)="updateGroup(row);">
|
|
46
|
-
<mat-icon *ngIf="!row.isExpanded">chevron_right</mat-icon>
|
|
47
|
-
<mat-icon *ngIf="row.isExpanded">expand_more</mat-icon>
|
|
48
|
-
</button>
|
|
49
|
-
{{row.groupHeaderName}}
|
|
50
|
-
</div>
|
|
51
|
-
<div style="flex-grow: 1">
|
|
52
|
-
<ng-container *ngTemplateOutlet="groupHeaderTemplate; context: { element: row }"></ng-container>
|
|
53
|
-
</div>
|
|
54
|
-
</mat-cell>
|
|
55
|
-
</ng-container>
|
|
56
|
-
|
|
57
|
-
<ng-container *ngIf="showHeader$ | async">
|
|
58
|
-
<mat-header-row *matHeaderRowDef="keys; sticky: isSticky"></mat-header-row>
|
|
59
|
-
</ng-container>
|
|
60
|
-
<mat-row *matRowDef="let row; columns: keys; let i = index"></mat-row>
|
|
61
|
-
<mat-row *matRowDef="let row; columns: ['groupHeader']; when: isGroupHeader" style="background-color: white;"></mat-row>
|
|
62
|
-
<mat-row *matRowDef="let row; columns: keys; when: isGroupFooter" style="background-color: whitesmoke;"></mat-row>
|
|
63
|
-
<mat-footer-row *matFooterRowDef="keys"></mat-footer-row>
|
|
64
|
-
|
|
65
|
-
</mat-table>
|
|
66
|
-
|
|
67
|
-
<div class="flx-row-end sticky">
|
|
68
|
-
<tb-paginator #tbPaginator
|
|
69
|
-
[dataSource]="dataSource"
|
|
70
|
-
[tableElRef]="tableElRef"
|
|
71
|
-
[data$]="data$">
|
|
72
|
-
</tb-paginator>
|
|
73
|
-
|
|
74
|
-
<mat-icon [matTooltip]="(collapseFooter$ | async) ? 'expand' : 'collapse'" class="collapse-icon footer" (click)="state.toggleCollapseFooter()">
|
|
75
|
-
{{(collapseFooter$ | async) ? 'expand_more' : 'expand_less'}}
|
|
76
|
-
</mat-icon>
|
|
77
|
-
</div>
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
.mat-mdc-row:nth-child(odd) {
|
|
3
|
-
background-color: #cdeefe
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.sticky {
|
|
7
|
-
bottom: 0px;
|
|
8
|
-
position: sticky;
|
|
9
|
-
border-top: .5px solid rgba(0,0,0,.12);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.page-amounts{
|
|
13
|
-
color: rgba(0, 0, 0, 0.54);
|
|
14
|
-
font-family: Roboto, "Helvetica Neue", sans-serif;
|
|
15
|
-
font-size: 12px;
|
|
16
|
-
margin-right: .2rem;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.flx-row-end{
|
|
20
|
-
display: flex;
|
|
21
|
-
flex-direction: row;
|
|
22
|
-
justify-content: flex-end;
|
|
23
|
-
align-items: center;
|
|
24
|
-
background-color: white;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
:host::ng-deep.mat-mdc-paginator-container {
|
|
28
|
-
min-height: initial !important;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.group-header {
|
|
32
|
-
display: flex;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
:host::ng-deep .table-drag-list.cdk-drop-list-dragging .drag-header:not(.cdk-drag-placeholder) {
|
|
36
|
-
transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
|
|
37
|
-
}
|
|
38
|
-
:host::ng-deep{
|
|
39
|
-
& .mdc-data-table__cell, .mdc-data-table__header-cell, .mdc-data-table__cell, .mdc-data-table__header-cell{
|
|
40
|
-
padding: 0 0 0 .2rem;
|
|
41
|
-
line-height: normal;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Component,
|
|
3
|
-
ViewChild,
|
|
4
|
-
Input,
|
|
5
|
-
ChangeDetectionStrategy,
|
|
6
|
-
Output,
|
|
7
|
-
SimpleChanges,
|
|
8
|
-
OnInit,
|
|
9
|
-
QueryList,
|
|
10
|
-
ViewContainerRef,
|
|
11
|
-
ElementRef,
|
|
12
|
-
Injector,
|
|
13
|
-
TemplateRef,
|
|
14
|
-
} from '@angular/core';
|
|
15
|
-
import { MatSort } from '@angular/material/sort';
|
|
16
|
-
import { MatRowDef, MatTable } from '@angular/material/table';
|
|
17
|
-
import { Observable } from 'rxjs';
|
|
18
|
-
import { SelectionModel } from '@angular/cdk/collections';
|
|
19
|
-
import { TableStore } from '../../classes/table-store';
|
|
20
|
-
import { tap, map } from 'rxjs/operators';
|
|
21
|
-
import { ColumnBuilderComponent } from '../column-builder/column-builder.component';
|
|
22
|
-
import { Dictionary } from '../../interfaces/dictionary';
|
|
23
|
-
import { GenericTableDataSource } from '../../classes/GenericTableDataSource';
|
|
24
|
-
import { FieldType } from '../../interfaces/report-def';
|
|
25
|
-
import { previousAndCurrent } from '../../../rxjs/rxjs-operators';
|
|
26
|
-
import { ColumnInfo } from '../../interfaces/ColumnInfo';
|
|
27
|
-
import { CdkDragDrop, CdkDropList } from '@angular/cdk/drag-drop';
|
|
28
|
-
import { Group } from '../../classes/TableState';
|
|
29
|
-
|
|
30
|
-
@Component({
|
|
31
|
-
selector: 'tb-generic-table',
|
|
32
|
-
templateUrl: './generic-table.component.html',
|
|
33
|
-
styleUrls: ['./generic-table.component.scss','../../styles/collapser.styles.scss'],
|
|
34
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
35
|
-
})
|
|
36
|
-
export class GenericTableComponent implements OnInit {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
drop(event: CdkDragDrop<string[]>) {
|
|
40
|
-
this.state.setUserDefinedOrder({newOrder:event.currentIndex,oldOrder:event.previousIndex})
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
@Input() data$!: Observable<any[]>;
|
|
44
|
-
@Input() IndexColumn = false;
|
|
45
|
-
@Input() SelectionColumn = false;
|
|
46
|
-
@Input() trackBy!: string;
|
|
47
|
-
@Input() rows!: QueryList<MatRowDef<any>>;
|
|
48
|
-
@Input() isSticky = false;
|
|
49
|
-
@Input() columnBuilders!: ColumnBuilderComponent[];
|
|
50
|
-
@Input() columnInfos!: Observable<ColumnInfo[]>;
|
|
51
|
-
@Input() groupHeaderTemplate!: TemplateRef<any>;
|
|
52
|
-
|
|
53
|
-
private _disableSort!: boolean;
|
|
54
|
-
@Input() set disableSort(val: boolean) {
|
|
55
|
-
this._disableSort = val;
|
|
56
|
-
if (val) {
|
|
57
|
-
if (this.dataSource?.sort) {
|
|
58
|
-
this.dataSource.sort = null;
|
|
59
|
-
}
|
|
60
|
-
} else {
|
|
61
|
-
if (this.dataSource && !this.dataSource.sort) {
|
|
62
|
-
this.dataSource.sort = this.sort;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
get disableSort() { return this._disableSort; }
|
|
67
|
-
|
|
68
|
-
@ViewChild(MatTable, { static: true }) table!: MatTable<any>;
|
|
69
|
-
@ViewChild(CdkDropList, { static: true }) dropList!: CdkDropList;
|
|
70
|
-
@ViewChild('table', {read: ElementRef}) tableElRef!: ElementRef;
|
|
71
|
-
currentColumns!: string[];
|
|
72
|
-
dataSource!: GenericTableDataSource<any>;
|
|
73
|
-
keys: string [] = [];
|
|
74
|
-
injector: Injector;
|
|
75
|
-
rowDefArr :MatRowDef<any>[]= [];
|
|
76
|
-
columns:string [] = [];
|
|
77
|
-
myColumns: Dictionary<ColumnBuilderComponent> = {};
|
|
78
|
-
showHeader$!: Observable<boolean>;
|
|
79
|
-
|
|
80
|
-
constructor(
|
|
81
|
-
private sort: MatSort,
|
|
82
|
-
public state: TableStore,
|
|
83
|
-
private viewContainer: ViewContainerRef,
|
|
84
|
-
injector: Injector,
|
|
85
|
-
) {
|
|
86
|
-
|
|
87
|
-
this.injector = Injector.create({ providers: [
|
|
88
|
-
{provide: MatTable, useFactory: ()=> {return this.table} },
|
|
89
|
-
{provide: CdkDropList, useFactory: ()=> {return this.dropList} },
|
|
90
|
-
], parent: injector});
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
trackByFunction = (index:number, item: any) => {
|
|
94
|
-
if (!item) {
|
|
95
|
-
return null;
|
|
96
|
-
}
|
|
97
|
-
if (this.trackBy) {
|
|
98
|
-
return item[this.trackBy];
|
|
99
|
-
}
|
|
100
|
-
return item;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
ngOnChanges(changes: SimpleChanges) {
|
|
104
|
-
if (changes.rows && this.rows && this.myColumns.length) {
|
|
105
|
-
this.initializeRowDefs([...this.rows]);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
ngOnInit() {
|
|
110
|
-
if (this.SelectionColumn) {
|
|
111
|
-
this.columns.push('select');
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
if (this.IndexColumn) {
|
|
115
|
-
this.columns.push('index');
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
this.createDataSource();
|
|
119
|
-
|
|
120
|
-
this.state.on(this.columnInfos, columns => {
|
|
121
|
-
columns.forEach(ci => this.addMetaData(ci))
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
this.initializeRowDefs([...this.rows]);
|
|
125
|
-
|
|
126
|
-
this.state.on(this.state.displayedColumns$, keys => {
|
|
127
|
-
this.keys = [...this.columns, ...keys];
|
|
128
|
-
this.rowDefArr?.forEach(row => row.columns = this.keys)
|
|
129
|
-
});
|
|
130
|
-
|
|
131
|
-
this.showHeader$ = this.state.tableSettings$.pipe(map(settings => !(settings.hideColumnHeader)));
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
createDataSource() {
|
|
135
|
-
this.dataSource = new GenericTableDataSource(
|
|
136
|
-
this.data$.pipe(tap((d) => this.selection.clear() ))
|
|
137
|
-
);
|
|
138
|
-
|
|
139
|
-
if (!this.disableSort) {
|
|
140
|
-
this.dataSource.sort = this.sort;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
isGroupHeader(_: number, row: { isGroupHeader: boolean }) {
|
|
145
|
-
return row.isGroupHeader;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
isGroupFooter(_: number, row: { isGroupFooter: boolean }) {
|
|
149
|
-
return row.isGroupFooter;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
updateGroup(group: Group): void {
|
|
153
|
-
this.state.updateGroup({
|
|
154
|
-
...group,
|
|
155
|
-
isExpanded: !group.isExpanded
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
addMetaData(column: ColumnInfo) {
|
|
160
|
-
let columnBuilder = this.myColumns[column.metaData.key];
|
|
161
|
-
if(columnBuilder) {
|
|
162
|
-
columnBuilder.metaData = column.metaData;
|
|
163
|
-
} else {
|
|
164
|
-
const component = this.viewContainer.createComponent(ColumnBuilderComponent, {
|
|
165
|
-
index: 0,
|
|
166
|
-
injector: this.injector
|
|
167
|
-
});
|
|
168
|
-
component.instance.customCell = column.customCell;
|
|
169
|
-
component.instance.metaData = column.metaData;
|
|
170
|
-
component.instance.data$ = this.data$;
|
|
171
|
-
this.myColumns[column.metaData.key] = component.instance;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
initializeRowDefs = (defs:MatRowDef<any>[])=>{
|
|
176
|
-
this.rowDefArr.forEach(r=>this.table.removeRowDef(r));
|
|
177
|
-
this.rowDefArr = defs;
|
|
178
|
-
defs.forEach(r => {
|
|
179
|
-
r.columns = this.columns.concat(Object.values(this.myColumns).filter(c => c.metaData.fieldType !== FieldType.Hidden).map(c => c.metaData.key));
|
|
180
|
-
if (this.table) {
|
|
181
|
-
this.table.addRowDef(r);
|
|
182
|
-
}
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
selection : SelectionModel<any> = new SelectionModel<any>(true, []);
|
|
187
|
-
@Output() selection$: Observable<any> = this.selection.changed;
|
|
188
|
-
masterToggleChecked$ = this.selection$.pipe(map(()=>this.selection.hasValue() && this.isAllSelected()));
|
|
189
|
-
masterToggleIndeterminate$ = this.selection$.pipe(map(()=>this.selection.hasValue() && !this.isAllSelected()));
|
|
190
|
-
|
|
191
|
-
isAllSelected() {
|
|
192
|
-
const numSelected = this.selection.selected.length;
|
|
193
|
-
const numRows = this.dataSource.data.length;
|
|
194
|
-
return numSelected === numRows;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
/** Selects all rows if they are not all selected; otherwise clear selection. */
|
|
198
|
-
masterToggle() {
|
|
199
|
-
this.isAllSelected() ?
|
|
200
|
-
this.selection.clear() :
|
|
201
|
-
this.selection.select(...this.dataSource.data);
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
tableWidth = this.state.getUserDefinedTableSize$.pipe(
|
|
205
|
-
previousAndCurrent<number | undefined>(0),
|
|
206
|
-
map(([previousUserDefinedWidth, currentUserDefinedWidth]) => {
|
|
207
|
-
if( currentUserDefinedWidth){
|
|
208
|
-
return ({width:`${currentUserDefinedWidth}px`});
|
|
209
|
-
} if( wasReset() ){
|
|
210
|
-
return ({width:'initial'});
|
|
211
|
-
}
|
|
212
|
-
return ({});
|
|
213
|
-
|
|
214
|
-
function wasReset(){
|
|
215
|
-
return (previousUserDefinedWidth ?? 0) >=0 && currentUserDefinedWidth == null;
|
|
216
|
-
}
|
|
217
|
-
})
|
|
218
|
-
);
|
|
219
|
-
|
|
220
|
-
collapseFooter$ = this.state.state$.pipe(map(state => state.persistedTableSettings.collapseFooter));
|
|
221
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Component,
|
|
3
|
-
ChangeDetectionStrategy,
|
|
4
|
-
ViewChild,
|
|
5
|
-
Input,
|
|
6
|
-
ElementRef,
|
|
7
|
-
AfterViewInit,
|
|
8
|
-
OnInit,
|
|
9
|
-
} from '@angular/core';
|
|
10
|
-
import { MatPaginator, PageEvent } from '@angular/material/paginator';
|
|
11
|
-
import { asyncScheduler, merge, Observable } from 'rxjs';
|
|
12
|
-
import { delay, distinct, distinctUntilKeyChanged, map } from 'rxjs/operators';
|
|
13
|
-
import { GenericTableDataSource } from '../../classes/GenericTableDataSource';
|
|
14
|
-
import { TableStore } from '../../classes/table-store';
|
|
15
|
-
@Component({
|
|
16
|
-
selector: 'tb-paginator',
|
|
17
|
-
template: `
|
|
18
|
-
<div [ngClass]="{'hide' : !(collapseFooter$ | async), 'page-amounts':true}" *ngIf="currentPageData$ | async as pageData">
|
|
19
|
-
{{pageData.currentStart}} - {{pageData.currentEnd}} of {{pageData.total}}
|
|
20
|
-
</div>
|
|
21
|
-
<mat-paginator [pageSizeOptions]="[5, 10, 20, 50, 100, 500]" showFirstLastButtons (page)="paginatorChange()"
|
|
22
|
-
[ngClass]="{'hide' : (collapseFooter$ | async)}">
|
|
23
|
-
</mat-paginator>
|
|
24
|
-
`,
|
|
25
|
-
styleUrls: ['./generic-table.component.scss','../../styles/collapser.styles.scss'],
|
|
26
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
27
|
-
})
|
|
28
|
-
export class PaginatorComponent implements OnInit, AfterViewInit{
|
|
29
|
-
@Input() dataSource! : GenericTableDataSource<any>;
|
|
30
|
-
@Input() tableElRef! : ElementRef
|
|
31
|
-
@ViewChild(MatPaginator, { static: true }) paginator!: MatPaginator;
|
|
32
|
-
currentPageData$!: Observable<CurrentPageDetails>;
|
|
33
|
-
collapseFooter$!:Observable<boolean>;
|
|
34
|
-
@Input() data$!: Observable<any[]>;
|
|
35
|
-
|
|
36
|
-
constructor(private state : TableStore){}
|
|
37
|
-
ngOnInit(){
|
|
38
|
-
this.dataSource.paginator = this.paginator;
|
|
39
|
-
this.ourPageEvent = true;
|
|
40
|
-
this.state.on(metaDataPageSizeChange(this.state), setPaginatorPageSize(this.paginator));
|
|
41
|
-
this.state.setPageSize(onPagiantorPageSizeChange(this.paginator));
|
|
42
|
-
this.collapseFooter$ = this.state.state$.pipe(map(state => state.persistedTableSettings.collapseFooter));
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
ngAfterViewInit(){
|
|
46
|
-
this.currentPageData$ = merge(
|
|
47
|
-
this.paginator.page.pipe(map(mapPaginationEventToCurrentPageDetails)),
|
|
48
|
-
this.data$.pipe(
|
|
49
|
-
distinctUntilKeyChanged("length"),
|
|
50
|
-
delayToAllowForProperUpdate,
|
|
51
|
-
map(updateCurrentPageDetailsOnDataLengthChange(this.paginator)))
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
paginatorChange() : void {
|
|
56
|
-
if(!this.ourPageEvent){
|
|
57
|
-
setTimeout(() => this.tableElRef?.nativeElement?.scrollIntoView(), 0);
|
|
58
|
-
} else {
|
|
59
|
-
this.ourPageEvent = false;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
ourPageEvent = false;
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
const mapPaginationEventToCurrentPageDetails = (pageData: PageEvent):CurrentPageDetails => ({
|
|
67
|
-
currentStart : (pageData.pageIndex * pageData.pageSize) + 1,
|
|
68
|
-
currentEnd : Math.min(pageData.length , ((pageData.pageIndex + 1) * pageData.pageSize)),
|
|
69
|
-
total : pageData.length
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
const updateCurrentPageDetailsOnDataLengthChange = (paginator:MatPaginator) => () => ({currentStart:(paginator.pageIndex * paginator.pageSize) + 1,
|
|
73
|
-
currentEnd: Math.min(paginator.length , ((paginator.pageIndex + 1) * paginator.pageSize)),
|
|
74
|
-
total:paginator.length})
|
|
75
|
-
|
|
76
|
-
const delayToAllowForProperUpdate = delay<any[]>(0,asyncScheduler);
|
|
77
|
-
|
|
78
|
-
interface CurrentPageDetails {
|
|
79
|
-
currentStart:number,
|
|
80
|
-
currentEnd:number,
|
|
81
|
-
total:number
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
const metaDataPageSizeChange = (state:TableStore) => state.state$.pipe(map(state => state.pageSize),distinct());
|
|
85
|
-
|
|
86
|
-
const setPaginatorPageSize = (paginator:MatPaginator) => (pageSize: number) =>
|
|
87
|
-
paginator._changePageSize(pageSize);
|
|
88
|
-
|
|
89
|
-
const onPagiantorPageSizeChange = (paginator: MatPaginator) => paginator.page.pipe(map( e => e.pageSize ), distinct());
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
<mat-chip-set *ngrxLet="tableStore.groupByKeys$ as groupByKeys">
|
|
2
|
-
<span *ngIf="groupByKeys?.length" class="tb-group-label">Group By:</span>
|
|
3
|
-
<ng-container *ngFor="let groupByKey of groupByKeys; let i = index;">
|
|
4
|
-
<mat-icon *ngIf="i > 0" class="nested-arrow">arrow_right</mat-icon>
|
|
5
|
-
<mat-chip (removed)="tableStore.removeGroupByKey(groupByKey)">
|
|
6
|
-
{{groupByKey | spaceCase}}
|
|
7
|
-
<mat-icon matChipRemove>cancel</mat-icon>
|
|
8
|
-
</mat-chip>
|
|
9
|
-
</ng-container>
|
|
10
|
-
</mat-chip-set>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { GroupByListComponent } from './group-by-list.component';
|
|
4
|
-
|
|
5
|
-
describe('GroupByListComponent', () => {
|
|
6
|
-
let component: GroupByListComponent;
|
|
7
|
-
let fixture: ComponentFixture<GroupByListComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
declarations: [ GroupByListComponent ]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(GroupByListComponent);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
fixture.detectChanges();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should create', () => {
|
|
21
|
-
expect(component).toBeTruthy();
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Component, OnInit } from '@angular/core';
|
|
2
|
-
import { TableStore } from '../../classes/table-store';
|
|
3
|
-
|
|
4
|
-
@Component({
|
|
5
|
-
selector: 'group-by-list',
|
|
6
|
-
templateUrl: './group-by-list.component.html',
|
|
7
|
-
styleUrls: ['./group-by-list.component.css']
|
|
8
|
-
})
|
|
9
|
-
export class GroupByListComponent implements OnInit {
|
|
10
|
-
|
|
11
|
-
constructor(public tableStore: TableStore) { }
|
|
12
|
-
|
|
13
|
-
ngOnInit(): void {
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
}
|