slick-table 1.1.70 → 1.1.72
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/dist/index.cjs.js +77 -77
- package/dist/index.es.js +3113 -3092
- package/dist/types/shared/lib/localStrore/model/classes/ColumnFilters.d.ts +7 -0
- package/dist/types/shared/lib/localStrore/model/classes/ColumnFilters.d.ts.map +1 -0
- package/dist/types/shared/lib/localStrore/model/classes/index.d.ts +1 -0
- package/dist/types/shared/lib/localStrore/model/classes/index.d.ts.map +1 -1
- package/dist/types/shared/lib/localStrore/model/enums/EStorageKey.d.ts +1 -0
- package/dist/types/shared/lib/localStrore/model/enums/EStorageKey.d.ts.map +1 -1
- package/dist/types/shared/lib/localStrore/model/localStore.d.ts +2 -1
- package/dist/types/shared/lib/localStrore/model/localStore.d.ts.map +1 -1
- package/dist/types/shared/lib/slickgrid/model/SlickTable/filters/decorators/ColumnFilter/DecoratorColumnFilter.d.ts +2 -0
- package/dist/types/shared/lib/slickgrid/model/SlickTable/filters/decorators/ColumnFilter/DecoratorColumnFilter.d.ts.map +1 -1
- package/dist/types/shared/lib/slickgrid/model/SlickTable/table/SlickTable.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/shared/lib/localStrore/model/classes/ColumnFilters.ts +21 -0
- package/src/shared/lib/localStrore/model/classes/index.ts +1 -0
- package/src/shared/lib/localStrore/model/enums/EStorageKey.ts +1 -0
- package/src/shared/lib/localStrore/model/localStore.ts +2 -1
- package/src/shared/lib/slickgrid/model/SlickTable/filters/decorators/ColumnFilter/DecoratorColumnFilter.ts +11 -1
- package/src/shared/lib/slickgrid/model/SlickTable/table/SlickTable.ts +7 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IFilterArguments } from '../../../../model/types';
|
|
2
|
+
export declare class ColumnFilters {
|
|
3
|
+
get(tableId: string): IFilterArguments["columnFilters"];
|
|
4
|
+
reset(tableId: string): void;
|
|
5
|
+
set(tableId: string, filter: IFilterArguments["columnFilters"]): void;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=ColumnFilters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColumnFilters.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/lib/localStrore/model/classes/ColumnFilters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAKtD,qBAAa,aAAa;IACzB,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB,CAAC,eAAe,CAAC;IAIvD,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAK5B,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,CAAC,eAAe,CAAC,GAAG,IAAI;CAKrE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/lib/localStrore/model/classes/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/lib/localStrore/model/classes/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EStorageKey.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/lib/localStrore/model/enums/EStorageKey.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW;IACtB,eAAe,sBAAsB;IACrC,UAAU,gBAAgB;IAC1B,OAAO,YAAY;CACnB"}
|
|
1
|
+
{"version":3,"file":"EStorageKey.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/lib/localStrore/model/enums/EStorageKey.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW;IACtB,aAAa,mBAAmB;IAChC,eAAe,sBAAsB;IACrC,UAAU,gBAAgB;IAC1B,OAAO,YAAY;CACnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localStore.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/lib/localStrore/model/localStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"localStore.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/lib/localStrore/model/localStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAElE,cAAM,UAAU;IACf,aAAa,gBAAuB;IACpC,aAAa,gBAAuB;IACpC,OAAO,UAAiB;CACxB;AAED,eAAO,MAAM,UAAU,YAAmB,CAAC"}
|
|
@@ -4,6 +4,8 @@ import { DecoratorFilter } from '../DecoratorFilter';
|
|
|
4
4
|
export declare class DecoratorColumnFilter extends DecoratorFilter {
|
|
5
5
|
filterFn(item: Record<string, any>, args: IArgs): boolean;
|
|
6
6
|
reset(): void;
|
|
7
|
+
set args(args: import('../../../../../../../model/types').IFilterArguments);
|
|
8
|
+
get args(): import('../../../../../../../model/types').IFilterArguments;
|
|
7
9
|
}
|
|
8
10
|
interface IArgs {
|
|
9
11
|
columnFilters?: Record<string, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DecoratorColumnFilter.d.ts","sourceRoot":"","sources":["../../../../../../../../../../src/shared/lib/slickgrid/model/SlickTable/filters/decorators/ColumnFilter/DecoratorColumnFilter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DecoratorColumnFilter.d.ts","sourceRoot":"","sources":["../../../../../../../../../../src/shared/lib/slickgrid/model/SlickTable/filters/decorators/ColumnFilter/DecoratorColumnFilter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAGxD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AASrD,qBAAa,qBAAsB,SAAQ,eAAe;IAClD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,IAAI,EAAE,KAAK;IAuB/C,KAAK;IAOZ,IAAI,IAAI,CAAC,IAAI,+CAAA,EAGZ;IACD,IAAI,IAAI,kDAEP;CACD;AAED,UAAU,KAAK;IACd,aAAa,CAAC,EAAE,MAAM,CACrB,MAAM,EACN;QACC,QAAQ,EAAE,aAAa,CAAC;QACxB,KAAK,EAAE,mBAAmB,CAAC;QAC3B,KAAK,EAAE,kBAAkB,CAAC;KAC1B,CACD,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlickTable.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shared/lib/slickgrid/model/SlickTable/table/SlickTable.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,MAAM,EACN,UAAU,EACV,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,SAAS,EACT,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"SlickTable.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shared/lib/slickgrid/model/SlickTable/table/SlickTable.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,MAAM,EACN,UAAU,EACV,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,SAAS,EACT,MAAM,WAAW,CAAC;AAInB,OAAO,EACN,aAAa,EACb,gBAAgB,EAChB,OAAO,EACP,SAAS,EACT,gBAAgB,EAChB,SAAS,EACT,QAAQ,EACR,WAAW,EACX,gBAAgB,EAChB,MAAM,o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,QAAQ,IAAI,OAAO,CAE7B;IAED,OAAO,KAAK,IAAI,QAEf;IACD,IAAW,QAAQ,CAAC,QAAQ,EAAE,SAAS,EAStC;IACD,IAAW,QAAQ,CAAC,QAAQ,EAAE,OAAO,EAGpC;IAED,IAAW,OAAO,CAAC,OAAO,EAAE,QAAQ,EAEnC;IACD,IAAW,OAAO,IAAI,QAAQ,CAE7B;IAED,IAAW,QAAQ,IAAI,OAAO,CAE7B;IACD,IAAW,QAAQ,CAAC,QAAQ,EAAE,OAAO,EAEpC;IAED,IAAW,cAAc,IAGO;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAD5D;IACD,IAAW,cAAc,CAAC,IAAI,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAE5D;IAEM,YAAY,IAAI,IAAI;IAKpB,iBAAiB,CAAC,QAAQ,EAAE,SAAS,GAAG,IAAI;IAK5C,eAAe,IAAI,IAAI;IAKvB,cAAc,CAAC,QAAQ,EAAE,SAAS,GAAG,IAAI;IAKzC,KAAK,IAAI,IAAI;CAUpB"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IFilterArguments } from "shared/model/types";
|
|
2
|
+
|
|
3
|
+
import { getFromStorage, updateStorage } from "../../lib";
|
|
4
|
+
import { EStorageKey } from "../enums";
|
|
5
|
+
|
|
6
|
+
export class ColumnFilters {
|
|
7
|
+
get(tableId: string): IFilterArguments["columnFilters"] {
|
|
8
|
+
const columnFilters = getFromStorage(EStorageKey.columnFilters);
|
|
9
|
+
return columnFilters[tableId];
|
|
10
|
+
}
|
|
11
|
+
reset(tableId: string): void {
|
|
12
|
+
const columnFilters = getFromStorage(EStorageKey.columnFilters);
|
|
13
|
+
columnFilters[tableId] = undefined;
|
|
14
|
+
updateStorage(EStorageKey.columnFilters, columnFilters);
|
|
15
|
+
}
|
|
16
|
+
set(tableId: string, filter: IFilterArguments["columnFilters"]): void {
|
|
17
|
+
const columnFilters = getFromStorage(EStorageKey.columnFilters);
|
|
18
|
+
columnFilters[tableId] = filter;
|
|
19
|
+
updateStorage(EStorageKey.columnFilters, columnFilters);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { localStore } from "shared/lib/localStrore";
|
|
1
2
|
import { EColumnFilter, EColumnFiltersGroup } from "shared/model/enums";
|
|
2
3
|
import { IColumnFilterValue } from "shared/model/types";
|
|
3
4
|
|
|
@@ -37,8 +38,17 @@ export class DecoratorColumnFilter extends DecoratorFilter {
|
|
|
37
38
|
}
|
|
38
39
|
public reset() {
|
|
39
40
|
this.filter.reset();
|
|
40
|
-
if (this.tableId)
|
|
41
|
+
if (this.tableId) {
|
|
42
|
+
localStore.columnFilters.reset(this.tableId);
|
|
41
43
|
headerButtons.highlightAllColumns(this.args, this.tableId);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
set args(args) {
|
|
47
|
+
localStore.columnFilters.set(this.tableId, args.columnFilters);
|
|
48
|
+
this.filter.args = args;
|
|
49
|
+
}
|
|
50
|
+
get args() {
|
|
51
|
+
return this.filter.args;
|
|
42
52
|
}
|
|
43
53
|
}
|
|
44
54
|
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
} from "slickgrid";
|
|
9
9
|
|
|
10
10
|
import { elementNotVisible } from "shared/lib/dom";
|
|
11
|
+
import { localStore } from "shared/lib/localStrore";
|
|
11
12
|
import {
|
|
12
13
|
IColumnPicker,
|
|
13
14
|
IDownloadManager,
|
|
@@ -70,7 +71,12 @@ export class SlickTable implements ISlickTable {
|
|
|
70
71
|
this.name = name || "";
|
|
71
72
|
if (columnPicker) this.columnPicker = columnPicker;
|
|
72
73
|
if (downloadManager) this.downloadManager = downloadManager;
|
|
73
|
-
if (filter)
|
|
74
|
+
if (filter) {
|
|
75
|
+
this.filter = filter;
|
|
76
|
+
this.filter.args = {
|
|
77
|
+
columnFilters: localStore.columnFilters.get(this.id),
|
|
78
|
+
};
|
|
79
|
+
}
|
|
74
80
|
if (hotKeys) this.hotKeysBehavior = hotKeys;
|
|
75
81
|
if (printer) this.printer = printer;
|
|
76
82
|
if (summaryColumnIds) this.summaryColumnIds = summaryColumnIds;
|