@firestitch/filter 16.0.0 → 16.0.1
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/app/classes/actions-controller.d.ts +41 -41
- package/app/components/action-button/action-button.component.d.ts +9 -9
- package/app/components/action-kebab-actions/action-kebab-actions.component.d.ts +7 -7
- package/app/components/actions/actions.component.d.ts +13 -13
- package/app/components/filter/filter.component.d.ts +204 -204
- package/app/components/filter-chip/filter-chip.component.d.ts +26 -26
- package/app/components/filter-chip-content/filter-chip-content.component.d.ts +18 -18
- package/app/components/filter-chips/filter-chips.component.d.ts +9 -9
- package/app/components/filter-drawer/filter-drawer.component.d.ts +30 -30
- package/app/components/filter-drawer-actions/filter-drawer-actions.component.d.ts +9 -9
- package/app/components/filters-item/autocomplete/autocomplete.component.d.ts +14 -14
- package/app/components/filters-item/autocompletechips/autocompletechips.component.d.ts +16 -16
- package/app/components/filters-item/base-item/base-item.component.d.ts +25 -25
- package/app/components/filters-item/checkbox/checkbox.component.d.ts +11 -11
- package/app/components/filters-item/chips/chips.component.d.ts +13 -13
- package/app/components/filters-item/date/date.component.d.ts +20 -20
- package/app/components/filters-item/date-range/date-range.component.d.ts +15 -15
- package/app/components/filters-item/filter-item.component.d.ts +39 -39
- package/app/components/filters-item/range/range.component.d.ts +15 -15
- package/app/components/filters-item/select/backdrop/backdrop.component.d.ts +6 -6
- package/app/components/filters-item/select/groups/groups.component.d.ts +12 -12
- package/app/components/filters-item/select/multiple/multiple.component.d.ts +15 -15
- package/app/components/filters-item/select/select.component.d.ts +23 -23
- package/app/components/filters-item/select/simple/simple.component.d.ts +14 -14
- package/app/components/filters-item/text/text.component.d.ts +19 -19
- package/app/components/filters-item/week/week.component.d.ts +12 -12
- package/app/components/saved-filter/index.d.ts +3 -3
- package/app/components/saved-filter/saved-filter-edit/index.d.ts +1 -1
- package/app/components/saved-filter/saved-filter-edit/saved-filter-edit.component.d.ts +18 -18
- package/app/components/saved-filter/saved-filter-manage/index.d.ts +1 -1
- package/app/components/saved-filter/saved-filter-manage/saved-filter-manage.component.d.ts +16 -16
- package/app/components/saved-filter/saved-filters-menu/index.d.ts +1 -1
- package/app/components/saved-filter/saved-filters-menu/saved-filters-menu.component.d.ts +24 -24
- package/app/consts/query-param-delimiter.d.ts +1 -1
- package/app/directives/focus-to-item/focus-to-item.directive.d.ts +27 -27
- package/app/directives/status-bar/status-bar.directive.d.ts +8 -8
- package/app/enums/action-mode.enum.d.ts +6 -6
- package/app/enums/action-type.enum.d.ts +9 -9
- package/app/enums/button-style.d.ts +9 -9
- package/app/enums/index.d.ts +6 -6
- package/app/enums/item-date-mode.enum.d.ts +5 -5
- package/app/enums/item-type.enum.d.ts +15 -15
- package/app/enums/picker-view-type.enum.d.ts +7 -7
- package/app/fs-filter.module.d.ts +70 -70
- package/app/helpers/build-query-params.d.ts +3 -3
- package/app/helpers/compare.d.ts +2 -2
- package/app/helpers/create-filter-item.d.ts +14 -14
- package/app/helpers/find-value.d.ts +1 -1
- package/app/helpers/get-range-name.d.ts +1 -1
- package/app/helpers/parse-date.d.ts +1 -1
- package/app/helpers/parse-item-value-from-stored.d.ts +1 -1
- package/app/helpers/query-param-transformers.d.ts +2 -2
- package/app/helpers/restore-items.d.ts +12 -12
- package/app/injectors/filter-config.d.ts +2 -2
- package/app/injectors/filter-drawer-data.d.ts +2 -2
- package/app/injectors/filter-drawer-overlay.d.ts +2 -2
- package/app/interfaces/action.interface.d.ts +81 -81
- package/app/interfaces/config.interface.d.ts +66 -66
- package/app/interfaces/external-params.interface.d.ts +3 -3
- package/app/interfaces/filter.interface.d.ts +4 -4
- package/app/interfaces/index.d.ts +6 -6
- package/app/interfaces/items/autocomplete-chips.interface.d.ts +15 -15
- package/app/interfaces/items/autocomplete.interface.d.ts +9 -9
- package/app/interfaces/items/base.interface.d.ts +29 -29
- package/app/interfaces/items/checkbox.interface.d.ts +7 -7
- package/app/interfaces/items/chips.interface.d.ts +6 -6
- package/app/interfaces/items/date-range.interface.d.ts +8 -8
- package/app/interfaces/items/date.interface.d.ts +7 -7
- package/app/interfaces/items/range.interface.d.ts +13 -13
- package/app/interfaces/items/select.interface.d.ts +20 -20
- package/app/interfaces/items/text.interface.d.ts +9 -9
- package/app/interfaces/items/week.interface.d.ts +7 -7
- package/app/interfaces/saved-filters.interface.d.ts +18 -18
- package/app/interfaces/update-filter-item.interface.d.ts +4 -4
- package/app/models/action-menu-item.model.d.ts +23 -23
- package/app/models/action.model.d.ts +54 -54
- package/app/models/filter-config.d.ts +31 -31
- package/app/models/items/autocomplete/base-autocomplete-item.d.ts +12 -12
- package/app/models/items/autocomplete-chips-item.d.ts +20 -20
- package/app/models/items/autocomplete-item.d.ts +11 -11
- package/app/models/items/base-item.d.ts +80 -80
- package/app/models/items/checkbox-item.d.ts +17 -17
- package/app/models/items/chips-item.d.ts +18 -18
- package/app/models/items/date/base-date-item.d.ts +14 -14
- package/app/models/items/date-item.d.ts +8 -8
- package/app/models/items/date-range/base-date-range-item.d.ts +17 -17
- package/app/models/items/date-range-item.d.ts +6 -6
- package/app/models/items/date-time-item.d.ts +7 -7
- package/app/models/items/date-time-range-item.d.ts +6 -6
- package/app/models/items/range-item.d.ts +19 -19
- package/app/models/items/select/base-select-item.d.ts +13 -13
- package/app/models/items/select/multiple-select-item.d.ts +14 -14
- package/app/models/items/select/simple-select-item.d.ts +14 -14
- package/app/models/items/select-item.d.ts +8 -8
- package/app/models/items/text-item.d.ts +15 -15
- package/app/models/items/week-item.d.ts +18 -18
- package/app/pipes/remove-isolate-value.pipe.d.ts +8 -8
- package/app/providers/filter-meta.d.ts +5 -5
- package/app/services/external-params/persistance-params-controller.service.d.ts +21 -21
- package/app/services/external-params/query-params-controller.service.d.ts +22 -22
- package/app/services/external-params/saved-filters-controller.service.d.ts +40 -40
- package/app/services/external-params-controller.service.d.ts +42 -42
- package/app/services/filter-overlay.service.d.ts +36 -36
- package/app/services/focus-controller.service.d.ts +18 -18
- package/app/services/items-store.service.d.ts +69 -69
- package/esm2022/app/classes/actions-controller.mjs +129 -129
- package/esm2022/app/components/action-button/action-button.component.mjs +20 -20
- package/esm2022/app/components/action-kebab-actions/action-kebab-actions.component.mjs +17 -17
- package/esm2022/app/components/actions/actions.component.mjs +39 -39
- package/esm2022/app/components/filter/filter.component.mjs +625 -625
- package/esm2022/app/components/filter-chip/filter-chip.component.mjs +91 -91
- package/esm2022/app/components/filter-chip-content/filter-chip-content.component.mjs +82 -82
- package/esm2022/app/components/filter-chips/filter-chips.component.mjs +17 -17
- package/esm2022/app/components/filter-drawer/filter-drawer.component.mjs +77 -77
- package/esm2022/app/components/filter-drawer-actions/filter-drawer-actions.component.mjs +26 -26
- package/esm2022/app/components/filters-item/autocomplete/autocomplete.component.mjs +28 -28
- package/esm2022/app/components/filters-item/autocompletechips/autocompletechips.component.mjs +43 -43
- package/esm2022/app/components/filters-item/base-item/base-item.component.mjs +67 -67
- package/esm2022/app/components/filters-item/checkbox/checkbox.component.mjs +22 -22
- package/esm2022/app/components/filters-item/chips/chips.component.mjs +29 -29
- package/esm2022/app/components/filters-item/date/date.component.mjs +44 -44
- package/esm2022/app/components/filters-item/date-range/date-range.component.mjs +35 -35
- package/esm2022/app/components/filters-item/filter-item.component.mjs +81 -81
- package/esm2022/app/components/filters-item/range/range.component.mjs +48 -48
- package/esm2022/app/components/filters-item/select/backdrop/backdrop.component.mjs +11 -11
- package/esm2022/app/components/filters-item/select/groups/groups.component.mjs +32 -32
- package/esm2022/app/components/filters-item/select/multiple/multiple.component.mjs +59 -59
- package/esm2022/app/components/filters-item/select/select.component.mjs +54 -54
- package/esm2022/app/components/filters-item/select/simple/simple.component.mjs +45 -45
- package/esm2022/app/components/filters-item/text/text.component.mjs +50 -50
- package/esm2022/app/components/filters-item/week/week.component.mjs +25 -25
- package/esm2022/app/components/saved-filter/index.mjs +3 -3
- package/esm2022/app/components/saved-filter/saved-filter-edit/index.mjs +1 -1
- package/esm2022/app/components/saved-filter/saved-filter-edit/saved-filter-edit.component.mjs +54 -54
- package/esm2022/app/components/saved-filter/saved-filter-manage/index.mjs +1 -1
- package/esm2022/app/components/saved-filter/saved-filter-manage/saved-filter-manage.component.mjs +44 -44
- package/esm2022/app/components/saved-filter/saved-filters-menu/index.mjs +1 -1
- package/esm2022/app/components/saved-filter/saved-filters-menu/saved-filters-menu.component.mjs +60 -60
- package/esm2022/app/consts/query-param-delimiter.mjs +1 -1
- package/esm2022/app/directives/focus-to-item/focus-to-item.directive.mjs +140 -140
- package/esm2022/app/directives/status-bar/status-bar.directive.mjs +16 -16
- package/esm2022/app/enums/action-mode.enum.mjs +7 -7
- package/esm2022/app/enums/action-type.enum.mjs +10 -10
- package/esm2022/app/enums/button-style.mjs +10 -10
- package/esm2022/app/enums/index.mjs +6 -6
- package/esm2022/app/enums/item-date-mode.enum.mjs +6 -6
- package/esm2022/app/enums/item-type.enum.mjs +16 -16
- package/esm2022/app/enums/picker-view-type.enum.mjs +8 -8
- package/esm2022/app/fs-filter.module.mjs +260 -260
- package/esm2022/app/helpers/build-query-params.mjs +32 -32
- package/esm2022/app/helpers/compare.mjs +37 -37
- package/esm2022/app/helpers/create-filter-item.mjs +54 -54
- package/esm2022/app/helpers/find-value.mjs +12 -12
- package/esm2022/app/helpers/get-range-name.mjs +3 -3
- package/esm2022/app/helpers/parse-date.mjs +7 -7
- package/esm2022/app/helpers/parse-item-value-from-stored.mjs +76 -76
- package/esm2022/app/helpers/query-param-transformers.mjs +8 -8
- package/esm2022/app/helpers/restore-items.mjs +48 -48
- package/esm2022/app/injectors/filter-config.mjs +2 -2
- package/esm2022/app/injectors/filter-drawer-data.mjs +2 -2
- package/esm2022/app/injectors/filter-drawer-overlay.mjs +2 -2
- package/esm2022/app/interfaces/action.interface.mjs +1 -1
- package/esm2022/app/interfaces/config.interface.mjs +1 -1
- package/esm2022/app/interfaces/external-params.interface.mjs +1 -1
- package/esm2022/app/interfaces/filter.interface.mjs +1 -1
- package/esm2022/app/interfaces/index.mjs +6 -6
- package/esm2022/app/interfaces/items/autocomplete-chips.interface.mjs +1 -1
- package/esm2022/app/interfaces/items/autocomplete.interface.mjs +1 -1
- package/esm2022/app/interfaces/items/base.interface.mjs +1 -1
- package/esm2022/app/interfaces/items/checkbox.interface.mjs +1 -1
- package/esm2022/app/interfaces/items/chips.interface.mjs +1 -1
- package/esm2022/app/interfaces/items/date-range.interface.mjs +1 -1
- package/esm2022/app/interfaces/items/date.interface.mjs +1 -1
- package/esm2022/app/interfaces/items/range.interface.mjs +1 -1
- package/esm2022/app/interfaces/items/select.interface.mjs +1 -1
- package/esm2022/app/interfaces/items/text.interface.mjs +1 -1
- package/esm2022/app/interfaces/items/week.interface.mjs +1 -1
- package/esm2022/app/interfaces/saved-filters.interface.mjs +1 -1
- package/esm2022/app/interfaces/update-filter-item.interface.mjs +1 -1
- package/esm2022/app/models/action-menu-item.model.mjs +72 -72
- package/esm2022/app/models/action.model.mjs +155 -155
- package/esm2022/app/models/filter-config.mjs +78 -78
- package/esm2022/app/models/items/autocomplete/base-autocomplete-item.mjs +15 -15
- package/esm2022/app/models/items/autocomplete-chips-item.mjs +66 -66
- package/esm2022/app/models/items/autocomplete-item.mjs +32 -32
- package/esm2022/app/models/items/base-item.mjs +250 -250
- package/esm2022/app/models/items/checkbox-item.mjs +51 -51
- package/esm2022/app/models/items/chips-item.mjs +89 -89
- package/esm2022/app/models/items/date/base-date-item.mjs +49 -49
- package/esm2022/app/models/items/date-item.mjs +18 -18
- package/esm2022/app/models/items/date-range/base-date-range-item.mjs +123 -123
- package/esm2022/app/models/items/date-range-item.mjs +6 -6
- package/esm2022/app/models/items/date-time-item.mjs +9 -9
- package/esm2022/app/models/items/date-time-range-item.mjs +6 -6
- package/esm2022/app/models/items/range-item.mjs +84 -84
- package/esm2022/app/models/items/select/base-select-item.mjs +39 -39
- package/esm2022/app/models/items/select/multiple-select-item.mjs +87 -87
- package/esm2022/app/models/items/select/simple-select-item.mjs +65 -65
- package/esm2022/app/models/items/select-item.mjs +11 -11
- package/esm2022/app/models/items/text-item.mjs +35 -35
- package/esm2022/app/models/items/week-item.mjs +94 -94
- package/esm2022/app/pipes/remove-isolate-value.pipe.mjs +20 -20
- package/esm2022/app/providers/filter-meta.mjs +9 -9
- package/esm2022/app/services/external-params/persistance-params-controller.service.mjs +61 -61
- package/esm2022/app/services/external-params/query-params-controller.service.mjs +65 -65
- package/esm2022/app/services/external-params/saved-filters-controller.service.mjs +166 -166
- package/esm2022/app/services/external-params-controller.service.mjs +184 -184
- package/esm2022/app/services/filter-overlay.service.mjs +129 -129
- package/esm2022/app/services/focus-controller.service.mjs +28 -28
- package/esm2022/app/services/items-store.service.mjs +346 -346
- package/esm2022/firestitch-filter.mjs +4 -4
- package/esm2022/public_api.mjs +35 -35
- package/fesm2022/firestitch-filter.mjs +4516 -4516
- package/index.d.ts +5 -5
- package/package.json +1 -1
- package/public_api.d.ts +40 -40
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, ViewChild } from '@angular/core';
|
|
2
|
-
import { MatSelect } from '@angular/material/select';
|
|
3
|
-
import { MultipleSelectItem } from '../../../../models/items/select/multiple-select-item';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
import * as i1 from "@angular/common";
|
|
6
|
-
import * as i2 from "@angular/forms";
|
|
7
|
-
import * as i3 from "@angular/material/form-field";
|
|
8
|
-
import * as i4 from "@angular/material/select";
|
|
9
|
-
import * as i5 from "@angular/material/core";
|
|
10
|
-
import * as i6 from "@angular/material/checkbox";
|
|
11
|
-
import * as i7 from "@firestitch/form";
|
|
12
|
-
import * as i8 from "../../../../directives/focus-to-item/focus-to-item.directive";
|
|
13
|
-
import * as i9 from "../../../../pipes/remove-isolate-value.pipe";
|
|
14
|
-
export class SelectMultipleComponent {
|
|
15
|
-
cd;
|
|
16
|
-
item;
|
|
17
|
-
select;
|
|
18
|
-
constructor(cd) {
|
|
19
|
-
this.cd = cd;
|
|
20
|
-
}
|
|
21
|
-
changed() {
|
|
22
|
-
if (this.item.isolate) {
|
|
23
|
-
this.item.isolate.enabled = false;
|
|
24
|
-
if (this.item.multiple && Array.isArray(this.item.model)) {
|
|
25
|
-
const index = this.item.model.indexOf(this.item.isolate.value);
|
|
26
|
-
if (index > -1) {
|
|
27
|
-
this.item.model.splice(index, 1);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
close() {
|
|
33
|
-
this.select.close();
|
|
34
|
-
}
|
|
35
|
-
isolateChange(filter) {
|
|
36
|
-
if (filter.isolate.enabled) {
|
|
37
|
-
filter.model = filter.multiple ? [filter.isolate.value] : filter.isolate.value;
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
if (filter.multiple) {
|
|
41
|
-
filter.model = filter.defaultValue ? filter.defaultValue : [];
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
filter.model = filter.defaultValue ? filter.defaultValue : null;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectMultipleComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
49
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SelectMultipleComponent, selector: "filter-item-select-multiple", inputs: { item: "item" }, viewQueries: [{ propertyName: "select", first: true, predicate: ["select"], descendants: true, static: true }], ngImport: i0, template: "<mat-form-field [ngClass]=\"{ isolate: item.isolate }\">\n <mat-label>{{item.label}}</mat-label>\n <mat-select\n #select\n [fsFilterFocusTrigger]=\"item\"\n [(ngModel)]=\"item.model\"\n (ngModelChange)=\"changed()\"\n [multiple]=\"item.multiple\">\n <mat-option\n *ngFor=\"let item of item.values | fsFilterIsolateValues: item.isolate\"\n [value]=\"item.value\">\n {{ item.name }}\n </mat-option>\n </mat-select>\n\n <mat-hint>\n <div *ngIf=\"item.isolate\">\n <mat-checkbox (change)=\"isolateChange(item)\" [(ngModel)]=\"item.isolate.enabled\">\n <span class=\"checkbox-label\">{{ item.isolate.label }}</span>\n </mat-checkbox>\n </div>\n </mat-hint>\n</mat-form-field>\n", styles: [".isolate{margin-bottom:25px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i6.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i7.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormGreaterEqual]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { kind: "directive", type: i8.FocusToItemDirective, selector: "[fsFilterFocusTrigger]", inputs: ["fsFilterFocusTrigger", "focusTargetType"] }, { kind: "pipe", type: i9.FsFilterIsolateValues, name: "fsFilterIsolateValues" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
50
|
-
}
|
|
51
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectMultipleComponent, decorators: [{
|
|
52
|
-
type: Component,
|
|
53
|
-
args: [{ selector: 'filter-item-select-multiple', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-form-field [ngClass]=\"{ isolate: item.isolate }\">\n <mat-label>{{item.label}}</mat-label>\n <mat-select\n #select\n [fsFilterFocusTrigger]=\"item\"\n [(ngModel)]=\"item.model\"\n (ngModelChange)=\"changed()\"\n [multiple]=\"item.multiple\">\n <mat-option\n *ngFor=\"let item of item.values | fsFilterIsolateValues: item.isolate\"\n [value]=\"item.value\">\n {{ item.name }}\n </mat-option>\n </mat-select>\n\n <mat-hint>\n <div *ngIf=\"item.isolate\">\n <mat-checkbox (change)=\"isolateChange(item)\" [(ngModel)]=\"item.isolate.enabled\">\n <span class=\"checkbox-label\">{{ item.isolate.label }}</span>\n </mat-checkbox>\n </div>\n </mat-hint>\n</mat-form-field>\n", styles: [".isolate{margin-bottom:25px}\n"] }]
|
|
54
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { item: [{
|
|
55
|
-
type: Input
|
|
56
|
-
}], select: [{
|
|
57
|
-
type: ViewChild,
|
|
58
|
-
args: ['select', { static: true }]
|
|
59
|
-
}] } });
|
|
1
|
+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, ViewChild } from '@angular/core';
|
|
2
|
+
import { MatSelect } from '@angular/material/select';
|
|
3
|
+
import { MultipleSelectItem } from '../../../../models/items/select/multiple-select-item';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "@angular/common";
|
|
6
|
+
import * as i2 from "@angular/forms";
|
|
7
|
+
import * as i3 from "@angular/material/form-field";
|
|
8
|
+
import * as i4 from "@angular/material/select";
|
|
9
|
+
import * as i5 from "@angular/material/core";
|
|
10
|
+
import * as i6 from "@angular/material/checkbox";
|
|
11
|
+
import * as i7 from "@firestitch/form";
|
|
12
|
+
import * as i8 from "../../../../directives/focus-to-item/focus-to-item.directive";
|
|
13
|
+
import * as i9 from "../../../../pipes/remove-isolate-value.pipe";
|
|
14
|
+
export class SelectMultipleComponent {
|
|
15
|
+
cd;
|
|
16
|
+
item;
|
|
17
|
+
select;
|
|
18
|
+
constructor(cd) {
|
|
19
|
+
this.cd = cd;
|
|
20
|
+
}
|
|
21
|
+
changed() {
|
|
22
|
+
if (this.item.isolate) {
|
|
23
|
+
this.item.isolate.enabled = false;
|
|
24
|
+
if (this.item.multiple && Array.isArray(this.item.model)) {
|
|
25
|
+
const index = this.item.model.indexOf(this.item.isolate.value);
|
|
26
|
+
if (index > -1) {
|
|
27
|
+
this.item.model.splice(index, 1);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
close() {
|
|
33
|
+
this.select.close();
|
|
34
|
+
}
|
|
35
|
+
isolateChange(filter) {
|
|
36
|
+
if (filter.isolate.enabled) {
|
|
37
|
+
filter.model = filter.multiple ? [filter.isolate.value] : filter.isolate.value;
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
if (filter.multiple) {
|
|
41
|
+
filter.model = filter.defaultValue ? filter.defaultValue : [];
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
filter.model = filter.defaultValue ? filter.defaultValue : null;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectMultipleComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
49
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SelectMultipleComponent, selector: "filter-item-select-multiple", inputs: { item: "item" }, viewQueries: [{ propertyName: "select", first: true, predicate: ["select"], descendants: true, static: true }], ngImport: i0, template: "<mat-form-field [ngClass]=\"{ isolate: item.isolate }\">\n <mat-label>{{item.label}}</mat-label>\n <mat-select\n #select\n [fsFilterFocusTrigger]=\"item\"\n [(ngModel)]=\"item.model\"\n (ngModelChange)=\"changed()\"\n [multiple]=\"item.multiple\">\n <mat-option\n *ngFor=\"let item of item.values | fsFilterIsolateValues: item.isolate\"\n [value]=\"item.value\">\n {{ item.name }}\n </mat-option>\n </mat-select>\n\n <mat-hint>\n <div *ngIf=\"item.isolate\">\n <mat-checkbox (change)=\"isolateChange(item)\" [(ngModel)]=\"item.isolate.enabled\">\n <span class=\"checkbox-label\">{{ item.isolate.label }}</span>\n </mat-checkbox>\n </div>\n </mat-hint>\n</mat-form-field>\n", styles: [".isolate{margin-bottom:25px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i6.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i7.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormGreaterEqual]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { kind: "directive", type: i8.FocusToItemDirective, selector: "[fsFilterFocusTrigger]", inputs: ["fsFilterFocusTrigger", "focusTargetType"] }, { kind: "pipe", type: i9.FsFilterIsolateValues, name: "fsFilterIsolateValues" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
50
|
+
}
|
|
51
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectMultipleComponent, decorators: [{
|
|
52
|
+
type: Component,
|
|
53
|
+
args: [{ selector: 'filter-item-select-multiple', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-form-field [ngClass]=\"{ isolate: item.isolate }\">\n <mat-label>{{item.label}}</mat-label>\n <mat-select\n #select\n [fsFilterFocusTrigger]=\"item\"\n [(ngModel)]=\"item.model\"\n (ngModelChange)=\"changed()\"\n [multiple]=\"item.multiple\">\n <mat-option\n *ngFor=\"let item of item.values | fsFilterIsolateValues: item.isolate\"\n [value]=\"item.value\">\n {{ item.name }}\n </mat-option>\n </mat-select>\n\n <mat-hint>\n <div *ngIf=\"item.isolate\">\n <mat-checkbox (change)=\"isolateChange(item)\" [(ngModel)]=\"item.isolate.enabled\">\n <span class=\"checkbox-label\">{{ item.isolate.label }}</span>\n </mat-checkbox>\n </div>\n </mat-hint>\n</mat-form-field>\n", styles: [".isolate{margin-bottom:25px}\n"] }]
|
|
54
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { item: [{
|
|
55
|
+
type: Input
|
|
56
|
+
}], select: [{
|
|
57
|
+
type: ViewChild,
|
|
58
|
+
args: ['select', { static: true }]
|
|
59
|
+
}] } });
|
|
60
60
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibXVsdGlwbGUuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2FwcC9jb21wb25lbnRzL2ZpbHRlcnMtaXRlbS9zZWxlY3QvbXVsdGlwbGUvbXVsdGlwbGUuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2FwcC9jb21wb25lbnRzL2ZpbHRlcnMtaXRlbS9zZWxlY3QvbXVsdGlwbGUvbXVsdGlwbGUuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNMLHVCQUF1QixFQUN2QixpQkFBaUIsRUFDakIsU0FBUyxFQUNULEtBQUssRUFDTCxTQUFTLEVBQ1YsTUFBTSxlQUFlLENBQUM7QUFDdkIsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBRXJELE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxNQUFNLHNEQUFzRCxDQUFDOzs7Ozs7Ozs7OztBQ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Ij5cbiAgICAgICAgICB7eyBpdGVtLm5hbWUgfX1cbiAgICA8L21hdC1vcHRpb24+XG4gIDwvbWF0LXNlbGVjdD5cblxuICA8bWF0LWhpbnQ+XG4gICAgPGRpdiAqbmdJZj1cIml0ZW0uaXNvbGF0ZVwiPlxuICAgICAgPG1hdC1jaGVja2JveCAoY2hhbmdlKT1cImlzb2xhdGVDaGFuZ2UoaXRlbSlcIiBbKG5nTW9kZWwpXT1cIml0ZW0uaXNvbGF0ZS5lbmFibGVkXCI+XG4gICAgICAgIDxzcGFuIGNsYXNzPVwiY2hlY2tib3gtbGFiZWxcIj57eyBpdGVtLmlzb2xhdGUubGFiZWwgfX08L3NwYW4+XG4gICAgICA8L21hdC1jaGVja2JveD5cbiAgICA8L2Rpdj5cbiAgPC9tYXQtaGludD5cbjwvbWF0LWZvcm0tZmllbGQ+XG4iXX0=
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, ChangeDetectorRef, KeyValueDiffers, Component, ViewChild, } from '@angular/core';
|
|
2
|
-
import { BaseItemComponent } from '../base-item/base-item.component';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "@angular/common";
|
|
5
|
-
import * as i2 from "@angular/material/form-field";
|
|
6
|
-
import * as i3 from "@angular/material/select";
|
|
7
|
-
import * as i4 from "./groups/groups.component";
|
|
8
|
-
import * as i5 from "./simple/simple.component";
|
|
9
|
-
import * as i6 from "./multiple/multiple.component";
|
|
10
|
-
export class SelectComponent extends BaseItemComponent {
|
|
11
|
-
_kvDiffers;
|
|
12
|
-
_cd;
|
|
13
|
-
selectedItem;
|
|
14
|
-
// For case when we have multiple selection with __all option
|
|
15
|
-
// If _all has been selected than we must disable all other items
|
|
16
|
-
allItemsOptionSelected = false;
|
|
17
|
-
get multipleSelectItem() {
|
|
18
|
-
return this.item;
|
|
19
|
-
}
|
|
20
|
-
get simpleSelectItem() {
|
|
21
|
-
return this.item;
|
|
22
|
-
}
|
|
23
|
-
values$;
|
|
24
|
-
constructor(_kvDiffers, _cd) {
|
|
25
|
-
super(_kvDiffers, _cd);
|
|
26
|
-
this._kvDiffers = _kvDiffers;
|
|
27
|
-
this._cd = _cd;
|
|
28
|
-
}
|
|
29
|
-
ngOnChanges(changes) {
|
|
30
|
-
if (changes.item) {
|
|
31
|
-
this.values$ = this.item.values$;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
ngDoCheck() {
|
|
35
|
-
if (this._kvDiffer) {
|
|
36
|
-
const changes = this._kvDiffer.diff(this.item);
|
|
37
|
-
if (changes) {
|
|
38
|
-
this._cd.markForCheck();
|
|
39
|
-
if (this.selectedItem) {
|
|
40
|
-
this.selectedItem.cd.markForCheck();
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectComponent, deps: [{ token: i0.KeyValueDiffers }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
46
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SelectComponent, selector: "filter-item-select", viewQueries: [{ propertyName: "selectedItem", first: true, predicate: ["selectItem"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"(item.loading$ | async) else itemSelect\">\n <mat-form-field>\n <mat-label>{{item.label}}</mat-label>\n <mat-select disabled></mat-select>\n </mat-form-field>\n</ng-container>\n\n<ng-template #itemSelect>\n <ng-container *ngIf=\"(values$ | async)?.length\">\n <ng-container *ngIf=\"item.multiple && !item.children\">\n <filter-item-select-multiple\n [item]=\"multipleSelectItem\"\n #selectItem>\n </filter-item-select-multiple>\n </ng-container>\n\n <ng-container *ngIf=\"!item.multiple && !item.children\">\n <filter-item-select-simple\n [item]=\"simpleSelectItem\"\n #selectItem>\n </filter-item-select-simple>\n </ng-container>\n\n <ng-container *ngIf=\"item.children\">\n <filter-item-select-groups\n [item]=\"item\"\n #selectItem>\n </filter-item-select-groups>\n </ng-container>\n </ng-container>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i4.SelectGroupsComponent, selector: "filter-item-select-groups", inputs: ["item"] }, { kind: "component", type: i5.SelectSimpleComponent, selector: "filter-item-select-simple", inputs: ["item"] }, { kind: "component", type: i6.SelectMultipleComponent, selector: "filter-item-select-multiple", inputs: ["item"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
47
|
-
}
|
|
48
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectComponent, decorators: [{
|
|
49
|
-
type: Component,
|
|
50
|
-
args: [{ selector: 'filter-item-select', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"(item.loading$ | async) else itemSelect\">\n <mat-form-field>\n <mat-label>{{item.label}}</mat-label>\n <mat-select disabled></mat-select>\n </mat-form-field>\n</ng-container>\n\n<ng-template #itemSelect>\n <ng-container *ngIf=\"(values$ | async)?.length\">\n <ng-container *ngIf=\"item.multiple && !item.children\">\n <filter-item-select-multiple\n [item]=\"multipleSelectItem\"\n #selectItem>\n </filter-item-select-multiple>\n </ng-container>\n\n <ng-container *ngIf=\"!item.multiple && !item.children\">\n <filter-item-select-simple\n [item]=\"simpleSelectItem\"\n #selectItem>\n </filter-item-select-simple>\n </ng-container>\n\n <ng-container *ngIf=\"item.children\">\n <filter-item-select-groups\n [item]=\"item\"\n #selectItem>\n </filter-item-select-groups>\n </ng-container>\n </ng-container>\n</ng-template>\n" }]
|
|
51
|
-
}], ctorParameters: function () { return [{ type: i0.KeyValueDiffers }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { selectedItem: [{
|
|
52
|
-
type: ViewChild,
|
|
53
|
-
args: ['selectItem']
|
|
54
|
-
}] } });
|
|
1
|
+
import { ChangeDetectionStrategy, ChangeDetectorRef, KeyValueDiffers, Component, ViewChild, } from '@angular/core';
|
|
2
|
+
import { BaseItemComponent } from '../base-item/base-item.component';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/common";
|
|
5
|
+
import * as i2 from "@angular/material/form-field";
|
|
6
|
+
import * as i3 from "@angular/material/select";
|
|
7
|
+
import * as i4 from "./groups/groups.component";
|
|
8
|
+
import * as i5 from "./simple/simple.component";
|
|
9
|
+
import * as i6 from "./multiple/multiple.component";
|
|
10
|
+
export class SelectComponent extends BaseItemComponent {
|
|
11
|
+
_kvDiffers;
|
|
12
|
+
_cd;
|
|
13
|
+
selectedItem;
|
|
14
|
+
// For case when we have multiple selection with __all option
|
|
15
|
+
// If _all has been selected than we must disable all other items
|
|
16
|
+
allItemsOptionSelected = false;
|
|
17
|
+
get multipleSelectItem() {
|
|
18
|
+
return this.item;
|
|
19
|
+
}
|
|
20
|
+
get simpleSelectItem() {
|
|
21
|
+
return this.item;
|
|
22
|
+
}
|
|
23
|
+
values$;
|
|
24
|
+
constructor(_kvDiffers, _cd) {
|
|
25
|
+
super(_kvDiffers, _cd);
|
|
26
|
+
this._kvDiffers = _kvDiffers;
|
|
27
|
+
this._cd = _cd;
|
|
28
|
+
}
|
|
29
|
+
ngOnChanges(changes) {
|
|
30
|
+
if (changes.item) {
|
|
31
|
+
this.values$ = this.item.values$;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
ngDoCheck() {
|
|
35
|
+
if (this._kvDiffer) {
|
|
36
|
+
const changes = this._kvDiffer.diff(this.item);
|
|
37
|
+
if (changes) {
|
|
38
|
+
this._cd.markForCheck();
|
|
39
|
+
if (this.selectedItem) {
|
|
40
|
+
this.selectedItem.cd.markForCheck();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectComponent, deps: [{ token: i0.KeyValueDiffers }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
46
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SelectComponent, selector: "filter-item-select", viewQueries: [{ propertyName: "selectedItem", first: true, predicate: ["selectItem"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"(item.loading$ | async) else itemSelect\">\n <mat-form-field>\n <mat-label>{{item.label}}</mat-label>\n <mat-select disabled></mat-select>\n </mat-form-field>\n</ng-container>\n\n<ng-template #itemSelect>\n <ng-container *ngIf=\"(values$ | async)?.length\">\n <ng-container *ngIf=\"item.multiple && !item.children\">\n <filter-item-select-multiple\n [item]=\"multipleSelectItem\"\n #selectItem>\n </filter-item-select-multiple>\n </ng-container>\n\n <ng-container *ngIf=\"!item.multiple && !item.children\">\n <filter-item-select-simple\n [item]=\"simpleSelectItem\"\n #selectItem>\n </filter-item-select-simple>\n </ng-container>\n\n <ng-container *ngIf=\"item.children\">\n <filter-item-select-groups\n [item]=\"item\"\n #selectItem>\n </filter-item-select-groups>\n </ng-container>\n </ng-container>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i4.SelectGroupsComponent, selector: "filter-item-select-groups", inputs: ["item"] }, { kind: "component", type: i5.SelectSimpleComponent, selector: "filter-item-select-simple", inputs: ["item"] }, { kind: "component", type: i6.SelectMultipleComponent, selector: "filter-item-select-multiple", inputs: ["item"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
47
|
+
}
|
|
48
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectComponent, decorators: [{
|
|
49
|
+
type: Component,
|
|
50
|
+
args: [{ selector: 'filter-item-select', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"(item.loading$ | async) else itemSelect\">\n <mat-form-field>\n <mat-label>{{item.label}}</mat-label>\n <mat-select disabled></mat-select>\n </mat-form-field>\n</ng-container>\n\n<ng-template #itemSelect>\n <ng-container *ngIf=\"(values$ | async)?.length\">\n <ng-container *ngIf=\"item.multiple && !item.children\">\n <filter-item-select-multiple\n [item]=\"multipleSelectItem\"\n #selectItem>\n </filter-item-select-multiple>\n </ng-container>\n\n <ng-container *ngIf=\"!item.multiple && !item.children\">\n <filter-item-select-simple\n [item]=\"simpleSelectItem\"\n #selectItem>\n </filter-item-select-simple>\n </ng-container>\n\n <ng-container *ngIf=\"item.children\">\n <filter-item-select-groups\n [item]=\"item\"\n #selectItem>\n </filter-item-select-groups>\n </ng-container>\n </ng-container>\n</ng-template>\n" }]
|
|
51
|
+
}], ctorParameters: function () { return [{ type: i0.KeyValueDiffers }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { selectedItem: [{
|
|
52
|
+
type: ViewChild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IiFpdGVtLm11bHRpcGxlICYmICFpdGVtLmNoaWxkcmVuXCI+XG4gICAgICA8ZmlsdGVyLWl0ZW0tc2VsZWN0LXNpbXBsZVxuICAgICAgICBbaXRlbV09XCJzaW1wbGVTZWxlY3RJdGVtXCJcbiAgICAgICAgI3NlbGVjdEl0ZW0+XG4gICAgICA8L2ZpbHRlci1pdGVtLXNlbGVjdC1zaW1wbGU+XG4gICAgPC9uZy1jb250YWluZXI+XG5cbiAgICA8bmctY29udGFpbmVyICpuZ0lmPVwiaXRlbS5jaGlsZHJlblwiPlxuICAgICAgPGZpbHRlci1pdGVtLXNlbGVjdC1ncm91cHNcbiAgICAgICAgW2l0ZW1dPVwiaXRlbVwiXG4gICAgICAgICNzZWxlY3RJdGVtPlxuICAgICAgPC9maWx0ZXItaXRlbS1zZWxlY3QtZ3JvdXBzPlxuICAgIDwvbmctY29udGFpbmVyPlxuICA8L25nLWNvbnRhaW5lcj5cbjwvbmctdGVtcGxhdGU+XG4iXX0=
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, ViewChild, } from '@angular/core';
|
|
2
|
-
import { MatSelect } from '@angular/material/select';
|
|
3
|
-
import { SimpleSelectItem } from '../../../../models/items/select/simple-select-item';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
import * as i1 from "@angular/common";
|
|
6
|
-
import * as i2 from "@angular/forms";
|
|
7
|
-
import * as i3 from "@angular/material/form-field";
|
|
8
|
-
import * as i4 from "@angular/material/select";
|
|
9
|
-
import * as i5 from "@angular/material/core";
|
|
10
|
-
import * as i6 from "@angular/material/checkbox";
|
|
11
|
-
import * as i7 from "@firestitch/form";
|
|
12
|
-
import * as i8 from "../../../../directives/focus-to-item/focus-to-item.directive";
|
|
13
|
-
import * as i9 from "../../../../pipes/remove-isolate-value.pipe";
|
|
14
|
-
export class SelectSimpleComponent {
|
|
15
|
-
cd;
|
|
16
|
-
item;
|
|
17
|
-
select;
|
|
18
|
-
constructor(cd) {
|
|
19
|
-
this.cd = cd;
|
|
20
|
-
}
|
|
21
|
-
changed() {
|
|
22
|
-
if (this.item.isolate) {
|
|
23
|
-
this.item.isolate.enabled = false;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
isolateChange(filter) {
|
|
27
|
-
if (filter.isolate.enabled) {
|
|
28
|
-
filter.model = filter.isolate.value;
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
filter.model = null;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectSimpleComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
35
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SelectSimpleComponent, selector: "filter-item-select-simple", inputs: { item: "item" }, viewQueries: [{ propertyName: "select", first: true, predicate: ["select"], descendants: true, static: true }], ngImport: i0, template: "<mat-form-field [ngClass]=\"{ isolate: item.isolate }\">\n <mat-label>{{item.label}}</mat-label>\n <mat-select\n #select\n [fsFilterFocusTrigger]=\"item\"\n [(ngModel)]=\"item.model\"\n (ngModelChange)=\"changed()\">\n <mat-option *ngFor=\"let item of item.values | fsFilterIsolateValues: item.isolate\"\n [value]=\"item.value\"\n >\n {{ item.name }}\n </mat-option>\n </mat-select>\n\n <mat-hint>\n <div *ngIf=\"item.isolate\">\n <mat-checkbox (change)=\"isolateChange(item)\" [(ngModel)]=\"item.isolate.enabled\">\n <span class=\"checkbox-label\">{{ item.isolate.label }}</span>\n </mat-checkbox>\n </div>\n </mat-hint>\n</mat-form-field>\n", styles: [".isolate{margin-bottom:25px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i6.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i7.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormGreaterEqual]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { kind: "directive", type: i8.FocusToItemDirective, selector: "[fsFilterFocusTrigger]", inputs: ["fsFilterFocusTrigger", "focusTargetType"] }, { kind: "pipe", type: i9.FsFilterIsolateValues, name: "fsFilterIsolateValues" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
36
|
-
}
|
|
37
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectSimpleComponent, decorators: [{
|
|
38
|
-
type: Component,
|
|
39
|
-
args: [{ selector: 'filter-item-select-simple', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-form-field [ngClass]=\"{ isolate: item.isolate }\">\n <mat-label>{{item.label}}</mat-label>\n <mat-select\n #select\n [fsFilterFocusTrigger]=\"item\"\n [(ngModel)]=\"item.model\"\n (ngModelChange)=\"changed()\">\n <mat-option *ngFor=\"let item of item.values | fsFilterIsolateValues: item.isolate\"\n [value]=\"item.value\"\n >\n {{ item.name }}\n </mat-option>\n </mat-select>\n\n <mat-hint>\n <div *ngIf=\"item.isolate\">\n <mat-checkbox (change)=\"isolateChange(item)\" [(ngModel)]=\"item.isolate.enabled\">\n <span class=\"checkbox-label\">{{ item.isolate.label }}</span>\n </mat-checkbox>\n </div>\n </mat-hint>\n</mat-form-field>\n", styles: [".isolate{margin-bottom:25px}\n"] }]
|
|
40
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { item: [{
|
|
41
|
-
type: Input
|
|
42
|
-
}], select: [{
|
|
43
|
-
type: ViewChild,
|
|
44
|
-
args: ['select', { static: true }]
|
|
45
|
-
}] } });
|
|
1
|
+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, ViewChild, } from '@angular/core';
|
|
2
|
+
import { MatSelect } from '@angular/material/select';
|
|
3
|
+
import { SimpleSelectItem } from '../../../../models/items/select/simple-select-item';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "@angular/common";
|
|
6
|
+
import * as i2 from "@angular/forms";
|
|
7
|
+
import * as i3 from "@angular/material/form-field";
|
|
8
|
+
import * as i4 from "@angular/material/select";
|
|
9
|
+
import * as i5 from "@angular/material/core";
|
|
10
|
+
import * as i6 from "@angular/material/checkbox";
|
|
11
|
+
import * as i7 from "@firestitch/form";
|
|
12
|
+
import * as i8 from "../../../../directives/focus-to-item/focus-to-item.directive";
|
|
13
|
+
import * as i9 from "../../../../pipes/remove-isolate-value.pipe";
|
|
14
|
+
export class SelectSimpleComponent {
|
|
15
|
+
cd;
|
|
16
|
+
item;
|
|
17
|
+
select;
|
|
18
|
+
constructor(cd) {
|
|
19
|
+
this.cd = cd;
|
|
20
|
+
}
|
|
21
|
+
changed() {
|
|
22
|
+
if (this.item.isolate) {
|
|
23
|
+
this.item.isolate.enabled = false;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
isolateChange(filter) {
|
|
27
|
+
if (filter.isolate.enabled) {
|
|
28
|
+
filter.model = filter.isolate.value;
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
filter.model = null;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectSimpleComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
35
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SelectSimpleComponent, selector: "filter-item-select-simple", inputs: { item: "item" }, viewQueries: [{ propertyName: "select", first: true, predicate: ["select"], descendants: true, static: true }], ngImport: i0, template: "<mat-form-field [ngClass]=\"{ isolate: item.isolate }\">\n <mat-label>{{item.label}}</mat-label>\n <mat-select\n #select\n [fsFilterFocusTrigger]=\"item\"\n [(ngModel)]=\"item.model\"\n (ngModelChange)=\"changed()\">\n <mat-option *ngFor=\"let item of item.values | fsFilterIsolateValues: item.isolate\"\n [value]=\"item.value\"\n >\n {{ item.name }}\n </mat-option>\n </mat-select>\n\n <mat-hint>\n <div *ngIf=\"item.isolate\">\n <mat-checkbox (change)=\"isolateChange(item)\" [(ngModel)]=\"item.isolate.enabled\">\n <span class=\"checkbox-label\">{{ item.isolate.label }}</span>\n </mat-checkbox>\n </div>\n </mat-hint>\n</mat-form-field>\n", styles: [".isolate{margin-bottom:25px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i6.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i7.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormGreaterEqual]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { kind: "directive", type: i8.FocusToItemDirective, selector: "[fsFilterFocusTrigger]", inputs: ["fsFilterFocusTrigger", "focusTargetType"] }, { kind: "pipe", type: i9.FsFilterIsolateValues, name: "fsFilterIsolateValues" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
36
|
+
}
|
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectSimpleComponent, decorators: [{
|
|
38
|
+
type: Component,
|
|
39
|
+
args: [{ selector: 'filter-item-select-simple', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-form-field [ngClass]=\"{ isolate: item.isolate }\">\n <mat-label>{{item.label}}</mat-label>\n <mat-select\n #select\n [fsFilterFocusTrigger]=\"item\"\n [(ngModel)]=\"item.model\"\n (ngModelChange)=\"changed()\">\n <mat-option *ngFor=\"let item of item.values | fsFilterIsolateValues: item.isolate\"\n [value]=\"item.value\"\n >\n {{ item.name }}\n </mat-option>\n </mat-select>\n\n <mat-hint>\n <div *ngIf=\"item.isolate\">\n <mat-checkbox (change)=\"isolateChange(item)\" [(ngModel)]=\"item.isolate.enabled\">\n <span class=\"checkbox-label\">{{ item.isolate.label }}</span>\n </mat-checkbox>\n </div>\n </mat-hint>\n</mat-form-field>\n", styles: [".isolate{margin-bottom:25px}\n"] }]
|
|
40
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { item: [{
|
|
41
|
+
type: Input
|
|
42
|
+
}], select: [{
|
|
43
|
+
type: ViewChild,
|
|
44
|
+
args: ['select', { static: true }]
|
|
45
|
+
}] } });
|
|
46
46
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2ltcGxlLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9hcHAvY29tcG9uZW50cy9maWx0ZXJzLWl0ZW0vc2VsZWN0L3NpbXBsZS9zaW1wbGUuY29tcG9uZW50LnRzIiwiLi4vLi4vLi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UpPVwiaXNvbGF0ZUNoYW5nZShpdGVtKVwiIFsobmdNb2RlbCldPVwiaXRlbS5pc29sYXRlLmVuYWJsZWRcIj5cbiAgICAgICAgPHNwYW4gY2xhc3M9XCJjaGVja2JveC1sYWJlbFwiPnt7IGl0ZW0uaXNvbGF0ZS5sYWJlbCB9fTwvc3Bhbj5cbiAgICAgIDwvbWF0LWNoZWNrYm94PlxuICAgIDwvZGl2PlxuICA8L21hdC1oaW50PlxuPC9tYXQtZm9ybS1maWVsZD5cbiJdfQ==
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, KeyValueDiffers, } from '@angular/core';
|
|
2
|
-
import { UntypedFormControl } from '@angular/forms';
|
|
3
|
-
import { Subject } from 'rxjs';
|
|
4
|
-
import { distinctUntilChanged, takeUntil, debounceTime } from 'rxjs/operators';
|
|
5
|
-
import { BaseItemComponent } from '../base-item/base-item.component';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
import * as i1 from "@angular/common";
|
|
8
|
-
import * as i2 from "@angular/forms";
|
|
9
|
-
import * as i3 from "@angular/material/input";
|
|
10
|
-
import * as i4 from "@angular/material/form-field";
|
|
11
|
-
import * as i5 from "../../../directives/focus-to-item/focus-to-item.directive";
|
|
12
|
-
export class TextComponent extends BaseItemComponent {
|
|
13
|
-
_kvDiffers;
|
|
14
|
-
_cd;
|
|
15
|
-
textControl = new UntypedFormControl();
|
|
16
|
-
destroy$ = new Subject();
|
|
17
|
-
constructor(_kvDiffers, _cd) {
|
|
18
|
-
super(_kvDiffers, _cd);
|
|
19
|
-
this._kvDiffers = _kvDiffers;
|
|
20
|
-
this._cd = _cd;
|
|
21
|
-
}
|
|
22
|
-
ngOnInit() {
|
|
23
|
-
this._listenControlValueChanges();
|
|
24
|
-
this._listenModelChanges();
|
|
25
|
-
}
|
|
26
|
-
ngOnDestroy() {
|
|
27
|
-
this.destroy$.next();
|
|
28
|
-
this.destroy$.complete();
|
|
29
|
-
}
|
|
30
|
-
_listenControlValueChanges() {
|
|
31
|
-
this.textControl.valueChanges
|
|
32
|
-
.pipe(distinctUntilChanged(), debounceTime(200), takeUntil(this.destroy$))
|
|
33
|
-
.subscribe((value) => {
|
|
34
|
-
this.item.model = value;
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
_listenModelChanges() {
|
|
38
|
-
this._item.value$
|
|
39
|
-
.pipe(takeUntil(this.destroy$))
|
|
40
|
-
.subscribe(() => {
|
|
41
|
-
this.textControl.setValue(this.item.model, { emitEvent: false });
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TextComponent, deps: [{ token: i0.KeyValueDiffers }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
45
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TextComponent, selector: "filter-item-text", usesInheritance: true, ngImport: i0, template: "<mat-form-field>\n <mat-label>{{item.label}}</mat-label>\n <span matPrefix *ngIf=\"item.prefix\" [innerHtml]=\"item.prefix\"></span>\n <input matInput [formControl]=\"textControl\" [fsFilterFocusTrigger]=\"item\">\n <span matSuffix *ngIf=\"item.suffix\" [innerHtml]=\"item.suffix\"></span>\n</mat-form-field>\n", styles: [""], 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.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.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: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i5.FocusToItemDirective, selector: "[fsFilterFocusTrigger]", inputs: ["fsFilterFocusTrigger", "focusTargetType"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
46
|
-
}
|
|
47
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TextComponent, decorators: [{
|
|
48
|
-
type: Component,
|
|
49
|
-
args: [{ selector: 'filter-item-text', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-form-field>\n <mat-label>{{item.label}}</mat-label>\n <span matPrefix *ngIf=\"item.prefix\" [innerHtml]=\"item.prefix\"></span>\n <input matInput [formControl]=\"textControl\" [fsFilterFocusTrigger]=\"item\">\n <span matSuffix *ngIf=\"item.suffix\" [innerHtml]=\"item.suffix\"></span>\n</mat-form-field>\n" }]
|
|
50
|
-
}], ctorParameters: function () { return [{ type: i0.KeyValueDiffers }, { type: i0.ChangeDetectorRef }]; } });
|
|
1
|
+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, KeyValueDiffers, } from '@angular/core';
|
|
2
|
+
import { UntypedFormControl } from '@angular/forms';
|
|
3
|
+
import { Subject } from 'rxjs';
|
|
4
|
+
import { distinctUntilChanged, takeUntil, debounceTime } from 'rxjs/operators';
|
|
5
|
+
import { BaseItemComponent } from '../base-item/base-item.component';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
import * as i1 from "@angular/common";
|
|
8
|
+
import * as i2 from "@angular/forms";
|
|
9
|
+
import * as i3 from "@angular/material/input";
|
|
10
|
+
import * as i4 from "@angular/material/form-field";
|
|
11
|
+
import * as i5 from "../../../directives/focus-to-item/focus-to-item.directive";
|
|
12
|
+
export class TextComponent extends BaseItemComponent {
|
|
13
|
+
_kvDiffers;
|
|
14
|
+
_cd;
|
|
15
|
+
textControl = new UntypedFormControl();
|
|
16
|
+
destroy$ = new Subject();
|
|
17
|
+
constructor(_kvDiffers, _cd) {
|
|
18
|
+
super(_kvDiffers, _cd);
|
|
19
|
+
this._kvDiffers = _kvDiffers;
|
|
20
|
+
this._cd = _cd;
|
|
21
|
+
}
|
|
22
|
+
ngOnInit() {
|
|
23
|
+
this._listenControlValueChanges();
|
|
24
|
+
this._listenModelChanges();
|
|
25
|
+
}
|
|
26
|
+
ngOnDestroy() {
|
|
27
|
+
this.destroy$.next();
|
|
28
|
+
this.destroy$.complete();
|
|
29
|
+
}
|
|
30
|
+
_listenControlValueChanges() {
|
|
31
|
+
this.textControl.valueChanges
|
|
32
|
+
.pipe(distinctUntilChanged(), debounceTime(200), takeUntil(this.destroy$))
|
|
33
|
+
.subscribe((value) => {
|
|
34
|
+
this.item.model = value;
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
_listenModelChanges() {
|
|
38
|
+
this._item.value$
|
|
39
|
+
.pipe(takeUntil(this.destroy$))
|
|
40
|
+
.subscribe(() => {
|
|
41
|
+
this.textControl.setValue(this.item.model, { emitEvent: false });
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TextComponent, deps: [{ token: i0.KeyValueDiffers }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
45
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TextComponent, selector: "filter-item-text", usesInheritance: true, ngImport: i0, template: "<mat-form-field>\n <mat-label>{{item.label}}</mat-label>\n <span matPrefix *ngIf=\"item.prefix\" [innerHtml]=\"item.prefix\"></span>\n <input matInput [formControl]=\"textControl\" [fsFilterFocusTrigger]=\"item\">\n <span matSuffix *ngIf=\"item.suffix\" [innerHtml]=\"item.suffix\"></span>\n</mat-form-field>\n", styles: [""], 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.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.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: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i5.FocusToItemDirective, selector: "[fsFilterFocusTrigger]", inputs: ["fsFilterFocusTrigger", "focusTargetType"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
46
|
+
}
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TextComponent, decorators: [{
|
|
48
|
+
type: Component,
|
|
49
|
+
args: [{ selector: 'filter-item-text', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-form-field>\n <mat-label>{{item.label}}</mat-label>\n <span matPrefix *ngIf=\"item.prefix\" [innerHtml]=\"item.prefix\"></span>\n <input matInput [formControl]=\"textControl\" [fsFilterFocusTrigger]=\"item\">\n <span matSuffix *ngIf=\"item.suffix\" [innerHtml]=\"item.suffix\"></span>\n</mat-form-field>\n" }]
|
|
50
|
+
}], ctorParameters: function () { return [{ type: i0.KeyValueDiffers }, { type: i0.ChangeDetectorRef }]; } });
|
|
51
51
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGV4dC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL2NvbXBvbmVudHMvZmlsdGVycy1pdGVtL3RleHQvdGV4dC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL2NvbXBvbmVudHMvZmlsdGVycy1pdGVtL3RleHQvdGV4dC5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQ0wsdUJBQXVCLEVBQ3ZCLGlCQUFpQixFQUNqQixTQUFTLEVBQ1QsZUFBZSxHQUdoQixNQUFNLGVBQWUsQ0FBQztBQUN2QixPQUFPLEVBQUUsa0JBQWtCLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUVwRCxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0sTUFBTSxDQUFDO0FBQ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iJdfQ==
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, KeyValueDiffers } from '@angular/core';
|
|
2
|
-
import { BaseItemComponent } from '../base-item/base-item.component';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "@angular/forms";
|
|
5
|
-
import * as i2 from "@angular/material/input";
|
|
6
|
-
import * as i3 from "@angular/material/form-field";
|
|
7
|
-
import * as i4 from "@firestitch/datepicker";
|
|
8
|
-
import * as i5 from "@firestitch/form";
|
|
9
|
-
import * as i6 from "../../../directives/focus-to-item/focus-to-item.directive";
|
|
10
|
-
export class WeekComponent extends BaseItemComponent {
|
|
11
|
-
_kvDiffers;
|
|
12
|
-
_cd;
|
|
13
|
-
constructor(_kvDiffers, _cd) {
|
|
14
|
-
super(_kvDiffers, _cd);
|
|
15
|
-
this._kvDiffers = _kvDiffers;
|
|
16
|
-
this._cd = _cd;
|
|
17
|
-
}
|
|
18
|
-
ngOnInit() { }
|
|
19
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: WeekComponent, deps: [{ token: i0.KeyValueDiffers }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
20
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: WeekComponent, selector: "filter-item-week", usesInheritance: true, ngImport: i0, template: "<mat-form-field>\n <mat-label>{{item.label}}</mat-label>\n <input \n matInput\n fsDateWeekPicker\n [placeholder]=\"item.label\"\n [fsFilterFocusTrigger]=\"item\"\n [(ngModel)]=\"item.model\"\n [seedDate]=\"item.seedDate\"\n [clear]=\"item.showClear\"\n [name]=\"item.name\">\n</mat-form-field>\n", dependencies: [{ kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.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: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "component", type: i4.FsDateWeekPickerComponent, selector: "[fsDateWeekPicker]", inputs: ["minYear", "maxYear", "minDate", "maxDate", "seedDate", "period", "view"], outputs: ["change"] }, { kind: "directive", type: i5.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormGreaterEqual]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { kind: "directive", type: i6.FocusToItemDirective, selector: "[fsFilterFocusTrigger]", inputs: ["fsFilterFocusTrigger", "focusTargetType"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
21
|
-
}
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: WeekComponent, decorators: [{
|
|
23
|
-
type: Component,
|
|
24
|
-
args: [{ selector: 'filter-item-week', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-form-field>\n <mat-label>{{item.label}}</mat-label>\n <input \n matInput\n fsDateWeekPicker\n [placeholder]=\"item.label\"\n [fsFilterFocusTrigger]=\"item\"\n [(ngModel)]=\"item.model\"\n [seedDate]=\"item.seedDate\"\n [clear]=\"item.showClear\"\n [name]=\"item.name\">\n</mat-form-field>\n" }]
|
|
25
|
-
}], ctorParameters: function () { return [{ type: i0.KeyValueDiffers }, { type: i0.ChangeDetectorRef }]; } });
|
|
1
|
+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, KeyValueDiffers } from '@angular/core';
|
|
2
|
+
import { BaseItemComponent } from '../base-item/base-item.component';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/forms";
|
|
5
|
+
import * as i2 from "@angular/material/input";
|
|
6
|
+
import * as i3 from "@angular/material/form-field";
|
|
7
|
+
import * as i4 from "@firestitch/datepicker";
|
|
8
|
+
import * as i5 from "@firestitch/form";
|
|
9
|
+
import * as i6 from "../../../directives/focus-to-item/focus-to-item.directive";
|
|
10
|
+
export class WeekComponent extends BaseItemComponent {
|
|
11
|
+
_kvDiffers;
|
|
12
|
+
_cd;
|
|
13
|
+
constructor(_kvDiffers, _cd) {
|
|
14
|
+
super(_kvDiffers, _cd);
|
|
15
|
+
this._kvDiffers = _kvDiffers;
|
|
16
|
+
this._cd = _cd;
|
|
17
|
+
}
|
|
18
|
+
ngOnInit() { }
|
|
19
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: WeekComponent, deps: [{ token: i0.KeyValueDiffers }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
20
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: WeekComponent, selector: "filter-item-week", usesInheritance: true, ngImport: i0, template: "<mat-form-field>\n <mat-label>{{item.label}}</mat-label>\n <input \n matInput\n fsDateWeekPicker\n [placeholder]=\"item.label\"\n [fsFilterFocusTrigger]=\"item\"\n [(ngModel)]=\"item.model\"\n [seedDate]=\"item.seedDate\"\n [clear]=\"item.showClear\"\n [name]=\"item.name\">\n</mat-form-field>\n", dependencies: [{ kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.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: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "component", type: i4.FsDateWeekPickerComponent, selector: "[fsDateWeekPicker]", inputs: ["minYear", "maxYear", "minDate", "maxDate", "seedDate", "period", "view"], outputs: ["change"] }, { kind: "directive", type: i5.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormGreaterEqual]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { kind: "directive", type: i6.FocusToItemDirective, selector: "[fsFilterFocusTrigger]", inputs: ["fsFilterFocusTrigger", "focusTargetType"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
21
|
+
}
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: WeekComponent, decorators: [{
|
|
23
|
+
type: Component,
|
|
24
|
+
args: [{ selector: 'filter-item-week', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-form-field>\n <mat-label>{{item.label}}</mat-label>\n <input \n matInput\n fsDateWeekPicker\n [placeholder]=\"item.label\"\n [fsFilterFocusTrigger]=\"item\"\n [(ngModel)]=\"item.model\"\n [seedDate]=\"item.seedDate\"\n [clear]=\"item.showClear\"\n [name]=\"item.name\">\n</mat-form-field>\n" }]
|
|
25
|
+
}], ctorParameters: function () { return [{ type: i0.KeyValueDiffers }, { type: i0.ChangeDetectorRef }]; } });
|
|
26
26
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2Vlay5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL2NvbXBvbmVudHMvZmlsdGVycy1pdGVtL3dlZWsvd2Vlay5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL2NvbXBvbmVudHMvZmlsdGVycy1pdGVtL3dlZWsvd2Vlay5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQ0wsdUJBQXVCLEVBQ3ZCLGlCQUFpQixFQUNqQixTQUFTLEVBQ1QsZUFBZSxFQUVoQixNQUFNLGVBQWUsQ0FBQztBQUN2QixPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxrQ0FBa0MsQ0FBQzs7Ozs7Ozs7QUFTckUsTUFBTSxPQUFPLGFBQWMsU0FBUSxpQkFBMkI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