@slickgrid-universal/vanilla-bundle 5.7.0 → 5.9.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/dist/cjs/components/slick-vanilla-grid-bundle.js +31 -20
- package/dist/cjs/components/slick-vanilla-grid-bundle.js.map +1 -1
- package/dist/cjs/index.js +4 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/interfaces/index.js +0 -15
- package/dist/cjs/interfaces/index.js.map +1 -1
- package/dist/cjs/services/index.js +1 -1
- package/dist/cjs/services/index.js.map +1 -1
- package/dist/esm/components/slick-vanilla-grid-bundle.js +32 -21
- package/dist/esm/components/slick-vanilla-grid-bundle.js.map +1 -1
- package/dist/esm/index.js +2 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interfaces/index.js +1 -1
- package/dist/esm/interfaces/index.js.map +1 -1
- package/dist/esm/services/index.js +1 -1
- package/dist/esm/services/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/components/slick-vanilla-grid-bundle.d.ts +9 -9
- package/dist/types/components/slick-vanilla-grid-bundle.d.ts.map +1 -1
- package/dist/types/index.d.ts +3 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/interfaces/index.d.ts +1 -1
- package/dist/types/interfaces/index.d.ts.map +1 -1
- package/dist/types/interfaces/slickerGridInstance.interface.d.ts +4 -2
- package/dist/types/interfaces/slickerGridInstance.interface.d.ts.map +1 -1
- package/dist/types/services/index.d.ts +1 -1
- package/dist/types/services/index.d.ts.map +1 -1
- package/package.json +9 -9
- package/src/components/slick-vanilla-grid-bundle.ts +47 -28
- package/src/index.ts +3 -3
- package/src/interfaces/index.ts +1 -1
- package/src/interfaces/slickerGridInstance.interface.ts +5 -2
- package/src/services/index.ts +1 -1
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import type { BackendService, BackendServiceApi, Column, ExtensionList, ExternalResource, GridOption, Metrics, Pagination, RxJsFacade,
|
|
2
|
-
import { SlickGroupItemMetadataProvider, BackendUtilityService, CollectionService, ExtensionService, ExtensionUtility, FilterFactory, FilterService, GridEventService, GridService, GridStateService,
|
|
1
|
+
import type { BackendService, BackendServiceApi, BasePaginationComponent, Column, ExtensionList, ExternalResource, GridOption, Metrics, Pagination, RxJsFacade, PaginationMetadata, Subscription } from '@slickgrid-universal/common';
|
|
2
|
+
import { SlickGroupItemMetadataProvider, BackendUtilityService, CollectionService, ExtensionService, ExtensionUtility, FilterFactory, FilterService, GridEventService, GridService, GridStateService, HeaderGroupingService, PaginationService, ResizerService, SharedService, SortService, type TranslaterService, TreeDataService, SlickEventHandler, SlickDataView, SlickGrid } from '@slickgrid-universal/common';
|
|
3
3
|
import { EventPubSubService } from '@slickgrid-universal/event-pub-sub';
|
|
4
4
|
import { SlickEmptyWarningComponent } from '@slickgrid-universal/empty-warning-component';
|
|
5
5
|
import { SlickFooterComponent } from '@slickgrid-universal/custom-footer-component';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { UniversalContainerService } from '../services/universalContainer.service';
|
|
6
|
+
import { type SlickerGridInstance } from '../interfaces/slickerGridInstance.interface.js';
|
|
7
|
+
import { UniversalContainerService } from '../services/universalContainer.service.js';
|
|
9
8
|
export declare class SlickVanillaGridBundle<TData = any> {
|
|
10
9
|
protected _currentDatasetLength: number;
|
|
11
10
|
protected _eventPubSubService: EventPubSubService;
|
|
@@ -53,7 +52,8 @@ export declare class SlickVanillaGridBundle<TData = any> {
|
|
|
53
52
|
gridEventService: GridEventService;
|
|
54
53
|
gridService: GridService;
|
|
55
54
|
gridStateService: GridStateService;
|
|
56
|
-
|
|
55
|
+
headerGroupingService: HeaderGroupingService;
|
|
56
|
+
paginationComponent: BasePaginationComponent | undefined;
|
|
57
57
|
paginationService: PaginationService;
|
|
58
58
|
rxjs?: RxJsFacade;
|
|
59
59
|
sharedService: SharedService;
|
|
@@ -63,7 +63,6 @@ export declare class SlickVanillaGridBundle<TData = any> {
|
|
|
63
63
|
universalContainerService: UniversalContainerService;
|
|
64
64
|
slickEmptyWarning: SlickEmptyWarningComponent | undefined;
|
|
65
65
|
slickFooter: SlickFooterComponent | undefined;
|
|
66
|
-
slickPagination: SlickPaginationComponent | undefined;
|
|
67
66
|
get backendService(): BackendService | undefined;
|
|
68
67
|
get eventHandler(): SlickEventHandler;
|
|
69
68
|
get columnDefinitions(): Column<TData>[];
|
|
@@ -103,7 +102,7 @@ export declare class SlickVanillaGridBundle<TData = any> {
|
|
|
103
102
|
gridEventService?: GridEventService;
|
|
104
103
|
gridService?: GridService;
|
|
105
104
|
gridStateService?: GridStateService;
|
|
106
|
-
|
|
105
|
+
headerGroupingService?: HeaderGroupingService;
|
|
107
106
|
paginationService?: PaginationService;
|
|
108
107
|
resizerService?: ResizerService;
|
|
109
108
|
rxjs?: RxJsFacade;
|
|
@@ -135,7 +134,7 @@ export declare class SlickVanillaGridBundle<TData = any> {
|
|
|
135
134
|
* On a Pagination changed, we will trigger a Grid State changed with the new pagination info
|
|
136
135
|
* Also if we use Row Selection or the Checkbox Selector with a Backend Service (Odata, GraphQL), we need to reset any selection
|
|
137
136
|
*/
|
|
138
|
-
paginationChanged(pagination:
|
|
137
|
+
paginationChanged(pagination: PaginationMetadata): void;
|
|
139
138
|
/**
|
|
140
139
|
* When dataset changes, we need to refresh the entire grid UI & possibly resize it as well
|
|
141
140
|
* @param dataset
|
|
@@ -207,6 +206,7 @@ export declare class SlickVanillaGridBundle<TData = any> {
|
|
|
207
206
|
protected sortTreeDataset<U>(flatDatasetInput: U[], forceGridRefresh?: boolean): U[];
|
|
208
207
|
/** Prepare and load all SlickGrid editors, if an async editor is found then we'll also execute it. */
|
|
209
208
|
protected loadSlickGridEditors(columnDefinitions: Column<TData>[]): Column<TData>[];
|
|
209
|
+
protected suggestDateParsingWhenHelpful(): void;
|
|
210
210
|
/**
|
|
211
211
|
* When the Editor(s) has a "editor.collection" property, we'll load the async collection.
|
|
212
212
|
* Since this is called after the async call resolves, the pointer will not be the same as the "column" argument passed.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slick-vanilla-grid-bundle.d.ts","sourceRoot":"","sources":["../../../src/components/slick-vanilla-grid-bundle.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EAEjB,MAAM,EAEN,aAAa,EACb,gBAAgB,EAChB,UAAU,EACV,OAAO,EACP,UAAU,EACV,UAAU,EAEV,
|
|
1
|
+
{"version":3,"file":"slick-vanilla-grid-bundle.d.ts","sourceRoot":"","sources":["../../../src/components/slick-vanilla-grid-bundle.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EAEjB,uBAAuB,EACvB,MAAM,EAEN,aAAa,EACb,gBAAgB,EAChB,UAAU,EACV,OAAO,EACP,UAAU,EACV,UAAU,EAEV,kBAAkB,EAClB,YAAY,EACb,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAKL,8BAA8B,EAG9B,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,qBAAqB,EAErB,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,WAAW,EAEX,KAAK,iBAAiB,EACtB,eAAe,EAKf,iBAAiB,EACjB,aAAa,EACb,SAAS,EAEV,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAoB,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAC1F,OAAO,EAAE,0BAA0B,EAAE,MAAM,8CAA8C,CAAC;AAC1F,OAAO,EAAE,oBAAoB,EAAE,MAAM,8CAA8C,CAAC;AAGpF,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AAC1F,OAAO,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAC;AAItF,qBAAa,sBAAsB,CAAC,KAAK,GAAG,GAAG;IAC7C,SAAS,CAAC,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7C,SAAS,CAAC,uCAAuC,IAAI,IAAI;IAWzD;;;;OAIG;IACH,SAAS,CAAC,uBAAuB,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,GAAG,IAAI;IAe1D,8EAA8E;IAC9E,SAAS,CAAC,gCAAgC,IAAI,IAAI;IA4BlD,oKAAoK;IACpK,yBAAyB,CAAC,SAAS,EAAE,gBAAgB,EAAE,EAAE,wBAAwB,UAAQ,GAAG,IAAI;IAQhG,sBAAsB,IAAI,IAAI;IAI9B,4GAA4G;IAC5G,SAAS,CAAC,oBAAoB,IAAI,IAAI;IAYtC,SAAS,CAAC,2BAA2B,CAAC,SAAS,EAAE,gBAAgB,EAAE,GAAG,IAAI;IAU1E,SAAS,CAAC,iBAAiB,IAAI,IAAI;IAiCnC,sEAAsE;IACtE,SAAS,CAAC,oBAAoB,CAAC,QAAQ,EAAE,UAAU,GAAG,IAAI;IAW1D;;;OAGG;IACH,SAAS,CAAC,eAAe,CAAC,CAAC,EAAE,gBAAgB,EAAE,CAAC,EAAE,EAAE,gBAAgB,UAAQ,GAAG,CAAC,EAAE;IAyBlF,sGAAsG;IACtG,SAAS,CAAC,oBAAoB,CAAC,iBAAiB,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE;IAgBnF,SAAS,CAAC,6BAA6B,IAAI,IAAI;IAS/C;;;OAGG;IACH,SAAS,CAAC,sBAAsB,CAAC,CAAC,SAAS,KAAK,GAAG,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,GAAG,IAAI;CAgBrG"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3,12 +3,12 @@ import { BindingService } from '@slickgrid-universal/binding';
|
|
|
3
3
|
import { EventPubSubService } from '@slickgrid-universal/event-pub-sub';
|
|
4
4
|
import { SlickEmptyWarningComponent } from '@slickgrid-universal/empty-warning-component';
|
|
5
5
|
import { SlickPaginationComponent } from '@slickgrid-universal/pagination-component';
|
|
6
|
-
import { SlickVanillaGridBundle } from './components/slick-vanilla-grid-bundle';
|
|
6
|
+
import { SlickVanillaGridBundle } from './components/slick-vanilla-grid-bundle.js';
|
|
7
7
|
declare const Slicker: any;
|
|
8
8
|
export { BindingService };
|
|
9
9
|
export { Aggregators, Editors, Enums, EventPubSubService, Filters, Formatters, GroupTotalFormatters, SortComparers, Utilities };
|
|
10
10
|
export { SlickEmptyWarningComponent, SlickPaginationComponent, SlickVanillaGridBundle };
|
|
11
11
|
export { Slicker };
|
|
12
|
-
export * from './interfaces/index';
|
|
13
|
-
export * from './services/index';
|
|
12
|
+
export type * from './interfaces/index.js';
|
|
13
|
+
export * from './services/index.js';
|
|
14
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC/I,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,0BAA0B,EAAE,MAAM,8CAA8C,CAAC;AAC1F,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AACrF,OAAO,EAAE,sBAAsB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC/I,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,0BAA0B,EAAE,MAAM,8CAA8C,CAAC;AAC1F,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AACrF,OAAO,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AAEnF,QAAA,MAAM,OAAO,EAAE,GAWd,CAAC;AAOF,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC;AAChI,OAAO,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,CAAC;AACxF,OAAO,EAAE,OAAO,EAAE,CAAC;AACnB,mBAAmB,uBAAuB,CAAC;AAC3C,cAAc,qBAAqB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './slickerGridInstance.interface';
|
|
1
|
+
export type * from './slickerGridInstance.interface.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,oCAAoC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BackendService, ExtensionService, ExtensionUtility, FilterService, GridEventService, GridService, GridStateService,
|
|
1
|
+
import type { BackendService, ExtensionService, ExtensionUtility, FilterService, GridEventService, GridService, GridStateService, HeaderGroupingService, PaginationService, ResizerService, SlickDataView, SlickGrid, SortService, TreeDataService } from '@slickgrid-universal/common';
|
|
2
2
|
import type { EventPubSubService } from '@slickgrid-universal/event-pub-sub';
|
|
3
3
|
export interface SlickerGridInstance<TData = any> {
|
|
4
4
|
/** Slick DataView object */
|
|
@@ -23,8 +23,10 @@ export interface SlickerGridInstance<TData = any> {
|
|
|
23
23
|
gridEventService: GridEventService;
|
|
24
24
|
/** Grid State Service */
|
|
25
25
|
gridStateService: GridStateService;
|
|
26
|
+
/** @deprecated @use `headerGroupingService` */
|
|
27
|
+
groupingService: HeaderGroupingService;
|
|
26
28
|
/** Grouping (and colspan) Service */
|
|
27
|
-
|
|
29
|
+
headerGroupingService: HeaderGroupingService;
|
|
28
30
|
/** Pagination Service (allows you to programmatically go to first/last page, etc...) */
|
|
29
31
|
paginationService: PaginationService;
|
|
30
32
|
/** Resizer Service (including auto-resize) */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slickerGridInstance.interface.d.ts","sourceRoot":"","sources":["../../../src/interfaces/slickerGridInstance.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,
|
|
1
|
+
{"version":3,"file":"slickerGridInstance.interface.d.ts","sourceRoot":"","sources":["../../../src/interfaces/slickerGridInstance.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,SAAS,EACT,WAAW,EACX,eAAe,EAChB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAE7E,MAAM,WAAW,mBAAmB,CAAC,KAAK,GAAG,GAAG;IAC9C,4BAA4B;IAC5B,QAAQ,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC;IAE/B,wBAAwB;IACxB,SAAS,EAAE,SAAS,CAAC;IAKrB,sFAAsF;IACtF,OAAO,EAAE,CAAC,wBAAwB,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAKtD,sCAAsC;IACtC,cAAc,CAAC,EAAE,cAAc,CAAC;IAEhC,4IAA4I;IAC5I,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IAExC,6CAA6C;IAC7C,gBAAgB,EAAE,gBAAgB,CAAC;IAEnC,0BAA0B;IAC1B,gBAAgB,EAAE,gBAAgB,CAAC;IAEnC,qBAAqB;IACrB,aAAa,EAAE,aAAa,CAAC;IAE7B,gDAAgD;IAChD,WAAW,EAAE,WAAW,CAAC;IAEzB,0BAA0B;IAC1B,gBAAgB,EAAE,gBAAgB,CAAC;IAEnC,yBAAyB;IACzB,gBAAgB,EAAE,gBAAgB,CAAC;IAEnC,+CAA+C;IAC/C,eAAe,EAAE,qBAAqB,CAAC;IAEvC,qCAAqC;IACrC,qBAAqB,EAAE,qBAAqB,CAAC;IAE7C,wFAAwF;IACxF,iBAAiB,EAAE,iBAAiB,CAAC;IAErC,8CAA8C;IAC9C,cAAc,EAAE,cAAc,CAAC;IAE/B,mBAAmB;IACnB,WAAW,EAAE,WAAW,CAAC;IAEzB,6BAA6B;IAC7B,eAAe,EAAE,eAAe,CAAC;CAClC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './universalContainer.service';
|
|
1
|
+
export * from './universalContainer.service.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slickgrid-universal/vanilla-bundle",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.9.0",
|
|
4
4
|
"description": "Vanilla Slick Grid Bundle - Framework agnostic the output is to be used in vanilla JS/TS - Written in TypeScript and we also use Vite to bundle everything into a single JS file.",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"types": "./dist/types/index.d.ts",
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
"not dead"
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@slickgrid-universal/binding": "~5.
|
|
42
|
-
"@slickgrid-universal/common": "~5.
|
|
43
|
-
"@slickgrid-universal/custom-footer-component": "~5.
|
|
44
|
-
"@slickgrid-universal/empty-warning-component": "~5.
|
|
45
|
-
"@slickgrid-universal/event-pub-sub": "~5.
|
|
46
|
-
"@slickgrid-universal/pagination-component": "~5.
|
|
47
|
-
"@slickgrid-universal/utils": "~5.
|
|
41
|
+
"@slickgrid-universal/binding": "~5.9.0",
|
|
42
|
+
"@slickgrid-universal/common": "~5.9.0",
|
|
43
|
+
"@slickgrid-universal/custom-footer-component": "~5.9.0",
|
|
44
|
+
"@slickgrid-universal/empty-warning-component": "~5.9.0",
|
|
45
|
+
"@slickgrid-universal/event-pub-sub": "~5.9.0",
|
|
46
|
+
"@slickgrid-universal/pagination-component": "~5.9.0",
|
|
47
|
+
"@slickgrid-universal/utils": "~5.9.0",
|
|
48
48
|
"dequal": "^2.0.3",
|
|
49
49
|
"sortablejs": "^1.15.3",
|
|
50
50
|
"whatwg-fetch": "^3.6.20"
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"type": "ko_fi",
|
|
54
54
|
"url": "https://ko-fi.com/ghiscoding"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "2f6ea0833a0fd3b59e71c5cf2e228a57afbfc53a"
|
|
57
57
|
}
|
|
@@ -3,6 +3,7 @@ import type {
|
|
|
3
3
|
BackendService,
|
|
4
4
|
BackendServiceApi,
|
|
5
5
|
BackendServiceOption,
|
|
6
|
+
BasePaginationComponent,
|
|
6
7
|
Column,
|
|
7
8
|
DataViewOption,
|
|
8
9
|
ExtensionList,
|
|
@@ -12,7 +13,7 @@ import type {
|
|
|
12
13
|
Pagination,
|
|
13
14
|
RxJsFacade,
|
|
14
15
|
SelectEditor,
|
|
15
|
-
|
|
16
|
+
PaginationMetadata,
|
|
16
17
|
Subscription,
|
|
17
18
|
} from '@slickgrid-universal/common';
|
|
18
19
|
|
|
@@ -33,7 +34,7 @@ import {
|
|
|
33
34
|
GridEventService,
|
|
34
35
|
GridService,
|
|
35
36
|
GridStateService,
|
|
36
|
-
|
|
37
|
+
HeaderGroupingService,
|
|
37
38
|
type Observable,
|
|
38
39
|
PaginationService,
|
|
39
40
|
ResizerService,
|
|
@@ -45,10 +46,11 @@ import {
|
|
|
45
46
|
|
|
46
47
|
// utilities
|
|
47
48
|
emptyElement,
|
|
48
|
-
|
|
49
|
+
isColumnDateType,
|
|
49
50
|
SlickEventHandler,
|
|
50
51
|
SlickDataView,
|
|
51
52
|
SlickGrid,
|
|
53
|
+
unsubscribeAll,
|
|
52
54
|
} from '@slickgrid-universal/common';
|
|
53
55
|
import { extend } from '@slickgrid-universal/utils';
|
|
54
56
|
import { EventNamingStyle, EventPubSubService } from '@slickgrid-universal/event-pub-sub';
|
|
@@ -56,8 +58,10 @@ import { SlickEmptyWarningComponent } from '@slickgrid-universal/empty-warning-c
|
|
|
56
58
|
import { SlickFooterComponent } from '@slickgrid-universal/custom-footer-component';
|
|
57
59
|
import { SlickPaginationComponent } from '@slickgrid-universal/pagination-component';
|
|
58
60
|
|
|
59
|
-
import { type SlickerGridInstance } from '../interfaces/slickerGridInstance.interface';
|
|
60
|
-
import { UniversalContainerService } from '../services/universalContainer.service';
|
|
61
|
+
import { type SlickerGridInstance } from '../interfaces/slickerGridInstance.interface.js';
|
|
62
|
+
import { UniversalContainerService } from '../services/universalContainer.service.js';
|
|
63
|
+
|
|
64
|
+
const WARN_NO_PREPARSE_DATE_SIZE = 10000; // data size to warn user when pre-parse isn't enabled
|
|
61
65
|
|
|
62
66
|
export class SlickVanillaGridBundle<TData = any> {
|
|
63
67
|
protected _currentDatasetLength = 0;
|
|
@@ -110,7 +114,8 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
110
114
|
gridEventService!: GridEventService;
|
|
111
115
|
gridService!: GridService;
|
|
112
116
|
gridStateService!: GridStateService;
|
|
113
|
-
|
|
117
|
+
headerGroupingService!: HeaderGroupingService;
|
|
118
|
+
paginationComponent: BasePaginationComponent | undefined;
|
|
114
119
|
paginationService!: PaginationService;
|
|
115
120
|
rxjs?: RxJsFacade;
|
|
116
121
|
sharedService!: SharedService;
|
|
@@ -122,7 +127,6 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
122
127
|
// components
|
|
123
128
|
slickEmptyWarning: SlickEmptyWarningComponent | undefined;
|
|
124
129
|
slickFooter: SlickFooterComponent | undefined;
|
|
125
|
-
slickPagination: SlickPaginationComponent | undefined;
|
|
126
130
|
|
|
127
131
|
get backendService(): BackendService | undefined {
|
|
128
132
|
return this.gridOptions.backendServiceApi?.service;
|
|
@@ -169,6 +173,8 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
169
173
|
this.slickGrid.autosizeColumns();
|
|
170
174
|
this._isAutosizeColsCalled = true;
|
|
171
175
|
}
|
|
176
|
+
|
|
177
|
+
this.suggestDateParsingWhenHelpful();
|
|
172
178
|
}
|
|
173
179
|
|
|
174
180
|
get datasetHierarchical(): any[] | undefined {
|
|
@@ -296,7 +302,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
296
302
|
gridEventService?: GridEventService,
|
|
297
303
|
gridService?: GridService,
|
|
298
304
|
gridStateService?: GridStateService,
|
|
299
|
-
|
|
305
|
+
headerGroupingService?: HeaderGroupingService,
|
|
300
306
|
paginationService?: PaginationService,
|
|
301
307
|
resizerService?: ResizerService,
|
|
302
308
|
rxjs?: RxJsFacade,
|
|
@@ -358,7 +364,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
358
364
|
this.filterFactory = new FilterFactory(slickgridConfig, this.translaterService, this.collectionService);
|
|
359
365
|
this.filterService = services?.filterService ?? new FilterService(this.filterFactory, this._eventPubSubService, this.sharedService, this.backendUtilityService);
|
|
360
366
|
this.resizerService = services?.resizerService ?? new ResizerService(this._eventPubSubService);
|
|
361
|
-
this.sortService = services?.sortService ?? new SortService(this.sharedService, this._eventPubSubService, this.backendUtilityService);
|
|
367
|
+
this.sortService = services?.sortService ?? new SortService(this.collectionService, this.sharedService, this._eventPubSubService, this.backendUtilityService);
|
|
362
368
|
this.treeDataService = services?.treeDataService ?? new TreeDataService(this._eventPubSubService, this.sharedService, this.sortService);
|
|
363
369
|
this.paginationService = services?.paginationService ?? new PaginationService(this._eventPubSubService, this.sharedService, this.backendUtilityService);
|
|
364
370
|
|
|
@@ -375,7 +381,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
375
381
|
|
|
376
382
|
this.gridStateService = services?.gridStateService ?? new GridStateService(this.extensionService, this.filterService, this._eventPubSubService, this.sharedService, this.sortService, this.treeDataService);
|
|
377
383
|
this.gridService = services?.gridService ?? new GridService(this.gridStateService, this.filterService, this._eventPubSubService, this.paginationService, this.sharedService, this.sortService, this.treeDataService);
|
|
378
|
-
this.
|
|
384
|
+
this.headerGroupingService = services?.headerGroupingService ?? new HeaderGroupingService(this.extensionUtility);
|
|
379
385
|
|
|
380
386
|
if (hierarchicalDataset) {
|
|
381
387
|
this.sharedService.hierarchicalDataset = (isDeepCopyDataOnPageLoadEnabled ? extend(true, [], hierarchicalDataset) : hierarchicalDataset) || [];
|
|
@@ -392,7 +398,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
392
398
|
this.universalContainerService.registerInstance('GridEventService', this.gridEventService);
|
|
393
399
|
this.universalContainerService.registerInstance('GridService', this.gridService);
|
|
394
400
|
this.universalContainerService.registerInstance('GridStateService', this.gridStateService);
|
|
395
|
-
this.universalContainerService.registerInstance('
|
|
401
|
+
this.universalContainerService.registerInstance('HeaderGroupingService', this.headerGroupingService);
|
|
396
402
|
this.universalContainerService.registerInstance('PaginationService', this.paginationService);
|
|
397
403
|
this.universalContainerService.registerInstance('ResizerService', this.resizerService);
|
|
398
404
|
this.universalContainerService.registerInstance('SharedService', this.sharedService);
|
|
@@ -421,7 +427,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
421
427
|
this.gridEventService?.dispose();
|
|
422
428
|
this.gridService?.dispose();
|
|
423
429
|
this.gridStateService?.dispose();
|
|
424
|
-
this.
|
|
430
|
+
this.headerGroupingService?.dispose();
|
|
425
431
|
this.paginationService?.dispose();
|
|
426
432
|
this.resizerService?.dispose();
|
|
427
433
|
this.sortService?.dispose();
|
|
@@ -437,7 +443,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
437
443
|
// dispose the Components
|
|
438
444
|
this.slickFooter?.dispose();
|
|
439
445
|
this.slickEmptyWarning?.dispose();
|
|
440
|
-
this.
|
|
446
|
+
this.paginationComponent?.dispose();
|
|
441
447
|
|
|
442
448
|
unsubscribeAll(this.subscriptions);
|
|
443
449
|
this._eventPubSubService?.unsubscribeAll();
|
|
@@ -593,9 +599,10 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
593
599
|
}
|
|
594
600
|
|
|
595
601
|
// load the data in the DataView (unless it's a hierarchical dataset, if so it will be loaded after the initial tree sort)
|
|
602
|
+
inputDataset = inputDataset || [];
|
|
603
|
+
const initialDataset = this.gridOptions?.enableTreeData ? this.sortTreeDataset(inputDataset) : inputDataset;
|
|
604
|
+
|
|
596
605
|
if (this.dataView) {
|
|
597
|
-
inputDataset = inputDataset || [];
|
|
598
|
-
const initialDataset = this.gridOptions?.enableTreeData ? this.sortTreeDataset(inputDataset) : inputDataset;
|
|
599
606
|
this.dataView.beginUpdate();
|
|
600
607
|
this.dataView.setItems(initialDataset, this._gridOptions.datasetIdPropertyName);
|
|
601
608
|
this._currentDatasetLength = inputDataset.length;
|
|
@@ -688,7 +695,8 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
688
695
|
gridEventService: this.gridEventService,
|
|
689
696
|
gridStateService: this.gridStateService,
|
|
690
697
|
gridService: this.gridService,
|
|
691
|
-
groupingService: this.
|
|
698
|
+
groupingService: this.headerGroupingService,
|
|
699
|
+
headerGroupingService: this.headerGroupingService,
|
|
692
700
|
extensionService: this.extensionService,
|
|
693
701
|
extensionUtility: this.extensionUtility,
|
|
694
702
|
paginationService: this.paginationService,
|
|
@@ -703,6 +711,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
703
711
|
// all instances (SlickGrid, DataView & all Services)
|
|
704
712
|
this._eventPubSubService.publish('onSlickerGridCreated', this.instances);
|
|
705
713
|
this._isGridInitialized = true;
|
|
714
|
+
this.suggestDateParsingWhenHelpful();
|
|
706
715
|
}
|
|
707
716
|
|
|
708
717
|
hasBackendInfiniteScroll(): boolean {
|
|
@@ -778,7 +787,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
778
787
|
if (gridOptions.enableTranslate) {
|
|
779
788
|
this.extensionService.translateAllExtensions(args.language);
|
|
780
789
|
if ((gridOptions.createPreHeaderPanel && gridOptions.createTopHeaderPanel) || (gridOptions.createPreHeaderPanel && !gridOptions.enableDraggableGrouping)) {
|
|
781
|
-
this.
|
|
790
|
+
this.headerGroupingService.translateHeaderGrouping();
|
|
782
791
|
}
|
|
783
792
|
}
|
|
784
793
|
})
|
|
@@ -823,6 +832,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
823
832
|
this.handleOnItemCountChanged(this.dataView?.getFilteredItemCount() || 0, this.dataView?.getItemCount() ?? 0);
|
|
824
833
|
});
|
|
825
834
|
this._eventHandler.subscribe(dataView.onSetItemsCalled, (_e, args) => {
|
|
835
|
+
this.sharedService.isItemsDateParsed = false;
|
|
826
836
|
this.handleOnItemCountChanged(this.dataView?.getFilteredItemCount() || 0, args.itemCount);
|
|
827
837
|
|
|
828
838
|
// when user has resize by content enabled, we'll force a full width calculation since we change our entire dataset
|
|
@@ -1027,16 +1037,14 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
1027
1037
|
* On a Pagination changed, we will trigger a Grid State changed with the new pagination info
|
|
1028
1038
|
* Also if we use Row Selection or the Checkbox Selector with a Backend Service (Odata, GraphQL), we need to reset any selection
|
|
1029
1039
|
*/
|
|
1030
|
-
paginationChanged(pagination:
|
|
1040
|
+
paginationChanged(pagination: PaginationMetadata): void {
|
|
1031
1041
|
const isSyncGridSelectionEnabled = this.gridStateService?.needToPreserveRowSelection() ?? false;
|
|
1032
1042
|
if (this.slickGrid && !isSyncGridSelectionEnabled && this._gridOptions?.backendServiceApi && (this.gridOptions.enableRowSelection || this.gridOptions.enableCheckboxSelector)) {
|
|
1033
1043
|
this.slickGrid.setSelectedRows([]);
|
|
1034
1044
|
}
|
|
1035
1045
|
const { pageNumber, pageSize } = pagination;
|
|
1036
|
-
if (this.sharedService) {
|
|
1037
|
-
|
|
1038
|
-
this.sharedService.currentPagination = { pageNumber, pageSize };
|
|
1039
|
-
}
|
|
1046
|
+
if (this.sharedService && pageSize !== undefined && pageNumber !== undefined) {
|
|
1047
|
+
this.sharedService.currentPagination = { pageNumber, pageSize };
|
|
1040
1048
|
}
|
|
1041
1049
|
this._eventPubSubService.publish('onGridStateChanged', {
|
|
1042
1050
|
change: { newValues: { pageNumber, pageSize }, type: GridStateType.pagination },
|
|
@@ -1230,7 +1238,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
1230
1238
|
this.paginationService.totalItems = this.totalItems;
|
|
1231
1239
|
this.paginationService.init(this.slickGrid, paginationOptions, this.backendServiceApi);
|
|
1232
1240
|
this.subscriptions.push(
|
|
1233
|
-
this._eventPubSubService.subscribe<
|
|
1241
|
+
this._eventPubSubService.subscribe<PaginationMetadata>('onPaginationChanged', paginationChanges => this.paginationChanged(paginationChanges)),
|
|
1234
1242
|
this._eventPubSubService.subscribe<{ visible: boolean; }>('onPaginationVisibilityChanged', visibility => {
|
|
1235
1243
|
this.showPagination = visibility?.visible ?? false;
|
|
1236
1244
|
if (this.gridOptions?.backendServiceApi) {
|
|
@@ -1253,12 +1261,14 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
1253
1261
|
* @param {Boolean} shouldDisposePaginationService - when disposing the Pagination, do we also want to dispose of the Pagination Service? (defaults to True)
|
|
1254
1262
|
*/
|
|
1255
1263
|
protected renderPagination(showPagination = true): void {
|
|
1256
|
-
if (this._gridOptions?.enablePagination && !this._isPaginationInitialized && showPagination) {
|
|
1257
|
-
|
|
1258
|
-
this.
|
|
1264
|
+
if (this.slickGrid && this._gridOptions?.enablePagination && !this._isPaginationInitialized && showPagination) {
|
|
1265
|
+
const PaginationClass = this.gridOptions.customPaginationComponent ?? SlickPaginationComponent;
|
|
1266
|
+
this.paginationComponent = new PaginationClass();
|
|
1267
|
+
this.paginationComponent.init(this.slickGrid, this.paginationService, this._eventPubSubService, this.translaterService);
|
|
1268
|
+
this.paginationComponent.renderPagination(this._gridParentContainerElm);
|
|
1259
1269
|
this._isPaginationInitialized = true;
|
|
1260
1270
|
} else if (!showPagination) {
|
|
1261
|
-
this.
|
|
1271
|
+
this.paginationComponent?.dispose();
|
|
1262
1272
|
this._isPaginationInitialized = false;
|
|
1263
1273
|
}
|
|
1264
1274
|
}
|
|
@@ -1451,7 +1461,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
1451
1461
|
|
|
1452
1462
|
// when using Grouping/DraggableGrouping/Colspan register its Service
|
|
1453
1463
|
if ((this.gridOptions.createPreHeaderPanel && this.gridOptions.createTopHeaderPanel) || (this.gridOptions.createPreHeaderPanel && !this.gridOptions.enableDraggableGrouping)) {
|
|
1454
|
-
this._registeredResources.push(this.
|
|
1464
|
+
this._registeredResources.push(this.headerGroupingService);
|
|
1455
1465
|
}
|
|
1456
1466
|
|
|
1457
1467
|
// when using Tree Data View, register its Service
|
|
@@ -1531,6 +1541,15 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
1531
1541
|
});
|
|
1532
1542
|
}
|
|
1533
1543
|
|
|
1544
|
+
protected suggestDateParsingWhenHelpful(): void {
|
|
1545
|
+
if (!this.gridOptions.silenceWarnings && this.dataView && this.dataView.getItemCount() > WARN_NO_PREPARSE_DATE_SIZE && !this.gridOptions.preParseDateColumns && this.slickGrid?.getColumns().some(c => isColumnDateType(c.type))) {
|
|
1546
|
+
console.warn(
|
|
1547
|
+
'[Slickgrid-Universal] For getting better perf, we suggest you enable the `preParseDateColumns` grid option, ' +
|
|
1548
|
+
'for more info visit => https://ghiscoding.gitbook.io/slickgrid-universal/column-functionalities/sorting#pre-parse-date-columns-for-better-perf'
|
|
1549
|
+
);
|
|
1550
|
+
}
|
|
1551
|
+
}
|
|
1552
|
+
|
|
1534
1553
|
/**
|
|
1535
1554
|
* When the Editor(s) has a "editor.collection" property, we'll load the async collection.
|
|
1536
1555
|
* Since this is called after the async call resolves, the pointer will not be the same as the "column" argument passed.
|
package/src/index.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { BindingService } from '@slickgrid-universal/binding';
|
|
|
3
3
|
import { EventPubSubService } from '@slickgrid-universal/event-pub-sub';
|
|
4
4
|
import { SlickEmptyWarningComponent } from '@slickgrid-universal/empty-warning-component';
|
|
5
5
|
import { SlickPaginationComponent } from '@slickgrid-universal/pagination-component';
|
|
6
|
-
import { SlickVanillaGridBundle } from './components/slick-vanilla-grid-bundle';
|
|
6
|
+
import { SlickVanillaGridBundle } from './components/slick-vanilla-grid-bundle.js';
|
|
7
7
|
|
|
8
8
|
const Slicker: any = {
|
|
9
9
|
GridBundle: SlickVanillaGridBundle,
|
|
@@ -27,5 +27,5 @@ export { BindingService };
|
|
|
27
27
|
export { Aggregators, Editors, Enums, EventPubSubService, Filters, Formatters, GroupTotalFormatters, SortComparers, Utilities };
|
|
28
28
|
export { SlickEmptyWarningComponent, SlickPaginationComponent, SlickVanillaGridBundle }; // export the custom components & interfaces
|
|
29
29
|
export { Slicker };
|
|
30
|
-
export * from './interfaces/index';
|
|
31
|
-
export * from './services/index';
|
|
30
|
+
export type * from './interfaces/index.js';
|
|
31
|
+
export * from './services/index.js';
|
package/src/interfaces/index.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './slickerGridInstance.interface';
|
|
1
|
+
export type * from './slickerGridInstance.interface.js';
|
|
@@ -6,7 +6,7 @@ import type {
|
|
|
6
6
|
GridEventService,
|
|
7
7
|
GridService,
|
|
8
8
|
GridStateService,
|
|
9
|
-
|
|
9
|
+
HeaderGroupingService,
|
|
10
10
|
PaginationService,
|
|
11
11
|
ResizerService,
|
|
12
12
|
SlickDataView,
|
|
@@ -56,8 +56,11 @@ export interface SlickerGridInstance<TData = any> {
|
|
|
56
56
|
/** Grid State Service */
|
|
57
57
|
gridStateService: GridStateService;
|
|
58
58
|
|
|
59
|
+
/** @deprecated @use `headerGroupingService` */
|
|
60
|
+
groupingService: HeaderGroupingService;
|
|
61
|
+
|
|
59
62
|
/** Grouping (and colspan) Service */
|
|
60
|
-
|
|
63
|
+
headerGroupingService: HeaderGroupingService;
|
|
61
64
|
|
|
62
65
|
/** Pagination Service (allows you to programmatically go to first/last page, etc...) */
|
|
63
66
|
paginationService: PaginationService;
|
package/src/services/index.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './universalContainer.service';
|
|
1
|
+
export * from './universalContainer.service.js';
|