@one-paragon/angular-utilities 0.1.0 → 0.1.2-8.beta
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 +1 -1
- package/action-state/ngrx.d.ts +1 -1
- package/esm2020/action-state/action-state-spinner/action-state-spinner.component.mjs +6 -6
- package/esm2020/action-state/action-state-ui/action-state-ui.module.mjs +6 -8
- package/esm2020/action-state/ngrx-ext/ngrx-ext.module.mjs +6 -8
- package/esm2020/action-state/ngrx.mjs +3 -3
- package/esm2020/http-request-state/HttpRequestStateFactory.mjs +3 -3
- package/esm2020/http-request-state/HttpRequestStateStore.mjs +31 -12
- package/esm2020/http-request-state/directives/HttpStateDirectiveBase.mjs +3 -3
- package/esm2020/http-request-state/directives/http-error-state-directive.mjs +3 -3
- package/esm2020/http-request-state/directives/http-inProgress-state-directive.mjs +3 -3
- package/esm2020/http-request-state/directives/http-notStarted-state-directive.mjs +3 -3
- package/esm2020/http-request-state/directives/http-success-state-directive.mjs +11 -6
- package/esm2020/http-request-state/directives/request-state-directive.mjs +7 -4
- package/esm2020/http-request-state/helpers.mjs +4 -1
- package/esm2020/http-request-state/http-state-module.mjs +5 -5
- package/esm2020/http-request-state/types.mjs +2 -1
- package/esm2020/ngrx/actionable-selector.mjs +76 -0
- package/esm2020/ngrx/index.mjs +2 -0
- package/esm2020/public-api.mjs +2 -1
- package/esm2020/rxjs/index.mjs +2 -1
- package/esm2020/rxjs/rxjs-operators.mjs +2 -2
- package/esm2020/rxjs/subjectifier.mjs +15 -0
- package/esm2020/table-builder/classes/TableState.mjs +13 -1
- package/esm2020/table-builder/classes/filter-info.mjs +3 -2
- package/esm2020/table-builder/classes/table-builder.mjs +7 -3
- package/esm2020/table-builder/classes/table-store.mjs +32 -10
- package/esm2020/table-builder/components/array-column.component.mjs +28 -28
- package/esm2020/table-builder/components/column-builder/column-builder.component.mjs +29 -17
- package/esm2020/table-builder/components/date-filter/date-filter.component.mjs +8 -8
- package/esm2020/table-builder/components/filter/filter.component.mjs +20 -20
- package/esm2020/table-builder/components/filter/in-list/in-list-filter.component.mjs +6 -6
- package/esm2020/table-builder/components/gen-col-displayer/gen-col-displayer.component.mjs +12 -12
- package/esm2020/table-builder/components/generic-table/generic-table.component.mjs +26 -13
- package/esm2020/table-builder/components/generic-table/paginator.component.mjs +7 -7
- 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 +17 -17
- package/esm2020/table-builder/components/in-filter/in-filter.component.mjs +5 -8
- package/esm2020/table-builder/components/index.mjs +2 -1
- package/esm2020/table-builder/components/initialization-component/initialization-component.mjs +10 -43
- package/esm2020/table-builder/components/link-column.component.mjs +66 -0
- package/esm2020/table-builder/components/number-filter/number-filter.component.mjs +9 -9
- package/esm2020/table-builder/components/sort-menu/sort-menu.component-store.mjs +3 -3
- package/esm2020/table-builder/components/sort-menu/sort-menu.component.mjs +14 -13
- package/esm2020/table-builder/components/table-container/table-container.mjs +103 -50
- package/esm2020/table-builder/components/table-container-filter/filter-list/filter-list.component.mjs +14 -14
- package/esm2020/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.mjs +11 -11
- package/esm2020/table-builder/components/table-container-filter/table-wrapper-filter-store.mjs +3 -3
- package/esm2020/table-builder/directives/custom-cell-directive.mjs +3 -3
- package/esm2020/table-builder/directives/index.mjs +2 -2
- package/esm2020/table-builder/directives/multi-sort.directive.mjs +3 -3
- package/esm2020/table-builder/directives/resize-column.directive.mjs +3 -3
- package/esm2020/table-builder/directives/table-wrapper.directive.mjs +10 -4
- package/esm2020/table-builder/directives/tb-filter.directive.mjs +80 -57
- package/esm2020/table-builder/interfaces/report-def.mjs +1 -1
- package/esm2020/table-builder/material.module.mjs +32 -48
- package/esm2020/table-builder/ngrx/effects.mjs +3 -3
- package/esm2020/table-builder/pipes/column-total.pipe.mjs +3 -3
- package/esm2020/table-builder/pipes/format-filter-type.pipe.mjs +3 -3
- package/esm2020/table-builder/pipes/format-filter-value.pipe.mjs +3 -3
- package/esm2020/table-builder/pipes/key-display.mjs +3 -3
- package/esm2020/table-builder/services/export-to-csv.service.mjs +6 -5
- package/esm2020/table-builder/services/link-creator.service.mjs +42 -0
- package/esm2020/table-builder/services/table-template-service.mjs +16 -10
- package/esm2020/table-builder/services/transform-creator.mjs +34 -14
- package/esm2020/table-builder/table-builder.module.mjs +29 -26
- package/esm2020/utilities/directives/auto-focus.directive.mjs +3 -3
- package/esm2020/utilities/directives/clickEmitterDirective.mjs +3 -3
- package/esm2020/utilities/directives/clickSubject.mjs +3 -3
- package/esm2020/utilities/directives/conditional-classes.directive.mjs +35 -0
- package/esm2020/utilities/directives/dialog-service.mjs +9 -9
- package/esm2020/utilities/directives/dialog.mjs +14 -8
- package/esm2020/utilities/directives/mat-toggle-group-directive.mjs +6 -5
- package/esm2020/utilities/directives/prevent-enter.directive.mjs +3 -3
- package/esm2020/utilities/directives/stop-propagation.directive.mjs +3 -3
- package/esm2020/utilities/directives/styler.mjs +3 -3
- package/esm2020/utilities/directives/trim-whitespace.directive.mjs +29 -0
- package/esm2020/utilities/index.mjs +3 -1
- package/esm2020/utilities/module.mjs +18 -8
- package/esm2020/utilities/pipes/function.pipe.mjs +3 -3
- package/esm2020/utilities/pipes/phone.pipe.mjs +3 -3
- package/esm2020/utilities/pipes/space-case.pipes.mjs +7 -7
- package/fesm2015/one-paragon-angular-utilities.mjs +1486 -1068
- package/fesm2015/one-paragon-angular-utilities.mjs.map +1 -1
- package/fesm2020/one-paragon-angular-utilities.mjs +1481 -1066
- package/fesm2020/one-paragon-angular-utilities.mjs.map +1 -1
- package/http-request-state/HttpRequestStateStore.d.ts +11 -3
- package/http-request-state/directives/HttpStateDirectiveBase.d.ts +1 -1
- package/http-request-state/directives/http-error-state-directive.d.ts +1 -1
- package/http-request-state/directives/http-inProgress-state-directive.d.ts +1 -1
- package/http-request-state/directives/http-notStarted-state-directive.d.ts +1 -1
- package/http-request-state/directives/http-success-state-directive.d.ts +9 -2
- package/http-request-state/directives/request-state-directive.d.ts +10 -4
- package/http-request-state/helpers.d.ts +1 -0
- package/http-request-state/rxjs/getRequestorState.d.ts +1 -1
- package/http-request-state/types.d.ts +6 -2
- package/ngrx/actionable-selector.d.ts +15 -0
- package/ngrx/index.d.ts +1 -0
- package/package.json +11 -11
- package/public-api.d.ts +1 -0
- package/rxjs/index.d.ts +1 -0
- package/rxjs/subjectifier.d.ts +9 -0
- package/table-builder/classes/TableState.d.ts +16 -1
- package/table-builder/classes/table-store.d.ts +14 -1
- package/table-builder/components/array-column.component.d.ts +1 -1
- package/table-builder/components/column-builder/column-builder.component.d.ts +6 -3
- package/table-builder/components/date-filter/date-filter.component.d.ts +1 -1
- package/table-builder/components/filter/filter.component.d.ts +1 -1
- package/table-builder/components/filter/in-list/in-list-filter.component.d.ts +1 -1
- package/table-builder/components/gen-col-displayer/gen-col-displayer.component.d.ts +1 -1
- package/table-builder/components/generic-table/generic-table.component.d.ts +7 -2
- package/table-builder/components/generic-table/paginator.component.d.ts +1 -1
- 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 +1 -1
- package/table-builder/components/in-filter/in-filter.component.d.ts +1 -2
- package/table-builder/components/index.d.ts +1 -0
- package/table-builder/components/initialization-component/initialization-component.d.ts +2 -12
- package/table-builder/components/link-column.component.d.ts +17 -0
- package/table-builder/components/number-filter/number-filter.component.d.ts +1 -1
- package/table-builder/components/sort-menu/sort-menu.component.d.ts +1 -1
- package/table-builder/components/table-container/table-container.d.ts +12 -4
- package/table-builder/components/table-container-filter/filter-list/filter-list.component.d.ts +1 -1
- package/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.d.ts +1 -1
- package/table-builder/directives/custom-cell-directive.d.ts +1 -1
- package/table-builder/directives/index.d.ts +1 -1
- package/table-builder/directives/multi-sort.directive.d.ts +1 -1
- package/table-builder/directives/resize-column.directive.d.ts +1 -1
- package/table-builder/directives/table-wrapper.directive.d.ts +3 -1
- package/table-builder/directives/tb-filter.directive.d.ts +27 -26
- package/table-builder/interfaces/report-def.d.ts +18 -6
- package/table-builder/material.module.d.ts +15 -17
- package/table-builder/ngrx/selectors.d.ts +6 -6
- package/table-builder/pipes/column-total.pipe.d.ts +1 -1
- package/table-builder/pipes/format-filter-type.pipe.d.ts +1 -1
- package/table-builder/pipes/format-filter-value.pipe.d.ts +1 -1
- package/table-builder/pipes/key-display.d.ts +1 -1
- package/table-builder/services/link-creator.service.d.ts +12 -0
- package/table-builder/services/table-template-service.d.ts +2 -2
- package/table-builder/services/transform-creator.d.ts +3 -1
- package/table-builder/table-builder.module.d.ts +24 -22
- package/utilities/directives/auto-focus.directive.d.ts +1 -1
- package/utilities/directives/clickEmitterDirective.d.ts +1 -1
- package/utilities/directives/clickSubject.d.ts +1 -1
- package/utilities/directives/conditional-classes.directive.d.ts +14 -0
- package/utilities/directives/dialog-service.d.ts +2 -2
- package/utilities/directives/dialog.d.ts +3 -2
- package/utilities/directives/mat-toggle-group-directive.d.ts +1 -1
- package/utilities/directives/prevent-enter.directive.d.ts +1 -1
- package/utilities/directives/stop-propagation.directive.d.ts +1 -1
- package/utilities/directives/styler.d.ts +1 -1
- package/utilities/directives/trim-whitespace.directive.d.ts +9 -0
- package/utilities/index.d.ts +2 -0
- package/utilities/module.d.ts +7 -5
- package/utilities/pipes/function.pipe.d.ts +1 -1
- package/utilities/pipes/phone.pipe.d.ts +1 -1
- package/utilities/pipes/space-case.pipes.d.ts +1 -1
- /package/{one-paragon-angular-utilities.d.ts → index.d.ts} +0 -0
|
@@ -1,76 +1,73 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive, Input, NgModule, Injectable, InjectionToken, Pipe,
|
|
3
|
-
import { shareReplay, switchAll, map, filter, tap, catchError, startWith, switchMap, mergeMap,
|
|
4
|
-
import * as
|
|
5
|
-
import { Subject, isObservable, of, ReplaySubject, filter as filter$1, first, map as map$1, Observable, combineLatest, Subscription, startWith as startWith$1, pairwise, concatMap, merge, delay, fromEvent, asyncScheduler, tap as tap$1, BehaviorSubject, takeUntil as takeUntil$1, from
|
|
2
|
+
import { Directive, Input, NgModule, Injectable, InjectionToken, Pipe, HostListener, Component, EventEmitter, Output, ContentChildren, Inject, ChangeDetectionStrategy, ViewChild, Injector, ElementRef, Optional } from '@angular/core';
|
|
3
|
+
import { shareReplay, switchAll, map, filter, tap, catchError, startWith, switchMap, mergeMap, concatMap, last, takeUntil, distinctUntilKeyChanged, delay as delay$1, distinct, first as first$1, distinctUntilChanged, withLatestFrom, mergeAll, scan as scan$1 } from 'rxjs/operators';
|
|
4
|
+
import * as i3$3 from 'rxjs';
|
|
5
|
+
import { Subject, isObservable, of, ReplaySubject, filter as filter$1, first, map as map$1, Observable, combineLatest, Subscription, startWith as startWith$1, pairwise, concatMap as concatMap$1, merge, delay, switchMap as switchMap$1, scan, fromEvent, asyncScheduler, tap as tap$1, BehaviorSubject, takeUntil as takeUntil$1, from } from 'rxjs';
|
|
6
6
|
import { ComponentStore } from '@ngrx/component-store';
|
|
7
|
-
import * as
|
|
7
|
+
import * as i4$4 from '@angular/material/table';
|
|
8
8
|
import { MatColumnDef, MatTableDataSource, MatTable, MatTableModule, MatRowDef } from '@angular/material/table';
|
|
9
9
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import * as i10 from '@angular/cdk/drag-drop';
|
|
10
|
+
import { flatten, get, merge as merge$1, sumBy, orderBy, groupBy, flattenDeep, cloneDeep, set } from 'lodash';
|
|
11
|
+
import * as i9 from '@angular/cdk/drag-drop';
|
|
13
12
|
import { moveItemInArray, CDK_DROP_LIST, CdkDropList, transferArrayItem, DragDropModule } from '@angular/cdk/drag-drop';
|
|
14
|
-
import * as
|
|
13
|
+
import * as i2 from '@angular/common';
|
|
15
14
|
import { CommonModule, DatePipe, CurrencyPipe } from '@angular/common';
|
|
15
|
+
import * as i1 from '@angular/material/dialog';
|
|
16
|
+
import { MatDialogModule } from '@angular/material/dialog';
|
|
17
|
+
import * as i5$1 from '@angular/material/slide-toggle';
|
|
18
|
+
import { MatSlideToggle, MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
16
19
|
import { v4 } from 'uuid';
|
|
17
20
|
import update from 'immutability-helper';
|
|
18
|
-
import * as
|
|
21
|
+
import * as i7 from '@angular/material/icon';
|
|
19
22
|
import { MatIconModule } from '@angular/material/icon';
|
|
20
|
-
import * as
|
|
23
|
+
import * as i3 from '@angular/router';
|
|
21
24
|
import { RouterModule } from '@angular/router';
|
|
25
|
+
import * as i8 from '@ngrx/component';
|
|
26
|
+
import { LetModule } from '@ngrx/component';
|
|
27
|
+
import * as i5 from '@angular/material/tooltip';
|
|
28
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
22
29
|
import * as i1$1 from '@angular/material/sort';
|
|
23
30
|
import { MatSortModule, MatSort } from '@angular/material/sort';
|
|
24
|
-
import * as
|
|
31
|
+
import * as i6$1 from '@angular/material/menu';
|
|
25
32
|
import { MatMenuTrigger, MatMenuModule } from '@angular/material/menu';
|
|
26
|
-
import * as i3$1 from '@angular/material/
|
|
33
|
+
import * as i3$1 from '@angular/material/form-field';
|
|
34
|
+
import * as i4$1 from '@angular/material/datepicker';
|
|
35
|
+
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
36
|
+
import * as i6 from '@angular/material/radio';
|
|
37
|
+
import { MatRadioModule } from '@angular/material/radio';
|
|
38
|
+
import * as i4$2 from '@angular/material/button';
|
|
27
39
|
import { MatButtonModule } from '@angular/material/button';
|
|
28
|
-
import * as
|
|
40
|
+
import * as i8$1 from '@angular/material/input';
|
|
41
|
+
import { MatInputModule } from '@angular/material/input';
|
|
42
|
+
import * as i4$3 from '@angular/forms';
|
|
29
43
|
import { NG_VALUE_ACCESSOR, ControlContainer, NgForm, FormsModule } from '@angular/forms';
|
|
30
|
-
import * as
|
|
44
|
+
import * as i4 from '@angular/material/checkbox';
|
|
31
45
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
32
|
-
import * as
|
|
33
|
-
import * as i7 from '@angular/material/radio';
|
|
34
|
-
import { MatRadioModule } from '@angular/material/radio';
|
|
35
|
-
import * as i8 from '@angular/material/datepicker';
|
|
36
|
-
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
37
|
-
import * as i4$3 from '@angular/material/input';
|
|
38
|
-
import { MatInputModule } from '@angular/material/input';
|
|
39
|
-
import * as i13 from '@angular/material/tooltip';
|
|
40
|
-
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
41
|
-
import * as i7$1 from '@ngrx/component';
|
|
42
|
-
import { ReactiveComponentModule } from '@ngrx/component';
|
|
43
|
-
import * as i2 from '@angular/material/paginator';
|
|
46
|
+
import * as i3$2 from '@angular/material/paginator';
|
|
44
47
|
import { MatPaginator, MatPaginatorModule } from '@angular/material/paginator';
|
|
45
48
|
import * as i1$2 from '@angular/cdk/table';
|
|
46
|
-
import * as
|
|
47
|
-
import { MatCardModule } from '@angular/material/card';
|
|
48
|
-
import * as i6$1 from '@angular/material/select';
|
|
49
|
+
import * as i4$5 from '@angular/material/select';
|
|
49
50
|
import { MatSelectModule } from '@angular/material/select';
|
|
50
|
-
import * as
|
|
51
|
+
import * as i7$1 from '@angular/material/core';
|
|
51
52
|
import { MatNativeDateModule } from '@angular/material/core';
|
|
53
|
+
import * as i9$1 from '@angular/material/card';
|
|
54
|
+
import { MatCardModule } from '@angular/material/card';
|
|
52
55
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
53
56
|
import { MatBadgeModule } from '@angular/material/badge';
|
|
54
|
-
import * as i1$3 from '@angular/material/dialog';
|
|
55
|
-
import { MatDialogModule } from '@angular/material/dialog';
|
|
56
57
|
import { MatExpansionModule } from '@angular/material/expansion';
|
|
57
58
|
import { MatGridListModule } from '@angular/material/grid-list';
|
|
58
|
-
import
|
|
59
|
-
import * as i1$5 from '@angular/material/progress-spinner';
|
|
59
|
+
import * as i2$1 from '@angular/material/progress-spinner';
|
|
60
60
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
61
61
|
import { MatSidenavModule } from '@angular/material/sidenav';
|
|
62
|
-
import * as i4$4 from '@angular/material/slide-toggle';
|
|
63
|
-
import { MatSlideToggleModule, MatSlideToggle } from '@angular/material/slide-toggle';
|
|
64
|
-
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
|
65
62
|
import { MatStepperModule } from '@angular/material/stepper';
|
|
66
63
|
import { MatTabsModule } from '@angular/material/tabs';
|
|
67
64
|
import { MatToolbarModule } from '@angular/material/toolbar';
|
|
68
|
-
import * as
|
|
65
|
+
import * as i7$2 from '@angular/material/chips';
|
|
69
66
|
import { MatChipsModule } from '@angular/material/chips';
|
|
70
|
-
import * as
|
|
71
|
-
import * as i3$
|
|
72
|
-
import { createSelector, createAction, props, select, createReducer, on, StoreModule, createFeatureSelector } from '@ngrx/store';
|
|
73
|
-
import * as i1$
|
|
67
|
+
import * as i8$2 from '@angular/material/button-toggle';
|
|
68
|
+
import * as i3$4 from '@ngrx/store';
|
|
69
|
+
import { createSelector, createAction, props, select, createReducer, on, StoreModule, createFeatureSelector, Store } from '@ngrx/store';
|
|
70
|
+
import * as i1$3 from '@ngrx/effects';
|
|
74
71
|
import { createEffect, ofType, concatLatestFrom, EffectsModule } from '@ngrx/effects';
|
|
75
72
|
import { createEntityAdapter } from '@ngrx/entity';
|
|
76
73
|
|
|
@@ -87,6 +84,7 @@ var HttpRequestStrategy;
|
|
|
87
84
|
HttpRequestStrategy[HttpRequestStrategy["concurrent"] = 1] = "concurrent";
|
|
88
85
|
HttpRequestStrategy[HttpRequestStrategy["singleUse"] = 2] = "singleUse";
|
|
89
86
|
HttpRequestStrategy[HttpRequestStrategy["cancelPrevious"] = 3] = "cancelPrevious";
|
|
87
|
+
HttpRequestStrategy[HttpRequestStrategy["sequential"] = 4] = "sequential";
|
|
90
88
|
})(HttpRequestStrategy || (HttpRequestStrategy = {}));
|
|
91
89
|
|
|
92
90
|
function isErrorState(state) {
|
|
@@ -95,6 +93,9 @@ function isErrorState(state) {
|
|
|
95
93
|
function isSuccessState(state) {
|
|
96
94
|
return state.status === HttpRequestStatus.success;
|
|
97
95
|
}
|
|
96
|
+
function isSuccessOrErrorState(state) {
|
|
97
|
+
return state.status === HttpRequestStatus.success || state.status === HttpRequestStatus.fail;
|
|
98
|
+
}
|
|
98
99
|
function createSuccess(body) {
|
|
99
100
|
return { status: HttpRequestStatus.success, body };
|
|
100
101
|
}
|
|
@@ -153,10 +154,13 @@ class HttpRequestStateDirective {
|
|
|
153
154
|
this.viewContainer.clear();
|
|
154
155
|
this.subscription.unsubscribe();
|
|
155
156
|
}
|
|
157
|
+
static ngTemplateContextGuard(dir, ctx) {
|
|
158
|
+
return true;
|
|
159
|
+
}
|
|
156
160
|
}
|
|
157
|
-
HttpRequestStateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
158
|
-
HttpRequestStateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
159
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
161
|
+
HttpRequestStateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: HttpRequestStateDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
162
|
+
HttpRequestStateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: HttpRequestStateDirective, selector: "[httpRequestState]", inputs: { stateStore: ["httpRequestState", "stateStore"] }, ngImport: i0 });
|
|
163
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: HttpRequestStateDirective, decorators: [{
|
|
160
164
|
type: Directive,
|
|
161
165
|
args: [{ selector: '[httpRequestState]' }]
|
|
162
166
|
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; }, propDecorators: { stateStore: [{
|
|
@@ -189,9 +193,9 @@ class HttpStateDirectiveBase {
|
|
|
189
193
|
ngOnDestroy() {
|
|
190
194
|
}
|
|
191
195
|
}
|
|
192
|
-
HttpStateDirectiveBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
193
|
-
HttpStateDirectiveBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
194
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
196
|
+
HttpStateDirectiveBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: HttpStateDirectiveBase, deps: [{ token: i0.Injector }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
197
|
+
HttpStateDirectiveBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: HttpStateDirectiveBase, ngImport: i0 });
|
|
198
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: HttpStateDirectiveBase, decorators: [{
|
|
195
199
|
type: Directive
|
|
196
200
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; } });
|
|
197
201
|
|
|
@@ -213,9 +217,9 @@ class HttpErrorStateDirective extends HttpStateDirectiveBase {
|
|
|
213
217
|
super.ngOnDestroy();
|
|
214
218
|
}
|
|
215
219
|
}
|
|
216
|
-
HttpErrorStateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
217
|
-
HttpErrorStateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
218
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
220
|
+
HttpErrorStateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: HttpErrorStateDirective, deps: [{ token: i0.Injector }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
221
|
+
HttpErrorStateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: HttpErrorStateDirective, selector: "[httpErrorState]", usesInheritance: true, ngImport: i0 });
|
|
222
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: HttpErrorStateDirective, decorators: [{
|
|
219
223
|
type: Directive,
|
|
220
224
|
args: [{ selector: '[httpErrorState]' }]
|
|
221
225
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; } });
|
|
@@ -238,9 +242,9 @@ class HttpInProgressStateDirective extends HttpStateDirectiveBase {
|
|
|
238
242
|
super.ngOnDestroy();
|
|
239
243
|
}
|
|
240
244
|
}
|
|
241
|
-
HttpInProgressStateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
242
|
-
HttpInProgressStateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
243
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
245
|
+
HttpInProgressStateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: HttpInProgressStateDirective, deps: [{ token: i0.Injector }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
246
|
+
HttpInProgressStateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: HttpInProgressStateDirective, selector: "[httpInProgressState]", usesInheritance: true, ngImport: i0 });
|
|
247
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: HttpInProgressStateDirective, decorators: [{
|
|
244
248
|
type: Directive,
|
|
245
249
|
args: [{ selector: '[httpInProgressState]' }]
|
|
246
250
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; } });
|
|
@@ -263,9 +267,9 @@ class HttpNotStartedStateDirective extends HttpStateDirectiveBase {
|
|
|
263
267
|
super.ngOnDestroy();
|
|
264
268
|
}
|
|
265
269
|
}
|
|
266
|
-
HttpNotStartedStateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
267
|
-
HttpNotStartedStateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
268
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
270
|
+
HttpNotStartedStateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: HttpNotStartedStateDirective, deps: [{ token: i0.Injector }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
271
|
+
HttpNotStartedStateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: HttpNotStartedStateDirective, selector: "[httpNotStartedState]", usesInheritance: true, ngImport: i0 });
|
|
272
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: HttpNotStartedStateDirective, decorators: [{
|
|
269
273
|
type: Directive,
|
|
270
274
|
args: [{ selector: '[httpNotStartedState]' }]
|
|
271
275
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; } });
|
|
@@ -287,13 +291,18 @@ class HttpSuccessStateDirective extends HttpStateDirectiveBase {
|
|
|
287
291
|
ngOnDestroy() {
|
|
288
292
|
super.ngOnDestroy();
|
|
289
293
|
}
|
|
294
|
+
static ngTemplateContextGuard(dir, ctx) {
|
|
295
|
+
return true;
|
|
296
|
+
}
|
|
290
297
|
}
|
|
291
|
-
HttpSuccessStateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
292
|
-
HttpSuccessStateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
293
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
298
|
+
HttpSuccessStateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: HttpSuccessStateDirective, deps: [{ token: i0.Injector }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
299
|
+
HttpSuccessStateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: HttpSuccessStateDirective, selector: "[httpSuccessState]", inputs: { httpSuccessStateTypeSafety: "httpSuccessStateTypeSafety" }, usesInheritance: true, ngImport: i0 });
|
|
300
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: HttpSuccessStateDirective, decorators: [{
|
|
294
301
|
type: Directive,
|
|
295
302
|
args: [{ selector: '[httpSuccessState]' }]
|
|
296
|
-
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; }
|
|
303
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; }, propDecorators: { httpSuccessStateTypeSafety: [{
|
|
304
|
+
type: Input
|
|
305
|
+
}] } });
|
|
297
306
|
|
|
298
307
|
const getRequestorBody = (source) => source.pipe(filter(isSuccessState), map(res => res.body));
|
|
299
308
|
|
|
@@ -358,8 +367,8 @@ function chainRequest(httpState$, request, requestParams) {
|
|
|
358
367
|
|
|
359
368
|
class HttpRequestModule {
|
|
360
369
|
}
|
|
361
|
-
HttpRequestModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
362
|
-
HttpRequestModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
370
|
+
HttpRequestModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: HttpRequestModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
371
|
+
HttpRequestModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: HttpRequestModule, declarations: [HttpSuccessStateDirective,
|
|
363
372
|
HttpRequestStateDirective,
|
|
364
373
|
HttpErrorStateDirective,
|
|
365
374
|
HttpInProgressStateDirective,
|
|
@@ -368,8 +377,8 @@ HttpRequestModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versi
|
|
|
368
377
|
HttpErrorStateDirective,
|
|
369
378
|
HttpInProgressStateDirective,
|
|
370
379
|
HttpNotStartedStateDirective] });
|
|
371
|
-
HttpRequestModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
372
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
380
|
+
HttpRequestModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: HttpRequestModule });
|
|
381
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: HttpRequestModule, decorators: [{
|
|
373
382
|
type: NgModule,
|
|
374
383
|
args: [{
|
|
375
384
|
providers: [],
|
|
@@ -396,10 +405,12 @@ class HttpRequestStateStore extends ComponentStore {
|
|
|
396
405
|
this.req = req;
|
|
397
406
|
this.options = options;
|
|
398
407
|
this.flatteningStrategy = () => {
|
|
399
|
-
if (this.options?.strategy
|
|
400
|
-
return
|
|
401
|
-
|
|
402
|
-
|
|
408
|
+
if (this.options?.strategy === HttpRequestStrategy.concurrent)
|
|
409
|
+
return mergeMap((params) => this.createRequest(...params));
|
|
410
|
+
if (this.options?.strategy === HttpRequestStrategy.sequential)
|
|
411
|
+
return concatMap((params) => this.createRequest(...params));
|
|
412
|
+
return switchMap((params) => (params[0] instanceof CancellationToken) ?
|
|
413
|
+
of({ requestParams: params[0], response: { status: HttpRequestStatus.cancelled } }) : this.createRequest(...params));
|
|
403
414
|
};
|
|
404
415
|
this.requestEffect = this.effect((obs) => {
|
|
405
416
|
return (obs).pipe(this.flatteningStrategy(), tap(state => this.setState(state)));
|
|
@@ -413,10 +424,11 @@ class HttpRequestStateStore extends ComponentStore {
|
|
|
413
424
|
}
|
|
414
425
|
return this.requestEffect(value);
|
|
415
426
|
};
|
|
416
|
-
this.selectHttpState$ = this.state$.pipe(
|
|
417
|
-
this.selectStatus$ = this.selectHttpState$.pipe(
|
|
427
|
+
this.selectHttpState$ = this.state$.pipe(map(a => a.response));
|
|
428
|
+
this.selectStatus$ = this.selectHttpState$.pipe(map(a => a.status));
|
|
418
429
|
this.selectError$ = this.state$.pipe(map(r => r.response), filter(isErrorState), map(state => state.error));
|
|
419
430
|
this.selectResponse$ = this.state$.pipe(map(r => r.response), filter(isSuccessState), map(state => state.body));
|
|
431
|
+
this.selectSuccessOrError$ = this.state$.pipe(map(r => r.response), filter(isSuccessOrErrorState), map(() => null));
|
|
420
432
|
this.errorHandled = false;
|
|
421
433
|
this.on = (srcObservable, func) => {
|
|
422
434
|
return this.effect((src) => {
|
|
@@ -437,12 +449,25 @@ class HttpRequestStateStore extends ComponentStore {
|
|
|
437
449
|
this.on(this.selectResponse$, cb);
|
|
438
450
|
return this;
|
|
439
451
|
}
|
|
452
|
+
onSuccessOrError(cb) {
|
|
453
|
+
this.on(this.selectSuccessOrError$, cb);
|
|
454
|
+
return this;
|
|
455
|
+
}
|
|
440
456
|
onSuccessWithRequest(func) {
|
|
441
457
|
this.onUpdate(({ requestParams, response }) => {
|
|
442
458
|
if (isSuccessState(response)) {
|
|
443
459
|
func({ requestParams, body: response.body });
|
|
444
460
|
}
|
|
445
461
|
});
|
|
462
|
+
return this;
|
|
463
|
+
}
|
|
464
|
+
onErrorWithRequest(func) {
|
|
465
|
+
this.onUpdate(({ requestParams, response }) => {
|
|
466
|
+
if (isErrorState(response)) {
|
|
467
|
+
func({ requestParams, error: response.error });
|
|
468
|
+
}
|
|
469
|
+
});
|
|
470
|
+
return this;
|
|
446
471
|
}
|
|
447
472
|
createRequest(...params) {
|
|
448
473
|
return this.req(...params).pipe(map(createSuccess), mapError(createFailure), startWith(inProgress), map(state => ({ requestParams: params, response: state })), defaultShareReplay());
|
|
@@ -454,11 +479,13 @@ class HttpRequestStateStore extends ComponentStore {
|
|
|
454
479
|
super.ngOnDestroy();
|
|
455
480
|
}
|
|
456
481
|
}
|
|
457
|
-
HttpRequestStateStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
458
|
-
HttpRequestStateStore.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
459
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
482
|
+
HttpRequestStateStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: HttpRequestStateStore, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
|
483
|
+
HttpRequestStateStore.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: HttpRequestStateStore, usesInheritance: true, ngImport: i0 });
|
|
484
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: HttpRequestStateStore, decorators: [{
|
|
460
485
|
type: Directive
|
|
461
486
|
}], ctorParameters: function () { return [{ type: undefined }, { type: undefined }]; } });
|
|
487
|
+
class CancellationToken {
|
|
488
|
+
}
|
|
462
489
|
|
|
463
490
|
class HttpRequestStateFactory {
|
|
464
491
|
constructor() {
|
|
@@ -478,9 +505,9 @@ class HttpRequestStateFactory {
|
|
|
478
505
|
return requestor;
|
|
479
506
|
}
|
|
480
507
|
}
|
|
481
|
-
HttpRequestStateFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
482
|
-
HttpRequestStateFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
483
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
508
|
+
HttpRequestStateFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: HttpRequestStateFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
509
|
+
HttpRequestStateFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: HttpRequestStateFactory });
|
|
510
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: HttpRequestStateFactory, decorators: [{
|
|
484
511
|
type: Injectable
|
|
485
512
|
}], ctorParameters: function () { return []; } });
|
|
486
513
|
|
|
@@ -591,12 +618,12 @@ function previousAndCurrent(startingValue) {
|
|
|
591
618
|
}
|
|
592
619
|
function notNull() {
|
|
593
620
|
return (source) => {
|
|
594
|
-
return source.pipe(filter$1((o) =>
|
|
621
|
+
return source.pipe(filter$1((o) => o != null));
|
|
595
622
|
};
|
|
596
623
|
}
|
|
597
624
|
function delayOn(predicate, delayTime) {
|
|
598
625
|
return (src) => {
|
|
599
|
-
return src.pipe(concatMap(r => {
|
|
626
|
+
return src.pipe(concatMap$1(r => {
|
|
600
627
|
if (predicate(r)) {
|
|
601
628
|
return merge(of({ r }), of(null).pipe(delay(delayTime))).pipe(notNull(), map$1(d => d.r));
|
|
602
629
|
}
|
|
@@ -620,160 +647,709 @@ class PhoneNumberPipe {
|
|
|
620
647
|
}
|
|
621
648
|
}
|
|
622
649
|
}
|
|
623
|
-
PhoneNumberPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
624
|
-
PhoneNumberPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "
|
|
625
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
650
|
+
PhoneNumberPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: PhoneNumberPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
651
|
+
PhoneNumberPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: PhoneNumberPipe, name: "phone" });
|
|
652
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: PhoneNumberPipe, decorators: [{
|
|
626
653
|
type: Pipe,
|
|
627
654
|
args: [{ name: 'phone' }]
|
|
628
655
|
}] });
|
|
629
656
|
|
|
630
|
-
|
|
631
|
-
|
|
657
|
+
class PreventEnterDirective {
|
|
658
|
+
onKeyDown() {
|
|
659
|
+
return false;
|
|
660
|
+
}
|
|
632
661
|
}
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
662
|
+
PreventEnterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: PreventEnterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
663
|
+
PreventEnterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: PreventEnterDirective, selector: "preventEnter", host: { listeners: { "keydown.enter": "onKeyDown($event)" } }, ngImport: i0 });
|
|
664
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: PreventEnterDirective, decorators: [{
|
|
665
|
+
type: Directive,
|
|
666
|
+
args: [{
|
|
667
|
+
selector: 'preventEnter'
|
|
668
|
+
}]
|
|
669
|
+
}], propDecorators: { onKeyDown: [{
|
|
670
|
+
type: HostListener,
|
|
671
|
+
args: ['keydown.enter', ['$event']]
|
|
672
|
+
}] } });
|
|
673
|
+
|
|
674
|
+
class StopPropagationDirective {
|
|
675
|
+
onClick(event) {
|
|
676
|
+
event.stopPropagation();
|
|
639
677
|
}
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
if (isPipe(metaData.transform)) {
|
|
643
|
-
return metaData.transform.transform;
|
|
644
|
-
}
|
|
645
|
-
return metaData.transform;
|
|
646
|
-
}
|
|
647
|
-
if (this.config.transformers && this.config.transformers[metaData.fieldType]) {
|
|
648
|
-
return this.config.transformers[metaData.fieldType];
|
|
649
|
-
}
|
|
650
|
-
switch (metaData.fieldType) {
|
|
651
|
-
case FieldType.Date:
|
|
652
|
-
const dateFormat = metaData.additional?.dateFormat ?? this.config.defaultSettings?.dateFormat ?? 'shortDate';
|
|
653
|
-
return (value) => this.datePipe.transform(value, dateFormat);
|
|
654
|
-
case FieldType.Currency:
|
|
655
|
-
return this.currencyPipe.transform;
|
|
656
|
-
case FieldType.PhoneNumber:
|
|
657
|
-
return this.phonePipe.transform;
|
|
658
|
-
}
|
|
659
|
-
return (value) => value;
|
|
678
|
+
onMousedown(event) {
|
|
679
|
+
event.stopPropagation();
|
|
660
680
|
}
|
|
661
681
|
}
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
665
|
-
type:
|
|
682
|
+
StopPropagationDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: StopPropagationDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
683
|
+
StopPropagationDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: StopPropagationDirective, selector: "[stop-propagation]", host: { listeners: { "click": "onClick($event)", "mousedown": "onMousedown($event)" } }, ngImport: i0 });
|
|
684
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: StopPropagationDirective, decorators: [{
|
|
685
|
+
type: Directive,
|
|
666
686
|
args: [{
|
|
667
|
-
|
|
687
|
+
selector: "[stop-propagation]"
|
|
668
688
|
}]
|
|
669
|
-
}],
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
689
|
+
}], propDecorators: { onClick: [{
|
|
690
|
+
type: HostListener,
|
|
691
|
+
args: ["click", ["$event"]]
|
|
692
|
+
}], onMousedown: [{
|
|
693
|
+
type: HostListener,
|
|
694
|
+
args: ["mousedown", ["$event"]]
|
|
695
|
+
}] } });
|
|
673
696
|
|
|
674
|
-
class
|
|
675
|
-
constructor(
|
|
676
|
-
this.
|
|
677
|
-
this.
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
697
|
+
class AutoFocusDirective {
|
|
698
|
+
constructor(elementRef) {
|
|
699
|
+
this.elementRef = elementRef;
|
|
700
|
+
this.autoFocus = true;
|
|
701
|
+
}
|
|
702
|
+
ngAfterViewInit() {
|
|
703
|
+
if (this.autoFocus) {
|
|
704
|
+
setTimeout(() => {
|
|
705
|
+
this.elementRef.nativeElement.focus();
|
|
706
|
+
});
|
|
683
707
|
}
|
|
684
708
|
}
|
|
685
709
|
}
|
|
686
|
-
|
|
710
|
+
AutoFocusDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: AutoFocusDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
711
|
+
AutoFocusDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: AutoFocusDirective, selector: "[autoFocus]", inputs: { autoFocus: "autoFocus" }, ngImport: i0 });
|
|
712
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: AutoFocusDirective, decorators: [{
|
|
713
|
+
type: Directive,
|
|
714
|
+
args: [{
|
|
715
|
+
selector: '[autoFocus]'
|
|
716
|
+
}]
|
|
717
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { autoFocus: [{
|
|
718
|
+
type: Input
|
|
719
|
+
}] } });
|
|
720
|
+
|
|
721
|
+
class ClickSubjectDirective extends Subject {
|
|
687
722
|
constructor() {
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
this.
|
|
692
|
-
this.hideSort = false;
|
|
693
|
-
this.collapse = false;
|
|
694
|
-
this.showTitleWhenCollapsed = true;
|
|
723
|
+
super();
|
|
724
|
+
}
|
|
725
|
+
set clickSubject(val) {
|
|
726
|
+
this._val = val;
|
|
695
727
|
}
|
|
696
728
|
}
|
|
697
|
-
|
|
729
|
+
ClickSubjectDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClickSubjectDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
730
|
+
ClickSubjectDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: ClickSubjectDirective, selector: "[clickSubject]", inputs: { clickSubject: "clickSubject" }, host: { listeners: { "click": "next(this._val)" } }, exportAs: ["clickSubject"], usesInheritance: true, ngImport: i0 });
|
|
731
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClickSubjectDirective, decorators: [{
|
|
732
|
+
type: Directive,
|
|
733
|
+
args: [{
|
|
734
|
+
selector: '[clickSubject]',
|
|
735
|
+
exportAs: 'clickSubject',
|
|
736
|
+
host: {
|
|
737
|
+
'(click)': 'next(this._val)'
|
|
738
|
+
}
|
|
739
|
+
}]
|
|
740
|
+
}], ctorParameters: function () { return []; }, propDecorators: { clickSubject: [{
|
|
741
|
+
type: Input,
|
|
742
|
+
args: ['clickSubject']
|
|
743
|
+
}] } });
|
|
744
|
+
|
|
745
|
+
class ClickEmitterDirective extends Subject {
|
|
698
746
|
constructor() {
|
|
699
|
-
|
|
747
|
+
super();
|
|
700
748
|
}
|
|
701
749
|
}
|
|
702
|
-
|
|
750
|
+
ClickEmitterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClickEmitterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
751
|
+
ClickEmitterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: ClickEmitterDirective, selector: "[clickEmitter]", host: { listeners: { "click": "next(true)" } }, exportAs: ["clickEmitter"], usesInheritance: true, ngImport: i0 });
|
|
752
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClickEmitterDirective, decorators: [{
|
|
753
|
+
type: Directive,
|
|
754
|
+
args: [{
|
|
755
|
+
selector: '[clickEmitter]',
|
|
756
|
+
exportAs: 'clickEmitter',
|
|
757
|
+
host: {
|
|
758
|
+
'(click)': 'next(true)'
|
|
759
|
+
}
|
|
760
|
+
}]
|
|
761
|
+
}], ctorParameters: function () { return []; } });
|
|
762
|
+
|
|
763
|
+
class DialogService {
|
|
703
764
|
constructor() {
|
|
704
|
-
this.
|
|
705
|
-
this.noHeader = false;
|
|
765
|
+
this.allOpenOpDialogs = [];
|
|
706
766
|
}
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
this.
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
}
|
|
767
|
+
addDialogRef(ref) {
|
|
768
|
+
this.allOpenOpDialogs.push(ref);
|
|
769
|
+
}
|
|
770
|
+
removeDialogRef(ref) {
|
|
771
|
+
this.allOpenOpDialogs = this.allOpenOpDialogs.filter(rf => ref.id !== rf.id);
|
|
772
|
+
}
|
|
773
|
+
closeAllOpDialogs() {
|
|
774
|
+
this.allOpenOpDialogs.forEach(ref => ref.close());
|
|
716
775
|
}
|
|
717
776
|
}
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
777
|
+
DialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
778
|
+
DialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DialogService, providedIn: 'root' });
|
|
779
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DialogService, decorators: [{
|
|
780
|
+
type: Injectable,
|
|
781
|
+
args: [{
|
|
782
|
+
providedIn: 'root'
|
|
783
|
+
}]
|
|
784
|
+
}] });
|
|
785
|
+
|
|
786
|
+
class DialogWrapper {
|
|
787
|
+
constructor(vcr) {
|
|
788
|
+
this.vcr = vcr;
|
|
789
|
+
this.viewEmbeded = false;
|
|
790
|
+
this.viewContext = {
|
|
791
|
+
close: () => { },
|
|
792
|
+
};
|
|
793
|
+
}
|
|
794
|
+
set template(tmpl) {
|
|
795
|
+
if (this.viewEmbeded) {
|
|
796
|
+
this.vcr.clear();
|
|
737
797
|
}
|
|
798
|
+
this.viewEmbeded = true;
|
|
799
|
+
this.vcr.createEmbeddedView(tmpl, this.viewContext);
|
|
800
|
+
}
|
|
801
|
+
set close(closeMethod) {
|
|
802
|
+
this.viewContext.close = closeMethod;
|
|
803
|
+
}
|
|
804
|
+
set data(value) {
|
|
805
|
+
this.viewContext.$implicit = value;
|
|
806
|
+
this.viewContext.opDialog = value;
|
|
738
807
|
}
|
|
739
808
|
}
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
(
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
filters: {},
|
|
752
|
-
hiddenKeys: [],
|
|
753
|
-
sorted: [],
|
|
754
|
-
userDefined: { order: {}, widths: {}, table: {} },
|
|
755
|
-
persistedTableSettings: new PesrsistedTableSettings(),
|
|
756
|
-
notPersisitedTableSettings: new NotPersisitedTableSettings(),
|
|
757
|
-
pageSize: 10,
|
|
809
|
+
DialogWrapper.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DialogWrapper, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
810
|
+
DialogWrapper.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: DialogWrapper, selector: "app-dialog-content", ngImport: i0, template: ``, isInline: true });
|
|
811
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DialogWrapper, decorators: [{
|
|
812
|
+
type: Component,
|
|
813
|
+
args: [{
|
|
814
|
+
selector: 'app-dialog-content',
|
|
815
|
+
template: ``
|
|
816
|
+
}]
|
|
817
|
+
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; } });
|
|
818
|
+
const defaultDialogConfig = {
|
|
819
|
+
maxHeight: '95vh',
|
|
758
820
|
};
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
821
|
+
class DialogDirective {
|
|
822
|
+
constructor(templateRef, dialog, service) {
|
|
823
|
+
this.templateRef = templateRef;
|
|
824
|
+
this.dialog = dialog;
|
|
825
|
+
this.service = service;
|
|
826
|
+
this.opDialogClosed = new EventEmitter();
|
|
827
|
+
this._dialogConfig = defaultDialogConfig;
|
|
828
|
+
this.add_opDialog_Class = true;
|
|
829
|
+
this._data = new Subject();
|
|
830
|
+
this.subscription = this._data.pipe(switchAll()).subscribe(d => {
|
|
831
|
+
if (d) {
|
|
832
|
+
this.opDialogConfig.data = d;
|
|
833
|
+
this.setDialogState(true);
|
|
834
|
+
}
|
|
835
|
+
else {
|
|
836
|
+
this.setDialogState(false);
|
|
837
|
+
}
|
|
838
|
+
});
|
|
839
|
+
}
|
|
840
|
+
set opDialogConfig(config) {
|
|
841
|
+
this._dialogConfig = { ...defaultDialogConfig, ...config };
|
|
842
|
+
}
|
|
843
|
+
get opDialogConfig() {
|
|
844
|
+
return this._dialogConfig;
|
|
845
|
+
}
|
|
846
|
+
set state(open_close) {
|
|
847
|
+
this._data.next(open_close);
|
|
848
|
+
}
|
|
849
|
+
close() {
|
|
850
|
+
this.dialogRef?.close();
|
|
851
|
+
}
|
|
852
|
+
initDialog() {
|
|
853
|
+
if (this.nativeElement) {
|
|
854
|
+
const rect = this.nativeElement.getBoundingClientRect();
|
|
855
|
+
const position = { left: `${rect.left}px`, top: `${rect.bottom - 50}px` };
|
|
856
|
+
this.opDialogConfig = { ...this.opDialogConfig, position };
|
|
857
|
+
}
|
|
858
|
+
if (this.add_opDialog_Class) {
|
|
859
|
+
this.opDialogConfig.panelClass = [...(Array.isArray(this.opDialogConfig.panelClass) ? this.opDialogConfig.panelClass : this.opDialogConfig.panelClass ? [this.opDialogConfig.panelClass] : []), 'opDialog'];
|
|
860
|
+
}
|
|
861
|
+
this.dialogRef = this.dialog.open(DialogWrapper, this.opDialogConfig);
|
|
862
|
+
this.componentWrapper = this.dialogRef.componentInstance;
|
|
863
|
+
this.componentWrapper.close = () => this.dialogRef?.close();
|
|
864
|
+
this.componentWrapper.data = this.opDialogConfig.data;
|
|
865
|
+
this.componentWrapper.template = this.templateRef;
|
|
866
|
+
if (!this.opDialogConfig.disableClose) {
|
|
867
|
+
this.service.addDialogRef(this.dialogRef);
|
|
868
|
+
}
|
|
869
|
+
const sub = this.dialogRef.afterClosed().subscribe(() => {
|
|
870
|
+
this.opDialogClosed.emit(true);
|
|
871
|
+
this.service.removeDialogRef(this.dialogRef);
|
|
872
|
+
this.dialogRef = undefined;
|
|
873
|
+
sub.unsubscribe();
|
|
874
|
+
});
|
|
875
|
+
}
|
|
876
|
+
setDialogState(open) {
|
|
877
|
+
if (open) {
|
|
878
|
+
if (!this.dialogRef) {
|
|
879
|
+
this.initDialog();
|
|
880
|
+
}
|
|
881
|
+
else {
|
|
882
|
+
this.componentWrapper.data = this.opDialogConfig.data;
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
else if (!open && this.dialogRef) {
|
|
886
|
+
this.dialogRef.close();
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
ngOnDestroy() {
|
|
890
|
+
if (this.subscription) {
|
|
891
|
+
this.subscription.unsubscribe();
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
static ngTemplateContextGuard(dir, ctx) {
|
|
895
|
+
return true;
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
DialogDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DialogDirective, deps: [{ token: i0.TemplateRef }, { token: i1.MatDialog }, { token: DialogService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
899
|
+
DialogDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: DialogDirective, selector: "[opDialog]", inputs: { add_opDialog_Class: "add_opDialog_Class", opDialogConfig: "opDialogConfig", state: ["opDialog", "state"], nativeElement: ["opDialogOrigin", "nativeElement"] }, outputs: { opDialogClosed: "opDialogClosed" }, ngImport: i0 });
|
|
900
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DialogDirective, decorators: [{
|
|
901
|
+
type: Directive,
|
|
902
|
+
args: [{ selector: '[opDialog]' }]
|
|
903
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i1.MatDialog }, { type: DialogService }]; }, propDecorators: { opDialogClosed: [{
|
|
904
|
+
type: Output
|
|
905
|
+
}], add_opDialog_Class: [{
|
|
906
|
+
type: Input
|
|
907
|
+
}], opDialogConfig: [{
|
|
908
|
+
type: Input
|
|
909
|
+
}], state: [{
|
|
910
|
+
type: Input,
|
|
911
|
+
args: ['opDialog']
|
|
912
|
+
}], nativeElement: [{
|
|
913
|
+
type: Input,
|
|
914
|
+
args: ['opDialogOrigin']
|
|
915
|
+
}] } });
|
|
916
|
+
|
|
917
|
+
class StylerDirective {
|
|
918
|
+
constructor(el) {
|
|
919
|
+
this.el = el;
|
|
920
|
+
}
|
|
921
|
+
set styler(styles) {
|
|
922
|
+
if (styles) {
|
|
923
|
+
Object.keys(styles).forEach(style => {
|
|
924
|
+
this.el.nativeElement.style[style] = styles[style];
|
|
925
|
+
});
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
;
|
|
929
|
+
}
|
|
930
|
+
StylerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: StylerDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
931
|
+
StylerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: StylerDirective, selector: "[styler]", inputs: { styler: "styler" }, ngImport: i0 });
|
|
932
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: StylerDirective, decorators: [{
|
|
933
|
+
type: Directive,
|
|
934
|
+
args: [{
|
|
935
|
+
selector: '[styler]',
|
|
936
|
+
}]
|
|
937
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { styler: [{
|
|
938
|
+
type: Input
|
|
939
|
+
}] } });
|
|
940
|
+
|
|
941
|
+
class MatSlideToggleGroupDirective {
|
|
942
|
+
constructor() {
|
|
943
|
+
this.allowMultiple = false;
|
|
944
|
+
this._ready = new ReplaySubject(1);
|
|
945
|
+
}
|
|
946
|
+
set toggles(val) {
|
|
947
|
+
this._toggles = val;
|
|
948
|
+
this._ready.next(true);
|
|
949
|
+
}
|
|
950
|
+
get valueEmitter() {
|
|
951
|
+
return this._ready.pipe(switchMap$1(_ => this.getObs()));
|
|
952
|
+
}
|
|
953
|
+
getInitValue() {
|
|
954
|
+
const startValue = this._toggles.reduce((prev, cur) => {
|
|
955
|
+
if (!cur.name) {
|
|
956
|
+
throw new Error('toggle must have the name attribute set');
|
|
957
|
+
}
|
|
958
|
+
prev[cur.name] = cur.checked;
|
|
959
|
+
return prev;
|
|
960
|
+
}, {});
|
|
961
|
+
return startValue;
|
|
962
|
+
}
|
|
963
|
+
getObs() {
|
|
964
|
+
var toggleChanges = merge(...this._toggles.map(toggle => toggle.change));
|
|
965
|
+
const startValue = this.getInitValue();
|
|
966
|
+
return toggleChanges.pipe(scan((prev, cur) => {
|
|
967
|
+
const toggleName = cur.source.name;
|
|
968
|
+
const newVal = { ...prev, [toggleName]: cur.checked };
|
|
969
|
+
if (cur.checked && !this.allowMultiple) {
|
|
970
|
+
Object.keys(prev)
|
|
971
|
+
.filter(key => key !== toggleName && prev[key])
|
|
972
|
+
.forEach(key => {
|
|
973
|
+
newVal[key] = false;
|
|
974
|
+
this._toggles.find(toggle => toggle.name === key).toggle();
|
|
975
|
+
});
|
|
976
|
+
}
|
|
977
|
+
return newVal;
|
|
978
|
+
}, startValue), startWith$1(startValue));
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
MatSlideToggleGroupDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: MatSlideToggleGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
982
|
+
MatSlideToggleGroupDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: MatSlideToggleGroupDirective, selector: "[opMatSlideToggleGroup]", inputs: { allowMultiple: "allowMultiple" }, outputs: { valueEmitter: "valueEmitter" }, queries: [{ propertyName: "toggles", predicate: MatSlideToggle }], ngImport: i0 });
|
|
983
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: MatSlideToggleGroupDirective, decorators: [{
|
|
984
|
+
type: Directive,
|
|
985
|
+
args: [{ selector: '[opMatSlideToggleGroup]',
|
|
986
|
+
}]
|
|
987
|
+
}], propDecorators: { allowMultiple: [{
|
|
988
|
+
type: Input
|
|
989
|
+
}], toggles: [{
|
|
990
|
+
type: ContentChildren,
|
|
991
|
+
args: [MatSlideToggle]
|
|
992
|
+
}], valueEmitter: [{
|
|
993
|
+
type: Output
|
|
994
|
+
}] } });
|
|
995
|
+
|
|
996
|
+
class TrimWhitespaceDirective {
|
|
997
|
+
constructor(elem) {
|
|
998
|
+
this.elem = elem;
|
|
999
|
+
}
|
|
1000
|
+
onBlur() {
|
|
1001
|
+
const inputString = this.elem.nativeElement.value;
|
|
1002
|
+
if (inputString) {
|
|
1003
|
+
const newValue = inputString.trim().replace(/\t/g, '');
|
|
1004
|
+
if (inputString !== newValue) {
|
|
1005
|
+
this.elem.nativeElement.value = newValue;
|
|
1006
|
+
this.elem.nativeElement.dispatchEvent(new Event('input', { bubbles: true }));
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
TrimWhitespaceDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TrimWhitespaceDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1012
|
+
TrimWhitespaceDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: TrimWhitespaceDirective, selector: "input[trimWhitespace]", host: { listeners: { "blur": "onBlur()" } }, ngImport: i0 });
|
|
1013
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TrimWhitespaceDirective, decorators: [{
|
|
1014
|
+
type: Directive,
|
|
1015
|
+
args: [{
|
|
1016
|
+
selector: 'input[trimWhitespace]',
|
|
1017
|
+
}]
|
|
1018
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { onBlur: [{
|
|
1019
|
+
type: HostListener,
|
|
1020
|
+
args: ['blur']
|
|
1021
|
+
}] } });
|
|
1022
|
+
|
|
1023
|
+
class FunctionPipe {
|
|
1024
|
+
transform(func, ...args) {
|
|
1025
|
+
if (typeof func === 'string') {
|
|
1026
|
+
const [instance, ...tail] = args;
|
|
1027
|
+
const method = instance[func].bind(instance);
|
|
1028
|
+
return method(...tail);
|
|
1029
|
+
}
|
|
1030
|
+
return func(...args);
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
FunctionPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: FunctionPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1034
|
+
FunctionPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: FunctionPipe, name: "func" });
|
|
1035
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: FunctionPipe, decorators: [{
|
|
1036
|
+
type: Pipe,
|
|
1037
|
+
args: [{
|
|
1038
|
+
name: 'func'
|
|
1039
|
+
}]
|
|
1040
|
+
}] });
|
|
1041
|
+
|
|
1042
|
+
class SpaceCasePipe {
|
|
1043
|
+
transform(value) {
|
|
1044
|
+
return spaceCase(value);
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
SpaceCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: SpaceCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1048
|
+
SpaceCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: SpaceCasePipe, name: "spaceCase" });
|
|
1049
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: SpaceCasePipe, decorators: [{
|
|
1050
|
+
type: Pipe,
|
|
1051
|
+
args: [{ name: 'spaceCase' }]
|
|
1052
|
+
}] });
|
|
1053
|
+
/**
|
|
1054
|
+
* Adds a space before uppercase letters that either
|
|
1055
|
+
* 1. follows a lowercase letter or digit
|
|
1056
|
+
* 2. or precedes a lowercase letter and follows an alpha-numeric character
|
|
1057
|
+
*
|
|
1058
|
+
* Uppercases the first digit
|
|
1059
|
+
*
|
|
1060
|
+
* Turns underscores into spaces
|
|
1061
|
+
*/
|
|
1062
|
+
function spaceCase(value) {
|
|
1063
|
+
const phrase = value?.replace(/([a-z0-9])([A-Z])|([a-zA-Z0-9])([A-Z])(?=[a-z])|_/g, '$1$3 $2$4');
|
|
1064
|
+
// uppercase the first character of every word
|
|
1065
|
+
return phrase?.replace(/(^| )(\w)/g, x => x.toUpperCase());
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
class ConditionalClassesDirective {
|
|
1069
|
+
constructor(el, renderer) {
|
|
1070
|
+
this.el = el;
|
|
1071
|
+
this.renderer = renderer;
|
|
1072
|
+
this.classesApplied = [];
|
|
1073
|
+
}
|
|
1074
|
+
ngOnChanges(changes) {
|
|
1075
|
+
let toApply = [];
|
|
1076
|
+
if (this.classes) {
|
|
1077
|
+
toApply = Object.keys(this.classes)
|
|
1078
|
+
.filter(key => this.classes[key](this.element));
|
|
1079
|
+
}
|
|
1080
|
+
var classesNotYetApplied = toApply.filter(c => !this.classesApplied.includes(c));
|
|
1081
|
+
var classesToRemove = this.classesApplied.filter(c => !toApply.includes(c));
|
|
1082
|
+
classesToRemove.forEach(c => this.renderer.removeClass(this.el.nativeElement, c));
|
|
1083
|
+
classesNotYetApplied.forEach(c => this.renderer.addClass(this.el.nativeElement, c));
|
|
1084
|
+
this.classesApplied = toApply;
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
ConditionalClassesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ConditionalClassesDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1088
|
+
ConditionalClassesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: ConditionalClassesDirective, selector: "[conditionalClasses]", inputs: { element: "element", classes: ["conditionalClasses", "classes"] }, usesOnChanges: true, ngImport: i0 });
|
|
1089
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ConditionalClassesDirective, decorators: [{
|
|
1090
|
+
type: Directive,
|
|
1091
|
+
args: [{
|
|
1092
|
+
selector: '[conditionalClasses]'
|
|
1093
|
+
}]
|
|
1094
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { element: [{
|
|
1095
|
+
type: Input
|
|
1096
|
+
}], classes: [{
|
|
1097
|
+
type: Input,
|
|
1098
|
+
args: ['conditionalClasses']
|
|
1099
|
+
}] } });
|
|
1100
|
+
|
|
1101
|
+
class UtilitiesModule {
|
|
1102
|
+
}
|
|
1103
|
+
UtilitiesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: UtilitiesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1104
|
+
UtilitiesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: UtilitiesModule, declarations: [SpaceCasePipe,
|
|
1105
|
+
PhoneNumberPipe,
|
|
1106
|
+
FunctionPipe,
|
|
1107
|
+
StopPropagationDirective,
|
|
1108
|
+
StylerDirective,
|
|
1109
|
+
PreventEnterDirective,
|
|
1110
|
+
AutoFocusDirective,
|
|
1111
|
+
TrimWhitespaceDirective,
|
|
1112
|
+
ClickSubjectDirective,
|
|
1113
|
+
ClickEmitterDirective,
|
|
1114
|
+
DialogDirective,
|
|
1115
|
+
MatSlideToggleGroupDirective,
|
|
1116
|
+
ConditionalClassesDirective], exports: [StopPropagationDirective,
|
|
1117
|
+
PreventEnterDirective,
|
|
1118
|
+
SpaceCasePipe,
|
|
1119
|
+
PhoneNumberPipe,
|
|
1120
|
+
FunctionPipe,
|
|
1121
|
+
StopPropagationDirective,
|
|
1122
|
+
TrimWhitespaceDirective,
|
|
1123
|
+
StylerDirective,
|
|
1124
|
+
PreventEnterDirective,
|
|
1125
|
+
AutoFocusDirective,
|
|
1126
|
+
ClickSubjectDirective,
|
|
1127
|
+
ClickEmitterDirective,
|
|
1128
|
+
DialogDirective,
|
|
1129
|
+
MatSlideToggleGroupDirective,
|
|
1130
|
+
ConditionalClassesDirective] });
|
|
1131
|
+
UtilitiesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: UtilitiesModule, providers: [
|
|
1132
|
+
DialogService
|
|
1133
|
+
] });
|
|
1134
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: UtilitiesModule, decorators: [{
|
|
1135
|
+
type: NgModule,
|
|
1136
|
+
args: [{
|
|
1137
|
+
imports: [],
|
|
1138
|
+
exports: [
|
|
1139
|
+
StopPropagationDirective,
|
|
1140
|
+
PreventEnterDirective,
|
|
1141
|
+
SpaceCasePipe,
|
|
1142
|
+
PhoneNumberPipe,
|
|
1143
|
+
FunctionPipe,
|
|
1144
|
+
StopPropagationDirective,
|
|
1145
|
+
TrimWhitespaceDirective,
|
|
1146
|
+
StylerDirective,
|
|
1147
|
+
PreventEnterDirective,
|
|
1148
|
+
AutoFocusDirective,
|
|
1149
|
+
ClickSubjectDirective,
|
|
1150
|
+
ClickEmitterDirective,
|
|
1151
|
+
DialogDirective,
|
|
1152
|
+
MatSlideToggleGroupDirective,
|
|
1153
|
+
ConditionalClassesDirective,
|
|
1154
|
+
],
|
|
1155
|
+
declarations: [
|
|
1156
|
+
SpaceCasePipe,
|
|
1157
|
+
PhoneNumberPipe,
|
|
1158
|
+
FunctionPipe,
|
|
1159
|
+
StopPropagationDirective,
|
|
1160
|
+
StylerDirective,
|
|
1161
|
+
PreventEnterDirective,
|
|
1162
|
+
AutoFocusDirective,
|
|
1163
|
+
TrimWhitespaceDirective,
|
|
1164
|
+
ClickSubjectDirective,
|
|
1165
|
+
ClickEmitterDirective,
|
|
1166
|
+
DialogDirective,
|
|
1167
|
+
MatSlideToggleGroupDirective,
|
|
1168
|
+
ConditionalClassesDirective,
|
|
1169
|
+
],
|
|
1170
|
+
providers: [
|
|
1171
|
+
DialogService
|
|
1172
|
+
]
|
|
1173
|
+
}]
|
|
1174
|
+
}] });
|
|
1175
|
+
|
|
1176
|
+
function isPipe(o) {
|
|
1177
|
+
return typeof (o.transform) === 'function';
|
|
1178
|
+
}
|
|
1179
|
+
class TransformCreator {
|
|
1180
|
+
constructor(datePipe, currencyPipe, phonePipe, casePipe, config) {
|
|
1181
|
+
this.datePipe = datePipe;
|
|
1182
|
+
this.currencyPipe = currencyPipe;
|
|
1183
|
+
this.phonePipe = phonePipe;
|
|
1184
|
+
this.casePipe = casePipe;
|
|
1185
|
+
this.config = config;
|
|
1186
|
+
}
|
|
1187
|
+
createTransformer(metaData) {
|
|
1188
|
+
const defaultFunc = (value) => get(value, metaData.key);
|
|
1189
|
+
if (metaData.transform) {
|
|
1190
|
+
if (isPipe(metaData.transform)) {
|
|
1191
|
+
return (value) => metaData.transform.transform(defaultFunc(value));
|
|
1192
|
+
}
|
|
1193
|
+
return metaData.fieldType === FieldType.Expression ? metaData.transform : (value) => metaData.transform(defaultFunc(value), value);
|
|
1194
|
+
}
|
|
1195
|
+
if (this.config.transformers && this.config.transformers[metaData.fieldType]) {
|
|
1196
|
+
var tranformer = this.config.transformers[metaData.fieldType];
|
|
1197
|
+
return (value) => tranformer(defaultFunc(value));
|
|
1198
|
+
}
|
|
1199
|
+
switch (metaData.fieldType) {
|
|
1200
|
+
case FieldType.Date:
|
|
1201
|
+
const dateFormat = metaData.additional?.dateFormat ?? this.config.defaultSettings?.dateFormat ?? 'shortDate';
|
|
1202
|
+
return (value) => this.datePipe.transform(defaultFunc(value), dateFormat);
|
|
1203
|
+
case FieldType.Currency:
|
|
1204
|
+
return (value) => this.currencyPipe.transform(defaultFunc(value));
|
|
1205
|
+
case FieldType.PhoneNumber:
|
|
1206
|
+
return (value) => this.phonePipe.transform(defaultFunc(value));
|
|
1207
|
+
case FieldType.Enum:
|
|
1208
|
+
return (value) => this.casePipe.transform(metaData.additional?.enumMap[defaultFunc(value)]);
|
|
1209
|
+
case FieldType.Boolean:
|
|
1210
|
+
let forTrue = 'check';
|
|
1211
|
+
let forFalse = '';
|
|
1212
|
+
if (metaData.additional?.boolean?.forTrue) {
|
|
1213
|
+
forTrue = metaData?.additional.boolean.forTrue.icon;
|
|
1214
|
+
}
|
|
1215
|
+
if (metaData.additional?.boolean?.showForFalse === true) {
|
|
1216
|
+
forFalse = 'clear';
|
|
1217
|
+
}
|
|
1218
|
+
else if (metaData.additional?.boolean?.showForFalse?.icon) {
|
|
1219
|
+
forFalse = metaData.additional?.boolean?.showForFalse?.icon;
|
|
1220
|
+
}
|
|
1221
|
+
return (value) => defaultFunc(value) ? forTrue : forFalse;
|
|
1222
|
+
}
|
|
1223
|
+
return defaultFunc;
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
TransformCreator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TransformCreator, deps: [{ token: i2.DatePipe }, { token: i2.CurrencyPipe }, { token: PhoneNumberPipe }, { token: SpaceCasePipe }, { token: TableBuilderConfigToken }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1227
|
+
TransformCreator.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TransformCreator, providedIn: 'root' });
|
|
1228
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TransformCreator, decorators: [{
|
|
1229
|
+
type: Injectable,
|
|
1230
|
+
args: [{
|
|
1231
|
+
providedIn: 'root',
|
|
1232
|
+
}]
|
|
1233
|
+
}], ctorParameters: function () { return [{ type: i2.DatePipe }, { type: i2.CurrencyPipe }, { type: PhoneNumberPipe }, { type: SpaceCasePipe }, { type: undefined, decorators: [{
|
|
1234
|
+
type: Inject,
|
|
1235
|
+
args: [TableBuilderConfigToken]
|
|
1236
|
+
}] }]; } });
|
|
1237
|
+
|
|
1238
|
+
class GeneralTableSettings {
|
|
1239
|
+
constructor(settings) {
|
|
1240
|
+
this.headerSettings = new TableWrapperHeaderSettings();
|
|
1241
|
+
this.footerSettings = new TableWrapperFooterSettings();
|
|
1242
|
+
this.columnHeaderSettings = new TableColumnHeaderSettings();
|
|
1243
|
+
if (settings) {
|
|
1244
|
+
merge$1(this.headerSettings, settings.headerSettings);
|
|
1245
|
+
merge$1(this.footerSettings, settings.footerSettings);
|
|
1246
|
+
merge$1(this.columnHeaderSettings, settings.columnHeaderSettings);
|
|
1247
|
+
}
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
class TableWrapperHeaderSettings {
|
|
1251
|
+
constructor() {
|
|
1252
|
+
this.hideExport = false;
|
|
1253
|
+
this.hideFilter = false;
|
|
1254
|
+
this.hideColumnSettings = false;
|
|
1255
|
+
this.hideHeader = false;
|
|
1256
|
+
this.hideSort = false;
|
|
1257
|
+
this.collapse = false;
|
|
1258
|
+
this.showTitleWhenCollapsed = true;
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1261
|
+
class TableWrapperFooterSettings {
|
|
1262
|
+
constructor() {
|
|
1263
|
+
this.collapse = false;
|
|
1264
|
+
}
|
|
1265
|
+
}
|
|
1266
|
+
class TableColumnHeaderSettings {
|
|
1267
|
+
constructor() {
|
|
1268
|
+
this.noFilters = false;
|
|
1269
|
+
this.noHeader = false;
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
class PesrsistedTableSettings {
|
|
1273
|
+
constructor(tableSettings) {
|
|
1274
|
+
this.collapseHeader = false;
|
|
1275
|
+
this.collapseFooter = false;
|
|
1276
|
+
if (tableSettings) {
|
|
1277
|
+
this.collapseHeader = tableSettings.headerSettings?.collapse ?? tableSettings.collapseHeader;
|
|
1278
|
+
this.collapseFooter = tableSettings.footerSettings?.collapse ?? tableSettings.collapseFooter;
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1282
|
+
class NotPersisitedTableSettings {
|
|
1283
|
+
constructor(tableSettings) {
|
|
1284
|
+
this.hideExport = true;
|
|
1285
|
+
this.hideFilter = true;
|
|
1286
|
+
this.hideColumnSettings = true;
|
|
1287
|
+
this.hideSort = true;
|
|
1288
|
+
this.showTitleWhenHeaderCollapsed = true;
|
|
1289
|
+
this.hideHeader = true;
|
|
1290
|
+
this.hideColumnHeaderFilters = true;
|
|
1291
|
+
this.hideColumnHeader = true;
|
|
1292
|
+
if (tableSettings) {
|
|
1293
|
+
this.hideExport = tableSettings.headerSettings.hideExport;
|
|
1294
|
+
this.hideColumnSettings = tableSettings.headerSettings.hideColumnSettings;
|
|
1295
|
+
this.hideFilter = tableSettings.headerSettings.hideFilter;
|
|
1296
|
+
this.hideSort = tableSettings.headerSettings.hideSort;
|
|
1297
|
+
this.showTitleWhenHeaderCollapsed = tableSettings.headerSettings.showTitleWhenCollapsed;
|
|
1298
|
+
this.hideHeader = tableSettings.headerSettings.hideHeader;
|
|
1299
|
+
this.hideColumnHeaderFilters = tableSettings.columnHeaderSettings.noFilters;
|
|
1300
|
+
this.hideColumnHeader = tableSettings.columnHeaderSettings.noHeader;
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
class KeysToDelete {
|
|
1306
|
+
constructor() {
|
|
1307
|
+
this.initializationState = null;
|
|
1308
|
+
this.metaData = null;
|
|
1309
|
+
this.notPersisitedTableSettings = null;
|
|
1310
|
+
this.linkMaps = null;
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
const keysToDelete = Object.keys(new KeysToDelete());
|
|
1314
|
+
var InitializationState;
|
|
1315
|
+
(function (InitializationState) {
|
|
1316
|
+
InitializationState[InitializationState["Created"] = 0] = "Created";
|
|
1317
|
+
InitializationState[InitializationState["MetaDataLoaded"] = 1] = "MetaDataLoaded";
|
|
1318
|
+
InitializationState[InitializationState["LoadedFromStore"] = 2] = "LoadedFromStore";
|
|
1319
|
+
InitializationState[InitializationState["Ready"] = 3] = "Ready";
|
|
1320
|
+
})(InitializationState || (InitializationState = {}));
|
|
1321
|
+
const defaultTableState = {
|
|
1322
|
+
initializationState: InitializationState.Created,
|
|
1323
|
+
metaData: {},
|
|
1324
|
+
filters: {},
|
|
1325
|
+
hiddenKeys: [],
|
|
1326
|
+
sorted: [],
|
|
1327
|
+
userDefined: { order: {}, widths: {}, table: {} },
|
|
1328
|
+
persistedTableSettings: new PesrsistedTableSettings(),
|
|
1329
|
+
notPersisitedTableSettings: new NotPersisitedTableSettings(),
|
|
1330
|
+
pageSize: 10,
|
|
1331
|
+
linkMaps: {},
|
|
1332
|
+
groupByKeys: [],
|
|
1333
|
+
groups: []
|
|
1334
|
+
};
|
|
1335
|
+
|
|
1336
|
+
var FilterType;
|
|
1337
|
+
(function (FilterType) {
|
|
1338
|
+
FilterType["NumberEquals"] = "Equals";
|
|
1339
|
+
FilterType["NumberNotEqual"] = "Does Not Equal";
|
|
1340
|
+
FilterType["NumberGreaterThan"] = "Greater Than";
|
|
1341
|
+
FilterType["NumberLessThan"] = "Less Than";
|
|
1342
|
+
FilterType["NumberBetween"] = "Between";
|
|
1343
|
+
FilterType["StringEquals"] = "Equals";
|
|
1344
|
+
FilterType["StringContains"] = "Contains";
|
|
1345
|
+
FilterType["StringDoesNotContain"] = "Does Not Contain";
|
|
1346
|
+
FilterType["StringStartWith"] = "Start With";
|
|
1347
|
+
FilterType["StringEndsWith"] = "Ends With";
|
|
1348
|
+
FilterType["DateIsOn"] = "Is on";
|
|
1349
|
+
FilterType["DateIsNotOn"] = "Is Not On";
|
|
1350
|
+
FilterType["DateOnOrAfter"] = "On or After";
|
|
1351
|
+
FilterType["DateOnOrBefore"] = "On or Before";
|
|
1352
|
+
FilterType["DateBetween"] = "Between";
|
|
777
1353
|
FilterType["BooleanEquals"] = "Is";
|
|
778
1354
|
FilterType["IsNull"] = "Is Blank";
|
|
779
1355
|
FilterType["Or"] = "Or";
|
|
@@ -987,7 +1563,7 @@ function createFilterFunc(filter) {
|
|
|
987
1563
|
}
|
|
988
1564
|
const cannotBeTrueForNull = !FalseyValueCanBeIncludedFilterTypes.includes(filter.filterType);
|
|
989
1565
|
return (rowObj) => {
|
|
990
|
-
const value = rowObj
|
|
1566
|
+
const value = get(rowObj, filter.key);
|
|
991
1567
|
return ((value == undefined) && cannotBeTrueForNull)
|
|
992
1568
|
? false
|
|
993
1569
|
: func(value);
|
|
@@ -1095,7 +1671,7 @@ class TableStore extends ComponentStore {
|
|
|
1095
1671
|
this.removeFilter = this.updater((state, filterId) => update(state, { filters: { $unset: [filterId] } }));
|
|
1096
1672
|
this.removeFilters = this.updater((state, filterIds) => update(state, { filters: { $unset: [...filterIds] } }));
|
|
1097
1673
|
this.clearFilters = this.updater((state) => ({ ...state, filters: {} }));
|
|
1098
|
-
this.sorted$ = this.
|
|
1674
|
+
this.sorted$ = this.state$.pipe(filter(stateIs(InitializationState.Ready)), map(state => state.sorted));
|
|
1099
1675
|
this.createPreSort = (metaDatas) => {
|
|
1100
1676
|
return Object.values(metaDatas).filter((metaData) => !!metaData.preSort)
|
|
1101
1677
|
.sort(({ preSort: ps1 }, { preSort: ps2 }) => (ps1.precedence || Number.MAX_VALUE) - (ps2.precedence || Number.MAX_VALUE))
|
|
@@ -1119,7 +1695,8 @@ class TableStore extends ComponentStore {
|
|
|
1119
1695
|
});
|
|
1120
1696
|
this.updateStateFunc = (state, incomingTableState) => {
|
|
1121
1697
|
const metaData = state.metaData;
|
|
1122
|
-
const sorted = incomingTableState.sorted?.length ? incomingTableState.sorted
|
|
1698
|
+
const sorted = incomingTableState.sorted?.length ? incomingTableState.sorted
|
|
1699
|
+
: state.initializationState === InitializationState.Created ? this.createPreSort(metaData) : state.sorted;
|
|
1123
1700
|
return { ...state, ...incomingTableState, metaData, sorted };
|
|
1124
1701
|
};
|
|
1125
1702
|
this.setPageSize = this.updater((state, pageSize) => ({ ...state, pageSize }));
|
|
@@ -1189,6 +1766,20 @@ class TableStore extends ComponentStore {
|
|
|
1189
1766
|
tableSettings.collapseFooter = !tableSettings.collapseFooter;
|
|
1190
1767
|
return ({ ...state, persistedTableSettings: new PesrsistedTableSettings(tableSettings) });
|
|
1191
1768
|
});
|
|
1769
|
+
this.addGroupByKey = this.updater((state, groupByKey) => ({
|
|
1770
|
+
...state,
|
|
1771
|
+
groupByKeys: [...state.groupByKeys, groupByKey]
|
|
1772
|
+
}));
|
|
1773
|
+
this.removeGroupByKey = this.updater((state, groupByKey) => ({
|
|
1774
|
+
...state,
|
|
1775
|
+
groupByKeys: state.groupByKeys.filter(key => groupByKey != key)
|
|
1776
|
+
}));
|
|
1777
|
+
this.updateGroup = this.updater((state, group) => ({
|
|
1778
|
+
...state,
|
|
1779
|
+
groups: [...state.groups.filter(g => g.groupName != group.groupName), group]
|
|
1780
|
+
}));
|
|
1781
|
+
this.groupByKeys$ = this.select(state => state.groupByKeys);
|
|
1782
|
+
this.groups$ = this.select(state => state.groups);
|
|
1192
1783
|
this.setTableSettings = this.updater((state, settings) => {
|
|
1193
1784
|
const s = {
|
|
1194
1785
|
...state,
|
|
@@ -1201,12 +1792,19 @@ class TableStore extends ComponentStore {
|
|
|
1201
1792
|
const ts = { ...state.persistedTableSettings, ...state.notPersisitedTableSettings };
|
|
1202
1793
|
return ts;
|
|
1203
1794
|
});
|
|
1795
|
+
this.setLinkMaps = this.updater((state, maps) => {
|
|
1796
|
+
return { ...state, linkMaps: maps };
|
|
1797
|
+
});
|
|
1798
|
+
this.getLinkMap = (md) => {
|
|
1799
|
+
return this.select(state => {
|
|
1800
|
+
return state.linkMaps[md.key];
|
|
1801
|
+
});
|
|
1802
|
+
};
|
|
1204
1803
|
}
|
|
1205
1804
|
getSavableState() {
|
|
1206
1805
|
return this.state$.pipe(map(s => {
|
|
1207
1806
|
const savableState = { ...s };
|
|
1208
|
-
delete savableState
|
|
1209
|
-
delete savableState.notPersisitedTableSettings;
|
|
1807
|
+
keysToDelete.forEach(key => delete savableState[key]);
|
|
1210
1808
|
return savableState;
|
|
1211
1809
|
}));
|
|
1212
1810
|
}
|
|
@@ -1232,9 +1830,9 @@ class TableStore extends ComponentStore {
|
|
|
1232
1830
|
this.runOnceWhen(stateIs(InitializationState.Ready), func);
|
|
1233
1831
|
}
|
|
1234
1832
|
}
|
|
1235
|
-
TableStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1236
|
-
TableStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1237
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1833
|
+
TableStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TableStore, deps: [{ token: TableBuilderConfigToken }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1834
|
+
TableStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TableStore, providedIn: 'root' });
|
|
1835
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TableStore, decorators: [{
|
|
1238
1836
|
type: Injectable,
|
|
1239
1837
|
args: [{
|
|
1240
1838
|
providedIn: 'root',
|
|
@@ -1262,36 +1860,36 @@ class ArrayColumnComponent {
|
|
|
1262
1860
|
this.array = (this.array ?? []).slice(0, this.additional.limit);
|
|
1263
1861
|
}
|
|
1264
1862
|
}
|
|
1265
|
-
ArrayColumnComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1266
|
-
ArrayColumnComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1267
|
-
<ng-container *ngIf="array.length === 0; else hasVals">-</ng-container>
|
|
1268
|
-
<ng-template #hasVals>
|
|
1269
|
-
<ng-container [ngSwitch]="additional.arrayStyle">
|
|
1270
|
-
<ng-container *ngSwitchCase="ArrayStyle.CommaDelimited">
|
|
1271
|
-
<span *ngFor="let val of array; last as isLast">{{val}}<ng-container *ngIf="!isLast">, </ng-container> </span>
|
|
1272
|
-
</ng-container>
|
|
1273
|
-
<ng-container *ngSwitchCase="ArrayStyle.NewLine">
|
|
1274
|
-
<span *ngFor="let val of array; last as isLast">{{val}}<ng-container *ngIf="!isLast"><br /></ng-container> </span>
|
|
1275
|
-
</ng-container>
|
|
1276
|
-
</ng-container>
|
|
1277
|
-
</ng-template>
|
|
1278
|
-
`, isInline: true,
|
|
1279
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1863
|
+
ArrayColumnComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ArrayColumnComponent, deps: [{ token: TableBuilderConfigToken }], target: i0.ɵɵFactoryTarget.Component });
|
|
1864
|
+
ArrayColumnComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ArrayColumnComponent, selector: "tb-array-column", inputs: { array: "array", metaData: "metaData" }, ngImport: i0, template: `
|
|
1865
|
+
<ng-container *ngIf="array.length === 0; else hasVals">-</ng-container>
|
|
1866
|
+
<ng-template #hasVals>
|
|
1867
|
+
<ng-container [ngSwitch]="additional.arrayStyle">
|
|
1868
|
+
<ng-container *ngSwitchCase="ArrayStyle.CommaDelimited">
|
|
1869
|
+
<span *ngFor="let val of array; last as isLast">{{val}}<ng-container *ngIf="!isLast">, </ng-container> </span>
|
|
1870
|
+
</ng-container>
|
|
1871
|
+
<ng-container *ngSwitchCase="ArrayStyle.NewLine">
|
|
1872
|
+
<span *ngFor="let val of array; last as isLast">{{val}}<ng-container *ngIf="!isLast"><br /></ng-container> </span>
|
|
1873
|
+
</ng-container>
|
|
1874
|
+
</ng-container>
|
|
1875
|
+
</ng-template>
|
|
1876
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1877
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ArrayColumnComponent, decorators: [{
|
|
1280
1878
|
type: Component,
|
|
1281
1879
|
args: [{
|
|
1282
1880
|
selector: 'tb-array-column',
|
|
1283
|
-
template: `
|
|
1284
|
-
<ng-container *ngIf="array.length === 0; else hasVals">-</ng-container>
|
|
1285
|
-
<ng-template #hasVals>
|
|
1286
|
-
<ng-container [ngSwitch]="additional.arrayStyle">
|
|
1287
|
-
<ng-container *ngSwitchCase="ArrayStyle.CommaDelimited">
|
|
1288
|
-
<span *ngFor="let val of array; last as isLast">{{val}}<ng-container *ngIf="!isLast">, </ng-container> </span>
|
|
1289
|
-
</ng-container>
|
|
1290
|
-
<ng-container *ngSwitchCase="ArrayStyle.NewLine">
|
|
1291
|
-
<span *ngFor="let val of array; last as isLast">{{val}}<ng-container *ngIf="!isLast"><br /></ng-container> </span>
|
|
1292
|
-
</ng-container>
|
|
1293
|
-
</ng-container>
|
|
1294
|
-
</ng-template>
|
|
1881
|
+
template: `
|
|
1882
|
+
<ng-container *ngIf="array.length === 0; else hasVals">-</ng-container>
|
|
1883
|
+
<ng-template #hasVals>
|
|
1884
|
+
<ng-container [ngSwitch]="additional.arrayStyle">
|
|
1885
|
+
<ng-container *ngSwitchCase="ArrayStyle.CommaDelimited">
|
|
1886
|
+
<span *ngFor="let val of array; last as isLast">{{val}}<ng-container *ngIf="!isLast">, </ng-container> </span>
|
|
1887
|
+
</ng-container>
|
|
1888
|
+
<ng-container *ngSwitchCase="ArrayStyle.NewLine">
|
|
1889
|
+
<span *ngFor="let val of array; last as isLast">{{val}}<ng-container *ngIf="!isLast"><br /></ng-container> </span>
|
|
1890
|
+
</ng-container>
|
|
1891
|
+
</ng-container>
|
|
1892
|
+
</ng-template>
|
|
1295
1893
|
`,
|
|
1296
1894
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
1297
1895
|
}]
|
|
@@ -1304,87 +1902,73 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
1304
1902
|
type: Input
|
|
1305
1903
|
}] } });
|
|
1306
1904
|
|
|
1307
|
-
class
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
return method(...tail);
|
|
1313
|
-
}
|
|
1314
|
-
return func(...args);
|
|
1905
|
+
class LinkColumnComponent {
|
|
1906
|
+
constructor(store) {
|
|
1907
|
+
this.store = store;
|
|
1908
|
+
this.transform = (a) => a;
|
|
1909
|
+
this.link = (metaData) => this.store.getLinkMap(metaData);
|
|
1315
1910
|
}
|
|
1316
1911
|
}
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1912
|
+
LinkColumnComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: LinkColumnComponent, deps: [{ token: TableStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
1913
|
+
LinkColumnComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: LinkColumnComponent, selector: "tb-link-column", inputs: { metaData: "metaData", element: "element", transform: "transform" }, ngImport: i0, template: `
|
|
1914
|
+
<ng-container *ngrxLet="(link | func : (metaData)) as linkInfo">
|
|
1915
|
+
<a *ngIf="$any(linkInfo).useRouterLink; else hrefLink" target="{{$any(linkInfo).target}}"
|
|
1916
|
+
[routerLink]=" [($any(linkInfo).link | func : element)]"
|
|
1917
|
+
[queryParams]="$any(linkInfo).routerLinkOptions.queryParams | func : element"
|
|
1918
|
+
[fragment]="$any(linkInfo).routerLinkOptions.fragment"
|
|
1919
|
+
[preserveFragment]="$any(linkInfo).routerLinkOptions.preserveFragment"
|
|
1920
|
+
[queryParamsHandling]="$any(linkInfo).routerLinkOptions.queryParamsHandling"
|
|
1921
|
+
>
|
|
1922
|
+
{{transform | func : element}}
|
|
1923
|
+
</a>
|
|
1924
|
+
<ng-template #hrefLink>
|
|
1925
|
+
<a target="{{$any(linkInfo).target}}"
|
|
1926
|
+
href="{{($any(linkInfo).link | func : element)}}">
|
|
1927
|
+
{{transform | func : element}}
|
|
1928
|
+
</a>
|
|
1929
|
+
</ng-template>
|
|
1930
|
+
</ng-container>
|
|
1931
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i8.LetDirective, selector: "[ngrxLet]", inputs: ["ngrxLet", "ngrxLetSuspenseTpl"] }, { kind: "pipe", type: FunctionPipe, name: "func" }] });
|
|
1932
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: LinkColumnComponent, decorators: [{
|
|
1933
|
+
type: Component,
|
|
1321
1934
|
args: [{
|
|
1322
|
-
|
|
1935
|
+
selector: "tb-link-column",
|
|
1936
|
+
template: `
|
|
1937
|
+
<ng-container *ngrxLet="(link | func : (metaData)) as linkInfo">
|
|
1938
|
+
<a *ngIf="$any(linkInfo).useRouterLink; else hrefLink" target="{{$any(linkInfo).target}}"
|
|
1939
|
+
[routerLink]=" [($any(linkInfo).link | func : element)]"
|
|
1940
|
+
[queryParams]="$any(linkInfo).routerLinkOptions.queryParams | func : element"
|
|
1941
|
+
[fragment]="$any(linkInfo).routerLinkOptions.fragment"
|
|
1942
|
+
[preserveFragment]="$any(linkInfo).routerLinkOptions.preserveFragment"
|
|
1943
|
+
[queryParamsHandling]="$any(linkInfo).routerLinkOptions.queryParamsHandling"
|
|
1944
|
+
>
|
|
1945
|
+
{{transform | func : element}}
|
|
1946
|
+
</a>
|
|
1947
|
+
<ng-template #hrefLink>
|
|
1948
|
+
<a target="{{$any(linkInfo).target}}"
|
|
1949
|
+
href="{{($any(linkInfo).link | func : element)}}">
|
|
1950
|
+
{{transform | func : element}}
|
|
1951
|
+
</a>
|
|
1952
|
+
</ng-template>
|
|
1953
|
+
</ng-container>
|
|
1954
|
+
`
|
|
1323
1955
|
}]
|
|
1324
|
-
}] }
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
}
|
|
1331
|
-
SpaceCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: SpaceCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1332
|
-
SpaceCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: SpaceCasePipe, name: "spaceCase" });
|
|
1333
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: SpaceCasePipe, decorators: [{
|
|
1334
|
-
type: Pipe,
|
|
1335
|
-
args: [{ name: 'spaceCase' }]
|
|
1336
|
-
}] });
|
|
1337
|
-
/**
|
|
1338
|
-
* Adds a space before uppercase letters that either
|
|
1339
|
-
* 1. follows a lowercase letter or digit
|
|
1340
|
-
* 2. or precedes a lowercase letter and follows an alpha-numeric character
|
|
1341
|
-
*
|
|
1342
|
-
* Uppercases the first digit
|
|
1343
|
-
*
|
|
1344
|
-
* Turns underscores into spaces
|
|
1345
|
-
*/
|
|
1346
|
-
function spaceCase(value) {
|
|
1347
|
-
return value?.replace(/(?<=[a-z0-9])([A-Z])|(?<=[a-zA-Z0-9])([A-Z])(?=[a-z])|_/g, ' $1$2')
|
|
1348
|
-
// uppercase the first character
|
|
1349
|
-
.replace(/^./, str => str.toUpperCase());
|
|
1350
|
-
}
|
|
1956
|
+
}], ctorParameters: function () { return [{ type: TableStore }]; }, propDecorators: { metaData: [{
|
|
1957
|
+
type: Input
|
|
1958
|
+
}], element: [{
|
|
1959
|
+
type: Input
|
|
1960
|
+
}], transform: [{
|
|
1961
|
+
type: Input
|
|
1962
|
+
}] } });
|
|
1351
1963
|
|
|
1352
1964
|
class InitializationComponent {
|
|
1353
|
-
constructor() {
|
|
1354
|
-
this.forTrueIcon = (metaData) => metaData.additional?.boolean?.forTrue?.icon || 'check';
|
|
1355
|
-
this.forFalseIcon = (metaData) => metaData.additional?.boolean?.showForFalse === true ? 'clear'
|
|
1356
|
-
: metaData.additional?.boolean?.showForFalse?.icon || null;
|
|
1357
|
-
this.useRouterLink = (metaData) => metaData.additional?.link?.useRouterLink || metaData.additional?.useRouterLink;
|
|
1358
|
-
this.target = (metaData) => metaData.additional?.link?.target || metaData.additional?.target || '_blank';
|
|
1359
|
-
this.key = (metaData, element) => metaData.additional?.link?.urlKey ? element[metaData.additional?.link?.urlKey] :
|
|
1360
|
-
metaData.additional?.urlKey ? element[metaData.additional.urlKey] : element[metaData.key];
|
|
1361
|
-
this.getLink = (metaData, element) => {
|
|
1362
|
-
const hasRoute = !!metaData.additional?.link?.route;
|
|
1363
|
-
let link = hasRoute ? this.parseInterpolatedRoute((metaData.additional?.link?.route), element) : (metaData.additional?.link?.base || metaData.additional?.base);
|
|
1364
|
-
if (!hasRoute) {
|
|
1365
|
-
link += `/${this.key(metaData, element)}`;
|
|
1366
|
-
}
|
|
1367
|
-
return link;
|
|
1368
|
-
};
|
|
1369
|
-
this.parseInterpolatedRoute = (route, element) => {
|
|
1370
|
-
let interpolated = route?.interpolated || '';
|
|
1371
|
-
const dict = route?.params || {};
|
|
1372
|
-
Object.keys(dict).forEach(key => {
|
|
1373
|
-
interpolated = interpolated.replace(`{${key}}`, element[dict[key]]);
|
|
1374
|
-
});
|
|
1375
|
-
return interpolated;
|
|
1376
|
-
};
|
|
1377
|
-
}
|
|
1378
1965
|
}
|
|
1379
|
-
InitializationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1380
|
-
InitializationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1381
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1966
|
+
InitializationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: InitializationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1967
|
+
InitializationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: InitializationComponent, selector: "ng-component", viewQueries: [{ propertyName: "linkTemplate", first: true, predicate: ["link"], descendants: true, static: true }, { propertyName: "imageUrlTemplate", first: true, predicate: ["imageUrl"], descendants: true, static: true }, { propertyName: "currencyTemplate", first: true, predicate: ["currency"], descendants: true, static: true }, { propertyName: "arrayTemplate", first: true, predicate: ["array"], descendants: true, static: true }, { propertyName: "defaultTemplate", first: true, predicate: ["default"], descendants: true, static: true }, { propertyName: "defaultWithIcon", first: true, predicate: ["defaultWithIcon"], descendants: true, static: true }], ngImport: i0, template: "<ng-template #link let-element='element' let-metaData='metaData' let-transform='transform'>\n <tb-link-column [element]=\"element\" [metaData]=\"metaData\" [transform]=\"transform\"></tb-link-column>\n</ng-template>\n\n<ng-template #imageUrl let-element='element' let-metaData='metaData'>\n <span>\n <img src=\"{{element[metaData.key]}}\" height=\"75px\" width=\"75px\" />\n </span>\n</ng-template>\n\n<ng-template #array let-element='element' let-metaData='metaData'>\n <tb-array-column [array]='element[metaData.key]' [metaData]='metaData'></tb-array-column>\n</ng-template>\n\n<ng-template #default let-element='element' let-metaData='metaData' let-transform='transform' >\n <span>{{ transform | func : element }}</span>\n</ng-template>\n\n<ng-template #defaultWithIcon let-element='element' let-metaData='metaData' let-transform='transform' >\n <mat-icon>{{ transform | func : element }}</mat-icon>\n</ng-template>\n", dependencies: [{ kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: ArrayColumnComponent, selector: "tb-array-column", inputs: ["array", "metaData"] }, { kind: "component", type: LinkColumnComponent, selector: "tb-link-column", inputs: ["metaData", "element", "transform"] }, { kind: "pipe", type: FunctionPipe, name: "func" }] });
|
|
1968
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: InitializationComponent, decorators: [{
|
|
1382
1969
|
type: Component,
|
|
1383
|
-
args: [{ template: "<ng-template #
|
|
1384
|
-
}], propDecorators: {
|
|
1385
|
-
type: ViewChild,
|
|
1386
|
-
args: ['boolean', { static: true }]
|
|
1387
|
-
}], linkTemplate: [{
|
|
1970
|
+
args: [{ template: "<ng-template #link let-element='element' let-metaData='metaData' let-transform='transform'>\n <tb-link-column [element]=\"element\" [metaData]=\"metaData\" [transform]=\"transform\"></tb-link-column>\n</ng-template>\n\n<ng-template #imageUrl let-element='element' let-metaData='metaData'>\n <span>\n <img src=\"{{element[metaData.key]}}\" height=\"75px\" width=\"75px\" />\n </span>\n</ng-template>\n\n<ng-template #array let-element='element' let-metaData='metaData'>\n <tb-array-column [array]='element[metaData.key]' [metaData]='metaData'></tb-array-column>\n</ng-template>\n\n<ng-template #default let-element='element' let-metaData='metaData' let-transform='transform' >\n <span>{{ transform | func : element }}</span>\n</ng-template>\n\n<ng-template #defaultWithIcon let-element='element' let-metaData='metaData' let-transform='transform' >\n <mat-icon>{{ transform | func : element }}</mat-icon>\n</ng-template>\n" }]
|
|
1971
|
+
}], propDecorators: { linkTemplate: [{
|
|
1388
1972
|
type: ViewChild,
|
|
1389
1973
|
args: ['link', { static: true }]
|
|
1390
1974
|
}], imageUrlTemplate: [{
|
|
@@ -1396,15 +1980,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
1396
1980
|
}], arrayTemplate: [{
|
|
1397
1981
|
type: ViewChild,
|
|
1398
1982
|
args: ['array', { static: true }]
|
|
1399
|
-
}], expressionTemplate: [{
|
|
1400
|
-
type: ViewChild,
|
|
1401
|
-
args: ['expression', { static: true }]
|
|
1402
1983
|
}], defaultTemplate: [{
|
|
1403
1984
|
type: ViewChild,
|
|
1404
1985
|
args: ['default', { static: true }]
|
|
1405
|
-
}],
|
|
1986
|
+
}], defaultWithIcon: [{
|
|
1406
1987
|
type: ViewChild,
|
|
1407
|
-
args: ['
|
|
1988
|
+
args: ['defaultWithIcon', { static: true }]
|
|
1408
1989
|
}] } });
|
|
1409
1990
|
|
|
1410
1991
|
class TableTemplateService {
|
|
@@ -1417,52 +1998,35 @@ class TableTemplateService {
|
|
|
1417
1998
|
initTemplates() {
|
|
1418
1999
|
this.templates = {};
|
|
1419
2000
|
this.templates[FieldType.Array] = this.instance.arrayTemplate;
|
|
1420
|
-
this.templates[FieldType.Boolean] = this.instance.
|
|
1421
|
-
this.templates[FieldType.Currency] = this.instance.
|
|
2001
|
+
this.templates[FieldType.Boolean] = this.instance.defaultWithIcon;
|
|
2002
|
+
this.templates[FieldType.Currency] = this.instance.defaultTemplate;
|
|
1422
2003
|
this.templates[FieldType.Date] = this.instance.defaultTemplate;
|
|
1423
|
-
this.templates[FieldType.Expression] = this.instance.
|
|
2004
|
+
this.templates[FieldType.Expression] = this.instance.defaultTemplate;
|
|
1424
2005
|
this.templates[FieldType.ImageUrl] = this.instance.imageUrlTemplate;
|
|
1425
2006
|
this.templates[FieldType.Link] = this.instance.linkTemplate;
|
|
1426
2007
|
this.templates[FieldType.Number] = this.instance.defaultTemplate;
|
|
1427
2008
|
this.templates[FieldType.PhoneNumber] = this.instance.defaultTemplate;
|
|
1428
2009
|
this.templates[FieldType.String] = this.instance.defaultTemplate;
|
|
1429
2010
|
this.templates[FieldType.Unknown] = this.instance.defaultTemplate;
|
|
1430
|
-
this.templates[FieldType.Enum] = this.instance.
|
|
2011
|
+
this.templates[FieldType.Enum] = this.instance.defaultTemplate;
|
|
1431
2012
|
}
|
|
1432
|
-
getTemplate(
|
|
1433
|
-
|
|
2013
|
+
getTemplate(metaData) {
|
|
2014
|
+
let tmp = this.templates[metaData.fieldType];
|
|
2015
|
+
if (metaData.useIcon) {
|
|
2016
|
+
if (tmp === this.instance.defaultTemplate) {
|
|
2017
|
+
tmp = this.instance.defaultWithIcon;
|
|
2018
|
+
}
|
|
2019
|
+
}
|
|
2020
|
+
return tmp;
|
|
1434
2021
|
}
|
|
1435
2022
|
}
|
|
1436
|
-
TableTemplateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1437
|
-
TableTemplateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1438
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2023
|
+
TableTemplateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TableTemplateService, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2024
|
+
TableTemplateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TableTemplateService, providedIn: 'root' });
|
|
2025
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TableTemplateService, decorators: [{
|
|
1439
2026
|
type: Injectable,
|
|
1440
2027
|
args: [{ providedIn: 'root' }]
|
|
1441
2028
|
}], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i0.Injector }]; } });
|
|
1442
2029
|
|
|
1443
|
-
class StopPropagationDirective {
|
|
1444
|
-
onClick(event) {
|
|
1445
|
-
event.stopPropagation();
|
|
1446
|
-
}
|
|
1447
|
-
onMousedown(event) {
|
|
1448
|
-
event.stopPropagation();
|
|
1449
|
-
}
|
|
1450
|
-
}
|
|
1451
|
-
StopPropagationDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: StopPropagationDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1452
|
-
StopPropagationDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.5", type: StopPropagationDirective, selector: "[stop-propagation]", host: { listeners: { "click": "onClick($event)", "mousedown": "onMousedown($event)" } }, ngImport: i0 });
|
|
1453
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: StopPropagationDirective, decorators: [{
|
|
1454
|
-
type: Directive,
|
|
1455
|
-
args: [{
|
|
1456
|
-
selector: "[stop-propagation]"
|
|
1457
|
-
}]
|
|
1458
|
-
}], propDecorators: { onClick: [{
|
|
1459
|
-
type: HostListener,
|
|
1460
|
-
args: ["click", ["$event"]]
|
|
1461
|
-
}], onMousedown: [{
|
|
1462
|
-
type: HostListener,
|
|
1463
|
-
args: ["mousedown", ["$event"]]
|
|
1464
|
-
}] } });
|
|
1465
|
-
|
|
1466
2030
|
class InListFilterComponent {
|
|
1467
2031
|
constructor(ref, tableState) {
|
|
1468
2032
|
this.ref = ref;
|
|
@@ -1510,8 +2074,8 @@ class InListFilterComponent {
|
|
|
1510
2074
|
this.onChange(this.value);
|
|
1511
2075
|
}
|
|
1512
2076
|
}
|
|
1513
|
-
InListFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1514
|
-
InListFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2077
|
+
InListFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: InListFilterComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: TableStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
2078
|
+
InListFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: InListFilterComponent, selector: "tb-in-list-filter , [tb-in-list-filter]", inputs: { key: "key" }, providers: [{
|
|
1515
2079
|
provide: NG_VALUE_ACCESSOR,
|
|
1516
2080
|
useExisting: InListFilterComponent,
|
|
1517
2081
|
multi: true
|
|
@@ -1521,8 +2085,8 @@ InListFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
1521
2085
|
{{metaData.fieldType === FieldType.Enum ? (item.value | spaceCase) : item.value}}
|
|
1522
2086
|
</mat-checkbox>
|
|
1523
2087
|
</div>
|
|
1524
|
-
`, isInline: true,
|
|
1525
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2088
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i4.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: StopPropagationDirective, selector: "[stop-propagation]" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: SpaceCasePipe, name: "spaceCase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2089
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: InListFilterComponent, decorators: [{
|
|
1526
2090
|
type: Component,
|
|
1527
2091
|
args: [{
|
|
1528
2092
|
selector: 'tb-in-list-filter , [tb-in-list-filter]',
|
|
@@ -1602,11 +2166,11 @@ class HeaderMenuComponent {
|
|
|
1602
2166
|
}
|
|
1603
2167
|
}
|
|
1604
2168
|
}
|
|
1605
|
-
HeaderMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1606
|
-
HeaderMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.5", type: HeaderMenuComponent, selector: "tb-header-menu", inputs: { filter: "filter", metaData: "metaData" }, viewQueries: [{ propertyName: "trigger", first: true, predicate: MatMenuTrigger, descendants: true }], ngImport: i0, template: "<button mat-icon-button disableRipple [matMenuTriggerFor]=\"menu\" style=\"height:16px;\" [matMenuTriggerRestoreFocus]=\"false\">\r\n <mat-icon class=\"menu-icon\">more_vert</mat-icon>\r\n</button>\r\n<mat-menu #menu=\"matMenu\">\r\n <button mat-menu-item (click)=hideField(metaData.key)>\r\n <mat-icon color=\"primary\">visibility_off</mat-icon>\r\n <span>Hide Column</span>\r\n </button>\r\n <ng-form #myForm=\"ngForm\" [ngSwitch]=\"true\" (keydown.enter)=\"onEnter(myForm.value)\">\r\n <input type=\"hidden\" name=\"filterId\" [ngModel]=\"'header-column-' + metaData.key\" />\r\n <input type=\"hidden\" name=\"filterType\" [ngModel]=\"myFilterType\" />\r\n <input type=\"hidden\" name=\"key\" [ngModel]=\"metaData.key\" />\r\n <input type=\"hidden\" name=\"fieldType\" [ngModel]=\"metaData.fieldType\" />\r\n\r\n <ng-container *ngIf=\"(myFilterType === FilterType.Or || myFilterType === FilterType.In); else defaultFilter\">\r\n <tb-in-list-filter style=\"display:block;padding: 0 16px\" name='filterValue' [key]='metaData.key' [(ngModel)]='myFilterValue' >\r\n </tb-in-list-filter>\r\n </ng-container>\r\n\r\n\r\n <ng-template #defaultFilter>\r\n <ng-container *ngSwitchCase=\"metaData.fieldType === FieldType.Link || metaData.fieldType === FieldType.String || metaData.fieldType === FieldType.Array || metaData.fieldType === FieldType.Unknown || metaData.fieldType === FieldType.PhoneNumber\">\r\n <mat-form-field stop-propagation class=\"font\" style=\"padding: 0 16px\">\r\n <mat-icon matPrefix class=\"search-icon\">search</mat-icon>\r\n <mat-label>{{myFilterType === FilterType.StringDoesNotContain ? 'Does Not Contain...' : 'Contains...'}}</mat-label>\r\n <input matInput name=\"filterValue\" [ngModel]=\"filter.filterValue\" />\r\n <span matSuffix [matTooltip]=\"myFilterType === FilterType.StringDoesNotContain ? 'Contains' : 'Does Not Contain'\">\r\n <button mat-icon-button color=\"primary\" (click)=\"setStringFilterType()\">\r\n <mat-icon [ngClass]=\"{'chosen-icon': myFilterType === FilterType.StringDoesNotContain }\">\r\n block\r\n </mat-icon>\r\n </button>\r\n </span>\r\n </mat-form-field>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"metaData.fieldType === FieldType.Number || metaData.fieldType === FieldType.Currency\">\r\n <mat-form-field class=\"auto-width\" stop-propagation style=\"padding: 0 16px\">\r\n <mat-label>{{myFilterType === FilterType.NumberEquals ? 'Equals...' : myFilterType === FilterType.NumberLessThan ? 'Less Than...' : 'More Than...'}}</mat-label>\r\n <input matInput type='number' name=\"filterValue\" [ngModel]=\"filter.filterValue\" />\r\n <span matPrefix>\r\n <button mat-icon-button disableRipple>\r\n <mat-icon (click)=\"setFilterType(FilterType.NumberLessThan)\" class=\"suffix-icons\"\r\n [ngClass]=\"{'chosen-icon': myFilterType === FilterType.NumberLessThan }\">\r\n arrow_back_ios</mat-icon>\r\n </button>\r\n <button mat-icon-button disableRipple>\r\n <mat-icon (click)=\"setFilterType(FilterType.NumberGreaterThan)\" class=\"suffix-icons\"\r\n [ngClass]=\"{'chosen-icon': myFilterType === FilterType.NumberGreaterThan }\">\r\n arrow_forward_ios</mat-icon>\r\n </button>\r\n <button mat-icon-button disableRipple>\r\n <span (click)=\"setFilterType(FilterType.NumberEquals)\" class=\"suffix-icons\"\r\n [ngClass]=\"{'chosen-icon': myFilterType === FilterType.NumberEquals }\">\r\n =</span>\r\n </button>\r\n </span>\r\n </mat-form-field>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"metaData.fieldType === FieldType.Boolean\">\r\n <div style=\"padding: 0 16px\">\r\n <label>\r\n <mat-icon class=\"search-icon\">filter_list</mat-icon>\r\n </label>\r\n <mat-radio-group stop-propagation #ctrl=\"matRadioGroup\" #boolField='ngModel' class=\"font\" name=\"filterValue\" [ngModel]=\"myFilterValue\" >\r\n <mat-radio-button class=\"filter-radio-button\" (click)=\"myFilterValue = true;\" [value]=\"true\">True</mat-radio-button><br/>\r\n <mat-radio-button class=\"filter-radio-button\" (click)=\"myFilterValue = false\" [value]=\"false\">False</mat-radio-button><br/>\r\n </mat-radio-group>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"metaData.fieldType === FieldType.Date\">\r\n <mat-form-field style=\"padding: 0 16px\" class=\"font auto-width\" stop-propagation >\r\n <span matPrefix>\r\n <button mat-icon-button disableRipple>\r\n <mat-icon (click)=\"setFilterType(FilterType.DateOnOrAfter)\" class=\"suffix-icons underline\"\r\n [ngClass]=\"{'chosen-icon': myFilterType === FilterType.DateOnOrAfter }\">\r\n arrow_forward_ios</mat-icon>\r\n </button>\r\n <button mat-icon-button disableRipple>\r\n <mat-icon (click)=\"setFilterType(FilterType.DateOnOrBefore)\" class=\"suffix-icons underline\"\r\n [ngClass]=\"{'chosen-icon': myFilterType === FilterType.DateOnOrBefore }\">\r\n arrow_back_ios</mat-icon>\r\n </button>\r\n <button mat-icon-button disableRipple>\r\n <span (click)=\"setFilterType(FilterType.DateIsOn)\" class=\"suffix-icons\"\r\n [ngClass]=\"{'chosen-icon': myFilterType === FilterType.DateIsOn }\">\r\n =</span>\r\n </button>\r\n </span>\r\n <mat-label>{{myFilterType === FilterType.DateIsOn ? 'On...' :\r\n myFilterType === FilterType.DateOnOrBefore ? 'On or Before...' : 'On or After...'}}</mat-label>\r\n <input matInput name=\"filterValue\" [ngModel]=\"filter.filterValue\" [matDatepicker]=\"calendar\"\r\n (click)=\"calendar.open()\"/>\r\n <mat-datepicker-toggle matSuffix [for]=\"calendar\" preventEnter></mat-datepicker-toggle>\r\n <mat-datepicker #calendar></mat-datepicker>\r\n </mat-form-field>\r\n </ng-container>\r\n </ng-template>\r\n\r\n <button mat-button (click)=\"onEnter(myForm.value)\" [disabled]=\"myForm.value.filterValue == undefined\" disableRipple>\r\n Apply\r\n </button>\r\n </ng-form>\r\n</mat-menu>\r\n", styles: ["input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}::ng-deep .form-field .mat-form-field-wrapper{padding-bottom:4px!important;padding-top:4px!important;margin-bottom:5px!important}.menu-icon{font-size:16px;line-height:16px!important;vertical-align:top!important}.search-icon{margin-right:16px;vertical-align:middle;height:24px;color:#0000008a;font-size:21px;line-height:1.125}.font{font-size:14px}.filter-radio-button:first-of-type{padding-left:0}.filter-radio-button{padding:10px 40px;min-width:110px}::ng-deep .form-field.mat-form-field-appearance-outline .mat-form-field-infix{padding:5px 0;width:auto}::ng-deep .auto-width .mat-form-field-infix{width:auto}.suffix-icons{font-size:14px;margin-left:6px}mat-icon.chosen-icon.mat-icon.suffix-icons,.chosen-icon{font-size:20px;color:green}mat-icon.mat-icon.suffix-icons.underline{-webkit-text-decoration:underline .1px solid;text-decoration:underline .1px solid;transform:scaleX(.7)}\n"], components: [{ type: i3$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i4$2.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: i4$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { type: InListFilterComponent, selector: "tb-in-list-filter , [tb-in-list-filter]", inputs: ["key"] }, { type: i6.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i7.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { type: i8.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { type: i8.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }], directives: [{ type: i4$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { type: i5.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: StopPropagationDirective, selector: "[stop-propagation]" }, { type: i6.MatPrefix, selector: "[matPrefix]" }, { type: i6.MatLabel, selector: "mat-label" }, { type: i4$3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i6.MatSuffix, selector: "[matSuffix]" }, { type: i13.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i7.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { type: i8.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1607
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2169
|
+
HeaderMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: HeaderMenuComponent, deps: [{ token: TableStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
2170
|
+
HeaderMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: HeaderMenuComponent, selector: "tb-header-menu", inputs: { filter: "filter", metaData: "metaData" }, viewQueries: [{ propertyName: "trigger", first: true, predicate: MatMenuTrigger, descendants: true }], ngImport: i0, template: "<button mat-icon-button class=\"open-menu-icon-button\" disableRipple [matMenuTriggerFor]=\"menu\" [matMenuTriggerRestoreFocus]=\"false\">\r\n <mat-icon class=\"menu-icon\">more_vert</mat-icon>\r\n</button>\r\n<mat-menu #menu=\"matMenu\" >\r\n <button mat-menu-item (click)=\"tableState.addGroupByKey(metaData.key)\">\r\n <mat-icon color=\"primary\">group</mat-icon>\r\n <span>Group By</span>\r\n </button>\r\n <button mat-menu-item (click)=hideField(metaData.key)>\r\n <mat-icon color=\"primary\">visibility_off</mat-icon>\r\n <span>Hide Column</span>\r\n </button>\r\n <ng-form #myForm=\"ngForm\" [ngSwitch]=\"true\" (keydown.enter)=\"onEnter(myForm.value)\" class=\"tb-header-filter\">\r\n <input type=\"hidden\" name=\"filterId\" [ngModel]=\"'header-column-' + metaData.key\" />\r\n <input type=\"hidden\" name=\"filterType\" [ngModel]=\"myFilterType\" />\r\n <input type=\"hidden\" name=\"key\" [ngModel]=\"metaData.key\" />\r\n <input type=\"hidden\" name=\"fieldType\" [ngModel]=\"metaData.fieldType\" />\r\n\r\n <ng-container *ngIf=\"(myFilterType === FilterType.Or || myFilterType === FilterType.In); else defaultFilter\">\r\n <tb-in-list-filter name='filterValue' [key]='metaData.key' [(ngModel)]='myFilterValue' >\r\n </tb-in-list-filter>\r\n </ng-container>\r\n\r\n\r\n <ng-template #defaultFilter>\r\n <ng-container *ngSwitchCase=\"metaData.fieldType === FieldType.Link || metaData.fieldType === FieldType.String || metaData.fieldType === FieldType.Array || metaData.fieldType === FieldType.Unknown || metaData.fieldType === FieldType.PhoneNumber\">\r\n <mat-form-field stop-propagation class=\"font auto-width\">\r\n <mat-icon matPrefix class=\"search-icon\">search</mat-icon>\r\n <mat-label>{{myFilterType === FilterType.StringDoesNotContain ? 'Does Not Contain...' : 'Contains...'}}</mat-label>\r\n <input matInput name=\"filterValue\" [ngModel]=\"filter.filterValue\" />\r\n <span matSuffix [matTooltip]=\"myFilterType === FilterType.StringDoesNotContain ? 'Contains' : 'Does Not Contain'\">\r\n <button mat-icon-button color=\"primary\" (click)=\"setStringFilterType()\" class=\"header-filter-icon-button\">\r\n <mat-icon [ngClass]=\"{'chosen-icon': myFilterType === FilterType.StringDoesNotContain }\">\r\n block\r\n </mat-icon>\r\n </button>\r\n </span>\r\n </mat-form-field>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"metaData.fieldType === FieldType.Number || metaData.fieldType === FieldType.Currency\">\r\n <mat-form-field class=\"auto-width\" stop-propagation>\r\n \r\n <mat-label>{{myFilterType === FilterType.NumberEquals ? 'Equals...' : myFilterType === FilterType.NumberLessThan ? 'Less Than...' : 'More Than...'}}</mat-label>\r\n <input matInput type='number' name=\"filterValue\" [ngModel]=\"filter.filterValue\" />\r\n <span matPrefix class=\"tb-header-prefix\">\r\n <button mat-icon-button disableRipple class=\"header-filter-icon-button\" (click)=\"setFilterType(FilterType.NumberLessThan)\"\r\n [ngClass]=\"{'chosen-icon': myFilterType === FilterType.NumberLessThan }\">\r\n <mat-icon class=\"suffix-icons\"\r\n >\r\n arrow_back_ios</mat-icon>\r\n </button>\r\n <button mat-icon-button disableRipple class=\"header-filter-icon-button\" (click)=\"setFilterType(FilterType.NumberGreaterThan)\"\r\n [ngClass]=\"{'chosen-icon': myFilterType === FilterType.NumberGreaterThan }\" >\r\n <mat-icon class=\"suffix-icons\"\r\n >\r\n arrow_forward_ios</mat-icon>\r\n </button>\r\n <button mat-icon-button disableRipple class=\"header-filter-icon-button\" (click)=\"setFilterType(FilterType.NumberEquals)\"\r\n [ngClass]=\"{'chosen-icon': myFilterType === FilterType.NumberEquals }\">\r\n <span class=\"suffix-icons\"\r\n >\r\n =</span>\r\n </button>\r\n </span>\r\n </mat-form-field>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"metaData.fieldType === FieldType.Boolean\">\r\n <div>\r\n <label>\r\n <mat-icon class=\"search-icon\">filter_list</mat-icon>\r\n </label>\r\n <mat-radio-group stop-propagation #ctrl=\"matRadioGroup\" #boolField='ngModel' class=\"font\" name=\"filterValue\" [ngModel]=\"myFilterValue\" >\r\n <mat-radio-button class=\"filter-radio-button\" (click)=\"myFilterValue = true;\" [value]=\"true\">True</mat-radio-button><br/>\r\n <mat-radio-button class=\"filter-radio-button\" (click)=\"myFilterValue = false\" [value]=\"false\">False</mat-radio-button><br/>\r\n </mat-radio-group>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"metaData.fieldType === FieldType.Date\">\r\n <mat-form-field class=\"font auto-width\" stop-propagation >\r\n <span matPrefix class=\"tb-header-prefix\">\r\n <button mat-icon-button disableRipple class=\"header-filter-icon-button\" (click)=\"setFilterType(FilterType.DateOnOrAfter)\"\r\n [ngClass]=\"{'chosen-icon': myFilterType === FilterType.DateOnOrAfter }\">\r\n <mat-icon class=\"suffix-icons underline\"\r\n >\r\n arrow_forward_ios</mat-icon>\r\n </button>\r\n <button mat-icon-button disableRipple class=\"header-filter-icon-button\" (click)=\"setFilterType(FilterType.DateOnOrBefore)\"\r\n [ngClass]=\"{'chosen-icon': myFilterType === FilterType.DateOnOrBefore }\">\r\n <mat-icon class=\"suffix-icons underline\"\r\n >\r\n arrow_back_ios</mat-icon>\r\n </button>\r\n <button mat-icon-button disableRipple class=\"header-filter-icon-button\" (click)=\"setFilterType(FilterType.DateIsOn)\"\r\n [ngClass]=\"{'chosen-icon': myFilterType === FilterType.DateIsOn }\">\r\n <span class=\"suffix-icons underline\"\r\n >\r\n =</span>\r\n </button>\r\n </span>\r\n <mat-label>{{myFilterType === FilterType.DateIsOn ? 'On...' :\r\n myFilterType === FilterType.DateOnOrBefore ? 'On or Before...' : 'On or After...'}}</mat-label>\r\n <input matInput name=\"filterValue\" [ngModel]=\"filter.filterValue\" [matDatepicker]=\"calendar\"\r\n (click)=\"calendar.open()\"/>\r\n <mat-datepicker-toggle class=\"date-toggle header-filter-icon-button\" matSuffix [for]=\"calendar\" preventEnter></mat-datepicker-toggle>\r\n <mat-datepicker #calendar></mat-datepicker>\r\n </mat-form-field>\r\n </ng-container>\r\n </ng-template>\r\n\r\n <button mat-button (click)=\"onEnter(myForm.value)\" [disabled]=\"myForm.value.filterValue == undefined\" disableRipple>\r\n Apply\r\n </button>\r\n </ng-form>\r\n</mat-menu>\r\n", styles: ["input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.menu-icon{font-size:16px;line-height:16px;vertical-align:top;height:16px;width:16px}.search-icon{margin-right:16px;vertical-align:middle;height:24px;color:#0000008a;font-size:21px;line-height:1.125}.font{font-size:14px}.filter-radio-button:first-of-type{padding-left:0}.filter-radio-button{padding:10px 40px;min-width:110px}.auto-width{width:260px;margin:5px;display:block;height:55px}.open-menu-icon-button{height:28px;width:28px;padding:6px}.header-filter-icon-button{height:18px;width:18px;font-size:18px;padding:0;margin:0 2px}.header-filter-icon-button ::ng-deep *{line-height:initial;font-size:initial;height:18px;width:18px;font-size:18px;bottom:initial}.header-filter-icon-button.chosen-icon,.header-filter-icon-button.chosen-icon ::ng-deep *{height:22px;width:22px;font-size:22px;color:green}mat-icon.mat-icon.suffix-icons.underline{height:20px;-webkit-text-decoration:underline .1px solid;text-decoration:underline .1px solid}.chosen-icon mat-icon.mat-icon.suffix-icons.underline{height:24px}::ng-deep .mat-mdc-form-field-icon-prefix:has(.tb-header-prefix),.tb-header-prefix{padding:0;flex-basis:36%}.tb-header-filter ::ng-deep .mat-mdc-form-field-subscript-wrapper{line-height:0}.tb-header-filter ::ng-deep .mat-mdc-form-field-subscript-wrapper:before{height:0}.date-toggle ::ng-deep svg{position:absolute;left:0;top:0}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]" }, { kind: "directive", type: i3$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]" }, { kind: "component", type: i4$1.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i4$1.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i4$1.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "directive", type: i6.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { kind: "component", type: i6.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { kind: "component", type: i4$2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$2.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "directive", type: i8$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i6$1.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i6$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i6$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4$3.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i4$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4$3.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: StopPropagationDirective, selector: "[stop-propagation]" }, { kind: "component", type: InListFilterComponent, selector: "tb-in-list-filter , [tb-in-list-filter]", inputs: ["key"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2171
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: HeaderMenuComponent, decorators: [{
|
|
1608
2172
|
type: Component,
|
|
1609
|
-
args: [{ selector: 'tb-header-menu', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button mat-icon-button disableRipple [matMenuTriggerFor]=\"menu\"
|
|
2173
|
+
args: [{ selector: 'tb-header-menu', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button mat-icon-button class=\"open-menu-icon-button\" disableRipple [matMenuTriggerFor]=\"menu\" [matMenuTriggerRestoreFocus]=\"false\">\r\n <mat-icon class=\"menu-icon\">more_vert</mat-icon>\r\n</button>\r\n<mat-menu #menu=\"matMenu\" >\r\n <button mat-menu-item (click)=\"tableState.addGroupByKey(metaData.key)\">\r\n <mat-icon color=\"primary\">group</mat-icon>\r\n <span>Group By</span>\r\n </button>\r\n <button mat-menu-item (click)=hideField(metaData.key)>\r\n <mat-icon color=\"primary\">visibility_off</mat-icon>\r\n <span>Hide Column</span>\r\n </button>\r\n <ng-form #myForm=\"ngForm\" [ngSwitch]=\"true\" (keydown.enter)=\"onEnter(myForm.value)\" class=\"tb-header-filter\">\r\n <input type=\"hidden\" name=\"filterId\" [ngModel]=\"'header-column-' + metaData.key\" />\r\n <input type=\"hidden\" name=\"filterType\" [ngModel]=\"myFilterType\" />\r\n <input type=\"hidden\" name=\"key\" [ngModel]=\"metaData.key\" />\r\n <input type=\"hidden\" name=\"fieldType\" [ngModel]=\"metaData.fieldType\" />\r\n\r\n <ng-container *ngIf=\"(myFilterType === FilterType.Or || myFilterType === FilterType.In); else defaultFilter\">\r\n <tb-in-list-filter name='filterValue' [key]='metaData.key' [(ngModel)]='myFilterValue' >\r\n </tb-in-list-filter>\r\n </ng-container>\r\n\r\n\r\n <ng-template #defaultFilter>\r\n <ng-container *ngSwitchCase=\"metaData.fieldType === FieldType.Link || metaData.fieldType === FieldType.String || metaData.fieldType === FieldType.Array || metaData.fieldType === FieldType.Unknown || metaData.fieldType === FieldType.PhoneNumber\">\r\n <mat-form-field stop-propagation class=\"font auto-width\">\r\n <mat-icon matPrefix class=\"search-icon\">search</mat-icon>\r\n <mat-label>{{myFilterType === FilterType.StringDoesNotContain ? 'Does Not Contain...' : 'Contains...'}}</mat-label>\r\n <input matInput name=\"filterValue\" [ngModel]=\"filter.filterValue\" />\r\n <span matSuffix [matTooltip]=\"myFilterType === FilterType.StringDoesNotContain ? 'Contains' : 'Does Not Contain'\">\r\n <button mat-icon-button color=\"primary\" (click)=\"setStringFilterType()\" class=\"header-filter-icon-button\">\r\n <mat-icon [ngClass]=\"{'chosen-icon': myFilterType === FilterType.StringDoesNotContain }\">\r\n block\r\n </mat-icon>\r\n </button>\r\n </span>\r\n </mat-form-field>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"metaData.fieldType === FieldType.Number || metaData.fieldType === FieldType.Currency\">\r\n <mat-form-field class=\"auto-width\" stop-propagation>\r\n \r\n <mat-label>{{myFilterType === FilterType.NumberEquals ? 'Equals...' : myFilterType === FilterType.NumberLessThan ? 'Less Than...' : 'More Than...'}}</mat-label>\r\n <input matInput type='number' name=\"filterValue\" [ngModel]=\"filter.filterValue\" />\r\n <span matPrefix class=\"tb-header-prefix\">\r\n <button mat-icon-button disableRipple class=\"header-filter-icon-button\" (click)=\"setFilterType(FilterType.NumberLessThan)\"\r\n [ngClass]=\"{'chosen-icon': myFilterType === FilterType.NumberLessThan }\">\r\n <mat-icon class=\"suffix-icons\"\r\n >\r\n arrow_back_ios</mat-icon>\r\n </button>\r\n <button mat-icon-button disableRipple class=\"header-filter-icon-button\" (click)=\"setFilterType(FilterType.NumberGreaterThan)\"\r\n [ngClass]=\"{'chosen-icon': myFilterType === FilterType.NumberGreaterThan }\" >\r\n <mat-icon class=\"suffix-icons\"\r\n >\r\n arrow_forward_ios</mat-icon>\r\n </button>\r\n <button mat-icon-button disableRipple class=\"header-filter-icon-button\" (click)=\"setFilterType(FilterType.NumberEquals)\"\r\n [ngClass]=\"{'chosen-icon': myFilterType === FilterType.NumberEquals }\">\r\n <span class=\"suffix-icons\"\r\n >\r\n =</span>\r\n </button>\r\n </span>\r\n </mat-form-field>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"metaData.fieldType === FieldType.Boolean\">\r\n <div>\r\n <label>\r\n <mat-icon class=\"search-icon\">filter_list</mat-icon>\r\n </label>\r\n <mat-radio-group stop-propagation #ctrl=\"matRadioGroup\" #boolField='ngModel' class=\"font\" name=\"filterValue\" [ngModel]=\"myFilterValue\" >\r\n <mat-radio-button class=\"filter-radio-button\" (click)=\"myFilterValue = true;\" [value]=\"true\">True</mat-radio-button><br/>\r\n <mat-radio-button class=\"filter-radio-button\" (click)=\"myFilterValue = false\" [value]=\"false\">False</mat-radio-button><br/>\r\n </mat-radio-group>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"metaData.fieldType === FieldType.Date\">\r\n <mat-form-field class=\"font auto-width\" stop-propagation >\r\n <span matPrefix class=\"tb-header-prefix\">\r\n <button mat-icon-button disableRipple class=\"header-filter-icon-button\" (click)=\"setFilterType(FilterType.DateOnOrAfter)\"\r\n [ngClass]=\"{'chosen-icon': myFilterType === FilterType.DateOnOrAfter }\">\r\n <mat-icon class=\"suffix-icons underline\"\r\n >\r\n arrow_forward_ios</mat-icon>\r\n </button>\r\n <button mat-icon-button disableRipple class=\"header-filter-icon-button\" (click)=\"setFilterType(FilterType.DateOnOrBefore)\"\r\n [ngClass]=\"{'chosen-icon': myFilterType === FilterType.DateOnOrBefore }\">\r\n <mat-icon class=\"suffix-icons underline\"\r\n >\r\n arrow_back_ios</mat-icon>\r\n </button>\r\n <button mat-icon-button disableRipple class=\"header-filter-icon-button\" (click)=\"setFilterType(FilterType.DateIsOn)\"\r\n [ngClass]=\"{'chosen-icon': myFilterType === FilterType.DateIsOn }\">\r\n <span class=\"suffix-icons underline\"\r\n >\r\n =</span>\r\n </button>\r\n </span>\r\n <mat-label>{{myFilterType === FilterType.DateIsOn ? 'On...' :\r\n myFilterType === FilterType.DateOnOrBefore ? 'On or Before...' : 'On or After...'}}</mat-label>\r\n <input matInput name=\"filterValue\" [ngModel]=\"filter.filterValue\" [matDatepicker]=\"calendar\"\r\n (click)=\"calendar.open()\"/>\r\n <mat-datepicker-toggle class=\"date-toggle header-filter-icon-button\" matSuffix [for]=\"calendar\" preventEnter></mat-datepicker-toggle>\r\n <mat-datepicker #calendar></mat-datepicker>\r\n </mat-form-field>\r\n </ng-container>\r\n </ng-template>\r\n\r\n <button mat-button (click)=\"onEnter(myForm.value)\" [disabled]=\"myForm.value.filterValue == undefined\" disableRipple>\r\n Apply\r\n </button>\r\n </ng-form>\r\n</mat-menu>\r\n", styles: ["input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.menu-icon{font-size:16px;line-height:16px;vertical-align:top;height:16px;width:16px}.search-icon{margin-right:16px;vertical-align:middle;height:24px;color:#0000008a;font-size:21px;line-height:1.125}.font{font-size:14px}.filter-radio-button:first-of-type{padding-left:0}.filter-radio-button{padding:10px 40px;min-width:110px}.auto-width{width:260px;margin:5px;display:block;height:55px}.open-menu-icon-button{height:28px;width:28px;padding:6px}.header-filter-icon-button{height:18px;width:18px;font-size:18px;padding:0;margin:0 2px}.header-filter-icon-button ::ng-deep *{line-height:initial;font-size:initial;height:18px;width:18px;font-size:18px;bottom:initial}.header-filter-icon-button.chosen-icon,.header-filter-icon-button.chosen-icon ::ng-deep *{height:22px;width:22px;font-size:22px;color:green}mat-icon.mat-icon.suffix-icons.underline{height:20px;-webkit-text-decoration:underline .1px solid;text-decoration:underline .1px solid}.chosen-icon mat-icon.mat-icon.suffix-icons.underline{height:24px}::ng-deep .mat-mdc-form-field-icon-prefix:has(.tb-header-prefix),.tb-header-prefix{padding:0;flex-basis:36%}.tb-header-filter ::ng-deep .mat-mdc-form-field-subscript-wrapper{line-height:0}.tb-header-filter ::ng-deep .mat-mdc-form-field-subscript-wrapper:before{height:0}.date-toggle ::ng-deep svg{position:absolute;left:0;top:0}\n"] }]
|
|
1610
2174
|
}], ctorParameters: function () { return [{ type: TableStore }]; }, propDecorators: { filter: [{
|
|
1611
2175
|
type: Input
|
|
1612
2176
|
}], metaData: [{
|
|
@@ -1616,29 +2180,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
1616
2180
|
args: [MatMenuTrigger]
|
|
1617
2181
|
}] } });
|
|
1618
2182
|
|
|
1619
|
-
class
|
|
1620
|
-
constructor(
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
2183
|
+
class Subjectifier extends Observable {
|
|
2184
|
+
constructor(_source) {
|
|
2185
|
+
super((obs) => {
|
|
2186
|
+
const s = merge(_source, this._subj).subscribe(obs);
|
|
2187
|
+
return s;
|
|
2188
|
+
});
|
|
2189
|
+
this._source = _source;
|
|
2190
|
+
this._subj = new Subject();
|
|
2191
|
+
this.merged = merge(this._source, this._subj);
|
|
2192
|
+
this.next = this._subj.next.bind(this._subj);
|
|
2193
|
+
this.newSubj = (...operations) => new Subjectifier(this.merged.pipe(...operations));
|
|
1629
2194
|
}
|
|
1630
|
-
;
|
|
1631
2195
|
}
|
|
1632
|
-
StylerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: StylerDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1633
|
-
StylerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.5", type: StylerDirective, selector: "[styler]", inputs: { styler: "styler" }, ngImport: i0 });
|
|
1634
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: StylerDirective, decorators: [{
|
|
1635
|
-
type: Directive,
|
|
1636
|
-
args: [{
|
|
1637
|
-
selector: '[styler]',
|
|
1638
|
-
}]
|
|
1639
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { styler: [{
|
|
1640
|
-
type: Input
|
|
1641
|
-
}] } });
|
|
1642
2196
|
|
|
1643
2197
|
class ResizeColumnDirective {
|
|
1644
2198
|
constructor(renderer, el, store) {
|
|
@@ -1706,9 +2260,9 @@ class ResizeColumnDirective {
|
|
|
1706
2260
|
return ({ newTableWidth, newColumnWidth });
|
|
1707
2261
|
}
|
|
1708
2262
|
}
|
|
1709
|
-
ResizeColumnDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1710
|
-
ResizeColumnDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
1711
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2263
|
+
ResizeColumnDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ResizeColumnDirective, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: TableStore }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2264
|
+
ResizeColumnDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: ResizeColumnDirective, selector: "[resizeColumn]", inputs: { resizable: ["resizeColumn", "resizable"], key: "key" }, ngImport: i0 });
|
|
2265
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ResizeColumnDirective, decorators: [{
|
|
1712
2266
|
type: Directive,
|
|
1713
2267
|
args: [{
|
|
1714
2268
|
selector: "[resizeColumn]",
|
|
@@ -1730,19 +2284,20 @@ class ColumnTotalPipe {
|
|
|
1730
2284
|
return null;
|
|
1731
2285
|
}
|
|
1732
2286
|
}
|
|
1733
|
-
ColumnTotalPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1734
|
-
ColumnTotalPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "
|
|
1735
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2287
|
+
ColumnTotalPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ColumnTotalPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2288
|
+
ColumnTotalPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: ColumnTotalPipe, name: "columnTotal" });
|
|
2289
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ColumnTotalPipe, decorators: [{
|
|
1736
2290
|
type: Pipe,
|
|
1737
2291
|
args: [{ name: 'columnTotal' }]
|
|
1738
2292
|
}] });
|
|
1739
2293
|
|
|
1740
2294
|
class ColumnBuilderComponent {
|
|
1741
|
-
constructor(transformCreator, table, state, templateService) {
|
|
2295
|
+
constructor(transformCreator, table, state, templateService, injector) {
|
|
1742
2296
|
this.transformCreator = transformCreator;
|
|
1743
2297
|
this.table = table;
|
|
1744
2298
|
this.state = state;
|
|
1745
2299
|
this.templateService = templateService;
|
|
2300
|
+
this.injector = injector;
|
|
1746
2301
|
this.FieldType = FieldType;
|
|
1747
2302
|
this.mapWidth = ([previousUserDefinedWidth, currentUserDefinedWidth]) => {
|
|
1748
2303
|
if (currentUserDefinedWidth) {
|
|
@@ -1762,12 +2317,21 @@ class ColumnBuilderComponent {
|
|
|
1762
2317
|
return this.metaData.template;
|
|
1763
2318
|
if (this.customCell?.TemplateRef)
|
|
1764
2319
|
return this.customCell.TemplateRef;
|
|
1765
|
-
return this.templateService.getTemplate(this.metaData
|
|
2320
|
+
return this.templateService.getTemplate(this.metaData);
|
|
1766
2321
|
}
|
|
1767
2322
|
getOuterTemplate() {
|
|
1768
2323
|
return this.customCell?.columnDef?.cell?.template ?? this.bodyTemplate;
|
|
1769
2324
|
}
|
|
1770
2325
|
ngOnInit() {
|
|
2326
|
+
if (this.metaData.fieldType === FieldType.Currency) {
|
|
2327
|
+
this.classes = {
|
|
2328
|
+
['negative-currency']: (element) => element[this.metaData.key] < 0,
|
|
2329
|
+
...this.metaData.classes
|
|
2330
|
+
};
|
|
2331
|
+
}
|
|
2332
|
+
else {
|
|
2333
|
+
this.classes = this.metaData.classes;
|
|
2334
|
+
}
|
|
1771
2335
|
this.filter = { key: this.metaData.key, fieldType: this.metaData.fieldType };
|
|
1772
2336
|
const width$ = this.state.getUserDefinedWidth$(this.metaData.key).pipe(previousAndCurrent(0), map(this.mapWidth));
|
|
1773
2337
|
const fullMetaStyles = this.metaData.additional?.styles ?? {};
|
|
@@ -1793,16 +2357,16 @@ class ColumnBuilderComponent {
|
|
|
1793
2357
|
}
|
|
1794
2358
|
}
|
|
1795
2359
|
}
|
|
1796
|
-
ColumnBuilderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1797
|
-
ColumnBuilderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2360
|
+
ColumnBuilderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ColumnBuilderComponent, deps: [{ token: TransformCreator }, { token: i4$4.MatTable }, { token: TableStore }, { token: TableTemplateService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
2361
|
+
ColumnBuilderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ColumnBuilderComponent, selector: "tb-column-builder", inputs: { metaData: "metaData", customCell: "customCell", data$: "data$" }, viewQueries: [{ propertyName: "columnDef", first: true, predicate: MatColumnDef, descendants: true }, { propertyName: "bodyTemplate", first: true, predicate: ["body"], descendants: true }], ngImport: i0, template: "<ng-container [matColumnDef]=\"metaData.key\" *ngrxLet=\"styles$ as styles\" >\n\n <ng-template #body let-element='element' >\n <mat-cell [matTooltip]=\"metaData.toolTip ?? ''\" [conditionalClasses]='metaData.classes' [element]='element' [styler]='styles.body' [class.group-footer]=\"element.isGroupFooter\" (click)='cellClicked(element, metaData.key)' >\n <ng-container *ngTemplateOutlet=\"innerTemplate;context: {metaData: metaData, element: element, transform: transform }; Injector: injector\">\n </ng-container>\n </mat-cell>\n\n </ng-template>\n\n <ng-template matHeaderCellDef #myHeader>\n\n <ng-container *ngIf=\"customCell?.columnDef?.headerCell;else header;\">\n <ng-container *ngTemplateOutlet=\"customCell.columnDef.headerCell.template; context: {metaData: metaData, styles: styles.header} \">\n </ng-container>\n </ng-container>\n\n <ng-template #header>\n\n <mat-header-cell cdkDrag [styler]='styles.header' [resizeColumn]=\"true\" [key]=\"metaData.key\" class=\"column-head drag-header\" #headref >\n <div class=\"header-container\" cdkDragHandle>\n <div *ngIf=\"!metaData._internalNotUserDefined || !customCell?.columnDef?.cell ; else headerWithoutMenu\" mat-sort-header style=\"width: 100%\">\n {{ metaData.displayName ? metaData.displayName : ( metaData.key | spaceCase ) }}\n </div>\n <ng-template #headerWithoutMenu >\n <div *ngIf=\"metaData._internalNotUserDefined;\" style=\"width: 100%\">\n {{ metaData.displayName ? metaData.displayName : ( metaData.key | spaceCase ) }}\n </div>\n </ng-template>\n <tb-header-menu\n *ngIf=\"(!metaData._internalNotUserDefined || !customCell?.columnDef?.cell) && (showfilters$ | async);\" #menu [metaData]='metaData' [filter]='filter' >\n </tb-header-menu>\n </div>\n </mat-header-cell>\n\n </ng-template>\n\n </ng-template>\n\n\n <ng-container *matCellDef=\"let element;\">\n <ng-container *ngTemplateOutlet=\"outerTemplate; context: {metaData: metaData, element: element , styles: styles.body }\">\n </ng-container>\n </ng-container>\n\n <ng-template matFooterCellDef>\n <ng-container *ngIf=\"customCell?.columnDef?.footerCell;else footer\">\n <ng-container\n *ngTemplateOutlet=\"customCell.columnDef.footerCell.template;context: {metaData: metaData, data: data$, styles : styles.footer }\">\n </ng-container>\n </ng-container>\n\n <ng-template #footer>\n <mat-footer-cell [styler]='styles.footer' *ngrxLet=\"data$ as data\">\n <span *ngIf=\"data?.length && metaData.additional?.footer\" [ngSwitch]=\"metaData.fieldType\" class=\"bold\">\n <span *ngSwitchCase=\"FieldType.Currency\">\n {{ data | columnTotal: metaData | currency }}\n </span>\n <span *ngSwitchCase=\"FieldType.Number\">\n {{ data | columnTotal: metaData | number }}\n </span>\n </span>\n </mat-footer-cell>\n </ng-template>\n </ng-template>\n</ng-container>\n", styles: [".header-container{display:flex;flex-direction:row;width:100%;align-items:center}.negative-currency{color:red}.column-head{position:relative}.bold,.group-footer{font-weight:900}.cdk-drag-preview{background:white;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:33%;border-right-width:0px}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.drag-handle{color:#add8e6;cursor:move;margin-right:9px}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i4$4.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i4$4.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i4$4.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i4$4.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i4$4.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i4$4.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i4$4.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i1$1.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "mat-sort-header", "arrowPosition", "start", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "directive", type: i8.LetDirective, selector: "[ngrxLet]", inputs: ["ngrxLet", "ngrxLetSuspenseTpl"] }, { kind: "directive", type: i9.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i9.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: StylerDirective, selector: "[styler]", inputs: ["styler"] }, { kind: "directive", type: ConditionalClassesDirective, selector: "[conditionalClasses]", inputs: ["element", "conditionalClasses"] }, { kind: "component", type: HeaderMenuComponent, selector: "tb-header-menu", inputs: ["filter", "metaData"] }, { kind: "directive", type: ResizeColumnDirective, selector: "[resizeColumn]", inputs: ["resizeColumn", "key"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.DecimalPipe, name: "number" }, { kind: "pipe", type: i2.CurrencyPipe, name: "currency" }, { kind: "pipe", type: SpaceCasePipe, name: "spaceCase" }, { kind: "pipe", type: ColumnTotalPipe, name: "columnTotal" }], viewProviders: [
|
|
1798
2362
|
{ provide: CDK_DROP_LIST, useExisting: CdkDropList },
|
|
1799
2363
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1800
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2364
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ColumnBuilderComponent, decorators: [{
|
|
1801
2365
|
type: Component,
|
|
1802
2366
|
args: [{ selector: 'tb-column-builder', changeDetection: ChangeDetectionStrategy.OnPush, viewProviders: [
|
|
1803
2367
|
{ provide: CDK_DROP_LIST, useExisting: CdkDropList },
|
|
1804
|
-
], template: "<ng-container [matColumnDef]=\"metaData.key\" *ngrxLet=\"styles$ as styles\">\n\n <ng-template #body let-element='element' >\n
|
|
1805
|
-
}], ctorParameters: function () { return [{ type: TransformCreator }, { type:
|
|
2368
|
+
], template: "<ng-container [matColumnDef]=\"metaData.key\" *ngrxLet=\"styles$ as styles\" >\n\n <ng-template #body let-element='element' >\n <mat-cell [matTooltip]=\"metaData.toolTip ?? ''\" [conditionalClasses]='metaData.classes' [element]='element' [styler]='styles.body' [class.group-footer]=\"element.isGroupFooter\" (click)='cellClicked(element, metaData.key)' >\n <ng-container *ngTemplateOutlet=\"innerTemplate;context: {metaData: metaData, element: element, transform: transform }; Injector: injector\">\n </ng-container>\n </mat-cell>\n\n </ng-template>\n\n <ng-template matHeaderCellDef #myHeader>\n\n <ng-container *ngIf=\"customCell?.columnDef?.headerCell;else header;\">\n <ng-container *ngTemplateOutlet=\"customCell.columnDef.headerCell.template; context: {metaData: metaData, styles: styles.header} \">\n </ng-container>\n </ng-container>\n\n <ng-template #header>\n\n <mat-header-cell cdkDrag [styler]='styles.header' [resizeColumn]=\"true\" [key]=\"metaData.key\" class=\"column-head drag-header\" #headref >\n <div class=\"header-container\" cdkDragHandle>\n <div *ngIf=\"!metaData._internalNotUserDefined || !customCell?.columnDef?.cell ; else headerWithoutMenu\" mat-sort-header style=\"width: 100%\">\n {{ metaData.displayName ? metaData.displayName : ( metaData.key | spaceCase ) }}\n </div>\n <ng-template #headerWithoutMenu >\n <div *ngIf=\"metaData._internalNotUserDefined;\" style=\"width: 100%\">\n {{ metaData.displayName ? metaData.displayName : ( metaData.key | spaceCase ) }}\n </div>\n </ng-template>\n <tb-header-menu\n *ngIf=\"(!metaData._internalNotUserDefined || !customCell?.columnDef?.cell) && (showfilters$ | async);\" #menu [metaData]='metaData' [filter]='filter' >\n </tb-header-menu>\n </div>\n </mat-header-cell>\n\n </ng-template>\n\n </ng-template>\n\n\n <ng-container *matCellDef=\"let element;\">\n <ng-container *ngTemplateOutlet=\"outerTemplate; context: {metaData: metaData, element: element , styles: styles.body }\">\n </ng-container>\n </ng-container>\n\n <ng-template matFooterCellDef>\n <ng-container *ngIf=\"customCell?.columnDef?.footerCell;else footer\">\n <ng-container\n *ngTemplateOutlet=\"customCell.columnDef.footerCell.template;context: {metaData: metaData, data: data$, styles : styles.footer }\">\n </ng-container>\n </ng-container>\n\n <ng-template #footer>\n <mat-footer-cell [styler]='styles.footer' *ngrxLet=\"data$ as data\">\n <span *ngIf=\"data?.length && metaData.additional?.footer\" [ngSwitch]=\"metaData.fieldType\" class=\"bold\">\n <span *ngSwitchCase=\"FieldType.Currency\">\n {{ data | columnTotal: metaData | currency }}\n </span>\n <span *ngSwitchCase=\"FieldType.Number\">\n {{ data | columnTotal: metaData | number }}\n </span>\n </span>\n </mat-footer-cell>\n </ng-template>\n </ng-template>\n</ng-container>\n", styles: [".header-container{display:flex;flex-direction:row;width:100%;align-items:center}.negative-currency{color:red}.column-head{position:relative}.bold,.group-footer{font-weight:900}.cdk-drag-preview{background:white;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:33%;border-right-width:0px}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.drag-handle{color:#add8e6;cursor:move;margin-right:9px}\n"] }]
|
|
2369
|
+
}], ctorParameters: function () { return [{ type: TransformCreator }, { type: i4$4.MatTable }, { type: TableStore }, { type: TableTemplateService }, { type: i0.Injector }]; }, propDecorators: { metaData: [{
|
|
1806
2370
|
type: Input
|
|
1807
2371
|
}], customCell: [{
|
|
1808
2372
|
type: Input
|
|
@@ -1875,16 +2439,16 @@ class PaginatorComponent {
|
|
|
1875
2439
|
}
|
|
1876
2440
|
}
|
|
1877
2441
|
}
|
|
1878
|
-
PaginatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1879
|
-
PaginatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2442
|
+
PaginatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: PaginatorComponent, deps: [{ token: TableStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
2443
|
+
PaginatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: PaginatorComponent, selector: "tb-paginator", inputs: { dataSource: "dataSource", tableElRef: "tableElRef", data$: "data$" }, viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, static: true }], ngImport: i0, template: `
|
|
1880
2444
|
<div [ngClass]="{'hide' : !(collapseFooter$ | async), 'page-amounts':true}" *ngIf="currentPageData$ | async as pageData">
|
|
1881
2445
|
{{pageData.currentStart}} - {{pageData.currentEnd}} of {{pageData.total}}
|
|
1882
2446
|
</div>
|
|
1883
2447
|
<mat-paginator [pageSizeOptions]="[5, 10, 20, 50, 100, 500]" showFirstLastButtons (page)="paginatorChange()"
|
|
1884
2448
|
[ngClass]="{'hide' : (collapseFooter$ | async)}">
|
|
1885
2449
|
</mat-paginator>
|
|
1886
|
-
`, isInline: true, styles: [".mat-row:nth-child(odd){background-color:#cdeefe}.sticky{bottom:
|
|
1887
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2450
|
+
`, isInline: true, styles: [".mat-mdc-row:nth-child(odd){background-color:#cdeefe}.sticky{bottom:0;position:sticky;border-top:.5px solid rgba(0,0,0,.12)}.page-amounts{color:#0000008a;font-family:Roboto,Helvetica Neue,sans-serif;font-size:12px;margin-right:.2rem}.flx-row-end{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;background-color:#fff}:host::ng-deep .mat-mdc-paginator-container{min-height:initial!important}.group-header{display:flex}:host::ng-deep .table-drag-list.cdk-drop-list-dragging .drag-header:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}:host::ng-deep .mdc-data-table__cell,:host::ng-deep .mdc-data-table__header-cell,:host::ng-deep .mdc-data-table__cell,:host::ng-deep .mdc-data-table__header-cell{padding:0 0 0 .2rem;line-height:normal}\n", ".collapse-icon{font-size:16px;height:16px;padding-bottom:.2rem;color:#3f51b5}.collapse-icon.header{align-self:flex-end}.collapse-icon.footer{align-self:flex-start}.collapse-icon:hover{cursor:pointer}.hide{display:none}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$2.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2451
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: PaginatorComponent, decorators: [{
|
|
1888
2452
|
type: Component,
|
|
1889
2453
|
args: [{ selector: 'tb-paginator', template: `
|
|
1890
2454
|
<div [ngClass]="{'hide' : !(collapseFooter$ | async), 'page-amounts':true}" *ngIf="currentPageData$ | async as pageData">
|
|
@@ -1893,7 +2457,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
1893
2457
|
<mat-paginator [pageSizeOptions]="[5, 10, 20, 50, 100, 500]" showFirstLastButtons (page)="paginatorChange()"
|
|
1894
2458
|
[ngClass]="{'hide' : (collapseFooter$ | async)}">
|
|
1895
2459
|
</mat-paginator>
|
|
1896
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".mat-row:nth-child(odd){background-color:#cdeefe}.sticky{bottom:
|
|
2460
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".mat-mdc-row:nth-child(odd){background-color:#cdeefe}.sticky{bottom:0;position:sticky;border-top:.5px solid rgba(0,0,0,.12)}.page-amounts{color:#0000008a;font-family:Roboto,Helvetica Neue,sans-serif;font-size:12px;margin-right:.2rem}.flx-row-end{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;background-color:#fff}:host::ng-deep .mat-mdc-paginator-container{min-height:initial!important}.group-header{display:flex}:host::ng-deep .table-drag-list.cdk-drop-list-dragging .drag-header:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}:host::ng-deep .mdc-data-table__cell,:host::ng-deep .mdc-data-table__header-cell,:host::ng-deep .mdc-data-table__cell,:host::ng-deep .mdc-data-table__header-cell{padding:0 0 0 .2rem;line-height:normal}\n", ".collapse-icon{font-size:16px;height:16px;padding-bottom:.2rem;color:#3f51b5}.collapse-icon.header{align-self:flex-end}.collapse-icon.footer{align-self:flex-start}.collapse-icon:hover{cursor:pointer}.hide{display:none}\n"] }]
|
|
1897
2461
|
}], ctorParameters: function () { return [{ type: TableStore }]; }, propDecorators: { dataSource: [{
|
|
1898
2462
|
type: Input
|
|
1899
2463
|
}], tableElRef: [{
|
|
@@ -2022,6 +2586,12 @@ class GenericTableComponent {
|
|
|
2022
2586
|
isGroupFooter(_, row) {
|
|
2023
2587
|
return row.isGroupFooter;
|
|
2024
2588
|
}
|
|
2589
|
+
updateGroup(group) {
|
|
2590
|
+
this.state.updateGroup({
|
|
2591
|
+
...group,
|
|
2592
|
+
isExpanded: !group.isExpanded
|
|
2593
|
+
});
|
|
2594
|
+
}
|
|
2025
2595
|
addMetaData(column) {
|
|
2026
2596
|
let columnBuilder = this.myColumns[column.metaData.key];
|
|
2027
2597
|
if (columnBuilder) {
|
|
@@ -2050,11 +2620,11 @@ class GenericTableComponent {
|
|
|
2050
2620
|
this.selection.select(...this.dataSource.data);
|
|
2051
2621
|
}
|
|
2052
2622
|
}
|
|
2053
|
-
GenericTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2054
|
-
GenericTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2055
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2623
|
+
GenericTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: GenericTableComponent, deps: [{ token: i1$1.MatSort }, { token: TableStore }, { token: i0.ViewContainerRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
2624
|
+
GenericTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: GenericTableComponent, selector: "tb-generic-table", inputs: { data$: "data$", IndexColumn: "IndexColumn", SelectionColumn: "SelectionColumn", trackBy: "trackBy", rows: "rows", isSticky: "isSticky", columnBuilders: "columnBuilders", columnInfos: "columnInfos", groupHeaderTemplate: "groupHeaderTemplate", disableSort: "disableSort" }, outputs: { selection$: "selection$" }, viewQueries: [{ propertyName: "table", first: true, predicate: MatTable, descendants: true, static: true }, { propertyName: "dropList", first: true, predicate: CdkDropList, descendants: true, static: true }, { propertyName: "tableElRef", first: true, predicate: ["table"], descendants: true, read: ElementRef }, { propertyName: "paginatorComponent", first: true, predicate: PaginatorComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<mat-table\n cdkDropList\n cdkDropListLockAxis='x'\n cdkDropListOrientation=\"horizontal\"\n (cdkDropListDropped)=\"drop($event)\"\n class=\"table-drag-list\"\n #table\n [dataSource]=\"dataSource\"\n [trackBy]='trackByFunction'\n [styler]=\"tableWidth | async\"\n>\n\n <ng-container matColumnDef=\"select\">\n\n <mat-header-cell *matHeaderCellDef class=\"f-mat-header-cell\">\n <mat-checkbox (change)=\"$event ? masterToggle() : null\"\n [checked]=\"!!(masterToggleChecked$ | async)\"\n [indeterminate]=\"masterToggleIndeterminate$ | async\">\n </mat-checkbox>\n </mat-header-cell>\n\n <mat-cell *matCellDef=\"let row\">\n <mat-checkbox *ngIf=\"!row.isGroupFooter\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selection.toggle(row) : null\"\n [checked]=\"selection.isSelected(row)\">\n </mat-checkbox>\n </mat-cell>\n\n <mat-footer-cell *matFooterCellDef>\n {{ selection.selected.length }}\n </mat-footer-cell>\n </ng-container>\n\n <ng-container matColumnDef=\"index\">\n <mat-header-cell *matHeaderCellDef class=\"f-mat-header-cell\" >#</mat-header-cell>\n <mat-cell *matCellDef=\"let i = index;\"> {{ (tbPaginator.paginator.pageIndex * tbPaginator.paginator.pageSize) + i + 1 }} </mat-cell>\n <mat-footer-cell *matFooterCellDef></mat-footer-cell>\n </ng-container>\n\n <ng-container matColumnDef=\"groupHeader\">\n <mat-cell *matCellDef=\"let row\" (click)=\"updateGroup(row);\" style=\"cursor: pointer;\">\n <div [style.paddingLeft]=\"row.padding + 'px !important'\" >\n <button mat-icon-button (click)=\"updateGroup(row);\">\n <mat-icon *ngIf=\"!row.isExpanded\">chevron_right</mat-icon>\n <mat-icon *ngIf=\"row.isExpanded\">expand_more</mat-icon>\n </button>\n {{row.groupHeaderName}}\n </div>\n <div style=\"flex-grow: 1\">\n <ng-container *ngTemplateOutlet=\"groupHeaderTemplate; context: { element: row }\"></ng-container>\n </div>\n </mat-cell>\n </ng-container>\n\n <ng-container *ngIf=\"showHeader$ | async\">\n <mat-header-row *matHeaderRowDef=\"keys; sticky: isSticky\"></mat-header-row>\n </ng-container>\n <mat-row *matRowDef=\"let row; columns: keys; let i = index\"></mat-row>\n <mat-row *matRowDef=\"let row; columns: ['groupHeader']; when: isGroupHeader\" style=\"background-color: white;\"></mat-row>\n <mat-row *matRowDef=\"let row; columns: keys; when: isGroupFooter\" style=\"background-color: whitesmoke;\"></mat-row>\n <mat-footer-row *matFooterRowDef=\"keys\"></mat-footer-row>\n\n</mat-table>\n\n<div class=\"flx-row-end sticky\">\n <tb-paginator #tbPaginator\n [dataSource]=\"dataSource\"\n [tableElRef]=\"tableElRef\"\n [data$]=\"data$\">\n </tb-paginator>\n\n <mat-icon [matTooltip]=\"(collapseFooter$ | async) ? 'expand' : 'collapse'\" class=\"collapse-icon footer\" (click)=\"state.toggleCollapseFooter()\">\n {{(collapseFooter$ | async) ? 'expand_more' : 'expand_less'}}\n </mat-icon>\n</div>\n", styles: [".mat-mdc-row:nth-child(odd){background-color:#cdeefe}.sticky{bottom:0;position:sticky;border-top:.5px solid rgba(0,0,0,.12)}.page-amounts{color:#0000008a;font-family:Roboto,Helvetica Neue,sans-serif;font-size:12px;margin-right:.2rem}.flx-row-end{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;background-color:#fff}:host::ng-deep .mat-mdc-paginator-container{min-height:initial!important}.group-header{display:flex}:host::ng-deep .table-drag-list.cdk-drop-list-dragging .drag-header:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}:host::ng-deep .mdc-data-table__cell,:host::ng-deep .mdc-data-table__header-cell,:host::ng-deep .mdc-data-table__cell,:host::ng-deep .mdc-data-table__header-cell{padding:0 0 0 .2rem;line-height:normal}\n", ".collapse-icon{font-size:16px;height:16px;padding-bottom:.2rem;color:#3f51b5}.collapse-icon.header{align-self:flex-end}.collapse-icon.footer{align-self:flex-start}.collapse-icon:hover{cursor:pointer}.hide{display:none}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i4$4.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i4$4.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i4$4.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i4$4.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i4$4.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i4$4.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i4$4.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i4$4.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i4$4.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i4$4.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i4$4.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i4$4.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i4$4.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i4$4.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "component", type: i4$2.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i4.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: StylerDirective, selector: "[styler]", inputs: ["styler"] }, { kind: "component", type: PaginatorComponent, selector: "tb-paginator", inputs: ["dataSource", "tableElRef", "data$"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2625
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: GenericTableComponent, decorators: [{
|
|
2056
2626
|
type: Component,
|
|
2057
|
-
args: [{ selector: 'tb-generic-table', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-table\n cdkDropList\n cdkDropListLockAxis='x'\n cdkDropListOrientation=\"horizontal\"\n (cdkDropListDropped)=\"drop($event)\"\n class=\"table-drag-list\"\n #table\n [dataSource]=\"dataSource\"\n [trackBy]='trackByFunction'\n [styler]=\"tableWidth | async\"\n>\n\n <ng-container matColumnDef=\"select\">\n\n <mat-header-cell *matHeaderCellDef class=\"f-mat-header-cell\"
|
|
2627
|
+
args: [{ selector: 'tb-generic-table', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-table\n cdkDropList\n cdkDropListLockAxis='x'\n cdkDropListOrientation=\"horizontal\"\n (cdkDropListDropped)=\"drop($event)\"\n class=\"table-drag-list\"\n #table\n [dataSource]=\"dataSource\"\n [trackBy]='trackByFunction'\n [styler]=\"tableWidth | async\"\n>\n\n <ng-container matColumnDef=\"select\">\n\n <mat-header-cell *matHeaderCellDef class=\"f-mat-header-cell\">\n <mat-checkbox (change)=\"$event ? masterToggle() : null\"\n [checked]=\"!!(masterToggleChecked$ | async)\"\n [indeterminate]=\"masterToggleIndeterminate$ | async\">\n </mat-checkbox>\n </mat-header-cell>\n\n <mat-cell *matCellDef=\"let row\">\n <mat-checkbox *ngIf=\"!row.isGroupFooter\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selection.toggle(row) : null\"\n [checked]=\"selection.isSelected(row)\">\n </mat-checkbox>\n </mat-cell>\n\n <mat-footer-cell *matFooterCellDef>\n {{ selection.selected.length }}\n </mat-footer-cell>\n </ng-container>\n\n <ng-container matColumnDef=\"index\">\n <mat-header-cell *matHeaderCellDef class=\"f-mat-header-cell\" >#</mat-header-cell>\n <mat-cell *matCellDef=\"let i = index;\"> {{ (tbPaginator.paginator.pageIndex * tbPaginator.paginator.pageSize) + i + 1 }} </mat-cell>\n <mat-footer-cell *matFooterCellDef></mat-footer-cell>\n </ng-container>\n\n <ng-container matColumnDef=\"groupHeader\">\n <mat-cell *matCellDef=\"let row\" (click)=\"updateGroup(row);\" style=\"cursor: pointer;\">\n <div [style.paddingLeft]=\"row.padding + 'px !important'\" >\n <button mat-icon-button (click)=\"updateGroup(row);\">\n <mat-icon *ngIf=\"!row.isExpanded\">chevron_right</mat-icon>\n <mat-icon *ngIf=\"row.isExpanded\">expand_more</mat-icon>\n </button>\n {{row.groupHeaderName}}\n </div>\n <div style=\"flex-grow: 1\">\n <ng-container *ngTemplateOutlet=\"groupHeaderTemplate; context: { element: row }\"></ng-container>\n </div>\n </mat-cell>\n </ng-container>\n\n <ng-container *ngIf=\"showHeader$ | async\">\n <mat-header-row *matHeaderRowDef=\"keys; sticky: isSticky\"></mat-header-row>\n </ng-container>\n <mat-row *matRowDef=\"let row; columns: keys; let i = index\"></mat-row>\n <mat-row *matRowDef=\"let row; columns: ['groupHeader']; when: isGroupHeader\" style=\"background-color: white;\"></mat-row>\n <mat-row *matRowDef=\"let row; columns: keys; when: isGroupFooter\" style=\"background-color: whitesmoke;\"></mat-row>\n <mat-footer-row *matFooterRowDef=\"keys\"></mat-footer-row>\n\n</mat-table>\n\n<div class=\"flx-row-end sticky\">\n <tb-paginator #tbPaginator\n [dataSource]=\"dataSource\"\n [tableElRef]=\"tableElRef\"\n [data$]=\"data$\">\n </tb-paginator>\n\n <mat-icon [matTooltip]=\"(collapseFooter$ | async) ? 'expand' : 'collapse'\" class=\"collapse-icon footer\" (click)=\"state.toggleCollapseFooter()\">\n {{(collapseFooter$ | async) ? 'expand_more' : 'expand_less'}}\n </mat-icon>\n</div>\n", styles: [".mat-mdc-row:nth-child(odd){background-color:#cdeefe}.sticky{bottom:0;position:sticky;border-top:.5px solid rgba(0,0,0,.12)}.page-amounts{color:#0000008a;font-family:Roboto,Helvetica Neue,sans-serif;font-size:12px;margin-right:.2rem}.flx-row-end{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;background-color:#fff}:host::ng-deep .mat-mdc-paginator-container{min-height:initial!important}.group-header{display:flex}:host::ng-deep .table-drag-list.cdk-drop-list-dragging .drag-header:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}:host::ng-deep .mdc-data-table__cell,:host::ng-deep .mdc-data-table__header-cell,:host::ng-deep .mdc-data-table__cell,:host::ng-deep .mdc-data-table__header-cell{padding:0 0 0 .2rem;line-height:normal}\n", ".collapse-icon{font-size:16px;height:16px;padding-bottom:.2rem;color:#3f51b5}.collapse-icon.header{align-self:flex-end}.collapse-icon.footer{align-self:flex-start}.collapse-icon:hover{cursor:pointer}.hide{display:none}\n"] }]
|
|
2058
2628
|
}], ctorParameters: function () { return [{ type: i1$1.MatSort }, { type: TableStore }, { type: i0.ViewContainerRef }, { type: i0.Injector }]; }, propDecorators: { data$: [{
|
|
2059
2629
|
type: Input
|
|
2060
2630
|
}], IndexColumn: [{
|
|
@@ -2071,6 +2641,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2071
2641
|
type: Input
|
|
2072
2642
|
}], columnInfos: [{
|
|
2073
2643
|
type: Input
|
|
2644
|
+
}], groupHeaderTemplate: [{
|
|
2645
|
+
type: Input
|
|
2074
2646
|
}], disableSort: [{
|
|
2075
2647
|
type: Input
|
|
2076
2648
|
}], table: [{
|
|
@@ -2082,6 +2654,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2082
2654
|
}], tableElRef: [{
|
|
2083
2655
|
type: ViewChild,
|
|
2084
2656
|
args: ['table', { read: ElementRef }]
|
|
2657
|
+
}], paginatorComponent: [{
|
|
2658
|
+
type: ViewChild,
|
|
2659
|
+
args: [PaginatorComponent]
|
|
2085
2660
|
}], selection$: [{
|
|
2086
2661
|
type: Output
|
|
2087
2662
|
}] } });
|
|
@@ -2116,9 +2691,9 @@ class CustomCellDirective {
|
|
|
2116
2691
|
};
|
|
2117
2692
|
}
|
|
2118
2693
|
}
|
|
2119
|
-
CustomCellDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2120
|
-
CustomCellDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
2121
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2694
|
+
CustomCellDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: CustomCellDirective, deps: [{ token: i0.TemplateRef, optional: true }, { token: i1$2.CdkColumnDef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2695
|
+
CustomCellDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: CustomCellDirective, selector: "[customCell]", inputs: { customCell: "customCell", displayName: "displayName", preSort: "preSort", TemplateRef: "TemplateRef", customCellOrder: "customCellOrder", customCellWidth: "customCellWidth" }, ngImport: i0 });
|
|
2696
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: CustomCellDirective, decorators: [{
|
|
2122
2697
|
type: Directive,
|
|
2123
2698
|
args: [{
|
|
2124
2699
|
selector: '[customCell]',
|
|
@@ -2166,11 +2741,11 @@ class GenColDisplayerComponent {
|
|
|
2166
2741
|
this.tableState.setHiddenColumns(displayCols.map(c => ({ key: c.key, visible: c.isVisible })));
|
|
2167
2742
|
}
|
|
2168
2743
|
}
|
|
2169
|
-
GenColDisplayerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2170
|
-
GenColDisplayerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2171
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2744
|
+
GenColDisplayerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: GenColDisplayerComponent, deps: [{ token: TableStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
2745
|
+
GenColDisplayerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: GenColDisplayerComponent, selector: "tb-col-displayer", ngImport: i0, template: "<ng-container *ngIf=\"columns$ | async as displayCols\">\n <span matTooltip=\"Show/hide columns\">\n <button mat-icon-button [matMenuTriggerFor]=\"menu\">\n <mat-icon color=\"primary\">visibility_off</mat-icon>\n </button>\n </span>\n <mat-menu #menu=\"matMenu\" class=\"my-mat-menu\">\n\n <button mat-menu-item>\n <span matTooltip=\"Close\">\n <button class=\"filter-button\" mat-icon-button>\n <mat-icon>close</mat-icon>\n </button>\n </span>\n </button>\n\n <button mat-menu-item stop-propagation>\n <span matTooltip=\"Show all columns\">\n <button mat-icon-button (click)=\"reset(displayCols)\">\n <mat-icon color=\"primary\">done_all</mat-icon>\n </button>\n </span>\n\n <span matTooltip=\"Hide all columns\">\n <button mat-icon-button (click)=\"unset(displayCols)\">\n <mat-icon color=\"primary\">cancel</mat-icon>\n </button>\n </span>\n </button>\n\n <div cdkDropList (cdkDropListDropped)=\"drop($event)\" stop-propagation cdkDropListLockAxis='y'>\n <button [class.isHidden]=\"!col.isVisible\" stop-propagation mat-menu-item cdkDrag [cdkDragData]=\"col\"\n *ngFor=\"let col of displayCols\">\n <div (click)=\"col.isVisible = !col.isVisible; emit(displayCols)\" style=\"display: flex; align-items: center;\">\n <button mat-icon-button matTooltip=\"Hide Column\" class=\"show-hide\" *ngIf=\"col.isVisible; else hidden\">\n <mat-icon color=\"primary\">check_box</mat-icon>\n </button>\n <p class=\"label\">\n {{col.displayName || (col.key | spaceCase) }}\n </p>\n\n <ng-template #hidden>\n <button mat-icon-button matTooltip=\"Show Column\" class=\"show-hide\">\n <mat-icon>indeterminate_check_box</mat-icon>\n </button>\n </ng-template>\n\n </div>\n </button>\n </div>\n </mat-menu>\n</ng-container>", styles: [".show-hide{margin-right:15px;height:24px;width:24px;padding:4px}.label{color:#6495ed;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;text-align:left;margin:0;font-size:17px;font-weight:700;display:inline-block;width:66%}.row{margin:0;padding:0}.isHidden{background-color:#d3d3d3;color:#a9a9a9;font-weight:700;font-size:17px;white-space:nowrap}.filter-button{margin-top:10px}.cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.mdc-list-item__primary-text{display:inline-block;width:100%}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4$2.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i6$1.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i6$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i6$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i9.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: StopPropagationDirective, selector: "[stop-propagation]" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: SpaceCasePipe, name: "spaceCase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2746
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: GenColDisplayerComponent, decorators: [{
|
|
2172
2747
|
type: Component,
|
|
2173
|
-
args: [{ selector: 'tb-col-displayer', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"columns$ | async as displayCols\">\n <span matTooltip=\"Show/hide columns\">\n <button mat-icon-button [matMenuTriggerFor]=\"menu\">\n <mat-icon color=\"primary\">visibility_off</mat-icon>\n </button>\n </span>\n <mat-menu #menu=\"matMenu\" class=\"my-mat-menu\">\n\n <button mat-menu-item>\n <
|
|
2748
|
+
args: [{ selector: 'tb-col-displayer', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"columns$ | async as displayCols\">\n <span matTooltip=\"Show/hide columns\">\n <button mat-icon-button [matMenuTriggerFor]=\"menu\">\n <mat-icon color=\"primary\">visibility_off</mat-icon>\n </button>\n </span>\n <mat-menu #menu=\"matMenu\" class=\"my-mat-menu\">\n\n <button mat-menu-item>\n <span matTooltip=\"Close\">\n <button class=\"filter-button\" mat-icon-button>\n <mat-icon>close</mat-icon>\n </button>\n </span>\n </button>\n\n <button mat-menu-item stop-propagation>\n <span matTooltip=\"Show all columns\">\n <button mat-icon-button (click)=\"reset(displayCols)\">\n <mat-icon color=\"primary\">done_all</mat-icon>\n </button>\n </span>\n\n <span matTooltip=\"Hide all columns\">\n <button mat-icon-button (click)=\"unset(displayCols)\">\n <mat-icon color=\"primary\">cancel</mat-icon>\n </button>\n </span>\n </button>\n\n <div cdkDropList (cdkDropListDropped)=\"drop($event)\" stop-propagation cdkDropListLockAxis='y'>\n <button [class.isHidden]=\"!col.isVisible\" stop-propagation mat-menu-item cdkDrag [cdkDragData]=\"col\"\n *ngFor=\"let col of displayCols\">\n <div (click)=\"col.isVisible = !col.isVisible; emit(displayCols)\" style=\"display: flex; align-items: center;\">\n <button mat-icon-button matTooltip=\"Hide Column\" class=\"show-hide\" *ngIf=\"col.isVisible; else hidden\">\n <mat-icon color=\"primary\">check_box</mat-icon>\n </button>\n <p class=\"label\">\n {{col.displayName || (col.key | spaceCase) }}\n </p>\n\n <ng-template #hidden>\n <button mat-icon-button matTooltip=\"Show Column\" class=\"show-hide\">\n <mat-icon>indeterminate_check_box</mat-icon>\n </button>\n </ng-template>\n\n </div>\n </button>\n </div>\n </mat-menu>\n</ng-container>", styles: [".show-hide{margin-right:15px;height:24px;width:24px;padding:4px}.label{color:#6495ed;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;text-align:left;margin:0;font-size:17px;font-weight:700;display:inline-block;width:66%}.row{margin:0;padding:0}.isHidden{background-color:#d3d3d3;color:#a9a9a9;font-weight:700;font-size:17px;white-space:nowrap}.filter-button{margin-top:10px}.cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.mdc-list-item__primary-text{display:inline-block;width:100%}\n"] }]
|
|
2174
2749
|
}], ctorParameters: function () { return [{ type: TableStore }]; } });
|
|
2175
2750
|
|
|
2176
2751
|
class WrapperFilterStore extends ComponentStore {
|
|
@@ -2188,9 +2763,9 @@ class WrapperFilterStore extends ComponentStore {
|
|
|
2188
2763
|
});
|
|
2189
2764
|
}
|
|
2190
2765
|
}
|
|
2191
|
-
WrapperFilterStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2192
|
-
WrapperFilterStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2193
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2766
|
+
WrapperFilterStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: WrapperFilterStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2767
|
+
WrapperFilterStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: WrapperFilterStore });
|
|
2768
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: WrapperFilterStore, decorators: [{
|
|
2194
2769
|
type: Injectable
|
|
2195
2770
|
}], ctorParameters: function () { return []; } });
|
|
2196
2771
|
|
|
@@ -2204,34 +2779,26 @@ class GenFilterDisplayerComponent {
|
|
|
2204
2779
|
this.filterStore.addFilter({ key: metaData.key, fieldType: metaData.fieldType });
|
|
2205
2780
|
}
|
|
2206
2781
|
}
|
|
2207
|
-
GenFilterDisplayerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2208
|
-
GenFilterDisplayerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2209
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2782
|
+
GenFilterDisplayerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: GenFilterDisplayerComponent, deps: [{ token: TableStore }, { token: WrapperFilterStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
2783
|
+
GenFilterDisplayerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: GenFilterDisplayerComponent, selector: "tb-filter-displayer", ngImport: i0, template: "<button stop-propagation class=\"filter-button\" mat-icon-button [matMenuTriggerFor]=\"menu\" matTooltip=\"Add Filter\">\n <mat-icon class=\"filter-icon\" color=\"primary\">filter_list</mat-icon>\n</button>\n<mat-menu #menu=\"matMenu\">\n <button *ngFor=\"let md of filterCols$ | async\" (click)=\"addFilter(md)\" mat-menu-item>\n <span class=\"filter-labels\">{{md.displayName || (md.key | spaceCase)}}</span>\n </button>\n</mat-menu>\n", styles: [".filter{margin:15px;display:inline-block}.filter-button{color:#6495ed;font-size:22px;font-weight:700}.cancel-button{margin-right:30px;font-weight:700}.filter-wrapper{margin-top:1em;margin-bottom:1em;float:right}.menu{margin-bottom:10px;width:109.1%}.filter-labels{color:#6495ed;font-size:17px;font-weight:600}.float{position:absolute;width:-moz-fit-content;width:fit-content;z-index:101;top:10px;right:180px;max-width:90vw}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i4$2.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i6$1.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i6$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i6$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: StopPropagationDirective, selector: "[stop-propagation]" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: SpaceCasePipe, name: "spaceCase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2784
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: GenFilterDisplayerComponent, decorators: [{
|
|
2210
2785
|
type: Component,
|
|
2211
|
-
args: [{ selector: 'tb-filter-displayer', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button stop-propagation class=\"filter-button\" mat-icon-button [matMenuTriggerFor]=\"menu\" matTooltip=\"Add Filter\">\n <mat-icon class=\"filter-icon\" color=\"primary\">filter_list</mat-icon>\n</button>\n<mat-menu #menu=\"matMenu\">\n <button
|
|
2786
|
+
args: [{ selector: 'tb-filter-displayer', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button stop-propagation class=\"filter-button\" mat-icon-button [matMenuTriggerFor]=\"menu\" matTooltip=\"Add Filter\">\n <mat-icon class=\"filter-icon\" color=\"primary\">filter_list</mat-icon>\n</button>\n<mat-menu #menu=\"matMenu\">\n <button *ngFor=\"let md of filterCols$ | async\" (click)=\"addFilter(md)\" mat-menu-item>\n <span class=\"filter-labels\">{{md.displayName || (md.key | spaceCase)}}</span>\n </button>\n</mat-menu>\n", styles: [".filter{margin:15px;display:inline-block}.filter-button{color:#6495ed;font-size:22px;font-weight:700}.cancel-button{margin-right:30px;font-weight:700}.filter-wrapper{margin-top:1em;margin-bottom:1em;float:right}.menu{margin-bottom:10px;width:109.1%}.filter-labels{color:#6495ed;font-size:17px;font-weight:600}.float{position:absolute;width:-moz-fit-content;width:fit-content;z-index:101;top:10px;right:180px;max-width:90vw}\n"] }]
|
|
2212
2787
|
}], ctorParameters: function () { return [{ type: TableStore }, { type: WrapperFilterStore }]; } });
|
|
2213
2788
|
|
|
2214
|
-
class
|
|
2215
|
-
constructor(
|
|
2216
|
-
this.
|
|
2217
|
-
this.autoFocus = true;
|
|
2218
|
-
}
|
|
2219
|
-
ngAfterViewInit() {
|
|
2220
|
-
if (this.autoFocus) {
|
|
2221
|
-
setTimeout(() => {
|
|
2222
|
-
this.elementRef.nativeElement.focus();
|
|
2223
|
-
});
|
|
2224
|
-
}
|
|
2789
|
+
class DateFilterComponent {
|
|
2790
|
+
constructor() {
|
|
2791
|
+
this.FilterType = FilterType;
|
|
2225
2792
|
}
|
|
2226
2793
|
}
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2230
|
-
type:
|
|
2231
|
-
args: [{
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2794
|
+
DateFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DateFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2795
|
+
DateFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: DateFilterComponent, selector: "tb-date-filter", inputs: { info: "info", CurrentFilterType: "CurrentFilterType" }, ngImport: i0, template: "<ng-container *ngIf=\"CurrentFilterType !== FilterType.DateBetween && CurrentFilterType !== FilterType.IsNull\">\n <mat-form-field>\n <input matInput name=\"filterValue\" [ngModel]=\"info.filterValue\" [matDatepicker]=\"cal\"/>\n <mat-datepicker-toggle class=\"small-button date-toggle\" matSuffix [for]=\"cal\" preventEnter></mat-datepicker-toggle>\n <mat-datepicker #cal></mat-datepicker>\n </mat-form-field>\n</ng-container>\n\n<ng-container *ngIf=\"CurrentFilterType === FilterType.DateBetween\">\n <ng-container ngModelGroup=\"filterValue\">\n <mat-form-field class=\"my-filter\" >\n <input matInput name=\"Start\" [ngModel]=\"info.filterValue?.Start\" placeholder=\"From\" [matDatepicker]=\"fromVal\"\n (click)=\"fromVal.open()\"/>\n <mat-datepicker-toggle matSuffix class=\"small-button date-toggle\" [for]=\"fromVal\" preventEnter></mat-datepicker-toggle>\n <mat-datepicker #fromVal></mat-datepicker>\n </mat-form-field>\n <mat-form-field>\n <input matInput name=\"End\" [ngModel]=\"info.filterValue?.End\" placeholder=\"To\" [matDatepicker]=\"toVal\" (click)=\"toVal.open()\"/>\n <mat-datepicker-toggle matSuffix class=\"small-button date-toggle\" [for]=\"toVal\" preventEnter></mat-datepicker-toggle>\n <mat-datepicker #toVal></mat-datepicker>\n </mat-form-field>\n </ng-container>\n</ng-container>\n\n", styles: [".filter-name{color:#6495ed;margin:10px 0;font-weight:600;display:inline-block}.switch{display:inline-block}.my-filter{margin-right:15px}.cancel-button{float:right}.head-row{width:100%}.filter-row{width:-moz-fit-content;width:fit-content}mat-card.filter-card::ng-deep mat-form-field{width:150px}mat-card.filter-card::ng-deep .mat-mdc-form-field-subscript-wrapper{line-height:0}mat-card.filter-card::ng-deep .mat-mdc-form-field-subscript-wrapper:before{height:0}.inline{display:inline-block}.small-button{height:18px;width:18px;font-size:18px;padding:0;margin:0}.small-button ::ng-deep *{line-height:initial;font-size:initial;height:18px;width:18px;font-size:18px;bottom:initial}.cancel-button{float:right;font-weight:700}.date-toggle ::ng-deep svg{position:absolute;left:0;top:0}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]" }, { kind: "component", type: i4$1.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i4$1.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i4$1.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "directive", type: i8$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i4$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4$3.NgModelGroup, selector: "[ngModelGroup]", inputs: ["ngModelGroup"], exportAs: ["ngModelGroup"] }], viewProviders: [{ provide: ControlContainer, useExisting: NgForm }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2796
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DateFilterComponent, decorators: [{
|
|
2797
|
+
type: Component,
|
|
2798
|
+
args: [{ selector: 'tb-date-filter', changeDetection: ChangeDetectionStrategy.OnPush, viewProviders: [{ provide: ControlContainer, useExisting: NgForm }], template: "<ng-container *ngIf=\"CurrentFilterType !== FilterType.DateBetween && CurrentFilterType !== FilterType.IsNull\">\n <mat-form-field>\n <input matInput name=\"filterValue\" [ngModel]=\"info.filterValue\" [matDatepicker]=\"cal\"/>\n <mat-datepicker-toggle class=\"small-button date-toggle\" matSuffix [for]=\"cal\" preventEnter></mat-datepicker-toggle>\n <mat-datepicker #cal></mat-datepicker>\n </mat-form-field>\n</ng-container>\n\n<ng-container *ngIf=\"CurrentFilterType === FilterType.DateBetween\">\n <ng-container ngModelGroup=\"filterValue\">\n <mat-form-field class=\"my-filter\" >\n <input matInput name=\"Start\" [ngModel]=\"info.filterValue?.Start\" placeholder=\"From\" [matDatepicker]=\"fromVal\"\n (click)=\"fromVal.open()\"/>\n <mat-datepicker-toggle matSuffix class=\"small-button date-toggle\" [for]=\"fromVal\" preventEnter></mat-datepicker-toggle>\n <mat-datepicker #fromVal></mat-datepicker>\n </mat-form-field>\n <mat-form-field>\n <input matInput name=\"End\" [ngModel]=\"info.filterValue?.End\" placeholder=\"To\" [matDatepicker]=\"toVal\" (click)=\"toVal.open()\"/>\n <mat-datepicker-toggle matSuffix class=\"small-button date-toggle\" [for]=\"toVal\" preventEnter></mat-datepicker-toggle>\n <mat-datepicker #toVal></mat-datepicker>\n </mat-form-field>\n </ng-container>\n</ng-container>\n\n", styles: [".filter-name{color:#6495ed;margin:10px 0;font-weight:600;display:inline-block}.switch{display:inline-block}.my-filter{margin-right:15px}.cancel-button{float:right}.head-row{width:100%}.filter-row{width:-moz-fit-content;width:fit-content}mat-card.filter-card::ng-deep mat-form-field{width:150px}mat-card.filter-card::ng-deep .mat-mdc-form-field-subscript-wrapper{line-height:0}mat-card.filter-card::ng-deep .mat-mdc-form-field-subscript-wrapper:before{height:0}.inline{display:inline-block}.small-button{height:18px;width:18px;font-size:18px;padding:0;margin:0}.small-button ::ng-deep *{line-height:initial;font-size:initial;height:18px;width:18px;font-size:18px;bottom:initial}.cancel-button{float:right;font-weight:700}.date-toggle ::ng-deep svg{position:absolute;left:0;top:0}\n"] }]
|
|
2799
|
+
}], propDecorators: { info: [{
|
|
2800
|
+
type: Input
|
|
2801
|
+
}], CurrentFilterType: [{
|
|
2235
2802
|
type: Input
|
|
2236
2803
|
}] } });
|
|
2237
2804
|
|
|
@@ -2256,9 +2823,6 @@ class InFilterComponent {
|
|
|
2256
2823
|
registerOnTouched(fn) {
|
|
2257
2824
|
this.onTouched = fn;
|
|
2258
2825
|
}
|
|
2259
|
-
setDisabledState(isDisabled) {
|
|
2260
|
-
throw new Error('Method not implemented.');
|
|
2261
|
-
}
|
|
2262
2826
|
addInput() {
|
|
2263
2827
|
this.value = [...this.value, undefined];
|
|
2264
2828
|
this.ref.markForCheck();
|
|
@@ -2277,13 +2841,13 @@ class InFilterComponent {
|
|
|
2277
2841
|
this.onChange(this.value);
|
|
2278
2842
|
}
|
|
2279
2843
|
}
|
|
2280
|
-
InFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2281
|
-
InFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2844
|
+
InFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: InFilterComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2845
|
+
InFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: InFilterComponent, selector: "lib-in-filter", inputs: { type: "type" }, providers: [{
|
|
2282
2846
|
provide: NG_VALUE_ACCESSOR,
|
|
2283
2847
|
useExisting: InFilterComponent,
|
|
2284
2848
|
multi: true
|
|
2285
|
-
}], ngImport: i0, template: "<div class=inline>\n <div *ngFor=\"let val of value; index as i\">\n <input *ngIf=\"type === FieldType.Number || type === FieldType.Currency\"\n [ngModel]=\"val\" (ngModelChange)=\"onValueChange(i,$event)\"\n [readonly]=\"i+1 < value.length\" type=\"number\" [ngModelOptions]=\"{standalone:true}\" [autoFocus]=\"i === value.length - 1\"/>\n <input *ngIf=\"type !== FieldType.Number && type !== FieldType.Currency\"\n [ngModel]=\"val\" (ngModelChange)=\"onValueChange(i,$event)\"\n [readonly]=\"i+1 < value.length\" type=\"string\" [ngModelOptions]=\"{standalone:true}\"\n #input [autoFocus]=\"i === value.length - 1\" />\n <button [disabled]=\"value.length <= 1\" (click)=\"removeInput(i)\">-</button>\n <button *ngIf=\"i === value.length - 1\" [disabled]=\"val == undefined || val === ''\" (click)=\"addInput()\">+</button>\n </div>\n</div>\n", styles: [".inline{display:inline-block}\n"],
|
|
2286
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2849
|
+
}], ngImport: i0, template: "<div class=inline>\n <div *ngFor=\"let val of value; index as i\">\n <input *ngIf=\"type === FieldType.Number || type === FieldType.Currency\"\n [ngModel]=\"val\" (ngModelChange)=\"onValueChange(i,$event)\"\n [readonly]=\"i+1 < value.length\" type=\"number\" [ngModelOptions]=\"{standalone:true}\" [autoFocus]=\"i === value.length - 1\"/>\n <input *ngIf=\"type !== FieldType.Number && type !== FieldType.Currency\"\n [ngModel]=\"val\" (ngModelChange)=\"onValueChange(i,$event)\"\n [readonly]=\"i+1 < value.length\" type=\"string\" [ngModelOptions]=\"{standalone:true}\"\n #input [autoFocus]=\"i === value.length - 1\" />\n <button [disabled]=\"value.length <= 1\" (click)=\"removeInput(i)\">-</button>\n <button *ngIf=\"i === value.length - 1\" [disabled]=\"val == undefined || val === ''\" (click)=\"addInput()\">+</button>\n </div>\n</div>\n", styles: [".inline{display:inline-block}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4$3.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i4$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: AutoFocusDirective, selector: "[autoFocus]", inputs: ["autoFocus"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2850
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: InFilterComponent, decorators: [{
|
|
2287
2851
|
type: Component,
|
|
2288
2852
|
args: [{ selector: 'lib-in-filter', changeDetection: ChangeDetectionStrategy.OnPush, providers: [{
|
|
2289
2853
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -2300,9 +2864,9 @@ class NumberFilterComponent {
|
|
|
2300
2864
|
this.FieldType = FieldType;
|
|
2301
2865
|
}
|
|
2302
2866
|
}
|
|
2303
|
-
NumberFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2304
|
-
NumberFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2305
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2867
|
+
NumberFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: NumberFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2868
|
+
NumberFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: NumberFilterComponent, selector: "tb-number-filter", inputs: { CurrentFilterType: "CurrentFilterType", info: "info" }, ngImport: i0, template: "<ng-container *ngIf=\"CurrentFilterType !== FilterType.NumberBetween && CurrentFilterType !== FilterType.IsNull && CurrentFilterType !== FilterType.In\">\n <mat-form-field class=\"my-filter\">\n <input matInput name=\"filterValue\" [ngModel]=\"info.filterValue\" type=\"number\"/>\n </mat-form-field>\n</ng-container>\n\n\n<ng-container *ngIf=\"CurrentFilterType === FilterType.NumberBetween\">\n <ng-container ngModelGroup=\"filterValue\" >\n <mat-form-field class=\"my-filter\">\n <input matInput name=\"Start\" [ngModel]=\"info.filterValue?.Start\" placeholder=\"Start\" type=\"number\"/>\n </mat-form-field>\n <mat-form-field class=\"my-filter\">\n <input matInput name=\"End\" [ngModel]=\"info.filterValue?.End\" placeholder=\"End\" type=\"number\"/>\n </mat-form-field>\n </ng-container>\n</ng-container>\n\n<div class=\"inline\" *ngIf=\"CurrentFilterType === FilterType.In\">\n <lib-in-filter name='filterValue' [type]=\"FieldType.Number\" [(ngModel)]='info.filterValue' ></lib-in-filter>\n</div>\n", styles: [".switch{display:inline-block}.my-filter{margin-right:15px}.inline{display:inline-block}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i4$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4$3.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i4$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4$3.NgModelGroup, selector: "[ngModelGroup]", inputs: ["ngModelGroup"], exportAs: ["ngModelGroup"] }, { kind: "component", type: InFilterComponent, selector: "lib-in-filter", inputs: ["type"] }], viewProviders: [{ provide: ControlContainer, useExisting: NgForm }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2869
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: NumberFilterComponent, decorators: [{
|
|
2306
2870
|
type: Component,
|
|
2307
2871
|
args: [{ selector: 'tb-number-filter', changeDetection: ChangeDetectionStrategy.OnPush, viewProviders: [{ provide: ControlContainer, useExisting: NgForm }], template: "<ng-container *ngIf=\"CurrentFilterType !== FilterType.NumberBetween && CurrentFilterType !== FilterType.IsNull && CurrentFilterType !== FilterType.In\">\n <mat-form-field class=\"my-filter\">\n <input matInput name=\"filterValue\" [ngModel]=\"info.filterValue\" type=\"number\"/>\n </mat-form-field>\n</ng-container>\n\n\n<ng-container *ngIf=\"CurrentFilterType === FilterType.NumberBetween\">\n <ng-container ngModelGroup=\"filterValue\" >\n <mat-form-field class=\"my-filter\">\n <input matInput name=\"Start\" [ngModel]=\"info.filterValue?.Start\" placeholder=\"Start\" type=\"number\"/>\n </mat-form-field>\n <mat-form-field class=\"my-filter\">\n <input matInput name=\"End\" [ngModel]=\"info.filterValue?.End\" placeholder=\"End\" type=\"number\"/>\n </mat-form-field>\n </ng-container>\n</ng-container>\n\n<div class=\"inline\" *ngIf=\"CurrentFilterType === FilterType.In\">\n <lib-in-filter name='filterValue' [type]=\"FieldType.Number\" [(ngModel)]='info.filterValue' ></lib-in-filter>\n</div>\n", styles: [".switch{display:inline-block}.my-filter{margin-right:15px}.inline{display:inline-block}\n"] }]
|
|
2308
2872
|
}], propDecorators: { CurrentFilterType: [{
|
|
@@ -2311,22 +2875,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2311
2875
|
type: Input
|
|
2312
2876
|
}] } });
|
|
2313
2877
|
|
|
2314
|
-
class DateFilterComponent {
|
|
2315
|
-
constructor() {
|
|
2316
|
-
this.FilterType = FilterType;
|
|
2317
|
-
}
|
|
2318
|
-
}
|
|
2319
|
-
DateFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: DateFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2320
|
-
DateFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.5", type: DateFilterComponent, selector: "tb-date-filter", inputs: { info: "info", CurrentFilterType: "CurrentFilterType" }, ngImport: i0, template: "<ng-container *ngIf=\"CurrentFilterType !== FilterType.DateBetween && CurrentFilterType !== FilterType.IsNull\">\n <mat-form-field class=\"my-filter\">\n <input matInput name=\"filterValue\" [ngModel]=\"info.filterValue\" [matDatepicker]=\"cal\"/>\n <mat-datepicker-toggle matSuffix [for]=\"cal\" preventEnter></mat-datepicker-toggle>\n <mat-datepicker #cal></mat-datepicker>\n </mat-form-field>\n</ng-container>\n\n<ng-container *ngIf=\"CurrentFilterType === FilterType.DateBetween\">\n <ng-container ngModelGroup=\"filterValue\">\n <mat-form-field class=\"my-filter\" >\n <input matInput name=\"Start\" [ngModel]=\"info.filterValue?.Start\" placeholder=\"From\" [matDatepicker]=\"fromVal\"\n (click)=\"fromVal.open()\"/>\n <mat-datepicker-toggle matSuffix [for]=\"fromVal\" preventEnter></mat-datepicker-toggle>\n <mat-datepicker #fromVal></mat-datepicker>\n </mat-form-field>\n <mat-form-field class=\"my-filter\">\n <input matInput name=\"End\" [ngModel]=\"info.filterValue?.End\" placeholder=\"To\" [matDatepicker]=\"toVal\" (click)=\"toVal.open()\"/>\n <mat-datepicker-toggle matSuffix [for]=\"toVal\" preventEnter></mat-datepicker-toggle>\n <mat-datepicker #toVal></mat-datepicker>\n </mat-form-field>\n </ng-container>\n</ng-container>\n\n", components: [{ type: i6.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i8.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { type: i8.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i8.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i6.MatSuffix, selector: "[matSuffix]" }, { type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i5.NgModelGroup, selector: "[ngModelGroup]", inputs: ["ngModelGroup"], exportAs: ["ngModelGroup"] }], viewProviders: [{ provide: ControlContainer, useExisting: NgForm }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2321
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: DateFilterComponent, decorators: [{
|
|
2322
|
-
type: Component,
|
|
2323
|
-
args: [{ selector: 'tb-date-filter', changeDetection: ChangeDetectionStrategy.OnPush, viewProviders: [{ provide: ControlContainer, useExisting: NgForm }], template: "<ng-container *ngIf=\"CurrentFilterType !== FilterType.DateBetween && CurrentFilterType !== FilterType.IsNull\">\n <mat-form-field class=\"my-filter\">\n <input matInput name=\"filterValue\" [ngModel]=\"info.filterValue\" [matDatepicker]=\"cal\"/>\n <mat-datepicker-toggle matSuffix [for]=\"cal\" preventEnter></mat-datepicker-toggle>\n <mat-datepicker #cal></mat-datepicker>\n </mat-form-field>\n</ng-container>\n\n<ng-container *ngIf=\"CurrentFilterType === FilterType.DateBetween\">\n <ng-container ngModelGroup=\"filterValue\">\n <mat-form-field class=\"my-filter\" >\n <input matInput name=\"Start\" [ngModel]=\"info.filterValue?.Start\" placeholder=\"From\" [matDatepicker]=\"fromVal\"\n (click)=\"fromVal.open()\"/>\n <mat-datepicker-toggle matSuffix [for]=\"fromVal\" preventEnter></mat-datepicker-toggle>\n <mat-datepicker #fromVal></mat-datepicker>\n </mat-form-field>\n <mat-form-field class=\"my-filter\">\n <input matInput name=\"End\" [ngModel]=\"info.filterValue?.End\" placeholder=\"To\" [matDatepicker]=\"toVal\" (click)=\"toVal.open()\"/>\n <mat-datepicker-toggle matSuffix [for]=\"toVal\" preventEnter></mat-datepicker-toggle>\n <mat-datepicker #toVal></mat-datepicker>\n </mat-form-field>\n </ng-container>\n</ng-container>\n\n" }]
|
|
2324
|
-
}], propDecorators: { info: [{
|
|
2325
|
-
type: Input
|
|
2326
|
-
}], CurrentFilterType: [{
|
|
2327
|
-
type: Input
|
|
2328
|
-
}] } });
|
|
2329
|
-
|
|
2330
2878
|
class FilterComponent {
|
|
2331
2879
|
constructor(state) {
|
|
2332
2880
|
this.state = state;
|
|
@@ -2347,11 +2895,11 @@ class FilterComponent {
|
|
|
2347
2895
|
}
|
|
2348
2896
|
}
|
|
2349
2897
|
}
|
|
2350
|
-
FilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2351
|
-
FilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2352
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2898
|
+
FilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: FilterComponent, deps: [{ token: TableStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
2899
|
+
FilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: FilterComponent, selector: "tb-filter", inputs: { filter: "filter" }, outputs: { close: "close" }, ngImport: i0, template: "<mat-card appearance=\"outlined\" class=\"filter-card\" *ngIf=\"filter\">\n <mat-card-content>\n <form #form=\"ngForm\" (keydown.enter)=\"onEnter(form.value,$event)\" (keydown.escape)=\"close.emit()\">\n <input type=\"hidden\" name=\"filterId\" [ngModel]=\"filter.filterId\" />\n <input type=\"hidden\" name=\"key\" [ngModel]=\"filter.key\" />\n <input type=\"hidden\" name=\"fieldType\" [ngModel]=\"filter.fieldType\" />\n <div class=\"head-row\" >\n <h4 class=\"filter-name\">{{(filter.key | spaceCase)}} Filter</h4>\n <button class=\"cancel-button small-button\" color=\"primary\" mat-icon-button (click)=\"close.emit();\" type=\"button\"\n matTooltip=\"Close\">\n <mat-icon class=\"cancel-button\" color=\"primary\">close</mat-icon>\n </button>\n </div>\n <div class=\"filter-row\">\n <div class=\"inline\">\n <mat-form-field class=\"my-filter\" >\n <mat-select placeholder=\"Select Filter Type\" name=\"filterType\" [(ngModel)]=\"currentFilterType\" >\n <mat-option *ngFor=\"let kvp of filterTypes[filter.fieldType] | keyvalue \" [value]=\"$any(kvp.value)[0]\">\n {{ kvp.key }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <ng-container [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"filter.fieldType === FieldType.String || filter.fieldType === FieldType.Array || filter.fieldType === FieldType.Link ||\n filter.fieldType === FieldType.Unknown || filter.fieldType === FieldType.PhoneNumber\" >\n <ng-container *ngTemplateOutlet=\"String\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"filter.fieldType === FieldType.Number || filter.fieldType === FieldType.Currency\">\n <tb-number-filter [info]=\"filter\" [CurrentFilterType]=\"currentFilterType!\" ></tb-number-filter>\n </ng-container>\n <ng-container *ngSwitchCase=\"filter.fieldType === FieldType.Boolean\">\n <ng-container *ngTemplateOutlet=\"Boolean\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"filter.fieldType === FieldType.Date\">\n <tb-date-filter [info]=\"filter\" [CurrentFilterType]=\"currentFilterType!\"></tb-date-filter>\n </ng-container>\n <ng-container *ngSwitchCase='filter.fieldType === FieldType.Enum' >\n <ng-container *ngTemplateOutlet=\"Enum\"></ng-container>\n </ng-container>\n </ng-container>\n <mat-radio-group name=\"filterValue\" [ngModel]=\"filter.filterValue\" *ngIf=\"currentFilterType === FilterType.IsNull\">\n <mat-radio-button [value]=\"true\">True</mat-radio-button>\n <mat-radio-button [value]=\"false\">False</mat-radio-button>\n </mat-radio-group>\n </div>\n <button mat-button (click)=\"state.addFilter(form.value)\" disableRipple [disabled]=\"form.value.filterValue==undefined || !form.value.filterType\">\n Apply\n </button>\n \n \n <ng-template #String>\n <mat-form-field class=\"my-filter\" *ngIf=\"currentFilterType !== FilterType.IsNull && currentFilterType !== FilterType.In\">\n <input matInput name=\"filterValue\" [ngModel]=\"filter.filterValue\" />\n </mat-form-field>\n <ng-container *ngIf=\"currentFilterType === FilterType.In\">\n <lib-in-filter [type]=\"FieldType.String\" name='filterValue' [(ngModel)]=\"filter.filterValue\" ></lib-in-filter>\n </ng-container>\n </ng-template>\n \n <ng-template #Boolean >\n <div class=\"switch\" [ngSwitch]=\"currentFilterType\">\n <div class=\"switch\" *ngSwitchCase=\"FilterType.BooleanEquals\">\n <mat-radio-group name=\"filterValue\" [ngModel]=\"filter.filterValue\" >\n <mat-radio-button [value]=\"true\" preventEnter>True</mat-radio-button>\n <mat-radio-button [value]=\"false\" preventEnter>False</mat-radio-button>\n </mat-radio-group>\n </div>\n </div>\n </ng-template>\n <ng-template #Enum>\n <ng-container *ngIf='currentFilterType === FilterType.In' >\n <tb-in-list-filter [key]='filter.key' name='filterValue' [(ngModel)]='filter.filterValue' ></tb-in-list-filter>\n </ng-container>\n </ng-template>\n </form>\n </mat-card-content>\n</mat-card>\n", styles: [".filter-name{color:#6495ed;margin:10px 0;font-weight:600;display:inline-block}.switch{display:inline-block}.my-filter{margin-right:15px}.cancel-button{float:right}.head-row{width:100%}.filter-row{width:-moz-fit-content;width:fit-content}mat-card.filter-card::ng-deep mat-form-field{width:150px}mat-card.filter-card::ng-deep .mat-mdc-form-field-subscript-wrapper{line-height:0}mat-card.filter-card::ng-deep .mat-mdc-form-field-subscript-wrapper:before{height:0}.inline{display:inline-block}.small-button{height:18px;width:18px;font-size:18px;padding:0;margin:0}.small-button ::ng-deep *{line-height:initial;font-size:initial;height:18px;width:18px;font-size:18px;bottom:initial}.cancel-button{float:right;font-weight:700}.date-toggle ::ng-deep svg{position:absolute;left:0;top:0}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i4$5.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i7$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i6.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { kind: "component", type: i6.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { kind: "component", type: i4$2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$2.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i9$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i9$1.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i8$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4$3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4$3.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: DateFilterComponent, selector: "tb-date-filter", inputs: ["info", "CurrentFilterType"] }, { kind: "component", type: NumberFilterComponent, selector: "tb-number-filter", inputs: ["CurrentFilterType", "info"] }, { kind: "component", type: InFilterComponent, selector: "lib-in-filter", inputs: ["type"] }, { kind: "component", type: InListFilterComponent, selector: "tb-in-list-filter , [tb-in-list-filter]", inputs: ["key"] }, { kind: "pipe", type: i2.KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: SpaceCasePipe, name: "spaceCase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2900
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: FilterComponent, decorators: [{
|
|
2353
2901
|
type: Component,
|
|
2354
|
-
args: [{ selector: 'tb-filter', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-card class=\"
|
|
2902
|
+
args: [{ selector: 'tb-filter', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-card appearance=\"outlined\" class=\"filter-card\" *ngIf=\"filter\">\n <mat-card-content>\n <form #form=\"ngForm\" (keydown.enter)=\"onEnter(form.value,$event)\" (keydown.escape)=\"close.emit()\">\n <input type=\"hidden\" name=\"filterId\" [ngModel]=\"filter.filterId\" />\n <input type=\"hidden\" name=\"key\" [ngModel]=\"filter.key\" />\n <input type=\"hidden\" name=\"fieldType\" [ngModel]=\"filter.fieldType\" />\n <div class=\"head-row\" >\n <h4 class=\"filter-name\">{{(filter.key | spaceCase)}} Filter</h4>\n <button class=\"cancel-button small-button\" color=\"primary\" mat-icon-button (click)=\"close.emit();\" type=\"button\"\n matTooltip=\"Close\">\n <mat-icon class=\"cancel-button\" color=\"primary\">close</mat-icon>\n </button>\n </div>\n <div class=\"filter-row\">\n <div class=\"inline\">\n <mat-form-field class=\"my-filter\" >\n <mat-select placeholder=\"Select Filter Type\" name=\"filterType\" [(ngModel)]=\"currentFilterType\" >\n <mat-option *ngFor=\"let kvp of filterTypes[filter.fieldType] | keyvalue \" [value]=\"$any(kvp.value)[0]\">\n {{ kvp.key }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <ng-container [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"filter.fieldType === FieldType.String || filter.fieldType === FieldType.Array || filter.fieldType === FieldType.Link ||\n filter.fieldType === FieldType.Unknown || filter.fieldType === FieldType.PhoneNumber\" >\n <ng-container *ngTemplateOutlet=\"String\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"filter.fieldType === FieldType.Number || filter.fieldType === FieldType.Currency\">\n <tb-number-filter [info]=\"filter\" [CurrentFilterType]=\"currentFilterType!\" ></tb-number-filter>\n </ng-container>\n <ng-container *ngSwitchCase=\"filter.fieldType === FieldType.Boolean\">\n <ng-container *ngTemplateOutlet=\"Boolean\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"filter.fieldType === FieldType.Date\">\n <tb-date-filter [info]=\"filter\" [CurrentFilterType]=\"currentFilterType!\"></tb-date-filter>\n </ng-container>\n <ng-container *ngSwitchCase='filter.fieldType === FieldType.Enum' >\n <ng-container *ngTemplateOutlet=\"Enum\"></ng-container>\n </ng-container>\n </ng-container>\n <mat-radio-group name=\"filterValue\" [ngModel]=\"filter.filterValue\" *ngIf=\"currentFilterType === FilterType.IsNull\">\n <mat-radio-button [value]=\"true\">True</mat-radio-button>\n <mat-radio-button [value]=\"false\">False</mat-radio-button>\n </mat-radio-group>\n </div>\n <button mat-button (click)=\"state.addFilter(form.value)\" disableRipple [disabled]=\"form.value.filterValue==undefined || !form.value.filterType\">\n Apply\n </button>\n \n \n <ng-template #String>\n <mat-form-field class=\"my-filter\" *ngIf=\"currentFilterType !== FilterType.IsNull && currentFilterType !== FilterType.In\">\n <input matInput name=\"filterValue\" [ngModel]=\"filter.filterValue\" />\n </mat-form-field>\n <ng-container *ngIf=\"currentFilterType === FilterType.In\">\n <lib-in-filter [type]=\"FieldType.String\" name='filterValue' [(ngModel)]=\"filter.filterValue\" ></lib-in-filter>\n </ng-container>\n </ng-template>\n \n <ng-template #Boolean >\n <div class=\"switch\" [ngSwitch]=\"currentFilterType\">\n <div class=\"switch\" *ngSwitchCase=\"FilterType.BooleanEquals\">\n <mat-radio-group name=\"filterValue\" [ngModel]=\"filter.filterValue\" >\n <mat-radio-button [value]=\"true\" preventEnter>True</mat-radio-button>\n <mat-radio-button [value]=\"false\" preventEnter>False</mat-radio-button>\n </mat-radio-group>\n </div>\n </div>\n </ng-template>\n <ng-template #Enum>\n <ng-container *ngIf='currentFilterType === FilterType.In' >\n <tb-in-list-filter [key]='filter.key' name='filterValue' [(ngModel)]='filter.filterValue' ></tb-in-list-filter>\n </ng-container>\n </ng-template>\n </form>\n </mat-card-content>\n</mat-card>\n", styles: [".filter-name{color:#6495ed;margin:10px 0;font-weight:600;display:inline-block}.switch{display:inline-block}.my-filter{margin-right:15px}.cancel-button{float:right}.head-row{width:100%}.filter-row{width:-moz-fit-content;width:fit-content}mat-card.filter-card::ng-deep mat-form-field{width:150px}mat-card.filter-card::ng-deep .mat-mdc-form-field-subscript-wrapper{line-height:0}mat-card.filter-card::ng-deep .mat-mdc-form-field-subscript-wrapper:before{height:0}.inline{display:inline-block}.small-button{height:18px;width:18px;font-size:18px;padding:0;margin:0}.small-button ::ng-deep *{line-height:initial;font-size:initial;height:18px;width:18px;font-size:18px;bottom:initial}.cancel-button{float:right;font-weight:700}.date-toggle ::ng-deep svg{position:absolute;left:0;top:0}\n"] }]
|
|
2355
2903
|
}], ctorParameters: function () { return [{ type: TableStore }]; }, propDecorators: { filter: [{
|
|
2356
2904
|
type: Input
|
|
2357
2905
|
}], close: [{
|
|
@@ -2360,8 +2908,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2360
2908
|
|
|
2361
2909
|
class MaterialModule {
|
|
2362
2910
|
}
|
|
2363
|
-
MaterialModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2364
|
-
MaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
2911
|
+
MaterialModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: MaterialModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2912
|
+
MaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: MaterialModule, imports: [MatSlideToggleModule,
|
|
2913
|
+
MatTableModule,
|
|
2914
|
+
MatSelectModule,
|
|
2915
|
+
MatDialogModule,
|
|
2916
|
+
MatDatepickerModule,
|
|
2917
|
+
MatRadioModule,
|
|
2918
|
+
MatButtonModule,
|
|
2919
|
+
MatExpansionModule,
|
|
2920
|
+
MatStepperModule,
|
|
2921
|
+
MatToolbarModule,
|
|
2922
|
+
MatTooltipModule,
|
|
2923
|
+
MatNativeDateModule,
|
|
2924
|
+
MatProgressSpinnerModule,
|
|
2925
|
+
MatGridListModule,
|
|
2926
|
+
MatCardModule,
|
|
2927
|
+
MatSidenavModule,
|
|
2928
|
+
MatTabsModule,
|
|
2929
|
+
MatInputModule,
|
|
2930
|
+
MatTabsModule,
|
|
2931
|
+
MatCheckboxModule,
|
|
2932
|
+
MatMenuModule,
|
|
2933
|
+
MatIconModule,
|
|
2934
|
+
MatBadgeModule,
|
|
2935
|
+
MatSortModule,
|
|
2936
|
+
MatAutocompleteModule,
|
|
2937
|
+
MatPaginatorModule,
|
|
2938
|
+
MatChipsModule,
|
|
2939
|
+
MatDialogModule], exports: [MatSlideToggleModule,
|
|
2365
2940
|
MatTableModule,
|
|
2366
2941
|
MatSelectModule,
|
|
2367
2942
|
MatDialogModule,
|
|
@@ -2373,9 +2948,7 @@ MaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
|
|
|
2373
2948
|
MatToolbarModule,
|
|
2374
2949
|
MatTooltipModule,
|
|
2375
2950
|
MatNativeDateModule,
|
|
2376
|
-
MatSnackBarModule,
|
|
2377
2951
|
MatProgressSpinnerModule,
|
|
2378
|
-
MatListModule,
|
|
2379
2952
|
MatGridListModule,
|
|
2380
2953
|
MatCardModule,
|
|
2381
2954
|
MatSidenavModule,
|
|
@@ -2390,7 +2963,8 @@ MaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
|
|
|
2390
2963
|
MatAutocompleteModule,
|
|
2391
2964
|
MatPaginatorModule,
|
|
2392
2965
|
MatChipsModule,
|
|
2393
|
-
MatDialogModule]
|
|
2966
|
+
MatDialogModule] });
|
|
2967
|
+
MaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: MaterialModule, imports: [MatSlideToggleModule,
|
|
2394
2968
|
MatTableModule,
|
|
2395
2969
|
MatSelectModule,
|
|
2396
2970
|
MatDialogModule,
|
|
@@ -2402,9 +2976,7 @@ MaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
|
|
|
2402
2976
|
MatToolbarModule,
|
|
2403
2977
|
MatTooltipModule,
|
|
2404
2978
|
MatNativeDateModule,
|
|
2405
|
-
MatSnackBarModule,
|
|
2406
2979
|
MatProgressSpinnerModule,
|
|
2407
|
-
MatListModule,
|
|
2408
2980
|
MatGridListModule,
|
|
2409
2981
|
MatCardModule,
|
|
2410
2982
|
MatSidenavModule,
|
|
@@ -2419,39 +2991,7 @@ MaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
|
|
|
2419
2991
|
MatAutocompleteModule,
|
|
2420
2992
|
MatPaginatorModule,
|
|
2421
2993
|
MatChipsModule,
|
|
2422
|
-
MatDialogModule
|
|
2423
|
-
MaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: MaterialModule, imports: [[
|
|
2424
|
-
MatSlideToggleModule,
|
|
2425
|
-
MatTableModule,
|
|
2426
|
-
MatSelectModule,
|
|
2427
|
-
MatDialogModule,
|
|
2428
|
-
MatDatepickerModule,
|
|
2429
|
-
MatRadioModule,
|
|
2430
|
-
MatButtonModule,
|
|
2431
|
-
MatExpansionModule,
|
|
2432
|
-
MatStepperModule,
|
|
2433
|
-
MatToolbarModule,
|
|
2434
|
-
MatTooltipModule,
|
|
2435
|
-
MatNativeDateModule,
|
|
2436
|
-
MatSnackBarModule,
|
|
2437
|
-
MatProgressSpinnerModule,
|
|
2438
|
-
MatListModule,
|
|
2439
|
-
MatGridListModule,
|
|
2440
|
-
MatCardModule,
|
|
2441
|
-
MatSidenavModule,
|
|
2442
|
-
MatTabsModule,
|
|
2443
|
-
MatInputModule,
|
|
2444
|
-
MatTabsModule,
|
|
2445
|
-
MatCheckboxModule,
|
|
2446
|
-
MatMenuModule,
|
|
2447
|
-
MatIconModule,
|
|
2448
|
-
MatBadgeModule,
|
|
2449
|
-
MatSortModule,
|
|
2450
|
-
MatAutocompleteModule,
|
|
2451
|
-
MatPaginatorModule,
|
|
2452
|
-
MatChipsModule,
|
|
2453
|
-
MatDialogModule,
|
|
2454
|
-
], MatSlideToggleModule,
|
|
2994
|
+
MatDialogModule, MatSlideToggleModule,
|
|
2455
2995
|
MatTableModule,
|
|
2456
2996
|
MatSelectModule,
|
|
2457
2997
|
MatDialogModule,
|
|
@@ -2463,9 +3003,7 @@ MaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
|
|
|
2463
3003
|
MatToolbarModule,
|
|
2464
3004
|
MatTooltipModule,
|
|
2465
3005
|
MatNativeDateModule,
|
|
2466
|
-
MatSnackBarModule,
|
|
2467
3006
|
MatProgressSpinnerModule,
|
|
2468
|
-
MatListModule,
|
|
2469
3007
|
MatGridListModule,
|
|
2470
3008
|
MatCardModule,
|
|
2471
3009
|
MatSidenavModule,
|
|
@@ -2481,7 +3019,7 @@ MaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
|
|
|
2481
3019
|
MatPaginatorModule,
|
|
2482
3020
|
MatChipsModule,
|
|
2483
3021
|
MatDialogModule] });
|
|
2484
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3022
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: MaterialModule, decorators: [{
|
|
2485
3023
|
type: NgModule,
|
|
2486
3024
|
args: [{
|
|
2487
3025
|
imports: [
|
|
@@ -2497,9 +3035,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2497
3035
|
MatToolbarModule,
|
|
2498
3036
|
MatTooltipModule,
|
|
2499
3037
|
MatNativeDateModule,
|
|
2500
|
-
MatSnackBarModule,
|
|
2501
3038
|
MatProgressSpinnerModule,
|
|
2502
|
-
MatListModule,
|
|
2503
3039
|
MatGridListModule,
|
|
2504
3040
|
MatCardModule,
|
|
2505
3041
|
MatSidenavModule,
|
|
@@ -2529,9 +3065,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2529
3065
|
MatToolbarModule,
|
|
2530
3066
|
MatTooltipModule,
|
|
2531
3067
|
MatNativeDateModule,
|
|
2532
|
-
MatSnackBarModule,
|
|
2533
3068
|
MatProgressSpinnerModule,
|
|
2534
|
-
MatListModule,
|
|
2535
3069
|
MatGridListModule,
|
|
2536
3070
|
MatCardModule,
|
|
2537
3071
|
MatSidenavModule,
|
|
@@ -2572,11 +3106,11 @@ class MultiSortDirective extends MatSort {
|
|
|
2572
3106
|
});
|
|
2573
3107
|
}
|
|
2574
3108
|
}
|
|
2575
|
-
MultiSortDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2576
|
-
MultiSortDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
3109
|
+
MultiSortDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: MultiSortDirective, deps: [{ token: TableStore }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3110
|
+
MultiSortDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: MultiSortDirective, selector: "[multiSort]", inputs: { disabled: ["matSortDisabled", "disabled"] }, providers: [
|
|
2577
3111
|
{ provide: MatSort, useExisting: MultiSortDirective }
|
|
2578
3112
|
], exportAs: ["multiSort"], usesInheritance: true, ngImport: i0 });
|
|
2579
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3113
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: MultiSortDirective, decorators: [{
|
|
2580
3114
|
type: Directive,
|
|
2581
3115
|
args: [{
|
|
2582
3116
|
selector: '[multiSort]',
|
|
@@ -2598,16 +3132,16 @@ class TableCustomFilterDirective {
|
|
|
2598
3132
|
this.used = false;
|
|
2599
3133
|
}
|
|
2600
3134
|
}
|
|
2601
|
-
TableCustomFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2602
|
-
TableCustomFilterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
2603
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3135
|
+
TableCustomFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TableCustomFilterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3136
|
+
TableCustomFilterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: TableCustomFilterDirective, selector: " ", ngImport: i0 });
|
|
3137
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TableCustomFilterDirective, decorators: [{
|
|
2604
3138
|
type: Directive,
|
|
2605
3139
|
args: [{
|
|
2606
3140
|
selector: ' '
|
|
2607
3141
|
}]
|
|
2608
3142
|
}] });
|
|
2609
3143
|
class TableFilterDirective extends ComponentStore {
|
|
2610
|
-
constructor(model) {
|
|
3144
|
+
constructor(model, wrapper) {
|
|
2611
3145
|
super();
|
|
2612
3146
|
this.model = model;
|
|
2613
3147
|
this.filter$ = this.state$;
|
|
@@ -2617,6 +3151,9 @@ class TableFilterDirective extends ComponentStore {
|
|
|
2617
3151
|
this.savable = false;
|
|
2618
3152
|
this.ready = false;
|
|
2619
3153
|
this._userActive = true;
|
|
3154
|
+
if (wrapper) {
|
|
3155
|
+
wrapper.register(this);
|
|
3156
|
+
}
|
|
2620
3157
|
if (model) {
|
|
2621
3158
|
this.effect(() => {
|
|
2622
3159
|
return model.valueChanges.pipe(tap$1(val => {
|
|
@@ -2669,14 +3206,16 @@ class TableFilterDirective extends ComponentStore {
|
|
|
2669
3206
|
}
|
|
2670
3207
|
}
|
|
2671
3208
|
}
|
|
2672
|
-
TableFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2673
|
-
TableFilterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
2674
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3209
|
+
TableFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TableFilterDirective, deps: [{ token: i4$3.NgControl, optional: true }, { token: TableWrapperDirective, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3210
|
+
TableFilterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: TableFilterDirective, selector: "[tbFilter]", inputs: { filterType: "filterType", key: "key", fieldType: "fieldType", filterId: "filterId", active: "active", filterValue: "filterValue" }, usesInheritance: true, usesOnChanges: true, ngImport: i0 });
|
|
3211
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TableFilterDirective, decorators: [{
|
|
2675
3212
|
type: Directive,
|
|
2676
3213
|
args: [{
|
|
2677
3214
|
selector: "[tbFilter]"
|
|
2678
3215
|
}]
|
|
2679
|
-
}], ctorParameters: function () { return [{ type:
|
|
3216
|
+
}], ctorParameters: function () { return [{ type: i4$3.NgControl, decorators: [{
|
|
3217
|
+
type: Optional
|
|
3218
|
+
}] }, { type: TableWrapperDirective, decorators: [{
|
|
2680
3219
|
type: Optional
|
|
2681
3220
|
}] }]; }, propDecorators: { filterType: [{
|
|
2682
3221
|
type: Input
|
|
@@ -2692,8 +3231,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2692
3231
|
type: Input
|
|
2693
3232
|
}] } });
|
|
2694
3233
|
class TableFilterStringContainsDirective extends TableFilterDirective {
|
|
2695
|
-
constructor(model) {
|
|
2696
|
-
super(model);
|
|
3234
|
+
constructor(model, wrapper) {
|
|
3235
|
+
super(model, wrapper);
|
|
2697
3236
|
this.filterType = FilterType.StringContains;
|
|
2698
3237
|
this.fieldType = FieldType.String;
|
|
2699
3238
|
this.effect(() => {
|
|
@@ -2720,9 +3259,9 @@ class TableFilterStringContainsDirective extends TableFilterDirective {
|
|
|
2720
3259
|
super.ngOnChanges(changes);
|
|
2721
3260
|
}
|
|
2722
3261
|
}
|
|
2723
|
-
TableFilterStringContainsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2724
|
-
TableFilterStringContainsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
2725
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3262
|
+
TableFilterStringContainsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TableFilterStringContainsDirective, deps: [{ token: i4$3.NgControl, optional: true }, { token: TableWrapperDirective, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3263
|
+
TableFilterStringContainsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: TableFilterStringContainsDirective, selector: "[tbFilterStringContains]", inputs: { key: ["tbFilterStringContains", "key"], filterValue: "filterValue", filterId: "filterId", active: "active" }, providers: [{ provide: TableFilterDirective, useExisting: TableFilterStringContainsDirective }], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
|
|
3264
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TableFilterStringContainsDirective, decorators: [{
|
|
2726
3265
|
type: Directive,
|
|
2727
3266
|
args: [{
|
|
2728
3267
|
selector: '[tbFilterStringContains]',
|
|
@@ -2734,7 +3273,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2734
3273
|
'active: active',
|
|
2735
3274
|
]
|
|
2736
3275
|
}]
|
|
2737
|
-
}], ctorParameters: function () { return [{ type:
|
|
3276
|
+
}], ctorParameters: function () { return [{ type: i4$3.NgControl, decorators: [{
|
|
3277
|
+
type: Optional
|
|
3278
|
+
}] }, { type: TableWrapperDirective, decorators: [{
|
|
2738
3279
|
type: Optional
|
|
2739
3280
|
}] }]; } });
|
|
2740
3281
|
class TableCustomFilterDirectiveBase extends TableCustomFilterDirective {
|
|
@@ -2779,9 +3320,9 @@ class TableCustomFilterDirectiveBase extends TableCustomFilterDirective {
|
|
|
2779
3320
|
this.filter$ = new BehaviorSubject(this.filter);
|
|
2780
3321
|
}
|
|
2781
3322
|
}
|
|
2782
|
-
TableCustomFilterDirectiveBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2783
|
-
TableCustomFilterDirectiveBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
2784
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3323
|
+
TableCustomFilterDirectiveBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TableCustomFilterDirectiveBase, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
3324
|
+
TableCustomFilterDirectiveBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: TableCustomFilterDirectiveBase, selector: "[tbCustomFilter]", inputs: { filterId: "filterId", predicate: ["tbCustomFilter", "predicate"], active: "active" }, usesInheritance: true, ngImport: i0 });
|
|
3325
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TableCustomFilterDirectiveBase, decorators: [{
|
|
2785
3326
|
type: Directive,
|
|
2786
3327
|
args: [{
|
|
2787
3328
|
selector: "[tbCustomFilter]",
|
|
@@ -2795,11 +3336,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2795
3336
|
type: Input
|
|
2796
3337
|
}] } });
|
|
2797
3338
|
class TbSelectedFilterDirective extends TableCustomFilterDirectiveBase {
|
|
2798
|
-
constructor(change, isActive) {
|
|
3339
|
+
constructor(change, isActive, wrapper) {
|
|
2799
3340
|
super();
|
|
2800
3341
|
this.change = change;
|
|
2801
3342
|
this.isActive = isActive;
|
|
2802
3343
|
this.destroySubject$ = new ReplaySubject(1);
|
|
3344
|
+
if (wrapper) {
|
|
3345
|
+
wrapper.register(this);
|
|
3346
|
+
}
|
|
2803
3347
|
}
|
|
2804
3348
|
reset() {
|
|
2805
3349
|
this.active = false;
|
|
@@ -2815,15 +3359,17 @@ class TbSelectedFilterDirective extends TableCustomFilterDirectiveBase {
|
|
|
2815
3359
|
});
|
|
2816
3360
|
}
|
|
2817
3361
|
}
|
|
2818
|
-
TbSelectedFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2819
|
-
TbSelectedFilterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
2820
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3362
|
+
TbSelectedFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TbSelectedFilterDirective, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
|
3363
|
+
TbSelectedFilterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: TbSelectedFilterDirective, usesInheritance: true, ngImport: i0 });
|
|
3364
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TbSelectedFilterDirective, decorators: [{
|
|
2821
3365
|
type: Directive
|
|
2822
|
-
}], ctorParameters: function () { return [{ type:
|
|
3366
|
+
}], ctorParameters: function () { return [{ type: i3$3.Observable }, { type: undefined }, { type: TableWrapperDirective, decorators: [{
|
|
3367
|
+
type: Optional
|
|
3368
|
+
}] }]; } });
|
|
2823
3369
|
// Checkbox
|
|
2824
3370
|
class MatCheckboxTbFilterDirective extends TbSelectedFilterDirective {
|
|
2825
|
-
constructor(matCheckbox) {
|
|
2826
|
-
super(matCheckbox.change, () => matCheckbox.checked);
|
|
3371
|
+
constructor(matCheckbox, wrapper) {
|
|
3372
|
+
super(matCheckbox.change, () => matCheckbox.checked, wrapper);
|
|
2827
3373
|
this.matCheckbox = matCheckbox;
|
|
2828
3374
|
}
|
|
2829
3375
|
set active(val) {
|
|
@@ -2831,9 +3377,9 @@ class MatCheckboxTbFilterDirective extends TbSelectedFilterDirective {
|
|
|
2831
3377
|
super.active = val;
|
|
2832
3378
|
}
|
|
2833
3379
|
}
|
|
2834
|
-
MatCheckboxTbFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2835
|
-
MatCheckboxTbFilterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
2836
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3380
|
+
MatCheckboxTbFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: MatCheckboxTbFilterDirective, deps: [{ token: i4.MatCheckbox }, { token: TableWrapperDirective, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3381
|
+
MatCheckboxTbFilterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: MatCheckboxTbFilterDirective, selector: "mat-checkbox[tbCustomFilter]", inputs: { predicate: ["tbCustomFilter", "predicate"], filterId: "filterId" }, providers: [{ provide: TableCustomFilterDirective, useExisting: MatCheckboxTbFilterDirective }], usesInheritance: true, ngImport: i0 });
|
|
3382
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: MatCheckboxTbFilterDirective, decorators: [{
|
|
2837
3383
|
type: Directive,
|
|
2838
3384
|
args: [{
|
|
2839
3385
|
selector: 'mat-checkbox[tbCustomFilter]',
|
|
@@ -2842,10 +3388,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2842
3388
|
],
|
|
2843
3389
|
providers: [{ provide: TableCustomFilterDirective, useExisting: MatCheckboxTbFilterDirective }]
|
|
2844
3390
|
}]
|
|
2845
|
-
}], ctorParameters: function () { return [{ type:
|
|
3391
|
+
}], ctorParameters: function () { return [{ type: i4.MatCheckbox }, { type: TableWrapperDirective, decorators: [{
|
|
3392
|
+
type: Optional
|
|
3393
|
+
}] }]; } });
|
|
2846
3394
|
class MatSlideToggleTbFilterDirective extends TbSelectedFilterDirective {
|
|
2847
|
-
constructor(matSlideToggle) {
|
|
2848
|
-
super(matSlideToggle.change, () => matSlideToggle.checked);
|
|
3395
|
+
constructor(matSlideToggle, wrapper) {
|
|
3396
|
+
super(matSlideToggle.change, () => matSlideToggle.checked, wrapper);
|
|
2849
3397
|
this.matSlideToggle = matSlideToggle;
|
|
2850
3398
|
}
|
|
2851
3399
|
set active(val) {
|
|
@@ -2856,9 +3404,9 @@ class MatSlideToggleTbFilterDirective extends TbSelectedFilterDirective {
|
|
|
2856
3404
|
super.ngOnInit();
|
|
2857
3405
|
}
|
|
2858
3406
|
}
|
|
2859
|
-
MatSlideToggleTbFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2860
|
-
MatSlideToggleTbFilterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
2861
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3407
|
+
MatSlideToggleTbFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: MatSlideToggleTbFilterDirective, deps: [{ token: i5$1.MatSlideToggle }, { token: TableWrapperDirective, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3408
|
+
MatSlideToggleTbFilterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: MatSlideToggleTbFilterDirective, selector: "mat-slide-toggle[tbCustomFilter]", inputs: { predicate: ["tbCustomFilter", "predicate"], filterId: "filterId" }, providers: [{ provide: TableCustomFilterDirective, useExisting: MatSlideToggleTbFilterDirective }], usesInheritance: true, ngImport: i0 });
|
|
3409
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: MatSlideToggleTbFilterDirective, decorators: [{
|
|
2862
3410
|
type: Directive,
|
|
2863
3411
|
args: [{
|
|
2864
3412
|
selector: 'mat-slide-toggle[tbCustomFilter]',
|
|
@@ -2867,11 +3415,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2867
3415
|
],
|
|
2868
3416
|
providers: [{ provide: TableCustomFilterDirective, useExisting: MatSlideToggleTbFilterDirective }]
|
|
2869
3417
|
}]
|
|
2870
|
-
}], ctorParameters: function () { return [{ type:
|
|
3418
|
+
}], ctorParameters: function () { return [{ type: i5$1.MatSlideToggle }, { type: TableWrapperDirective, decorators: [{
|
|
3419
|
+
type: Optional
|
|
3420
|
+
}] }]; } });
|
|
2871
3421
|
// Radio button
|
|
2872
3422
|
class MatRadioButtonTbFilterDirective extends TbSelectedFilterDirective {
|
|
2873
|
-
constructor(matRadioButton) {
|
|
2874
|
-
super(matRadioButton.change, () => matRadioButton.checked);
|
|
3423
|
+
constructor(matRadioButton, wrapper) {
|
|
3424
|
+
super(matRadioButton.change, () => matRadioButton.checked, wrapper);
|
|
2875
3425
|
this.matRadioButton = matRadioButton;
|
|
2876
3426
|
}
|
|
2877
3427
|
set active(val) {
|
|
@@ -2882,24 +3432,26 @@ class MatRadioButtonTbFilterDirective extends TbSelectedFilterDirective {
|
|
|
2882
3432
|
super.ngOnInit();
|
|
2883
3433
|
}
|
|
2884
3434
|
}
|
|
2885
|
-
MatRadioButtonTbFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2886
|
-
MatRadioButtonTbFilterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
2887
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3435
|
+
MatRadioButtonTbFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: MatRadioButtonTbFilterDirective, deps: [{ token: i6.MatRadioButton }, { token: TableWrapperDirective, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3436
|
+
MatRadioButtonTbFilterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: MatRadioButtonTbFilterDirective, selector: "mat-radio-button[tbCustomFilter]", inputs: { predicate: ["tbCustomFilter", "predicate"] }, providers: [{ provide: TableCustomFilterDirective, useExisting: MatRadioButtonTbFilterDirective }], usesInheritance: true, ngImport: i0 });
|
|
3437
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: MatRadioButtonTbFilterDirective, decorators: [{
|
|
2888
3438
|
type: Directive,
|
|
2889
3439
|
args: [{
|
|
2890
3440
|
selector: 'mat-radio-button[tbCustomFilter]',
|
|
2891
3441
|
inputs: ['predicate: tbCustomFilter'],
|
|
2892
3442
|
providers: [{ provide: TableCustomFilterDirective, useExisting: MatRadioButtonTbFilterDirective }]
|
|
2893
3443
|
}]
|
|
2894
|
-
}], ctorParameters: function () { return [{ type:
|
|
3444
|
+
}], ctorParameters: function () { return [{ type: i6.MatRadioButton }, { type: TableWrapperDirective, decorators: [{
|
|
3445
|
+
type: Optional
|
|
3446
|
+
}] }]; } });
|
|
2895
3447
|
// Option (select)
|
|
2896
3448
|
class MatOptionTbFilterDirective extends TbSelectedFilterDirective {
|
|
2897
|
-
constructor(matOption) {
|
|
3449
|
+
constructor(matOption, wrapper) {
|
|
2898
3450
|
super(matOption.onSelectionChange.pipe(tap$1(d => {
|
|
2899
3451
|
if (!matOption.value) {
|
|
2900
3452
|
matOption.value = v4();
|
|
2901
3453
|
}
|
|
2902
|
-
})), () => matOption.selected);
|
|
3454
|
+
})), () => matOption.selected, wrapper);
|
|
2903
3455
|
this.matOption = matOption;
|
|
2904
3456
|
}
|
|
2905
3457
|
set active(val) {
|
|
@@ -2915,9 +3467,9 @@ class MatOptionTbFilterDirective extends TbSelectedFilterDirective {
|
|
|
2915
3467
|
super.ngOnInit();
|
|
2916
3468
|
}
|
|
2917
3469
|
}
|
|
2918
|
-
MatOptionTbFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2919
|
-
MatOptionTbFilterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
2920
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3470
|
+
MatOptionTbFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: MatOptionTbFilterDirective, deps: [{ token: i7$1.MatOption }, { token: TableWrapperDirective, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3471
|
+
MatOptionTbFilterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: MatOptionTbFilterDirective, selector: "mat-option[tbCustomFilter]", inputs: { predicate: ["tbCustomFilter", "predicate"], filterId: "filterId" }, providers: [{ provide: TableCustomFilterDirective, useExisting: MatOptionTbFilterDirective }], usesInheritance: true, ngImport: i0 });
|
|
3472
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: MatOptionTbFilterDirective, decorators: [{
|
|
2921
3473
|
type: Directive,
|
|
2922
3474
|
args: [{
|
|
2923
3475
|
selector: 'mat-option[tbCustomFilter]',
|
|
@@ -2926,11 +3478,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2926
3478
|
],
|
|
2927
3479
|
providers: [{ provide: TableCustomFilterDirective, useExisting: MatOptionTbFilterDirective }]
|
|
2928
3480
|
}]
|
|
2929
|
-
}], ctorParameters: function () { return [{ type:
|
|
3481
|
+
}], ctorParameters: function () { return [{ type: i7$1.MatOption }, { type: TableWrapperDirective, decorators: [{
|
|
3482
|
+
type: Optional
|
|
3483
|
+
}] }]; } });
|
|
2930
3484
|
// Button toggle
|
|
2931
3485
|
class MatButtonToggleFilterDirective extends TbSelectedFilterDirective {
|
|
2932
|
-
constructor(matButtonToggle) {
|
|
2933
|
-
super(matButtonToggle.change, () => matButtonToggle.checked);
|
|
3486
|
+
constructor(matButtonToggle, wrapper) {
|
|
3487
|
+
super(matButtonToggle.change, () => matButtonToggle.checked, wrapper);
|
|
2934
3488
|
this.matButtonToggle = matButtonToggle;
|
|
2935
3489
|
}
|
|
2936
3490
|
set active(val) {
|
|
@@ -2941,9 +3495,9 @@ class MatButtonToggleFilterDirective extends TbSelectedFilterDirective {
|
|
|
2941
3495
|
super.ngOnInit();
|
|
2942
3496
|
}
|
|
2943
3497
|
}
|
|
2944
|
-
MatButtonToggleFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2945
|
-
MatButtonToggleFilterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
2946
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3498
|
+
MatButtonToggleFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: MatButtonToggleFilterDirective, deps: [{ token: i8$2.MatButtonToggle }, { token: TableWrapperDirective, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3499
|
+
MatButtonToggleFilterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: MatButtonToggleFilterDirective, selector: "mat-button-toggle[tbCustomFilter]", inputs: { predicate: ["tbCustomFilter", "predicate"], filterId: "filterId" }, providers: [{ provide: TableCustomFilterDirective, useExisting: MatButtonToggleFilterDirective }], usesInheritance: true, ngImport: i0 });
|
|
3500
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: MatButtonToggleFilterDirective, decorators: [{
|
|
2947
3501
|
type: Directive,
|
|
2948
3502
|
args: [{
|
|
2949
3503
|
selector: 'mat-button-toggle[tbCustomFilter]',
|
|
@@ -2952,13 +3506,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2952
3506
|
],
|
|
2953
3507
|
providers: [{ provide: TableCustomFilterDirective, useExisting: MatButtonToggleFilterDirective }]
|
|
2954
3508
|
}]
|
|
2955
|
-
}], ctorParameters: function () { return [{ type:
|
|
3509
|
+
}], ctorParameters: function () { return [{ type: i8$2.MatButtonToggle }, { type: TableWrapperDirective, decorators: [{
|
|
3510
|
+
type: Optional
|
|
3511
|
+
}] }]; } });
|
|
2956
3512
|
|
|
2957
3513
|
class TableWrapperDirective {
|
|
3514
|
+
constructor() {
|
|
3515
|
+
this.registerations = [];
|
|
3516
|
+
}
|
|
3517
|
+
register(filter) {
|
|
3518
|
+
this.registerations.push(filter);
|
|
3519
|
+
}
|
|
2958
3520
|
}
|
|
2959
|
-
TableWrapperDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2960
|
-
TableWrapperDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
2961
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3521
|
+
TableWrapperDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TableWrapperDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3522
|
+
TableWrapperDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: TableWrapperDirective, selector: "[tbWrapper]", queries: [{ propertyName: "customFilters", predicate: TableCustomFilterDirective, descendants: true }, { propertyName: "filters", predicate: TableFilterDirective, descendants: true }], ngImport: i0 });
|
|
3523
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TableWrapperDirective, decorators: [{
|
|
2962
3524
|
type: Directive,
|
|
2963
3525
|
args: [{
|
|
2964
3526
|
selector: '[tbWrapper]'
|
|
@@ -3020,7 +3582,7 @@ class ExportToCsvService {
|
|
|
3020
3582
|
return res.join('\n');
|
|
3021
3583
|
};
|
|
3022
3584
|
this.metaToField = (meta, row) => {
|
|
3023
|
-
let val = row
|
|
3585
|
+
let val = get(row, meta.key);
|
|
3024
3586
|
if (val == null && !meta.transform)
|
|
3025
3587
|
return val;
|
|
3026
3588
|
if (meta.transform && meta.fieldType !== FieldType.Expression) {
|
|
@@ -3058,14 +3620,14 @@ class ExportToCsvService {
|
|
|
3058
3620
|
return this.datePipe.transform(val, dateFormat);
|
|
3059
3621
|
}
|
|
3060
3622
|
}
|
|
3061
|
-
ExportToCsvService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3062
|
-
ExportToCsvService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3063
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3623
|
+
ExportToCsvService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ExportToCsvService, deps: [{ token: TableStore }, { token: TableBuilderConfigToken }, { token: i2.DatePipe }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3624
|
+
ExportToCsvService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ExportToCsvService });
|
|
3625
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ExportToCsvService, decorators: [{
|
|
3064
3626
|
type: Injectable
|
|
3065
3627
|
}], ctorParameters: function () { return [{ type: TableStore }, { type: undefined, decorators: [{
|
|
3066
3628
|
type: Inject,
|
|
3067
3629
|
args: [TableBuilderConfigToken]
|
|
3068
|
-
}] }, { type:
|
|
3630
|
+
}] }, { type: i2.DatePipe }]; } });
|
|
3069
3631
|
const removeFromMetaData = (state, keysToRemove) => orderMetaData(state)
|
|
3070
3632
|
.filter(meta => !keysToRemove.includes(meta.key));
|
|
3071
3633
|
const nonExportableFields = (state) => Object.values(state.metaData)
|
|
@@ -3109,99 +3671,46 @@ const setLocalProfile = createAction('[State Storage] Set Local Profile', props(
|
|
|
3109
3671
|
const setLocalProfilesState = createAction('[State Storage] Set Local Profiles Current', props());
|
|
3110
3672
|
const deleteLocalProfilesState = createAction('[State Storage] Delete Local Profiles Current', props());
|
|
3111
3673
|
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
}
|
|
3134
|
-
}
|
|
3135
|
-
FormatFilterTypePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: FormatFilterTypePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3136
|
-
FormatFilterTypePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: FormatFilterTypePipe, name: "formatFilterType" });
|
|
3137
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: FormatFilterTypePipe, decorators: [{
|
|
3138
|
-
type: Pipe,
|
|
3139
|
-
args: [{ name: 'formatFilterType' }]
|
|
3140
|
-
}] });
|
|
3141
|
-
|
|
3142
|
-
class FormatFilterValuePipe {
|
|
3143
|
-
constructor(tableState, datePipe) {
|
|
3144
|
-
this.tableState = tableState;
|
|
3145
|
-
this.datePipe = datePipe;
|
|
3146
|
-
}
|
|
3147
|
-
transform(value, key, filterType) {
|
|
3148
|
-
return this.tableState.getMetaData$(key).pipe(map(md => {
|
|
3149
|
-
if (filterType === FilterType.IsNull) {
|
|
3150
|
-
return '';
|
|
3151
|
-
}
|
|
3152
|
-
if (value && (filterType === FilterType.In)) {
|
|
3153
|
-
if (md.fieldType === FieldType.Enum) {
|
|
3154
|
-
return value.map((v) => spaceCase(md.additional.enumMap[v])).join(', ') ?? value;
|
|
3155
|
-
}
|
|
3156
|
-
return value.join(', ') ?? value;
|
|
3157
|
-
}
|
|
3158
|
-
if (filterType === FilterType.NumberBetween) {
|
|
3159
|
-
if (md.fieldType === FieldType.Date) {
|
|
3160
|
-
value = this.datePipe.transform(value.Start, 'MM/dd/yy') + ' - ' + this.datePipe.transform(value.End, 'MM/dd/yy');
|
|
3161
|
-
}
|
|
3162
|
-
else {
|
|
3163
|
-
value = value.Start + ' - ' + value.End;
|
|
3164
|
-
}
|
|
3165
|
-
}
|
|
3166
|
-
else if (md.fieldType === FieldType.Date) {
|
|
3167
|
-
value = this.datePipe.transform(value, 'MM/dd/yy');
|
|
3168
|
-
}
|
|
3169
|
-
return value;
|
|
3170
|
-
}));
|
|
3171
|
-
}
|
|
3172
|
-
}
|
|
3173
|
-
FormatFilterValuePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: FormatFilterValuePipe, deps: [{ token: TableStore }, { token: i1.DatePipe }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3174
|
-
FormatFilterValuePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: FormatFilterValuePipe, name: "formatFilterValue" });
|
|
3175
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: FormatFilterValuePipe, decorators: [{
|
|
3176
|
-
type: Pipe,
|
|
3177
|
-
args: [{ name: 'formatFilterValue' }]
|
|
3178
|
-
}], ctorParameters: function () { return [{ type: TableStore }, { type: i1.DatePipe }]; } });
|
|
3179
|
-
|
|
3180
|
-
class FilterChipsComponent {
|
|
3181
|
-
constructor(tableState, filterStore) {
|
|
3182
|
-
this.tableState = tableState;
|
|
3183
|
-
this.filterStore = filterStore;
|
|
3184
|
-
this.filters$ = this.tableState.filters$.pipe(map(filters => Object.values(filters)
|
|
3185
|
-
.filter(isFilterInfo)
|
|
3186
|
-
.filter(f => !f._isExternalyManaged)));
|
|
3187
|
-
this.currentFilters$ = this.filterStore.currentFilters$;
|
|
3188
|
-
}
|
|
3189
|
-
deleteByIndex(index) {
|
|
3190
|
-
this.filterStore.deleteByIndex(index);
|
|
3191
|
-
}
|
|
3192
|
-
addFilter(filter) {
|
|
3193
|
-
this.filterStore.addFilter(filter);
|
|
3674
|
+
function createLinkCreator(metaData) {
|
|
3675
|
+
const target = metaData.additional?.link?.target || metaData.additional?.target || '_blank';
|
|
3676
|
+
const useRouterLink = metaData.additional?.link?.useRouterLink || metaData.additional?.useRouterLink;
|
|
3677
|
+
const hasRoute = !!metaData.additional?.link?.interpolatedRoute;
|
|
3678
|
+
const routerLinkOptions = useRouterLink ? {
|
|
3679
|
+
queryParams: (element) => metaData.additional.link.routerLinkOptions?.queryParams?.reduce((map, [key, value]) => {
|
|
3680
|
+
map[key] = parseInterpolated(value, element);
|
|
3681
|
+
return map;
|
|
3682
|
+
}, {}) ?? null,
|
|
3683
|
+
fragment: metaData.additional.link?.routerLinkOptions?.fragment,
|
|
3684
|
+
preserveFragment: metaData.additional.link.routerLinkOptions?.preserveFragment ?? false,
|
|
3685
|
+
queryParamsHandling: metaData.additional.link.routerLinkOptions?.queryParamsHandling ?? '',
|
|
3686
|
+
}
|
|
3687
|
+
: undefined;
|
|
3688
|
+
if (hasRoute) {
|
|
3689
|
+
return ({
|
|
3690
|
+
link: (element) => parseInterpolated(metaData.additional.link.interpolatedRoute, element),
|
|
3691
|
+
target,
|
|
3692
|
+
useRouterLink,
|
|
3693
|
+
routerLinkOptions,
|
|
3694
|
+
});
|
|
3194
3695
|
}
|
|
3195
|
-
|
|
3196
|
-
|
|
3696
|
+
else {
|
|
3697
|
+
const slashIfNeeded = !metaData.additional?.link?.base?.endsWith('/') ? '/' : '';
|
|
3698
|
+
const base = metaData.additional.link?.base || metaData.additional.base;
|
|
3699
|
+
const getKey = key(metaData);
|
|
3700
|
+
return ({
|
|
3701
|
+
link: (element) => `${base}${slashIfNeeded}${getKey(element)}`,
|
|
3702
|
+
target,
|
|
3703
|
+
useRouterLink,
|
|
3704
|
+
routerLinkOptions,
|
|
3705
|
+
});
|
|
3197
3706
|
}
|
|
3198
3707
|
}
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3708
|
+
const key = (metaData) => metaData.additional.link?.urlKey ?
|
|
3709
|
+
(element) => get(element, metaData.additional.link.urlKey) :
|
|
3710
|
+
metaData.additional.urlKey ?
|
|
3711
|
+
(element) => get(element, metaData.additional.urlKey) :
|
|
3712
|
+
(element) => get(element, metaData.key);
|
|
3713
|
+
const parseInterpolated = (interpolatedString, element) => interpolatedString.replace(/{([^}]+)}/g, (_, key) => get(element, key));
|
|
3205
3714
|
|
|
3206
3715
|
class SortMenuComponentStore extends ComponentStore {
|
|
3207
3716
|
constructor(tableState) {
|
|
@@ -3230,9 +3739,9 @@ class SortMenuComponentStore extends ComponentStore {
|
|
|
3230
3739
|
};
|
|
3231
3740
|
}
|
|
3232
3741
|
}
|
|
3233
|
-
SortMenuComponentStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3234
|
-
SortMenuComponentStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3235
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3742
|
+
SortMenuComponentStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: SortMenuComponentStore, deps: [{ token: TableStore }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3743
|
+
SortMenuComponentStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: SortMenuComponentStore });
|
|
3744
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: SortMenuComponentStore, decorators: [{
|
|
3236
3745
|
type: Injectable
|
|
3237
3746
|
}], ctorParameters: function () { return [{ type: TableStore }]; } });
|
|
3238
3747
|
const equalSortArray = (arr1, arr2) => arr1.length === arr2.length && arr2.every(s1 => arr1.some(s2 => s1.active === s2.active));
|
|
@@ -3262,6 +3771,7 @@ class SortMenuComponent {
|
|
|
3262
3771
|
this.dirty$.next(true);
|
|
3263
3772
|
if (event.previousContainer === event.container) {
|
|
3264
3773
|
moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
|
|
3774
|
+
this.store.setSorted(event.container.data);
|
|
3265
3775
|
}
|
|
3266
3776
|
else {
|
|
3267
3777
|
transferArrayItem(event.previousContainer.data, event.container.data, event.previousIndex, event.currentIndex);
|
|
@@ -3287,178 +3797,120 @@ class SortMenuComponent {
|
|
|
3287
3797
|
this.store.setDirection(sort);
|
|
3288
3798
|
}
|
|
3289
3799
|
}
|
|
3290
|
-
SortMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3291
|
-
SortMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
3292
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3800
|
+
SortMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: SortMenuComponent, deps: [{ token: TableStore }, { token: SortMenuComponentStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
3801
|
+
SortMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: SortMenuComponent, selector: "tb-sort-menu", providers: [SortMenuComponentStore], ngImport: i0, template: "<ng-container *ngrxLet=\"dirty$ as dirty\">\n<ng-container *ngIf=\"sorted$ | async as sorted\">\n <ng-container *ngIf=\"notSorted$ | async as notSorted\">\n <!-- Menu Trigger -->\n <span matTooltip=\"Sort\">\n <button mat-icon-button [matMenuTriggerFor]=\"menu\">\n <mat-icon color=\"primary\">swap_vert</mat-icon>\n </button>\n </span>\n\n <!-- Menu -->\n <mat-menu #menu=\"matMenu\" class=\"my-mat-menu\" (closed)=\"reset()\">\n <div mat-menu-item class=\"menu-button\">\n <div class=\"close-button-wrapper\">\n <span matTooltip=\"Close\">\n <mat-icon>close</mat-icon>\n </span>\n <span *ngIf=\"dirty\" matTooltip=\"Undo\" stop-propagation (click)=\"reset()\">\n <mat-icon>undo</mat-icon>\n </span>\n </div>\n </div>\n\n <!-- Apply Button -->\n <div class=\"apply-button-wrapper\">\n <button mat-button color=\"primary\" (click)=\"apply(null)\"\n stop-propagation [class.apply-border]=\"dirty\"\n [disabled]=\"!dirty\">\n Apply\n <ng-container *ngIf=\"dirty\">Unsaved Changes</ng-container>\n </button>\n </div>\n\n <!-- Default Sorting Text -->\n <div *ngIf=\"!sorted.length\" class=\"tip\" >\n Sorting List\n </div>\n\n <!-- Sorted Menu List -->\n <div class=\"list\"\n cdkDropList\n #sortedGroup=\"cdkDropList\"\n [cdkDropListConnectedTo]=\"[notSortedGroup]\"\n [cdkDropListData]=\"sorted\"\n (cdkDropListDropped)=\"dropIntoSorted($event)\">\n\n <!-- Menu Item Wrapper -->\n <ng-container *ngFor=\"let sort of sorted;let i=index\">\n\n <!-- Menu Item Headers -->\n <span *ngIf=\"sorted.length > 1 && i === 0 \" class=\"description\" class=\"sort-header\">First By</span>\n <span *ngIf=\"sorted.length > 1 && i !== 0 \" class=\"description\" class=\"sort-header\">Then By</span>\n\n <!-- Menu Item -->\n <div mat-menu-item cdkDrag class=\"menu-item\">\n <div class=\"sort-item\">\n <span class=\"sorted-name\">\n {{sort.displayName || (sort.active | spaceCase)}}\n <span class=\"direction-text\">{{sort.direction}}</span>\n </span>\n\n <!-- Sort Direction Buttons -->\n <div class=\"up-down-buttons-wrapper\">\n <button class=\"up-down-button up-button\" stop-propagation\n (click)=\"setDirection({active:sort.active,direction:SortDirection.asc,displayName:sort.displayName})\">\n <mat-icon [ngClass]=\"sort.direction !== SortDirection.asc ? 'light-arrow' : 'dark-arrow'\" class=\"up-down-icon\">\n arrow_upward\n </mat-icon>\n </button>\n\n <button class=\"up-down-button\" stop-propagation\n (click)=\"setDirection({active:sort.active,direction:SortDirection.desc,displayName:sort.displayName})\">\n <mat-icon [ngClass]=\"sort.direction === SortDirection.asc ? 'light-arrow' : 'dark-arrow'\" class=\"up-down-icon\">\n arrow_downward\n </mat-icon>\n </button>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n\n <!-- Default Not Sorted Text -->\n <div *ngIf=\"!notSorted.length\" class=\"tip\" >\n Not Sorted List\n </div>\n <!-- Not Sorted Menu List -->\n <div class=\"list\"\n cdkDropList\n #notSortedGroup=\"cdkDropList\"\n [cdkDropListConnectedTo]=\"[sortedGroup]\"\n [cdkDropListData]=\"notSorted\"\n (cdkDropListDropped)=\"dropIntoNotSorted($event)\">\n <div mat-menu-item *ngFor=\"let sort of notSorted\" class=\"menu-item\" cdkDrag>\n <span class=\"not-sorted-name\">{{sort.displayName || (sort.active | spaceCase)}}</span>\n </div>\n </div>\n </mat-menu>\n </ng-container>\n</ng-container>\n</ng-container>\n", styles: [".cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.list{padding:5px 2px;border-bottom:solid 1px #ccc;color:#000000de;background:white}.light-arrow{color:#93b1ea78}.dark-arrow{color:#224e9c}.up-down-button{background-color:#fff;border-radius:30%;border-color:#0ff;padding:1px 1px 0;border-width:.5px;cursor:pointer;height:27px}.mat-icon.up-down-icon{margin-right:0;font-size:20px;font-weight:lighter}.sort-item{display:flex;align-items:center;justify-content:space-between}.up-down-buttons-wrapper{margin-left:2rem}.up-button{margin-right:.3rem}.mat-mdc-menu-item.menu-item,.mat-mdc-menu-item.menu-button{min-height:initial;padding:0 3px;line-height:25px;height:30px}.mat-mdc-menu-item.menu-item{cursor:move}.sorted-name{color:#224e9c;font-size:17px;font-weight:700}.not-sorted-name{color:#93b1ea;font-size:17px;font-weight:700}.apply-border{border:#224e9c solid .5px}.apply-border:hover{background-color:#faebd7}.apply-button-wrapper{display:grid;justify-content:center}.sort-header{font-size:10px;font-style:italic}.tip{padding:0 3px;color:#d3d3d3}.direction-text{font-size:small;font-weight:400}.close-button-wrapper{display:flex;flex-direction:row-reverse}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4$2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$2.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i6$1.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i6$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i6$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i8.LetDirective, selector: "[ngrxLet]", inputs: ["ngrxLet", "ngrxLetSuspenseTpl"] }, { kind: "directive", type: i9.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i9.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: StopPropagationDirective, selector: "[stop-propagation]" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: SpaceCasePipe, name: "spaceCase" }] });
|
|
3802
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: SortMenuComponent, decorators: [{
|
|
3293
3803
|
type: Component,
|
|
3294
|
-
args: [{ selector: 'tb-sort-menu', providers: [SortMenuComponentStore], template: "<ng-container *ngrxLet=\"dirty$ as dirty\">\n<ng-container *ngIf=\"sorted$ | async as sorted\">\n <ng-container *ngIf=\"notSorted$ | async as notSorted\">\n <!-- Menu Trigger -->\n <span matTooltip=\"Sort\">\n <button mat-icon-button [matMenuTriggerFor]=\"menu\">\n <mat-icon color=\"primary\">swap_vert</mat-icon>\n </button>\n </span>\n\n <!-- Menu -->\n <mat-menu #menu=\"matMenu\" class=\"my-mat-menu\" (closed)=\"reset()\">\n <div mat-menu-item class=\"menu-button\">\n <div class=\"close-button-wrapper\">\n <span matTooltip=\"Close\">\n <mat-icon>close</mat-icon>\n </span>\n <span *ngIf=\"dirty\" matTooltip=\"Undo\" stop-propagation (click)=\"reset()\">\n <mat-icon>undo</mat-icon>\n </span>\n </div>\n </div>\n\n <!-- Apply Button -->\n <div class=\"apply-button-wrapper\">\n <button mat-button color=\"primary\" (click)=\"apply(null)\"\n stop-propagation [class.apply-border]=\"dirty\"\n [disabled]=\"!dirty\">\n Apply\n <ng-container *ngIf=\"dirty\">Unsaved Changes</ng-container>\n </button>\n </div>\n\n <!-- Default Sorting Text -->\n <div *ngIf=\"!sorted.length\" class=\"tip\" >\n Sorting List\n </div>\n\n <!-- Sorted Menu List -->\n <div class=\"list\"\n cdkDropList\n #sortedGroup=\"cdkDropList\"\n [cdkDropListConnectedTo]=\"[notSortedGroup]\"\n [cdkDropListData]=\"sorted\"\n (cdkDropListDropped)=\"dropIntoSorted($event)\">\n\n <!-- Menu Item Wrapper -->\n <ng-container *ngFor=\"let sort of sorted;let i=index\">\n\n <!-- Menu Item Headers -->\n <span *ngIf=\"sorted.length > 1 && i === 0 \" class=\"description\" class=\"sort-header\">First By</span>\n <span *ngIf=\"sorted.length > 1 && i !== 0 \" class=\"description\" class=\"sort-header\">Then By</span>\n\n <!-- Menu Item -->\n <div mat-menu-item cdkDrag class=\"menu-item\">\n <div class=\"sort-item\">\n <span class=\"sorted-name\">\n {{sort.displayName || (sort.active | spaceCase)}}\n <span class=\"direction-text\">{{sort.direction}}</span>\n </span>\n\n <!-- Sort Direction Buttons -->\n <div class=\"up-down-buttons-wrapper\">\n <button class=\"up-down-button up-button\" stop-propagation\n (click)=\"setDirection({active:sort.active,direction:SortDirection.asc,displayName:sort.displayName})\">\n <mat-icon [ngClass]=\"sort.direction !== SortDirection.asc ? 'light-arrow' : 'dark-arrow'\" class=\"up-down-icon\">\n arrow_upward\n </mat-icon>\n </button>\n\n <button class=\"up-down-button\" stop-propagation\n (click)=\"setDirection({active:sort.active,direction:SortDirection.desc,displayName:sort.displayName})\">\n <mat-icon [ngClass]=\"sort.direction === SortDirection.asc ? 'light-arrow' : 'dark-arrow'\" class=\"up-down-icon\">\n arrow_downward\n </mat-icon>\n </button>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n\n <!-- Default Not Sorted Text -->\n <div *ngIf=\"!notSorted.length\" class=\"tip\" >\n Not Sorted List\n </div>\n <!-- Not Sorted Menu List -->\n <div class=\"list\"\n cdkDropList\n #notSortedGroup=\"cdkDropList\"\n [cdkDropListConnectedTo]=\"[sortedGroup]\"\n [cdkDropListData]=\"notSorted\"\n (cdkDropListDropped)=\"dropIntoNotSorted($event)\">\n <div mat-menu-item *ngFor=\"let sort of notSorted\" class=\"menu-item\" cdkDrag>\n <span class=\"not-sorted-name\">{{sort.displayName || (sort.active | spaceCase)}}</span>\n </div>\n </div>\n </mat-menu>\n </ng-container>\n</ng-container>\n</ng-container>\n", styles: [".cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.list{padding:5px 2px;border-bottom:solid 1px #ccc;color:#000000de;background:white}.light-arrow{color:#93b1ea78}.dark-arrow{color:#224e9c}.up-down-button{background-color:#fff;border-radius:30%;border-color:#0ff;padding:1px 1px 0;border-width:.5px;cursor:pointer}.mat-icon.up-down-icon{margin-right:0;font-size:20px;font-weight:lighter}.sort-item{display:flex;align-items:center;justify-content:space-between}.up-down-buttons-wrapper{margin-left:2rem}.up-button{margin-right:.3rem}.mat-menu-item.menu-item,.mat-menu-item.menu-button{padding:0 3px;
|
|
3804
|
+
args: [{ selector: 'tb-sort-menu', providers: [SortMenuComponentStore], template: "<ng-container *ngrxLet=\"dirty$ as dirty\">\n<ng-container *ngIf=\"sorted$ | async as sorted\">\n <ng-container *ngIf=\"notSorted$ | async as notSorted\">\n <!-- Menu Trigger -->\n <span matTooltip=\"Sort\">\n <button mat-icon-button [matMenuTriggerFor]=\"menu\">\n <mat-icon color=\"primary\">swap_vert</mat-icon>\n </button>\n </span>\n\n <!-- Menu -->\n <mat-menu #menu=\"matMenu\" class=\"my-mat-menu\" (closed)=\"reset()\">\n <div mat-menu-item class=\"menu-button\">\n <div class=\"close-button-wrapper\">\n <span matTooltip=\"Close\">\n <mat-icon>close</mat-icon>\n </span>\n <span *ngIf=\"dirty\" matTooltip=\"Undo\" stop-propagation (click)=\"reset()\">\n <mat-icon>undo</mat-icon>\n </span>\n </div>\n </div>\n\n <!-- Apply Button -->\n <div class=\"apply-button-wrapper\">\n <button mat-button color=\"primary\" (click)=\"apply(null)\"\n stop-propagation [class.apply-border]=\"dirty\"\n [disabled]=\"!dirty\">\n Apply\n <ng-container *ngIf=\"dirty\">Unsaved Changes</ng-container>\n </button>\n </div>\n\n <!-- Default Sorting Text -->\n <div *ngIf=\"!sorted.length\" class=\"tip\" >\n Sorting List\n </div>\n\n <!-- Sorted Menu List -->\n <div class=\"list\"\n cdkDropList\n #sortedGroup=\"cdkDropList\"\n [cdkDropListConnectedTo]=\"[notSortedGroup]\"\n [cdkDropListData]=\"sorted\"\n (cdkDropListDropped)=\"dropIntoSorted($event)\">\n\n <!-- Menu Item Wrapper -->\n <ng-container *ngFor=\"let sort of sorted;let i=index\">\n\n <!-- Menu Item Headers -->\n <span *ngIf=\"sorted.length > 1 && i === 0 \" class=\"description\" class=\"sort-header\">First By</span>\n <span *ngIf=\"sorted.length > 1 && i !== 0 \" class=\"description\" class=\"sort-header\">Then By</span>\n\n <!-- Menu Item -->\n <div mat-menu-item cdkDrag class=\"menu-item\">\n <div class=\"sort-item\">\n <span class=\"sorted-name\">\n {{sort.displayName || (sort.active | spaceCase)}}\n <span class=\"direction-text\">{{sort.direction}}</span>\n </span>\n\n <!-- Sort Direction Buttons -->\n <div class=\"up-down-buttons-wrapper\">\n <button class=\"up-down-button up-button\" stop-propagation\n (click)=\"setDirection({active:sort.active,direction:SortDirection.asc,displayName:sort.displayName})\">\n <mat-icon [ngClass]=\"sort.direction !== SortDirection.asc ? 'light-arrow' : 'dark-arrow'\" class=\"up-down-icon\">\n arrow_upward\n </mat-icon>\n </button>\n\n <button class=\"up-down-button\" stop-propagation\n (click)=\"setDirection({active:sort.active,direction:SortDirection.desc,displayName:sort.displayName})\">\n <mat-icon [ngClass]=\"sort.direction === SortDirection.asc ? 'light-arrow' : 'dark-arrow'\" class=\"up-down-icon\">\n arrow_downward\n </mat-icon>\n </button>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n\n <!-- Default Not Sorted Text -->\n <div *ngIf=\"!notSorted.length\" class=\"tip\" >\n Not Sorted List\n </div>\n <!-- Not Sorted Menu List -->\n <div class=\"list\"\n cdkDropList\n #notSortedGroup=\"cdkDropList\"\n [cdkDropListConnectedTo]=\"[sortedGroup]\"\n [cdkDropListData]=\"notSorted\"\n (cdkDropListDropped)=\"dropIntoNotSorted($event)\">\n <div mat-menu-item *ngFor=\"let sort of notSorted\" class=\"menu-item\" cdkDrag>\n <span class=\"not-sorted-name\">{{sort.displayName || (sort.active | spaceCase)}}</span>\n </div>\n </div>\n </mat-menu>\n </ng-container>\n</ng-container>\n</ng-container>\n", styles: [".cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.list{padding:5px 2px;border-bottom:solid 1px #ccc;color:#000000de;background:white}.light-arrow{color:#93b1ea78}.dark-arrow{color:#224e9c}.up-down-button{background-color:#fff;border-radius:30%;border-color:#0ff;padding:1px 1px 0;border-width:.5px;cursor:pointer;height:27px}.mat-icon.up-down-icon{margin-right:0;font-size:20px;font-weight:lighter}.sort-item{display:flex;align-items:center;justify-content:space-between}.up-down-buttons-wrapper{margin-left:2rem}.up-button{margin-right:.3rem}.mat-mdc-menu-item.menu-item,.mat-mdc-menu-item.menu-button{min-height:initial;padding:0 3px;line-height:25px;height:30px}.mat-mdc-menu-item.menu-item{cursor:move}.sorted-name{color:#224e9c;font-size:17px;font-weight:700}.not-sorted-name{color:#93b1ea;font-size:17px;font-weight:700}.apply-border{border:#224e9c solid .5px}.apply-border:hover{background-color:#faebd7}.apply-button-wrapper{display:grid;justify-content:center}.sort-header{font-size:10px;font-style:italic}.tip{padding:0 3px;color:#d3d3d3}.direction-text{font-size:small;font-weight:400}.close-button-wrapper{display:flex;flex-direction:row-reverse}\n"] }]
|
|
3295
3805
|
}], ctorParameters: function () { return [{ type: TableStore }, { type: SortMenuComponentStore }]; } });
|
|
3296
3806
|
|
|
3297
|
-
class
|
|
3298
|
-
constructor() {
|
|
3299
|
-
|
|
3300
|
-
}
|
|
3301
|
-
}
|
|
3302
|
-
ClickEmitterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: ClickEmitterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3303
|
-
ClickEmitterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.5", type: ClickEmitterDirective, selector: "[clickEmitter]", host: { listeners: { "click": "next(true)" } }, exportAs: ["clickEmitter"], usesInheritance: true, ngImport: i0 });
|
|
3304
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: ClickEmitterDirective, decorators: [{
|
|
3305
|
-
type: Directive,
|
|
3306
|
-
args: [{
|
|
3307
|
-
selector: '[clickEmitter]',
|
|
3308
|
-
exportAs: 'clickEmitter',
|
|
3309
|
-
host: {
|
|
3310
|
-
'(click)': 'next(true)'
|
|
3311
|
-
}
|
|
3312
|
-
}]
|
|
3313
|
-
}], ctorParameters: function () { return []; } });
|
|
3314
|
-
|
|
3315
|
-
class DialogService {
|
|
3316
|
-
constructor() {
|
|
3317
|
-
this.allOpenAppDialogs = [];
|
|
3318
|
-
}
|
|
3319
|
-
addDialogRef(ref) {
|
|
3320
|
-
this.allOpenAppDialogs.push(ref);
|
|
3321
|
-
}
|
|
3322
|
-
removeDialogRef(ref) {
|
|
3323
|
-
this.allOpenAppDialogs = this.allOpenAppDialogs.filter(rf => ref.id !== rf.id);
|
|
3807
|
+
class KeyDisplayPipe {
|
|
3808
|
+
constructor(tableState) {
|
|
3809
|
+
this.tableState = tableState;
|
|
3324
3810
|
}
|
|
3325
|
-
|
|
3326
|
-
this.
|
|
3811
|
+
transform(key) {
|
|
3812
|
+
return this.tableState.getMetaData$(key).pipe(map(metaData => metaData.displayName || spaceCase(key)));
|
|
3327
3813
|
}
|
|
3328
3814
|
}
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3332
|
-
type:
|
|
3333
|
-
args: [{
|
|
3334
|
-
|
|
3335
|
-
}]
|
|
3336
|
-
}] });
|
|
3815
|
+
KeyDisplayPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: KeyDisplayPipe, deps: [{ token: TableStore }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3816
|
+
KeyDisplayPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: KeyDisplayPipe, name: "keyDisplay" });
|
|
3817
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: KeyDisplayPipe, decorators: [{
|
|
3818
|
+
type: Pipe,
|
|
3819
|
+
args: [{ name: 'keyDisplay' }]
|
|
3820
|
+
}], ctorParameters: function () { return [{ type: TableStore }]; } });
|
|
3337
3821
|
|
|
3338
|
-
class
|
|
3339
|
-
constructor(
|
|
3340
|
-
this.
|
|
3341
|
-
this.
|
|
3342
|
-
this.viewContext = {
|
|
3343
|
-
close: () => { },
|
|
3344
|
-
};
|
|
3345
|
-
}
|
|
3346
|
-
set template(tmpl) {
|
|
3347
|
-
if (this.viewEmbeded) {
|
|
3348
|
-
this.vcr.clear();
|
|
3349
|
-
}
|
|
3350
|
-
this.viewEmbeded = true;
|
|
3351
|
-
this.vcr.createEmbeddedView(tmpl, this.viewContext);
|
|
3352
|
-
}
|
|
3353
|
-
set close(closeMethod) {
|
|
3354
|
-
this.viewContext.close = closeMethod;
|
|
3355
|
-
}
|
|
3356
|
-
set data(value) {
|
|
3357
|
-
this.viewContext.$implicit = value;
|
|
3358
|
-
this.viewContext.opDialog = value;
|
|
3822
|
+
class FormatFilterValuePipe {
|
|
3823
|
+
constructor(tableState, datePipe) {
|
|
3824
|
+
this.tableState = tableState;
|
|
3825
|
+
this.datePipe = datePipe;
|
|
3359
3826
|
}
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
type: Component,
|
|
3365
|
-
args: [{
|
|
3366
|
-
selector: 'app-dialog-content',
|
|
3367
|
-
template: ``
|
|
3368
|
-
}]
|
|
3369
|
-
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; } });
|
|
3370
|
-
const defaultDialogConfig = {
|
|
3371
|
-
maxHeight: '95vh'
|
|
3372
|
-
};
|
|
3373
|
-
class DialogDirective {
|
|
3374
|
-
constructor(templateRef, dialog, service) {
|
|
3375
|
-
this.templateRef = templateRef;
|
|
3376
|
-
this.dialog = dialog;
|
|
3377
|
-
this.service = service;
|
|
3378
|
-
this.opDialogClosed = new EventEmitter();
|
|
3379
|
-
this._dialogConfig = defaultDialogConfig;
|
|
3380
|
-
this._data = new Subject();
|
|
3381
|
-
this.subscription = this._data.pipe(switchAll()).subscribe(d => {
|
|
3382
|
-
if (d) {
|
|
3383
|
-
this.opDialogConfig.data = d;
|
|
3384
|
-
this.setDialogState(true);
|
|
3827
|
+
transform(value, key, filterType) {
|
|
3828
|
+
return this.tableState.getMetaData$(key).pipe(map(md => {
|
|
3829
|
+
if (filterType === FilterType.IsNull) {
|
|
3830
|
+
return '';
|
|
3385
3831
|
}
|
|
3386
|
-
|
|
3387
|
-
|
|
3832
|
+
if (value && (filterType === FilterType.In)) {
|
|
3833
|
+
if (md.fieldType === FieldType.Enum) {
|
|
3834
|
+
return value.map((v) => spaceCase(md.additional.enumMap[v])).join(', ') ?? value;
|
|
3835
|
+
}
|
|
3836
|
+
return value.join(', ') ?? value;
|
|
3388
3837
|
}
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
}
|
|
3397
|
-
set state(open_close) {
|
|
3398
|
-
this._data.next(open_close);
|
|
3399
|
-
}
|
|
3400
|
-
close() {
|
|
3401
|
-
this.dialogRef?.close();
|
|
3402
|
-
}
|
|
3403
|
-
initDialog() {
|
|
3404
|
-
if (this.nativeElement) {
|
|
3405
|
-
const rect = this.nativeElement.getBoundingClientRect();
|
|
3406
|
-
const position = { left: `${rect.left}px`, top: `${rect.bottom - 50}px` };
|
|
3407
|
-
this.opDialogConfig = { ...this.opDialogConfig, position };
|
|
3408
|
-
}
|
|
3409
|
-
this.dialogRef = this.dialog.open(DialogWrapper, this.opDialogConfig);
|
|
3410
|
-
this.componentWrapper = this.dialogRef.componentInstance;
|
|
3411
|
-
this.componentWrapper.close = () => this.dialogRef?.close();
|
|
3412
|
-
this.componentWrapper.data = this.opDialogConfig.data;
|
|
3413
|
-
this.componentWrapper.template = this.templateRef;
|
|
3414
|
-
if (!this.opDialogConfig.disableClose) {
|
|
3415
|
-
this.service.addDialogRef(this.dialogRef);
|
|
3416
|
-
}
|
|
3417
|
-
const sub = this.dialogRef.afterClosed().subscribe(() => {
|
|
3418
|
-
this.opDialogClosed.emit(true);
|
|
3419
|
-
this.service.removeDialogRef(this.dialogRef);
|
|
3420
|
-
this.dialogRef = undefined;
|
|
3421
|
-
sub.unsubscribe();
|
|
3422
|
-
});
|
|
3423
|
-
}
|
|
3424
|
-
setDialogState(open) {
|
|
3425
|
-
if (open) {
|
|
3426
|
-
if (!this.dialogRef) {
|
|
3427
|
-
this.initDialog();
|
|
3838
|
+
if (filterType === FilterType.NumberBetween) {
|
|
3839
|
+
if (md.fieldType === FieldType.Date) {
|
|
3840
|
+
value = this.datePipe.transform(value.Start, 'MM/dd/yy') + ' - ' + this.datePipe.transform(value.End, 'MM/dd/yy');
|
|
3841
|
+
}
|
|
3842
|
+
else {
|
|
3843
|
+
value = value.Start + ' - ' + value.End;
|
|
3844
|
+
}
|
|
3428
3845
|
}
|
|
3429
|
-
else {
|
|
3430
|
-
|
|
3846
|
+
else if (md.fieldType === FieldType.Date) {
|
|
3847
|
+
value = this.datePipe.transform(value, 'MM/dd/yy');
|
|
3431
3848
|
}
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
this.dialogRef.close();
|
|
3435
|
-
}
|
|
3849
|
+
return value;
|
|
3850
|
+
}));
|
|
3436
3851
|
}
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3852
|
+
}
|
|
3853
|
+
FormatFilterValuePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: FormatFilterValuePipe, deps: [{ token: TableStore }, { token: i2.DatePipe }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3854
|
+
FormatFilterValuePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: FormatFilterValuePipe, name: "formatFilterValue" });
|
|
3855
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: FormatFilterValuePipe, decorators: [{
|
|
3856
|
+
type: Pipe,
|
|
3857
|
+
args: [{ name: 'formatFilterValue' }]
|
|
3858
|
+
}], ctorParameters: function () { return [{ type: TableStore }, { type: i2.DatePipe }]; } });
|
|
3859
|
+
|
|
3860
|
+
class FormatFilterTypePipe {
|
|
3861
|
+
transform(filterType, value) {
|
|
3862
|
+
if (filterType === FilterType.IsNull) {
|
|
3863
|
+
return value ? filterType : 'Is Not Blank';
|
|
3440
3864
|
}
|
|
3865
|
+
return filterType;
|
|
3441
3866
|
}
|
|
3442
|
-
|
|
3443
|
-
|
|
3867
|
+
}
|
|
3868
|
+
FormatFilterTypePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: FormatFilterTypePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3869
|
+
FormatFilterTypePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: FormatFilterTypePipe, name: "formatFilterType" });
|
|
3870
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: FormatFilterTypePipe, decorators: [{
|
|
3871
|
+
type: Pipe,
|
|
3872
|
+
args: [{ name: 'formatFilterType' }]
|
|
3873
|
+
}] });
|
|
3874
|
+
|
|
3875
|
+
class FilterChipsComponent {
|
|
3876
|
+
constructor(tableState, filterStore) {
|
|
3877
|
+
this.tableState = tableState;
|
|
3878
|
+
this.filterStore = filterStore;
|
|
3879
|
+
this.filters$ = this.tableState.filters$.pipe(map(filters => Object.values(filters)
|
|
3880
|
+
.filter(isFilterInfo)
|
|
3881
|
+
.filter(f => !f._isExternalyManaged)));
|
|
3882
|
+
this.currentFilters$ = this.filterStore.currentFilters$;
|
|
3883
|
+
}
|
|
3884
|
+
deleteByIndex(index) {
|
|
3885
|
+
this.filterStore.deleteByIndex(index);
|
|
3886
|
+
}
|
|
3887
|
+
addFilter(filter) {
|
|
3888
|
+
this.filterStore.addFilter(filter);
|
|
3889
|
+
}
|
|
3890
|
+
clearAll() {
|
|
3891
|
+
this.filterStore.clearAll();
|
|
3444
3892
|
}
|
|
3445
3893
|
}
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3449
|
-
type:
|
|
3450
|
-
args: [{ selector: '[
|
|
3451
|
-
}], ctorParameters: function () { return [{ type:
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3894
|
+
FilterChipsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: FilterChipsComponent, deps: [{ token: TableStore }, { token: WrapperFilterStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
3895
|
+
FilterChipsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: FilterChipsComponent, selector: "lib-filter-list", ngImport: i0, template: "<div style=\"display: flex; flex-direction: row;justify-content: flex-end;\" *ngrxLet=\"currentFilters$ as currentFilters\" >\n\n <button class=\"cancel-button\" *ngIf=\"currentFilters.length\" mat-icon-button (click)=\"clearAll()\"\n matTooltip=\"Close all Filters Cards\">\n <mat-icon class=\"cancel-button\" color=\"primary\">close</mat-icon>\n </button>\n\n\n <div *ngIf=\"currentFilters.length\" class=\"float\">\n <div class=\"filter\" *ngFor=\"let filter of (currentFilters$ | async); index as i;\">\n <tb-filter [filter]=\"filter\" (close)=\"deleteByIndex(i)\" > </tb-filter>\n </div>\n </div>\n\n <mat-chip-set *ngrxLet=\"filters$ as filters\">\n <mat-chip *ngFor=\"let filter of filters\" (dblclick)=\"addFilter(filter)\" (removed)=\"tableState.removeFilter(filter.filterId!)\">\n {{ filter.key | keyDisplay | async }} {{filter.filterType | formatFilterType : filter.filterValue}} {{ filter.filterValue | formatFilterValue: filter.key : filter.filterType | async }}\n <mat-icon matChipRemove>cancel</mat-icon>\n </mat-chip>\n <mat-chip *ngIf=\"filters.length >= 2\" (removed)=\"tableState.clearFilters()\">\n Clear All\n <mat-icon matChipRemove>cancel</mat-icon>\n </mat-chip>\n </mat-chip-set>\n\n</div>\n", styles: [".filter{margin:15px;display:inline-block}.filter-button{color:#6495ed;font-size:22px;font-weight:700}.cancel-button{margin-right:30px;font-weight:700}.filter-wrapper{margin-top:1em;margin-bottom:1em;float:right}.menu{margin-bottom:10px;width:109.1%}.filter-labels{color:#6495ed;font-size:17px;font-weight:600}.float{position:absolute;width:-moz-fit-content;width:fit-content;z-index:101;top:10px;right:180px;max-width:90vw}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4$2.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i7$2.MatChip, selector: "mat-basic-chip, mat-chip", inputs: ["color", "disabled", "disableRipple", "tabIndex", "role", "id", "aria-label", "value", "removable", "highlighted"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "directive", type: i7$2.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i7$2.MatChipSet, selector: "mat-chip-set", inputs: ["disabled", "role"] }, { kind: "directive", type: i8.LetDirective, selector: "[ngrxLet]", inputs: ["ngrxLet", "ngrxLetSuspenseTpl"] }, { kind: "component", type: FilterComponent, selector: "tb-filter", inputs: ["filter"], outputs: ["close"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: KeyDisplayPipe, name: "keyDisplay" }, { kind: "pipe", type: FormatFilterValuePipe, name: "formatFilterValue" }, { kind: "pipe", type: FormatFilterTypePipe, name: "formatFilterType" }] });
|
|
3896
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: FilterChipsComponent, decorators: [{
|
|
3897
|
+
type: Component,
|
|
3898
|
+
args: [{ selector: 'lib-filter-list', template: "<div style=\"display: flex; flex-direction: row;justify-content: flex-end;\" *ngrxLet=\"currentFilters$ as currentFilters\" >\n\n <button class=\"cancel-button\" *ngIf=\"currentFilters.length\" mat-icon-button (click)=\"clearAll()\"\n matTooltip=\"Close all Filters Cards\">\n <mat-icon class=\"cancel-button\" color=\"primary\">close</mat-icon>\n </button>\n\n\n <div *ngIf=\"currentFilters.length\" class=\"float\">\n <div class=\"filter\" *ngFor=\"let filter of (currentFilters$ | async); index as i;\">\n <tb-filter [filter]=\"filter\" (close)=\"deleteByIndex(i)\" > </tb-filter>\n </div>\n </div>\n\n <mat-chip-set *ngrxLet=\"filters$ as filters\">\n <mat-chip *ngFor=\"let filter of filters\" (dblclick)=\"addFilter(filter)\" (removed)=\"tableState.removeFilter(filter.filterId!)\">\n {{ filter.key | keyDisplay | async }} {{filter.filterType | formatFilterType : filter.filterValue}} {{ filter.filterValue | formatFilterValue: filter.key : filter.filterType | async }}\n <mat-icon matChipRemove>cancel</mat-icon>\n </mat-chip>\n <mat-chip *ngIf=\"filters.length >= 2\" (removed)=\"tableState.clearFilters()\">\n Clear All\n <mat-icon matChipRemove>cancel</mat-icon>\n </mat-chip>\n </mat-chip-set>\n\n</div>\n", styles: [".filter{margin:15px;display:inline-block}.filter-button{color:#6495ed;font-size:22px;font-weight:700}.cancel-button{margin-right:30px;font-weight:700}.filter-wrapper{margin-top:1em;margin-bottom:1em;float:right}.menu{margin-bottom:10px;width:109.1%}.filter-labels{color:#6495ed;font-size:17px;font-weight:600}.float{position:absolute;width:-moz-fit-content;width:fit-content;z-index:101;top:10px;right:180px;max-width:90vw}\n"] }]
|
|
3899
|
+
}], ctorParameters: function () { return [{ type: TableStore }, { type: WrapperFilterStore }]; } });
|
|
3900
|
+
|
|
3901
|
+
class GroupByListComponent {
|
|
3902
|
+
constructor(tableStore) {
|
|
3903
|
+
this.tableStore = tableStore;
|
|
3904
|
+
}
|
|
3905
|
+
ngOnInit() {
|
|
3906
|
+
}
|
|
3907
|
+
}
|
|
3908
|
+
GroupByListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: GroupByListComponent, deps: [{ token: TableStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
3909
|
+
GroupByListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: GroupByListComponent, selector: "group-by-list", ngImport: i0, template: "<mat-chip-set *ngrxLet=\"tableStore.groupByKeys$ as groupByKeys\">\n <span *ngIf=\"groupByKeys?.length\" class=\"tb-group-label\">Group By:</span>\n <ng-container *ngFor=\"let groupByKey of groupByKeys; let i = index;\">\n <mat-icon *ngIf=\"i > 0\" class=\"nested-arrow\">arrow_right</mat-icon>\n <mat-chip (removed)=\"tableStore.removeGroupByKey(groupByKey)\">\n {{groupByKey | spaceCase}}\n <mat-icon matChipRemove>cancel</mat-icon>\n </mat-chip>\n </ng-container>\n</mat-chip-set>\n", styles: [".tb-group-label{padding-right:5px}.nested-arrow{margin-right:-8px;margin-left:-8px}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i7$2.MatChip, selector: "mat-basic-chip, mat-chip", inputs: ["color", "disabled", "disableRipple", "tabIndex", "role", "id", "aria-label", "value", "removable", "highlighted"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "directive", type: i7$2.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i7$2.MatChipSet, selector: "mat-chip-set", inputs: ["disabled", "role"] }, { kind: "directive", type: i8.LetDirective, selector: "[ngrxLet]", inputs: ["ngrxLet", "ngrxLetSuspenseTpl"] }, { kind: "pipe", type: SpaceCasePipe, name: "spaceCase" }] });
|
|
3910
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: GroupByListComponent, decorators: [{
|
|
3911
|
+
type: Component,
|
|
3912
|
+
args: [{ selector: 'group-by-list', template: "<mat-chip-set *ngrxLet=\"tableStore.groupByKeys$ as groupByKeys\">\n <span *ngIf=\"groupByKeys?.length\" class=\"tb-group-label\">Group By:</span>\n <ng-container *ngFor=\"let groupByKey of groupByKeys; let i = index;\">\n <mat-icon *ngIf=\"i > 0\" class=\"nested-arrow\">arrow_right</mat-icon>\n <mat-chip (removed)=\"tableStore.removeGroupByKey(groupByKey)\">\n {{groupByKey | spaceCase}}\n <mat-icon matChipRemove>cancel</mat-icon>\n </mat-chip>\n </ng-container>\n</mat-chip-set>\n", styles: [".tb-group-label{padding-right:5px}.nested-arrow{margin-right:-8px;margin-left:-8px}\n"] }]
|
|
3913
|
+
}], ctorParameters: function () { return [{ type: TableStore }]; } });
|
|
3462
3914
|
|
|
3463
3915
|
class TableContainerComponent {
|
|
3464
3916
|
constructor(state, exportToCsvService, config, store, wrapper) {
|
|
@@ -3486,6 +3938,55 @@ class TableContainerComponent {
|
|
|
3486
3938
|
return meta;
|
|
3487
3939
|
};
|
|
3488
3940
|
this.collapseHeader$ = this.state.state$.pipe(map(state => state.persistedTableSettings.collapseHeader));
|
|
3941
|
+
this.tbGroupBy = (data, groupByKeys, parentGroupName) => {
|
|
3942
|
+
let res = {};
|
|
3943
|
+
res = groupBy(data, groupByKeys[0]);
|
|
3944
|
+
const remainingGroupByKeys = groupByKeys.slice(1);
|
|
3945
|
+
if (remainingGroupByKeys.length) {
|
|
3946
|
+
Object.keys(res).forEach(key => res[key] = this.tbGroupBy(res[key], remainingGroupByKeys, key));
|
|
3947
|
+
}
|
|
3948
|
+
return flattenDeep(Object.keys(res).map(groupName => {
|
|
3949
|
+
const uniqName = parentGroupName ? `${parentGroupName}-${groupName}` : `${groupName}`;
|
|
3950
|
+
return [
|
|
3951
|
+
{
|
|
3952
|
+
isGroupHeader: true,
|
|
3953
|
+
groupHeaderName: `${groupName} (${res[groupName]?.filter(row => !row.isGroupHeader)?.length})`,
|
|
3954
|
+
data: res[groupName],
|
|
3955
|
+
groupName: uniqName,
|
|
3956
|
+
padding: 0
|
|
3957
|
+
},
|
|
3958
|
+
res[groupName]?.map(d => ({ ...d, parentGroupName: d.parentGroupName || uniqName }))
|
|
3959
|
+
];
|
|
3960
|
+
})).map(this.addIndentation);
|
|
3961
|
+
};
|
|
3962
|
+
this.addIndentation = (d) => {
|
|
3963
|
+
if (d.isGroupHeader) {
|
|
3964
|
+
if (d.padding) {
|
|
3965
|
+
d.padding += 20;
|
|
3966
|
+
}
|
|
3967
|
+
else {
|
|
3968
|
+
d.padding = 1;
|
|
3969
|
+
}
|
|
3970
|
+
}
|
|
3971
|
+
return d;
|
|
3972
|
+
};
|
|
3973
|
+
this.setDisplay = (data, groups) => data
|
|
3974
|
+
.map(d => ({
|
|
3975
|
+
...d,
|
|
3976
|
+
shouldDisplay: !d.parentGroupName || this.shouldDisplay(groups.find(g => g.groupName == d.parentGroupName), groups),
|
|
3977
|
+
isExpanded: groups.find(g => g.groupName == d.groupName)?.isExpanded
|
|
3978
|
+
}))
|
|
3979
|
+
.filter(d => d.shouldDisplay);
|
|
3980
|
+
this.shouldDisplay = (currentGroup, groups) => {
|
|
3981
|
+
if (!currentGroup?.isExpanded) {
|
|
3982
|
+
return false;
|
|
3983
|
+
}
|
|
3984
|
+
const parentGroup = groups?.find(g => g.groupName == currentGroup.parentGroupName);
|
|
3985
|
+
if (parentGroup) {
|
|
3986
|
+
return this.shouldDisplay(parentGroup, groups);
|
|
3987
|
+
}
|
|
3988
|
+
return true;
|
|
3989
|
+
};
|
|
3489
3990
|
this.state.on(this.state.getSavableState().pipe(last()), finalState => {
|
|
3490
3991
|
if (this.tableId) {
|
|
3491
3992
|
this.store.dispatch(setLocalProfile({ key: this.tableId, value: finalState }));
|
|
@@ -3496,6 +3997,12 @@ class TableContainerComponent {
|
|
|
3496
3997
|
set pageSize(value) {
|
|
3497
3998
|
this.state.setPageSize(value);
|
|
3498
3999
|
}
|
|
4000
|
+
firstPage() {
|
|
4001
|
+
this.genericTableComponent?.paginatorComponent?.paginator?.firstPage();
|
|
4002
|
+
}
|
|
4003
|
+
lastPage() {
|
|
4004
|
+
this.genericTableComponent?.paginatorComponent?.paginator?.lastPage();
|
|
4005
|
+
}
|
|
3499
4006
|
resetState() {
|
|
3500
4007
|
this.customFilters.forEach(cf => cf.reset());
|
|
3501
4008
|
this.filters.forEach(cf => cf.reset());
|
|
@@ -3506,7 +4013,7 @@ class TableContainerComponent {
|
|
|
3506
4013
|
this.state.setTableSettings(this.tableBuilder.settings);
|
|
3507
4014
|
this.state.runOnceWhen(stateIs(InitializationState.MetaDataLoaded), state => {
|
|
3508
4015
|
if (this.tableId) {
|
|
3509
|
-
const persistedState$ = this.store.pipe(select(selectLocalProfileState(this.tableId)),
|
|
4016
|
+
const persistedState$ = this.store.pipe(select(selectLocalProfileState(this.tableId)), tap(persistedState => {
|
|
3510
4017
|
if (!persistedState) {
|
|
3511
4018
|
this.state.setIntializationState(InitializationState.LoadedFromStore);
|
|
3512
4019
|
}
|
|
@@ -3526,7 +4033,7 @@ class TableContainerComponent {
|
|
|
3526
4033
|
const filters$ = this.state.filters$.pipe(map(filters => Object.values(filters)));
|
|
3527
4034
|
const data = new DataFilter(allFilters)
|
|
3528
4035
|
.appendFilters(filters$)
|
|
3529
|
-
.filterData(this.tableBuilder.getData$().pipe(switchMap(data => this.state.
|
|
4036
|
+
.filterData(this.tableBuilder.getData$()).pipe(switchMap(data => this.state.groupByKeys$.pipe(map(groupBy => this.getData(data, groupBy))).pipe(switchMap(data => this.state.groups$.pipe(map(groups => this.setDisplay(data, groups)))))));
|
|
3530
4037
|
this.dataSubject.next(data);
|
|
3531
4038
|
}
|
|
3532
4039
|
ngOnInit() {
|
|
@@ -3558,7 +4065,7 @@ class TableContainerComponent {
|
|
|
3558
4065
|
this.state.runOnceWhen(stateIs(InitializationState.LoadedFromStore), state => {
|
|
3559
4066
|
var allFilters = [...this.filters, ...this.customFilters];
|
|
3560
4067
|
if (this.wrapper) {
|
|
3561
|
-
allFilters = [...allFilters, ...this.wrapper.customFilters, ...this.wrapper.filters];
|
|
4068
|
+
allFilters = [...allFilters, ...this.wrapper.customFilters, ...this.wrapper.filters, ...this.wrapper.registerations];
|
|
3562
4069
|
}
|
|
3563
4070
|
var customFilters = [];
|
|
3564
4071
|
allFilters.filter(f => !f.used).forEach(f => {
|
|
@@ -3582,7 +4089,7 @@ class TableContainerComponent {
|
|
|
3582
4089
|
customFilters.push(f);
|
|
3583
4090
|
}
|
|
3584
4091
|
});
|
|
3585
|
-
const filters$ = from(customFilters.map(cf => cf.filter$)).pipe(mergeAll(), scan((a, b) => {
|
|
4092
|
+
const filters$ = from(customFilters.map(cf => cf.filter$)).pipe(mergeAll(), scan$1((a, b) => {
|
|
3586
4093
|
if (b.active) {
|
|
3587
4094
|
a[b.filterId] = isCustomFilter(b) ? b.predicate : createFilterFunc(b);
|
|
3588
4095
|
}
|
|
@@ -3606,46 +4113,39 @@ class TableContainerComponent {
|
|
|
3606
4113
|
...this.customCells.map(cc => cc.getMetaData(mds.find(item => item.key === cc.customCell)))
|
|
3607
4114
|
];
|
|
3608
4115
|
})));
|
|
4116
|
+
this.state.setLinkMaps(this.tableBuilder.metaData$.pipe(map((mds) => {
|
|
4117
|
+
return mds.reduce((acc, md) => {
|
|
4118
|
+
if (md.fieldType === FieldType.Link) {
|
|
4119
|
+
acc[md.key] = createLinkCreator(md);
|
|
4120
|
+
}
|
|
4121
|
+
return acc;
|
|
4122
|
+
}, {});
|
|
4123
|
+
})));
|
|
3609
4124
|
this.myColumns$ = this.state.metaDataArray$.pipe(mapArray(metaData => ({ metaData, customCell: customCellMap.get(metaData.key) })));
|
|
3610
4125
|
}
|
|
3611
|
-
getData(data,
|
|
3612
|
-
|
|
3613
|
-
if (!meta) {
|
|
4126
|
+
getData(data, groupByKeys) {
|
|
4127
|
+
if (!groupByKeys.length) {
|
|
3614
4128
|
this.disableSort = false;
|
|
3615
4129
|
return data;
|
|
3616
4130
|
}
|
|
3617
4131
|
this.disableSort = true;
|
|
3618
|
-
|
|
3619
|
-
const withHeadersAndFooters = Object.keys(grouped).map(k => {
|
|
3620
|
-
const header = {
|
|
3621
|
-
isGroupHeader: true,
|
|
3622
|
-
groupHeaderName: meta.additional?.grouping?.groupTitleFn ? meta.additional?.grouping?.groupTitleFn(k) : k
|
|
3623
|
-
};
|
|
3624
|
-
const sumCols = metaData.filter(md => md.additional?.grouping?.sum).map(md => md.key);
|
|
3625
|
-
const totals = sumCols.reduce((acc, key) => {
|
|
3626
|
-
acc[key] = _.sumBy(grouped[k], key);
|
|
3627
|
-
return acc;
|
|
3628
|
-
}, {});
|
|
3629
|
-
const footer = {
|
|
3630
|
-
isGroupFooter: true,
|
|
3631
|
-
...totals
|
|
3632
|
-
};
|
|
3633
|
-
return [header, grouped[k], footer];
|
|
3634
|
-
});
|
|
3635
|
-
return _.flattenDeep(withHeadersAndFooters);
|
|
4132
|
+
return this.tbGroupBy(data, groupByKeys);
|
|
3636
4133
|
}
|
|
3637
4134
|
}
|
|
3638
|
-
TableContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3639
|
-
TableContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
3640
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4135
|
+
TableContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TableContainerComponent, deps: [{ token: TableStore }, { token: ExportToCsvService }, { token: TableBuilderConfigToken }, { token: i3$4.Store }, { token: TableWrapperDirective, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
4136
|
+
TableContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: TableContainerComponent, selector: "tb-table-container", inputs: { tableId: "tableId", tableBuilder: "tableBuilder", IndexColumn: "IndexColumn", SelectionColumn: "SelectionColumn", trackBy: "trackBy", isSticky: "isSticky", pageSize: "pageSize", inputFilters: "inputFilters", groupHeaderTemplate: "groupHeaderTemplate" }, outputs: { selection$: "selection$", data: "data", OnStateReset: "OnStateReset", OnSaveState: "OnSaveState", state$: "state$" }, providers: [TableStore, ExportToCsvService, WrapperFilterStore], queries: [{ propertyName: "customFilters", predicate: TableCustomFilterDirective, descendants: true }, { propertyName: "filters", predicate: TableFilterDirective, descendants: true }, { propertyName: "customRows", predicate: MatRowDef }, { propertyName: "customCells", predicate: CustomCellDirective }], viewQueries: [{ propertyName: "genericTableComponent", first: true, predicate: GenericTableComponent, descendants: true }], ngImport: i0, template: "<ng-content select=\"[before]\" >\n</ng-content>\n\n<ng-container multiSort [matSortDisabled]=\"disableSort\">\n <ng-container *ngrxLet=\"state.tableSettings$ as tableSettings\">\n\n\n <div class=\"header-wrapper\">\n <div class=\"title\">\n <ng-content select=\".tb-header-title\"\n *ngIf=\"(!(collapseHeader$ | async)) || tableSettings.showTitleWhenHeaderCollapsed\">\n\n </ng-content>\n <group-by-list></group-by-list>\n </div>\n <div class=\"flx-row-end\">\n <lib-filter-list></lib-filter-list>\n <ng-container *ngIf=\"!tableSettings.hideHeader\">\n <ng-container *ngIf=\"!(collapseHeader$ | async); else allMenu\">\n <ng-container *ngTemplateOutlet=\"headerMenu\"></ng-container>\n <button mat-icon-button color='primary' [matMenuTriggerFor]=\"mainMenu\"\n [ngClass]=\"{'flat-menu':(collapseHeader$ | async)}\">\n <mat-icon>{{(collapseHeader$ | async) ? 'more_horiz' : 'more_vert'}}</mat-icon>\n </button>\n <mat-menu #mainMenu='matMenu'>\n <ng-container *ngTemplateOutlet=\"headerMenuExtra\"></ng-container>\n </mat-menu>\n </ng-container>\n <ng-template #allMenu>\n <button mat-icon-button color='primary' [matMenuTriggerFor]=\"mainMenu\"\n [ngClass]=\"{'flat-menu':(collapseHeader$ | async)}\">\n <mat-icon>{{(collapseHeader$ | async) ? 'more_horiz' : 'more_vert'}}</mat-icon>\n </button>\n <mat-menu #mainMenu='matMenu'>\n <div class=\"flex-column\">\n <ng-container *ngTemplateOutlet=\"headerMenu\"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet=\"headerMenuExtra\"></ng-container>\n </mat-menu>\n </ng-template>\n <mat-icon [matTooltip]=\"(collapseHeader$ | async) ? 'expand' : 'collapse'\" class=\"collapse-icon header\"\n (click)=\"state.toggleCollapseHeader()\">\n {{(collapseHeader$ | async) ? 'expand_less' : 'expand_more'}}\n </mat-icon>\n </ng-container>\n </div>\n </div>\n\n <div style=\"clear: both;\">\n <tb-generic-table [rows]='customRows' [data$]=\"data\" [IndexColumn]='IndexColumn'\n [SelectionColumn]='SelectionColumn' (selection$)='selection$.emit($event)' [trackBy]='trackBy'\n [isSticky]='isSticky' [columnInfos]='myColumns$' [disableSort]=\"disableSort\" [groupHeaderTemplate]=\"groupHeaderTemplate\">\n </tb-generic-table>\n </div>\n\n\n\n <ng-template #headerMenu>\n <ng-container>\n <tb-filter-displayer *ngIf=\"!tableSettings.hideFilter\">\n </tb-filter-displayer>\n <tb-col-displayer *ngIf=\"!tableSettings.hideColumnSettings\"></tb-col-displayer>\n <tb-sort-menu *ngIf=\"!tableSettings.hideSort\"></tb-sort-menu>\n </ng-container>\n </ng-template>\n <ng-template #headerMenuExtra>\n <button mat-menu-item (click)=\"resetState()\">\n <mat-icon color=\"primary\">autorenew</mat-icon>\n <span>Reset table</span>\n </button>\n <button mat-menu-item (click)=\"exportToCsv()\" *ngIf=\"!tableSettings.hideExport\">\n <mat-icon color=\"primary\">file_download</mat-icon>\n <span>Export Table</span>\n </button>\n <ng-container *ngIf=\"currentStateKey$ | async as currentKey\">\n <button mat-menu-item *ngIf=\"tableId\" (click)=\"saveState()\">\n <mat-icon color=\"primary\">save</mat-icon>\n <span>Save to {{currentKey}}</span>\n </button>\n <button *ngIf='tableId' mat-menu-item [matMenuTriggerFor]=\"savedNames\">\n <span>Choose Profile</span>\n </button>\n </ng-container>\n\n <mat-menu #savedNames='matMenu' panelClass='wide-menu'>\n <button mat-menu-item clickEmitter #add='clickEmitter'>\n <mat-icon>add</mat-icon>\n <span>New</span>\n </button>\n <ng-container *ngFor='let key of stateKeys$ | async'>\n <button mat-menu-item (click)='setProfileState(key)'>\n <div style='display: flex; align-items: center; justify-content: space-between;'>\n <span style='display:flex;'>{{key}}</span>\n <span style='display:flex;'>\n <span style=\"width: 120px;\"></span>\n <mat-icon color='warn' (click)='deleteProfileState(key)' stop-propagation>delete_forever</mat-icon>\n </span>\n </div>\n </button>\n </ng-container>\n </mat-menu>\n <ng-container *opDialog='add'>\n <mat-form-field>\n <input style='width:90%' matInput #addedKey />\n </mat-form-field>\n <button mat-button (click)='setProfileState(addedKey.value); add.next(false);'\n [disabled]=\"!addedKey.value\">Add</button>\n </ng-container>\n </ng-template>\n\n </ng-container>\n\n</ng-container>\n", styles: [".wide-menu{width:200px!important}.header-wrapper{display:flex;flex-direction:row;justify-content:space-between;width:100%}.flx-row-end{display:flex;flex-direction:row;justify-content:flex-end;align-items:center}.flat-menu{line-height:initial;height:initial}\n", ".collapse-icon{font-size:16px;height:16px;padding-bottom:.2rem;color:#3f51b5}.collapse-icon.header{align-self:flex-end}.collapse-icon.footer{align-self:flex-start}.collapse-icon:hover{cursor:pointer}.hide{display:none}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i4$2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$2.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "directive", type: i8$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i6$1.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i6$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i6$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i8.LetDirective, selector: "[ngrxLet]", inputs: ["ngrxLet", "ngrxLetSuspenseTpl"] }, { kind: "directive", type: StopPropagationDirective, selector: "[stop-propagation]" }, { kind: "directive", type: ClickEmitterDirective, selector: "[clickEmitter]", exportAs: ["clickEmitter"] }, { kind: "directive", type: DialogDirective, selector: "[opDialog]", inputs: ["add_opDialog_Class", "opDialogConfig", "opDialog", "opDialogOrigin"], outputs: ["opDialogClosed"] }, { kind: "component", type: GenericTableComponent, selector: "tb-generic-table", inputs: ["data$", "IndexColumn", "SelectionColumn", "trackBy", "rows", "isSticky", "columnBuilders", "columnInfos", "groupHeaderTemplate", "disableSort"], outputs: ["selection$"] }, { kind: "component", type: GenColDisplayerComponent, selector: "tb-col-displayer" }, { kind: "component", type: GenFilterDisplayerComponent, selector: "tb-filter-displayer" }, { kind: "directive", type: MultiSortDirective, selector: "[multiSort]", inputs: ["matSortDisabled"], exportAs: ["multiSort"] }, { kind: "component", type: SortMenuComponent, selector: "tb-sort-menu" }, { kind: "component", type: FilterChipsComponent, selector: "lib-filter-list" }, { kind: "component", type: GroupByListComponent, selector: "group-by-list" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4137
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TableContainerComponent, decorators: [{
|
|
3641
4138
|
type: Component,
|
|
3642
|
-
args: [{ selector: 'tb-table-container', changeDetection: ChangeDetectionStrategy.OnPush, providers: [TableStore, ExportToCsvService, WrapperFilterStore], template: "<ng-content select=\"[before]\" >\n</ng-content>\n\n<ng-container multiSort [matSortDisabled]=\"disableSort\">\n <ng-container *ngrxLet=\"state.tableSettings$ as tableSettings\">\n\n\n <div class=\"header-wrapper\">\n <div class=\"title\">\n <ng-content select=\".tb-header-title\"\n *ngIf=\"(!(collapseHeader$ | async)) || tableSettings.showTitleWhenHeaderCollapsed\">\n\n </ng-content>\n </div>\n <div class=\"flx-row-end\">\n <lib-filter-list></lib-filter-list>\n <ng-container *ngIf=\"!tableSettings.hideHeader\">\n <ng-container *ngIf=\"!(collapseHeader$ | async); else allMenu\">\n <ng-container *ngTemplateOutlet=\"headerMenu\"></ng-container>\n <button mat-icon-button color='primary' [matMenuTriggerFor]=\"mainMenu\"\n [ngClass]=\"{'flat-menu':(collapseHeader$ | async)}\">\n <mat-icon>{{(collapseHeader$ | async) ? 'more_horiz' : 'more_vert'}}</mat-icon>\n </button>\n <mat-menu #mainMenu='matMenu'>\n <ng-container *ngTemplateOutlet=\"headerMenuExtra\"></ng-container>\n </mat-menu>\n </ng-container>\n <ng-template #allMenu>\n <button mat-icon-button color='primary' [matMenuTriggerFor]=\"mainMenu\"\n [ngClass]=\"{'flat-menu':(collapseHeader$ | async)}\">\n <mat-icon>{{(collapseHeader$ | async) ? 'more_horiz' : 'more_vert'}}</mat-icon>\n </button>\n <mat-menu #mainMenu='matMenu'>\n <div class=\"flex-column\">\n <ng-container *ngTemplateOutlet=\"headerMenu\"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet=\"headerMenuExtra\"></ng-container>\n </mat-menu>\n </ng-template>\n <mat-icon [matTooltip]=\"(collapseHeader$ | async) ? 'expand' : 'collapse'\" class=\"collapse-icon header\"\n (click)=\"state.toggleCollapseHeader()\">\n {{(collapseHeader$ | async) ? 'expand_less' : 'expand_more'}}\n </mat-icon>\n </ng-container>\n </div>\n </div>\n\n <div style=\"clear: both;\">\n <tb-generic-table [rows]='customRows' [data$]=\"data\" [IndexColumn]='IndexColumn'\n [SelectionColumn]='SelectionColumn' (selection$)='selection$.emit($event)' [trackBy]='trackBy'\n [isSticky]='isSticky' [columnInfos]='myColumns$' [disableSort]=\"disableSort\">\n </tb-generic-table>\n </div>\n\n\n\n <ng-template #headerMenu>\n <ng-container>\n <tb-filter-displayer *ngIf=\"!tableSettings.hideFilter\">\n </tb-filter-displayer>\n <tb-col-displayer *ngIf=\"!tableSettings.hideColumnSettings\"></tb-col-displayer>\n <tb-sort-menu *ngIf=\"!tableSettings.hideSort\"></tb-sort-menu>\n </ng-container>\n </ng-template>\n <ng-template #headerMenuExtra>\n <button mat-menu-item (click)=\"resetState()\">\n <mat-icon color=\"primary\">autorenew</mat-icon>\n <span>Reset table</span>\n </button>\n <button mat-menu-item (click)=\"exportToCsv()\" *ngIf=\"!tableSettings.hideExport\">\n <mat-icon color=\"primary\">file_download</mat-icon>\n <span>Export Table</span>\n </button>\n <ng-container *ngIf=\"currentStateKey$ | async as currentKey\">\n <button mat-menu-item *ngIf=\"tableId\" (click)=\"saveState()\">\n <mat-icon color=\"primary\">save</mat-icon>\n <span>Save to {{currentKey}}</span>\n </button>\n <button *ngIf='tableId' mat-menu-item [matMenuTriggerFor]=\"savedNames\">\n <span>Choose Profile</span>\n </button>\n </ng-container>\n\n <mat-menu #savedNames='matMenu' panelClass='wide-menu'>\n <button mat-menu-item clickEmitter #add='clickEmitter'>\n <mat-icon>add</mat-icon>\n <span>New</span>\n </button>\n <ng-container *ngFor='let key of stateKeys$ | async'>\n <button mat-menu-item (click)='setProfileState(key)'>\n <div style='display: flex; align-items: center; justify-content: space-between;'>\n <span style='display:flex;'>{{key}}</span>\n <span style='display:flex;'>\n <span style=\"width: 120px;\"></span>\n <mat-icon color='warn' (click)='deleteProfileState(key)' stop-propagation>delete_forever</mat-icon>\n </span>\n </div>\n </button>\n </ng-container>\n </mat-menu>\n <
|
|
4139
|
+
args: [{ selector: 'tb-table-container', changeDetection: ChangeDetectionStrategy.OnPush, providers: [TableStore, ExportToCsvService, WrapperFilterStore], template: "<ng-content select=\"[before]\" >\n</ng-content>\n\n<ng-container multiSort [matSortDisabled]=\"disableSort\">\n <ng-container *ngrxLet=\"state.tableSettings$ as tableSettings\">\n\n\n <div class=\"header-wrapper\">\n <div class=\"title\">\n <ng-content select=\".tb-header-title\"\n *ngIf=\"(!(collapseHeader$ | async)) || tableSettings.showTitleWhenHeaderCollapsed\">\n\n </ng-content>\n <group-by-list></group-by-list>\n </div>\n <div class=\"flx-row-end\">\n <lib-filter-list></lib-filter-list>\n <ng-container *ngIf=\"!tableSettings.hideHeader\">\n <ng-container *ngIf=\"!(collapseHeader$ | async); else allMenu\">\n <ng-container *ngTemplateOutlet=\"headerMenu\"></ng-container>\n <button mat-icon-button color='primary' [matMenuTriggerFor]=\"mainMenu\"\n [ngClass]=\"{'flat-menu':(collapseHeader$ | async)}\">\n <mat-icon>{{(collapseHeader$ | async) ? 'more_horiz' : 'more_vert'}}</mat-icon>\n </button>\n <mat-menu #mainMenu='matMenu'>\n <ng-container *ngTemplateOutlet=\"headerMenuExtra\"></ng-container>\n </mat-menu>\n </ng-container>\n <ng-template #allMenu>\n <button mat-icon-button color='primary' [matMenuTriggerFor]=\"mainMenu\"\n [ngClass]=\"{'flat-menu':(collapseHeader$ | async)}\">\n <mat-icon>{{(collapseHeader$ | async) ? 'more_horiz' : 'more_vert'}}</mat-icon>\n </button>\n <mat-menu #mainMenu='matMenu'>\n <div class=\"flex-column\">\n <ng-container *ngTemplateOutlet=\"headerMenu\"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet=\"headerMenuExtra\"></ng-container>\n </mat-menu>\n </ng-template>\n <mat-icon [matTooltip]=\"(collapseHeader$ | async) ? 'expand' : 'collapse'\" class=\"collapse-icon header\"\n (click)=\"state.toggleCollapseHeader()\">\n {{(collapseHeader$ | async) ? 'expand_less' : 'expand_more'}}\n </mat-icon>\n </ng-container>\n </div>\n </div>\n\n <div style=\"clear: both;\">\n <tb-generic-table [rows]='customRows' [data$]=\"data\" [IndexColumn]='IndexColumn'\n [SelectionColumn]='SelectionColumn' (selection$)='selection$.emit($event)' [trackBy]='trackBy'\n [isSticky]='isSticky' [columnInfos]='myColumns$' [disableSort]=\"disableSort\" [groupHeaderTemplate]=\"groupHeaderTemplate\">\n </tb-generic-table>\n </div>\n\n\n\n <ng-template #headerMenu>\n <ng-container>\n <tb-filter-displayer *ngIf=\"!tableSettings.hideFilter\">\n </tb-filter-displayer>\n <tb-col-displayer *ngIf=\"!tableSettings.hideColumnSettings\"></tb-col-displayer>\n <tb-sort-menu *ngIf=\"!tableSettings.hideSort\"></tb-sort-menu>\n </ng-container>\n </ng-template>\n <ng-template #headerMenuExtra>\n <button mat-menu-item (click)=\"resetState()\">\n <mat-icon color=\"primary\">autorenew</mat-icon>\n <span>Reset table</span>\n </button>\n <button mat-menu-item (click)=\"exportToCsv()\" *ngIf=\"!tableSettings.hideExport\">\n <mat-icon color=\"primary\">file_download</mat-icon>\n <span>Export Table</span>\n </button>\n <ng-container *ngIf=\"currentStateKey$ | async as currentKey\">\n <button mat-menu-item *ngIf=\"tableId\" (click)=\"saveState()\">\n <mat-icon color=\"primary\">save</mat-icon>\n <span>Save to {{currentKey}}</span>\n </button>\n <button *ngIf='tableId' mat-menu-item [matMenuTriggerFor]=\"savedNames\">\n <span>Choose Profile</span>\n </button>\n </ng-container>\n\n <mat-menu #savedNames='matMenu' panelClass='wide-menu'>\n <button mat-menu-item clickEmitter #add='clickEmitter'>\n <mat-icon>add</mat-icon>\n <span>New</span>\n </button>\n <ng-container *ngFor='let key of stateKeys$ | async'>\n <button mat-menu-item (click)='setProfileState(key)'>\n <div style='display: flex; align-items: center; justify-content: space-between;'>\n <span style='display:flex;'>{{key}}</span>\n <span style='display:flex;'>\n <span style=\"width: 120px;\"></span>\n <mat-icon color='warn' (click)='deleteProfileState(key)' stop-propagation>delete_forever</mat-icon>\n </span>\n </div>\n </button>\n </ng-container>\n </mat-menu>\n <ng-container *opDialog='add'>\n <mat-form-field>\n <input style='width:90%' matInput #addedKey />\n </mat-form-field>\n <button mat-button (click)='setProfileState(addedKey.value); add.next(false);'\n [disabled]=\"!addedKey.value\">Add</button>\n </ng-container>\n </ng-template>\n\n </ng-container>\n\n</ng-container>\n", styles: [".wide-menu{width:200px!important}.header-wrapper{display:flex;flex-direction:row;justify-content:space-between;width:100%}.flx-row-end{display:flex;flex-direction:row;justify-content:flex-end;align-items:center}.flat-menu{line-height:initial;height:initial}\n", ".collapse-icon{font-size:16px;height:16px;padding-bottom:.2rem;color:#3f51b5}.collapse-icon.header{align-self:flex-end}.collapse-icon.footer{align-self:flex-start}.collapse-icon:hover{cursor:pointer}.hide{display:none}\n"] }]
|
|
3643
4140
|
}], ctorParameters: function () { return [{ type: TableStore }, { type: ExportToCsvService }, { type: undefined, decorators: [{
|
|
3644
4141
|
type: Inject,
|
|
3645
4142
|
args: [TableBuilderConfigToken]
|
|
3646
|
-
}] }, { type: i3$
|
|
4143
|
+
}] }, { type: i3$4.Store }, { type: TableWrapperDirective, decorators: [{
|
|
3647
4144
|
type: Optional
|
|
3648
|
-
}] }]; }, propDecorators: {
|
|
4145
|
+
}] }]; }, propDecorators: { genericTableComponent: [{
|
|
4146
|
+
type: ViewChild,
|
|
4147
|
+
args: [GenericTableComponent]
|
|
4148
|
+
}], customFilters: [{
|
|
3649
4149
|
type: ContentChildren,
|
|
3650
4150
|
args: [TableCustomFilterDirective, { descendants: true }]
|
|
3651
4151
|
}], filters: [{
|
|
@@ -3667,6 +4167,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
3667
4167
|
type: Input
|
|
3668
4168
|
}], inputFilters: [{
|
|
3669
4169
|
type: Input
|
|
4170
|
+
}], groupHeaderTemplate: [{
|
|
4171
|
+
type: Input
|
|
3670
4172
|
}], selection$: [{
|
|
3671
4173
|
type: Output
|
|
3672
4174
|
}], data: [{
|
|
@@ -3767,173 +4269,11 @@ class SaveTableEffects {
|
|
|
3767
4269
|
})), { dispatch: false });
|
|
3768
4270
|
}
|
|
3769
4271
|
}
|
|
3770
|
-
SaveTableEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3771
|
-
SaveTableEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3772
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4272
|
+
SaveTableEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: SaveTableEffects, deps: [{ token: i1$3.Actions }, { token: i3$4.Store }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4273
|
+
SaveTableEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: SaveTableEffects });
|
|
4274
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: SaveTableEffects, decorators: [{
|
|
3773
4275
|
type: Injectable
|
|
3774
|
-
}], ctorParameters: function () { return [{ type: i1$
|
|
3775
|
-
|
|
3776
|
-
class PreventEnterDirective {
|
|
3777
|
-
onKeyDown() {
|
|
3778
|
-
return false;
|
|
3779
|
-
}
|
|
3780
|
-
}
|
|
3781
|
-
PreventEnterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: PreventEnterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3782
|
-
PreventEnterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.5", type: PreventEnterDirective, selector: "preventEnter", host: { listeners: { "keydown.enter": "onKeyDown($event)" } }, ngImport: i0 });
|
|
3783
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: PreventEnterDirective, decorators: [{
|
|
3784
|
-
type: Directive,
|
|
3785
|
-
args: [{
|
|
3786
|
-
selector: 'preventEnter'
|
|
3787
|
-
}]
|
|
3788
|
-
}], propDecorators: { onKeyDown: [{
|
|
3789
|
-
type: HostListener,
|
|
3790
|
-
args: ['keydown.enter', ['$event']]
|
|
3791
|
-
}] } });
|
|
3792
|
-
|
|
3793
|
-
class ClickSubjectDirective extends Subject {
|
|
3794
|
-
constructor() {
|
|
3795
|
-
super();
|
|
3796
|
-
}
|
|
3797
|
-
set clickSubject(val) {
|
|
3798
|
-
this._val = val;
|
|
3799
|
-
}
|
|
3800
|
-
}
|
|
3801
|
-
ClickSubjectDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: ClickSubjectDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3802
|
-
ClickSubjectDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.5", type: ClickSubjectDirective, selector: "[clickSubject]", inputs: { clickSubject: "clickSubject" }, host: { listeners: { "click": "next(this._val)" } }, exportAs: ["clickSubject"], usesInheritance: true, ngImport: i0 });
|
|
3803
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: ClickSubjectDirective, decorators: [{
|
|
3804
|
-
type: Directive,
|
|
3805
|
-
args: [{
|
|
3806
|
-
selector: '[clickSubject]',
|
|
3807
|
-
exportAs: 'clickSubject',
|
|
3808
|
-
host: {
|
|
3809
|
-
'(click)': 'next(this._val)'
|
|
3810
|
-
}
|
|
3811
|
-
}]
|
|
3812
|
-
}], ctorParameters: function () { return []; }, propDecorators: { clickSubject: [{
|
|
3813
|
-
type: Input,
|
|
3814
|
-
args: ['clickSubject']
|
|
3815
|
-
}] } });
|
|
3816
|
-
|
|
3817
|
-
class MatSlideToggleGroupDirective {
|
|
3818
|
-
constructor() {
|
|
3819
|
-
this.allowMultiple = false;
|
|
3820
|
-
this._ready = new ReplaySubject(1);
|
|
3821
|
-
}
|
|
3822
|
-
set toggles(val) {
|
|
3823
|
-
this._toggles = val;
|
|
3824
|
-
this._ready.next(true);
|
|
3825
|
-
}
|
|
3826
|
-
get valueEmitter() {
|
|
3827
|
-
return this._ready.pipe(switchMap$1(_ => this.getObs()));
|
|
3828
|
-
}
|
|
3829
|
-
getInitValue() {
|
|
3830
|
-
const startValue = this._toggles.reduce((prev, cur) => {
|
|
3831
|
-
if (!cur.name) {
|
|
3832
|
-
throw new Error('toggle must have the name attribute set');
|
|
3833
|
-
}
|
|
3834
|
-
prev[cur.name] = cur.checked;
|
|
3835
|
-
return prev;
|
|
3836
|
-
}, {});
|
|
3837
|
-
return startValue;
|
|
3838
|
-
}
|
|
3839
|
-
getObs() {
|
|
3840
|
-
var toggleChanges = merge(...this._toggles.map(toggle => toggle.change));
|
|
3841
|
-
const startValue = this.getInitValue();
|
|
3842
|
-
return toggleChanges.pipe(scan$1((prev, cur) => {
|
|
3843
|
-
const toggleName = cur.source.name;
|
|
3844
|
-
const newVal = { ...prev, [toggleName]: cur.checked };
|
|
3845
|
-
if (cur.checked && !this.allowMultiple) {
|
|
3846
|
-
Object.keys(prev)
|
|
3847
|
-
.filter(key => key !== toggleName && prev[key])
|
|
3848
|
-
.forEach(key => {
|
|
3849
|
-
newVal[key] = false;
|
|
3850
|
-
this._toggles.find(toggle => toggle.name === key).toggle();
|
|
3851
|
-
});
|
|
3852
|
-
}
|
|
3853
|
-
return newVal;
|
|
3854
|
-
}, startValue), startWith$1(startValue));
|
|
3855
|
-
}
|
|
3856
|
-
}
|
|
3857
|
-
MatSlideToggleGroupDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: MatSlideToggleGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3858
|
-
MatSlideToggleGroupDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.5", type: MatSlideToggleGroupDirective, selector: "[opMatSlideToggleGroup]", inputs: { allowMultiple: "allowMultiple" }, outputs: { valueEmitter: "valueEmitter" }, queries: [{ propertyName: "toggles", predicate: MatSlideToggle }], ngImport: i0 });
|
|
3859
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: MatSlideToggleGroupDirective, decorators: [{
|
|
3860
|
-
type: Directive,
|
|
3861
|
-
args: [{ selector: '[opMatSlideToggleGroup]', }]
|
|
3862
|
-
}], propDecorators: { allowMultiple: [{
|
|
3863
|
-
type: Input
|
|
3864
|
-
}], toggles: [{
|
|
3865
|
-
type: ContentChildren,
|
|
3866
|
-
args: [MatSlideToggle]
|
|
3867
|
-
}], valueEmitter: [{
|
|
3868
|
-
type: Output
|
|
3869
|
-
}] } });
|
|
3870
|
-
|
|
3871
|
-
class UtilitiesModule {
|
|
3872
|
-
}
|
|
3873
|
-
UtilitiesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: UtilitiesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3874
|
-
UtilitiesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: UtilitiesModule, declarations: [SpaceCasePipe,
|
|
3875
|
-
PhoneNumberPipe,
|
|
3876
|
-
FunctionPipe,
|
|
3877
|
-
StopPropagationDirective,
|
|
3878
|
-
StylerDirective,
|
|
3879
|
-
PreventEnterDirective,
|
|
3880
|
-
AutoFocusDirective,
|
|
3881
|
-
ClickSubjectDirective,
|
|
3882
|
-
ClickEmitterDirective,
|
|
3883
|
-
DialogDirective,
|
|
3884
|
-
MatSlideToggleGroupDirective], exports: [StopPropagationDirective,
|
|
3885
|
-
PreventEnterDirective,
|
|
3886
|
-
SpaceCasePipe,
|
|
3887
|
-
PhoneNumberPipe,
|
|
3888
|
-
FunctionPipe,
|
|
3889
|
-
StopPropagationDirective,
|
|
3890
|
-
StylerDirective,
|
|
3891
|
-
PreventEnterDirective,
|
|
3892
|
-
AutoFocusDirective,
|
|
3893
|
-
ClickSubjectDirective,
|
|
3894
|
-
ClickEmitterDirective,
|
|
3895
|
-
DialogDirective,
|
|
3896
|
-
MatSlideToggleGroupDirective] });
|
|
3897
|
-
UtilitiesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: UtilitiesModule, providers: [
|
|
3898
|
-
DialogService
|
|
3899
|
-
], imports: [[]] });
|
|
3900
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: UtilitiesModule, decorators: [{
|
|
3901
|
-
type: NgModule,
|
|
3902
|
-
args: [{
|
|
3903
|
-
imports: [],
|
|
3904
|
-
exports: [
|
|
3905
|
-
StopPropagationDirective,
|
|
3906
|
-
PreventEnterDirective,
|
|
3907
|
-
SpaceCasePipe,
|
|
3908
|
-
PhoneNumberPipe,
|
|
3909
|
-
FunctionPipe,
|
|
3910
|
-
StopPropagationDirective,
|
|
3911
|
-
StylerDirective,
|
|
3912
|
-
PreventEnterDirective,
|
|
3913
|
-
AutoFocusDirective,
|
|
3914
|
-
ClickSubjectDirective,
|
|
3915
|
-
ClickEmitterDirective,
|
|
3916
|
-
DialogDirective,
|
|
3917
|
-
MatSlideToggleGroupDirective,
|
|
3918
|
-
],
|
|
3919
|
-
declarations: [
|
|
3920
|
-
SpaceCasePipe,
|
|
3921
|
-
PhoneNumberPipe,
|
|
3922
|
-
FunctionPipe,
|
|
3923
|
-
StopPropagationDirective,
|
|
3924
|
-
StylerDirective,
|
|
3925
|
-
PreventEnterDirective,
|
|
3926
|
-
AutoFocusDirective,
|
|
3927
|
-
ClickSubjectDirective,
|
|
3928
|
-
ClickEmitterDirective,
|
|
3929
|
-
DialogDirective,
|
|
3930
|
-
MatSlideToggleGroupDirective,
|
|
3931
|
-
],
|
|
3932
|
-
providers: [
|
|
3933
|
-
DialogService
|
|
3934
|
-
]
|
|
3935
|
-
}]
|
|
3936
|
-
}] });
|
|
4276
|
+
}], ctorParameters: function () { return [{ type: i1$3.Actions }, { type: i3$4.Store }]; } });
|
|
3937
4277
|
|
|
3938
4278
|
class TableBuilderModule {
|
|
3939
4279
|
static forRoot(config) {
|
|
@@ -3946,8 +4286,8 @@ class TableBuilderModule {
|
|
|
3946
4286
|
};
|
|
3947
4287
|
}
|
|
3948
4288
|
}
|
|
3949
|
-
TableBuilderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3950
|
-
TableBuilderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
4289
|
+
TableBuilderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TableBuilderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4290
|
+
TableBuilderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: TableBuilderModule, declarations: [ColumnTotalPipe,
|
|
3951
4291
|
TableContainerComponent,
|
|
3952
4292
|
GenericTableComponent,
|
|
3953
4293
|
PaginatorComponent,
|
|
@@ -3960,6 +4300,7 @@ TableBuilderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", vers
|
|
|
3960
4300
|
NumberFilterComponent,
|
|
3961
4301
|
ColumnBuilderComponent,
|
|
3962
4302
|
ArrayColumnComponent,
|
|
4303
|
+
LinkColumnComponent,
|
|
3963
4304
|
HeaderMenuComponent,
|
|
3964
4305
|
KeyDisplayPipe,
|
|
3965
4306
|
FormatFilterValuePipe,
|
|
@@ -3977,10 +4318,11 @@ TableBuilderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", vers
|
|
|
3977
4318
|
MatButtonToggleFilterDirective,
|
|
3978
4319
|
TableFilterDirective,
|
|
3979
4320
|
TableFilterStringContainsDirective,
|
|
3980
|
-
TableWrapperDirective
|
|
3981
|
-
|
|
4321
|
+
TableWrapperDirective,
|
|
4322
|
+
GroupByListComponent], imports: [CommonModule,
|
|
4323
|
+
MaterialModule, i3$4.StoreFeatureModule, i1$3.EffectsFeatureModule, FormsModule,
|
|
3982
4324
|
RouterModule,
|
|
3983
|
-
|
|
4325
|
+
LetModule,
|
|
3984
4326
|
DragDropModule,
|
|
3985
4327
|
UtilitiesModule], exports: [GenericTableComponent,
|
|
3986
4328
|
PaginatorComponent,
|
|
@@ -3998,25 +4340,23 @@ TableBuilderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", vers
|
|
|
3998
4340
|
MatButtonToggleFilterDirective,
|
|
3999
4341
|
TableFilterDirective,
|
|
4000
4342
|
TableFilterStringContainsDirective,
|
|
4001
|
-
TableWrapperDirective
|
|
4002
|
-
|
|
4343
|
+
TableWrapperDirective,
|
|
4344
|
+
GroupByListComponent] });
|
|
4345
|
+
TableBuilderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TableBuilderModule, providers: [
|
|
4003
4346
|
SpaceCasePipe,
|
|
4004
4347
|
DatePipe,
|
|
4005
4348
|
CurrencyPipe,
|
|
4006
|
-
PhoneNumberPipe
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
UtilitiesModule,
|
|
4018
|
-
]] });
|
|
4019
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: TableBuilderModule, decorators: [{
|
|
4349
|
+
PhoneNumberPipe
|
|
4350
|
+
], imports: [CommonModule,
|
|
4351
|
+
MaterialModule,
|
|
4352
|
+
StoreModule.forFeature('globalStorageState', storageStateReducer),
|
|
4353
|
+
EffectsModule.forFeature([SaveTableEffects]),
|
|
4354
|
+
FormsModule,
|
|
4355
|
+
RouterModule,
|
|
4356
|
+
LetModule,
|
|
4357
|
+
DragDropModule,
|
|
4358
|
+
UtilitiesModule] });
|
|
4359
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TableBuilderModule, decorators: [{
|
|
4020
4360
|
type: NgModule,
|
|
4021
4361
|
args: [{
|
|
4022
4362
|
imports: [
|
|
@@ -4026,7 +4366,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
4026
4366
|
EffectsModule.forFeature([SaveTableEffects]),
|
|
4027
4367
|
FormsModule,
|
|
4028
4368
|
RouterModule,
|
|
4029
|
-
|
|
4369
|
+
LetModule,
|
|
4030
4370
|
DragDropModule,
|
|
4031
4371
|
UtilitiesModule,
|
|
4032
4372
|
],
|
|
@@ -4048,6 +4388,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
4048
4388
|
TableFilterDirective,
|
|
4049
4389
|
TableFilterStringContainsDirective,
|
|
4050
4390
|
TableWrapperDirective,
|
|
4391
|
+
GroupByListComponent,
|
|
4051
4392
|
],
|
|
4052
4393
|
declarations: [
|
|
4053
4394
|
ColumnTotalPipe,
|
|
@@ -4063,6 +4404,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
4063
4404
|
NumberFilterComponent,
|
|
4064
4405
|
ColumnBuilderComponent,
|
|
4065
4406
|
ArrayColumnComponent,
|
|
4407
|
+
LinkColumnComponent,
|
|
4066
4408
|
HeaderMenuComponent,
|
|
4067
4409
|
KeyDisplayPipe,
|
|
4068
4410
|
FormatFilterValuePipe,
|
|
@@ -4081,13 +4423,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
4081
4423
|
TableFilterDirective,
|
|
4082
4424
|
TableFilterStringContainsDirective,
|
|
4083
4425
|
TableWrapperDirective,
|
|
4426
|
+
GroupByListComponent,
|
|
4084
4427
|
],
|
|
4085
4428
|
providers: [
|
|
4086
4429
|
SpaceCasePipe,
|
|
4087
4430
|
DatePipe,
|
|
4088
4431
|
CurrencyPipe,
|
|
4089
|
-
PhoneNumberPipe
|
|
4090
|
-
TableTemplateService,
|
|
4432
|
+
PhoneNumberPipe
|
|
4091
4433
|
]
|
|
4092
4434
|
}]
|
|
4093
4435
|
}] });
|
|
@@ -4132,9 +4474,12 @@ class TableBuilder {
|
|
|
4132
4474
|
}
|
|
4133
4475
|
cleanRecord(record, metadata) {
|
|
4134
4476
|
const cleaned = metadata.reduce((prev, curr) => {
|
|
4135
|
-
|
|
4477
|
+
const val = this.cleanVal(get(record, curr.key), curr);
|
|
4478
|
+
if (val !== undefined) {
|
|
4479
|
+
set(prev, curr.key, val);
|
|
4480
|
+
}
|
|
4136
4481
|
return prev;
|
|
4137
|
-
}, {});
|
|
4482
|
+
}, { ...record });
|
|
4138
4483
|
return { ...record, ...cleaned };
|
|
4139
4484
|
}
|
|
4140
4485
|
}
|
|
@@ -4167,7 +4512,7 @@ const { selectIds, selectEntities, selectAll, selectTotal } = statusAdapter.getS
|
|
|
4167
4512
|
const selectEntity = (id) => createSelector(selectEntities, (entities) => entities[id]);
|
|
4168
4513
|
// Reducers
|
|
4169
4514
|
function actionStatusReducer(state = initialState, action) {
|
|
4170
|
-
const actionStatus =
|
|
4515
|
+
const actionStatus = get(action, 'payload.actionStatus');
|
|
4171
4516
|
if (actionStatus) {
|
|
4172
4517
|
if (state.ids.find(id => id === actionStatus.id)) {
|
|
4173
4518
|
const modifiedObj = { ...state.entities[actionStatus.id] };
|
|
@@ -4184,13 +4529,11 @@ function actionStatusReducer(state = initialState, action) {
|
|
|
4184
4529
|
|
|
4185
4530
|
class NgrxExtModule {
|
|
4186
4531
|
}
|
|
4187
|
-
NgrxExtModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4188
|
-
NgrxExtModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
4189
|
-
NgrxExtModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
]] });
|
|
4193
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: NgrxExtModule, decorators: [{
|
|
4532
|
+
NgrxExtModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: NgrxExtModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4533
|
+
NgrxExtModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: NgrxExtModule, imports: [CommonModule, i3$4.StoreFeatureModule] });
|
|
4534
|
+
NgrxExtModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: NgrxExtModule, imports: [CommonModule,
|
|
4535
|
+
StoreModule.forFeature('ActionStatus', actionStatusReducer)] });
|
|
4536
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: NgrxExtModule, decorators: [{
|
|
4194
4537
|
type: NgModule,
|
|
4195
4538
|
args: [{
|
|
4196
4539
|
declarations: [],
|
|
@@ -4209,25 +4552,23 @@ class ActionStateSpinnerComponent {
|
|
|
4209
4552
|
this.serverActionStatus$ = this.status$.pipe(delayOn(a => a.status === serverStatusTypes.inProgress, 500));
|
|
4210
4553
|
}
|
|
4211
4554
|
}
|
|
4212
|
-
ActionStateSpinnerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4213
|
-
ActionStateSpinnerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
4214
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4555
|
+
ActionStateSpinnerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ActionStateSpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4556
|
+
ActionStateSpinnerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ActionStateSpinnerComponent, selector: "lib-action-state-spinner", inputs: { status$: "status$" }, ngImport: i0, template: "<div id=\"blocker\" *ngIf=\"(serverActionStatus$ | async)?.status === serverStatusTypes.inProgress\">\n <mat-spinner class=\"spinner\" [diameter]=\"200\"></mat-spinner>\n</div>\n", styles: ["#blocker{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#0e0d0d69;z-index:999999}.spinner{position:absolute;top:50%;left:40%;transform:translate(-50%,-50%)}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] });
|
|
4557
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ActionStateSpinnerComponent, decorators: [{
|
|
4215
4558
|
type: Component,
|
|
4216
|
-
args: [{ selector: 'lib-action-state-spinner', template: "<div id=\"blocker\" *ngIf=\"(serverActionStatus$ | async)?.status === serverStatusTypes.inProgress\">\n <mat-spinner class=\"spinner\" [diameter]=\"200\"></mat-spinner>\n</div>\n", styles: ["#blocker{position:fixed;top:
|
|
4559
|
+
args: [{ selector: 'lib-action-state-spinner', template: "<div id=\"blocker\" *ngIf=\"(serverActionStatus$ | async)?.status === serverStatusTypes.inProgress\">\n <mat-spinner class=\"spinner\" [diameter]=\"200\"></mat-spinner>\n</div>\n", styles: ["#blocker{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#0e0d0d69;z-index:999999}.spinner{position:absolute;top:50%;left:40%;transform:translate(-50%,-50%)}\n"] }]
|
|
4217
4560
|
}], propDecorators: { status$: [{
|
|
4218
4561
|
type: Input
|
|
4219
4562
|
}] } });
|
|
4220
4563
|
|
|
4221
4564
|
class ActionStateUiModule {
|
|
4222
4565
|
}
|
|
4223
|
-
ActionStateUiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4224
|
-
ActionStateUiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
4566
|
+
ActionStateUiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ActionStateUiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4567
|
+
ActionStateUiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: ActionStateUiModule, declarations: [ActionStateSpinnerComponent], imports: [CommonModule,
|
|
4225
4568
|
MatProgressSpinnerModule], exports: [ActionStateSpinnerComponent] });
|
|
4226
|
-
ActionStateUiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
]] });
|
|
4230
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: ActionStateUiModule, decorators: [{
|
|
4569
|
+
ActionStateUiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ActionStateUiModule, imports: [CommonModule,
|
|
4570
|
+
MatProgressSpinnerModule] });
|
|
4571
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ActionStateUiModule, decorators: [{
|
|
4231
4572
|
type: NgModule,
|
|
4232
4573
|
args: [{
|
|
4233
4574
|
declarations: [
|
|
@@ -4247,6 +4588,80 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
4247
4588
|
* Public API Surface of action-state
|
|
4248
4589
|
*/
|
|
4249
4590
|
|
|
4591
|
+
class AppStoreCache {
|
|
4592
|
+
constructor() {
|
|
4593
|
+
this.cache = [];
|
|
4594
|
+
this.isInCache = (props, actionableSelectorId) => {
|
|
4595
|
+
if (typeof props != 'object')
|
|
4596
|
+
props = { props };
|
|
4597
|
+
const valueToCache = { ...props, actionableSelectorId$: actionableSelectorId };
|
|
4598
|
+
if (this.cache.some(item => shallowEquals(item, valueToCache))) {
|
|
4599
|
+
return true;
|
|
4600
|
+
}
|
|
4601
|
+
this.cache.push(valueToCache);
|
|
4602
|
+
return false;
|
|
4603
|
+
};
|
|
4604
|
+
}
|
|
4605
|
+
}
|
|
4606
|
+
let _store;
|
|
4607
|
+
let _cache = new AppStoreCache();
|
|
4608
|
+
const setStore = (store) => {
|
|
4609
|
+
if (store instanceof Store)
|
|
4610
|
+
_store = store;
|
|
4611
|
+
};
|
|
4612
|
+
function setUpStoreFactory(store) {
|
|
4613
|
+
return () => new Promise((resolve, reject) => {
|
|
4614
|
+
setStore(store);
|
|
4615
|
+
resolve(null);
|
|
4616
|
+
});
|
|
4617
|
+
}
|
|
4618
|
+
/**
|
|
4619
|
+
* Creates a selector that can dispatch an action if conditions are met.
|
|
4620
|
+
* Note: The props of the selector factory must include the props of the action.
|
|
4621
|
+
* @param selectorFactory A method that returns selector.
|
|
4622
|
+
* @param action The action that will be dispatched when conditions are met.
|
|
4623
|
+
* @param [dispatchIf = defaultFilter] Optional. A method that takes the result of the selector and returns a boolean. The actions gets dispatched
|
|
4624
|
+
* if true is returned. If no method is passed in than the action will be dispatched if the selector returns undefined or null.
|
|
4625
|
+
*/
|
|
4626
|
+
const createActionableSelector = (selectorFactory, action, dispatchIf = defaultFilter) => {
|
|
4627
|
+
const id = v4();
|
|
4628
|
+
const slctr = (props) => createSelector(selectorFactory(props), (selected) => {
|
|
4629
|
+
if (dispatchIf(selected) && !_cache.isInCache(props, id)) {
|
|
4630
|
+
//Adding the null check for testing purposes. Otherwise it should never be null.
|
|
4631
|
+
_store.dispatch(action(props));
|
|
4632
|
+
}
|
|
4633
|
+
return selected;
|
|
4634
|
+
});
|
|
4635
|
+
return slctr;
|
|
4636
|
+
};
|
|
4637
|
+
function defaultFilter(data) {
|
|
4638
|
+
return data == null || data == undefined;
|
|
4639
|
+
}
|
|
4640
|
+
/**
|
|
4641
|
+
* Returns a shallow clone without prop. Will not error if prop does not exist.
|
|
4642
|
+
* @param prop name of property to be removed.
|
|
4643
|
+
* @returns a shallow clone without prop
|
|
4644
|
+
*/
|
|
4645
|
+
const deleteProp = (t, prop) => {
|
|
4646
|
+
const copy = { ...t };
|
|
4647
|
+
delete copy[prop];
|
|
4648
|
+
return copy;
|
|
4649
|
+
};
|
|
4650
|
+
const shallowEquals = (first, second) => {
|
|
4651
|
+
const firstKeys = Object.keys(first);
|
|
4652
|
+
const secondKeys = Object.keys(second);
|
|
4653
|
+
if (firstKeys.length !== secondKeys.length) {
|
|
4654
|
+
return false;
|
|
4655
|
+
}
|
|
4656
|
+
for (let index = 0; index < firstKeys.length; index++) {
|
|
4657
|
+
const currentKey = firstKeys[index];
|
|
4658
|
+
if (first[currentKey] !== second[currentKey]) {
|
|
4659
|
+
return false;
|
|
4660
|
+
}
|
|
4661
|
+
}
|
|
4662
|
+
return true;
|
|
4663
|
+
};
|
|
4664
|
+
|
|
4250
4665
|
/*
|
|
4251
4666
|
* Public API Surface of http-request-state
|
|
4252
4667
|
*/
|
|
@@ -4255,5 +4670,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
4255
4670
|
* Generated bundle index. Do not edit.
|
|
4256
4671
|
*/
|
|
4257
4672
|
|
|
4258
|
-
export { ActionStateSpinnerComponent, ActionStateUiModule, ActionStatus, AppStatusState, ArrayStyle, AutoFocusDirective, ClickEmitterDirective, ClickSubjectDirective, CreateTableBuilder, CustomCellDirective, DateFilterComponent, DialogDirective, DialogService, DialogWrapper, FieldType, FilterChipsComponent, FilterComponent, FilterType, FunctionPipe, GenColDisplayerComponent, GenFilterDisplayerComponent, GeneralTableSettings, GenericTableComponent, HttpErrorStateDirective, HttpInProgressStateDirective, HttpNotStartedStateDirective, HttpRequestModule, HttpRequestStateDirective, HttpRequestStateFactory, HttpRequestStateStore, HttpRequestStatus, HttpRequestStrategy, HttpSuccessStateDirective, MatButtonToggleFilterDirective, MatCheckboxTbFilterDirective, MatOptionTbFilterDirective, MatRadioButtonTbFilterDirective, MatSlideToggleGroupDirective, MatSlideToggleTbFilterDirective, MatTableObservableDataSource, MultiSortDirective, NgrxExtModule, NotPersisitedTableSettings, PaginatorComponent, PesrsistedTableSettings, PhoneNumberPipe, PreventEnterDirective, ResizeColumnDirective, SortDirection, SpaceCasePipe, StopPropagationDirective, StylerDirective, TableBuilder, TableBuilderModule, TableColumnHeaderSettings, TableContainerComponent, TableCustomFilterDirective, TableCustomFilterDirectiveBase, TableFilterDirective, TableFilterStringContainsDirective, TableWrapperDirective, TableWrapperFooterSettings, TableWrapperHeaderSettings, Target, TbSelectedFilterDirective, UtilitiesModule, actionStatusReducer, chainRequest, combineArrays, createFailure, createSuccess, defaultShareReplay, delayOn, filterArray, getRequestorBody, getRequestorStatus, getStatusState, httpRequest, httpRequestor, inProgress, initialState, isErrorState, isSuccessState, mapArray, mapError, notNull, notStarted, onWait, onceWhen, previousAndCurrent, selectAll, selectEntities, selectEntity, selectIds, selectTotal, serverStatusTypes, skipOneWhen, spaceCase, statusAdapter, statusIsSuccessOrInProgress, switchOff, tapError, tapSuccess };
|
|
4673
|
+
export { ActionStateSpinnerComponent, ActionStateUiModule, ActionStatus, AppStatusState, ArrayStyle, AutoFocusDirective, CancellationToken, ClickEmitterDirective, ClickSubjectDirective, ConditionalClassesDirective, CreateTableBuilder, CustomCellDirective, DateFilterComponent, DialogDirective, DialogService, DialogWrapper, FieldType, FilterChipsComponent, FilterComponent, FilterType, FunctionPipe, GenColDisplayerComponent, GenFilterDisplayerComponent, GeneralTableSettings, GenericTableComponent, GroupByListComponent, HttpErrorStateDirective, HttpInProgressStateDirective, HttpNotStartedStateDirective, HttpRequestModule, HttpRequestStateDirective, HttpRequestStateFactory, HttpRequestStateStore, HttpRequestStatus, HttpRequestStrategy, HttpSuccessStateDirective, MatButtonToggleFilterDirective, MatCheckboxTbFilterDirective, MatOptionTbFilterDirective, MatRadioButtonTbFilterDirective, MatSlideToggleGroupDirective, MatSlideToggleTbFilterDirective, MatTableObservableDataSource, MultiSortDirective, NgrxExtModule, NotPersisitedTableSettings, PaginatorComponent, PesrsistedTableSettings, PhoneNumberPipe, PreventEnterDirective, ResizeColumnDirective, SortDirection, SpaceCasePipe, StopPropagationDirective, StylerDirective, Subjectifier, TableBuilder, TableBuilderModule, TableColumnHeaderSettings, TableContainerComponent, TableCustomFilterDirective, TableCustomFilterDirectiveBase, TableFilterDirective, TableFilterStringContainsDirective, TableWrapperDirective, TableWrapperFooterSettings, TableWrapperHeaderSettings, Target, TbSelectedFilterDirective, TrimWhitespaceDirective, UtilitiesModule, actionStatusReducer, chainRequest, combineArrays, createActionableSelector, createFailure, createSuccess, defaultFilter, defaultShareReplay, delayOn, filterArray, getRequestorBody, getRequestorStatus, getStatusState, httpRequest, httpRequestor, inProgress, initialState, isErrorState, isSuccessOrErrorState, isSuccessState, mapArray, mapError, notNull, notStarted, onWait, onceWhen, previousAndCurrent, selectAll, selectEntities, selectEntity, selectIds, selectTotal, serverStatusTypes, setUpStoreFactory, skipOneWhen, spaceCase, statusAdapter, statusIsSuccessOrInProgress, switchOff, tapError, tapSuccess };
|
|
4259
4674
|
//# sourceMappingURL=one-paragon-angular-utilities.mjs.map
|