@firestitch/filter 9.9.1 → 9.9.6
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/interfaces/action.interface.d.ts +1 -0
- package/app/models/action.model.d.ts +1 -0
- package/bundles/firestitch-filter.umd.js +11 -4
- package/bundles/firestitch-filter.umd.js.map +1 -1
- package/bundles/firestitch-filter.umd.min.js +1 -1
- package/bundles/firestitch-filter.umd.min.js.map +1 -1
- package/esm2015/app/components/action-button/action-button.component.js +2 -2
- package/esm2015/app/components/action-kebab-actions/action-kebab-actions.component.js +2 -2
- package/esm2015/app/interfaces/action.interface.js +1 -1
- package/esm2015/app/models/action.model.js +2 -1
- package/esm2015/app/models/items/base-item.js +2 -2
- package/esm2015/app/services/external-params-controller.service.js +8 -2
- package/esm2015/app/services/items-store.service.js +2 -2
- package/esm5/app/components/action-button/action-button.component.js +2 -2
- package/esm5/app/components/action-kebab-actions/action-kebab-actions.component.js +2 -2
- package/esm5/app/interfaces/action.interface.js +1 -1
- package/esm5/app/models/action.model.js +2 -1
- package/esm5/app/models/items/base-item.js +2 -2
- package/esm5/app/services/external-params-controller.service.js +8 -2
- package/esm5/app/services/items-store.service.js +2 -2
- package/fesm2015/firestitch-filter.js +11 -4
- package/fesm2015/firestitch-filter.js.map +1 -1
- package/fesm5/firestitch-filter.js +11 -4
- package/fesm5/firestitch-filter.js.map +1 -1
- package/firestitch-filter.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -308,6 +308,7 @@ var BaseItem = /** @class */ (function () {
|
|
|
308
308
|
});
|
|
309
309
|
BaseItem.prototype.loadDefaultValue = function () {
|
|
310
310
|
var _this = this;
|
|
311
|
+
this._pendingDefaultValue = true;
|
|
311
312
|
return this.defaultValueFn()
|
|
312
313
|
.pipe(tap(function (value) {
|
|
313
314
|
_this.defaultValue = value;
|
|
@@ -380,7 +381,6 @@ var BaseItem = /** @class */ (function () {
|
|
|
380
381
|
this.label = item.label;
|
|
381
382
|
this.chipLabel = item.chipLabel;
|
|
382
383
|
if (typeof item.default === 'function') {
|
|
383
|
-
this._pendingDefaultValue = true;
|
|
384
384
|
this.defaultValueFn = item.default;
|
|
385
385
|
}
|
|
386
386
|
else {
|
|
@@ -1683,7 +1683,7 @@ var FsFilterItemsStore = /** @class */ (function () {
|
|
|
1683
1683
|
var _this = this;
|
|
1684
1684
|
var pendingItems = this.items
|
|
1685
1685
|
.filter(function (item) {
|
|
1686
|
-
return item.
|
|
1686
|
+
return item.defaultValueFn
|
|
1687
1687
|
&& (item.persistedValue === null || item.persistedValue === undefined);
|
|
1688
1688
|
});
|
|
1689
1689
|
if (pendingItems.length > 0) {
|
|
@@ -2506,6 +2506,12 @@ var ExternalParamsController = /** @class */ (function () {
|
|
|
2506
2506
|
};
|
|
2507
2507
|
ExternalParamsController.prototype._listenItemsChange = function () {
|
|
2508
2508
|
var _this = this;
|
|
2509
|
+
this._itemsStore.ready$
|
|
2510
|
+
.pipe(filter$1(function (v) { return v; }), take(1), takeUntil(this._destroy$))
|
|
2511
|
+
.subscribe(function () {
|
|
2512
|
+
_this._saveQueryParams();
|
|
2513
|
+
_this._savePersistedParams();
|
|
2514
|
+
});
|
|
2509
2515
|
this._itemsStore
|
|
2510
2516
|
.itemsChange$
|
|
2511
2517
|
.pipe(takeUntil(this._destroy$))
|
|
@@ -3033,6 +3039,7 @@ var Action = /** @class */ (function () {
|
|
|
3033
3039
|
this.label = config.label;
|
|
3034
3040
|
this.mode = config.mode;
|
|
3035
3041
|
this.icon = config.icon;
|
|
3042
|
+
this.iconPlacement = config.iconPlacement;
|
|
3036
3043
|
this._showFn = config.show;
|
|
3037
3044
|
this.tabIndex = (_d = config.tabIndex) !== null && _d !== void 0 ? _d : 0;
|
|
3038
3045
|
if (config.multiple !== undefined) {
|
|
@@ -4961,7 +4968,7 @@ var FsFilterActionButtonComponent = /** @class */ (function () {
|
|
|
4961
4968
|
FsFilterActionButtonComponent = __decorate([
|
|
4962
4969
|
Component({
|
|
4963
4970
|
selector: 'fs-filter-action-button',
|
|
4964
|
-
template: "<ng-container [ngSwitch]=\"action.type\">\n <!-- Basic button -->\n <button type=\"button\"\n *ngSwitchCase=\"'basic'\"\n mat-button\n (click)=\"action.click && action.click($event)\"\n [color]=\"action.color\"\n [ngClass]=\"action.classArray\"\n [disabled]=\"action.disabled$ | async\"\n [tabIndex]=\"action.tabIndex\"\n >\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n\n <!-- Raised button -->\n <button type=\"button\"\n *ngSwitchDefault\n mat-raised-button\n (click)=\"action.click && action.click($event)\"\n [color]=\"action.color\"\n [ngClass]=\"action.classArray\"\n [disabled]=\"action.disabled$ | async\"\n [tabIndex]=\"action.tabIndex\"\n >\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n\n <!-- Icon button -->\n <button type=\"button\"\n *ngSwitchCase=\"'icon'\"\n mat-icon-button\n (click)=\"action.click && action.click($event)\"\n [color]=\"action.color\"\n [ngClass]=\"action.classArray\"\n [disabled]=\"action.disabled$ | async\"\n [tabIndex]=\"action.tabIndex\"\n >\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n\n <!-- Fab button -->\n <button type=\"button\"\n *ngSwitchCase=\"'fab'\"\n mat-fab\n (click)=\"action.click && action.click($event)\"\n [color]=\"action.color\"\n [ngClass]=\"action.classArray\"\n [disabled]=\"action.disabled$ | async\"\n [tabIndex]=\"action.tabIndex\"\n >\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n\n <!-- Mini Fab button -->\n <button type=\"button\"\n *ngSwitchCase=\"'mini-fab'\"\n mat-mini-fab\n (click)=\"action.click && action.click($event)\"\n [color]=\"action.color\"\n [ngClass]=\"action.classArray\"\n [disabled]=\"action.disabled$ | async\"\n [tabIndex]=\"action.tabIndex\"\n >\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n\n <ng-template #buttonContent>\n <mat-icon *ngIf=\"action.
|
|
4971
|
+
template: "<ng-container [ngSwitch]=\"action.type\">\n <!-- Basic button -->\n <button type=\"button\"\n *ngSwitchCase=\"'basic'\"\n mat-button\n (click)=\"action.click && action.click($event)\"\n [color]=\"action.color\"\n [ngClass]=\"action.classArray\"\n [disabled]=\"action.disabled$ | async\"\n [tabIndex]=\"action.tabIndex\"\n >\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n\n <!-- Raised button -->\n <button type=\"button\"\n *ngSwitchDefault\n mat-raised-button\n (click)=\"action.click && action.click($event)\"\n [color]=\"action.color\"\n [ngClass]=\"action.classArray\"\n [disabled]=\"action.disabled$ | async\"\n [tabIndex]=\"action.tabIndex\"\n >\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n\n <!-- Icon button -->\n <button type=\"button\"\n *ngSwitchCase=\"'icon'\"\n mat-icon-button\n (click)=\"action.click && action.click($event)\"\n [color]=\"action.color\"\n [ngClass]=\"action.classArray\"\n [disabled]=\"action.disabled$ | async\"\n [tabIndex]=\"action.tabIndex\"\n >\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n\n <!-- Fab button -->\n <button type=\"button\"\n *ngSwitchCase=\"'fab'\"\n mat-fab\n (click)=\"action.click && action.click($event)\"\n [color]=\"action.color\"\n [ngClass]=\"action.classArray\"\n [disabled]=\"action.disabled$ | async\"\n [tabIndex]=\"action.tabIndex\"\n >\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n\n <!-- Mini Fab button -->\n <button type=\"button\"\n *ngSwitchCase=\"'mini-fab'\"\n mat-mini-fab\n (click)=\"action.click && action.click($event)\"\n [color]=\"action.color\"\n [ngClass]=\"action.classArray\"\n [disabled]=\"action.disabled$ | async\"\n [tabIndex]=\"action.tabIndex\"\n >\n <ng-template [ngTemplateOutlet]=\"buttonContent\"></ng-template>\n </button>\n\n <ng-template #buttonContent>\n <ng-container *ngIf=\"!action.icon else withIcon\">\n {{action.label}}\n </ng-container>\n\n <ng-template #withIcon>\n <mat-icon *ngIf=\"!action.iconPlacement || action.iconPlacement === 'left'\">{{action.icon}}</mat-icon>\n {{action.label}}\n <mat-icon *ngIf=\"action.iconPlacement === 'right'\">{{action.icon}}</mat-icon>\n </ng-template>\n </ng-template>\n</ng-container>\n",
|
|
4965
4972
|
host: {
|
|
4966
4973
|
class: 'action-button',
|
|
4967
4974
|
},
|
|
@@ -4981,7 +4988,7 @@ var FsFilterActionKebabActionsComponent = /** @class */ (function () {
|
|
|
4981
4988
|
FsFilterActionKebabActionsComponent = __decorate([
|
|
4982
4989
|
Component({
|
|
4983
4990
|
selector: 'fs-filter-action-kebab-actions',
|
|
4984
|
-
template: "<button type=\"button\"\n mat-icon-button\n class=\"menu-button\"\n [fsMenuTriggerFor]=\"kebabActionsMenu\">\n <mat-icon>more_vert</mat-icon>\n</button>\n<fs-menu #kebabActionsMenu>\n <ng-container *ngFor=\"let action of kebabActions\">\n <ng-container [ngSwitch]=\"action.mode\">\n <!-- Case when actions was collapsed from action with mode = 'menu'-->\n <ng-container *ngSwitchCase=\"'menu'\">\n <ng-container *ngFor=\"let childAction of action.items\">\n <ng-container *ngIf=\"childAction.isGroup else simpleMenuItem\">\n <fs-menu-group>\n <ng-template fs-group-menu-item-template>\n {{ action.label }} <mat-icon style=\"margin: 0;\">arrow_right</mat-icon> {{childAction.label}}\n </ng-template>\n <ng-container *ngFor=\"let subAction of childAction.items\">\n <ng-template fs-menu-item\n [link]=\"subAction.routerLink?.link\"\n [queryParams]=\"subAction.routerLink?.queryParams\"\n [hidden]=\"!(subAction.visible$ | async)\"\n (click)=\"subAction.click($event)\">\n <mat-icon *ngIf=\"subAction.icon\">{{subAction.icon}}</mat-icon>\n {{subAction.label}}\n </ng-template>\n </ng-container>\n </fs-menu-group>\n </ng-container>\n <ng-template #simpleMenuItem>\n <ng-template fs-menu-item\n [link]=\"childAction.routerLink?.link\"\n [queryParams]=\"childAction.routerLink?.queryParams\"\n [hidden]=\"!(childAction.visible$ | async)\"\n (click)=\"childAction.click($event);\">\n <mat-icon *ngIf=\"childAction.icon\">{{childAction.icon}}</mat-icon>\n {{ action.label }} <mat-icon style=\"margin: 0;\">arrow_right</mat-icon>{{ childAction.label }}\n </ng-template>\n </ng-template>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <ng-template fs-menu-item\n (click)=\"action.click($event)\"\n [fsClass]=\"action.classArray\"\n >\n <mat-icon *ngIf=\"action.icon\">{{action.icon}}</mat-icon> {{action.label}}\n </ng-template>\n </ng-container>\n\n </ng-container>\n </ng-container>\n</fs-menu>\n",
|
|
4991
|
+
template: "<button type=\"button\"\n mat-icon-button\n class=\"menu-button\"\n [fsMenuTriggerFor]=\"kebabActionsMenu\">\n <mat-icon>more_vert</mat-icon>\n</button>\n<fs-menu #kebabActionsMenu>\n <ng-container *ngFor=\"let action of kebabActions\">\n <ng-container [ngSwitch]=\"action.mode\">\n <!-- Case when actions was collapsed from action with mode = 'menu'-->\n <ng-container *ngSwitchCase=\"'menu'\">\n <ng-container *ngFor=\"let childAction of action.items\">\n <ng-container *ngIf=\"childAction.isGroup else simpleMenuItem\">\n <fs-menu-group>\n <ng-template fs-group-menu-item-template>\n {{ action.label }} <mat-icon style=\"margin: 0;\">arrow_right</mat-icon> {{childAction.label}}\n </ng-template>\n <ng-container *ngFor=\"let subAction of childAction.items\">\n <ng-template fs-menu-item\n [link]=\"subAction.routerLink?.link\"\n [queryParams]=\"subAction.routerLink?.queryParams\"\n [hidden]=\"!(subAction.visible$ | async)\"\n (click)=\"subAction.click($event)\">\n <mat-icon *ngIf=\"subAction.icon\">{{subAction.icon}}</mat-icon>\n {{subAction.label}}\n </ng-template>\n </ng-container>\n </fs-menu-group>\n </ng-container>\n <ng-template #simpleMenuItem>\n <ng-template fs-menu-item\n [link]=\"childAction.routerLink?.link\"\n [queryParams]=\"childAction.routerLink?.queryParams\"\n [hidden]=\"!(childAction.visible$ | async)\"\n (click)=\"childAction.click($event);\">\n <mat-icon *ngIf=\"childAction.icon\">{{childAction.icon}}</mat-icon>\n {{ action.label }} <mat-icon style=\"margin: 0;\">arrow_right</mat-icon>{{ childAction.label }}\n </ng-template>\n </ng-template>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'file'\">\n <ng-template fs-menu-item\n [fsClass]=\"action.classArray\"\n >\n <fs-file\n class=\"action-button\"\n [multiple]=\"action.multiple\"\n (select)=\"action.fileSelected($event)\"\n (error)=\"action.fileError($event)\"\n (clicked)=\"action.click($event)\">\n <mat-icon *ngIf=\"action.icon\">{{action.icon}}</mat-icon> {{action.label}}\n </fs-file>\n </ng-template>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <ng-template fs-menu-item\n (click)=\"action.click($event)\"\n [fsClass]=\"action.classArray\"\n >\n <mat-icon *ngIf=\"action.icon\">{{action.icon}}</mat-icon> {{action.label}}\n </ng-template>\n </ng-container>\n\n </ng-container>\n </ng-container>\n</fs-menu>\n",
|
|
4985
4992
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4986
4993
|
styles: [".menu-button{width:36px;height:36px;line-height:36px}"]
|
|
4987
4994
|
})
|