@one-paragon/angular-utilities 0.1.1 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/action-state/ngrx.mjs +3 -3
- package/esm2020/table-builder/classes/filter-info.mjs +3 -2
- package/esm2020/table-builder/classes/table-builder.mjs +6 -2
- package/esm2020/table-builder/classes/table-store.mjs +3 -2
- package/esm2020/table-builder/components/column-builder/column-builder.component.mjs +21 -10
- package/esm2020/table-builder/components/initialization-component/initialization-component.mjs +10 -19
- package/esm2020/table-builder/components/table-container/table-container.mjs +7 -7
- package/esm2020/table-builder/directives/index.mjs +2 -2
- package/esm2020/table-builder/directives/table-wrapper.directive.mjs +7 -1
- package/esm2020/table-builder/directives/tb-filter.directive.mjs +57 -34
- package/esm2020/table-builder/interfaces/report-def.mjs +1 -1
- package/esm2020/table-builder/services/export-to-csv.service.mjs +3 -2
- package/esm2020/table-builder/services/table-template-service.mjs +13 -7
- package/esm2020/table-builder/services/transform-creator.mjs +29 -10
- package/esm2020/utilities/directives/conditional-classes.directive.mjs +36 -0
- package/esm2020/utilities/index.mjs +2 -1
- package/esm2020/utilities/module.mjs +8 -3
- package/fesm2015/one-paragon-angular-utilities.mjs +825 -726
- package/fesm2015/one-paragon-angular-utilities.mjs.map +1 -1
- package/fesm2020/one-paragon-angular-utilities.mjs +816 -723
- package/fesm2020/one-paragon-angular-utilities.mjs.map +1 -1
- package/package.json +1 -1
- package/table-builder/components/column-builder/column-builder.component.d.ts +3 -1
- package/table-builder/components/initialization-component/initialization-component.d.ts +1 -5
- package/table-builder/directives/index.d.ts +1 -1
- package/table-builder/directives/table-wrapper.directive.d.ts +2 -0
- package/table-builder/directives/tb-filter.directive.d.ts +16 -15
- package/table-builder/interfaces/report-def.d.ts +4 -1
- package/table-builder/services/table-template-service.d.ts +2 -2
- package/table-builder/services/transform-creator.d.ts +3 -1
- package/utilities/directives/conditional-classes.directive.d.ts +14 -0
- package/utilities/index.d.ts +1 -0
- package/utilities/module.d.ts +2 -1
|
@@ -1,73 +1,72 @@
|
|
|
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, pluck, last, takeUntil, distinctUntilKeyChanged, delay as delay$1, distinct, first as first$1, distinctUntilChanged, withLatestFrom, mergeAll, scan } from 'rxjs/operators';
|
|
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, pluck, 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$2 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, 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 i3$
|
|
7
|
+
import * as i3$1 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, cloneDeep, groupBy, flattenDeep, set } from 'lodash';
|
|
11
|
+
import * as i12 from '@angular/cdk/drag-drop';
|
|
13
12
|
import { moveItemInArray, CDK_DROP_LIST, CdkDropList, transferArrayItem, DragDropModule } from '@angular/cdk/drag-drop';
|
|
14
|
-
import * as i1 from '@angular/common';
|
|
13
|
+
import * as i1$1 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
21
|
import * as i4 from '@angular/material/icon';
|
|
19
22
|
import { MatIconModule } from '@angular/material/icon';
|
|
20
23
|
import * as i4$1 from '@angular/router';
|
|
21
24
|
import { RouterModule } from '@angular/router';
|
|
22
|
-
import * as i1$
|
|
25
|
+
import * as i1$2 from '@angular/material/sort';
|
|
23
26
|
import { MatSortModule, MatSort } from '@angular/material/sort';
|
|
24
|
-
import * as i4$
|
|
27
|
+
import * as i4$3 from '@angular/material/menu';
|
|
25
28
|
import { MatMenuTrigger, MatMenuModule } from '@angular/material/menu';
|
|
26
|
-
import * as i3
|
|
29
|
+
import * as i3 from '@angular/material/button';
|
|
27
30
|
import { MatButtonModule } from '@angular/material/button';
|
|
28
31
|
import * as i5 from '@angular/forms';
|
|
29
32
|
import { NG_VALUE_ACCESSOR, ControlContainer, NgForm, FormsModule } from '@angular/forms';
|
|
30
|
-
import * as
|
|
33
|
+
import * as i4$2 from '@angular/material/checkbox';
|
|
31
34
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
32
35
|
import * as i6 from '@angular/material/form-field';
|
|
33
36
|
import * as i7 from '@angular/material/radio';
|
|
34
37
|
import { MatRadioModule } from '@angular/material/radio';
|
|
35
38
|
import * as i8 from '@angular/material/datepicker';
|
|
36
39
|
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
37
|
-
import * as i4$
|
|
40
|
+
import * as i4$4 from '@angular/material/input';
|
|
38
41
|
import { MatInputModule } from '@angular/material/input';
|
|
39
|
-
import * as
|
|
42
|
+
import * as i8$1 from '@angular/material/tooltip';
|
|
40
43
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
41
44
|
import * as i7$1 from '@ngrx/component';
|
|
42
45
|
import { ReactiveComponentModule } from '@ngrx/component';
|
|
43
46
|
import * as i2 from '@angular/material/paginator';
|
|
44
47
|
import { MatPaginator, MatPaginatorModule } from '@angular/material/paginator';
|
|
45
|
-
import * as i1$
|
|
48
|
+
import * as i1$3 from '@angular/cdk/table';
|
|
46
49
|
import * as i2$1 from '@angular/material/card';
|
|
47
50
|
import { MatCardModule } from '@angular/material/card';
|
|
48
51
|
import * as i6$1 from '@angular/material/select';
|
|
49
52
|
import { MatSelectModule } from '@angular/material/select';
|
|
50
|
-
import * as
|
|
53
|
+
import * as i7$2 from '@angular/material/core';
|
|
51
54
|
import { MatNativeDateModule } from '@angular/material/core';
|
|
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
59
|
import { MatListModule } from '@angular/material/list';
|
|
59
60
|
import * as i1$5 from '@angular/material/progress-spinner';
|
|
60
61
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
61
62
|
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
63
|
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
|
65
64
|
import { MatStepperModule } from '@angular/material/stepper';
|
|
66
65
|
import { MatTabsModule } from '@angular/material/tabs';
|
|
67
66
|
import { MatToolbarModule } from '@angular/material/toolbar';
|
|
68
|
-
import * as i6$
|
|
67
|
+
import * as i6$2 from '@angular/material/chips';
|
|
69
68
|
import { MatChipsModule } from '@angular/material/chips';
|
|
70
|
-
import * as
|
|
69
|
+
import * as i8$2 from '@angular/material/button-toggle';
|
|
71
70
|
import * as i3$3 from '@ngrx/store';
|
|
72
71
|
import { createSelector, createAction, props, select, createReducer, on, StoreModule, createFeatureSelector } from '@ngrx/store';
|
|
73
72
|
import * as i1$4 from '@ngrx/effects';
|
|
@@ -627,152 +626,651 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
627
626
|
args: [{ name: 'phone' }]
|
|
628
627
|
}] });
|
|
629
628
|
|
|
630
|
-
|
|
631
|
-
|
|
629
|
+
class PreventEnterDirective {
|
|
630
|
+
onKeyDown() {
|
|
631
|
+
return false;
|
|
632
|
+
}
|
|
632
633
|
}
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
634
|
+
PreventEnterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: PreventEnterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
635
|
+
PreventEnterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.5", type: PreventEnterDirective, selector: "preventEnter", host: { listeners: { "keydown.enter": "onKeyDown($event)" } }, ngImport: i0 });
|
|
636
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: PreventEnterDirective, decorators: [{
|
|
637
|
+
type: Directive,
|
|
638
|
+
args: [{
|
|
639
|
+
selector: 'preventEnter'
|
|
640
|
+
}]
|
|
641
|
+
}], propDecorators: { onKeyDown: [{
|
|
642
|
+
type: HostListener,
|
|
643
|
+
args: ['keydown.enter', ['$event']]
|
|
644
|
+
}] } });
|
|
645
|
+
|
|
646
|
+
class StopPropagationDirective {
|
|
647
|
+
onClick(event) {
|
|
648
|
+
event.stopPropagation();
|
|
639
649
|
}
|
|
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;
|
|
650
|
+
onMousedown(event) {
|
|
651
|
+
event.stopPropagation();
|
|
660
652
|
}
|
|
661
653
|
}
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type:
|
|
665
|
-
type:
|
|
654
|
+
StopPropagationDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: StopPropagationDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
655
|
+
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 });
|
|
656
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: StopPropagationDirective, decorators: [{
|
|
657
|
+
type: Directive,
|
|
666
658
|
args: [{
|
|
667
|
-
|
|
659
|
+
selector: "[stop-propagation]"
|
|
668
660
|
}]
|
|
669
|
-
}],
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
661
|
+
}], propDecorators: { onClick: [{
|
|
662
|
+
type: HostListener,
|
|
663
|
+
args: ["click", ["$event"]]
|
|
664
|
+
}], onMousedown: [{
|
|
665
|
+
type: HostListener,
|
|
666
|
+
args: ["mousedown", ["$event"]]
|
|
667
|
+
}] } });
|
|
673
668
|
|
|
674
|
-
class
|
|
675
|
-
constructor(
|
|
676
|
-
this.
|
|
677
|
-
this.
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
669
|
+
class AutoFocusDirective {
|
|
670
|
+
constructor(elementRef) {
|
|
671
|
+
this.elementRef = elementRef;
|
|
672
|
+
this.autoFocus = true;
|
|
673
|
+
}
|
|
674
|
+
ngAfterViewInit() {
|
|
675
|
+
if (this.autoFocus) {
|
|
676
|
+
setTimeout(() => {
|
|
677
|
+
this.elementRef.nativeElement.focus();
|
|
678
|
+
});
|
|
683
679
|
}
|
|
684
680
|
}
|
|
685
681
|
}
|
|
686
|
-
|
|
682
|
+
AutoFocusDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: AutoFocusDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
683
|
+
AutoFocusDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.5", type: AutoFocusDirective, selector: "[autoFocus]", inputs: { autoFocus: "autoFocus" }, ngImport: i0 });
|
|
684
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: AutoFocusDirective, decorators: [{
|
|
685
|
+
type: Directive,
|
|
686
|
+
args: [{
|
|
687
|
+
selector: '[autoFocus]'
|
|
688
|
+
}]
|
|
689
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { autoFocus: [{
|
|
690
|
+
type: Input
|
|
691
|
+
}] } });
|
|
692
|
+
|
|
693
|
+
class ClickSubjectDirective extends Subject {
|
|
687
694
|
constructor() {
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
this.
|
|
692
|
-
this.hideSort = false;
|
|
693
|
-
this.collapse = false;
|
|
694
|
-
this.showTitleWhenCollapsed = true;
|
|
695
|
+
super();
|
|
696
|
+
}
|
|
697
|
+
set clickSubject(val) {
|
|
698
|
+
this._val = val;
|
|
695
699
|
}
|
|
696
700
|
}
|
|
697
|
-
|
|
701
|
+
ClickSubjectDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: ClickSubjectDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
702
|
+
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 });
|
|
703
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: ClickSubjectDirective, decorators: [{
|
|
704
|
+
type: Directive,
|
|
705
|
+
args: [{
|
|
706
|
+
selector: '[clickSubject]',
|
|
707
|
+
exportAs: 'clickSubject',
|
|
708
|
+
host: {
|
|
709
|
+
'(click)': 'next(this._val)'
|
|
710
|
+
}
|
|
711
|
+
}]
|
|
712
|
+
}], ctorParameters: function () { return []; }, propDecorators: { clickSubject: [{
|
|
713
|
+
type: Input,
|
|
714
|
+
args: ['clickSubject']
|
|
715
|
+
}] } });
|
|
716
|
+
|
|
717
|
+
class ClickEmitterDirective extends Subject {
|
|
698
718
|
constructor() {
|
|
699
|
-
|
|
719
|
+
super();
|
|
700
720
|
}
|
|
701
721
|
}
|
|
702
|
-
|
|
722
|
+
ClickEmitterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: ClickEmitterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
723
|
+
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 });
|
|
724
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: ClickEmitterDirective, decorators: [{
|
|
725
|
+
type: Directive,
|
|
726
|
+
args: [{
|
|
727
|
+
selector: '[clickEmitter]',
|
|
728
|
+
exportAs: 'clickEmitter',
|
|
729
|
+
host: {
|
|
730
|
+
'(click)': 'next(true)'
|
|
731
|
+
}
|
|
732
|
+
}]
|
|
733
|
+
}], ctorParameters: function () { return []; } });
|
|
734
|
+
|
|
735
|
+
class DialogService {
|
|
703
736
|
constructor() {
|
|
704
|
-
this.
|
|
705
|
-
this.noHeader = false;
|
|
737
|
+
this.allOpenAppDialogs = [];
|
|
706
738
|
}
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
this.
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
}
|
|
739
|
+
addDialogRef(ref) {
|
|
740
|
+
this.allOpenAppDialogs.push(ref);
|
|
741
|
+
}
|
|
742
|
+
removeDialogRef(ref) {
|
|
743
|
+
this.allOpenAppDialogs = this.allOpenAppDialogs.filter(rf => ref.id !== rf.id);
|
|
744
|
+
}
|
|
745
|
+
closeAllAppDialogs() {
|
|
746
|
+
this.allOpenAppDialogs.forEach(ref => ref.close());
|
|
716
747
|
}
|
|
717
748
|
}
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
749
|
+
DialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: DialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
750
|
+
DialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: DialogService, providedIn: 'root' });
|
|
751
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: DialogService, decorators: [{
|
|
752
|
+
type: Injectable,
|
|
753
|
+
args: [{
|
|
754
|
+
providedIn: 'root'
|
|
755
|
+
}]
|
|
756
|
+
}] });
|
|
757
|
+
|
|
758
|
+
class DialogWrapper {
|
|
759
|
+
constructor(vcr) {
|
|
760
|
+
this.vcr = vcr;
|
|
761
|
+
this.viewEmbeded = false;
|
|
762
|
+
this.viewContext = {
|
|
763
|
+
close: () => { },
|
|
764
|
+
};
|
|
765
|
+
}
|
|
766
|
+
set template(tmpl) {
|
|
767
|
+
if (this.viewEmbeded) {
|
|
768
|
+
this.vcr.clear();
|
|
737
769
|
}
|
|
770
|
+
this.viewEmbeded = true;
|
|
771
|
+
this.vcr.createEmbeddedView(tmpl, this.viewContext);
|
|
772
|
+
}
|
|
773
|
+
set close(closeMethod) {
|
|
774
|
+
this.viewContext.close = closeMethod;
|
|
775
|
+
}
|
|
776
|
+
set data(value) {
|
|
777
|
+
this.viewContext.$implicit = value;
|
|
778
|
+
this.viewContext.opDialog = value;
|
|
738
779
|
}
|
|
739
780
|
}
|
|
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,
|
|
781
|
+
DialogWrapper.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: DialogWrapper, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
782
|
+
DialogWrapper.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.5", type: DialogWrapper, selector: "app-dialog-content", ngImport: i0, template: ``, isInline: true });
|
|
783
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: DialogWrapper, decorators: [{
|
|
784
|
+
type: Component,
|
|
785
|
+
args: [{
|
|
786
|
+
selector: 'app-dialog-content',
|
|
787
|
+
template: ``
|
|
788
|
+
}]
|
|
789
|
+
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; } });
|
|
790
|
+
const defaultDialogConfig = {
|
|
791
|
+
maxHeight: '95vh'
|
|
758
792
|
};
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
793
|
+
class DialogDirective {
|
|
794
|
+
constructor(templateRef, dialog, service) {
|
|
795
|
+
this.templateRef = templateRef;
|
|
796
|
+
this.dialog = dialog;
|
|
797
|
+
this.service = service;
|
|
798
|
+
this.opDialogClosed = new EventEmitter();
|
|
799
|
+
this._dialogConfig = defaultDialogConfig;
|
|
800
|
+
this._data = new Subject();
|
|
801
|
+
this.subscription = this._data.pipe(switchAll()).subscribe(d => {
|
|
802
|
+
if (d) {
|
|
803
|
+
this.opDialogConfig.data = d;
|
|
804
|
+
this.setDialogState(true);
|
|
805
|
+
}
|
|
806
|
+
else {
|
|
807
|
+
this.setDialogState(false);
|
|
808
|
+
}
|
|
809
|
+
});
|
|
810
|
+
}
|
|
811
|
+
set opDialogConfig(config) {
|
|
812
|
+
this._dialogConfig = { ...defaultDialogConfig, ...config };
|
|
813
|
+
}
|
|
814
|
+
get opDialogConfig() {
|
|
815
|
+
return this._dialogConfig;
|
|
816
|
+
}
|
|
817
|
+
set state(open_close) {
|
|
818
|
+
this._data.next(open_close);
|
|
819
|
+
}
|
|
820
|
+
close() {
|
|
821
|
+
this.dialogRef?.close();
|
|
822
|
+
}
|
|
823
|
+
initDialog() {
|
|
824
|
+
if (this.nativeElement) {
|
|
825
|
+
const rect = this.nativeElement.getBoundingClientRect();
|
|
826
|
+
const position = { left: `${rect.left}px`, top: `${rect.bottom - 50}px` };
|
|
827
|
+
this.opDialogConfig = { ...this.opDialogConfig, position };
|
|
828
|
+
}
|
|
829
|
+
this.dialogRef = this.dialog.open(DialogWrapper, this.opDialogConfig);
|
|
830
|
+
this.componentWrapper = this.dialogRef.componentInstance;
|
|
831
|
+
this.componentWrapper.close = () => this.dialogRef?.close();
|
|
832
|
+
this.componentWrapper.data = this.opDialogConfig.data;
|
|
833
|
+
this.componentWrapper.template = this.templateRef;
|
|
834
|
+
if (!this.opDialogConfig.disableClose) {
|
|
835
|
+
this.service.addDialogRef(this.dialogRef);
|
|
836
|
+
}
|
|
837
|
+
const sub = this.dialogRef.afterClosed().subscribe(() => {
|
|
838
|
+
this.opDialogClosed.emit(true);
|
|
839
|
+
this.service.removeDialogRef(this.dialogRef);
|
|
840
|
+
this.dialogRef = undefined;
|
|
841
|
+
sub.unsubscribe();
|
|
842
|
+
});
|
|
843
|
+
}
|
|
844
|
+
setDialogState(open) {
|
|
845
|
+
if (open) {
|
|
846
|
+
if (!this.dialogRef) {
|
|
847
|
+
this.initDialog();
|
|
848
|
+
}
|
|
849
|
+
else {
|
|
850
|
+
this.componentWrapper.data = this.opDialogConfig.data;
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
else if (!open && this.dialogRef) {
|
|
854
|
+
this.dialogRef.close();
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
ngOnDestroy() {
|
|
858
|
+
if (this.subscription) {
|
|
859
|
+
this.subscription.unsubscribe();
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
static ngTemplateContextGuard(dir, ctx) {
|
|
863
|
+
return true;
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
DialogDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: DialogDirective, deps: [{ token: i0.TemplateRef }, { token: i1.MatDialog }, { token: DialogService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
867
|
+
DialogDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.5", type: DialogDirective, selector: "[opDialog]", inputs: { opDialogConfig: "opDialogConfig", state: ["opDialog", "state"], nativeElement: ["opDialogOrigin", "nativeElement"] }, outputs: { opDialogClosed: "opDialogClosed" }, ngImport: i0 });
|
|
868
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: DialogDirective, decorators: [{
|
|
869
|
+
type: Directive,
|
|
870
|
+
args: [{ selector: '[opDialog]' }]
|
|
871
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i1.MatDialog }, { type: DialogService }]; }, propDecorators: { opDialogClosed: [{
|
|
872
|
+
type: Output
|
|
873
|
+
}], opDialogConfig: [{
|
|
874
|
+
type: Input
|
|
875
|
+
}], state: [{
|
|
876
|
+
type: Input,
|
|
877
|
+
args: ['opDialog']
|
|
878
|
+
}], nativeElement: [{
|
|
879
|
+
type: Input,
|
|
880
|
+
args: ['opDialogOrigin']
|
|
881
|
+
}] } });
|
|
882
|
+
|
|
883
|
+
class StylerDirective {
|
|
884
|
+
constructor(el) {
|
|
885
|
+
this.el = el;
|
|
886
|
+
}
|
|
887
|
+
set styler(styles) {
|
|
888
|
+
if (styles) {
|
|
889
|
+
Object.keys(styles).forEach(style => {
|
|
890
|
+
this.el.nativeElement.style[style] = styles[style];
|
|
891
|
+
});
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
;
|
|
895
|
+
}
|
|
896
|
+
StylerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: StylerDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
897
|
+
StylerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.5", type: StylerDirective, selector: "[styler]", inputs: { styler: "styler" }, ngImport: i0 });
|
|
898
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: StylerDirective, decorators: [{
|
|
899
|
+
type: Directive,
|
|
900
|
+
args: [{
|
|
901
|
+
selector: '[styler]',
|
|
902
|
+
}]
|
|
903
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { styler: [{
|
|
904
|
+
type: Input
|
|
905
|
+
}] } });
|
|
906
|
+
|
|
907
|
+
class MatSlideToggleGroupDirective {
|
|
908
|
+
constructor() {
|
|
909
|
+
this.allowMultiple = false;
|
|
910
|
+
this._ready = new ReplaySubject(1);
|
|
911
|
+
}
|
|
912
|
+
set toggles(val) {
|
|
913
|
+
this._toggles = val;
|
|
914
|
+
this._ready.next(true);
|
|
915
|
+
}
|
|
916
|
+
get valueEmitter() {
|
|
917
|
+
return this._ready.pipe(switchMap$1(_ => this.getObs()));
|
|
918
|
+
}
|
|
919
|
+
getInitValue() {
|
|
920
|
+
const startValue = this._toggles.reduce((prev, cur) => {
|
|
921
|
+
if (!cur.name) {
|
|
922
|
+
throw new Error('toggle must have the name attribute set');
|
|
923
|
+
}
|
|
924
|
+
prev[cur.name] = cur.checked;
|
|
925
|
+
return prev;
|
|
926
|
+
}, {});
|
|
927
|
+
return startValue;
|
|
928
|
+
}
|
|
929
|
+
getObs() {
|
|
930
|
+
var toggleChanges = merge(...this._toggles.map(toggle => toggle.change));
|
|
931
|
+
const startValue = this.getInitValue();
|
|
932
|
+
return toggleChanges.pipe(scan((prev, cur) => {
|
|
933
|
+
const toggleName = cur.source.name;
|
|
934
|
+
const newVal = { ...prev, [toggleName]: cur.checked };
|
|
935
|
+
if (cur.checked && !this.allowMultiple) {
|
|
936
|
+
Object.keys(prev)
|
|
937
|
+
.filter(key => key !== toggleName && prev[key])
|
|
938
|
+
.forEach(key => {
|
|
939
|
+
newVal[key] = false;
|
|
940
|
+
this._toggles.find(toggle => toggle.name === key).toggle();
|
|
941
|
+
});
|
|
942
|
+
}
|
|
943
|
+
return newVal;
|
|
944
|
+
}, startValue), startWith$1(startValue));
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
MatSlideToggleGroupDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: MatSlideToggleGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
948
|
+
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 });
|
|
949
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: MatSlideToggleGroupDirective, decorators: [{
|
|
950
|
+
type: Directive,
|
|
951
|
+
args: [{ selector: '[opMatSlideToggleGroup]', }]
|
|
952
|
+
}], propDecorators: { allowMultiple: [{
|
|
953
|
+
type: Input
|
|
954
|
+
}], toggles: [{
|
|
955
|
+
type: ContentChildren,
|
|
956
|
+
args: [MatSlideToggle]
|
|
957
|
+
}], valueEmitter: [{
|
|
958
|
+
type: Output
|
|
959
|
+
}] } });
|
|
960
|
+
|
|
961
|
+
class FunctionPipe {
|
|
962
|
+
transform(func, ...args) {
|
|
963
|
+
if (typeof func === 'string') {
|
|
964
|
+
const [instance, ...tail] = args;
|
|
965
|
+
const method = instance[func].bind(instance);
|
|
966
|
+
return method(...tail);
|
|
967
|
+
}
|
|
968
|
+
return func(...args);
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
FunctionPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: FunctionPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
972
|
+
FunctionPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: FunctionPipe, name: "func" });
|
|
973
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: FunctionPipe, decorators: [{
|
|
974
|
+
type: Pipe,
|
|
975
|
+
args: [{
|
|
976
|
+
name: 'func'
|
|
977
|
+
}]
|
|
978
|
+
}] });
|
|
979
|
+
|
|
980
|
+
class SpaceCasePipe {
|
|
981
|
+
transform(value) {
|
|
982
|
+
return spaceCase(value);
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
SpaceCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: SpaceCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
986
|
+
SpaceCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: SpaceCasePipe, name: "spaceCase" });
|
|
987
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: SpaceCasePipe, decorators: [{
|
|
988
|
+
type: Pipe,
|
|
989
|
+
args: [{ name: 'spaceCase' }]
|
|
990
|
+
}] });
|
|
991
|
+
/**
|
|
992
|
+
* Adds a space before uppercase letters that either
|
|
993
|
+
* 1. follows a lowercase letter or digit
|
|
994
|
+
* 2. or precedes a lowercase letter and follows an alpha-numeric character
|
|
995
|
+
*
|
|
996
|
+
* Uppercases the first digit
|
|
997
|
+
*
|
|
998
|
+
* Turns underscores into spaces
|
|
999
|
+
*/
|
|
1000
|
+
function spaceCase(value) {
|
|
1001
|
+
return value?.replace(/(?<=[a-z0-9])([A-Z])|(?<=[a-zA-Z0-9])([A-Z])(?=[a-z])|_/g, ' $1$2')
|
|
1002
|
+
// uppercase the first character
|
|
1003
|
+
.replace(/^./, str => str.toUpperCase());
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
class ConditionalClassesDirective {
|
|
1007
|
+
constructor(el, renderer) {
|
|
1008
|
+
this.el = el;
|
|
1009
|
+
this.renderer = renderer;
|
|
1010
|
+
this.classesApplied = [];
|
|
1011
|
+
this.el.nativeElement.style.backgroundColor = 'yellow';
|
|
1012
|
+
}
|
|
1013
|
+
ngOnChanges(changes) {
|
|
1014
|
+
let toApply = [];
|
|
1015
|
+
if (this.classes) {
|
|
1016
|
+
toApply = Object.keys(this.classes)
|
|
1017
|
+
.filter(key => this.classes[key](this.element));
|
|
1018
|
+
}
|
|
1019
|
+
var classesNotYetApplied = toApply.filter(c => !this.classesApplied.includes(c));
|
|
1020
|
+
var classesToRemove = this.classesApplied.filter(c => !toApply.includes(c));
|
|
1021
|
+
classesToRemove.forEach(c => this.renderer.removeClass(this.el.nativeElement, c));
|
|
1022
|
+
classesNotYetApplied.forEach(c => this.renderer.addClass(this.el.nativeElement, c));
|
|
1023
|
+
this.classesApplied = toApply;
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
ConditionalClassesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: ConditionalClassesDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1027
|
+
ConditionalClassesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.5", type: ConditionalClassesDirective, selector: "[conditionalClasses]", inputs: { element: "element", classes: ["conditionalClasses", "classes"] }, usesOnChanges: true, ngImport: i0 });
|
|
1028
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: ConditionalClassesDirective, decorators: [{
|
|
1029
|
+
type: Directive,
|
|
1030
|
+
args: [{
|
|
1031
|
+
selector: '[conditionalClasses]'
|
|
1032
|
+
}]
|
|
1033
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { element: [{
|
|
1034
|
+
type: Input
|
|
1035
|
+
}], classes: [{
|
|
1036
|
+
type: Input,
|
|
1037
|
+
args: ['conditionalClasses']
|
|
1038
|
+
}] } });
|
|
1039
|
+
|
|
1040
|
+
class UtilitiesModule {
|
|
1041
|
+
}
|
|
1042
|
+
UtilitiesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: UtilitiesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1043
|
+
UtilitiesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: UtilitiesModule, declarations: [SpaceCasePipe,
|
|
1044
|
+
PhoneNumberPipe,
|
|
1045
|
+
FunctionPipe,
|
|
1046
|
+
StopPropagationDirective,
|
|
1047
|
+
StylerDirective,
|
|
1048
|
+
PreventEnterDirective,
|
|
1049
|
+
AutoFocusDirective,
|
|
1050
|
+
ClickSubjectDirective,
|
|
1051
|
+
ClickEmitterDirective,
|
|
1052
|
+
DialogDirective,
|
|
1053
|
+
MatSlideToggleGroupDirective,
|
|
1054
|
+
ConditionalClassesDirective], exports: [StopPropagationDirective,
|
|
1055
|
+
PreventEnterDirective,
|
|
1056
|
+
SpaceCasePipe,
|
|
1057
|
+
PhoneNumberPipe,
|
|
1058
|
+
FunctionPipe,
|
|
1059
|
+
StopPropagationDirective,
|
|
1060
|
+
StylerDirective,
|
|
1061
|
+
PreventEnterDirective,
|
|
1062
|
+
AutoFocusDirective,
|
|
1063
|
+
ClickSubjectDirective,
|
|
1064
|
+
ClickEmitterDirective,
|
|
1065
|
+
DialogDirective,
|
|
1066
|
+
MatSlideToggleGroupDirective,
|
|
1067
|
+
ConditionalClassesDirective] });
|
|
1068
|
+
UtilitiesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: UtilitiesModule, providers: [
|
|
1069
|
+
DialogService
|
|
1070
|
+
], imports: [[]] });
|
|
1071
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: UtilitiesModule, decorators: [{
|
|
1072
|
+
type: NgModule,
|
|
1073
|
+
args: [{
|
|
1074
|
+
imports: [],
|
|
1075
|
+
exports: [
|
|
1076
|
+
StopPropagationDirective,
|
|
1077
|
+
PreventEnterDirective,
|
|
1078
|
+
SpaceCasePipe,
|
|
1079
|
+
PhoneNumberPipe,
|
|
1080
|
+
FunctionPipe,
|
|
1081
|
+
StopPropagationDirective,
|
|
1082
|
+
StylerDirective,
|
|
1083
|
+
PreventEnterDirective,
|
|
1084
|
+
AutoFocusDirective,
|
|
1085
|
+
ClickSubjectDirective,
|
|
1086
|
+
ClickEmitterDirective,
|
|
1087
|
+
DialogDirective,
|
|
1088
|
+
MatSlideToggleGroupDirective,
|
|
1089
|
+
ConditionalClassesDirective,
|
|
1090
|
+
],
|
|
1091
|
+
declarations: [
|
|
1092
|
+
SpaceCasePipe,
|
|
1093
|
+
PhoneNumberPipe,
|
|
1094
|
+
FunctionPipe,
|
|
1095
|
+
StopPropagationDirective,
|
|
1096
|
+
StylerDirective,
|
|
1097
|
+
PreventEnterDirective,
|
|
1098
|
+
AutoFocusDirective,
|
|
1099
|
+
ClickSubjectDirective,
|
|
1100
|
+
ClickEmitterDirective,
|
|
1101
|
+
DialogDirective,
|
|
1102
|
+
MatSlideToggleGroupDirective,
|
|
1103
|
+
ConditionalClassesDirective,
|
|
1104
|
+
],
|
|
1105
|
+
providers: [
|
|
1106
|
+
DialogService
|
|
1107
|
+
]
|
|
1108
|
+
}]
|
|
1109
|
+
}] });
|
|
1110
|
+
|
|
1111
|
+
function isPipe(o) {
|
|
1112
|
+
return typeof (o.transform) === 'function';
|
|
1113
|
+
}
|
|
1114
|
+
class TransformCreator {
|
|
1115
|
+
constructor(datePipe, currencyPipe, phonePipe, casePipe, config) {
|
|
1116
|
+
this.datePipe = datePipe;
|
|
1117
|
+
this.currencyPipe = currencyPipe;
|
|
1118
|
+
this.phonePipe = phonePipe;
|
|
1119
|
+
this.casePipe = casePipe;
|
|
1120
|
+
this.config = config;
|
|
1121
|
+
}
|
|
1122
|
+
createTransformer(metaData) {
|
|
1123
|
+
const defaultFunc = (value) => get(value, metaData.key);
|
|
1124
|
+
if (metaData.transform) {
|
|
1125
|
+
if (isPipe(metaData.transform)) {
|
|
1126
|
+
return (value) => metaData.transform.transform(defaultFunc(value));
|
|
1127
|
+
}
|
|
1128
|
+
return metaData.transform;
|
|
1129
|
+
}
|
|
1130
|
+
if (this.config.transformers && this.config.transformers[metaData.fieldType]) {
|
|
1131
|
+
return this.config.transformers[metaData.fieldType];
|
|
1132
|
+
}
|
|
1133
|
+
switch (metaData.fieldType) {
|
|
1134
|
+
case FieldType.Date:
|
|
1135
|
+
const dateFormat = metaData.additional?.dateFormat ?? this.config.defaultSettings?.dateFormat ?? 'shortDate';
|
|
1136
|
+
return (value) => this.datePipe.transform(defaultFunc(value), dateFormat);
|
|
1137
|
+
case FieldType.Currency:
|
|
1138
|
+
return (value) => this.currencyPipe.transform(defaultFunc(value));
|
|
1139
|
+
case FieldType.PhoneNumber:
|
|
1140
|
+
return (value) => this.phonePipe.transform(defaultFunc(value));
|
|
1141
|
+
case FieldType.Enum:
|
|
1142
|
+
return (value) => this.casePipe.transform(metaData.additional?.enumMap[defaultFunc(value)]);
|
|
1143
|
+
case FieldType.Boolean:
|
|
1144
|
+
let forTrue = 'check';
|
|
1145
|
+
let forFalse = '';
|
|
1146
|
+
if (metaData.additional?.boolean?.forTrue) {
|
|
1147
|
+
forTrue = metaData?.additional.boolean.forTrue.icon;
|
|
1148
|
+
}
|
|
1149
|
+
if (metaData.additional?.boolean?.showForFalse === true) {
|
|
1150
|
+
forFalse = 'clear';
|
|
1151
|
+
}
|
|
1152
|
+
else if (metaData.additional?.boolean?.showForFalse?.icon) {
|
|
1153
|
+
forFalse = metaData.additional?.boolean?.showForFalse?.icon;
|
|
1154
|
+
}
|
|
1155
|
+
return (value) => defaultFunc(value) ? forTrue : forFalse;
|
|
1156
|
+
}
|
|
1157
|
+
return defaultFunc;
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
TransformCreator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: TransformCreator, deps: [{ token: i1$1.DatePipe }, { token: i1$1.CurrencyPipe }, { token: PhoneNumberPipe }, { token: SpaceCasePipe }, { token: TableBuilderConfigToken }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1161
|
+
TransformCreator.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: TransformCreator, providedIn: 'root' });
|
|
1162
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: TransformCreator, decorators: [{
|
|
1163
|
+
type: Injectable,
|
|
1164
|
+
args: [{
|
|
1165
|
+
providedIn: 'root',
|
|
1166
|
+
}]
|
|
1167
|
+
}], ctorParameters: function () { return [{ type: i1$1.DatePipe }, { type: i1$1.CurrencyPipe }, { type: PhoneNumberPipe }, { type: SpaceCasePipe }, { type: undefined, decorators: [{
|
|
1168
|
+
type: Inject,
|
|
1169
|
+
args: [TableBuilderConfigToken]
|
|
1170
|
+
}] }]; } });
|
|
1171
|
+
|
|
1172
|
+
class GeneralTableSettings {
|
|
1173
|
+
constructor(settings) {
|
|
1174
|
+
this.headerSettings = new TableWrapperHeaderSettings();
|
|
1175
|
+
this.footerSettings = new TableWrapperFooterSettings();
|
|
1176
|
+
this.columnHeaderSettings = new TableColumnHeaderSettings();
|
|
1177
|
+
if (settings) {
|
|
1178
|
+
merge$1(this.headerSettings, settings.headerSettings);
|
|
1179
|
+
merge$1(this.footerSettings, settings.footerSettings);
|
|
1180
|
+
merge$1(this.columnHeaderSettings, settings.columnHeaderSettings);
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
class TableWrapperHeaderSettings {
|
|
1185
|
+
constructor() {
|
|
1186
|
+
this.hideExport = false;
|
|
1187
|
+
this.hideFilter = false;
|
|
1188
|
+
this.hideColumnSettings = false;
|
|
1189
|
+
this.hideHeader = false;
|
|
1190
|
+
this.hideSort = false;
|
|
1191
|
+
this.collapse = false;
|
|
1192
|
+
this.showTitleWhenCollapsed = true;
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
class TableWrapperFooterSettings {
|
|
1196
|
+
constructor() {
|
|
1197
|
+
this.collapse = false;
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
class TableColumnHeaderSettings {
|
|
1201
|
+
constructor() {
|
|
1202
|
+
this.noFilters = false;
|
|
1203
|
+
this.noHeader = false;
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1206
|
+
class PesrsistedTableSettings {
|
|
1207
|
+
constructor(tableSettings) {
|
|
1208
|
+
this.collapseHeader = false;
|
|
1209
|
+
this.collapseFooter = false;
|
|
1210
|
+
if (tableSettings) {
|
|
1211
|
+
this.collapseHeader = tableSettings.headerSettings?.collapse ?? tableSettings.collapseHeader;
|
|
1212
|
+
this.collapseFooter = tableSettings.footerSettings?.collapse ?? tableSettings.collapseFooter;
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
class NotPersisitedTableSettings {
|
|
1217
|
+
constructor(tableSettings) {
|
|
1218
|
+
this.hideExport = true;
|
|
1219
|
+
this.hideFilter = true;
|
|
1220
|
+
this.hideColumnSettings = true;
|
|
1221
|
+
this.hideSort = true;
|
|
1222
|
+
this.showTitleWhenHeaderCollapsed = true;
|
|
1223
|
+
this.hideHeader = true;
|
|
1224
|
+
this.hideColumnHeaderFilters = true;
|
|
1225
|
+
this.hideColumnHeader = true;
|
|
1226
|
+
if (tableSettings) {
|
|
1227
|
+
this.hideExport = tableSettings.headerSettings.hideExport;
|
|
1228
|
+
this.hideColumnSettings = tableSettings.headerSettings.hideColumnSettings;
|
|
1229
|
+
this.hideFilter = tableSettings.headerSettings.hideFilter;
|
|
1230
|
+
this.hideSort = tableSettings.headerSettings.hideSort;
|
|
1231
|
+
this.showTitleWhenHeaderCollapsed = tableSettings.headerSettings.showTitleWhenCollapsed;
|
|
1232
|
+
this.hideHeader = tableSettings.headerSettings.hideHeader;
|
|
1233
|
+
this.hideColumnHeaderFilters = tableSettings.columnHeaderSettings.noFilters;
|
|
1234
|
+
this.hideColumnHeader = tableSettings.columnHeaderSettings.noHeader;
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
var InitializationState;
|
|
1240
|
+
(function (InitializationState) {
|
|
1241
|
+
InitializationState[InitializationState["Created"] = 0] = "Created";
|
|
1242
|
+
InitializationState[InitializationState["MetaDataLoaded"] = 1] = "MetaDataLoaded";
|
|
1243
|
+
InitializationState[InitializationState["LoadedFromStore"] = 2] = "LoadedFromStore";
|
|
1244
|
+
InitializationState[InitializationState["Ready"] = 3] = "Ready";
|
|
1245
|
+
})(InitializationState || (InitializationState = {}));
|
|
1246
|
+
const defaultTableState = {
|
|
1247
|
+
initializationState: InitializationState.Created,
|
|
1248
|
+
metaData: {},
|
|
1249
|
+
filters: {},
|
|
1250
|
+
hiddenKeys: [],
|
|
1251
|
+
sorted: [],
|
|
1252
|
+
userDefined: { order: {}, widths: {}, table: {} },
|
|
1253
|
+
persistedTableSettings: new PesrsistedTableSettings(),
|
|
1254
|
+
notPersisitedTableSettings: new NotPersisitedTableSettings(),
|
|
1255
|
+
pageSize: 10,
|
|
1256
|
+
};
|
|
1257
|
+
|
|
1258
|
+
var FilterType;
|
|
1259
|
+
(function (FilterType) {
|
|
1260
|
+
FilterType["NumberEquals"] = "Equals";
|
|
1261
|
+
FilterType["NumberNotEqual"] = "Does Not Equal";
|
|
1262
|
+
FilterType["NumberGreaterThan"] = "Greater Than";
|
|
1263
|
+
FilterType["NumberLessThan"] = "Less Than";
|
|
1264
|
+
FilterType["NumberBetween"] = "Between";
|
|
1265
|
+
FilterType["StringEquals"] = "Equals";
|
|
1266
|
+
FilterType["StringContains"] = "Contains";
|
|
1267
|
+
FilterType["StringDoesNotContain"] = "Does Not Contain";
|
|
1268
|
+
FilterType["StringStartWith"] = "Start With";
|
|
1269
|
+
FilterType["StringEndsWith"] = "Ends With";
|
|
1270
|
+
FilterType["DateIsOn"] = "Is on";
|
|
1271
|
+
FilterType["DateIsNotOn"] = "Is Not On";
|
|
1272
|
+
FilterType["DateOnOrAfter"] = "On or After";
|
|
1273
|
+
FilterType["DateOnOrBefore"] = "On or Before";
|
|
776
1274
|
FilterType["DateBetween"] = "Between";
|
|
777
1275
|
FilterType["BooleanEquals"] = "Is";
|
|
778
1276
|
FilterType["IsNull"] = "Is Blank";
|
|
@@ -987,7 +1485,7 @@ function createFilterFunc(filter) {
|
|
|
987
1485
|
}
|
|
988
1486
|
const cannotBeTrueForNull = !FalseyValueCanBeIncludedFilterTypes.includes(filter.filterType);
|
|
989
1487
|
return (rowObj) => {
|
|
990
|
-
const value = rowObj
|
|
1488
|
+
const value = get(rowObj, filter.key);
|
|
991
1489
|
return ((value == undefined) && cannotBeTrueForNull)
|
|
992
1490
|
? false
|
|
993
1491
|
: func(value);
|
|
@@ -1119,7 +1617,8 @@ class TableStore extends ComponentStore {
|
|
|
1119
1617
|
});
|
|
1120
1618
|
this.updateStateFunc = (state, incomingTableState) => {
|
|
1121
1619
|
const metaData = state.metaData;
|
|
1122
|
-
const sorted = incomingTableState.sorted?.length ? incomingTableState.sorted
|
|
1620
|
+
const sorted = incomingTableState.sorted?.length ? incomingTableState.sorted
|
|
1621
|
+
: state.initializationState === InitializationState.Created ? this.createPreSort(metaData) : state.sorted;
|
|
1123
1622
|
return { ...state, ...incomingTableState, metaData, sorted };
|
|
1124
1623
|
};
|
|
1125
1624
|
this.setPageSize = this.updater((state, pageSize) => ({ ...state, pageSize }));
|
|
@@ -1275,7 +1774,7 @@ ArrayColumnComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
|
|
|
1275
1774
|
</ng-container>
|
|
1276
1775
|
</ng-container>
|
|
1277
1776
|
</ng-template>
|
|
1278
|
-
`, isInline: true, directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1777
|
+
`, isInline: true, directives: [{ type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i1$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1279
1778
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: ArrayColumnComponent, decorators: [{
|
|
1280
1779
|
type: Component,
|
|
1281
1780
|
args: [{
|
|
@@ -1299,61 +1798,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
1299
1798
|
type: Inject,
|
|
1300
1799
|
args: [TableBuilderConfigToken]
|
|
1301
1800
|
}] }]; }, propDecorators: { array: [{
|
|
1302
|
-
type: Input
|
|
1303
|
-
}], metaData: [{
|
|
1304
|
-
type: Input
|
|
1305
|
-
}] } });
|
|
1306
|
-
|
|
1307
|
-
class FunctionPipe {
|
|
1308
|
-
transform(func, ...args) {
|
|
1309
|
-
if (typeof func === 'string') {
|
|
1310
|
-
const [instance, ...tail] = args;
|
|
1311
|
-
const method = instance[func].bind(instance);
|
|
1312
|
-
return method(...tail);
|
|
1313
|
-
}
|
|
1314
|
-
return func(...args);
|
|
1315
|
-
}
|
|
1316
|
-
}
|
|
1317
|
-
FunctionPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: FunctionPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1318
|
-
FunctionPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: FunctionPipe, name: "func" });
|
|
1319
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: FunctionPipe, decorators: [{
|
|
1320
|
-
type: Pipe,
|
|
1321
|
-
args: [{
|
|
1322
|
-
name: 'func'
|
|
1323
|
-
}]
|
|
1324
|
-
}] });
|
|
1325
|
-
|
|
1326
|
-
class SpaceCasePipe {
|
|
1327
|
-
transform(value) {
|
|
1328
|
-
return spaceCase(value);
|
|
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
|
-
}
|
|
1801
|
+
type: Input
|
|
1802
|
+
}], metaData: [{
|
|
1803
|
+
type: Input
|
|
1804
|
+
}] } });
|
|
1351
1805
|
|
|
1352
1806
|
class InitializationComponent {
|
|
1353
1807
|
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
1808
|
this.useRouterLink = (metaData) => metaData.additional?.link?.useRouterLink || metaData.additional?.useRouterLink;
|
|
1358
1809
|
this.target = (metaData) => metaData.additional?.link?.target || metaData.additional?.target || '_blank';
|
|
1359
1810
|
this.key = (metaData, element) => metaData.additional?.link?.urlKey ? element[metaData.additional?.link?.urlKey] :
|
|
@@ -1362,7 +1813,8 @@ class InitializationComponent {
|
|
|
1362
1813
|
const hasRoute = !!metaData.additional?.link?.interpolatedRoute;
|
|
1363
1814
|
let link = hasRoute ? this.parseInterpolatedRoute((metaData.additional?.link?.interpolatedRoute), element) : (metaData.additional?.link?.base || metaData.additional?.base);
|
|
1364
1815
|
if (!hasRoute) {
|
|
1365
|
-
|
|
1816
|
+
var needsSlash = !link?.endsWith('/');
|
|
1817
|
+
link += `${needsSlash ? '/' : ''}${this.key(metaData, element)}`;
|
|
1366
1818
|
}
|
|
1367
1819
|
return link;
|
|
1368
1820
|
};
|
|
@@ -1370,14 +1822,11 @@ class InitializationComponent {
|
|
|
1370
1822
|
}
|
|
1371
1823
|
}
|
|
1372
1824
|
InitializationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: InitializationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1373
|
-
InitializationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.5", type: InitializationComponent, selector: "ng-component", viewQueries: [{ propertyName: "
|
|
1825
|
+
InitializationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.5", 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'>\n <a *ngIf=\"useRouterLink | func : metaData; else hrefLink\" target=\"{{target | func : metaData }}\"\n [routerLink]=\" [(getLink | func : metaData : element)]\">\n {{element[metaData.key]}}\n </a>\n <ng-template #hrefLink>\n <a target=\"{{target | func : metaData}}\"\n href=\"{{(getLink | func : metaData : element)}}\">\n {{element[metaData.key]}}\n </a>\n </ng-template>\n</ng-template>\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", components: [{ type: ArrayColumnComponent, selector: "tb-array-column", inputs: ["array", "metaData"] }, { type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }], pipes: { "func": FunctionPipe } });
|
|
1374
1826
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: InitializationComponent, decorators: [{
|
|
1375
1827
|
type: Component,
|
|
1376
|
-
args: [{ template: "<ng-template #
|
|
1377
|
-
}], propDecorators: {
|
|
1378
|
-
type: ViewChild,
|
|
1379
|
-
args: ['boolean', { static: true }]
|
|
1380
|
-
}], linkTemplate: [{
|
|
1828
|
+
args: [{ template: "<ng-template #link let-element='element' let-metaData='metaData'>\n <a *ngIf=\"useRouterLink | func : metaData; else hrefLink\" target=\"{{target | func : metaData }}\"\n [routerLink]=\" [(getLink | func : metaData : element)]\">\n {{element[metaData.key]}}\n </a>\n <ng-template #hrefLink>\n <a target=\"{{target | func : metaData}}\"\n href=\"{{(getLink | func : metaData : element)}}\">\n {{element[metaData.key]}}\n </a>\n </ng-template>\n</ng-template>\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" }]
|
|
1829
|
+
}], propDecorators: { linkTemplate: [{
|
|
1381
1830
|
type: ViewChild,
|
|
1382
1831
|
args: ['link', { static: true }]
|
|
1383
1832
|
}], imageUrlTemplate: [{
|
|
@@ -1389,15 +1838,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
1389
1838
|
}], arrayTemplate: [{
|
|
1390
1839
|
type: ViewChild,
|
|
1391
1840
|
args: ['array', { static: true }]
|
|
1392
|
-
}], expressionTemplate: [{
|
|
1393
|
-
type: ViewChild,
|
|
1394
|
-
args: ['expression', { static: true }]
|
|
1395
1841
|
}], defaultTemplate: [{
|
|
1396
1842
|
type: ViewChild,
|
|
1397
1843
|
args: ['default', { static: true }]
|
|
1398
|
-
}],
|
|
1844
|
+
}], defaultWithIcon: [{
|
|
1399
1845
|
type: ViewChild,
|
|
1400
|
-
args: ['
|
|
1846
|
+
args: ['defaultWithIcon', { static: true }]
|
|
1401
1847
|
}] } });
|
|
1402
1848
|
|
|
1403
1849
|
class TableTemplateService {
|
|
@@ -1410,20 +1856,26 @@ class TableTemplateService {
|
|
|
1410
1856
|
initTemplates() {
|
|
1411
1857
|
this.templates = {};
|
|
1412
1858
|
this.templates[FieldType.Array] = this.instance.arrayTemplate;
|
|
1413
|
-
this.templates[FieldType.Boolean] = this.instance.
|
|
1414
|
-
this.templates[FieldType.Currency] = this.instance.
|
|
1859
|
+
this.templates[FieldType.Boolean] = this.instance.defaultWithIcon;
|
|
1860
|
+
this.templates[FieldType.Currency] = this.instance.defaultTemplate;
|
|
1415
1861
|
this.templates[FieldType.Date] = this.instance.defaultTemplate;
|
|
1416
|
-
this.templates[FieldType.Expression] = this.instance.
|
|
1862
|
+
this.templates[FieldType.Expression] = this.instance.defaultTemplate;
|
|
1417
1863
|
this.templates[FieldType.ImageUrl] = this.instance.imageUrlTemplate;
|
|
1418
1864
|
this.templates[FieldType.Link] = this.instance.linkTemplate;
|
|
1419
1865
|
this.templates[FieldType.Number] = this.instance.defaultTemplate;
|
|
1420
1866
|
this.templates[FieldType.PhoneNumber] = this.instance.defaultTemplate;
|
|
1421
1867
|
this.templates[FieldType.String] = this.instance.defaultTemplate;
|
|
1422
1868
|
this.templates[FieldType.Unknown] = this.instance.defaultTemplate;
|
|
1423
|
-
this.templates[FieldType.Enum] = this.instance.
|
|
1869
|
+
this.templates[FieldType.Enum] = this.instance.defaultTemplate;
|
|
1424
1870
|
}
|
|
1425
|
-
getTemplate(
|
|
1426
|
-
|
|
1871
|
+
getTemplate(metaData) {
|
|
1872
|
+
let tmp = this.templates[metaData.fieldType];
|
|
1873
|
+
if (metaData.useIcon) {
|
|
1874
|
+
if (tmp === this.instance.defaultTemplate) {
|
|
1875
|
+
tmp = this.instance.defaultWithIcon;
|
|
1876
|
+
}
|
|
1877
|
+
}
|
|
1878
|
+
return tmp;
|
|
1427
1879
|
}
|
|
1428
1880
|
}
|
|
1429
1881
|
TableTemplateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: TableTemplateService, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -1433,29 +1885,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
1433
1885
|
args: [{ providedIn: 'root' }]
|
|
1434
1886
|
}], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i0.Injector }]; } });
|
|
1435
1887
|
|
|
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
1888
|
class InListFilterComponent {
|
|
1460
1889
|
constructor(ref, tableState) {
|
|
1461
1890
|
this.ref = ref;
|
|
@@ -1514,7 +1943,7 @@ InListFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
1514
1943
|
{{metaData.fieldType === FieldType.Enum ? (item.value | spaceCase) : item.value}}
|
|
1515
1944
|
</mat-checkbox>
|
|
1516
1945
|
</div>
|
|
1517
|
-
`, isInline: true, components: [{ type:
|
|
1946
|
+
`, isInline: true, components: [{ type: i4$2.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], directives: [{ type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: StopPropagationDirective, selector: "[stop-propagation]" }], pipes: { "keyvalue": i1$1.KeyValuePipe, "async": i1$1.AsyncPipe, "spaceCase": SpaceCasePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1518
1947
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: InListFilterComponent, decorators: [{
|
|
1519
1948
|
type: Component,
|
|
1520
1949
|
args: [{
|
|
@@ -1596,7 +2025,7 @@ class HeaderMenuComponent {
|
|
|
1596
2025
|
}
|
|
1597
2026
|
}
|
|
1598
2027
|
HeaderMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: HeaderMenuComponent, deps: [{ token: TableStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
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 });
|
|
2028
|
+
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.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$3.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: i4$3.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$3.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$1.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$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: StopPropagationDirective, selector: "[stop-propagation]" }, { type: i6.MatPrefix, selector: "[matPrefix]" }, { type: i6.MatLabel, selector: "mat-label" }, { type: i4$4.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: i8$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i1$1.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
2029
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: HeaderMenuComponent, decorators: [{
|
|
1601
2030
|
type: Component,
|
|
1602
2031
|
args: [{ selector: 'tb-header-menu', changeDetection: ChangeDetectionStrategy.OnPush, 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"] }]
|
|
@@ -1609,30 +2038,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
1609
2038
|
args: [MatMenuTrigger]
|
|
1610
2039
|
}] } });
|
|
1611
2040
|
|
|
1612
|
-
class StylerDirective {
|
|
1613
|
-
constructor(el) {
|
|
1614
|
-
this.el = el;
|
|
1615
|
-
}
|
|
1616
|
-
set styler(styles) {
|
|
1617
|
-
if (styles) {
|
|
1618
|
-
Object.keys(styles).forEach(style => {
|
|
1619
|
-
this.el.nativeElement.style[style] = styles[style];
|
|
1620
|
-
});
|
|
1621
|
-
}
|
|
1622
|
-
}
|
|
1623
|
-
;
|
|
1624
|
-
}
|
|
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
|
-
|
|
1636
2041
|
class ResizeColumnDirective {
|
|
1637
2042
|
constructor(renderer, el, store) {
|
|
1638
2043
|
this.renderer = renderer;
|
|
@@ -1755,12 +2160,21 @@ class ColumnBuilderComponent {
|
|
|
1755
2160
|
return this.metaData.template;
|
|
1756
2161
|
if (this.customCell?.TemplateRef)
|
|
1757
2162
|
return this.customCell.TemplateRef;
|
|
1758
|
-
return this.templateService.getTemplate(this.metaData
|
|
2163
|
+
return this.templateService.getTemplate(this.metaData);
|
|
1759
2164
|
}
|
|
1760
2165
|
getOuterTemplate() {
|
|
1761
2166
|
return this.customCell?.columnDef?.cell?.template ?? this.bodyTemplate;
|
|
1762
2167
|
}
|
|
1763
2168
|
ngOnInit() {
|
|
2169
|
+
if (this.metaData.fieldType === FieldType.Currency) {
|
|
2170
|
+
this.classes = {
|
|
2171
|
+
['negative-currency']: (element) => element[this.metaData.key] < 0,
|
|
2172
|
+
...this.metaData.classes
|
|
2173
|
+
};
|
|
2174
|
+
}
|
|
2175
|
+
else {
|
|
2176
|
+
this.classes = this.metaData.classes;
|
|
2177
|
+
}
|
|
1764
2178
|
this.filter = { key: this.metaData.key, fieldType: this.metaData.fieldType };
|
|
1765
2179
|
const width$ = this.state.getUserDefinedWidth$(this.metaData.key).pipe(previousAndCurrent(0), map(this.mapWidth));
|
|
1766
2180
|
const fullMetaStyles = this.metaData.additional?.styles ?? {};
|
|
@@ -1786,16 +2200,16 @@ class ColumnBuilderComponent {
|
|
|
1786
2200
|
}
|
|
1787
2201
|
}
|
|
1788
2202
|
}
|
|
1789
|
-
ColumnBuilderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: ColumnBuilderComponent, deps: [{ token: TransformCreator }, { token: i3$
|
|
1790
|
-
ColumnBuilderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.5", 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
|
|
2203
|
+
ColumnBuilderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: ColumnBuilderComponent, deps: [{ token: TransformCreator }, { token: i3$1.MatTable }, { token: TableStore }, { token: TableTemplateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2204
|
+
ColumnBuilderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.5", 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 }\">\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"], components: [{ type: i1$2.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "mat-sort-header", "arrowPosition", "start", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { type: HeaderMenuComponent, selector: "tb-header-menu", inputs: ["filter", "metaData"] }], directives: [{ type: i7$1.LetDirective, selector: "[ngrxLet]", inputs: ["ngrxLet"] }, { type: i3$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { type: i3$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { type: i8$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: ConditionalClassesDirective, selector: "[conditionalClasses]", inputs: ["element", "conditionalClasses"] }, { type: StylerDirective, selector: "[styler]", inputs: ["styler"] }, { type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { type: i12.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { type: ResizeColumnDirective, selector: "[resizeColumn]", inputs: ["resizeColumn", "key"] }, { type: i12.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { type: i3$1.MatCellDef, selector: "[matCellDef]" }, { type: i3$1.MatFooterCellDef, selector: "[matFooterCellDef]" }, { type: i3$1.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { type: i1$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i1$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], pipes: { "spaceCase": SpaceCasePipe, "async": i1$1.AsyncPipe, "currency": i1$1.CurrencyPipe, "columnTotal": ColumnTotalPipe, "number": i1$1.DecimalPipe }, viewProviders: [
|
|
1791
2205
|
{ provide: CDK_DROP_LIST, useExisting: CdkDropList },
|
|
1792
2206
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1793
2207
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: ColumnBuilderComponent, decorators: [{
|
|
1794
2208
|
type: Component,
|
|
1795
2209
|
args: [{ selector: 'tb-column-builder', changeDetection: ChangeDetectionStrategy.OnPush, viewProviders: [
|
|
1796
2210
|
{ 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: i3$
|
|
2211
|
+
], 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 }\">\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"] }]
|
|
2212
|
+
}], ctorParameters: function () { return [{ type: TransformCreator }, { type: i3$1.MatTable }, { type: TableStore }, { type: TableTemplateService }]; }, propDecorators: { metaData: [{
|
|
1799
2213
|
type: Input
|
|
1800
2214
|
}], customCell: [{
|
|
1801
2215
|
type: Input
|
|
@@ -1876,7 +2290,7 @@ PaginatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
|
|
|
1876
2290
|
<mat-paginator [pageSizeOptions]="[5, 10, 20, 50, 100, 500]" showFirstLastButtons (page)="paginatorChange()"
|
|
1877
2291
|
[ngClass]="{'hide' : (collapseFooter$ | async)}">
|
|
1878
2292
|
</mat-paginator>
|
|
1879
|
-
`, isInline: true, styles: [".mat-row:nth-child(odd){background-color:#cdeefe}.sticky{bottom:0px;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-paginator-container{min-height:initial!important}:host::ng-deep .mat-paginator-container .mat-form-field-infix{padding:0!important}.group-header{font-weight:700;font-size:20px}: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)}\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"], components: [{ type: i2.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "async": i1.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2293
|
+
`, isInline: true, styles: [".mat-row:nth-child(odd){background-color:#cdeefe}.sticky{bottom:0px;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-paginator-container{min-height:initial!important}:host::ng-deep .mat-paginator-container .mat-form-field-infix{padding:0!important}.group-header{font-weight:700;font-size:20px}: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)}\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"], components: [{ type: i2.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }], directives: [{ type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "async": i1$1.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1880
2294
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: PaginatorComponent, decorators: [{
|
|
1881
2295
|
type: Component,
|
|
1882
2296
|
args: [{ selector: 'tb-paginator', template: `
|
|
@@ -2043,12 +2457,12 @@ class GenericTableComponent {
|
|
|
2043
2457
|
this.selection.select(...this.dataSource.data);
|
|
2044
2458
|
}
|
|
2045
2459
|
}
|
|
2046
|
-
GenericTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: GenericTableComponent, deps: [{ token: i1$
|
|
2047
|
-
GenericTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.5", type: GenericTableComponent, selector: "tb-generic-table", inputs: { data$: "data$", IndexColumn: "IndexColumn", SelectionColumn: "SelectionColumn", trackBy: "trackBy", rows: "rows", isSticky: "isSticky", columnBuilders: "columnBuilders", columnInfos: "columnInfos", 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 }], 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\" style=\"flex: 0 0 30px;\" >\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\" style=\"flex: 0 0 30px;\">\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 style=\"flex: 0 0 30px;\">\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\n </ng-container>\n\n <ng-container matColumnDef=\"groupHeader\">\n <mat-cell *matCellDef=\"let row\" class=\"group-header\">\n {{row.groupHeaderName}}\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: lightgray;\"></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-row:nth-child(odd){background-color:#cdeefe}.sticky{bottom:0px;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-paginator-container{min-height:initial!important}:host::ng-deep .mat-paginator-container .mat-form-field-infix{padding:0!important}.group-header{font-weight:700;font-size:20px}: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)}\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"], components: [{ type: i3$
|
|
2460
|
+
GenericTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: GenericTableComponent, deps: [{ token: i1$2.MatSort }, { token: TableStore }, { token: i0.ViewContainerRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
2461
|
+
GenericTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.5", type: GenericTableComponent, selector: "tb-generic-table", inputs: { data$: "data$", IndexColumn: "IndexColumn", SelectionColumn: "SelectionColumn", trackBy: "trackBy", rows: "rows", isSticky: "isSticky", columnBuilders: "columnBuilders", columnInfos: "columnInfos", 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 }], 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\" style=\"flex: 0 0 30px;\" >\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\" style=\"flex: 0 0 30px;\">\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 style=\"flex: 0 0 30px;\">\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\n </ng-container>\n\n <ng-container matColumnDef=\"groupHeader\">\n <mat-cell *matCellDef=\"let row\" class=\"group-header\">\n {{row.groupHeaderName}}\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: lightgray;\"></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-row:nth-child(odd){background-color:#cdeefe}.sticky{bottom:0px;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-paginator-container{min-height:initial!important}:host::ng-deep .mat-paginator-container .mat-form-field-infix{padding:0!important}.group-header{font-weight:700;font-size:20px}: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)}\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"], components: [{ type: i3$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { type: i4$2.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i3$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { type: i3$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { type: i3$1.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { type: PaginatorComponent, selector: "tb-paginator", inputs: ["dataSource", "tableElRef", "data$"] }, { type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i12.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"] }, { type: StylerDirective, selector: "[styler]", inputs: ["styler"] }, { type: i3$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { type: i3$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { type: i3$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { type: i3$1.MatCellDef, selector: "[matCellDef]" }, { type: i3$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.MatFooterCellDef, selector: "[matFooterCellDef]" }, { type: i3$1.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { type: i3$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { type: i3$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { type: i3$1.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { type: i8$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }], pipes: { "async": i1$1.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2048
2462
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: GenericTableComponent, decorators: [{
|
|
2049
2463
|
type: Component,
|
|
2050
2464
|
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\" style=\"flex: 0 0 30px;\" >\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\" style=\"flex: 0 0 30px;\">\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 style=\"flex: 0 0 30px;\">\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\n </ng-container>\n\n <ng-container matColumnDef=\"groupHeader\">\n <mat-cell *matCellDef=\"let row\" class=\"group-header\">\n {{row.groupHeaderName}}\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: lightgray;\"></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-row:nth-child(odd){background-color:#cdeefe}.sticky{bottom:0px;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-paginator-container{min-height:initial!important}:host::ng-deep .mat-paginator-container .mat-form-field-infix{padding:0!important}.group-header{font-weight:700;font-size:20px}: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)}\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
|
-
}], ctorParameters: function () { return [{ type: i1$
|
|
2465
|
+
}], ctorParameters: function () { return [{ type: i1$2.MatSort }, { type: TableStore }, { type: i0.ViewContainerRef }, { type: i0.Injector }]; }, propDecorators: { data$: [{
|
|
2052
2466
|
type: Input
|
|
2053
2467
|
}], IndexColumn: [{
|
|
2054
2468
|
type: Input
|
|
@@ -2109,7 +2523,7 @@ class CustomCellDirective {
|
|
|
2109
2523
|
};
|
|
2110
2524
|
}
|
|
2111
2525
|
}
|
|
2112
|
-
CustomCellDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: CustomCellDirective, deps: [{ token: i0.TemplateRef, optional: true }, { token: i1$
|
|
2526
|
+
CustomCellDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: CustomCellDirective, deps: [{ token: i0.TemplateRef, optional: true }, { token: i1$3.CdkColumnDef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2113
2527
|
CustomCellDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.5", type: CustomCellDirective, selector: "[customCell]", inputs: { customCell: "customCell", displayName: "displayName", preSort: "preSort", TemplateRef: "TemplateRef", customCellOrder: "customCellOrder", customCellWidth: "customCellWidth" }, ngImport: i0 });
|
|
2114
2528
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: CustomCellDirective, decorators: [{
|
|
2115
2529
|
type: Directive,
|
|
@@ -2118,7 +2532,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2118
2532
|
}]
|
|
2119
2533
|
}], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
|
|
2120
2534
|
type: Optional
|
|
2121
|
-
}] }, { type: i1$
|
|
2535
|
+
}] }, { type: i1$3.CdkColumnDef, decorators: [{
|
|
2122
2536
|
type: Optional
|
|
2123
2537
|
}] }]; }, propDecorators: { customCell: [{
|
|
2124
2538
|
type: Input
|
|
@@ -2160,7 +2574,7 @@ class GenColDisplayerComponent {
|
|
|
2160
2574
|
}
|
|
2161
2575
|
}
|
|
2162
2576
|
GenColDisplayerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: GenColDisplayerComponent, deps: [{ token: TableStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
2163
|
-
GenColDisplayerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.5", 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 <div style=\"display: flex; flex-direction: row-reverse;\">\n <span matTooltip=\"Close\">\n <button class=\"filter-button\" mat-icon-button>\n <mat-icon>close</mat-icon>\n </button>\n </span>\n </div>\n </button>\n <button mat-menu-item stop-propagation>\n <div style=\"display: flex; justify-content: space-between;\">\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 </div>\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; justify-content: space-between; align-items: center;\">\n <p class=\"label\" style=\"display: flex;\">\n {{col.displayName || (col.key | spaceCase) }}\n </p>\n <span matTooltip=\"Hide Column\" class=\"show-hide\" *ngIf=\"col.isVisible; else hidden\">\n <button mat-icon-button>\n <mat-icon color=\"primary\">check_box</mat-icon>\n </button>\n </span>\n\n <ng-template #hidden >\n <span matTooltip=\"Show Column\" class=\"show-hide\">\n <button mat-icon-button>\n <mat-icon>indeterminate_check_box</mat-icon>\n </button>\n </span>\n </ng-template>\n\n </div>\n </button>\n </div>\n </mat-menu>\n</ng-container>\n", styles: [".show-hide{margin-left:15px}.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)}\n"], components: [{ type: i3
|
|
2577
|
+
GenColDisplayerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.5", 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 <div style=\"display: flex; flex-direction: row-reverse;\">\n <span matTooltip=\"Close\">\n <button class=\"filter-button\" mat-icon-button>\n <mat-icon>close</mat-icon>\n </button>\n </span>\n </div>\n </button>\n <button mat-menu-item stop-propagation>\n <div style=\"display: flex; justify-content: space-between;\">\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 </div>\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; justify-content: space-between; align-items: center;\">\n <p class=\"label\" style=\"display: flex;\">\n {{col.displayName || (col.key | spaceCase) }}\n </p>\n <span matTooltip=\"Hide Column\" class=\"show-hide\" *ngIf=\"col.isVisible; else hidden\">\n <button mat-icon-button>\n <mat-icon color=\"primary\">check_box</mat-icon>\n </button>\n </span>\n\n <ng-template #hidden >\n <span matTooltip=\"Show Column\" class=\"show-hide\">\n <button mat-icon-button>\n <mat-icon>indeterminate_check_box</mat-icon>\n </button>\n </span>\n </ng-template>\n\n </div>\n </button>\n </div>\n </mat-menu>\n</ng-container>\n", styles: [".show-hide{margin-left:15px}.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)}\n"], components: [{ type: i3.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$3.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: i4$3.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }], directives: [{ type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i4$3.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { type: StopPropagationDirective, selector: "[stop-propagation]" }, { type: i12.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"] }, { type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i12.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }], pipes: { "async": i1$1.AsyncPipe, "spaceCase": SpaceCasePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2164
2578
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: GenColDisplayerComponent, decorators: [{
|
|
2165
2579
|
type: Component,
|
|
2166
2580
|
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 <div style=\"display: flex; flex-direction: row-reverse;\">\n <span matTooltip=\"Close\">\n <button class=\"filter-button\" mat-icon-button>\n <mat-icon>close</mat-icon>\n </button>\n </span>\n </div>\n </button>\n <button mat-menu-item stop-propagation>\n <div style=\"display: flex; justify-content: space-between;\">\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 </div>\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; justify-content: space-between; align-items: center;\">\n <p class=\"label\" style=\"display: flex;\">\n {{col.displayName || (col.key | spaceCase) }}\n </p>\n <span matTooltip=\"Hide Column\" class=\"show-hide\" *ngIf=\"col.isVisible; else hidden\">\n <button mat-icon-button>\n <mat-icon color=\"primary\">check_box</mat-icon>\n </button>\n </span>\n\n <ng-template #hidden >\n <span matTooltip=\"Show Column\" class=\"show-hide\">\n <button mat-icon-button>\n <mat-icon>indeterminate_check_box</mat-icon>\n </button>\n </span>\n </ng-template>\n\n </div>\n </button>\n </div>\n </mat-menu>\n</ng-container>\n", styles: [".show-hide{margin-left:15px}.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)}\n"] }]
|
|
@@ -2198,36 +2612,12 @@ class GenFilterDisplayerComponent {
|
|
|
2198
2612
|
}
|
|
2199
2613
|
}
|
|
2200
2614
|
GenFilterDisplayerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: GenFilterDisplayerComponent, deps: [{ token: TableStore }, { token: WrapperFilterStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
2201
|
-
GenFilterDisplayerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.5", 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 class=\"filter-labels\" *ngFor=\"let md of filterCols$ | async\" (click)=\"addFilter(md)\" mat-menu-item>\n {{md.displayName || (md.key | spaceCase)}}\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{font-size:24px;font-weight:700;height:initial;line-height:initial}.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"], components: [{ type: i3
|
|
2615
|
+
GenFilterDisplayerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.5", 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 class=\"filter-labels\" *ngFor=\"let md of filterCols$ | async\" (click)=\"addFilter(md)\" mat-menu-item>\n {{md.displayName || (md.key | spaceCase)}}\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{font-size:24px;font-weight:700;height:initial;line-height:initial}.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"], components: [{ type: i3.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$3.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: i4$3.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }], directives: [{ type: StopPropagationDirective, selector: "[stop-propagation]" }, { type: i8$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i4$3.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i1$1.AsyncPipe, "spaceCase": SpaceCasePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2202
2616
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: GenFilterDisplayerComponent, decorators: [{
|
|
2203
2617
|
type: Component,
|
|
2204
2618
|
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 class=\"filter-labels\" *ngFor=\"let md of filterCols$ | async\" (click)=\"addFilter(md)\" mat-menu-item>\n {{md.displayName || (md.key | spaceCase)}}\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{font-size:24px;font-weight:700;height:initial;line-height:initial}.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
2619
|
}], ctorParameters: function () { return [{ type: TableStore }, { type: WrapperFilterStore }]; } });
|
|
2206
2620
|
|
|
2207
|
-
class AutoFocusDirective {
|
|
2208
|
-
constructor(elementRef) {
|
|
2209
|
-
this.elementRef = elementRef;
|
|
2210
|
-
this.autoFocus = true;
|
|
2211
|
-
}
|
|
2212
|
-
ngAfterViewInit() {
|
|
2213
|
-
if (this.autoFocus) {
|
|
2214
|
-
setTimeout(() => {
|
|
2215
|
-
this.elementRef.nativeElement.focus();
|
|
2216
|
-
});
|
|
2217
|
-
}
|
|
2218
|
-
}
|
|
2219
|
-
}
|
|
2220
|
-
AutoFocusDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: AutoFocusDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2221
|
-
AutoFocusDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.5", type: AutoFocusDirective, selector: "[autoFocus]", inputs: { autoFocus: "autoFocus" }, ngImport: i0 });
|
|
2222
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: AutoFocusDirective, decorators: [{
|
|
2223
|
-
type: Directive,
|
|
2224
|
-
args: [{
|
|
2225
|
-
selector: '[autoFocus]'
|
|
2226
|
-
}]
|
|
2227
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { autoFocus: [{
|
|
2228
|
-
type: Input
|
|
2229
|
-
}] } });
|
|
2230
|
-
|
|
2231
2621
|
class InFilterComponent {
|
|
2232
2622
|
constructor(ref) {
|
|
2233
2623
|
this.ref = ref;
|
|
@@ -2275,7 +2665,7 @@ InFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
2275
2665
|
provide: NG_VALUE_ACCESSOR,
|
|
2276
2666
|
useExisting: InFilterComponent,
|
|
2277
2667
|
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"], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { 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: AutoFocusDirective, selector: "[autoFocus]", inputs: ["autoFocus"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2668
|
+
}], 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"], directives: [{ type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { 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: AutoFocusDirective, selector: "[autoFocus]", inputs: ["autoFocus"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2279
2669
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: InFilterComponent, decorators: [{
|
|
2280
2670
|
type: Component,
|
|
2281
2671
|
args: [{ selector: 'lib-in-filter', changeDetection: ChangeDetectionStrategy.OnPush, providers: [{
|
|
@@ -2294,7 +2684,7 @@ class NumberFilterComponent {
|
|
|
2294
2684
|
}
|
|
2295
2685
|
}
|
|
2296
2686
|
NumberFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: NumberFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2297
|
-
NumberFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.5", 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"], components: [{ type: i6.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: InFilterComponent, selector: "lib-in-filter", inputs: ["type"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$
|
|
2687
|
+
NumberFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.5", 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"], components: [{ type: i6.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: InFilterComponent, selector: "lib-in-filter", inputs: ["type"] }], directives: [{ type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$4.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.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { 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: 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 });
|
|
2298
2688
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: NumberFilterComponent, decorators: [{
|
|
2299
2689
|
type: Component,
|
|
2300
2690
|
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"] }]
|
|
@@ -2310,7 +2700,7 @@ class DateFilterComponent {
|
|
|
2310
2700
|
}
|
|
2311
2701
|
}
|
|
2312
2702
|
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$
|
|
2703
|
+
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$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$4.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
2704
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: DateFilterComponent, decorators: [{
|
|
2315
2705
|
type: Component,
|
|
2316
2706
|
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" }]
|
|
@@ -2341,7 +2731,7 @@ class FilterComponent {
|
|
|
2341
2731
|
}
|
|
2342
2732
|
}
|
|
2343
2733
|
FilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: FilterComponent, deps: [{ token: TableStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
2344
|
-
FilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.5", type: FilterComponent, selector: "tb-filter", inputs: { filter: "filter" }, outputs: { close: "close" }, ngImport: i0, template: "<mat-card class=\"mat-elevation-z5\" *ngIf=\"filter\">\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=\"row\" >\n <h4 class=\"filter-name\">{{(filter.key | spaceCase)}} Filter</h4>\n <button class=\"cancel-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=\"row\">\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 <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\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\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\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\n </form>\n</mat-card>\n", styles: [".filter-name{color:#6495ed;margin-right:30px;font-weight:600;display:inline-block}.switch{display:inline-block}.my-filter{margin-right:15px}.cancel-button{float:right}.row{margin:0}.cancel-button{font-size:18px;font-weight:700}mat-radio-button{margin:5px}\n"], components: [{ type: i2$1.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { type: i3
|
|
2734
|
+
FilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.5", type: FilterComponent, selector: "tb-filter", inputs: { filter: "filter" }, outputs: { close: "close" }, ngImport: i0, template: "<mat-card class=\"mat-elevation-z5\" *ngIf=\"filter\">\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=\"row\" >\n <h4 class=\"filter-name\">{{(filter.key | spaceCase)}} Filter</h4>\n <button class=\"cancel-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=\"row\">\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 <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\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\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\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\n </form>\n</mat-card>\n", styles: [".filter-name{color:#6495ed;margin-right:30px;font-weight:600;display:inline-block}.switch{display:inline-block}.my-filter{margin-right:15px}.cancel-button{float:right}.row{margin:0}.cancel-button{font-size:18px;font-weight:700}mat-radio-button{margin:5px}\n"], components: [{ type: i2$1.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { type: i3.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: i6.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i6$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i7$2.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: NumberFilterComponent, selector: "tb-number-filter", inputs: ["CurrentFilterType", "info"] }, { type: DateFilterComponent, selector: "tb-date-filter", inputs: ["info", "CurrentFilterType"] }, { type: i7.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { type: InFilterComponent, selector: "lib-in-filter", inputs: ["type"] }, { type: InListFilterComponent, selector: "tb-in-list-filter , [tb-in-list-filter]", inputs: ["key"] }], directives: [{ type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i5.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { 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: i8$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i1$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i7.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { type: i4$4.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"] }], pipes: { "spaceCase": SpaceCasePipe, "keyvalue": i1$1.KeyValuePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2345
2735
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: FilterComponent, decorators: [{
|
|
2346
2736
|
type: Component,
|
|
2347
2737
|
args: [{ selector: 'tb-filter', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-card class=\"mat-elevation-z5\" *ngIf=\"filter\">\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=\"row\" >\n <h4 class=\"filter-name\">{{(filter.key | spaceCase)}} Filter</h4>\n <button class=\"cancel-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=\"row\">\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 <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\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\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\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\n </form>\n</mat-card>\n", styles: [".filter-name{color:#6495ed;margin-right:30px;font-weight:600;display:inline-block}.switch{display:inline-block}.my-filter{margin-right:15px}.cancel-button{float:right}.row{margin:0}.cancel-button{font-size:18px;font-weight:700}mat-radio-button{margin:5px}\n"] }]
|
|
@@ -2600,7 +2990,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2600
2990
|
}]
|
|
2601
2991
|
}] });
|
|
2602
2992
|
class TableFilterDirective extends ComponentStore {
|
|
2603
|
-
constructor(model) {
|
|
2993
|
+
constructor(model, wrapper) {
|
|
2604
2994
|
super();
|
|
2605
2995
|
this.model = model;
|
|
2606
2996
|
this.filter$ = this.state$;
|
|
@@ -2610,6 +3000,9 @@ class TableFilterDirective extends ComponentStore {
|
|
|
2610
3000
|
this.savable = false;
|
|
2611
3001
|
this.ready = false;
|
|
2612
3002
|
this._userActive = true;
|
|
3003
|
+
if (wrapper) {
|
|
3004
|
+
wrapper.register(this);
|
|
3005
|
+
}
|
|
2613
3006
|
if (model) {
|
|
2614
3007
|
this.effect(() => {
|
|
2615
3008
|
return model.valueChanges.pipe(tap$1(val => {
|
|
@@ -2662,7 +3055,7 @@ class TableFilterDirective extends ComponentStore {
|
|
|
2662
3055
|
}
|
|
2663
3056
|
}
|
|
2664
3057
|
}
|
|
2665
|
-
TableFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: TableFilterDirective, deps: [{ token: i5.NgControl, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3058
|
+
TableFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: TableFilterDirective, deps: [{ token: i5.NgControl, optional: true }, { token: TableWrapperDirective, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2666
3059
|
TableFilterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.5", type: TableFilterDirective, selector: "[tbFilter]", inputs: { filterType: "filterType", key: "key", fieldType: "fieldType", filterId: "filterId", active: "active", filterValue: "filterValue" }, usesInheritance: true, usesOnChanges: true, ngImport: i0 });
|
|
2667
3060
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: TableFilterDirective, decorators: [{
|
|
2668
3061
|
type: Directive,
|
|
@@ -2671,6 +3064,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2671
3064
|
}]
|
|
2672
3065
|
}], ctorParameters: function () { return [{ type: i5.NgControl, decorators: [{
|
|
2673
3066
|
type: Optional
|
|
3067
|
+
}] }, { type: TableWrapperDirective, decorators: [{
|
|
3068
|
+
type: Optional
|
|
2674
3069
|
}] }]; }, propDecorators: { filterType: [{
|
|
2675
3070
|
type: Input
|
|
2676
3071
|
}], key: [{
|
|
@@ -2685,8 +3080,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2685
3080
|
type: Input
|
|
2686
3081
|
}] } });
|
|
2687
3082
|
class TableFilterStringContainsDirective extends TableFilterDirective {
|
|
2688
|
-
constructor(model) {
|
|
2689
|
-
super(model);
|
|
3083
|
+
constructor(model, wrapper) {
|
|
3084
|
+
super(model, wrapper);
|
|
2690
3085
|
this.filterType = FilterType.StringContains;
|
|
2691
3086
|
this.fieldType = FieldType.String;
|
|
2692
3087
|
this.effect(() => {
|
|
@@ -2713,7 +3108,7 @@ class TableFilterStringContainsDirective extends TableFilterDirective {
|
|
|
2713
3108
|
super.ngOnChanges(changes);
|
|
2714
3109
|
}
|
|
2715
3110
|
}
|
|
2716
|
-
TableFilterStringContainsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: TableFilterStringContainsDirective, deps: [{ token: i5.NgControl, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3111
|
+
TableFilterStringContainsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: TableFilterStringContainsDirective, deps: [{ token: i5.NgControl, optional: true }, { token: TableWrapperDirective, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2717
3112
|
TableFilterStringContainsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.5", 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 });
|
|
2718
3113
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: TableFilterStringContainsDirective, decorators: [{
|
|
2719
3114
|
type: Directive,
|
|
@@ -2729,6 +3124,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2729
3124
|
}]
|
|
2730
3125
|
}], ctorParameters: function () { return [{ type: i5.NgControl, decorators: [{
|
|
2731
3126
|
type: Optional
|
|
3127
|
+
}] }, { type: TableWrapperDirective, decorators: [{
|
|
3128
|
+
type: Optional
|
|
2732
3129
|
}] }]; } });
|
|
2733
3130
|
class TableCustomFilterDirectiveBase extends TableCustomFilterDirective {
|
|
2734
3131
|
constructor() {
|
|
@@ -2788,11 +3185,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2788
3185
|
type: Input
|
|
2789
3186
|
}] } });
|
|
2790
3187
|
class TbSelectedFilterDirective extends TableCustomFilterDirectiveBase {
|
|
2791
|
-
constructor(change, isActive) {
|
|
3188
|
+
constructor(change, isActive, wrapper) {
|
|
2792
3189
|
super();
|
|
2793
3190
|
this.change = change;
|
|
2794
3191
|
this.isActive = isActive;
|
|
2795
3192
|
this.destroySubject$ = new ReplaySubject(1);
|
|
3193
|
+
if (wrapper) {
|
|
3194
|
+
wrapper.register(this);
|
|
3195
|
+
}
|
|
2796
3196
|
}
|
|
2797
3197
|
reset() {
|
|
2798
3198
|
this.active = false;
|
|
@@ -2812,11 +3212,13 @@ TbSelectedFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0"
|
|
|
2812
3212
|
TbSelectedFilterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.5", type: TbSelectedFilterDirective, usesInheritance: true, ngImport: i0 });
|
|
2813
3213
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: TbSelectedFilterDirective, decorators: [{
|
|
2814
3214
|
type: Directive
|
|
2815
|
-
}], ctorParameters: function () { return [{ type:
|
|
3215
|
+
}], ctorParameters: function () { return [{ type: i3$2.Observable }, { type: undefined }, { type: TableWrapperDirective, decorators: [{
|
|
3216
|
+
type: Optional
|
|
3217
|
+
}] }]; } });
|
|
2816
3218
|
// Checkbox
|
|
2817
3219
|
class MatCheckboxTbFilterDirective extends TbSelectedFilterDirective {
|
|
2818
|
-
constructor(matCheckbox) {
|
|
2819
|
-
super(matCheckbox.change, () => matCheckbox.checked);
|
|
3220
|
+
constructor(matCheckbox, wrapper) {
|
|
3221
|
+
super(matCheckbox.change, () => matCheckbox.checked, wrapper);
|
|
2820
3222
|
this.matCheckbox = matCheckbox;
|
|
2821
3223
|
}
|
|
2822
3224
|
set active(val) {
|
|
@@ -2824,7 +3226,7 @@ class MatCheckboxTbFilterDirective extends TbSelectedFilterDirective {
|
|
|
2824
3226
|
super.active = val;
|
|
2825
3227
|
}
|
|
2826
3228
|
}
|
|
2827
|
-
MatCheckboxTbFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: MatCheckboxTbFilterDirective, deps: [{ token:
|
|
3229
|
+
MatCheckboxTbFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: MatCheckboxTbFilterDirective, deps: [{ token: i4$2.MatCheckbox }, { token: TableWrapperDirective, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2828
3230
|
MatCheckboxTbFilterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.5", type: MatCheckboxTbFilterDirective, selector: "mat-checkbox[tbCustomFilter]", inputs: { predicate: ["tbCustomFilter", "predicate"], filterId: "filterId" }, providers: [{ provide: TableCustomFilterDirective, useExisting: MatCheckboxTbFilterDirective }], usesInheritance: true, ngImport: i0 });
|
|
2829
3231
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: MatCheckboxTbFilterDirective, decorators: [{
|
|
2830
3232
|
type: Directive,
|
|
@@ -2835,10 +3237,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2835
3237
|
],
|
|
2836
3238
|
providers: [{ provide: TableCustomFilterDirective, useExisting: MatCheckboxTbFilterDirective }]
|
|
2837
3239
|
}]
|
|
2838
|
-
}], ctorParameters: function () { return [{ type:
|
|
3240
|
+
}], ctorParameters: function () { return [{ type: i4$2.MatCheckbox }, { type: TableWrapperDirective, decorators: [{
|
|
3241
|
+
type: Optional
|
|
3242
|
+
}] }]; } });
|
|
2839
3243
|
class MatSlideToggleTbFilterDirective extends TbSelectedFilterDirective {
|
|
2840
|
-
constructor(matSlideToggle) {
|
|
2841
|
-
super(matSlideToggle.change, () => matSlideToggle.checked);
|
|
3244
|
+
constructor(matSlideToggle, wrapper) {
|
|
3245
|
+
super(matSlideToggle.change, () => matSlideToggle.checked, wrapper);
|
|
2842
3246
|
this.matSlideToggle = matSlideToggle;
|
|
2843
3247
|
}
|
|
2844
3248
|
set active(val) {
|
|
@@ -2849,7 +3253,7 @@ class MatSlideToggleTbFilterDirective extends TbSelectedFilterDirective {
|
|
|
2849
3253
|
super.ngOnInit();
|
|
2850
3254
|
}
|
|
2851
3255
|
}
|
|
2852
|
-
MatSlideToggleTbFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: MatSlideToggleTbFilterDirective, deps: [{ token:
|
|
3256
|
+
MatSlideToggleTbFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: MatSlideToggleTbFilterDirective, deps: [{ token: i5$1.MatSlideToggle }, { token: TableWrapperDirective, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2853
3257
|
MatSlideToggleTbFilterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.5", type: MatSlideToggleTbFilterDirective, selector: "mat-slide-toggle[tbCustomFilter]", inputs: { predicate: ["tbCustomFilter", "predicate"], filterId: "filterId" }, providers: [{ provide: TableCustomFilterDirective, useExisting: MatSlideToggleTbFilterDirective }], usesInheritance: true, ngImport: i0 });
|
|
2854
3258
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: MatSlideToggleTbFilterDirective, decorators: [{
|
|
2855
3259
|
type: Directive,
|
|
@@ -2860,11 +3264,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2860
3264
|
],
|
|
2861
3265
|
providers: [{ provide: TableCustomFilterDirective, useExisting: MatSlideToggleTbFilterDirective }]
|
|
2862
3266
|
}]
|
|
2863
|
-
}], ctorParameters: function () { return [{ type:
|
|
3267
|
+
}], ctorParameters: function () { return [{ type: i5$1.MatSlideToggle }, { type: TableWrapperDirective, decorators: [{
|
|
3268
|
+
type: Optional
|
|
3269
|
+
}] }]; } });
|
|
2864
3270
|
// Radio button
|
|
2865
3271
|
class MatRadioButtonTbFilterDirective extends TbSelectedFilterDirective {
|
|
2866
|
-
constructor(matRadioButton) {
|
|
2867
|
-
super(matRadioButton.change, () => matRadioButton.checked);
|
|
3272
|
+
constructor(matRadioButton, wrapper) {
|
|
3273
|
+
super(matRadioButton.change, () => matRadioButton.checked, wrapper);
|
|
2868
3274
|
this.matRadioButton = matRadioButton;
|
|
2869
3275
|
}
|
|
2870
3276
|
set active(val) {
|
|
@@ -2875,7 +3281,7 @@ class MatRadioButtonTbFilterDirective extends TbSelectedFilterDirective {
|
|
|
2875
3281
|
super.ngOnInit();
|
|
2876
3282
|
}
|
|
2877
3283
|
}
|
|
2878
|
-
MatRadioButtonTbFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: MatRadioButtonTbFilterDirective, deps: [{ token: i7.MatRadioButton }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3284
|
+
MatRadioButtonTbFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: MatRadioButtonTbFilterDirective, deps: [{ token: i7.MatRadioButton }, { token: TableWrapperDirective, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2879
3285
|
MatRadioButtonTbFilterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.5", type: MatRadioButtonTbFilterDirective, selector: "mat-radio-button[tbCustomFilter]", inputs: { predicate: ["tbCustomFilter", "predicate"] }, providers: [{ provide: TableCustomFilterDirective, useExisting: MatRadioButtonTbFilterDirective }], usesInheritance: true, ngImport: i0 });
|
|
2880
3286
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: MatRadioButtonTbFilterDirective, decorators: [{
|
|
2881
3287
|
type: Directive,
|
|
@@ -2884,15 +3290,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2884
3290
|
inputs: ['predicate: tbCustomFilter'],
|
|
2885
3291
|
providers: [{ provide: TableCustomFilterDirective, useExisting: MatRadioButtonTbFilterDirective }]
|
|
2886
3292
|
}]
|
|
2887
|
-
}], ctorParameters: function () { return [{ type: i7.MatRadioButton }
|
|
3293
|
+
}], ctorParameters: function () { return [{ type: i7.MatRadioButton }, { type: TableWrapperDirective, decorators: [{
|
|
3294
|
+
type: Optional
|
|
3295
|
+
}] }]; } });
|
|
2888
3296
|
// Option (select)
|
|
2889
3297
|
class MatOptionTbFilterDirective extends TbSelectedFilterDirective {
|
|
2890
|
-
constructor(matOption) {
|
|
3298
|
+
constructor(matOption, wrapper) {
|
|
2891
3299
|
super(matOption.onSelectionChange.pipe(tap$1(d => {
|
|
2892
3300
|
if (!matOption.value) {
|
|
2893
3301
|
matOption.value = v4();
|
|
2894
3302
|
}
|
|
2895
|
-
})), () => matOption.selected);
|
|
3303
|
+
})), () => matOption.selected, wrapper);
|
|
2896
3304
|
this.matOption = matOption;
|
|
2897
3305
|
}
|
|
2898
3306
|
set active(val) {
|
|
@@ -2908,7 +3316,7 @@ class MatOptionTbFilterDirective extends TbSelectedFilterDirective {
|
|
|
2908
3316
|
super.ngOnInit();
|
|
2909
3317
|
}
|
|
2910
3318
|
}
|
|
2911
|
-
MatOptionTbFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: MatOptionTbFilterDirective, deps: [{ token:
|
|
3319
|
+
MatOptionTbFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: MatOptionTbFilterDirective, deps: [{ token: i7$2.MatOption }, { token: TableWrapperDirective, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2912
3320
|
MatOptionTbFilterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.5", type: MatOptionTbFilterDirective, selector: "mat-option[tbCustomFilter]", inputs: { predicate: ["tbCustomFilter", "predicate"], filterId: "filterId" }, providers: [{ provide: TableCustomFilterDirective, useExisting: MatOptionTbFilterDirective }], usesInheritance: true, ngImport: i0 });
|
|
2913
3321
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: MatOptionTbFilterDirective, decorators: [{
|
|
2914
3322
|
type: Directive,
|
|
@@ -2919,11 +3327,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2919
3327
|
],
|
|
2920
3328
|
providers: [{ provide: TableCustomFilterDirective, useExisting: MatOptionTbFilterDirective }]
|
|
2921
3329
|
}]
|
|
2922
|
-
}], ctorParameters: function () { return [{ type:
|
|
3330
|
+
}], ctorParameters: function () { return [{ type: i7$2.MatOption }, { type: TableWrapperDirective, decorators: [{
|
|
3331
|
+
type: Optional
|
|
3332
|
+
}] }]; } });
|
|
2923
3333
|
// Button toggle
|
|
2924
3334
|
class MatButtonToggleFilterDirective extends TbSelectedFilterDirective {
|
|
2925
|
-
constructor(matButtonToggle) {
|
|
2926
|
-
super(matButtonToggle.change, () => matButtonToggle.checked);
|
|
3335
|
+
constructor(matButtonToggle, wrapper) {
|
|
3336
|
+
super(matButtonToggle.change, () => matButtonToggle.checked, wrapper);
|
|
2927
3337
|
this.matButtonToggle = matButtonToggle;
|
|
2928
3338
|
}
|
|
2929
3339
|
set active(val) {
|
|
@@ -2934,7 +3344,7 @@ class MatButtonToggleFilterDirective extends TbSelectedFilterDirective {
|
|
|
2934
3344
|
super.ngOnInit();
|
|
2935
3345
|
}
|
|
2936
3346
|
}
|
|
2937
|
-
MatButtonToggleFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: MatButtonToggleFilterDirective, deps: [{ token:
|
|
3347
|
+
MatButtonToggleFilterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: MatButtonToggleFilterDirective, deps: [{ token: i8$2.MatButtonToggle }, { token: TableWrapperDirective, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2938
3348
|
MatButtonToggleFilterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.5", type: MatButtonToggleFilterDirective, selector: "mat-button-toggle[tbCustomFilter]", inputs: { predicate: ["tbCustomFilter", "predicate"], filterId: "filterId" }, providers: [{ provide: TableCustomFilterDirective, useExisting: MatButtonToggleFilterDirective }], usesInheritance: true, ngImport: i0 });
|
|
2939
3349
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: MatButtonToggleFilterDirective, decorators: [{
|
|
2940
3350
|
type: Directive,
|
|
@@ -2945,9 +3355,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
2945
3355
|
],
|
|
2946
3356
|
providers: [{ provide: TableCustomFilterDirective, useExisting: MatButtonToggleFilterDirective }]
|
|
2947
3357
|
}]
|
|
2948
|
-
}], ctorParameters: function () { return [{ type:
|
|
3358
|
+
}], ctorParameters: function () { return [{ type: i8$2.MatButtonToggle }, { type: TableWrapperDirective, decorators: [{
|
|
3359
|
+
type: Optional
|
|
3360
|
+
}] }]; } });
|
|
2949
3361
|
|
|
2950
3362
|
class TableWrapperDirective {
|
|
3363
|
+
constructor() {
|
|
3364
|
+
this.registerations = [];
|
|
3365
|
+
}
|
|
3366
|
+
register(filter) {
|
|
3367
|
+
this.registerations.push(filter);
|
|
3368
|
+
}
|
|
2951
3369
|
}
|
|
2952
3370
|
TableWrapperDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: TableWrapperDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2953
3371
|
TableWrapperDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.5", type: TableWrapperDirective, selector: "[tbWrapper]", queries: [{ propertyName: "customFilters", predicate: TableCustomFilterDirective, descendants: true }, { propertyName: "filters", predicate: TableFilterDirective, descendants: true }], ngImport: i0 });
|
|
@@ -3013,7 +3431,7 @@ class ExportToCsvService {
|
|
|
3013
3431
|
return res.join('\n');
|
|
3014
3432
|
};
|
|
3015
3433
|
this.metaToField = (meta, row) => {
|
|
3016
|
-
let val = row
|
|
3434
|
+
let val = get(row, meta.key);
|
|
3017
3435
|
if (val == null && !meta.transform)
|
|
3018
3436
|
return val;
|
|
3019
3437
|
if (meta.transform && meta.fieldType !== FieldType.Expression) {
|
|
@@ -3051,14 +3469,14 @@ class ExportToCsvService {
|
|
|
3051
3469
|
return this.datePipe.transform(val, dateFormat);
|
|
3052
3470
|
}
|
|
3053
3471
|
}
|
|
3054
|
-
ExportToCsvService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: ExportToCsvService, deps: [{ token: TableStore }, { token: TableBuilderConfigToken }, { token: i1.DatePipe }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3472
|
+
ExportToCsvService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: ExportToCsvService, deps: [{ token: TableStore }, { token: TableBuilderConfigToken }, { token: i1$1.DatePipe }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3055
3473
|
ExportToCsvService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: ExportToCsvService });
|
|
3056
3474
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: ExportToCsvService, decorators: [{
|
|
3057
3475
|
type: Injectable
|
|
3058
3476
|
}], ctorParameters: function () { return [{ type: TableStore }, { type: undefined, decorators: [{
|
|
3059
3477
|
type: Inject,
|
|
3060
3478
|
args: [TableBuilderConfigToken]
|
|
3061
|
-
}] }, { type: i1.DatePipe }]; } });
|
|
3479
|
+
}] }, { type: i1$1.DatePipe }]; } });
|
|
3062
3480
|
const removeFromMetaData = (state, keysToRemove) => orderMetaData(state)
|
|
3063
3481
|
.filter(meta => !keysToRemove.includes(meta.key));
|
|
3064
3482
|
const nonExportableFields = (state) => Object.values(state.metaData)
|
|
@@ -3163,12 +3581,12 @@ class FormatFilterValuePipe {
|
|
|
3163
3581
|
}));
|
|
3164
3582
|
}
|
|
3165
3583
|
}
|
|
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 });
|
|
3584
|
+
FormatFilterValuePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: FormatFilterValuePipe, deps: [{ token: TableStore }, { token: i1$1.DatePipe }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3167
3585
|
FormatFilterValuePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: FormatFilterValuePipe, name: "formatFilterValue" });
|
|
3168
3586
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: FormatFilterValuePipe, decorators: [{
|
|
3169
3587
|
type: Pipe,
|
|
3170
3588
|
args: [{ name: 'formatFilterValue' }]
|
|
3171
|
-
}], ctorParameters: function () { return [{ type: TableStore }, { type: i1.DatePipe }]; } });
|
|
3589
|
+
}], ctorParameters: function () { return [{ type: TableStore }, { type: i1$1.DatePipe }]; } });
|
|
3172
3590
|
|
|
3173
3591
|
class FilterChipsComponent {
|
|
3174
3592
|
constructor(tableState, filterStore) {
|
|
@@ -3190,7 +3608,7 @@ class FilterChipsComponent {
|
|
|
3190
3608
|
}
|
|
3191
3609
|
}
|
|
3192
3610
|
FilterChipsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: FilterChipsComponent, deps: [{ token: TableStore }, { token: WrapperFilterStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
3193
|
-
FilterChipsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.5", 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\">\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-list *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-list>\n\n</div>\n", styles: [".filter{margin:15px;display:inline-block}.filter-button{color:#6495ed;font-size:22px;font-weight:700}.cancel-button{font-size:24px;font-weight:700;height:initial;line-height:initial}.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"], components: [{ type: i3
|
|
3611
|
+
FilterChipsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.5", 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\">\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-list *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-list>\n\n</div>\n", styles: [".filter{margin:15px;display:inline-block}.filter-button{color:#6495ed;font-size:22px;font-weight:700}.cancel-button{font-size:24px;font-weight:700;height:initial;line-height:initial}.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"], components: [{ type: i3.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: FilterComponent, selector: "tb-filter", inputs: ["filter"], outputs: ["close"] }, { type: i6$2.MatChipList, selector: "mat-chip-list", inputs: ["errorStateMatcher", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "aria-orientation", "selectable", "tabIndex"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }], directives: [{ type: i7$1.LetDirective, selector: "[ngrxLet]", inputs: ["ngrxLet"] }, { type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6$2.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { type: i6$2.MatChipRemove, selector: "[matChipRemove]" }], pipes: { "async": i1$1.AsyncPipe, "keyDisplay": KeyDisplayPipe, "formatFilterType": FormatFilterTypePipe, "formatFilterValue": FormatFilterValuePipe } });
|
|
3194
3612
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: FilterChipsComponent, decorators: [{
|
|
3195
3613
|
type: Component,
|
|
3196
3614
|
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\">\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-list *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-list>\n\n</div>\n", styles: [".filter{margin:15px;display:inline-block}.filter-button{color:#6495ed;font-size:22px;font-weight:700}.cancel-button{font-size:24px;font-weight:700;height:initial;line-height:initial}.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"] }]
|
|
@@ -3231,227 +3649,61 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
3231
3649
|
const equalSortArray = (arr1, arr2) => arr1.length === arr2.length && arr2.every(s1 => arr1.some(s2 => s1.active === s2.active));
|
|
3232
3650
|
const distinctSortArray = distinctUntilChanged(equalSortArray);
|
|
3233
3651
|
|
|
3234
|
-
class SortMenuComponent {
|
|
3235
|
-
constructor(tableState, store) {
|
|
3236
|
-
this.tableState = tableState;
|
|
3237
|
-
this.store = store;
|
|
3238
|
-
this.SortDirection = SortDirection;
|
|
3239
|
-
this.dirty$ = new BehaviorSubject(false);
|
|
3240
|
-
this.apply = this.store.effect((obs) => obs.pipe(tap(() => {
|
|
3241
|
-
this.dirty$.next(false);
|
|
3242
|
-
this.tableState.setAllSort(this.store.sorted$.pipe(first$1()));
|
|
3243
|
-
})));
|
|
3244
|
-
this.sorted$ = this.store.sorted$.pipe(map(data => [...data]));
|
|
3245
|
-
this.notSorted$ = this.store.notSorted$.pipe(map(data => [...data]));
|
|
3246
|
-
}
|
|
3247
|
-
reset() {
|
|
3248
|
-
this.dirty$.next(false);
|
|
3249
|
-
this.store.reset();
|
|
3250
|
-
}
|
|
3251
|
-
ngOnInit() {
|
|
3252
|
-
this.store.reset();
|
|
3253
|
-
}
|
|
3254
|
-
dropIntoSorted(event) {
|
|
3255
|
-
this.dirty$.next(true);
|
|
3256
|
-
if (event.previousContainer === event.container) {
|
|
3257
|
-
moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
|
|
3258
|
-
}
|
|
3259
|
-
else {
|
|
3260
|
-
transferArrayItem(event.previousContainer.data, event.container.data, event.previousIndex, event.currentIndex);
|
|
3261
|
-
event.container.data[event.currentIndex] = { ...event.container.data[event.currentIndex], direction: SortDirection.asc };
|
|
3262
|
-
this.store.setSorted(event.container.data);
|
|
3263
|
-
this.store.setNotSorted(event.previousContainer.data);
|
|
3264
|
-
}
|
|
3265
|
-
}
|
|
3266
|
-
dropIntoNotSorted(event) {
|
|
3267
|
-
if (event.previousContainer === event.container) {
|
|
3268
|
-
return;
|
|
3269
|
-
}
|
|
3270
|
-
else {
|
|
3271
|
-
this.dirty$.next(true);
|
|
3272
|
-
transferArrayItem(event.previousContainer.data, event.container.data, event.previousIndex, event.currentIndex);
|
|
3273
|
-
event.container.data[event.currentIndex] = { ...event.container.data[event.currentIndex] };
|
|
3274
|
-
this.store.setNotSorted(event.container.data);
|
|
3275
|
-
this.store.setSorted(event.previousContainer.data);
|
|
3276
|
-
}
|
|
3277
|
-
}
|
|
3278
|
-
setDirection(sort) {
|
|
3279
|
-
this.dirty$.next(true);
|
|
3280
|
-
this.store.setDirection(sort);
|
|
3281
|
-
}
|
|
3282
|
-
}
|
|
3283
|
-
SortMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: SortMenuComponent, deps: [{ token: TableStore }, { token: SortMenuComponentStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
3284
|
-
SortMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.5", 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}.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;font-size:17px;font-weight:700;line-height:25px;height:30px}.mat-menu-item.menu-item{cursor:move}.sorted-name{color:#224e9c}.not-sorted-name{color:#93b1ea}.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"], 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"] }], directives: [{ type: i7$1.LetDirective, selector: "[ngrxLet]", inputs: ["ngrxLet"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i13.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i4$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { type: StopPropagationDirective, selector: "[stop-propagation]" }, { type: i10.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"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "async": i1.AsyncPipe, "spaceCase": SpaceCasePipe } });
|
|
3285
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: SortMenuComponent, decorators: [{
|
|
3286
|
-
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;font-size:17px;font-weight:700;line-height:25px;height:30px}.mat-menu-item.menu-item{cursor:move}.sorted-name{color:#224e9c}.not-sorted-name{color:#93b1ea}.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
|
-
}], ctorParameters: function () { return [{ type: TableStore }, { type: SortMenuComponentStore }]; } });
|
|
3289
|
-
|
|
3290
|
-
class ClickEmitterDirective extends Subject {
|
|
3291
|
-
constructor() {
|
|
3292
|
-
super();
|
|
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);
|
|
3317
|
-
}
|
|
3318
|
-
closeAllAppDialogs() {
|
|
3319
|
-
this.allOpenAppDialogs.forEach(ref => ref.close());
|
|
3320
|
-
}
|
|
3321
|
-
}
|
|
3322
|
-
DialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: DialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3323
|
-
DialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: DialogService, providedIn: 'root' });
|
|
3324
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: DialogService, decorators: [{
|
|
3325
|
-
type: Injectable,
|
|
3326
|
-
args: [{
|
|
3327
|
-
providedIn: 'root'
|
|
3328
|
-
}]
|
|
3329
|
-
}] });
|
|
3330
|
-
|
|
3331
|
-
class DialogWrapper {
|
|
3332
|
-
constructor(vcr) {
|
|
3333
|
-
this.vcr = vcr;
|
|
3334
|
-
this.viewEmbeded = false;
|
|
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;
|
|
3352
|
-
}
|
|
3353
|
-
}
|
|
3354
|
-
DialogWrapper.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: DialogWrapper, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3355
|
-
DialogWrapper.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.5", type: DialogWrapper, selector: "app-dialog-content", ngImport: i0, template: ``, isInline: true });
|
|
3356
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: DialogWrapper, decorators: [{
|
|
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);
|
|
3378
|
-
}
|
|
3379
|
-
else {
|
|
3380
|
-
this.setDialogState(false);
|
|
3381
|
-
}
|
|
3382
|
-
});
|
|
3383
|
-
}
|
|
3384
|
-
set opDialogConfig(config) {
|
|
3385
|
-
this._dialogConfig = { ...defaultDialogConfig, ...config };
|
|
3386
|
-
}
|
|
3387
|
-
get opDialogConfig() {
|
|
3388
|
-
return this._dialogConfig;
|
|
3652
|
+
class SortMenuComponent {
|
|
3653
|
+
constructor(tableState, store) {
|
|
3654
|
+
this.tableState = tableState;
|
|
3655
|
+
this.store = store;
|
|
3656
|
+
this.SortDirection = SortDirection;
|
|
3657
|
+
this.dirty$ = new BehaviorSubject(false);
|
|
3658
|
+
this.apply = this.store.effect((obs) => obs.pipe(tap(() => {
|
|
3659
|
+
this.dirty$.next(false);
|
|
3660
|
+
this.tableState.setAllSort(this.store.sorted$.pipe(first$1()));
|
|
3661
|
+
})));
|
|
3662
|
+
this.sorted$ = this.store.sorted$.pipe(map(data => [...data]));
|
|
3663
|
+
this.notSorted$ = this.store.notSorted$.pipe(map(data => [...data]));
|
|
3389
3664
|
}
|
|
3390
|
-
|
|
3391
|
-
this.
|
|
3665
|
+
reset() {
|
|
3666
|
+
this.dirty$.next(false);
|
|
3667
|
+
this.store.reset();
|
|
3392
3668
|
}
|
|
3393
|
-
|
|
3394
|
-
this.
|
|
3669
|
+
ngOnInit() {
|
|
3670
|
+
this.store.reset();
|
|
3395
3671
|
}
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
this.opDialogConfig = { ...this.opDialogConfig, position };
|
|
3672
|
+
dropIntoSorted(event) {
|
|
3673
|
+
this.dirty$.next(true);
|
|
3674
|
+
if (event.previousContainer === event.container) {
|
|
3675
|
+
moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
|
|
3401
3676
|
}
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
if (!this.opDialogConfig.disableClose) {
|
|
3408
|
-
this.service.addDialogRef(this.dialogRef);
|
|
3677
|
+
else {
|
|
3678
|
+
transferArrayItem(event.previousContainer.data, event.container.data, event.previousIndex, event.currentIndex);
|
|
3679
|
+
event.container.data[event.currentIndex] = { ...event.container.data[event.currentIndex], direction: SortDirection.asc };
|
|
3680
|
+
this.store.setSorted(event.container.data);
|
|
3681
|
+
this.store.setNotSorted(event.previousContainer.data);
|
|
3409
3682
|
}
|
|
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
3683
|
}
|
|
3417
|
-
|
|
3418
|
-
if (
|
|
3419
|
-
|
|
3420
|
-
this.initDialog();
|
|
3421
|
-
}
|
|
3422
|
-
else {
|
|
3423
|
-
this.componentWrapper.data = this.opDialogConfig.data;
|
|
3424
|
-
}
|
|
3425
|
-
}
|
|
3426
|
-
else if (!open && this.dialogRef) {
|
|
3427
|
-
this.dialogRef.close();
|
|
3684
|
+
dropIntoNotSorted(event) {
|
|
3685
|
+
if (event.previousContainer === event.container) {
|
|
3686
|
+
return;
|
|
3428
3687
|
}
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3688
|
+
else {
|
|
3689
|
+
this.dirty$.next(true);
|
|
3690
|
+
transferArrayItem(event.previousContainer.data, event.container.data, event.previousIndex, event.currentIndex);
|
|
3691
|
+
event.container.data[event.currentIndex] = { ...event.container.data[event.currentIndex] };
|
|
3692
|
+
this.store.setNotSorted(event.container.data);
|
|
3693
|
+
this.store.setSorted(event.previousContainer.data);
|
|
3433
3694
|
}
|
|
3434
3695
|
}
|
|
3435
|
-
|
|
3436
|
-
|
|
3696
|
+
setDirection(sort) {
|
|
3697
|
+
this.dirty$.next(true);
|
|
3698
|
+
this.store.setDirection(sort);
|
|
3437
3699
|
}
|
|
3438
3700
|
}
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type:
|
|
3442
|
-
type:
|
|
3443
|
-
args: [{ selector: '[
|
|
3444
|
-
}], ctorParameters: function () { return [{ type:
|
|
3445
|
-
type: Output
|
|
3446
|
-
}], opDialogConfig: [{
|
|
3447
|
-
type: Input
|
|
3448
|
-
}], state: [{
|
|
3449
|
-
type: Input,
|
|
3450
|
-
args: ['opDialog']
|
|
3451
|
-
}], nativeElement: [{
|
|
3452
|
-
type: Input,
|
|
3453
|
-
args: ['opDialogOrigin']
|
|
3454
|
-
}] } });
|
|
3701
|
+
SortMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: SortMenuComponent, deps: [{ token: TableStore }, { token: SortMenuComponentStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
3702
|
+
SortMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.5", 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}.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;font-size:17px;font-weight:700;line-height:25px;height:30px}.mat-menu-item.menu-item{cursor:move}.sorted-name{color:#224e9c}.not-sorted-name{color:#93b1ea}.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"], components: [{ type: i3.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$3.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: i4$3.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }], directives: [{ type: i7$1.LetDirective, selector: "[ngrxLet]", inputs: ["ngrxLet"] }, { type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i4$3.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { type: StopPropagationDirective, selector: "[stop-propagation]" }, { type: i12.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"] }, { type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i12.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "async": i1$1.AsyncPipe, "spaceCase": SpaceCasePipe } });
|
|
3703
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: SortMenuComponent, decorators: [{
|
|
3704
|
+
type: Component,
|
|
3705
|
+
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;font-size:17px;font-weight:700;line-height:25px;height:30px}.mat-menu-item.menu-item{cursor:move}.sorted-name{color:#224e9c}.not-sorted-name{color:#93b1ea}.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"] }]
|
|
3706
|
+
}], ctorParameters: function () { return [{ type: TableStore }, { type: SortMenuComponentStore }]; } });
|
|
3455
3707
|
|
|
3456
3708
|
class TableContainerComponent {
|
|
3457
3709
|
constructor(state, exportToCsvService, config, store, wrapper) {
|
|
@@ -3551,7 +3803,7 @@ class TableContainerComponent {
|
|
|
3551
3803
|
this.state.runOnceWhen(stateIs(InitializationState.LoadedFromStore), state => {
|
|
3552
3804
|
var allFilters = [...this.filters, ...this.customFilters];
|
|
3553
3805
|
if (this.wrapper) {
|
|
3554
|
-
allFilters = [...allFilters, ...this.wrapper.customFilters, ...this.wrapper.filters];
|
|
3806
|
+
allFilters = [...allFilters, ...this.wrapper.customFilters, ...this.wrapper.filters, ...this.wrapper.registerations];
|
|
3555
3807
|
}
|
|
3556
3808
|
var customFilters = [];
|
|
3557
3809
|
allFilters.filter(f => !f.used).forEach(f => {
|
|
@@ -3575,7 +3827,7 @@ class TableContainerComponent {
|
|
|
3575
3827
|
customFilters.push(f);
|
|
3576
3828
|
}
|
|
3577
3829
|
});
|
|
3578
|
-
const filters$ = from(customFilters.map(cf => cf.filter$)).pipe(mergeAll(), scan((a, b) => {
|
|
3830
|
+
const filters$ = from(customFilters.map(cf => cf.filter$)).pipe(mergeAll(), scan$1((a, b) => {
|
|
3579
3831
|
if (b.active) {
|
|
3580
3832
|
a[b.filterId] = isCustomFilter(b) ? b.predicate : createFilterFunc(b);
|
|
3581
3833
|
}
|
|
@@ -3608,7 +3860,7 @@ class TableContainerComponent {
|
|
|
3608
3860
|
return data;
|
|
3609
3861
|
}
|
|
3610
3862
|
this.disableSort = true;
|
|
3611
|
-
const grouped =
|
|
3863
|
+
const grouped = groupBy(data, meta.key);
|
|
3612
3864
|
const withHeadersAndFooters = Object.keys(grouped).map(k => {
|
|
3613
3865
|
const header = {
|
|
3614
3866
|
isGroupHeader: true,
|
|
@@ -3616,7 +3868,7 @@ class TableContainerComponent {
|
|
|
3616
3868
|
};
|
|
3617
3869
|
const sumCols = metaData.filter(md => md.additional?.grouping?.sum).map(md => md.key);
|
|
3618
3870
|
const totals = sumCols.reduce((acc, key) => {
|
|
3619
|
-
acc[key] =
|
|
3871
|
+
acc[key] = sumBy(grouped[k], key);
|
|
3620
3872
|
return acc;
|
|
3621
3873
|
}, {});
|
|
3622
3874
|
const footer = {
|
|
@@ -3625,11 +3877,11 @@ class TableContainerComponent {
|
|
|
3625
3877
|
};
|
|
3626
3878
|
return [header, grouped[k], footer];
|
|
3627
3879
|
});
|
|
3628
|
-
return
|
|
3880
|
+
return flattenDeep(withHeadersAndFooters);
|
|
3629
3881
|
}
|
|
3630
3882
|
}
|
|
3631
3883
|
TableContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: TableContainerComponent, deps: [{ token: TableStore }, { token: ExportToCsvService }, { token: TableBuilderConfigToken }, { token: i3$3.Store }, { token: TableWrapperDirective, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
3632
|
-
TableContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.5", type: TableContainerComponent, selector: "tb-table-container", inputs: { tableId: "tableId", tableBuilder: "tableBuilder", IndexColumn: "IndexColumn", SelectionColumn: "SelectionColumn", trackBy: "trackBy", isSticky: "isSticky", pageSize: "pageSize", inputFilters: "inputFilters" }, 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 }], 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 </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 <div *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 </div>\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"], components: [{ type: FilterChipsComponent, selector: "lib-filter-list" }, { type: i3
|
|
3884
|
+
TableContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.5", type: TableContainerComponent, selector: "tb-table-container", inputs: { tableId: "tableId", tableBuilder: "tableBuilder", IndexColumn: "IndexColumn", SelectionColumn: "SelectionColumn", trackBy: "trackBy", isSticky: "isSticky", pageSize: "pageSize", inputFilters: "inputFilters" }, 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 }], 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 </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 <div *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 </div>\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"], components: [{ type: FilterChipsComponent, selector: "lib-filter-list" }, { type: i3.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$3.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: GenericTableComponent, selector: "tb-generic-table", inputs: ["data$", "IndexColumn", "SelectionColumn", "trackBy", "rows", "isSticky", "columnBuilders", "columnInfos", "disableSort"], outputs: ["selection$"] }, { type: GenFilterDisplayerComponent, selector: "tb-filter-displayer" }, { type: GenColDisplayerComponent, selector: "tb-col-displayer" }, { type: SortMenuComponent, selector: "tb-sort-menu" }, { type: i4$3.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { type: i6.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }], directives: [{ type: MultiSortDirective, selector: "[multiSort]", inputs: ["matSortDisabled"], exportAs: ["multiSort"] }, { type: i7$1.LetDirective, selector: "[ngrxLet]", inputs: ["ngrxLet"] }, { type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i4$3.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i8$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: ClickEmitterDirective, selector: "[clickEmitter]", exportAs: ["clickEmitter"] }, { type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: StopPropagationDirective, selector: "[stop-propagation]" }, { type: DialogDirective, selector: "[opDialog]", inputs: ["opDialogConfig", "opDialog", "opDialogOrigin"], outputs: ["opDialogClosed"] }, { type: i4$4.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"] }], pipes: { "async": i1$1.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3633
3885
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: TableContainerComponent, decorators: [{
|
|
3634
3886
|
type: Component,
|
|
3635
3887
|
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 <div *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 </div>\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"] }]
|
|
@@ -3766,168 +4018,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
3766
4018
|
type: Injectable
|
|
3767
4019
|
}], ctorParameters: function () { return [{ type: i1$4.Actions }, { type: i3$3.Store }]; } });
|
|
3768
4020
|
|
|
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
|
-
}] });
|
|
3930
|
-
|
|
3931
4021
|
class TableBuilderModule {
|
|
3932
4022
|
static forRoot(config) {
|
|
3933
4023
|
return {
|
|
@@ -4125,7 +4215,10 @@ class TableBuilder {
|
|
|
4125
4215
|
}
|
|
4126
4216
|
cleanRecord(record, metadata) {
|
|
4127
4217
|
const cleaned = metadata.reduce((prev, curr) => {
|
|
4128
|
-
|
|
4218
|
+
const val = get(record, curr.key);
|
|
4219
|
+
if (val !== undefined) {
|
|
4220
|
+
set(prev, curr.key, val);
|
|
4221
|
+
}
|
|
4129
4222
|
return prev;
|
|
4130
4223
|
}, {});
|
|
4131
4224
|
return { ...record, ...cleaned };
|
|
@@ -4160,7 +4253,7 @@ const { selectIds, selectEntities, selectAll, selectTotal } = statusAdapter.getS
|
|
|
4160
4253
|
const selectEntity = (id) => createSelector(selectEntities, (entities) => entities[id]);
|
|
4161
4254
|
// Reducers
|
|
4162
4255
|
function actionStatusReducer(state = initialState, action) {
|
|
4163
|
-
const actionStatus =
|
|
4256
|
+
const actionStatus = get(action, 'payload.actionStatus');
|
|
4164
4257
|
if (actionStatus) {
|
|
4165
4258
|
if (state.ids.find(id => id === actionStatus.id)) {
|
|
4166
4259
|
const modifiedObj = { ...state.entities[actionStatus.id] };
|
|
@@ -4203,7 +4296,7 @@ class ActionStateSpinnerComponent {
|
|
|
4203
4296
|
}
|
|
4204
4297
|
}
|
|
4205
4298
|
ActionStateSpinnerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: ActionStateSpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4206
|
-
ActionStateSpinnerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.5", 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:0px;left:0px;width:100%;height:100%;background-color:#0e0d0d69;z-index:999999}.spinner{position:absolute;top:50%;left:40%;transform:translate(-50%,-50%)}\n"], components: [{ type: i1$5.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i1.AsyncPipe } });
|
|
4299
|
+
ActionStateSpinnerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.5", 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:0px;left:0px;width:100%;height:100%;background-color:#0e0d0d69;z-index:999999}.spinner{position:absolute;top:50%;left:40%;transform:translate(-50%,-50%)}\n"], components: [{ type: i1$5.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }], directives: [{ type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i1$1.AsyncPipe } });
|
|
4207
4300
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImport: i0, type: ActionStateSpinnerComponent, decorators: [{
|
|
4208
4301
|
type: Component,
|
|
4209
4302
|
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:0px;left:0px;width:100%;height:100%;background-color:#0e0d0d69;z-index:999999}.spinner{position:absolute;top:50%;left:40%;transform:translate(-50%,-50%)}\n"] }]
|
|
@@ -4248,5 +4341,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.5", ngImpor
|
|
|
4248
4341
|
* Generated bundle index. Do not edit.
|
|
4249
4342
|
*/
|
|
4250
4343
|
|
|
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 };
|
|
4344
|
+
export { ActionStateSpinnerComponent, ActionStateUiModule, ActionStatus, AppStatusState, ArrayStyle, AutoFocusDirective, ClickEmitterDirective, ClickSubjectDirective, ConditionalClassesDirective, 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 };
|
|
4252
4345
|
//# sourceMappingURL=one-paragon-angular-utilities.mjs.map
|