@firestitch/filter 9.9.5 → 9.10.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.
Files changed (28) hide show
  1. package/app/components/filter/filter.component.d.ts +5 -2
  2. package/app/interfaces/action.interface.d.ts +6 -0
  3. package/app/models/action.model.d.ts +7 -0
  4. package/app/services/external-params-controller.service.d.ts +1 -0
  5. package/bundles/firestitch-filter.umd.js +43 -22
  6. package/bundles/firestitch-filter.umd.js.map +1 -1
  7. package/bundles/firestitch-filter.umd.min.js +2 -2
  8. package/bundles/firestitch-filter.umd.min.js.map +1 -1
  9. package/esm2015/app/components/action-button/action-button.component.js +2 -2
  10. package/esm2015/app/components/action-kebab-actions/action-kebab-actions.component.js +2 -2
  11. package/esm2015/app/components/actions/actions.component.js +2 -2
  12. package/esm2015/app/components/filter/filter.component.js +17 -6
  13. package/esm2015/app/interfaces/action.interface.js +1 -1
  14. package/esm2015/app/models/action.model.js +8 -1
  15. package/esm2015/app/services/external-params-controller.service.js +16 -13
  16. package/esm5/app/components/action-button/action-button.component.js +2 -2
  17. package/esm5/app/components/action-kebab-actions/action-kebab-actions.component.js +2 -2
  18. package/esm5/app/components/actions/actions.component.js +2 -2
  19. package/esm5/app/components/filter/filter.component.js +17 -6
  20. package/esm5/app/interfaces/action.interface.js +1 -1
  21. package/esm5/app/models/action.model.js +8 -1
  22. package/esm5/app/services/external-params-controller.service.js +18 -15
  23. package/fesm2015/firestitch-filter.js +41 -20
  24. package/fesm2015/firestitch-filter.js.map +1 -1
  25. package/fesm5/firestitch-filter.js +43 -22
  26. package/fesm5/firestitch-filter.js.map +1 -1
  27. package/firestitch-filter.metadata.json +1 -1
  28. package/package.json +1 -1
@@ -4,6 +4,7 @@ import { MatInput } from '@angular/material/input';
4
4
  import { Observable } from 'rxjs';
5
5
  import { FsFilterConfig } from '../../models/filter-config';
6
6
  import { FsFilterOverlayService } from '../../services/filter-overlay.service';
7
+ import { IFilterConfigItem } from '../../interfaces/config.interface';
7
8
  import { BaseItem } from '../../models/items/base-item';
8
9
  import { FsFilterItemsStore } from '../../services/items-store.service';
9
10
  import { ExternalParamsController } from '../../services/external-params-controller.service';
@@ -43,8 +44,8 @@ export declare class FilterComponent implements OnInit, AfterViewInit, OnDestroy
43
44
  get config(): FsFilterConfig;
44
45
  get filterParams(): Record<string, unknown>;
45
46
  get filterParamsQuery(): Record<string, unknown>;
46
- get items(): BaseItem<import("../../interfaces/config.interface").IFilterConfigItem>[];
47
- get visibleItems(): BaseItem<import("../../interfaces/config.interface").IFilterConfigItem>[];
47
+ get items(): BaseItem<IFilterConfigItem>[];
48
+ get visibleItems(): BaseItem<IFilterConfigItem>[];
48
49
  get itemsReady$(): Observable<boolean>;
49
50
  get hasFilterChips$(): Observable<boolean>;
50
51
  get hasVisibleItemOrSorting(): boolean;
@@ -170,6 +171,7 @@ export declare class FilterComponent implements OnInit, AfterViewInit, OnDestroy
170
171
  * Go through actions and check disabled() callback and update disabled state
171
172
  */
172
173
  updateDisabledState(): void;
174
+ setItems(items: IFilterConfigItem[]): void;
173
175
  private _initFilterWithConfig;
174
176
  private _destroyFilterDrawer;
175
177
  private _updateWindowWidth;
@@ -177,6 +179,7 @@ export declare class FilterComponent implements OnInit, AfterViewInit, OnDestroy
177
179
  private _listenInputKeyEvents;
178
180
  private _listenWindowResize;
179
181
  private _listenInputChanges;
182
+ private _syncSearchInputWithKeyword;
180
183
  private _listenKeywordItemClear;
181
184
  private _listenInternalItemsChange;
182
185
  private _initOverlay;
