@firestitch/filter 12.11.7 → 12.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.
- package/app/helpers/create-filter-item.d.ts +1 -1
- package/app/interfaces/items/base.interface.d.ts +1 -0
- package/app/models/items/base-item.d.ts +3 -2
- package/app/services/items-store.service.d.ts +3 -3
- package/bundles/firestitch-filter.umd.js +133 -129
- package/bundles/firestitch-filter.umd.js.map +1 -1
- package/esm2015/app/components/filter/filter.component.js +4 -4
- package/esm2015/app/components/filter-chip/filter-chip.component.js +2 -2
- package/esm2015/app/components/filter-drawer/filter-drawer.component.js +2 -2
- package/esm2015/app/components/filters-item/autocomplete/autocomplete.component.js +2 -2
- package/esm2015/app/components/filters-item/autocompletechips/autocompletechips.component.js +2 -2
- package/esm2015/app/components/filters-item/date/date.component.js +2 -2
- package/esm2015/app/components/filters-item/date-range/date-range.component.js +2 -2
- package/esm2015/app/components/filters-item/week/week.component.js +2 -2
- package/esm2015/app/interfaces/items/base.interface.js +1 -1
- package/esm2015/app/models/items/base-item.js +4 -4
- package/esm2015/app/services/items-store.service.js +10 -6
- package/fesm2015/firestitch-filter.js +209 -205
- package/fesm2015/firestitch-filter.js.map +1 -1
- package/package.json +3 -3
|
@@ -74,23 +74,9 @@ var ItemType;
|
|
|
74
74
|
ItemType["Keyword"] = "keyword";
|
|
75
75
|
})(ItemType || (ItemType = {}));
|
|
76
76
|
|
|
77
|
-
function findValue(values, value, children) {
|
|
78
|
-
for (let i = 0; i < values.length; i++) {
|
|
79
|
-
const val = values[i];
|
|
80
|
-
if (val[children]) {
|
|
81
|
-
return findValue(val[children], value, children);
|
|
82
|
-
}
|
|
83
|
-
if (val.value === value) {
|
|
84
|
-
return val;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
return undefined;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
77
|
class BaseItem {
|
|
91
78
|
constructor(itemConfig, _additionalConfig) {
|
|
92
79
|
this._additionalConfig = _additionalConfig;
|
|
93
|
-
// protected _initialized = false;
|
|
94
80
|
this._pendingValues = false;
|
|
95
81
|
this._pendingDefaultValue = false;
|
|
96
82
|
this._loading$ = new BehaviorSubject(false);
|
|
@@ -296,8 +282,9 @@ class BaseItem {
|
|
|
296
282
|
this.defaultValue = item.default;
|
|
297
283
|
}
|
|
298
284
|
this.change = item.change;
|
|
285
|
+
this.init = item.init || ((item) => { });
|
|
299
286
|
this.hide = item.hide;
|
|
300
|
-
this.
|
|
287
|
+
this.showClear = (_a = item.clear) !== null && _a !== void 0 ? _a : true;
|
|
301
288
|
this.persistanceDisabled = (_b = item.disablePersist) !== null && _b !== void 0 ? _b : false;
|
|
302
289
|
this.queryParamsDisabled = (_c = item.disableQueryParams) !== null && _c !== void 0 ? _c : false;
|
|
303
290
|
if (isFunction(item.values)) {
|
|
@@ -312,7 +299,7 @@ class BaseItem {
|
|
|
312
299
|
var _a;
|
|
313
300
|
const model = (_a = this.persistedValue) !== null && _a !== void 0 ? _a : this.defaultValue;
|
|
314
301
|
if (model !== undefined) {
|
|
315
|
-
this.model
|
|
302
|
+
this._setModel(model);
|
|
316
303
|
}
|
|
317
304
|
}
|
|
318
305
|
_clearValue(defaultValue = undefined) {
|
|
@@ -353,183 +340,6 @@ class BaseSelectItem extends BaseItem {
|
|
|
353
340
|
}
|
|
354
341
|
}
|
|
355
342
|
|
|
356
|
-
class SimpleSelectItem extends BaseSelectItem {
|
|
357
|
-
constructor(itemConfig, _persistedValues) {
|
|
358
|
-
super(itemConfig, _persistedValues);
|
|
359
|
-
}
|
|
360
|
-
get value() {
|
|
361
|
-
let value = this.model;
|
|
362
|
-
if (value == '__all' || value === undefined) {
|
|
363
|
-
value = undefined;
|
|
364
|
-
}
|
|
365
|
-
return value;
|
|
366
|
-
}
|
|
367
|
-
getChipsContent(type = null) {
|
|
368
|
-
if (this.children) {
|
|
369
|
-
const itemValue = findValue(this.values, this.model, this.children);
|
|
370
|
-
return itemValue && itemValue.name;
|
|
371
|
-
}
|
|
372
|
-
else {
|
|
373
|
-
const itemValue = this.values.find((val) => val.value === this.model);
|
|
374
|
-
if (itemValue) {
|
|
375
|
-
return itemValue.name;
|
|
376
|
-
}
|
|
377
|
-
else if (this.isolate) {
|
|
378
|
-
return this.isolate.label;
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
get isChipVisible() {
|
|
383
|
-
return this.model !== '__all' && this.model !== undefined;
|
|
384
|
-
}
|
|
385
|
-
_init() {
|
|
386
|
-
super._init();
|
|
387
|
-
if (this.model === undefined && this.defaultValue === undefined) {
|
|
388
|
-
this._model = '__all';
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
get isolateOptionNotSelected() {
|
|
392
|
-
const modelValue = this.model;
|
|
393
|
-
const isolate = this.isolate;
|
|
394
|
-
return isolate && !isolate.enabled && (modelValue === null || modelValue === void 0 ? void 0 : modelValue.length) === 0;
|
|
395
|
-
}
|
|
396
|
-
_setModel(value) {
|
|
397
|
-
if (value) {
|
|
398
|
-
if (!isNaN(value)) {
|
|
399
|
-
value = +value;
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
super._setModel(value);
|
|
403
|
-
}
|
|
404
|
-
_validateModel() {
|
|
405
|
-
const item = this.values.find(value => {
|
|
406
|
-
return value.value == this.model;
|
|
407
|
-
});
|
|
408
|
-
const value = item ? item.value : '__all';
|
|
409
|
-
if (this._model !== value) {
|
|
410
|
-
this.model = value;
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
_clearValue(defaultValue = undefined) {
|
|
414
|
-
super._clearValue(defaultValue);
|
|
415
|
-
const value = Array.isArray(this.values) && this.values.some((val) => val.value === '__all')
|
|
416
|
-
? '__all'
|
|
417
|
-
: undefined;
|
|
418
|
-
this.model = defaultValue !== null && defaultValue !== void 0 ? defaultValue : value;
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
var ActionMode;
|
|
423
|
-
(function (ActionMode) {
|
|
424
|
-
ActionMode["Button"] = "button";
|
|
425
|
-
ActionMode["Menu"] = "menu";
|
|
426
|
-
ActionMode["File"] = "file";
|
|
427
|
-
})(ActionMode || (ActionMode = {}));
|
|
428
|
-
|
|
429
|
-
var ActionType;
|
|
430
|
-
(function (ActionType) {
|
|
431
|
-
ActionType["Basic"] = "basic";
|
|
432
|
-
ActionType["Raised"] = "raised";
|
|
433
|
-
ActionType["Icon"] = "icon";
|
|
434
|
-
ActionType["Fab"] = "fab";
|
|
435
|
-
ActionType["MiniFab"] = "mini-fab";
|
|
436
|
-
ActionType["Flat"] = "flat";
|
|
437
|
-
ActionType["Stroked"] = "stroked";
|
|
438
|
-
})(ActionType || (ActionType = {}));
|
|
439
|
-
|
|
440
|
-
var ButtonStyle;
|
|
441
|
-
(function (ButtonStyle) {
|
|
442
|
-
ButtonStyle["Basic"] = "basic";
|
|
443
|
-
ButtonStyle["Raised"] = "raised";
|
|
444
|
-
ButtonStyle["Icon"] = "icon";
|
|
445
|
-
ButtonStyle["Fab"] = "fab";
|
|
446
|
-
ButtonStyle["MiniFab"] = "mini-fab";
|
|
447
|
-
ButtonStyle["Flat"] = "flat";
|
|
448
|
-
ButtonStyle["Stroked"] = "stroked";
|
|
449
|
-
})(ButtonStyle || (ButtonStyle = {}));
|
|
450
|
-
|
|
451
|
-
var ItemDateMode;
|
|
452
|
-
(function (ItemDateMode) {
|
|
453
|
-
ItemDateMode["Calendar"] = "calendar";
|
|
454
|
-
ItemDateMode["ScrollMonthYear"] = "monthyear";
|
|
455
|
-
ItemDateMode["ScrollMonthDayYear"] = "monthdayyear";
|
|
456
|
-
})(ItemDateMode || (ItemDateMode = {}));
|
|
457
|
-
|
|
458
|
-
var PickerViewType;
|
|
459
|
-
(function (PickerViewType) {
|
|
460
|
-
PickerViewType["Date"] = "date";
|
|
461
|
-
PickerViewType["DateTime"] = "datetime";
|
|
462
|
-
PickerViewType["Time"] = "time";
|
|
463
|
-
PickerViewType["Week"] = "week";
|
|
464
|
-
PickerViewType["MonthRange"] = "monthrange";
|
|
465
|
-
})(PickerViewType || (PickerViewType = {}));
|
|
466
|
-
|
|
467
|
-
const SORT_BY_FIELD = 'sortName';
|
|
468
|
-
const SORT_DIRECTION_FIELD = 'sortDirection';
|
|
469
|
-
class FsFilterConfig {
|
|
470
|
-
constructor(data = {}) {
|
|
471
|
-
this.load = true;
|
|
472
|
-
this.persist = false;
|
|
473
|
-
this.inline = false;
|
|
474
|
-
this.autofocus = false;
|
|
475
|
-
this.chips = false;
|
|
476
|
-
this.sortValues = null;
|
|
477
|
-
this.sort = null;
|
|
478
|
-
// public sortDirection = null;
|
|
479
|
-
this.queryParam = false;
|
|
480
|
-
this.case = 'camel';
|
|
481
|
-
this._init(data);
|
|
482
|
-
}
|
|
483
|
-
_init(data = {}) {
|
|
484
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
485
|
-
this.load = (_a = data.load) !== null && _a !== void 0 ? _a : true;
|
|
486
|
-
this.persist = data.persist;
|
|
487
|
-
this.savedFilters = data.savedFilters;
|
|
488
|
-
this.inline = (_b = data.inline) !== null && _b !== void 0 ? _b : false;
|
|
489
|
-
this.autofocus = (_c = data.autofocus) !== null && _c !== void 0 ? _c : false;
|
|
490
|
-
this.chips = (_d = data.chips) !== null && _d !== void 0 ? _d : false;
|
|
491
|
-
this.sortValues = data.sorts;
|
|
492
|
-
this.sort = data.sort;
|
|
493
|
-
this.queryParam = (_e = data.queryParam) !== null && _e !== void 0 ? _e : false;
|
|
494
|
-
this.init = data.init;
|
|
495
|
-
this.change = data.change;
|
|
496
|
-
this.reload = data.reload;
|
|
497
|
-
this.clear = data.clear;
|
|
498
|
-
this.sortChange = data.sortChange;
|
|
499
|
-
this.case = (_f = data.case) !== null && _f !== void 0 ? _f : 'camel';
|
|
500
|
-
this.reloadWhenConfigChanged = data.reloadWhenConfigChanged;
|
|
501
|
-
this.button = data.button;
|
|
502
|
-
this.items = data.items;
|
|
503
|
-
this.actions = data.actions;
|
|
504
|
-
this.case = (_g = data.case) !== null && _g !== void 0 ? _g : 'camel';
|
|
505
|
-
if (this.persist) {
|
|
506
|
-
if (typeof this.persist === 'object') {
|
|
507
|
-
if (this.persist.name) {
|
|
508
|
-
this.namespace = this.persist.name;
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
if (!this.button) {
|
|
513
|
-
this.button = {};
|
|
514
|
-
}
|
|
515
|
-
if (this.button.label === undefined) {
|
|
516
|
-
this.button.label = 'Filters';
|
|
517
|
-
}
|
|
518
|
-
if (this.button.icon === undefined) {
|
|
519
|
-
this.button.icon = 'tune';
|
|
520
|
-
}
|
|
521
|
-
if (this.button.style === undefined) {
|
|
522
|
-
this.button.style = ButtonStyle.Raised;
|
|
523
|
-
}
|
|
524
|
-
if (this.button.color === undefined) {
|
|
525
|
-
this.button.color = 'default';
|
|
526
|
-
}
|
|
527
|
-
if (this.clear === undefined) {
|
|
528
|
-
this.clear = () => { };
|
|
529
|
-
}
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
|
|
533
343
|
function objectsAreEquals(obj1, obj2) {
|
|
534
344
|
const oldKeys = Object.keys(obj1);
|
|
535
345
|
const currKeys = Object.keys(obj2);
|
|
@@ -654,6 +464,85 @@ class MultipleSelectItem extends BaseSelectItem {
|
|
|
654
464
|
}
|
|
655
465
|
}
|
|
656
466
|
|
|
467
|
+
function findValue(values, value, children) {
|
|
468
|
+
for (let i = 0; i < values.length; i++) {
|
|
469
|
+
const val = values[i];
|
|
470
|
+
if (val[children]) {
|
|
471
|
+
return findValue(val[children], value, children);
|
|
472
|
+
}
|
|
473
|
+
if (val.value === value) {
|
|
474
|
+
return val;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
return undefined;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
class SimpleSelectItem extends BaseSelectItem {
|
|
481
|
+
constructor(itemConfig, _persistedValues) {
|
|
482
|
+
super(itemConfig, _persistedValues);
|
|
483
|
+
}
|
|
484
|
+
get value() {
|
|
485
|
+
let value = this.model;
|
|
486
|
+
if (value == '__all' || value === undefined) {
|
|
487
|
+
value = undefined;
|
|
488
|
+
}
|
|
489
|
+
return value;
|
|
490
|
+
}
|
|
491
|
+
getChipsContent(type = null) {
|
|
492
|
+
if (this.children) {
|
|
493
|
+
const itemValue = findValue(this.values, this.model, this.children);
|
|
494
|
+
return itemValue && itemValue.name;
|
|
495
|
+
}
|
|
496
|
+
else {
|
|
497
|
+
const itemValue = this.values.find((val) => val.value === this.model);
|
|
498
|
+
if (itemValue) {
|
|
499
|
+
return itemValue.name;
|
|
500
|
+
}
|
|
501
|
+
else if (this.isolate) {
|
|
502
|
+
return this.isolate.label;
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
get isChipVisible() {
|
|
507
|
+
return this.model !== '__all' && this.model !== undefined;
|
|
508
|
+
}
|
|
509
|
+
_init() {
|
|
510
|
+
super._init();
|
|
511
|
+
if (this.model === undefined && this.defaultValue === undefined) {
|
|
512
|
+
this._model = '__all';
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
get isolateOptionNotSelected() {
|
|
516
|
+
const modelValue = this.model;
|
|
517
|
+
const isolate = this.isolate;
|
|
518
|
+
return isolate && !isolate.enabled && (modelValue === null || modelValue === void 0 ? void 0 : modelValue.length) === 0;
|
|
519
|
+
}
|
|
520
|
+
_setModel(value) {
|
|
521
|
+
if (value) {
|
|
522
|
+
if (!isNaN(value)) {
|
|
523
|
+
value = +value;
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
super._setModel(value);
|
|
527
|
+
}
|
|
528
|
+
_validateModel() {
|
|
529
|
+
const item = this.values.find(value => {
|
|
530
|
+
return value.value == this.model;
|
|
531
|
+
});
|
|
532
|
+
const value = item ? item.value : '__all';
|
|
533
|
+
if (this._model !== value) {
|
|
534
|
+
this.model = value;
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
_clearValue(defaultValue = undefined) {
|
|
538
|
+
super._clearValue(defaultValue);
|
|
539
|
+
const value = Array.isArray(this.values) && this.values.some((val) => val.value === '__all')
|
|
540
|
+
? '__all'
|
|
541
|
+
: undefined;
|
|
542
|
+
this.model = defaultValue !== null && defaultValue !== void 0 ? defaultValue : value;
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
|
|
657
546
|
class SelectItem {
|
|
658
547
|
static create(config) {
|
|
659
548
|
if (config.multiple) {
|
|
@@ -983,6 +872,13 @@ class DateTimeRangeItem extends BaseDateRangeItem {
|
|
|
983
872
|
}
|
|
984
873
|
}
|
|
985
874
|
|
|
875
|
+
var ItemDateMode;
|
|
876
|
+
(function (ItemDateMode) {
|
|
877
|
+
ItemDateMode["Calendar"] = "calendar";
|
|
878
|
+
ItemDateMode["ScrollMonthYear"] = "monthyear";
|
|
879
|
+
ItemDateMode["ScrollMonthDayYear"] = "monthdayyear";
|
|
880
|
+
})(ItemDateMode || (ItemDateMode = {}));
|
|
881
|
+
|
|
986
882
|
class BaseDateItem extends BaseItem {
|
|
987
883
|
get value() {
|
|
988
884
|
const value = clone(this.model);
|
|
@@ -1368,6 +1264,110 @@ function createFilterItem(item, config) {
|
|
|
1368
1264
|
}
|
|
1369
1265
|
}
|
|
1370
1266
|
|
|
1267
|
+
var ActionMode;
|
|
1268
|
+
(function (ActionMode) {
|
|
1269
|
+
ActionMode["Button"] = "button";
|
|
1270
|
+
ActionMode["Menu"] = "menu";
|
|
1271
|
+
ActionMode["File"] = "file";
|
|
1272
|
+
})(ActionMode || (ActionMode = {}));
|
|
1273
|
+
|
|
1274
|
+
var ActionType;
|
|
1275
|
+
(function (ActionType) {
|
|
1276
|
+
ActionType["Basic"] = "basic";
|
|
1277
|
+
ActionType["Raised"] = "raised";
|
|
1278
|
+
ActionType["Icon"] = "icon";
|
|
1279
|
+
ActionType["Fab"] = "fab";
|
|
1280
|
+
ActionType["MiniFab"] = "mini-fab";
|
|
1281
|
+
ActionType["Flat"] = "flat";
|
|
1282
|
+
ActionType["Stroked"] = "stroked";
|
|
1283
|
+
})(ActionType || (ActionType = {}));
|
|
1284
|
+
|
|
1285
|
+
var ButtonStyle;
|
|
1286
|
+
(function (ButtonStyle) {
|
|
1287
|
+
ButtonStyle["Basic"] = "basic";
|
|
1288
|
+
ButtonStyle["Raised"] = "raised";
|
|
1289
|
+
ButtonStyle["Icon"] = "icon";
|
|
1290
|
+
ButtonStyle["Fab"] = "fab";
|
|
1291
|
+
ButtonStyle["MiniFab"] = "mini-fab";
|
|
1292
|
+
ButtonStyle["Flat"] = "flat";
|
|
1293
|
+
ButtonStyle["Stroked"] = "stroked";
|
|
1294
|
+
})(ButtonStyle || (ButtonStyle = {}));
|
|
1295
|
+
|
|
1296
|
+
var PickerViewType;
|
|
1297
|
+
(function (PickerViewType) {
|
|
1298
|
+
PickerViewType["Date"] = "date";
|
|
1299
|
+
PickerViewType["DateTime"] = "datetime";
|
|
1300
|
+
PickerViewType["Time"] = "time";
|
|
1301
|
+
PickerViewType["Week"] = "week";
|
|
1302
|
+
PickerViewType["MonthRange"] = "monthrange";
|
|
1303
|
+
})(PickerViewType || (PickerViewType = {}));
|
|
1304
|
+
|
|
1305
|
+
const SORT_BY_FIELD = 'sortName';
|
|
1306
|
+
const SORT_DIRECTION_FIELD = 'sortDirection';
|
|
1307
|
+
class FsFilterConfig {
|
|
1308
|
+
constructor(data = {}) {
|
|
1309
|
+
this.load = true;
|
|
1310
|
+
this.persist = false;
|
|
1311
|
+
this.inline = false;
|
|
1312
|
+
this.autofocus = false;
|
|
1313
|
+
this.chips = false;
|
|
1314
|
+
this.sortValues = null;
|
|
1315
|
+
this.sort = null;
|
|
1316
|
+
// public sortDirection = null;
|
|
1317
|
+
this.queryParam = false;
|
|
1318
|
+
this.case = 'camel';
|
|
1319
|
+
this._init(data);
|
|
1320
|
+
}
|
|
1321
|
+
_init(data = {}) {
|
|
1322
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
1323
|
+
this.load = (_a = data.load) !== null && _a !== void 0 ? _a : true;
|
|
1324
|
+
this.persist = data.persist;
|
|
1325
|
+
this.savedFilters = data.savedFilters;
|
|
1326
|
+
this.inline = (_b = data.inline) !== null && _b !== void 0 ? _b : false;
|
|
1327
|
+
this.autofocus = (_c = data.autofocus) !== null && _c !== void 0 ? _c : false;
|
|
1328
|
+
this.chips = (_d = data.chips) !== null && _d !== void 0 ? _d : false;
|
|
1329
|
+
this.sortValues = data.sorts;
|
|
1330
|
+
this.sort = data.sort;
|
|
1331
|
+
this.queryParam = (_e = data.queryParam) !== null && _e !== void 0 ? _e : false;
|
|
1332
|
+
this.init = data.init;
|
|
1333
|
+
this.change = data.change;
|
|
1334
|
+
this.reload = data.reload;
|
|
1335
|
+
this.clear = data.clear;
|
|
1336
|
+
this.sortChange = data.sortChange;
|
|
1337
|
+
this.case = (_f = data.case) !== null && _f !== void 0 ? _f : 'camel';
|
|
1338
|
+
this.reloadWhenConfigChanged = data.reloadWhenConfigChanged;
|
|
1339
|
+
this.button = data.button;
|
|
1340
|
+
this.items = data.items;
|
|
1341
|
+
this.actions = data.actions;
|
|
1342
|
+
this.case = (_g = data.case) !== null && _g !== void 0 ? _g : 'camel';
|
|
1343
|
+
if (this.persist) {
|
|
1344
|
+
if (typeof this.persist === 'object') {
|
|
1345
|
+
if (this.persist.name) {
|
|
1346
|
+
this.namespace = this.persist.name;
|
|
1347
|
+
}
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
if (!this.button) {
|
|
1351
|
+
this.button = {};
|
|
1352
|
+
}
|
|
1353
|
+
if (this.button.label === undefined) {
|
|
1354
|
+
this.button.label = 'Filters';
|
|
1355
|
+
}
|
|
1356
|
+
if (this.button.icon === undefined) {
|
|
1357
|
+
this.button.icon = 'tune';
|
|
1358
|
+
}
|
|
1359
|
+
if (this.button.style === undefined) {
|
|
1360
|
+
this.button.style = ButtonStyle.Raised;
|
|
1361
|
+
}
|
|
1362
|
+
if (this.button.color === undefined) {
|
|
1363
|
+
this.button.color = 'default';
|
|
1364
|
+
}
|
|
1365
|
+
if (this.clear === undefined) {
|
|
1366
|
+
this.clear = () => { };
|
|
1367
|
+
}
|
|
1368
|
+
}
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
1371
|
class FsFilterItemsStore {
|
|
1372
1372
|
constructor() {
|
|
1373
1373
|
this.sortByItem = null;
|
|
@@ -1549,6 +1549,10 @@ class FsFilterItemsStore {
|
|
|
1549
1549
|
this._initSortingItems(p);
|
|
1550
1550
|
this.loadAsyncDefaults();
|
|
1551
1551
|
this._subscribeToItemsChanges();
|
|
1552
|
+
this.items
|
|
1553
|
+
.forEach((item) => {
|
|
1554
|
+
item.init(item);
|
|
1555
|
+
});
|
|
1552
1556
|
}
|
|
1553
1557
|
updateItemsWithValues(values) {
|
|
1554
1558
|
this.items
|
|
@@ -1594,7 +1598,7 @@ class FsFilterItemsStore {
|
|
|
1594
1598
|
this.loadAsyncValues();
|
|
1595
1599
|
}
|
|
1596
1600
|
}
|
|
1597
|
-
|
|
1601
|
+
updateItemsVisiblity() {
|
|
1598
1602
|
this.visibleItems = this.items
|
|
1599
1603
|
.filter((item) => !item.isTypeKeyword && !item.hide);
|
|
1600
1604
|
}
|
|
@@ -1647,7 +1651,7 @@ class FsFilterItemsStore {
|
|
|
1647
1651
|
this.ready$
|
|
1648
1652
|
.pipe(filter$1((state) => state), takeUntil(this._destroy$))
|
|
1649
1653
|
.subscribe(() => {
|
|
1650
|
-
this.
|
|
1654
|
+
this.updateItemsVisiblity();
|
|
1651
1655
|
this._setKeywordItem();
|
|
1652
1656
|
});
|
|
1653
1657
|
}
|
|
@@ -3102,7 +3106,7 @@ class AutocompleteComponent extends BaseItemComponent {
|
|
|
3102
3106
|
}
|
|
3103
3107
|
}
|
|
3104
3108
|
AutocompleteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: AutocompleteComponent, deps: [{ token: i0.KeyValueDiffers }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3105
|
-
AutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: AutocompleteComponent, selector: "filter-item-autocomplete", usesInheritance: true, ngImport: i0, template: "<fs-autocomplete\n
|
|
3109
|
+
AutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: AutocompleteComponent, selector: "filter-item-autocomplete", usesInheritance: true, ngImport: i0, template: "<fs-autocomplete\n [fsFilterFocusTrigger]=\"item\"\n [fetch]=\"fetch\"\n [displayWith]=\"displayWith\"\n [(ngModel)]=\"item.model\"\n [placeholder]=\"label\"\n [fetchOnFocus]=\"item.fetchOnFocus\"\n [showClear]=\"item.showClear\"\n name=\"item.name\">\n <ng-template fsAutocompleteTemplate let-data=\"data\">\n {{data.name}}\n </ng-template>\n</fs-autocomplete>\n", components: [{ type: i4$1.FsAutocompleteComponent, selector: "fs-autocomplete", inputs: ["fetch", "placeholder", "displayWith", "fetchOnFocus", "readonly", "required", "disabled", "hint", "panelWidth", "panelClass", "showClear"], outputs: ["cleared"] }], directives: [{ type: FocusToItemDirective, selector: "[fsFilterFocusTrigger]", inputs: ["fsFilterFocusTrigger", "focusTargetType"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i4$1.FsAutocompleteTemplateDirective, selector: "[fsAutocompleteTemplate]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3106
3110
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: AutocompleteComponent, decorators: [{
|
|
3107
3111
|
type: Component,
|
|
3108
3112
|
args: [{
|
|
@@ -3147,7 +3151,7 @@ class AutocompletechipsComponent extends BaseItemComponent {
|
|
|
3147
3151
|
}
|
|
3148
3152
|
}
|
|
3149
3153
|
AutocompletechipsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: AutocompletechipsComponent, deps: [{ token: i0.KeyValueDiffers }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3150
|
-
AutocompletechipsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: AutocompletechipsComponent, selector: "filter-item-autocompletechips", usesInheritance: true, ngImport: i0, template: "<fs-autocomplete-chips\n [fsFilterFocusTrigger]=\"item\"\n [fetch]=\"fetch\"\n [ngModel]=\"item.model\"\n (selected)=\"addAutocompleteChipItem($event)\"\n (removed)=\"removeAutocompleteChipItem($event)\"\n (clear)=\"clearAutocompleteChipItem()\"\n (click)=\"clicked()\"\n [allowText]=\"false\"\n [fetchOnFocus]=\"item.fetchOnFocus\"\n [placeholder]=\"label\"\n [chipImage]=\"item.chipImage\"\n [chipColor]=\"chipColor\"\n [chipIconColor]=\"chipIcon\"\n [chipBackground]=\"chipBackground\"\n [chipIcon]=\"item.chipIcon\"\n [chipClass]=\"item.chipClass\"\n [allowClear]=\"item.
|
|
3154
|
+
AutocompletechipsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: AutocompletechipsComponent, selector: "filter-item-autocompletechips", usesInheritance: true, ngImport: i0, template: "<fs-autocomplete-chips\n [fsFilterFocusTrigger]=\"item\"\n [fetch]=\"fetch\"\n [ngModel]=\"item.model\"\n (selected)=\"addAutocompleteChipItem($event)\"\n (removed)=\"removeAutocompleteChipItem($event)\"\n (clear)=\"clearAutocompleteChipItem()\"\n (click)=\"clicked()\"\n [allowText]=\"false\"\n [fetchOnFocus]=\"item.fetchOnFocus\"\n [placeholder]=\"label\"\n [chipImage]=\"item.chipImage\"\n [chipColor]=\"chipColor\"\n [chipIconColor]=\"chipIcon\"\n [chipBackground]=\"chipBackground\"\n [chipIcon]=\"item.chipIcon\"\n [chipClass]=\"item.chipClass\"\n [allowClear]=\"item.showClear\"\n [removable]=\"item.showClear\"\n [compareWith]=\"compareItems\"\n [panelWidth]=\"300\"\n name=\"model\">\n <ng-template fsAutocompleteObject let-object=\"object\">\n {{ object.name }}\n </ng-template>\n</fs-autocomplete-chips>\n\n<!--<mat-form-field floatLabel=\"auto\">\n <mat-label>{{item.label}}</mat-label>\n <mat-chip-list #chipList>\n <mat-chip *ngFor=\"let item of item.model\"\n (removed)=\"removeAutocompleteChipItem(item)\">\n {{ item.name }}\n <mat-icon matChipRemove>cancel</mat-icon>\n </mat-chip>\n\n <input #chipsInput\n type=\"text\"\n matInput\n [(ngModel)]=\"item.selectedValue\"\n (ngModelChange)=\"onAutocompleteChipsChange(chipsInput)\"\n [name]=\"item.name\"\n [matChipInputFor]=\"chipList\"\n [matAutocomplete]=\"autocompleteChipsInput\">\n </mat-chip-list>\n\n <mat-autocomplete #autocompleteChipsInput=\"matAutocomplete\"\n (optionSelected)=\"addAutocompleteChipItem( $event)\"\n >\n <mat-option *ngFor=\"let item of item.values$ | async\" [value]=\"item\">\n {{ item.name }}\n </mat-option>\n </mat-autocomplete>\n <mat-placeholder *ngIf=\"inline\">{{ item.label }}</mat-placeholder>\n</mat-form-field>-->\n", components: [{ type: i5.FsAutocompleteChipsComponent, selector: "fs-autocomplete-chips", inputs: ["fetch", "readonly", "size", "placeholder", "chipImage", "chipBackground", "chipColor", "chipIcon", "chipIconColor", "chipClass", "hint", "allowText", "allowObject", "delay", "validateText", "removable", "allowClear", "color", "background", "orderable", "limit", "initOnClick", "fetchOnFocus", "multiple", "confirm", "panelClass", "compareWith", "disabled", "panelWidth"], outputs: ["selected", "removed", "reordered", "clear"] }], directives: [{ type: FocusToItemDirective, selector: "[fsFilterFocusTrigger]", inputs: ["fsFilterFocusTrigger", "focusTargetType"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5.FsAutocompleteObjectDirective, selector: "[fsAutocompleteObject],[fsAutocompleteChipsTemplate]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3151
3155
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: AutocompletechipsComponent, decorators: [{
|
|
3152
3156
|
type: Component,
|
|
3153
3157
|
args: [{
|
|
@@ -3181,7 +3185,7 @@ class DateComponent extends BaseItemComponent {
|
|
|
3181
3185
|
}
|
|
3182
3186
|
}
|
|
3183
3187
|
DateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateComponent, deps: [{ token: i0.KeyValueDiffers }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3184
|
-
DateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: DateComponent, selector: "filter-item-date", usesInheritance: true, ngImport: i0, template: "<mat-form-field *ngIf=\"item.mode===itemDateMode.Calendar; else elseMode\">\n <mat-label>{{item.label}}</mat-label>\n <input matInput\n fsDatePicker\n [fsFilterFocusTrigger]=\"item\"\n [(ngModel)]=\"item.model\"\n [maxYear]=\"item.maxYear\"\n [view]=\"viewType\"\n [clear]=\"item.
|
|
3188
|
+
DateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: DateComponent, selector: "filter-item-date", usesInheritance: true, ngImport: i0, template: "<mat-form-field *ngIf=\"item.mode===itemDateMode.Calendar; else elseMode\">\n <mat-label>{{item.label}}</mat-label>\n <input matInput\n fsDatePicker\n [fsFilterFocusTrigger]=\"item\"\n [(ngModel)]=\"item.model\"\n [maxYear]=\"item.maxYear\"\n [view]=\"viewType\"\n [clear]=\"item.showClear\"\n [name]=\"item.name\">\n <mat-placeholder *ngIf=\"inline\">{{ item.label }}</mat-placeholder>\n</mat-form-field>\n\n<ng-template #elseMode>\n <mat-form-field>\n <mat-label>{{item.label}}</mat-label>\n <input matInput\n fsDateScrollPicker\n [fsFilterFocusTrigger]=\"item\"\n [(ngModel)]=\"item.model\"\n [maxYear]=\"item.maxYear\"\n [showMonth]=\"showMonth\"\n [showDay]=\"showDay\"\n [showYear]=\"showYear\"\n [clear]=\"item.showClear\"\n [name]=\"item.name\">\n <mat-placeholder *ngIf=\"inline\">{{ item.label }}</mat-placeholder>\n </mat-form-field>\n</ng-template>\n", components: [{ type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i3$3.FsDatePickerComponent, selector: "[fsDatePicker]", inputs: ["minYear", "maxYear", "minDate", "maxDate", "startOfDay", "view", "format", "minutes"], outputs: ["change"] }, { type: i3$3.FsDateScrollPickerComponent, selector: "[fsDateScrollPicker]", inputs: ["minYear", "maxYear", "maxDate", "showMonth", "showYear", "showDay"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$3.MatLabel, selector: "mat-label" }, { type: i3$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: FocusToItemDirective, selector: "[fsFilterFocusTrigger]", inputs: ["fsFilterFocusTrigger", "focusTargetType"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i1$3.MatPlaceholder, selector: "mat-placeholder" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3185
3189
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateComponent, decorators: [{
|
|
3186
3190
|
type: Component,
|
|
3187
3191
|
args: [{
|
|
@@ -3208,7 +3212,7 @@ class DateRangeComponent extends BaseItemComponent {
|
|
|
3208
3212
|
}
|
|
3209
3213
|
}
|
|
3210
3214
|
DateRangeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangeComponent, deps: [{ token: i0.KeyValueDiffers }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3211
|
-
DateRangeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: DateRangeComponent, selector: "filter-item-date-range", usesInheritance: true, ngImport: i0, template: "<mat-form-field>\n <mat-label>{{item.label[0]}}</mat-label>\n <input\n matInput\n [fsFilterFocusTrigger]=\"item\"\n [focusTargetType]=\"'from'\"\n [fsDateRangeFrom]=\"item.name\"\n [(ngModel)]=\"item.model.from\"\n (ngModelChange)=\"itemChange()\"\n [clear]=\"item.
|
|
3215
|
+
DateRangeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: DateRangeComponent, selector: "filter-item-date-range", usesInheritance: true, ngImport: i0, template: "<mat-form-field>\n <mat-label>{{item.label[0]}}</mat-label>\n <input\n matInput\n [fsFilterFocusTrigger]=\"item\"\n [focusTargetType]=\"'from'\"\n [fsDateRangeFrom]=\"item.name\"\n [(ngModel)]=\"item.model.from\"\n (ngModelChange)=\"itemChange()\"\n [clear]=\"item.showClear\"\n [view]=\"viewType\"\n name=\"date_from\">\n</mat-form-field>\n\n<mat-form-field>\n <mat-label>{{item.label[1]}}</mat-label>\n <input\n matInput\n [fsFilterFocusTrigger]=\"item\"\n [focusTargetType]=\"'to'\"\n [fsDateRangeTo]=\"item.name\"\n [(ngModel)]=\"item.model.to\"\n (ngModelChange)=\"itemChange()\"\n [clear]=\"item.showClear\"\n [view]=\"viewType\"\n name=\"date_to\">\n</mat-form-field>\n", components: [{ type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i3$3.DateRangePickerFromComponent, selector: "[fsDateRangeFrom],[fsDateRangeFromPicker]", inputs: ["fsDateRangeFrom", "fsDateRangeFromPicker"] }, { type: i3$3.DateRangePickerToComponent, selector: "[fsDateRangeTo],[fsDateRangeToPicker]", inputs: ["fsDateRangeTo", "fsDateRangeToPicker"] }], directives: [{ type: i1$3.MatLabel, selector: "mat-label" }, { type: i3$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: FocusToItemDirective, selector: "[fsFilterFocusTrigger]", inputs: ["fsFilterFocusTrigger", "focusTargetType"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3212
3216
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangeComponent, decorators: [{
|
|
3213
3217
|
type: Component,
|
|
3214
3218
|
args: [{
|
|
@@ -3227,7 +3231,7 @@ class WeekComponent extends BaseItemComponent {
|
|
|
3227
3231
|
ngOnInit() { }
|
|
3228
3232
|
}
|
|
3229
3233
|
WeekComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: WeekComponent, deps: [{ token: i0.KeyValueDiffers }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3230
|
-
WeekComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: WeekComponent, selector: "filter-item-week", usesInheritance: true, ngImport: i0, template: "<mat-form-field>\n <mat-label>{{item.label}}</mat-label>\n <input matInput\n fsDateWeekPicker\n [fsFilterFocusTrigger]=\"item\"\n [(ngModel)]=\"item.model\"\n [seedDate]=\"item.seedDate\"\n [clear]=\"item.
|
|
3234
|
+
WeekComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: WeekComponent, selector: "filter-item-week", usesInheritance: true, ngImport: i0, template: "<mat-form-field>\n <mat-label>{{item.label}}</mat-label>\n <input matInput\n fsDateWeekPicker\n [fsFilterFocusTrigger]=\"item\"\n [(ngModel)]=\"item.model\"\n [seedDate]=\"item.seedDate\"\n [clear]=\"item.showClear\"\n [name]=\"item.name\">\n <mat-placeholder *ngIf=\"inline\">{{ item.label }}</mat-placeholder>\n</mat-form-field>\n", components: [{ type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i3$3.FsDateWeekPickerComponent, selector: "[fsDateWeekPicker]", inputs: ["minYear", "maxYear", "minDate", "maxDate", "seedDate", "period", "view"], outputs: ["change"] }], directives: [{ type: i1$3.MatLabel, selector: "mat-label" }, { type: i3$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: FocusToItemDirective, selector: "[fsFilterFocusTrigger]", inputs: ["fsFilterFocusTrigger", "focusTargetType"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$3.MatPlaceholder, selector: "mat-placeholder" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3231
3235
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: WeekComponent, decorators: [{
|
|
3232
3236
|
type: Component,
|
|
3233
3237
|
args: [{
|
|
@@ -3399,7 +3403,7 @@ class FilterDrawerComponent {
|
|
|
3399
3403
|
}
|
|
3400
3404
|
}
|
|
3401
3405
|
FilterDrawerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterDrawerComponent, deps: [{ token: ExternalParamsController }, { token: i0.ChangeDetectorRef }, { token: FsFilterItemsStore }, { token: FILTER_DRAWER_OVERLAY }, { token: FILTER_DRAWER_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
3402
|
-
FilterDrawerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FilterDrawerComponent, selector: "ng-component", inputs: { inline: "inline" }, host: { listeners: { "window:resize": "updateWindowWidth()" } }, ngImport: i0, template: "<div class=\"filters\">\n <div class=\"filters-wrap\">\n\n <div class=\"filter-by\">\n <mat-icon>tune</mat-icon>\n <span class=\"text\">Filters</span>\n </div>\n\n <div class=\"overflow-shadow filter-items\">\n <div class=\"overflow-shadow-content\">\n <ng-container *fsSkeleton=\"(externalParams.pending$ | async) !== true\">\n <filter-item *ngFor=\"let filterItem of items$ | async\"\n
|
|
3406
|
+
FilterDrawerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FilterDrawerComponent, selector: "ng-component", inputs: { inline: "inline" }, host: { listeners: { "window:resize": "updateWindowWidth()" } }, ngImport: i0, template: "<div class=\"filters\">\n <div class=\"filters-wrap\">\n\n <div class=\"filter-by\">\n <mat-icon>tune</mat-icon>\n <span class=\"text\">Filters</span>\n </div>\n\n <div class=\"overflow-shadow filter-items\">\n <div class=\"overflow-shadow-content\">\n <ng-container *fsSkeleton=\"(externalParams.pending$ | async) !== true\">\n <filter-item \n *ngFor=\"let filterItem of items$ | async\"\n class=\"filter-group\"\n [item]=\"filterItem\">\n </filter-item>\n\n <ng-container *ngIf=\"sortItem && sortItem.values && sortItem.values.length > 0\">\n <filter-item \n class=\"filter-group sort\"\n [item]=\"sortItem\">\n </filter-item>\n <filter-item \n class=\"filter-group sort\"\n [item]=\"sortDirectionItem\">\n </filter-item>\n </ng-container>\n </ng-container>\n </div>\n </div>\n\n <fs-filter-drawer-actions \n class=\"filter-actions\"\n *ngIf=\"(externalParams.pending$ | async) !== true\"\n (clear)=\"clear()\"\n (done)=\"done()\">\n </fs-filter-drawer-actions>\n </div>\n</div>\n<div class=\"backdrop\" *ngIf=\"!windowDesktop\" (click)=\"backdropClick()\"></div>\n", styles: [":host ::ng-deep mat-form-field{width:100%}.filter-by{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;padding:20px 25px}.filter-by mat-icon{margin-right:8px}.filter-by .text{font-weight:400;font-size:19px}.filter-actions{display:block;box-sizing:border-box;padding:13px}.filter-actions button{margin-right:6px}.filter-actions button:last-child{margin-right:0}.filters{position:fixed;display:block;top:0;right:0;z-index:1002;bottom:0}.filters .filters-wrap{background:#fff;box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f;width:85vw;max-width:350px;display:flex;flex-direction:column;height:100%;padding-top:calc(env(safe-area-inset-top))}.filters .filters-wrap .filter-items{overflow-y:auto}.filters .filters-wrap .filter-items .overflow-shadow-content{padding:0 25px;box-sizing:border-box}.filters .filter-group{margin:10px 0 0}.filters .filter-group:first-child{margin:0}.filters .filter label{white-space:nowrap;color:#0000008a}.filters .filter .interface.interface-range input,.filters .filter .interface.interface-range .mat-input-wrapper{text-align:center}.filters .filter .interface.interface-range{text-align:center}.filters .filter .interface.interface-datetime fs-datetime.has-time .md-input{width:100%}.filters .filter .interface fs-datetime-range input{text-align:center}.filters .filter .filter-label{width:1%;white-space:nowrap;vertical-align:middle;padding-right:15px}.filters md-autocomplete-container md-input-container{margin:0}.filters .isolate{margin-top:-12px}.filters .isolate .interface{line-height:20px;padding-bottom:1.25em}.filters .isolate md-checkbox{margin:0 0 0 2px}.backdrop{position:fixed;top:0;bottom:0;left:0;right:0;z-index:900;outline:none}\n"], components: [{ type: i2$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: FilterItemComponent, selector: "filter-item", inputs: ["item"] }, { type: FsFilterDrawerActionsComponent, selector: "fs-filter-drawer-actions", outputs: ["clear", "done"] }], directives: [{ type: i6$1.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i3.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3403
3407
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterDrawerComponent, decorators: [{
|
|
3404
3408
|
type: Component,
|
|
3405
3409
|
args: [{
|
|
@@ -3747,7 +3751,7 @@ class FsFilterChipComponent {
|
|
|
3747
3751
|
}
|
|
3748
3752
|
}
|
|
3749
3753
|
FsFilterChipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFilterChipComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: FocusControllerService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3750
|
-
FsFilterChipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsFilterChipComponent, selector: "fs-filter-chip", inputs: { item: "item" }, ngImport: i0, template: "<ng-container *ngIf=\"!item.hasPendingValues || (chipDelayedRender$ | async)\">\n <ng-container *ngIf=\"rangeItem; else defaultChip\">\n <fs-chip\n *ngIf=\"item.model?.min || item.model?.from\"\n [value]=\"item\"\n [selectable]=\"false\"\n [removable]=\"item.
|
|
3754
|
+
FsFilterChipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsFilterChipComponent, selector: "fs-filter-chip", inputs: { item: "item" }, ngImport: i0, template: "<ng-container *ngIf=\"!item.hasPendingValues || (chipDelayedRender$ | async)\">\n <ng-container *ngIf=\"rangeItem; else defaultChip\">\n <fs-chip\n *ngIf=\"item.model?.min || item.model?.from\"\n [value]=\"item\"\n [selectable]=\"false\"\n [removable]=\"item.showClear\"\n size=\"small\"\n (click)=\"focusOnItem('from')\"\n (removed)=\"removeItem($event, 'from')\">\n <ng-template\n [ngTemplateOutlet]=\"chipContent\"\n [ngTemplateOutletContext]=\"{ item: item, type: 'from' }\"\n ></ng-template>\n </fs-chip>\n\n <fs-chip\n *ngIf=\"item.model?.max || item.model?.to\"\n [value]=\"item\"\n [selectable]=\"false\"\n [removable]=\"item.showClear\"\n size=\"small\"\n (click)=\"focusOnItem('to')\"\n (removed)=\"removeItem($event, 'to')\">\n <ng-template\n [ngTemplateOutlet]=\"chipContent\"\n [ngTemplateOutletContext]=\"{ item: item, type: 'to' }\"\n ></ng-template>\n </fs-chip>\n\n </ng-container>\n\n <ng-template #defaultChip>\n <fs-chip\n *ngIf=\"itemVisible\"\n [value]=\"item\"\n [selectable]=\"false\"\n [removable]=\"item.showClear\"\n size=\"small\"\n (click)=\"focusOnItem()\"\n (removed)=\"removeItem($event)\">\n <ng-template\n [ngTemplateOutlet]=\"chipContent\"\n [ngTemplateOutletContext]=\"{ item: item }\"\n ></ng-template>\n </fs-chip>\n </ng-template>\n\n <ng-template #chipContent let-item=\"item\" let-type=\"type\">\n <ng-container *ngIf=\"!item.hasPendingValues && !item.loading; else lodaingValues\">\n <fs-filter-chip-content [item]=\"item\" [type]=\"type\"></fs-filter-chip-content>\n </ng-container>\n\n <ng-template #lodaingValues>\n Loading...\n </ng-template>\n </ng-template>\n</ng-container>\n\n", styles: ["fs-chip{cursor:pointer;color:#6f6f6f}\n"], components: [{ type: i2$1.FsChipComponent, selector: "fs-chip", inputs: ["size", "value", "backgroundColor", "borderColor", "color", "outlined", "removable", "selectable", "selected", "image"], outputs: ["selectedToggled", "removed"] }, { type: FsFilterChipContentComponent, selector: "fs-filter-chip-content", inputs: ["item", "type"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i3.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3751
3755
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFilterChipComponent, decorators: [{
|
|
3752
3756
|
type: Component,
|
|
3753
3757
|
args: [{
|
|
@@ -4007,7 +4011,7 @@ class FilterComponent {
|
|
|
4007
4011
|
const item = this.getItem(name);
|
|
4008
4012
|
if (item) {
|
|
4009
4013
|
item.hide = false;
|
|
4010
|
-
this._filterItems.
|
|
4014
|
+
this._filterItems.updateItemsVisiblity();
|
|
4011
4015
|
}
|
|
4012
4016
|
}
|
|
4013
4017
|
hideItem(name) {
|
|
@@ -4016,7 +4020,7 @@ class FilterComponent {
|
|
|
4016
4020
|
return;
|
|
4017
4021
|
}
|
|
4018
4022
|
item.hide = true;
|
|
4019
|
-
this._filterItems.
|
|
4023
|
+
this._filterItems.updateItemsVisiblity();
|
|
4020
4024
|
}
|
|
4021
4025
|
clearItem(name) {
|
|
4022
4026
|
const item = this.getItem(name);
|
|
@@ -4033,7 +4037,7 @@ class FilterComponent {
|
|
|
4033
4037
|
}
|
|
4034
4038
|
item.label = (_a = params.label) !== null && _a !== void 0 ? _a : item.label;
|
|
4035
4039
|
item.chipLabel = (_b = params.chipLabel) !== null && _b !== void 0 ? _b : item.chipLabel;
|
|
4036
|
-
this._filterItems.
|
|
4040
|
+
this._filterItems.updateItemsVisiblity();
|
|
4037
4041
|
}
|
|
4038
4042
|
getItemValueChange$(name) {
|
|
4039
4043
|
const item = this.items.find((i) => i.name === name);
|