slickgrid-react 9.6.1 → 9.8.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 CHANGED
@@ -80,7 +80,8 @@ export default function Example() {
80
80
 
81
81
  ### Troubleshooting
82
82
 
83
- This project **does not** work well with `React.StrictMode`, so please make sure to disable it to avoid getting mad at the library :P
83
+ > [!WARNING]
84
+ > This project **does not** work well with `React.StrictMode`, so please make sure to disable it to avoid getting mad at the library :P
84
85
 
85
86
  ### Versions Compatibility
86
87
 
@@ -114,7 +115,7 @@ For a complete set of working demos (40+ examples), we strongly suggest you to c
114
115
  ## Latest News & Releases
115
116
  Check out the [Releases](https://github.com/ghiscoding/slickgrid-universal/releases) section for all latest News & Releases.
116
117
 
117
- ### Tested with [Jest](https://jestjs.io/) (Unit Tests) - [Cypress](https://www.cypress.io/) (E2E Tests)
118
+ ### Tested with [Vitest](https://vitest.dev/) (Unit Tests) - [Cypress](https://www.cypress.io/) (E2E Tests)
118
119
  Slickgrid-Universal has **100%** Unit Test Coverage and all Slickgrid-React Examples are tested with [Cypress](https://www.cypress.io/) as E2E tests.
119
120
 
120
121
  ### Like it? ⭐ it
@@ -157,6 +157,7 @@ export class SlickgridReact extends React.Component {
157
157
  if (this.dataView && newHierarchicalDataset && this.grid && this.sortService?.processTreeDataInitialSort) {
158
158
  this.dataView.setItems([], this._options?.datasetIdPropertyName ?? 'id');
159
159
  this.sortService.processTreeDataInitialSort();
160
+ this.treeDataService.initHierarchicalTree();
160
161
  // 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
161
162
  // 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
162
163
  queueMicrotask(() => {
@@ -196,7 +197,7 @@ export class SlickgridReact extends React.Component {
196
197
  this.filterService = new FilterService(this.filterFactory, this._eventPubSubService, this.sharedService, this.backendUtilityService);
197
198
  this.resizerService = new ResizerService(this._eventPubSubService);
198
199
  this.sortService = new SortService(this.collectionService, this.sharedService, this._eventPubSubService, this.backendUtilityService);
199
- this.treeDataService = new TreeDataService(this._eventPubSubService, this.sharedService, this.sortService);
200
+ this.treeDataService = new TreeDataService(this._eventPubSubService, this.filterService, this.sharedService, this.sortService);
200
201
  this.paginationService = new PaginationService(this._eventPubSubService, this.sharedService, this.backendUtilityService);
201
202
  this.extensionService = new ExtensionService(this.extensionUtility, this.filterService, this._eventPubSubService, this.sharedService, this.sortService, this.treeDataService, this.props.translaterService, () => this.gridService);
202
203
  this.gridStateService = new GridStateService(this.extensionService, this.filterService, this._eventPubSubService, this.sharedService, this.sortService, this.treeDataService);
@@ -385,8 +386,10 @@ export class SlickgridReact extends React.Component {
385
386
  this.bindDifferentHooks(this.grid, this._options, this.dataView);
386
387
  // 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
387
388
  const frozenColumnIndex = this._options?.frozenColumn ?? -1;
388
- if (frozenColumnIndex >= 0 && frozenColumnIndex <= this._columns.length && this._columns.length > 0) {
389
- this.sharedService.frozenVisibleColumnId = this._columns[frozenColumnIndex]?.id ?? '';
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 ?? '';
390
393
  }
391
394
  // get any possible Services that user want to register
392
395
  this.registerResources();
@@ -1 +1 @@
1
- {"version":3,"file":"slickgrid-react.js","sourceRoot":"","sources":["../../src/components/slickgrid-react.tsx"],"names":[],"mappings":";AAAA,OAAO,EAgBL,aAAa,EACb,iBAAiB,EACjB,SAAS;AAET,WAAW;AACX,qBAAqB,EACrB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,qBAA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qBAAqB,GAAO,EAGtE,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,cAAK,SAAS,EAAC,QAAQ,YAAE,IAAI,CAAC,KAAK,CAAC,MAAM,GAAO,IACnE,CACP,CAAC;IACJ,CAAC","sourcesContent":["import {\n // interfaces/types\n type AutocompleterEditor,\n type BackendService,\n type BackendServiceApi,\n type BackendServiceOption,\n type BasePaginationComponent,\n type Column,\n type DataViewOption,\n type EventSubscription,\n type ExtensionList,\n type ExternalResource,\n type Metrics,\n type Pagination,\n type PaginationMetadata,\n type SelectEditor,\n SlickDataView,\n SlickEventHandler,\n SlickGrid,\n\n // services\n BackendUtilityService,\n collectionObserver,\n CollectionService,\n EventNamingStyle,\n ExtensionService,\n ExtensionUtility,\n FilterFactory,\n FilterService,\n GridEventService,\n GridService,\n GridStateService,\n HeaderGroupingService,\n type Observable,\n PaginationService,\n ResizerService,\n type RxJsFacade,\n SharedService,\n SlickGroupItemMetadataProvider,\n SlickgridConfig,\n SortService,\n TreeDataService,\n\n // utilities\n autoAddEditorFormatterToColumnsWithEditor,\n emptyElement,\n isColumnDateType,\n} from '@slickgrid-universal/common';\nimport { EventPubSubService } from '@slickgrid-universal/event-pub-sub';\nimport { SlickFooterComponent } from '@slickgrid-universal/custom-footer-component';\nimport { SlickEmptyWarningComponent } from '@slickgrid-universal/empty-warning-component';\nimport { SlickPaginationComponent } from '@slickgrid-universal/pagination-component';\nimport { deepCopy, extend } from '@slickgrid-universal/utils';\nimport { dequal } from 'dequal/lite';\nimport React from 'react';\nimport type { Subscription } from 'rxjs';\n\nimport { I18nextContext } from '../contexts/i18nextContext.js';\nimport { GlobalGridOptions } from '../global-grid-options.js';\nimport type { GridOption, I18Next, SlickgridReactInstance } from '../models/index.js';\nimport { disposeAllSubscriptions } from '../services/utilities.js';\nimport { GlobalContainerService } from '../services/singletons.js';\nimport { loadReactComponentDynamically } from '../services/reactUtils.js';\nimport { TranslaterI18NextService } from '../services/translaterI18Next.service.js';\nimport type { SlickgridReactProps } from './slickgridReactProps.js';\n\nconst WARN_NO_PREPARSE_DATE_SIZE = 10000; // data size to warn user when pre-parse isn't enabled\n\ninterface State {\n _options: GridOption;\n paginationService: PaginationService;\n showPagination: boolean;\n}\n\nexport class SlickgridReact<TData = any> extends React.Component<SlickgridReactProps, State> {\n // i18next has to be provided by the external user through our `I18nextProvider`\n static contextType = I18nextContext;\n declare context: React.ContextType<typeof I18nextContext>;\n protected _mounted = false;\n protected setStateValue(key: string, value: any, callback?: () => void): void {\n if ((this.state as any)?.[key] === value) {\n return;\n }\n\n if (!this._mounted) {\n this.state = this.state || {};\n (this.state as any)[key] = value;\n return;\n }\n\n this.setState(() => {\n const result: any = {};\n result[key] = value;\n return result;\n }, callback);\n }\n\n protected _columns: Column<TData>[] = [];\n protected _currentDatasetLength = 0;\n protected _dataset: any[] | null = null;\n protected _options: GridOption = {};\n protected _elm?: HTMLDivElement | null;\n protected _collectionObservers: Array<null | { disconnect: () => void }> = [];\n protected _eventHandler!: SlickEventHandler;\n protected _eventPubSubService!: EventPubSubService;\n protected _hideHeaderRowAfterPageLoad = false;\n protected _i18next: I18Next | null;\n protected _isAutosizeColsCalled = false;\n protected _isGridInitialized = false;\n protected _isDatasetInitialized = false;\n protected _isDatasetHierarchicalInitialized = false;\n protected _isPaginationInitialized = false;\n protected _isLocalGrid = true;\n protected _paginationOptions: Pagination | undefined;\n protected _registeredResources: ExternalResource[] = [];\n protected _scrollEndCalled = false;\n\n protected get options(): GridOption {\n return this._options || ({} as GridOption);\n }\n protected set options(options: GridOption) {\n let mergedOptions: GridOption;\n\n // if we already have grid options, when grid was already initialized, we'll merge with those options\n // else we'll merge with global grid options\n if (this.grid?.getOptions) {\n mergedOptions = extend<GridOption>(true, {} as GridOption, this.grid.getOptions() as GridOption, options as GridOption);\n } else {\n mergedOptions = this.mergeGridOptions(options);\n }\n if (this.sharedService?.gridOptions && this.grid?.setOptions) {\n this.sharedService.gridOptions = mergedOptions;\n this.grid.setOptions(mergedOptions, false, true); // make sure to supressColumnCheck (3rd arg) to avoid problem with changeColumnsArrangement() and custom grid view\n this.grid.reRenderColumns(true); // then call a re-render since we did supressColumnCheck on previous setOptions\n }\n this._options = mergedOptions;\n }\n\n groupItemMetadataProvider?: SlickGroupItemMetadataProvider;\n backendServiceApi: BackendServiceApi | undefined;\n metrics?: Metrics;\n showPagination = false;\n serviceList: any[] = [];\n subscriptions: Array<EventSubscription | Subscription> = [];\n\n // components\n slickEmptyWarning: SlickEmptyWarningComponent | undefined;\n slickFooter: SlickFooterComponent | undefined;\n slickPagination: BasePaginationComponent | undefined;\n\n // services\n backendUtilityService!: BackendUtilityService;\n collectionService: CollectionService;\n extensionService: ExtensionService;\n extensionUtility: ExtensionUtility;\n filterFactory!: FilterFactory;\n filterService: FilterService;\n gridEventService: GridEventService;\n gridService: GridService;\n gridStateService: GridStateService;\n groupingService!: HeaderGroupingService;\n headerGroupingService: HeaderGroupingService;\n resizerService!: ResizerService;\n rxjs?: RxJsFacade;\n sharedService: SharedService;\n sortService: SortService;\n treeDataService: TreeDataService;\n\n dataView!: SlickDataView<TData>;\n grid!: SlickGrid;\n totalItems = 0;\n\n extensions!: ExtensionList<any>;\n instances: SlickgridReactInstance | null = null;\n\n static defaultProps = {\n containerService: GlobalContainerService,\n translaterService: new TranslaterI18NextService(),\n gridId: '',\n dataset: [],\n columns: [],\n options: {},\n };\n\n get dataset(): any[] {\n return this.dataView?.getItems() || [];\n }\n set dataset(newDataset: any[]) {\n const prevDatasetLn = this._currentDatasetLength;\n const isDatasetEqual = dequal(newDataset, this.dataset || []);\n let data = !!this._options?.enableDeepCopyDatasetOnPageLoad ? deepCopy(newDataset) : newDataset;\n\n // when Tree Data is enabled and we don't yet have the hierarchical dataset filled, we can force a convert+sort of the array\n if (\n this.grid &&\n this.options?.enableTreeData &&\n Array.isArray(newDataset) &&\n (newDataset.length > 0 || newDataset.length !== prevDatasetLn || !isDatasetEqual)\n ) {\n this._isDatasetHierarchicalInitialized = false;\n data = this.sortTreeDataset(newDataset, !isDatasetEqual); // if dataset changed, then force a refresh anyway\n }\n\n this.refreshGridData(data || []);\n this._currentDatasetLength = (newDataset || []).length;\n\n // expand/autofit columns on first page load\n // we can assume that if the prevDataset was empty then we are on first load\n if (this.grid && this.options.autoFitColumnsOnFirstLoad && prevDatasetLn === 0 && !this._isAutosizeColsCalled) {\n this.grid.autosizeColumns();\n this._isAutosizeColsCalled = true;\n }\n }\n\n get datasetHierarchical(): any[] | undefined {\n return this.sharedService.hierarchicalDataset;\n }\n\n set datasetHierarchical(newHierarchicalDataset: any[] | undefined) {\n const isDatasetEqual = dequal(newHierarchicalDataset, this.sharedService?.hierarchicalDataset ?? []);\n const prevFlatDatasetLn = this._currentDatasetLength;\n if (this.sharedService) {\n this.sharedService.hierarchicalDataset = newHierarchicalDataset;\n }\n\n if (newHierarchicalDataset && this.props.columns && this.filterService?.clearFilters) {\n this.filterService.clearFilters();\n }\n\n // when a hierarchical dataset is set afterward, we can reset the flat dataset and call a tree data sort that will overwrite the flat dataset\n if (this.dataView && newHierarchicalDataset && this.grid && this.sortService?.processTreeDataInitialSort) {\n this.dataView.setItems([], this._options?.datasetIdPropertyName ?? 'id');\n this.sortService.processTreeDataInitialSort();\n\n // 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\n // 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\n queueMicrotask(() => {\n const flatDatasetLn = this.dataView?.getItemCount() ?? 0;\n if (flatDatasetLn > 0 && (flatDatasetLn !== prevFlatDatasetLn || !isDatasetEqual)) {\n this.filterService.refreshTreeDataFilters();\n }\n });\n }\n\n this._isDatasetHierarchicalInitialized = true;\n }\n\n protected get paginationService(): PaginationService {\n return this.state?.paginationService;\n }\n protected set paginationService(value: PaginationService) {\n this.setStateValue('paginationService', value);\n }\n\n constructor(public readonly props: SlickgridReactProps) {\n super(props);\n const slickgridConfig = new SlickgridConfig();\n this._eventHandler = new SlickEventHandler();\n\n this.showPagination = false;\n\n // check if the user wants to hide the header row from the start\n // we only want to do this check once in the constructor\n this._hideHeaderRowAfterPageLoad = props.options?.showHeaderRow === false;\n\n this._options = this.mergeGridOptions(props.options || {});\n\n // initialize and assign all Service Dependencies\n this._eventPubSubService = new EventPubSubService();\n this._eventPubSubService.eventNamingStyle = EventNamingStyle.camelCase;\n\n this.backendUtilityService = new BackendUtilityService();\n this.gridEventService = new GridEventService();\n this.sharedService = new SharedService();\n this.collectionService = new CollectionService(this.props.translaterService);\n this.extensionUtility = new ExtensionUtility(this.sharedService, this.backendUtilityService, this.props.translaterService);\n this.filterFactory = new FilterFactory(slickgridConfig, this.props.translaterService, this.collectionService);\n this.filterService = new FilterService(\n this.filterFactory as any,\n this._eventPubSubService,\n this.sharedService,\n this.backendUtilityService\n );\n this.resizerService = new ResizerService(this._eventPubSubService);\n this.sortService = new SortService(this.collectionService, this.sharedService, this._eventPubSubService, this.backendUtilityService);\n this.treeDataService = new TreeDataService(this._eventPubSubService, this.sharedService, this.sortService);\n this.paginationService = new PaginationService(this._eventPubSubService, this.sharedService, this.backendUtilityService);\n\n this.extensionService = new ExtensionService(\n this.extensionUtility,\n this.filterService,\n this._eventPubSubService,\n this.sharedService,\n this.sortService,\n this.treeDataService,\n this.props.translaterService,\n () => this.gridService\n );\n\n this.gridStateService = new GridStateService(\n this.extensionService,\n this.filterService,\n this._eventPubSubService,\n this.sharedService,\n this.sortService,\n this.treeDataService\n );\n this.gridService = new GridService(\n this.gridStateService,\n this.filterService,\n this._eventPubSubService,\n this.paginationService,\n this.sharedService,\n this.sortService,\n this.treeDataService\n );\n this.headerGroupingService = new HeaderGroupingService(this.extensionUtility);\n\n this.serviceList = [\n this.extensionService,\n this.filterService,\n this.gridEventService,\n this.gridService,\n this.gridStateService,\n this.headerGroupingService,\n this.paginationService,\n this.resizerService,\n this.sortService,\n this.treeDataService,\n ];\n\n if (this.props.datasetHierarchical) {\n this.sharedService.hierarchicalDataset = this.props.datasetHierarchical || [];\n }\n\n // register all Service instances in the container\n this.props.containerService.registerInstance('PubSubService', this._eventPubSubService);\n this.props.containerService.registerInstance('EventPubSubService', this._eventPubSubService);\n this.props.containerService.registerInstance('ExtensionUtility', this.extensionUtility);\n this.props.containerService.registerInstance('FilterService', this.filterService);\n this.props.containerService.registerInstance('CollectionService', this.collectionService);\n this.props.containerService.registerInstance('ExtensionService', this.extensionService);\n this.props.containerService.registerInstance('GridEventService', this.gridEventService);\n this.props.containerService.registerInstance('GridService', this.gridService);\n this.props.containerService.registerInstance('GridStateService', this.gridStateService);\n this.props.containerService.registerInstance('HeaderGroupingService', this.headerGroupingService);\n this.props.containerService.registerInstance('PaginationService', this.paginationService);\n this.props.containerService.registerInstance('ResizerService', this.resizerService);\n this.props.containerService.registerInstance('SharedService', this.sharedService);\n this.props.containerService.registerInstance('SortService', this.sortService);\n this.props.containerService.registerInstance('TranslaterService', this.props.translaterService);\n this.props.containerService.registerInstance('TreeDataService', this.treeDataService);\n }\n\n get backendService(): BackendService | undefined {\n return this.options.backendServiceApi?.service;\n }\n\n get eventHandler(): SlickEventHandler {\n return this._eventHandler;\n }\n\n get isDatasetInitialized(): boolean {\n return this._isDatasetInitialized;\n }\n set isDatasetInitialized(isInitialized: boolean) {\n this._isDatasetInitialized = isInitialized;\n }\n set isDatasetHierarchicalInitialized(isInitialized: boolean) {\n this._isDatasetHierarchicalInitialized = isInitialized;\n }\n\n get registeredResources(): ExternalResource[] {\n return this._registeredResources;\n }\n\n componentDidMount() {\n this._mounted = true;\n if (this._elm && this._eventPubSubService instanceof EventPubSubService) {\n this._eventPubSubService.elementSource = this._elm;\n\n // React doesn't play well with Custom Events & also the render is called after the constructor which brings a second problem\n // to fix both issues, we need to do the following:\n // loop through all component props and subscribe to the ones that startsWith \"on\", we'll assume that it's the custom events\n // we'll then call the assigned listener(s) when events are dispatching\n for (const prop in this.props) {\n if (prop.startsWith('on')) {\n const eventCallback: any = this.props[prop as keyof SlickgridReactProps];\n if (typeof eventCallback === 'function') {\n this.subscriptions.push(\n this._eventPubSubService.subscribe(prop, (data: unknown) => {\n const gridEventName = this._eventPubSubService.getEventNameByNamingConvention(prop, '');\n eventCallback.call(null, new CustomEvent(gridEventName, { detail: data }));\n })\n );\n }\n }\n }\n }\n\n // save resource refs to register before the grid options are merged and possibly deep copied\n // since a deep copy of grid options would lose original resource refs but we want to keep them as singleton\n this._registeredResources = this.options?.externalResources || [];\n\n this.initialization(this._eventHandler);\n this._isGridInitialized = true;\n\n // if we have a backendServiceApi and the enablePagination is undefined, we'll assume that we do want to see it, else get that defined value\n if (!this.hasBackendInfiniteScroll()) {\n this.options.enablePagination = !!(this.options.backendServiceApi && this.options.enablePagination === undefined\n ? true\n : this.options.enablePagination);\n }\n\n if (!this._isPaginationInitialized && !this.props.datasetHierarchical && this._options?.enablePagination && this._isLocalGrid) {\n this.showPagination = true;\n this.loadLocalGridPagination(this.dataset);\n }\n\n // recheck the empty warning message after grid is shown so that it works in every use case\n if (this._options?.enableEmptyDataWarningMessage) {\n const dataset = this.props.dataset || [];\n if (Array.isArray(dataset)) {\n const finalTotalCount = dataset.length;\n this.displayEmptyDataWarning(finalTotalCount < 1);\n }\n }\n\n // add dark mode CSS class when enabled\n if (this.options.darkMode) {\n this.setDarkMode(true);\n }\n\n this.suggestDateParsingWhenHelpful();\n }\n\n initialization(eventHandler: SlickEventHandler) {\n if (!this._columns) {\n throw new Error(\n 'Using `<SlickgridReact>` requires `columns` and it seems that you might have forgot to provide this missing bindable model.'\n );\n }\n\n this._options.translater = this.props.translaterService;\n this._eventHandler = eventHandler;\n this._isAutosizeColsCalled = false;\n\n // when detecting a frozen grid, we'll automatically enable the mousewheel scroll handler so that we can scroll from both left/right frozen containers\n if (\n this._options &&\n ((this._options.frozenRow !== undefined && this._options.frozenRow >= 0) ||\n (this._options.frozenColumn !== undefined && this._options.frozenColumn >= 0)) &&\n this._options.enableMouseWheelScrollHandler === undefined\n ) {\n this._options.enableMouseWheelScrollHandler = true;\n }\n\n this._eventPubSubService.eventNamingStyle = this._options?.eventNamingStyle ?? EventNamingStyle.camelCase;\n this._eventPubSubService.publish(`onBeforeGridCreate`, true);\n\n // make sure the dataset is initialized (if not it will throw an error that it cannot getLength of null)\n this._dataset ||= this.props.dataset || [];\n this._currentDatasetLength = this._dataset.length;\n this._options = this.mergeGridOptions(this._options);\n this._paginationOptions = this._options?.pagination;\n this.backendServiceApi = this._options?.backendServiceApi;\n this._isLocalGrid = !this.backendServiceApi; // considered a local grid if it doesn't have a backend service set\n\n // inject the I18Next instance when translation is enabled\n if (this._options?.enableTranslate || this._options?.i18n) {\n const importErrorMsg =\n '[Slickgrid-React] Enabling translation requires you to install I18Next in your App and use `I18nextProvider` to provide it. ' +\n 'Please make sure to first install it via \"npm install i18next react-i18next\" and then ' +\n 'use `<I18nextProvider value={i18n}><App/></I18nextProvider>` in your main index.tsx file. ' +\n 'Visit https://ghiscoding.gitbook.io/slickgrid-react/localization/localization for more info.';\n\n this._i18next = this.context; // Access the context directly\n if (this.props.translaterService && this._i18next) {\n this.props.translaterService.i18nInstance = this._i18next;\n } else {\n throw new Error(importErrorMsg);\n }\n }\n\n // unless specified, we'll create an internal postProcess callback (currently only available for GraphQL)\n if (this.options.backendServiceApi && !this.options.backendServiceApi?.disableInternalPostProcess) {\n this.createBackendApiInternalPostProcessCallback(this._options);\n }\n\n if (!this.props.customDataView) {\n const dataviewInlineFilters = (this._options.dataView && this._options.dataView.inlineFilters) || false;\n let dataViewOptions: Partial<DataViewOption> = { ...this._options.dataView, inlineFilters: dataviewInlineFilters };\n\n if (this._options.draggableGrouping || this._options.enableGrouping) {\n this.groupItemMetadataProvider = new SlickGroupItemMetadataProvider();\n this.sharedService.groupItemMetadataProvider = this.groupItemMetadataProvider;\n dataViewOptions = { ...dataViewOptions, groupItemMetadataProvider: this.groupItemMetadataProvider };\n }\n this.dataView = new SlickDataView<TData>(dataViewOptions as Partial<DataViewOption>, this._eventPubSubService);\n this._eventPubSubService.publish('onDataviewCreated', this.dataView);\n }\n\n // get any possible Services that user want to register which don't require SlickGrid to be instantiated\n // RxJS Resource is in this lot because it has to be registered before anything else and doesn't require SlickGrid to be initialized\n this.preRegisterResources();\n\n // prepare and load all SlickGrid editors, if an async editor is found then we'll also execute it.\n this._columns = this.loadSlickGridEditors(this.props.columns);\n\n // if the user wants to automatically add a Custom Editor Formatter, we need to call the auto add function again\n if (this._options.autoAddCustomEditorFormatter) {\n autoAddEditorFormatterToColumnsWithEditor(this._columns, this._options.autoAddCustomEditorFormatter);\n }\n\n // save reference for all columns before they optionally become hidden/visible\n this.sharedService.allColumns = this._columns;\n this.sharedService.visibleColumns = this._columns;\n\n // after subscribing to potential columns changed, we are ready to create these optional extensions\n // when we did find some to create (RowMove, RowDetail, RowSelections), it will automatically modify column definitions (by previous subscribe)\n this.extensionService.createExtensionsBeforeGridCreation(this._columns, this._options);\n\n // if user entered some Pinning/Frozen \"presets\", we need to apply them in the grid options\n if (this.options.presets?.pinning) {\n this.options = { ...this.options, ...this.options.presets.pinning };\n }\n\n // build SlickGrid Grid, also user might optionally pass a custom dataview (e.g. remote model)\n this.grid = new SlickGrid(\n `#${this.props.gridId}`,\n this.props.customDataView || this.dataView,\n this._columns,\n this._options,\n this._eventPubSubService\n );\n this.sharedService.dataView = this.dataView;\n this.sharedService.slickGrid = this.grid;\n this.sharedService.gridContainerElement = this._elm as HTMLDivElement;\n if (this.groupItemMetadataProvider) {\n this.grid.registerPlugin(this.groupItemMetadataProvider); // register GroupItemMetadataProvider when Grouping is enabled\n }\n\n this.extensionService.bindDifferentExtensions();\n this.bindDifferentHooks(this.grid, this._options, this.dataView);\n\n // 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\n const frozenColumnIndex = this._options?.frozenColumn ?? -1;\n if (frozenColumnIndex >= 0 && frozenColumnIndex <= this._columns.length && this._columns.length > 0) {\n this.sharedService.frozenVisibleColumnId = this._columns[frozenColumnIndex]?.id ?? '';\n }\n\n // get any possible Services that user want to register\n this.registerResources();\n\n // initialize the SlickGrid grid\n this.grid.init();\n\n // initialized the resizer service only after SlickGrid is initialized\n // if we don't we end up binding our resize to a grid element that doesn't yet exist in the DOM and the resizer service will fail silently (because it has a try/catch that unbinds the resize without throwing back)\n const gridContainerElm = this._elm;\n if (gridContainerElm) {\n this.resizerService.init(this.grid, gridContainerElm);\n }\n\n // user could show a custom footer with the data metrics (dataset length and last updated timestamp)\n if (!this._options.enablePagination && this._options.showCustomFooter && this._options.customFooterOptions && gridContainerElm) {\n this.slickFooter = new SlickFooterComponent(\n this.grid,\n this._options.customFooterOptions,\n this._eventPubSubService,\n this.props.translaterService\n );\n this.slickFooter.renderFooter(gridContainerElm as HTMLDivElement);\n }\n\n if (!this.props.customDataView && this.dataView) {\n const initialDataset = this._options?.enableTreeData ? this.sortTreeDataset(this.props.dataset) : this.props.dataset;\n if (Array.isArray(initialDataset)) {\n this.dataView.setItems(initialDataset, this._options.datasetIdPropertyName ?? 'id');\n }\n\n // if you don't want the items that are not visible (due to being filtered out or being on a different page)\n // to stay selected, pass 'false' to the second arg\n if (this.grid?.getSelectionModel() && this._options?.dataView && this._options.dataView.hasOwnProperty('syncGridSelection')) {\n // if we are using a Backend Service, we will do an extra flag check, the reason is because it might have some unintended behaviors\n // with the BackendServiceApi because technically the data in the page changes the DataView on every page change.\n let preservedRowSelectionWithBackend = false;\n if (this._options.backendServiceApi && this._options.dataView.hasOwnProperty('syncGridSelectionWithBackendService')) {\n preservedRowSelectionWithBackend = this._options.dataView.syncGridSelectionWithBackendService as boolean;\n }\n\n const syncGridSelection = this._options.dataView.syncGridSelection;\n if (typeof syncGridSelection === 'boolean') {\n let preservedRowSelection = syncGridSelection;\n if (!this._isLocalGrid) {\n // when using BackendServiceApi, we'll be using the \"syncGridSelectionWithBackendService\" flag BUT \"syncGridSelection\" must also be set to True\n preservedRowSelection = syncGridSelection && preservedRowSelectionWithBackend;\n }\n this.dataView.syncGridSelection(this.grid, preservedRowSelection);\n } else if (typeof syncGridSelection === 'object') {\n this.dataView.syncGridSelection(this.grid, syncGridSelection.preserveHidden, syncGridSelection.preserveHiddenOnSelectionChange);\n }\n }\n\n if (this._dataset.length > 0) {\n if (!this._isDatasetInitialized && (this._options.enableCheckboxSelector || this._options.enableRowSelection)) {\n this.loadRowSelectionPresetWhenExists();\n }\n this.loadFilterPresetsWhenDatasetInitialized();\n this._isDatasetInitialized = true;\n }\n }\n\n // user might want to hide the header row on page load but still have `enableFiltering: true`\n // if that is the case, we need to hide the headerRow ONLY AFTER all filters got created & dataView exist\n if (this._hideHeaderRowAfterPageLoad) {\n this.showHeaderRow(false);\n this.sharedService.hideHeaderRowAfterPageLoad = this._hideHeaderRowAfterPageLoad;\n }\n\n // publish & dispatch certain events\n this._eventPubSubService.publish(`onGridCreated`, this.grid);\n\n // after the DataView is created & updated execute some processes & dispatch some events\n if (!this.props.customDataView) {\n this.executeAfterDataviewCreated(this.grid, this._options);\n }\n\n // bind resize ONLY after the dataView is ready\n this.bindResizeHook(this.grid, this._options);\n\n // bind the Backend Service API callback functions only after the grid is initialized\n // because the preProcess() and onInit() might get triggered\n if (this._options?.backendServiceApi) {\n this.bindBackendCallbackFunctions(this._options);\n }\n\n // create the React Grid Instance with reference to all Services\n const reactElementInstance: SlickgridReactInstance = {\n element: this._elm as HTMLDivElement,\n\n // Slick Grid & DataView objects\n dataView: this.dataView,\n slickGrid: this.grid,\n\n // public methods\n dispose: this.dispose.bind(this),\n\n // return all available Services (non-singleton)\n backendService: this.backendService,\n eventPubSubService: this._eventPubSubService,\n extensionService: this.extensionService,\n filterService: this.filterService,\n gridEventService: this.gridEventService,\n gridStateService: this.gridStateService,\n gridService: this.gridService,\n headerGroupingService: this.headerGroupingService,\n paginationService: this.paginationService,\n resizerService: this.resizerService,\n sortService: this.sortService,\n treeDataService: this.treeDataService,\n };\n\n // addons (SlickGrid extra plugins/controls)\n this.extensions = this.extensionService?.extensionList;\n\n // all instances (SlickGrid, DataView & all Services)\n this.instances = reactElementInstance;\n this.setStateValue('instances', reactElementInstance);\n this._eventPubSubService.publish('onReactGridCreated', reactElementInstance);\n\n // subscribe to column definitions assignment changes\n this.observeColumns();\n }\n\n componentWillUnmount(shouldEmptyDomElementContainer = false) {\n this._eventPubSubService.publish('onBeforeGridDestroy', this.grid);\n this._eventHandler?.unsubscribeAll();\n if (typeof this._i18next?.off === 'function') {\n this._i18next.off('languageChanged');\n }\n\n // we could optionally also empty the content of the grid container DOM element\n if (shouldEmptyDomElementContainer) {\n this.emptyGridContainerElm();\n }\n\n this._collectionObservers.forEach((obs) => obs?.disconnect());\n this._eventPubSubService.publish('onAfterGridDestroyed', true);\n\n // dispose of all Services\n this.serviceList.forEach((service: any) => {\n if (service?.dispose) {\n service.dispose();\n }\n });\n this.serviceList = [];\n\n // dispose backend service when defined and a dispose method exists\n this.backendService?.dispose?.();\n\n // dispose all registered external resources\n this.disposeExternalResources();\n\n // dispose the Components\n this.slickEmptyWarning?.dispose();\n this.slickFooter?.dispose();\n this.slickPagination?.dispose();\n\n if (this.dataView) {\n if (this.dataView.setItems) {\n this.dataView.setItems([]);\n }\n if (this.dataView.destroy) {\n this.dataView.destroy();\n }\n }\n if (this.grid?.destroy) {\n this.grid.destroy(shouldEmptyDomElementContainer);\n }\n\n // also dispose of all Subscriptions\n this.subscriptions = disposeAllSubscriptions(this.subscriptions);\n\n if (this.backendServiceApi) {\n for (const prop of Object.keys(this.backendServiceApi)) {\n (this.backendServiceApi as any)[prop] = null;\n }\n this.backendServiceApi = undefined;\n }\n for (const prop of Object.keys(this.props.columns)) {\n (this.props.columns as any)[prop] = null;\n }\n for (const prop of Object.keys(this.sharedService)) {\n (this.sharedService as any)[prop] = null;\n }\n this._dataset = null;\n this._columns = [];\n }\n\n emptyGridContainerElm() {\n const gridContainerId = this._options?.gridContainerId || 'grid1';\n const gridContainerElm = document.querySelector(`#${gridContainerId}`) as HTMLDivElement;\n emptyElement(gridContainerElm);\n }\n\n dispose(shouldEmptyDomElementContainer = false) {\n this.componentWillUnmount(shouldEmptyDomElementContainer);\n }\n\n disposeExternalResources() {\n if (Array.isArray(this._registeredResources)) {\n while (this._registeredResources.length > 0) {\n const res = this._registeredResources.pop();\n if (res?.dispose) {\n res.dispose();\n }\n }\n }\n this._registeredResources = [];\n }\n\n componentDidUpdate(prevProps: SlickgridReactProps) {\n // get the grid options (order of precedence is Global Options first, then user option which could overwrite the Global options)\n if (this.props.options !== prevProps.options) {\n this._options = { ...GlobalGridOptions, ...this._options };\n }\n\n if (this.props.columns !== prevProps.columns) {\n this._columns = this.props.columns;\n this.columnsChanged(this.props.columns);\n }\n\n if (this.props.dataset !== prevProps.dataset) {\n this.dataset = this.props.dataset || prevProps.dataset;\n }\n\n if (this.props.datasetHierarchical && this.props.datasetHierarchical !== prevProps.datasetHierarchical) {\n this.datasetHierarchical = this.props.datasetHierarchical;\n }\n this.suggestDateParsingWhenHelpful();\n }\n\n columnsChanged(columns?: Column[]) {\n if (columns) {\n this._columns = columns;\n }\n if (this._isGridInitialized) {\n this.updateColumnsList(this._columns);\n }\n if (this._columns.length > 0) {\n this.copyColumnWidthsReference(this._columns);\n }\n }\n\n /**\n * Define our internal Post Process callback, it will execute internally after we get back result from the Process backend call\n * Currently ONLY available with the GraphQL Backend Service.\n * The behavior is to refresh the Dataset & Pagination without requiring the user to create his own PostProcess every time\n */\n createBackendApiInternalPostProcessCallback(gridOptions: GridOption) {\n const backendApi = gridOptions?.backendServiceApi;\n if (backendApi?.service) {\n const backendApiService = backendApi.service;\n\n // internalPostProcess only works (for now) with a GraphQL Service, so make sure it is of that type\n if (typeof backendApiService.getDatasetName === 'function') {\n backendApi.internalPostProcess = (processResult: any) => {\n const datasetName =\n backendApi && backendApiService && typeof backendApiService.getDatasetName === 'function'\n ? backendApiService.getDatasetName()\n : '';\n if (processResult?.data[datasetName]) {\n const data = processResult.data[datasetName].hasOwnProperty('nodes')\n ? (processResult as any).data[datasetName].nodes\n : (processResult as any).data[datasetName];\n const totalCount = processResult.data[datasetName].hasOwnProperty('totalCount')\n ? (processResult as any).data[datasetName].totalCount\n : (processResult as any).data[datasetName].length;\n this.refreshGridData(data, totalCount || 0);\n }\n };\n }\n }\n }\n\n bindDifferentHooks(grid: SlickGrid, gridOptions: GridOption, dataView: SlickDataView) {\n // translate some of them on first load, then on each language change\n if (gridOptions.enableTranslate) {\n this.extensionService.translateAllExtensions();\n }\n\n // on locale change, we have to manually translate the Headers, GridMenu\n if (typeof this._i18next?.on === 'function') {\n this._i18next.on('languageChanged', (lang) => {\n // publish event of the same name that Slickgrid-Universal uses on a language change event\n this._eventPubSubService.publish('onLanguageChange');\n\n if (gridOptions.enableTranslate) {\n this.extensionService.translateAllExtensions(lang);\n if (\n (gridOptions.createPreHeaderPanel && gridOptions.createTopHeaderPanel) ||\n (gridOptions.createPreHeaderPanel && !gridOptions.enableDraggableGrouping)\n ) {\n this.headerGroupingService.translateHeaderGrouping();\n }\n }\n });\n }\n\n // if user set an onInit Backend, we'll run it right away (and if so, we also need to run preProcess, internalPostProcess & postProcess)\n if (gridOptions.backendServiceApi) {\n const backendApi = gridOptions.backendServiceApi;\n\n if (backendApi?.service?.init) {\n backendApi.service.init(backendApi.options, gridOptions.pagination, this.grid, this.sharedService);\n }\n }\n\n if (dataView && grid) {\n // on cell click, mainly used with the columnDef.action callback\n this.gridEventService.bindOnBeforeEditCell(grid);\n this.gridEventService.bindOnCellChange(grid);\n this.gridEventService.bindOnClick(grid);\n\n if (dataView && grid) {\n // bind external sorting (backend) when available or default onSort (dataView)\n if (gridOptions.enableSorting) {\n // bind external sorting (backend) unless specified to use the local one\n if (gridOptions.backendServiceApi && !gridOptions.backendServiceApi.useLocalSorting) {\n this.sortService.bindBackendOnSort(grid);\n } else {\n this.sortService.bindLocalOnSort(grid);\n }\n }\n\n // bind external filter (backend) when available or default onFilter (dataView)\n if (gridOptions.enableFiltering) {\n this.filterService.init(grid);\n\n // bind external filter (backend) unless specified to use the local one\n if (gridOptions.backendServiceApi && !gridOptions.backendServiceApi.useLocalFiltering) {\n this.filterService.bindBackendOnFilter(grid);\n } else {\n this.filterService.bindLocalOnFilter(grid);\n }\n }\n\n // when column are reordered, we need to update the visibleColumn array\n this._eventHandler.subscribe(grid.onColumnsReordered, (_e, args) => {\n this.sharedService.hasColumnsReordered = true;\n this.sharedService.visibleColumns = args.impactedColumns;\n });\n\n this._eventHandler.subscribe(grid.onSetOptions, (_e, args) => {\n // add/remove dark mode CSS class when enabled\n if (args.optionsBefore.darkMode !== args.optionsAfter.darkMode && this.sharedService.gridContainerElement) {\n this.setDarkMode(args.optionsAfter.darkMode);\n }\n });\n\n // load any presets if any (after dataset is initialized)\n this.loadColumnPresetsWhenDatasetInitialized();\n this.loadFilterPresetsWhenDatasetInitialized();\n\n // When data changes in the DataView, we need to refresh the metrics and/or display a warning if the dataset is empty\n this._eventHandler.subscribe(dataView.onRowCountChanged, (_e, args) => {\n if (!gridOptions.enableRowDetailView || !Array.isArray(args.changedRows) || args.changedRows.length === args.itemCount) {\n grid.invalidate();\n } else {\n grid.invalidateRows(args.changedRows);\n grid.render();\n }\n this.handleOnItemCountChanged(dataView.getFilteredItemCount() || 0, dataView.getItemCount() || 0);\n });\n this._eventHandler.subscribe(dataView.onSetItemsCalled, (_e, args) => {\n this.sharedService.isItemsDateParsed = false;\n this.handleOnItemCountChanged(dataView.getFilteredItemCount() || 0, args.itemCount);\n\n // when user has resize by content enabled, we'll force a full width calculation since we change our entire dataset\n if (\n args.itemCount > 0 &&\n (this.options.autosizeColumnsByCellContentOnFirstLoad || this.options.enableAutoResizeColumnsByCellContent)\n ) {\n this.resizerService.resizeColumnsByCellContent(!this._options?.resizeByContentOnlyOnFirstLoad);\n }\n });\n\n if (gridOptions?.enableFiltering && !gridOptions.enableRowDetailView) {\n this._eventHandler.subscribe(dataView.onRowsChanged, (_e, { calledOnRowCountChanged, rows }) => {\n // filtering data with local dataset will not always show correctly unless we call this updateRow/render\n // also don't use \"invalidateRows\" since it destroys the entire row and as bad user experience when updating a row\n // see commit: https://github.com/ghiscoding/aurelia-slickgrid/commit/8c503a4d45fba11cbd8d8cc467fae8d177cc4f60\n if (!calledOnRowCountChanged && Array.isArray(rows)) {\n const ranges = grid.getRenderedRange();\n rows.filter((row) => row >= ranges.top && row <= ranges.bottom).forEach((row: number) => grid.updateRow(row));\n grid.render();\n }\n });\n }\n }\n }\n }\n\n bindBackendCallbackFunctions(gridOptions: GridOption) {\n const backendApi = gridOptions.backendServiceApi;\n const backendApiService = backendApi?.service;\n const serviceOptions: BackendServiceOption = backendApiService?.options || {};\n const isExecuteCommandOnInit = !serviceOptions\n ? false\n : serviceOptions && serviceOptions.hasOwnProperty('executeProcessCommandOnInit')\n ? serviceOptions['executeProcessCommandOnInit']\n : true;\n\n if (backendApiService) {\n // update backend filters (if need be) BEFORE the query runs (via the onInit command a few lines below)\n // if user entered some any \"presets\", we need to reflect them all in the grid\n if (gridOptions?.presets) {\n // Filters \"presets\"\n if (backendApiService.updateFilters && Array.isArray(gridOptions.presets.filters) && gridOptions.presets.filters.length > 0) {\n backendApiService.updateFilters(gridOptions.presets.filters, true);\n }\n // Sorters \"presets\"\n if (backendApiService.updateSorters && Array.isArray(gridOptions.presets.sorters) && gridOptions.presets.sorters.length > 0) {\n // when using multi-column sort, we can have multiple but on single sort then only grab the first sort provided\n const sortColumns = this._options?.multiColumnSort ? gridOptions.presets.sorters : gridOptions.presets.sorters.slice(0, 1);\n backendApiService.updateSorters(undefined, sortColumns);\n }\n // Pagination \"presets\"\n if (backendApiService.updatePagination && gridOptions.presets.pagination && !this.hasBackendInfiniteScroll()) {\n const { pageNumber, pageSize } = gridOptions.presets.pagination;\n backendApiService.updatePagination(pageNumber, pageSize);\n }\n } else {\n const columnFilters = this.filterService.getColumnFilters();\n if (columnFilters && backendApiService.updateFilters) {\n backendApiService.updateFilters(columnFilters, false);\n }\n }\n\n // execute onInit command when necessary\n if (backendApi && backendApiService && (backendApi.onInit || isExecuteCommandOnInit)) {\n const query = typeof backendApiService.buildQuery === 'function' ? backendApiService.buildQuery() : '';\n const process = isExecuteCommandOnInit ? (backendApi.process?.(query) ?? null) : (backendApi.onInit?.(query) ?? null);\n\n // 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\n queueMicrotask(() => {\n const backendUtilityService = this.backendUtilityService as BackendUtilityService;\n\n // keep start time & end timestamps & return it after process execution\n const startTime = new Date();\n\n // run any pre-process, if defined, for example a spinner\n if (backendApi.preProcess) {\n backendApi.preProcess();\n }\n\n // the processes can be a Promise (like Http)\n const totalItems = this._options?.pagination?.totalItems ?? 0;\n if (process instanceof Promise) {\n process\n .then((processResult: any) =>\n backendUtilityService.executeBackendProcessesCallback(startTime, processResult, backendApi, totalItems)\n )\n .catch((error) => backendUtilityService.onBackendError(error, backendApi));\n } else if (process && this.rxjs?.isObservable(process)) {\n this.subscriptions.push(\n (process as Observable<any>).subscribe(\n (processResult: any) =>\n backendUtilityService.executeBackendProcessesCallback(startTime, processResult, backendApi, totalItems),\n (error: any) => backendUtilityService.onBackendError(error, backendApi)\n )\n );\n }\n });\n }\n\n // when user enables Infinite Scroll\n if (backendApi.service.options?.infiniteScroll) {\n this.addBackendInfiniteScrollCallback();\n }\n }\n }\n\n protected addBackendInfiniteScrollCallback(): void {\n if (this.grid && this.options.backendServiceApi && this.hasBackendInfiniteScroll() && !this.options.backendServiceApi?.onScrollEnd) {\n const onScrollEnd = () => {\n this.backendUtilityService.setInfiniteScrollBottomHit(true);\n\n // even if we're not showing pagination, we still use pagination service behind the scene\n // to keep track of the scroll position and fetch next set of data (aka next page)\n // we also need a flag to know if we reached the of the dataset or not (no more pages)\n this.paginationService.goToNextPage().then((hasNext) => {\n if (!hasNext) {\n this.backendUtilityService.setInfiniteScrollBottomHit(false);\n }\n });\n };\n this.options.backendServiceApi.onScrollEnd = onScrollEnd;\n\n // subscribe to SlickGrid onScroll to determine when reaching the end of the scroll bottom position\n // run onScrollEnd() method when that happens\n this._eventHandler.subscribe(this.grid.onScroll, (_e, args) => {\n const viewportElm = args.grid.getViewportNode()!;\n if (\n ['mousewheel', 'scroll'].includes(args.triggeredBy || '') &&\n this.paginationService?.totalItems &&\n args.scrollTop > 0 &&\n Math.ceil(viewportElm.offsetHeight + args.scrollTop) >= args.scrollHeight\n ) {\n if (!this._scrollEndCalled) {\n onScrollEnd();\n this._scrollEndCalled = true;\n }\n }\n });\n\n // use postProcess to identify when scrollEnd process is finished to avoid calling the scrollEnd multiple times\n // we also need to keep a ref of the user's postProcess and call it after our own postProcess\n const orgPostProcess = this.options.backendServiceApi.postProcess;\n this.options.backendServiceApi.postProcess = (processResult: any) => {\n this._scrollEndCalled = false;\n if (orgPostProcess) {\n orgPostProcess(processResult);\n }\n };\n }\n }\n\n bindResizeHook(grid: SlickGrid, options: GridOption) {\n if (\n (options.autoFitColumnsOnFirstLoad && options.autosizeColumnsByCellContentOnFirstLoad) ||\n (options.enableAutoSizeColumns && options.enableAutoResizeColumnsByCellContent)\n ) {\n throw new Error(\n `[Slickgrid-React] 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\").`\n );\n }\n\n // auto-resize grid on browser resize\n if (options.gridHeight || options.gridWidth) {\n this.resizerService.resizeGrid(0, { height: options.gridHeight, width: options.gridWidth });\n } else {\n this.resizerService.resizeGrid();\n }\n\n // expand/autofit columns on first page load\n if (\n grid &&\n options?.enableAutoResize &&\n options.autoFitColumnsOnFirstLoad &&\n options.enableAutoSizeColumns &&\n !this._isAutosizeColsCalled\n ) {\n grid.autosizeColumns();\n this._isAutosizeColsCalled = true;\n }\n }\n\n executeAfterDataviewCreated(_grid: SlickGrid, gridOptions: GridOption) {\n // if user entered some Sort \"presets\", we need to reflect them all in the DOM\n if (gridOptions.enableSorting) {\n if (gridOptions.presets && Array.isArray(gridOptions.presets.sorters)) {\n // when using multi-column sort, we can have multiple but on single sort then only grab the first sort provided\n const sortColumns = this._options?.multiColumnSort ? gridOptions.presets.sorters : gridOptions.presets.sorters.slice(0, 1);\n this.sortService.loadGridSorters(sortColumns);\n }\n }\n }\n\n /**\n * On a Pagination changed, we will trigger a Grid State changed with the new pagination info\n * Also if we use Row Selection or the Checkbox Selector with a Backend Service (Odata, GraphQL), we need to reset any selection\n */\n paginationChanged(pagination: PaginationMetadata) {\n const isSyncGridSelectionEnabled = this.gridStateService?.needToPreserveRowSelection() ?? false;\n if (\n this.grid &&\n !isSyncGridSelectionEnabled &&\n this.options?.backendServiceApi &&\n (this.options.enableRowSelection || this.options.enableCheckboxSelector)\n ) {\n this.grid.setSelectedRows([]);\n }\n const { pageNumber, pageSize } = pagination;\n if (this.sharedService) {\n if (pageSize !== undefined && pageNumber !== undefined) {\n this.sharedService.currentPagination = { pageNumber, pageSize };\n }\n }\n this._eventPubSubService.publish('onGridStateChanged', {\n change: { newValues: { pageNumber, pageSize }, type: 'pagination' },\n gridState: this.gridStateService.getCurrentGridState(),\n });\n }\n\n paginationOptionsChanged(newPaginationOptions: Pagination) {\n if (newPaginationOptions && this._paginationOptions) {\n this._paginationOptions = { ...this._paginationOptions, ...newPaginationOptions };\n } else {\n this._paginationOptions = newPaginationOptions;\n }\n if (this._options) {\n this._options.pagination = this._paginationOptions;\n this.paginationService.updateTotalItems(newPaginationOptions?.totalItems ?? 0, true);\n }\n }\n\n /**\n * When dataset changes, we need to refresh the entire grid UI & possibly resize it as well\n * @param dataset\n */\n refreshGridData(dataset: any[], totalCount?: number) {\n // local grid, check if we need to show the Pagination\n // if so then also check if there's any presets and finally initialize the PaginationService\n // 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\n if (this.grid && this._options) {\n if (this._options?.enablePagination && this._isLocalGrid) {\n this.showPagination = true;\n this.loadLocalGridPagination(dataset);\n }\n\n if (this._options?.enableEmptyDataWarningMessage && Array.isArray(dataset)) {\n const finalTotalCount = totalCount || dataset.length;\n this.displayEmptyDataWarning(finalTotalCount < 1);\n }\n\n if (Array.isArray(dataset) && this.grid && this.dataView?.setItems) {\n this.dataView.setItems(dataset, this._options.datasetIdPropertyName ?? 'id');\n if (!this._options.backendServiceApi && !this._options.enableTreeData) {\n this.dataView.reSort();\n }\n\n if (dataset.length > 0) {\n if (!this._isDatasetInitialized) {\n this.loadFilterPresetsWhenDatasetInitialized();\n\n if (this._options.enableCheckboxSelector) {\n this.loadRowSelectionPresetWhenExists();\n }\n }\n this._isDatasetInitialized = true;\n }\n\n // display the Pagination component only after calling this refresh data first, we call it here so that if we preset pagination page number it will be shown correctly\n this.showPagination = !!(\n this._options &&\n (this._options.enablePagination || (this._options.backendServiceApi && this._options.enablePagination === undefined))\n );\n if (this._paginationOptions && this._options?.pagination && this._options?.backendServiceApi) {\n const paginationOptions = this.setPaginationOptionsWhenPresetDefined(this._options, this._paginationOptions);\n\n // when we have a totalCount use it, else we'll take it from the pagination object\n // only update the total items if it's different to avoid refreshing the UI\n const totalRecords = totalCount !== undefined ? totalCount : this._options?.pagination?.totalItems;\n if (totalRecords !== undefined && totalRecords !== this.totalItems) {\n this.totalItems = +totalRecords;\n }\n // initialize the Pagination Service with new pagination options (which might have presets)\n if (!this._isPaginationInitialized) {\n this.initializePaginationService(paginationOptions);\n } else {\n // update the pagination service with the new total\n this.paginationService.updateTotalItems(this.totalItems);\n }\n }\n\n // resize the grid inside a slight timeout, in case other DOM element changed prior to the resize (like a filter/pagination changed)\n if (this.grid && this._options.enableAutoResize) {\n const delay = this._options.autoResize && this._options.autoResize.delay;\n this.resizerService.resizeGrid(delay || 10);\n }\n }\n }\n }\n\n /**\n * Show the filter row displayed on first row, we can optionally pass false to hide it.\n * @param showing\n */\n showHeaderRow(showing = true) {\n this.grid.setHeaderRowVisibility(showing);\n if (showing === true && this._isGridInitialized) {\n this.grid.setColumns(this.props.columns);\n }\n return showing;\n }\n\n /**\n * Check if there's any Pagination Presets defined in the Grid Options,\n * if there are then load them in the paginationOptions object\n */\n protected setPaginationOptionsWhenPresetDefined(gridOptions: GridOption, paginationOptions: Pagination): Pagination {\n if (gridOptions.presets?.pagination && gridOptions.pagination) {\n if (this.hasBackendInfiniteScroll()) {\n console.warn('[Slickgrid-React] `presets.pagination` is not supported with Infinite Scroll, reverting to first page.');\n } else {\n paginationOptions.pageSize = gridOptions.presets.pagination.pageSize;\n paginationOptions.pageNumber = gridOptions.presets.pagination.pageNumber;\n }\n }\n return paginationOptions;\n }\n\n setDarkMode(dark = false) {\n this.sharedService.gridContainerElement?.classList.toggle('slick-dark-mode', dark);\n }\n\n /**\n * Dynamically change or update the column definitions list.\n * We will re-render the grid so that the new header and data shows up correctly.\n * If using i18n, we also need to trigger a re-translate of the column headers\n */\n updateColumnsList(newColumns: Column<TData>[]) {\n if (this.grid && this._options && Array.isArray(newColumns)) {\n // map the Editor model to editorClass and load editor collectionAsync\n newColumns = this.loadSlickGridEditors(newColumns);\n\n // if the user wants to automatically add a Custom Editor Formatter, we need to call the auto add function again\n if (this._options.autoAddCustomEditorFormatter) {\n autoAddEditorFormatterToColumnsWithEditor(newColumns, this._options.autoAddCustomEditorFormatter);\n }\n\n if (this._options.enableTranslate) {\n this.extensionService.translateColumnHeaders(undefined, newColumns);\n } else {\n this.extensionService.renderColumnHeaders(newColumns, true);\n }\n\n if (this._options?.enableAutoSizeColumns) {\n this.grid.autosizeColumns();\n } else if (this._options?.enableAutoResizeColumnsByCellContent && this.resizerService?.resizeColumnsByCellContent) {\n this.resizerService.resizeColumnsByCellContent();\n }\n }\n }\n\n //\n // protected functions\n // ------------------\n\n /**\n * assignment changes are not triggering on the column definitions, for that\n * we can use our internal array observer for any changes done via (push, pop, shift, ...)\n */\n protected observeColumns(): void {\n this._collectionObservers.push(collectionObserver(this._columns, this.columnsChanged.bind(this)));\n }\n\n /**\n * Loop through all column definitions and copy the original optional `width` properties optionally provided by the user.\n * We will use this when doing a resize by cell content, if user provided a `width` it won't override it.\n */\n protected copyColumnWidthsReference(columns: Column<TData>[]) {\n columns.forEach((col) => (col.originalWidth = col.width));\n }\n\n protected displayEmptyDataWarning(showWarning = true) {\n this.slickEmptyWarning?.showEmptyDataMessage(showWarning);\n }\n\n /** When data changes in the DataView, we'll refresh the metrics and/or display a warning if the dataset is empty */\n protected handleOnItemCountChanged(currentPageRowItemCount: number, totalItemCount: number) {\n this._currentDatasetLength = totalItemCount;\n this.metrics = {\n startTime: new Date(),\n endTime: new Date(),\n itemCount: currentPageRowItemCount,\n totalItemCount,\n };\n // if custom footer is enabled, then we'll update its metrics\n if (this.slickFooter) {\n this.slickFooter.metrics = this.metrics;\n }\n\n // when using local (in-memory) dataset, we'll display a warning message when filtered data is empty\n if (this._isLocalGrid && this._options?.enableEmptyDataWarningMessage) {\n this.displayEmptyDataWarning(currentPageRowItemCount === 0);\n }\n\n // when autoResize.autoHeight is enabled, we'll want to call a resize\n if (this._options.enableAutoResize && this.resizerService.isAutoHeightEnabled && currentPageRowItemCount > 0) {\n this.resizerService.resizeGrid();\n }\n }\n\n /** Initialize the Pagination Service once */\n protected initializePaginationService(paginationOptions: Pagination) {\n if (this.grid && this.options) {\n this.paginationService.totalItems = this.totalItems;\n this.paginationService.init(this.grid, paginationOptions, this.backendServiceApi);\n this.subscriptions.push(\n this._eventPubSubService.subscribe<PaginationMetadata>('onPaginationChanged', (paginationChanges) =>\n this.paginationChanged(paginationChanges)\n ),\n this._eventPubSubService.subscribe<PaginationMetadata>('onPaginationOptionsChanged', (paginationChanges) =>\n this.paginationOptionsChanged(paginationChanges)\n ),\n this._eventPubSubService.subscribe<{ visible: boolean }>('onPaginationVisibilityChanged', (visibility: { visible: boolean }) => {\n this.showPagination = visibility?.visible ?? false;\n if (this.options?.backendServiceApi) {\n this.backendUtilityService?.refreshBackendDataset(this.options);\n }\n this.renderPagination(this.showPagination);\n })\n );\n\n // also initialize (render) the pagination component\n this.renderPagination();\n this._isPaginationInitialized = true;\n }\n }\n\n /**\n * Render (or dispose) the Pagination Component, user can optionally provide False (to not show it) which will in term dispose of the Pagination,\n * also while disposing we can choose to omit the disposable of the Pagination Service (if we are simply toggling the Pagination, we want to keep the Service alive)\n * @param {Boolean} showPagination - show (new render) or not (dispose) the Pagination\n * @param {Boolean} shouldDisposePaginationService - when disposing the Pagination, do we also want to dispose of the Pagination Service? (defaults to True)\n */\n protected async renderPagination(showPagination = true) {\n if (this.grid && this._options?.enablePagination && !this._isPaginationInitialized && showPagination) {\n if (this.options.customPaginationComponent) {\n const paginationContainer = document.createElement('section');\n this._elm!.appendChild(paginationContainer);\n const { component } = await loadReactComponentDynamically<BasePaginationComponent>(\n this.options.customPaginationComponent,\n paginationContainer\n );\n this.slickPagination = component;\n } else {\n this.slickPagination = new SlickPaginationComponent();\n }\n\n if (this.slickPagination) {\n this.slickPagination.init(this.grid, this.paginationService, this._eventPubSubService, this.props.translaterService);\n this.slickPagination.renderPagination(this._elm as HTMLDivElement);\n this._isPaginationInitialized = true;\n }\n } else if (!showPagination) {\n this.slickPagination?.dispose();\n this._isPaginationInitialized = false;\n }\n }\n\n /** Load the Editor Collection asynchronously and replace the \"collection\" property when Promise resolves */\n protected loadEditorCollectionAsync(column: Column) {\n if (column?.editor) {\n const collectionAsync = column.editor.collectionAsync;\n column.editor.disabled = true; // disable the Editor DOM element, we'll re-enable it after receiving the collection with \"updateEditorCollection()\"\n\n if (collectionAsync instanceof Promise) {\n // wait for the \"collectionAsync\", once resolved we will save it into the \"collection\"\n // the collectionAsync can be of 3 types Fetch, Promise or RxJS when available\n collectionAsync.then((response: any | any[]) => {\n if (Array.isArray(response)) {\n this.updateEditorCollection(column, response); // from Promise\n } else if (response instanceof Response && typeof response.json === 'function') {\n if (response.bodyUsed) {\n console.warn(\n `[SlickGrid-React] The response body passed to collectionAsync was already read.` +\n `Either pass the dataset from the Response or clone the response first using response.clone()`\n );\n } else {\n // from Fetch\n (response as Response).json().then((data) => this.updateEditorCollection(column, data));\n }\n } else if (response?.content) {\n this.updateEditorCollection(column, response.content); // from http-client\n }\n });\n } else if (this.rxjs?.isObservable(collectionAsync)) {\n // 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\n queueMicrotask(() => {\n this.subscriptions.push(\n (collectionAsync as Observable<any>).subscribe((resolvedCollection) => this.updateEditorCollection(column, resolvedCollection))\n );\n });\n }\n }\n }\n\n protected insertDynamicPresetColumns(columnId: string, gridPresetColumns: Column<TData>[]) {\n if (this._columns) {\n const columnPosition = this._columns.findIndex((c) => c.id === columnId);\n if (columnPosition >= 0) {\n const dynColumn = this._columns[columnPosition];\n if (dynColumn?.id === columnId && !gridPresetColumns.some((c) => c.id === columnId)) {\n columnPosition > 0 ? gridPresetColumns.splice(columnPosition, 0, dynColumn) : gridPresetColumns.unshift(dynColumn);\n }\n }\n }\n }\n\n /** Load any possible Columns Grid Presets */\n protected loadColumnPresetsWhenDatasetInitialized() {\n // if user entered some Columns \"presets\", we need to reflect them all in the grid\n if (this.grid && this.options.presets && Array.isArray(this.options.presets.columns) && this.options.presets.columns.length > 0) {\n const gridPresetColumns: Column<TData>[] = this.gridStateService.getAssociatedGridColumns(this.grid, this.options.presets.columns);\n if (gridPresetColumns && Array.isArray(gridPresetColumns) && gridPresetColumns.length > 0 && Array.isArray(this._columns)) {\n // make sure that the dynamic columns are included in presets (1.Row Move, 2. Row Selection, 3. Row Detail)\n if (this.options.enableRowMoveManager) {\n const rmmColId = this.options?.rowMoveManager?.columnId ?? '_move';\n this.insertDynamicPresetColumns(rmmColId, gridPresetColumns);\n }\n if (this.options.enableCheckboxSelector) {\n const chkColId = this.options?.checkboxSelector?.columnId ?? '_checkbox_selector';\n this.insertDynamicPresetColumns(chkColId, gridPresetColumns);\n }\n if (this.options.enableRowDetailView) {\n const rdvColId = this.options?.rowDetailView?.columnId ?? '_detail_selector';\n this.insertDynamicPresetColumns(rdvColId, gridPresetColumns);\n }\n\n // keep copy the original optional `width` properties optionally provided by the user.\n // We will use this when doing a resize by cell content, if user provided a `width` it won't override it.\n gridPresetColumns.forEach((col) => (col.originalWidth = col.width));\n\n // finally set the new presets columns (including checkbox selector if need be)\n this.grid.setColumns(gridPresetColumns);\n this.sharedService.visibleColumns = gridPresetColumns;\n }\n }\n }\n\n /** Load any possible Filters Grid Presets */\n protected loadFilterPresetsWhenDatasetInitialized() {\n if (this._options && !this.props.customDataView) {\n // if user entered some Filter \"presets\", we need to reflect them all in the DOM\n if (\n this._options.presets &&\n (Array.isArray(this._options.presets.filters) || Array.isArray(this._options.presets?.treeData?.toggledItems))\n ) {\n this.filterService.populateColumnFilterSearchTermPresets(this._options.presets?.filters || []);\n }\n }\n }\n\n /**\n * local grid, check if we need to show the Pagination\n * if so then also check if there's any presets and finally initialize the PaginationService\n * 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\n */\n protected loadLocalGridPagination(dataset?: any[]) {\n if (this._options && this._paginationOptions) {\n this.totalItems = Array.isArray(dataset) ? dataset.length : 0;\n if (this._paginationOptions && this.dataView?.getPagingInfo) {\n const slickPagingInfo = this.dataView.getPagingInfo();\n if (slickPagingInfo?.hasOwnProperty('totalRows') && this._paginationOptions.totalItems !== slickPagingInfo.totalRows) {\n this.totalItems = slickPagingInfo.totalRows || 0;\n }\n }\n this._paginationOptions.totalItems = this.totalItems;\n const paginationOptions = this.setPaginationOptionsWhenPresetDefined(this._options, this._paginationOptions);\n this.initializePaginationService(paginationOptions);\n }\n }\n\n /** Load any Row Selections into the DataView that were presets by the user */\n protected loadRowSelectionPresetWhenExists() {\n // if user entered some Row Selections \"presets\"\n const presets = this._options?.presets;\n const enableRowSelection = this._options && (this._options.enableCheckboxSelector || this._options.enableRowSelection);\n if (\n enableRowSelection &&\n this.grid?.getSelectionModel() &&\n presets?.rowSelection &&\n (Array.isArray(presets.rowSelection.gridRowIndexes) || Array.isArray(presets.rowSelection.dataContextIds))\n ) {\n let dataContextIds = presets.rowSelection.dataContextIds;\n let gridRowIndexes = presets.rowSelection.gridRowIndexes;\n\n // maps the IDs to the Grid Rows and vice versa, the \"dataContextIds\" has precedence over the other\n if (Array.isArray(dataContextIds) && dataContextIds.length > 0) {\n gridRowIndexes = this.dataView.mapIdsToRows(dataContextIds) || [];\n } else if (Array.isArray(gridRowIndexes) && gridRowIndexes.length > 0) {\n dataContextIds = this.dataView.mapRowsToIds(gridRowIndexes) || [];\n }\n\n // apply row selection when defined as grid presets\n if (this.grid && Array.isArray(gridRowIndexes)) {\n this.grid.setSelectedRows(gridRowIndexes);\n this.dataView!.setSelectedIds(dataContextIds || [], {\n isRowBeingAdded: true,\n shouldTriggerEvent: false, // do not trigger when presetting the grid\n applyRowSelectionToGrid: true,\n });\n }\n }\n }\n\n hasBackendInfiniteScroll(gridOptions?: GridOption): boolean {\n return !!(gridOptions || this.options).backendServiceApi?.service.options?.infiniteScroll;\n }\n\n protected mergeGridOptions(gridOptions: GridOption): GridOption {\n // use extend to deep merge & copy to avoid immutable properties being changed in GlobalGridOptions after a route change\n const options = extend(true, {}, GlobalGridOptions, gridOptions) as GridOption;\n\n options.gridId = this.props.gridId;\n options.gridContainerId = `slickGridContainer-${this.props.gridId}`;\n\n // also make sure to show the header row if user have enabled filtering\n if (options.enableFiltering && !options.showHeaderRow) {\n options.showHeaderRow = options.enableFiltering;\n }\n\n // using copy extend to do a deep clone has an unwanted side on objects and pageSizes but ES6 spread has other worst side effects\n // so we will just overwrite the pageSizes when needed, this is the only one causing issues so far.\n // On a deep extend, Object and Array are extended, but object wrappers on primitive types such as String, Boolean, and Number are not.\n if (\n options?.pagination &&\n (gridOptions.enablePagination || gridOptions.backendServiceApi) &&\n gridOptions.pagination &&\n Array.isArray(gridOptions.pagination.pageSizes)\n ) {\n options.pagination.pageSizes = gridOptions.pagination.pageSizes;\n }\n\n // when we use Pagination on Local Grid, it doesn't seem to work without enableFiltering\n // so we'll enable the filtering but we'll keep the header row hidden\n if (this.sharedService && !options.enableFiltering && options.enablePagination && this._isLocalGrid) {\n options.enableFiltering = true;\n options.showHeaderRow = false;\n this._hideHeaderRowAfterPageLoad = true;\n this.sharedService.hideHeaderRowAfterPageLoad = true;\n }\n\n return options;\n }\n\n /** 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. */\n registerExternalResources(resources: ExternalResource[], disposePreviousResources = false) {\n if (disposePreviousResources) {\n this.disposeExternalResources();\n }\n resources.forEach((res) => this._registeredResources.push(res));\n this.initializeExternalResources(resources);\n }\n\n resetExternalResources() {\n this._registeredResources = [];\n }\n\n /** Pre-Register any Resource that don't require SlickGrid to be instantiated (for example RxJS Resource & RowDetail) */\n protected preRegisterResources() {\n this._registeredResources = this.options.externalResources || [];\n\n // bind & initialize all Components/Services that were tagged as enabled\n // register all services by executing their init method and providing them with the Grid object\n if (Array.isArray(this._registeredResources)) {\n for (const resource of this._registeredResources) {\n if (resource?.className === 'RxJsResource') {\n this.registerRxJsResource(resource as RxJsFacade);\n }\n }\n }\n }\n\n protected initializeExternalResources(resources: ExternalResource[]) {\n if (Array.isArray(resources)) {\n for (const resource of resources) {\n if (this.grid && typeof resource.init === 'function') {\n resource.init(this.grid, this.props.containerService);\n }\n }\n }\n }\n\n protected registerResources() {\n // at this point, we consider all the registered services as external services, anything else registered afterward aren't external\n if (Array.isArray(this._registeredResources)) {\n this.sharedService.externalRegisteredResources = this._registeredResources;\n }\n\n // push all other Services that we want to be registered\n this._registeredResources.push(this.gridService, this.gridStateService);\n\n // when using Grouping/DraggableGrouping/Colspan register its Service\n if (\n (this.options.createPreHeaderPanel && this.options.createTopHeaderPanel) ||\n (this.options.createPreHeaderPanel && !this.options.enableDraggableGrouping)\n ) {\n this._registeredResources.push(this.headerGroupingService);\n }\n\n // when using Tree Data View, register its Service\n if (this.options.enableTreeData) {\n this._registeredResources.push(this.treeDataService);\n }\n\n // when user enables translation, we need to translate Headers on first pass & subsequently in the bindDifferentHooks\n if (this.options.enableTranslate) {\n this.extensionService.translateColumnHeaders();\n }\n\n // also initialize (render) the empty warning component\n this.slickEmptyWarning = new SlickEmptyWarningComponent();\n this._registeredResources.push(this.slickEmptyWarning);\n\n // bind & initialize all Components/Services that were tagged as enabled\n // register all services by executing their init method and providing them with the Grid object\n this.initializeExternalResources(this._registeredResources);\n }\n\n /** Register the RxJS Resource in all necessary services which uses */\n protected registerRxJsResource(resource: RxJsFacade) {\n this.rxjs = resource;\n this.backendUtilityService.addRxJsResource(this.rxjs);\n this.filterFactory.addRxJsResource(this.rxjs);\n this.filterService.addRxJsResource(this.rxjs);\n this.sortService.addRxJsResource(this.rxjs);\n this.paginationService.addRxJsResource(this.rxjs);\n this.props.containerService.registerInstance('RxJsResource', this.rxjs);\n }\n\n /**\n * Takes a flat dataset with parent/child relationship, sort it (via its tree structure) and return the sorted flat array\n * @param {Array<Object>} flatDatasetInput - flat dataset input\n * @param {Boolean} forceGridRefresh - optionally force a full grid refresh\n * @returns {Array<Object>} sort flat parent/child dataset\n */\n protected sortTreeDataset<U>(flatDatasetInput: U[], forceGridRefresh = false): U[] {\n const prevDatasetLn = this._currentDatasetLength;\n let sortedDatasetResult;\n let flatDatasetOutput: any[] = [];\n\n // if the hierarchical dataset was already initialized then no need to re-convert it, we can use it directly from the shared service ref\n if (this._isDatasetHierarchicalInitialized && this.datasetHierarchical) {\n sortedDatasetResult = this.treeDataService.sortHierarchicalDataset(this.datasetHierarchical);\n flatDatasetOutput = sortedDatasetResult.flat;\n } else if (this._options && Array.isArray(flatDatasetInput) && flatDatasetInput.length > 0) {\n // we need to first convert the flat dataset to a hierarchical dataset and then sort it\n // we'll also add props, by mutation, required by the TreeDataService on the flat array like `__hasChildren`, `parentId` and anything else to work properly\n sortedDatasetResult = this.treeDataService.convertFlatParentChildToTreeDatasetAndSort(flatDatasetInput, this._columns, this._options);\n this.sharedService.hierarchicalDataset = sortedDatasetResult.hierarchical;\n flatDatasetOutput = sortedDatasetResult.flat;\n }\n\n // if we add/remove item(s) from the dataset, we need to also refresh our tree data filters\n if (flatDatasetInput.length > 0 && (forceGridRefresh || flatDatasetInput.length !== prevDatasetLn)) {\n this.filterService.refreshTreeDataFilters(flatDatasetOutput);\n }\n\n return flatDatasetOutput;\n }\n\n /** Prepare and load all SlickGrid editors, if an async editor is found then we'll also execute it. */\n protected loadSlickGridEditors(columns: Column<TData>[]): Column<TData>[] {\n if (columns.some((col) => `${col?.id}`.includes('.'))) {\n console.warn(\n '[Slickgrid-React] Make sure that none of your Column Definition \"id\" property includes a dot in its name because that will cause some problems with the Editors. For example if your column definition \"field\" property is \"user.firstName\" then use \"firstName\" as the column \"id\".'\n );\n }\n\n return columns.map((column: Column | any) => {\n if (column) {\n // on every Editor which have a \"collection\" or a \"collectionAsync\"\n if (column.editor?.collectionAsync) {\n this.loadEditorCollectionAsync(column);\n }\n return { ...column, editorClass: column.editor?.model };\n }\n });\n }\n\n protected suggestDateParsingWhenHelpful() {\n if (\n this.dataView?.getItemCount() > WARN_NO_PREPARSE_DATE_SIZE &&\n !this.options.silenceWarnings &&\n !this.options.preParseDateColumns &&\n this.grid.getColumns().some((c) => isColumnDateType(c.type))\n ) {\n console.warn(\n '[Slickgrid-React] For getting better perf, we suggest you enable the `preParseDateColumns` grid option, ' +\n 'for more info visit => https://ghiscoding.gitbook.io/slickgrid-react/column-functionalities/sorting#pre-parse-date-columns-for-better-perf'\n );\n }\n }\n\n /**\n * When the Editor(s) has a \"editor.collection\" property, we'll load the async collection.\n * Since this is called after the async call resolves, the pointer will not be the same as the \"column\" argument passed.\n */\n protected updateEditorCollection<U extends TData = any>(column: Column<U>, newCollection: U[]) {\n if (this.grid && column.editor) {\n column.editor.collection = newCollection;\n column.editor.disabled = false;\n\n // get current Editor, remove it from the DOM then re-enable it and re-render it with the new collection.\n const currentEditor = this.grid.getCellEditor() as AutocompleterEditor | SelectEditor;\n if (currentEditor?.disable && currentEditor?.renderDomElement) {\n currentEditor.destroy();\n currentEditor.disable(false);\n currentEditor.renderDomElement(newCollection);\n }\n }\n }\n\n render() {\n return (\n <div\n id={`slickGridContainer-${this.props.gridId}`}\n className=\"grid-pane\"\n ref={(elm) => {\n this._elm = elm as HTMLDivElement;\n }}\n >\n {/* <!-- Header slot if you need to create a complex custom header --> */}\n {this.props.header && <div className=\"header\">{this.props.header}</div>}\n\n <div id={`${this.props.gridId}`} className=\"slickgrid-container\"></div>\n\n {/* <!--Footer slot if you need to create a complex custom footer-- > */}\n {this.props.footer && <div className=\"footer\">{this.props.footer}</div>}\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"slickgrid-react.js","sourceRoot":"","sources":["../../src/components/slickgrid-react.tsx"],"names":[],"mappings":";AAAA,OAAO,EAgBL,aAAa,EACb,iBAAiB,EACjB,SAAS;AAET,WAAW;AACX,qBAAqB,EACrB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,qBAAqB,EAErB,iBAAiB,EACjB,cAAc,EAEd,aAAa,EACb,8BAA8B,EAC9B,eAAe,EACf,WAAW,EACX,eAAe;AAEf,YAAY;AACZ,yCAAyC,EACzC,YAAY,EACZ,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,8CAA8C,CAAC;AACpF,OAAO,EAAE,0BAA0B,EAAE,MAAM,8CAA8C,CAAC;AAC1F,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AACrF,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,0B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AwC,CAAC;YACtF,IAAI,aAAa,EAAE,OAAO,IAAI,aAAa,EAAE,gBAAgB,EAAE,CAAC;gBAC9D,aAAa,CAAC,OAAO,EAAE,CAAC;gBACxB,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;gBAC7B,aAAa,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;YAChD,CAAC;QACH,CAAC;IACH,CAAC;IAED,MAAM;QACJ,OAAO,CACL,eACE,EAAE,EAAE,sBAAsB,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,EAC7C,SAAS,EAAC,WAAW,EACrB,GAAG,EAAE,CAAC,GAAG,EAAE,EAAE;gBACX,IAAI,CAAC,IAAI,GAAG,GAAqB,CAAC;YACpC,CAAC,aAGA,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,cAAK,SAAS,EAAC,QAAQ,YAAE,IAAI,CAAC,KAAK,CAAC,MAAM,GAAO,EAEvE,cAAK,EAAE,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,SAAS,EAAC,qBAAqB,GAAO,EAGtE,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,cAAK,SAAS,EAAC,QAAQ,YAAE,IAAI,CAAC,KAAK,CAAC,MAAM,GAAO,IACnE,CACP,CAAC;IACJ,CAAC","sourcesContent":["import {\n // interfaces/types\n type AutocompleterEditor,\n type BackendService,\n type BackendServiceApi,\n type BackendServiceOption,\n type BasePaginationComponent,\n type Column,\n type DataViewOption,\n type EventSubscription,\n type ExtensionList,\n type ExternalResource,\n type Metrics,\n type Pagination,\n type PaginationMetadata,\n type SelectEditor,\n SlickDataView,\n SlickEventHandler,\n SlickGrid,\n\n // services\n BackendUtilityService,\n collectionObserver,\n CollectionService,\n EventNamingStyle,\n ExtensionService,\n ExtensionUtility,\n FilterFactory,\n FilterService,\n GridEventService,\n GridService,\n GridStateService,\n HeaderGroupingService,\n type Observable,\n PaginationService,\n ResizerService,\n type RxJsFacade,\n SharedService,\n SlickGroupItemMetadataProvider,\n SlickgridConfig,\n SortService,\n TreeDataService,\n\n // utilities\n autoAddEditorFormatterToColumnsWithEditor,\n emptyElement,\n isColumnDateType,\n} from '@slickgrid-universal/common';\nimport { EventPubSubService } from '@slickgrid-universal/event-pub-sub';\nimport { SlickFooterComponent } from '@slickgrid-universal/custom-footer-component';\nimport { SlickEmptyWarningComponent } from '@slickgrid-universal/empty-warning-component';\nimport { SlickPaginationComponent } from '@slickgrid-universal/pagination-component';\nimport { deepCopy, extend } from '@slickgrid-universal/utils';\nimport { dequal } from 'dequal/lite';\nimport React from 'react';\nimport type { Subscription } from 'rxjs';\n\nimport { I18nextContext } from '../contexts/i18nextContext.js';\nimport { GlobalGridOptions } from '../global-grid-options.js';\nimport type { GridOption, I18Next, SlickgridReactInstance } from '../models/index.js';\nimport { disposeAllSubscriptions } from '../services/utilities.js';\nimport { GlobalContainerService } from '../services/singletons.js';\nimport { loadReactComponentDynamically } from '../services/reactUtils.js';\nimport { TranslaterI18NextService } from '../services/translaterI18Next.service.js';\nimport type { SlickgridReactProps } from './slickgridReactProps.js';\n\nconst WARN_NO_PREPARSE_DATE_SIZE = 10000; // data size to warn user when pre-parse isn't enabled\n\ninterface State {\n _options: GridOption;\n paginationService: PaginationService;\n showPagination: boolean;\n}\n\nexport class SlickgridReact<TData = any> extends React.Component<SlickgridReactProps, State> {\n // i18next has to be provided by the external user through our `I18nextProvider`\n static contextType = I18nextContext;\n declare context: React.ContextType<typeof I18nextContext>;\n protected _mounted = false;\n protected setStateValue(key: string, value: any, callback?: () => void): void {\n if ((this.state as any)?.[key] === value) {\n return;\n }\n\n if (!this._mounted) {\n this.state = this.state || {};\n (this.state as any)[key] = value;\n return;\n }\n\n this.setState(() => {\n const result: any = {};\n result[key] = value;\n return result;\n }, callback);\n }\n\n protected _columns: Column<TData>[] = [];\n protected _currentDatasetLength = 0;\n protected _dataset: any[] | null = null;\n protected _options: GridOption = {};\n protected _elm?: HTMLDivElement | null;\n protected _collectionObservers: Array<null | { disconnect: () => void }> = [];\n protected _eventHandler!: SlickEventHandler;\n protected _eventPubSubService!: EventPubSubService;\n protected _hideHeaderRowAfterPageLoad = false;\n protected _i18next: I18Next | null;\n protected _isAutosizeColsCalled = false;\n protected _isGridInitialized = false;\n protected _isDatasetInitialized = false;\n protected _isDatasetHierarchicalInitialized = false;\n protected _isPaginationInitialized = false;\n protected _isLocalGrid = true;\n protected _paginationOptions: Pagination | undefined;\n protected _registeredResources: ExternalResource[] = [];\n protected _scrollEndCalled = false;\n\n protected get options(): GridOption {\n return this._options || ({} as GridOption);\n }\n protected set options(options: GridOption) {\n let mergedOptions: GridOption;\n\n // if we already have grid options, when grid was already initialized, we'll merge with those options\n // else we'll merge with global grid options\n if (this.grid?.getOptions) {\n mergedOptions = extend<GridOption>(true, {} as GridOption, this.grid.getOptions() as GridOption, options as GridOption);\n } else {\n mergedOptions = this.mergeGridOptions(options);\n }\n if (this.sharedService?.gridOptions && this.grid?.setOptions) {\n this.sharedService.gridOptions = mergedOptions;\n this.grid.setOptions(mergedOptions, false, true); // make sure to supressColumnCheck (3rd arg) to avoid problem with changeColumnsArrangement() and custom grid view\n this.grid.reRenderColumns(true); // then call a re-render since we did supressColumnCheck on previous setOptions\n }\n this._options = mergedOptions;\n }\n\n groupItemMetadataProvider?: SlickGroupItemMetadataProvider;\n backendServiceApi: BackendServiceApi | undefined;\n metrics?: Metrics;\n showPagination = false;\n serviceList: any[] = [];\n subscriptions: Array<EventSubscription | Subscription> = [];\n\n // components\n slickEmptyWarning: SlickEmptyWarningComponent | undefined;\n slickFooter: SlickFooterComponent | undefined;\n slickPagination: BasePaginationComponent | undefined;\n\n // services\n backendUtilityService!: BackendUtilityService;\n collectionService: CollectionService;\n extensionService: ExtensionService;\n extensionUtility: ExtensionUtility;\n filterFactory!: FilterFactory;\n filterService: FilterService;\n gridEventService: GridEventService;\n gridService: GridService;\n gridStateService: GridStateService;\n groupingService!: HeaderGroupingService;\n headerGroupingService: HeaderGroupingService;\n resizerService!: ResizerService;\n rxjs?: RxJsFacade;\n sharedService: SharedService;\n sortService: SortService;\n treeDataService: TreeDataService;\n\n dataView!: SlickDataView<TData>;\n grid!: SlickGrid;\n totalItems = 0;\n\n extensions!: ExtensionList<any>;\n instances: SlickgridReactInstance | null = null;\n\n static defaultProps = {\n containerService: GlobalContainerService,\n translaterService: new TranslaterI18NextService(),\n gridId: '',\n dataset: [],\n columns: [],\n options: {},\n };\n\n get dataset(): any[] {\n return this.dataView?.getItems() || [];\n }\n set dataset(newDataset: any[]) {\n const prevDatasetLn = this._currentDatasetLength;\n const isDatasetEqual = dequal(newDataset, this.dataset || []);\n let data = !!this._options?.enableDeepCopyDatasetOnPageLoad ? deepCopy(newDataset) : newDataset;\n\n // when Tree Data is enabled and we don't yet have the hierarchical dataset filled, we can force a convert+sort of the array\n if (\n this.grid &&\n this.options?.enableTreeData &&\n Array.isArray(newDataset) &&\n (newDataset.length > 0 || newDataset.length !== prevDatasetLn || !isDatasetEqual)\n ) {\n this._isDatasetHierarchicalInitialized = false;\n data = this.sortTreeDataset(newDataset, !isDatasetEqual); // if dataset changed, then force a refresh anyway\n }\n\n this.refreshGridData(data || []);\n this._currentDatasetLength = (newDataset || []).length;\n\n // expand/autofit columns on first page load\n // we can assume that if the prevDataset was empty then we are on first load\n if (this.grid && this.options.autoFitColumnsOnFirstLoad && prevDatasetLn === 0 && !this._isAutosizeColsCalled) {\n this.grid.autosizeColumns();\n this._isAutosizeColsCalled = true;\n }\n }\n\n get datasetHierarchical(): any[] | undefined {\n return this.sharedService.hierarchicalDataset;\n }\n\n set datasetHierarchical(newHierarchicalDataset: any[] | undefined) {\n const isDatasetEqual = dequal(newHierarchicalDataset, this.sharedService?.hierarchicalDataset ?? []);\n const prevFlatDatasetLn = this._currentDatasetLength;\n if (this.sharedService) {\n this.sharedService.hierarchicalDataset = newHierarchicalDataset;\n }\n\n if (newHierarchicalDataset && this.props.columns && this.filterService?.clearFilters) {\n this.filterService.clearFilters();\n }\n\n // when a hierarchical dataset is set afterward, we can reset the flat dataset and call a tree data sort that will overwrite the flat dataset\n if (this.dataView && newHierarchicalDataset && this.grid && this.sortService?.processTreeDataInitialSort) {\n this.dataView.setItems([], this._options?.datasetIdPropertyName ?? 'id');\n this.sortService.processTreeDataInitialSort();\n this.treeDataService.initHierarchicalTree();\n\n // 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\n // 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\n queueMicrotask(() => {\n const flatDatasetLn = this.dataView?.getItemCount() ?? 0;\n if (flatDatasetLn > 0 && (flatDatasetLn !== prevFlatDatasetLn || !isDatasetEqual)) {\n this.filterService.refreshTreeDataFilters();\n }\n });\n }\n\n this._isDatasetHierarchicalInitialized = true;\n }\n\n protected get paginationService(): PaginationService {\n return this.state?.paginationService;\n }\n protected set paginationService(value: PaginationService) {\n this.setStateValue('paginationService', value);\n }\n\n constructor(public readonly props: SlickgridReactProps) {\n super(props);\n const slickgridConfig = new SlickgridConfig();\n this._eventHandler = new SlickEventHandler();\n\n this.showPagination = false;\n\n // check if the user wants to hide the header row from the start\n // we only want to do this check once in the constructor\n this._hideHeaderRowAfterPageLoad = props.options?.showHeaderRow === false;\n\n this._options = this.mergeGridOptions(props.options || {});\n\n // initialize and assign all Service Dependencies\n this._eventPubSubService = new EventPubSubService();\n this._eventPubSubService.eventNamingStyle = EventNamingStyle.camelCase;\n\n this.backendUtilityService = new BackendUtilityService();\n this.gridEventService = new GridEventService();\n this.sharedService = new SharedService();\n this.collectionService = new CollectionService(this.props.translaterService);\n this.extensionUtility = new ExtensionUtility(this.sharedService, this.backendUtilityService, this.props.translaterService);\n this.filterFactory = new FilterFactory(slickgridConfig, this.props.translaterService, this.collectionService);\n this.filterService = new FilterService(\n this.filterFactory as any,\n this._eventPubSubService,\n this.sharedService,\n this.backendUtilityService\n );\n this.resizerService = new ResizerService(this._eventPubSubService);\n this.sortService = new SortService(this.collectionService, this.sharedService, this._eventPubSubService, this.backendUtilityService);\n this.treeDataService = new TreeDataService(this._eventPubSubService, this.filterService, this.sharedService, this.sortService);\n this.paginationService = new PaginationService(this._eventPubSubService, this.sharedService, this.backendUtilityService);\n\n this.extensionService = new ExtensionService(\n this.extensionUtility,\n this.filterService,\n this._eventPubSubService,\n this.sharedService,\n this.sortService,\n this.treeDataService,\n this.props.translaterService,\n () => this.gridService\n );\n\n this.gridStateService = new GridStateService(\n this.extensionService,\n this.filterService,\n this._eventPubSubService,\n this.sharedService,\n this.sortService,\n this.treeDataService\n );\n this.gridService = new GridService(\n this.gridStateService,\n this.filterService,\n this._eventPubSubService,\n this.paginationService,\n this.sharedService,\n this.sortService,\n this.treeDataService\n );\n this.headerGroupingService = new HeaderGroupingService(this.extensionUtility);\n\n this.serviceList = [\n this.extensionService,\n this.filterService,\n this.gridEventService,\n this.gridService,\n this.gridStateService,\n this.headerGroupingService,\n this.paginationService,\n this.resizerService,\n this.sortService,\n this.treeDataService,\n ];\n\n if (this.props.datasetHierarchical) {\n this.sharedService.hierarchicalDataset = this.props.datasetHierarchical || [];\n }\n\n // register all Service instances in the container\n this.props.containerService.registerInstance('PubSubService', this._eventPubSubService);\n this.props.containerService.registerInstance('EventPubSubService', this._eventPubSubService);\n this.props.containerService.registerInstance('ExtensionUtility', this.extensionUtility);\n this.props.containerService.registerInstance('FilterService', this.filterService);\n this.props.containerService.registerInstance('CollectionService', this.collectionService);\n this.props.containerService.registerInstance('ExtensionService', this.extensionService);\n this.props.containerService.registerInstance('GridEventService', this.gridEventService);\n this.props.containerService.registerInstance('GridService', this.gridService);\n this.props.containerService.registerInstance('GridStateService', this.gridStateService);\n this.props.containerService.registerInstance('HeaderGroupingService', this.headerGroupingService);\n this.props.containerService.registerInstance('PaginationService', this.paginationService);\n this.props.containerService.registerInstance('ResizerService', this.resizerService);\n this.props.containerService.registerInstance('SharedService', this.sharedService);\n this.props.containerService.registerInstance('SortService', this.sortService);\n this.props.containerService.registerInstance('TranslaterService', this.props.translaterService);\n this.props.containerService.registerInstance('TreeDataService', this.treeDataService);\n }\n\n get backendService(): BackendService | undefined {\n return this.options.backendServiceApi?.service;\n }\n\n get eventHandler(): SlickEventHandler {\n return this._eventHandler;\n }\n\n get isDatasetInitialized(): boolean {\n return this._isDatasetInitialized;\n }\n set isDatasetInitialized(isInitialized: boolean) {\n this._isDatasetInitialized = isInitialized;\n }\n set isDatasetHierarchicalInitialized(isInitialized: boolean) {\n this._isDatasetHierarchicalInitialized = isInitialized;\n }\n\n get registeredResources(): ExternalResource[] {\n return this._registeredResources;\n }\n\n componentDidMount() {\n this._mounted = true;\n if (this._elm && this._eventPubSubService instanceof EventPubSubService) {\n this._eventPubSubService.elementSource = this._elm;\n\n // React doesn't play well with Custom Events & also the render is called after the constructor which brings a second problem\n // to fix both issues, we need to do the following:\n // loop through all component props and subscribe to the ones that startsWith \"on\", we'll assume that it's the custom events\n // we'll then call the assigned listener(s) when events are dispatching\n for (const prop in this.props) {\n if (prop.startsWith('on')) {\n const eventCallback: any = this.props[prop as keyof SlickgridReactProps];\n if (typeof eventCallback === 'function') {\n this.subscriptions.push(\n this._eventPubSubService.subscribe(prop, (data: unknown) => {\n const gridEventName = this._eventPubSubService.getEventNameByNamingConvention(prop, '');\n eventCallback.call(null, new CustomEvent(gridEventName, { detail: data }));\n })\n );\n }\n }\n }\n }\n\n // save resource refs to register before the grid options are merged and possibly deep copied\n // since a deep copy of grid options would lose original resource refs but we want to keep them as singleton\n this._registeredResources = this.options?.externalResources || [];\n\n this.initialization(this._eventHandler);\n this._isGridInitialized = true;\n\n // if we have a backendServiceApi and the enablePagination is undefined, we'll assume that we do want to see it, else get that defined value\n if (!this.hasBackendInfiniteScroll()) {\n this.options.enablePagination = !!(this.options.backendServiceApi && this.options.enablePagination === undefined\n ? true\n : this.options.enablePagination);\n }\n\n if (!this._isPaginationInitialized && !this.props.datasetHierarchical && this._options?.enablePagination && this._isLocalGrid) {\n this.showPagination = true;\n this.loadLocalGridPagination(this.dataset);\n }\n\n // recheck the empty warning message after grid is shown so that it works in every use case\n if (this._options?.enableEmptyDataWarningMessage) {\n const dataset = this.props.dataset || [];\n if (Array.isArray(dataset)) {\n const finalTotalCount = dataset.length;\n this.displayEmptyDataWarning(finalTotalCount < 1);\n }\n }\n\n // add dark mode CSS class when enabled\n if (this.options.darkMode) {\n this.setDarkMode(true);\n }\n\n this.suggestDateParsingWhenHelpful();\n }\n\n initialization(eventHandler: SlickEventHandler) {\n if (!this._columns) {\n throw new Error(\n 'Using `<SlickgridReact>` requires `columns` and it seems that you might have forgot to provide this missing bindable model.'\n );\n }\n\n this._options.translater = this.props.translaterService;\n this._eventHandler = eventHandler;\n this._isAutosizeColsCalled = false;\n\n // when detecting a frozen grid, we'll automatically enable the mousewheel scroll handler so that we can scroll from both left/right frozen containers\n if (\n this._options &&\n ((this._options.frozenRow !== undefined && this._options.frozenRow >= 0) ||\n (this._options.frozenColumn !== undefined && this._options.frozenColumn >= 0)) &&\n this._options.enableMouseWheelScrollHandler === undefined\n ) {\n this._options.enableMouseWheelScrollHandler = true;\n }\n\n this._eventPubSubService.eventNamingStyle = this._options?.eventNamingStyle ?? EventNamingStyle.camelCase;\n this._eventPubSubService.publish(`onBeforeGridCreate`, true);\n\n // make sure the dataset is initialized (if not it will throw an error that it cannot getLength of null)\n this._dataset ||= this.props.dataset || [];\n this._currentDatasetLength = this._dataset.length;\n this._options = this.mergeGridOptions(this._options);\n this._paginationOptions = this._options?.pagination;\n this.backendServiceApi = this._options?.backendServiceApi;\n this._isLocalGrid = !this.backendServiceApi; // considered a local grid if it doesn't have a backend service set\n\n // inject the I18Next instance when translation is enabled\n if (this._options?.enableTranslate || this._options?.i18n) {\n const importErrorMsg =\n '[Slickgrid-React] Enabling translation requires you to install I18Next in your App and use `I18nextProvider` to provide it. ' +\n 'Please make sure to first install it via \"npm install i18next react-i18next\" and then ' +\n 'use `<I18nextProvider value={i18n}><App/></I18nextProvider>` in your main index.tsx file. ' +\n 'Visit https://ghiscoding.gitbook.io/slickgrid-react/localization/localization for more info.';\n\n this._i18next = this.context; // Access the context directly\n if (this.props.translaterService && this._i18next) {\n this.props.translaterService.i18nInstance = this._i18next;\n } else {\n throw new Error(importErrorMsg);\n }\n }\n\n // unless specified, we'll create an internal postProcess callback (currently only available for GraphQL)\n if (this.options.backendServiceApi && !this.options.backendServiceApi?.disableInternalPostProcess) {\n this.createBackendApiInternalPostProcessCallback(this._options);\n }\n\n if (!this.props.customDataView) {\n const dataviewInlineFilters = (this._options.dataView && this._options.dataView.inlineFilters) || false;\n let dataViewOptions: Partial<DataViewOption> = { ...this._options.dataView, inlineFilters: dataviewInlineFilters };\n\n if (this._options.draggableGrouping || this._options.enableGrouping) {\n this.groupItemMetadataProvider = new SlickGroupItemMetadataProvider();\n this.sharedService.groupItemMetadataProvider = this.groupItemMetadataProvider;\n dataViewOptions = { ...dataViewOptions, groupItemMetadataProvider: this.groupItemMetadataProvider };\n }\n this.dataView = new SlickDataView<TData>(dataViewOptions as Partial<DataViewOption>, this._eventPubSubService);\n this._eventPubSubService.publish('onDataviewCreated', this.dataView);\n }\n\n // get any possible Services that user want to register which don't require SlickGrid to be instantiated\n // RxJS Resource is in this lot because it has to be registered before anything else and doesn't require SlickGrid to be initialized\n this.preRegisterResources();\n\n // prepare and load all SlickGrid editors, if an async editor is found then we'll also execute it.\n this._columns = this.loadSlickGridEditors(this.props.columns);\n\n // if the user wants to automatically add a Custom Editor Formatter, we need to call the auto add function again\n if (this._options.autoAddCustomEditorFormatter) {\n autoAddEditorFormatterToColumnsWithEditor(this._columns, this._options.autoAddCustomEditorFormatter);\n }\n\n // save reference for all columns before they optionally become hidden/visible\n this.sharedService.allColumns = this._columns;\n this.sharedService.visibleColumns = this._columns;\n\n // after subscribing to potential columns changed, we are ready to create these optional extensions\n // when we did find some to create (RowMove, RowDetail, RowSelections), it will automatically modify column definitions (by previous subscribe)\n this.extensionService.createExtensionsBeforeGridCreation(this._columns, this._options);\n\n // if user entered some Pinning/Frozen \"presets\", we need to apply them in the grid options\n if (this.options.presets?.pinning) {\n this.options = { ...this.options, ...this.options.presets.pinning };\n }\n\n // build SlickGrid Grid, also user might optionally pass a custom dataview (e.g. remote model)\n this.grid = new SlickGrid(\n `#${this.props.gridId}`,\n this.props.customDataView || this.dataView,\n this._columns,\n this._options,\n this._eventPubSubService\n );\n this.sharedService.dataView = this.dataView;\n this.sharedService.slickGrid = this.grid;\n this.sharedService.gridContainerElement = this._elm as HTMLDivElement;\n if (this.groupItemMetadataProvider) {\n this.grid.registerPlugin(this.groupItemMetadataProvider); // register GroupItemMetadataProvider when Grouping is enabled\n }\n\n this.extensionService.bindDifferentExtensions();\n this.bindDifferentHooks(this.grid, this._options, this.dataView);\n\n // 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\n const frozenColumnIndex = this._options?.frozenColumn ?? -1;\n if (\n frozenColumnIndex >= 0 &&\n frozenColumnIndex <= this.sharedService.visibleColumns.length &&\n this.sharedService.visibleColumns.length > 0\n ) {\n this.sharedService.frozenVisibleColumnId = this.sharedService.visibleColumns[frozenColumnIndex]?.id ?? '';\n }\n\n // get any possible Services that user want to register\n this.registerResources();\n\n // initialize the SlickGrid grid\n this.grid.init();\n\n // initialized the resizer service only after SlickGrid is initialized\n // if we don't we end up binding our resize to a grid element that doesn't yet exist in the DOM and the resizer service will fail silently (because it has a try/catch that unbinds the resize without throwing back)\n const gridContainerElm = this._elm;\n if (gridContainerElm) {\n this.resizerService.init(this.grid, gridContainerElm);\n }\n\n // user could show a custom footer with the data metrics (dataset length and last updated timestamp)\n if (!this._options.enablePagination && this._options.showCustomFooter && this._options.customFooterOptions && gridContainerElm) {\n this.slickFooter = new SlickFooterComponent(\n this.grid,\n this._options.customFooterOptions,\n this._eventPubSubService,\n this.props.translaterService\n );\n this.slickFooter.renderFooter(gridContainerElm as HTMLDivElement);\n }\n\n if (!this.props.customDataView && this.dataView) {\n const initialDataset = this._options?.enableTreeData ? this.sortTreeDataset(this.props.dataset) : this.props.dataset;\n if (Array.isArray(initialDataset)) {\n this.dataView.setItems(initialDataset, this._options.datasetIdPropertyName ?? 'id');\n }\n\n // if you don't want the items that are not visible (due to being filtered out or being on a different page)\n // to stay selected, pass 'false' to the second arg\n if (this.grid?.getSelectionModel() && this._options?.dataView && this._options.dataView.hasOwnProperty('syncGridSelection')) {\n // if we are using a Backend Service, we will do an extra flag check, the reason is because it might have some unintended behaviors\n // with the BackendServiceApi because technically the data in the page changes the DataView on every page change.\n let preservedRowSelectionWithBackend = false;\n if (this._options.backendServiceApi && this._options.dataView.hasOwnProperty('syncGridSelectionWithBackendService')) {\n preservedRowSelectionWithBackend = this._options.dataView.syncGridSelectionWithBackendService as boolean;\n }\n\n const syncGridSelection = this._options.dataView.syncGridSelection;\n if (typeof syncGridSelection === 'boolean') {\n let preservedRowSelection = syncGridSelection;\n if (!this._isLocalGrid) {\n // when using BackendServiceApi, we'll be using the \"syncGridSelectionWithBackendService\" flag BUT \"syncGridSelection\" must also be set to True\n preservedRowSelection = syncGridSelection && preservedRowSelectionWithBackend;\n }\n this.dataView.syncGridSelection(this.grid, preservedRowSelection);\n } else if (typeof syncGridSelection === 'object') {\n this.dataView.syncGridSelection(this.grid, syncGridSelection.preserveHidden, syncGridSelection.preserveHiddenOnSelectionChange);\n }\n }\n\n if (this._dataset.length > 0) {\n if (!this._isDatasetInitialized && (this._options.enableCheckboxSelector || this._options.enableRowSelection)) {\n this.loadRowSelectionPresetWhenExists();\n }\n this.loadFilterPresetsWhenDatasetInitialized();\n this._isDatasetInitialized = true;\n }\n }\n\n // user might want to hide the header row on page load but still have `enableFiltering: true`\n // if that is the case, we need to hide the headerRow ONLY AFTER all filters got created & dataView exist\n if (this._hideHeaderRowAfterPageLoad) {\n this.showHeaderRow(false);\n this.sharedService.hideHeaderRowAfterPageLoad = this._hideHeaderRowAfterPageLoad;\n }\n\n // publish & dispatch certain events\n this._eventPubSubService.publish(`onGridCreated`, this.grid);\n\n // after the DataView is created & updated execute some processes & dispatch some events\n if (!this.props.customDataView) {\n this.executeAfterDataviewCreated(this.grid, this._options);\n }\n\n // bind resize ONLY after the dataView is ready\n this.bindResizeHook(this.grid, this._options);\n\n // bind the Backend Service API callback functions only after the grid is initialized\n // because the preProcess() and onInit() might get triggered\n if (this._options?.backendServiceApi) {\n this.bindBackendCallbackFunctions(this._options);\n }\n\n // create the React Grid Instance with reference to all Services\n const reactElementInstance: SlickgridReactInstance = {\n element: this._elm as HTMLDivElement,\n\n // Slick Grid & DataView objects\n dataView: this.dataView,\n slickGrid: this.grid,\n\n // public methods\n dispose: this.dispose.bind(this),\n\n // return all available Services (non-singleton)\n backendService: this.backendService,\n eventPubSubService: this._eventPubSubService,\n extensionService: this.extensionService,\n filterService: this.filterService,\n gridEventService: this.gridEventService,\n gridStateService: this.gridStateService,\n gridService: this.gridService,\n headerGroupingService: this.headerGroupingService,\n paginationService: this.paginationService,\n resizerService: this.resizerService,\n sortService: this.sortService,\n treeDataService: this.treeDataService,\n };\n\n // addons (SlickGrid extra plugins/controls)\n this.extensions = this.extensionService?.extensionList;\n\n // all instances (SlickGrid, DataView & all Services)\n this.instances = reactElementInstance;\n this.setStateValue('instances', reactElementInstance);\n this._eventPubSubService.publish('onReactGridCreated', reactElementInstance);\n\n // subscribe to column definitions assignment changes\n this.observeColumns();\n }\n\n componentWillUnmount(shouldEmptyDomElementContainer = false) {\n this._eventPubSubService.publish('onBeforeGridDestroy', this.grid);\n this._eventHandler?.unsubscribeAll();\n if (typeof this._i18next?.off === 'function') {\n this._i18next.off('languageChanged');\n }\n\n // we could optionally also empty the content of the grid container DOM element\n if (shouldEmptyDomElementContainer) {\n this.emptyGridContainerElm();\n }\n\n this._collectionObservers.forEach((obs) => obs?.disconnect());\n this._eventPubSubService.publish('onAfterGridDestroyed', true);\n\n // dispose of all Services\n this.serviceList.forEach((service: any) => {\n if (service?.dispose) {\n service.dispose();\n }\n });\n this.serviceList = [];\n\n // dispose backend service when defined and a dispose method exists\n this.backendService?.dispose?.();\n\n // dispose all registered external resources\n this.disposeExternalResources();\n\n // dispose the Components\n this.slickEmptyWarning?.dispose();\n this.slickFooter?.dispose();\n this.slickPagination?.dispose();\n\n if (this.dataView) {\n if (this.dataView.setItems) {\n this.dataView.setItems([]);\n }\n if (this.dataView.destroy) {\n this.dataView.destroy();\n }\n }\n if (this.grid?.destroy) {\n this.grid.destroy(shouldEmptyDomElementContainer);\n }\n\n // also dispose of all Subscriptions\n this.subscriptions = disposeAllSubscriptions(this.subscriptions);\n\n if (this.backendServiceApi) {\n for (const prop of Object.keys(this.backendServiceApi)) {\n (this.backendServiceApi as any)[prop] = null;\n }\n this.backendServiceApi = undefined;\n }\n for (const prop of Object.keys(this.props.columns)) {\n (this.props.columns as any)[prop] = null;\n }\n for (const prop of Object.keys(this.sharedService)) {\n (this.sharedService as any)[prop] = null;\n }\n this._dataset = null;\n this._columns = [];\n }\n\n emptyGridContainerElm() {\n const gridContainerId = this._options?.gridContainerId || 'grid1';\n const gridContainerElm = document.querySelector(`#${gridContainerId}`) as HTMLDivElement;\n emptyElement(gridContainerElm);\n }\n\n dispose(shouldEmptyDomElementContainer = false) {\n this.componentWillUnmount(shouldEmptyDomElementContainer);\n }\n\n disposeExternalResources() {\n if (Array.isArray(this._registeredResources)) {\n while (this._registeredResources.length > 0) {\n const res = this._registeredResources.pop();\n if (res?.dispose) {\n res.dispose();\n }\n }\n }\n this._registeredResources = [];\n }\n\n componentDidUpdate(prevProps: SlickgridReactProps) {\n // get the grid options (order of precedence is Global Options first, then user option which could overwrite the Global options)\n if (this.props.options !== prevProps.options) {\n this._options = { ...GlobalGridOptions, ...this._options };\n }\n\n if (this.props.columns !== prevProps.columns) {\n this._columns = this.props.columns;\n this.columnsChanged(this.props.columns);\n }\n\n if (this.props.dataset !== prevProps.dataset) {\n this.dataset = this.props.dataset || prevProps.dataset;\n }\n\n if (this.props.datasetHierarchical && this.props.datasetHierarchical !== prevProps.datasetHierarchical) {\n this.datasetHierarchical = this.props.datasetHierarchical;\n }\n this.suggestDateParsingWhenHelpful();\n }\n\n columnsChanged(columns?: Column[]) {\n if (columns) {\n this._columns = columns;\n }\n if (this._isGridInitialized) {\n this.updateColumnsList(this._columns);\n }\n if (this._columns.length > 0) {\n this.copyColumnWidthsReference(this._columns);\n }\n }\n\n /**\n * Define our internal Post Process callback, it will execute internally after we get back result from the Process backend call\n * Currently ONLY available with the GraphQL Backend Service.\n * The behavior is to refresh the Dataset & Pagination without requiring the user to create his own PostProcess every time\n */\n createBackendApiInternalPostProcessCallback(gridOptions: GridOption) {\n const backendApi = gridOptions?.backendServiceApi;\n if (backendApi?.service) {\n const backendApiService = backendApi.service;\n\n // internalPostProcess only works (for now) with a GraphQL Service, so make sure it is of that type\n if (typeof backendApiService.getDatasetName === 'function') {\n backendApi.internalPostProcess = (processResult: any) => {\n const datasetName =\n backendApi && backendApiService && typeof backendApiService.getDatasetName === 'function'\n ? backendApiService.getDatasetName()\n : '';\n if (processResult?.data[datasetName]) {\n const data = processResult.data[datasetName].hasOwnProperty('nodes')\n ? (processResult as any).data[datasetName].nodes\n : (processResult as any).data[datasetName];\n const totalCount = processResult.data[datasetName].hasOwnProperty('totalCount')\n ? (processResult as any).data[datasetName].totalCount\n : (processResult as any).data[datasetName].length;\n this.refreshGridData(data, totalCount || 0);\n }\n };\n }\n }\n }\n\n bindDifferentHooks(grid: SlickGrid, gridOptions: GridOption, dataView: SlickDataView) {\n // translate some of them on first load, then on each language change\n if (gridOptions.enableTranslate) {\n this.extensionService.translateAllExtensions();\n }\n\n // on locale change, we have to manually translate the Headers, GridMenu\n if (typeof this._i18next?.on === 'function') {\n this._i18next.on('languageChanged', (lang) => {\n // publish event of the same name that Slickgrid-Universal uses on a language change event\n this._eventPubSubService.publish('onLanguageChange');\n\n if (gridOptions.enableTranslate) {\n this.extensionService.translateAllExtensions(lang);\n if (\n (gridOptions.createPreHeaderPanel && gridOptions.createTopHeaderPanel) ||\n (gridOptions.createPreHeaderPanel && !gridOptions.enableDraggableGrouping)\n ) {\n this.headerGroupingService.translateHeaderGrouping();\n }\n }\n });\n }\n\n // if user set an onInit Backend, we'll run it right away (and if so, we also need to run preProcess, internalPostProcess & postProcess)\n if (gridOptions.backendServiceApi) {\n const backendApi = gridOptions.backendServiceApi;\n\n if (backendApi?.service?.init) {\n backendApi.service.init(backendApi.options, gridOptions.pagination, this.grid, this.sharedService);\n }\n }\n\n if (dataView && grid) {\n // on cell click, mainly used with the columnDef.action callback\n this.gridEventService.bindOnBeforeEditCell(grid);\n this.gridEventService.bindOnCellChange(grid);\n this.gridEventService.bindOnClick(grid);\n\n if (dataView && grid) {\n // bind external sorting (backend) when available or default onSort (dataView)\n if (gridOptions.enableSorting) {\n // bind external sorting (backend) unless specified to use the local one\n if (gridOptions.backendServiceApi && !gridOptions.backendServiceApi.useLocalSorting) {\n this.sortService.bindBackendOnSort(grid);\n } else {\n this.sortService.bindLocalOnSort(grid);\n }\n }\n\n // bind external filter (backend) when available or default onFilter (dataView)\n if (gridOptions.enableFiltering) {\n this.filterService.init(grid);\n\n // bind external filter (backend) unless specified to use the local one\n if (gridOptions.backendServiceApi && !gridOptions.backendServiceApi.useLocalFiltering) {\n this.filterService.bindBackendOnFilter(grid);\n } else {\n this.filterService.bindLocalOnFilter(grid);\n }\n }\n\n // when column are reordered, we need to update the visibleColumn array\n this._eventHandler.subscribe(grid.onColumnsReordered, (_e, args) => {\n this.sharedService.hasColumnsReordered = true;\n this.sharedService.visibleColumns = args.impactedColumns;\n });\n\n this._eventHandler.subscribe(grid.onSetOptions, (_e, args) => {\n // add/remove dark mode CSS class when enabled\n if (args.optionsBefore.darkMode !== args.optionsAfter.darkMode && this.sharedService.gridContainerElement) {\n this.setDarkMode(args.optionsAfter.darkMode);\n }\n });\n\n // load any presets if any (after dataset is initialized)\n this.loadColumnPresetsWhenDatasetInitialized();\n this.loadFilterPresetsWhenDatasetInitialized();\n\n // When data changes in the DataView, we need to refresh the metrics and/or display a warning if the dataset is empty\n this._eventHandler.subscribe(dataView.onRowCountChanged, (_e, args) => {\n if (!gridOptions.enableRowDetailView || !Array.isArray(args.changedRows) || args.changedRows.length === args.itemCount) {\n grid.invalidate();\n } else {\n grid.invalidateRows(args.changedRows);\n grid.render();\n }\n this.handleOnItemCountChanged(dataView.getFilteredItemCount() || 0, dataView.getItemCount() || 0);\n });\n this._eventHandler.subscribe(dataView.onSetItemsCalled, (_e, args) => {\n this.sharedService.isItemsDateParsed = false;\n this.handleOnItemCountChanged(dataView.getFilteredItemCount() || 0, args.itemCount);\n\n // when user has resize by content enabled, we'll force a full width calculation since we change our entire dataset\n if (\n args.itemCount > 0 &&\n (this.options.autosizeColumnsByCellContentOnFirstLoad || this.options.enableAutoResizeColumnsByCellContent)\n ) {\n this.resizerService.resizeColumnsByCellContent(!this._options?.resizeByContentOnlyOnFirstLoad);\n }\n });\n\n if (gridOptions?.enableFiltering && !gridOptions.enableRowDetailView) {\n this._eventHandler.subscribe(dataView.onRowsChanged, (_e, { calledOnRowCountChanged, rows }) => {\n // filtering data with local dataset will not always show correctly unless we call this updateRow/render\n // also don't use \"invalidateRows\" since it destroys the entire row and as bad user experience when updating a row\n // see commit: https://github.com/ghiscoding/aurelia-slickgrid/commit/8c503a4d45fba11cbd8d8cc467fae8d177cc4f60\n if (!calledOnRowCountChanged && Array.isArray(rows)) {\n const ranges = grid.getRenderedRange();\n rows.filter((row) => row >= ranges.top && row <= ranges.bottom).forEach((row: number) => grid.updateRow(row));\n grid.render();\n }\n });\n }\n }\n }\n }\n\n bindBackendCallbackFunctions(gridOptions: GridOption) {\n const backendApi = gridOptions.backendServiceApi;\n const backendApiService = backendApi?.service;\n const serviceOptions: BackendServiceOption = backendApiService?.options || {};\n const isExecuteCommandOnInit = !serviceOptions\n ? false\n : serviceOptions && serviceOptions.hasOwnProperty('executeProcessCommandOnInit')\n ? serviceOptions['executeProcessCommandOnInit']\n : true;\n\n if (backendApiService) {\n // update backend filters (if need be) BEFORE the query runs (via the onInit command a few lines below)\n // if user entered some any \"presets\", we need to reflect them all in the grid\n if (gridOptions?.presets) {\n // Filters \"presets\"\n if (backendApiService.updateFilters && Array.isArray(gridOptions.presets.filters) && gridOptions.presets.filters.length > 0) {\n backendApiService.updateFilters(gridOptions.presets.filters, true);\n }\n // Sorters \"presets\"\n if (backendApiService.updateSorters && Array.isArray(gridOptions.presets.sorters) && gridOptions.presets.sorters.length > 0) {\n // when using multi-column sort, we can have multiple but on single sort then only grab the first sort provided\n const sortColumns = this._options?.multiColumnSort ? gridOptions.presets.sorters : gridOptions.presets.sorters.slice(0, 1);\n backendApiService.updateSorters(undefined, sortColumns);\n }\n // Pagination \"presets\"\n if (backendApiService.updatePagination && gridOptions.presets.pagination && !this.hasBackendInfiniteScroll()) {\n const { pageNumber, pageSize } = gridOptions.presets.pagination;\n backendApiService.updatePagination(pageNumber, pageSize);\n }\n } else {\n const columnFilters = this.filterService.getColumnFilters();\n if (columnFilters && backendApiService.updateFilters) {\n backendApiService.updateFilters(columnFilters, false);\n }\n }\n\n // execute onInit command when necessary\n if (backendApi && backendApiService && (backendApi.onInit || isExecuteCommandOnInit)) {\n const query = typeof backendApiService.buildQuery === 'function' ? backendApiService.buildQuery() : '';\n const process = isExecuteCommandOnInit ? (backendApi.process?.(query) ?? null) : (backendApi.onInit?.(query) ?? null);\n\n // 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\n queueMicrotask(() => {\n const backendUtilityService = this.backendUtilityService as BackendUtilityService;\n\n // keep start time & end timestamps & return it after process execution\n const startTime = new Date();\n\n // run any pre-process, if defined, for example a spinner\n if (backendApi.preProcess) {\n backendApi.preProcess();\n }\n\n // the processes can be a Promise (like Http)\n const totalItems = this._options?.pagination?.totalItems ?? 0;\n if (process instanceof Promise) {\n process\n .then((processResult: any) =>\n backendUtilityService.executeBackendProcessesCallback(startTime, processResult, backendApi, totalItems)\n )\n .catch((error) => backendUtilityService.onBackendError(error, backendApi));\n } else if (process && this.rxjs?.isObservable(process)) {\n this.subscriptions.push(\n (process as Observable<any>).subscribe(\n (processResult: any) =>\n backendUtilityService.executeBackendProcessesCallback(startTime, processResult, backendApi, totalItems),\n (error: any) => backendUtilityService.onBackendError(error, backendApi)\n )\n );\n }\n });\n }\n\n // when user enables Infinite Scroll\n if (backendApi.service.options?.infiniteScroll) {\n this.addBackendInfiniteScrollCallback();\n }\n }\n }\n\n protected addBackendInfiniteScrollCallback(): void {\n if (this.grid && this.options.backendServiceApi && this.hasBackendInfiniteScroll() && !this.options.backendServiceApi?.onScrollEnd) {\n const onScrollEnd = () => {\n this.backendUtilityService.setInfiniteScrollBottomHit(true);\n\n // even if we're not showing pagination, we still use pagination service behind the scene\n // to keep track of the scroll position and fetch next set of data (aka next page)\n // we also need a flag to know if we reached the of the dataset or not (no more pages)\n this.paginationService.goToNextPage().then((hasNext) => {\n if (!hasNext) {\n this.backendUtilityService.setInfiniteScrollBottomHit(false);\n }\n });\n };\n this.options.backendServiceApi.onScrollEnd = onScrollEnd;\n\n // subscribe to SlickGrid onScroll to determine when reaching the end of the scroll bottom position\n // run onScrollEnd() method when that happens\n this._eventHandler.subscribe(this.grid.onScroll, (_e, args) => {\n const viewportElm = args.grid.getViewportNode()!;\n if (\n ['mousewheel', 'scroll'].includes(args.triggeredBy || '') &&\n this.paginationService?.totalItems &&\n args.scrollTop > 0 &&\n Math.ceil(viewportElm.offsetHeight + args.scrollTop) >= args.scrollHeight\n ) {\n if (!this._scrollEndCalled) {\n onScrollEnd();\n this._scrollEndCalled = true;\n }\n }\n });\n\n // use postProcess to identify when scrollEnd process is finished to avoid calling the scrollEnd multiple times\n // we also need to keep a ref of the user's postProcess and call it after our own postProcess\n const orgPostProcess = this.options.backendServiceApi.postProcess;\n this.options.backendServiceApi.postProcess = (processResult: any) => {\n this._scrollEndCalled = false;\n if (orgPostProcess) {\n orgPostProcess(processResult);\n }\n };\n }\n }\n\n bindResizeHook(grid: SlickGrid, options: GridOption) {\n if (\n (options.autoFitColumnsOnFirstLoad && options.autosizeColumnsByCellContentOnFirstLoad) ||\n (options.enableAutoSizeColumns && options.enableAutoResizeColumnsByCellContent)\n ) {\n throw new Error(\n `[Slickgrid-React] 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\").`\n );\n }\n\n // auto-resize grid on browser resize\n if (options.gridHeight || options.gridWidth) {\n this.resizerService.resizeGrid(0, { height: options.gridHeight, width: options.gridWidth });\n } else {\n this.resizerService.resizeGrid();\n }\n\n // expand/autofit columns on first page load\n if (\n grid &&\n options?.enableAutoResize &&\n options.autoFitColumnsOnFirstLoad &&\n options.enableAutoSizeColumns &&\n !this._isAutosizeColsCalled\n ) {\n grid.autosizeColumns();\n this._isAutosizeColsCalled = true;\n }\n }\n\n executeAfterDataviewCreated(_grid: SlickGrid, gridOptions: GridOption) {\n // if user entered some Sort \"presets\", we need to reflect them all in the DOM\n if (gridOptions.enableSorting) {\n if (gridOptions.presets && Array.isArray(gridOptions.presets.sorters)) {\n // when using multi-column sort, we can have multiple but on single sort then only grab the first sort provided\n const sortColumns = this._options?.multiColumnSort ? gridOptions.presets.sorters : gridOptions.presets.sorters.slice(0, 1);\n this.sortService.loadGridSorters(sortColumns);\n }\n }\n }\n\n /**\n * On a Pagination changed, we will trigger a Grid State changed with the new pagination info\n * Also if we use Row Selection or the Checkbox Selector with a Backend Service (Odata, GraphQL), we need to reset any selection\n */\n paginationChanged(pagination: PaginationMetadata) {\n const isSyncGridSelectionEnabled = this.gridStateService?.needToPreserveRowSelection() ?? false;\n if (\n this.grid &&\n !isSyncGridSelectionEnabled &&\n this.options?.backendServiceApi &&\n (this.options.enableRowSelection || this.options.enableCheckboxSelector)\n ) {\n this.grid.setSelectedRows([]);\n }\n const { pageNumber, pageSize } = pagination;\n if (this.sharedService) {\n if (pageSize !== undefined && pageNumber !== undefined) {\n this.sharedService.currentPagination = { pageNumber, pageSize };\n }\n }\n this._eventPubSubService.publish('onGridStateChanged', {\n change: { newValues: { pageNumber, pageSize }, type: 'pagination' },\n gridState: this.gridStateService.getCurrentGridState(),\n });\n }\n\n paginationOptionsChanged(newPaginationOptions: Pagination) {\n if (newPaginationOptions && this._paginationOptions) {\n this._paginationOptions = { ...this._paginationOptions, ...newPaginationOptions };\n } else {\n this._paginationOptions = newPaginationOptions;\n }\n if (this._options) {\n this._options.pagination = this._paginationOptions;\n this.paginationService.updateTotalItems(newPaginationOptions?.totalItems ?? 0, true);\n }\n }\n\n /**\n * When dataset changes, we need to refresh the entire grid UI & possibly resize it as well\n * @param dataset\n */\n refreshGridData(dataset: any[], totalCount?: number) {\n // local grid, check if we need to show the Pagination\n // if so then also check if there's any presets and finally initialize the PaginationService\n // 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\n if (this.grid && this._options) {\n if (this._options?.enablePagination && this._isLocalGrid) {\n this.showPagination = true;\n this.loadLocalGridPagination(dataset);\n }\n\n if (this._options?.enableEmptyDataWarningMessage && Array.isArray(dataset)) {\n const finalTotalCount = totalCount || dataset.length;\n this.displayEmptyDataWarning(finalTotalCount < 1);\n }\n\n if (Array.isArray(dataset) && this.grid && this.dataView?.setItems) {\n this.dataView.setItems(dataset, this._options.datasetIdPropertyName ?? 'id');\n if (!this._options.backendServiceApi && !this._options.enableTreeData) {\n this.dataView.reSort();\n }\n\n if (dataset.length > 0) {\n if (!this._isDatasetInitialized) {\n this.loadFilterPresetsWhenDatasetInitialized();\n\n if (this._options.enableCheckboxSelector) {\n this.loadRowSelectionPresetWhenExists();\n }\n }\n this._isDatasetInitialized = true;\n }\n\n // display the Pagination component only after calling this refresh data first, we call it here so that if we preset pagination page number it will be shown correctly\n this.showPagination = !!(\n this._options &&\n (this._options.enablePagination || (this._options.backendServiceApi && this._options.enablePagination === undefined))\n );\n if (this._paginationOptions && this._options?.pagination && this._options?.backendServiceApi) {\n const paginationOptions = this.setPaginationOptionsWhenPresetDefined(this._options, this._paginationOptions);\n\n // when we have a totalCount use it, else we'll take it from the pagination object\n // only update the total items if it's different to avoid refreshing the UI\n const totalRecords = totalCount !== undefined ? totalCount : this._options?.pagination?.totalItems;\n if (totalRecords !== undefined && totalRecords !== this.totalItems) {\n this.totalItems = +totalRecords;\n }\n // initialize the Pagination Service with new pagination options (which might have presets)\n if (!this._isPaginationInitialized) {\n this.initializePaginationService(paginationOptions);\n } else {\n // update the pagination service with the new total\n this.paginationService.updateTotalItems(this.totalItems);\n }\n }\n\n // resize the grid inside a slight timeout, in case other DOM element changed prior to the resize (like a filter/pagination changed)\n if (this.grid && this._options.enableAutoResize) {\n const delay = this._options.autoResize && this._options.autoResize.delay;\n this.resizerService.resizeGrid(delay || 10);\n }\n }\n }\n }\n\n /**\n * Show the filter row displayed on first row, we can optionally pass false to hide it.\n * @param showing\n */\n showHeaderRow(showing = true) {\n this.grid.setHeaderRowVisibility(showing);\n if (showing === true && this._isGridInitialized) {\n this.grid.setColumns(this.props.columns);\n }\n return showing;\n }\n\n /**\n * Check if there's any Pagination Presets defined in the Grid Options,\n * if there are then load them in the paginationOptions object\n */\n protected setPaginationOptionsWhenPresetDefined(gridOptions: GridOption, paginationOptions: Pagination): Pagination {\n if (gridOptions.presets?.pagination && gridOptions.pagination) {\n if (this.hasBackendInfiniteScroll()) {\n console.warn('[Slickgrid-React] `presets.pagination` is not supported with Infinite Scroll, reverting to first page.');\n } else {\n paginationOptions.pageSize = gridOptions.presets.pagination.pageSize;\n paginationOptions.pageNumber = gridOptions.presets.pagination.pageNumber;\n }\n }\n return paginationOptions;\n }\n\n setDarkMode(dark = false) {\n this.sharedService.gridContainerElement?.classList.toggle('slick-dark-mode', dark);\n }\n\n /**\n * Dynamically change or update the column definitions list.\n * We will re-render the grid so that the new header and data shows up correctly.\n * If using i18n, we also need to trigger a re-translate of the column headers\n */\n updateColumnsList(newColumns: Column<TData>[]) {\n if (this.grid && this._options && Array.isArray(newColumns)) {\n // map the Editor model to editorClass and load editor collectionAsync\n newColumns = this.loadSlickGridEditors(newColumns);\n\n // if the user wants to automatically add a Custom Editor Formatter, we need to call the auto add function again\n if (this._options.autoAddCustomEditorFormatter) {\n autoAddEditorFormatterToColumnsWithEditor(newColumns, this._options.autoAddCustomEditorFormatter);\n }\n\n if (this._options.enableTranslate) {\n this.extensionService.translateColumnHeaders(undefined, newColumns);\n } else {\n this.extensionService.renderColumnHeaders(newColumns, true);\n }\n\n if (this._options?.enableAutoSizeColumns) {\n this.grid.autosizeColumns();\n } else if (this._options?.enableAutoResizeColumnsByCellContent && this.resizerService?.resizeColumnsByCellContent) {\n this.resizerService.resizeColumnsByCellContent();\n }\n }\n }\n\n //\n // protected functions\n // ------------------\n\n /**\n * assignment changes are not triggering on the column definitions, for that\n * we can use our internal array observer for any changes done via (push, pop, shift, ...)\n */\n protected observeColumns(): void {\n this._collectionObservers.push(collectionObserver(this._columns, this.columnsChanged.bind(this)));\n }\n\n /**\n * Loop through all column definitions and copy the original optional `width` properties optionally provided by the user.\n * We will use this when doing a resize by cell content, if user provided a `width` it won't override it.\n */\n protected copyColumnWidthsReference(columns: Column<TData>[]) {\n columns.forEach((col) => (col.originalWidth = col.width));\n }\n\n protected displayEmptyDataWarning(showWarning = true) {\n this.slickEmptyWarning?.showEmptyDataMessage(showWarning);\n }\n\n /** When data changes in the DataView, we'll refresh the metrics and/or display a warning if the dataset is empty */\n protected handleOnItemCountChanged(currentPageRowItemCount: number, totalItemCount: number) {\n this._currentDatasetLength = totalItemCount;\n this.metrics = {\n startTime: new Date(),\n endTime: new Date(),\n itemCount: currentPageRowItemCount,\n totalItemCount,\n };\n // if custom footer is enabled, then we'll update its metrics\n if (this.slickFooter) {\n this.slickFooter.metrics = this.metrics;\n }\n\n // when using local (in-memory) dataset, we'll display a warning message when filtered data is empty\n if (this._isLocalGrid && this._options?.enableEmptyDataWarningMessage) {\n this.displayEmptyDataWarning(currentPageRowItemCount === 0);\n }\n\n // when autoResize.autoHeight is enabled, we'll want to call a resize\n if (this._options.enableAutoResize && this.resizerService.isAutoHeightEnabled && currentPageRowItemCount > 0) {\n this.resizerService.resizeGrid();\n }\n }\n\n /** Initialize the Pagination Service once */\n protected initializePaginationService(paginationOptions: Pagination) {\n if (this.grid && this.options) {\n this.paginationService.totalItems = this.totalItems;\n this.paginationService.init(this.grid, paginationOptions, this.backendServiceApi);\n this.subscriptions.push(\n this._eventPubSubService.subscribe<PaginationMetadata>('onPaginationChanged', (paginationChanges) =>\n this.paginationChanged(paginationChanges)\n ),\n this._eventPubSubService.subscribe<PaginationMetadata>('onPaginationOptionsChanged', (paginationChanges) =>\n this.paginationOptionsChanged(paginationChanges)\n ),\n this._eventPubSubService.subscribe<{ visible: boolean }>('onPaginationVisibilityChanged', (visibility: { visible: boolean }) => {\n this.showPagination = visibility?.visible ?? false;\n if (this.options?.backendServiceApi) {\n this.backendUtilityService?.refreshBackendDataset(this.options);\n }\n this.renderPagination(this.showPagination);\n })\n );\n\n // also initialize (render) the pagination component\n this.renderPagination();\n this._isPaginationInitialized = true;\n }\n }\n\n /**\n * Render (or dispose) the Pagination Component, user can optionally provide False (to not show it) which will in term dispose of the Pagination,\n * also while disposing we can choose to omit the disposable of the Pagination Service (if we are simply toggling the Pagination, we want to keep the Service alive)\n * @param {Boolean} showPagination - show (new render) or not (dispose) the Pagination\n * @param {Boolean} shouldDisposePaginationService - when disposing the Pagination, do we also want to dispose of the Pagination Service? (defaults to True)\n */\n protected async renderPagination(showPagination = true) {\n if (this.grid && this._options?.enablePagination && !this._isPaginationInitialized && showPagination) {\n if (this.options.customPaginationComponent) {\n const paginationContainer = document.createElement('section');\n this._elm!.appendChild(paginationContainer);\n const { component } = await loadReactComponentDynamically<BasePaginationComponent>(\n this.options.customPaginationComponent,\n paginationContainer\n );\n this.slickPagination = component;\n } else {\n this.slickPagination = new SlickPaginationComponent();\n }\n\n if (this.slickPagination) {\n this.slickPagination.init(this.grid, this.paginationService, this._eventPubSubService, this.props.translaterService);\n this.slickPagination.renderPagination(this._elm as HTMLDivElement);\n this._isPaginationInitialized = true;\n }\n } else if (!showPagination) {\n this.slickPagination?.dispose();\n this._isPaginationInitialized = false;\n }\n }\n\n /** Load the Editor Collection asynchronously and replace the \"collection\" property when Promise resolves */\n protected loadEditorCollectionAsync(column: Column) {\n if (column?.editor) {\n const collectionAsync = column.editor.collectionAsync;\n column.editor.disabled = true; // disable the Editor DOM element, we'll re-enable it after receiving the collection with \"updateEditorCollection()\"\n\n if (collectionAsync instanceof Promise) {\n // wait for the \"collectionAsync\", once resolved we will save it into the \"collection\"\n // the collectionAsync can be of 3 types Fetch, Promise or RxJS when available\n collectionAsync.then((response: any | any[]) => {\n if (Array.isArray(response)) {\n this.updateEditorCollection(column, response); // from Promise\n } else if (response instanceof Response && typeof response.json === 'function') {\n if (response.bodyUsed) {\n console.warn(\n `[SlickGrid-React] The response body passed to collectionAsync was already read.` +\n `Either pass the dataset from the Response or clone the response first using response.clone()`\n );\n } else {\n // from Fetch\n (response as Response).json().then((data) => this.updateEditorCollection(column, data));\n }\n } else if (response?.content) {\n this.updateEditorCollection(column, response.content); // from http-client\n }\n });\n } else if (this.rxjs?.isObservable(collectionAsync)) {\n // 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\n queueMicrotask(() => {\n this.subscriptions.push(\n (collectionAsync as Observable<any>).subscribe((resolvedCollection) => this.updateEditorCollection(column, resolvedCollection))\n );\n });\n }\n }\n }\n\n protected insertDynamicPresetColumns(columnId: string, gridPresetColumns: Column<TData>[]) {\n if (this._columns) {\n const columnPosition = this._columns.findIndex((c) => c.id === columnId);\n if (columnPosition >= 0) {\n const dynColumn = this._columns[columnPosition];\n if (dynColumn?.id === columnId && !gridPresetColumns.some((c) => c.id === columnId)) {\n columnPosition > 0 ? gridPresetColumns.splice(columnPosition, 0, dynColumn) : gridPresetColumns.unshift(dynColumn);\n }\n }\n }\n }\n\n /** Load any possible Columns Grid Presets */\n protected loadColumnPresetsWhenDatasetInitialized() {\n // if user entered some Columns \"presets\", we need to reflect them all in the grid\n if (this.grid && this.options.presets && Array.isArray(this.options.presets.columns) && this.options.presets.columns.length > 0) {\n const gridPresetColumns: Column<TData>[] = this.gridStateService.getAssociatedGridColumns(this.grid, this.options.presets.columns);\n if (gridPresetColumns && Array.isArray(gridPresetColumns) && gridPresetColumns.length > 0 && Array.isArray(this._columns)) {\n // make sure that the dynamic columns are included in presets (1.Row Move, 2. Row Selection, 3. Row Detail)\n if (this.options.enableRowMoveManager) {\n const rmmColId = this.options?.rowMoveManager?.columnId ?? '_move';\n this.insertDynamicPresetColumns(rmmColId, gridPresetColumns);\n }\n if (this.options.enableCheckboxSelector) {\n const chkColId = this.options?.checkboxSelector?.columnId ?? '_checkbox_selector';\n this.insertDynamicPresetColumns(chkColId, gridPresetColumns);\n }\n if (this.options.enableRowDetailView) {\n const rdvColId = this.options?.rowDetailView?.columnId ?? '_detail_selector';\n this.insertDynamicPresetColumns(rdvColId, gridPresetColumns);\n }\n\n // keep copy the original optional `width` properties optionally provided by the user.\n // We will use this when doing a resize by cell content, if user provided a `width` it won't override it.\n gridPresetColumns.forEach((col) => (col.originalWidth = col.width));\n\n // finally set the new presets columns (including checkbox selector if need be)\n this.grid.setColumns(gridPresetColumns);\n this.sharedService.visibleColumns = gridPresetColumns;\n }\n }\n }\n\n /** Load any possible Filters Grid Presets */\n protected loadFilterPresetsWhenDatasetInitialized() {\n if (this._options && !this.props.customDataView) {\n // if user entered some Filter \"presets\", we need to reflect them all in the DOM\n if (\n this._options.presets &&\n (Array.isArray(this._options.presets.filters) || Array.isArray(this._options.presets?.treeData?.toggledItems))\n ) {\n this.filterService.populateColumnFilterSearchTermPresets(this._options.presets?.filters || []);\n }\n }\n }\n\n /**\n * local grid, check if we need to show the Pagination\n * if so then also check if there's any presets and finally initialize the PaginationService\n * 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\n */\n protected loadLocalGridPagination(dataset?: any[]) {\n if (this._options && this._paginationOptions) {\n this.totalItems = Array.isArray(dataset) ? dataset.length : 0;\n if (this._paginationOptions && this.dataView?.getPagingInfo) {\n const slickPagingInfo = this.dataView.getPagingInfo();\n if (slickPagingInfo?.hasOwnProperty('totalRows') && this._paginationOptions.totalItems !== slickPagingInfo.totalRows) {\n this.totalItems = slickPagingInfo.totalRows || 0;\n }\n }\n this._paginationOptions.totalItems = this.totalItems;\n const paginationOptions = this.setPaginationOptionsWhenPresetDefined(this._options, this._paginationOptions);\n this.initializePaginationService(paginationOptions);\n }\n }\n\n /** Load any Row Selections into the DataView that were presets by the user */\n protected loadRowSelectionPresetWhenExists() {\n // if user entered some Row Selections \"presets\"\n const presets = this._options?.presets;\n const enableRowSelection = this._options && (this._options.enableCheckboxSelector || this._options.enableRowSelection);\n if (\n enableRowSelection &&\n this.grid?.getSelectionModel() &&\n presets?.rowSelection &&\n (Array.isArray(presets.rowSelection.gridRowIndexes) || Array.isArray(presets.rowSelection.dataContextIds))\n ) {\n let dataContextIds = presets.rowSelection.dataContextIds;\n let gridRowIndexes = presets.rowSelection.gridRowIndexes;\n\n // maps the IDs to the Grid Rows and vice versa, the \"dataContextIds\" has precedence over the other\n if (Array.isArray(dataContextIds) && dataContextIds.length > 0) {\n gridRowIndexes = this.dataView.mapIdsToRows(dataContextIds) || [];\n } else if (Array.isArray(gridRowIndexes) && gridRowIndexes.length > 0) {\n dataContextIds = this.dataView.mapRowsToIds(gridRowIndexes) || [];\n }\n\n // apply row selection when defined as grid presets\n if (this.grid && Array.isArray(gridRowIndexes)) {\n this.grid.setSelectedRows(gridRowIndexes);\n this.dataView!.setSelectedIds(dataContextIds || [], {\n isRowBeingAdded: true,\n shouldTriggerEvent: false, // do not trigger when presetting the grid\n applyRowSelectionToGrid: true,\n });\n }\n }\n }\n\n hasBackendInfiniteScroll(gridOptions?: GridOption): boolean {\n return !!(gridOptions || this.options).backendServiceApi?.service.options?.infiniteScroll;\n }\n\n protected mergeGridOptions(gridOptions: GridOption): GridOption {\n // use extend to deep merge & copy to avoid immutable properties being changed in GlobalGridOptions after a route change\n const options = extend(true, {}, GlobalGridOptions, gridOptions) as GridOption;\n\n options.gridId = this.props.gridId;\n options.gridContainerId = `slickGridContainer-${this.props.gridId}`;\n\n // also make sure to show the header row if user have enabled filtering\n if (options.enableFiltering && !options.showHeaderRow) {\n options.showHeaderRow = options.enableFiltering;\n }\n\n // using copy extend to do a deep clone has an unwanted side on objects and pageSizes but ES6 spread has other worst side effects\n // so we will just overwrite the pageSizes when needed, this is the only one causing issues so far.\n // On a deep extend, Object and Array are extended, but object wrappers on primitive types such as String, Boolean, and Number are not.\n if (\n options?.pagination &&\n (gridOptions.enablePagination || gridOptions.backendServiceApi) &&\n gridOptions.pagination &&\n Array.isArray(gridOptions.pagination.pageSizes)\n ) {\n options.pagination.pageSizes = gridOptions.pagination.pageSizes;\n }\n\n // when we use Pagination on Local Grid, it doesn't seem to work without enableFiltering\n // so we'll enable the filtering but we'll keep the header row hidden\n if (this.sharedService && !options.enableFiltering && options.enablePagination && this._isLocalGrid) {\n options.enableFiltering = true;\n options.showHeaderRow = false;\n this._hideHeaderRowAfterPageLoad = true;\n this.sharedService.hideHeaderRowAfterPageLoad = true;\n }\n\n return options;\n }\n\n /** 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. */\n registerExternalResources(resources: ExternalResource[], disposePreviousResources = false) {\n if (disposePreviousResources) {\n this.disposeExternalResources();\n }\n resources.forEach((res) => this._registeredResources.push(res));\n this.initializeExternalResources(resources);\n }\n\n resetExternalResources() {\n this._registeredResources = [];\n }\n\n /** Pre-Register any Resource that don't require SlickGrid to be instantiated (for example RxJS Resource & RowDetail) */\n protected preRegisterResources() {\n this._registeredResources = this.options.externalResources || [];\n\n // bind & initialize all Components/Services that were tagged as enabled\n // register all services by executing their init method and providing them with the Grid object\n if (Array.isArray(this._registeredResources)) {\n for (const resource of this._registeredResources) {\n if (resource?.className === 'RxJsResource') {\n this.registerRxJsResource(resource as RxJsFacade);\n }\n }\n }\n }\n\n protected initializeExternalResources(resources: ExternalResource[]) {\n if (Array.isArray(resources)) {\n for (const resource of resources) {\n if (this.grid && typeof resource.init === 'function') {\n resource.init(this.grid, this.props.containerService);\n }\n }\n }\n }\n\n protected registerResources() {\n // at this point, we consider all the registered services as external services, anything else registered afterward aren't external\n if (Array.isArray(this._registeredResources)) {\n this.sharedService.externalRegisteredResources = this._registeredResources;\n }\n\n // push all other Services that we want to be registered\n this._registeredResources.push(this.gridService, this.gridStateService);\n\n // when using Grouping/DraggableGrouping/Colspan register its Service\n if (\n (this.options.createPreHeaderPanel && this.options.createTopHeaderPanel) ||\n (this.options.createPreHeaderPanel && !this.options.enableDraggableGrouping)\n ) {\n this._registeredResources.push(this.headerGroupingService);\n }\n\n // when using Tree Data View, register its Service\n if (this.options.enableTreeData) {\n this._registeredResources.push(this.treeDataService);\n }\n\n // when user enables translation, we need to translate Headers on first pass & subsequently in the bindDifferentHooks\n if (this.options.enableTranslate) {\n this.extensionService.translateColumnHeaders();\n }\n\n // also initialize (render) the empty warning component\n this.slickEmptyWarning = new SlickEmptyWarningComponent();\n this._registeredResources.push(this.slickEmptyWarning);\n\n // bind & initialize all Components/Services that were tagged as enabled\n // register all services by executing their init method and providing them with the Grid object\n this.initializeExternalResources(this._registeredResources);\n }\n\n /** Register the RxJS Resource in all necessary services which uses */\n protected registerRxJsResource(resource: RxJsFacade) {\n this.rxjs = resource;\n this.backendUtilityService.addRxJsResource(this.rxjs);\n this.filterFactory.addRxJsResource(this.rxjs);\n this.filterService.addRxJsResource(this.rxjs);\n this.sortService.addRxJsResource(this.rxjs);\n this.paginationService.addRxJsResource(this.rxjs);\n this.props.containerService.registerInstance('RxJsResource', this.rxjs);\n }\n\n /**\n * Takes a flat dataset with parent/child relationship, sort it (via its tree structure) and return the sorted flat array\n * @param {Array<Object>} flatDatasetInput - flat dataset input\n * @param {Boolean} forceGridRefresh - optionally force a full grid refresh\n * @returns {Array<Object>} sort flat parent/child dataset\n */\n protected sortTreeDataset<U>(flatDatasetInput: U[], forceGridRefresh = false): U[] {\n const prevDatasetLn = this._currentDatasetLength;\n let sortedDatasetResult;\n let flatDatasetOutput: any[] = [];\n\n // if the hierarchical dataset was already initialized then no need to re-convert it, we can use it directly from the shared service ref\n if (this._isDatasetHierarchicalInitialized && this.datasetHierarchical) {\n sortedDatasetResult = this.treeDataService.sortHierarchicalDataset(this.datasetHierarchical);\n flatDatasetOutput = sortedDatasetResult.flat;\n } else if (this._options && Array.isArray(flatDatasetInput) && flatDatasetInput.length > 0) {\n // we need to first convert the flat dataset to a hierarchical dataset and then sort it\n // we'll also add props, by mutation, required by the TreeDataService on the flat array like `__hasChildren`, `parentId` and anything else to work properly\n sortedDatasetResult = this.treeDataService.convertFlatParentChildToTreeDatasetAndSort(flatDatasetInput, this._columns, this._options);\n this.sharedService.hierarchicalDataset = sortedDatasetResult.hierarchical;\n flatDatasetOutput = sortedDatasetResult.flat;\n }\n\n // if we add/remove item(s) from the dataset, we need to also refresh our tree data filters\n if (flatDatasetInput.length > 0 && (forceGridRefresh || flatDatasetInput.length !== prevDatasetLn)) {\n this.filterService.refreshTreeDataFilters(flatDatasetOutput);\n }\n\n return flatDatasetOutput;\n }\n\n /** Prepare and load all SlickGrid editors, if an async editor is found then we'll also execute it. */\n protected loadSlickGridEditors(columns: Column<TData>[]): Column<TData>[] {\n if (columns.some((col) => `${col?.id}`.includes('.'))) {\n console.warn(\n '[Slickgrid-React] Make sure that none of your Column Definition \"id\" property includes a dot in its name because that will cause some problems with the Editors. For example if your column definition \"field\" property is \"user.firstName\" then use \"firstName\" as the column \"id\".'\n );\n }\n\n return columns.map((column: Column | any) => {\n if (column) {\n // on every Editor which have a \"collection\" or a \"collectionAsync\"\n if (column.editor?.collectionAsync) {\n this.loadEditorCollectionAsync(column);\n }\n return { ...column, editorClass: column.editor?.model };\n }\n });\n }\n\n protected suggestDateParsingWhenHelpful() {\n if (\n this.dataView?.getItemCount() > WARN_NO_PREPARSE_DATE_SIZE &&\n !this.options.silenceWarnings &&\n !this.options.preParseDateColumns &&\n this.grid.getColumns().some((c) => isColumnDateType(c.type))\n ) {\n console.warn(\n '[Slickgrid-React] For getting better perf, we suggest you enable the `preParseDateColumns` grid option, ' +\n 'for more info visit => https://ghiscoding.gitbook.io/slickgrid-react/column-functionalities/sorting#pre-parse-date-columns-for-better-perf'\n );\n }\n }\n\n /**\n * When the Editor(s) has a \"editor.collection\" property, we'll load the async collection.\n * Since this is called after the async call resolves, the pointer will not be the same as the \"column\" argument passed.\n */\n protected updateEditorCollection<U extends TData = any>(column: Column<U>, newCollection: U[]) {\n if (this.grid && column.editor) {\n column.editor.collection = newCollection;\n column.editor.disabled = false;\n\n // get current Editor, remove it from the DOM then re-enable it and re-render it with the new collection.\n const currentEditor = this.grid.getCellEditor() as AutocompleterEditor | SelectEditor;\n if (currentEditor?.disable && currentEditor?.renderDomElement) {\n currentEditor.destroy();\n currentEditor.disable(false);\n currentEditor.renderDomElement(newCollection);\n }\n }\n }\n\n render() {\n return (\n <div\n id={`slickGridContainer-${this.props.gridId}`}\n className=\"grid-pane\"\n ref={(elm) => {\n this._elm = elm as HTMLDivElement;\n }}\n >\n {/* <!-- Header slot if you need to create a complex custom header --> */}\n {this.props.header && <div className=\"header\">{this.props.header}</div>}\n\n <div id={`${this.props.gridId}`} className=\"slickgrid-container\"></div>\n\n {/* <!--Footer slot if you need to create a complex custom footer-- > */}\n {this.props.footer && <div className=\"footer\">{this.props.footer}</div>}\n </div>\n );\n }\n}\n"]}
@@ -47,8 +47,8 @@ export const GlobalGridOptions = {
47
47
  massUpdateStatusKey: 'ALL_X_RECORDS_SELECTED',
48
48
  saveButtonKey: 'SAVE',
49
49
  },
50
- resetEditorButtonCssClass: 'mdi mdi-refresh mdi-15px',
51
- resetFormButtonIconCssClass: 'mdi mdi-refresh mdi-16px mdi-flip-h',
50
+ resetEditorButtonCssClass: 'mdi mdi-refresh font-15px',
51
+ resetFormButtonIconCssClass: 'mdi mdi-refresh font-16px mdi-flip-h',
52
52
  },
53
53
  contextMenu: {
54
54
  autoAdjustDrop: true,
@@ -245,7 +245,6 @@ export const GlobalGridOptions = {
245
245
  resizeByContentOnlyOnFirstLoad: true,
246
246
  resizeByContentOptions: {
247
247
  alwaysRecalculateColumnWidth: false,
248
- cellCharWidthInPx: 7.8,
249
248
  cellPaddingWidthInPx: 14,
250
249
  defaultRatioForStringType: 0.88,
251
250
  formatterPaddingWidthInPx: 0,
@@ -1 +1 @@
1
- {"version":3,"file":"global-grid-options.js","sourceRoot":"","sources":["../src/global-grid-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,aAAa,EAAE,gBAAgB,EAAE,OAAO,EAAuB,MAAM,6BAA6B,CAAC;AAIzH;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAwB;IACpD,wBAAwB,EAAE,IAAI;IAC9B,QAAQ,EAAE,KAAK;IACf,kBAAkB,EAAE,KAAK;IACzB,yBAAyB,EAAE,IAAI;IAC/B,UAAU,EAAE;QACV,sBAAsB,EAAE,IAAI;QAC5B,UAAU,EAAE,IAAI;QAChB,mBAAmB,EAAE,GAAG;QACxB,wBAAwB,EAAE,QAAQ;QAClC,aAAa,EAAE,EAAE;QACjB,SAAS,EAAE,GAAG;QACd,QAAQ,EAAE,GAAG;QACb,YAAY,EAAE,CAAC;KAChB;IACD,qBAAqB,EAAE,qBAAqB;IAC5C,gBAAgB,EAAE;QAChB,QAAQ,EAAE,wBAAwB;QAClC,KAAK,EAAE,EAAE;KACV;IACD,QAAQ,EAAE;QACR,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,IAAI;QACnB,eAAe,EAAE,IAAI;QACrB,kBAAkB,EAAE,KAAK;QACzB,iBAAiB,EAAE,KAAK;KACzB;IACD,oBAAoB,EAAE,KAAK;IAC3B,YAAY,EAAE;QACZ,kBAAkB,EAAE,KAAK;QACzB,oBAAoB,EAAE,IAAI;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,IAAI,WAAW,EAAE,CAAC;QAChB,OAAO,WAAW,GAAG,oBAAoB,GAAG,OAAO,CAAC;IACtD,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC","sourcesContent":["import { type Column, DelimiterType, EventNamingStyle, Filters, type TreeDataOption } from '@slickgrid-universal/common';\n\nimport type { GridOption, RowDetailView } from './models/index.js';\n\n/**\n * Default Options that can be passed to the Slickgrid-React\n */\nexport const GlobalGridOptions: Partial<GridOption> = {\n alwaysShowVerticalScroll: true,\n autoEdit: false,\n asyncEditorLoading: false,\n autoFitColumnsOnFirstLoad: true,\n autoResize: {\n applyResizeToContainer: true,\n autoHeight: true,\n autoHeightRecalcRow: 100,\n calculateAvailableSizeBy: 'window',\n bottomPadding: 20,\n minHeight: 250,\n minWidth: 300,\n rightPadding: 0,\n },\n cellHighlightCssClass: 'slick-cell-modified',\n checkboxSelector: {\n cssClass: 'slick-cell-checkboxsel',\n width: 40,\n },\n cellMenu: {\n autoAdjustDrop: true,\n autoAlignSide: true,\n hideCloseButton: true,\n hideCommandSection: false,\n hideOptionSection: false,\n },\n columnGroupSeparator: ' - ',\n columnPicker: {\n hideForceFitButton: false,\n hideSyncResizeButton: true,\n headerColumnValueExtractor: pickerHeaderColumnValueExtractor,\n },\n compositeEditorOptions: {\n labels: {\n cancelButtonKey: 'CANCEL',\n cloneButtonKey: 'CLONE',\n resetEditorButtonTooltipKey: 'RESET_INPUT_VALUE',\n resetFormButtonKey: 'RESET_FORM',\n massSelectionButtonKey: 'APPLY_TO_SELECTION',\n massSelectionStatusKey: 'X_OF_Y_MASS_SELECTED',\n massUpdateButtonKey: 'APPLY_MASS_UPDATE',\n massUpdateStatusKey: 'ALL_X_RECORDS_SELECTED',\n saveButtonKey: 'SAVE',\n },\n resetEditorButtonCssClass: 'mdi mdi-refresh mdi-15px',\n resetFormButtonIconCssClass: 'mdi mdi-refresh mdi-16px mdi-flip-h',\n },\n contextMenu: {\n autoAdjustDrop: true,\n autoAlignSide: true,\n hideCloseButton: true,\n hideClearAllGrouping: false,\n hideCollapseAllGroups: false,\n hideCommandSection: false,\n hideCopyCellValueCommand: false,\n hideExpandAllGroups: false,\n hideExportCsvCommand: false,\n hideExportExcelCommand: false,\n hideExportTextDelimitedCommand: true,\n hideMenuOnScroll: true,\n hideOptionSection: false,\n iconCollapseAllGroupsCommand: 'mdi mdi-arrow-collapse',\n iconExpandAllGroupsCommand: 'mdi mdi-arrow-expand',\n iconClearGroupingCommand: 'mdi mdi-close',\n iconCopyCellValueCommand: 'mdi mdi-content-copy',\n iconExportCsvCommand: 'mdi mdi-download',\n iconExportExcelCommand: 'mdi mdi-file-excel-outline text-success',\n iconExportTextDelimitedCommand: 'mdi mdi-download',\n },\n customFooterOptions: {\n dateFormat: 'YYYY-MM-DD, hh:mm a',\n hideRowSelectionCount: false,\n hideTotalItemCount: false,\n hideLastUpdateTimestamp: true,\n footerHeight: 25,\n leftContainerClass: 'col-xs-12 col-sm-5',\n rightContainerClass: 'col-xs-6 col-sm-7',\n metricSeparator: '|',\n metricTexts: {\n items: 'items',\n itemsKey: 'ITEMS',\n of: 'of',\n ofKey: 'OF',\n itemsSelected: 'items selected',\n itemsSelectedKey: 'ITEMS_SELECTED',\n },\n },\n dataView: {\n // when enabled, this will preserve the row selection even after filtering/sorting/grouping\n syncGridSelection: {\n preserveHidden: false,\n preserveHiddenOnSelectionChange: true,\n },\n syncGridSelectionWithBackendService: false, // but disable it when using backend services\n },\n datasetIdPropertyName: 'id',\n defaultFilter: Filters.input,\n defaultBackendServiceFilterTypingDebounce: 500,\n defaultColumnSortFieldId: 'id',\n defaultFilterPlaceholder: '🔎︎', // magnifying glass icon\n defaultFilterRangeOperator: 'RangeInclusive',\n editable: false,\n editorTypingDebounce: 450,\n filterTypingDebounce: 0,\n enableEmptyDataWarningMessage: true,\n enableFilterTrimWhiteSpace: false, // do we want to trim white spaces on all Filters?\n emptyDataWarning: {\n className: 'slick-empty-data-warning',\n message: 'No data to display.',\n messageKey: 'EMPTY_DATA_WARNING_MESSAGE',\n hideFrozenLeftWarning: false,\n hideFrozenRightWarning: false,\n leftViewportMarginLeft: '40%',\n rightViewportMarginLeft: '40%',\n frozenLeftViewportMarginLeft: '0px',\n frozenRightViewportMarginLeft: '40%',\n },\n enableAutoResize: true,\n enableAutoSizeColumns: true,\n enableCellNavigation: false,\n enableColumnPicker: true,\n enableColumnReorder: true,\n enableColumnResizeOnDoubleClick: true,\n enableContextMenu: true,\n enableExcelExport: false,\n enableTextExport: false,\n enableGridMenu: true,\n enableHeaderMenu: true,\n enableMouseHoverHighlightRow: true,\n enableSorting: true,\n enableTextSelectionOnCells: true,\n eventNamingStyle: EventNamingStyle.camelCase,\n explicitInitialization: true,\n excelExportOptions: {\n addGroupIndentation: true,\n exportWithFormatter: false,\n filename: 'export',\n format: 'xlsx',\n groupingColumnHeaderTitle: 'Group By',\n groupCollapsedSymbol: '⮞',\n groupExpandedSymbol: '⮟',\n groupingAggregatorRowText: '',\n sanitizeDataExport: false,\n },\n textExportOptions: {\n delimiter: DelimiterType.comma,\n exportWithFormatter: false,\n filename: 'export',\n format: 'csv',\n groupingColumnHeaderTitle: 'Group By',\n groupingAggregatorRowText: '',\n sanitizeDataExport: false,\n useUtf8WithBom: true,\n },\n forceFitColumns: false,\n frozenHeaderWidthCalcDifferential: 1,\n gridMenu: {\n commandLabels: {\n clearAllFiltersCommandKey: 'CLEAR_ALL_FILTERS',\n clearAllSortingCommandKey: 'CLEAR_ALL_SORTING',\n clearFrozenColumnsCommandKey: 'CLEAR_PINNING',\n exportCsvCommandKey: 'EXPORT_TO_CSV',\n exportExcelCommandKey: 'EXPORT_TO_EXCEL',\n exportTextDelimitedCommandKey: 'EXPORT_TO_TAB_DELIMITED',\n refreshDatasetCommandKey: 'REFRESH_DATASET',\n toggleDarkModeCommandKey: 'TOGGLE_DARK_MODE',\n toggleFilterCommandKey: 'TOGGLE_FILTER_ROW',\n togglePreHeaderCommandKey: 'TOGGLE_PRE_HEADER_ROW',\n },\n hideClearAllFiltersCommand: false,\n hideClearAllSortingCommand: false,\n hideClearFrozenColumnsCommand: true, // opt-in command\n hideExportCsvCommand: false,\n hideExportExcelCommand: false,\n hideExportTextDelimitedCommand: true,\n hideForceFitButton: false,\n hideRefreshDatasetCommand: false,\n hideSyncResizeButton: true,\n hideToggleDarkModeCommand: true,\n hideToggleFilterCommand: false,\n hideTogglePreHeaderCommand: false,\n iconCssClass: 'mdi mdi-menu',\n iconClearAllFiltersCommand: 'mdi mdi-filter-remove-outline',\n iconClearAllSortingCommand: 'mdi mdi-sort-variant-off',\n iconClearFrozenColumnsCommand: 'mdi mdi-close',\n iconExportCsvCommand: 'mdi mdi-download',\n iconExportExcelCommand: 'mdi mdi-file-excel-outline',\n iconExportTextDelimitedCommand: 'mdi mdi-download',\n iconRefreshDatasetCommand: 'mdi mdi-sync',\n iconToggleDarkModeCommand: 'mdi mdi-brightness-4 mdi mdi-brightness-4',\n iconToggleFilterCommand: 'mdi mdi-flip-vertical',\n iconTogglePreHeaderCommand: 'mdi mdi-flip-vertical',\n menuWidth: 16,\n resizeOnShowHeaderRow: true,\n headerColumnValueExtractor: pickerHeaderColumnValueExtractor,\n },\n headerMenu: {\n autoAlign: true,\n autoAlignOffset: 12,\n minWidth: 140,\n iconClearFilterCommand: 'mdi mdi-filter-remove-outline',\n iconClearSortCommand: 'mdi mdi-sort-variant-off',\n iconFreezeColumns: 'mdi mdi-pin-outline',\n iconUnfreezeColumns: 'mdi mdi-pin-off-outline',\n iconSortAscCommand: 'mdi mdi-sort-ascending',\n iconSortDescCommand: 'mdi mdi-sort-descending',\n iconColumnHideCommand: 'mdi mdi-close',\n iconColumnResizeByContentCommand: 'mdi mdi-arrow-expand-horizontal',\n hideColumnResizeByContentCommand: false,\n hideColumnHideCommand: false,\n hideClearFilterCommand: false,\n hideClearSortCommand: false,\n hideFreezeColumnsCommand: true, // opt-in command\n hideSortCommands: false,\n },\n multiColumnSort: true,\n numberedMultiColumnSort: true,\n tristateMultiColumnSort: false,\n sortColNumberInSeparateSpan: true,\n suppressActiveCellChangeOnEdit: false,\n pagination: {\n pageSizes: [10, 15, 20, 25, 30, 40, 50, 75, 100],\n pageSize: 25,\n totalItems: 0,\n },\n rowDetailView: {\n collapseAllOnSort: true,\n cssClass: 'detail-view-toggle',\n panelRows: 1,\n keyPrefix: '__',\n useRowClick: false,\n saveDetailViewOnScroll: false,\n } as RowDetailView,\n headerRowHeight: 35,\n rowHeight: 35,\n topPanelHeight: 30,\n preHeaderPanelWidth: '100%', // mostly useful for Draggable Grouping dropzone to take full width\n translationNamespaceSeparator: ':',\n resetFilterSearchValueAfterOnBeforeCancellation: true,\n resizeByContentOnlyOnFirstLoad: true,\n resizeByContentOptions: {\n alwaysRecalculateColumnWidth: false,\n cellCharWidthInPx: 7.8,\n cellPaddingWidthInPx: 14,\n defaultRatioForStringType: 0.88,\n formatterPaddingWidthInPx: 0,\n maxItemToInspectCellContentWidth: 1000,\n maxItemToInspectSingleColumnWidthByContent: 5000,\n widthToRemoveFromExceededWidthReadjustment: 50,\n },\n rowTopOffsetRenderType: 'transform',\n treeDataOptions: {\n exportIndentMarginLeft: 5,\n exportIndentationLeadingChar: '͏͏͏͏͏͏͏͏͏·',\n } as unknown as TreeDataOption,\n};\n\n/**\n * Value Extractor for both ColumnPicker & GridMenu Picker\n * when using Column Header Grouping, we'll prefix the column group title\n * else we'll simply return the column name title\n */\nfunction pickerHeaderColumnValueExtractor(column: Column, gridOptions?: GridOption) {\n let colName = column?.columnPickerLabel ?? column?.name ?? '';\n if (colName instanceof HTMLElement || colName instanceof DocumentFragment) {\n colName = colName.textContent || '';\n }\n const headerGroup = column?.columnGroup || '';\n const columnGroupSeparator = gridOptions?.columnGroupSeparator ?? ' - ';\n if (headerGroup) {\n return headerGroup + columnGroupSeparator + colName;\n }\n return colName;\n}\n"]}
1
+ {"version":3,"file":"global-grid-options.js","sourceRoot":"","sources":["../src/global-grid-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,aAAa,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BAA8B,EAAE,IAAI;IACpC,sBAAsB,EAAE;QACtB,4BAA4B,EAAE,KAAK;QACnC,oBAAoB,EAAE,EAAE;QACxB,yBAAyB,EAAE,IAAI;QAC/B,yBAAyB,EAAE,CAAC;QAC5B,gCAAgC,EAAE,IAAI;QACtC,0CAA0C,EAAE,IAAI;QAChD,0CAA0C,EAAE,EAAE;KAC/C;IACD,sBAAsB,EAAE,WAAW;IACnC,eAAe,EAAE;QACf,sBAAsB,EAAE,CAAC;QACzB,4BAA4B,EAAE,YAAY;KACd;CAC/B,CAAC;AAEF;;;;GAIG;AACH,SAAS,gCAAgC,CAAC,MAAc,EAAE,WAAwB;IAChF,IAAI,OAAO,GAAG,MAAM,EAAE,iBAAiB,IAAI,MAAM,EAAE,IAAI,IAAI,EAAE,CAAC;IAC9D,IAAI,OAAO,YAAY,WAAW,IAAI,OAAO,YAAY,gBAAgB,EAAE,CAAC;QAC1E,OAAO,GAAG,OAAO,CAAC,WAAW,IAAI,EAAE,CAAC;IACtC,CAAC;IACD,MAAM,WAAW,GAAG,MAAM,EAAE,WAAW,IAAI,EAAE,CAAC;IAC9C,MAAM,oBAAoB,GAAG,WAAW,EAAE,oBAAoB,IAAI,KAAK,CAAC;IACxE,IAAI,WAAW,EAAE,CAAC;QAChB,OAAO,WAAW,GAAG,oBAAoB,GAAG,OAAO,CAAC;IACtD,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC","sourcesContent":["import { type Column, DelimiterType, EventNamingStyle, Filters, type TreeDataOption } from '@slickgrid-universal/common';\n\nimport type { GridOption, RowDetailView } from './models/index.js';\n\n/**\n * Default Options that can be passed to the Slickgrid-React\n */\nexport const GlobalGridOptions: Partial<GridOption> = {\n alwaysShowVerticalScroll: true,\n autoEdit: false,\n asyncEditorLoading: false,\n autoFitColumnsOnFirstLoad: true,\n autoResize: {\n applyResizeToContainer: true,\n autoHeight: true,\n autoHeightRecalcRow: 100,\n calculateAvailableSizeBy: 'window',\n bottomPadding: 20,\n minHeight: 250,\n minWidth: 300,\n rightPadding: 0,\n },\n cellHighlightCssClass: 'slick-cell-modified',\n checkboxSelector: {\n cssClass: 'slick-cell-checkboxsel',\n width: 40,\n },\n cellMenu: {\n autoAdjustDrop: true,\n autoAlignSide: true,\n hideCloseButton: true,\n hideCommandSection: false,\n hideOptionSection: false,\n },\n columnGroupSeparator: ' - ',\n columnPicker: {\n hideForceFitButton: false,\n hideSyncResizeButton: true,\n headerColumnValueExtractor: pickerHeaderColumnValueExtractor,\n },\n compositeEditorOptions: {\n labels: {\n cancelButtonKey: 'CANCEL',\n cloneButtonKey: 'CLONE',\n resetEditorButtonTooltipKey: 'RESET_INPUT_VALUE',\n resetFormButtonKey: 'RESET_FORM',\n massSelectionButtonKey: 'APPLY_TO_SELECTION',\n massSelectionStatusKey: 'X_OF_Y_MASS_SELECTED',\n massUpdateButtonKey: 'APPLY_MASS_UPDATE',\n massUpdateStatusKey: 'ALL_X_RECORDS_SELECTED',\n saveButtonKey: 'SAVE',\n },\n resetEditorButtonCssClass: 'mdi mdi-refresh font-15px',\n resetFormButtonIconCssClass: 'mdi mdi-refresh font-16px mdi-flip-h',\n },\n contextMenu: {\n autoAdjustDrop: true,\n autoAlignSide: true,\n hideCloseButton: true,\n hideClearAllGrouping: false,\n hideCollapseAllGroups: false,\n hideCommandSection: false,\n hideCopyCellValueCommand: false,\n hideExpandAllGroups: false,\n hideExportCsvCommand: false,\n hideExportExcelCommand: false,\n hideExportTextDelimitedCommand: true,\n hideMenuOnScroll: true,\n hideOptionSection: false,\n iconCollapseAllGroupsCommand: 'mdi mdi-arrow-collapse',\n iconExpandAllGroupsCommand: 'mdi mdi-arrow-expand',\n iconClearGroupingCommand: 'mdi mdi-close',\n iconCopyCellValueCommand: 'mdi mdi-content-copy',\n iconExportCsvCommand: 'mdi mdi-download',\n iconExportExcelCommand: 'mdi mdi-file-excel-outline text-success',\n iconExportTextDelimitedCommand: 'mdi mdi-download',\n },\n customFooterOptions: {\n dateFormat: 'YYYY-MM-DD, hh:mm a',\n hideRowSelectionCount: false,\n hideTotalItemCount: false,\n hideLastUpdateTimestamp: true,\n footerHeight: 25,\n leftContainerClass: 'col-xs-12 col-sm-5',\n rightContainerClass: 'col-xs-6 col-sm-7',\n metricSeparator: '|',\n metricTexts: {\n items: 'items',\n itemsKey: 'ITEMS',\n of: 'of',\n ofKey: 'OF',\n itemsSelected: 'items selected',\n itemsSelectedKey: 'ITEMS_SELECTED',\n },\n },\n dataView: {\n // when enabled, this will preserve the row selection even after filtering/sorting/grouping\n syncGridSelection: {\n preserveHidden: false,\n preserveHiddenOnSelectionChange: true,\n },\n syncGridSelectionWithBackendService: false, // but disable it when using backend services\n },\n datasetIdPropertyName: 'id',\n defaultFilter: Filters.input,\n defaultBackendServiceFilterTypingDebounce: 500,\n defaultColumnSortFieldId: 'id',\n defaultFilterPlaceholder: '🔎︎', // magnifying glass icon\n defaultFilterRangeOperator: 'RangeInclusive',\n editable: false,\n editorTypingDebounce: 450,\n filterTypingDebounce: 0,\n enableEmptyDataWarningMessage: true,\n enableFilterTrimWhiteSpace: false, // do we want to trim white spaces on all Filters?\n emptyDataWarning: {\n className: 'slick-empty-data-warning',\n message: 'No data to display.',\n messageKey: 'EMPTY_DATA_WARNING_MESSAGE',\n hideFrozenLeftWarning: false,\n hideFrozenRightWarning: false,\n leftViewportMarginLeft: '40%',\n rightViewportMarginLeft: '40%',\n frozenLeftViewportMarginLeft: '0px',\n frozenRightViewportMarginLeft: '40%',\n },\n enableAutoResize: true,\n enableAutoSizeColumns: true,\n enableCellNavigation: false,\n enableColumnPicker: true,\n enableColumnReorder: true,\n enableColumnResizeOnDoubleClick: true,\n enableContextMenu: true,\n enableExcelExport: false,\n enableTextExport: false,\n enableGridMenu: true,\n enableHeaderMenu: true,\n enableMouseHoverHighlightRow: true,\n enableSorting: true,\n enableTextSelectionOnCells: true,\n eventNamingStyle: EventNamingStyle.camelCase,\n explicitInitialization: true,\n excelExportOptions: {\n addGroupIndentation: true,\n exportWithFormatter: false,\n filename: 'export',\n format: 'xlsx',\n groupingColumnHeaderTitle: 'Group By',\n groupCollapsedSymbol: '⮞',\n groupExpandedSymbol: '⮟',\n groupingAggregatorRowText: '',\n sanitizeDataExport: false,\n },\n textExportOptions: {\n delimiter: DelimiterType.comma,\n exportWithFormatter: false,\n filename: 'export',\n format: 'csv',\n groupingColumnHeaderTitle: 'Group By',\n groupingAggregatorRowText: '',\n sanitizeDataExport: false,\n useUtf8WithBom: true,\n },\n forceFitColumns: false,\n frozenHeaderWidthCalcDifferential: 1,\n gridMenu: {\n commandLabels: {\n clearAllFiltersCommandKey: 'CLEAR_ALL_FILTERS',\n clearAllSortingCommandKey: 'CLEAR_ALL_SORTING',\n clearFrozenColumnsCommandKey: 'CLEAR_PINNING',\n exportCsvCommandKey: 'EXPORT_TO_CSV',\n exportExcelCommandKey: 'EXPORT_TO_EXCEL',\n exportTextDelimitedCommandKey: 'EXPORT_TO_TAB_DELIMITED',\n refreshDatasetCommandKey: 'REFRESH_DATASET',\n toggleDarkModeCommandKey: 'TOGGLE_DARK_MODE',\n toggleFilterCommandKey: 'TOGGLE_FILTER_ROW',\n togglePreHeaderCommandKey: 'TOGGLE_PRE_HEADER_ROW',\n },\n hideClearAllFiltersCommand: false,\n hideClearAllSortingCommand: false,\n hideClearFrozenColumnsCommand: true, // opt-in command\n hideExportCsvCommand: false,\n hideExportExcelCommand: false,\n hideExportTextDelimitedCommand: true,\n hideForceFitButton: false,\n hideRefreshDatasetCommand: false,\n hideSyncResizeButton: true,\n hideToggleDarkModeCommand: true,\n hideToggleFilterCommand: false,\n hideTogglePreHeaderCommand: false,\n iconCssClass: 'mdi mdi-menu',\n iconClearAllFiltersCommand: 'mdi mdi-filter-remove-outline',\n iconClearAllSortingCommand: 'mdi mdi-sort-variant-off',\n iconClearFrozenColumnsCommand: 'mdi mdi-close',\n iconExportCsvCommand: 'mdi mdi-download',\n iconExportExcelCommand: 'mdi mdi-file-excel-outline',\n iconExportTextDelimitedCommand: 'mdi mdi-download',\n iconRefreshDatasetCommand: 'mdi mdi-sync',\n iconToggleDarkModeCommand: 'mdi mdi-brightness-4 mdi mdi-brightness-4',\n iconToggleFilterCommand: 'mdi mdi-flip-vertical',\n iconTogglePreHeaderCommand: 'mdi mdi-flip-vertical',\n menuWidth: 16,\n resizeOnShowHeaderRow: true,\n headerColumnValueExtractor: pickerHeaderColumnValueExtractor,\n },\n headerMenu: {\n autoAlign: true,\n autoAlignOffset: 12,\n minWidth: 140,\n iconClearFilterCommand: 'mdi mdi-filter-remove-outline',\n iconClearSortCommand: 'mdi mdi-sort-variant-off',\n iconFreezeColumns: 'mdi mdi-pin-outline',\n iconUnfreezeColumns: 'mdi mdi-pin-off-outline',\n iconSortAscCommand: 'mdi mdi-sort-ascending',\n iconSortDescCommand: 'mdi mdi-sort-descending',\n iconColumnHideCommand: 'mdi mdi-close',\n iconColumnResizeByContentCommand: 'mdi mdi-arrow-expand-horizontal',\n hideColumnResizeByContentCommand: false,\n hideColumnHideCommand: false,\n hideClearFilterCommand: false,\n hideClearSortCommand: false,\n hideFreezeColumnsCommand: true, // opt-in command\n hideSortCommands: false,\n },\n multiColumnSort: true,\n numberedMultiColumnSort: true,\n tristateMultiColumnSort: false,\n sortColNumberInSeparateSpan: true,\n suppressActiveCellChangeOnEdit: false,\n pagination: {\n pageSizes: [10, 15, 20, 25, 30, 40, 50, 75, 100],\n pageSize: 25,\n totalItems: 0,\n },\n rowDetailView: {\n collapseAllOnSort: true,\n cssClass: 'detail-view-toggle',\n panelRows: 1,\n keyPrefix: '__',\n useRowClick: false,\n saveDetailViewOnScroll: false,\n } as RowDetailView,\n headerRowHeight: 35,\n rowHeight: 35,\n topPanelHeight: 30,\n preHeaderPanelWidth: '100%', // mostly useful for Draggable Grouping dropzone to take full width\n translationNamespaceSeparator: ':',\n resetFilterSearchValueAfterOnBeforeCancellation: true,\n resizeByContentOnlyOnFirstLoad: true,\n resizeByContentOptions: {\n alwaysRecalculateColumnWidth: false,\n cellPaddingWidthInPx: 14,\n defaultRatioForStringType: 0.88,\n formatterPaddingWidthInPx: 0,\n maxItemToInspectCellContentWidth: 1000,\n maxItemToInspectSingleColumnWidthByContent: 5000,\n widthToRemoveFromExceededWidthReadjustment: 50,\n },\n rowTopOffsetRenderType: 'transform',\n treeDataOptions: {\n exportIndentMarginLeft: 5,\n exportIndentationLeadingChar: '͏͏͏͏͏͏͏͏͏·',\n } as unknown as TreeDataOption,\n};\n\n/**\n * Value Extractor for both ColumnPicker & GridMenu Picker\n * when using Column Header Grouping, we'll prefix the column group title\n * else we'll simply return the column name title\n */\nfunction pickerHeaderColumnValueExtractor(column: Column, gridOptions?: GridOption) {\n let colName = column?.columnPickerLabel ?? column?.name ?? '';\n if (colName instanceof HTMLElement || colName instanceof DocumentFragment) {\n colName = colName.textContent || '';\n }\n const headerGroup = column?.columnGroup || '';\n const columnGroupSeparator = gridOptions?.columnGroupSeparator ?? ' - ';\n if (headerGroup) {\n return headerGroup + columnGroupSeparator + colName;\n }\n return colName;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slickgrid-react",
3
- "version": "9.6.1",
3
+ "version": "9.8.0",
4
4
  "description": "Slickgrid components made available in React",
5
5
  "keywords": [
6
6
  "react",
@@ -48,7 +48,7 @@
48
48
  }
49
49
  ],
50
50
  "browserslist": [
51
- "last 2 version",
51
+ "last 2 versions",
52
52
  "> 1%",
53
53
  "not dead"
54
54
  ],
@@ -57,18 +57,18 @@
57
57
  "/src"
58
58
  ],
59
59
  "dependencies": {
60
- "@slickgrid-universal/common": "9.6.0",
61
- "@slickgrid-universal/custom-footer-component": "9.6.0",
62
- "@slickgrid-universal/empty-warning-component": "9.6.0",
63
- "@slickgrid-universal/event-pub-sub": "9.6.0",
64
- "@slickgrid-universal/pagination-component": "9.6.0",
65
- "@slickgrid-universal/row-detail-view-plugin": "9.6.0",
66
- "@slickgrid-universal/utils": "9.6.0",
60
+ "@slickgrid-universal/common": "9.8.0",
61
+ "@slickgrid-universal/custom-footer-component": "9.8.0",
62
+ "@slickgrid-universal/empty-warning-component": "9.8.0",
63
+ "@slickgrid-universal/event-pub-sub": "9.8.0",
64
+ "@slickgrid-universal/pagination-component": "9.8.0",
65
+ "@slickgrid-universal/row-detail-view-plugin": "9.8.0",
66
+ "@slickgrid-universal/utils": "9.8.0",
67
67
  "dequal": "^2.0.3",
68
68
  "sortablejs": "^1.15.6"
69
69
  },
70
70
  "peerDependencies": {
71
71
  "react": ">=19.0.0"
72
72
  },
73
- "gitHead": "f22a3c15aac0c1d6afc78e1fb209dfc20133a485"
73
+ "gitHead": "c18cbb7edf292e2ac4025cafeb1911a4f3eeb38b"
74
74
  }
@@ -231,6 +231,7 @@ export class SlickgridReact<TData = any> extends React.Component<SlickgridReactP
231
231
  if (this.dataView && newHierarchicalDataset && this.grid && this.sortService?.processTreeDataInitialSort) {
232
232
  this.dataView.setItems([], this._options?.datasetIdPropertyName ?? 'id');
233
233
  this.sortService.processTreeDataInitialSort();
234
+ this.treeDataService.initHierarchicalTree();
234
235
 
235
236
  // 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
236
237
  // 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
@@ -283,7 +284,7 @@ export class SlickgridReact<TData = any> extends React.Component<SlickgridReactP
283
284
  );
284
285
  this.resizerService = new ResizerService(this._eventPubSubService);
285
286
  this.sortService = new SortService(this.collectionService, this.sharedService, this._eventPubSubService, this.backendUtilityService);
286
- this.treeDataService = new TreeDataService(this._eventPubSubService, this.sharedService, this.sortService);
287
+ this.treeDataService = new TreeDataService(this._eventPubSubService, this.filterService, this.sharedService, this.sortService);
287
288
  this.paginationService = new PaginationService(this._eventPubSubService, this.sharedService, this.backendUtilityService);
288
289
 
289
290
  this.extensionService = new ExtensionService(
@@ -545,8 +546,12 @@ export class SlickgridReact<TData = any> extends React.Component<SlickgridReactP
545
546
 
546
547
  // 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
547
548
  const frozenColumnIndex = this._options?.frozenColumn ?? -1;
548
- if (frozenColumnIndex >= 0 && frozenColumnIndex <= this._columns.length && this._columns.length > 0) {
549
- this.sharedService.frozenVisibleColumnId = this._columns[frozenColumnIndex]?.id ?? '';
549
+ if (
550
+ frozenColumnIndex >= 0 &&
551
+ frozenColumnIndex <= this.sharedService.visibleColumns.length &&
552
+ this.sharedService.visibleColumns.length > 0
553
+ ) {
554
+ this.sharedService.frozenVisibleColumnId = this.sharedService.visibleColumns[frozenColumnIndex]?.id ?? '';
550
555
  }
551
556
 
552
557
  // get any possible Services that user want to register
@@ -50,8 +50,8 @@ export const GlobalGridOptions: Partial<GridOption> = {
50
50
  massUpdateStatusKey: 'ALL_X_RECORDS_SELECTED',
51
51
  saveButtonKey: 'SAVE',
52
52
  },
53
- resetEditorButtonCssClass: 'mdi mdi-refresh mdi-15px',
54
- resetFormButtonIconCssClass: 'mdi mdi-refresh mdi-16px mdi-flip-h',
53
+ resetEditorButtonCssClass: 'mdi mdi-refresh font-15px',
54
+ resetFormButtonIconCssClass: 'mdi mdi-refresh font-16px mdi-flip-h',
55
55
  },
56
56
  contextMenu: {
57
57
  autoAdjustDrop: true,
@@ -248,7 +248,6 @@ export const GlobalGridOptions: Partial<GridOption> = {
248
248
  resizeByContentOnlyOnFirstLoad: true,
249
249
  resizeByContentOptions: {
250
250
  alwaysRecalculateColumnWidth: false,
251
- cellCharWidthInPx: 7.8,
252
251
  cellPaddingWidthInPx: 14,
253
252
  defaultRatioForStringType: 0.88,
254
253
  formatterPaddingWidthInPx: 0,