@one-paragon/angular-utilities 2.0.0-beta.2 → 2.0.0-beta.4
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/karma.conf.js +44 -0
- package/ng-package.json +7 -0
- package/package.json +15 -27
- package/src/action-state/action-state-spinner/action-state-spinner.component.css +16 -0
- package/src/action-state/action-state-spinner/action-state-spinner.component.html +6 -0
- package/src/action-state/action-state-spinner/action-state-spinner.component.spec.ts +25 -0
- package/src/action-state/action-state-spinner/action-state-spinner.component.ts +25 -0
- package/src/action-state/action-state-ui/action-state-ui.module.ts +13 -0
- package/{action-state/index.d.ts → src/action-state/index.ts} +8 -4
- package/src/action-state/ngrx-ext/ngrx-ext.module.ts +15 -0
- package/src/action-state/ngrx.ts +69 -0
- package/src/http-request-state/HttpRequestStateFactory.ts +66 -0
- package/src/http-request-state/HttpRequestStateStore.ts +191 -0
- package/src/http-request-state/directives/HttpStateDirectiveBase.ts +29 -0
- package/src/http-request-state/directives/http-error-state-directive.ts +21 -0
- package/src/http-request-state/directives/http-inProgress-state-directive.ts +19 -0
- package/src/http-request-state/directives/http-notStarted-state-directive.ts +19 -0
- package/src/http-request-state/directives/http-success-state-directive.ts +29 -0
- package/{http-request-state/directives/index.d.ts → src/http-request-state/directives/index.ts} +5 -5
- package/src/http-request-state/directives/request-state-directive.spec.ts +72 -0
- package/src/http-request-state/directives/request-state-directive.ts +78 -0
- package/src/http-request-state/helpers.ts +30 -0
- package/src/http-request-state/http-request-state.ts +69 -0
- package/src/http-request-state/http-state-module.ts +23 -0
- package/{http-request-state/index.d.ts → src/http-request-state/index.ts} +6 -6
- package/src/http-request-state/observable.spec.ts +43 -0
- package/src/http-request-state/rxjs/getRequestorBody.ts +10 -0
- package/src/http-request-state/rxjs/getRequestorState.ts +8 -0
- package/{http-request-state/rxjs/index.d.ts → src/http-request-state/rxjs/index.ts} +4 -4
- package/src/http-request-state/rxjs/tapError.ts +16 -0
- package/src/http-request-state/rxjs/tapSuccess.ts +16 -0
- package/src/http-request-state/strategies.spec.ts +42 -0
- package/src/http-request-state/types.ts +55 -0
- package/src/ngrx/actionable-selector.ts +150 -0
- package/src/ngrx/index.ts +1 -0
- package/{public-api.d.ts → src/public-api.ts} +35 -16
- package/src/rxjs/defaultShareReplay.ts +8 -0
- package/{rxjs/index.d.ts → src/rxjs/index.ts} +5 -5
- package/src/rxjs/mapError.ts +8 -0
- package/src/rxjs/rxjs-operators.ts +132 -0
- package/src/rxjs/subjectifier.ts +17 -0
- package/src/rxjs/subscriber.directive.ts +57 -0
- package/src/specs/clickSubject.spec.ts +95 -0
- package/src/specs/dialog.spec.ts +101 -0
- package/src/specs/toggleGroupDirective.spec.ts +229 -0
- package/src/table-builder/classes/DefaultSettings.ts +11 -0
- package/src/table-builder/classes/MatTableObservableDataSource.ts +23 -0
- package/src/table-builder/classes/TableBuilderConfig.ts +42 -0
- package/src/table-builder/classes/TableBuilderDataSource.ts +66 -0
- package/src/table-builder/classes/TableState.ts +93 -0
- package/src/table-builder/classes/data-store.ts +10 -0
- package/{table-builder/classes/display-col.d.ts → src/table-builder/classes/display-col.ts} +5 -5
- package/src/table-builder/classes/filter-info.ts +123 -0
- package/src/table-builder/classes/table-builder-general-settings.ts +141 -0
- package/src/table-builder/classes/table-builder.ts +95 -0
- package/src/table-builder/classes/table-store.helpers.ts +102 -0
- package/src/table-builder/classes/table-store.ts +355 -0
- package/src/table-builder/components/array-column.component.ts +34 -0
- package/src/table-builder/components/column-builder/column-builder.component.html +69 -0
- package/src/table-builder/components/column-builder/column-builder.component.scss +43 -0
- package/src/table-builder/components/column-builder/column-builder.component.spec.ts +49 -0
- package/src/table-builder/components/column-builder/column-builder.component.ts +128 -0
- package/src/table-builder/components/column-builder/column-helpers.ts +52 -0
- package/src/table-builder/components/date-filter/date-filter.component.html +23 -0
- package/src/table-builder/components/date-filter/date-filter.component.ts +22 -0
- package/src/table-builder/components/date-time-filter/date-time-filter.component.html +9 -0
- package/src/table-builder/components/date-time-filter/date-time-filter.component.ts +20 -0
- package/src/table-builder/components/filter/filter.component.html +91 -0
- package/src/table-builder/components/filter/filter.component.scss +60 -0
- package/src/table-builder/components/filter/filter.component.spec.ts +87 -0
- package/src/table-builder/components/filter/filter.component.ts +59 -0
- package/src/table-builder/components/filter/in-list/in-list-filter.component.ts +85 -0
- package/src/table-builder/components/gen-col-displayer/gen-col-displayer.component.html +55 -0
- package/src/table-builder/components/gen-col-displayer/gen-col-displayer.component.scss +57 -0
- package/src/table-builder/components/gen-col-displayer/gen-col-displayer.component.ts +44 -0
- package/src/table-builder/components/generic-table/generic-table.component.html +77 -0
- package/src/table-builder/components/generic-table/generic-table.component.scss +38 -0
- package/src/table-builder/components/generic-table/generic-table.component.ts +330 -0
- package/src/table-builder/components/generic-table/paginator.component.ts +97 -0
- package/src/table-builder/components/group-by-list/group-by-list.component.css +8 -0
- package/src/table-builder/components/group-by-list/group-by-list.component.html +12 -0
- package/src/table-builder/components/group-by-list/group-by-list.component.spec.ts +23 -0
- package/src/table-builder/components/group-by-list/group-by-list.component.ts +18 -0
- package/src/table-builder/components/header-menu/header-menu.component.html +105 -0
- package/src/table-builder/components/header-menu/header-menu.component.scss +96 -0
- package/src/table-builder/components/header-menu/header-menu.component.ts +93 -0
- package/src/table-builder/components/in-filter/in-filter.component.css +3 -0
- package/src/table-builder/components/in-filter/in-filter.component.html +19 -0
- package/src/table-builder/components/in-filter/in-filter.component.ts +65 -0
- package/{table-builder/components/index.d.ts → src/table-builder/components/index.ts} +9 -9
- package/src/table-builder/components/initialization-component/initialization-component.html +29 -0
- package/src/table-builder/components/initialization-component/initialization-component.ts +22 -0
- package/src/table-builder/components/link-column.component.ts +45 -0
- package/src/table-builder/components/number-filter/number-filter.component.css +10 -0
- package/src/table-builder/components/number-filter/number-filter.component.html +22 -0
- package/src/table-builder/components/number-filter/number-filter.component.spec.ts +30 -0
- package/src/table-builder/components/number-filter/number-filter.component.ts +25 -0
- package/src/table-builder/components/profiles-menu/profiles-menu.component.html +73 -0
- package/src/table-builder/components/profiles-menu/profiles-menu.component.scss +126 -0
- package/src/table-builder/components/profiles-menu/profiles-menu.component.spec.ts +23 -0
- package/src/table-builder/components/profiles-menu/profiles-menu.component.ts +63 -0
- package/src/table-builder/components/scroll-strategy.ts +76 -0
- package/src/table-builder/components/sort-menu/sort-menu.component-store.ts +57 -0
- package/src/table-builder/components/sort-menu/sort-menu.component.html +109 -0
- package/src/table-builder/components/sort-menu/sort-menu.component.scss +119 -0
- package/src/table-builder/components/sort-menu/sort-menu.component.ts +88 -0
- package/{table-builder/components/table-container/table-container-imports.d.ts → src/table-builder/components/table-container/table-container-imports.ts} +27 -13
- package/src/table-builder/components/table-container/table-container.helpers/data-state.helpers.ts +141 -0
- package/src/table-builder/components/table-container/table-container.helpers/filter-state.helpers.ts +126 -0
- package/src/table-builder/components/table-container/table-container.helpers/groupBy.helpers.ts +86 -0
- package/src/table-builder/components/table-container/table-container.helpers/meta-data.helpers.ts +15 -0
- package/src/table-builder/components/table-container/table-container.helpers/sort-state.helpers.ts +45 -0
- package/src/table-builder/components/table-container/table-container.html +94 -0
- package/src/table-builder/components/table-container/table-container.scss +47 -0
- package/src/table-builder/components/table-container/table-container.spec.ts +154 -0
- package/src/table-builder/components/table-container/table-container.ts +307 -0
- package/src/table-builder/components/table-container/tableProps.ts +18 -0
- package/src/table-builder/components/table-container/virtual-scroll-container.ts +155 -0
- package/src/table-builder/components/table-container-filter/filter-list/filter-list.component.html +31 -0
- package/src/table-builder/components/table-container-filter/filter-list/filter-list.component.ts +44 -0
- package/src/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.css +42 -0
- package/src/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.html +10 -0
- package/src/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.spec.ts +85 -0
- package/src/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.ts +32 -0
- package/src/table-builder/components/table-container-filter/table-wrapper-filter-store.ts +23 -0
- package/src/table-builder/directives/custom-cell-directive.ts +58 -0
- package/{table-builder/directives/index.d.ts → src/table-builder/directives/index.ts} +6 -5
- package/src/table-builder/directives/multi-sort.directive.spec.ts +124 -0
- package/src/table-builder/directives/multi-sort.directive.ts +50 -0
- package/src/table-builder/directives/resize-column.directive.ts +107 -0
- package/src/table-builder/directives/table-wrapper.directive.ts +13 -0
- package/src/table-builder/directives/tb-filter.directive.ts +372 -0
- package/src/table-builder/enums/filterTypes.ts +40 -0
- package/src/table-builder/functions/boolean-filter-function.ts +12 -0
- package/src/table-builder/functions/date-filter-function.ts +68 -0
- package/src/table-builder/functions/download-data.ts +11 -0
- package/src/table-builder/functions/null-filter-function.ts +9 -0
- package/src/table-builder/functions/number-filter-function.ts +41 -0
- package/src/table-builder/functions/sort-data-function.ts +23 -0
- package/src/table-builder/functions/string-filter-function.ts +51 -0
- package/{table-builder/interfaces/ColumnInfo.d.ts → src/table-builder/interfaces/ColumnInfo.ts} +7 -6
- package/src/table-builder/interfaces/column-template.ts +9 -0
- package/{table-builder/interfaces/dictionary.d.ts → src/table-builder/interfaces/dictionary.ts} +3 -3
- package/src/table-builder/interfaces/report-def.ts +160 -0
- package/src/table-builder/ngrx/tableBuilderStateStore.ts +199 -0
- package/src/table-builder/pipes/column-total.pipe.ts +16 -0
- package/src/table-builder/pipes/format-filter-type.pipe.ts +12 -0
- package/src/table-builder/pipes/format-filter-value.pipe.ts +42 -0
- package/src/table-builder/pipes/key-display.ts +13 -0
- package/src/table-builder/services/export-to-csv.service.ts +75 -0
- package/src/table-builder/services/link-creator.service.ts +67 -0
- package/src/table-builder/services/table-template-service.ts +59 -0
- package/src/table-builder/services/transform-creator.ts +94 -0
- package/src/table-builder/specs/table-custom-filters.spec.ts +262 -0
- package/src/table-builder/styles/collapser.styles.scss +16 -0
- package/src/table-builder/table-builder.module.ts +73 -0
- package/src/test.ts +17 -0
- package/src/utilities/array-helpers.ts +13 -0
- package/src/utilities/directives/auto-focus.directive.ts +20 -0
- package/src/utilities/directives/clickEmitterDirective.ts +15 -0
- package/src/utilities/directives/clickSubject.ts +19 -0
- package/src/utilities/directives/conditional-classes.directive.ts +35 -0
- package/src/utilities/directives/dialog-service.ts +19 -0
- package/src/utilities/directives/dialog.ts +142 -0
- package/src/utilities/directives/mat-toggle-group-directive.ts +60 -0
- package/src/utilities/directives/prevent-enter.directive.ts +12 -0
- package/src/utilities/directives/stop-propagation.directive.ts +19 -0
- package/src/utilities/directives/styler.ts +39 -0
- package/src/utilities/directives/trim-whitespace.directive.ts +20 -0
- package/{utilities/index.d.ts → src/utilities/index.ts} +22 -15
- package/src/utilities/module.ts +55 -0
- package/src/utilities/pipes/function.pipe.ts +21 -0
- package/src/utilities/pipes/phone.pipe.ts +15 -0
- package/src/utilities/pipes/space-case.pipes.spec.ts +47 -0
- package/src/utilities/pipes/space-case.pipes.ts +26 -0
- package/tsconfig.lib.json +19 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +17 -0
- package/action-state/action-state-spinner/action-state-spinner.component.d.ts +0 -12
- package/action-state/action-state-ui/action-state-ui.module.d.ts +0 -7
- package/action-state/ngrx-ext/ngrx-ext.module.d.ts +0 -8
- package/action-state/ngrx.d.ts +0 -31
- package/fesm2022/one-paragon-angular-utilities.mjs +0 -5681
- package/fesm2022/one-paragon-angular-utilities.mjs.map +0 -1
- package/http-request-state/HttpRequestStateFactory.d.ts +0 -17
- package/http-request-state/HttpRequestStateStore.d.ts +0 -58
- package/http-request-state/directives/HttpStateDirectiveBase.d.ts +0 -14
- package/http-request-state/directives/http-error-state-directive.d.ts +0 -9
- package/http-request-state/directives/http-inProgress-state-directive.d.ts +0 -9
- package/http-request-state/directives/http-notStarted-state-directive.d.ts +0 -9
- package/http-request-state/directives/http-success-state-directive.d.ts +0 -16
- package/http-request-state/directives/request-state-directive.d.ts +0 -34
- package/http-request-state/helpers.d.ts +0 -9
- package/http-request-state/http-request-state.d.ts +0 -12
- package/http-request-state/http-state-module.d.ts +0 -11
- package/http-request-state/rxjs/getRequestorBody.d.ts +0 -3
- package/http-request-state/rxjs/getRequestorState.d.ts +0 -3
- package/http-request-state/rxjs/tapError.d.ts +0 -3
- package/http-request-state/rxjs/tapSuccess.d.ts +0 -3
- package/http-request-state/types.d.ts +0 -41
- package/index.d.ts +0 -5
- package/ngrx/actionable-selector.d.ts +0 -31
- package/ngrx/index.d.ts +0 -1
- package/rxjs/defaultShareReplay.d.ts +0 -2
- package/rxjs/mapError.d.ts +0 -2
- package/rxjs/rxjs-operators.d.ts +0 -13
- package/rxjs/subjectifier.d.ts +0 -8
- package/rxjs/subscriber.directive.d.ts +0 -14
- package/table-builder/classes/DefaultSettings.d.ts +0 -9
- package/table-builder/classes/MatTableObservableDataSource.d.ts +0 -9
- package/table-builder/classes/TableBuilderConfig.d.ts +0 -23
- package/table-builder/classes/TableBuilderDataSource.d.ts +0 -18
- package/table-builder/classes/TableState.d.ts +0 -66
- package/table-builder/classes/data-store.d.ts +0 -8
- package/table-builder/classes/filter-info.d.ts +0 -37
- package/table-builder/classes/table-builder-general-settings.d.ts +0 -85
- package/table-builder/classes/table-builder.d.ts +0 -18
- package/table-builder/classes/table-store.d.ts +0 -130
- package/table-builder/classes/table-store.helpers.d.ts +0 -28
- package/table-builder/components/array-column.component.d.ts +0 -15
- package/table-builder/components/column-builder/column-builder.component.d.ts +0 -40
- package/table-builder/components/column-builder/column-helpers.d.ts +0 -36
- package/table-builder/components/date-filter/date-filter.component.d.ts +0 -37
- package/table-builder/components/date-time-filter/date-time-filter.component.d.ts +0 -37
- package/table-builder/components/filter/filter.component.d.ts +0 -46
- package/table-builder/components/filter/in-list/in-list-filter.component.d.ts +0 -23
- package/table-builder/components/gen-col-displayer/gen-col-displayer.component.d.ts +0 -17
- package/table-builder/components/generic-table/generic-table.component.d.ts +0 -72
- package/table-builder/components/generic-table/paginator.component.d.ts +0 -28
- package/table-builder/components/group-by-list/group-by-list.component.d.ts +0 -7
- package/table-builder/components/header-menu/header-menu.component.d.ts +0 -49
- package/table-builder/components/in-filter/in-filter.component.d.ts +0 -20
- package/table-builder/components/initialization-component/initialization-component.d.ts +0 -13
- package/table-builder/components/link-column.component.d.ts +0 -25
- package/table-builder/components/number-filter/number-filter.component.d.ts +0 -39
- package/table-builder/components/profiles-menu/profiles-menu.component.d.ts +0 -32
- package/table-builder/components/scroll-strategy.d.ts +0 -22
- package/table-builder/components/sort-menu/sort-menu.component-store.d.ts +0 -24
- package/table-builder/components/sort-menu/sort-menu.component.d.ts +0 -19
- package/table-builder/components/table-container/table-container.d.ts +0 -83
- package/table-builder/components/table-container/table-container.helpers/data-state.helpers.d.ts +0 -6
- package/table-builder/components/table-container/table-container.helpers/filter-state.helpers.d.ts +0 -19
- package/table-builder/components/table-container/table-container.helpers/groupBy.helpers.d.ts +0 -17
- package/table-builder/components/table-container/table-container.helpers/meta-data.helpers.d.ts +0 -2
- package/table-builder/components/table-container/table-container.helpers/sort-state.helpers.d.ts +0 -8
- package/table-builder/components/table-container/tableProps.d.ts +0 -10
- package/table-builder/components/table-container/virtual-scroll-container.d.ts +0 -36
- package/table-builder/components/table-container-filter/filter-list/filter-list.component.d.ts +0 -15
- package/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.d.ts +0 -12
- package/table-builder/components/table-container-filter/table-wrapper-filter-store.d.ts +0 -14
- package/table-builder/directives/custom-cell-directive.d.ts +0 -32
- package/table-builder/directives/multi-sort.directive.d.ts +0 -10
- package/table-builder/directives/resize-column.directive.d.ts +0 -43
- package/table-builder/directives/table-wrapper.directive.d.ts +0 -8
- package/table-builder/directives/tb-filter.directive.d.ts +0 -113
- package/table-builder/enums/filterTypes.d.ts +0 -36
- package/table-builder/functions/boolean-filter-function.d.ts +0 -3
- package/table-builder/functions/date-filter-function.d.ts +0 -4
- package/table-builder/functions/download-data.d.ts +0 -1
- package/table-builder/functions/null-filter-function.d.ts +0 -2
- package/table-builder/functions/number-filter-function.d.ts +0 -4
- package/table-builder/functions/sort-data-function.d.ts +0 -6
- package/table-builder/functions/string-filter-function.d.ts +0 -5
- package/table-builder/interfaces/report-def.d.ts +0 -151
- package/table-builder/ngrx/tableBuilderStateStore.d.ts +0 -70
- package/table-builder/pipes/column-total.pipe.d.ts +0 -8
- package/table-builder/pipes/format-filter-type.pipe.d.ts +0 -8
- package/table-builder/pipes/format-filter-value.pipe.d.ts +0 -11
- package/table-builder/pipes/key-display.d.ts +0 -9
- package/table-builder/services/export-to-csv.service.d.ts +0 -14
- package/table-builder/services/link-creator.service.d.ts +0 -16
- package/table-builder/services/table-template-service.d.ts +0 -14
- package/table-builder/services/transform-creator.d.ts +0 -15
- package/table-builder/table-builder.module.d.ts +0 -21
- package/utilities/array-helpers.d.ts +0 -1
- package/utilities/directives/auto-focus.directive.d.ts +0 -9
- package/utilities/directives/clickEmitterDirective.d.ts +0 -7
- package/utilities/directives/clickSubject.d.ts +0 -9
- package/utilities/directives/conditional-classes.directive.d.ts +0 -13
- package/utilities/directives/dialog-service.d.ts +0 -10
- package/utilities/directives/dialog.d.ts +0 -44
- package/utilities/directives/mat-toggle-group-directive.d.ts +0 -21
- package/utilities/directives/prevent-enter.directive.d.ts +0 -6
- package/utilities/directives/stop-propagation.directive.d.ts +0 -7
- package/utilities/directives/styler.d.ts +0 -15
- package/utilities/directives/trim-whitespace.directive.d.ts +0 -7
- package/utilities/module.d.ts +0 -19
- package/utilities/pipes/function.pipe.d.ts +0 -11
- package/utilities/pipes/phone.pipe.d.ts +0 -7
- package/utilities/pipes/space-case.pipes.d.ts +0 -17
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
@use '@angular/material' as mat;
|
|
2
|
+
:host{
|
|
3
|
+
@include mat.button-density(-3);
|
|
4
|
+
@include mat.icon-density(-3);
|
|
5
|
+
}
|
|
6
|
+
input[type=number]::-webkit-inner-spin-button,
|
|
7
|
+
input[type=number]::-webkit-outer-spin-button {
|
|
8
|
+
-webkit-appearance: none;
|
|
9
|
+
margin: 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.menu-icon{
|
|
13
|
+
font-size: 16px;
|
|
14
|
+
line-height: 16px;
|
|
15
|
+
vertical-align: top;
|
|
16
|
+
height: 16px;
|
|
17
|
+
width: 16px;
|
|
18
|
+
}
|
|
19
|
+
.search-icon{
|
|
20
|
+
margin-right: 16px;
|
|
21
|
+
vertical-align: middle;
|
|
22
|
+
height: 24px;
|
|
23
|
+
color: rgba(0,0,0,.54);
|
|
24
|
+
font-size: 21px;
|
|
25
|
+
line-height: 1.125
|
|
26
|
+
}
|
|
27
|
+
.font{
|
|
28
|
+
font-size: 14px;
|
|
29
|
+
}
|
|
30
|
+
.filter-radio-button:first-of-type{
|
|
31
|
+
padding-left: 0;
|
|
32
|
+
}
|
|
33
|
+
.filter-radio-button{
|
|
34
|
+
padding: 10px 40px;
|
|
35
|
+
min-width: 110px;
|
|
36
|
+
}
|
|
37
|
+
.auto-width {
|
|
38
|
+
width: 260px;
|
|
39
|
+
margin: 5px;
|
|
40
|
+
display: block;
|
|
41
|
+
height: 55px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
.open-menu-icon-button{
|
|
46
|
+
height: 28px;
|
|
47
|
+
width: 28px;
|
|
48
|
+
padding: 6px;
|
|
49
|
+
}
|
|
50
|
+
.header-filter-icon-button {
|
|
51
|
+
height: 18px;
|
|
52
|
+
width: 18px;
|
|
53
|
+
font-size: 18px;
|
|
54
|
+
padding: 0;
|
|
55
|
+
margin: 0 2px;
|
|
56
|
+
|
|
57
|
+
::ng-deep * {
|
|
58
|
+
line-height: initial;
|
|
59
|
+
font-size: initial;
|
|
60
|
+
height: 18px;
|
|
61
|
+
width: 18px;
|
|
62
|
+
font-size: 18px;
|
|
63
|
+
bottom: initial;
|
|
64
|
+
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&.chosen-icon,
|
|
68
|
+
&.chosen-icon ::ng-deep * {
|
|
69
|
+
height: 22px;
|
|
70
|
+
width: 22px;
|
|
71
|
+
font-size: 22px;
|
|
72
|
+
color: green;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
mat-icon.mat-icon.suffix-icons.underline{
|
|
76
|
+
height: 20px;
|
|
77
|
+
text-decoration: underline 0.1px solid;
|
|
78
|
+
.chosen-icon &{
|
|
79
|
+
height: 24px;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
::ng-deep.mat-mdc-form-field-icon-prefix:has(.tb-header-prefix), .tb-header-prefix{
|
|
83
|
+
padding: 0;
|
|
84
|
+
flex-basis: 36%;
|
|
85
|
+
}
|
|
86
|
+
.tb-header-filter ::ng-deep.mat-mdc-form-field-subscript-wrapper{
|
|
87
|
+
line-height: 0;
|
|
88
|
+
&::before{
|
|
89
|
+
height: 0;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
.date-toggle ::ng-deep svg{
|
|
93
|
+
position: absolute;
|
|
94
|
+
left: 0;
|
|
95
|
+
top: 0;
|
|
96
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, inject, input, viewChild } from '@angular/core';
|
|
2
|
+
import { FieldType, MetaData } from '../../interfaces/report-def';
|
|
3
|
+
import { FilterType, FilterTypes } from '../../enums/filterTypes';
|
|
4
|
+
import { FilterInfo } from '../../classes/filter-info';
|
|
5
|
+
import { TableStore } from '../../classes/table-store';
|
|
6
|
+
import { MatMenuModule, MatMenuTrigger } from '@angular/material/menu';
|
|
7
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
8
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
9
|
+
import { FormsModule } from '@angular/forms';
|
|
10
|
+
import { InListFilterComponent } from '../filter/in-list/in-list-filter.component';
|
|
11
|
+
import { MatInputModule } from '@angular/material/input';
|
|
12
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
13
|
+
import { StopPropagationDirective } from '../../../utilities';
|
|
14
|
+
import { MatRadioModule } from '@angular/material/radio';
|
|
15
|
+
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
16
|
+
|
|
17
|
+
@Component({
|
|
18
|
+
selector: 'tb-header-menu',
|
|
19
|
+
templateUrl: './header-menu.component.html',
|
|
20
|
+
styleUrls: ['./header-menu.component.scss'],
|
|
21
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
22
|
+
imports: [
|
|
23
|
+
MatMenuModule, MatIconModule, MatButtonModule, FormsModule, InListFilterComponent,
|
|
24
|
+
MatInputModule, MatTooltipModule, StopPropagationDirective, MatRadioModule, MatDatepickerModule
|
|
25
|
+
]
|
|
26
|
+
})
|
|
27
|
+
export class HeaderMenuComponent {
|
|
28
|
+
protected tableState = inject(TableStore);
|
|
29
|
+
|
|
30
|
+
FieldType = FieldType;
|
|
31
|
+
FilterType = FilterTypes;
|
|
32
|
+
myFilterType!: FilterType;
|
|
33
|
+
|
|
34
|
+
$metaData = input.required<MetaData>({ alias: 'metaData' });
|
|
35
|
+
$trigger = viewChild(MatMenuTrigger);
|
|
36
|
+
|
|
37
|
+
hideField(key: string) {
|
|
38
|
+
this.tableState.hideColumn(key);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
ngOnInit() {
|
|
42
|
+
this.resetFilterType();
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
resetFilterType() {
|
|
46
|
+
if(this.$metaData().additional?.filterOptions?.filterableValues) {
|
|
47
|
+
this.myFilterType = FilterTypes.In;
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
switch (this.$metaData().fieldType) {
|
|
51
|
+
case FieldType.String:
|
|
52
|
+
case FieldType.Link:
|
|
53
|
+
case FieldType.PhoneNumber:
|
|
54
|
+
case FieldType.Array:
|
|
55
|
+
case FieldType.Unknown:
|
|
56
|
+
this.myFilterType = FilterTypes.StringContains;
|
|
57
|
+
break;
|
|
58
|
+
case FieldType.Currency:
|
|
59
|
+
case FieldType.Number:
|
|
60
|
+
this.myFilterType = FilterTypes.NumberEquals;
|
|
61
|
+
break;
|
|
62
|
+
case FieldType.Boolean:
|
|
63
|
+
this.myFilterType = FilterTypes.BooleanEquals;
|
|
64
|
+
break;
|
|
65
|
+
case FieldType.Date:
|
|
66
|
+
case FieldType.DateTime:
|
|
67
|
+
this.myFilterType = FilterTypes.DateIsOn;
|
|
68
|
+
break;
|
|
69
|
+
case FieldType.Enum:
|
|
70
|
+
this.myFilterType = FilterTypes.In;
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
setStringFilterType() {
|
|
76
|
+
this.myFilterType = this.myFilterType === FilterTypes.StringContains ? FilterTypes.StringDoesNotContain : FilterTypes.StringContains;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
setFilterType(filterType: FilterType) {
|
|
80
|
+
if (filterType === this.myFilterType) {
|
|
81
|
+
this.resetFilterType();
|
|
82
|
+
} else {
|
|
83
|
+
this.myFilterType = filterType;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
onEnter(filter: FilterInfo) {
|
|
88
|
+
if (filter.filterValue != undefined && filter.filterType) {
|
|
89
|
+
this.tableState.addFilter(filter);
|
|
90
|
+
this.$trigger()!.closeMenu();
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<div class=inline>
|
|
2
|
+
@for (val of value; track $index) {
|
|
3
|
+
<div>
|
|
4
|
+
@if($type() === FieldType.Number || $type() === FieldType.Currency){
|
|
5
|
+
<input [ngModel]="val" (ngModelChange)="onValueChange($index, $event)"
|
|
6
|
+
[readonly]="$index + 1 < value.length" type="number" [ngModelOptions]="{standalone:true}" [autoFocus]="$index === value.length - 1"/>
|
|
7
|
+
}
|
|
8
|
+
@else {
|
|
9
|
+
<input [ngModel]="val" (ngModelChange)="onValueChange($index ,$event)"
|
|
10
|
+
[readonly]="$index + 1 < value.length" type="string" [ngModelOptions]="{standalone:true}"
|
|
11
|
+
#input [autoFocus]="$index === value.length - 1" />
|
|
12
|
+
}
|
|
13
|
+
</div>
|
|
14
|
+
<button [disabled]="value.length <= 1" (click)="removeInput($index)">-</button>
|
|
15
|
+
@if ($index === value.length - 1) {
|
|
16
|
+
<button [disabled]="val == undefined || val === ''" (click)="addInput()">+</button>
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
</div>
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, ChangeDetectorRef, inject, input } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
3
|
+
import { FieldType } from '../../interfaces/report-def';
|
|
4
|
+
import { AutoFocusDirective } from '../../../utilities';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'lib-in-filter',
|
|
8
|
+
templateUrl: './in-filter.component.html',
|
|
9
|
+
styleUrls: ['./in-filter.component.css'],
|
|
10
|
+
changeDetection:ChangeDetectionStrategy.OnPush,
|
|
11
|
+
providers: [{
|
|
12
|
+
provide: NG_VALUE_ACCESSOR,
|
|
13
|
+
useExisting: InFilterComponent,
|
|
14
|
+
multi: true
|
|
15
|
+
}],
|
|
16
|
+
imports: [
|
|
17
|
+
FormsModule, AutoFocusDirective
|
|
18
|
+
]
|
|
19
|
+
})
|
|
20
|
+
export class InFilterComponent implements ControlValueAccessor {
|
|
21
|
+
private ref = inject(ChangeDetectorRef);
|
|
22
|
+
|
|
23
|
+
FieldType = FieldType;
|
|
24
|
+
$type = input.required<FieldType>({ alias: 'type' })
|
|
25
|
+
value: (string | number | undefined)[] = [undefined];
|
|
26
|
+
|
|
27
|
+
constructor() {
|
|
28
|
+
this.value = [undefined];
|
|
29
|
+
}
|
|
30
|
+
writeValue(obj: any[]): void {
|
|
31
|
+
if(!obj?.length) obj = [undefined];
|
|
32
|
+
this.value = obj;
|
|
33
|
+
this.ref.markForCheck();
|
|
34
|
+
}
|
|
35
|
+
onChange = (_: any) => { };
|
|
36
|
+
|
|
37
|
+
registerOnChange(fn: any): void {
|
|
38
|
+
this.onChange = fn;
|
|
39
|
+
}
|
|
40
|
+
onTouched = () => { };
|
|
41
|
+
registerOnTouched(fn: any): void {
|
|
42
|
+
this.onTouched = fn;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
addInput(){
|
|
46
|
+
this.value = [...this.value, undefined];
|
|
47
|
+
this.ref.markForCheck();
|
|
48
|
+
this.onChange(this.value);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
removeInput(index: number){
|
|
52
|
+
this.value = [...this.value];
|
|
53
|
+
this.value.splice(index,1);
|
|
54
|
+
this.ref.markForCheck();
|
|
55
|
+
this.onChange(this.value);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
onValueChange(i:number,value: number | string){
|
|
59
|
+
this.value = [...this.value];
|
|
60
|
+
this.value[i] = value;
|
|
61
|
+
this.ref.markForCheck();
|
|
62
|
+
this.onChange(this.value);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export * from './date-filter/date-filter.component';
|
|
2
|
-
export * from './filter/filter.component';
|
|
3
|
-
export * from './gen-col-displayer/gen-col-displayer.component';
|
|
4
|
-
export * from './table-container-filter/gen-filter-displayer/gen-filter-displayer.component';
|
|
5
|
-
export * from './table-container-filter/filter-list/filter-list.component';
|
|
6
|
-
export * from './generic-table/generic-table.component';
|
|
7
|
-
export * from './table-container/table-container';
|
|
8
|
-
export * from './generic-table/paginator.component';
|
|
9
|
-
export * from './group-by-list/group-by-list.component';
|
|
1
|
+
export * from './date-filter/date-filter.component';
|
|
2
|
+
export * from './filter/filter.component';
|
|
3
|
+
export * from './gen-col-displayer/gen-col-displayer.component';
|
|
4
|
+
export * from './table-container-filter/gen-filter-displayer/gen-filter-displayer.component';
|
|
5
|
+
export * from './table-container-filter/filter-list/filter-list.component';
|
|
6
|
+
export * from './generic-table/generic-table.component';
|
|
7
|
+
export * from './table-container/table-container';
|
|
8
|
+
export * from './generic-table/paginator.component';
|
|
9
|
+
export * from './group-by-list/group-by-list.component';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<ng-template #link let-value='value' let-element='element' let-additional="additional">
|
|
2
|
+
<tb-link-column [element]="element" [value]="value" [additional]="additional" />
|
|
3
|
+
</ng-template>
|
|
4
|
+
|
|
5
|
+
<ng-template #routerLink let-value='value' let-element='element' let-additional="additional">
|
|
6
|
+
<tb-router-link-column [element]="element" [value]="value" [additional]="additional"/>
|
|
7
|
+
</ng-template>
|
|
8
|
+
|
|
9
|
+
<ng-template #imageUrl let-value='value'>
|
|
10
|
+
<span>
|
|
11
|
+
<img src="{{value}}" height="75px" width="75px" />
|
|
12
|
+
</span>
|
|
13
|
+
</ng-template>
|
|
14
|
+
|
|
15
|
+
<ng-template #arrayNewLine let-value='value' let-element='element' let-additional="additional">
|
|
16
|
+
<tb-new-line-array-column [value]='value' [additional]='additional'/>
|
|
17
|
+
</ng-template>
|
|
18
|
+
|
|
19
|
+
<ng-template #arrayComma let-value='value' let-element='element' let-additional="additional">
|
|
20
|
+
<tb-comma-array-column [value]='value' [additional]='additional'/>
|
|
21
|
+
</ng-template>
|
|
22
|
+
|
|
23
|
+
<ng-template #default let-value='value'>
|
|
24
|
+
<span>{{ value }}</span>
|
|
25
|
+
</ng-template>
|
|
26
|
+
|
|
27
|
+
<ng-template #defaultWithIcon let-value='value'>
|
|
28
|
+
<mat-icon>{{ value}}</mat-icon>
|
|
29
|
+
</ng-template>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Component, TemplateRef, ViewChild } from "@angular/core";
|
|
2
|
+
import { LinkColumnComponent, RouterLinkColumnComponent } from "../link-column.component";
|
|
3
|
+
import { ArrayCommaColumnComponent, ArrayNewLineColumnComponent } from "../array-column.component";
|
|
4
|
+
import { MatIconModule } from "@angular/material/icon";
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'initialization',
|
|
8
|
+
templateUrl: './initialization-component.html',
|
|
9
|
+
imports: [
|
|
10
|
+
LinkColumnComponent, ArrayCommaColumnComponent, MatIconModule,
|
|
11
|
+
RouterLinkColumnComponent, ArrayNewLineColumnComponent
|
|
12
|
+
]
|
|
13
|
+
})
|
|
14
|
+
export class InitializationComponent {
|
|
15
|
+
@ViewChild('link', {static: true}) linkTemplate! : TemplateRef<any>;
|
|
16
|
+
@ViewChild('routerLink', {static: true}) routerLinkTemplate! : TemplateRef<any>;
|
|
17
|
+
@ViewChild('imageUrl', {static: true}) imageUrlTemplate! : TemplateRef<any>;
|
|
18
|
+
@ViewChild('arrayNewLine', {static: true}) arrayNewLineTemplate! : TemplateRef<any>;
|
|
19
|
+
@ViewChild('arrayComma', {static: true}) arrayCommaTemplate! : TemplateRef<any>;
|
|
20
|
+
@ViewChild('default', {static: true}) defaultTemplate! : TemplateRef<any>;
|
|
21
|
+
@ViewChild('defaultWithIcon', {static: true}) defaultWithIcon! : TemplateRef<any>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, computed, input } from "@angular/core";
|
|
2
|
+
import { RouterModule } from "@angular/router";
|
|
3
|
+
import { LinkInfo } from "../services/link-creator.service";
|
|
4
|
+
|
|
5
|
+
@Component({
|
|
6
|
+
selector: "tb-router-link-column",
|
|
7
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8
|
+
imports: [
|
|
9
|
+
RouterModule
|
|
10
|
+
],
|
|
11
|
+
template: `
|
|
12
|
+
<a target="{{additional().target}}"
|
|
13
|
+
[routerLink]=" [link()]"
|
|
14
|
+
[queryParams]="queryParams()"
|
|
15
|
+
[fragment]="routerLinkOptions().fragment"
|
|
16
|
+
[preserveFragment]="routerLinkOptions().preserveFragment"
|
|
17
|
+
[queryParamsHandling]="routerLinkOptions().queryParamsHandling"
|
|
18
|
+
>
|
|
19
|
+
{{value()}}
|
|
20
|
+
</a>
|
|
21
|
+
`
|
|
22
|
+
})export class RouterLinkColumnComponent {
|
|
23
|
+
additional = input.required<LinkInfo>();
|
|
24
|
+
element = input.required<any>();
|
|
25
|
+
value = input.required<string>();
|
|
26
|
+
link = computed(() => this.additional().link(this.element()));
|
|
27
|
+
queryParams = computed(() => this.additional().routerLinkOptions!.queryParams(this.element()));
|
|
28
|
+
routerLinkOptions = computed(() => this.additional().routerLinkOptions!);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@Component({
|
|
32
|
+
selector: "tb-link-column",
|
|
33
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
34
|
+
template: `
|
|
35
|
+
<a target="{{additional().target}}"
|
|
36
|
+
href="{{link()}}">
|
|
37
|
+
{{value()}}
|
|
38
|
+
</a>
|
|
39
|
+
`
|
|
40
|
+
})export class LinkColumnComponent {
|
|
41
|
+
value = input.required<string>();
|
|
42
|
+
element = input.required<any>();
|
|
43
|
+
additional = input.required<LinkInfo>();
|
|
44
|
+
link = computed(() => this.additional().link(this.element()));
|
|
45
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
@let CurrentFilterType = $currentFilterType();
|
|
2
|
+
@let info = $info();
|
|
3
|
+
|
|
4
|
+
@if(CurrentFilterType !== FilterType.NumberBetween && CurrentFilterType !== FilterType.IsNull && CurrentFilterType !== FilterType.In){
|
|
5
|
+
<mat-form-field class="my-filter">
|
|
6
|
+
<input matInput name="filterValue" [ngModel]="info.filterValue" type="number"/>
|
|
7
|
+
</mat-form-field>
|
|
8
|
+
}
|
|
9
|
+
@if(CurrentFilterType === FilterType.NumberBetween){
|
|
10
|
+
<ng-container ngModelGroup="filterValue" >
|
|
11
|
+
<mat-form-field class="my-filter">
|
|
12
|
+
<input matInput name="Start" [ngModel]="info.filterValue?.Start" placeholder="Start" type="number"/>
|
|
13
|
+
</mat-form-field>
|
|
14
|
+
<mat-form-field class="my-filter">
|
|
15
|
+
<input matInput name="End" [ngModel]="info.filterValue?.End" placeholder="End" type="number"/>
|
|
16
|
+
</mat-form-field>
|
|
17
|
+
</ng-container>
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@if (CurrentFilterType === FilterType.In) {
|
|
21
|
+
<lib-in-filter name='filterValue' [type]="FieldType.Number" [(ngModel)]='info.filterValue' />
|
|
22
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
|
2
|
+
import { FieldType } from 'projects/angular-utilities/src/public-api';
|
|
3
|
+
|
|
4
|
+
import { NumberFilterComponent } from './number-filter.component';
|
|
5
|
+
|
|
6
|
+
describe('NumberFilterComponent', () => {
|
|
7
|
+
let component: NumberFilterComponent;
|
|
8
|
+
let fixture: ComponentFixture<NumberFilterComponent>;
|
|
9
|
+
|
|
10
|
+
beforeEach(waitForAsync(() => {
|
|
11
|
+
TestBed.configureTestingModule({
|
|
12
|
+
declarations: [ NumberFilterComponent ]
|
|
13
|
+
})
|
|
14
|
+
.compileComponents();
|
|
15
|
+
}));
|
|
16
|
+
|
|
17
|
+
beforeEach(() => {
|
|
18
|
+
fixture = TestBed.createComponent(NumberFilterComponent);
|
|
19
|
+
component = fixture.componentInstance;
|
|
20
|
+
component.info = {
|
|
21
|
+
key: '',
|
|
22
|
+
fieldType: FieldType.Unknown
|
|
23
|
+
};
|
|
24
|
+
fixture.detectChanges();
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it('should create', () => {
|
|
28
|
+
expect(component).toBeTruthy();
|
|
29
|
+
});
|
|
30
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Component, ChangeDetectionStrategy, input } from '@angular/core';
|
|
2
|
+
import { FilterType, FilterTypes } from '../../enums/filterTypes';
|
|
3
|
+
import { ControlContainer, FormsModule, NgForm } from '@angular/forms';
|
|
4
|
+
import { PartialFilter } from '../../classes/filter-info';
|
|
5
|
+
import { FieldType } from '../../interfaces/report-def';
|
|
6
|
+
import { MatInputModule } from '@angular/material/input';
|
|
7
|
+
import { InFilterComponent } from '../in-filter/in-filter.component';
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@Component({
|
|
11
|
+
selector: 'tb-number-filter',
|
|
12
|
+
templateUrl: './number-filter.component.html',
|
|
13
|
+
styleUrls: ['./number-filter.component.css'],
|
|
14
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
15
|
+
viewProviders: [{provide: ControlContainer, useExisting: NgForm}],
|
|
16
|
+
imports: [
|
|
17
|
+
MatInputModule, FormsModule, InFilterComponent
|
|
18
|
+
]
|
|
19
|
+
})
|
|
20
|
+
export class NumberFilterComponent {
|
|
21
|
+
FilterType = FilterTypes;
|
|
22
|
+
FieldType = FieldType;
|
|
23
|
+
$currentFilterType = input.required<FilterType>({ alias: 'CurrentFilterType' });
|
|
24
|
+
$info = input.required<PartialFilter>({ alias: 'info' })
|
|
25
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<button mat-icon-button [matMenuTriggerFor]="menu" #trigger="matMenuTrigger" [matTooltip]="'Profiles'">
|
|
2
|
+
<mat-icon color="primary">people</mat-icon>
|
|
3
|
+
</button>
|
|
4
|
+
<mat-menu #menu="matMenu" (closed)="addedKey.value = null; allProfilesPanelOpened.set(false); newProfilePanelOpened.set(false)">
|
|
5
|
+
@if(!!$currentProfile())
|
|
6
|
+
{
|
|
7
|
+
<div mat-menu-item [matTooltip]="'Save Profile'" mat-stroked-button (click)="saveState($currentProfile()!)">
|
|
8
|
+
<mat-icon color="primary">save</mat-icon>
|
|
9
|
+
<span>{{$currentProfile()}}</span>
|
|
10
|
+
</div>
|
|
11
|
+
}
|
|
12
|
+
@else
|
|
13
|
+
{
|
|
14
|
+
<div class="profile-line">
|
|
15
|
+
<button class="first-in-line first-button" mat-stroked-button (click)="addState(defaultName, m.checked);">
|
|
16
|
+
<mat-icon class="save-for-default-icon button-save-icon" color="primary">save</mat-icon>
|
|
17
|
+
<span>Save as <span class="current-name">{{defaultName}}</span> </span>
|
|
18
|
+
</button>
|
|
19
|
+
<button [matTooltip]="'Toggle Profile Being Created As Default'" stop-propagation mat-icon-button (click)="m.toggle()" >
|
|
20
|
+
<mat-icon style="color: green;">{{m.checked ? 'star' : 'star_border'}}</mat-icon>
|
|
21
|
+
</button>
|
|
22
|
+
<mat-checkbox class="display-none" [checked]="true" #m />
|
|
23
|
+
</div>
|
|
24
|
+
}
|
|
25
|
+
@if (allProfilesPanelOpened()) {<hr class="divider"/>}
|
|
26
|
+
<div [class]="{ hide: !$keys().length, 'all-profile-row': true }" mat-menu-item stop-propagation (click)="allProfilesPanelOpened.set(!allProfilesPanelOpened())">
|
|
27
|
+
<div class="all-profiles">
|
|
28
|
+
<span>All Profiles</span>
|
|
29
|
+
<span [class]="(allProfilesPanelOpened() ? 'all-profile-arrow-close' : 'all-profile-arrow-open') + ' all-profile-arrow'" class="arrow"></span>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
<div [class]="{ hide: !allProfilesPanelOpened(), panel: true }">
|
|
33
|
+
@for (key of $keys() ; track key) {
|
|
34
|
+
<div class="profile-line" [class]="key === $currentProfile() ? 'current-in-list' : 'not-current-in-list'">
|
|
35
|
+
<button [matTooltip]="'Select Profile'" class="menu-item first-in-line" mat-stroked-button (click)='stateService.setLocalCurrentState({ tableId: $tableId(), currentStateKey: key})'>
|
|
36
|
+
<span>{{key}}</span>
|
|
37
|
+
</button>
|
|
38
|
+
@if(key !== $defaultProfile())
|
|
39
|
+
{
|
|
40
|
+
<button [matTooltip]="'Toggle Profile Being Default'" stop-propagation mat-icon-button (click)="setDefault(key)">
|
|
41
|
+
<mat-icon style="color: green;">star_border</mat-icon>
|
|
42
|
+
</button>
|
|
43
|
+
}
|
|
44
|
+
@else
|
|
45
|
+
{
|
|
46
|
+
<button [matTooltip]="'Toggle Profile Being Default'" stop-propagation mat-icon-button (click)="unsetDefault()">
|
|
47
|
+
<mat-icon style="color: green;">star</mat-icon>
|
|
48
|
+
</button>
|
|
49
|
+
}
|
|
50
|
+
<button [matTooltip]="'Delete Profile'" class="last-in-line" stop-propagation mat-icon-button (click)='stateService.deleteProfileFromLocalAndStorage($tableId(), key)'>
|
|
51
|
+
<mat-icon color='warn'>delete_forever</mat-icon>
|
|
52
|
+
</button>
|
|
53
|
+
</div>
|
|
54
|
+
}
|
|
55
|
+
<hr class="divider"/>
|
|
56
|
+
</div>
|
|
57
|
+
<div class="add-new-profile-row" mat-menu-item stop-propagation (click)="newProfilePanelOpened.set(!newProfilePanelOpened()); addedKey.focus()">Add New Profile</div>
|
|
58
|
+
<div [class]="{ hide: !newProfilePanelOpened(), panel: true }" >
|
|
59
|
+
<div class="profile-line" stop-propagation>
|
|
60
|
+
<div class="new-name-input">
|
|
61
|
+
<i class="input-hint">Enter New Name</i>
|
|
62
|
+
<input matInput #addedKey="matInput" [name]="'key'" />
|
|
63
|
+
</div>
|
|
64
|
+
<button [matTooltip]="'Toggle Profile Being Created As Default'" stop-propagation mat-icon-button (click)="m2.toggle()" >
|
|
65
|
+
<mat-icon style="color: green;">{{m2.checked ? 'star' : 'star_border'}}</mat-icon>
|
|
66
|
+
</button>
|
|
67
|
+
<mat-checkbox class="display-none" [ngModel]="!$defaultProfile()" #m2 />
|
|
68
|
+
</div>
|
|
69
|
+
<button class="add-button" color="primary" [matTooltip]="'Create New Profile'" mat-raised-button (click)="addState(addedKey.value, m2.checked); addedKey.value = null" [disabled]="!addedKey.value">
|
|
70
|
+
Add
|
|
71
|
+
</button>
|
|
72
|
+
</div>
|
|
73
|
+
</mat-menu>
|