@firestitch/list 9.12.1 → 9.12.4
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/pagination-controller.d.ts +10 -6
- package/app/components/body/row/menu-action/menu-action.component.d.ts +2 -2
- package/app/interfaces/listconfig.interface.d.ts +12 -5
- package/app/models/row-action.model.d.ts +2 -4
- package/bundles/firestitch-list.umd.js +83 -73
- package/bundles/firestitch-list.umd.js.map +1 -1
- package/bundles/firestitch-list.umd.min.js +1 -1
- package/bundles/firestitch-list.umd.min.js.map +1 -1
- package/esm2015/app/classes/list-controller.js +15 -5
- package/esm2015/app/classes/pagination-controller.js +40 -40
- package/esm2015/app/components/body/row/actions/actions.component.js +2 -2
- package/esm2015/app/components/body/row/inline-action/inline-action.component.js +2 -2
- package/esm2015/app/components/body/row/menu-action/menu-action.component.js +3 -7
- package/esm2015/app/interfaces/listconfig.interface.js +1 -1
- package/esm2015/app/models/row-action.model.js +6 -6
- package/esm2015/public_api.js +1 -1
- package/esm5/app/classes/list-controller.js +15 -5
- package/esm5/app/classes/pagination-controller.js +62 -60
- package/esm5/app/components/body/row/actions/actions.component.js +2 -2
- package/esm5/app/components/body/row/inline-action/inline-action.component.js +2 -2
- package/esm5/app/components/body/row/menu-action/menu-action.component.js +3 -7
- package/esm5/app/interfaces/listconfig.interface.js +1 -1
- package/esm5/app/models/row-action.model.js +7 -7
- package/esm5/public_api.js +1 -1
- package/fesm2015/firestitch-list.js +62 -54
- package/fesm2015/firestitch-list.js.map +1 -1
- package/fesm5/firestitch-list.js +84 -74
- package/fesm5/firestitch-list.js.map +1 -1
- package/firestitch-list.metadata.json +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +1 -1
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import { Model } from 'tsmodels';
|
|
3
2
|
import { FsListLoadMoreConfig, FsPaging, PageChange, QueryOffsetStrategy, QueryPageStrategy } from '../interfaces';
|
|
4
3
|
import { PaginationStrategy } from '../enums/pagination-strategy.enum';
|
|
5
|
-
export declare class PaginationController
|
|
4
|
+
export declare class PaginationController {
|
|
6
5
|
limit: number;
|
|
7
6
|
records: number;
|
|
8
7
|
manual: boolean;
|
|
@@ -45,6 +44,7 @@ export declare class PaginationController extends Model {
|
|
|
45
44
|
* Get query for request
|
|
46
45
|
*/
|
|
47
46
|
get query(): QueryPageStrategy | QueryOffsetStrategy;
|
|
47
|
+
get loadMoreQuery(): QueryPageStrategy | QueryOffsetStrategy;
|
|
48
48
|
/**
|
|
49
49
|
* Query for Page Strategy
|
|
50
50
|
*/
|
|
@@ -93,7 +93,6 @@ export declare class PaginationController extends Model {
|
|
|
93
93
|
* Showing 0 results sorted by Name, Ascending
|
|
94
94
|
*/
|
|
95
95
|
get statusLabel(): string;
|
|
96
|
-
_fromJSON(value: any): void;
|
|
97
96
|
initWithConfig(config: FsPaging | false, loadMore: FsListLoadMoreConfig | boolean, infinityScrollEnabled?: boolean): void;
|
|
98
97
|
/**
|
|
99
98
|
* If pagination has prev page when Page Strategy
|
|
@@ -114,10 +113,10 @@ export declare class PaginationController extends Model {
|
|
|
114
113
|
/**
|
|
115
114
|
* Update paging config and all related fields
|
|
116
115
|
* @param config
|
|
117
|
-
* @param
|
|
118
|
-
* @param
|
|
116
|
+
* @param displayedRecords
|
|
117
|
+
* @param loadMoreOperation
|
|
119
118
|
*/
|
|
120
|
-
updatePaging(config: any,
|
|
119
|
+
updatePaging(config: any, displayedRecords?: number, loadMoreOperation?: boolean): void;
|
|
121
120
|
/**
|
|
122
121
|
* Update pages array with new pages count
|
|
123
122
|
*/
|
|
@@ -174,6 +173,11 @@ export declare class PaginationController extends Model {
|
|
|
174
173
|
* Destroy
|
|
175
174
|
*/
|
|
176
175
|
destroy(): void;
|
|
176
|
+
/**
|
|
177
|
+
* Update paging state
|
|
178
|
+
* @param params
|
|
179
|
+
*/
|
|
180
|
+
private _fromParams;
|
|
177
181
|
/**
|
|
178
182
|
* Calc and update offset
|
|
179
183
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { FsListRowActionFile } from '../../../../interfaces/listconfig.interface';
|
|
2
3
|
export declare class FsRowMenuActionComponent {
|
|
3
4
|
icon: string;
|
|
4
5
|
label: string;
|
|
5
|
-
file:
|
|
6
|
-
fileMultiple: boolean;
|
|
6
|
+
file: FsListRowActionFile;
|
|
7
7
|
fileSelect: EventEmitter<any>;
|
|
8
8
|
fileError: EventEmitter<any>;
|
|
9
9
|
}
|
|
@@ -151,11 +151,7 @@ export interface FsListRowAction {
|
|
|
151
151
|
menu?: boolean;
|
|
152
152
|
click?: (row: any, event: any, index: any) => void;
|
|
153
153
|
link?: FsListRowActionLinkFn;
|
|
154
|
-
file?:
|
|
155
|
-
select: FsListRowActionFileFn;
|
|
156
|
-
error?: (error: unknown) => void;
|
|
157
|
-
multiple?: boolean;
|
|
158
|
-
};
|
|
154
|
+
file?: FsListRowActionFile;
|
|
159
155
|
show?: (row: any, index: number) => boolean;
|
|
160
156
|
remove?: {
|
|
161
157
|
title?: string;
|
|
@@ -172,6 +168,17 @@ export interface FsListRowActionLinkFn {
|
|
|
172
168
|
export interface FsListRowActionLabelFn {
|
|
173
169
|
(row: FsListAbstractRow): string;
|
|
174
170
|
}
|
|
171
|
+
export interface FsListRowActionFile {
|
|
172
|
+
select: FsListRowActionFileFn;
|
|
173
|
+
error?: (error: unknown) => void;
|
|
174
|
+
multiple?: boolean;
|
|
175
|
+
accept?: string;
|
|
176
|
+
minWidth?: number;
|
|
177
|
+
minHeight?: number;
|
|
178
|
+
maxWidth?: number;
|
|
179
|
+
maxHeight?: number;
|
|
180
|
+
imageQuality?: number;
|
|
181
|
+
}
|
|
175
182
|
export interface FsListRowActionLink {
|
|
176
183
|
link: any[] | string;
|
|
177
184
|
queryParams?: Record<string, any>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Model } from 'tsmodels';
|
|
2
2
|
import { ActionType } from '../enums/button-type.enum';
|
|
3
|
-
import {
|
|
3
|
+
import { FsListRowActionFile, FsListRowActionLink } from '../interfaces';
|
|
4
4
|
export declare class RowAction extends Model {
|
|
5
5
|
icon: string;
|
|
6
6
|
menu: boolean;
|
|
@@ -18,9 +18,7 @@ export declare class RowAction extends Model {
|
|
|
18
18
|
classArray: string[];
|
|
19
19
|
isShown: boolean;
|
|
20
20
|
click: Function;
|
|
21
|
-
|
|
22
|
-
fileUploadErrorFn: (error: unknown) => void;
|
|
23
|
-
fileMultiple: boolean;
|
|
21
|
+
fileConfig: FsListRowActionFile;
|
|
24
22
|
private _linkFn;
|
|
25
23
|
private _labelFn;
|
|
26
24
|
private readonly _isGroup;
|
|
@@ -551,13 +551,13 @@
|
|
|
551
551
|
};
|
|
552
552
|
this._linkFn = value.link;
|
|
553
553
|
if (value.file) {
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
554
|
+
this.fileConfig = __assign({}, value.file);
|
|
555
|
+
if (this.fileConfig.select) {
|
|
556
|
+
var selectFn_1 = this.fileConfig.select;
|
|
557
|
+
this.fileConfig.select = function (selection, row, index) {
|
|
558
|
+
selectFn_1(selection, row, index);
|
|
557
559
|
};
|
|
558
560
|
}
|
|
559
|
-
this.fileUploadErrorFn = value.file.error;
|
|
560
|
-
this.fileMultiple = value.file.multiple;
|
|
561
561
|
}
|
|
562
562
|
if (typeof value.label === 'function') {
|
|
563
563
|
this._labelFn = value.label;
|
|
@@ -1616,27 +1616,24 @@
|
|
|
1616
1616
|
PaginationStrategy["None"] = "none";
|
|
1617
1617
|
})(exports.PaginationStrategy || (exports.PaginationStrategy = {}));
|
|
1618
1618
|
|
|
1619
|
-
var PaginationController = /** @class */ (function (
|
|
1620
|
-
__extends(PaginationController, _super);
|
|
1619
|
+
var PaginationController = /** @class */ (function () {
|
|
1621
1620
|
function PaginationController() {
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
_this.offset = 0;
|
|
1621
|
+
this.limit = 25;
|
|
1622
|
+
this.manual = false;
|
|
1623
|
+
this.page = 1; // Active page
|
|
1624
|
+
this.offset = 0;
|
|
1627
1625
|
// public pagesArray = [];
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
return _this;
|
|
1626
|
+
this.displayed = 0;
|
|
1627
|
+
this._pages$ = new rxjs.BehaviorSubject(0); // Total pages
|
|
1628
|
+
this._strategy = exports.PaginationStrategy.None;
|
|
1629
|
+
this._removedRows = 0;
|
|
1630
|
+
this._pageChanged$ = new rxjs.Subject();
|
|
1631
|
+
this._pageReset$ = new rxjs.Subject();
|
|
1632
|
+
this._onDestroy$ = new rxjs.Subject();
|
|
1633
|
+
this._loadMoreEnabled = false;
|
|
1634
|
+
this._infinityScrollEnabled = false;
|
|
1635
|
+
this._loadMoreText = 'Load More';
|
|
1636
|
+
this._limits = [10, 25, 50, 100, 200];
|
|
1640
1637
|
}
|
|
1641
1638
|
Object.defineProperty(PaginationController.prototype, "pages", {
|
|
1642
1639
|
get: function () {
|
|
@@ -1651,7 +1648,8 @@
|
|
|
1651
1648
|
});
|
|
1652
1649
|
Object.defineProperty(PaginationController.prototype, "pages$", {
|
|
1653
1650
|
get: function () {
|
|
1654
|
-
return this._pages
|
|
1651
|
+
return this._pages$
|
|
1652
|
+
.pipe(operators.distinctUntilChanged());
|
|
1655
1653
|
},
|
|
1656
1654
|
enumerable: true,
|
|
1657
1655
|
configurable: true
|
|
@@ -1722,6 +1720,22 @@
|
|
|
1722
1720
|
enumerable: true,
|
|
1723
1721
|
configurable: true
|
|
1724
1722
|
});
|
|
1723
|
+
Object.defineProperty(PaginationController.prototype, "loadMoreQuery", {
|
|
1724
|
+
get: function () {
|
|
1725
|
+
switch (this.strategy) {
|
|
1726
|
+
case exports.PaginationStrategy.Page:
|
|
1727
|
+
return this.query;
|
|
1728
|
+
case exports.PaginationStrategy.Offset:
|
|
1729
|
+
var query = this.queryOffsetStrategy;
|
|
1730
|
+
query.limit = query.offset + query.limit;
|
|
1731
|
+
query.offset = 0;
|
|
1732
|
+
return query;
|
|
1733
|
+
}
|
|
1734
|
+
return {};
|
|
1735
|
+
},
|
|
1736
|
+
enumerable: true,
|
|
1737
|
+
configurable: true
|
|
1738
|
+
});
|
|
1725
1739
|
Object.defineProperty(PaginationController.prototype, "queryPageStrategy", {
|
|
1726
1740
|
/**
|
|
1727
1741
|
* Query for Page Strategy
|
|
@@ -1884,12 +1898,6 @@
|
|
|
1884
1898
|
enumerable: true,
|
|
1885
1899
|
configurable: true
|
|
1886
1900
|
});
|
|
1887
|
-
PaginationController.prototype._fromJSON = function (value) {
|
|
1888
|
-
_super.prototype._fromJSON.call(this, value);
|
|
1889
|
-
if (!value.limit) {
|
|
1890
|
-
this.limit = 25;
|
|
1891
|
-
}
|
|
1892
|
-
};
|
|
1893
1901
|
PaginationController.prototype.initWithConfig = function (config, loadMore, infinityScrollEnabled) {
|
|
1894
1902
|
if (infinityScrollEnabled === void 0) { infinityScrollEnabled = false; }
|
|
1895
1903
|
if (config) {
|
|
@@ -1899,12 +1907,12 @@
|
|
|
1899
1907
|
if (config.limit) {
|
|
1900
1908
|
this.limit = config.limit;
|
|
1901
1909
|
}
|
|
1902
|
-
if (loadMore) {
|
|
1903
|
-
this.setLoadMore(loadMore);
|
|
1904
|
-
}
|
|
1905
|
-
this._infinityScrollEnabled = infinityScrollEnabled;
|
|
1906
1910
|
this.strategy = config.strategy;
|
|
1907
1911
|
}
|
|
1912
|
+
if (loadMore) {
|
|
1913
|
+
this.setLoadMore(loadMore);
|
|
1914
|
+
}
|
|
1915
|
+
this._infinityScrollEnabled = infinityScrollEnabled;
|
|
1908
1916
|
};
|
|
1909
1917
|
Object.defineProperty(PaginationController.prototype, "_hasPrevPagePageStrategy", {
|
|
1910
1918
|
/**
|
|
@@ -1949,15 +1957,15 @@
|
|
|
1949
1957
|
/**
|
|
1950
1958
|
* Update paging config and all related fields
|
|
1951
1959
|
* @param config
|
|
1952
|
-
* @param
|
|
1953
|
-
* @param
|
|
1960
|
+
* @param displayedRecords
|
|
1961
|
+
* @param loadMoreOperation
|
|
1954
1962
|
*/
|
|
1955
|
-
PaginationController.prototype.updatePaging = function (config,
|
|
1956
|
-
if (
|
|
1957
|
-
if (
|
|
1958
|
-
if (!
|
|
1959
|
-
this.
|
|
1960
|
-
this.displayed =
|
|
1963
|
+
PaginationController.prototype.updatePaging = function (config, displayedRecords, loadMoreOperation) {
|
|
1964
|
+
if (displayedRecords === void 0) { displayedRecords = 0; }
|
|
1965
|
+
if (loadMoreOperation === void 0) { loadMoreOperation = false; }
|
|
1966
|
+
if (!loadMoreOperation) {
|
|
1967
|
+
this._fromParams(config);
|
|
1968
|
+
this.displayed = displayedRecords;
|
|
1961
1969
|
}
|
|
1962
1970
|
else {
|
|
1963
1971
|
this.records = config.records;
|
|
@@ -2144,6 +2152,19 @@
|
|
|
2144
2152
|
this._onDestroy$.next();
|
|
2145
2153
|
this._onDestroy$.complete();
|
|
2146
2154
|
};
|
|
2155
|
+
/**
|
|
2156
|
+
* Update paging state
|
|
2157
|
+
* @param params
|
|
2158
|
+
*/
|
|
2159
|
+
PaginationController.prototype._fromParams = function (params) {
|
|
2160
|
+
var _a;
|
|
2161
|
+
if (!this.loadMoreEnabled) {
|
|
2162
|
+
this.limit = (_a = params.limit, (_a !== null && _a !== void 0 ? _a : 25));
|
|
2163
|
+
}
|
|
2164
|
+
this.records = params.records;
|
|
2165
|
+
this.manual = params.manual;
|
|
2166
|
+
this.pages = params.pages || 0;
|
|
2167
|
+
};
|
|
2147
2168
|
/**
|
|
2148
2169
|
* Calc and update offset
|
|
2149
2170
|
*/
|
|
@@ -2156,25 +2177,8 @@
|
|
|
2156
2177
|
PaginationController.prototype.updateTotalPages = function () {
|
|
2157
2178
|
this.pages = Math.ceil(this.records / this.limit);
|
|
2158
2179
|
};
|
|
2159
|
-
__decorate([
|
|
2160
|
-
tsmodels.Alias(),
|
|
2161
|
-
__metadata("design:type", Object)
|
|
2162
|
-
], PaginationController.prototype, "limit", void 0);
|
|
2163
|
-
__decorate([
|
|
2164
|
-
tsmodels.Alias(),
|
|
2165
|
-
__metadata("design:type", Number)
|
|
2166
|
-
], PaginationController.prototype, "records", void 0);
|
|
2167
|
-
__decorate([
|
|
2168
|
-
tsmodels.Alias(),
|
|
2169
|
-
__metadata("design:type", Object)
|
|
2170
|
-
], PaginationController.prototype, "manual", void 0);
|
|
2171
|
-
__decorate([
|
|
2172
|
-
tsmodels.Alias('pages'),
|
|
2173
|
-
__metadata("design:type", Number),
|
|
2174
|
-
__metadata("design:paramtypes", [Number])
|
|
2175
|
-
], PaginationController.prototype, "pages", null);
|
|
2176
2180
|
return PaginationController;
|
|
2177
|
-
}(
|
|
2181
|
+
}());
|
|
2178
2182
|
|
|
2179
2183
|
|
|
2180
2184
|
(function (SelectionChangeType) {
|
|
@@ -3394,9 +3398,18 @@
|
|
|
3394
3398
|
var _a;
|
|
3395
3399
|
(_a = _this.selection) === null || _a === void 0 ? void 0 : _a.closeSelectionDialog();
|
|
3396
3400
|
}), operators.map(function (params) {
|
|
3397
|
-
var query =
|
|
3398
|
-
|
|
3399
|
-
|
|
3401
|
+
var query = Object.assign({}, _this.filtersQuery);
|
|
3402
|
+
if (_this.paging.hasOffsetStrategy && params && params.loadOffset) {
|
|
3403
|
+
query = Object.assign(query, _this.paging.loadDeletedOffsetQuery);
|
|
3404
|
+
}
|
|
3405
|
+
else {
|
|
3406
|
+
if (_this.initialFetch && _this.paging.loadMoreEnabled) {
|
|
3407
|
+
query = Object.assign(query, _this.paging.loadMoreQuery);
|
|
3408
|
+
}
|
|
3409
|
+
else {
|
|
3410
|
+
query = Object.assign(query, _this.paging.query);
|
|
3411
|
+
}
|
|
3412
|
+
}
|
|
3400
3413
|
if (_this.sorting.sortingColumn) {
|
|
3401
3414
|
Object.assign(query, {
|
|
3402
3415
|
order: _this.sorting.sortingColumn.name + "," + _this.sorting.sortingColumn.direction
|
|
@@ -3423,6 +3436,7 @@
|
|
|
3423
3436
|
return source$;
|
|
3424
3437
|
}), operators.takeUntil(this.onDestroy$))
|
|
3425
3438
|
.subscribe(function (response) {
|
|
3439
|
+
_this.initialFetch = false;
|
|
3426
3440
|
_this.completeFetch(response);
|
|
3427
3441
|
});
|
|
3428
3442
|
};
|
|
@@ -3638,7 +3652,7 @@
|
|
|
3638
3652
|
this.selection.selectedRowsIntersection(this.dataController.visibleRowsData);
|
|
3639
3653
|
}
|
|
3640
3654
|
if (((_c = this.emptyState) === null || _c === void 0 ? void 0 : _c.validate) && this.emptyStateTemplate) {
|
|
3641
|
-
this.emptyStateEnabled = this.emptyState.validate(query, lodashEs.cloneDeep(
|
|
3655
|
+
this.emptyStateEnabled = this.emptyState.validate(query, lodashEs.cloneDeep(this.dataController.visibleRowsData));
|
|
3642
3656
|
}
|
|
3643
3657
|
if (this.afterFetchFn) {
|
|
3644
3658
|
this.afterFetchFn(query, this.dataController.visibleRowsData);
|
|
@@ -5872,7 +5886,7 @@
|
|
|
5872
5886
|
FsRowActionsComponent = __decorate([
|
|
5873
5887
|
core.Component({
|
|
5874
5888
|
selector: 'fs-list-row-actions',
|
|
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.
|
|
5889
|
+
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.fileConfig.select($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.fileConfig\"\n (fileSelect)=\"action.fileConfig.select($event, row, index)\"\n (fileError)=\"action.fileConfig.error && action.fileConfig.error($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.fileConfig\"\n (fileSelect)=\"subAction.fileConfig.select($event, row, index)\"\n (fileError)=\"subAction.fileConfig.error && subAction.fileConfig.error($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.fileConfig\"\n (fileSelect)=\"action.fileConfig.select($event, row, index)\"\n (fileError)=\"action.fileConfig.error && action.fileConfig.error($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",
|
|
5876
5890
|
changeDetection: core.ChangeDetectionStrategy.OnPush
|
|
5877
5891
|
}),
|
|
5878
5892
|
__metadata("design:paramtypes", [prompt.FsPrompt])
|
|
@@ -5910,7 +5924,7 @@
|
|
|
5910
5924
|
FsRowInlineActionComponent = __decorate([
|
|
5911
5925
|
core.Component({
|
|
5912
5926
|
selector: 'fs-list-row-inline-action',
|
|
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.
|
|
5927
|
+
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.fileConfig 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 [accept]=\"action.fileConfig.accept || '*'\"\n [multiple]=\"action.fileConfig.multiple\"\n [minWidth]=\"action.fileConfig.minWidth\"\n [minHeight]=\"action.fileConfig.minHeight\"\n [imageWidth]=\"action.fileConfig.maxWidth\"\n [imageHeight]=\"action.fileConfig.maxHeight\"\n (select)=\"fileSelected($event)\"\n (error)=\"action.fileConfig.error && action.fileConfig.error($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",
|
|
5914
5928
|
changeDetection: core.ChangeDetectionStrategy.OnPush
|
|
5915
5929
|
}),
|
|
5916
5930
|
__metadata("design:paramtypes", [prompt.FsPrompt])
|
|
@@ -5933,12 +5947,8 @@
|
|
|
5933
5947
|
], FsRowMenuActionComponent.prototype, "label", void 0);
|
|
5934
5948
|
__decorate([
|
|
5935
5949
|
core.Input(),
|
|
5936
|
-
__metadata("design:type",
|
|
5950
|
+
__metadata("design:type", Object)
|
|
5937
5951
|
], FsRowMenuActionComponent.prototype, "file", void 0);
|
|
5938
|
-
__decorate([
|
|
5939
|
-
core.Input(),
|
|
5940
|
-
__metadata("design:type", Boolean)
|
|
5941
|
-
], FsRowMenuActionComponent.prototype, "fileMultiple", void 0);
|
|
5942
5952
|
__decorate([
|
|
5943
5953
|
core.Output(),
|
|
5944
5954
|
__metadata("design:type", Object)
|
|
@@ -5950,7 +5960,7 @@
|
|
|
5950
5960
|
FsRowMenuActionComponent = __decorate([
|
|
5951
5961
|
core.Component({
|
|
5952
5962
|
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]=\"
|
|
5963
|
+
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 [accept]=\"file.accept || '*'\"\n [multiple]=\"file.multiple\"\n [minWidth]=\"file.minWidth\"\n [minHeight]=\"file.minHeight\"\n [imageWidth]=\"file.maxWidth\"\n [imageHeight]=\"file.maxHeight\"\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
5964
|
changeDetection: core.ChangeDetectionStrategy.OnPush
|
|
5955
5965
|
})
|
|
5956
5966
|
], FsRowMenuActionComponent);
|