@one-paragon/angular-utilities 0.1.1 → 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 -36
- 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 -1061
- package/fesm2015/one-paragon-angular-utilities.mjs.map +1 -1
- package/fesm2020/one-paragon-angular-utilities.mjs +1481 -1059
- 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 +14 -2
- 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,80 +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?.interpolatedRoute;
|
|
1363
|
-
let link = hasRoute ? this.parseInterpolatedRoute((metaData.additional?.link?.interpolatedRoute), 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) => route.replace(/{([^}]+)}/g, (_, key) => element[key]);
|
|
1370
|
-
}
|
|
1371
1965
|
}
|
|
1372
|
-
InitializationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1373
|
-
InitializationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1374
|
-
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: [{
|
|
1375
1969
|
type: Component,
|
|
1376
|
-
args: [{ template: "<ng-template #
|
|
1377
|
-
}], propDecorators: {
|
|
1378
|
-
type: ViewChild,
|
|
1379
|
-
args: ['boolean', { static: true }]
|
|
1380
|
-
}], 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: [{
|
|
1381
1972
|
type: ViewChild,
|
|
1382
1973
|
args: ['link', { static: true }]
|
|
1383
1974
|
}], imageUrlTemplate: [{
|
|
@@ -1389,15 +1980,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
1389
1980
|
}], arrayTemplate: [{
|
|
1390
1981
|
type: ViewChild,
|
|
1391
1982
|
args: ['array', { static: true }]
|
|
1392
|
-
}], expressionTemplate: [{
|
|
1393
|
-
type: ViewChild,
|
|
1394
|
-
args: ['expression', { static: true }]
|
|
1395
1983
|
}], defaultTemplate: [{
|
|
1396
1984
|
type: ViewChild,
|
|
1397
1985
|
args: ['default', { static: true }]
|
|
1398
|
-
}],
|
|
1986
|
+
}], defaultWithIcon: [{
|
|
1399
1987
|
type: ViewChild,
|
|
1400
|
-
args: ['
|
|
1988
|
+
args: ['defaultWithIcon', { static: true }]
|
|
1401
1989
|
}] } });
|
|
1402
1990
|
|
|
1403
1991
|
class TableTemplateService {
|
|
@@ -1410,52 +1998,35 @@ class TableTemplateService {
|
|
|
1410
1998
|
initTemplates() {
|
|
1411
1999
|
this.templates = {};
|
|
1412
2000
|
this.templates[FieldType.Array] = this.instance.arrayTemplate;
|
|
1413
|
-
this.templates[FieldType.Boolean] = this.instance.
|
|
1414
|
-
this.templates[FieldType.Currency] = this.instance.
|
|
2001
|
+
this.templates[FieldType.Boolean] = this.instance.defaultWithIcon;
|
|
2002
|
+
this.templates[FieldType.Currency] = this.instance.defaultTemplate;
|
|
1415
2003
|
this.templates[FieldType.Date] = this.instance.defaultTemplate;
|
|
1416
|
-
this.templates[FieldType.Expression] = this.instance.
|
|
2004
|
+
this.templates[FieldType.Expression] = this.instance.defaultTemplate;
|
|
1417
2005
|
this.templates[FieldType.ImageUrl] = this.instance.imageUrlTemplate;
|
|
1418
2006
|
this.templates[FieldType.Link] = this.instance.linkTemplate;
|
|
1419
2007
|
this.templates[FieldType.Number] = this.instance.defaultTemplate;
|
|
1420
2008
|
this.templates[FieldType.PhoneNumber] = this.instance.defaultTemplate;
|
|
1421
2009
|
this.templates[FieldType.String] = this.instance.defaultTemplate;
|
|
1422
2010
|
this.templates[FieldType.Unknown] = this.instance.defaultTemplate;
|
|
1423
|
-
this.templates[FieldType.Enum] = this.instance.
|
|
2011
|
+
this.templates[FieldType.Enum] = this.instance.defaultTemplate;
|
|
1424
2012
|
}
|
|
1425
|
-
getTemplate(
|
|
1426
|
-
|
|
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;
|
|
1427
2021
|
}
|
|
1428
2022
|
}
|
|
1429
|
-
TableTemplateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1430
|
-
TableTemplateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1431
|
-
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: [{
|
|
1432
2026
|
type: Injectable,
|
|
1433
2027
|
args: [{ providedIn: 'root' }]
|
|
1434
2028
|
}], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i0.Injector }]; } });
|
|
1435
2029
|
|
|
1436
|
-
class StopPropagationDirective {
|
|
1437
|
-
onClick(event) {
|
|
1438
|
-
event.stopPropagation();
|
|
1439
|
-
}
|
|
1440
|
-
onMousedown(event) {
|
|
1441
|
-
event.stopPropagation();
|
|
1442
|
-
}
|
|
1443
|
-
}
|
|
1444
|
-
StopPropagationDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: StopPropagationDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1445
|
-
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 });
|
|
1446
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: StopPropagationDirective, decorators: [{
|
|
1447
|
-
type: Directive,
|
|
1448
|
-
args: [{
|
|
1449
|
-
selector: "[stop-propagation]"
|
|
1450
|
-
}]
|
|
1451
|
-
}], propDecorators: { onClick: [{
|
|
1452
|
-
type: HostListener,
|
|
1453
|
-
args: ["click", ["$event"]]
|
|
1454
|
-
}], onMousedown: [{
|
|
1455
|
-
type: HostListener,
|
|
1456
|
-
args: ["mousedown", ["$event"]]
|
|
1457
|
-
}] } });
|
|
1458
|
-
|
|
1459
2030
|
class InListFilterComponent {
|
|
1460
2031
|
constructor(ref, tableState) {
|
|
1461
2032
|
this.ref = ref;
|
|
@@ -1503,8 +2074,8 @@ class InListFilterComponent {
|
|
|
1503
2074
|
this.onChange(this.value);
|
|
1504
2075
|
}
|
|
1505
2076
|
}
|
|
1506
|
-
InListFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1507
|
-
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: [{
|
|
1508
2079
|
provide: NG_VALUE_ACCESSOR,
|
|
1509
2080
|
useExisting: InListFilterComponent,
|
|
1510
2081
|
multi: true
|
|
@@ -1514,8 +2085,8 @@ InListFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
1514
2085
|
{{metaData.fieldType === FieldType.Enum ? (item.value | spaceCase) : item.value}}
|
|
1515
2086
|
</mat-checkbox>
|
|
1516
2087
|
</div>
|
|
1517
|
-
`, isInline: true,
|
|
1518
|
-
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: [{
|
|
1519
2090
|
type: Component,
|
|
1520
2091
|
args: [{
|
|
1521
2092
|
selector: 'tb-in-list-filter , [tb-in-list-filter]',
|
|
@@ -1595,11 +2166,11 @@ class HeaderMenuComponent {
|
|
|
1595
2166
|
}
|
|
1596
2167
|
}
|
|
1597
2168
|
}
|
|
1598
|
-
HeaderMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1599
|
-
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 });
|
|
1600
|
-
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: [{
|
|
1601
2172
|
type: Component,
|
|
1602
|
-
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"] }]
|
|
1603
2174
|
}], ctorParameters: function () { return [{ type: TableStore }]; }, propDecorators: { filter: [{
|
|
1604
2175
|
type: Input
|
|
1605
2176
|
}], metaData: [{
|
|
@@ -1609,29 +2180,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
1609
2180
|
args: [MatMenuTrigger]
|
|
1610
2181
|
}] } });
|
|
1611
2182
|
|
|
1612
|
-
class
|
|
1613
|
-
constructor(
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
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));
|
|
1622
2194
|
}
|
|
1623
|
-
;
|
|
1624
2195
|
}
|
|
1625
|
-
StylerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: StylerDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1626
|
-
StylerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.5", type: StylerDirective, selector: "[styler]", inputs: { styler: "styler" }, ngImport: i0 });
|
|
1627
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: StylerDirective, decorators: [{
|
|
1628
|
-
type: Directive,
|
|
1629
|
-
args: [{
|
|
1630
|
-
selector: '[styler]',
|
|
1631
|
-
}]
|
|
1632
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { styler: [{
|
|
1633
|
-
type: Input
|
|
1634
|
-
}] } });
|
|
1635
2196
|
|
|
1636
2197
|
class ResizeColumnDirective {
|
|
1637
2198
|
constructor(renderer, el, store) {
|
|
@@ -1699,9 +2260,9 @@ class ResizeColumnDirective {
|
|
|
1699
2260
|
return ({ newTableWidth, newColumnWidth });
|
|
1700
2261
|
}
|
|
1701
2262
|
}
|
|
1702
|
-
ResizeColumnDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1703
|
-
ResizeColumnDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
1704
|
-
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: [{
|
|
1705
2266
|
type: Directive,
|
|
1706
2267
|
args: [{
|
|
1707
2268
|
selector: "[resizeColumn]",
|
|
@@ -1723,19 +2284,20 @@ class ColumnTotalPipe {
|
|
|
1723
2284
|
return null;
|
|
1724
2285
|
}
|
|
1725
2286
|
}
|
|
1726
|
-
ColumnTotalPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1727
|
-
ColumnTotalPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "
|
|
1728
|
-
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: [{
|
|
1729
2290
|
type: Pipe,
|
|
1730
2291
|
args: [{ name: 'columnTotal' }]
|
|
1731
2292
|
}] });
|
|
1732
2293
|
|
|
1733
2294
|
class ColumnBuilderComponent {
|
|
1734
|
-
constructor(transformCreator, table, state, templateService) {
|
|
2295
|
+
constructor(transformCreator, table, state, templateService, injector) {
|
|
1735
2296
|
this.transformCreator = transformCreator;
|
|
1736
2297
|
this.table = table;
|
|
1737
2298
|
this.state = state;
|
|
1738
2299
|
this.templateService = templateService;
|
|
2300
|
+
this.injector = injector;
|
|
1739
2301
|
this.FieldType = FieldType;
|
|
1740
2302
|
this.mapWidth = ([previousUserDefinedWidth, currentUserDefinedWidth]) => {
|
|
1741
2303
|
if (currentUserDefinedWidth) {
|
|
@@ -1755,12 +2317,21 @@ class ColumnBuilderComponent {
|
|
|
1755
2317
|
return this.metaData.template;
|
|
1756
2318
|
if (this.customCell?.TemplateRef)
|
|
1757
2319
|
return this.customCell.TemplateRef;
|
|
1758
|
-
return this.templateService.getTemplate(this.metaData
|
|
2320
|
+
return this.templateService.getTemplate(this.metaData);
|
|
1759
2321
|
}
|
|
1760
2322
|
getOuterTemplate() {
|
|
1761
2323
|
return this.customCell?.columnDef?.cell?.template ?? this.bodyTemplate;
|
|
1762
2324
|
}
|
|
1763
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
|
+
}
|
|
1764
2335
|
this.filter = { key: this.metaData.key, fieldType: this.metaData.fieldType };
|
|
1765
2336
|
const width$ = this.state.getUserDefinedWidth$(this.metaData.key).pipe(previousAndCurrent(0), map(this.mapWidth));
|
|
1766
2337
|
const fullMetaStyles = this.metaData.additional?.styles ?? {};
|
|
@@ -1786,16 +2357,16 @@ class ColumnBuilderComponent {
|
|
|
1786
2357
|
}
|
|
1787
2358
|
}
|
|
1788
2359
|
}
|
|
1789
|
-
ColumnBuilderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1790
|
-
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: [
|
|
1791
2362
|
{ provide: CDK_DROP_LIST, useExisting: CdkDropList },
|
|
1792
2363
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1793
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2364
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ColumnBuilderComponent, decorators: [{
|
|
1794
2365
|
type: Component,
|
|
1795
2366
|
args: [{ selector: 'tb-column-builder', changeDetection: ChangeDetectionStrategy.OnPush, viewProviders: [
|
|
1796
2367
|
{ provide: CDK_DROP_LIST, useExisting: CdkDropList },
|
|
1797
|
-
], template: "<ng-container [matColumnDef]=\"metaData.key\" *ngrxLet=\"styles$ as styles\">\n\n <ng-template #body let-element='element' >\n
|
|
1798
|
-
}], 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: [{
|
|
1799
2370
|
type: Input
|
|
1800
2371
|
}], customCell: [{
|
|
1801
2372
|
type: Input
|
|
@@ -1868,16 +2439,16 @@ class PaginatorComponent {
|
|
|
1868
2439
|
}
|
|
1869
2440
|
}
|
|
1870
2441
|
}
|
|
1871
|
-
PaginatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1872
|
-
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: `
|
|
1873
2444
|
<div [ngClass]="{'hide' : !(collapseFooter$ | async), 'page-amounts':true}" *ngIf="currentPageData$ | async as pageData">
|
|
1874
2445
|
{{pageData.currentStart}} - {{pageData.currentEnd}} of {{pageData.total}}
|
|
1875
2446
|
</div>
|
|
1876
2447
|
<mat-paginator [pageSizeOptions]="[5, 10, 20, 50, 100, 500]" showFirstLastButtons (page)="paginatorChange()"
|
|
1877
2448
|
[ngClass]="{'hide' : (collapseFooter$ | async)}">
|
|
1878
2449
|
</mat-paginator>
|
|
1879
|
-
`, isInline: true, styles: [".mat-row:nth-child(odd){background-color:#cdeefe}.sticky{bottom:
|
|
1880
|
-
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: [{
|
|
1881
2452
|
type: Component,
|
|
1882
2453
|
args: [{ selector: 'tb-paginator', template: `
|
|
1883
2454
|
<div [ngClass]="{'hide' : !(collapseFooter$ | async), 'page-amounts':true}" *ngIf="currentPageData$ | async as pageData">
|
|
@@ -1886,7 +2457,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
1886
2457
|
<mat-paginator [pageSizeOptions]="[5, 10, 20, 50, 100, 500]" showFirstLastButtons (page)="paginatorChange()"
|
|
1887
2458
|
[ngClass]="{'hide' : (collapseFooter$ | async)}">
|
|
1888
2459
|
</mat-paginator>
|
|
1889
|
-
`, 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"] }]
|
|
1890
2461
|
}], ctorParameters: function () { return [{ type: TableStore }]; }, propDecorators: { dataSource: [{
|
|
1891
2462
|
type: Input
|
|
1892
2463
|
}], tableElRef: [{
|
|
@@ -2015,6 +2586,12 @@ class GenericTableComponent {
|
|
|
2015
2586
|
isGroupFooter(_, row) {
|
|
2016
2587
|
return row.isGroupFooter;
|
|
2017
2588
|
}
|
|
2589
|
+
updateGroup(group) {
|
|
2590
|
+
this.state.updateGroup({
|
|
2591
|
+
...group,
|
|
2592
|
+
isExpanded: !group.isExpanded
|
|
2593
|
+
});
|
|
2594
|
+
}
|
|
2018
2595
|
addMetaData(column) {
|
|
2019
2596
|
let columnBuilder = this.myColumns[column.metaData.key];
|
|
2020
2597
|
if (columnBuilder) {
|
|
@@ -2043,11 +2620,11 @@ class GenericTableComponent {
|
|
|
2043
2620
|
this.selection.select(...this.dataSource.data);
|
|
2044
2621
|
}
|
|
2045
2622
|
}
|
|
2046
|
-
GenericTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2047
|
-
GenericTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2048
|
-
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: [{
|
|
2049
2626
|
type: Component,
|
|
2050
|
-
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"] }]
|
|
2051
2628
|
}], ctorParameters: function () { return [{ type: i1$1.MatSort }, { type: TableStore }, { type: i0.ViewContainerRef }, { type: i0.Injector }]; }, propDecorators: { data$: [{
|
|
2052
2629
|
type: Input
|
|
2053
2630
|
}], IndexColumn: [{
|
|
@@ -2064,6 +2641,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2064
2641
|
type: Input
|
|
2065
2642
|
}], columnInfos: [{
|
|
2066
2643
|
type: Input
|
|
2644
|
+
}], groupHeaderTemplate: [{
|
|
2645
|
+
type: Input
|
|
2067
2646
|
}], disableSort: [{
|
|
2068
2647
|
type: Input
|
|
2069
2648
|
}], table: [{
|
|
@@ -2075,6 +2654,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2075
2654
|
}], tableElRef: [{
|
|
2076
2655
|
type: ViewChild,
|
|
2077
2656
|
args: ['table', { read: ElementRef }]
|
|
2657
|
+
}], paginatorComponent: [{
|
|
2658
|
+
type: ViewChild,
|
|
2659
|
+
args: [PaginatorComponent]
|
|
2078
2660
|
}], selection$: [{
|
|
2079
2661
|
type: Output
|
|
2080
2662
|
}] } });
|
|
@@ -2109,9 +2691,9 @@ class CustomCellDirective {
|
|
|
2109
2691
|
};
|
|
2110
2692
|
}
|
|
2111
2693
|
}
|
|
2112
|
-
CustomCellDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2113
|
-
CustomCellDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
2114
|
-
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: [{
|
|
2115
2697
|
type: Directive,
|
|
2116
2698
|
args: [{
|
|
2117
2699
|
selector: '[customCell]',
|
|
@@ -2159,11 +2741,11 @@ class GenColDisplayerComponent {
|
|
|
2159
2741
|
this.tableState.setHiddenColumns(displayCols.map(c => ({ key: c.key, visible: c.isVisible })));
|
|
2160
2742
|
}
|
|
2161
2743
|
}
|
|
2162
|
-
GenColDisplayerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2163
|
-
GenColDisplayerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2164
|
-
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: [{
|
|
2165
2747
|
type: Component,
|
|
2166
|
-
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"] }]
|
|
2167
2749
|
}], ctorParameters: function () { return [{ type: TableStore }]; } });
|
|
2168
2750
|
|
|
2169
2751
|
class WrapperFilterStore extends ComponentStore {
|
|
@@ -2181,9 +2763,9 @@ class WrapperFilterStore extends ComponentStore {
|
|
|
2181
2763
|
});
|
|
2182
2764
|
}
|
|
2183
2765
|
}
|
|
2184
|
-
WrapperFilterStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2185
|
-
WrapperFilterStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2186
|
-
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: [{
|
|
2187
2769
|
type: Injectable
|
|
2188
2770
|
}], ctorParameters: function () { return []; } });
|
|
2189
2771
|
|
|
@@ -2197,34 +2779,26 @@ class GenFilterDisplayerComponent {
|
|
|
2197
2779
|
this.filterStore.addFilter({ key: metaData.key, fieldType: metaData.fieldType });
|
|
2198
2780
|
}
|
|
2199
2781
|
}
|
|
2200
|
-
GenFilterDisplayerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2201
|
-
GenFilterDisplayerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2202
|
-
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: [{
|
|
2203
2785
|
type: Component,
|
|
2204
|
-
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"] }]
|
|
2205
2787
|
}], ctorParameters: function () { return [{ type: TableStore }, { type: WrapperFilterStore }]; } });
|
|
2206
2788
|
|
|
2207
|
-
class
|
|
2208
|
-
constructor(
|
|
2209
|
-
this.
|
|
2210
|
-
this.autoFocus = true;
|
|
2211
|
-
}
|
|
2212
|
-
ngAfterViewInit() {
|
|
2213
|
-
if (this.autoFocus) {
|
|
2214
|
-
setTimeout(() => {
|
|
2215
|
-
this.elementRef.nativeElement.focus();
|
|
2216
|
-
});
|
|
2217
|
-
}
|
|
2789
|
+
class DateFilterComponent {
|
|
2790
|
+
constructor() {
|
|
2791
|
+
this.FilterType = FilterType;
|
|
2218
2792
|
}
|
|
2219
2793
|
}
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2223
|
-
type:
|
|
2224
|
-
args: [{
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
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: [{
|
|
2228
2802
|
type: Input
|
|
2229
2803
|
}] } });
|
|
2230
2804
|
|
|
@@ -2249,9 +2823,6 @@ class InFilterComponent {
|
|
|
2249
2823
|
registerOnTouched(fn) {
|
|
2250
2824
|
this.onTouched = fn;
|
|
2251
2825
|
}
|
|
2252
|
-
setDisabledState(isDisabled) {
|
|
2253
|
-
throw new Error('Method not implemented.');
|
|
2254
|
-
}
|
|
2255
2826
|
addInput() {
|
|
2256
2827
|
this.value = [...this.value, undefined];
|
|
2257
2828
|
this.ref.markForCheck();
|
|
@@ -2270,13 +2841,13 @@ class InFilterComponent {
|
|
|
2270
2841
|
this.onChange(this.value);
|
|
2271
2842
|
}
|
|
2272
2843
|
}
|
|
2273
|
-
InFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2274
|
-
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: [{
|
|
2275
2846
|
provide: NG_VALUE_ACCESSOR,
|
|
2276
2847
|
useExisting: InFilterComponent,
|
|
2277
2848
|
multi: true
|
|
2278
|
-
}], 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"],
|
|
2279
|
-
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: [{
|
|
2280
2851
|
type: Component,
|
|
2281
2852
|
args: [{ selector: 'lib-in-filter', changeDetection: ChangeDetectionStrategy.OnPush, providers: [{
|
|
2282
2853
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -2293,9 +2864,9 @@ class NumberFilterComponent {
|
|
|
2293
2864
|
this.FieldType = FieldType;
|
|
2294
2865
|
}
|
|
2295
2866
|
}
|
|
2296
|
-
NumberFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2297
|
-
NumberFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2298
|
-
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: [{
|
|
2299
2870
|
type: Component,
|
|
2300
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"] }]
|
|
2301
2872
|
}], propDecorators: { CurrentFilterType: [{
|
|
@@ -2304,22 +2875,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2304
2875
|
type: Input
|
|
2305
2876
|
}] } });
|
|
2306
2877
|
|
|
2307
|
-
class DateFilterComponent {
|
|
2308
|
-
constructor() {
|
|
2309
|
-
this.FilterType = FilterType;
|
|
2310
|
-
}
|
|
2311
|
-
}
|
|
2312
|
-
DateFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: DateFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2313
|
-
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 });
|
|
2314
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: DateFilterComponent, decorators: [{
|
|
2315
|
-
type: Component,
|
|
2316
|
-
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" }]
|
|
2317
|
-
}], propDecorators: { info: [{
|
|
2318
|
-
type: Input
|
|
2319
|
-
}], CurrentFilterType: [{
|
|
2320
|
-
type: Input
|
|
2321
|
-
}] } });
|
|
2322
|
-
|
|
2323
2878
|
class FilterComponent {
|
|
2324
2879
|
constructor(state) {
|
|
2325
2880
|
this.state = state;
|
|
@@ -2340,11 +2895,11 @@ class FilterComponent {
|
|
|
2340
2895
|
}
|
|
2341
2896
|
}
|
|
2342
2897
|
}
|
|
2343
|
-
FilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2344
|
-
FilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2345
|
-
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: [{
|
|
2346
2901
|
type: Component,
|
|
2347
|
-
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"] }]
|
|
2348
2903
|
}], ctorParameters: function () { return [{ type: TableStore }]; }, propDecorators: { filter: [{
|
|
2349
2904
|
type: Input
|
|
2350
2905
|
}], close: [{
|
|
@@ -2353,8 +2908,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2353
2908
|
|
|
2354
2909
|
class MaterialModule {
|
|
2355
2910
|
}
|
|
2356
|
-
MaterialModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2357
|
-
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,
|
|
2358
2940
|
MatTableModule,
|
|
2359
2941
|
MatSelectModule,
|
|
2360
2942
|
MatDialogModule,
|
|
@@ -2366,9 +2948,7 @@ MaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
|
|
|
2366
2948
|
MatToolbarModule,
|
|
2367
2949
|
MatTooltipModule,
|
|
2368
2950
|
MatNativeDateModule,
|
|
2369
|
-
MatSnackBarModule,
|
|
2370
2951
|
MatProgressSpinnerModule,
|
|
2371
|
-
MatListModule,
|
|
2372
2952
|
MatGridListModule,
|
|
2373
2953
|
MatCardModule,
|
|
2374
2954
|
MatSidenavModule,
|
|
@@ -2383,7 +2963,8 @@ MaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
|
|
|
2383
2963
|
MatAutocompleteModule,
|
|
2384
2964
|
MatPaginatorModule,
|
|
2385
2965
|
MatChipsModule,
|
|
2386
|
-
MatDialogModule]
|
|
2966
|
+
MatDialogModule] });
|
|
2967
|
+
MaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: MaterialModule, imports: [MatSlideToggleModule,
|
|
2387
2968
|
MatTableModule,
|
|
2388
2969
|
MatSelectModule,
|
|
2389
2970
|
MatDialogModule,
|
|
@@ -2395,9 +2976,7 @@ MaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
|
|
|
2395
2976
|
MatToolbarModule,
|
|
2396
2977
|
MatTooltipModule,
|
|
2397
2978
|
MatNativeDateModule,
|
|
2398
|
-
MatSnackBarModule,
|
|
2399
2979
|
MatProgressSpinnerModule,
|
|
2400
|
-
MatListModule,
|
|
2401
2980
|
MatGridListModule,
|
|
2402
2981
|
MatCardModule,
|
|
2403
2982
|
MatSidenavModule,
|
|
@@ -2412,39 +2991,7 @@ MaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
|
|
|
2412
2991
|
MatAutocompleteModule,
|
|
2413
2992
|
MatPaginatorModule,
|
|
2414
2993
|
MatChipsModule,
|
|
2415
|
-
MatDialogModule
|
|
2416
|
-
MaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: MaterialModule, imports: [[
|
|
2417
|
-
MatSlideToggleModule,
|
|
2418
|
-
MatTableModule,
|
|
2419
|
-
MatSelectModule,
|
|
2420
|
-
MatDialogModule,
|
|
2421
|
-
MatDatepickerModule,
|
|
2422
|
-
MatRadioModule,
|
|
2423
|
-
MatButtonModule,
|
|
2424
|
-
MatExpansionModule,
|
|
2425
|
-
MatStepperModule,
|
|
2426
|
-
MatToolbarModule,
|
|
2427
|
-
MatTooltipModule,
|
|
2428
|
-
MatNativeDateModule,
|
|
2429
|
-
MatSnackBarModule,
|
|
2430
|
-
MatProgressSpinnerModule,
|
|
2431
|
-
MatListModule,
|
|
2432
|
-
MatGridListModule,
|
|
2433
|
-
MatCardModule,
|
|
2434
|
-
MatSidenavModule,
|
|
2435
|
-
MatTabsModule,
|
|
2436
|
-
MatInputModule,
|
|
2437
|
-
MatTabsModule,
|
|
2438
|
-
MatCheckboxModule,
|
|
2439
|
-
MatMenuModule,
|
|
2440
|
-
MatIconModule,
|
|
2441
|
-
MatBadgeModule,
|
|
2442
|
-
MatSortModule,
|
|
2443
|
-
MatAutocompleteModule,
|
|
2444
|
-
MatPaginatorModule,
|
|
2445
|
-
MatChipsModule,
|
|
2446
|
-
MatDialogModule,
|
|
2447
|
-
], MatSlideToggleModule,
|
|
2994
|
+
MatDialogModule, MatSlideToggleModule,
|
|
2448
2995
|
MatTableModule,
|
|
2449
2996
|
MatSelectModule,
|
|
2450
2997
|
MatDialogModule,
|
|
@@ -2456,9 +3003,7 @@ MaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
|
|
|
2456
3003
|
MatToolbarModule,
|
|
2457
3004
|
MatTooltipModule,
|
|
2458
3005
|
MatNativeDateModule,
|
|
2459
|
-
MatSnackBarModule,
|
|
2460
3006
|
MatProgressSpinnerModule,
|
|
2461
|
-
MatListModule,
|
|
2462
3007
|
MatGridListModule,
|
|
2463
3008
|
MatCardModule,
|
|
2464
3009
|
MatSidenavModule,
|
|
@@ -2474,7 +3019,7 @@ MaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
|
|
|
2474
3019
|
MatPaginatorModule,
|
|
2475
3020
|
MatChipsModule,
|
|
2476
3021
|
MatDialogModule] });
|
|
2477
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3022
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: MaterialModule, decorators: [{
|
|
2478
3023
|
type: NgModule,
|
|
2479
3024
|
args: [{
|
|
2480
3025
|
imports: [
|
|
@@ -2490,9 +3035,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2490
3035
|
MatToolbarModule,
|
|
2491
3036
|
MatTooltipModule,
|
|
2492
3037
|
MatNativeDateModule,
|
|
2493
|
-
MatSnackBarModule,
|
|
2494
3038
|
MatProgressSpinnerModule,
|
|
2495
|
-
MatListModule,
|
|
2496
3039
|
MatGridListModule,
|
|
2497
3040
|
MatCardModule,
|
|
2498
3041
|
MatSidenavModule,
|
|
@@ -2522,9 +3065,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2522
3065
|
MatToolbarModule,
|
|
2523
3066
|
MatTooltipModule,
|
|
2524
3067
|
MatNativeDateModule,
|
|
2525
|
-
MatSnackBarModule,
|
|
2526
3068
|
MatProgressSpinnerModule,
|
|
2527
|
-
MatListModule,
|
|
2528
3069
|
MatGridListModule,
|
|
2529
3070
|
MatCardModule,
|
|
2530
3071
|
MatSidenavModule,
|
|
@@ -2565,11 +3106,11 @@ class MultiSortDirective extends MatSort {
|
|
|
2565
3106
|
});
|
|
2566
3107
|
}
|
|
2567
3108
|
}
|
|
2568
|
-
MultiSortDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2569
|
-
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: [
|
|
2570
3111
|
{ provide: MatSort, useExisting: MultiSortDirective }
|
|
2571
3112
|
], exportAs: ["multiSort"], usesInheritance: true, ngImport: i0 });
|
|
2572
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3113
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: MultiSortDirective, decorators: [{
|
|
2573
3114
|
type: Directive,
|
|
2574
3115
|
args: [{
|
|
2575
3116
|
selector: '[multiSort]',
|
|
@@ -2591,16 +3132,16 @@ class TableCustomFilterDirective {
|
|
|
2591
3132
|
this.used = false;
|
|
2592
3133
|
}
|
|
2593
3134
|
}
|
|
2594
|
-
TableCustomFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2595
|
-
TableCustomFilterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
2596
|
-
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: [{
|
|
2597
3138
|
type: Directive,
|
|
2598
3139
|
args: [{
|
|
2599
3140
|
selector: ' '
|
|
2600
3141
|
}]
|
|
2601
3142
|
}] });
|
|
2602
3143
|
class TableFilterDirective extends ComponentStore {
|
|
2603
|
-
constructor(model) {
|
|
3144
|
+
constructor(model, wrapper) {
|
|
2604
3145
|
super();
|
|
2605
3146
|
this.model = model;
|
|
2606
3147
|
this.filter$ = this.state$;
|
|
@@ -2610,6 +3151,9 @@ class TableFilterDirective extends ComponentStore {
|
|
|
2610
3151
|
this.savable = false;
|
|
2611
3152
|
this.ready = false;
|
|
2612
3153
|
this._userActive = true;
|
|
3154
|
+
if (wrapper) {
|
|
3155
|
+
wrapper.register(this);
|
|
3156
|
+
}
|
|
2613
3157
|
if (model) {
|
|
2614
3158
|
this.effect(() => {
|
|
2615
3159
|
return model.valueChanges.pipe(tap$1(val => {
|
|
@@ -2662,14 +3206,16 @@ class TableFilterDirective extends ComponentStore {
|
|
|
2662
3206
|
}
|
|
2663
3207
|
}
|
|
2664
3208
|
}
|
|
2665
|
-
TableFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2666
|
-
TableFilterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
2667
|
-
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: [{
|
|
2668
3212
|
type: Directive,
|
|
2669
3213
|
args: [{
|
|
2670
3214
|
selector: "[tbFilter]"
|
|
2671
3215
|
}]
|
|
2672
|
-
}], ctorParameters: function () { return [{ type:
|
|
3216
|
+
}], ctorParameters: function () { return [{ type: i4$3.NgControl, decorators: [{
|
|
3217
|
+
type: Optional
|
|
3218
|
+
}] }, { type: TableWrapperDirective, decorators: [{
|
|
2673
3219
|
type: Optional
|
|
2674
3220
|
}] }]; }, propDecorators: { filterType: [{
|
|
2675
3221
|
type: Input
|
|
@@ -2685,8 +3231,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2685
3231
|
type: Input
|
|
2686
3232
|
}] } });
|
|
2687
3233
|
class TableFilterStringContainsDirective extends TableFilterDirective {
|
|
2688
|
-
constructor(model) {
|
|
2689
|
-
super(model);
|
|
3234
|
+
constructor(model, wrapper) {
|
|
3235
|
+
super(model, wrapper);
|
|
2690
3236
|
this.filterType = FilterType.StringContains;
|
|
2691
3237
|
this.fieldType = FieldType.String;
|
|
2692
3238
|
this.effect(() => {
|
|
@@ -2713,9 +3259,9 @@ class TableFilterStringContainsDirective extends TableFilterDirective {
|
|
|
2713
3259
|
super.ngOnChanges(changes);
|
|
2714
3260
|
}
|
|
2715
3261
|
}
|
|
2716
|
-
TableFilterStringContainsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2717
|
-
TableFilterStringContainsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
2718
|
-
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: [{
|
|
2719
3265
|
type: Directive,
|
|
2720
3266
|
args: [{
|
|
2721
3267
|
selector: '[tbFilterStringContains]',
|
|
@@ -2727,7 +3273,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2727
3273
|
'active: active',
|
|
2728
3274
|
]
|
|
2729
3275
|
}]
|
|
2730
|
-
}], ctorParameters: function () { return [{ type:
|
|
3276
|
+
}], ctorParameters: function () { return [{ type: i4$3.NgControl, decorators: [{
|
|
3277
|
+
type: Optional
|
|
3278
|
+
}] }, { type: TableWrapperDirective, decorators: [{
|
|
2731
3279
|
type: Optional
|
|
2732
3280
|
}] }]; } });
|
|
2733
3281
|
class TableCustomFilterDirectiveBase extends TableCustomFilterDirective {
|
|
@@ -2772,9 +3320,9 @@ class TableCustomFilterDirectiveBase extends TableCustomFilterDirective {
|
|
|
2772
3320
|
this.filter$ = new BehaviorSubject(this.filter);
|
|
2773
3321
|
}
|
|
2774
3322
|
}
|
|
2775
|
-
TableCustomFilterDirectiveBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2776
|
-
TableCustomFilterDirectiveBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
2777
|
-
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: [{
|
|
2778
3326
|
type: Directive,
|
|
2779
3327
|
args: [{
|
|
2780
3328
|
selector: "[tbCustomFilter]",
|
|
@@ -2788,11 +3336,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2788
3336
|
type: Input
|
|
2789
3337
|
}] } });
|
|
2790
3338
|
class TbSelectedFilterDirective extends TableCustomFilterDirectiveBase {
|
|
2791
|
-
constructor(change, isActive) {
|
|
3339
|
+
constructor(change, isActive, wrapper) {
|
|
2792
3340
|
super();
|
|
2793
3341
|
this.change = change;
|
|
2794
3342
|
this.isActive = isActive;
|
|
2795
3343
|
this.destroySubject$ = new ReplaySubject(1);
|
|
3344
|
+
if (wrapper) {
|
|
3345
|
+
wrapper.register(this);
|
|
3346
|
+
}
|
|
2796
3347
|
}
|
|
2797
3348
|
reset() {
|
|
2798
3349
|
this.active = false;
|
|
@@ -2808,15 +3359,17 @@ class TbSelectedFilterDirective extends TableCustomFilterDirectiveBase {
|
|
|
2808
3359
|
});
|
|
2809
3360
|
}
|
|
2810
3361
|
}
|
|
2811
|
-
TbSelectedFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2812
|
-
TbSelectedFilterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
2813
|
-
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: [{
|
|
2814
3365
|
type: Directive
|
|
2815
|
-
}], ctorParameters: function () { return [{ type:
|
|
3366
|
+
}], ctorParameters: function () { return [{ type: i3$3.Observable }, { type: undefined }, { type: TableWrapperDirective, decorators: [{
|
|
3367
|
+
type: Optional
|
|
3368
|
+
}] }]; } });
|
|
2816
3369
|
// Checkbox
|
|
2817
3370
|
class MatCheckboxTbFilterDirective extends TbSelectedFilterDirective {
|
|
2818
|
-
constructor(matCheckbox) {
|
|
2819
|
-
super(matCheckbox.change, () => matCheckbox.checked);
|
|
3371
|
+
constructor(matCheckbox, wrapper) {
|
|
3372
|
+
super(matCheckbox.change, () => matCheckbox.checked, wrapper);
|
|
2820
3373
|
this.matCheckbox = matCheckbox;
|
|
2821
3374
|
}
|
|
2822
3375
|
set active(val) {
|
|
@@ -2824,9 +3377,9 @@ class MatCheckboxTbFilterDirective extends TbSelectedFilterDirective {
|
|
|
2824
3377
|
super.active = val;
|
|
2825
3378
|
}
|
|
2826
3379
|
}
|
|
2827
|
-
MatCheckboxTbFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2828
|
-
MatCheckboxTbFilterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
2829
|
-
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: [{
|
|
2830
3383
|
type: Directive,
|
|
2831
3384
|
args: [{
|
|
2832
3385
|
selector: 'mat-checkbox[tbCustomFilter]',
|
|
@@ -2835,10 +3388,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2835
3388
|
],
|
|
2836
3389
|
providers: [{ provide: TableCustomFilterDirective, useExisting: MatCheckboxTbFilterDirective }]
|
|
2837
3390
|
}]
|
|
2838
|
-
}], ctorParameters: function () { return [{ type:
|
|
3391
|
+
}], ctorParameters: function () { return [{ type: i4.MatCheckbox }, { type: TableWrapperDirective, decorators: [{
|
|
3392
|
+
type: Optional
|
|
3393
|
+
}] }]; } });
|
|
2839
3394
|
class MatSlideToggleTbFilterDirective extends TbSelectedFilterDirective {
|
|
2840
|
-
constructor(matSlideToggle) {
|
|
2841
|
-
super(matSlideToggle.change, () => matSlideToggle.checked);
|
|
3395
|
+
constructor(matSlideToggle, wrapper) {
|
|
3396
|
+
super(matSlideToggle.change, () => matSlideToggle.checked, wrapper);
|
|
2842
3397
|
this.matSlideToggle = matSlideToggle;
|
|
2843
3398
|
}
|
|
2844
3399
|
set active(val) {
|
|
@@ -2849,9 +3404,9 @@ class MatSlideToggleTbFilterDirective extends TbSelectedFilterDirective {
|
|
|
2849
3404
|
super.ngOnInit();
|
|
2850
3405
|
}
|
|
2851
3406
|
}
|
|
2852
|
-
MatSlideToggleTbFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2853
|
-
MatSlideToggleTbFilterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
2854
|
-
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: [{
|
|
2855
3410
|
type: Directive,
|
|
2856
3411
|
args: [{
|
|
2857
3412
|
selector: 'mat-slide-toggle[tbCustomFilter]',
|
|
@@ -2860,11 +3415,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2860
3415
|
],
|
|
2861
3416
|
providers: [{ provide: TableCustomFilterDirective, useExisting: MatSlideToggleTbFilterDirective }]
|
|
2862
3417
|
}]
|
|
2863
|
-
}], ctorParameters: function () { return [{ type:
|
|
3418
|
+
}], ctorParameters: function () { return [{ type: i5$1.MatSlideToggle }, { type: TableWrapperDirective, decorators: [{
|
|
3419
|
+
type: Optional
|
|
3420
|
+
}] }]; } });
|
|
2864
3421
|
// Radio button
|
|
2865
3422
|
class MatRadioButtonTbFilterDirective extends TbSelectedFilterDirective {
|
|
2866
|
-
constructor(matRadioButton) {
|
|
2867
|
-
super(matRadioButton.change, () => matRadioButton.checked);
|
|
3423
|
+
constructor(matRadioButton, wrapper) {
|
|
3424
|
+
super(matRadioButton.change, () => matRadioButton.checked, wrapper);
|
|
2868
3425
|
this.matRadioButton = matRadioButton;
|
|
2869
3426
|
}
|
|
2870
3427
|
set active(val) {
|
|
@@ -2875,24 +3432,26 @@ class MatRadioButtonTbFilterDirective extends TbSelectedFilterDirective {
|
|
|
2875
3432
|
super.ngOnInit();
|
|
2876
3433
|
}
|
|
2877
3434
|
}
|
|
2878
|
-
MatRadioButtonTbFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2879
|
-
MatRadioButtonTbFilterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
2880
|
-
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: [{
|
|
2881
3438
|
type: Directive,
|
|
2882
3439
|
args: [{
|
|
2883
3440
|
selector: 'mat-radio-button[tbCustomFilter]',
|
|
2884
3441
|
inputs: ['predicate: tbCustomFilter'],
|
|
2885
3442
|
providers: [{ provide: TableCustomFilterDirective, useExisting: MatRadioButtonTbFilterDirective }]
|
|
2886
3443
|
}]
|
|
2887
|
-
}], ctorParameters: function () { return [{ type:
|
|
3444
|
+
}], ctorParameters: function () { return [{ type: i6.MatRadioButton }, { type: TableWrapperDirective, decorators: [{
|
|
3445
|
+
type: Optional
|
|
3446
|
+
}] }]; } });
|
|
2888
3447
|
// Option (select)
|
|
2889
3448
|
class MatOptionTbFilterDirective extends TbSelectedFilterDirective {
|
|
2890
|
-
constructor(matOption) {
|
|
3449
|
+
constructor(matOption, wrapper) {
|
|
2891
3450
|
super(matOption.onSelectionChange.pipe(tap$1(d => {
|
|
2892
3451
|
if (!matOption.value) {
|
|
2893
3452
|
matOption.value = v4();
|
|
2894
3453
|
}
|
|
2895
|
-
})), () => matOption.selected);
|
|
3454
|
+
})), () => matOption.selected, wrapper);
|
|
2896
3455
|
this.matOption = matOption;
|
|
2897
3456
|
}
|
|
2898
3457
|
set active(val) {
|
|
@@ -2908,9 +3467,9 @@ class MatOptionTbFilterDirective extends TbSelectedFilterDirective {
|
|
|
2908
3467
|
super.ngOnInit();
|
|
2909
3468
|
}
|
|
2910
3469
|
}
|
|
2911
|
-
MatOptionTbFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2912
|
-
MatOptionTbFilterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
2913
|
-
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: [{
|
|
2914
3473
|
type: Directive,
|
|
2915
3474
|
args: [{
|
|
2916
3475
|
selector: 'mat-option[tbCustomFilter]',
|
|
@@ -2919,11 +3478,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2919
3478
|
],
|
|
2920
3479
|
providers: [{ provide: TableCustomFilterDirective, useExisting: MatOptionTbFilterDirective }]
|
|
2921
3480
|
}]
|
|
2922
|
-
}], ctorParameters: function () { return [{ type:
|
|
3481
|
+
}], ctorParameters: function () { return [{ type: i7$1.MatOption }, { type: TableWrapperDirective, decorators: [{
|
|
3482
|
+
type: Optional
|
|
3483
|
+
}] }]; } });
|
|
2923
3484
|
// Button toggle
|
|
2924
3485
|
class MatButtonToggleFilterDirective extends TbSelectedFilterDirective {
|
|
2925
|
-
constructor(matButtonToggle) {
|
|
2926
|
-
super(matButtonToggle.change, () => matButtonToggle.checked);
|
|
3486
|
+
constructor(matButtonToggle, wrapper) {
|
|
3487
|
+
super(matButtonToggle.change, () => matButtonToggle.checked, wrapper);
|
|
2927
3488
|
this.matButtonToggle = matButtonToggle;
|
|
2928
3489
|
}
|
|
2929
3490
|
set active(val) {
|
|
@@ -2934,9 +3495,9 @@ class MatButtonToggleFilterDirective extends TbSelectedFilterDirective {
|
|
|
2934
3495
|
super.ngOnInit();
|
|
2935
3496
|
}
|
|
2936
3497
|
}
|
|
2937
|
-
MatButtonToggleFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2938
|
-
MatButtonToggleFilterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
2939
|
-
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: [{
|
|
2940
3501
|
type: Directive,
|
|
2941
3502
|
args: [{
|
|
2942
3503
|
selector: 'mat-button-toggle[tbCustomFilter]',
|
|
@@ -2945,13 +3506,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2945
3506
|
],
|
|
2946
3507
|
providers: [{ provide: TableCustomFilterDirective, useExisting: MatButtonToggleFilterDirective }]
|
|
2947
3508
|
}]
|
|
2948
|
-
}], ctorParameters: function () { return [{ type:
|
|
3509
|
+
}], ctorParameters: function () { return [{ type: i8$2.MatButtonToggle }, { type: TableWrapperDirective, decorators: [{
|
|
3510
|
+
type: Optional
|
|
3511
|
+
}] }]; } });
|
|
2949
3512
|
|
|
2950
3513
|
class TableWrapperDirective {
|
|
3514
|
+
constructor() {
|
|
3515
|
+
this.registerations = [];
|
|
3516
|
+
}
|
|
3517
|
+
register(filter) {
|
|
3518
|
+
this.registerations.push(filter);
|
|
3519
|
+
}
|
|
2951
3520
|
}
|
|
2952
|
-
TableWrapperDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2953
|
-
TableWrapperDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
2954
|
-
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: [{
|
|
2955
3524
|
type: Directive,
|
|
2956
3525
|
args: [{
|
|
2957
3526
|
selector: '[tbWrapper]'
|
|
@@ -3013,7 +3582,7 @@ class ExportToCsvService {
|
|
|
3013
3582
|
return res.join('\n');
|
|
3014
3583
|
};
|
|
3015
3584
|
this.metaToField = (meta, row) => {
|
|
3016
|
-
let val = row
|
|
3585
|
+
let val = get(row, meta.key);
|
|
3017
3586
|
if (val == null && !meta.transform)
|
|
3018
3587
|
return val;
|
|
3019
3588
|
if (meta.transform && meta.fieldType !== FieldType.Expression) {
|
|
@@ -3051,14 +3620,14 @@ class ExportToCsvService {
|
|
|
3051
3620
|
return this.datePipe.transform(val, dateFormat);
|
|
3052
3621
|
}
|
|
3053
3622
|
}
|
|
3054
|
-
ExportToCsvService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3055
|
-
ExportToCsvService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3056
|
-
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: [{
|
|
3057
3626
|
type: Injectable
|
|
3058
3627
|
}], ctorParameters: function () { return [{ type: TableStore }, { type: undefined, decorators: [{
|
|
3059
3628
|
type: Inject,
|
|
3060
3629
|
args: [TableBuilderConfigToken]
|
|
3061
|
-
}] }, { type:
|
|
3630
|
+
}] }, { type: i2.DatePipe }]; } });
|
|
3062
3631
|
const removeFromMetaData = (state, keysToRemove) => orderMetaData(state)
|
|
3063
3632
|
.filter(meta => !keysToRemove.includes(meta.key));
|
|
3064
3633
|
const nonExportableFields = (state) => Object.values(state.metaData)
|
|
@@ -3102,99 +3671,46 @@ const setLocalProfile = createAction('[State Storage] Set Local Profile', props(
|
|
|
3102
3671
|
const setLocalProfilesState = createAction('[State Storage] Set Local Profiles Current', props());
|
|
3103
3672
|
const deleteLocalProfilesState = createAction('[State Storage] Delete Local Profiles Current', props());
|
|
3104
3673
|
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
}
|
|
3127
|
-
}
|
|
3128
|
-
FormatFilterTypePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: FormatFilterTypePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3129
|
-
FormatFilterTypePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: FormatFilterTypePipe, name: "formatFilterType" });
|
|
3130
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: FormatFilterTypePipe, decorators: [{
|
|
3131
|
-
type: Pipe,
|
|
3132
|
-
args: [{ name: 'formatFilterType' }]
|
|
3133
|
-
}] });
|
|
3134
|
-
|
|
3135
|
-
class FormatFilterValuePipe {
|
|
3136
|
-
constructor(tableState, datePipe) {
|
|
3137
|
-
this.tableState = tableState;
|
|
3138
|
-
this.datePipe = datePipe;
|
|
3139
|
-
}
|
|
3140
|
-
transform(value, key, filterType) {
|
|
3141
|
-
return this.tableState.getMetaData$(key).pipe(map(md => {
|
|
3142
|
-
if (filterType === FilterType.IsNull) {
|
|
3143
|
-
return '';
|
|
3144
|
-
}
|
|
3145
|
-
if (value && (filterType === FilterType.In)) {
|
|
3146
|
-
if (md.fieldType === FieldType.Enum) {
|
|
3147
|
-
return value.map((v) => spaceCase(md.additional.enumMap[v])).join(', ') ?? value;
|
|
3148
|
-
}
|
|
3149
|
-
return value.join(', ') ?? value;
|
|
3150
|
-
}
|
|
3151
|
-
if (filterType === FilterType.NumberBetween) {
|
|
3152
|
-
if (md.fieldType === FieldType.Date) {
|
|
3153
|
-
value = this.datePipe.transform(value.Start, 'MM/dd/yy') + ' - ' + this.datePipe.transform(value.End, 'MM/dd/yy');
|
|
3154
|
-
}
|
|
3155
|
-
else {
|
|
3156
|
-
value = value.Start + ' - ' + value.End;
|
|
3157
|
-
}
|
|
3158
|
-
}
|
|
3159
|
-
else if (md.fieldType === FieldType.Date) {
|
|
3160
|
-
value = this.datePipe.transform(value, 'MM/dd/yy');
|
|
3161
|
-
}
|
|
3162
|
-
return value;
|
|
3163
|
-
}));
|
|
3164
|
-
}
|
|
3165
|
-
}
|
|
3166
|
-
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 });
|
|
3167
|
-
FormatFilterValuePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: FormatFilterValuePipe, name: "formatFilterValue" });
|
|
3168
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: FormatFilterValuePipe, decorators: [{
|
|
3169
|
-
type: Pipe,
|
|
3170
|
-
args: [{ name: 'formatFilterValue' }]
|
|
3171
|
-
}], ctorParameters: function () { return [{ type: TableStore }, { type: i1.DatePipe }]; } });
|
|
3172
|
-
|
|
3173
|
-
class FilterChipsComponent {
|
|
3174
|
-
constructor(tableState, filterStore) {
|
|
3175
|
-
this.tableState = tableState;
|
|
3176
|
-
this.filterStore = filterStore;
|
|
3177
|
-
this.filters$ = this.tableState.filters$.pipe(map(filters => Object.values(filters)
|
|
3178
|
-
.filter(isFilterInfo)
|
|
3179
|
-
.filter(f => !f._isExternalyManaged)));
|
|
3180
|
-
this.currentFilters$ = this.filterStore.currentFilters$;
|
|
3181
|
-
}
|
|
3182
|
-
deleteByIndex(index) {
|
|
3183
|
-
this.filterStore.deleteByIndex(index);
|
|
3184
|
-
}
|
|
3185
|
-
addFilter(filter) {
|
|
3186
|
-
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
|
+
});
|
|
3187
3695
|
}
|
|
3188
|
-
|
|
3189
|
-
|
|
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
|
+
});
|
|
3190
3706
|
}
|
|
3191
3707
|
}
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
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));
|
|
3198
3714
|
|
|
3199
3715
|
class SortMenuComponentStore extends ComponentStore {
|
|
3200
3716
|
constructor(tableState) {
|
|
@@ -3223,9 +3739,9 @@ class SortMenuComponentStore extends ComponentStore {
|
|
|
3223
3739
|
};
|
|
3224
3740
|
}
|
|
3225
3741
|
}
|
|
3226
|
-
SortMenuComponentStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3227
|
-
SortMenuComponentStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3228
|
-
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: [{
|
|
3229
3745
|
type: Injectable
|
|
3230
3746
|
}], ctorParameters: function () { return [{ type: TableStore }]; } });
|
|
3231
3747
|
const equalSortArray = (arr1, arr2) => arr1.length === arr2.length && arr2.every(s1 => arr1.some(s2 => s1.active === s2.active));
|
|
@@ -3255,6 +3771,7 @@ class SortMenuComponent {
|
|
|
3255
3771
|
this.dirty$.next(true);
|
|
3256
3772
|
if (event.previousContainer === event.container) {
|
|
3257
3773
|
moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
|
|
3774
|
+
this.store.setSorted(event.container.data);
|
|
3258
3775
|
}
|
|
3259
3776
|
else {
|
|
3260
3777
|
transferArrayItem(event.previousContainer.data, event.container.data, event.previousIndex, event.currentIndex);
|
|
@@ -3280,178 +3797,120 @@ class SortMenuComponent {
|
|
|
3280
3797
|
this.store.setDirection(sort);
|
|
3281
3798
|
}
|
|
3282
3799
|
}
|
|
3283
|
-
SortMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3284
|
-
SortMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
3285
|
-
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: [{
|
|
3286
3803
|
type: Component,
|
|
3287
|
-
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"] }]
|
|
3288
3805
|
}], ctorParameters: function () { return [{ type: TableStore }, { type: SortMenuComponentStore }]; } });
|
|
3289
3806
|
|
|
3290
|
-
class
|
|
3291
|
-
constructor() {
|
|
3292
|
-
|
|
3293
|
-
}
|
|
3294
|
-
}
|
|
3295
|
-
ClickEmitterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: ClickEmitterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3296
|
-
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 });
|
|
3297
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: ClickEmitterDirective, decorators: [{
|
|
3298
|
-
type: Directive,
|
|
3299
|
-
args: [{
|
|
3300
|
-
selector: '[clickEmitter]',
|
|
3301
|
-
exportAs: 'clickEmitter',
|
|
3302
|
-
host: {
|
|
3303
|
-
'(click)': 'next(true)'
|
|
3304
|
-
}
|
|
3305
|
-
}]
|
|
3306
|
-
}], ctorParameters: function () { return []; } });
|
|
3307
|
-
|
|
3308
|
-
class DialogService {
|
|
3309
|
-
constructor() {
|
|
3310
|
-
this.allOpenAppDialogs = [];
|
|
3311
|
-
}
|
|
3312
|
-
addDialogRef(ref) {
|
|
3313
|
-
this.allOpenAppDialogs.push(ref);
|
|
3314
|
-
}
|
|
3315
|
-
removeDialogRef(ref) {
|
|
3316
|
-
this.allOpenAppDialogs = this.allOpenAppDialogs.filter(rf => ref.id !== rf.id);
|
|
3807
|
+
class KeyDisplayPipe {
|
|
3808
|
+
constructor(tableState) {
|
|
3809
|
+
this.tableState = tableState;
|
|
3317
3810
|
}
|
|
3318
|
-
|
|
3319
|
-
this.
|
|
3811
|
+
transform(key) {
|
|
3812
|
+
return this.tableState.getMetaData$(key).pipe(map(metaData => metaData.displayName || spaceCase(key)));
|
|
3320
3813
|
}
|
|
3321
3814
|
}
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3325
|
-
type:
|
|
3326
|
-
args: [{
|
|
3327
|
-
|
|
3328
|
-
}]
|
|
3329
|
-
}] });
|
|
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 }]; } });
|
|
3330
3821
|
|
|
3331
|
-
class
|
|
3332
|
-
constructor(
|
|
3333
|
-
this.
|
|
3334
|
-
this.
|
|
3335
|
-
this.viewContext = {
|
|
3336
|
-
close: () => { },
|
|
3337
|
-
};
|
|
3338
|
-
}
|
|
3339
|
-
set template(tmpl) {
|
|
3340
|
-
if (this.viewEmbeded) {
|
|
3341
|
-
this.vcr.clear();
|
|
3342
|
-
}
|
|
3343
|
-
this.viewEmbeded = true;
|
|
3344
|
-
this.vcr.createEmbeddedView(tmpl, this.viewContext);
|
|
3345
|
-
}
|
|
3346
|
-
set close(closeMethod) {
|
|
3347
|
-
this.viewContext.close = closeMethod;
|
|
3348
|
-
}
|
|
3349
|
-
set data(value) {
|
|
3350
|
-
this.viewContext.$implicit = value;
|
|
3351
|
-
this.viewContext.opDialog = value;
|
|
3822
|
+
class FormatFilterValuePipe {
|
|
3823
|
+
constructor(tableState, datePipe) {
|
|
3824
|
+
this.tableState = tableState;
|
|
3825
|
+
this.datePipe = datePipe;
|
|
3352
3826
|
}
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
type: Component,
|
|
3358
|
-
args: [{
|
|
3359
|
-
selector: 'app-dialog-content',
|
|
3360
|
-
template: ``
|
|
3361
|
-
}]
|
|
3362
|
-
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; } });
|
|
3363
|
-
const defaultDialogConfig = {
|
|
3364
|
-
maxHeight: '95vh'
|
|
3365
|
-
};
|
|
3366
|
-
class DialogDirective {
|
|
3367
|
-
constructor(templateRef, dialog, service) {
|
|
3368
|
-
this.templateRef = templateRef;
|
|
3369
|
-
this.dialog = dialog;
|
|
3370
|
-
this.service = service;
|
|
3371
|
-
this.opDialogClosed = new EventEmitter();
|
|
3372
|
-
this._dialogConfig = defaultDialogConfig;
|
|
3373
|
-
this._data = new Subject();
|
|
3374
|
-
this.subscription = this._data.pipe(switchAll()).subscribe(d => {
|
|
3375
|
-
if (d) {
|
|
3376
|
-
this.opDialogConfig.data = d;
|
|
3377
|
-
this.setDialogState(true);
|
|
3827
|
+
transform(value, key, filterType) {
|
|
3828
|
+
return this.tableState.getMetaData$(key).pipe(map(md => {
|
|
3829
|
+
if (filterType === FilterType.IsNull) {
|
|
3830
|
+
return '';
|
|
3378
3831
|
}
|
|
3379
|
-
|
|
3380
|
-
|
|
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;
|
|
3381
3837
|
}
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
}
|
|
3390
|
-
set state(open_close) {
|
|
3391
|
-
this._data.next(open_close);
|
|
3392
|
-
}
|
|
3393
|
-
close() {
|
|
3394
|
-
this.dialogRef?.close();
|
|
3395
|
-
}
|
|
3396
|
-
initDialog() {
|
|
3397
|
-
if (this.nativeElement) {
|
|
3398
|
-
const rect = this.nativeElement.getBoundingClientRect();
|
|
3399
|
-
const position = { left: `${rect.left}px`, top: `${rect.bottom - 50}px` };
|
|
3400
|
-
this.opDialogConfig = { ...this.opDialogConfig, position };
|
|
3401
|
-
}
|
|
3402
|
-
this.dialogRef = this.dialog.open(DialogWrapper, this.opDialogConfig);
|
|
3403
|
-
this.componentWrapper = this.dialogRef.componentInstance;
|
|
3404
|
-
this.componentWrapper.close = () => this.dialogRef?.close();
|
|
3405
|
-
this.componentWrapper.data = this.opDialogConfig.data;
|
|
3406
|
-
this.componentWrapper.template = this.templateRef;
|
|
3407
|
-
if (!this.opDialogConfig.disableClose) {
|
|
3408
|
-
this.service.addDialogRef(this.dialogRef);
|
|
3409
|
-
}
|
|
3410
|
-
const sub = this.dialogRef.afterClosed().subscribe(() => {
|
|
3411
|
-
this.opDialogClosed.emit(true);
|
|
3412
|
-
this.service.removeDialogRef(this.dialogRef);
|
|
3413
|
-
this.dialogRef = undefined;
|
|
3414
|
-
sub.unsubscribe();
|
|
3415
|
-
});
|
|
3416
|
-
}
|
|
3417
|
-
setDialogState(open) {
|
|
3418
|
-
if (open) {
|
|
3419
|
-
if (!this.dialogRef) {
|
|
3420
|
-
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
|
+
}
|
|
3421
3845
|
}
|
|
3422
|
-
else {
|
|
3423
|
-
|
|
3846
|
+
else if (md.fieldType === FieldType.Date) {
|
|
3847
|
+
value = this.datePipe.transform(value, 'MM/dd/yy');
|
|
3424
3848
|
}
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
this.dialogRef.close();
|
|
3428
|
-
}
|
|
3849
|
+
return value;
|
|
3850
|
+
}));
|
|
3429
3851
|
}
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
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';
|
|
3433
3864
|
}
|
|
3865
|
+
return filterType;
|
|
3434
3866
|
}
|
|
3435
|
-
|
|
3436
|
-
|
|
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();
|
|
3437
3892
|
}
|
|
3438
3893
|
}
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3442
|
-
type:
|
|
3443
|
-
args: [{ selector: '[
|
|
3444
|
-
}], ctorParameters: function () { return [{ type:
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
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 }]; } });
|
|
3455
3914
|
|
|
3456
3915
|
class TableContainerComponent {
|
|
3457
3916
|
constructor(state, exportToCsvService, config, store, wrapper) {
|
|
@@ -3479,6 +3938,55 @@ class TableContainerComponent {
|
|
|
3479
3938
|
return meta;
|
|
3480
3939
|
};
|
|
3481
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
|
+
};
|
|
3482
3990
|
this.state.on(this.state.getSavableState().pipe(last()), finalState => {
|
|
3483
3991
|
if (this.tableId) {
|
|
3484
3992
|
this.store.dispatch(setLocalProfile({ key: this.tableId, value: finalState }));
|
|
@@ -3489,6 +3997,12 @@ class TableContainerComponent {
|
|
|
3489
3997
|
set pageSize(value) {
|
|
3490
3998
|
this.state.setPageSize(value);
|
|
3491
3999
|
}
|
|
4000
|
+
firstPage() {
|
|
4001
|
+
this.genericTableComponent?.paginatorComponent?.paginator?.firstPage();
|
|
4002
|
+
}
|
|
4003
|
+
lastPage() {
|
|
4004
|
+
this.genericTableComponent?.paginatorComponent?.paginator?.lastPage();
|
|
4005
|
+
}
|
|
3492
4006
|
resetState() {
|
|
3493
4007
|
this.customFilters.forEach(cf => cf.reset());
|
|
3494
4008
|
this.filters.forEach(cf => cf.reset());
|
|
@@ -3499,7 +4013,7 @@ class TableContainerComponent {
|
|
|
3499
4013
|
this.state.setTableSettings(this.tableBuilder.settings);
|
|
3500
4014
|
this.state.runOnceWhen(stateIs(InitializationState.MetaDataLoaded), state => {
|
|
3501
4015
|
if (this.tableId) {
|
|
3502
|
-
const persistedState$ = this.store.pipe(select(selectLocalProfileState(this.tableId)),
|
|
4016
|
+
const persistedState$ = this.store.pipe(select(selectLocalProfileState(this.tableId)), tap(persistedState => {
|
|
3503
4017
|
if (!persistedState) {
|
|
3504
4018
|
this.state.setIntializationState(InitializationState.LoadedFromStore);
|
|
3505
4019
|
}
|
|
@@ -3519,7 +4033,7 @@ class TableContainerComponent {
|
|
|
3519
4033
|
const filters$ = this.state.filters$.pipe(map(filters => Object.values(filters)));
|
|
3520
4034
|
const data = new DataFilter(allFilters)
|
|
3521
4035
|
.appendFilters(filters$)
|
|
3522
|
-
.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)))))));
|
|
3523
4037
|
this.dataSubject.next(data);
|
|
3524
4038
|
}
|
|
3525
4039
|
ngOnInit() {
|
|
@@ -3551,7 +4065,7 @@ class TableContainerComponent {
|
|
|
3551
4065
|
this.state.runOnceWhen(stateIs(InitializationState.LoadedFromStore), state => {
|
|
3552
4066
|
var allFilters = [...this.filters, ...this.customFilters];
|
|
3553
4067
|
if (this.wrapper) {
|
|
3554
|
-
allFilters = [...allFilters, ...this.wrapper.customFilters, ...this.wrapper.filters];
|
|
4068
|
+
allFilters = [...allFilters, ...this.wrapper.customFilters, ...this.wrapper.filters, ...this.wrapper.registerations];
|
|
3555
4069
|
}
|
|
3556
4070
|
var customFilters = [];
|
|
3557
4071
|
allFilters.filter(f => !f.used).forEach(f => {
|
|
@@ -3575,7 +4089,7 @@ class TableContainerComponent {
|
|
|
3575
4089
|
customFilters.push(f);
|
|
3576
4090
|
}
|
|
3577
4091
|
});
|
|
3578
|
-
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) => {
|
|
3579
4093
|
if (b.active) {
|
|
3580
4094
|
a[b.filterId] = isCustomFilter(b) ? b.predicate : createFilterFunc(b);
|
|
3581
4095
|
}
|
|
@@ -3599,46 +4113,39 @@ class TableContainerComponent {
|
|
|
3599
4113
|
...this.customCells.map(cc => cc.getMetaData(mds.find(item => item.key === cc.customCell)))
|
|
3600
4114
|
];
|
|
3601
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
|
+
})));
|
|
3602
4124
|
this.myColumns$ = this.state.metaDataArray$.pipe(mapArray(metaData => ({ metaData, customCell: customCellMap.get(metaData.key) })));
|
|
3603
4125
|
}
|
|
3604
|
-
getData(data,
|
|
3605
|
-
|
|
3606
|
-
if (!meta) {
|
|
4126
|
+
getData(data, groupByKeys) {
|
|
4127
|
+
if (!groupByKeys.length) {
|
|
3607
4128
|
this.disableSort = false;
|
|
3608
4129
|
return data;
|
|
3609
4130
|
}
|
|
3610
4131
|
this.disableSort = true;
|
|
3611
|
-
|
|
3612
|
-
const withHeadersAndFooters = Object.keys(grouped).map(k => {
|
|
3613
|
-
const header = {
|
|
3614
|
-
isGroupHeader: true,
|
|
3615
|
-
groupHeaderName: meta.additional?.grouping?.groupTitleFn ? meta.additional?.grouping?.groupTitleFn(k) : k
|
|
3616
|
-
};
|
|
3617
|
-
const sumCols = metaData.filter(md => md.additional?.grouping?.sum).map(md => md.key);
|
|
3618
|
-
const totals = sumCols.reduce((acc, key) => {
|
|
3619
|
-
acc[key] = _.sumBy(grouped[k], key);
|
|
3620
|
-
return acc;
|
|
3621
|
-
}, {});
|
|
3622
|
-
const footer = {
|
|
3623
|
-
isGroupFooter: true,
|
|
3624
|
-
...totals
|
|
3625
|
-
};
|
|
3626
|
-
return [header, grouped[k], footer];
|
|
3627
|
-
});
|
|
3628
|
-
return _.flattenDeep(withHeadersAndFooters);
|
|
4132
|
+
return this.tbGroupBy(data, groupByKeys);
|
|
3629
4133
|
}
|
|
3630
4134
|
}
|
|
3631
|
-
TableContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3632
|
-
TableContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
3633
|
-
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: [{
|
|
3634
4138
|
type: Component,
|
|
3635
|
-
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"] }]
|
|
3636
4140
|
}], ctorParameters: function () { return [{ type: TableStore }, { type: ExportToCsvService }, { type: undefined, decorators: [{
|
|
3637
4141
|
type: Inject,
|
|
3638
4142
|
args: [TableBuilderConfigToken]
|
|
3639
|
-
}] }, { type: i3$
|
|
4143
|
+
}] }, { type: i3$4.Store }, { type: TableWrapperDirective, decorators: [{
|
|
3640
4144
|
type: Optional
|
|
3641
|
-
}] }]; }, propDecorators: {
|
|
4145
|
+
}] }]; }, propDecorators: { genericTableComponent: [{
|
|
4146
|
+
type: ViewChild,
|
|
4147
|
+
args: [GenericTableComponent]
|
|
4148
|
+
}], customFilters: [{
|
|
3642
4149
|
type: ContentChildren,
|
|
3643
4150
|
args: [TableCustomFilterDirective, { descendants: true }]
|
|
3644
4151
|
}], filters: [{
|
|
@@ -3660,6 +4167,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
3660
4167
|
type: Input
|
|
3661
4168
|
}], inputFilters: [{
|
|
3662
4169
|
type: Input
|
|
4170
|
+
}], groupHeaderTemplate: [{
|
|
4171
|
+
type: Input
|
|
3663
4172
|
}], selection$: [{
|
|
3664
4173
|
type: Output
|
|
3665
4174
|
}], data: [{
|
|
@@ -3760,173 +4269,11 @@ class SaveTableEffects {
|
|
|
3760
4269
|
})), { dispatch: false });
|
|
3761
4270
|
}
|
|
3762
4271
|
}
|
|
3763
|
-
SaveTableEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3764
|
-
SaveTableEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3765
|
-
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: [{
|
|
3766
4275
|
type: Injectable
|
|
3767
|
-
}], ctorParameters: function () { return [{ type: i1$
|
|
3768
|
-
|
|
3769
|
-
class PreventEnterDirective {
|
|
3770
|
-
onKeyDown() {
|
|
3771
|
-
return false;
|
|
3772
|
-
}
|
|
3773
|
-
}
|
|
3774
|
-
PreventEnterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: PreventEnterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3775
|
-
PreventEnterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.5", type: PreventEnterDirective, selector: "preventEnter", host: { listeners: { "keydown.enter": "onKeyDown($event)" } }, ngImport: i0 });
|
|
3776
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: PreventEnterDirective, decorators: [{
|
|
3777
|
-
type: Directive,
|
|
3778
|
-
args: [{
|
|
3779
|
-
selector: 'preventEnter'
|
|
3780
|
-
}]
|
|
3781
|
-
}], propDecorators: { onKeyDown: [{
|
|
3782
|
-
type: HostListener,
|
|
3783
|
-
args: ['keydown.enter', ['$event']]
|
|
3784
|
-
}] } });
|
|
3785
|
-
|
|
3786
|
-
class ClickSubjectDirective extends Subject {
|
|
3787
|
-
constructor() {
|
|
3788
|
-
super();
|
|
3789
|
-
}
|
|
3790
|
-
set clickSubject(val) {
|
|
3791
|
-
this._val = val;
|
|
3792
|
-
}
|
|
3793
|
-
}
|
|
3794
|
-
ClickSubjectDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: ClickSubjectDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3795
|
-
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 });
|
|
3796
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: ClickSubjectDirective, decorators: [{
|
|
3797
|
-
type: Directive,
|
|
3798
|
-
args: [{
|
|
3799
|
-
selector: '[clickSubject]',
|
|
3800
|
-
exportAs: 'clickSubject',
|
|
3801
|
-
host: {
|
|
3802
|
-
'(click)': 'next(this._val)'
|
|
3803
|
-
}
|
|
3804
|
-
}]
|
|
3805
|
-
}], ctorParameters: function () { return []; }, propDecorators: { clickSubject: [{
|
|
3806
|
-
type: Input,
|
|
3807
|
-
args: ['clickSubject']
|
|
3808
|
-
}] } });
|
|
3809
|
-
|
|
3810
|
-
class MatSlideToggleGroupDirective {
|
|
3811
|
-
constructor() {
|
|
3812
|
-
this.allowMultiple = false;
|
|
3813
|
-
this._ready = new ReplaySubject(1);
|
|
3814
|
-
}
|
|
3815
|
-
set toggles(val) {
|
|
3816
|
-
this._toggles = val;
|
|
3817
|
-
this._ready.next(true);
|
|
3818
|
-
}
|
|
3819
|
-
get valueEmitter() {
|
|
3820
|
-
return this._ready.pipe(switchMap$1(_ => this.getObs()));
|
|
3821
|
-
}
|
|
3822
|
-
getInitValue() {
|
|
3823
|
-
const startValue = this._toggles.reduce((prev, cur) => {
|
|
3824
|
-
if (!cur.name) {
|
|
3825
|
-
throw new Error('toggle must have the name attribute set');
|
|
3826
|
-
}
|
|
3827
|
-
prev[cur.name] = cur.checked;
|
|
3828
|
-
return prev;
|
|
3829
|
-
}, {});
|
|
3830
|
-
return startValue;
|
|
3831
|
-
}
|
|
3832
|
-
getObs() {
|
|
3833
|
-
var toggleChanges = merge(...this._toggles.map(toggle => toggle.change));
|
|
3834
|
-
const startValue = this.getInitValue();
|
|
3835
|
-
return toggleChanges.pipe(scan$1((prev, cur) => {
|
|
3836
|
-
const toggleName = cur.source.name;
|
|
3837
|
-
const newVal = { ...prev, [toggleName]: cur.checked };
|
|
3838
|
-
if (cur.checked && !this.allowMultiple) {
|
|
3839
|
-
Object.keys(prev)
|
|
3840
|
-
.filter(key => key !== toggleName && prev[key])
|
|
3841
|
-
.forEach(key => {
|
|
3842
|
-
newVal[key] = false;
|
|
3843
|
-
this._toggles.find(toggle => toggle.name === key).toggle();
|
|
3844
|
-
});
|
|
3845
|
-
}
|
|
3846
|
-
return newVal;
|
|
3847
|
-
}, startValue), startWith$1(startValue));
|
|
3848
|
-
}
|
|
3849
|
-
}
|
|
3850
|
-
MatSlideToggleGroupDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: MatSlideToggleGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3851
|
-
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 });
|
|
3852
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: MatSlideToggleGroupDirective, decorators: [{
|
|
3853
|
-
type: Directive,
|
|
3854
|
-
args: [{ selector: '[opMatSlideToggleGroup]', }]
|
|
3855
|
-
}], propDecorators: { allowMultiple: [{
|
|
3856
|
-
type: Input
|
|
3857
|
-
}], toggles: [{
|
|
3858
|
-
type: ContentChildren,
|
|
3859
|
-
args: [MatSlideToggle]
|
|
3860
|
-
}], valueEmitter: [{
|
|
3861
|
-
type: Output
|
|
3862
|
-
}] } });
|
|
3863
|
-
|
|
3864
|
-
class UtilitiesModule {
|
|
3865
|
-
}
|
|
3866
|
-
UtilitiesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: UtilitiesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3867
|
-
UtilitiesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: UtilitiesModule, declarations: [SpaceCasePipe,
|
|
3868
|
-
PhoneNumberPipe,
|
|
3869
|
-
FunctionPipe,
|
|
3870
|
-
StopPropagationDirective,
|
|
3871
|
-
StylerDirective,
|
|
3872
|
-
PreventEnterDirective,
|
|
3873
|
-
AutoFocusDirective,
|
|
3874
|
-
ClickSubjectDirective,
|
|
3875
|
-
ClickEmitterDirective,
|
|
3876
|
-
DialogDirective,
|
|
3877
|
-
MatSlideToggleGroupDirective], exports: [StopPropagationDirective,
|
|
3878
|
-
PreventEnterDirective,
|
|
3879
|
-
SpaceCasePipe,
|
|
3880
|
-
PhoneNumberPipe,
|
|
3881
|
-
FunctionPipe,
|
|
3882
|
-
StopPropagationDirective,
|
|
3883
|
-
StylerDirective,
|
|
3884
|
-
PreventEnterDirective,
|
|
3885
|
-
AutoFocusDirective,
|
|
3886
|
-
ClickSubjectDirective,
|
|
3887
|
-
ClickEmitterDirective,
|
|
3888
|
-
DialogDirective,
|
|
3889
|
-
MatSlideToggleGroupDirective] });
|
|
3890
|
-
UtilitiesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: UtilitiesModule, providers: [
|
|
3891
|
-
DialogService
|
|
3892
|
-
], imports: [[]] });
|
|
3893
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: UtilitiesModule, decorators: [{
|
|
3894
|
-
type: NgModule,
|
|
3895
|
-
args: [{
|
|
3896
|
-
imports: [],
|
|
3897
|
-
exports: [
|
|
3898
|
-
StopPropagationDirective,
|
|
3899
|
-
PreventEnterDirective,
|
|
3900
|
-
SpaceCasePipe,
|
|
3901
|
-
PhoneNumberPipe,
|
|
3902
|
-
FunctionPipe,
|
|
3903
|
-
StopPropagationDirective,
|
|
3904
|
-
StylerDirective,
|
|
3905
|
-
PreventEnterDirective,
|
|
3906
|
-
AutoFocusDirective,
|
|
3907
|
-
ClickSubjectDirective,
|
|
3908
|
-
ClickEmitterDirective,
|
|
3909
|
-
DialogDirective,
|
|
3910
|
-
MatSlideToggleGroupDirective,
|
|
3911
|
-
],
|
|
3912
|
-
declarations: [
|
|
3913
|
-
SpaceCasePipe,
|
|
3914
|
-
PhoneNumberPipe,
|
|
3915
|
-
FunctionPipe,
|
|
3916
|
-
StopPropagationDirective,
|
|
3917
|
-
StylerDirective,
|
|
3918
|
-
PreventEnterDirective,
|
|
3919
|
-
AutoFocusDirective,
|
|
3920
|
-
ClickSubjectDirective,
|
|
3921
|
-
ClickEmitterDirective,
|
|
3922
|
-
DialogDirective,
|
|
3923
|
-
MatSlideToggleGroupDirective,
|
|
3924
|
-
],
|
|
3925
|
-
providers: [
|
|
3926
|
-
DialogService
|
|
3927
|
-
]
|
|
3928
|
-
}]
|
|
3929
|
-
}] });
|
|
4276
|
+
}], ctorParameters: function () { return [{ type: i1$3.Actions }, { type: i3$4.Store }]; } });
|
|
3930
4277
|
|
|
3931
4278
|
class TableBuilderModule {
|
|
3932
4279
|
static forRoot(config) {
|
|
@@ -3939,8 +4286,8 @@ class TableBuilderModule {
|
|
|
3939
4286
|
};
|
|
3940
4287
|
}
|
|
3941
4288
|
}
|
|
3942
|
-
TableBuilderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3943
|
-
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,
|
|
3944
4291
|
TableContainerComponent,
|
|
3945
4292
|
GenericTableComponent,
|
|
3946
4293
|
PaginatorComponent,
|
|
@@ -3953,6 +4300,7 @@ TableBuilderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", vers
|
|
|
3953
4300
|
NumberFilterComponent,
|
|
3954
4301
|
ColumnBuilderComponent,
|
|
3955
4302
|
ArrayColumnComponent,
|
|
4303
|
+
LinkColumnComponent,
|
|
3956
4304
|
HeaderMenuComponent,
|
|
3957
4305
|
KeyDisplayPipe,
|
|
3958
4306
|
FormatFilterValuePipe,
|
|
@@ -3970,10 +4318,11 @@ TableBuilderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", vers
|
|
|
3970
4318
|
MatButtonToggleFilterDirective,
|
|
3971
4319
|
TableFilterDirective,
|
|
3972
4320
|
TableFilterStringContainsDirective,
|
|
3973
|
-
TableWrapperDirective
|
|
3974
|
-
|
|
4321
|
+
TableWrapperDirective,
|
|
4322
|
+
GroupByListComponent], imports: [CommonModule,
|
|
4323
|
+
MaterialModule, i3$4.StoreFeatureModule, i1$3.EffectsFeatureModule, FormsModule,
|
|
3975
4324
|
RouterModule,
|
|
3976
|
-
|
|
4325
|
+
LetModule,
|
|
3977
4326
|
DragDropModule,
|
|
3978
4327
|
UtilitiesModule], exports: [GenericTableComponent,
|
|
3979
4328
|
PaginatorComponent,
|
|
@@ -3991,25 +4340,23 @@ TableBuilderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", vers
|
|
|
3991
4340
|
MatButtonToggleFilterDirective,
|
|
3992
4341
|
TableFilterDirective,
|
|
3993
4342
|
TableFilterStringContainsDirective,
|
|
3994
|
-
TableWrapperDirective
|
|
3995
|
-
|
|
4343
|
+
TableWrapperDirective,
|
|
4344
|
+
GroupByListComponent] });
|
|
4345
|
+
TableBuilderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TableBuilderModule, providers: [
|
|
3996
4346
|
SpaceCasePipe,
|
|
3997
4347
|
DatePipe,
|
|
3998
4348
|
CurrencyPipe,
|
|
3999
|
-
PhoneNumberPipe
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
UtilitiesModule,
|
|
4011
|
-
]] });
|
|
4012
|
-
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: [{
|
|
4013
4360
|
type: NgModule,
|
|
4014
4361
|
args: [{
|
|
4015
4362
|
imports: [
|
|
@@ -4019,7 +4366,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
4019
4366
|
EffectsModule.forFeature([SaveTableEffects]),
|
|
4020
4367
|
FormsModule,
|
|
4021
4368
|
RouterModule,
|
|
4022
|
-
|
|
4369
|
+
LetModule,
|
|
4023
4370
|
DragDropModule,
|
|
4024
4371
|
UtilitiesModule,
|
|
4025
4372
|
],
|
|
@@ -4041,6 +4388,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
4041
4388
|
TableFilterDirective,
|
|
4042
4389
|
TableFilterStringContainsDirective,
|
|
4043
4390
|
TableWrapperDirective,
|
|
4391
|
+
GroupByListComponent,
|
|
4044
4392
|
],
|
|
4045
4393
|
declarations: [
|
|
4046
4394
|
ColumnTotalPipe,
|
|
@@ -4056,6 +4404,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
4056
4404
|
NumberFilterComponent,
|
|
4057
4405
|
ColumnBuilderComponent,
|
|
4058
4406
|
ArrayColumnComponent,
|
|
4407
|
+
LinkColumnComponent,
|
|
4059
4408
|
HeaderMenuComponent,
|
|
4060
4409
|
KeyDisplayPipe,
|
|
4061
4410
|
FormatFilterValuePipe,
|
|
@@ -4074,13 +4423,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
4074
4423
|
TableFilterDirective,
|
|
4075
4424
|
TableFilterStringContainsDirective,
|
|
4076
4425
|
TableWrapperDirective,
|
|
4426
|
+
GroupByListComponent,
|
|
4077
4427
|
],
|
|
4078
4428
|
providers: [
|
|
4079
4429
|
SpaceCasePipe,
|
|
4080
4430
|
DatePipe,
|
|
4081
4431
|
CurrencyPipe,
|
|
4082
|
-
PhoneNumberPipe
|
|
4083
|
-
TableTemplateService,
|
|
4432
|
+
PhoneNumberPipe
|
|
4084
4433
|
]
|
|
4085
4434
|
}]
|
|
4086
4435
|
}] });
|
|
@@ -4125,9 +4474,12 @@ class TableBuilder {
|
|
|
4125
4474
|
}
|
|
4126
4475
|
cleanRecord(record, metadata) {
|
|
4127
4476
|
const cleaned = metadata.reduce((prev, curr) => {
|
|
4128
|
-
|
|
4477
|
+
const val = this.cleanVal(get(record, curr.key), curr);
|
|
4478
|
+
if (val !== undefined) {
|
|
4479
|
+
set(prev, curr.key, val);
|
|
4480
|
+
}
|
|
4129
4481
|
return prev;
|
|
4130
|
-
}, {});
|
|
4482
|
+
}, { ...record });
|
|
4131
4483
|
return { ...record, ...cleaned };
|
|
4132
4484
|
}
|
|
4133
4485
|
}
|
|
@@ -4160,7 +4512,7 @@ const { selectIds, selectEntities, selectAll, selectTotal } = statusAdapter.getS
|
|
|
4160
4512
|
const selectEntity = (id) => createSelector(selectEntities, (entities) => entities[id]);
|
|
4161
4513
|
// Reducers
|
|
4162
4514
|
function actionStatusReducer(state = initialState, action) {
|
|
4163
|
-
const actionStatus =
|
|
4515
|
+
const actionStatus = get(action, 'payload.actionStatus');
|
|
4164
4516
|
if (actionStatus) {
|
|
4165
4517
|
if (state.ids.find(id => id === actionStatus.id)) {
|
|
4166
4518
|
const modifiedObj = { ...state.entities[actionStatus.id] };
|
|
@@ -4177,13 +4529,11 @@ function actionStatusReducer(state = initialState, action) {
|
|
|
4177
4529
|
|
|
4178
4530
|
class NgrxExtModule {
|
|
4179
4531
|
}
|
|
4180
|
-
NgrxExtModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4181
|
-
NgrxExtModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
4182
|
-
NgrxExtModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
]] });
|
|
4186
|
-
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: [{
|
|
4187
4537
|
type: NgModule,
|
|
4188
4538
|
args: [{
|
|
4189
4539
|
declarations: [],
|
|
@@ -4202,25 +4552,23 @@ class ActionStateSpinnerComponent {
|
|
|
4202
4552
|
this.serverActionStatus$ = this.status$.pipe(delayOn(a => a.status === serverStatusTypes.inProgress, 500));
|
|
4203
4553
|
}
|
|
4204
4554
|
}
|
|
4205
|
-
ActionStateSpinnerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4206
|
-
ActionStateSpinnerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
4207
|
-
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: [{
|
|
4208
4558
|
type: Component,
|
|
4209
|
-
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"] }]
|
|
4210
4560
|
}], propDecorators: { status$: [{
|
|
4211
4561
|
type: Input
|
|
4212
4562
|
}] } });
|
|
4213
4563
|
|
|
4214
4564
|
class ActionStateUiModule {
|
|
4215
4565
|
}
|
|
4216
|
-
ActionStateUiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4217
|
-
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,
|
|
4218
4568
|
MatProgressSpinnerModule], exports: [ActionStateSpinnerComponent] });
|
|
4219
|
-
ActionStateUiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
]] });
|
|
4223
|
-
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: [{
|
|
4224
4572
|
type: NgModule,
|
|
4225
4573
|
args: [{
|
|
4226
4574
|
declarations: [
|
|
@@ -4240,6 +4588,80 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
4240
4588
|
* Public API Surface of action-state
|
|
4241
4589
|
*/
|
|
4242
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
|
+
|
|
4243
4665
|
/*
|
|
4244
4666
|
* Public API Surface of http-request-state
|
|
4245
4667
|
*/
|
|
@@ -4248,5 +4670,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
4248
4670
|
* Generated bundle index. Do not edit.
|
|
4249
4671
|
*/
|
|
4250
4672
|
|
|
4251
|
-
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 };
|
|
4252
4674
|
//# sourceMappingURL=one-paragon-angular-utilities.mjs.map
|