@firestitch/list 9.11.1 → 9.12.1
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/classes/list-controller.d.ts +4 -2
- package/app/classes/reorder-controller.d.ts +2 -0
- package/app/components/body/row/inline-action/inline-action.component.d.ts +3 -0
- package/app/components/body/row/menu-action/menu-action.component.d.ts +9 -0
- package/app/components/list/list.component.d.ts +1 -0
- package/app/interfaces/listconfig.interface.d.ts +9 -0
- package/app/models/row-action.model.d.ts +4 -1
- package/bundles/firestitch-list.umd.js +112 -16
- package/bundles/firestitch-list.umd.js.map +1 -1
- package/bundles/firestitch-list.umd.min.js +2 -2
- package/bundles/firestitch-list.umd.min.js.map +1 -1
- package/esm2015/app/classes/list-controller.js +10 -3
- package/esm2015/app/classes/reorder-controller.js +12 -3
- package/esm2015/app/components/body/row/actions/actions.component.js +2 -2
- package/esm2015/app/components/body/row/inline-action/inline-action.component.js +10 -2
- package/esm2015/app/components/body/row/menu-action/menu-action.component.js +41 -0
- package/esm2015/app/components/list/list.component.js +12 -1
- package/esm2015/app/fs-list.module.js +5 -1
- package/esm2015/app/interfaces/listconfig.interface.js +1 -1
- package/esm2015/app/models/row-action.model.js +12 -2
- package/esm2015/firestitch-list.js +7 -6
- package/esm2015/public_api.js +1 -1
- package/esm5/app/classes/list-controller.js +18 -3
- package/esm5/app/classes/reorder-controller.js +12 -3
- package/esm5/app/components/body/row/actions/actions.component.js +2 -2
- package/esm5/app/components/body/row/inline-action/inline-action.component.js +10 -2
- package/esm5/app/components/body/row/menu-action/menu-action.component.js +42 -0
- package/esm5/app/components/list/list.component.js +13 -1
- package/esm5/app/fs-list.module.js +5 -1
- package/esm5/app/interfaces/listconfig.interface.js +1 -1
- package/esm5/app/models/row-action.model.js +12 -2
- package/esm5/firestitch-list.js +7 -6
- package/esm5/public_api.js +1 -1
- package/fesm2015/firestitch-list.js +94 -8
- package/fesm2015/firestitch-list.js.map +1 -1
- package/fesm5/firestitch-list.js +104 -8
- package/fesm5/firestitch-list.js.map +1 -1
- package/firestitch-list.d.ts +7 -6
- package/firestitch-list.metadata.json +1 -1
- package/package.json +1 -1
- 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
|
}
|
|
@@ -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 = '';
|
|
@@ -569,7 +578,8 @@
|
|
|
569
578
|
this.rowActions.forEach(function (action) {
|
|
570
579
|
action.checkShowStatus(row, index);
|
|
571
580
|
});
|
|
572
|
-
|
|
581
|
+
var groupVisible = !this.show || this.show(row, index);
|
|
582
|
+
this.isShown = groupVisible && this.rowActions.some(function (action) { return action.isShown; });
|
|
573
583
|
}
|
|
574
584
|
else if (this.show) {
|
|
575
585
|
this.isShown = this.show(row, index);
|
|
@@ -3044,6 +3054,7 @@
|
|
|
3044
3054
|
// Empty state
|
|
3045
3055
|
_this.emptyStateEnabled = false;
|
|
3046
3056
|
_this.onDestroy$ = new rxjs.Subject();
|
|
3057
|
+
_this._filtersQuery = new rxjs.BehaviorSubject(null);
|
|
3047
3058
|
_this._fromJSON(config);
|
|
3048
3059
|
_this.initialize(config);
|
|
3049
3060
|
_this._headerConfig = new StyleConfig(config.header);
|
|
@@ -3065,6 +3076,20 @@
|
|
|
3065
3076
|
enumerable: true,
|
|
3066
3077
|
configurable: true
|
|
3067
3078
|
});
|
|
3079
|
+
Object.defineProperty(List.prototype, "filtersQuery", {
|
|
3080
|
+
get: function () {
|
|
3081
|
+
return this._filtersQuery.getValue();
|
|
3082
|
+
},
|
|
3083
|
+
enumerable: true,
|
|
3084
|
+
configurable: true
|
|
3085
|
+
});
|
|
3086
|
+
Object.defineProperty(List.prototype, "filtersQuery$", {
|
|
3087
|
+
get: function () {
|
|
3088
|
+
return this._filtersQuery.asObservable();
|
|
3089
|
+
},
|
|
3090
|
+
enumerable: true,
|
|
3091
|
+
configurable: true
|
|
3092
|
+
});
|
|
3068
3093
|
List.prototype.fetchRemote = function (query) {
|
|
3069
3094
|
var options = {
|
|
3070
3095
|
state: this.dataController.operation,
|
|
@@ -3528,7 +3553,7 @@
|
|
|
3528
3553
|
if (this.filterInitCb) {
|
|
3529
3554
|
this.filterInitCb(filters);
|
|
3530
3555
|
}
|
|
3531
|
-
this.
|
|
3556
|
+
this._filtersQuery.next(filters);
|
|
3532
3557
|
this.checkRestoreFilter();
|
|
3533
3558
|
};
|
|
3534
3559
|
/**
|
|
@@ -3540,7 +3565,7 @@
|
|
|
3540
3565
|
if (this.filterChangeCb) {
|
|
3541
3566
|
this.filterChangeCb(filterQuery, filterSort);
|
|
3542
3567
|
}
|
|
3543
|
-
this.
|
|
3568
|
+
this._filtersQuery.next(filterQuery);
|
|
3544
3569
|
this.restoreMode = false;
|
|
3545
3570
|
// Restore option
|
|
3546
3571
|
this.checkRestoreFilter();
|
|
@@ -3760,6 +3785,7 @@
|
|
|
3760
3785
|
this._enabled$ = new rxjs.BehaviorSubject(false);
|
|
3761
3786
|
this._manualReorderActivated$ = new rxjs.BehaviorSubject(false);
|
|
3762
3787
|
this._reorderDisabled$ = new rxjs.BehaviorSubject(false);
|
|
3788
|
+
this._numberOfActiveFilters = 0;
|
|
3763
3789
|
this._destroy$ = new rxjs.Subject();
|
|
3764
3790
|
}
|
|
3765
3791
|
Object.defineProperty(ReorderController.prototype, "enabled", {
|
|
@@ -3793,7 +3819,9 @@
|
|
|
3793
3819
|
return this._enabled$
|
|
3794
3820
|
.pipe(operators.map(function (enabled) {
|
|
3795
3821
|
return enabled && _this.position === exports.ReorderPosition.Left;
|
|
3796
|
-
}), operators.
|
|
3822
|
+
}), operators.map(function (enabled) {
|
|
3823
|
+
return enabled && _this._numberOfActiveFilters === 0;
|
|
3824
|
+
}), operators.distinctUntilChanged(), operators.shareReplay());
|
|
3797
3825
|
},
|
|
3798
3826
|
enumerable: true,
|
|
3799
3827
|
configurable: true
|
|
@@ -3804,7 +3832,9 @@
|
|
|
3804
3832
|
return this._enabled$
|
|
3805
3833
|
.pipe(operators.map(function (enabled) {
|
|
3806
3834
|
return enabled && _this.position === exports.ReorderPosition.Right;
|
|
3807
|
-
}), operators.
|
|
3835
|
+
}), operators.map(function (enabled) {
|
|
3836
|
+
return enabled && _this._numberOfActiveFilters === 0;
|
|
3837
|
+
}), operators.distinctUntilChanged(), operators.shareReplay());
|
|
3808
3838
|
},
|
|
3809
3839
|
enumerable: true,
|
|
3810
3840
|
configurable: true
|
|
@@ -3927,6 +3957,10 @@
|
|
|
3927
3957
|
this._reorderDisabled$.next(true);
|
|
3928
3958
|
this._actionsController.updateDisabledState();
|
|
3929
3959
|
};
|
|
3960
|
+
ReorderController.prototype.setNunberOfActiveFilters = function (activeFilters) {
|
|
3961
|
+
this._numberOfActiveFilters = activeFilters;
|
|
3962
|
+
this.enabled = this.enabled;
|
|
3963
|
+
};
|
|
3930
3964
|
ReorderController = __decorate([
|
|
3931
3965
|
core.Injectable(),
|
|
3932
3966
|
__metadata("design:paramtypes", [])
|
|
@@ -4453,6 +4487,7 @@
|
|
|
4453
4487
|
this._updateCustomizeAction(listConfig.actions);
|
|
4454
4488
|
this.list = new List(this._el, listConfig, this.fsScroll, this.selectionDialog, this._router, this._route, this._persistance, this._inDialog);
|
|
4455
4489
|
this._waitFirstLoad();
|
|
4490
|
+
this._listenFiltersQueryChange();
|
|
4456
4491
|
this.reorderController.initWithConfig(config.reorder, this.list.dataController, this.list.actions);
|
|
4457
4492
|
if (this.listColumnDirectives) {
|
|
4458
4493
|
this.list.tranformTemplatesToColumns(this.listColumnDirectives);
|
|
@@ -4530,6 +4565,17 @@
|
|
|
4530
4565
|
_this.cdRef.markForCheck();
|
|
4531
4566
|
});
|
|
4532
4567
|
};
|
|
4568
|
+
FsListComponent.prototype._listenFiltersQueryChange = function () {
|
|
4569
|
+
var _this = this;
|
|
4570
|
+
this.list.filtersQuery$
|
|
4571
|
+
.pipe(operators.takeUntil(this.list.onDestroy$), operators.takeUntil(this._destroy))
|
|
4572
|
+
.subscribe(function (value) {
|
|
4573
|
+
if (value) {
|
|
4574
|
+
var activeFilters = Object.keys(value).length;
|
|
4575
|
+
_this.reorderController.setNunberOfActiveFilters(activeFilters);
|
|
4576
|
+
}
|
|
4577
|
+
});
|
|
4578
|
+
};
|
|
4533
4579
|
FsListComponent.prototype._configMergeCustomizer = function (objValue, srcValue) {
|
|
4534
4580
|
if (Array.isArray(objValue)) {
|
|
4535
4581
|
return objValue;
|
|
@@ -5826,7 +5872,7 @@
|
|
|
5826
5872
|
FsRowActionsComponent = __decorate([
|
|
5827
5873
|
core.Component({
|
|
5828
5874
|
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 <
|
|
5875
|
+
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
5876
|
changeDetection: core.ChangeDetectionStrategy.OnPush
|
|
5831
5877
|
}),
|
|
5832
5878
|
__metadata("design:paramtypes", [prompt.FsPrompt])
|
|
@@ -5838,10 +5884,14 @@
|
|
|
5838
5884
|
function FsRowInlineActionComponent(_fsPrompt) {
|
|
5839
5885
|
this._fsPrompt = _fsPrompt;
|
|
5840
5886
|
this.clicked = new core.EventEmitter();
|
|
5887
|
+
this.fileSelect = new core.EventEmitter();
|
|
5841
5888
|
}
|
|
5842
5889
|
FsRowInlineActionComponent.prototype.actionClick = function (event) {
|
|
5843
5890
|
this.clicked.emit(event);
|
|
5844
5891
|
};
|
|
5892
|
+
FsRowInlineActionComponent.prototype.fileSelected = function (event) {
|
|
5893
|
+
this.fileSelect.emit(event);
|
|
5894
|
+
};
|
|
5845
5895
|
FsRowInlineActionComponent.ctorParameters = function () { return [
|
|
5846
5896
|
{ type: prompt.FsPrompt }
|
|
5847
5897
|
]; };
|
|
@@ -5853,10 +5903,14 @@
|
|
|
5853
5903
|
core.Output(),
|
|
5854
5904
|
__metadata("design:type", Object)
|
|
5855
5905
|
], FsRowInlineActionComponent.prototype, "clicked", void 0);
|
|
5906
|
+
__decorate([
|
|
5907
|
+
core.Output(),
|
|
5908
|
+
__metadata("design:type", Object)
|
|
5909
|
+
], FsRowInlineActionComponent.prototype, "fileSelect", void 0);
|
|
5856
5910
|
FsRowInlineActionComponent = __decorate([
|
|
5857
5911
|
core.Component({
|
|
5858
5912
|
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
|
|
5913
|
+
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
5914
|
changeDetection: core.ChangeDetectionStrategy.OnPush
|
|
5861
5915
|
}),
|
|
5862
5916
|
__metadata("design:paramtypes", [prompt.FsPrompt])
|
|
@@ -5864,6 +5918,45 @@
|
|
|
5864
5918
|
return FsRowInlineActionComponent;
|
|
5865
5919
|
}());
|
|
5866
5920
|
|
|
5921
|
+
var FsRowMenuActionComponent = /** @class */ (function () {
|
|
5922
|
+
function FsRowMenuActionComponent() {
|
|
5923
|
+
this.fileSelect = new core.EventEmitter();
|
|
5924
|
+
this.fileError = new core.EventEmitter();
|
|
5925
|
+
}
|
|
5926
|
+
__decorate([
|
|
5927
|
+
core.Input(),
|
|
5928
|
+
__metadata("design:type", String)
|
|
5929
|
+
], FsRowMenuActionComponent.prototype, "icon", void 0);
|
|
5930
|
+
__decorate([
|
|
5931
|
+
core.Input(),
|
|
5932
|
+
__metadata("design:type", String)
|
|
5933
|
+
], FsRowMenuActionComponent.prototype, "label", void 0);
|
|
5934
|
+
__decorate([
|
|
5935
|
+
core.Input(),
|
|
5936
|
+
__metadata("design:type", Boolean)
|
|
5937
|
+
], FsRowMenuActionComponent.prototype, "file", void 0);
|
|
5938
|
+
__decorate([
|
|
5939
|
+
core.Input(),
|
|
5940
|
+
__metadata("design:type", Boolean)
|
|
5941
|
+
], FsRowMenuActionComponent.prototype, "fileMultiple", void 0);
|
|
5942
|
+
__decorate([
|
|
5943
|
+
core.Output(),
|
|
5944
|
+
__metadata("design:type", Object)
|
|
5945
|
+
], FsRowMenuActionComponent.prototype, "fileSelect", void 0);
|
|
5946
|
+
__decorate([
|
|
5947
|
+
core.Output(),
|
|
5948
|
+
__metadata("design:type", Object)
|
|
5949
|
+
], FsRowMenuActionComponent.prototype, "fileError", void 0);
|
|
5950
|
+
FsRowMenuActionComponent = __decorate([
|
|
5951
|
+
core.Component({
|
|
5952
|
+
selector: 'fs-list-row-menu-action',
|
|
5953
|
+
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",
|
|
5954
|
+
changeDetection: core.ChangeDetectionStrategy.OnPush
|
|
5955
|
+
})
|
|
5956
|
+
], FsRowMenuActionComponent);
|
|
5957
|
+
return FsRowMenuActionComponent;
|
|
5958
|
+
}());
|
|
5959
|
+
|
|
5867
5960
|
var FsListManageSavedFiltersComponent = /** @class */ (function () {
|
|
5868
5961
|
function FsListManageSavedFiltersComponent(_externalParams) {
|
|
5869
5962
|
this._externalParams = _externalParams;
|
|
@@ -6086,6 +6179,7 @@
|
|
|
6086
6179
|
prompt.FsPromptModule,
|
|
6087
6180
|
dialog.MatDialogModule,
|
|
6088
6181
|
tooltip.MatTooltipModule,
|
|
6182
|
+
file.FsFileModule,
|
|
6089
6183
|
],
|
|
6090
6184
|
declarations: [
|
|
6091
6185
|
// Components
|
|
@@ -6093,6 +6187,7 @@
|
|
|
6093
6187
|
FsRowComponent,
|
|
6094
6188
|
FsRowActionsComponent,
|
|
6095
6189
|
FsRowInlineActionComponent,
|
|
6190
|
+
FsRowMenuActionComponent,
|
|
6096
6191
|
FsCellComponent,
|
|
6097
6192
|
FsFooterRowComponent,
|
|
6098
6193
|
FsFooterCellComponent,
|
|
@@ -6180,11 +6275,12 @@
|
|
|
6180
6275
|
exports.ɵf = FsListDraggableListDirective;
|
|
6181
6276
|
exports.ɵg = FsRowActionsComponent;
|
|
6182
6277
|
exports.ɵh = FsRowInlineActionComponent;
|
|
6183
|
-
exports.ɵi =
|
|
6184
|
-
exports.ɵj =
|
|
6185
|
-
exports.ɵk =
|
|
6186
|
-
exports.ɵl =
|
|
6187
|
-
exports.ɵm =
|
|
6278
|
+
exports.ɵi = FsRowMenuActionComponent;
|
|
6279
|
+
exports.ɵj = FsListLoaderComponent;
|
|
6280
|
+
exports.ɵk = FsListSavedFiltersComponent;
|
|
6281
|
+
exports.ɵl = FsListManageSavedFiltersComponent;
|
|
6282
|
+
exports.ɵm = FsListDraggableRowDirective;
|
|
6283
|
+
exports.ɵn = CustomizeColsDialogComponent;
|
|
6188
6284
|
|
|
6189
6285
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
6190
6286
|
|