@firestitch/list 9.11.0 → 9.12.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 (41) hide show
  1. package/app/classes/list-controller.d.ts +4 -2
  2. package/app/classes/reorder-controller.d.ts +2 -0
  3. package/app/components/body/row/inline-action/inline-action.component.d.ts +3 -0
  4. package/app/components/body/row/menu-action/menu-action.component.d.ts +9 -0
  5. package/app/components/list/list.component.d.ts +1 -0
  6. package/app/interfaces/listconfig.interface.d.ts +9 -0
  7. package/app/models/row-action.model.d.ts +4 -1
  8. package/bundles/firestitch-list.umd.js +111 -16
  9. package/bundles/firestitch-list.umd.js.map +1 -1
  10. package/bundles/firestitch-list.umd.min.js +2 -2
  11. package/bundles/firestitch-list.umd.min.js.map +1 -1
  12. package/esm2015/app/classes/list-controller.js +11 -4
  13. package/esm2015/app/classes/reorder-controller.js +12 -3
  14. package/esm2015/app/components/body/row/actions/actions.component.js +2 -2
  15. package/esm2015/app/components/body/row/inline-action/inline-action.component.js +10 -2
  16. package/esm2015/app/components/body/row/menu-action/menu-action.component.js +41 -0
  17. package/esm2015/app/components/list/list.component.js +12 -1
  18. package/esm2015/app/fs-list.module.js +5 -1
  19. package/esm2015/app/interfaces/listconfig.interface.js +1 -1
  20. package/esm2015/app/models/row-action.model.js +10 -1
  21. package/esm2015/firestitch-list.js +7 -6
  22. package/esm2015/public_api.js +1 -1
  23. package/esm5/app/classes/list-controller.js +19 -4
  24. package/esm5/app/classes/reorder-controller.js +12 -3
  25. package/esm5/app/components/body/row/actions/actions.component.js +2 -2
  26. package/esm5/app/components/body/row/inline-action/inline-action.component.js +10 -2
  27. package/esm5/app/components/body/row/menu-action/menu-action.component.js +42 -0
  28. package/esm5/app/components/list/list.component.js +13 -1
  29. package/esm5/app/fs-list.module.js +5 -1
  30. package/esm5/app/interfaces/listconfig.interface.js +1 -1
  31. package/esm5/app/models/row-action.model.js +10 -1
  32. package/esm5/firestitch-list.js +7 -6
  33. package/esm5/public_api.js +1 -1
  34. package/fesm2015/firestitch-list.js +93 -8
  35. package/fesm2015/firestitch-list.js.map +1 -1
  36. package/fesm5/firestitch-list.js +103 -8
  37. package/fesm5/firestitch-list.js.map +1 -1
  38. package/firestitch-list.d.ts +7 -6
  39. package/firestitch-list.metadata.json +1 -1
  40. package/package.json +1 -1
  41. package/public_api.d.ts +1 -1
@@ -4,7 +4,7 @@ import { ChangeFn, FilterConfig, IFilterSavedFiltersConfig } from '@firestitch/f
4
4
  import { FsScrollInstance, FsScrollService } from '@firestitch/scroll';
5
5
  import { SelectionDialog } from '@firestitch/selection';
6
6
  import { Model } from 'tsmodels';
7
- import { BehaviorSubject, Subject } from 'rxjs';
7
+ import { BehaviorSubject, Observable, Subject } from 'rxjs';
8
8
  import { FsListAfterFetchFn, FsListConfig, FsListEmptyStateConfig, FsListFetchFn, FsListFetchSubscription, FsListNoResultsConfig, FsListRestoreConfig, FsListScrollableConfig, FsListTrackByFn } from '../interfaces';
9
9
  import { ColumnsController } from './columns-controller';
10
10
  import { ActionsController } from './index';
