@one-paragon/angular-utilities 0.1.32-beta → 0.1.32
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 +21 -41
- 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 +202 -204
- 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 +207 -215
- 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 +4413 -4442
- package/fesm2015/one-paragon-angular-utilities.mjs.map +1 -1
- package/fesm2020/one-paragon-angular-utilities.mjs +4393 -4422
- 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 +9 -17
- 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 +46 -48
- 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\">\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,
|
|
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\">\r\n <input type=\"datetime-local\" [ngModel]=\"info.filterValue\" preventEnter name=\"filterValue\" class=\"op-date-time-input\"/>\r\n</ng-container>\r\n\r\n<ng-container *ngIf=\"CurrentFilterType === FilterType.DateTimeBetween\" ngModelGroup=\"filterValue\">\r\n <input type=\"datetime-local\" [ngModel]=\"info.filterValue?.Start\" preventEnter name=\"Start\" class=\"op-date-time-input\"/>\r\n <input type=\"datetime-local\" [ngModel]=\"info.filterValue?.End\" preventEnter name=\"End\" class=\"op-date-time-input\"/>\r\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\">\r\n <input type=\"datetime-local\" [ngModel]=\"info.filterValue\" preventEnter name=\"filterValue\" class=\"op-date-time-input\"/>\r\n</ng-container>\r\n\r\n<ng-container *ngIf=\"CurrentFilterType === FilterType.DateTimeBetween\" ngModelGroup=\"filterValue\">\r\n <input type=\"datetime-local\" [ngModel]=\"info.filterValue?.Start\" preventEnter name=\"Start\" class=\"op-date-time-input\"/>\r\n <input type=\"datetime-local\" [ngModel]=\"info.filterValue?.End\" preventEnter name=\"End\" class=\"op-date-time-input\"/>\r\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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZS10aW1lLWZpbHRlci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hbmd1bGFyLXV0aWxpdGllcy9zcmMvdGFibGUtYnVpbGRlci9jb21wb25lbnRzL2RhdGUtdGltZS1maWx0ZXIvZGF0ZS10aW1lLWZpbHRlci5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hbmd1bGFyLXV0aWxpdGllcy9zcmMvdGFibGUtYnVpbGRlci9jb21wb25lbnRzL2RhdGUtdGltZS1maWx0ZXIvZGF0ZS10aW1lLWZpbHRlci5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLHVCQUF1QixFQUFFLEtBQUssRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUUxRSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFDckQsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sRUFBRSxNQUFNLGdCQUFnQixDQUFD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1pbnB1dFwiLz5cclxuICA8aW5wdXQgdHlwZT1cImRhdGV0aW1lLWxvY2FsXCIgW25nTW9kZWxdPVwiaW5mby5maWx0ZXJWYWx1ZT8uRW5kXCIgcHJldmVudEVudGVyIG5hbWU9XCJFbmRcIiBjbGFzcz1cIm9wLWRhdGUtdGltZS1pbnB1dFwiLz5cclxuPC9uZy1jb250YWluZXI+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\">\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,
|
|
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\">\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"] }]
|
|
49
|
+
}], ctorParameters: function () { return [{ type: i1.TableStore }]; }, propDecorators: { filter: [{
|
|
50
|
+
type: Input
|
|
51
|
+
}], close: [{
|
|
52
|
+
type: Output
|
|
53
|
+
}] } });
|
|
54
|
+
//# sourceMappingURL=data:application/json;base64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pZWxkVHlwZS5TdHJpbmcgfHwgZmlsdGVyLmZpZWxkVHlwZSA9PT0gRmllbGRUeXBlLkFycmF5IHx8IGZpbHRlci5maWVsZFR5cGUgPT09IEZpZWxkVHlwZS5MaW5rIHx8XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlsdGVyLmZpZWxkVHlwZSA9PT0gRmllbGRUeXBlLlVua25vd24gfHwgZmlsdGVyLmZpZWxkVHlwZSA9PT0gRmllbGRUeXBlLlBob25lTnVtYmVyXCIgPlxyXG4gICAgICAgICAgICAgICAgICA8bmctY29udGFpbmVyICpuZ1RlbXBsYXRlT3V0bGV0PVwiU3RyaW5nXCI+PC9uZy1jb250YWluZXI+XHJcbiAgICAgICAgICAgICAgPC9uZy1jb250YWluZXI+XHJcbiAgICAgICAgICAgICAgPG5nLWNvbnRhaW5lciAgICpuZ1N3aXRjaENhc2U9XCJmaWx0ZXIuZmllbGRUeXBlID09PSBGaWVsZFR5cGUuTnVtYmVyIHx8IGZpbHRlci5maWVsZFR5cGUgPT09IEZpZWxkVHlwZS5DdXJyZW5jeVwiPlxyXG4gICAgICAgICAgICAgICAgICA8dGItbnVtYmVyLWZpbHRlciBbaW5mb109XCJmaWx0ZXJcIiBbQ3VycmVudEZpbHRlclR5cGVdPVwiY3VycmVudEZpbHRlclR5cGUhXCIgPjwvdGItbnVtYmVyLWZpbHRlcj5cclxuICAgICAgICAgICAgICA8L25nLWNvbnRhaW5lcj5cclxuICAgICAgICAgICAgICA8bmctY29udGFpbmVyICAqbmdTd2l0Y2hDYXNlPVwiZmlsdGVyLmZpZWxkVHlwZSA9PT0gRmllbGRUeXBlLkJvb2xlYW5cIj5cclxuICAgICAgICAgICAgICAgIDxuZy1jb250YWluZXIgICAqbmdUZW1wbGF0ZU91dGxldD1cIkJvb2xlYW5cIj48L25nLWNvbnRhaW5lcj5cclxuICAgICAgICAgICAgICA8L25nLWNvbnRhaW5lcj5cclxuICAgICAgICAgICAg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dGVyPlxyXG4gICAgICA8L25nLWNvbnRhaW5lcj5cclxuICAgIDwvbmctdGVtcGxhdGU+XHJcbiAgICA8L2Zvcm0+XHJcbiAgPC9tYXQtY2FyZC1jb250ZW50PlxyXG48L21hdC1jYXJkPlxyXG4iXX0=
|
|
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW4tbGlzdC1maWx0ZXIuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYW5ndWxhci11dGlsaXRpZXMvc3JjL3RhYmxlLWJ1aWxkZXIvY29tcG9uZW50cy9maWx0ZXIvaW4tbGlzdC9pbi1saXN0LWZpbHRlci5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLHVCQUF1QixFQUFxQixTQUFTLEVBQUUsS0FBSyxFQUFvQixNQUFNLGVBQWUsQ0FBQztBQUMvRyxPQUFPLEVBQXdCLGlCQUFpQixFQUFDLE1BQU0sZ0JBQWdCLENBQUM7QUFFeEUsT0FBTyxFQUFFLEdBQUcsRUFBRSxHQUFHLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUcxQyxPQUFPLEVBQUUsU0FBUyxFQUFZLE1BQU0sZ0NBQWdDLENBQUM7Ozs7Ozs7QUFtQnJFLE1BQU0sT0FBTyxxQkFBcUI7SUFFaEMsWUFBb0IsR0FBc0IsRUFBVSxVQUFzQjtRQUF0RCxRQUFHLEdBQUgsR0FBRyxDQUFtQjtRQUFVLGVBQVUsR0FBVixVQUFVLENBQVk7UUFDMUUsVUFBSyxHQUFhLEVBQUUsQ0FBQztRQUNyQixjQUFT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