@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,138 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { NgModule } from '@angular/core';
|
|
3
|
-
import { GenericTableComponent } from './components/generic-table/generic-table.component';
|
|
4
|
-
import { CustomCellDirective } from './directives/custom-cell-directive';
|
|
5
|
-
import { GenColDisplayerComponent } from './components/gen-col-displayer/gen-col-displayer.component';
|
|
6
|
-
import { GenFilterDisplayerComponent } from './components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component';
|
|
7
|
-
import { FilterComponent } from './components/filter/filter.component';
|
|
8
|
-
import { CommonModule, DatePipe, CurrencyPipe } from '@angular/common';
|
|
9
|
-
import { FormsModule } from '@angular/forms';
|
|
10
|
-
import { SpaceCasePipe } from '../utilities/pipes/space-case.pipes';
|
|
11
|
-
import { MaterialModule } from './material.module';
|
|
12
|
-
import { DateFilterComponent } from './components/date-filter/date-filter.component';
|
|
13
|
-
import { TableContainerComponent } from './components/table-container/table-container';
|
|
14
|
-
import { ColumnTotalPipe } from './pipes/column-total.pipe';
|
|
15
|
-
import { MultiSortDirective } from './directives/multi-sort.directive';
|
|
16
|
-
import { ColumnBuilderComponent } from './components/column-builder/column-builder.component';
|
|
17
|
-
import { ModuleWithProviders } from '@angular/core';
|
|
18
|
-
import { TableBuilderConfig, TableBuilderConfigToken } from './classes/TableBuilderConfig';
|
|
19
|
-
import { NumberFilterComponent } from './components/number-filter/number-filter.component';
|
|
20
|
-
import { StoreModule } from '@ngrx/store';
|
|
21
|
-
import { storageStateReducer } from './ngrx/reducer';
|
|
22
|
-
import { HeaderMenuComponent } from './components/header-menu/header-menu.component';
|
|
23
|
-
import { EffectsModule } from '@ngrx/effects';
|
|
24
|
-
import { SaveTableEffects } from './ngrx/effects';
|
|
25
|
-
import { KeyDisplayPipe } from './pipes/key-display';
|
|
26
|
-
import { PhoneNumberPipe } from '../utilities/pipes/phone.pipe';
|
|
27
|
-
import { RouterModule } from '@angular/router';
|
|
28
|
-
import { ArrayColumnComponent } from './components/array-column.component';
|
|
29
|
-
import { LinkColumnComponent } from './components/link-column.component';
|
|
30
|
-
import { InFilterComponent } from './components/in-filter/in-filter.component';
|
|
31
|
-
import { FormatFilterValuePipe } from './pipes/format-filter-value.pipe';
|
|
32
|
-
import { FormatFilterTypePipe } from './pipes/format-filter-type.pipe';
|
|
33
|
-
import { ResizeColumnDirective } from './directives/resize-column.directive';
|
|
34
|
-
import {LetModule} from '@ngrx/component'
|
|
35
|
-
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
36
|
-
import { InitializationComponent } from './components/initialization-component/initialization-component';
|
|
37
|
-
import { InListFilterComponent } from './components/filter/in-list/in-list-filter.component';
|
|
38
|
-
import { SortMenuComponent } from './components/sort-menu/sort-menu.component';
|
|
39
|
-
import { FilterChipsComponent } from './components/table-container-filter/filter-list/filter-list.component';
|
|
40
|
-
import { PaginatorComponent } from './components/generic-table/paginator.component';
|
|
41
|
-
import { UtilitiesModule } from '../utilities';
|
|
42
|
-
import {
|
|
43
|
-
MatButtonToggleFilterDirective,
|
|
44
|
-
MatCheckboxTbFilterDirective,
|
|
45
|
-
MatOptionTbFilterDirective,
|
|
46
|
-
MatRadioButtonTbFilterDirective,
|
|
47
|
-
MatSlideToggleTbFilterDirective,
|
|
48
|
-
TableFilterDirective,
|
|
49
|
-
TableFilterStringContainsDirective,
|
|
50
|
-
} from './directives';
|
|
51
|
-
import { TableWrapperDirective } from './directives/table-wrapper.directive';
|
|
52
|
-
import { GroupByListComponent } from './components/group-by-list/group-by-list.component';
|
|
53
|
-
|
|
54
|
-
@NgModule({
|
|
55
|
-
imports: [
|
|
56
|
-
CommonModule,
|
|
57
|
-
MaterialModule,
|
|
58
|
-
StoreModule.forFeature('globalStorageState', storageStateReducer),
|
|
59
|
-
EffectsModule.forFeature([SaveTableEffects]),
|
|
60
|
-
FormsModule,
|
|
61
|
-
RouterModule,
|
|
62
|
-
LetModule,
|
|
63
|
-
DragDropModule,
|
|
64
|
-
UtilitiesModule,
|
|
65
|
-
],
|
|
66
|
-
exports: [
|
|
67
|
-
GenericTableComponent,
|
|
68
|
-
PaginatorComponent,
|
|
69
|
-
TableContainerComponent,
|
|
70
|
-
CustomCellDirective,
|
|
71
|
-
GenColDisplayerComponent,
|
|
72
|
-
GenFilterDisplayerComponent,
|
|
73
|
-
FilterComponent,
|
|
74
|
-
MultiSortDirective,
|
|
75
|
-
ResizeColumnDirective,
|
|
76
|
-
MatSlideToggleTbFilterDirective,
|
|
77
|
-
MatRadioButtonTbFilterDirective,
|
|
78
|
-
MatOptionTbFilterDirective,
|
|
79
|
-
MatCheckboxTbFilterDirective,
|
|
80
|
-
MatButtonToggleFilterDirective,
|
|
81
|
-
TableFilterDirective,
|
|
82
|
-
TableFilterStringContainsDirective,
|
|
83
|
-
TableWrapperDirective,
|
|
84
|
-
GroupByListComponent,
|
|
85
|
-
],
|
|
86
|
-
declarations: [
|
|
87
|
-
ColumnTotalPipe,
|
|
88
|
-
TableContainerComponent,
|
|
89
|
-
GenericTableComponent,
|
|
90
|
-
PaginatorComponent,
|
|
91
|
-
CustomCellDirective,
|
|
92
|
-
GenColDisplayerComponent,
|
|
93
|
-
GenFilterDisplayerComponent,
|
|
94
|
-
DateFilterComponent,
|
|
95
|
-
FilterComponent,
|
|
96
|
-
MultiSortDirective,
|
|
97
|
-
NumberFilterComponent,
|
|
98
|
-
ColumnBuilderComponent,
|
|
99
|
-
ArrayColumnComponent,
|
|
100
|
-
LinkColumnComponent,
|
|
101
|
-
HeaderMenuComponent,
|
|
102
|
-
KeyDisplayPipe,
|
|
103
|
-
FormatFilterValuePipe,
|
|
104
|
-
FormatFilterTypePipe,
|
|
105
|
-
ResizeColumnDirective,
|
|
106
|
-
InFilterComponent,
|
|
107
|
-
InitializationComponent,
|
|
108
|
-
InListFilterComponent,
|
|
109
|
-
SortMenuComponent,
|
|
110
|
-
FilterChipsComponent,
|
|
111
|
-
MatSlideToggleTbFilterDirective,
|
|
112
|
-
MatRadioButtonTbFilterDirective,
|
|
113
|
-
MatOptionTbFilterDirective,
|
|
114
|
-
MatCheckboxTbFilterDirective,
|
|
115
|
-
MatButtonToggleFilterDirective,
|
|
116
|
-
TableFilterDirective,
|
|
117
|
-
TableFilterStringContainsDirective,
|
|
118
|
-
TableWrapperDirective,
|
|
119
|
-
GroupByListComponent,
|
|
120
|
-
],
|
|
121
|
-
providers : [
|
|
122
|
-
SpaceCasePipe,
|
|
123
|
-
DatePipe,
|
|
124
|
-
CurrencyPipe,
|
|
125
|
-
PhoneNumberPipe
|
|
126
|
-
]
|
|
127
|
-
})
|
|
128
|
-
export class TableBuilderModule {
|
|
129
|
-
static forRoot(config: TableBuilderConfig): ModuleWithProviders<TableBuilderModule> {
|
|
130
|
-
return {
|
|
131
|
-
ngModule: TableBuilderModule,
|
|
132
|
-
providers: [
|
|
133
|
-
MultiSortDirective,
|
|
134
|
-
{ provide : TableBuilderConfigToken , useValue: config}
|
|
135
|
-
]
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
}
|
package/src/test.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
2
|
-
|
|
3
|
-
import 'zone.js';
|
|
4
|
-
import 'zone.js/testing';
|
|
5
|
-
import { getTestBed } from '@angular/core/testing';
|
|
6
|
-
import {
|
|
7
|
-
BrowserDynamicTestingModule,
|
|
8
|
-
platformBrowserDynamicTesting
|
|
9
|
-
} from '@angular/platform-browser-dynamic/testing';
|
|
10
|
-
|
|
11
|
-
// First, initialize the Angular testing environment.
|
|
12
|
-
getTestBed().initTestEnvironment(
|
|
13
|
-
BrowserDynamicTestingModule,
|
|
14
|
-
platformBrowserDynamicTesting(), {
|
|
15
|
-
teardown: { destroyAfterEach: false }
|
|
16
|
-
}
|
|
17
|
-
);
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Directive, ElementRef, AfterViewInit, Input } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Directive({
|
|
4
|
-
selector: '[autoFocus]'
|
|
5
|
-
})
|
|
6
|
-
export class AutoFocusDirective implements AfterViewInit {
|
|
7
|
-
|
|
8
|
-
@Input() autoFocus = true;
|
|
9
|
-
constructor(private elementRef: ElementRef) { }
|
|
10
|
-
|
|
11
|
-
ngAfterViewInit() {
|
|
12
|
-
if(this.autoFocus){
|
|
13
|
-
setTimeout(() => {
|
|
14
|
-
this.elementRef.nativeElement.focus();
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Directive } from '@angular/core';
|
|
2
|
-
import { Subject } from 'rxjs';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
@Directive({
|
|
6
|
-
selector: '[clickEmitter]',
|
|
7
|
-
exportAs: 'clickEmitter',
|
|
8
|
-
host: {
|
|
9
|
-
'(click)': 'next(true)'
|
|
10
|
-
}
|
|
11
|
-
}) export class ClickEmitterDirective extends Subject<boolean> {
|
|
12
|
-
constructor() {
|
|
13
|
-
super();
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Directive, Input } from '@angular/core';
|
|
2
|
-
import { Subject } from 'rxjs';
|
|
3
|
-
|
|
4
|
-
@Directive({
|
|
5
|
-
selector: '[clickSubject]',
|
|
6
|
-
exportAs: 'clickSubject',
|
|
7
|
-
host: {
|
|
8
|
-
'(click)': 'next(this._val)'
|
|
9
|
-
}
|
|
10
|
-
}) export class ClickSubjectDirective<T = boolean> extends Subject<T> {
|
|
11
|
-
constructor( ) {
|
|
12
|
-
super();
|
|
13
|
-
}
|
|
14
|
-
_val!: T;
|
|
15
|
-
|
|
16
|
-
@Input('clickSubject') set clickSubject( val: T) {
|
|
17
|
-
this._val = val;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { Directive, ElementRef, Input, Renderer2, SimpleChanges } from '@angular/core';
|
|
2
|
-
import { Dictionary, Predicate } from '@ngrx/entity';
|
|
3
|
-
|
|
4
|
-
@Directive({
|
|
5
|
-
selector: '[conditionalClasses]'
|
|
6
|
-
})
|
|
7
|
-
export class ConditionalClassesDirective {
|
|
8
|
-
|
|
9
|
-
constructor(private el: ElementRef, private renderer: Renderer2) {
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
@Input() element?: any;
|
|
13
|
-
@Input('conditionalClasses') classes?: Dictionary<Predicate<any>>;
|
|
14
|
-
|
|
15
|
-
classesApplied: string[] = [];
|
|
16
|
-
|
|
17
|
-
ngOnChanges(changes: SimpleChanges) {
|
|
18
|
-
let toApply: string [] = [];
|
|
19
|
-
if(this.classes) {
|
|
20
|
-
toApply = Object.keys(this.classes)
|
|
21
|
-
.filter( key => this.classes![key]!(this.element) );
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
var classesNotYetApplied = toApply.filter( c => !this.classesApplied.includes(c) );
|
|
25
|
-
var classesToRemove = this.classesApplied.filter( c => !toApply.includes(c));
|
|
26
|
-
|
|
27
|
-
classesToRemove.forEach( c => this.renderer.removeClass( this.el.nativeElement, c ) );
|
|
28
|
-
|
|
29
|
-
classesNotYetApplied.forEach( c => this.renderer.addClass( this.el.nativeElement , c ) );
|
|
30
|
-
|
|
31
|
-
this.classesApplied = toApply;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Injectable} from '@angular/core';
|
|
2
|
-
import { MatDialogRef } from '@angular/material/dialog';
|
|
3
|
-
|
|
4
|
-
@Injectable({
|
|
5
|
-
providedIn: 'root'
|
|
6
|
-
})
|
|
7
|
-
|
|
8
|
-
export class DialogService {
|
|
9
|
-
allOpenOpDialogs: MatDialogRef<any>[] = [];
|
|
10
|
-
|
|
11
|
-
addDialogRef(ref: MatDialogRef<any>) {
|
|
12
|
-
this.allOpenOpDialogs.push(ref);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
removeDialogRef(ref: MatDialogRef<any>) {
|
|
16
|
-
this.allOpenOpDialogs = this.allOpenOpDialogs.filter(rf => ref.id !== rf.id);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
closeAllOpDialogs() {
|
|
20
|
-
this.allOpenOpDialogs.forEach(ref => ref.close());
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import { Directive, TemplateRef, Input, OnDestroy, Component, Output, EventEmitter, ViewContainerRef, Injector, ComponentFactoryResolver } from '@angular/core';
|
|
2
|
-
import { MatDialog, MatDialogRef, MatDialogConfig } from '@angular/material/dialog';
|
|
3
|
-
import { Observable, Subscription, Subject } from 'rxjs';
|
|
4
|
-
import { switchAll } from 'rxjs/operators';
|
|
5
|
-
import { DialogService } from './dialog-service';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
interface DialogViewContext<T> {
|
|
9
|
-
$implicit: T,
|
|
10
|
-
opDialog: T,
|
|
11
|
-
close: () => void,
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
@Component({
|
|
16
|
-
selector: 'app-dialog-content',
|
|
17
|
-
template: ``
|
|
18
|
-
})
|
|
19
|
-
export class DialogWrapper<T = any> {
|
|
20
|
-
viewEmbeded = false;
|
|
21
|
-
viewContext = {
|
|
22
|
-
close: () => {},
|
|
23
|
-
} as DialogViewContext<T>;
|
|
24
|
-
set template(tmpl: TemplateRef<DialogViewContext<T>>) {
|
|
25
|
-
if (this.viewEmbeded) {
|
|
26
|
-
this.vcr.clear();
|
|
27
|
-
}
|
|
28
|
-
this.viewEmbeded = true;
|
|
29
|
-
this.vcr.createEmbeddedView(tmpl, this.viewContext);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
set close(closeMethod: () => void ) {
|
|
33
|
-
this.viewContext.close = closeMethod;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
set data(value: T) {
|
|
37
|
-
this.viewContext.$implicit = value;
|
|
38
|
-
this.viewContext.opDialog = value;
|
|
39
|
-
}
|
|
40
|
-
constructor(private vcr: ViewContainerRef ) {
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
const defaultDialogConfig: MatDialogConfig = {
|
|
47
|
-
maxHeight: '95vh',
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
@Directive(
|
|
52
|
-
{ selector: '[opDialog]' }
|
|
53
|
-
) export class DialogDirective<T> implements OnDestroy {
|
|
54
|
-
@Output() opDialogClosed: EventEmitter<boolean> = new EventEmitter();
|
|
55
|
-
_dialogConfig: MatDialogConfig<T> = defaultDialogConfig;
|
|
56
|
-
@Input() add_opDialog_Class = true;
|
|
57
|
-
@Input() set opDialogConfig(config: MatDialogConfig<T>) {
|
|
58
|
-
|
|
59
|
-
this._dialogConfig = { ...defaultDialogConfig, ...config };
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
get opDialogConfig() : MatDialogConfig<T> {
|
|
63
|
-
return this._dialogConfig;
|
|
64
|
-
}
|
|
65
|
-
@Input('opDialog') set state(open_close: Observable<T>) {
|
|
66
|
-
this._data.next(open_close);
|
|
67
|
-
}
|
|
68
|
-
@Input('opDialogOrigin') nativeElement? : HTMLElement;
|
|
69
|
-
dialogRef?: MatDialogRef<any, boolean>;
|
|
70
|
-
subscription: Subscription;
|
|
71
|
-
componentWrapper?: DialogWrapper<T>;
|
|
72
|
-
|
|
73
|
-
constructor(
|
|
74
|
-
private templateRef: TemplateRef<DialogViewContext<T>>,
|
|
75
|
-
private dialog: MatDialog,
|
|
76
|
-
private service: DialogService) {
|
|
77
|
-
this.subscription = this._data.pipe(
|
|
78
|
-
switchAll()
|
|
79
|
-
).subscribe(d => {
|
|
80
|
-
if (d) {
|
|
81
|
-
this.opDialogConfig.data = d;
|
|
82
|
-
this.setDialogState(true);
|
|
83
|
-
} else {
|
|
84
|
-
this.setDialogState(false);
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
_data = new Subject<Observable<T>>();
|
|
90
|
-
|
|
91
|
-
close() {
|
|
92
|
-
this.dialogRef?.close();
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
initDialog() {
|
|
96
|
-
if(this.nativeElement){
|
|
97
|
-
const rect = this.nativeElement.getBoundingClientRect();
|
|
98
|
-
const position = { left: `${rect.left}px`, top: `${rect.bottom - 50}px` };
|
|
99
|
-
this.opDialogConfig = {...this.opDialogConfig , position};
|
|
100
|
-
}
|
|
101
|
-
if (this.add_opDialog_Class) {
|
|
102
|
-
this.opDialogConfig.panelClass = [...(Array.isArray(this.opDialogConfig.panelClass) ? this.opDialogConfig.panelClass : this.opDialogConfig.panelClass ? [this.opDialogConfig.panelClass] : []), 'opDialog'];
|
|
103
|
-
}
|
|
104
|
-
this.dialogRef = this.dialog.open(DialogWrapper, this.opDialogConfig);
|
|
105
|
-
this.componentWrapper = this.dialogRef.componentInstance;
|
|
106
|
-
this.componentWrapper!.close = () => this.dialogRef?.close();
|
|
107
|
-
this.componentWrapper!.data = this.opDialogConfig.data as T;
|
|
108
|
-
this.componentWrapper!.template = this.templateRef;
|
|
109
|
-
if (!this.opDialogConfig.disableClose) {
|
|
110
|
-
this.service.addDialogRef(this.dialogRef);
|
|
111
|
-
}
|
|
112
|
-
const sub = this.dialogRef.afterClosed().subscribe(() => {
|
|
113
|
-
this.opDialogClosed.emit(true);
|
|
114
|
-
this.service.removeDialogRef(this.dialogRef!);
|
|
115
|
-
this.dialogRef = undefined;
|
|
116
|
-
sub.unsubscribe();
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
setDialogState(open: boolean) {
|
|
121
|
-
if (open) {
|
|
122
|
-
if (!this.dialogRef) {
|
|
123
|
-
this.initDialog();
|
|
124
|
-
} else {
|
|
125
|
-
this.componentWrapper!.data = this.opDialogConfig.data as T;
|
|
126
|
-
}
|
|
127
|
-
} else if (!open && this.dialogRef) {
|
|
128
|
-
this.dialogRef.close();
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
ngOnDestroy() {
|
|
133
|
-
if (this.subscription) {
|
|
134
|
-
this.subscription.unsubscribe();
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
static ngTemplateContextGuard<T>(dir: DialogDirective<T>, ctx: any): ctx is DialogViewContext<Exclude<T, false|0|''|null|undefined>> {
|
|
139
|
-
return true;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { ContentChildren, Directive, Input, Output, QueryList } from "@angular/core";
|
|
2
|
-
import { MatSlideToggle } from "@angular/material/slide-toggle";
|
|
3
|
-
import { merge, Observable, ReplaySubject, scan, startWith, switchMap } from "rxjs";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
@Directive(
|
|
7
|
-
{ selector: '[opMatSlideToggleGroup]' ,
|
|
8
|
-
}
|
|
9
|
-
) export class MatSlideToggleGroupDirective {
|
|
10
|
-
@Input() allowMultiple = false;
|
|
11
|
-
|
|
12
|
-
_toggles!: QueryList<MatSlideToggle>;
|
|
13
|
-
@ContentChildren(MatSlideToggle) set toggles(val: QueryList<MatSlideToggle>) {
|
|
14
|
-
this._toggles = val;
|
|
15
|
-
this._ready.next(true);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
private _ready = new ReplaySubject<boolean>(1);
|
|
19
|
-
|
|
20
|
-
@Output() get valueEmitter() : Observable<{[key:string]: boolean}> {
|
|
21
|
-
return this._ready.pipe( switchMap( _ => this.getObs()));
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
getInitValue() {
|
|
26
|
-
const startValue = this._toggles.reduce( (prev,cur) => {
|
|
27
|
-
if(!cur.name) {
|
|
28
|
-
throw new Error('toggle must have the name attribute set');
|
|
29
|
-
}
|
|
30
|
-
prev[cur.name] = cur.checked
|
|
31
|
-
return prev;
|
|
32
|
-
}, {} as {[k:string]: boolean});
|
|
33
|
-
return startValue;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
getObs() {
|
|
37
|
-
var toggleChanges = merge(...this._toggles.map( toggle => toggle.change ));
|
|
38
|
-
|
|
39
|
-
const startValue = this.getInitValue();
|
|
40
|
-
|
|
41
|
-
return toggleChanges.pipe(
|
|
42
|
-
scan( (prev,cur) => {
|
|
43
|
-
const toggleName = cur.source.name!;
|
|
44
|
-
const newVal = {...prev,[toggleName]:cur.checked};
|
|
45
|
-
if(cur.checked && !this.allowMultiple) {
|
|
46
|
-
Object.keys(prev)
|
|
47
|
-
.filter( key => key !== toggleName && prev[key])
|
|
48
|
-
.forEach( key => {
|
|
49
|
-
newVal[key] = false;
|
|
50
|
-
this._toggles.find( toggle => toggle.name === key)!.toggle();
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
return newVal;
|
|
54
|
-
},startValue),
|
|
55
|
-
startWith(startValue),
|
|
56
|
-
);
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import {Directive, HostListener} from "@angular/core";
|
|
2
|
-
|
|
3
|
-
@Directive({
|
|
4
|
-
selector: "[stop-propagation]"
|
|
5
|
-
})
|
|
6
|
-
export class StopPropagationDirective
|
|
7
|
-
{
|
|
8
|
-
@HostListener("click", ["$event"])
|
|
9
|
-
public onClick(event: any): void
|
|
10
|
-
{
|
|
11
|
-
event.stopPropagation();
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
@HostListener("mousedown", ["$event"])
|
|
15
|
-
public onMousedown(event: any): void
|
|
16
|
-
{
|
|
17
|
-
event.stopPropagation();
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Directive, Input, ElementRef } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
@Directive({
|
|
5
|
-
selector: '[styler]',
|
|
6
|
-
}) export class StylerDirective {
|
|
7
|
-
@Input() set styler(styles){
|
|
8
|
-
if(styles){
|
|
9
|
-
Object.keys(styles).forEach( style => {
|
|
10
|
-
this.el.nativeElement.style[style] = styles[style];
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
constructor(private el: ElementRef) {
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Directive, ElementRef, HostListener } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Directive({
|
|
4
|
-
selector: 'input[trimWhitespace]',
|
|
5
|
-
})
|
|
6
|
-
export class TrimWhitespaceDirective {
|
|
7
|
-
|
|
8
|
-
constructor(private elem: ElementRef) { }
|
|
9
|
-
|
|
10
|
-
@HostListener('blur') onBlur() {
|
|
11
|
-
const inputString = this.elem.nativeElement.value;
|
|
12
|
-
if(inputString) {
|
|
13
|
-
const newValue = inputString.trim().replace(/\t/g, '');
|
|
14
|
-
if(inputString !== newValue) {
|
|
15
|
-
this.elem.nativeElement.value = newValue;
|
|
16
|
-
this.elem.nativeElement.dispatchEvent(new Event('input', {bubbles:true}));
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
package/src/utilities/module.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { NgModule } from "@angular/core";
|
|
2
|
-
import { AutoFocusDirective } from "./directives/auto-focus.directive";
|
|
3
|
-
import { ClickEmitterDirective } from "./directives/clickEmitterDirective";
|
|
4
|
-
import { ClickSubjectDirective } from "./directives/clickSubject";
|
|
5
|
-
import { ConditionalClassesDirective } from "./directives/conditional-classes.directive";
|
|
6
|
-
import { DialogDirective } from "./directives/dialog";
|
|
7
|
-
import { DialogService } from "./directives/dialog-service";
|
|
8
|
-
import { MatSlideToggleGroupDirective } from "./directives/mat-toggle-group-directive";
|
|
9
|
-
import { PreventEnterDirective } from "./directives/prevent-enter.directive";
|
|
10
|
-
import { StopPropagationDirective } from "./directives/stop-propagation.directive";
|
|
11
|
-
import { TrimWhitespaceDirective } from "./directives/trim-whitespace.directive";
|
|
12
|
-
import { StylerDirective } from "./directives/styler";
|
|
13
|
-
import { FunctionPipe } from "./pipes/function.pipe";
|
|
14
|
-
import { PhoneNumberPipe } from "./pipes/phone.pipe";
|
|
15
|
-
import { SpaceCasePipe } from "./pipes/space-case.pipes";
|
|
16
|
-
|
|
17
|
-
@NgModule({
|
|
18
|
-
imports: [
|
|
19
|
-
|
|
20
|
-
],
|
|
21
|
-
exports: [
|
|
22
|
-
StopPropagationDirective,
|
|
23
|
-
PreventEnterDirective,
|
|
24
|
-
SpaceCasePipe,
|
|
25
|
-
PhoneNumberPipe,
|
|
26
|
-
FunctionPipe,
|
|
27
|
-
StopPropagationDirective,
|
|
28
|
-
TrimWhitespaceDirective,
|
|
29
|
-
StylerDirective,
|
|
30
|
-
PreventEnterDirective,
|
|
31
|
-
AutoFocusDirective,
|
|
32
|
-
ClickSubjectDirective,
|
|
33
|
-
ClickEmitterDirective,
|
|
34
|
-
DialogDirective,
|
|
35
|
-
MatSlideToggleGroupDirective,
|
|
36
|
-
ConditionalClassesDirective,
|
|
37
|
-
],
|
|
38
|
-
declarations: [
|
|
39
|
-
SpaceCasePipe,
|
|
40
|
-
PhoneNumberPipe,
|
|
41
|
-
FunctionPipe,
|
|
42
|
-
StopPropagationDirective,
|
|
43
|
-
StylerDirective,
|
|
44
|
-
PreventEnterDirective,
|
|
45
|
-
AutoFocusDirective,
|
|
46
|
-
TrimWhitespaceDirective,
|
|
47
|
-
ClickSubjectDirective,
|
|
48
|
-
ClickEmitterDirective,
|
|
49
|
-
DialogDirective,
|
|
50
|
-
MatSlideToggleGroupDirective,
|
|
51
|
-
ConditionalClassesDirective,
|
|
52
|
-
],
|
|
53
|
-
providers : [
|
|
54
|
-
DialogService
|
|
55
|
-
]
|
|
56
|
-
})
|
|
57
|
-
export class UtilitiesModule {
|
|
58
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Pipe, PipeTransform } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Pipe({
|
|
4
|
-
name: 'func'
|
|
5
|
-
})
|
|
6
|
-
export class FunctionPipe implements PipeTransform {
|
|
7
|
-
transform(func: ( (...args: any[])=> any ) | string, ...args: any[]): any {
|
|
8
|
-
if(typeof func === 'string') {
|
|
9
|
-
const [instance, ...tail] = args;
|
|
10
|
-
const method = instance[func].bind(instance);
|
|
11
|
-
return method(...tail);
|
|
12
|
-
}
|
|
13
|
-
return func(...args);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Pipe, PipeTransform } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Pipe({name: 'phone'})
|
|
4
|
-
export class PhoneNumberPipe implements PipeTransform {
|
|
5
|
-
|
|
6
|
-
transform(phoneNum: string): any {
|
|
7
|
-
if (phoneNum) {
|
|
8
|
-
phoneNum = phoneNum.replace(/\D/g,'');
|
|
9
|
-
if(phoneNum[0] === '1') {
|
|
10
|
-
phoneNum = phoneNum.substring(1);
|
|
11
|
-
}
|
|
12
|
-
return '(' + phoneNum.slice(0, 3) + ') ' + phoneNum.slice(3, 6) + '-' + phoneNum.slice(6, 10) + ' ' + phoneNum.slice(10);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { SpaceCasePipe } from './space-case.pipes';
|
|
2
|
-
|
|
3
|
-
const pipe = new SpaceCasePipe();
|
|
4
|
-
|
|
5
|
-
describe('Space Case Pipe', () => {
|
|
6
|
-
|
|
7
|
-
it('one word camel case', () => {
|
|
8
|
-
const result = pipe.transform('promissory');
|
|
9
|
-
expect(result).toEqual('Promissory');
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
it('one word pascal case', () => {
|
|
13
|
-
const result = pipe.transform('Promissory');
|
|
14
|
-
expect(result).toEqual('Promissory');
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
it('two words camel case', () => {
|
|
18
|
-
const result = pipe.transform('promissoryNote');
|
|
19
|
-
expect(result).toEqual('Promissory Note');
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
it('two words pascal case', () => {
|
|
23
|
-
const result = pipe.transform('PromissoryNote');
|
|
24
|
-
expect(result).toEqual('Promissory Note');
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
it('bunch of capital letters in a row', () => {
|
|
28
|
-
const result = pipe.transform('IRALLCSingleMember');
|
|
29
|
-
expect(result).toEqual('IRALLC Single Member');
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
it('underscores', () => {
|
|
33
|
-
const result = pipe.transform('Secured_promissory_Note_more');
|
|
34
|
-
expect(result).toEqual('Secured Promissory Note More');
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
it('underscores', () => {
|
|
38
|
-
const result = pipe.transform('IRA_LLCSingleMember');
|
|
39
|
-
expect(result).toEqual('IRA LLC Single Member');
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
it('blank', () => {
|
|
43
|
-
const result = pipe.transform('');
|
|
44
|
-
expect(result).toEqual('');
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
});
|