@firestitch/filter 13.0.14 → 13.1.0
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 -1
- package/app/fs-filter.module.d.ts +18 -17
- package/app/helpers/create-filter-item.d.ts +1 -1
- package/app/interfaces/config.interface.d.ts +4 -0
- package/app/models/filter-config.d.ts +2 -1
- package/esm2020/app/components/actions/actions.component.mjs +3 -3
- package/esm2020/app/components/filter/filter.component.mjs +38 -9
- package/esm2020/app/components/filters-item/base-item/base-item.component.mjs +1 -1
- package/esm2020/app/fs-filter.module.mjs +5 -1
- package/esm2020/app/interfaces/config.interface.mjs +1 -1
- package/esm2020/app/models/action-menu-item.model.mjs +2 -2
- package/esm2020/app/models/filter-config.mjs +2 -1
- package/esm2020/app/services/items-store.service.mjs +5 -3
- package/fesm2015/firestitch-filter.mjs +48 -11
- package/fesm2015/firestitch-filter.mjs.map +1 -1
- package/fesm2020/firestitch-filter.mjs +47 -11
- package/fesm2020/firestitch-filter.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventEmitter, NgZone, OnDestroy, OnInit } from '@angular/core';
|
|
1
|
+
import { ElementRef, EventEmitter, NgZone, OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { MatInput } from '@angular/material/input';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { ActionsController } from '../../classes/actions-controller';
|
|
@@ -8,6 +8,7 @@ import { ISortingChangeEvent } from '../../interfaces/filter.interface';
|
|
|
8
8
|
import { IUpdateFilterItemConfig } from '../../interfaces/update-filter-item.interface';
|
|
9
9
|
import { FsFilterConfig } from '../../models/filter-config';
|
|
10
10
|
import { BaseItem } from '../../models/items/base-item';
|
|
11
|
+
import { TextItem } from '../../models/items/text-item';
|
|
11
12
|
import { ExternalParamsController } from '../../services/external-params-controller.service';
|
|
12
13
|
import { FsFilterOverlayService } from '../../services/filter-overlay.service';
|
|
13
14
|
import { FsFilterItemsStore } from '../../services/items-store.service';
|
|
@@ -29,6 +30,7 @@ export declare class FilterComponent implements OnInit, OnDestroy {
|
|
|
29
30
|
ready: EventEmitter<void>;
|
|
30
31
|
statusBar: FilterStatusBarDirective;
|
|
31
32
|
keywordMatInput: MatInput;
|
|
33
|
+
autoReloadEl: ElementRef;
|
|
32
34
|
showFilterMenu: boolean;
|
|
33
35
|
windowDesktop: boolean;
|
|
34
36
|
fsFilterClass: boolean;
|
|
@@ -48,6 +50,7 @@ export declare class FilterComponent implements OnInit, OnDestroy {
|
|
|
48
50
|
get filterParamsQuery(): Record<string, unknown>;
|
|
49
51
|
get items(): BaseItem<IFilterConfigItem>[];
|
|
50
52
|
get visibleItems(): BaseItem<IFilterConfigItem>[];
|
|
53
|
+
get keywordItem(): TextItem | null;
|
|
51
54
|
get itemsReady$(): Observable<boolean>;
|
|
52
55
|
get hasFilterChips$(): Observable<boolean>;
|
|
53
56
|
get hasVisibleItemOrSorting(): boolean;
|
|
@@ -137,6 +140,7 @@ export declare class FilterComponent implements OnInit, OnDestroy {
|
|
|
137
140
|
* Close filter window and do change callback
|
|
138
141
|
*/
|
|
139
142
|
search(event: any): void;
|
|
143
|
+
autoReload(event: any): void;
|
|
140
144
|
reload(event?: any): void;
|
|
141
145
|
getItem(name: any): BaseItem<any>;
|
|
142
146
|
fetchQueryParams(): void;
|
|
@@ -181,6 +185,7 @@ export declare class FilterComponent implements OnInit, OnDestroy {
|
|
|
181
185
|
private _updateWindowWidth;
|
|
182
186
|
private _listenEscButton;
|
|
183
187
|
private _listenWindowResize;
|
|
188
|
+
private _initAutoReload;
|
|
184
189
|
private _listenInputChanges;
|
|
185
190
|
private _syncSearchInputWithKeyword;
|
|
186
191
|
private _listenInternalItemsChange;
|
|
@@ -42,25 +42,26 @@ import * as i38 from "@angular/material/checkbox";
|
|
|
42
42
|
import * as i39 from "@angular/material/autocomplete";
|
|
43
43
|
import * as i40 from "@angular/material/button";
|
|
44
44
|
import * as i41 from "@angular/material/dialog";
|
|
45
|
-
import * as i42 from "@
|
|
46
|
-
import * as i43 from "@firestitch/
|
|
47
|
-
import * as i44 from "@firestitch/
|
|
48
|
-
import * as i45 from "@firestitch/
|
|
49
|
-
import * as i46 from "@firestitch/
|
|
50
|
-
import * as i47 from "@firestitch/
|
|
51
|
-
import * as i48 from "@firestitch/autocomplete
|
|
52
|
-
import * as i49 from "@firestitch/
|
|
53
|
-
import * as i50 from "@firestitch/
|
|
54
|
-
import * as i51 from "@firestitch/
|
|
55
|
-
import * as i52 from "@firestitch/
|
|
56
|
-
import * as i53 from "@firestitch/
|
|
57
|
-
import * as i54 from "@firestitch/
|
|
58
|
-
import * as i55 from "@firestitch/
|
|
59
|
-
import * as i56 from "@firestitch/
|
|
60
|
-
import * as i57 from "@
|
|
45
|
+
import * as i42 from "@angular/material/tooltip";
|
|
46
|
+
import * as i43 from "@firestitch/chip";
|
|
47
|
+
import * as i44 from "@firestitch/common";
|
|
48
|
+
import * as i45 from "@firestitch/store";
|
|
49
|
+
import * as i46 from "@firestitch/datepicker";
|
|
50
|
+
import * as i47 from "@firestitch/label";
|
|
51
|
+
import * as i48 from "@firestitch/autocomplete";
|
|
52
|
+
import * as i49 from "@firestitch/autocomplete-chips";
|
|
53
|
+
import * as i50 from "@firestitch/scroll";
|
|
54
|
+
import * as i51 from "@firestitch/menu";
|
|
55
|
+
import * as i52 from "@firestitch/skeleton";
|
|
56
|
+
import * as i53 from "@firestitch/form";
|
|
57
|
+
import * as i54 from "@firestitch/file";
|
|
58
|
+
import * as i55 from "@firestitch/selectbutton";
|
|
59
|
+
import * as i56 from "@firestitch/clear";
|
|
60
|
+
import * as i57 from "@firestitch/popover";
|
|
61
|
+
import * as i58 from "@angular/cdk/portal";
|
|
61
62
|
export declare class FsFilterModule {
|
|
62
63
|
static forRoot(config?: FilterConfig): ModuleWithProviders<FsFilterModule>;
|
|
63
64
|
static ɵfac: i0.ɵɵFactoryDeclaration<FsFilterModule, never>;
|
|
64
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<FsFilterModule, [typeof i1.BaseItemComponent, typeof i2.FilterComponent, typeof i3.FilterItemComponent, typeof i4.FsFilterChipsComponent, typeof i5.SelectComponent, typeof i6.SelectGroupsComponent, typeof i7.SelectSimpleComponent, typeof i8.SelectMultipleComponent, typeof i9.ChipsComponent, typeof i10.TextComponent, typeof i11.WeekComponent, typeof i12.RangeComponent, typeof i13.AutocompleteComponent, typeof i14.AutocompletechipsComponent, typeof i15.DateComponent, typeof i16.DateRangeComponent, typeof i17.CheckboxComponent, typeof i18.FilterDrawerComponent, typeof i19.SelectBackdropComponent, typeof i20.FsFilterChipComponent, typeof i21.FsFilterChipContentComponent, typeof i22.FsFilterDrawerActionsComponent, typeof i23.FsFilterSavedFilterEditComponent, typeof i24.FsSavedFiltersMenuComponent, typeof i25.FsFilterActionsComponent, typeof i26.FsFilterActionButtonComponent, typeof i27.FsFilterActionKebabActionsComponent, typeof i28.FilterStatusBarDirective, typeof i29.FocusToItemDirective, typeof i30.FsFilterIsolateValues], [typeof i31.CommonModule, typeof i32.RouterModule, typeof i33.FormsModule, typeof i33.ReactiveFormsModule, typeof i34.MatIconModule, typeof i35.MatInputModule, typeof i36.MatSelectModule, typeof i37.MatChipsModule, typeof i38.MatCheckboxModule, typeof i39.MatAutocompleteModule, typeof i40.MatButtonModule, typeof i41.MatDialogModule, typeof i42.
|
|
65
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FsFilterModule, [typeof i1.BaseItemComponent, typeof i2.FilterComponent, typeof i3.FilterItemComponent, typeof i4.FsFilterChipsComponent, typeof i5.SelectComponent, typeof i6.SelectGroupsComponent, typeof i7.SelectSimpleComponent, typeof i8.SelectMultipleComponent, typeof i9.ChipsComponent, typeof i10.TextComponent, typeof i11.WeekComponent, typeof i12.RangeComponent, typeof i13.AutocompleteComponent, typeof i14.AutocompletechipsComponent, typeof i15.DateComponent, typeof i16.DateRangeComponent, typeof i17.CheckboxComponent, typeof i18.FilterDrawerComponent, typeof i19.SelectBackdropComponent, typeof i20.FsFilterChipComponent, typeof i21.FsFilterChipContentComponent, typeof i22.FsFilterDrawerActionsComponent, typeof i23.FsFilterSavedFilterEditComponent, typeof i24.FsSavedFiltersMenuComponent, typeof i25.FsFilterActionsComponent, typeof i26.FsFilterActionButtonComponent, typeof i27.FsFilterActionKebabActionsComponent, typeof i28.FilterStatusBarDirective, typeof i29.FocusToItemDirective, typeof i30.FsFilterIsolateValues], [typeof i31.CommonModule, typeof i32.RouterModule, typeof i33.FormsModule, typeof i33.ReactiveFormsModule, typeof i34.MatIconModule, typeof i35.MatInputModule, typeof i36.MatSelectModule, typeof i37.MatChipsModule, typeof i38.MatCheckboxModule, typeof i39.MatAutocompleteModule, typeof i40.MatButtonModule, typeof i41.MatDialogModule, typeof i42.MatTooltipModule, typeof i43.FsChipModule, typeof i44.FsCommonModule, typeof i45.FsStoreModule, typeof i46.FsDatePickerModule, typeof i47.FsLabelModule, typeof i48.FsAutocompleteModule, typeof i49.FsAutocompleteChipsModule, typeof i50.FsScrollModule, typeof i51.FsMenuModule, typeof i52.FsSkeletonModule, typeof i53.FsFormModule, typeof i54.FsFileModule, typeof i55.FsSelectButtonModule, typeof i56.FsClearModule, typeof i57.FsPopoverModule, typeof i58.PortalModule], [typeof i2.FilterComponent, typeof i28.FilterStatusBarDirective, typeof i24.FsSavedFiltersMenuComponent]>;
|
|
65
66
|
static ɵinj: i0.ɵɵInjectorDeclaration<FsFilterModule>;
|
|
66
67
|
}
|
|
@@ -11,4 +11,4 @@ import { DateTimeRangeItem } from '../models/items/date-time-range-item';
|
|
|
11
11
|
import { RangeItem } from '../models/items/range-item';
|
|
12
12
|
import { TextItem } from '../models/items/text-item';
|
|
13
13
|
import { WeekItem } from '../models/items/week-item';
|
|
14
|
-
export declare function createFilterItem(item: IFilterConfigItem, config: any, filter: FilterComponent): RangeItem | DateRangeItem | DateTimeRangeItem | WeekItem | AutocompleteChipsItem | AutocompleteItem | CheckboxItem | ChipsItem | DateItem | DateTimeItem | import("../models/items/select/multiple-select-item").MultipleSelectItem | import("../models/items/select/simple-select-item").SimpleSelectItem
|
|
14
|
+
export declare function createFilterItem(item: IFilterConfigItem, config: any, filter: FilterComponent): TextItem | RangeItem | DateRangeItem | DateTimeRangeItem | WeekItem | AutocompleteChipsItem | AutocompleteItem | CheckboxItem | ChipsItem | DateItem | DateTimeItem | import("../models/items/select/multiple-select-item").MultipleSelectItem | import("../models/items/select/simple-select-item").SimpleSelectItem;
|
|
@@ -32,6 +32,10 @@ export interface FilterConfig {
|
|
|
32
32
|
button?: FilterButton;
|
|
33
33
|
savedFilters?: IFilterSavedFiltersConfig;
|
|
34
34
|
actions?: FsFilterAction[];
|
|
35
|
+
autoReload?: FsFilterConfigAutoReload;
|
|
36
|
+
}
|
|
37
|
+
export interface FsFilterConfigAutoReload {
|
|
38
|
+
seconds: number;
|
|
35
39
|
}
|
|
36
40
|
export declare type IFilterConfigItem = (IFilterConfigBaseItem | IFilterConfigCheckboxItem | IFilterConfigSelectItem | IFilterConfigChipsItem | IFilterConfigTextItem | IFilterConfigDateItem | IFilterConfigAutocompleteItem | IFilterConfigAutocompleteChipsItem | IFilterConfigRangeItem | IFilterConfigDateRangeItem);
|
|
37
41
|
export interface SortItem {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FsFilterAction } from '../interfaces/action.interface';
|
|
2
|
-
import { ChangeFn, FilterSort, Sort } from '../interfaces/config.interface';
|
|
2
|
+
import { ChangeFn, FilterSort, FsFilterConfigAutoReload, Sort } from '../interfaces/config.interface';
|
|
3
3
|
import { IFilterSavedFiltersConfig } from '../interfaces/saved-filters.interface';
|
|
4
4
|
import { FilterButton, FilterConfig, FsFilterPersistance, IFilterConfigItem } from './../interfaces/config.interface';
|
|
5
5
|
export declare const SORT_BY_FIELD = "sortName";
|
|
@@ -17,6 +17,7 @@ export declare class FsFilterConfig {
|
|
|
17
17
|
init: (query?: any, sort?: FilterSort | null, filter?: any) => void;
|
|
18
18
|
change: ChangeFn;
|
|
19
19
|
reload: ChangeFn;
|
|
20
|
+
autoReload: FsFilterConfigAutoReload;
|
|
20
21
|
clear: ChangeFn;
|
|
21
22
|
sortChange: ChangeFn;
|
|
22
23
|
case: 'snake' | 'camel';
|
|
@@ -27,13 +27,13 @@ export class FsFilterActionsComponent {
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
FsFilterActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsFilterActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
30
|
-
FsFilterActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: FsFilterActionsComponent, selector: "fs-filter-actions", inputs: { kebabActions: "kebabActions", actions: "actions" }, ngImport: i0, template: "<ng-container *ngFor=\"let action of actions\">\n <ng-container [ngSwitch]=\"action.mode\">\n <ng-container *ngSwitchCase=\"ActionMode.Button\">\n <fs-filter-action-button\n [action]=\"action\"\n class=\"action\"\n fsPopover\n [enabled]=\"!!action.tooltip\"\n [text]=\"action.tooltip\">\n </fs-filter-action-button>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"ActionMode.Menu\">\n <fs-filter-action-button\n class=\"action\"\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 class=\"action\">\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]=\"
|
|
30
|
+
FsFilterActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: FsFilterActionsComponent, selector: "fs-filter-actions", inputs: { kebabActions: "kebabActions", actions: "actions" }, ngImport: i0, template: "<ng-container *ngFor=\"let action of actions\">\n <ng-container [ngSwitch]=\"action.mode\">\n <ng-container *ngSwitchCase=\"ActionMode.Button\">\n <fs-filter-action-button\n [action]=\"action\"\n class=\"action\"\n fsPopover\n [enabled]=\"!!action.tooltip\"\n [text]=\"action.tooltip\">\n </fs-filter-action-button>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"ActionMode.Menu\">\n <fs-filter-action-button\n class=\"action\"\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 class=\"action\">\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) === false\"\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) === false\"\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=\"ActionMode.SelectButton\">\n <mat-select \n class=\"action\"\n [ngClass]=\"{ \n 'mat-stroked-button': action.type === ActionType.Stroked,\n 'mat-raised-button': action.type === ActionType.Raised,\n 'mat-flat-button': action.type === ActionType.Flat,\n 'mat-basic-button': action.type === ActionType.Basic\n }\"\n [placeholder]=\"action.label\"\n [(ngModel)]=\"action.value\" \n (ngModelChange)=\"actionChange(action, $event)\"\n fsSelectButton>\n <mat-option \n *ngFor=\"let item of action.values\" \n [value]=\"item.value\">\n {{ item.name }}\n </mat-option>\n </mat-select>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"ActionMode.File\">\n <fs-file\n class=\"action 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<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+.action{margin-left:5px}.menu-button{width:36px;height:36px;line-height:36px}\n"], components: [{ type: i1.FsFilterActionButtonComponent, selector: "fs-filter-action-button", inputs: ["action"] }, { type: i2.FsMenuComponent, selector: "fs-menu", inputs: ["class", "buttonClass", "buttonType", "buttonColor"], outputs: ["opened", "closed"] }, { type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i6.FsFileComponent, selector: "fs-file", inputs: ["minHeight", "minWidth", "orientate", "multiple", "capture", "allowClick", "allowDrop", "accept", "disabled", "imageWidth", "imageHeight", "imageQuality"], outputs: ["select", "selectPreviews", "error", "clicked", "declined"] }, { type: i7.FsFilterActionKebabActionsComponent, selector: "fs-filter-action-kebab-actions", inputs: ["kebabActions"] }], directives: [{ type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i8.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i8.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i9.FsPopoverDirective, selector: "[fsPopover]", inputs: ["text", "template", "data", "leaveDelay", "showDelay", "maxWidth", "wrapperClass", "autoShow", "autoClose", "loadingDiameter", "loading", "indication", "position", "theme", "size", "trigger", "enabled"] }, { type: i2.FsMenuTriggerDirective, selector: "[fsMenuTriggerFor]", inputs: ["fsMenuTriggerFor"] }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.FsMenuItemDirective, selector: "fs-menu-group,[fs-menu-item]" }, { type: i10.FsSelectButtonDirective, selector: "[fsSelectButton]", inputs: ["color", "width", "buttonType"] }, { type: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i11.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i11.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i12.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }], pipes: { "async": i8.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
31
31
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsFilterActionsComponent, decorators: [{
|
|
32
32
|
type: Component,
|
|
33
|
-
args: [{ selector: 'fs-filter-actions', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngFor=\"let action of actions\">\n <ng-container [ngSwitch]=\"action.mode\">\n <ng-container *ngSwitchCase=\"ActionMode.Button\">\n <fs-filter-action-button\n [action]=\"action\"\n class=\"action\"\n fsPopover\n [enabled]=\"!!action.tooltip\"\n [text]=\"action.tooltip\">\n </fs-filter-action-button>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"ActionMode.Menu\">\n <fs-filter-action-button\n class=\"action\"\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 class=\"action\">\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]=\"
|
|
33
|
+
args: [{ selector: 'fs-filter-actions', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngFor=\"let action of actions\">\n <ng-container [ngSwitch]=\"action.mode\">\n <ng-container *ngSwitchCase=\"ActionMode.Button\">\n <fs-filter-action-button\n [action]=\"action\"\n class=\"action\"\n fsPopover\n [enabled]=\"!!action.tooltip\"\n [text]=\"action.tooltip\">\n </fs-filter-action-button>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"ActionMode.Menu\">\n <fs-filter-action-button\n class=\"action\"\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 class=\"action\">\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) === false\"\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) === false\"\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=\"ActionMode.SelectButton\">\n <mat-select \n class=\"action\"\n [ngClass]=\"{ \n 'mat-stroked-button': action.type === ActionType.Stroked,\n 'mat-raised-button': action.type === ActionType.Raised,\n 'mat-flat-button': action.type === ActionType.Flat,\n 'mat-basic-button': action.type === ActionType.Basic\n }\"\n [placeholder]=\"action.label\"\n [(ngModel)]=\"action.value\" \n (ngModelChange)=\"actionChange(action, $event)\"\n fsSelectButton>\n <mat-option \n *ngFor=\"let item of action.values\" \n [value]=\"item.value\">\n {{ item.name }}\n </mat-option>\n </mat-select>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"ActionMode.File\">\n <fs-file\n class=\"action 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<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+.action{margin-left:5px}.menu-button{width:36px;height:36px;line-height:36px}\n"] }]
|
|
34
34
|
}], propDecorators: { kebabActions: [{
|
|
35
35
|
type: Input
|
|
36
36
|
}], actions: [{
|
|
37
37
|
type: Input
|
|
38
38
|
}] } });
|
|
39
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
39
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWN0aW9ucy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvYXBwL2NvbXBvbmVudHMvYWN0aW9ucy9hY3Rpb25zLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uL3NyYy9hcHAvY29tcG9uZW50cy9hY3Rpb25zL2FjdGlvbnMuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNMLHVCQUF1QixFQUN2QixTQUFTLEVBQ1QsS0FBSyxHQUNOLE1BQU0sZUFBZSxDQUFDO0FBRXZCLE9BQU8sRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLE1BQU0sYUFBYSxDQUFDOzs7Ozs7Ozs7Ozs7OztBQVV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0gZmFsc2VcIlxuICAgICAgICAgICAgICAgICAgICAoY2xpY2spPVwic3ViQWN0aW9uLmNsaWNrKCRldmVudClcIj5cbiAgICAgICAgICAgICAgICAgIDxtYXQtaWNvbiAqbmdJZj1cInN1YkFjdGlvbi5pY29uXCI+e3tzdWJBY3Rpb24uaWNvbn19PC9tYXQtaWNvbj5cbiAgICAgICAgICAgICAgICAgIHt7c3ViQWN0aW9uLmxhYmVsfX1cbiAgICAgICAgICAgICAgICA8L25nLXRlbXBsYXRlPlxuICAgICAgICAgICAgICA8L25nLWNvbnRhaW5lcj5cbiAgICAgICAgICAgIDwvZnMtbWVudS1ncm91cD5cbiAgICAgICAgICA8L25nLWNvbnRhaW5lcj5cbiAgICAgICAgICA8bmctdGVtcGxhdGUgI3NpbXBsZU1lbnVJdGVtPlxuICAgICAgICAgICAgPG5nLXRlbXBsYXRlXG4gICAgICAgICAgICAgICAgZnMtbWVudS1pdGVtXG4gICAgICAgICAgICAgICAgW2xpbmtdPVwiY2hpbGRBY3Rpb24ucm91dGVyTGluaz8ubGlua1wiXG4gICAgICAgICAgICAgICAgW3F1ZXJ5UGFyYW1zXT1cImNoaWxkQWN0aW9uLnJvdXRlckxpbms/LnF1ZXJ5UGFyYW1zXCJcbiAgICAgICAgICAgICAgICBbaGlkZGVuXT1cIihjaGlsZEFjdGlvbi52aXNpYmxlJCB8IGFzeW5jKSA9PT0gZmFsc2VcIlxuICAgICAgICAgICAgICAgIChjbGljayk9XCJjaGlsZEFjdGlvbi5jbGljaygkZXZlbnQpO1wiPlxuICAgICAgICAgICAgICA8bWF0LWljb24gKm5nSWY9XCJjaGlsZEFjdGlvbi5pY29uXCI+e3tjaGlsZEFjdGlvbi5pY29ufX08L21hdC1pY29uPlxuICAgICAgICAgICAgICB7e2NoaWxkQWN0aW9uLmxhYmVsfX1cbiAgICAgICAgICAgIDwvbmctdGVtcGxhdGU+XG4gICAgICAgICAgPC9uZy10ZW1wbGF0ZT5cbiAgICAgICAgPC9uZy1j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