@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
@@ -15,6 +15,7 @@ import { ItemType, FilterComponent, ExternalParamsController as ExternalParamsCo
15
15
  import { FsScrollService, FsScrollModule } from '@firestitch/scroll';
16
16
  import { FsMenuModule } from '@firestitch/menu';
17
17
  import { FsPrompt, FsPromptModule } from '@firestitch/prompt';
18
+ import { FsFileModule } from '@firestitch/file';
18
19
  import { isString, isObject, isBoolean, isNumber, isFunction, get, cloneDeep, mergeWith, random, merge as merge$1 } from 'lodash-es';
19
20
  import { Subject, BehaviorSubject, Observable, merge, from, combineLatest, of } from 'rxjs';
20
21
  import { takeUntil, tap, take, map, debounceTime, switchMap, mapTo, catchError, distinctUntilChanged, shareReplay, skip, filter } from 'rxjs/operators';
@@ -325,6 +326,15 @@ class RowAction extends Model {
325
326
  return this.clickEvent(row, event, index, rowActionsRef, clickFn);
326
327
  };
327
328
  this._linkFn = value.link;
329
+ if (value.file) {
330
+ if (value.file.select) {
331
+ this.fileUploadFn = (selection, row, index) => {
332
+ value.file.select(selection, row, index);
333
+ };
334
+ }
335
+ this.fileUploadErrorFn = value.file.error;
336
+ this.fileMultiple = value.file.multiple;
337
+ }
328
338
  if (typeof value.label === 'function') {
329
339
  this._labelFn = value.label;
330
340
  this.label = '';
@@ -2429,6 +2439,7 @@ class List extends Model {
2429
2439
  // Empty state
2430
2440
  this.emptyStateEnabled = false;
2431
2441
  this.onDestroy$ = new Subject();
2442
+ this._filtersQuery = new BehaviorSubject(null);
2432
2443
  this._fromJSON(config);
2433
2444
  this.initialize(config);
2434
2445
  this._headerConfig = new StyleConfig(config.header);
@@ -2445,6 +2456,12 @@ class List extends Model {
2445
2456
  get hasSavedFilters() {
2446
2457
  return !!this.filterConfig.savedFilters;
2447
2458
  }
2459
+ get filtersQuery() {
2460
+ return this._filtersQuery.getValue();
2461
+ }
2462
+ get filtersQuery$() {
2463
+ return this._filtersQuery.asObservable();
2464
+ }
2448
2465
  fetchRemote(query) {
2449
2466
  const options = {
2450
2467
  state: this.dataController.operation,
@@ -2730,7 +2747,7 @@ class List extends Model {
2730
2747
  listenFetch() {
2731
2748
  let fetch$ = this.fetch$.asObservable();
2732
2749
  // Should wait until saved filters not loaded
2733
- if (!!this.filters && !!this.savedFilters) {
2750
+ if (!!this.filters) {
2734
2751
  fetch$ = combineLatest([fetch$, this.filtersReady$])
2735
2752
  .pipe(map(([params]) => params));
2736
2753
  }
@@ -2900,7 +2917,7 @@ class List extends Model {
2900
2917
  if (this.filterInitCb) {
2901
2918
  this.filterInitCb(filters);
2902
2919
  }
2903
- this.filtersQuery = filters;
2920
+ this._filtersQuery.next(filters);
2904
2921
  this.checkRestoreFilter();
2905
2922
  }
2906
2923
  /**
@@ -2912,7 +2929,7 @@ class List extends Model {
2912
2929
  if (this.filterChangeCb) {
2913
2930
  this.filterChangeCb(filterQuery, filterSort);
2914
2931
  }
2915
- this.filtersQuery = filterQuery;
2932
+ this._filtersQuery.next(filterQuery);
2916
2933
  this.restoreMode = false;
2917
2934
  // Restore option
2918
2935
  this.checkRestoreFilter();
@@ -3129,6 +3146,7 @@ let ReorderController = class ReorderController {
3129
3146
  this._enabled$ = new BehaviorSubject(false);
3130
3147
  this._manualReorderActivated$ = new BehaviorSubject(false);
3131
3148
  this._reorderDisabled$ = new BehaviorSubject(false);
3149
+ this._numberOfActiveFilters = 0;
3132
3150
  this._destroy$ = new Subject();
3133
3151
  }
3134
3152
  get enabled() {
@@ -3148,13 +3166,17 @@ let ReorderController = class ReorderController {
3148
3166
  return this._enabled$
3149
3167
  .pipe(map((enabled) => {
3150
3168
  return enabled && this.position === ReorderPosition.Left;
3151
- }), distinctUntilChanged(), shareReplay(), takeUntil(this._destroy$));
3169
+ }), map((enabled) => {
3170
+ return enabled && this._numberOfActiveFilters === 0;
3171
+ }), distinctUntilChanged(), shareReplay());
3152
3172
  }
3153
3173
  get rightReorderActivated$() {
3154
3174
  return this._enabled$
3155
3175
  .pipe(map((enabled) => {
3156
3176
  return enabled && this.position === ReorderPosition.Right;
3157
- }), distinctUntilChanged(), shareReplay(), takeUntil(this._destroy$));
3177
+ }), map((enabled) => {
3178
+ return enabled && this._numberOfActiveFilters === 0;
3179
+ }), distinctUntilChanged(), shareReplay());
3158
3180
  }
3159
3181
  get reorderDisabled$() {
3160
3182
  return this._reorderDisabled$.asObservable();
@@ -3263,6 +3285,10 @@ let ReorderController = class ReorderController {
3263
3285
  this._reorderDisabled$.next(true);
3264
3286
  this._actionsController.updateDisabledState();
3265
3287
  }
3288
+ setNunberOfActiveFilters(activeFilters) {
3289
+ this._numberOfActiveFilters = activeFilters;
3290
+ this.enabled = this.enabled;
3291
+ }
3266
3292
  };
3267
3293
  ReorderController = __decorate([
3268
3294
  Injectable(),
@@ -3731,6 +3757,7 @@ let FsListComponent = class FsListComponent {
3731
3757
  this._updateCustomizeAction(listConfig.actions);
3732
3758
  this.list = new List(this._el, listConfig, this.fsScroll, this.selectionDialog, this._router, this._route, this._persistance, this._inDialog);
3733
3759
  this._waitFirstLoad();
3760
+ this._listenFiltersQueryChange();
3734
3761
  this.reorderController.initWithConfig(config.reorder, this.list.dataController, this.list.actions);
3735
3762
  if (this.listColumnDirectives) {
3736
3763
  this.list.tranformTemplatesToColumns(this.listColumnDirectives);
@@ -3803,6 +3830,16 @@ let FsListComponent = class FsListComponent {
3803
3830
  this.cdRef.markForCheck();
3804
3831
  });
3805
3832
  }
3833
+ _listenFiltersQueryChange() {
3834
+ this.list.filtersQuery$
3835
+ .pipe(takeUntil(this.list.onDestroy$), takeUntil(this._destroy))
3836
+ .subscribe((value) => {
3837
+ if (value) {
3838
+ const activeFilters = Object.keys(value).length;
3839
+ this.reorderController.setNunberOfActiveFilters(activeFilters);
3840
+ }
3841
+ });
3842
+ }
3806
3843
  _configMergeCustomizer(objValue, srcValue) {
3807
3844
  if (Array.isArray(objValue)) {
3808
3845
  return objValue;
@@ -5027,7 +5064,7 @@ __decorate([
5027
5064
  FsRowActionsComponent = __decorate([
5028
5065
  Component({
5029
5066
  selector: 'fs-list-row-actions',
5030
- 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",
5067
+ 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",
5031
5068
  changeDetection: ChangeDetectionStrategy.OnPush
5032
5069
  }),
5033
5070
  __metadata("design:paramtypes", [FsPrompt])
@@ -5037,10 +5074,14 @@ let FsRowInlineActionComponent = class FsRowInlineActionComponent {
5037
5074
  constructor(_fsPrompt) {
5038
5075
  this._fsPrompt = _fsPrompt;
5039
5076
  this.clicked = new EventEmitter();
5077
+ this.fileSelect = new EventEmitter();
5040
5078
  }
5041
5079
  actionClick(event) {
5042
5080
  this.clicked.emit(event);
5043
5081
  }
5082
+ fileSelected(event) {
5083
+ this.fileSelect.emit(event);
5084
+ }
5044
5085
  };
5045
5086
  FsRowInlineActionComponent.ctorParameters = () => [
5046
5087
  { type: FsPrompt }
@@ -5053,15 +5094,57 @@ __decorate([
5053
5094
  Output(),
5054
5095
  __metadata("design:type", Object)
5055
5096
  ], FsRowInlineActionComponent.prototype, "clicked", void 0);
5097
+ __decorate([
5098
+ Output(),
5099
+ __metadata("design:type", Object)
5100
+ ], FsRowInlineActionComponent.prototype, "fileSelect", void 0);
5056
5101
  FsRowInlineActionComponent = __decorate([
5057
5102
  Component({
5058
5103
  selector: 'fs-list-row-inline-action',
5059
- 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",
5104
+ 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",
5060
5105
  changeDetection: ChangeDetectionStrategy.OnPush
5061
5106
  }),
5062
5107
  __metadata("design:paramtypes", [FsPrompt])
5063
5108
  ], FsRowInlineActionComponent);
5064
5109
 
5110
+ let FsRowMenuActionComponent = class FsRowMenuActionComponent {
5111
+ constructor() {
5112
+ this.fileSelect = new EventEmitter();
5113
+ this.fileError = new EventEmitter();
5114
+ }
5115
+ };
5116
+ __decorate([
5117
+ Input(),
5118
+ __metadata("design:type", String)
5119
+ ], FsRowMenuActionComponent.prototype, "icon", void 0);
5120
+ __decorate([
5121
+ Input(),
5122
+ __metadata("design:type", String)
5123
+ ], FsRowMenuActionComponent.prototype, "label", void 0);
5124
+ __decorate([
5125
+ Input(),
5126
+ __metadata("design:type", Boolean)
5127
+ ], FsRowMenuActionComponent.prototype, "file", void 0);
5128
+ __decorate([
5129
+ Input(),
5130
+ __metadata("design:type", Boolean)
5131
+ ], FsRowMenuActionComponent.prototype, "fileMultiple", void 0);
5132
+ __decorate([
5133
+ Output(),
5134
+ __metadata("design:type", Object)
5135
+ ], FsRowMenuActionComponent.prototype, "fileSelect", void 0);
5136
+ __decorate([
5137
+ Output(),
5138
+ __metadata("design:type", Object)
5139
+ ], FsRowMenuActionComponent.prototype, "fileError", void 0);
5140
+ FsRowMenuActionComponent = __decorate([
5141
+ Component({
5142
+ selector: 'fs-list-row-menu-action',
5143
+ 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",
5144
+ changeDetection: ChangeDetectionStrategy.OnPush
5145
+ })
5146
+ ], FsRowMenuActionComponent);
5147
+
5065
5148
  let FsListManageSavedFiltersComponent = class FsListManageSavedFiltersComponent {
5066
5149
  constructor(_externalParams) {
5067
5150
  this._externalParams = _externalParams;
@@ -5268,6 +5351,7 @@ FsListModule = FsListModule_1 = __decorate([
5268
5351
  FsPromptModule,
5269
5352
  MatDialogModule,
5270
5353
  MatTooltipModule,
5354
+ FsFileModule,
5271
5355
  ],
5272
5356
  declarations: [
5273
5357
  // Components
@@ -5275,6 +5359,7 @@ FsListModule = FsListModule_1 = __decorate([
5275
5359
  FsRowComponent,
5276
5360
  FsRowActionsComponent,
5277
5361
  FsRowInlineActionComponent,
5362
+ FsRowMenuActionComponent,
5278
5363
  FsCellComponent,
5279
5364
  FsFooterRowComponent,
5280
5365
  FsFooterCellComponent,
@@ -5333,5 +5418,5 @@ function FsListConfigFactory(config) {
5333
5418
  * Generated bundle index. Do not edit.
5334
5419
  */
5335
5420
 
5336
- export { ActionType, Column, FS_LIST_CONFIG, FS_LIST_DEFAULT_CONFIG, FsBodyComponent, FsCellComponent, FsFooterCellComponent, FsFooterComponent, FsFooterRowComponent, FsHeadCellComponent, FsHeadComponent, FsListCellDirective, FsListColumnDirective, FsListComponent, FsListEmptyStateDirective, FsListFooterDirective, FsListHeaderDirective, FsListModule, FsListState, FsPaginationComponent, FsRowComponent, FsStatusComponent, List, PaginationController, PaginationStrategy, ReorderController, ReorderPosition, ReorderStrategy, RowAction, RowType, SelectionChangeType, SelectionController, SortingController, SortingDirection, StyleConfig, FsListConfigFactory as ɵa, GroupExpandNotifierService as ɵb, PersistanceController as ɵc, FsListGroupCellDirective as ɵd, FsListGroupExpandTriggerDirective as ɵe, FsListDraggableListDirective as ɵf, FsRowActionsComponent as ɵg, FsRowInlineActionComponent as ɵh, FsListLoaderComponent as ɵi, FsListSavedFiltersComponent as ɵj, FsListManageSavedFiltersComponent as ɵk, FsListDraggableRowDirective as ɵl, CustomizeColsDialogComponent as ɵm };
5421
+ export { ActionType, Column, FS_LIST_CONFIG, FS_LIST_DEFAULT_CONFIG, FsBodyComponent, FsCellComponent, FsFooterCellComponent, FsFooterComponent, FsFooterRowComponent, FsHeadCellComponent, FsHeadComponent, FsListCellDirective, FsListColumnDirective, FsListComponent, FsListEmptyStateDirective, FsListFooterDirective, FsListHeaderDirective, FsListModule, FsListState, FsPaginationComponent, FsRowComponent, FsStatusComponent, List, PaginationController, PaginationStrategy, ReorderController, ReorderPosition, ReorderStrategy, RowAction, RowType, SelectionChangeType, SelectionController, SortingController, SortingDirection, StyleConfig, FsListConfigFactory as ɵa, GroupExpandNotifierService as ɵb, PersistanceController as ɵc, FsListGroupCellDirective as ɵd, FsListGroupExpandTriggerDirective as ɵe, FsListDraggableListDirective as ɵf, FsRowActionsComponent as ɵg, FsRowInlineActionComponent as ɵh, FsRowMenuActionComponent as ɵi, FsListLoaderComponent as ɵj, FsListSavedFiltersComponent as ɵk, FsListManageSavedFiltersComponent as ɵl, FsListDraggableRowDirective as ɵm, CustomizeColsDialogComponent as ɵn };
5337
5422
  //# sourceMappingURL=firestitch-list.js.map