@firestitch/filter 12.1.3 → 12.2.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/interfaces/config.interface.d.ts +2 -2
- package/app/models/filter-config.d.ts +1 -4
- package/bundles/firestitch-filter.umd.js +47 -114
- package/bundles/firestitch-filter.umd.js.map +1 -1
- package/esm2015/app/interfaces/config.interface.js +1 -1
- package/esm2015/app/models/filter-config.js +33 -101
- package/fesm2015/firestitch-filter.js +33 -101
- package/fesm2015/firestitch-filter.js.map +1 -1
- package/package.json +1 -1
|
@@ -18,8 +18,8 @@ export interface FilterConfig {
|
|
|
18
18
|
queryParam?: boolean;
|
|
19
19
|
namespace?: string;
|
|
20
20
|
persist?: FsFilterPersistance;
|
|
21
|
-
reload?: ChangeFn
|
|
22
|
-
clear?: ChangeFn
|
|
21
|
+
reload?: ChangeFn;
|
|
22
|
+
clear?: ChangeFn;
|
|
23
23
|
items?: IFilterConfigItem[];
|
|
24
24
|
init?: ChangeFn;
|
|
25
25
|
change?: ChangeFn;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { Model } from 'tsmodels';
|
|
2
1
|
import { FilterButton, FilterConfig, FsFilterPersistance, IFilterConfigItem } from './../interfaces/config.interface';
|
|
3
2
|
import { ChangeFn, Sort } from '../interfaces/config.interface';
|
|
4
3
|
import { IFilterSavedFiltersConfig } from '../interfaces/saved-filters.interface';
|
|
5
4
|
import { FsFilterAction } from '../interfaces/action.interface';
|
|
6
5
|
export declare const SORT_BY_FIELD = "sortName";
|
|
7
6
|
export declare const SORT_DIRECTION_FIELD = "sortDirection";
|
|
8
|
-
export declare class FsFilterConfig
|
|
7
|
+
export declare class FsFilterConfig {
|
|
9
8
|
load: boolean;
|
|
10
9
|
persist: FsFilterPersistance;
|
|
11
10
|
savedFilters: IFilterSavedFiltersConfig;
|
|
@@ -14,7 +13,6 @@ export declare class FsFilterConfig extends Model {
|
|
|
14
13
|
chips: boolean;
|
|
15
14
|
sortValues: any[];
|
|
16
15
|
sort: Sort;
|
|
17
|
-
sortDirection: any;
|
|
18
16
|
queryParam: boolean;
|
|
19
17
|
init: ChangeFn;
|
|
20
18
|
change: ChangeFn;
|
|
@@ -29,5 +27,4 @@ export declare class FsFilterConfig extends Model {
|
|
|
29
27
|
namespace: string;
|
|
30
28
|
constructor(data?: FilterConfig);
|
|
31
29
|
private _init;
|
|
32
|
-
_fromJSON(value: any): void;
|
|
33
30
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('rxjs/operators'), require('@firestitch/common'), require('date-fns'), require('lodash-es'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@firestitch/filter', ['exports', '@angular/core', 'rxjs', 'rxjs/operators', '@firestitch/common', 'date-fns', 'lodash-es', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.firestitch = global.firestitch || {}, global.firestitch.filter = {}), global.ng.core, global.rxjs, global.rxjs.operators, global.common, global.dateFns, global.lodashEs, global.
|
|
5
|
-
})(this, (function (exports, i0, rxjs, operators, common, dateFns, lodashEs,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('rxjs/operators'), require('@firestitch/common'), require('date-fns'), require('lodash-es'), require('@firestitch/date'), require('@firestitch/datepicker'), require('@firestitch/store'), require('@angular/router'), require('@angular/common'), require('@angular/material/dialog'), require('@firestitch/drawer'), require('@angular/material/form-field'), require('@angular/material/select'), require('@angular/material/core'), require('@angular/material/button'), require('@angular/forms'), require('@firestitch/form'), require('@angular/material/input'), require('@angular/material/autocomplete'), require('@angular/material/checkbox'), require('@angular/material/chips'), require('@angular/material/icon'), require('@angular/cdk/portal'), require('@angular/flex-layout'), require('@firestitch/chip'), require('@firestitch/label'), require('@firestitch/scroll'), require('@firestitch/autocomplete'), require('@firestitch/autocomplete-chips'), require('@firestitch/mask'), require('@firestitch/menu'), require('@firestitch/skeleton'), require('@firestitch/file'), require('@angular/cdk/overlay'), require('@angular/flex-layout/extended'), require('@angular/flex-layout/flex'), require('@angular/cdk/layout')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@firestitch/filter', ['exports', '@angular/core', 'rxjs', 'rxjs/operators', '@firestitch/common', 'date-fns', 'lodash-es', '@firestitch/date', '@firestitch/datepicker', '@firestitch/store', '@angular/router', '@angular/common', '@angular/material/dialog', '@firestitch/drawer', '@angular/material/form-field', '@angular/material/select', '@angular/material/core', '@angular/material/button', '@angular/forms', '@firestitch/form', '@angular/material/input', '@angular/material/autocomplete', '@angular/material/checkbox', '@angular/material/chips', '@angular/material/icon', '@angular/cdk/portal', '@angular/flex-layout', '@firestitch/chip', '@firestitch/label', '@firestitch/scroll', '@firestitch/autocomplete', '@firestitch/autocomplete-chips', '@firestitch/mask', '@firestitch/menu', '@firestitch/skeleton', '@firestitch/file', '@angular/cdk/overlay', '@angular/flex-layout/extended', '@angular/flex-layout/flex', '@angular/cdk/layout'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.firestitch = global.firestitch || {}, global.firestitch.filter = {}), global.ng.core, global.rxjs, global.rxjs.operators, global.common, global.dateFns, global.lodashEs, global.date, global.i3, global.i1, global.ng.router, global.ng.common, global.ng.material.dialog, global.i6, global.ng.material.formField, global.ng.material.select, global.ng.material.core, global.ng.material.button, global.ng.forms, global.i7, global.ng.material.input, global.ng.material.autocomplete, global.ng.material.checkbox, global.ng.material.chips, global.ng.material.icon, global.ng.cdk.portal, global.ng.flexLayout, global.i2$1, global.i1$5, global.scroll, global.i4$1, global.i5, global.i6$2, global.i3$4, global.i6$3, global.i4$3, global.ng.cdk.overlay, global.ng.flexLayout.extended, global.ng.flexLayout.flex, global.ng.cdk.layout));
|
|
5
|
+
})(this, (function (exports, i0, rxjs, operators, common, dateFns, lodashEs, date, i3, i1, i1$1, i3$1, i1$2, i6, i1$3, i2, i3$2, i1$4, i4, i7, i3$3, autocomplete, i4$2, chips, i2$3, portal, flexLayout, i2$1, i1$5, scroll, i4$1, i5, i6$2, i3$4, i6$3, i4$3, i1$6, i6$1, i2$2, i1$7) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -978,26 +978,51 @@
|
|
|
978
978
|
|
|
979
979
|
var SORT_BY_FIELD = 'sortName';
|
|
980
980
|
var SORT_DIRECTION_FIELD = 'sortDirection';
|
|
981
|
-
var FsFilterConfig = /** @class */ (function (
|
|
982
|
-
__extends(FsFilterConfig, _super);
|
|
981
|
+
var FsFilterConfig = /** @class */ (function () {
|
|
983
982
|
function FsFilterConfig(data) {
|
|
984
983
|
if (data === void 0) { data = {}; }
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
_this._fromJSON(data);
|
|
997
|
-
_this._init();
|
|
998
|
-
return _this;
|
|
984
|
+
this.load = true;
|
|
985
|
+
this.persist = false;
|
|
986
|
+
this.inline = false;
|
|
987
|
+
this.autofocus = false;
|
|
988
|
+
this.chips = false;
|
|
989
|
+
this.sortValues = null;
|
|
990
|
+
this.sort = null;
|
|
991
|
+
// public sortDirection = null;
|
|
992
|
+
this.queryParam = false;
|
|
993
|
+
this.case = 'camel';
|
|
994
|
+
this._init(data);
|
|
999
995
|
}
|
|
1000
|
-
FsFilterConfig.prototype._init = function () {
|
|
996
|
+
FsFilterConfig.prototype._init = function (data) {
|
|
997
|
+
if (data === void 0) { data = {}; }
|
|
998
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
999
|
+
this.load = (_a = data.load) !== null && _a !== void 0 ? _a : true;
|
|
1000
|
+
this.persist = data.persist;
|
|
1001
|
+
this.savedFilters = data.savedFilters;
|
|
1002
|
+
this.inline = (_b = data.inline) !== null && _b !== void 0 ? _b : false;
|
|
1003
|
+
this.autofocus = (_c = data.autofocus) !== null && _c !== void 0 ? _c : false;
|
|
1004
|
+
this.chips = (_d = data.chips) !== null && _d !== void 0 ? _d : false;
|
|
1005
|
+
this.sortValues = data.sorts;
|
|
1006
|
+
this.sort = data.sort;
|
|
1007
|
+
this.queryParam = (_e = data.queryParam) !== null && _e !== void 0 ? _e : false;
|
|
1008
|
+
this.init = data.init;
|
|
1009
|
+
this.change = data.change;
|
|
1010
|
+
this.reload = data.reload;
|
|
1011
|
+
this.clear = data.clear;
|
|
1012
|
+
this.sortChange = data.sortChange;
|
|
1013
|
+
this.case = (_f = data.case) !== null && _f !== void 0 ? _f : 'camel';
|
|
1014
|
+
this.reloadWhenConfigChanged = data.reloadWhenConfigChanged;
|
|
1015
|
+
this.button = data.button;
|
|
1016
|
+
this.items = data.items;
|
|
1017
|
+
this.actions = data.actions;
|
|
1018
|
+
this.case = (_g = data.case) !== null && _g !== void 0 ? _g : 'camel';
|
|
1019
|
+
if (this.persist) {
|
|
1020
|
+
if (typeof this.persist === 'object') {
|
|
1021
|
+
if (this.persist.name) {
|
|
1022
|
+
this.namespace = this.persist.name;
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1001
1026
|
if (!this.button) {
|
|
1002
1027
|
this.button = {};
|
|
1003
1028
|
}
|
|
@@ -1017,100 +1042,8 @@
|
|
|
1017
1042
|
this.clear = function () { };
|
|
1018
1043
|
}
|
|
1019
1044
|
};
|
|
1020
|
-
FsFilterConfig.prototype._fromJSON = function (value) {
|
|
1021
|
-
var _a;
|
|
1022
|
-
_super.prototype._fromJSON.call(this, value);
|
|
1023
|
-
this.case = (_a = value.case) !== null && _a !== void 0 ? _a : 'camel';
|
|
1024
|
-
if (this.persist) {
|
|
1025
|
-
if (typeof this.persist === 'object') {
|
|
1026
|
-
if (this.persist.name) {
|
|
1027
|
-
this.namespace = this.persist.name;
|
|
1028
|
-
}
|
|
1029
|
-
}
|
|
1030
|
-
}
|
|
1031
|
-
};
|
|
1032
1045
|
return FsFilterConfig;
|
|
1033
|
-
}(
|
|
1034
|
-
__decorate([
|
|
1035
|
-
tsmodels.Alias(),
|
|
1036
|
-
__metadata("design:type", Object)
|
|
1037
|
-
], FsFilterConfig.prototype, "load", void 0);
|
|
1038
|
-
__decorate([
|
|
1039
|
-
tsmodels.Alias(),
|
|
1040
|
-
__metadata("design:type", Object)
|
|
1041
|
-
], FsFilterConfig.prototype, "persist", void 0);
|
|
1042
|
-
__decorate([
|
|
1043
|
-
tsmodels.Alias(),
|
|
1044
|
-
__metadata("design:type", Object)
|
|
1045
|
-
], FsFilterConfig.prototype, "savedFilters", void 0);
|
|
1046
|
-
__decorate([
|
|
1047
|
-
tsmodels.Alias(),
|
|
1048
|
-
__metadata("design:type", Object)
|
|
1049
|
-
], FsFilterConfig.prototype, "inline", void 0);
|
|
1050
|
-
__decorate([
|
|
1051
|
-
tsmodels.Alias(),
|
|
1052
|
-
__metadata("design:type", Object)
|
|
1053
|
-
], FsFilterConfig.prototype, "autofocus", void 0);
|
|
1054
|
-
__decorate([
|
|
1055
|
-
tsmodels.Alias(),
|
|
1056
|
-
__metadata("design:type", Object)
|
|
1057
|
-
], FsFilterConfig.prototype, "chips", void 0);
|
|
1058
|
-
__decorate([
|
|
1059
|
-
tsmodels.Alias('sorts'),
|
|
1060
|
-
__metadata("design:type", Array)
|
|
1061
|
-
], FsFilterConfig.prototype, "sortValues", void 0);
|
|
1062
|
-
__decorate([
|
|
1063
|
-
tsmodels.Alias(),
|
|
1064
|
-
__metadata("design:type", Object)
|
|
1065
|
-
], FsFilterConfig.prototype, "sort", void 0);
|
|
1066
|
-
__decorate([
|
|
1067
|
-
tsmodels.Alias(),
|
|
1068
|
-
__metadata("design:type", Object)
|
|
1069
|
-
], FsFilterConfig.prototype, "sortDirection", void 0);
|
|
1070
|
-
__decorate([
|
|
1071
|
-
tsmodels.Alias(),
|
|
1072
|
-
__metadata("design:type", Object)
|
|
1073
|
-
], FsFilterConfig.prototype, "queryParam", void 0);
|
|
1074
|
-
__decorate([
|
|
1075
|
-
tsmodels.Alias(),
|
|
1076
|
-
__metadata("design:type", Function)
|
|
1077
|
-
], FsFilterConfig.prototype, "init", void 0);
|
|
1078
|
-
__decorate([
|
|
1079
|
-
tsmodels.Alias(),
|
|
1080
|
-
__metadata("design:type", Function)
|
|
1081
|
-
], FsFilterConfig.prototype, "change", void 0);
|
|
1082
|
-
__decorate([
|
|
1083
|
-
tsmodels.Alias(),
|
|
1084
|
-
__metadata("design:type", Function)
|
|
1085
|
-
], FsFilterConfig.prototype, "reload", void 0);
|
|
1086
|
-
__decorate([
|
|
1087
|
-
tsmodels.Alias(),
|
|
1088
|
-
__metadata("design:type", Function)
|
|
1089
|
-
], FsFilterConfig.prototype, "clear", void 0);
|
|
1090
|
-
__decorate([
|
|
1091
|
-
tsmodels.Alias(),
|
|
1092
|
-
__metadata("design:type", Function)
|
|
1093
|
-
], FsFilterConfig.prototype, "sortChange", void 0);
|
|
1094
|
-
__decorate([
|
|
1095
|
-
tsmodels.Alias(),
|
|
1096
|
-
__metadata("design:type", String)
|
|
1097
|
-
], FsFilterConfig.prototype, "case", void 0);
|
|
1098
|
-
__decorate([
|
|
1099
|
-
tsmodels.Alias(),
|
|
1100
|
-
__metadata("design:type", Boolean)
|
|
1101
|
-
], FsFilterConfig.prototype, "reloadWhenConfigChanged", void 0);
|
|
1102
|
-
__decorate([
|
|
1103
|
-
tsmodels.Alias(),
|
|
1104
|
-
__metadata("design:type", Object)
|
|
1105
|
-
], FsFilterConfig.prototype, "button", void 0);
|
|
1106
|
-
__decorate([
|
|
1107
|
-
tsmodels.Alias(),
|
|
1108
|
-
__metadata("design:type", Array)
|
|
1109
|
-
], FsFilterConfig.prototype, "items", void 0);
|
|
1110
|
-
__decorate([
|
|
1111
|
-
tsmodels.Alias(),
|
|
1112
|
-
__metadata("design:type", Array)
|
|
1113
|
-
], FsFilterConfig.prototype, "actions", void 0);
|
|
1046
|
+
}());
|
|
1114
1047
|
|
|
1115
1048
|
var SelectItem = /** @class */ (function () {
|
|
1116
1049
|
function SelectItem() {
|