slickgrid-react 9.8.0 → 9.10.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/README.md +1 -1
- package/dist/components/slickgrid-react.d.ts +2 -2
- package/dist/components/slickgrid-react.js +10 -18
- package/dist/components/slickgrid-react.js.map +1 -1
- package/dist/components/slickgridReactProps.d.ts +5 -1
- package/dist/components/slickgridReactProps.js.map +1 -1
- package/dist/contexts/i18nextContext.js.map +1 -1
- package/dist/extensions/slickRowDetailView.d.ts +2 -2
- package/dist/extensions/slickRowDetailView.js +8 -7
- package/dist/extensions/slickRowDetailView.js.map +1 -1
- package/dist/global-grid-options.js.map +1 -1
- package/dist/index.d.ts +2 -3
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/models/gridOption.interface.js.map +1 -1
- package/dist/models/reactComponentOutput.interface.js.map +1 -1
- package/dist/services/singletons.js.map +1 -1
- package/dist/services/translaterI18Next.service.js.map +1 -1
- package/dist/slickgrid-config.js.map +1 -1
- package/package.json +10 -10
- package/src/components/slickgrid-react.tsx +35 -44
- package/src/components/slickgridReactProps.ts +16 -15
- package/src/contexts/i18nextContext.ts +0 -1
- package/src/extensions/slickRowDetailView.ts +13 -11
- package/src/global-grid-options.ts +1 -2
- package/src/index.ts +3 -4
- package/src/models/gridOption.interface.ts +0 -1
- package/src/models/reactComponentOutput.interface.ts +1 -1
- package/src/services/singletons.ts +0 -1
- package/src/services/translaterI18Next.service.ts +0 -1
- package/src/slickgrid-config.ts +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Slickgrid-React
|
|
1
|
+
# <a href="https://react.dev/" rel="nofollow"><img alt="React" src="https://ghiscoding.github.io/slickgrid-react-demos/assets/react-logo-DuD1bc7a.png" width="55"></a> Slickgrid-React
|
|
2
2
|
|
|
3
3
|
[](https://opensource.org/licenses/MIT)
|
|
4
4
|
[](http://www.typescriptlang.org/)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { EventPubSubService } from '@slickgrid-universal/event-pub-sub';
|
|
1
|
+
import { BackendUtilityService, CollectionService, ExtensionService, ExtensionUtility, FilterFactory, FilterService, GridEventService, GridService, GridStateService, HeaderGroupingService, PaginationService, ResizerService, SharedService, SlickDataView, SlickEventHandler, SlickGrid, SlickGroupItemMetadataProvider, SortService, TreeDataService, type BackendService, type BackendServiceApi, type BasePaginationComponent, type Column, type EventSubscription, type ExtensionList, type ExternalResource, type Metrics, type Pagination, type PaginationMetadata, type RxJsFacade } from '@slickgrid-universal/common';
|
|
3
2
|
import { SlickFooterComponent } from '@slickgrid-universal/custom-footer-component';
|
|
4
3
|
import { SlickEmptyWarningComponent } from '@slickgrid-universal/empty-warning-component';
|
|
4
|
+
import { EventPubSubService } from '@slickgrid-universal/event-pub-sub';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import type { Subscription } from 'rxjs';
|
|
7
7
|
import { I18nextContext } from '../contexts/i18nextContext.js';
|
|
@@ -1,22 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { SlickDataView, SlickEventHandler, SlickGrid,
|
|
3
|
-
// services
|
|
4
|
-
BackendUtilityService, collectionObserver, CollectionService, EventNamingStyle, ExtensionService, ExtensionUtility, FilterFactory, FilterService, GridEventService, GridService, GridStateService, HeaderGroupingService, PaginationService, ResizerService, SharedService, SlickGroupItemMetadataProvider, SlickgridConfig, SortService, TreeDataService,
|
|
5
|
-
// utilities
|
|
6
|
-
autoAddEditorFormatterToColumnsWithEditor, emptyElement, isColumnDateType, } from '@slickgrid-universal/common';
|
|
7
|
-
import { EventPubSubService } from '@slickgrid-universal/event-pub-sub';
|
|
2
|
+
import { autoAddEditorFormatterToColumnsWithEditor, BackendUtilityService, collectionObserver, CollectionService, emptyElement, EventNamingStyle, ExtensionService, ExtensionUtility, FilterFactory, FilterService, GridEventService, GridService, GridStateService, HeaderGroupingService, isColumnDateType, PaginationService, ResizerService, SharedService, SlickDataView, SlickEventHandler, SlickGrid, SlickgridConfig, SlickGroupItemMetadataProvider, SortService, TreeDataService, } from '@slickgrid-universal/common';
|
|
8
3
|
import { SlickFooterComponent } from '@slickgrid-universal/custom-footer-component';
|
|
9
4
|
import { SlickEmptyWarningComponent } from '@slickgrid-universal/empty-warning-component';
|
|
5
|
+
import { EventPubSubService } from '@slickgrid-universal/event-pub-sub';
|
|
10
6
|
import { SlickPaginationComponent } from '@slickgrid-universal/pagination-component';
|
|
11
7
|
import { deepCopy, extend } from '@slickgrid-universal/utils';
|
|
12
8
|
import { dequal } from 'dequal/lite';
|
|
13
9
|
import React from 'react';
|
|
14
10
|
import { I18nextContext } from '../contexts/i18nextContext.js';
|
|
15
11
|
import { GlobalGridOptions } from '../global-grid-options.js';
|
|
16
|
-
import { disposeAllSubscriptions } from '../services/utilities.js';
|
|
17
|
-
import { GlobalContainerService } from '../services/singletons.js';
|
|
18
12
|
import { loadReactComponentDynamically } from '../services/reactUtils.js';
|
|
13
|
+
import { GlobalContainerService } from '../services/singletons.js';
|
|
19
14
|
import { TranslaterI18NextService } from '../services/translaterI18Next.service.js';
|
|
15
|
+
import { disposeAllSubscriptions } from '../services/utilities.js';
|
|
20
16
|
const WARN_NO_PREPARSE_DATE_SIZE = 10000; // data size to warn user when pre-parse isn't enabled
|
|
21
17
|
export class SlickgridReact extends React.Component {
|
|
22
18
|
props;
|
|
@@ -123,7 +119,7 @@ export class SlickgridReact extends React.Component {
|
|
|
123
119
|
set dataset(newDataset) {
|
|
124
120
|
const prevDatasetLn = this._currentDatasetLength;
|
|
125
121
|
const isDatasetEqual = dequal(newDataset, this.dataset || []);
|
|
126
|
-
let data =
|
|
122
|
+
let data = this._options?.enableDeepCopyDatasetOnPageLoad ? deepCopy(newDataset) : newDataset;
|
|
127
123
|
// when Tree Data is enabled and we don't yet have the hierarchical dataset filled, we can force a convert+sort of the array
|
|
128
124
|
if (this.grid &&
|
|
129
125
|
this.options?.enableTreeData &&
|
|
@@ -385,12 +381,7 @@ export class SlickgridReact extends React.Component {
|
|
|
385
381
|
this.extensionService.bindDifferentExtensions();
|
|
386
382
|
this.bindDifferentHooks(this.grid, this._options, this.dataView);
|
|
387
383
|
// when it's a frozen grid, we need to keep the frozen column id for reference if we ever show/hide column from ColumnPicker/GridMenu afterward
|
|
388
|
-
|
|
389
|
-
if (frozenColumnIndex >= 0 &&
|
|
390
|
-
frozenColumnIndex <= this.sharedService.visibleColumns.length &&
|
|
391
|
-
this.sharedService.visibleColumns.length > 0) {
|
|
392
|
-
this.sharedService.frozenVisibleColumnId = this.sharedService.visibleColumns[frozenColumnIndex]?.id ?? '';
|
|
393
|
-
}
|
|
384
|
+
this.sharedService.frozenVisibleColumnId = this.grid.getFrozenColumnId();
|
|
394
385
|
// get any possible Services that user want to register
|
|
395
386
|
this.registerResources();
|
|
396
387
|
// initialize the SlickGrid grid
|
|
@@ -434,7 +425,8 @@ export class SlickgridReact extends React.Component {
|
|
|
434
425
|
}
|
|
435
426
|
}
|
|
436
427
|
if (this._dataset.length > 0) {
|
|
437
|
-
if (!this._isDatasetInitialized &&
|
|
428
|
+
if (!this._isDatasetInitialized &&
|
|
429
|
+
(this._options.enableCheckboxSelector || this._options.enableRowSelection || this._options.enableHybridSelection)) {
|
|
438
430
|
this.loadRowSelectionPresetWhenExists();
|
|
439
431
|
}
|
|
440
432
|
this.loadFilterPresetsWhenDatasetInitialized();
|
|
@@ -869,7 +861,7 @@ export class SlickgridReact extends React.Component {
|
|
|
869
861
|
if (this.grid &&
|
|
870
862
|
!isSyncGridSelectionEnabled &&
|
|
871
863
|
this.options?.backendServiceApi &&
|
|
872
|
-
(this.options.enableRowSelection || this.options.enableCheckboxSelector)) {
|
|
864
|
+
(this.options.enableRowSelection || this.options.enableHybridSelection || this.options.enableCheckboxSelector)) {
|
|
873
865
|
this.grid.setSelectedRows([]);
|
|
874
866
|
}
|
|
875
867
|
const { pageNumber, pageSize } = pagination;
|
|
@@ -1205,7 +1197,7 @@ export class SlickgridReact extends React.Component {
|
|
|
1205
1197
|
loadRowSelectionPresetWhenExists() {
|
|
1206
1198
|
// if user entered some Row Selections "presets"
|
|
1207
1199
|
const presets = this._options?.presets;
|
|
1208
|
-
const enableRowSelection = this._options && (this._options.enableCheckboxSelector || this._options.enableRowSelection);
|
|
1200
|
+
const enableRowSelection = this._options && (this._options.enableCheckboxSelector || this._options.enableRowSelection || this._options.enableHybridSelection);
|
|
1209
1201
|
if (enableRowSelection &&
|
|
1210
1202
|
this.grid?.getSelectionModel() &&
|
|
1211
1203
|
presets?.rowSelection &&
|