@@ -17,6 +17,7 @@ interface IFsFilterBaseAction {
17
17
  className?: string;
18
18
  color?: ThemePalette;
19
19
  icon?: string;
20
+ iconPlacement?: 'left' | 'right';
20
21
  label?: string;
21
22
  primary?: boolean;
22
23
  show?: FsFilterActionShowFn;
@@ -42,6 +43,11 @@ export interface IFsFilterFileAction extends IFsFilterBaseAction {
42
43
  multiple?: boolean;
43
44
  accept?: string;
44
45
  disabled?: FsFilterActionDisabledFn;
46
+ minWidth?: number;
47
+ minHeight?: number;
48
+ maxWidth?: number;
49
+ maxHeight?: number;
50
+ imageQuality?: number;
45
51
  }
46
52
  export interface IFsFilterMenuActionGroupItem {
47
53
  label?: string;
@@ -7,6 +7,7 @@ import { ActionMenuItem } from './action-menu-item.model';
7
7
  export declare class Action {
8
8
  primary: boolean;
9
9
  icon: string;
10
+ iconPlacement: 'left' | 'right';
10
11
  label: string;
11
12
  menu: boolean;
12
13
  color: ThemePalette;
@@ -18,6 +19,12 @@ export declare class Action {
18
19
  fileSelected: FsFilterFileActionSelectFn;
19
20
  fileError: FsFilterFileActionErrorFn;
20
21
  multiple: boolean;
22
+ accept: string;
23
+ minWidth: number;
24
+ minHeight: number;
25
+ maxWidth: number;
26
+ maxHeight: number;
27
+ imageQuality: number;
21
28
  mode: ActionMode;
22
29
  isReorderAction: boolean;
23
30
  classArray: string[];
@@ -28,6 +28,7 @@ export declare class ExternalParamsController implements OnDestroy {
28
28
  setConfig(config: any): void;
29
29
  setActiveSavedFilter(savedFilter: IFilterSavedFilter): void;
30
30
  reloadFiltersWithValues(params: IFilterExternalParams, shouldResetSavedFilters?: boolean): void;
31
+ initItems(): void;
31
32
  _initItemsValues(): void;
32
33
  private _initPersistance;
33
34
  private _initQueryParams;
@@ -2640,11 +2640,27 @@
2640
2640
  this._destroy$.complete();
2641
2641
  };
2642
2642
  ExternalParamsController.prototype.setConfig = function (config) {
2643
- var _this = this;
2644
2643
  this._config = config;
2645
2644
  this._initPersistance();
2646
2645
  this._initQueryParams();
2647
2646
  this._initSavedFilters();
2647
+ this.initItems();
2648
+ };
2649
+ ExternalParamsController.prototype.setActiveSavedFilter = function (savedFilter) {
2650
+ this.savedFiltersController.setActiveFilter(savedFilter);
2651
+ if (savedFilter) {
2652
+ this.reloadFiltersWithValues(savedFilter.filters, false);
2653
+ }
2654
+ };
2655
+ ExternalParamsController.prototype.reloadFiltersWithValues = function (params, shouldResetSavedFilters) {
2656
+ if (shouldResetSavedFilters === void 0) { shouldResetSavedFilters = true; }
2657
+ this._shouldResetSavedFilters = shouldResetSavedFilters;
2658
+ this._itemsStore.updateItemsWithValues(params);
2659
+ this._saveQueryParams();
2660
+ this._savePersistedParams();
2661
+ };
2662
+ ExternalParamsController.prototype.initItems = function () {
2663
+ var _this = this;
2648
2664
  this._pending$.next(true);
2649
2665
  if (this._savedFilters.enabled) {
2650
2666
  this._savedFilters
@@ -2663,19 +2679,6 @@
2663
2679
  }
2664
2680
  this._listenItemsChange();
2665
2681
  };
2666
- ExternalParamsController.prototype.setActiveSavedFilter = function (savedFilter) {
2667
- this.savedFiltersController.setActiveFilter(savedFilter);
2668
- if (savedFilter) {
2669
- this.reloadFiltersWithValues(savedFilter.filters, false);
2670
- }
2671
- };
2672
- ExternalParamsController.prototype.reloadFiltersWithValues = function (params, shouldResetSavedFilters) {
2673
- if (shouldResetSavedFilters === void 0) { shouldResetSavedFilters = true; }
2674
- this._shouldResetSavedFilters = shouldResetSavedFilters;
2675
- this._itemsStore.updateItemsWithValues(params);
2676
- this._saveQueryParams();
2677
- this._savePersistedParams();
2678
- };
2679
2682
  ExternalParamsController.prototype._initItemsValues = function () {
2680
2683
  this._itemsStore.initItemValues(this.params);
2681
2684
  this._saveQueryParams();
@@ -3225,6 +3228,7 @@
3225
3228
  this.label = config.label;
3226
3229
  this.mode = config.mode;
3227
3230
  this.icon = config.icon;
3231
+ this.iconPlacement = config.iconPlacement;
3228
3232
  this._showFn = config.show;
3229
3233
  this.tabIndex = (_d = config.tabIndex) !== null && _d !== void 0 ? _d : 0;
3230
3234
  if (config.multiple !== undefined) {
@@ -3259,6 +3263,12 @@
3259
3263
  {
3260
3264
  this.fileSelected = config.select;
3261
3265
  this.fileError = config.error;
3266
+ this.accept = config.accept;
3267
+ this.imageQuality = config.imageQuality;
3268
+ this.minWidth = config.minWidth;
3269
+ this.minHeight = config.minHeight;
3270
+ this.maxWidth = config.maxWidth;
3271
+ this.maxHeight = config.maxHeight;
3262
3272
  this.click = (_f = config.click) !== null && _f !== void 0 ? _f : (function () { });
3263
3273
  this._disabledFn = config.disabled;
3264
3274
  this.updateDisabledState();
@@ -3861,6 +3871,14 @@
3861
3871
  FilterComponent.prototype.updateDisabledState = function () {
3862
3872
  this._actions.updateDisabledState();
3863
3873
  };
3874
+ FilterComponent.prototype.setItems = function (items) {
3875
+ this._filterItems.destroyItems();
3876
+ this.config.items = items;
3877
+ this._filterItems.setConfig(this._config);
3878
+ this._externalParams.initItems();
3879
+ this._syncSearchInputWithKeyword();
3880
+ this._listenKeywordItemClear();
3881
+ };
3864
3882
  FilterComponent.prototype._initFilterWithConfig = function (config) {
3865
3883
  if (this.config) {
3866
3884
  this._filterItems.destroyItems();
@@ -3870,11 +3888,7 @@
3870
3888
  this._actions.initActions(this._config.actions);
3871
3889
  this._filterItems.setConfig(this._config);
3872
3890
  this._externalParams.setConfig(this._config);
3873
- var keywordItem = this._filterItems.keywordItem;
3874
- if (keywordItem) {
3875
- this.searchText.setValue(keywordItem.model);
3876
- this.searchPlaceholder = keywordItem.label || 'Search';
3877
- }
3891
+ this._syncSearchInputWithKeyword();
3878
3892
  if (!!this.config.reloadWhenConfigChanged) {
3879
3893
  this.change();
3880
3894
  }
@@ -3948,6 +3962,13 @@
3948
3962
  });
3949
3963
  });
3950
3964
  };
3965
+ FilterComponent.prototype._syncSearchInputWithKeyword = function () {
3966
+ var keywordItem = this._filterItems.keywordItem;
3967
+ if (keywordItem) {
3968
+ this.searchText.setValue(keywordItem.model);
3969
+ this.searchPlaceholder = keywordItem.label || 'Search';
3970
+ }
3971
+ };
3951
3972
  FilterComponent.prototype._listenKeywordItemClear = function () {
3952
3973
  var _this = this;
3953
3974
  var _a;
@@ -5135,7 +5156,7 @@
5135
5156
  FsFilterActionsComponent = __decorate([
5136
5157
  core.Component({
5137
5158
  selector: 'fs-filter-actions',
5138
- template: "<!-- Buttons -->\n<ng-container *ngFor=\"let action of actions\">\n\n <ng-container [ngSwitch]=\"action.mode\">\n <ng-container *ngSwitchCase=\"'button'\">\n <fs-filter-action-button [action]=\"action\"></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 </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 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 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 [multiple]=\"action.multiple\"\n (select)=\"action.fileSelected($event)\"\n (error)=\"action.fileError($event)\"\n (clicked)=\"action.click($event)\">\n <fs-filter-action-button [action]=\"action\"></fs-filter-action-button>\n </fs-file>\n </ng-container>\n </ng-container>\n</ng-container>\n<!-- /Buttons -->\n\n<!-- menu -->\n<ng-container *ngIf=\"kebabActions?.length\">\n <fs-filter-action-kebab-actions [kebabActions]=\"kebabActions\"></fs-filter-action-kebab-actions>\n</ng-container>\n",
5159
+ template: "<!-- Buttons -->\n<ng-container *ngFor=\"let action of actions\">\n\n <ng-container [ngSwitch]=\"action.mode\">\n <ng-container *ngSwitchCase=\"'button'\">\n <fs-filter-action-button [action]=\"action\"></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 </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 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 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 <fs-filter-action-button [action]=\"action\"></fs-filter-action-button>\n </fs-file>\n </ng-container>\n </ng-container>\n</ng-container>\n<!-- /Buttons -->\n\n<!-- menu -->\n<ng-container *ngIf=\"kebabActions?.length\">\n <fs-filter-action-kebab-actions [kebabActions]=\"kebabActions\"></fs-filter-action-kebab-actions>\n</ng-container>\n",
5139
5160
  changeDetection: core.ChangeDetectionStrategy.OnPush,
5140
5161
  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}"]
5141
5162
  })
@@ -5153,7 +5174,7 @@
5153
5174
  FsFilterActionButtonComponent = __decorate([
5154
5175
  core.Component({
5155
5176
  selector: 'fs-filter-action-button',
5156
- template: "<ng-container [ngSwitch]=\"action.type\">\n <!-- Basic button -->\n <button type=\"button\"\n *ngSwitchCase=\"'basic'\"\n mat-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 >\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n\n <!-- Raised button -->\n <button type=\"button\"\n *ngSwitchDefault\n mat-raised-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 >\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n\n <!-- Icon button -->\n <button type=\"button\"\n *ngSwitchCase=\"'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 >\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n\n <!-- Fab button -->\n <button type=\"button\"\n *ngSwitchCase=\"'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 >\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n\n <!-- Mini Fab button -->\n <button type=\"button\"\n *ngSwitchCase=\"'mini-fab'\"\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 >\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n\n <ng-template #buttonContent>\n <mat-icon *ngIf=\"action.icon\">{{action.icon}}</mat-icon> {{action.label}}\n </ng-template>\n</ng-container>\n",
5177
+ template: "<ng-container [ngSwitch]=\"action.type\">\n <!-- Basic button -->\n <button type=\"button\"\n *ngSwitchCase=\"'basic'\"\n mat-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 >\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n\n <!-- Raised button -->\n <button type=\"button\"\n *ngSwitchDefault\n mat-raised-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 >\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n\n <!-- Icon button -->\n <button type=\"button\"\n *ngSwitchCase=\"'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 >\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n\n <!-- Fab button -->\n <button type=\"button\"\n *ngSwitchCase=\"'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 >\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n\n <!-- Mini Fab button -->\n <button type=\"button\"\n *ngSwitchCase=\"'mini-fab'\"\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 >\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",
5157
5178
  host: {
5158
5179
  class: 'action-button',
5159
5180
  },
@@ -5173,7 +5194,7 @@
5173
5194
  FsFilterActionKebabActionsComponent = __decorate([
5174
5195
  core.Component({
5175
5196
  selector: 'fs-filter-action-kebab-actions',
5176
- template: "<button 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 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 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 fs-menu-item\n [fsClass]=\"action.classArray\"\n >\n <fs-file\n class=\"action-button\"\n [multiple]=\"action.multiple\"\n (select)=\"action.fileSelected($event)\"\n (error)=\"action.fileError($event)\"\n (clicked)=\"action.click($event)\">\n <mat-icon *ngIf=\"action.icon\">{{action.icon}}</mat-icon> {{action.label}}\n </fs-file>\n </ng-template>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <ng-template fs-menu-item\n (click)=\"action.click($event)\"\n [fsClass]=\"action.classArray\"\n >\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",
5197
+ template: "<button 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 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 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 fs-menu-item\n [fsClass]=\"action.classArray\"\n >\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 <mat-icon *ngIf=\"action.icon\">{{action.icon}}</mat-icon> {{action.label}}\n </fs-file>\n </ng-template>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <ng-template fs-menu-item\n (click)=\"action.click($event)\"\n [fsClass]=\"action.classArray\"\n >\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",
5177
5198
  changeDetection: core.ChangeDetectionStrategy.OnPush,
5178
5199
  styles: [".menu-button{width:36px;height:36px;line-height:36px}"]
5179
5200
  })