@slickgrid-universal/vanilla-bundle 5.0.1 → 5.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/dist/cjs/components/slick-vanilla-grid-bundle.js +8 -8
- package/dist/cjs/components/slick-vanilla-grid-bundle.js.map +1 -1
- package/dist/esm/components/slick-vanilla-grid-bundle.js +8 -8
- package/dist/esm/components/slick-vanilla-grid-bundle.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/components/slick-vanilla-grid-bundle.d.ts +3 -3
- package/dist/types/components/slick-vanilla-grid-bundle.d.ts.map +1 -1
- package/dist/types/services/universalContainer.service.d.ts.map +1 -1
- package/package.json +9 -9
- package/src/components/slick-vanilla-grid-bundle.ts +47 -47
- package/src/services/universalContainer.service.ts +2 -2
|
@@ -91,7 +91,7 @@ export declare class SlickVanillaGridBundle<TData = any> {
|
|
|
91
91
|
* @param {Array<Object>} hierarchicalDataset - Hierarchical Dataset
|
|
92
92
|
* @param {Object} services - Typically only used for Unit Testing when we want to pass Mocked/Stub Services
|
|
93
93
|
*/
|
|
94
|
-
constructor(gridParentContainerElm: HTMLElement, columnDefs?: Column<TData>[], options?: Partial<GridOption
|
|
94
|
+
constructor(gridParentContainerElm: HTMLElement, columnDefs?: Column<TData>[] | undefined, options?: Partial<GridOption> | undefined, dataset?: TData[] | undefined, hierarchicalDataset?: any[] | undefined, services?: {
|
|
95
95
|
backendUtilityService?: BackendUtilityService;
|
|
96
96
|
collectionService?: CollectionService;
|
|
97
97
|
eventPubSubService?: EventPubSubService;
|
|
@@ -110,13 +110,13 @@ export declare class SlickVanillaGridBundle<TData = any> {
|
|
|
110
110
|
treeDataService?: TreeDataService;
|
|
111
111
|
translaterService?: TranslaterService;
|
|
112
112
|
universalContainerService?: UniversalContainerService;
|
|
113
|
-
});
|
|
113
|
+
} | undefined);
|
|
114
114
|
emptyGridContainerElm(): void;
|
|
115
115
|
/** Dispose of the Component */
|
|
116
116
|
dispose(shouldEmptyDomElementContainer?: boolean): void;
|
|
117
117
|
disposeExternalResources(): void;
|
|
118
118
|
initialization(gridContainerElm: HTMLElement, eventHandler: SlickEventHandler, inputDataset?: TData[]): void;
|
|
119
|
-
mergeGridOptions(gridOptions: GridOption): GridOption
|
|
119
|
+
mergeGridOptions(gridOptions: GridOption): GridOption;
|
|
120
120
|
/**
|
|
121
121
|
* Define our internal Post Process callback, it will execute internally after we get back result from the Process backend call
|
|
122
122
|
* For now, this is GraphQL Service ONLY feature and it will basically
|
|
@@ -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,iBAAiB,EAEjB,MAAM,EAEN,aAAa,EACb,gBAAgB,EAChB,UAAU,EACV,OAAO,EACP,UAAU,EAEV,iBAAiB,EACjB,YAAY,EACZ,UAAU,EACX,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,yBAAyB,EAEzB,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,WAAW,EAEX,KAAK,iBAAiB,EACtB,eAAe,EAKf,iBAAiB,EACjB,aAAa,EACb,SAAS,EACV,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;AACpF,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAErF,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AACvF,OAAO,EAAE,yB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AAmB,IAAI,GAAG,EAAE,GAAG,SAAS,CAE3C;IAED,IAAI,mBAAmB,CAAC,sBAAsB,EAAE,GAAG,EAAE,GAAG,SAAS,EAwBhE;IAED,IAAI,kBAAkB,CAAC,MAAM,EAAE,kBAAkB,EAEhD;IAED,IAAI,gCAAgC,CAAC,aAAa,EAAE,OAAO,EAE1D;IAED,IAAI,WAAW,IAAI,UAAU,CAE5B;IAED,IAAI,WAAW,CAAC,OAAO,EAAE,UAAU,EAqBlC;IAED,IAAI,iBAAiB,IAAI,UAAU,GAAG,SAAS,CAE9C;IACD,IAAI,iBAAiB,CAAC,oBAAoB,EAAE,UAAU,GAAG,SAAS,EAQjE;IAED,IAAI,oBAAoB,IAAI,OAAO,CAElC;IACD,IAAI,oBAAoB,CAAC,aAAa,EAAE,OAAO,EAE9C;IACD,IAAI,iBAAiB,IAAI,OAAO,CAE/B;IAED,IAAI,SAAS,IAAI,mBAAmB,GAAG,SAAS,CAE/C;IAED,IAAI,UAAU,IAAI,aAAa,CAAC,GAAG,CAAC,GAAG,SAAS,CAE/C;IAED,IAAI,mBAAmB,IAAI,GAAG,EAAE,CAE/B;IAED;;;;;;;;OAQG;gBAED,sBAAsB,EAAE,WAAW,EACnC,UAAU,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,
|
|
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,iBAAiB,EAEjB,MAAM,EAEN,aAAa,EACb,gBAAgB,EAChB,UAAU,EACV,OAAO,EACP,UAAU,EAEV,iBAAiB,EACjB,YAAY,EACZ,UAAU,EACX,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,EA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AAsB,CAAC,CAAC,SAAS,KAAK,GAAG,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,GAAG,IAAI;CAgBrG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"universalContainer.service.d.ts","sourceRoot":"","sources":["../../../src/services/universalContainer.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAEvF,qBAAa,yBAA0B,YAAW,gBAAgB;IAChE,YAAY,EAAE,iBAAiB,EAAE,CAAM;IAEvC,GAAG,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI;IAQnC,OAAO;
|
|
1
|
+
{"version":3,"file":"universalContainer.service.d.ts","sourceRoot":"","sources":["../../../src/services/universalContainer.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAEvF,qBAAa,yBAA0B,YAAW,gBAAgB;IAChE,YAAY,EAAE,iBAAiB,EAAE,CAAM;IAEvC,GAAG,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI;IAQnC,OAAO,IAAI,IAAI;IAIf,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,GAAG,IAAI;CAMnD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slickgrid-universal/vanilla-bundle",
|
|
3
|
-
"version": "5.0
|
|
3
|
+
"version": "5.2.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
|
"module": "./dist/esm/index.js",
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
"not dead"
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@slickgrid-universal/binding": "~5.
|
|
42
|
-
"@slickgrid-universal/common": "~5.0
|
|
43
|
-
"@slickgrid-universal/custom-footer-component": "~5.0
|
|
44
|
-
"@slickgrid-universal/empty-warning-component": "~5.0
|
|
45
|
-
"@slickgrid-universal/event-pub-sub": "~5.
|
|
46
|
-
"@slickgrid-universal/pagination-component": "~5.0
|
|
47
|
-
"@slickgrid-universal/utils": "~5.
|
|
41
|
+
"@slickgrid-universal/binding": "~5.2.0",
|
|
42
|
+
"@slickgrid-universal/common": "~5.2.0",
|
|
43
|
+
"@slickgrid-universal/custom-footer-component": "~5.2.0",
|
|
44
|
+
"@slickgrid-universal/empty-warning-component": "~5.2.0",
|
|
45
|
+
"@slickgrid-universal/event-pub-sub": "~5.2.0",
|
|
46
|
+
"@slickgrid-universal/pagination-component": "~5.2.0",
|
|
47
|
+
"@slickgrid-universal/utils": "~5.2.0",
|
|
48
48
|
"dequal": "^2.0.3",
|
|
49
49
|
"sortablejs": "^1.15.2",
|
|
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": "d7de27ab3ac3c7e2d48302603ac76aaf794e66a2"
|
|
57
57
|
}
|
|
@@ -183,8 +183,8 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
183
183
|
this.sortService.processTreeDataInitialSort();
|
|
184
184
|
|
|
185
185
|
// we also need to reset/refresh the Tree Data filters because if we inserted new item(s) then it might not show up without doing this refresh
|
|
186
|
-
// however we need
|
|
187
|
-
|
|
186
|
+
// however we need to queue our process until the flat dataset is ready, so we can queue a microtask to execute the DataView refresh only after everything is ready
|
|
187
|
+
queueMicrotask(() => {
|
|
188
188
|
const flatDatasetLn = this.dataView?.getItemCount() ?? 0;
|
|
189
189
|
if (flatDatasetLn > 0 && (flatDatasetLn !== prevFlatDatasetLn || !isDatasetEqual)) {
|
|
190
190
|
this.filterService.refreshTreeDataFilters();
|
|
@@ -276,10 +276,10 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
276
276
|
*/
|
|
277
277
|
constructor(
|
|
278
278
|
gridParentContainerElm: HTMLElement,
|
|
279
|
-
columnDefs?: Column<TData>[],
|
|
280
|
-
options?: Partial<GridOption
|
|
281
|
-
dataset?: TData[],
|
|
282
|
-
hierarchicalDataset?: any[],
|
|
279
|
+
columnDefs?: Column<TData>[] | undefined,
|
|
280
|
+
options?: Partial<GridOption> | undefined,
|
|
281
|
+
dataset?: TData[] | undefined,
|
|
282
|
+
hierarchicalDataset?: any[] | undefined,
|
|
283
283
|
services?: {
|
|
284
284
|
backendUtilityService?: BackendUtilityService,
|
|
285
285
|
collectionService?: CollectionService,
|
|
@@ -299,7 +299,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
299
299
|
treeDataService?: TreeDataService,
|
|
300
300
|
translaterService?: TranslaterService,
|
|
301
301
|
universalContainerService?: UniversalContainerService,
|
|
302
|
-
}
|
|
302
|
+
} | undefined
|
|
303
303
|
) {
|
|
304
304
|
// make sure that the grid container doesn't already have the "slickgrid-container" css class
|
|
305
305
|
// if it does then we won't create yet another grid, just stop there
|
|
@@ -397,14 +397,14 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
397
397
|
this.initialization(this._gridContainerElm, eventHandler, dataset);
|
|
398
398
|
}
|
|
399
399
|
|
|
400
|
-
emptyGridContainerElm() {
|
|
400
|
+
emptyGridContainerElm(): void {
|
|
401
401
|
const gridContainerId = this.gridOptions?.gridContainerId ?? 'grid1';
|
|
402
402
|
const gridContainerElm = document.querySelector(`#${gridContainerId}`);
|
|
403
403
|
emptyElement(gridContainerElm);
|
|
404
404
|
}
|
|
405
405
|
|
|
406
406
|
/** Dispose of the Component */
|
|
407
|
-
dispose(shouldEmptyDomElementContainer = false) {
|
|
407
|
+
dispose(shouldEmptyDomElementContainer = false): void {
|
|
408
408
|
this._eventPubSubService?.publish('onBeforeGridDestroy', this.slickGrid);
|
|
409
409
|
this._eventHandler?.unsubscribeAll();
|
|
410
410
|
this._eventPubSubService?.publish('onAfterGridDestroyed', true);
|
|
@@ -467,7 +467,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
467
467
|
this._slickerGridInstances = null as any;
|
|
468
468
|
}
|
|
469
469
|
|
|
470
|
-
disposeExternalResources() {
|
|
470
|
+
disposeExternalResources(): void {
|
|
471
471
|
if (Array.isArray(this._registeredResources)) {
|
|
472
472
|
while (this._registeredResources.length > 0) {
|
|
473
473
|
const res = this._registeredResources.pop();
|
|
@@ -479,7 +479,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
479
479
|
this._registeredResources = [];
|
|
480
480
|
}
|
|
481
481
|
|
|
482
|
-
initialization(gridContainerElm: HTMLElement, eventHandler: SlickEventHandler, inputDataset?: TData[]) {
|
|
482
|
+
initialization(gridContainerElm: HTMLElement, eventHandler: SlickEventHandler, inputDataset?: TData[]): void {
|
|
483
483
|
// when detecting a frozen grid, we'll automatically enable the mousewheel scroll handler so that we can scroll from both left/right frozen containers
|
|
484
484
|
if (this.gridOptions && ((this.gridOptions.frozenRow !== undefined && this.gridOptions.frozenRow >= 0) || this.gridOptions.frozenColumn !== undefined && this.gridOptions.frozenColumn >= 0) && this.gridOptions.enableMouseWheelScrollHandler === undefined) {
|
|
485
485
|
this.gridOptions.enableMouseWheelScrollHandler = true;
|
|
@@ -693,7 +693,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
693
693
|
this._isGridInitialized = true;
|
|
694
694
|
}
|
|
695
695
|
|
|
696
|
-
mergeGridOptions(gridOptions: GridOption) {
|
|
696
|
+
mergeGridOptions(gridOptions: GridOption): GridOption {
|
|
697
697
|
const options = extend<GridOption>(true, {}, GlobalGridOptions, gridOptions);
|
|
698
698
|
|
|
699
699
|
// also make sure to show the header row if user have enabled filtering
|
|
@@ -725,7 +725,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
725
725
|
* For now, this is GraphQL Service ONLY feature and it will basically
|
|
726
726
|
* refresh the Dataset & Pagination without having the user to create his own PostProcess every time
|
|
727
727
|
*/
|
|
728
|
-
createBackendApiInternalPostProcessCallback(gridOptions?: GridOption) {
|
|
728
|
+
createBackendApiInternalPostProcessCallback(gridOptions?: GridOption): void {
|
|
729
729
|
const backendApi = gridOptions?.backendServiceApi;
|
|
730
730
|
if (backendApi?.service) {
|
|
731
731
|
const backendApiService = backendApi.service;
|
|
@@ -744,7 +744,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
744
744
|
}
|
|
745
745
|
}
|
|
746
746
|
|
|
747
|
-
bindDifferentHooks(grid: SlickGrid, gridOptions: GridOption, dataView: SlickDataView<TData>) {
|
|
747
|
+
bindDifferentHooks(grid: SlickGrid, gridOptions: GridOption, dataView: SlickDataView<TData>): void {
|
|
748
748
|
// if user is providing a Translate Service, we need to add our PubSub Service (but only after creating all dependencies)
|
|
749
749
|
// so that we can later subscribe to the "onLanguageChange" event and translate any texts whenever that get triggered
|
|
750
750
|
if (gridOptions.enableTranslate && this.translaterService?.addPubSubMessaging) {
|
|
@@ -761,7 +761,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
761
761
|
this._eventPubSubService.subscribe('onLanguageChange', (args: { language: string; }) => {
|
|
762
762
|
if (gridOptions.enableTranslate) {
|
|
763
763
|
this.extensionService.translateAllExtensions(args.language);
|
|
764
|
-
if (gridOptions.createPreHeaderPanel && !gridOptions.enableDraggableGrouping) {
|
|
764
|
+
if ((gridOptions.createPreHeaderPanel && gridOptions.createTopHeaderPanel) || (gridOptions.createPreHeaderPanel && !gridOptions.enableDraggableGrouping)) {
|
|
765
765
|
this.groupingService.translateGroupingAndColSpan();
|
|
766
766
|
}
|
|
767
767
|
}
|
|
@@ -856,7 +856,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
856
856
|
}
|
|
857
857
|
}
|
|
858
858
|
|
|
859
|
-
bindBackendCallbackFunctions(gridOptions: GridOption) {
|
|
859
|
+
bindBackendCallbackFunctions(gridOptions: GridOption): void {
|
|
860
860
|
const backendApi = gridOptions.backendServiceApi;
|
|
861
861
|
const backendApiService = backendApi?.service;
|
|
862
862
|
const serviceOptions: BackendServiceOption = backendApiService?.options ?? {};
|
|
@@ -893,8 +893,8 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
893
893
|
const query = (typeof backendApiService.buildQuery === 'function') ? backendApiService.buildQuery() : '';
|
|
894
894
|
const process = isExecuteCommandOnInit ? (backendApi.process?.(query) ?? null) : (backendApi.onInit?.(query) ?? null);
|
|
895
895
|
|
|
896
|
-
// wrap this inside a
|
|
897
|
-
|
|
896
|
+
// wrap this inside a microtask to be executed at the end of the task and avoid timing issue since the gridOptions needs to be ready before running this onInit
|
|
897
|
+
queueMicrotask(() => {
|
|
898
898
|
const backendUtilityService = this.backendUtilityService as BackendUtilityService;
|
|
899
899
|
// keep start time & end timestamps & return it after process execution
|
|
900
900
|
const startTime = new Date();
|
|
@@ -923,7 +923,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
923
923
|
}
|
|
924
924
|
}
|
|
925
925
|
|
|
926
|
-
bindResizeHook(grid: SlickGrid, options: GridOption) {
|
|
926
|
+
bindResizeHook(grid: SlickGrid, options: GridOption): void {
|
|
927
927
|
if ((options.autoFitColumnsOnFirstLoad && options.autosizeColumnsByCellContentOnFirstLoad) || (options.enableAutoSizeColumns && options.enableAutoResizeColumnsByCellContent)) {
|
|
928
928
|
throw new Error(`[Slickgrid-Universal] You cannot enable both autosize/fit viewport & resize by content, you must choose which resize technique to use. You can enable these 2 options ("autoFitColumnsOnFirstLoad" and "enableAutoSizeColumns") OR these other 2 options ("autosizeColumnsByCellContentOnFirstLoad" and "enableAutoResizeColumnsByCellContent").`);
|
|
929
929
|
}
|
|
@@ -942,7 +942,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
942
942
|
}
|
|
943
943
|
}
|
|
944
944
|
|
|
945
|
-
executeAfterDataviewCreated(gridOptions: GridOption) {
|
|
945
|
+
executeAfterDataviewCreated(gridOptions: GridOption): void {
|
|
946
946
|
// if user entered some Sort "presets", we need to reflect them all in the DOM
|
|
947
947
|
if (gridOptions.enableSorting) {
|
|
948
948
|
if (gridOptions.presets && Array.isArray(gridOptions.presets.sorters)) {
|
|
@@ -957,7 +957,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
957
957
|
* On a Pagination changed, we will trigger a Grid State changed with the new pagination info
|
|
958
958
|
* Also if we use Row Selection or the Checkbox Selector with a Backend Service (Odata, GraphQL), we need to reset any selection
|
|
959
959
|
*/
|
|
960
|
-
paginationChanged(pagination: ServicePagination) {
|
|
960
|
+
paginationChanged(pagination: ServicePagination): void {
|
|
961
961
|
const isSyncGridSelectionEnabled = this.gridStateService?.needToPreserveRowSelection() ?? false;
|
|
962
962
|
if (this.slickGrid && !isSyncGridSelectionEnabled && this._gridOptions?.backendServiceApi && (this.gridOptions.enableRowSelection || this.gridOptions.enableCheckboxSelector)) {
|
|
963
963
|
this.slickGrid.setSelectedRows([]);
|
|
@@ -978,7 +978,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
978
978
|
* When dataset changes, we need to refresh the entire grid UI & possibly resize it as well
|
|
979
979
|
* @param dataset
|
|
980
980
|
*/
|
|
981
|
-
refreshGridData(dataset: TData[], totalCount?: number) {
|
|
981
|
+
refreshGridData(dataset: TData[], totalCount?: number): void {
|
|
982
982
|
// local grid, check if we need to show the Pagination
|
|
983
983
|
// if so then also check if there's any presets and finally initialize the PaginationService
|
|
984
984
|
// a local grid with Pagination presets will potentially have a different total of items, we'll need to get it from the DataView and update our total
|
|
@@ -1044,7 +1044,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
1044
1044
|
* We will re-render the grid so that the new header and data shows up correctly.
|
|
1045
1045
|
* If using translater, we also need to trigger a re-translate of the column headers
|
|
1046
1046
|
*/
|
|
1047
|
-
updateColumnDefinitionsList(newColumnDefinitions: Column<TData>[]) {
|
|
1047
|
+
updateColumnDefinitionsList(newColumnDefinitions: Column<TData>[]): void {
|
|
1048
1048
|
if (this.slickGrid && this._gridOptions && Array.isArray(newColumnDefinitions)) {
|
|
1049
1049
|
// map the Editor model to editorClass and load editor collectionAsync
|
|
1050
1050
|
newColumnDefinitions = this.loadSlickGridEditors(newColumnDefinitions);
|
|
@@ -1072,7 +1072,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
1072
1072
|
* Show the filter row displayed on first row, we can optionally pass false to hide it.
|
|
1073
1073
|
* @param showing
|
|
1074
1074
|
*/
|
|
1075
|
-
showHeaderRow(showing = true) {
|
|
1075
|
+
showHeaderRow(showing = true): boolean {
|
|
1076
1076
|
this.slickGrid?.setHeaderRowVisibility(showing);
|
|
1077
1077
|
if (this.slickGrid && showing === true && this._isGridInitialized) {
|
|
1078
1078
|
this.slickGrid.setColumns(this.columnDefinitions);
|
|
@@ -1080,7 +1080,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
1080
1080
|
return showing;
|
|
1081
1081
|
}
|
|
1082
1082
|
|
|
1083
|
-
setData(data: TData[], shouldAutosizeColumns = false) {
|
|
1083
|
+
setData(data: TData[], shouldAutosizeColumns = false): void {
|
|
1084
1084
|
if (shouldAutosizeColumns) {
|
|
1085
1085
|
this._isAutosizeColsCalled = false;
|
|
1086
1086
|
this._currentDatasetLength = 0;
|
|
@@ -1100,7 +1100,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
1100
1100
|
return paginationOptions;
|
|
1101
1101
|
}
|
|
1102
1102
|
|
|
1103
|
-
setDarkMode(dark = false) {
|
|
1103
|
+
setDarkMode(dark = false): void {
|
|
1104
1104
|
if (dark) {
|
|
1105
1105
|
this._gridParentContainerElm.classList.add('slick-dark-mode');
|
|
1106
1106
|
} else {
|
|
@@ -1116,18 +1116,18 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
1116
1116
|
* Loop through all column definitions and copy the original optional `width` properties optionally provided by the user.
|
|
1117
1117
|
* We will use this when doing a resize by cell content, if user provided a `width` it won't override it.
|
|
1118
1118
|
*/
|
|
1119
|
-
protected copyColumnWidthsReference(columnDefinitions: Column<TData>[]) {
|
|
1119
|
+
protected copyColumnWidthsReference(columnDefinitions: Column<TData>[]): void {
|
|
1120
1120
|
columnDefinitions.forEach(col => col.originalWidth = col.width);
|
|
1121
1121
|
}
|
|
1122
1122
|
|
|
1123
|
-
protected displayEmptyDataWarning(showWarning = true) {
|
|
1123
|
+
protected displayEmptyDataWarning(showWarning = true): void {
|
|
1124
1124
|
if (this.gridOptions.enableEmptyDataWarningMessage) {
|
|
1125
1125
|
this.slickEmptyWarning?.showEmptyDataMessage(showWarning);
|
|
1126
1126
|
}
|
|
1127
1127
|
}
|
|
1128
1128
|
|
|
1129
1129
|
/** When data changes in the DataView, we'll refresh the metrics and/or display a warning if the dataset is empty */
|
|
1130
|
-
protected handleOnItemCountChanged(currentPageRowItemCount: number, totalItemCount: number) {
|
|
1130
|
+
protected handleOnItemCountChanged(currentPageRowItemCount: number, totalItemCount: number): void {
|
|
1131
1131
|
this._currentDatasetLength = totalItemCount;
|
|
1132
1132
|
this.metrics = {
|
|
1133
1133
|
startTime: new Date(),
|
|
@@ -1147,7 +1147,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
1147
1147
|
}
|
|
1148
1148
|
|
|
1149
1149
|
/** Initialize the Pagination Service once */
|
|
1150
|
-
protected initializePaginationService(paginationOptions: Pagination) {
|
|
1150
|
+
protected initializePaginationService(paginationOptions: Pagination): void {
|
|
1151
1151
|
if (this.slickGrid && this.gridOptions) {
|
|
1152
1152
|
this.paginationData = {
|
|
1153
1153
|
gridOptions: this.gridOptions,
|
|
@@ -1178,7 +1178,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
1178
1178
|
* @param {Boolean} showPagination - show (new render) or not (dispose) the Pagination
|
|
1179
1179
|
* @param {Boolean} shouldDisposePaginationService - when disposing the Pagination, do we also want to dispose of the Pagination Service? (defaults to True)
|
|
1180
1180
|
*/
|
|
1181
|
-
protected renderPagination(showPagination = true) {
|
|
1181
|
+
protected renderPagination(showPagination = true): void {
|
|
1182
1182
|
if (this._gridOptions?.enablePagination && !this._isPaginationInitialized && showPagination) {
|
|
1183
1183
|
this.slickPagination = new SlickPaginationComponent(this.paginationService, this._eventPubSubService, this.sharedService, this.translaterService);
|
|
1184
1184
|
this.slickPagination.renderPagination(this._gridParentContainerElm);
|
|
@@ -1192,7 +1192,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
1192
1192
|
}
|
|
1193
1193
|
|
|
1194
1194
|
/** Load the Editor Collection asynchronously and replace the "collection" property when Promise resolves */
|
|
1195
|
-
protected loadEditorCollectionAsync(column: Column<TData>) {
|
|
1195
|
+
protected loadEditorCollectionAsync(column: Column<TData>): void {
|
|
1196
1196
|
if (column?.editor) {
|
|
1197
1197
|
const collectionAsync = column.editor.collectionAsync;
|
|
1198
1198
|
column.editor.disabled = true; // disable the Editor DOM element, we'll re-enable it after receiving the collection with "updateEditorCollection()"
|
|
@@ -1216,8 +1216,8 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
1216
1216
|
}
|
|
1217
1217
|
});
|
|
1218
1218
|
} else if (this.rxjs?.isObservable(collectionAsync)) {
|
|
1219
|
-
// wrap this inside a
|
|
1220
|
-
|
|
1219
|
+
// wrap this inside a microtask at the end of the task to avoid timing issue since updateEditorCollection requires to call SlickGrid getColumns() method after columns are available
|
|
1220
|
+
queueMicrotask(() => {
|
|
1221
1221
|
this.subscriptions.push(
|
|
1222
1222
|
(collectionAsync as Observable<any>).subscribe((resolvedCollection) => this.updateEditorCollection(column, resolvedCollection))
|
|
1223
1223
|
);
|
|
@@ -1226,7 +1226,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
1226
1226
|
}
|
|
1227
1227
|
}
|
|
1228
1228
|
|
|
1229
|
-
protected insertDynamicPresetColumns(columnId: string, gridPresetColumns: Column<TData>[]) {
|
|
1229
|
+
protected insertDynamicPresetColumns(columnId: string, gridPresetColumns: Column<TData>[]): void {
|
|
1230
1230
|
if (this._columnDefinitions) {
|
|
1231
1231
|
const columnPosition = this._columnDefinitions.findIndex(c => c.id === columnId);
|
|
1232
1232
|
if (columnPosition >= 0) {
|
|
@@ -1241,7 +1241,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
1241
1241
|
}
|
|
1242
1242
|
|
|
1243
1243
|
/** Load any possible Columns Grid Presets */
|
|
1244
|
-
protected loadColumnPresetsWhenDatasetInitialized() {
|
|
1244
|
+
protected loadColumnPresetsWhenDatasetInitialized(): void {
|
|
1245
1245
|
// if user entered some Columns "presets", we need to reflect them all in the grid
|
|
1246
1246
|
if (this.slickGrid && this.gridOptions.presets && Array.isArray(this.gridOptions.presets.columns) && this.gridOptions.presets.columns.length > 0) {
|
|
1247
1247
|
const gridPresetColumns: Column<TData>[] = this.gridStateService.getAssociatedGridColumns(this.slickGrid, this.gridOptions.presets.columns);
|
|
@@ -1272,7 +1272,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
1272
1272
|
}
|
|
1273
1273
|
|
|
1274
1274
|
/** Load any possible Filters Grid Presets */
|
|
1275
|
-
protected loadFilterPresetsWhenDatasetInitialized() {
|
|
1275
|
+
protected loadFilterPresetsWhenDatasetInitialized(): void {
|
|
1276
1276
|
if (this.gridOptions && !this.customDataView) {
|
|
1277
1277
|
// if user entered some Filter "presets", we need to reflect them all in the DOM
|
|
1278
1278
|
// also note that a presets of Tree Data Toggling will also call this method because Tree Data toggling does work with data filtering
|
|
@@ -1288,7 +1288,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
1288
1288
|
* if so then also check if there's any presets and finally initialize the PaginationService
|
|
1289
1289
|
* a local grid with Pagination presets will potentially have a different total of items, we'll need to get it from the DataView and update our total
|
|
1290
1290
|
*/
|
|
1291
|
-
protected loadLocalGridPagination(dataset?: TData[]) {
|
|
1291
|
+
protected loadLocalGridPagination(dataset?: TData[]): void {
|
|
1292
1292
|
if (this.gridOptions && this._paginationOptions) {
|
|
1293
1293
|
this.totalItems = Array.isArray(dataset) ? dataset.length : 0;
|
|
1294
1294
|
if (this._paginationOptions && this.dataView?.getPagingInfo) {
|
|
@@ -1304,7 +1304,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
1304
1304
|
}
|
|
1305
1305
|
|
|
1306
1306
|
/** Load any Row Selections into the DataView that were presets by the user */
|
|
1307
|
-
protected loadRowSelectionPresetWhenExists() {
|
|
1307
|
+
protected loadRowSelectionPresetWhenExists(): void {
|
|
1308
1308
|
// if user entered some Row Selections "presets"
|
|
1309
1309
|
const presets = this.gridOptions?.presets;
|
|
1310
1310
|
const selectionModel = this.slickGrid?.getSelectionModel();
|
|
@@ -1333,7 +1333,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
1333
1333
|
}
|
|
1334
1334
|
|
|
1335
1335
|
/** Add a register a new external resource, user could also optional dispose all previous resources before pushing any new resources to the resources array list. */
|
|
1336
|
-
registerExternalResources(resources: ExternalResource[], disposePreviousResources = false) {
|
|
1336
|
+
registerExternalResources(resources: ExternalResource[], disposePreviousResources = false): void {
|
|
1337
1337
|
if (disposePreviousResources) {
|
|
1338
1338
|
this.disposeExternalResources();
|
|
1339
1339
|
}
|
|
@@ -1341,12 +1341,12 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
1341
1341
|
this.initializeExternalResources(resources);
|
|
1342
1342
|
}
|
|
1343
1343
|
|
|
1344
|
-
resetExternalResources() {
|
|
1344
|
+
resetExternalResources(): void {
|
|
1345
1345
|
this._registeredResources = [];
|
|
1346
1346
|
}
|
|
1347
1347
|
|
|
1348
1348
|
/** Pre-Register any Resource that don't require SlickGrid to be instantiated (for example RxJS Resource) */
|
|
1349
|
-
protected preRegisterResources() {
|
|
1349
|
+
protected preRegisterResources(): void {
|
|
1350
1350
|
// bind & initialize all Components/Services that were tagged as enabled
|
|
1351
1351
|
// register all services by executing their init method and providing them with the Grid object
|
|
1352
1352
|
if (Array.isArray(this._registeredResources)) {
|
|
@@ -1358,7 +1358,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
1358
1358
|
}
|
|
1359
1359
|
}
|
|
1360
1360
|
|
|
1361
|
-
protected initializeExternalResources(resources: ExternalResource[]) {
|
|
1361
|
+
protected initializeExternalResources(resources: ExternalResource[]): void {
|
|
1362
1362
|
if (Array.isArray(resources)) {
|
|
1363
1363
|
for (const resource of resources) {
|
|
1364
1364
|
if (this.slickGrid && typeof resource.init === 'function') {
|
|
@@ -1368,7 +1368,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
1368
1368
|
}
|
|
1369
1369
|
}
|
|
1370
1370
|
|
|
1371
|
-
protected registerResources() {
|
|
1371
|
+
protected registerResources(): void {
|
|
1372
1372
|
// at this point, we consider all the registered services as external services, anything else registered afterward aren't external
|
|
1373
1373
|
if (Array.isArray(this._registeredResources)) {
|
|
1374
1374
|
this.sharedService.externalRegisteredResources = this._registeredResources;
|
|
@@ -1378,7 +1378,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
1378
1378
|
this._registeredResources.push(this.gridService, this.gridStateService);
|
|
1379
1379
|
|
|
1380
1380
|
// when using Grouping/DraggableGrouping/Colspan register its Service
|
|
1381
|
-
if (this.gridOptions.createPreHeaderPanel && !this.gridOptions.enableDraggableGrouping) {
|
|
1381
|
+
if ((this.gridOptions.createPreHeaderPanel && this.gridOptions.createTopHeaderPanel) || (this.gridOptions.createPreHeaderPanel && !this.gridOptions.enableDraggableGrouping)) {
|
|
1382
1382
|
this._registeredResources.push(this.groupingService);
|
|
1383
1383
|
}
|
|
1384
1384
|
|
|
@@ -1402,7 +1402,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
1402
1402
|
}
|
|
1403
1403
|
|
|
1404
1404
|
/** Register the RxJS Resource in all necessary services which uses */
|
|
1405
|
-
protected registerRxJsResource(resource: RxJsFacade) {
|
|
1405
|
+
protected registerRxJsResource(resource: RxJsFacade): void {
|
|
1406
1406
|
this.rxjs = resource;
|
|
1407
1407
|
this.backendUtilityService.addRxJsResource(this.rxjs);
|
|
1408
1408
|
this.filterFactory.addRxJsResource(this.rxjs);
|
|
@@ -1469,7 +1469,7 @@ export class SlickVanillaGridBundle<TData = any> {
|
|
|
1469
1469
|
* When the Editor(s) has a "editor.collection" property, we'll load the async collection.
|
|
1470
1470
|
* Since this is called after the async call resolves, the pointer will not be the same as the "column" argument passed.
|
|
1471
1471
|
*/
|
|
1472
|
-
protected updateEditorCollection<U extends TData = any>(column: Column<U>, newCollection: U[]) {
|
|
1472
|
+
protected updateEditorCollection<U extends TData = any>(column: Column<U>, newCollection: U[]): void {
|
|
1473
1473
|
if (this.slickGrid && column.editor) {
|
|
1474
1474
|
column.editor.collection = newCollection;
|
|
1475
1475
|
column.editor.disabled = false;
|
|
@@ -11,11 +11,11 @@ export class UniversalContainerService implements ContainerService {
|
|
|
11
11
|
return null;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
dispose() {
|
|
14
|
+
dispose(): void {
|
|
15
15
|
this.dependencies = [];
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
registerInstance(key: string, instance: any) {
|
|
18
|
+
registerInstance(key: string, instance: any): void {
|
|
19
19
|
const dependency = this.dependencies.some(dep => dep.key === key);
|
|
20
20
|
if (!dependency) {
|
|
21
21
|
this.dependencies.push({ key, instance });
|