@one-paragon/angular-utilities 0.1.31 → 0.1.32-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/action-state/action-state-spinner/action-state-spinner.component.d.ts +12 -12
- package/action-state/action-state-ui/action-state-ui.module.d.ts +9 -9
- package/action-state/index.d.ts +4 -4
- package/action-state/ngrx-ext/ngrx-ext.module.d.ts +8 -8
- package/action-state/ngrx.d.ts +31 -31
- package/esm2020/action-state/action-state-spinner/action-state-spinner.component.mjs +23 -23
- package/esm2020/action-state/action-state-ui/action-state-ui.module.mjs +28 -28
- package/esm2020/action-state/index.mjs +8 -8
- package/esm2020/action-state/ngrx-ext/ngrx-ext.module.mjs +23 -23
- package/esm2020/action-state/ngrx.mjs +42 -42
- package/esm2020/http-request-state/HttpRequestStateFactory.mjs +26 -26
- package/esm2020/http-request-state/HttpRequestStateStore.mjs +96 -96
- package/esm2020/http-request-state/directives/HttpStateDirectiveBase.mjs +33 -33
- package/esm2020/http-request-state/directives/http-error-state-directive.mjs +28 -28
- package/esm2020/http-request-state/directives/http-inProgress-state-directive.mjs +28 -28
- package/esm2020/http-request-state/directives/http-notStarted-state-directive.mjs +28 -28
- package/esm2020/http-request-state/directives/http-success-state-directive.mjs +33 -33
- package/esm2020/http-request-state/directives/index.mjs +5 -5
- package/esm2020/http-request-state/directives/request-state-directive.mjs +59 -59
- package/esm2020/http-request-state/helpers.mjs +21 -21
- package/esm2020/http-request-state/http-request-state.mjs +38 -38
- package/esm2020/http-request-state/http-state-module.mjs +40 -40
- package/esm2020/http-request-state/index.mjs +6 -6
- package/esm2020/http-request-state/rxjs/getRequestorBody.mjs +3 -3
- package/esm2020/http-request-state/rxjs/getRequestorState.mjs +2 -2
- package/esm2020/http-request-state/rxjs/index.mjs +4 -4
- package/esm2020/http-request-state/rxjs/tapError.mjs +11 -11
- package/esm2020/http-request-state/rxjs/tapSuccess.mjs +11 -11
- package/esm2020/http-request-state/types.mjs +15 -15
- package/esm2020/ngrx/actionable-selector.mjs +75 -75
- package/esm2020/ngrx/index.mjs +1 -1
- package/esm2020/one-paragon-angular-utilities.mjs +4 -4
- package/esm2020/public-api.mjs +19 -19
- package/esm2020/rxjs/defaultShareReplay.mjs +6 -6
- package/esm2020/rxjs/index.mjs +5 -5
- package/esm2020/rxjs/mapError.mjs +7 -7
- package/esm2020/rxjs/rxjs-operators.mjs +91 -91
- package/esm2020/rxjs/subjectifier.mjs +15 -15
- package/esm2020/table-builder/classes/DefaultSettings.mjs +6 -6
- package/esm2020/table-builder/classes/GenericTableDataSource.mjs +13 -13
- package/esm2020/table-builder/classes/MatTableObservableDataSource.mjs +41 -21
- package/esm2020/table-builder/classes/TableBuilderConfig.mjs +3 -3
- package/esm2020/table-builder/classes/TableState.mjs +31 -31
- package/esm2020/table-builder/classes/data-filter.mjs +26 -26
- package/esm2020/table-builder/classes/display-col.mjs +1 -1
- package/esm2020/table-builder/classes/filter-info.mjs +73 -73
- package/esm2020/table-builder/classes/table-builder-general-settings.mjs +67 -67
- package/esm2020/table-builder/classes/table-builder.mjs +76 -76
- package/esm2020/table-builder/classes/table-store.mjs +292 -292
- package/esm2020/table-builder/components/array-column.component.mjs +32 -32
- package/esm2020/table-builder/components/column-builder/column-builder.component.mjs +112 -112
- package/esm2020/table-builder/components/date-filter/date-filter.component.mjs +25 -25
- package/esm2020/table-builder/components/date-time-filter/date-time-filter.component.mjs +22 -22
- package/esm2020/table-builder/components/filter/filter.component.mjs +54 -54
- package/esm2020/table-builder/components/filter/in-list/in-list-filter.component.mjs +79 -79
- package/esm2020/table-builder/components/gen-col-displayer/gen-col-displayer.component.mjs +45 -45
- package/esm2020/table-builder/components/generic-table/generic-table.component.mjs +204 -202
- package/esm2020/table-builder/components/generic-table/paginator.component.mjs +60 -60
- package/esm2020/table-builder/components/group-by-list/group-by-list.component.mjs +22 -22
- package/esm2020/table-builder/components/header-menu/header-menu.component.mjs +90 -90
- package/esm2020/table-builder/components/in-filter/in-filter.component.mjs +63 -63
- package/esm2020/table-builder/components/index.mjs +10 -10
- package/esm2020/table-builder/components/initialization-component/initialization-component.mjs +33 -33
- package/esm2020/table-builder/components/link-column.component.mjs +30 -30
- package/esm2020/table-builder/components/number-filter/number-filter.component.mjs +26 -26
- package/esm2020/table-builder/components/sort-menu/sort-menu.component-store.mjs +41 -41
- package/esm2020/table-builder/components/sort-menu/sort-menu.component.mjs +75 -75
- package/esm2020/table-builder/components/table-container/table-container.mjs +322 -322
- package/esm2020/table-builder/components/table-container-filter/filter-list/filter-list.component.mjs +42 -42
- package/esm2020/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.mjs +30 -30
- package/esm2020/table-builder/components/table-container-filter/table-wrapper-filter-store.mjs +24 -24
- package/esm2020/table-builder/directives/custom-cell-directive.mjs +58 -58
- package/esm2020/table-builder/directives/index.mjs +6 -6
- package/esm2020/table-builder/directives/multi-sort.directive.mjs +42 -42
- package/esm2020/table-builder/directives/resize-column.directive.mjs +85 -85
- package/esm2020/table-builder/directives/table-wrapper.directive.mjs +26 -26
- package/esm2020/table-builder/directives/tb-filter.directive.mjs +403 -403
- package/esm2020/table-builder/enums/filterTypes.mjs +72 -72
- package/esm2020/table-builder/functions/boolean-filter-function.mjs +9 -9
- package/esm2020/table-builder/functions/date-filter-function.mjs +58 -58
- package/esm2020/table-builder/functions/download-data.mjs +11 -11
- package/esm2020/table-builder/functions/null-filter-function.mjs +7 -7
- package/esm2020/table-builder/functions/number-filter-function.mjs +31 -31
- package/esm2020/table-builder/functions/sort-data-function.mjs +4 -4
- package/esm2020/table-builder/functions/string-filter-function.mjs +40 -40
- package/esm2020/table-builder/interfaces/ColumnInfo.mjs +1 -1
- package/esm2020/table-builder/interfaces/dictionary.mjs +1 -1
- package/esm2020/table-builder/interfaces/report-def.mjs +35 -35
- package/esm2020/table-builder/material.module.mjs +207 -207
- package/esm2020/table-builder/ngrx/actions.mjs +4 -4
- package/esm2020/table-builder/ngrx/effects.mjs +47 -47
- package/esm2020/table-builder/ngrx/reducer.mjs +51 -51
- package/esm2020/table-builder/ngrx/selectors.mjs +23 -23
- package/esm2020/table-builder/pipes/column-total.pipe.mjs +19 -19
- package/esm2020/table-builder/pipes/format-filter-type.pipe.mjs +17 -17
- package/esm2020/table-builder/pipes/format-filter-value.pipe.mjs +45 -45
- package/esm2020/table-builder/pipes/key-display.mjs +19 -19
- package/esm2020/table-builder/services/export-to-csv.service.mjs +88 -88
- package/esm2020/table-builder/services/link-creator.service.mjs +42 -42
- package/esm2020/table-builder/services/table-template-service.mjs +44 -44
- package/esm2020/table-builder/services/transform-creator.mjs +75 -75
- package/esm2020/table-builder/table-builder.module.mjs +215 -207
- package/esm2020/utilities/directives/auto-focus.directive.mjs +25 -25
- package/esm2020/utilities/directives/clickEmitterDirective.mjs +20 -20
- package/esm2020/utilities/directives/clickSubject.mjs +26 -26
- package/esm2020/utilities/directives/conditional-classes.directive.mjs +35 -35
- package/esm2020/utilities/directives/dialog-service.mjs +25 -25
- package/esm2020/utilities/directives/dialog.mjs +137 -137
- package/esm2020/utilities/directives/mat-toggle-group-directive.mjs +59 -59
- package/esm2020/utilities/directives/prevent-enter.directive.mjs +18 -18
- package/esm2020/utilities/directives/stop-propagation.directive.mjs +24 -24
- package/esm2020/utilities/directives/styler.mjs +25 -25
- package/esm2020/utilities/directives/trim-whitespace.directive.mjs +29 -29
- package/esm2020/utilities/index.mjs +16 -16
- package/esm2020/utilities/module.mjs +91 -91
- package/esm2020/utilities/pipes/function.pipe.mjs +20 -20
- package/esm2020/utilities/pipes/phone.pipe.mjs +19 -19
- package/esm2020/utilities/pipes/space-case.pipes.mjs +28 -28
- package/fesm2015/one-paragon-angular-utilities.mjs +4442 -4413
- package/fesm2015/one-paragon-angular-utilities.mjs.map +1 -1
- package/fesm2020/one-paragon-angular-utilities.mjs +4422 -4393
- package/fesm2020/one-paragon-angular-utilities.mjs.map +1 -1
- package/http-request-state/HttpRequestStateFactory.d.ts +14 -14
- package/http-request-state/HttpRequestStateStore.d.ts +48 -48
- package/http-request-state/directives/HttpStateDirectiveBase.d.ts +16 -16
- package/http-request-state/directives/http-error-state-directive.d.ts +12 -12
- package/http-request-state/directives/http-inProgress-state-directive.d.ts +12 -12
- package/http-request-state/directives/http-notStarted-state-directive.d.ts +12 -12
- package/http-request-state/directives/http-success-state-directive.d.ts +21 -21
- package/http-request-state/directives/index.d.ts +5 -5
- package/http-request-state/directives/request-state-directive.d.ts +35 -35
- package/http-request-state/helpers.d.ts +9 -9
- package/http-request-state/http-request-state.d.ts +12 -12
- package/http-request-state/http-state-module.d.ts +11 -11
- package/http-request-state/index.d.ts +6 -6
- package/http-request-state/rxjs/getRequestorBody.d.ts +3 -3
- package/http-request-state/rxjs/getRequestorState.d.ts +3 -3
- package/http-request-state/rxjs/index.d.ts +4 -4
- package/http-request-state/rxjs/tapError.d.ts +3 -3
- package/http-request-state/rxjs/tapSuccess.d.ts +3 -3
- package/http-request-state/types.d.ts +36 -36
- package/index.d.ts +5 -5
- package/ngrx/actionable-selector.d.ts +15 -15
- package/ngrx/index.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +15 -15
- package/rxjs/defaultShareReplay.d.ts +2 -2
- package/rxjs/index.d.ts +4 -4
- package/rxjs/mapError.d.ts +2 -2
- package/rxjs/rxjs-operators.d.ts +12 -12
- package/rxjs/subjectifier.d.ts +9 -9
- package/table-builder/classes/DefaultSettings.d.ts +9 -9
- package/table-builder/classes/GenericTableDataSource.d.ts +8 -8
- package/table-builder/classes/MatTableObservableDataSource.d.ts +17 -9
- package/table-builder/classes/TableBuilderConfig.d.ts +20 -20
- package/table-builder/classes/TableState.d.ts +46 -46
- package/table-builder/classes/data-filter.d.ts +9 -9
- package/table-builder/classes/display-col.d.ts +5 -5
- package/table-builder/classes/filter-info.d.ts +40 -40
- package/table-builder/classes/table-builder-general-settings.d.ts +43 -43
- package/table-builder/classes/table-builder.d.ts +14 -14
- package/table-builder/classes/table-store.d.ts +114 -114
- package/table-builder/components/array-column.component.d.ts +14 -14
- package/table-builder/components/column-builder/column-builder.component.d.ts +50 -50
- package/table-builder/components/date-filter/date-filter.component.d.ts +10 -10
- package/table-builder/components/date-time-filter/date-time-filter.component.d.ts +10 -10
- package/table-builder/components/filter/filter.component.d.ts +371 -371
- package/table-builder/components/filter/in-list/in-list-filter.component.d.ts +27 -27
- package/table-builder/components/gen-col-displayer/gen-col-displayer.component.d.ts +16 -16
- package/table-builder/components/generic-table/generic-table.component.d.ts +73 -73
- package/table-builder/components/generic-table/paginator.component.d.ts +28 -28
- package/table-builder/components/group-by-list/group-by-list.component.d.ts +10 -10
- package/table-builder/components/header-menu/header-menu.component.d.ts +25 -25
- package/table-builder/components/in-filter/in-filter.component.d.ts +21 -21
- package/table-builder/components/index.d.ts +9 -9
- package/table-builder/components/initialization-component/initialization-component.d.ts +12 -12
- package/table-builder/components/link-column.component.d.ts +17 -17
- package/table-builder/components/number-filter/number-filter.component.d.ts +12 -12
- package/table-builder/components/sort-menu/sort-menu.component-store.d.ts +24 -24
- package/table-builder/components/sort-menu/sort-menu.component.d.ts +25 -25
- package/table-builder/components/table-container/table-container.d.ts +68 -68
- package/table-builder/components/table-container-filter/filter-list/filter-list.component.d.ts +17 -17
- package/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.d.ts +14 -14
- package/table-builder/components/table-container-filter/table-wrapper-filter-store.d.ts +14 -14
- package/table-builder/directives/custom-cell-directive.d.ts +19 -19
- package/table-builder/directives/index.d.ts +5 -5
- package/table-builder/directives/multi-sort.directive.d.ts +11 -11
- package/table-builder/directives/resize-column.directive.d.ts +43 -43
- package/table-builder/directives/table-wrapper.directive.d.ts +11 -11
- package/table-builder/directives/tb-filter.directive.d.ts +120 -120
- package/table-builder/enums/filterTypes.d.ts +37 -37
- package/table-builder/functions/boolean-filter-function.d.ts +3 -3
- package/table-builder/functions/date-filter-function.d.ts +4 -4
- package/table-builder/functions/download-data.d.ts +1 -1
- package/table-builder/functions/null-filter-function.d.ts +2 -2
- package/table-builder/functions/number-filter-function.d.ts +4 -4
- package/table-builder/functions/sort-data-function.d.ts +3 -3
- package/table-builder/functions/string-filter-function.d.ts +7 -7
- package/table-builder/interfaces/ColumnInfo.d.ts +6 -6
- package/table-builder/interfaces/dictionary.d.ts +3 -3
- package/table-builder/interfaces/report-def.d.ts +142 -142
- package/table-builder/material.module.d.ts +32 -32
- package/table-builder/ngrx/actions.d.ts +23 -23
- package/table-builder/ngrx/effects.d.ts +19 -19
- package/table-builder/ngrx/reducer.d.ts +15 -15
- package/table-builder/ngrx/selectors.d.ts +22 -22
- package/table-builder/pipes/column-total.pipe.d.ts +8 -8
- package/table-builder/pipes/format-filter-type.pipe.d.ts +8 -8
- package/table-builder/pipes/format-filter-value.pipe.d.ts +14 -14
- package/table-builder/pipes/key-display.d.ts +11 -11
- package/table-builder/services/export-to-csv.service.d.ts +22 -22
- package/table-builder/services/link-creator.service.d.ts +12 -12
- package/table-builder/services/table-template-service.d.ts +14 -14
- package/table-builder/services/transform-creator.d.ts +19 -19
- package/table-builder/table-builder.module.d.ts +48 -46
- package/utilities/directives/auto-focus.directive.d.ts +10 -10
- package/utilities/directives/clickEmitterDirective.d.ts +7 -7
- package/utilities/directives/clickSubject.d.ts +9 -9
- package/utilities/directives/conditional-classes.directive.d.ts +14 -14
- package/utilities/directives/dialog-service.d.ts +10 -10
- package/utilities/directives/dialog.d.ts +46 -46
- package/utilities/directives/mat-toggle-group-directive.d.ts +21 -21
- package/utilities/directives/prevent-enter.directive.d.ts +6 -6
- package/utilities/directives/stop-propagation.directive.d.ts +7 -7
- package/utilities/directives/styler.d.ts +9 -9
- package/utilities/directives/trim-whitespace.directive.d.ts +9 -9
- package/utilities/index.d.ts +15 -15
- package/utilities/module.d.ts +19 -19
- package/utilities/pipes/function.pipe.d.ts +7 -7
- package/utilities/pipes/phone.pipe.d.ts +7 -7
- package/utilities/pipes/space-case.pipes.d.ts +17 -17
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { Component, ChangeDetectionStrategy, Input } from '@angular/core';
|
|
2
|
-
import { FilterType } from '../../enums/filterTypes';
|
|
3
|
-
import { ControlContainer, NgForm } from '@angular/forms';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
import * as i1 from "@angular/common";
|
|
6
|
-
import * as i2 from "@angular/forms";
|
|
7
|
-
export class DateTimeFilterComponent {
|
|
8
|
-
constructor() {
|
|
9
|
-
this.FilterType = FilterType;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
DateTimeFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DateTimeFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
13
|
-
DateTimeFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: DateTimeFilterComponent, selector: "tb-date-time-filter", inputs: { info: "info", CurrentFilterType: "CurrentFilterType" }, ngImport: i0, template: "<ng-container *ngIf=\"CurrentFilterType !== FilterType.DateTimeBetween && CurrentFilterType !== FilterType.IsNull\">\
|
|
14
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DateTimeFilterComponent, decorators: [{
|
|
15
|
-
type: Component,
|
|
16
|
-
args: [{ selector: 'tb-date-time-filter', changeDetection: ChangeDetectionStrategy.OnPush, viewProviders: [{ provide: ControlContainer, useExisting: NgForm }], template: "<ng-container *ngIf=\"CurrentFilterType !== FilterType.DateTimeBetween && CurrentFilterType !== FilterType.IsNull\">\
|
|
17
|
-
}], propDecorators: { info: [{
|
|
18
|
-
type: Input
|
|
19
|
-
}], CurrentFilterType: [{
|
|
20
|
-
type: Input
|
|
21
|
-
}] } });
|
|
22
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Component, ChangeDetectionStrategy, Input } from '@angular/core';
|
|
2
|
+
import { FilterType } from '../../enums/filterTypes';
|
|
3
|
+
import { ControlContainer, NgForm } from '@angular/forms';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "@angular/common";
|
|
6
|
+
import * as i2 from "@angular/forms";
|
|
7
|
+
export class DateTimeFilterComponent {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.FilterType = FilterType;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
DateTimeFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DateTimeFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
13
|
+
DateTimeFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: DateTimeFilterComponent, selector: "tb-date-time-filter", inputs: { info: "info", CurrentFilterType: "CurrentFilterType" }, ngImport: i0, template: "<ng-container *ngIf=\"CurrentFilterType !== FilterType.DateTimeBetween && CurrentFilterType !== FilterType.IsNull\">\n <input type=\"datetime-local\" [ngModel]=\"info.filterValue\" preventEnter name=\"filterValue\" class=\"op-date-time-input\"/>\n</ng-container>\n\n<ng-container *ngIf=\"CurrentFilterType === FilterType.DateTimeBetween\" ngModelGroup=\"filterValue\">\n <input type=\"datetime-local\" [ngModel]=\"info.filterValue?.Start\" preventEnter name=\"Start\" class=\"op-date-time-input\"/>\n <input type=\"datetime-local\" [ngModel]=\"info.filterValue?.End\" preventEnter name=\"End\" class=\"op-date-time-input\"/>\n</ng-container>", styles: [".filter-name{color:#6495ed;margin:10px 0;font-weight:600;display:inline-block}.switch{display:inline-block}.my-filter{margin-right:15px}.cancel-button{float:right}.head-row{width:100%}.filter-row{width:-moz-fit-content;width:fit-content}mat-card.filter-card::ng-deep mat-form-field{width:150px}mat-card.filter-card::ng-deep .mat-mdc-form-field-subscript-wrapper{line-height:0}mat-card.filter-card::ng-deep .mat-mdc-form-field-subscript-wrapper:before{height:0}.inline{display:inline-block}.small-button{height:18px;width:18px;font-size:18px;padding:0;margin:0}.small-button ::ng-deep *{line-height:initial;font-size:initial;height:18px;width:18px;font-size:18px;bottom:initial}.cancel-button{float:right;font-weight:700}.date-toggle ::ng-deep svg{position:absolute;left:0;top:0}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgModelGroup, selector: "[ngModelGroup]", inputs: ["ngModelGroup"], exportAs: ["ngModelGroup"] }], viewProviders: [{ provide: ControlContainer, useExisting: NgForm }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
14
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DateTimeFilterComponent, decorators: [{
|
|
15
|
+
type: Component,
|
|
16
|
+
args: [{ selector: 'tb-date-time-filter', changeDetection: ChangeDetectionStrategy.OnPush, viewProviders: [{ provide: ControlContainer, useExisting: NgForm }], template: "<ng-container *ngIf=\"CurrentFilterType !== FilterType.DateTimeBetween && CurrentFilterType !== FilterType.IsNull\">\n <input type=\"datetime-local\" [ngModel]=\"info.filterValue\" preventEnter name=\"filterValue\" class=\"op-date-time-input\"/>\n</ng-container>\n\n<ng-container *ngIf=\"CurrentFilterType === FilterType.DateTimeBetween\" ngModelGroup=\"filterValue\">\n <input type=\"datetime-local\" [ngModel]=\"info.filterValue?.Start\" preventEnter name=\"Start\" class=\"op-date-time-input\"/>\n <input type=\"datetime-local\" [ngModel]=\"info.filterValue?.End\" preventEnter name=\"End\" class=\"op-date-time-input\"/>\n</ng-container>", styles: [".filter-name{color:#6495ed;margin:10px 0;font-weight:600;display:inline-block}.switch{display:inline-block}.my-filter{margin-right:15px}.cancel-button{float:right}.head-row{width:100%}.filter-row{width:-moz-fit-content;width:fit-content}mat-card.filter-card::ng-deep mat-form-field{width:150px}mat-card.filter-card::ng-deep .mat-mdc-form-field-subscript-wrapper{line-height:0}mat-card.filter-card::ng-deep .mat-mdc-form-field-subscript-wrapper:before{height:0}.inline{display:inline-block}.small-button{height:18px;width:18px;font-size:18px;padding:0;margin:0}.small-button ::ng-deep *{line-height:initial;font-size:initial;height:18px;width:18px;font-size:18px;bottom:initial}.cancel-button{float:right;font-weight:700}.date-toggle ::ng-deep svg{position:absolute;left:0;top:0}\n"] }]
|
|
17
|
+
}], propDecorators: { info: [{
|
|
18
|
+
type: Input
|
|
19
|
+
}], CurrentFilterType: [{
|
|
20
|
+
type: Input
|
|
21
|
+
}] } });
|
|
22
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZS10aW1lLWZpbHRlci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hbmd1bGFyLXV0aWxpdGllcy9zcmMvdGFibGUtYnVpbGRlci9jb21wb25lbnRzL2RhdGUtdGltZS1maWx0ZXIvZGF0ZS10aW1lLWZpbHRlci5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hbmd1bGFyLXV0aWxpdGllcy9zcmMvdGFibGUtYnVpbGRlci9jb21wb25lbnRzL2RhdGUtdGltZS1maWx0ZXIvZGF0ZS10aW1lLWZpbHRlci5jb21wb25lbnQuaHRtbCJdLCJuYW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ZXJWYWx1ZVwiPlxuICA8aW5wdXQgdHlwZT1cImRhdGV0aW1lLWxvY2FsXCIgW25nTW9kZWxdPVwiaW5mby5maWx0ZXJWYWx1ZT8uU3RhcnRcIiBwcmV2ZW50RW50ZXIgbmFtZT1cIlN0YXJ0XCIgY2xhc3M9XCJvcC1kYXRlLXRpbWUtaW5wdXRcIi8+XG4gIDxpbnB1dCB0eXBlPVwiZGF0ZXRpbWUtbG9jYWxcIiBbbmdNb2RlbF09XCJpbmZvLmZpbHRlclZhbHVlPy5FbmRcIiBwcmV2ZW50RW50ZXIgbmFtZT1cIkVuZFwiIGNsYXNzPVwib3AtZGF0ZS10aW1lLWlucHV0XCIvPlxuPC9uZy1jb250YWluZXI+Il19
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
import { Component, ChangeDetectionStrategy, Input, Output, EventEmitter } from '@angular/core';
|
|
2
|
-
import { filterTypeMap } from '../../classes/filter-info';
|
|
3
|
-
import { FilterType } from '../../enums/filterTypes';
|
|
4
|
-
import { FieldType } from '../../interfaces/report-def';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
import * as i1 from "../../classes/table-store";
|
|
7
|
-
import * as i2 from "@angular/common";
|
|
8
|
-
import * as i3 from "@angular/material/form-field";
|
|
9
|
-
import * as i4 from "@angular/material/select";
|
|
10
|
-
import * as i5 from "@angular/material/core";
|
|
11
|
-
import * as i6 from "@angular/material/radio";
|
|
12
|
-
import * as i7 from "@angular/material/button";
|
|
13
|
-
import * as i8 from "@angular/material/tooltip";
|
|
14
|
-
import * as i9 from "@angular/material/card";
|
|
15
|
-
import * as i10 from "@angular/material/input";
|
|
16
|
-
import * as i11 from "@angular/material/icon";
|
|
17
|
-
import * as i12 from "@angular/forms";
|
|
18
|
-
import * as i13 from "../date-filter/date-filter.component";
|
|
19
|
-
import * as i14 from "../number-filter/number-filter.component";
|
|
20
|
-
import * as i15 from "../in-filter/in-filter.component";
|
|
21
|
-
import * as i16 from "./in-list/in-list-filter.component";
|
|
22
|
-
import * as i17 from "../date-time-filter/date-time-filter.component";
|
|
23
|
-
import * as i18 from "../../../utilities/pipes/space-case.pipes";
|
|
24
|
-
export class FilterComponent {
|
|
25
|
-
constructor(state) {
|
|
26
|
-
this.state = state;
|
|
27
|
-
this.filterTypes = filterTypeMap;
|
|
28
|
-
this.FilterType = FilterType;
|
|
29
|
-
this.FieldType = FieldType;
|
|
30
|
-
this.close = new EventEmitter();
|
|
31
|
-
}
|
|
32
|
-
;
|
|
33
|
-
ngOnInit() {
|
|
34
|
-
this.currentFilterType = this.filter.filterType;
|
|
35
|
-
}
|
|
36
|
-
onEnter(filter, event) {
|
|
37
|
-
event.preventDefault();
|
|
38
|
-
if (filter.filterValue != null && filter.filterType) {
|
|
39
|
-
this.state.addFilter(filter);
|
|
40
|
-
this.close.emit();
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
FilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: FilterComponent, deps: [{ token: i1.TableStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
45
|
-
FilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: FilterComponent, selector: "tb-filter", inputs: { filter: "filter" }, outputs: { close: "close" }, ngImport: i0, template: "<mat-card appearance=\"outlined\" class=\"filter-card\" *ngIf=\"filter\">\r\n <mat-card-content>\r\n <form #form=\"ngForm\" (keydown.enter)=\"onEnter(form.value,$event)\" (keydown.escape)=\"close.emit()\">\r\n <input type=\"hidden\" name=\"filterId\" [ngModel]=\"filter.filterId\" />\r\n <input type=\"hidden\" name=\"key\" [ngModel]=\"filter.key\" />\r\n <input type=\"hidden\" name=\"fieldType\" [ngModel]=\"filter.fieldType\" />\r\n <div class=\"head-row\" >\r\n <h4 class=\"filter-name\">{{(filter.key | spaceCase)}} Filter</h4>\r\n <button class=\"cancel-button small-button\" color=\"primary\" mat-icon-button (click)=\"close.emit();\" type=\"button\"\r\n matTooltip=\"Close\">\r\n <mat-icon class=\"cancel-button\" color=\"primary\">close</mat-icon>\r\n </button>\r\n </div>\r\n <div class=\"filter-row\">\r\n <div class=\"inline\">\r\n <mat-form-field class=\"my-filter\" >\r\n <mat-select placeholder=\"Select Filter Type\" name=\"filterType\" [(ngModel)]=\"currentFilterType\" >\r\n <mat-option *ngFor=\"let kvp of filterTypes[filter.fieldType] | keyvalue \" [value]=\"$any(kvp.value)[0]\">\r\n {{ kvp.key }}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <ng-container [ngSwitch]=\"true\">\r\n <ng-container *ngSwitchCase=\"filter.fieldType === FieldType.String || filter.fieldType === FieldType.Array || filter.fieldType === FieldType.Link ||\r\n filter.fieldType === FieldType.Unknown || filter.fieldType === FieldType.PhoneNumber\" >\r\n <ng-container *ngTemplateOutlet=\"String\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"filter.fieldType === FieldType.Number || filter.fieldType === FieldType.Currency\">\r\n <tb-number-filter [info]=\"filter\" [CurrentFilterType]=\"currentFilterType!\" ></tb-number-filter>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"filter.fieldType === FieldType.Boolean\">\r\n <ng-container *ngTemplateOutlet=\"Boolean\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"filter.fieldType === FieldType.Date\">\r\n <tb-date-filter [info]=\"filter\" [CurrentFilterType]=\"currentFilterType!\"></tb-date-filter>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"filter.fieldType === FieldType.DateTime\">\r\n <tb-date-time-filter [info]=\"filter\" [CurrentFilterType]=\"currentFilterType!\"></tb-date-time-filter>\r\n </ng-container>\r\n <ng-container *ngSwitchCase='filter.fieldType === FieldType.Enum' >\r\n <ng-container *ngTemplateOutlet=\"Enum\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <mat-radio-group name=\"filterValue\" [ngModel]=\"filter.filterValue\" *ngIf=\"currentFilterType === FilterType.IsNull\">\r\n <mat-radio-button [value]=\"true\">True</mat-radio-button>\r\n <mat-radio-button [value]=\"false\">False</mat-radio-button>\r\n </mat-radio-group>\r\n </div>\r\n <button mat-button (click)=\"state.addFilter(form.value)\" disableRipple [disabled]=\"form.value.filterValue==undefined || !form.value.filterType\">\r\n Apply\r\n </button>\r\n \r\n \r\n <ng-template #String>\r\n <mat-form-field class=\"my-filter\" *ngIf=\"currentFilterType !== FilterType.IsNull && currentFilterType !== FilterType.In\">\r\n <input matInput name=\"filterValue\" [ngModel]=\"filter.filterValue\" />\r\n </mat-form-field>\r\n <ng-container *ngIf=\"currentFilterType === FilterType.In\">\r\n <lib-in-filter [type]=\"FieldType.String\" name='filterValue' [(ngModel)]=\"filter.filterValue\" ></lib-in-filter>\r\n </ng-container>\r\n </ng-template>\r\n \r\n <ng-template #Boolean >\r\n <div class=\"switch\" [ngSwitch]=\"currentFilterType\">\r\n <div class=\"switch\" *ngSwitchCase=\"FilterType.BooleanEquals\">\r\n <mat-radio-group name=\"filterValue\" [ngModel]=\"filter.filterValue\" >\r\n <mat-radio-button [value]=\"true\" preventEnter>True</mat-radio-button>\r\n <mat-radio-button [value]=\"false\" preventEnter>False</mat-radio-button>\r\n </mat-radio-group>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template #Enum>\r\n <ng-container *ngIf='currentFilterType === FilterType.In' >\r\n <tb-in-list-filter [key]='filter.key' name='filterValue' [(ngModel)]='filter.filterValue' ></tb-in-list-filter>\r\n </ng-container>\r\n </ng-template>\r\n </form>\r\n </mat-card-content>\r\n</mat-card>\r\n", styles: [".filter-name{color:#6495ed;margin:10px 0;font-weight:600;display:inline-block}.switch{display:inline-block}.my-filter{margin-right:15px}.cancel-button{float:right}.head-row{width:100%}.filter-row{width:-moz-fit-content;width:fit-content}mat-card.filter-card::ng-deep mat-form-field{width:150px}mat-card.filter-card::ng-deep .mat-mdc-form-field-subscript-wrapper{line-height:0}mat-card.filter-card::ng-deep .mat-mdc-form-field-subscript-wrapper:before{height:0}.inline{display:inline-block}.small-button{height:18px;width:18px;font-size:18px;padding:0;margin:0}.small-button ::ng-deep *{line-height:initial;font-size:initial;height:18px;width:18px;font-size:18px;bottom:initial}.cancel-button{float:right;font-weight:700}.date-toggle ::ng-deep svg{position:absolute;left:0;top:0}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i6.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { kind: "component", type: i6.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { kind: "component", type: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i9.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i9.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i10.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i11.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i12.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i12.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i12.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i12.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i12.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i12.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i13.DateFilterComponent, selector: "tb-date-filter", inputs: ["info", "CurrentFilterType"] }, { kind: "component", type: i14.NumberFilterComponent, selector: "tb-number-filter", inputs: ["CurrentFilterType", "info"] }, { kind: "component", type: i15.InFilterComponent, selector: "lib-in-filter", inputs: ["type"] }, { kind: "component", type: i16.InListFilterComponent, selector: "tb-in-list-filter , [tb-in-list-filter]", inputs: ["key"] }, { kind: "component", type: i17.DateTimeFilterComponent, selector: "tb-date-time-filter", inputs: ["info", "CurrentFilterType"] }, { kind: "pipe", type: i2.KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: i18.SpaceCasePipe, name: "spaceCase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
46
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: FilterComponent, decorators: [{
|
|
47
|
-
type: Component,
|
|
48
|
-
args: [{ selector: 'tb-filter', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-card appearance=\"outlined\" class=\"filter-card\" *ngIf=\"filter\">\
|
|
49
|
-
}], ctorParameters: function () { return [{ type: i1.TableStore }]; }, propDecorators: { filter: [{
|
|
50
|
-
type: Input
|
|
51
|
-
}], close: [{
|
|
52
|
-
type: Output
|
|
53
|
-
}] } });
|
|
54
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Component, ChangeDetectionStrategy, Input, Output, EventEmitter } from '@angular/core';
|
|
2
|
+
import { filterTypeMap } from '../../classes/filter-info';
|
|
3
|
+
import { FilterType } from '../../enums/filterTypes';
|
|
4
|
+
import { FieldType } from '../../interfaces/report-def';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
import * as i1 from "../../classes/table-store";
|
|
7
|
+
import * as i2 from "@angular/common";
|
|
8
|
+
import * as i3 from "@angular/material/form-field";
|
|
9
|
+
import * as i4 from "@angular/material/select";
|
|
10
|
+
import * as i5 from "@angular/material/core";
|
|
11
|
+
import * as i6 from "@angular/material/radio";
|
|
12
|
+
import * as i7 from "@angular/material/button";
|
|
13
|
+
import * as i8 from "@angular/material/tooltip";
|
|
14
|
+
import * as i9 from "@angular/material/card";
|
|
15
|
+
import * as i10 from "@angular/material/input";
|
|
16
|
+
import * as i11 from "@angular/material/icon";
|
|
17
|
+
import * as i12 from "@angular/forms";
|
|
18
|
+
import * as i13 from "../date-filter/date-filter.component";
|
|
19
|
+
import * as i14 from "../number-filter/number-filter.component";
|
|
20
|
+
import * as i15 from "../in-filter/in-filter.component";
|
|
21
|
+
import * as i16 from "./in-list/in-list-filter.component";
|
|
22
|
+
import * as i17 from "../date-time-filter/date-time-filter.component";
|
|
23
|
+
import * as i18 from "../../../utilities/pipes/space-case.pipes";
|
|
24
|
+
export class FilterComponent {
|
|
25
|
+
constructor(state) {
|
|
26
|
+
this.state = state;
|
|
27
|
+
this.filterTypes = filterTypeMap;
|
|
28
|
+
this.FilterType = FilterType;
|
|
29
|
+
this.FieldType = FieldType;
|
|
30
|
+
this.close = new EventEmitter();
|
|
31
|
+
}
|
|
32
|
+
;
|
|
33
|
+
ngOnInit() {
|
|
34
|
+
this.currentFilterType = this.filter.filterType;
|
|
35
|
+
}
|
|
36
|
+
onEnter(filter, event) {
|
|
37
|
+
event.preventDefault();
|
|
38
|
+
if (filter.filterValue != null && filter.filterType) {
|
|
39
|
+
this.state.addFilter(filter);
|
|
40
|
+
this.close.emit();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
FilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: FilterComponent, deps: [{ token: i1.TableStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
45
|
+
FilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: FilterComponent, selector: "tb-filter", inputs: { filter: "filter" }, outputs: { close: "close" }, ngImport: i0, template: "<mat-card appearance=\"outlined\" class=\"filter-card\" *ngIf=\"filter\">\n <mat-card-content>\n <form #form=\"ngForm\" (keydown.enter)=\"onEnter(form.value,$event)\" (keydown.escape)=\"close.emit()\">\n <input type=\"hidden\" name=\"filterId\" [ngModel]=\"filter.filterId\" />\n <input type=\"hidden\" name=\"key\" [ngModel]=\"filter.key\" />\n <input type=\"hidden\" name=\"fieldType\" [ngModel]=\"filter.fieldType\" />\n <div class=\"head-row\" >\n <h4 class=\"filter-name\">{{(filter.key | spaceCase)}} Filter</h4>\n <button class=\"cancel-button small-button\" color=\"primary\" mat-icon-button (click)=\"close.emit();\" type=\"button\"\n matTooltip=\"Close\">\n <mat-icon class=\"cancel-button\" color=\"primary\">close</mat-icon>\n </button>\n </div>\n <div class=\"filter-row\">\n <div class=\"inline\">\n <mat-form-field class=\"my-filter\" >\n <mat-select placeholder=\"Select Filter Type\" name=\"filterType\" [(ngModel)]=\"currentFilterType\" >\n <mat-option *ngFor=\"let kvp of filterTypes[filter.fieldType] | keyvalue \" [value]=\"$any(kvp.value)[0]\">\n {{ kvp.key }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <ng-container [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"filter.fieldType === FieldType.String || filter.fieldType === FieldType.Array || filter.fieldType === FieldType.Link ||\n filter.fieldType === FieldType.Unknown || filter.fieldType === FieldType.PhoneNumber\" >\n <ng-container *ngTemplateOutlet=\"String\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"filter.fieldType === FieldType.Number || filter.fieldType === FieldType.Currency\">\n <tb-number-filter [info]=\"filter\" [CurrentFilterType]=\"currentFilterType!\" ></tb-number-filter>\n </ng-container>\n <ng-container *ngSwitchCase=\"filter.fieldType === FieldType.Boolean\">\n <ng-container *ngTemplateOutlet=\"Boolean\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"filter.fieldType === FieldType.Date\">\n <tb-date-filter [info]=\"filter\" [CurrentFilterType]=\"currentFilterType!\"></tb-date-filter>\n </ng-container>\n <ng-container *ngSwitchCase=\"filter.fieldType === FieldType.DateTime\">\n <tb-date-time-filter [info]=\"filter\" [CurrentFilterType]=\"currentFilterType!\"></tb-date-time-filter>\n </ng-container>\n <ng-container *ngSwitchCase='filter.fieldType === FieldType.Enum' >\n <ng-container *ngTemplateOutlet=\"Enum\"></ng-container>\n </ng-container>\n </ng-container>\n <mat-radio-group name=\"filterValue\" [ngModel]=\"filter.filterValue\" *ngIf=\"currentFilterType === FilterType.IsNull\">\n <mat-radio-button [value]=\"true\">True</mat-radio-button>\n <mat-radio-button [value]=\"false\">False</mat-radio-button>\n </mat-radio-group>\n </div>\n <button mat-button (click)=\"state.addFilter(form.value)\" disableRipple [disabled]=\"form.value.filterValue==undefined || !form.value.filterType\">\n Apply\n </button>\n \n \n <ng-template #String>\n <mat-form-field class=\"my-filter\" *ngIf=\"currentFilterType !== FilterType.IsNull && currentFilterType !== FilterType.In\">\n <input matInput name=\"filterValue\" [ngModel]=\"filter.filterValue\" />\n </mat-form-field>\n <ng-container *ngIf=\"currentFilterType === FilterType.In\">\n <lib-in-filter [type]=\"FieldType.String\" name='filterValue' [(ngModel)]=\"filter.filterValue\" ></lib-in-filter>\n </ng-container>\n </ng-template>\n \n <ng-template #Boolean >\n <div class=\"switch\" [ngSwitch]=\"currentFilterType\">\n <div class=\"switch\" *ngSwitchCase=\"FilterType.BooleanEquals\">\n <mat-radio-group name=\"filterValue\" [ngModel]=\"filter.filterValue\" >\n <mat-radio-button [value]=\"true\" preventEnter>True</mat-radio-button>\n <mat-radio-button [value]=\"false\" preventEnter>False</mat-radio-button>\n </mat-radio-group>\n </div>\n </div>\n </ng-template>\n <ng-template #Enum>\n <ng-container *ngIf='currentFilterType === FilterType.In' >\n <tb-in-list-filter [key]='filter.key' name='filterValue' [(ngModel)]='filter.filterValue' ></tb-in-list-filter>\n </ng-container>\n </ng-template>\n </form>\n </mat-card-content>\n</mat-card>\n", styles: [".filter-name{color:#6495ed;margin:10px 0;font-weight:600;display:inline-block}.switch{display:inline-block}.my-filter{margin-right:15px}.cancel-button{float:right}.head-row{width:100%}.filter-row{width:-moz-fit-content;width:fit-content}mat-card.filter-card::ng-deep mat-form-field{width:150px}mat-card.filter-card::ng-deep .mat-mdc-form-field-subscript-wrapper{line-height:0}mat-card.filter-card::ng-deep .mat-mdc-form-field-subscript-wrapper:before{height:0}.inline{display:inline-block}.small-button{height:18px;width:18px;font-size:18px;padding:0;margin:0}.small-button ::ng-deep *{line-height:initial;font-size:initial;height:18px;width:18px;font-size:18px;bottom:initial}.cancel-button{float:right;font-weight:700}.date-toggle ::ng-deep svg{position:absolute;left:0;top:0}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i6.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { kind: "component", type: i6.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { kind: "component", type: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i9.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i9.MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: i10.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i11.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i12.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i12.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i12.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i12.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i12.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i12.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i13.DateFilterComponent, selector: "tb-date-filter", inputs: ["info", "CurrentFilterType"] }, { kind: "component", type: i14.NumberFilterComponent, selector: "tb-number-filter", inputs: ["CurrentFilterType", "info"] }, { kind: "component", type: i15.InFilterComponent, selector: "lib-in-filter", inputs: ["type"] }, { kind: "component", type: i16.InListFilterComponent, selector: "tb-in-list-filter , [tb-in-list-filter]", inputs: ["key"] }, { kind: "component", type: i17.DateTimeFilterComponent, selector: "tb-date-time-filter", inputs: ["info", "CurrentFilterType"] }, { kind: "pipe", type: i2.KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: i18.SpaceCasePipe, name: "spaceCase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: FilterComponent, decorators: [{
|
|
47
|
+
type: Component,
|
|
48
|
+
args: [{ selector: 'tb-filter', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-card appearance=\"outlined\" class=\"filter-card\" *ngIf=\"filter\">\n <mat-card-content>\n <form #form=\"ngForm\" (keydown.enter)=\"onEnter(form.value,$event)\" (keydown.escape)=\"close.emit()\">\n <input type=\"hidden\" name=\"filterId\" [ngModel]=\"filter.filterId\" />\n <input type=\"hidden\" name=\"key\" [ngModel]=\"filter.key\" />\n <input type=\"hidden\" name=\"fieldType\" [ngModel]=\"filter.fieldType\" />\n <div class=\"head-row\" >\n <h4 class=\"filter-name\">{{(filter.key | spaceCase)}} Filter</h4>\n <button class=\"cancel-button small-button\" color=\"primary\" mat-icon-button (click)=\"close.emit();\" type=\"button\"\n matTooltip=\"Close\">\n <mat-icon class=\"cancel-button\" color=\"primary\">close</mat-icon>\n </button>\n </div>\n <div class=\"filter-row\">\n <div class=\"inline\">\n <mat-form-field class=\"my-filter\" >\n <mat-select placeholder=\"Select Filter Type\" name=\"filterType\" [(ngModel)]=\"currentFilterType\" >\n <mat-option *ngFor=\"let kvp of filterTypes[filter.fieldType] | keyvalue \" [value]=\"$any(kvp.value)[0]\">\n {{ kvp.key }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <ng-container [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"filter.fieldType === FieldType.String || filter.fieldType === FieldType.Array || filter.fieldType === FieldType.Link ||\n filter.fieldType === FieldType.Unknown || filter.fieldType === FieldType.PhoneNumber\" >\n <ng-container *ngTemplateOutlet=\"String\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"filter.fieldType === FieldType.Number || filter.fieldType === FieldType.Currency\">\n <tb-number-filter [info]=\"filter\" [CurrentFilterType]=\"currentFilterType!\" ></tb-number-filter>\n </ng-container>\n <ng-container *ngSwitchCase=\"filter.fieldType === FieldType.Boolean\">\n <ng-container *ngTemplateOutlet=\"Boolean\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"filter.fieldType === FieldType.Date\">\n <tb-date-filter [info]=\"filter\" [CurrentFilterType]=\"currentFilterType!\"></tb-date-filter>\n </ng-container>\n <ng-container *ngSwitchCase=\"filter.fieldType === FieldType.DateTime\">\n <tb-date-time-filter [info]=\"filter\" [CurrentFilterType]=\"currentFilterType!\"></tb-date-time-filter>\n </ng-container>\n <ng-container *ngSwitchCase='filter.fieldType === FieldType.Enum' >\n <ng-container *ngTemplateOutlet=\"Enum\"></ng-container>\n </ng-container>\n </ng-container>\n <mat-radio-group name=\"filterValue\" [ngModel]=\"filter.filterValue\" *ngIf=\"currentFilterType === FilterType.IsNull\">\n <mat-radio-button [value]=\"true\">True</mat-radio-button>\n <mat-radio-button [value]=\"false\">False</mat-radio-button>\n </mat-radio-group>\n </div>\n <button mat-button (click)=\"state.addFilter(form.value)\" disableRipple [disabled]=\"form.value.filterValue==undefined || !form.value.filterType\">\n Apply\n </button>\n \n \n <ng-template #String>\n <mat-form-field class=\"my-filter\" *ngIf=\"currentFilterType !== FilterType.IsNull && currentFilterType !== FilterType.In\">\n <input matInput name=\"filterValue\" [ngModel]=\"filter.filterValue\" />\n </mat-form-field>\n <ng-container *ngIf=\"currentFilterType === FilterType.In\">\n <lib-in-filter [type]=\"FieldType.String\" name='filterValue' [(ngModel)]=\"filter.filterValue\" ></lib-in-filter>\n </ng-container>\n </ng-template>\n \n <ng-template #Boolean >\n <div class=\"switch\" [ngSwitch]=\"currentFilterType\">\n <div class=\"switch\" *ngSwitchCase=\"FilterType.BooleanEquals\">\n <mat-radio-group name=\"filterValue\" [ngModel]=\"filter.filterValue\" >\n <mat-radio-button [value]=\"true\" preventEnter>True</mat-radio-button>\n <mat-radio-button [value]=\"false\" preventEnter>False</mat-radio-button>\n </mat-radio-group>\n </div>\n </div>\n </ng-template>\n <ng-template #Enum>\n <ng-container *ngIf='currentFilterType === FilterType.In' >\n <tb-in-list-filter [key]='filter.key' name='filterValue' [(ngModel)]='filter.filterValue' ></tb-in-list-filter>\n </ng-container>\n </ng-template>\n </form>\n </mat-card-content>\n</mat-card>\n", styles: [".filter-name{color:#6495ed;margin:10px 0;font-weight:600;display:inline-block}.switch{display:inline-block}.my-filter{margin-right:15px}.cancel-button{float:right}.head-row{width:100%}.filter-row{width:-moz-fit-content;width:fit-content}mat-card.filter-card::ng-deep mat-form-field{width:150px}mat-card.filter-card::ng-deep .mat-mdc-form-field-subscript-wrapper{line-height:0}mat-card.filter-card::ng-deep .mat-mdc-form-field-subscript-wrapper:before{height:0}.inline{display:inline-block}.small-button{height:18px;width:18px;font-size:18px;padding:0;margin:0}.small-button ::ng-deep *{line-height:initial;font-size:initial;height:18px;width:18px;font-size:18px;bottom:initial}.cancel-button{float:right;font-weight:700}.date-toggle ::ng-deep svg{position:absolute;left:0;top:0}\n"] }]
|
|
49
|
+
}], ctorParameters: function () { return [{ type: i1.TableStore }]; }, propDecorators: { filter: [{
|
|
50
|
+
type: Input
|
|
51
|
+
}], close: [{
|
|
52
|
+
type: Output
|
|
53
|
+
}] } });
|
|
54
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsdGVyLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2FuZ3VsYXItdXRpbGl0aWVzL3NyYy90YWJsZS1idWlsZGVyL2NvbXBvbmVudHMvZmlsdGVyL2ZpbHRlci5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hbmd1bGFyLXV0aWxpdGllcy9zcmMvdGFibGUtYnVpb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iU2VsZWN0IEZpbHRlciBUeXBlXCIgbmFtZT1cImZpbHRlclR5cGVcIiAgWyhuZ01vZGVsKV09XCJjdXJyZW50RmlsdGVyVHlwZVwiID5cbiAgICAgICAgICAgICAgICAgICAgPG1hdC1vcHRpb24gKm5nRm9yPVwibGV0IGt2cCBvZiAgZmlsdGVyVHlwZXNbZmlsdGVyLmZpZWxkVHlwZV0gfCBrZXl2YWx1ZSBcIiBbdmFsdWVdPVwiJGFueShrdnAudmFsdWUpWzBdXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICB7eyBrdnAua2V5IH19XG4gICAgICAgICAgICAgICAgICAgIDwvbWF0LW9wdGlvbj5cbiAgICAgICAgICAgICAgICA8L21hdC1zZWxlY3Q+XG4gICAgICAgICAgICA8L21hdC1mb3JtLWZpZWxkPlxuICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgIDxuZy1jb250YWluZXIgW25nU3dpdGNoXT1cInRydWVcIj5cbiAgICAgICAgICAgICAgPG5nLWNvbnRhaW5lciAqbmdTd2l0Y2hDYXNlPVwiZmlsdGVyLmZpZWxkVHlwZSA9PT0gRmllbGRUeXBlLlN0cmluZyB8fCBmaWx0ZXIuZmllbGRUeXBlID09PSBGaWVsZFR5cGUuQXJyYXkgfHwgZmlsdGVyLmZpZWxkVHlwZSA9PT0gRmllbGRUeXBlLkxpbmsgfHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlsdGVyLmZpZWxkVHlwZSA9PT0gRmllbGRUeXBlLlVua25vd24gfHwgZmlsdGVyLmZpZWxkVHlwZSA9PT0gRmllbGRUeXBlLlBob25lTnVtYmVyXCIgPlxuICAgICAgICAgICAgICAgICAgPG5nLWNvbnRhaW5lciAqbmdUZW1wbGF0ZU91dGxldD1cIlN0cmluZ1wiPjwvbmctY29udGFpbmVyPlxuICAgICAgICAgICAgICA8L25nLWNvbnRhaW5lcj5cbiAgICAgICAgICAgICAgPG5nLWNvbnRhaW5lciAgIC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1idXR0b24+XG4gICAgICAgICAgPG1hdC1yYWRpby1idXR0b24gW3ZhbHVlXT1cImZhbHNlXCIgcHJldmVudEVudGVyPkZhbHNlPC9tYXQtcmFkaW8tYnV0dG9uPlxuICAgICAgICA8L21hdC1yYWRpby1ncm91cD5cbiAgICAgIDwvZGl2PlxuICAgIDwvZGl2PlxuICAgIDwvbmctdGVtcGxhdGU+XG4gICAgPG5nLXRlbXBsYXRlICNFbnVtPlxuICAgICAgPG5nLWNvbnRhaW5lciAqbmdJZj0nY3VycmVudEZpbHRlclR5cGUgPT09IEZpbHRlclR5cGUuSW4nID5cbiAgICAgICAgPHRiLWluLWxpc3QtZmlsdGVyIFtrZXldPSdmaWx0ZXIua2V5JyBuYW1lPSdmaWx0ZXJWYWx1ZScgWyhuZ01vZGVsKV09J2ZpbHRlci5maWx0ZXJWYWx1ZScgPjwvdGItaW4tbGlzdC1maWx0ZXI+XG4gICAgICA8L25nLWNvbnRhaW5lcj5cbiAgICA8L25nLXRlbXBsYXRlPlxuICAgIDwvZm9ybT5cbiAgPC9tYXQtY2FyZC1jb250ZW50PlxuPC9tYXQtY2FyZD5cbiJdfQ==
|
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|
2
|
-
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
3
|
-
import { map, tap } from 'rxjs/operators';
|
|
4
|
-
import { FieldType } from '../../../interfaces/report-def';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
import * as i1 from "../../../classes/table-store";
|
|
7
|
-
import * as i2 from "@angular/common";
|
|
8
|
-
import * as i3 from "@angular/material/checkbox";
|
|
9
|
-
import * as i4 from "../../../../utilities/directives/stop-propagation.directive";
|
|
10
|
-
import * as i5 from "../../../../utilities/pipes/space-case.pipes";
|
|
11
|
-
export class InListFilterComponent {
|
|
12
|
-
constructor(ref, tableState) {
|
|
13
|
-
this.ref = ref;
|
|
14
|
-
this.tableState = tableState;
|
|
15
|
-
this.value = [];
|
|
16
|
-
this.FieldType = FieldType;
|
|
17
|
-
this.onChange = (_) => { };
|
|
18
|
-
this.onTouched = () => { };
|
|
19
|
-
this.selectedKeys = [];
|
|
20
|
-
}
|
|
21
|
-
writeValue(obj) {
|
|
22
|
-
this.value = obj;
|
|
23
|
-
if (this.value) {
|
|
24
|
-
this.selectedKeys = this.value.map(f => f);
|
|
25
|
-
}
|
|
26
|
-
this.ref.markForCheck();
|
|
27
|
-
}
|
|
28
|
-
registerOnChange(fn) {
|
|
29
|
-
this.onChange = fn;
|
|
30
|
-
}
|
|
31
|
-
registerOnTouched(fn) {
|
|
32
|
-
this.onTouched = fn;
|
|
33
|
-
}
|
|
34
|
-
ngOnInit() {
|
|
35
|
-
this.keyValues$ = this.tableState.getMetaData$(this.key).pipe(tap(metaData => this.metaData = metaData), map(metaData => {
|
|
36
|
-
if (metaData.additional?.filterOptions?.filterableValues) {
|
|
37
|
-
return metaData.additional.filterOptions.filterableValues.reduce((prev, cur) => { prev[cur] = cur; return prev; }, {});
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
if (metaData.fieldType === FieldType.Enum) {
|
|
41
|
-
return metaData.additional.enumMap;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return {};
|
|
45
|
-
}));
|
|
46
|
-
}
|
|
47
|
-
selectFilterChanged($event, val) {
|
|
48
|
-
if ($event.checked) {
|
|
49
|
-
this.selectedKeys.push(val);
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
this.selectedKeys = this.selectedKeys.filter(item => item !== val);
|
|
53
|
-
}
|
|
54
|
-
this.value = this.selectedKeys;
|
|
55
|
-
this.onChange(this.value);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
InListFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: InListFilterComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.TableStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
59
|
-
InListFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: InListFilterComponent, selector: "tb-in-list-filter , [tb-in-list-filter]", inputs: { key: "key" }, providers: [{
|
|
60
|
-
provide: NG_VALUE_ACCESSOR,
|
|
61
|
-
useExisting: InListFilterComponent,
|
|
62
|
-
multi: true
|
|
1
|
+
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|
2
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
3
|
+
import { map, tap } from 'rxjs/operators';
|
|
4
|
+
import { FieldType } from '../../../interfaces/report-def';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
import * as i1 from "../../../classes/table-store";
|
|
7
|
+
import * as i2 from "@angular/common";
|
|
8
|
+
import * as i3 from "@angular/material/checkbox";
|
|
9
|
+
import * as i4 from "../../../../utilities/directives/stop-propagation.directive";
|
|
10
|
+
import * as i5 from "../../../../utilities/pipes/space-case.pipes";
|
|
11
|
+
export class InListFilterComponent {
|
|
12
|
+
constructor(ref, tableState) {
|
|
13
|
+
this.ref = ref;
|
|
14
|
+
this.tableState = tableState;
|
|
15
|
+
this.value = [];
|
|
16
|
+
this.FieldType = FieldType;
|
|
17
|
+
this.onChange = (_) => { };
|
|
18
|
+
this.onTouched = () => { };
|
|
19
|
+
this.selectedKeys = [];
|
|
20
|
+
}
|
|
21
|
+
writeValue(obj) {
|
|
22
|
+
this.value = obj;
|
|
23
|
+
if (this.value) {
|
|
24
|
+
this.selectedKeys = this.value.map(f => f);
|
|
25
|
+
}
|
|
26
|
+
this.ref.markForCheck();
|
|
27
|
+
}
|
|
28
|
+
registerOnChange(fn) {
|
|
29
|
+
this.onChange = fn;
|
|
30
|
+
}
|
|
31
|
+
registerOnTouched(fn) {
|
|
32
|
+
this.onTouched = fn;
|
|
33
|
+
}
|
|
34
|
+
ngOnInit() {
|
|
35
|
+
this.keyValues$ = this.tableState.getMetaData$(this.key).pipe(tap(metaData => this.metaData = metaData), map(metaData => {
|
|
36
|
+
if (metaData.additional?.filterOptions?.filterableValues) {
|
|
37
|
+
return metaData.additional.filterOptions.filterableValues.reduce((prev, cur) => { prev[cur] = cur; return prev; }, {});
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
if (metaData.fieldType === FieldType.Enum) {
|
|
41
|
+
return metaData.additional.enumMap;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return {};
|
|
45
|
+
}));
|
|
46
|
+
}
|
|
47
|
+
selectFilterChanged($event, val) {
|
|
48
|
+
if ($event.checked) {
|
|
49
|
+
this.selectedKeys.push(val);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
this.selectedKeys = this.selectedKeys.filter(item => item !== val);
|
|
53
|
+
}
|
|
54
|
+
this.value = this.selectedKeys;
|
|
55
|
+
this.onChange(this.value);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
InListFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: InListFilterComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.TableStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
59
|
+
InListFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: InListFilterComponent, selector: "tb-in-list-filter , [tb-in-list-filter]", inputs: { key: "key" }, providers: [{
|
|
60
|
+
provide: NG_VALUE_ACCESSOR,
|
|
61
|
+
useExisting: InListFilterComponent,
|
|
62
|
+
multi: true
|
|
63
63
|
}], ngImport: i0, template: `
|
|
64
64
|
<div *ngFor="let item of keyValues$ | async| keyvalue" >
|
|
65
65
|
<mat-checkbox [checked]='selectedKeys.includes(item.key)' stop-propagation (change)='selectFilterChanged($event, item.key)' >
|
|
66
66
|
{{metaData.fieldType === FieldType.Enum ? (item.value | spaceCase) : item.value}}
|
|
67
67
|
</mat-checkbox>
|
|
68
68
|
</div>
|
|
69
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i3.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i4.StopPropagationDirective, selector: "[stop-propagation]" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: i5.SpaceCasePipe, name: "spaceCase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
70
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: InListFilterComponent, decorators: [{
|
|
71
|
-
type: Component,
|
|
72
|
-
args: [{
|
|
73
|
-
selector: 'tb-in-list-filter , [tb-in-list-filter]',
|
|
69
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i3.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i4.StopPropagationDirective, selector: "[stop-propagation]" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: i5.SpaceCasePipe, name: "spaceCase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
70
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: InListFilterComponent, decorators: [{
|
|
71
|
+
type: Component,
|
|
72
|
+
args: [{
|
|
73
|
+
selector: 'tb-in-list-filter , [tb-in-list-filter]',
|
|
74
74
|
template: `
|
|
75
75
|
<div *ngFor="let item of keyValues$ | async| keyvalue" >
|
|
76
76
|
<mat-checkbox [checked]='selectedKeys.includes(item.key)' stop-propagation (change)='selectFilterChanged($event, item.key)' >
|
|
77
77
|
{{metaData.fieldType === FieldType.Enum ? (item.value | spaceCase) : item.value}}
|
|
78
78
|
</mat-checkbox>
|
|
79
79
|
</div>
|
|
80
|
-
`,
|
|
81
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
82
|
-
providers: [{
|
|
83
|
-
provide: NG_VALUE_ACCESSOR,
|
|
84
|
-
useExisting: InListFilterComponent,
|
|
85
|
-
multi: true
|
|
86
|
-
}]
|
|
87
|
-
}]
|
|
88
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.TableStore }]; }, propDecorators: { key: [{
|
|
89
|
-
type: Input
|
|
90
|
-
}] } });
|
|
91
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
80
|
+
`,
|
|
81
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
82
|
+
providers: [{
|
|
83
|
+
provide: NG_VALUE_ACCESSOR,
|
|
84
|
+
useExisting: InListFilterComponent,
|
|
85
|
+
multi: true
|
|
86
|
+
}]
|
|
87
|
+
}]
|
|
88
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.TableStore }]; }, propDecorators: { key: [{
|
|
89
|
+
type: Input
|
|
90
|
+
}] } });
|
|
91
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW4tbGlzdC1maWx0ZXIuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYW5ndWxhci11dGlsaXRpZXMvc3JjL3RhYmxlLWJ1aWxkZXIvY29tcG9uZW50cy9maWx0ZXIvaW4tbGlzdC9pbi1saXN0LWZpbHRlci5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQ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