@firestitch/filter 12.12.1 → 12.12.2
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/components/filter/filter.component.d.ts +3 -3
- package/bundles/firestitch-filter.umd.js +14 -14
- package/bundles/firestitch-filter.umd.js.map +1 -1
- package/esm2015/app/components/filter/filter.component.js +13 -6
- package/esm2015/app/services/external-params-controller.service.js +2 -1
- package/esm2015/app/services/items-store.service.js +2 -10
- package/fesm2015/firestitch-filter.js +13 -13
- package/fesm2015/firestitch-filter.js.map +1 -1
- package/package.json +1 -1
|
@@ -14,12 +14,12 @@ import { FsFilterOverlayService } from '../../services/filter-overlay.service';
|
|
|
14
14
|
import { FsFilterItemsStore } from '../../services/items-store.service';
|
|
15
15
|
import * as i0 from "@angular/core";
|
|
16
16
|
export declare class FilterComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
17
|
+
private _defaultConfig;
|
|
17
18
|
private _filterOverlay;
|
|
18
19
|
private _zone;
|
|
19
20
|
private _externalParams;
|
|
20
21
|
private _filterItems;
|
|
21
22
|
private _actions;
|
|
22
|
-
private _defaultConfig;
|
|
23
23
|
set setConfig(config: any);
|
|
24
24
|
set setFilter(config: any);
|
|
25
25
|
showSortBy: any;
|
|
@@ -42,7 +42,7 @@ export declare class FilterComponent implements OnInit, AfterViewInit, OnDestroy
|
|
|
42
42
|
private _keywordVisible$;
|
|
43
43
|
private _hasFilterChips$;
|
|
44
44
|
private _destroy$;
|
|
45
|
-
constructor(_filterOverlay: FsFilterOverlayService, _zone: NgZone, _externalParams: ExternalParamsController, _filterItems: FsFilterItemsStore, _actions: ActionsController
|
|
45
|
+
constructor(_defaultConfig: FsFilterConfig, _filterOverlay: FsFilterOverlayService, _zone: NgZone, _externalParams: ExternalParamsController, _filterItems: FsFilterItemsStore, _actions: ActionsController);
|
|
46
46
|
get config(): FsFilterConfig;
|
|
47
47
|
get filterParams(): Record<string, unknown>;
|
|
48
48
|
get filterParamsQuery(): Record<string, unknown>;
|
|
@@ -190,6 +190,6 @@ export declare class FilterComponent implements OnInit, AfterViewInit, OnDestroy
|
|
|
190
190
|
private _initOverlay;
|
|
191
191
|
private _listenWhenFilterReady;
|
|
192
192
|
private _updateChipsVisibility;
|
|
193
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FilterComponent, [
|
|
193
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FilterComponent, [{ optional: true; }, null, null, null, null, null]>;
|
|
194
194
|
static ɵcmp: i0.ɵɵComponentDeclaration<FilterComponent, "fs-filter", never, { "setConfig": "config"; "setFilter": "filter"; "showSortBy": "showSortBy"; "showFilterInput": "showFilterInput"; }, { "closed": "closed"; "opened": "opened"; "ready": "ready"; }, ["statusBar"], never>;
|
|
195
195
|
}
|
|
@@ -2309,15 +2309,6 @@
|
|
|
2309
2309
|
return params;
|
|
2310
2310
|
};
|
|
2311
2311
|
FsFilterItemsStore.prototype.init = function (p) {
|
|
2312
|
-
var _this = this;
|
|
2313
|
-
this._ready$
|
|
2314
|
-
.pipe(operators.take(1), operators.takeUntil(this._destroy$))
|
|
2315
|
-
.subscribe(function () {
|
|
2316
|
-
_this.items
|
|
2317
|
-
.forEach(function (item) {
|
|
2318
|
-
item.init(item);
|
|
2319
|
-
});
|
|
2320
|
-
});
|
|
2321
2312
|
this.items
|
|
2322
2313
|
.forEach(function (item) {
|
|
2323
2314
|
item.initValues(p[item.name]);
|
|
@@ -3027,6 +3018,7 @@
|
|
|
3027
3018
|
};
|
|
3028
3019
|
ExternalParamsController.prototype.initItems = function () {
|
|
3029
3020
|
var _this = this;
|
|
3021
|
+
this._itemsStore.ready$;
|
|
3030
3022
|
this._pending$.next(true);
|
|
3031
3023
|
if (this._savedFilters.enabled) {
|
|
3032
3024
|
this._savedFilters
|
|
@@ -4827,14 +4819,14 @@
|
|
|
4827
4819
|
}] } });
|
|
4828
4820
|
|
|
4829
4821
|
var FilterComponent = /** @class */ (function () {
|
|
4830
|
-
function FilterComponent(_filterOverlay, _zone, _externalParams, _filterItems, _actions
|
|
4822
|
+
function FilterComponent(_defaultConfig, _filterOverlay, _zone, _externalParams, _filterItems, _actions) {
|
|
4831
4823
|
var _this = this;
|
|
4824
|
+
this._defaultConfig = _defaultConfig;
|
|
4832
4825
|
this._filterOverlay = _filterOverlay;
|
|
4833
4826
|
this._zone = _zone;
|
|
4834
4827
|
this._externalParams = _externalParams;
|
|
4835
4828
|
this._filterItems = _filterItems;
|
|
4836
4829
|
this._actions = _actions;
|
|
4837
|
-
this._defaultConfig = _defaultConfig;
|
|
4838
4830
|
this.showSortBy = true;
|
|
4839
4831
|
this.showFilterInput = true;
|
|
4840
4832
|
this.closed = new i0.EventEmitter();
|
|
@@ -5196,12 +5188,20 @@
|
|
|
5196
5188
|
this.searchTextInput.nativeElement.focus();
|
|
5197
5189
|
};
|
|
5198
5190
|
FilterComponent.prototype.init = function () {
|
|
5191
|
+
var _this = this;
|
|
5199
5192
|
var data = this._filterItems.valuesAsQuery();
|
|
5200
5193
|
this._sort = this._filterItems.getSort();
|
|
5201
5194
|
if (this.config.init) {
|
|
5202
5195
|
this.config.init(data, this._sort);
|
|
5203
5196
|
}
|
|
5204
5197
|
this._updateChipsVisibility();
|
|
5198
|
+
// Waiting for external ViewChilds
|
|
5199
|
+
setTimeout(function () {
|
|
5200
|
+
_this.items
|
|
5201
|
+
.forEach(function (item) {
|
|
5202
|
+
item.init(item);
|
|
5203
|
+
});
|
|
5204
|
+
});
|
|
5205
5205
|
};
|
|
5206
5206
|
FilterComponent.prototype.clear = function (event) {
|
|
5207
5207
|
if (event === void 0) { event = null; }
|
|
@@ -5443,7 +5443,7 @@
|
|
|
5443
5443
|
};
|
|
5444
5444
|
return FilterComponent;
|
|
5445
5445
|
}());
|
|
5446
|
-
FilterComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FilterComponent, deps: [{ token:
|
|
5446
|
+
FilterComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FilterComponent, deps: [{ token: FS_FILTER_CONFIG, optional: true }, { token: FsFilterOverlayService }, { token: i0__namespace.NgZone }, { token: ExternalParamsController }, { token: FsFilterItemsStore }, { token: ActionsController }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
5447
5447
|
FilterComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FilterComponent, selector: "fs-filter", inputs: { setConfig: ["config", "setConfig"], setFilter: ["filter", "setFilter"], showSortBy: "showSortBy", showFilterInput: "showFilterInput" }, outputs: { closed: "closed", opened: "opened", ready: "ready" }, host: { properties: { "class.filters-open": "this.showFilterMenu", "class.window-desktop": "this.windowDesktop", "class.fs-filter": "this.fsFilterClass", "class.has-keyword": "this.hasKeyword" } }, providers: [
|
|
5448
5448
|
FsFilterOverlayService,
|
|
5449
5449
|
ExternalParamsController,
|
|
@@ -5474,12 +5474,12 @@
|
|
|
5474
5474
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
5475
5475
|
}]
|
|
5476
5476
|
}], ctorParameters: function () {
|
|
5477
|
-
return [{ type:
|
|
5477
|
+
return [{ type: FsFilterConfig, decorators: [{
|
|
5478
5478
|
type: i0.Optional
|
|
5479
5479
|
}, {
|
|
5480
5480
|
type: i0.Inject,
|
|
5481
5481
|
args: [FS_FILTER_CONFIG]
|
|
5482
|
-
}] }];
|
|
5482
|
+
}] }, { type: FsFilterOverlayService }, { type: i0__namespace.NgZone }, { type: ExternalParamsController }, { type: FsFilterItemsStore }, { type: ActionsController }];
|
|
5483
5483
|
}, propDecorators: { setConfig: [{
|
|
5484
5484
|
type: i0.Input,
|
|
5485
5485
|
args: ['config']
|