slickgrid-react 9.9.0 → 9.11.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 -13
- package/dist/components/slickgrid-react.js.map +1 -1
- package/dist/components/slickgridReactProps.d.ts +170 -415
- 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 -15
- package/src/components/slickgrid-react.tsx +35 -37
- package/src/components/slickgridReactProps.ts +154 -173
- 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="70"></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 &&
|
|
@@ -429,7 +425,8 @@ export class SlickgridReact extends React.Component {
|
|
|
429
425
|
}
|
|
430
426
|
}
|
|
431
427
|
if (this._dataset.length > 0) {
|
|
432
|
-
if (!this._isDatasetInitialized &&
|
|
428
|
+
if (!this._isDatasetInitialized &&
|
|
429
|
+
(this._options.enableCheckboxSelector || this._options.enableRowSelection || this._options.enableHybridSelection)) {
|
|
433
430
|
this.loadRowSelectionPresetWhenExists();
|
|
434
431
|
}
|
|
435
432
|
this.loadFilterPresetsWhenDatasetInitialized();
|
|
@@ -625,7 +622,7 @@ export class SlickgridReact extends React.Component {
|
|
|
625
622
|
if (typeof this._i18next?.on === 'function') {
|
|
626
623
|
this._i18next.on('languageChanged', (lang) => {
|
|
627
624
|
// publish event of the same name that Slickgrid-Universal uses on a language change event
|
|
628
|
-
this._eventPubSubService.publish('onLanguageChange');
|
|
625
|
+
this._eventPubSubService.publish('onLanguageChange', lang);
|
|
629
626
|
if (gridOptions.enableTranslate) {
|
|
630
627
|
this.extensionService.translateAllExtensions(lang);
|
|
631
628
|
if ((gridOptions.createPreHeaderPanel && gridOptions.createTopHeaderPanel) ||
|
|
@@ -864,7 +861,7 @@ export class SlickgridReact extends React.Component {
|
|
|
864
861
|
if (this.grid &&
|
|
865
862
|
!isSyncGridSelectionEnabled &&
|
|
866
863
|
this.options?.backendServiceApi &&
|
|
867
|
-
(this.options.enableRowSelection || this.options.enableCheckboxSelector)) {
|
|
864
|
+
(this.options.enableRowSelection || this.options.enableHybridSelection || this.options.enableCheckboxSelector)) {
|
|
868
865
|
this.grid.setSelectedRows([]);
|
|
869
866
|
}
|
|
870
867
|
const { pageNumber, pageSize } = pagination;
|
|
@@ -1200,7 +1197,7 @@ export class SlickgridReact extends React.Component {
|
|
|
1200
1197
|
loadRowSelectionPresetWhenExists() {
|
|
1201
1198
|
// if user entered some Row Selections "presets"
|
|
1202
1199
|
const presets = this._options?.presets;
|
|
1203
|
-
const enableRowSelection = this._options && (this._options.enableCheckboxSelector || this._options.enableRowSelection);
|
|
1200
|
+
const enableRowSelection = this._options && (this._options.enableCheckboxSelector || this._options.enableRowSelection || this._options.enableHybridSelection);
|
|
1204
1201
|
if (enableRowSelection &&
|
|
1205
1202
|
this.grid?.getSelectionModel() &&
|
|
1206
1203
|
presets?.rowSelection &&
|