@firestitch/filter 12.12.2 → 12.12.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/components/filter/filter.component.d.ts +6 -11
- package/app/fs-filter.module.d.ts +7 -6
- package/bundles/firestitch-filter.umd.js +855 -909
- package/bundles/firestitch-filter.umd.js.map +1 -1
- package/esm2015/app/components/filter/filter.component.js +29 -84
- package/esm2015/app/fs-filter.module.js +44 -40
- package/fesm2015/firestitch-filter.js +542 -592
- package/fesm2015/firestitch-filter.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Optional, Component, ChangeDetectionStrategy, Inject, InjectionToken, Input, Directive, Self, Pipe, ViewChild,
|
|
3
|
-
import { BehaviorSubject, Subject, isObservable, forkJoin, of,
|
|
4
|
-
import { tap, finalize, take, takeUntil, debounceTime, filter as filter$1, distinctUntilChanged, switchMap,
|
|
2
|
+
import { Injectable, Optional, Component, ChangeDetectionStrategy, Inject, InjectionToken, Input, EventEmitter, Output, Directive, Self, Pipe, ViewChild, HostListener, TemplateRef, ViewEncapsulation, ContentChild, HostBinding, NgModule } from '@angular/core';
|
|
3
|
+
import { BehaviorSubject, Subject, isObservable, forkJoin, of, timer, combineLatest, fromEvent, merge } from 'rxjs';
|
|
4
|
+
import { tap, finalize, take, takeUntil, debounceTime, filter as filter$1, distinctUntilChanged, switchMap, mapTo, startWith, map, delay, skip } from 'rxjs/operators';
|
|
5
5
|
import { filter, isArrayEqual, list, isEmpty, getNormalizedPath, remove, FsCommonModule } from '@firestitch/common';
|
|
6
6
|
import { isFunction, isObject, clone, isString, toString, pickBy } from 'lodash-es';
|
|
7
7
|
import * as i3 from '@angular/common';
|
|
@@ -15,7 +15,7 @@ import * as i1 from '@firestitch/store';
|
|
|
15
15
|
import { FsPersistanceStore, FsStoreModule, FsStore } from '@firestitch/store';
|
|
16
16
|
import { simpleFormat, format } from '@firestitch/date';
|
|
17
17
|
import { parseISO, isValid, isDate } from 'date-fns';
|
|
18
|
-
import * as i3$
|
|
18
|
+
import * as i3$4 from '@firestitch/datepicker';
|
|
19
19
|
import { formatPeriodObject, FsDatePickerModule } from '@firestitch/datepicker';
|
|
20
20
|
import * as i1$3 from '@angular/material/form-field';
|
|
21
21
|
import * as i2 from '@angular/material/select';
|
|
@@ -29,33 +29,35 @@ import * as i7 from '@firestitch/form';
|
|
|
29
29
|
import { FsFormModule } from '@firestitch/form';
|
|
30
30
|
import * as i3$2 from '@angular/material/input';
|
|
31
31
|
import { MatInput, MatInputModule } from '@angular/material/input';
|
|
32
|
+
import { ComponentPortal, PortalInjector, PortalModule } from '@angular/cdk/portal';
|
|
32
33
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
33
|
-
import * as i4$
|
|
34
|
+
import * as i4$3 from '@angular/material/checkbox';
|
|
34
35
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
35
36
|
import { MatChipsModule } from '@angular/material/chips';
|
|
36
|
-
import * as i2$
|
|
37
|
+
import * as i2$1 from '@angular/material/icon';
|
|
37
38
|
import { MatIconModule } from '@angular/material/icon';
|
|
38
|
-
import
|
|
39
|
-
import * as i2$1 from '@firestitch/chip';
|
|
40
|
-
import { FsChipModule } from '@firestitch/chip';
|
|
41
|
-
import * as i1$6 from '@firestitch/label';
|
|
42
|
-
import { FsLabelModule } from '@firestitch/label';
|
|
43
|
-
import { FsScrollModule } from '@firestitch/scroll';
|
|
44
|
-
import * as i4$1 from '@firestitch/autocomplete';
|
|
39
|
+
import * as i4$2 from '@firestitch/autocomplete';
|
|
45
40
|
import { FsAutocompleteModule } from '@firestitch/autocomplete';
|
|
46
41
|
import * as i5 from '@firestitch/autocomplete-chips';
|
|
47
42
|
import { FsAutocompleteChipsModule } from '@firestitch/autocomplete-chips';
|
|
48
|
-
import * as
|
|
49
|
-
import {
|
|
50
|
-
import * as
|
|
51
|
-
import { FsSkeletonModule } from '@firestitch/skeleton';
|
|
52
|
-
import * as i4$3 from '@firestitch/file';
|
|
43
|
+
import * as i2$2 from '@firestitch/chip';
|
|
44
|
+
import { FsChipModule } from '@firestitch/chip';
|
|
45
|
+
import * as i4$1 from '@firestitch/file';
|
|
53
46
|
import { FsFileModule } from '@firestitch/file';
|
|
47
|
+
import * as i1$5 from '@firestitch/label';
|
|
48
|
+
import { FsLabelModule } from '@firestitch/label';
|
|
49
|
+
import * as i3$3 from '@firestitch/menu';
|
|
50
|
+
import { FsMenuModule } from '@firestitch/menu';
|
|
54
51
|
import * as i7$1 from '@firestitch/popover';
|
|
55
52
|
import { FsPopoverModule } from '@firestitch/popover';
|
|
56
|
-
import
|
|
57
|
-
import * as
|
|
53
|
+
import { FsScrollModule } from '@firestitch/scroll';
|
|
54
|
+
import * as i6$1 from '@firestitch/skeleton';
|
|
55
|
+
import { FsSkeletonModule } from '@firestitch/skeleton';
|
|
56
|
+
import * as i7$2 from '@firestitch/clear';
|
|
57
|
+
import { FsClearModule } from '@firestitch/clear';
|
|
58
|
+
import * as i1$6 from '@angular/cdk/overlay';
|
|
58
59
|
import { OverlayConfig } from '@angular/cdk/overlay';
|
|
60
|
+
import * as i1$7 from '@angular/cdk/layout';
|
|
59
61
|
|
|
60
62
|
const QUERY_PARAM_DELIMITER = ':';
|
|
61
63
|
|
|
@@ -2479,135 +2481,314 @@ class Action {
|
|
|
2479
2481
|
}
|
|
2480
2482
|
}
|
|
2481
2483
|
|
|
2482
|
-
class
|
|
2483
|
-
constructor(
|
|
2484
|
-
this.
|
|
2485
|
-
this._visible$ = new BehaviorSubject(false);
|
|
2486
|
-
this._actions$ = new BehaviorSubject([]);
|
|
2487
|
-
this._menuActions$ = new BehaviorSubject([]);
|
|
2488
|
-
this._destroy$ = new Subject();
|
|
2489
|
-
this._mobileMedia = '(max-width: 799px)';
|
|
2490
|
-
this._allActions = [];
|
|
2491
|
-
this._listenMobileMedia();
|
|
2492
|
-
}
|
|
2493
|
-
get menuActions() {
|
|
2494
|
-
return this._menuActions$.value;
|
|
2495
|
-
}
|
|
2496
|
-
get actions() {
|
|
2497
|
-
return this._actions$.value;
|
|
2498
|
-
}
|
|
2499
|
-
get actions$() {
|
|
2500
|
-
return this._actions$.asObservable();
|
|
2484
|
+
class FsFilterActionButtonComponent {
|
|
2485
|
+
constructor() {
|
|
2486
|
+
this.ActionType = ActionType;
|
|
2501
2487
|
}
|
|
2502
|
-
|
|
2503
|
-
|
|
2488
|
+
}
|
|
2489
|
+
FsFilterActionButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFilterActionButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2490
|
+
FsFilterActionButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsFilterActionButtonComponent, selector: "fs-filter-action-button", inputs: { action: "action" }, host: { classAttribute: "action-button" }, ngImport: i0, template: "<ng-container [ngSwitch]=\"action.type\">\n <button\n type=\"button\"\n *ngSwitchCase=\"ActionType.Icon\"\n mat-icon-button\n (click)=\"action.click && action.click($event)\"\n [color]=\"action.color\"\n [ngClass]=\"action.classArray\"\n [disabled]=\"action.disabled$ | async\"\n [tabIndex]=\"action.tabIndex\">\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n\n <!-- Fab button -->\n <button \n type=\"button\"\n *ngSwitchCase=\"ActionType.Fab\"\n mat-fab\n (click)=\"action.click && action.click($event)\"\n [color]=\"action.color\"\n [ngClass]=\"action.classArray\"\n [disabled]=\"action.disabled$ | async\"\n [tabIndex]=\"action.tabIndex\">\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n\n <!-- Mini Fab button -->\n <button \n type=\"button\"\n *ngSwitchCase=\"ActionType.MiniFab\"\n mat-mini-fab\n (click)=\"action.click && action.click($event)\"\n [color]=\"action.color\"\n [ngClass]=\"action.classArray\"\n [disabled]=\"action.disabled$ | async\"\n [tabIndex]=\"action.tabIndex\">\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n\n <button \n type=\"button\"\n *ngSwitchDefault\n mat-button\n [ngClass]=\"{ \n 'mat-raised-button': action.type === 'raised',\n 'mat-flat-button': action.type === 'flat',\n 'mat-stroked-button': action.type === 'stroked',\n 'mat-button': action.type === 'basic',\n 'mat-icon-button': action.type === 'icon'\n }\"\n (click)=\"action.click && action.click($event)\"\n [color]=\"action.color\"\n [class]=\"action.classArray.join(' ')\"\n [disabled]=\"action.disabled$ | async\"\n [tabIndex]=\"action.tabIndex\">\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n\n <ng-template #buttonContent>\n <ng-container *ngIf=\"!action.icon else withIcon\">\n {{action.label}}\n </ng-container>\n\n <ng-template #withIcon>\n <mat-icon *ngIf=\"!action.iconPlacement || action.iconPlacement === 'left'\">{{action.icon}}</mat-icon>\n {{action.label}}\n <mat-icon *ngIf=\"action.iconPlacement === 'right'\">{{action.icon}}</mat-icon>\n </ng-template>\n </ng-template>\n</ng-container>\n", components: [{ type: i1$4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i3.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2491
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFilterActionButtonComponent, decorators: [{
|
|
2492
|
+
type: Component,
|
|
2493
|
+
args: [{
|
|
2494
|
+
selector: 'fs-filter-action-button',
|
|
2495
|
+
templateUrl: './action-button.component.html',
|
|
2496
|
+
host: {
|
|
2497
|
+
class: 'action-button',
|
|
2498
|
+
},
|
|
2499
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2500
|
+
}]
|
|
2501
|
+
}], propDecorators: { action: [{
|
|
2502
|
+
type: Input
|
|
2503
|
+
}] } });
|
|
2504
|
+
|
|
2505
|
+
class FsFilterActionKebabActionsComponent {
|
|
2506
|
+
}
|
|
2507
|
+
FsFilterActionKebabActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFilterActionKebabActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2508
|
+
FsFilterActionKebabActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsFilterActionKebabActionsComponent, selector: "fs-filter-action-kebab-actions", inputs: { kebabActions: "kebabActions" }, ngImport: i0, template: "<button \n type=\"button\"\n mat-icon-button\n class=\"menu-button\"\n [fsMenuTriggerFor]=\"kebabActionsMenu\">\n <mat-icon>more_vert</mat-icon>\n</button>\n<fs-menu #kebabActionsMenu>\n <ng-container *ngFor=\"let action of kebabActions\">\n <ng-container [ngSwitch]=\"action.mode\">\n <!-- Case when actions was collapsed from action with mode = 'menu'-->\n <ng-container *ngSwitchCase=\"'menu'\">\n <ng-container *ngFor=\"let childAction of action.items\">\n <ng-container *ngIf=\"childAction.isGroup else simpleMenuItem\">\n <fs-menu-group>\n <ng-template fs-group-menu-item-template>\n {{ action.label }} <mat-icon style=\"margin: 0;\">arrow_right</mat-icon> {{childAction.label}}\n </ng-template>\n <ng-container *ngFor=\"let subAction of childAction.items\">\n <ng-template \n fs-menu-item\n [link]=\"subAction.routerLink?.link\"\n [queryParams]=\"subAction.routerLink?.queryParams\"\n [hidden]=\"!(subAction.visible$ | async)\"\n (click)=\"subAction.click($event)\">\n <mat-icon *ngIf=\"subAction.icon\">{{subAction.icon}}</mat-icon>\n {{subAction.label}}\n </ng-template>\n </ng-container>\n </fs-menu-group>\n </ng-container>\n <ng-template #simpleMenuItem>\n <ng-template \n fs-menu-item\n [link]=\"childAction.routerLink?.link\"\n [queryParams]=\"childAction.routerLink?.queryParams\"\n [hidden]=\"!(childAction.visible$ | async)\"\n (click)=\"childAction.click($event);\">\n <mat-icon *ngIf=\"childAction.icon\">{{childAction.icon}}</mat-icon>\n {{ action.label }} <mat-icon style=\"margin: 0;\">arrow_right</mat-icon>{{ childAction.label }}\n </ng-template>\n </ng-template>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'file'\">\n <ng-template \n fs-menu-file-item\n [fsClass]=\"action.classArray\"\n [multiple]=\"action.multiple\"\n [accept]=\"action.accept || '*'\"\n [minWidth]=\"action.minWidth\"\n [minHeight]=\"action.minHeight\"\n [imageWidth]=\"action.maxWidth\"\n [imageHeight]=\"action.maxHeight\"\n (error)=\"action.fileError($event)\"\n (select)=\"action.fileSelected($event)\"\n (click)=\"action.click($event)\">\n <mat-icon *ngIf=\"action.icon\">{{action.icon}}</mat-icon> {{action.label}}\n </ng-template>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <ng-template \n fs-menu-item\n (click)=\"action.click($event)\"\n [fsClass]=\"action.classArray\">\n <mat-icon *ngIf=\"action.icon\">{{action.icon}}</mat-icon> {{action.label}}\n </ng-template>\n </ng-container>\n\n </ng-container>\n </ng-container>\n</fs-menu>\n", styles: [".menu-button{width:36px;height:36px;line-height:36px}\n"], components: [{ type: i1$4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i3$3.FsMenuComponent, selector: "fs-menu", inputs: ["class", "buttonClass"], outputs: ["opened", "closed"] }], directives: [{ type: i3$3.FsMenuTriggerDirective, selector: "[fsMenuTriggerFor]", inputs: ["fsMenuTriggerFor"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$3.FsMenuItemDirective, selector: "fs-menu-group,[fs-menu-item]" }, { type: i3$3.FsGroupMenuItemTemplateDirective, selector: "[fs-group-menu-item-template]" }, { type: i3$3.FsMenuFileItemDirective, selector: "[fs-menu-file-item]", inputs: ["multiple", "accept", "minWidth", "minHeight", "imageWidth", "imageHeight"], outputs: ["select", "error"] }, { type: i3.NgSwitchDefault, selector: "[ngSwitchDefault]" }], pipes: { "async": i3.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2509
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFilterActionKebabActionsComponent, decorators: [{
|
|
2510
|
+
type: Component,
|
|
2511
|
+
args: [{
|
|
2512
|
+
selector: 'fs-filter-action-kebab-actions',
|
|
2513
|
+
styleUrls: ['./action-kebab-actions.component.scss'],
|
|
2514
|
+
templateUrl: './action-kebab-actions.component.html',
|
|
2515
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2516
|
+
}]
|
|
2517
|
+
}], propDecorators: { kebabActions: [{
|
|
2518
|
+
type: Input
|
|
2519
|
+
}] } });
|
|
2520
|
+
|
|
2521
|
+
class FsFilterActionsComponent {
|
|
2522
|
+
constructor() {
|
|
2523
|
+
this.kebabActions = [];
|
|
2524
|
+
this.actions = [];
|
|
2504
2525
|
}
|
|
2505
|
-
|
|
2506
|
-
|
|
2526
|
+
}
|
|
2527
|
+
FsFilterActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFilterActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2528
|
+
FsFilterActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsFilterActionsComponent, selector: "fs-filter-actions", inputs: { kebabActions: "kebabActions", actions: "actions" }, ngImport: i0, template: "<!-- Buttons -->\n<ng-container *ngFor=\"let action of actions\">\n <ng-container [ngSwitch]=\"action.mode\">\n <ng-container *ngSwitchCase=\"'button'\">\n <fs-filter-action-button\n [action]=\"action\"\n fsPopover\n [enabled]=\"!!action.tooltip\"\n [text]=\"action.tooltip\">\n </fs-filter-action-button>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'menu'\">\n <fs-filter-action-button\n [action]=\"action\"\n [fsMenuTriggerFor]=\"someRef\"\n fsPopover\n [enabled]=\"!!action.tooltip\"\n [text]=\"action.tooltip\">\n </fs-filter-action-button>\n\n <fs-menu #someRef>\n <ng-container *ngFor=\"let childAction of action.items\">\n <ng-container *ngIf=\"childAction.isGroup else simpleMenuItem\">\n <fs-menu-group [label]=\"childAction.label\">\n <ng-container *ngFor=\"let subAction of childAction.items\">\n <ng-template\n fs-menu-item\n [link]=\"subAction.routerLink?.link\"\n [queryParams]=\"subAction.routerLink?.queryParams\"\n [hidden]=\"!(subAction.visible$ | async)\"\n (click)=\"subAction.click($event)\">\n <mat-icon *ngIf=\"subAction.icon\">{{subAction.icon}}</mat-icon>\n {{subAction.label}}\n </ng-template>\n </ng-container>\n </fs-menu-group>\n </ng-container>\n <ng-template #simpleMenuItem>\n <ng-template\n fs-menu-item\n [link]=\"childAction.routerLink?.link\"\n [queryParams]=\"childAction.routerLink?.queryParams\"\n [hidden]=\"!(childAction.visible$ | async)\"\n (click)=\"childAction.click($event);\">\n <mat-icon *ngIf=\"childAction.icon\">{{childAction.icon}}</mat-icon>\n {{childAction.label}}\n </ng-template>\n </ng-template>\n </ng-container>\n </fs-menu>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'file'\">\n <fs-file\n class=\"action-button\"\n [accept]=\"action.accept || '*'\"\n [multiple]=\"action.multiple\"\n [minWidth]=\"action.minWidth\"\n [minHeight]=\"action.minHeight\"\n [imageWidth]=\"action.maxWidth\"\n [imageHeight]=\"action.maxHeight\"\n (select)=\"action.fileSelected($event)\"\n (error)=\"action.fileError($event)\"\n (clicked)=\"action.click($event)\"\n fsPopover\n [enabled]=\"!!action.tooltip\"\n [text]=\"action.tooltip\">\n <fs-filter-action-button \n [action]=\"action\">\n </fs-filter-action-button>\n </fs-file>\n </ng-container>\n </ng-container>\n</ng-container>\n<!-- /Buttons -->\n<!-- menu -->\n<ng-container *ngIf=\"kebabActions?.length\">\n <fs-filter-action-kebab-actions\n [kebabActions]=\"kebabActions\">\n </fs-filter-action-kebab-actions>\n</ng-container>\n", styles: [":host{display:inline-flex}.action-button{display:block}.action-button+.action-button,fs-menu+.action-button{margin-left:5px}.menu-button{width:36px;height:36px;line-height:36px}\n"], components: [{ type: FsFilterActionButtonComponent, selector: "fs-filter-action-button", inputs: ["action"] }, { type: i3$3.FsMenuComponent, selector: "fs-menu", inputs: ["class", "buttonClass"], outputs: ["opened", "closed"] }, { type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i4$1.FsFileComponent, selector: "fs-file", inputs: ["minHeight", "minWidth", "multiple", "capture", "allowClick", "allowDrop", "accept", "disabled", "imageWidth", "imageHeight", "imageQuality"], outputs: ["select", "error", "clicked", "declined"] }, { type: FsFilterActionKebabActionsComponent, selector: "fs-filter-action-kebab-actions", inputs: ["kebabActions"] }], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i7$1.FsPopoverDirective, selector: "[fsPopover]", inputs: ["text", "template", "data", "leaveDelay", "showDelay", "maxWidth", "wrapperClass", "autoShow", "autoClose", "loadingDiameter", "loading", "indication", "position", "theme", "size", "trigger", "enabled"] }, { type: i3$3.FsMenuTriggerDirective, selector: "[fsMenuTriggerFor]", inputs: ["fsMenuTriggerFor"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$3.FsMenuItemDirective, selector: "fs-menu-group,[fs-menu-item]" }], pipes: { "async": i3.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2529
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFilterActionsComponent, decorators: [{
|
|
2530
|
+
type: Component,
|
|
2531
|
+
args: [{
|
|
2532
|
+
selector: 'fs-filter-actions',
|
|
2533
|
+
templateUrl: './actions.component.html',
|
|
2534
|
+
styleUrls: ['./actions.component.scss'],
|
|
2535
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2536
|
+
}]
|
|
2537
|
+
}], propDecorators: { kebabActions: [{
|
|
2538
|
+
type: Input
|
|
2539
|
+
}], actions: [{
|
|
2540
|
+
type: Input
|
|
2541
|
+
}] } });
|
|
2542
|
+
|
|
2543
|
+
class FsFilterChipContentComponent {
|
|
2544
|
+
constructor(_cdRef) {
|
|
2545
|
+
this._cdRef = _cdRef;
|
|
2546
|
+
this._destroy$ = new Subject();
|
|
2507
2547
|
}
|
|
2508
|
-
|
|
2509
|
-
|
|
2548
|
+
ngOnInit() {
|
|
2549
|
+
this.listenValueChangesForRanges();
|
|
2510
2550
|
}
|
|
2511
2551
|
ngOnDestroy() {
|
|
2512
2552
|
this._destroy$.next();
|
|
2513
2553
|
this._destroy$.complete();
|
|
2514
2554
|
}
|
|
2515
|
-
|
|
2516
|
-
this.
|
|
2517
|
-
|
|
2555
|
+
listenValueChangesForRanges() {
|
|
2556
|
+
this.item.value$
|
|
2557
|
+
.pipe(takeUntil(this._destroy$))
|
|
2558
|
+
.subscribe(() => {
|
|
2559
|
+
this.content = this._getContent();
|
|
2560
|
+
this._cdRef.detectChanges();
|
|
2561
|
+
});
|
|
2518
2562
|
}
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2563
|
+
_getContent() {
|
|
2564
|
+
const result = this.item.getChipsContent(this.type);
|
|
2565
|
+
if (this.item.chipLabel !== undefined) {
|
|
2566
|
+
if (this.item.chipLabel === '') {
|
|
2567
|
+
return `${result}`;
|
|
2568
|
+
}
|
|
2569
|
+
else {
|
|
2570
|
+
if (Array.isArray(this.item.chipLabel)) {
|
|
2571
|
+
const label = getLabelFromArray(this.item.chipLabel, this.type);
|
|
2572
|
+
return `${label}: ${result}`;
|
|
2573
|
+
}
|
|
2574
|
+
else {
|
|
2575
|
+
return `${this.item.chipLabel}: ${result}`;
|
|
2576
|
+
}
|
|
2577
|
+
}
|
|
2522
2578
|
}
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2579
|
+
else {
|
|
2580
|
+
if (Array.isArray(this.item.label)) {
|
|
2581
|
+
const label = getLabelFromArray(this.item.label, this.type);
|
|
2582
|
+
return `${label}: ${result}`;
|
|
2583
|
+
}
|
|
2584
|
+
else {
|
|
2585
|
+
if (this.item.isTypeCheckbox) {
|
|
2586
|
+
return result;
|
|
2587
|
+
}
|
|
2588
|
+
else {
|
|
2589
|
+
return `${this.item.label}: ${result}`;
|
|
2590
|
+
}
|
|
2591
|
+
}
|
|
2528
2592
|
}
|
|
2529
|
-
this._classifyActions();
|
|
2530
|
-
}
|
|
2531
|
-
show() {
|
|
2532
|
-
this._visible$.next(true);
|
|
2533
|
-
}
|
|
2534
|
-
hide() {
|
|
2535
|
-
this._visible$.next(false);
|
|
2536
2593
|
}
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2594
|
+
}
|
|
2595
|
+
FsFilterChipContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFilterChipContentComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2596
|
+
FsFilterChipContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsFilterChipContentComponent, selector: "fs-filter-chip-content", inputs: { item: "item", type: "type" }, ngImport: i0, template: "{{ content }}\n", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2597
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFilterChipContentComponent, decorators: [{
|
|
2598
|
+
type: Component,
|
|
2599
|
+
args: [{
|
|
2600
|
+
selector: 'fs-filter-chip-content',
|
|
2601
|
+
templateUrl: './filter-chip-content.component.html',
|
|
2602
|
+
styleUrls: ['./filter-chip-content.component.scss'],
|
|
2603
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2604
|
+
}]
|
|
2605
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { item: [{
|
|
2606
|
+
type: Input
|
|
2607
|
+
}], type: [{
|
|
2608
|
+
type: Input
|
|
2609
|
+
}] } });
|
|
2610
|
+
function getLabelFromArray(labelArr, type) {
|
|
2611
|
+
if (type === 'from' && labelArr[0]) {
|
|
2612
|
+
return `${labelArr[0]}`;
|
|
2547
2613
|
}
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
this._classifyActions();
|
|
2614
|
+
else if (type === 'to' && labelArr[1]) {
|
|
2615
|
+
return `${labelArr[1]}`;
|
|
2551
2616
|
}
|
|
2552
|
-
|
|
2553
|
-
|
|
2617
|
+
else {
|
|
2618
|
+
return '';
|
|
2554
2619
|
}
|
|
2555
|
-
|
|
2556
|
-
|
|
2620
|
+
}
|
|
2621
|
+
|
|
2622
|
+
class FocusControllerService {
|
|
2623
|
+
constructor() {
|
|
2624
|
+
this._focusOn = new BehaviorSubject(null);
|
|
2557
2625
|
}
|
|
2558
|
-
|
|
2559
|
-
this.
|
|
2626
|
+
get focusOn$() {
|
|
2627
|
+
return this._focusOn.asObservable();
|
|
2560
2628
|
}
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
const actions = [];
|
|
2564
|
-
const mobileMode = this.mobileMode;
|
|
2565
|
-
this._allActions
|
|
2566
|
-
.filter((action) => {
|
|
2567
|
-
return action.visible;
|
|
2568
|
-
})
|
|
2569
|
-
.forEach((action) => {
|
|
2570
|
-
if (action.menu !== false && (action.menu || mobileMode)) {
|
|
2571
|
-
kebabActions.push(action);
|
|
2572
|
-
}
|
|
2573
|
-
else {
|
|
2574
|
-
actions.push(action);
|
|
2575
|
-
}
|
|
2576
|
-
});
|
|
2577
|
-
this._setKebabActions(kebabActions);
|
|
2578
|
-
this._setActions(actions);
|
|
2629
|
+
click(item, type = null) {
|
|
2630
|
+
this._focusOn.next({ item, type });
|
|
2579
2631
|
}
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
this._setActions([...this.actions, action]);
|
|
2586
|
-
}
|
|
2632
|
+
listenFocusFor$(targetItem, targetType = null) {
|
|
2633
|
+
return this._focusOn
|
|
2634
|
+
.pipe(filter$1((event) => !!event), filter$1(({ item, type }) => {
|
|
2635
|
+
return targetItem === item && targetType === type;
|
|
2636
|
+
}), tap(() => this.clearFocus()));
|
|
2587
2637
|
}
|
|
2588
|
-
|
|
2589
|
-
this.
|
|
2590
|
-
.pipe(skip(1), takeUntil(this._destroy$))
|
|
2591
|
-
.subscribe(() => {
|
|
2592
|
-
this._classifyActions();
|
|
2593
|
-
});
|
|
2638
|
+
clearFocus() {
|
|
2639
|
+
this._focusOn.next(null);
|
|
2594
2640
|
}
|
|
2595
2641
|
}
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type:
|
|
2642
|
+
FocusControllerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FocusControllerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2643
|
+
FocusControllerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FocusControllerService });
|
|
2644
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FocusControllerService, decorators: [{
|
|
2599
2645
|
type: Injectable
|
|
2600
|
-
}], ctorParameters: function () { return [
|
|
2601
|
-
|
|
2602
|
-
const FILTER_DRAWER_DATA = new InjectionToken('fs.filter-drawer-data');
|
|
2603
|
-
|
|
2604
|
-
const FILTER_DRAWER_OVERLAY = new InjectionToken('fs.filter-drawer-overlay');
|
|
2646
|
+
}], ctorParameters: function () { return []; } });
|
|
2605
2647
|
|
|
2606
|
-
class
|
|
2607
|
-
constructor(
|
|
2608
|
-
this.
|
|
2609
|
-
this.
|
|
2610
|
-
this.
|
|
2648
|
+
class FsFilterChipComponent {
|
|
2649
|
+
constructor(_cdRef, _focusController) {
|
|
2650
|
+
this._cdRef = _cdRef;
|
|
2651
|
+
this._focusController = _focusController;
|
|
2652
|
+
this._chipRenderTimer$ = timer(500)
|
|
2653
|
+
.pipe(mapTo(true));
|
|
2654
|
+
this._destroy$ = new Subject();
|
|
2655
|
+
}
|
|
2656
|
+
ngOnInit() {
|
|
2657
|
+
this.rangeItem = this.item.isTypeDateRange
|
|
2658
|
+
|| this.item.isTypeRange
|
|
2659
|
+
|| this.item.isTypeDateTimeRange;
|
|
2660
|
+
this.listenValueChangesForRanges();
|
|
2661
|
+
this._updateVisibility();
|
|
2662
|
+
if (this.item.hasPendingValues) {
|
|
2663
|
+
this.item.loadAsyncValues(false);
|
|
2664
|
+
this.item.values$
|
|
2665
|
+
.pipe(take(2), takeUntil(this._destroy$))
|
|
2666
|
+
.subscribe(() => {
|
|
2667
|
+
this._updateVisibility();
|
|
2668
|
+
this._cdRef.markForCheck();
|
|
2669
|
+
});
|
|
2670
|
+
this._initDelayRender();
|
|
2671
|
+
}
|
|
2672
|
+
}
|
|
2673
|
+
ngOnDestroy() {
|
|
2674
|
+
this._destroy$.next();
|
|
2675
|
+
this._destroy$.complete();
|
|
2676
|
+
}
|
|
2677
|
+
focusOnItem(type = null) {
|
|
2678
|
+
this._focusController.click(this.item, type);
|
|
2679
|
+
}
|
|
2680
|
+
removeItem(event, type = null) {
|
|
2681
|
+
if (this.item instanceof RangeItem) {
|
|
2682
|
+
this.item.clearRange(type);
|
|
2683
|
+
}
|
|
2684
|
+
else if (this.item instanceof DateRangeItem || this.item instanceof DateTimeRangeItem) {
|
|
2685
|
+
this.item.clearDateRange(type);
|
|
2686
|
+
}
|
|
2687
|
+
else {
|
|
2688
|
+
this.item.clear();
|
|
2689
|
+
}
|
|
2690
|
+
}
|
|
2691
|
+
listenValueChangesForRanges() {
|
|
2692
|
+
this.item.value$
|
|
2693
|
+
.pipe(distinctUntilChanged(), takeUntil(this._destroy$))
|
|
2694
|
+
.subscribe(() => {
|
|
2695
|
+
this._updateVisibility();
|
|
2696
|
+
this._cdRef.markForCheck();
|
|
2697
|
+
});
|
|
2698
|
+
}
|
|
2699
|
+
_updateVisibility() {
|
|
2700
|
+
this.itemVisible = this.item.isChipVisible;
|
|
2701
|
+
}
|
|
2702
|
+
_initDelayRender() {
|
|
2703
|
+
this.chipDelayedRender$ = combineLatest([
|
|
2704
|
+
this.item.values$,
|
|
2705
|
+
this._chipRenderTimer$.pipe(startWith(false))
|
|
2706
|
+
])
|
|
2707
|
+
.pipe(map(([values, timerValue]) => {
|
|
2708
|
+
return !!values || timerValue;
|
|
2709
|
+
}));
|
|
2710
|
+
}
|
|
2711
|
+
}
|
|
2712
|
+
FsFilterChipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFilterChipComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: FocusControllerService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2713
|
+
FsFilterChipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsFilterChipComponent, selector: "fs-filter-chip", inputs: { item: "item" }, ngImport: i0, template: "<ng-container *ngIf=\"!item.hasPendingValues || (chipDelayedRender$ | async)\">\n <ng-container *ngIf=\"rangeItem; else defaultChip\">\n <fs-chip\n *ngIf=\"item.model?.min || item.model?.from\"\n [value]=\"item\"\n [selectable]=\"false\"\n [removable]=\"item.showClear\"\n size=\"small\"\n (click)=\"focusOnItem('from')\"\n (removed)=\"removeItem($event, 'from')\">\n <ng-template\n [ngTemplateOutlet]=\"chipContent\"\n [ngTemplateOutletContext]=\"{ item: item, type: 'from' }\"\n ></ng-template>\n </fs-chip>\n\n <fs-chip\n *ngIf=\"item.model?.max || item.model?.to\"\n [value]=\"item\"\n [selectable]=\"false\"\n [removable]=\"item.showClear\"\n size=\"small\"\n (click)=\"focusOnItem('to')\"\n (removed)=\"removeItem($event, 'to')\">\n <ng-template\n [ngTemplateOutlet]=\"chipContent\"\n [ngTemplateOutletContext]=\"{ item: item, type: 'to' }\"\n ></ng-template>\n </fs-chip>\n\n </ng-container>\n\n <ng-template #defaultChip>\n <fs-chip\n *ngIf=\"itemVisible\"\n [value]=\"item\"\n [selectable]=\"false\"\n [removable]=\"item.showClear\"\n size=\"small\"\n (click)=\"focusOnItem()\"\n (removed)=\"removeItem($event)\">\n <ng-template\n [ngTemplateOutlet]=\"chipContent\"\n [ngTemplateOutletContext]=\"{ item: item }\"\n ></ng-template>\n </fs-chip>\n </ng-template>\n\n <ng-template #chipContent let-item=\"item\" let-type=\"type\">\n <ng-container *ngIf=\"!item.hasPendingValues && !item.loading; else lodaingValues\">\n <fs-filter-chip-content [item]=\"item\" [type]=\"type\"></fs-filter-chip-content>\n </ng-container>\n\n <ng-template #lodaingValues>\n Loading...\n </ng-template>\n </ng-template>\n</ng-container>\n\n", styles: ["fs-chip{cursor:pointer;color:#6f6f6f}\n"], components: [{ type: i2$2.FsChipComponent, selector: "fs-chip", inputs: ["size", "value", "backgroundColor", "borderColor", "color", "outlined", "removable", "selectable", "selected", "image"], outputs: ["selectedToggled", "removed"] }, { type: FsFilterChipContentComponent, selector: "fs-filter-chip-content", inputs: ["item", "type"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i3.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2714
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFilterChipComponent, decorators: [{
|
|
2715
|
+
type: Component,
|
|
2716
|
+
args: [{
|
|
2717
|
+
selector: 'fs-filter-chip',
|
|
2718
|
+
templateUrl: './filter-chip.component.html',
|
|
2719
|
+
styleUrls: ['./filter-chip.component.scss'],
|
|
2720
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2721
|
+
}]
|
|
2722
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: FocusControllerService }]; }, propDecorators: { item: [{
|
|
2723
|
+
type: Input
|
|
2724
|
+
}] } });
|
|
2725
|
+
|
|
2726
|
+
class FsFilterChipsComponent {
|
|
2727
|
+
constructor() {
|
|
2728
|
+
this.ItemType = ItemType;
|
|
2729
|
+
this.chips = [];
|
|
2730
|
+
}
|
|
2731
|
+
}
|
|
2732
|
+
FsFilterChipsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFilterChipsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2733
|
+
FsFilterChipsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsFilterChipsComponent, selector: "fs-filter-chips", inputs: { filters: "filters" }, ngImport: i0, template: "<fs-chips [(ngModel)]=\"chips\">\n <ng-container *ngFor=\"let item of filters\">\n <ng-container *ngIf=\"(item.value$ | async) !== undefined && item.type !== ItemType.Keyword\">\n <fs-filter-chip [item]=\"item\"></fs-filter-chip>\n </ng-container>\n </ng-container>\n</fs-chips>\n", styles: [""], components: [{ type: i2$2.FsChipsComponent, selector: "fs-chips", inputs: ["compare", "multiple"] }, { type: FsFilterChipComponent, selector: "fs-filter-chip", inputs: ["item"] }], directives: [{ type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i3.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2734
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFilterChipsComponent, decorators: [{
|
|
2735
|
+
type: Component,
|
|
2736
|
+
args: [{
|
|
2737
|
+
selector: 'fs-filter-chips',
|
|
2738
|
+
templateUrl: './filter-chips.component.html',
|
|
2739
|
+
styleUrls: ['./filter-chips.component.scss'],
|
|
2740
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2741
|
+
}]
|
|
2742
|
+
}], propDecorators: { filters: [{
|
|
2743
|
+
type: Input
|
|
2744
|
+
}] } });
|
|
2745
|
+
|
|
2746
|
+
class FsFilterDrawerActionsComponent {
|
|
2747
|
+
constructor(externalParams) {
|
|
2748
|
+
this.externalParams = externalParams;
|
|
2749
|
+
this._clear = new EventEmitter();
|
|
2750
|
+
this._done = new EventEmitter();
|
|
2751
|
+
}
|
|
2752
|
+
get savedFilters() {
|
|
2753
|
+
return this.externalParams.savedFiltersController;
|
|
2754
|
+
}
|
|
2755
|
+
done() {
|
|
2756
|
+
this._done.emit();
|
|
2757
|
+
}
|
|
2758
|
+
clear() {
|
|
2759
|
+
this._clear.emit();
|
|
2760
|
+
}
|
|
2761
|
+
saveFilters() {
|
|
2762
|
+
this.externalParams
|
|
2763
|
+
.savedFiltersController
|
|
2764
|
+
.openSavedFilterEditDialog();
|
|
2765
|
+
}
|
|
2766
|
+
}
|
|
2767
|
+
FsFilterDrawerActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFilterDrawerActionsComponent, deps: [{ token: ExternalParamsController }], target: i0.ɵɵFactoryTarget.Component });
|
|
2768
|
+
FsFilterDrawerActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsFilterDrawerActionsComponent, selector: "fs-filter-drawer-actions", outputs: { _clear: "clear", _done: "done" }, ngImport: i0, template: "<button type=\"button\" mat-button color=\"primary\" (click)=\"done()\">Done</button>\n<button type=\"button\" mat-button (click)=\"clear()\">Clear</button>\n<ng-container *ngIf=\"savedFilters.enabled$ | async\">\n <button type=\"button\" mat-button (click)=\"saveFilters()\">Save</button>\n</ng-container>\n\n", components: [{ type: i1$4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i3.AsyncPipe } });
|
|
2769
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFilterDrawerActionsComponent, decorators: [{
|
|
2770
|
+
type: Component,
|
|
2771
|
+
args: [{
|
|
2772
|
+
selector: 'fs-filter-drawer-actions',
|
|
2773
|
+
templateUrl: './filter-drawer-actions.component.html',
|
|
2774
|
+
}]
|
|
2775
|
+
}], ctorParameters: function () { return [{ type: ExternalParamsController }]; }, propDecorators: { _clear: [{
|
|
2776
|
+
type: Output,
|
|
2777
|
+
args: ['clear']
|
|
2778
|
+
}], _done: [{
|
|
2779
|
+
type: Output,
|
|
2780
|
+
args: ['done']
|
|
2781
|
+
}] } });
|
|
2782
|
+
|
|
2783
|
+
const FILTER_DRAWER_DATA = new InjectionToken('fs.filter-drawer-data');
|
|
2784
|
+
|
|
2785
|
+
const FILTER_DRAWER_OVERLAY = new InjectionToken('fs.filter-drawer-overlay');
|
|
2786
|
+
|
|
2787
|
+
class BaseItemComponent {
|
|
2788
|
+
constructor(_kvDiffers, _cd) {
|
|
2789
|
+
this._kvDiffers = _kvDiffers;
|
|
2790
|
+
this._cd = _cd;
|
|
2791
|
+
this.inline = false;
|
|
2611
2792
|
this._destroy$ = new Subject();
|
|
2612
2793
|
this._debouncer$ = new Subject();
|
|
2613
2794
|
this._kvDiffer = this._kvDiffers.find(this.item || {}).create();
|
|
@@ -2668,32 +2849,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2668
2849
|
type: Input
|
|
2669
2850
|
}] } });
|
|
2670
2851
|
|
|
2671
|
-
class FocusControllerService {
|
|
2672
|
-
constructor() {
|
|
2673
|
-
this._focusOn = new BehaviorSubject(null);
|
|
2674
|
-
}
|
|
2675
|
-
get focusOn$() {
|
|
2676
|
-
return this._focusOn.asObservable();
|
|
2677
|
-
}
|
|
2678
|
-
click(item, type = null) {
|
|
2679
|
-
this._focusOn.next({ item, type });
|
|
2680
|
-
}
|
|
2681
|
-
listenFocusFor$(targetItem, targetType = null) {
|
|
2682
|
-
return this._focusOn
|
|
2683
|
-
.pipe(filter$1((event) => !!event), filter$1(({ item, type }) => {
|
|
2684
|
-
return targetItem === item && targetType === type;
|
|
2685
|
-
}), tap(() => this.clearFocus()));
|
|
2686
|
-
}
|
|
2687
|
-
clearFocus() {
|
|
2688
|
-
this._focusOn.next(null);
|
|
2689
|
-
}
|
|
2690
|
-
}
|
|
2691
|
-
FocusControllerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FocusControllerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2692
|
-
FocusControllerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FocusControllerService });
|
|
2693
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FocusControllerService, decorators: [{
|
|
2694
|
-
type: Injectable
|
|
2695
|
-
}], ctorParameters: function () { return []; } });
|
|
2696
|
-
|
|
2697
2852
|
class FocusToItemDirective {
|
|
2698
2853
|
constructor(_el, _focusController, _targetSelect, _targetDate, _targetDateScroll, _targetDateRangeFrom, _targetDateRangeTo, _targetAutocomplete, _targetAutocompleteChips) {
|
|
2699
2854
|
this._el = _el;
|
|
@@ -2765,7 +2920,7 @@ class FocusToItemDirective {
|
|
|
2765
2920
|
}
|
|
2766
2921
|
}
|
|
2767
2922
|
}
|
|
2768
|
-
FocusToItemDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FocusToItemDirective, deps: [{ token: i0.ElementRef }, { token: FocusControllerService }, { token: i2.MatSelect, optional: true, self: true }, { token: i3$
|
|
2923
|
+
FocusToItemDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FocusToItemDirective, deps: [{ token: i0.ElementRef }, { token: FocusControllerService }, { token: i2.MatSelect, optional: true, self: true }, { token: i3$4.FsDatePickerComponent, optional: true, self: true }, { token: i3$4.FsDateScrollPickerComponent, optional: true, self: true }, { token: i3$4.DateRangePickerFromComponent, optional: true, self: true }, { token: i3$4.DateRangePickerToComponent, optional: true, self: true }, { token: i4$2.FsAutocompleteComponent, optional: true, self: true }, { token: i5.FsAutocompleteChipsComponent, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2769
2924
|
FocusToItemDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FocusToItemDirective, selector: "[fsFilterFocusTrigger]", inputs: { _item: ["fsFilterFocusTrigger", "_item"], _focusTargetType: ["focusTargetType", "_focusTargetType"] }, ngImport: i0 });
|
|
2770
2925
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FocusToItemDirective, decorators: [{
|
|
2771
2926
|
type: Directive,
|
|
@@ -2776,23 +2931,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2776
2931
|
type: Optional
|
|
2777
2932
|
}, {
|
|
2778
2933
|
type: Self
|
|
2779
|
-
}] }, { type: i3$
|
|
2934
|
+
}] }, { type: i3$4.FsDatePickerComponent, decorators: [{
|
|
2780
2935
|
type: Optional
|
|
2781
2936
|
}, {
|
|
2782
2937
|
type: Self
|
|
2783
|
-
}] }, { type: i3$
|
|
2938
|
+
}] }, { type: i3$4.FsDateScrollPickerComponent, decorators: [{
|
|
2784
2939
|
type: Optional
|
|
2785
2940
|
}, {
|
|
2786
2941
|
type: Self
|
|
2787
|
-
}] }, { type: i3$
|
|
2942
|
+
}] }, { type: i3$4.DateRangePickerFromComponent, decorators: [{
|
|
2788
2943
|
type: Optional
|
|
2789
2944
|
}, {
|
|
2790
2945
|
type: Self
|
|
2791
|
-
}] }, { type: i3$
|
|
2946
|
+
}] }, { type: i3$4.DateRangePickerToComponent, decorators: [{
|
|
2792
2947
|
type: Optional
|
|
2793
2948
|
}, {
|
|
2794
2949
|
type: Self
|
|
2795
|
-
}] }, { type: i4$
|
|
2950
|
+
}] }, { type: i4$2.FsAutocompleteComponent, decorators: [{
|
|
2796
2951
|
type: Optional
|
|
2797
2952
|
}, {
|
|
2798
2953
|
type: Self
|
|
@@ -2905,7 +3060,7 @@ class SelectMultipleComponent {
|
|
|
2905
3060
|
}
|
|
2906
3061
|
}
|
|
2907
3062
|
SelectMultipleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SelectMultipleComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2908
|
-
SelectMultipleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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"], components: [{ type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i2.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i3$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i4$
|
|
3063
|
+
SelectMultipleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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"], components: [{ type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i2.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i3$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i4$3.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], directives: [{ type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1$3.MatLabel, selector: "mat-label" }, { type: FocusToItemDirective, selector: "[fsFilterFocusTrigger]", inputs: ["fsFilterFocusTrigger", "focusTargetType"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "fsFilterIsolateValues": FsFilterIsolateValues }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2909
3064
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SelectMultipleComponent, decorators: [{
|
|
2910
3065
|
type: Component,
|
|
2911
3066
|
args: [{
|
|
@@ -2940,7 +3095,7 @@ class SelectSimpleComponent {
|
|
|
2940
3095
|
}
|
|
2941
3096
|
}
|
|
2942
3097
|
SelectSimpleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SelectSimpleComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2943
|
-
SelectSimpleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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"], components: [{ type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i2.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i3$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i4$
|
|
3098
|
+
SelectSimpleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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"], components: [{ type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i2.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i3$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i4$3.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], directives: [{ type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1$3.MatLabel, selector: "mat-label" }, { type: FocusToItemDirective, selector: "[fsFilterFocusTrigger]", inputs: ["fsFilterFocusTrigger", "focusTargetType"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "fsFilterIsolateValues": FsFilterIsolateValues }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2944
3099
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SelectSimpleComponent, decorators: [{
|
|
2945
3100
|
type: Component,
|
|
2946
3101
|
args: [{
|
|
@@ -3040,7 +3195,7 @@ class ChipsComponent extends BaseItemComponent {
|
|
|
3040
3195
|
}
|
|
3041
3196
|
}
|
|
3042
3197
|
ChipsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipsComponent, deps: [{ token: i0.KeyValueDiffers }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3043
|
-
ChipsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ChipsComponent, selector: "filter-item-chips", usesInheritance: true, ngImport: i0, template: "<ng-template [ngIf]=\"item.values?.length\">\n <fs-label-field>\n <fs-label>{{item.label}}</fs-label>\n <fs-chips [(ngModel)]=\"item.model\"\n [compare]=\"compareFn\"\n [multiple]=\"item.multiple\">\n <fs-chip *ngFor=\"let value of item.values\"\n [value]=\"value\"\n [selectable]=\"true\">\n {{ value.name }}\n </fs-chip>\n </fs-chips>\n </fs-label-field>\n</ng-template>\n\n<ng-template [ngIf]=\"item.loading\">{{ item.label }} loading...</ng-template>\n", styles: ["fs-chip{line-height:40px}\n"], components: [{ type: i1$
|
|
3198
|
+
ChipsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ChipsComponent, selector: "filter-item-chips", usesInheritance: true, ngImport: i0, template: "<ng-template [ngIf]=\"item.values?.length\">\n <fs-label-field>\n <fs-label>{{item.label}}</fs-label>\n <fs-chips [(ngModel)]=\"item.model\"\n [compare]=\"compareFn\"\n [multiple]=\"item.multiple\">\n <fs-chip *ngFor=\"let value of item.values\"\n [value]=\"value\"\n [selectable]=\"true\">\n {{ value.name }}\n </fs-chip>\n </fs-chips>\n </fs-label-field>\n</ng-template>\n\n<ng-template [ngIf]=\"item.loading\">{{ item.label }} loading...</ng-template>\n", styles: ["fs-chip{line-height:40px}\n"], components: [{ type: i1$5.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i1$5.FsLabelComponent, selector: "fs-label" }, { type: i2$2.FsChipsComponent, selector: "fs-chips", inputs: ["compare", "multiple"] }, { type: i2$2.FsChipComponent, selector: "fs-chip", inputs: ["size", "value", "backgroundColor", "borderColor", "color", "outlined", "removable", "selectable", "selected", "image"], outputs: ["selectedToggled", "removed"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3044
3199
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipsComponent, decorators: [{
|
|
3045
3200
|
type: Component,
|
|
3046
3201
|
args: [{
|
|
@@ -3103,7 +3258,7 @@ class AutocompleteComponent extends BaseItemComponent {
|
|
|
3103
3258
|
}
|
|
3104
3259
|
}
|
|
3105
3260
|
AutocompleteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: AutocompleteComponent, deps: [{ token: i0.KeyValueDiffers }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3106
|
-
AutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: AutocompleteComponent, selector: "filter-item-autocomplete", usesInheritance: true, ngImport: i0, template: "<fs-autocomplete\n [fsFilterFocusTrigger]=\"item\"\n [fetch]=\"fetch\"\n [displayWith]=\"displayWith\"\n [(ngModel)]=\"item.model\"\n [placeholder]=\"label\"\n [fetchOnFocus]=\"item.fetchOnFocus\"\n [showClear]=\"item.showClear\"\n name=\"item.name\">\n <ng-template fsAutocompleteTemplate let-data=\"data\">\n {{data.name}}\n </ng-template>\n</fs-autocomplete>\n", components: [{ type: i4$
|
|
3261
|
+
AutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: AutocompleteComponent, selector: "filter-item-autocomplete", usesInheritance: true, ngImport: i0, template: "<fs-autocomplete\n [fsFilterFocusTrigger]=\"item\"\n [fetch]=\"fetch\"\n [displayWith]=\"displayWith\"\n [(ngModel)]=\"item.model\"\n [placeholder]=\"label\"\n [fetchOnFocus]=\"item.fetchOnFocus\"\n [showClear]=\"item.showClear\"\n name=\"item.name\">\n <ng-template fsAutocompleteTemplate let-data=\"data\">\n {{data.name}}\n </ng-template>\n</fs-autocomplete>\n", components: [{ type: i4$2.FsAutocompleteComponent, selector: "fs-autocomplete", inputs: ["fetch", "placeholder", "displayWith", "fetchOnFocus", "readonly", "required", "disabled", "hint", "panelWidth", "panelClass", "showClear"], outputs: ["cleared"] }], directives: [{ type: FocusToItemDirective, selector: "[fsFilterFocusTrigger]", inputs: ["fsFilterFocusTrigger", "focusTargetType"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i4$2.FsAutocompleteTemplateDirective, selector: "[fsAutocompleteTemplate]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3107
3262
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: AutocompleteComponent, decorators: [{
|
|
3108
3263
|
type: Component,
|
|
3109
3264
|
args: [{
|
|
@@ -3182,7 +3337,7 @@ class DateComponent extends BaseItemComponent {
|
|
|
3182
3337
|
}
|
|
3183
3338
|
}
|
|
3184
3339
|
DateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateComponent, deps: [{ token: i0.KeyValueDiffers }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3185
|
-
DateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: DateComponent, selector: "filter-item-date", usesInheritance: true, ngImport: i0, template: "<mat-form-field *ngIf=\"item.mode===itemDateMode.Calendar; else elseMode\">\n <mat-label>{{item.label}}</mat-label>\n <input matInput\n fsDatePicker\n [fsFilterFocusTrigger]=\"item\"\n [(ngModel)]=\"item.model\"\n [maxYear]=\"item.maxYear\"\n [view]=\"viewType\"\n [clear]=\"item.showClear\"\n [name]=\"item.name\">\n <mat-placeholder *ngIf=\"inline\">{{ item.label }}</mat-placeholder>\n</mat-form-field>\n\n<ng-template #elseMode>\n <mat-form-field>\n <mat-label>{{item.label}}</mat-label>\n <input matInput\n fsDateScrollPicker\n [fsFilterFocusTrigger]=\"item\"\n [(ngModel)]=\"item.model\"\n [maxYear]=\"item.maxYear\"\n [showMonth]=\"showMonth\"\n [showDay]=\"showDay\"\n [showYear]=\"showYear\"\n [clear]=\"item.showClear\"\n [name]=\"item.name\">\n <mat-placeholder *ngIf=\"inline\">{{ item.label }}</mat-placeholder>\n </mat-form-field>\n</ng-template>\n", components: [{ type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i3$
|
|
3340
|
+
DateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: DateComponent, selector: "filter-item-date", usesInheritance: true, ngImport: i0, template: "<mat-form-field *ngIf=\"item.mode===itemDateMode.Calendar; else elseMode\">\n <mat-label>{{item.label}}</mat-label>\n <input matInput\n fsDatePicker\n [fsFilterFocusTrigger]=\"item\"\n [(ngModel)]=\"item.model\"\n [maxYear]=\"item.maxYear\"\n [view]=\"viewType\"\n [clear]=\"item.showClear\"\n [name]=\"item.name\">\n <mat-placeholder *ngIf=\"inline\">{{ item.label }}</mat-placeholder>\n</mat-form-field>\n\n<ng-template #elseMode>\n <mat-form-field>\n <mat-label>{{item.label}}</mat-label>\n <input matInput\n fsDateScrollPicker\n [fsFilterFocusTrigger]=\"item\"\n [(ngModel)]=\"item.model\"\n [maxYear]=\"item.maxYear\"\n [showMonth]=\"showMonth\"\n [showDay]=\"showDay\"\n [showYear]=\"showYear\"\n [clear]=\"item.showClear\"\n [name]=\"item.name\">\n <mat-placeholder *ngIf=\"inline\">{{ item.label }}</mat-placeholder>\n </mat-form-field>\n</ng-template>\n", components: [{ type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i3$4.FsDatePickerComponent, selector: "[fsDatePicker]", inputs: ["minYear", "maxYear", "minDate", "maxDate", "startOfDay", "view", "format", "minutes"], outputs: ["change"] }, { type: i3$4.FsDateScrollPickerComponent, selector: "[fsDateScrollPicker]", inputs: ["minYear", "maxYear", "maxDate", "showMonth", "showYear", "showDay"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$3.MatLabel, selector: "mat-label" }, { type: i3$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: FocusToItemDirective, selector: "[fsFilterFocusTrigger]", inputs: ["fsFilterFocusTrigger", "focusTargetType"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i1$3.MatPlaceholder, selector: "mat-placeholder" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3186
3341
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateComponent, decorators: [{
|
|
3187
3342
|
type: Component,
|
|
3188
3343
|
args: [{
|
|
@@ -3209,7 +3364,7 @@ class DateRangeComponent extends BaseItemComponent {
|
|
|
3209
3364
|
}
|
|
3210
3365
|
}
|
|
3211
3366
|
DateRangeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangeComponent, deps: [{ token: i0.KeyValueDiffers }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3212
|
-
DateRangeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: DateRangeComponent, selector: "filter-item-date-range", usesInheritance: true, ngImport: i0, template: "<mat-form-field>\n <mat-label>{{item.label[0]}}</mat-label>\n <input\n matInput\n [fsFilterFocusTrigger]=\"item\"\n [focusTargetType]=\"'from'\"\n [fsDateRangeFrom]=\"item.name\"\n [(ngModel)]=\"item.model.from\"\n (ngModelChange)=\"itemChange()\"\n [clear]=\"item.showClear\"\n [view]=\"viewType\"\n name=\"date_from\">\n</mat-form-field>\n\n<mat-form-field>\n <mat-label>{{item.label[1]}}</mat-label>\n <input\n matInput\n [fsFilterFocusTrigger]=\"item\"\n [focusTargetType]=\"'to'\"\n [fsDateRangeTo]=\"item.name\"\n [(ngModel)]=\"item.model.to\"\n (ngModelChange)=\"itemChange()\"\n [clear]=\"item.showClear\"\n [view]=\"viewType\"\n name=\"date_to\">\n</mat-form-field>\n", components: [{ type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i3$
|
|
3367
|
+
DateRangeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: DateRangeComponent, selector: "filter-item-date-range", usesInheritance: true, ngImport: i0, template: "<mat-form-field>\n <mat-label>{{item.label[0]}}</mat-label>\n <input\n matInput\n [fsFilterFocusTrigger]=\"item\"\n [focusTargetType]=\"'from'\"\n [fsDateRangeFrom]=\"item.name\"\n [(ngModel)]=\"item.model.from\"\n (ngModelChange)=\"itemChange()\"\n [clear]=\"item.showClear\"\n [view]=\"viewType\"\n name=\"date_from\">\n</mat-form-field>\n\n<mat-form-field>\n <mat-label>{{item.label[1]}}</mat-label>\n <input\n matInput\n [fsFilterFocusTrigger]=\"item\"\n [focusTargetType]=\"'to'\"\n [fsDateRangeTo]=\"item.name\"\n [(ngModel)]=\"item.model.to\"\n (ngModelChange)=\"itemChange()\"\n [clear]=\"item.showClear\"\n [view]=\"viewType\"\n name=\"date_to\">\n</mat-form-field>\n", components: [{ type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i3$4.DateRangePickerFromComponent, selector: "[fsDateRangeFrom],[fsDateRangeFromPicker]", inputs: ["fsDateRangeFrom", "fsDateRangeFromPicker"] }, { type: i3$4.DateRangePickerToComponent, selector: "[fsDateRangeTo],[fsDateRangeToPicker]", inputs: ["fsDateRangeTo", "fsDateRangeToPicker"] }], directives: [{ type: i1$3.MatLabel, selector: "mat-label" }, { type: i3$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: FocusToItemDirective, selector: "[fsFilterFocusTrigger]", inputs: ["fsFilterFocusTrigger", "focusTargetType"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3213
3368
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangeComponent, decorators: [{
|
|
3214
3369
|
type: Component,
|
|
3215
3370
|
args: [{
|
|
@@ -3228,7 +3383,7 @@ class WeekComponent extends BaseItemComponent {
|
|
|
3228
3383
|
ngOnInit() { }
|
|
3229
3384
|
}
|
|
3230
3385
|
WeekComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: WeekComponent, deps: [{ token: i0.KeyValueDiffers }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3231
|
-
WeekComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: WeekComponent, selector: "filter-item-week", usesInheritance: true, ngImport: i0, template: "<mat-form-field>\n <mat-label>{{item.label}}</mat-label>\n <input matInput\n fsDateWeekPicker\n [fsFilterFocusTrigger]=\"item\"\n [(ngModel)]=\"item.model\"\n [seedDate]=\"item.seedDate\"\n [clear]=\"item.showClear\"\n [name]=\"item.name\">\n <mat-placeholder *ngIf=\"inline\">{{ item.label }}</mat-placeholder>\n</mat-form-field>\n", components: [{ type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i3$
|
|
3386
|
+
WeekComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: WeekComponent, selector: "filter-item-week", usesInheritance: true, ngImport: i0, template: "<mat-form-field>\n <mat-label>{{item.label}}</mat-label>\n <input matInput\n fsDateWeekPicker\n [fsFilterFocusTrigger]=\"item\"\n [(ngModel)]=\"item.model\"\n [seedDate]=\"item.seedDate\"\n [clear]=\"item.showClear\"\n [name]=\"item.name\">\n <mat-placeholder *ngIf=\"inline\">{{ item.label }}</mat-placeholder>\n</mat-form-field>\n", components: [{ type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i3$4.FsDateWeekPickerComponent, selector: "[fsDateWeekPicker]", inputs: ["minYear", "maxYear", "minDate", "maxDate", "seedDate", "period", "view"], outputs: ["change"] }], directives: [{ type: i1$3.MatLabel, selector: "mat-label" }, { type: i3$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: FocusToItemDirective, selector: "[fsFilterFocusTrigger]", inputs: ["fsFilterFocusTrigger", "focusTargetType"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$3.MatPlaceholder, selector: "mat-placeholder" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3232
3387
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: WeekComponent, decorators: [{
|
|
3233
3388
|
type: Component,
|
|
3234
3389
|
args: [{
|
|
@@ -3246,7 +3401,7 @@ class CheckboxComponent extends BaseItemComponent {
|
|
|
3246
3401
|
}
|
|
3247
3402
|
}
|
|
3248
3403
|
CheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CheckboxComponent, deps: [{ token: i0.KeyValueDiffers }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3249
|
-
CheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CheckboxComponent, selector: "filter-item-checkbox", usesInheritance: true, ngImport: i0, template: "<fs-label-field>\n <mat-checkbox [(ngModel)]=\"item.model\">\n {{ item.label }}\n </mat-checkbox>\n</fs-label-field>\n", styles: ["fs-label-field{margin:0}\n"], components: [{ type: i1$
|
|
3404
|
+
CheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CheckboxComponent, selector: "filter-item-checkbox", usesInheritance: true, ngImport: i0, template: "<fs-label-field>\n <mat-checkbox [(ngModel)]=\"item.model\">\n {{ item.label }}\n </mat-checkbox>\n</fs-label-field>\n", styles: ["fs-label-field{margin:0}\n"], components: [{ type: i1$5.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i4$3.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], directives: [{ type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3250
3405
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CheckboxComponent, decorators: [{
|
|
3251
3406
|
type: Component,
|
|
3252
3407
|
args: [{
|
|
@@ -3324,43 +3479,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
3324
3479
|
type: Input
|
|
3325
3480
|
}] } });
|
|
3326
3481
|
|
|
3327
|
-
class FsFilterDrawerActionsComponent {
|
|
3328
|
-
constructor(externalParams) {
|
|
3329
|
-
this.externalParams = externalParams;
|
|
3330
|
-
this._clear = new EventEmitter();
|
|
3331
|
-
this._done = new EventEmitter();
|
|
3332
|
-
}
|
|
3333
|
-
get savedFilters() {
|
|
3334
|
-
return this.externalParams.savedFiltersController;
|
|
3335
|
-
}
|
|
3336
|
-
done() {
|
|
3337
|
-
this._done.emit();
|
|
3338
|
-
}
|
|
3339
|
-
clear() {
|
|
3340
|
-
this._clear.emit();
|
|
3341
|
-
}
|
|
3342
|
-
saveFilters() {
|
|
3343
|
-
this.externalParams
|
|
3344
|
-
.savedFiltersController
|
|
3345
|
-
.openSavedFilterEditDialog();
|
|
3346
|
-
}
|
|
3347
|
-
}
|
|
3348
|
-
FsFilterDrawerActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFilterDrawerActionsComponent, deps: [{ token: ExternalParamsController }], target: i0.ɵɵFactoryTarget.Component });
|
|
3349
|
-
FsFilterDrawerActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsFilterDrawerActionsComponent, selector: "fs-filter-drawer-actions", outputs: { _clear: "clear", _done: "done" }, ngImport: i0, template: "<button type=\"button\" mat-button color=\"primary\" (click)=\"done()\">Done</button>\n<button type=\"button\" mat-button (click)=\"clear()\">Clear</button>\n<ng-container *ngIf=\"savedFilters.enabled$ | async\">\n <button type=\"button\" mat-button (click)=\"saveFilters()\">Save</button>\n</ng-container>\n\n", components: [{ type: i1$4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i3.AsyncPipe } });
|
|
3350
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFilterDrawerActionsComponent, decorators: [{
|
|
3351
|
-
type: Component,
|
|
3352
|
-
args: [{
|
|
3353
|
-
selector: 'fs-filter-drawer-actions',
|
|
3354
|
-
templateUrl: './filter-drawer-actions.component.html',
|
|
3355
|
-
}]
|
|
3356
|
-
}], ctorParameters: function () { return [{ type: ExternalParamsController }]; }, propDecorators: { _clear: [{
|
|
3357
|
-
type: Output,
|
|
3358
|
-
args: ['clear']
|
|
3359
|
-
}], _done: [{
|
|
3360
|
-
type: Output,
|
|
3361
|
-
args: ['done']
|
|
3362
|
-
}] } });
|
|
3363
|
-
|
|
3364
3482
|
class FilterDrawerComponent {
|
|
3365
3483
|
constructor(externalParams, _cd, _itemsStore, overlayRef, data) {
|
|
3366
3484
|
this.externalParams = externalParams;
|
|
@@ -3400,7 +3518,7 @@ class FilterDrawerComponent {
|
|
|
3400
3518
|
}
|
|
3401
3519
|
}
|
|
3402
3520
|
FilterDrawerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterDrawerComponent, deps: [{ token: ExternalParamsController }, { token: i0.ChangeDetectorRef }, { token: FsFilterItemsStore }, { token: FILTER_DRAWER_OVERLAY }, { token: FILTER_DRAWER_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
3403
|
-
FilterDrawerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FilterDrawerComponent, selector: "ng-component", inputs: { inline: "inline" }, host: { listeners: { "window:resize": "updateWindowWidth()" } }, ngImport: i0, template: "<div class=\"filters\">\n <div class=\"filters-wrap\">\n\n <div class=\"filter-by\">\n <mat-icon>tune</mat-icon>\n <span class=\"text\">Filters</span>\n </div>\n\n <div class=\"overflow-shadow filter-items\">\n <div class=\"overflow-shadow-content\">\n <ng-container *fsSkeleton=\"(externalParams.pending$ | async) !== true\">\n <filter-item \n *ngFor=\"let filterItem of items$ | async\"\n class=\"filter-group\"\n [item]=\"filterItem\">\n </filter-item>\n\n <ng-container *ngIf=\"sortItem && sortItem.values && sortItem.values.length > 0\">\n <filter-item \n class=\"filter-group sort\"\n [item]=\"sortItem\">\n </filter-item>\n <filter-item \n class=\"filter-group sort\"\n [item]=\"sortDirectionItem\">\n </filter-item>\n </ng-container>\n </ng-container>\n </div>\n </div>\n\n <fs-filter-drawer-actions \n class=\"filter-actions\"\n *ngIf=\"(externalParams.pending$ | async) !== true\"\n (clear)=\"clear()\"\n (done)=\"done()\">\n </fs-filter-drawer-actions>\n </div>\n</div>\n<div class=\"backdrop\" *ngIf=\"!windowDesktop\" (click)=\"backdropClick()\"></div>\n", styles: [":host ::ng-deep mat-form-field{width:100%}.filter-by{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;padding:20px 25px}.filter-by mat-icon{margin-right:8px}.filter-by .text{font-weight:400;font-size:19px}.filter-actions{display:block;box-sizing:border-box;padding:13px}.filter-actions button{margin-right:6px}.filter-actions button:last-child{margin-right:0}.filters{position:fixed;display:block;top:0;right:0;z-index:1002;bottom:0}.filters .filters-wrap{background:#fff;box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f;width:85vw;max-width:350px;display:flex;flex-direction:column;height:100%;padding-top:calc(env(safe-area-inset-top))}.filters .filters-wrap .filter-items{overflow-y:auto}.filters .filters-wrap .filter-items .overflow-shadow-content{padding:0 25px;box-sizing:border-box}.filters .filter-group{margin:10px 0 0}.filters .filter-group:first-child{margin:0}.filters .filter label{white-space:nowrap;color:#0000008a}.filters .filter .interface.interface-range input,.filters .filter .interface.interface-range .mat-input-wrapper{text-align:center}.filters .filter .interface.interface-range{text-align:center}.filters .filter .interface.interface-datetime fs-datetime.has-time .md-input{width:100%}.filters .filter .interface fs-datetime-range input{text-align:center}.filters .filter .filter-label{width:1%;white-space:nowrap;vertical-align:middle;padding-right:15px}.filters md-autocomplete-container md-input-container{margin:0}.filters .isolate{margin-top:-12px}.filters .isolate .interface{line-height:20px;padding-bottom:1.25em}.filters .isolate md-checkbox{margin:0 0 0 2px}.backdrop{position:fixed;top:0;bottom:0;left:0;right:0;z-index:900;outline:none}\n"], components: [{ type: i2$
|
|
3521
|
+
FilterDrawerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FilterDrawerComponent, selector: "ng-component", inputs: { inline: "inline" }, host: { listeners: { "window:resize": "updateWindowWidth()" } }, ngImport: i0, template: "<div class=\"filters\">\n <div class=\"filters-wrap\">\n\n <div class=\"filter-by\">\n <mat-icon>tune</mat-icon>\n <span class=\"text\">Filters</span>\n </div>\n\n <div class=\"overflow-shadow filter-items\">\n <div class=\"overflow-shadow-content\">\n <ng-container *fsSkeleton=\"(externalParams.pending$ | async) !== true\">\n <filter-item \n *ngFor=\"let filterItem of items$ | async\"\n class=\"filter-group\"\n [item]=\"filterItem\">\n </filter-item>\n\n <ng-container *ngIf=\"sortItem && sortItem.values && sortItem.values.length > 0\">\n <filter-item \n class=\"filter-group sort\"\n [item]=\"sortItem\">\n </filter-item>\n <filter-item \n class=\"filter-group sort\"\n [item]=\"sortDirectionItem\">\n </filter-item>\n </ng-container>\n </ng-container>\n </div>\n </div>\n\n <fs-filter-drawer-actions \n class=\"filter-actions\"\n *ngIf=\"(externalParams.pending$ | async) !== true\"\n (clear)=\"clear()\"\n (done)=\"done()\">\n </fs-filter-drawer-actions>\n </div>\n</div>\n<div class=\"backdrop\" *ngIf=\"!windowDesktop\" (click)=\"backdropClick()\"></div>\n", styles: [":host ::ng-deep mat-form-field{width:100%}.filter-by{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;padding:20px 25px}.filter-by mat-icon{margin-right:8px}.filter-by .text{font-weight:400;font-size:19px}.filter-actions{display:block;box-sizing:border-box;padding:13px}.filter-actions button{margin-right:6px}.filter-actions button:last-child{margin-right:0}.filters{position:fixed;display:block;top:0;right:0;z-index:1002;bottom:0}.filters .filters-wrap{background:#fff;box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f;width:85vw;max-width:350px;display:flex;flex-direction:column;height:100%;padding-top:calc(env(safe-area-inset-top))}.filters .filters-wrap .filter-items{overflow-y:auto}.filters .filters-wrap .filter-items .overflow-shadow-content{padding:0 25px;box-sizing:border-box}.filters .filter-group{margin:10px 0 0}.filters .filter-group:first-child{margin:0}.filters .filter label{white-space:nowrap;color:#0000008a}.filters .filter .interface.interface-range input,.filters .filter .interface.interface-range .mat-input-wrapper{text-align:center}.filters .filter .interface.interface-range{text-align:center}.filters .filter .interface.interface-datetime fs-datetime.has-time .md-input{width:100%}.filters .filter .interface fs-datetime-range input{text-align:center}.filters .filter .filter-label{width:1%;white-space:nowrap;vertical-align:middle;padding-right:15px}.filters md-autocomplete-container md-input-container{margin:0}.filters .isolate{margin-top:-12px}.filters .isolate .interface{line-height:20px;padding-bottom:1.25em}.filters .isolate md-checkbox{margin:0 0 0 2px}.backdrop{position:fixed;top:0;bottom:0;left:0;right:0;z-index:900;outline:none}\n"], components: [{ type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: FilterItemComponent, selector: "filter-item", inputs: ["item"] }, { type: FsFilterDrawerActionsComponent, selector: "fs-filter-drawer-actions", outputs: ["clear", "done"] }], directives: [{ type: i6$1.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i3.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3404
3522
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterDrawerComponent, decorators: [{
|
|
3405
3523
|
type: Component,
|
|
3406
3524
|
args: [{
|
|
@@ -3409,7 +3527,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
3409
3527
|
// Commented out because filter items are not updating with a delayed observable. Need to figure this out.
|
|
3410
3528
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3411
3529
|
}]
|
|
3412
|
-
}], ctorParameters: function () { return [{ type: ExternalParamsController }, { type: i0.ChangeDetectorRef }, { type: FsFilterItemsStore }, { type: i1$
|
|
3530
|
+
}], ctorParameters: function () { return [{ type: ExternalParamsController }, { type: i0.ChangeDetectorRef }, { type: FsFilterItemsStore }, { type: i1$6.OverlayRef, decorators: [{
|
|
3413
3531
|
type: Inject,
|
|
3414
3532
|
args: [FILTER_DRAWER_OVERLAY]
|
|
3415
3533
|
}] }, { type: undefined, decorators: [{
|
|
@@ -3422,364 +3540,248 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
3422
3540
|
type: Input
|
|
3423
3541
|
}] } });
|
|
3424
3542
|
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
}
|
|
3432
|
-
});
|
|
3433
|
-
|
|
3434
|
-
class FsFilterOverlayService {
|
|
3435
|
-
constructor(_injector, _filterMeta, _overlay, _focusController) {
|
|
3436
|
-
this._injector = _injector;
|
|
3437
|
-
this._filterMeta = _filterMeta;
|
|
3438
|
-
this._overlay = _overlay;
|
|
3439
|
-
this._focusController = _focusController;
|
|
3440
|
-
this.detach$ = new Subject();
|
|
3441
|
-
this.attach$ = new Subject();
|
|
3543
|
+
class ActionsController {
|
|
3544
|
+
constructor(_breakpointObserver) {
|
|
3545
|
+
this._breakpointObserver = _breakpointObserver;
|
|
3546
|
+
this._visible$ = new BehaviorSubject(false);
|
|
3547
|
+
this._actions$ = new BehaviorSubject([]);
|
|
3548
|
+
this._menuActions$ = new BehaviorSubject([]);
|
|
3442
3549
|
this._destroy$ = new Subject();
|
|
3443
|
-
this.
|
|
3550
|
+
this._mobileMedia = '(max-width: 799px)';
|
|
3551
|
+
this._allActions = [];
|
|
3552
|
+
this._listenMobileMedia();
|
|
3444
3553
|
}
|
|
3445
|
-
get
|
|
3446
|
-
return
|
|
3554
|
+
get menuActions() {
|
|
3555
|
+
return this._menuActions$.value;
|
|
3447
3556
|
}
|
|
3448
|
-
|
|
3449
|
-
this.
|
|
3557
|
+
get actions() {
|
|
3558
|
+
return this._actions$.value;
|
|
3450
3559
|
}
|
|
3451
|
-
|
|
3452
|
-
this.
|
|
3560
|
+
get actions$() {
|
|
3561
|
+
return this._actions$.asObservable();
|
|
3453
3562
|
}
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
this._overlayRef.detach();
|
|
3457
|
-
this._overlayRef = null;
|
|
3458
|
-
this.removeFilterClass();
|
|
3459
|
-
}
|
|
3563
|
+
get menuActions$() {
|
|
3564
|
+
return this._menuActions$.asObservable();
|
|
3460
3565
|
}
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
this._overlayRef.detach();
|
|
3467
|
-
});
|
|
3468
|
-
this._overlayRef.detachments()
|
|
3469
|
-
.pipe(takeUntil(this._destroy$))
|
|
3470
|
-
.subscribe(() => {
|
|
3471
|
-
this.detach$.next();
|
|
3472
|
-
});
|
|
3473
|
-
this._overlayRef.attachments()
|
|
3474
|
-
.pipe(takeUntil(this._destroy$))
|
|
3475
|
-
.subscribe(() => {
|
|
3476
|
-
this.attach$.next();
|
|
3477
|
-
});
|
|
3478
|
-
this.addFilterClass();
|
|
3479
|
-
return this.openPortalPreview();
|
|
3566
|
+
get visible$() {
|
|
3567
|
+
return this._visible$.asObservable();
|
|
3568
|
+
}
|
|
3569
|
+
get mobileMode() {
|
|
3570
|
+
return this._breakpointObserver.isMatched(this._mobileMedia);
|
|
3480
3571
|
}
|
|
3481
3572
|
ngOnDestroy() {
|
|
3482
3573
|
this._destroy$.next();
|
|
3483
3574
|
this._destroy$.complete();
|
|
3484
3575
|
}
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
backdropClass: 'fs-filter-backdrop'
|
|
3489
|
-
});
|
|
3490
|
-
return this._overlay.create(overlayConfig);
|
|
3491
|
-
}
|
|
3492
|
-
openPortalPreview() {
|
|
3493
|
-
const data = { done: this._doneFn, clear: this._clearFn };
|
|
3494
|
-
const injector = this._createInjector(this._injector, data, this._overlayRef);
|
|
3495
|
-
const containerPortal = new ComponentPortal(FilterDrawerComponent, undefined, injector);
|
|
3496
|
-
const containerRef = this._overlayRef.attach(containerPortal);
|
|
3497
|
-
return containerRef.instance;
|
|
3498
|
-
}
|
|
3499
|
-
_createInjector(parentInjector, data, overlayRef) {
|
|
3500
|
-
const injectionTokens = new WeakMap([
|
|
3501
|
-
[FILTER_DRAWER_DATA, data],
|
|
3502
|
-
[FILTER_DRAWER_OVERLAY, overlayRef],
|
|
3503
|
-
]);
|
|
3504
|
-
return new PortalInjector(parentInjector, injectionTokens);
|
|
3576
|
+
setConfig(config) {
|
|
3577
|
+
this._config = config;
|
|
3578
|
+
this.initActions(config.actions);
|
|
3505
3579
|
}
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
window.document.body.classList.remove('fs-filter-open');
|
|
3580
|
+
initActions(rawActions) {
|
|
3581
|
+
if (!rawActions || !Array.isArray(rawActions)) {
|
|
3582
|
+
return;
|
|
3510
3583
|
}
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
if (this.
|
|
3515
|
-
|
|
3584
|
+
this.show();
|
|
3585
|
+
this._allActions = rawActions
|
|
3586
|
+
.map((action) => new Action(this._config, action));
|
|
3587
|
+
if (this._reorderAction) {
|
|
3588
|
+
this._allActions.unshift(this._reorderAction);
|
|
3516
3589
|
}
|
|
3590
|
+
this._classifyActions();
|
|
3517
3591
|
}
|
|
3518
|
-
|
|
3519
|
-
this.
|
|
3520
|
-
.pipe(filter$1((v) => !!v), takeUntil(this._destroy$))
|
|
3521
|
-
.subscribe(() => {
|
|
3522
|
-
if (!this.isOpened) {
|
|
3523
|
-
this.open();
|
|
3524
|
-
}
|
|
3525
|
-
});
|
|
3592
|
+
show() {
|
|
3593
|
+
this._visible$.next(true);
|
|
3526
3594
|
}
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
FsFilterOverlayService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFilterOverlayService });
|
|
3530
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFilterOverlayService, decorators: [{
|
|
3531
|
-
type: Injectable
|
|
3532
|
-
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: undefined, decorators: [{
|
|
3533
|
-
type: Inject,
|
|
3534
|
-
args: [FS_FILTER_META]
|
|
3535
|
-
}] }, { type: i1$7.Overlay }, { type: FocusControllerService }]; } });
|
|
3536
|
-
|
|
3537
|
-
class FilterStatusBarDirective {
|
|
3538
|
-
}
|
|
3539
|
-
FilterStatusBarDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterStatusBarDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3540
|
-
FilterStatusBarDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FilterStatusBarDirective, selector: "[fsFilterStatusBar]", ngImport: i0 });
|
|
3541
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterStatusBarDirective, decorators: [{
|
|
3542
|
-
type: Directive,
|
|
3543
|
-
args: [{
|
|
3544
|
-
selector: '[fsFilterStatusBar]',
|
|
3545
|
-
}]
|
|
3546
|
-
}] });
|
|
3547
|
-
|
|
3548
|
-
class FsFilterActionButtonComponent {
|
|
3549
|
-
constructor() {
|
|
3550
|
-
this.ActionType = ActionType;
|
|
3595
|
+
hide() {
|
|
3596
|
+
this._visible$.next(false);
|
|
3551
3597
|
}
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
args: [{
|
|
3558
|
-
selector: 'fs-filter-action-button',
|
|
3559
|
-
templateUrl: './action-button.component.html',
|
|
3560
|
-
host: {
|
|
3561
|
-
class: 'action-button',
|
|
3562
|
-
},
|
|
3563
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3564
|
-
}]
|
|
3565
|
-
}], propDecorators: { action: [{
|
|
3566
|
-
type: Input
|
|
3567
|
-
}] } });
|
|
3568
|
-
|
|
3569
|
-
class FsFilterActionKebabActionsComponent {
|
|
3570
|
-
}
|
|
3571
|
-
FsFilterActionKebabActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFilterActionKebabActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3572
|
-
FsFilterActionKebabActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsFilterActionKebabActionsComponent, selector: "fs-filter-action-kebab-actions", inputs: { kebabActions: "kebabActions" }, ngImport: i0, template: "<button \n type=\"button\"\n mat-icon-button\n class=\"menu-button\"\n [fsMenuTriggerFor]=\"kebabActionsMenu\">\n <mat-icon>more_vert</mat-icon>\n</button>\n<fs-menu #kebabActionsMenu>\n <ng-container *ngFor=\"let action of kebabActions\">\n <ng-container [ngSwitch]=\"action.mode\">\n <!-- Case when actions was collapsed from action with mode = 'menu'-->\n <ng-container *ngSwitchCase=\"'menu'\">\n <ng-container *ngFor=\"let childAction of action.items\">\n <ng-container *ngIf=\"childAction.isGroup else simpleMenuItem\">\n <fs-menu-group>\n <ng-template fs-group-menu-item-template>\n {{ action.label }} <mat-icon style=\"margin: 0;\">arrow_right</mat-icon> {{childAction.label}}\n </ng-template>\n <ng-container *ngFor=\"let subAction of childAction.items\">\n <ng-template \n fs-menu-item\n [link]=\"subAction.routerLink?.link\"\n [queryParams]=\"subAction.routerLink?.queryParams\"\n [hidden]=\"!(subAction.visible$ | async)\"\n (click)=\"subAction.click($event)\">\n <mat-icon *ngIf=\"subAction.icon\">{{subAction.icon}}</mat-icon>\n {{subAction.label}}\n </ng-template>\n </ng-container>\n </fs-menu-group>\n </ng-container>\n <ng-template #simpleMenuItem>\n <ng-template \n fs-menu-item\n [link]=\"childAction.routerLink?.link\"\n [queryParams]=\"childAction.routerLink?.queryParams\"\n [hidden]=\"!(childAction.visible$ | async)\"\n (click)=\"childAction.click($event);\">\n <mat-icon *ngIf=\"childAction.icon\">{{childAction.icon}}</mat-icon>\n {{ action.label }} <mat-icon style=\"margin: 0;\">arrow_right</mat-icon>{{ childAction.label }}\n </ng-template>\n </ng-template>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'file'\">\n <ng-template \n fs-menu-file-item\n [fsClass]=\"action.classArray\"\n [multiple]=\"action.multiple\"\n [accept]=\"action.accept || '*'\"\n [minWidth]=\"action.minWidth\"\n [minHeight]=\"action.minHeight\"\n [imageWidth]=\"action.maxWidth\"\n [imageHeight]=\"action.maxHeight\"\n (error)=\"action.fileError($event)\"\n (select)=\"action.fileSelected($event)\"\n (click)=\"action.click($event)\">\n <mat-icon *ngIf=\"action.icon\">{{action.icon}}</mat-icon> {{action.label}}\n </ng-template>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <ng-template \n fs-menu-item\n (click)=\"action.click($event)\"\n [fsClass]=\"action.classArray\">\n <mat-icon *ngIf=\"action.icon\">{{action.icon}}</mat-icon> {{action.label}}\n </ng-template>\n </ng-container>\n\n </ng-container>\n </ng-container>\n</fs-menu>\n", styles: [".menu-button{width:36px;height:36px;line-height:36px}\n"], components: [{ type: i1$4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i3$4.FsMenuComponent, selector: "fs-menu", inputs: ["class", "buttonClass"], outputs: ["opened", "closed"] }], directives: [{ type: i3$4.FsMenuTriggerDirective, selector: "[fsMenuTriggerFor]", inputs: ["fsMenuTriggerFor"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$4.FsMenuItemDirective, selector: "fs-menu-group,[fs-menu-item]" }, { type: i3$4.FsGroupMenuItemTemplateDirective, selector: "[fs-group-menu-item-template]" }, { type: i3$4.FsMenuFileItemDirective, selector: "[fs-menu-file-item]", inputs: ["multiple", "accept", "minWidth", "minHeight", "imageWidth", "imageHeight"], outputs: ["select", "error"] }, { type: i3.NgSwitchDefault, selector: "[ngSwitchDefault]" }], pipes: { "async": i3.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3573
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFilterActionKebabActionsComponent, decorators: [{
|
|
3574
|
-
type: Component,
|
|
3575
|
-
args: [{
|
|
3576
|
-
selector: 'fs-filter-action-kebab-actions',
|
|
3577
|
-
styleUrls: ['./action-kebab-actions.component.scss'],
|
|
3578
|
-
templateUrl: './action-kebab-actions.component.html',
|
|
3579
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3580
|
-
}]
|
|
3581
|
-
}], propDecorators: { kebabActions: [{
|
|
3582
|
-
type: Input
|
|
3583
|
-
}] } });
|
|
3584
|
-
|
|
3585
|
-
class FsFilterActionsComponent {
|
|
3586
|
-
constructor() {
|
|
3587
|
-
this.kebabActions = [];
|
|
3588
|
-
this.actions = [];
|
|
3598
|
+
addReorderAction(action) {
|
|
3599
|
+
this._allActions.unshift(action);
|
|
3600
|
+
action.isReorderAction = true;
|
|
3601
|
+
this._classifyAction(action);
|
|
3602
|
+
this._reorderAction = action;
|
|
3589
3603
|
}
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
type: Component,
|
|
3595
|
-
args: [{
|
|
3596
|
-
selector: 'fs-filter-actions',
|
|
3597
|
-
templateUrl: './actions.component.html',
|
|
3598
|
-
styleUrls: ['./actions.component.scss'],
|
|
3599
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3600
|
-
}]
|
|
3601
|
-
}], propDecorators: { kebabActions: [{
|
|
3602
|
-
type: Input
|
|
3603
|
-
}], actions: [{
|
|
3604
|
-
type: Input
|
|
3605
|
-
}] } });
|
|
3606
|
-
|
|
3607
|
-
class FsFilterChipContentComponent {
|
|
3608
|
-
constructor(_cdRef) {
|
|
3609
|
-
this._cdRef = _cdRef;
|
|
3610
|
-
this._destroy$ = new Subject();
|
|
3604
|
+
clearActions() {
|
|
3605
|
+
this._allActions = [];
|
|
3606
|
+
this._setActions([]);
|
|
3607
|
+
this._setKebabActions([]);
|
|
3611
3608
|
}
|
|
3612
|
-
|
|
3613
|
-
this.
|
|
3609
|
+
updateActionsVisibility() {
|
|
3610
|
+
this._allActions.forEach((action) => action.updateVisibility());
|
|
3611
|
+
this._classifyActions();
|
|
3614
3612
|
}
|
|
3615
|
-
|
|
3616
|
-
this.
|
|
3617
|
-
this._destroy$.complete();
|
|
3613
|
+
updateDisabledState() {
|
|
3614
|
+
this.actions.forEach((action) => action.updateDisabledState());
|
|
3618
3615
|
}
|
|
3619
|
-
|
|
3620
|
-
this.
|
|
3621
|
-
.pipe(takeUntil(this._destroy$))
|
|
3622
|
-
.subscribe(() => {
|
|
3623
|
-
this.content = this._getContent();
|
|
3624
|
-
this._cdRef.detectChanges();
|
|
3625
|
-
});
|
|
3616
|
+
_setKebabActions(actions) {
|
|
3617
|
+
this._menuActions$.next(actions);
|
|
3626
3618
|
}
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
}
|
|
3642
|
-
}
|
|
3643
|
-
else {
|
|
3644
|
-
if (Array.isArray(this.item.label)) {
|
|
3645
|
-
const label = getLabelFromArray(this.item.label, this.type);
|
|
3646
|
-
return `${label}: ${result}`;
|
|
3619
|
+
_setActions(actions) {
|
|
3620
|
+
this._actions$.next(actions);
|
|
3621
|
+
}
|
|
3622
|
+
_classifyActions() {
|
|
3623
|
+
const kebabActions = [];
|
|
3624
|
+
const actions = [];
|
|
3625
|
+
const mobileMode = this.mobileMode;
|
|
3626
|
+
this._allActions
|
|
3627
|
+
.filter((action) => {
|
|
3628
|
+
return action.visible;
|
|
3629
|
+
})
|
|
3630
|
+
.forEach((action) => {
|
|
3631
|
+
if (action.menu !== false && (action.menu || mobileMode)) {
|
|
3632
|
+
kebabActions.push(action);
|
|
3647
3633
|
}
|
|
3648
|
-
else {
|
|
3649
|
-
|
|
3650
|
-
return result;
|
|
3651
|
-
}
|
|
3652
|
-
else {
|
|
3653
|
-
return `${this.item.label}: ${result}`;
|
|
3654
|
-
}
|
|
3634
|
+
else {
|
|
3635
|
+
actions.push(action);
|
|
3655
3636
|
}
|
|
3656
|
-
}
|
|
3637
|
+
});
|
|
3638
|
+
this._setKebabActions(kebabActions);
|
|
3639
|
+
this._setActions(actions);
|
|
3657
3640
|
}
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
templateUrl: './filter-chip-content.component.html',
|
|
3666
|
-
styleUrls: ['./filter-chip-content.component.scss'],
|
|
3667
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3668
|
-
}]
|
|
3669
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { item: [{
|
|
3670
|
-
type: Input
|
|
3671
|
-
}], type: [{
|
|
3672
|
-
type: Input
|
|
3673
|
-
}] } });
|
|
3674
|
-
function getLabelFromArray(labelArr, type) {
|
|
3675
|
-
if (type === 'from' && labelArr[0]) {
|
|
3676
|
-
return `${labelArr[0]}`;
|
|
3641
|
+
_classifyAction(action) {
|
|
3642
|
+
if (action.menu) {
|
|
3643
|
+
this._setKebabActions([...this.menuActions, action]);
|
|
3644
|
+
}
|
|
3645
|
+
else {
|
|
3646
|
+
this._setActions([...this.actions, action]);
|
|
3647
|
+
}
|
|
3677
3648
|
}
|
|
3678
|
-
|
|
3679
|
-
|
|
3649
|
+
_listenMobileMedia() {
|
|
3650
|
+
this._breakpointObserver.observe(this._mobileMedia)
|
|
3651
|
+
.pipe(skip(1), takeUntil(this._destroy$))
|
|
3652
|
+
.subscribe(() => {
|
|
3653
|
+
this._classifyActions();
|
|
3654
|
+
});
|
|
3680
3655
|
}
|
|
3681
|
-
|
|
3682
|
-
|
|
3656
|
+
}
|
|
3657
|
+
ActionsController.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ActionsController, deps: [{ token: i1$7.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3658
|
+
ActionsController.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ActionsController });
|
|
3659
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ActionsController, decorators: [{
|
|
3660
|
+
type: Injectable
|
|
3661
|
+
}], ctorParameters: function () { return [{ type: i1$7.BreakpointObserver }]; } });
|
|
3662
|
+
|
|
3663
|
+
const FS_FILTER_META = new InjectionToken('fs.filter.meta', {
|
|
3664
|
+
providedIn: 'root',
|
|
3665
|
+
factory: () => {
|
|
3666
|
+
return {
|
|
3667
|
+
openedFilters: 0,
|
|
3668
|
+
};
|
|
3683
3669
|
}
|
|
3684
|
-
}
|
|
3670
|
+
});
|
|
3685
3671
|
|
|
3686
|
-
class
|
|
3687
|
-
constructor(
|
|
3688
|
-
this.
|
|
3672
|
+
class FsFilterOverlayService {
|
|
3673
|
+
constructor(_injector, _filterMeta, _overlay, _focusController) {
|
|
3674
|
+
this._injector = _injector;
|
|
3675
|
+
this._filterMeta = _filterMeta;
|
|
3676
|
+
this._overlay = _overlay;
|
|
3689
3677
|
this._focusController = _focusController;
|
|
3690
|
-
this.
|
|
3691
|
-
|
|
3678
|
+
this.detach$ = new Subject();
|
|
3679
|
+
this.attach$ = new Subject();
|
|
3692
3680
|
this._destroy$ = new Subject();
|
|
3681
|
+
this._openWhenChipClicked();
|
|
3693
3682
|
}
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
this.
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
this._initDelayRender();
|
|
3683
|
+
get isOpened() {
|
|
3684
|
+
return !!this._overlayRef;
|
|
3685
|
+
}
|
|
3686
|
+
setClearFn(fn) {
|
|
3687
|
+
this._clearFn = fn;
|
|
3688
|
+
}
|
|
3689
|
+
setDoneFn(fn) {
|
|
3690
|
+
this._doneFn = fn;
|
|
3691
|
+
}
|
|
3692
|
+
close() {
|
|
3693
|
+
if (this._overlayRef) {
|
|
3694
|
+
this._overlayRef.detach();
|
|
3695
|
+
this._overlayRef = null;
|
|
3696
|
+
this.removeFilterClass();
|
|
3709
3697
|
}
|
|
3710
3698
|
}
|
|
3699
|
+
open() {
|
|
3700
|
+
this._overlayRef = this._createOverlay();
|
|
3701
|
+
this._overlayRef.backdropClick()
|
|
3702
|
+
.pipe(takeUntil(this._destroy$))
|
|
3703
|
+
.subscribe(() => {
|
|
3704
|
+
this._overlayRef.detach();
|
|
3705
|
+
});
|
|
3706
|
+
this._overlayRef.detachments()
|
|
3707
|
+
.pipe(takeUntil(this._destroy$))
|
|
3708
|
+
.subscribe(() => {
|
|
3709
|
+
this.detach$.next();
|
|
3710
|
+
});
|
|
3711
|
+
this._overlayRef.attachments()
|
|
3712
|
+
.pipe(takeUntil(this._destroy$))
|
|
3713
|
+
.subscribe(() => {
|
|
3714
|
+
this.attach$.next();
|
|
3715
|
+
});
|
|
3716
|
+
this.addFilterClass();
|
|
3717
|
+
return this.openPortalPreview();
|
|
3718
|
+
}
|
|
3711
3719
|
ngOnDestroy() {
|
|
3712
3720
|
this._destroy$.next();
|
|
3713
3721
|
this._destroy$.complete();
|
|
3714
3722
|
}
|
|
3715
|
-
|
|
3716
|
-
|
|
3723
|
+
_createOverlay() {
|
|
3724
|
+
const overlayConfig = new OverlayConfig({
|
|
3725
|
+
hasBackdrop: true,
|
|
3726
|
+
backdropClass: 'fs-filter-backdrop'
|
|
3727
|
+
});
|
|
3728
|
+
return this._overlay.create(overlayConfig);
|
|
3717
3729
|
}
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3730
|
+
openPortalPreview() {
|
|
3731
|
+
const data = { done: this._doneFn, clear: this._clearFn };
|
|
3732
|
+
const injector = this._createInjector(this._injector, data, this._overlayRef);
|
|
3733
|
+
const containerPortal = new ComponentPortal(FilterDrawerComponent, undefined, injector);
|
|
3734
|
+
const containerRef = this._overlayRef.attach(containerPortal);
|
|
3735
|
+
return containerRef.instance;
|
|
3736
|
+
}
|
|
3737
|
+
_createInjector(parentInjector, data, overlayRef) {
|
|
3738
|
+
const injectionTokens = new WeakMap([
|
|
3739
|
+
[FILTER_DRAWER_DATA, data],
|
|
3740
|
+
[FILTER_DRAWER_OVERLAY, overlayRef],
|
|
3741
|
+
]);
|
|
3742
|
+
return new PortalInjector(parentInjector, injectionTokens);
|
|
3743
|
+
}
|
|
3744
|
+
removeFilterClass() {
|
|
3745
|
+
this._filterMeta.openedFilters--;
|
|
3746
|
+
if (this._filterMeta.openedFilters === 0) {
|
|
3747
|
+
window.document.body.classList.remove('fs-filter-open');
|
|
3724
3748
|
}
|
|
3725
|
-
|
|
3726
|
-
|
|
3749
|
+
}
|
|
3750
|
+
addFilterClass() {
|
|
3751
|
+
this._filterMeta.openedFilters++;
|
|
3752
|
+
if (this._filterMeta.openedFilters === 1) {
|
|
3753
|
+
window.document.body.classList.add('fs-filter-open');
|
|
3727
3754
|
}
|
|
3728
3755
|
}
|
|
3729
|
-
|
|
3730
|
-
this.
|
|
3731
|
-
.pipe(
|
|
3756
|
+
_openWhenChipClicked() {
|
|
3757
|
+
this._focusController.focusOn$
|
|
3758
|
+
.pipe(filter$1((v) => !!v), takeUntil(this._destroy$))
|
|
3732
3759
|
.subscribe(() => {
|
|
3733
|
-
this.
|
|
3734
|
-
|
|
3760
|
+
if (!this.isOpened) {
|
|
3761
|
+
this.open();
|
|
3762
|
+
}
|
|
3735
3763
|
});
|
|
3736
3764
|
}
|
|
3737
|
-
_updateVisibility() {
|
|
3738
|
-
this.itemVisible = this.item.isChipVisible;
|
|
3739
|
-
}
|
|
3740
|
-
_initDelayRender() {
|
|
3741
|
-
this.chipDelayedRender$ = combineLatest([
|
|
3742
|
-
this.item.values$,
|
|
3743
|
-
this._chipRenderTimer$.pipe(startWith(false))
|
|
3744
|
-
])
|
|
3745
|
-
.pipe(map(([values, timerValue]) => {
|
|
3746
|
-
return !!values || timerValue;
|
|
3747
|
-
}));
|
|
3748
|
-
}
|
|
3749
3765
|
}
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type:
|
|
3753
|
-
type:
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3759
|
-
}]
|
|
3760
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: FocusControllerService }]; }, propDecorators: { item: [{
|
|
3761
|
-
type: Input
|
|
3762
|
-
}] } });
|
|
3766
|
+
FsFilterOverlayService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFilterOverlayService, deps: [{ token: i0.Injector }, { token: FS_FILTER_META }, { token: i1$6.Overlay }, { token: FocusControllerService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3767
|
+
FsFilterOverlayService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFilterOverlayService });
|
|
3768
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFilterOverlayService, decorators: [{
|
|
3769
|
+
type: Injectable
|
|
3770
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: undefined, decorators: [{
|
|
3771
|
+
type: Inject,
|
|
3772
|
+
args: [FS_FILTER_META]
|
|
3773
|
+
}] }, { type: i1$6.Overlay }, { type: FocusControllerService }]; } });
|
|
3763
3774
|
|
|
3764
|
-
class
|
|
3765
|
-
constructor() {
|
|
3766
|
-
this.ItemType = ItemType;
|
|
3767
|
-
this.chips = [];
|
|
3768
|
-
}
|
|
3775
|
+
class FilterStatusBarDirective {
|
|
3769
3776
|
}
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type:
|
|
3773
|
-
type:
|
|
3777
|
+
FilterStatusBarDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterStatusBarDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3778
|
+
FilterStatusBarDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FilterStatusBarDirective, selector: "[fsFilterStatusBar]", ngImport: i0 });
|
|
3779
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterStatusBarDirective, decorators: [{
|
|
3780
|
+
type: Directive,
|
|
3774
3781
|
args: [{
|
|
3775
|
-
selector: '
|
|
3776
|
-
templateUrl: './filter-chips.component.html',
|
|
3777
|
-
styleUrls: ['./filter-chips.component.scss'],
|
|
3778
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3782
|
+
selector: '[fsFilterStatusBar]',
|
|
3779
3783
|
}]
|
|
3780
|
-
}]
|
|
3781
|
-
type: Input
|
|
3782
|
-
}] } });
|
|
3784
|
+
}] });
|
|
3783
3785
|
|
|
3784
3786
|
class FilterComponent {
|
|
3785
3787
|
constructor(_defaultConfig, _filterOverlay, _zone, _externalParams, _filterItems, _actions) {
|
|
@@ -3797,12 +3799,13 @@ class FilterComponent {
|
|
|
3797
3799
|
this.showFilterMenu = false;
|
|
3798
3800
|
this.windowDesktop = false;
|
|
3799
3801
|
this.fsFilterClass = true;
|
|
3800
|
-
this.searchText = new FormControl();
|
|
3801
3802
|
this.searchPlaceholder = 'Search';
|
|
3803
|
+
this.keyword = '';
|
|
3802
3804
|
this._config = null;
|
|
3803
3805
|
this._filtersBtnVisible$ = new BehaviorSubject(true);
|
|
3804
3806
|
this._keywordVisible$ = new BehaviorSubject(true);
|
|
3805
3807
|
this._hasFilterChips$ = new BehaviorSubject(false);
|
|
3808
|
+
this._keyword$ = new Subject();
|
|
3806
3809
|
this._destroy$ = new Subject();
|
|
3807
3810
|
this._listenWhenFilterReady();
|
|
3808
3811
|
this._updateWindowWidth();
|
|
@@ -3873,25 +3876,18 @@ class FilterComponent {
|
|
|
3873
3876
|
this.focus();
|
|
3874
3877
|
}
|
|
3875
3878
|
});
|
|
3879
|
+
this._listenInputChanges();
|
|
3876
3880
|
this._listenInternalItemsChange();
|
|
3877
3881
|
this._initOverlay();
|
|
3878
3882
|
}
|
|
3879
|
-
ngAfterViewInit() {
|
|
3880
|
-
this._listenInputKeyEvents();
|
|
3881
|
-
// FIXME prevent fire change after init
|
|
3882
|
-
setTimeout(() => {
|
|
3883
|
-
this._listenInputChanges();
|
|
3884
|
-
});
|
|
3885
|
-
}
|
|
3886
3883
|
ngOnDestroy() {
|
|
3887
3884
|
this._destroyFilterDrawer();
|
|
3888
3885
|
this._destroy$.next();
|
|
3889
3886
|
this._destroy$.complete();
|
|
3890
3887
|
}
|
|
3891
3888
|
focus() {
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
}
|
|
3889
|
+
var _a;
|
|
3890
|
+
(_a = this.keywordMatInput) === null || _a === void 0 ? void 0 : _a.focus();
|
|
3895
3891
|
}
|
|
3896
3892
|
updateSort(sort) {
|
|
3897
3893
|
this._filterItems.updateSort(sort);
|
|
@@ -3975,17 +3971,6 @@ class FilterComponent {
|
|
|
3975
3971
|
}
|
|
3976
3972
|
this.changeVisibility(value);
|
|
3977
3973
|
}
|
|
3978
|
-
filterInputEvent(event) {
|
|
3979
|
-
if (!this.windowDesktop) {
|
|
3980
|
-
return;
|
|
3981
|
-
}
|
|
3982
|
-
if (['Enter', 'NumpadEnter', 'Escape'].indexOf(event.code) >= 0) {
|
|
3983
|
-
this.changeVisibility(false);
|
|
3984
|
-
if (this.searchTextInput) {
|
|
3985
|
-
this.searchTextInput.nativeElement.blur();
|
|
3986
|
-
}
|
|
3987
|
-
}
|
|
3988
|
-
}
|
|
3989
3974
|
get itemValues() {
|
|
3990
3975
|
return this.items
|
|
3991
3976
|
.map((item) => item.value);
|
|
@@ -4063,12 +4048,6 @@ class FilterComponent {
|
|
|
4063
4048
|
this.opened.emit();
|
|
4064
4049
|
this._filterOverlay.open();
|
|
4065
4050
|
}
|
|
4066
|
-
clearSearchText(event) {
|
|
4067
|
-
event.stopPropagation();
|
|
4068
|
-
this.searchText.setValue('');
|
|
4069
|
-
this._filterItems.keywordItem.clear();
|
|
4070
|
-
this.searchTextInput.nativeElement.focus();
|
|
4071
|
-
}
|
|
4072
4051
|
init() {
|
|
4073
4052
|
const data = this._filterItems.valuesAsQuery();
|
|
4074
4053
|
this._sort = this._filterItems.getSort();
|
|
@@ -4092,6 +4071,7 @@ class FilterComponent {
|
|
|
4092
4071
|
if (this.config.clear) {
|
|
4093
4072
|
this.config.clear();
|
|
4094
4073
|
}
|
|
4074
|
+
this.keyword = '';
|
|
4095
4075
|
}
|
|
4096
4076
|
/**
|
|
4097
4077
|
* Close filter window and do change callback
|
|
@@ -4186,7 +4166,6 @@ class FilterComponent {
|
|
|
4186
4166
|
this._filterItems.setConfig(this._config);
|
|
4187
4167
|
this._externalParams.initItems();
|
|
4188
4168
|
this._syncSearchInputWithKeyword();
|
|
4189
|
-
this._listenKeywordItemClear();
|
|
4190
4169
|
}
|
|
4191
4170
|
_initFilterWithConfig(config) {
|
|
4192
4171
|
if (this.config) {
|
|
@@ -4201,7 +4180,6 @@ class FilterComponent {
|
|
|
4201
4180
|
if (!!this.config.reloadWhenConfigChanged) {
|
|
4202
4181
|
this.change();
|
|
4203
4182
|
}
|
|
4204
|
-
this._listenKeywordItemClear();
|
|
4205
4183
|
}
|
|
4206
4184
|
_destroyFilterDrawer() {
|
|
4207
4185
|
this._filterOverlay.close();
|
|
@@ -4220,22 +4198,6 @@ class FilterComponent {
|
|
|
4220
4198
|
});
|
|
4221
4199
|
});
|
|
4222
4200
|
}
|
|
4223
|
-
_listenInputKeyEvents() {
|
|
4224
|
-
if (!this.searchTextInput) {
|
|
4225
|
-
return;
|
|
4226
|
-
}
|
|
4227
|
-
this._zone.runOutsideAngular(() => {
|
|
4228
|
-
fromEvent(this.searchTextInput.nativeElement, 'keydown')
|
|
4229
|
-
.pipe(debounceTime(500), filter$1((event) => {
|
|
4230
|
-
return ['Enter', 'NumpadEnter', 'Escape'].indexOf(event.code) > -1;
|
|
4231
|
-
}), takeUntil(this._destroy$))
|
|
4232
|
-
.subscribe((event) => {
|
|
4233
|
-
this._zone.run(() => {
|
|
4234
|
-
this.filterInputEvent(event);
|
|
4235
|
-
});
|
|
4236
|
-
});
|
|
4237
|
-
});
|
|
4238
|
-
}
|
|
4239
4201
|
_listenWindowResize() {
|
|
4240
4202
|
this._zone.runOutsideAngular(() => {
|
|
4241
4203
|
fromEvent(window, 'resize')
|
|
@@ -4247,37 +4209,25 @@ class FilterComponent {
|
|
|
4247
4209
|
});
|
|
4248
4210
|
});
|
|
4249
4211
|
}
|
|
4212
|
+
keywordChange(keyword) {
|
|
4213
|
+
this._keyword$.next(keyword);
|
|
4214
|
+
}
|
|
4250
4215
|
_listenInputChanges() {
|
|
4251
|
-
this.
|
|
4252
|
-
this.
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
.subscribe((value) => {
|
|
4258
|
-
this._zone.run(() => {
|
|
4259
|
-
const keywordItem = this._filterItems.keywordItem;
|
|
4260
|
-
if (keywordItem && keywordItem.value !== value) {
|
|
4261
|
-
keywordItem.model = value;
|
|
4262
|
-
}
|
|
4263
|
-
});
|
|
4264
|
-
});
|
|
4216
|
+
this._keyword$
|
|
4217
|
+
.pipe(debounceTime(200), distinctUntilChanged(), takeUntil(this._destroy$))
|
|
4218
|
+
.subscribe((value) => {
|
|
4219
|
+
const keywordItem = this._filterItems.keywordItem;
|
|
4220
|
+
keywordItem.model = value;
|
|
4221
|
+
this.change();
|
|
4265
4222
|
});
|
|
4266
4223
|
}
|
|
4267
4224
|
_syncSearchInputWithKeyword() {
|
|
4268
4225
|
const keywordItem = this._filterItems.keywordItem;
|
|
4269
4226
|
if (keywordItem) {
|
|
4270
|
-
this.
|
|
4227
|
+
this.keyword = keywordItem.model;
|
|
4271
4228
|
this.searchPlaceholder = keywordItem.label || 'Search';
|
|
4272
4229
|
}
|
|
4273
4230
|
}
|
|
4274
|
-
_listenKeywordItemClear() {
|
|
4275
|
-
var _a;
|
|
4276
|
-
(_a = this._filterItems
|
|
4277
|
-
.keywordItem) === null || _a === void 0 ? void 0 : _a.clear$.pipe(takeUntil(this._filterItems.keywordItem.destroy$), takeUntil(this._destroy$)).subscribe(() => {
|
|
4278
|
-
this.searchText.setValue('');
|
|
4279
|
-
});
|
|
4280
|
-
}
|
|
4281
4231
|
_listenInternalItemsChange() {
|
|
4282
4232
|
this._filterItems
|
|
4283
4233
|
.itemsChange$
|
|
@@ -4321,7 +4271,7 @@ FilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
|
|
|
4321
4271
|
FsFilterItemsStore,
|
|
4322
4272
|
SavedFiltersController,
|
|
4323
4273
|
ActionsController,
|
|
4324
|
-
], queries: [{ propertyName: "statusBar", first: true, predicate: FilterStatusBarDirective, descendants: true, read: TemplateRef }], viewQueries: [{ propertyName: "
|
|
4274
|
+
], queries: [{ propertyName: "statusBar", first: true, predicate: FilterStatusBarDirective, descendants: true, read: TemplateRef }], viewQueries: [{ propertyName: "keywordMatInput", first: true, predicate: ["keywordMatInput"], descendants: true, read: MatInput }], ngImport: i0, template: "<div class=\"filter-container\">\n <div class=\"filter-inner-container\">\n <ng-container *ngIf=\"!hasKeyword\">\n <ng-container *ngTemplateOutlet=\"statusBarContainer\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"hasKeyword\">\n <div class=\"filter-keyword\">\n <ng-container *ngIf=\"keywordVisible$ | async\">\n <mat-form-field \n [floatLabel]=\"'never'\" \n class=\"form-field-padless\" \n [ngClass]=\"search\"\n appearance=\"outline\">\n <span matPrefix>\n <mat-icon matPrefix>search</mat-icon>\n </span>\n <input\n #keywordMatInput\n matInput\n [(ngModel)]=\"keyword\"\n (ngModelChange)=\"keywordChange($event)\"\n name=\"filter-input\"\n [fsClear]=\"true\"\n [placeholder]=\"searchPlaceholder\">\n </mat-form-field>\n </ng-container>\n </div>\n </ng-container>\n <ng-container *ngIf=\"filtersBtnVisible$ | async\">\n <div class=\"filter-toobar\">\n <a \n mat-icon-button\n (click)=\"reload($event)\"\n class=\"reload\"\n *ngIf=\"config.reload\">\n <mat-icon>refresh</mat-icon>\n </a>\n <ng-container *ngIf=\"hasVisibleItemOrSorting\">\n <a\n mat-button\n class=\"filters-button\"\n [ngClass]=\"{\n 'mat-raised-button': config.button.style === 'raised' && config.button.label,\n 'mat-flat-button': config.button.style === 'flat' && config.button.label,\n 'mat-stroked-button': config.button.style === 'stroked' && config.button.label,\n 'mat-button': config.button.style === 'basic' && config.button.label,\n 'mat-icon-button': config.button.style === 'icon' || !config.button.label \n }\"\n (click)=\"changeVisibilityClick(!showFilterMenu, $event)\"\n [color]=\"config.button.color\">\n <mat-icon *ngIf=\"config.button.icon\">{{config.button.icon}}</mat-icon>\n {{ config.button.label }}\n </a>\n </ng-container>\n </div>\n </ng-container>\n <div class=\"filter-actions\">\n <fs-filter-actions\n *ngIf=\"actionsVisible$ | async\"\n [actions]=\"actions$ | async\"\n [kebabActions]=\"menuActions$ | async\">\n </fs-filter-actions>\n </div>\n </div>\n\n <ng-container *ngIf=\"hasKeyword\">\n <ng-container *ngTemplateOutlet=\"statusBarContainer\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"!hasKeyword\">\n <ng-container [ngTemplateOutlet]=\"chips\"></ng-container>\n </ng-container>\n</div>\n\n\n<ng-template #statusBarContainer>\n <ng-container *ngIf=\"statusBar\">\n <div class=\"filter-status-container\">\n <div class=\"filter-status\">\n <ng-container *ngTemplateOutlet=\"statusBar\"></ng-container>\n </div>\n <ng-container *ngIf=\"hasKeyword\">\n <ng-container [ngTemplateOutlet]=\"chips\"></ng-container>\n </ng-container>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #chips>\n <ng-container *ngIf=\"config.chips && hasFilterChips$ | async\">\n <fs-filter-chips \n class=\"filter-chips\"\n [filters]=\"items\">\n </fs-filter-chips>\n </ng-container>\n</ng-template>", styles: [".fs-filter{margin-bottom:20px;display:block}.fs-filter:not(.has-keyword) .filter-inner-container{display:flex}.fs-filter:not(.has-keyword) .filter-toobar{justify-content:flex-end}.fs-filter .filter-status-container{flex-grow:1;display:flex;justify-content:center;flex-direction:column;align-self:flex-end}.fs-filter .filter-status-container .filter-status{overflow:hidden;text-overflow:ellipsis;line-height:17px}.fs-filter .filter-inner-container{flex-direction:row;box-sizing:border-box;display:flex;position:relative;align-items:center}.fs-filter .filter-inner-container .filter-keyword{flex-direction:row;box-sizing:border-box;display:flex;align-items:center;min-width:0}.fs-filter .filter-inner-container .filter-keyword mat-form-field{max-width:100%;min-width:100px}.fs-filter .filter-inner-container .filter-keyword mat-form-field .mat-form-field-prefix .mat-icon{font-size:22px;color:#626262}.fs-filter .filter-inner-container .filter-keyword mat-form-field .mat-form-field-infix{width:250px}.fs-filter .filter-inner-container .filter-keyword mat-form-field .mat-form-field-prefix,.fs-filter .filter-inner-container .filter-keyword mat-form-field .mat-form-field-suffix{top:.45em}.fs-filter .filter-inner-container .filter-keyword .mat-form-field-wrapper{height:100%}.fs-filter .filter-inner-container .filter-keyword .mat-form-field-suffix{display:flex}.fs-filter .filter-inner-container .filter-keyword .mat-form-field-suffix .mat-icon-button{height:24px;width:24px}.fs-filter .filter-actions{display:flex;align-items:center}.fs-filter .filter-toobar{flex:1;white-space:nowrap;display:flex;align-items:center}.fs-filter .filter-toobar a{width:36px;line-height:36px}.fs-filter .results{min-height:90px;position:relative;overflow-x:auto;overflow-y:hidden}.fs-filter fs-filter-chips{margin-top:4px;display:block}@media screen and (min-width: 599px){.filter-actions{margin-left:10px}.filters-button+fs-filter-actions:not(:empty){margin-left:5px}}@media screen and (max-width: 600px){.filter-actions{margin-left:5px}.filter-actions .filters-button{font-size:0;padding:0;min-width:unset;width:36px;height:36px;border-radius:50%;box-shadow:unset!important}}@media screen and (min-width: 1200px){body.fs-filter-open{margin-right:350px}.fs-filter-backdrop{display:none}}body.fs-filter-open::-webkit-scrollbar{width:0;background:transparent}\n"], components: [{ type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i7$2.FsClearComponent, selector: "[fsClear]", inputs: ["ngModel", "fsClear"], outputs: ["ngModelChange", "cleared"] }, { type: i1$4.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-icon-button], a[mat-fab], a[mat-mini-fab], a[mat-stroked-button], a[mat-flat-button]", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matButton", "matAnchor"] }, { type: FsFilterActionsComponent, selector: "fs-filter-actions", inputs: ["kebabActions", "actions"] }, { type: FsFilterChipsComponent, selector: "fs-filter-chips", inputs: ["filters"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1$3.MatPrefix, selector: "[matPrefix]" }, { type: i3$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "async": i3.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
4325
4275
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterComponent, decorators: [{
|
|
4326
4276
|
type: Component,
|
|
4327
4277
|
args: [{
|
|
@@ -4365,12 +4315,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
4365
4315
|
}], statusBar: [{
|
|
4366
4316
|
type: ContentChild,
|
|
4367
4317
|
args: [FilterStatusBarDirective, { read: TemplateRef }]
|
|
4368
|
-
}],
|
|
4369
|
-
type: ViewChild,
|
|
4370
|
-
args: ['searchTextInput']
|
|
4371
|
-
}], searchTextMatInput: [{
|
|
4318
|
+
}], keywordMatInput: [{
|
|
4372
4319
|
type: ViewChild,
|
|
4373
|
-
args: ['
|
|
4320
|
+
args: ['keywordMatInput', { read: MatInput }]
|
|
4374
4321
|
}], showFilterMenu: [{
|
|
4375
4322
|
type: HostBinding,
|
|
4376
4323
|
args: ['class.filters-open']
|
|
@@ -4429,7 +4376,7 @@ class FsSavedFiltersMenuComponent {
|
|
|
4429
4376
|
}
|
|
4430
4377
|
}
|
|
4431
4378
|
FsSavedFiltersMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsSavedFiltersMenuComponent, deps: [{ token: FsFilterItemsStore }, { token: ExternalParamsController }, { token: SavedFiltersController }], target: i0.ɵɵFactoryTarget.Component });
|
|
4432
|
-
FsSavedFiltersMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsSavedFiltersMenuComponent, selector: "fs-filter-saved-filters-menu", outputs: { select: "select", clear: "clear", manage: "manage" }, ngImport: i0, template: "<a [fsMenuTriggerFor]=\"menu\" class=\"selector\">{{ (activeFilter$ | async)?.name || 'Not selected' }}</a>\n\n<fs-menu #menu>\n <ng-container *ngIf=\"activeFilter$ | async\">\n <ng-template fs-menu-item (click)=\"removeActiveFilter()\">\n None\n </ng-template>\n </ng-container>\n <ng-container *ngFor=\"let filter of filters$ | async\">\n <ng-template fs-menu-item (click)=\"selectFilter(filter)\">\n {{ filter.name }}\n </ng-template>\n </ng-container>\n <ng-template fs-menu-item class=\"saved-filter-last-item\" (click)=\"manageFilters()\">\n Manage\n </ng-template>\n</fs-menu>\n", styles: [":host ::ng-deep .selector{cursor:pointer}\n"], components: [{ type: i3$
|
|
4379
|
+
FsSavedFiltersMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsSavedFiltersMenuComponent, selector: "fs-filter-saved-filters-menu", outputs: { select: "select", clear: "clear", manage: "manage" }, ngImport: i0, template: "<a [fsMenuTriggerFor]=\"menu\" class=\"selector\">{{ (activeFilter$ | async)?.name || 'Not selected' }}</a>\n\n<fs-menu #menu>\n <ng-container *ngIf=\"activeFilter$ | async\">\n <ng-template fs-menu-item (click)=\"removeActiveFilter()\">\n None\n </ng-template>\n </ng-container>\n <ng-container *ngFor=\"let filter of filters$ | async\">\n <ng-template fs-menu-item (click)=\"selectFilter(filter)\">\n {{ filter.name }}\n </ng-template>\n </ng-container>\n <ng-template fs-menu-item class=\"saved-filter-last-item\" (click)=\"manageFilters()\">\n Manage\n </ng-template>\n</fs-menu>\n", styles: [":host ::ng-deep .selector{cursor:pointer}\n"], components: [{ type: i3$3.FsMenuComponent, selector: "fs-menu", inputs: ["class", "buttonClass"], outputs: ["opened", "closed"] }], directives: [{ type: i3$3.FsMenuTriggerDirective, selector: "[fsMenuTriggerFor]", inputs: ["fsMenuTriggerFor"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$3.FsMenuItemDirective, selector: "fs-menu-group,[fs-menu-item]" }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i3.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4433
4380
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsSavedFiltersMenuComponent, decorators: [{
|
|
4434
4381
|
type: Component,
|
|
4435
4382
|
args: [{
|
|
@@ -4509,12 +4456,13 @@ FsFilterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
|
|
|
4509
4456
|
FsAutocompleteModule,
|
|
4510
4457
|
FsAutocompleteChipsModule,
|
|
4511
4458
|
FsScrollModule,
|
|
4512
|
-
PortalModule,
|
|
4513
4459
|
FsMenuModule,
|
|
4514
4460
|
FsSkeletonModule,
|
|
4515
4461
|
FsFormModule,
|
|
4516
4462
|
FsFileModule,
|
|
4517
|
-
|
|
4463
|
+
FsClearModule,
|
|
4464
|
+
FsPopoverModule,
|
|
4465
|
+
PortalModule], exports: [FilterComponent,
|
|
4518
4466
|
FilterStatusBarDirective,
|
|
4519
4467
|
FsSavedFiltersMenuComponent] });
|
|
4520
4468
|
FsFilterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFilterModule, providers: [
|
|
@@ -4540,12 +4488,13 @@ FsFilterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
|
|
|
4540
4488
|
FsAutocompleteModule,
|
|
4541
4489
|
FsAutocompleteChipsModule,
|
|
4542
4490
|
FsScrollModule,
|
|
4543
|
-
PortalModule,
|
|
4544
4491
|
FsMenuModule,
|
|
4545
4492
|
FsSkeletonModule,
|
|
4546
4493
|
FsFormModule,
|
|
4547
4494
|
FsFileModule,
|
|
4495
|
+
FsClearModule,
|
|
4548
4496
|
FsPopoverModule,
|
|
4497
|
+
PortalModule,
|
|
4549
4498
|
]] });
|
|
4550
4499
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFilterModule, decorators: [{
|
|
4551
4500
|
type: NgModule,
|
|
@@ -4571,12 +4520,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
4571
4520
|
FsAutocompleteModule,
|
|
4572
4521
|
FsAutocompleteChipsModule,
|
|
4573
4522
|
FsScrollModule,
|
|
4574
|
-
PortalModule,
|
|
4575
4523
|
FsMenuModule,
|
|
4576
4524
|
FsSkeletonModule,
|
|
4577
4525
|
FsFormModule,
|
|
4578
4526
|
FsFileModule,
|
|
4527
|
+
FsClearModule,
|
|
4579
4528
|
FsPopoverModule,
|
|
4529
|
+
PortalModule,
|
|
4580
4530
|
],
|
|
4581
4531
|
declarations: [
|
|
4582
4532
|
BaseItemComponent,
|