@@ -45,7 +45,6 @@ export declare class List extends Model {
45
45
  afterFetchFn: FsListAfterFetchFn;
46
46
  initialized$: BehaviorSubject<boolean>;
47
47
  loading$: BehaviorSubject<boolean>;
48
- filtersQuery: any;
49
48
  hasRowActions: any;
50
49
  paging: PaginationController;
51
50
  columns: ColumnsController;
@@ -68,6 +67,7 @@ export declare class List extends Model {
68
67
  emptyStateTemplate: TemplateRef<any>;
69
68
  fsScrollInstance: FsScrollInstance;
70
69
  onDestroy$: Subject<unknown>;
70
+ private readonly _filtersQuery;
71
71
  private readonly _headerConfig;
72
72
  private readonly _groupCellConfig;
73
73
  private readonly _cellConfig;
@@ -75,6 +75,8 @@ export declare class List extends Model {
75
75
  private _fsScrollSubscription;
76
76
  constructor(el: ElementRef, config: FsListConfig, fsScroll: FsScrollService, selectionDialog: SelectionDialog, router: Router, route: ActivatedRoute, persistance: PersistanceController, inDialog: boolean);
77
77
  get hasSavedFilters(): boolean;
78
+ get filtersQuery(): Record<string, any>;
79
+ get filtersQuery$(): Observable<Record<string, any>>;
78
80
  fetchRemote(query: any): any;
79
81
  /**
80
82
  * Transform templates for using
@@ -27,6 +27,7 @@ export declare class ReorderController implements OnDestroy {
27
27
  private _enabled$;
28
28
  private _manualReorderActivated$;
29
29
  private _reorderDisabled$;
30
+ private _numberOfActiveFilters;
30
31
  private _destroy$;
31
32
  constructor();
32
33
  get enabled(): boolean;
@@ -53,4 +54,5 @@ export declare class ReorderController implements OnDestroy {
53
54
  * Disable reorder action and update filter actions state
54
55
  */
55
56
  disableReorderAction(): void;
57
+ setNunberOfActiveFilters(activeFilters: number): void;
56
58
  }
@@ -1,10 +1,13 @@
1
1
  import { EventEmitter } from '@angular/core';
2
2
  import { FsPrompt } from '@firestitch/prompt';
3
+ import { FsFile } from '@firestitch/file';
3
4
  import { RowAction } from '../../../../models/row-action.model';
4
5
  export declare class FsRowInlineActionComponent {
5
6
  private _fsPrompt;
6
7
  action: RowAction;
7
8
  clicked: EventEmitter<any>;
9
+ fileSelect: EventEmitter<FsFile | FsFile[]>;
8
10
  constructor(_fsPrompt: FsPrompt);
9
11
  actionClick(event: any): void;
12
+ fileSelected(event: any): void;
10
13
  }
@@ -0,0 +1,9 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ export declare class FsRowMenuActionComponent {
3
+ icon: string;
4
+ label: string;
5
+ file: boolean;
6
+ fileMultiple: boolean;
7
+ fileSelect: EventEmitter<any>;
8
+ fileError: EventEmitter<any>;
9
+ }
@@ -103,6 +103,7 @@ export declare class FsListComponent implements OnInit, OnDestroy {
103
103
  private _subscribeToRemoveRow;
104
104
  private _subscribeToGroupExpandStatusChange;
105
105
  private _waitFirstLoad;
106
+ private _listenFiltersQueryChange;
106
107
  private _configMergeCustomizer;
107
108
  private _restorePersistance;
108
109
  }
@@ -1,6 +1,7 @@
1
1
  import { Observable } from 'rxjs';
2
2
  import { FsSelectionActionSelected, FsSelectionDialogConfigAction, SelectionRef } from '@firestitch/selection';
3
3
  import { IFilterConfigItem, IFilterConfigDateItem, FsFilterPersistance, IFilterSavedFiltersConfig, FsFilterAction, ChangeFn } from '@firestitch/filter';
4
+ import { FsFile } from '@firestitch/file';
4
5
  import { ActionType } from '../enums/button-type.enum';
5
6
  import { ReorderPosition, ReorderStrategy } from '../classes/reorder-controller';
6
7
  import { PaginationStrategy } from '../enums/pagination-strategy.enum';
@@ -150,6 +151,11 @@ export interface FsListRowAction {
150
151
  menu?: boolean;
151
152
  click?: (row: any, event: any, index: any) => void;
152
153
  link?: FsListRowActionLinkFn;
154
+ file?: {
155
+ select: FsListRowActionFileFn;
156
+ error?: (error: unknown) => void;
157
+ multiple?: boolean;
158
+ };
153
159
  show?: (row: any, index: number) => boolean;
154
160
  remove?: {
155
161
  title?: string;
@@ -157,6 +163,9 @@ export interface FsListRowAction {
157
163
  } | boolean;
158
164
  restore?: boolean;
159
165
  }
166
+ export interface FsListRowActionFileFn {
167
+ (selection: FsFile | FsFile[], row: FsListAbstractRow, index: number): void;
168
+ }
160
169
  export interface FsListRowActionLinkFn {
161
170
  (row: FsListAbstractRow): FsListRowActionLink;
162
171
  }
@@ -1,6 +1,6 @@
1
1
  import { Model } from 'tsmodels';
2
2
  import { ActionType } from '../enums/button-type.enum';
3
- import { FsListRowActionLink } from '../interfaces';
3
+ import { FsListRowActionFileFn, FsListRowActionLink } from '../interfaces';
4
4
  export declare class RowAction extends Model {
5
5
  icon: string;
6
6
  menu: boolean;
@@ -18,6 +18,9 @@ export declare class RowAction extends Model {
18
18
  classArray: string[];
19
19
  isShown: boolean;
20
20
  click: Function;
21
+ fileUploadFn: FsListRowActionFileFn;
22
+ fileUploadErrorFn: (error: unknown) => void;
23
+ fileMultiple: boolean;
21
24
  private _linkFn;
22
25
  private _labelFn;
23
26
  private readonly _isGroup;
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/router'), require('@angular/material/button'), require('@angular/material/checkbox'), require('@angular/material/core'), require('@angular/material/dialog'), require('@angular/material/icon'), require('@angular/material/menu'), require('@angular/material/tooltip'), require('@angular/material/progress-spinner'), require('@angular/flex-layout'), require('@firestitch/filter'), require('@firestitch/scroll'), require('@firestitch/menu'), require('@firestitch/prompt'), require('lodash-es'), require('rxjs'), require('rxjs/operators'), require('@firestitch/selection'), require('@firestitch/common'), require('@firestitch/drawer'), require('tsmodels'), require('@firestitch/store')) :
3
- typeof define === 'function' && define.amd ? define('@firestitch/list', ['exports', '@angular/core', '@angular/common', '@angular/router', '@angular/material/button', '@angular/material/checkbox', '@angular/material/core', '@angular/material/dialog', '@angular/material/icon', '@angular/material/menu', '@angular/material/tooltip', '@angular/material/progress-spinner', '@angular/flex-layout', '@firestitch/filter', '@firestitch/scroll', '@firestitch/menu', '@firestitch/prompt', 'lodash-es', 'rxjs', 'rxjs/operators', '@firestitch/selection', '@firestitch/common', '@firestitch/drawer', 'tsmodels', '@firestitch/store'], factory) :
4
- (global = global || self, factory((global.firestitch = global.firestitch || {}, global.firestitch.list = {}), global.ng.core, global.ng.common, global.ng.router, global.ng.material.button, global.ng.material.checkbox, global.ng.material.core, global.ng.material.dialog, global.ng.material.icon, global.ng.material.menu, global.ng.material.tooltip, global.ng.material.progressSpinner, global.ng.flexLayout, global.filter, global.scroll, global.menu$1, global.prompt, global.lodashEs, global.rxjs, global.rxjs.operators, global.selection, global.common$1, global.drawer, global.tsmodels, global.store));
5
- }(this, (function (exports, core, common, router, button, checkbox, core$1, dialog, icon, menu, tooltip, progressSpinner, flexLayout, filter, scroll, menu$1, prompt, lodashEs, rxjs, operators, selection, common$1, drawer, tsmodels, store) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/router'), require('@angular/material/button'), require('@angular/material/checkbox'), require('@angular/material/core'), require('@angular/material/dialog'), require('@angular/material/icon'), require('@angular/material/menu'), require('@angular/material/tooltip'), require('@angular/material/progress-spinner'), require('@angular/flex-layout'), require('@firestitch/filter'), require('@firestitch/scroll'), require('@firestitch/menu'), require('@firestitch/prompt'), require('@firestitch/file'), require('lodash-es'), require('rxjs'), require('rxjs/operators'), require('@firestitch/selection'), require('@firestitch/common'), require('@firestitch/drawer'), require('tsmodels'), require('@firestitch/store')) :
3
+ typeof define === 'function' && define.amd ? define('@firestitch/list', ['exports', '@angular/core', '@angular/common', '@angular/router', '@angular/material/button', '@angular/material/checkbox', '@angular/material/core', '@angular/material/dialog', '@angular/material/icon', '@angular/material/menu', '@angular/material/tooltip', '@angular/material/progress-spinner', '@angular/flex-layout', '@firestitch/filter', '@firestitch/scroll', '@firestitch/menu', '@firestitch/prompt', '@firestitch/file', 'lodash-es', 'rxjs', 'rxjs/operators', '@firestitch/selection', '@firestitch/common', '@firestitch/drawer', 'tsmodels', '@firestitch/store'], factory) :
4
+ (global = global || self, factory((global.firestitch = global.firestitch || {}, global.firestitch.list = {}), global.ng.core, global.ng.common, global.ng.router, global.ng.material.button, global.ng.material.checkbox, global.ng.material.core, global.ng.material.dialog, global.ng.material.icon, global.ng.material.menu, global.ng.material.tooltip, global.ng.material.progressSpinner, global.ng.flexLayout, global.filter, global.scroll, global.menu$1, global.prompt, global.file, global.lodashEs, global.rxjs, global.rxjs.operators, global.selection, global.common$1, global.drawer, global.tsmodels, global.store));
5
+ }(this, (function (exports, core, common, router, button, checkbox, core$1, dialog, icon, menu, tooltip, progressSpinner, flexLayout, filter, scroll, menu$1, prompt, file, lodashEs, rxjs, operators, selection, common$1, drawer, tsmodels, store) { 'use strict';
6
6
 
7
7
  /*! *****************************************************************************
8
8
  Copyright (c) Microsoft Corporation. All rights reserved.
@@ -550,6 +550,15 @@
550
550
  return _this.clickEvent(row, event, index, rowActionsRef, clickFn);
551
551
  };
552
552
  this._linkFn = value.link;
553
+ if (value.file) {
554
+ if (value.file.select) {
555
+ this.fileUploadFn = function (selection, row, index) {
556
+ value.file.select(selection, row, index);
557
+ };
558
+ }
559
+ this.fileUploadErrorFn = value.file.error;
560
+ this.fileMultiple = value.file.multiple;
561
+ }
553
562
  if (typeof value.label === 'function') {
554
563
  this._labelFn = value.label;
555
564
  this.label = '';
@@ -3044,6 +3053,7 @@
3044
3053
  // Empty state
3045
3054
  _this.emptyStateEnabled = false;
3046
3055
  _this.onDestroy$ = new rxjs.Subject();
3056
+ _this._filtersQuery = new rxjs.BehaviorSubject(null);
3047
3057
  _this._fromJSON(config);
3048
3058
  _this.initialize(config);
3049
3059
  _this._headerConfig = new StyleConfig(config.header);
@@ -3065,6 +3075,20 @@
3065
3075
  enumerable: true,
3066
3076
  configurable: true
3067
3077
  });
3078
+ Object.defineProperty(List.prototype, "filtersQuery", {
3079
+ get: function () {
3080
+ return this._filtersQuery.getValue();
3081
+ },
3082
+ enumerable: true,
3083
+ configurable: true
3084
+ });
3085
+ Object.defineProperty(List.prototype, "filtersQuery$", {
3086
+ get: function () {
3087
+ return this._filtersQuery.asObservable();
3088
+ },
3089
+ enumerable: true,
3090
+ configurable: true
3091
+ });
3068
3092
  List.prototype.fetchRemote = function (query) {
3069
3093
  var options = {
3070
3094
  state: this.dataController.operation,
@@ -3355,7 +3379,7 @@
3355
3379
  var _this = this;
3356
3380
  var fetch$ = this.fetch$.asObservable();
3357
3381
  // Should wait until saved filters not loaded
3358
- if (!!this.filters && !!this.savedFilters) {
3382
+ if (!!this.filters) {
3359
3383
  fetch$ = rxjs.combineLatest([fetch$, this.filtersReady$])
3360
3384
  .pipe(operators.map(function (_a) {
3361
3385
  var _b = __read(_a, 1), params = _b[0];
@@ -3528,7 +3552,7 @@
3528
3552
  if (this.filterInitCb) {
3529
3553
  this.filterInitCb(filters);
3530
3554
  }
3531
- this.filtersQuery = filters;
3555
+ this._filtersQuery.next(filters);
3532
3556
  this.checkRestoreFilter();
3533
3557
  };
3534
3558
  /**
@@ -3540,7 +3564,7 @@
3540
3564
  if (this.filterChangeCb) {
3541
3565
  this.filterChangeCb(filterQuery, filterSort);
3542
3566
  }
3543
- this.filtersQuery = filterQuery;
3567
+ this._filtersQuery.next(filterQuery);
3544
3568
  this.restoreMode = false;
3545
3569
  // Restore option
3546
3570
  this.checkRestoreFilter();
@@ -3760,6 +3784,7 @@
3760
3784
  this._enabled$ = new rxjs.BehaviorSubject(false);
3761
3785
  this._manualReorderActivated$ = new rxjs.BehaviorSubject(false);
3762
3786
  this._reorderDisabled$ = new rxjs.BehaviorSubject(false);
3787
+ this._numberOfActiveFilters = 0;
3763
3788
  this._destroy$ = new rxjs.Subject();
3764
3789
  }
3765
3790
  Object.defineProperty(ReorderController.prototype, "enabled", {
@@ -3793,7 +3818,9 @@
3793
3818
  return this._enabled$
3794
3819
  .pipe(operators.map(function (enabled) {
3795
3820
  return enabled && _this.position === exports.ReorderPosition.Left;
3796
- }), operators.distinctUntilChanged(), operators.shareReplay(), operators.takeUntil(this._destroy$));
3821
+ }), operators.map(function (enabled) {
3822
+ return enabled && _this._numberOfActiveFilters === 0;
3823
+ }), operators.distinctUntilChanged(), operators.shareReplay());
3797
3824
  },
3798
3825
  enumerable: true,
3799
3826
  configurable: true
@@ -3804,7 +3831,9 @@
3804
3831
  return this._enabled$
3805
3832
  .pipe(operators.map(function (enabled) {
3806
3833
  return enabled && _this.position === exports.ReorderPosition.Right;
3807
- }), operators.distinctUntilChanged(), operators.shareReplay(), operators.takeUntil(this._destroy$));
3834
+ }), operators.map(function (enabled) {
3835
+ return enabled && _this._numberOfActiveFilters === 0;
3836
+ }), operators.distinctUntilChanged(), operators.shareReplay());
3808
3837
  },
3809
3838
  enumerable: true,
3810
3839
  configurable: true
@@ -3927,6 +3956,10 @@
3927
3956
  this._reorderDisabled$.next(true);
3928
3957
  this._actionsController.updateDisabledState();
3929
3958
  };
3959
+ ReorderController.prototype.setNunberOfActiveFilters = function (activeFilters) {
3960
+ this._numberOfActiveFilters = activeFilters;
3961
+ this.enabled = this.enabled;
3962
+ };
3930
3963
  ReorderController = __decorate([
3931
3964
  core.Injectable(),
3932
3965
  __metadata("design:paramtypes", [])
@@ -4453,6 +4486,7 @@
4453
4486
  this._updateCustomizeAction(listConfig.actions);
4454
4487
  this.list = new List(this._el, listConfig, this.fsScroll, this.selectionDialog, this._router, this._route, this._persistance, this._inDialog);
4455
4488
  this._waitFirstLoad();
4489
+ this._listenFiltersQueryChange();
4456
4490
  this.reorderController.initWithConfig(config.reorder, this.list.dataController, this.list.actions);
4457
4491
  if (this.listColumnDirectives) {
4458
4492
  this.list.tranformTemplatesToColumns(this.listColumnDirectives);
@@ -4530,6 +4564,17 @@
4530
4564
  _this.cdRef.markForCheck();
4531
4565
  });
4532
4566
  };
4567
+ FsListComponent.prototype._listenFiltersQueryChange = function () {
4568
+ var _this = this;
4569
+ this.list.filtersQuery$
4570
+ .pipe(operators.takeUntil(this.list.onDestroy$), operators.takeUntil(this._destroy))
4571
+ .subscribe(function (value) {
4572
+ if (value) {
4573
+ var activeFilters = Object.keys(value).length;
4574
+ _this.reorderController.setNunberOfActiveFilters(activeFilters);
4575
+ }
4576
+ });
4577
+ };
4533
4578
  FsListComponent.prototype._configMergeCustomizer = function (objValue, srcValue) {
4534
4579
  if (Array.isArray(objValue)) {
4535
4580
  return objValue;
@@ -5826,7 +5871,7 @@
5826
5871
  FsRowActionsComponent = __decorate([
5827
5872
  core.Component({
5828
5873
  selector: 'fs-list-row-actions',
5829
- template: "<ng-container *ngIf=\"!restoreMode || (restoreMode && !restoreAction)\">\n <ng-container *ngFor=\"let action of inlineRowActions; trackBy: trackByFn\">\n <fs-list-row-inline-action class=\"row-inline-action row-inline-action-{{action.type}}\"\n [action]=\"action\"\n [ngClass]=\"{'mobile-hide': action.menu === undefined}\"\n (clicked)=\"actionClick(action, row, $event)\">\n </fs-list-row-inline-action>\n </ng-container>\n</ng-container>\n\n<!-- Menu -->\n<fs-menu class=\"row-menu-action\"\n *ngIf=\"menuRowActions.length || (restoreMode && restoreAction)\"\n (click)=\"clickOnTrigger($event)\"\n #menuRef\n>\n <!-- Case when we have usual menu actions -->\n <ng-container *ngIf=\"!restoreMode || (restoreMode && !restoreAction)\">\n <ng-container *ngFor=\"let action of inlineRowActions; trackBy: trackByFn\">\n <ng-template class=\"hidden-mobile-menu-action\"\n fs-menu-item\n [link]=\"action.routerLink?.link\"\n [queryParams]=\"action.routerLink?.queryParams\"\n [target]=\"action.routerLink?.target\"\n [hidden]=\"action.menu !== undefined && !action.isShown\">\n <mat-icon *ngIf=\"action.icon\">{{action.icon}}</mat-icon>\n {{action.label}}\n </ng-template>\n </ng-container>\n\n <ng-container *ngFor=\"let action of menuRowActions; trackBy: trackByFn\">\n <ng-container *ngIf=\"action.isGroup else simpleMenuItem\">\n <fs-menu-group [label]=\"action.label\">\n <ng-container *ngFor=\"let subAction of action.rowActions\">\n <ng-template fs-menu-item\n [link]=\"subAction.routerLink?.link\"\n [queryParams]=\"subAction.routerLink?.queryParams\"\n [target]=\"subAction.routerLink?.target\"\n [hidden]=\"!subAction.isShown\"\n (click)=\"actionClick(subAction, row, $event, menuRef);\">\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]=\"action.routerLink?.link\"\n [queryParams]=\"action.routerLink?.queryParams\"\n [target]=\"action.routerLink?.target\"\n [hidden]=\"!action.isShown\"\n (click)=\"actionClick(action, row, $event, menuRef);\">\n <mat-icon *ngIf=\"action.icon\">{{action.icon}}</mat-icon>\n {{action.label}}\n </ng-template>\n </ng-template>\n </ng-container>\n </ng-container>\n\n <!-- Case when we have restore mode enabled and must hide menu actions -->\n <ng-container *ngIf=\"restoreMode && restoreAction\">\n <ng-template fs-menu-item (click)=\"actionClick(restoreAction, row, $event, menuRef)\">\n <mat-icon *ngIf=\"restoreAction.icon\">{{restoreAction.icon}}</mat-icon>\n {{restoreAction.label}}\n </ng-template>\n </ng-container>\n</fs-menu>\n",
5874
+ template: "<ng-container *ngIf=\"!restoreMode || (restoreMode && !restoreAction)\">\n <ng-container *ngFor=\"let action of inlineRowActions; trackBy: trackByFn\">\n <fs-list-row-inline-action class=\"row-inline-action row-inline-action-{{action.type}}\"\n [action]=\"action\"\n [ngClass]=\"{'mobile-hide': action.menu === undefined}\"\n (clicked)=\"actionClick(action, row, $event)\"\n (fileSelect)=\"action.fileUploadFn($event, row, index)\">\n </fs-list-row-inline-action>\n </ng-container>\n</ng-container>\n\n<!-- Menu -->\n<fs-menu class=\"row-menu-action\"\n *ngIf=\"menuRowActions.length || (restoreMode && restoreAction)\"\n (click)=\"clickOnTrigger($event)\"\n #menuRef\n>\n <!-- Case when we have usual menu actions -->\n <ng-container *ngIf=\"!restoreMode || (restoreMode && !restoreAction)\">\n <ng-container *ngFor=\"let action of inlineRowActions; trackBy: trackByFn\">\n <ng-template class=\"hidden-mobile-menu-action\"\n fs-menu-item\n [link]=\"action.routerLink?.link\"\n [queryParams]=\"action.routerLink?.queryParams\"\n [target]=\"action.routerLink?.target\"\n [hidden]=\"action.menu !== undefined && !action.isShown\">\n <fs-list-row-menu-action\n [icon]=\"action.icon\"\n [label]=\"action.label\"\n [file]=\"!!action.fileUploadFn\"\n [fileMultiple]=\"action.fileMultiple\"\n (fileSelect)=\"action.fileUploadFn($event, row, index)\"\n (fileError)=\"action.fileUploadErrorFn && action.fileUploadErrorFn($event)\">\n </fs-list-row-menu-action>\n </ng-template>\n </ng-container>\n\n <ng-container *ngFor=\"let action of menuRowActions; trackBy: trackByFn\">\n <ng-container *ngIf=\"action.isGroup else simpleMenuItem\">\n <fs-menu-group [label]=\"action.label\">\n <ng-container *ngFor=\"let subAction of action.rowActions\">\n <ng-template fs-menu-item\n [link]=\"subAction.routerLink?.link\"\n [queryParams]=\"subAction.routerLink?.queryParams\"\n [target]=\"subAction.routerLink?.target\"\n [hidden]=\"!subAction.isShown\"\n (click)=\"actionClick(subAction, row, $event, menuRef);\">\n <fs-list-row-menu-action\n [icon]=\"subAction.icon\"\n [label]=\"subAction.label\"\n [file]=\"!!subAction.fileUploadFn\"\n [fileMultiple]=\"subAction.fileMultiple\"\n (fileSelect)=\"subAction.fileUploadFn($event, row, index)\"\n (fileError)=\"subAction.fileUploadErrorFn && subAction.fileUploadErrorFn($event)\">\n </fs-list-row-menu-action>\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]=\"action.routerLink?.link\"\n [queryParams]=\"action.routerLink?.queryParams\"\n [target]=\"action.routerLink?.target\"\n [hidden]=\"!action.isShown\"\n (click)=\"actionClick(action, row, $event, menuRef);\">\n <fs-list-row-menu-action\n [icon]=\"action.icon\"\n [label]=\"action.label\"\n [file]=\"!!action.fileUploadFn\"\n [fileMultiple]=\"action.fileMultiple\"\n (fileSelect)=\"action.fileUploadFn($event, row, index)\"\n (fileError)=\"action.fileUploadErrorFn && action.fileUploadErrorFn($event)\">\n </fs-list-row-menu-action>\n </ng-template>\n </ng-template>\n </ng-container>\n </ng-container>\n\n <!-- Case when we have restore mode enabled and must hide menu actions -->\n <ng-container *ngIf=\"restoreMode && restoreAction\">\n <ng-template fs-menu-item (click)=\"actionClick(restoreAction, row, $event, menuRef)\">\n <mat-icon *ngIf=\"restoreAction.icon\">{{restoreAction.icon}}</mat-icon>\n {{restoreAction.label}}\n </ng-template>\n </ng-container>\n</fs-menu>\n",
5830
5875
  changeDetection: core.ChangeDetectionStrategy.OnPush
5831
5876
  }),
5832
5877
  __metadata("design:paramtypes", [prompt.FsPrompt])
@@ -5838,10 +5883,14 @@
5838
5883
  function FsRowInlineActionComponent(_fsPrompt) {
5839
5884
  this._fsPrompt = _fsPrompt;
5840
5885
  this.clicked = new core.EventEmitter();
5886
+ this.fileSelect = new core.EventEmitter();
5841
5887
  }
5842
5888
  FsRowInlineActionComponent.prototype.actionClick = function (event) {
5843
5889
  this.clicked.emit(event);
5844
5890
  };
5891
+ FsRowInlineActionComponent.prototype.fileSelected = function (event) {
5892
+ this.fileSelect.emit(event);
5893
+ };
5845
5894
  FsRowInlineActionComponent.ctorParameters = function () { return [
5846
5895
  { type: prompt.FsPrompt }
5847
5896
  ]; };
@@ -5853,10 +5902,14 @@
5853
5902
  core.Output(),
5854
5903
  __metadata("design:type", Object)
5855
5904
  ], FsRowInlineActionComponent.prototype, "clicked", void 0);
5905
+ __decorate([
5906
+ core.Output(),
5907
+ __metadata("design:type", Object)
5908
+ ], FsRowInlineActionComponent.prototype, "fileSelect", void 0);
5856
5909
  FsRowInlineActionComponent = __decorate([
5857
5910
  core.Component({
5858
5911
  selector: 'fs-list-row-inline-action',
5859
- template: "<ng-container *ngIf=\"action.isShown\" [ngSwitch]=\"action.type\">\n <!-- Basic button -->\n <ng-container *ngSwitchCase=\"'basic'\">\n <ng-container *ngIf=\"!action.routerLink; else link\">\n <button type=\"button\"\n mat-button\n (click)=\"actionClick($event)\"\n [ngClass]=\"action.classArray\"\n >\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n </ng-container>\n <ng-template #link>\n <a mat-button\n [routerLink]=\"action.routerLink.link\"\n [queryParams]=\"action.routerLink.queryParams\">\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </a>\n </ng-template>\n </ng-container>\n\n <!-- Raised button -->\n <ng-container *ngSwitchCase=\"'raised'\">\n <ng-container *ngIf=\"!action.routerLink; else link\">\n <button type=\"button\"\n mat-raised-button\n (click)=\"actionClick($event)\"\n [ngClass]=\"action.classArray\"\n >\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n </ng-container>\n <ng-template #link>\n <a mat-raised-button\n [routerLink]=\"action.routerLink.link\"\n [queryParams]=\"action.routerLink.queryParams\">\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </a>\n </ng-template>\n </ng-container>\n\n <!-- Icon button -->\n <ng-container *ngSwitchCase=\"'icon'\">\n <ng-container *ngIf=\"!action.routerLink; else link\">\n <button type=\"button\"\n mat-icon-button\n (click)=\"actionClick($event)\"\n [ngClass]=\"action.classArray\"\n >\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n </ng-container>\n <ng-template #link>\n <a mat-icon-button\n [routerLink]=\"action.routerLink.link\"\n [queryParams]=\"action.routerLink.queryParams\">\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </a>\n </ng-template>\n </ng-container>\n\n <!-- Fab button -->\n <ng-container *ngSwitchCase=\"'fab'\">\n <ng-container *ngIf=\"!action.routerLink; else link\">\n <button type=\"button\"\n mat-fab\n (click)=\"actionClick($event)\"\n [ngClass]=\"action.classArray\"\n >\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n </ng-container>\n <ng-template #link>\n <a mat-fab\n [routerLink]=\"action.routerLink.link\"\n [queryParams]=\"action.routerLink.queryParams\">\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </a>\n </ng-template>\n </ng-container>\n\n <!-- Mini Fab button -->\n <ng-container *ngSwitchCase=\"'mini-fab'\">\n <ng-container *ngIf=\"!action.routerLink; else link\">\n <button type=\"button\"\n mat-mini-fab\n (click)=\"actionClick($event)\"\n [ngClass]=\"action.classArray\"\n >\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n </ng-container>\n <ng-template #link>\n <a mat-mini-fab\n [routerLink]=\"action.routerLink.link\"\n [queryParams]=\"action.routerLink.queryParams\">\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </a>\n </ng-template>\n </ng-container>\n\n <ng-template #buttonContent let-value=\"value\">\n <mat-icon *ngIf=\"action.icon\">{{action.icon}}</mat-icon>\n {{action.label}}\n </ng-template>\n</ng-container>\n",
5912
+ template: "<ng-container *ngIf=\"action.isShown\" [ngSwitch]=\"action.type\">\n <!-- Basic button -->\n <ng-container *ngSwitchCase=\"'basic'\">\n <ng-container *ngIf=\"!action.routerLink; else link\">\n <button type=\"button\"\n mat-button\n (click)=\"actionClick($event)\"\n [ngClass]=\"action.classArray\"\n >\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n </ng-container>\n <ng-template #link>\n <a mat-button\n [routerLink]=\"action.routerLink.link\"\n [queryParams]=\"action.routerLink.queryParams\">\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </a>\n </ng-template>\n </ng-container>\n\n <!-- Raised button -->\n <ng-container *ngSwitchCase=\"'raised'\">\n <ng-container *ngIf=\"!action.routerLink; else link\">\n <button type=\"button\"\n mat-raised-button\n (click)=\"actionClick($event)\"\n [ngClass]=\"action.classArray\"\n >\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n </ng-container>\n <ng-template #link>\n <a mat-raised-button\n [routerLink]=\"action.routerLink.link\"\n [queryParams]=\"action.routerLink.queryParams\">\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </a>\n </ng-template>\n </ng-container>\n\n <!-- Icon button -->\n <ng-container *ngSwitchCase=\"'icon'\">\n <ng-container *ngIf=\"!action.routerLink; else link\">\n <button type=\"button\"\n mat-icon-button\n (click)=\"actionClick($event)\"\n [ngClass]=\"action.classArray\"\n >\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n </ng-container>\n <ng-template #link>\n <a mat-icon-button\n [routerLink]=\"action.routerLink.link\"\n [queryParams]=\"action.routerLink.queryParams\">\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </a>\n </ng-template>\n </ng-container>\n\n <!-- Fab button -->\n <ng-container *ngSwitchCase=\"'fab'\">\n <ng-container *ngIf=\"!action.routerLink; else link\">\n <button type=\"button\"\n mat-fab\n (click)=\"actionClick($event)\"\n [ngClass]=\"action.classArray\"\n >\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n </ng-container>\n <ng-template #link>\n <a mat-fab\n [routerLink]=\"action.routerLink.link\"\n [queryParams]=\"action.routerLink.queryParams\">\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </a>\n </ng-template>\n </ng-container>\n\n <!-- Mini Fab button -->\n <ng-container *ngSwitchCase=\"'mini-fab'\">\n <ng-container *ngIf=\"!action.routerLink; else link\">\n <button type=\"button\"\n mat-mini-fab\n (click)=\"actionClick($event)\"\n [ngClass]=\"action.classArray\"\n >\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n </ng-container>\n <ng-template #link>\n <a mat-mini-fab\n [routerLink]=\"action.routerLink.link\"\n [queryParams]=\"action.routerLink.queryParams\">\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </a>\n </ng-template>\n </ng-container>\n\n <ng-template #buttonContent>\n <ng-container *ngIf=\"!action.fileUploadFn else uploadFileBtn\">\n <mat-icon *ngIf=\"action.icon\">{{action.icon}}</mat-icon>\n {{action.label}}\n </ng-container>\n\n <ng-template #uploadFileBtn>\n <fs-file\n class=\"action-button\"\n [multiple]=\"action.fileMultiple\"\n (select)=\"fileSelected($event)\"\n (error)=\"action.fileUploadErrorFn && action.fileUploadErrorFn($event)\">\n <mat-icon *ngIf=\"action.icon\">{{action.icon}}</mat-icon>\n {{action.label}}\n </fs-file>\n </ng-template>\n </ng-template>\n</ng-container>\n",
5860
5913
  changeDetection: core.ChangeDetectionStrategy.OnPush
5861
5914
  }),
5862
5915
  __metadata("design:paramtypes", [prompt.FsPrompt])
@@ -5864,6 +5917,45 @@
5864
5917
  return FsRowInlineActionComponent;
5865
5918
  }());
5866
5919
 
5920
+ var FsRowMenuActionComponent = /** @class */ (function () {
5921
+ function FsRowMenuActionComponent() {
5922
+ this.fileSelect = new core.EventEmitter();
5923
+ this.fileError = new core.EventEmitter();
5924
+ }
5925
+ __decorate([
5926
+ core.Input(),
5927
+ __metadata("design:type", String)
5928
+ ], FsRowMenuActionComponent.prototype, "icon", void 0);
5929
+ __decorate([
5930
+ core.Input(),
5931
+ __metadata("design:type", String)
5932
+ ], FsRowMenuActionComponent.prototype, "label", void 0);
5933
+ __decorate([
5934
+ core.Input(),
5935
+ __metadata("design:type", Boolean)
5936
+ ], FsRowMenuActionComponent.prototype, "file", void 0);
5937
+ __decorate([
5938
+ core.Input(),
5939
+ __metadata("design:type", Boolean)
5940
+ ], FsRowMenuActionComponent.prototype, "fileMultiple", void 0);
5941
+ __decorate([
5942
+ core.Output(),
5943
+ __metadata("design:type", Object)
5944
+ ], FsRowMenuActionComponent.prototype, "fileSelect", void 0);
5945
+ __decorate([
5946
+ core.Output(),
5947
+ __metadata("design:type", Object)
5948
+ ], FsRowMenuActionComponent.prototype, "fileError", void 0);
5949
+ FsRowMenuActionComponent = __decorate([
5950
+ core.Component({
5951
+ selector: 'fs-list-row-menu-action',
5952
+ template: "<ng-container *ngIf=\"!file else withFile\">\n <mat-icon *ngIf=\"icon\">{{icon}}</mat-icon>\n {{label}}\n</ng-container>\n\n<ng-template #withFile>\n <fs-file\n class=\"action-button\"\n [multiple]=\"fileMultiple\"\n (select)=\"fileSelect.emit($event)\"\n (error)=\"fileError.emit($event)\">\n <mat-icon *ngIf=\"icon\">{{icon}}</mat-icon>\n {{label}}\n </fs-file>\n</ng-template>\n",
5953
+ changeDetection: core.ChangeDetectionStrategy.OnPush
5954
+ })
5955
+ ], FsRowMenuActionComponent);
5956
+ return FsRowMenuActionComponent;
5957
+ }());
5958
+
5867
5959
  var FsListManageSavedFiltersComponent = /** @class */ (function () {
5868
5960
  function FsListManageSavedFiltersComponent(_externalParams) {
5869
5961
  this._externalParams = _externalParams;
@@ -6086,6 +6178,7 @@
6086
6178
  prompt.FsPromptModule,
6087
6179
  dialog.MatDialogModule,
6088
6180
  tooltip.MatTooltipModule,
6181
+ file.FsFileModule,
6089
6182
  ],
6090
6183
  declarations: [
6091
6184
  // Components
@@ -6093,6 +6186,7 @@
6093
6186
  FsRowComponent,
6094
6187
  FsRowActionsComponent,
6095
6188
  FsRowInlineActionComponent,
6189
+ FsRowMenuActionComponent,
6096
6190
  FsCellComponent,
6097
6191
  FsFooterRowComponent,
6098
6192
  FsFooterCellComponent,
@@ -6180,11 +6274,12 @@
6180
6274
  exports.ɵf = FsListDraggableListDirective;
6181
6275
  exports.ɵg = FsRowActionsComponent;
6182
6276
  exports.ɵh = FsRowInlineActionComponent;
6183
- exports.ɵi = FsListLoaderComponent;
6184
- exports.ɵj = FsListSavedFiltersComponent;
6185
- exports.ɵk = FsListManageSavedFiltersComponent;
6186
- exports.ɵl = FsListDraggableRowDirective;
6187
- exports.ɵm = CustomizeColsDialogComponent;
6277
+ exports.ɵi = FsRowMenuActionComponent;
6278
+ exports.ɵj = FsListLoaderComponent;
6279
+ exports.ɵk = FsListSavedFiltersComponent;
6280
+ exports.ɵl = FsListManageSavedFiltersComponent;
6281
+ exports.ɵm = FsListDraggableRowDirective;
6282
+ exports.ɵn = CustomizeColsDialogComponent;
6188
6283
 
6189
6284
  Object.defineProperty(exports, '__esModule', { value: true });
6190
6285