{"version":3,"file":"angular-slickgrid.mjs","sources":["../../src/library/services/angularUtil.service.ts","../../src/library/services/container.service.ts","../../src/library/services/translater.service.ts","../../src/library/services/utilities.ts","../../src/library/global-grid-options.ts","../../src/library/slickgrid-config.ts","../../src/library/constants.ts","../../src/library/components/angular-slickgrid.component.ts","../../src/angular-slickgrid.ts"],"sourcesContent":["import { Inject, Injectable, ViewContainerRef } from '@angular/core';\nimport type { EmbeddedViewRef, EnvironmentInjector, Injector, NgModuleRef, Type } from '@angular/core';\nimport type { AngularComponentOutput } from '../models/angularComponentOutput.interface';\n\ninterface CreateComponentOption {\n  index?: number;\n  injector?: Injector;\n  ngModuleRef?: NgModuleRef<unknown>;\n  environmentInjector?: EnvironmentInjector | NgModuleRef<unknown>;\n  projectableNodes?: Node[][];\n  sanitizer?: (dirtyHtml: string) => string;\n}\n\n@Injectable()\nexport class AngularUtilService {\n  constructor(@Inject(ViewContainerRef) private vcr: ViewContainerRef) {}\n\n  createInteractiveAngularComponent<C>(\n    component: Type<C>,\n    targetElement: Element,\n    data?: any,\n    createCompOptions?: CreateComponentOption\n  ): AngularComponentOutput {\n    // Create a component reference from the component\n    const componentRef = this.vcr.createComponent(component, createCompOptions);\n\n    // user could provide data to assign to the component instance\n    if (componentRef?.instance && data) {\n      Object.assign(componentRef.instance as any, data);\n    }\n\n    // Get DOM element from component\n    let domElem: HTMLElement | null = null;\n    const viewRef = componentRef.hostView as EmbeddedViewRef<any>;\n\n    if (viewRef && Array.isArray(viewRef.rootNodes) && viewRef.rootNodes[0]) {\n      domElem = viewRef.rootNodes[0] as HTMLElement;\n\n      // when user provides the DOM element target, we will move the dynamic component into that target (aka portal-ing it)\n      if (targetElement && domElem) {\n        targetElement.replaceChildren(componentRef.location.nativeElement);\n      }\n    }\n\n    return { componentRef, domElement: domElem as HTMLElement };\n  }\n\n  /**\n   * Dynamically create an Angular component, user could also provide optional arguments for target, data & createComponent options\n   * @param {Component} component\n   * @param {HTMLElement} [targetElement]\n   * @param {*} [data]\n   * @param {CreateComponentOption} [createCompOptions]\n   * @returns\n   */\n  createAngularComponent<C>(\n    component: Type<C>,\n    targetElement?: Element,\n    data?: any,\n    createCompOptions?: CreateComponentOption\n  ): AngularComponentOutput {\n    // Create a component reference from the component\n    const componentRef = this.vcr.createComponent(component, createCompOptions);\n\n    // user could provide data to assign to the component instance\n    if (componentRef?.instance && data) {\n      Object.assign(componentRef.instance as any, data);\n    }\n\n    // Get DOM element from component\n    let domElem: HTMLElement | null = null;\n    const viewRef = componentRef.hostView as EmbeddedViewRef<any>;\n\n    // get DOM element from the new dynamic Component, make sure this is read after any data\n    if (viewRef && Array.isArray(viewRef.rootNodes) && viewRef.rootNodes[0]) {\n      domElem = viewRef.rootNodes[0] as HTMLElement;\n\n      // when user provides the DOM element target, we will read the new Component html and use it to replace the target html\n      if (targetElement && domElem) {\n        targetElement.innerHTML =\n          typeof createCompOptions?.sanitizer === 'function' ? createCompOptions.sanitizer(domElem.innerHTML || '') : domElem.innerHTML;\n      }\n    }\n\n    return { componentRef, domElement: domElem as HTMLElement };\n  }\n\n  /**\n   * Dynamically create an Angular component and append it to the DOM unless a target element is provided,\n   * user could also provide other optional arguments for data & createComponent options.\n   * @param {Component} component\n   * @param {HTMLElement} [targetElement]\n   * @param {*} [data]\n   * @param {CreateComponentOption} [createCompOptions]\n   * @returns\n   */\n  createAngularComponentAppendToDom<C>(\n    component: Type<C>,\n    targetElement?: Element,\n    data?: any,\n    createCompOptions?: CreateComponentOption\n  ): AngularComponentOutput {\n    const componentOutput = this.createAngularComponent(component, targetElement, data, createCompOptions);\n\n    // Append DOM element to the HTML element specified\n    if (targetElement?.replaceChildren) {\n      targetElement.replaceChildren(componentOutput.domElement);\n    } else {\n      document.body.appendChild(componentOutput.domElement); // when no target provided, we'll simply add it to the HTML Body\n    }\n\n    return componentOutput;\n  }\n}\n","import { Injectable } from '@angular/core';\nimport type { ContainerInstance, ContainerService as UniversalContainerService } from '@slickgrid-universal/common';\n\n@Injectable({\n  providedIn: 'root', // This ensures it can be injected anywhere\n})\nexport class ContainerService implements UniversalContainerService {\n  dependencies: ContainerInstance[] = [];\n\n  get<T = any>(key: string): T | null {\n    const dependency = this.dependencies.find((dep) => dep.key === key);\n    if (dependency?.instance) {\n      return dependency.instance;\n    }\n    return null;\n  }\n\n  dispose() {\n    this.dependencies = [];\n  }\n\n  registerInstance(key: string, instance: any) {\n    const dependency = this.dependencies.some((dep) => dep.key === key);\n    if (!dependency) {\n      this.dependencies.push({ key, instance });\n    }\n  }\n}\n","import { Injectable, Optional } from '@angular/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport type { TranslaterService as UniversalTranslateService } from '@slickgrid-universal/common';\n\n/**\n * This is a Translate Service Wrapper for Slickgrid-Universal monorepo lib to work properly,\n * it must implement Slickgrid-Universal TranslaterService interface to work properly\n */\n@Injectable()\nexport class TranslaterService implements UniversalTranslateService {\n  constructor(@Optional() private readonly translateService: TranslateService) {}\n\n  /**\n   * Method to return the current language used by the App\n   * @return {string} current language\n   */\n  getCurrentLanguage(): string {\n    return this.translateService?.getCurrentLang?.() ?? '';\n  }\n\n  /**\n   * Method to set the language to use in the App and Translate Service\n   * @param {string} language\n   * @return {Promise} output\n   */\n  async use(newLang: string): Promise<any> {\n    return this.translateService?.use?.(newLang);\n  }\n\n  /**\n   * Method which receives a translation key and returns the translated value assigned to that key\n   * @param {string} translation key\n   * @return {string} translated value\n   */\n  translate(translationKey: string): string {\n    return this.translateService?.instant?.(translationKey || ' ') as string;\n  }\n}\n","/**\n * Unsubscribe all Observables Subscriptions\n * It will return an empty array if it all went well\n * @param subscriptions\n */\nexport function unsubscribeAllObservables(subscriptions: Array<{ unsubscribe: () => void }>): void {\n  if (Array.isArray(subscriptions)) {\n    let subscription = subscriptions.pop();\n    while (subscription) {\n      if (typeof subscription.unsubscribe === 'function') {\n        subscription.unsubscribe();\n      }\n      subscription = subscriptions.pop();\n    }\n  }\n}\n","import { GlobalGridOptions as UniversalGridOptions } from '@slickgrid-universal/common';\nimport type { GridOption, RowDetailView } from './models/index';\n\n/** Global Grid Options Defaults */\nexport const GlobalGridOptions: Partial<GridOption> = {\n  ...UniversalGridOptions,\n  eventNamingStyle: 'camelCase',\n  // technically speaking the Row Detail requires the process & viewComponent but we'll ignore it just to set certain options\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};\n","import { GlobalGridOptions } from './global-grid-options';\nimport type { GridOption } from './models/gridOption.interface';\n\nexport class SlickgridConfig {\n  options: Partial<GridOption>;\n\n  constructor() {\n    this.options = GlobalGridOptions;\n  }\n}\n","import type { Locale } from '@slickgrid-universal/common';\n\nexport class Constants {\n  // English Locale texts when using only 1 Locale instead of I18N\n  static readonly locales: Locale = {\n    TEXT_ALL_SELECTED: 'All Selected',\n    TEXT_ALL_X_RECORDS_SELECTED: 'All {{x}} records selected',\n    TEXT_APPLY_MASS_UPDATE: 'Apply Mass Update',\n    TEXT_APPLY_TO_SELECTION: 'Update Selection',\n    TEXT_CANCEL: 'Cancel',\n    TEXT_CLEAR_ALL_FILTERS: 'Clear all Filters',\n    TEXT_CLEAR_ALL_GROUPING: 'Clear all Grouping',\n    TEXT_CLEAR_ALL_SORTING: 'Clear all Sorting',\n    TEXT_CLEAR_PINNING: 'Unfreeze Columns/Rows',\n    TEXT_CLONE: 'Clone',\n    TEXT_COLLAPSE_ALL_GROUPS: 'Collapse all Groups',\n    TEXT_CONTAINS: 'Contains',\n    TEXT_COLUMNS: 'Columns',\n    TEXT_COLUMN_RESIZE_BY_CONTENT: 'Resize by Content',\n    TEXT_COMMANDS: 'Commands',\n    TEXT_COPY: 'Copy',\n    TEXT_EQUALS: 'Equals',\n    TEXT_EQUAL_TO: 'Equal to',\n    TEXT_ENDS_WITH: 'Ends With',\n    TEXT_ERROR_EDITABLE_GRID_REQUIRED: 'Your grid must be editable in order to use the Composite Editor Modal.',\n    TEXT_ERROR_ENABLE_CELL_NAVIGATION_REQUIRED:\n      'Composite Editor requires the flag \"enableCellNavigation\" to be set to True in your Grid Options.',\n    TEXT_ERROR_NO_CHANGES_DETECTED: 'Sorry we could not detect any changes.',\n    TEXT_ERROR_NO_EDITOR_FOUND: 'We could not find any Editor in your Column Definition.',\n    TEXT_ERROR_NO_RECORD_FOUND: 'No records selected for edit or clone operation.',\n    TEXT_ERROR_ROW_NOT_EDITABLE: 'Current row is not editable.',\n    TEXT_ERROR_ROW_SELECTION_REQUIRED: 'You must select some rows before trying to apply new value(s).',\n    TEXT_EXPAND_ALL_GROUPS: 'Expand all Groups',\n    TEXT_EXPORT_TO_CSV: 'Export in CSV format',\n    TEXT_EXPORT_TO_TEXT_FORMAT: 'Export in Text format (Tab delimited)',\n    TEXT_EXPORT_TO_EXCEL: 'Export to Excel',\n    TEXT_EXPORT_TO_PDF: 'Export to PDF',\n    TEXT_EXPORT_TO_TAB_DELIMITED: 'Export in Text format (Tab delimited)',\n    TEXT_FORCE_FIT_COLUMNS: 'Force fit columns',\n    TEXT_FREEZE_COLUMNS: 'Freeze Columns',\n    TEXT_GREATER_THAN: 'Greater than',\n    TEXT_GREATER_THAN_OR_EQUAL_TO: 'Greater than or equal to',\n    TEXT_GROUP_BY: 'Group By',\n    TEXT_HIDE_COLUMN: 'Hide Column',\n    TEXT_ITEMS: 'items',\n    TEXT_ITEMS_PER_PAGE: 'items per page',\n    TEXT_ITEMS_SELECTED: 'items selected',\n    TEXT_OF: 'of',\n    TEXT_OK: 'OK',\n    TEXT_OPTIONS: 'Options',\n    TEXT_LAST_UPDATE: 'Last Update',\n    TEXT_LESS_THAN: 'Less than',\n    TEXT_LESS_THAN_OR_EQUAL_TO: 'Less than or equal to',\n    TEXT_LOADING: 'Loading...',\n    TEXT_NO_ELEMENTS_FOUND: 'Aucun élément trouvé',\n    TEXT_NOT_CONTAINS: 'Not contains',\n    TEXT_NOT_EQUAL_TO: 'Not equal to',\n    TEXT_PAGE: 'Page',\n    TEXT_REFRESH_DATASET: 'Refresh Dataset',\n    TEXT_REMOVE_FILTER: 'Remove Filter',\n    TEXT_REMOVE_SORT: 'Remove Sort',\n    TEXT_SAVE: 'Save',\n    TEXT_SELECT_ALL: 'Select All',\n    TEXT_SYNCHRONOUS_RESIZE: 'Synchronous resize',\n    TEXT_SORT_ASCENDING: 'Sort Ascending',\n    TEXT_SORT_DESCENDING: 'Sort Descending',\n    TEXT_STARTS_WITH: 'Starts With',\n    TEXT_TOGGLE_DARK_MODE: 'Toggle Dark Mode',\n    TEXT_TOGGLE_FILTER_ROW: 'Toggle Filter Row',\n    TEXT_TOGGLE_PRE_HEADER_ROW: 'Toggle Pre-Header Row',\n    TEXT_UNFREEZE_COLUMNS: 'Unfreeze Columns',\n    TEXT_X_OF_Y_SELECTED: '# of % selected',\n    TEXT_X_OF_Y_MASS_SELECTED: '{{x}} of {{y}} selected',\n  };\n\n  static readonly treeDataProperties = {\n    CHILDREN_PROP: 'children',\n    COLLAPSED_PROP: '__collapsed',\n    HAS_CHILDREN_PROP: '__hasChildren',\n    LAZY_LOADING_PROP: '__lazyLoading',\n    TREE_LEVEL_PROP: '__treeLevel',\n    PARENT_PROP: '__parentId',\n  };\n\n  // some Validation default texts\n  static readonly VALIDATION_REQUIRED_FIELD = 'Field is required';\n  static readonly VALIDATION_EDITOR_VALID_NUMBER = 'Please enter a valid number';\n  static readonly VALIDATION_EDITOR_VALID_INTEGER = 'Please enter a valid integer number';\n  static readonly VALIDATION_EDITOR_INTEGER_BETWEEN = 'Please enter a valid integer number between {{minValue}} and {{maxValue}}';\n  static readonly VALIDATION_EDITOR_INTEGER_MAX = 'Please enter a valid integer number that is lower than {{maxValue}}';\n  static readonly VALIDATION_EDITOR_INTEGER_MAX_INCLUSIVE =\n    'Please enter a valid integer number that is lower than or equal to {{maxValue}}';\n  static readonly VALIDATION_EDITOR_INTEGER_MIN = 'Please enter a valid integer number that is greater than {{minValue}}';\n  static readonly VALIDATION_EDITOR_INTEGER_MIN_INCLUSIVE =\n    'Please enter a valid integer number that is greater than or equal to {{minValue}}';\n  static readonly VALIDATION_EDITOR_NUMBER_BETWEEN = 'Please enter a valid number between {{minValue}} and {{maxValue}}';\n  static readonly VALIDATION_EDITOR_NUMBER_MAX = 'Please enter a valid number that is lower than {{maxValue}}';\n  static readonly VALIDATION_EDITOR_NUMBER_MAX_INCLUSIVE = 'Please enter a valid number that is lower than or equal to {{maxValue}}';\n  static readonly VALIDATION_EDITOR_NUMBER_MIN = 'Please enter a valid number that is greater than {{minValue}}';\n  static readonly VALIDATION_EDITOR_NUMBER_MIN_INCLUSIVE = 'Please enter a valid number that is greater than or equal to {{minValue}}';\n  static readonly VALIDATION_EDITOR_DECIMAL_BETWEEN = 'Please enter a valid number with a maximum of {{maxDecimal}} decimals';\n  static readonly VALIDATION_EDITOR_TEXT_LENGTH_BETWEEN =\n    'Please make sure your text length is between {{minLength}} and {{maxLength}} characters';\n  static readonly VALIDATION_EDITOR_TEXT_MAX_LENGTH = 'Please make sure your text is less than {{maxLength}} characters';\n  static readonly VALIDATION_EDITOR_TEXT_MAX_LENGTH_INCLUSIVE =\n    'Please make sure your text is less than or equal to {{maxLength}} characters';\n  static readonly VALIDATION_EDITOR_TEXT_MIN_LENGTH = 'Please make sure your text is more than {{minLength}} character(s)';\n  static readonly VALIDATION_EDITOR_TEXT_MIN_LENGTH_INCLUSIVE = 'Please make sure your text is at least {{minLength}} character(s)';\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n  ApplicationRef,\n  Component,\n  ContentChild,\n  ElementRef,\n  EventEmitter,\n  Inject,\n  Input,\n  Optional,\n  Output,\n  output,\n  type AfterViewInit,\n  type OnDestroy,\n  type TemplateRef,\n} from '@angular/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport {\n  autoAddEditorFormatterToColumnsWithEditor,\n  BackendUtilityService,\n  CollectionService,\n  emptyElement,\n  ExtensionService,\n  ExtensionUtility,\n  ExternalResourceConstructor,\n  FilterFactory,\n  FilterService,\n  GridEventService,\n  GridService,\n  GridStateService,\n  HeaderGroupingService,\n  isColumnDateType,\n  PaginationService,\n  PluginFlagMappings,\n  ResizerService,\n  SharedService,\n  SlickDataView,\n  SlickEventHandler,\n  SlickGrid,\n  SlickgridConfig,\n  SlickGroupItemMetadataProvider,\n  SortService,\n  TreeDataService,\n  unsubscribeAll,\n  type BackendService,\n  type BackendServiceApi,\n  type BackendServiceOption,\n  type BasePaginationComponent,\n  type Column,\n  type CustomDataView,\n  type DataViewOption,\n  type EventSubscription,\n  type ExternalResource,\n  type Locale,\n  type Metrics,\n  type Pagination,\n  type PaginationMetadata,\n  type RxJsFacade,\n} from '@slickgrid-universal/common';\nimport { SlickFooterComponent } from '@slickgrid-universal/custom-footer-component';\nimport { SlickEmptyWarningComponent } from '@slickgrid-universal/empty-warning-component';\nimport { EventPubSubService } from '@slickgrid-universal/event-pub-sub';\nimport { SlickPaginationComponent } from '@slickgrid-universal/pagination-component';\nimport { RxJsResource } from '@slickgrid-universal/rxjs-observable';\nimport { extend } from '@slickgrid-universal/utils';\nimport { dequal } from 'dequal/lite';\nimport { Observable } from 'rxjs';\nimport { Constants } from '../constants';\nimport { GlobalGridOptions } from '../global-grid-options';\nimport type { AngularGridInstance, ExternalTestingDependencies, GridOption } from '../models/index';\nimport { AngularUtilService } from '../services/angularUtil.service';\nimport { ContainerService } from '../services/container.service';\nimport { TranslaterService } from '../services/translater.service';\nimport type { AngularSlickgridOutputs, RegularEventOutput, SlickEventOutput } from './angular-slickgrid-outputs.interface';\n\nconst WARN_NO_PREPARSE_DATE_SIZE = 10000; // data size to warn user when pre-parse isn't enabled\n\nexport interface AngularRowDetailView {\n  create(columns: Column[], gridOptions: GridOption): any;\n  init(grid: SlickGrid, containerService?: ContainerService): void;\n}\n\n@Component({\n  selector: 'angular-slickgrid',\n  template: `\n    <div id=\"slickGridContainer-{{ gridId }}\" class=\"gridPane\" [class]=\"containerClasses\">\n      <ng-container *ngTemplateOutlet=\"slickgridHeader\"></ng-container>\n      <div [attr.id]=\"gridId\" class=\"slickgrid-container\"></div>\n      <ng-container *ngTemplateOutlet=\"slickgridFooter\"></ng-container>\n    </div>\n  `,\n  providers: [AngularUtilService, TranslaterService], // make everything transient (non-singleton)\n  imports: [NgTemplateOutlet],\n})\nexport class AngularSlickgridComponent<TData = any> implements AfterViewInit, OnDestroy {\n  protected _dataset?: TData[] | null;\n  protected _columns!: Column[];\n  protected _currentDatasetLength = 0;\n  protected _darkMode = false;\n  protected _eventHandler: SlickEventHandler = new SlickEventHandler();\n  protected _eventPubSubService!: EventPubSubService;\n  protected _angularGridInstances: AngularGridInstance | undefined;\n  protected _hideHeaderRowAfterPageLoad = false;\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: Array<ExternalResource | ExternalResourceConstructor> = [];\n  protected _scrollEndCalled = false;\n  dataView!: SlickDataView;\n  slickGrid!: SlickGrid;\n  groupingDefinition: any = {};\n  groupItemMetadataProvider?: SlickGroupItemMetadataProvider;\n  backendServiceApi?: BackendServiceApi;\n  locales!: Locale;\n  metrics?: Metrics;\n  showPagination = false;\n  serviceList: any[] = [];\n  totalItems = 0;\n  paginationData?: {\n    gridOptions: GridOption;\n    paginationService: PaginationService;\n  };\n  subscriptions: EventSubscription[] = [];\n\n  // components / plugins\n  slickEmptyWarning?: SlickEmptyWarningComponent;\n  slickFooter?: SlickFooterComponent;\n  slickPagination?: BasePaginationComponent;\n  paginationComponent: BasePaginationComponent | undefined;\n  slickRowDetailView?: AngularRowDetailView;\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  headerGroupingService: HeaderGroupingService;\n  paginationService: PaginationService;\n  resizerService!: ResizerService;\n  rxjs?: RxJsFacade;\n  sharedService: SharedService;\n  sortService: SortService;\n  treeDataService: TreeDataService;\n\n  @Input() customDataView: CustomDataView | undefined;\n  @Input() gridId = '';\n  @Input() options: GridOption = {};\n  @Input() containerClasses?: string[] = undefined;\n\n  @Input()\n  get paginationOptions(): Pagination | undefined {\n    return this._paginationOptions;\n  }\n  set paginationOptions(newPaginationOptions: Pagination | undefined) {\n    if (newPaginationOptions && this._paginationOptions) {\n      this._paginationOptions = { ...this.options.pagination, ...this._paginationOptions, ...newPaginationOptions };\n    } else {\n      this._paginationOptions = newPaginationOptions;\n    }\n    this.options.pagination = this._paginationOptions ?? this.options.pagination;\n    this.paginationService.updateTotalItems(this.options.pagination?.totalItems ?? 0, true);\n  }\n\n  @Input()\n  get columns(): Column[] {\n    return this._columns;\n  }\n  set columns(columns: Column[]) {\n    this._columns = columns;\n    if (this._isGridInitialized) {\n      this.updateColumnDefinitionsList(columns);\n    }\n    if (columns.length > 0) {\n      this.copyColumnWidthsReference(columns);\n    }\n  }\n\n  // make the columnDefinitions a 2-way binding so that plugin adding cols\n  // are synched on user's side as well (RowMove, RowDetail, RowSelections)\n  @Output() columnsChange = new EventEmitter(true);\n\n  // SlickGrid events\n  onActiveCellChanged = output<SlickEventOutput<AngularSlickgridOutputs['onActiveCellChanged']>>();\n  onActiveCellPositionChanged = output<SlickEventOutput<AngularSlickgridOutputs['onActiveCellPositionChanged']>>();\n  onAddNewRow = output<SlickEventOutput<AngularSlickgridOutputs['onAddNewRow']>>();\n  onAutosizeColumns = output<SlickEventOutput<AngularSlickgridOutputs['onAutosizeColumns']>>();\n  onBeforeAppendCell = output<SlickEventOutput<AngularSlickgridOutputs['onBeforeAppendCell']>>();\n  onBeforeCellEditorDestroy = output<SlickEventOutput<AngularSlickgridOutputs['onBeforeCellEditorDestroy']>>();\n  onBeforeColumnsResize = output<SlickEventOutput<AngularSlickgridOutputs['onBeforeColumnsResize']>>();\n  onBeforeDestroy = output<SlickEventOutput<AngularSlickgridOutputs['onBeforeDestroy']>>();\n  onBeforeEditCell = output<SlickEventOutput<AngularSlickgridOutputs['onBeforeEditCell']>>();\n  onBeforeHeaderCellDestroy = output<SlickEventOutput<AngularSlickgridOutputs['onBeforeHeaderCellDestroy']>>();\n  onBeforeHeaderRowCellDestroy = output<SlickEventOutput<AngularSlickgridOutputs['onBeforeHeaderRowCellDestroy']>>();\n  onBeforeFooterRowCellDestroy = output<SlickEventOutput<AngularSlickgridOutputs['onBeforeFooterRowCellDestroy']>>();\n  onBeforeSetColumns = output<SlickEventOutput<AngularSlickgridOutputs['onBeforeSetColumns']>>();\n  onBeforeSort = output<SlickEventOutput<AngularSlickgridOutputs['onBeforeSort']>>();\n  onCellChange = output<SlickEventOutput<AngularSlickgridOutputs['onCellChange']>>();\n  onCellCssStylesChanged = output<SlickEventOutput<AngularSlickgridOutputs['onCellCssStylesChanged']>>();\n  onClick = output<SlickEventOutput<AngularSlickgridOutputs['onClick']>>();\n  onColumnsDrag = output<SlickEventOutput<AngularSlickgridOutputs['onColumnsDrag']>>();\n  onColumnsReordered = output<SlickEventOutput<AngularSlickgridOutputs['onColumnsReordered']>>();\n  onColumnsResized = output<SlickEventOutput<AngularSlickgridOutputs['onColumnsResized']>>();\n  onColumnsResizeDblClick = output<SlickEventOutput<AngularSlickgridOutputs['onColumnsResizeDblClick']>>();\n  onCompositeEditorChange = output<SlickEventOutput<AngularSlickgridOutputs['onCompositeEditorChange']>>();\n  onContextMenu = output<SlickEventOutput<AngularSlickgridOutputs['onContextMenu']>>();\n  onDrag = output<SlickEventOutput<AngularSlickgridOutputs['onDrag']>>();\n  onDragEnd = output<SlickEventOutput<AngularSlickgridOutputs['onDragEnd']>>();\n  onDragInit = output<SlickEventOutput<AngularSlickgridOutputs['onDragInit']>>();\n  onDragStart = output<SlickEventOutput<AngularSlickgridOutputs['onDragStart']>>();\n  onDragReplaceCells = output<SlickEventOutput<AngularSlickgridOutputs['onDragReplaceCells']>>();\n  onDblClick = output<SlickEventOutput<AngularSlickgridOutputs['onDblClick']>>();\n  onFooterContextMenu = output<SlickEventOutput<AngularSlickgridOutputs['onFooterContextMenu']>>();\n  onFooterRowCellRendered = output<SlickEventOutput<AngularSlickgridOutputs['onFooterRowCellRendered']>>();\n  onHeaderCellRendered = output<SlickEventOutput<AngularSlickgridOutputs['onHeaderCellRendered']>>();\n  onFooterClick = output<SlickEventOutput<AngularSlickgridOutputs['onFooterClick']>>();\n  onHeaderClick = output<SlickEventOutput<AngularSlickgridOutputs['onHeaderClick']>>();\n  onHeaderContextMenu = output<SlickEventOutput<AngularSlickgridOutputs['onHeaderContextMenu']>>();\n  onHeaderMouseEnter = output<SlickEventOutput<AngularSlickgridOutputs['onHeaderMouseEnter']>>();\n  onHeaderMouseLeave = output<SlickEventOutput<AngularSlickgridOutputs['onHeaderMouseLeave']>>();\n  onHeaderRowCellRendered = output<SlickEventOutput<AngularSlickgridOutputs['onHeaderRowCellRendered']>>();\n  onHeaderRowMouseEnter = output<SlickEventOutput<AngularSlickgridOutputs['onHeaderRowMouseEnter']>>();\n  onHeaderRowMouseLeave = output<SlickEventOutput<AngularSlickgridOutputs['onHeaderRowMouseLeave']>>();\n  onKeyDown = output<SlickEventOutput<AngularSlickgridOutputs['onKeyDown']>>();\n  onMouseEnter = output<SlickEventOutput<AngularSlickgridOutputs['onMouseEnter']>>();\n  onMouseLeave = output<SlickEventOutput<AngularSlickgridOutputs['onMouseLeave']>>();\n  onValidationError = output<SlickEventOutput<AngularSlickgridOutputs['onValidationError']>>();\n  onViewportChanged = output<SlickEventOutput<AngularSlickgridOutputs['onViewportChanged']>>();\n  onRendered = output<SlickEventOutput<AngularSlickgridOutputs['onRendered']>>();\n  onSelectedRowsChanged = output<SlickEventOutput<AngularSlickgridOutputs['onSelectedRowsChanged']>>();\n  onSetOptions = output<SlickEventOutput<AngularSlickgridOutputs['onSetOptions']>>();\n  onScroll = output<SlickEventOutput<AngularSlickgridOutputs['onScroll']>>();\n  onSort = output<SlickEventOutput<AngularSlickgridOutputs['onSort']>>();\n\n  // DataView events\n  onBeforePagingInfoChanged = output<SlickEventOutput<AngularSlickgridOutputs['onBeforePagingInfoChanged']>>();\n  onGroupExpanded = output<SlickEventOutput<AngularSlickgridOutputs['onGroupExpanded']>>();\n  onGroupCollapsed = output<SlickEventOutput<AngularSlickgridOutputs['onGroupCollapsed']>>();\n  onPagingInfoChanged = output<SlickEventOutput<AngularSlickgridOutputs['onPagingInfoChanged']>>();\n  onRowCountChanged = output<SlickEventOutput<AngularSlickgridOutputs['onRowCountChanged']>>();\n  onRowsChanged = output<SlickEventOutput<AngularSlickgridOutputs['onRowsChanged']>>();\n  onRowsOrCountChanged = output<SlickEventOutput<AngularSlickgridOutputs['onRowsOrCountChanged']>>();\n  onSelectedRowIdsChanged = output<SlickEventOutput<AngularSlickgridOutputs['onSelectedRowIdsChanged']>>();\n  onSetItemsCalled = output<SlickEventOutput<AngularSlickgridOutputs['onSetItemsCalled']>>();\n\n  // other Slick Events\n  onAfterMenuShow = output<SlickEventOutput<AngularSlickgridOutputs['onAfterMenuShow']>>();\n  onBeforeMenuClose = output<SlickEventOutput<AngularSlickgridOutputs['onBeforeMenuClose']>>();\n  onBeforeMenuShow = output<SlickEventOutput<AngularSlickgridOutputs['onBeforeMenuShow']>>();\n  onColumnsChanged = output<SlickEventOutput<AngularSlickgridOutputs['onColumnsChanged']>>();\n  onCommand = output<SlickEventOutput<AngularSlickgridOutputs['onCommand']>>();\n  onGridMenuColumnsChanged = output<SlickEventOutput<AngularSlickgridOutputs['onGridMenuColumnsChanged']>>();\n  onMenuClose = output<SlickEventOutput<AngularSlickgridOutputs['onMenuClose']>>();\n  onCopyCells = output<SlickEventOutput<AngularSlickgridOutputs['onCopyCells']>>();\n  onCopyCancelled = output<SlickEventOutput<AngularSlickgridOutputs['onCopyCancelled']>>();\n  onPasteCells = output<SlickEventOutput<AngularSlickgridOutputs['onPasteCells']>>();\n  onBeforePasteCell = output<SlickEventOutput<AngularSlickgridOutputs['onBeforePasteCell']>>();\n\n  // Slickgrid-Universal events\n  onAfterExportToExcel = output<RegularEventOutput<AngularSlickgridOutputs['onAfterExportToExcel']>>();\n  onBeforeExportToExcel = output<RegularEventOutput<AngularSlickgridOutputs['onBeforeExportToExcel']>>();\n  onBeforeFilterChange = output<RegularEventOutput<AngularSlickgridOutputs['onBeforeFilterChange']>>();\n  onBeforeFilterClear = output<RegularEventOutput<AngularSlickgridOutputs['onBeforeFilterClear']>>();\n  onBeforeSearchChange = output<RegularEventOutput<AngularSlickgridOutputs['onBeforeSearchChange']>>();\n  onBeforeSortChange = output<RegularEventOutput<AngularSlickgridOutputs['onBeforeSortChange']>>();\n  onContextMenuClearGrouping = output<RegularEventOutput<AngularSlickgridOutputs['onContextMenuClearGrouping']>>();\n  onContextMenuCollapseAllGroups = output<RegularEventOutput<AngularSlickgridOutputs['onContextMenuCollapseAllGroups']>>();\n  onContextMenuExpandAllGroups = output<RegularEventOutput<AngularSlickgridOutputs['onContextMenuExpandAllGroups']>>();\n  onOptionSelected = output<RegularEventOutput<AngularSlickgridOutputs['onOptionSelected']>>();\n  onColumnPickerColumnsChanged = output<RegularEventOutput<AngularSlickgridOutputs['onColumnPickerColumnsChanged']>>();\n  onGridMenuMenuClose = output<RegularEventOutput<AngularSlickgridOutputs['onGridMenuMenuClose']>>();\n  onGridMenuBeforeMenuShow = output<RegularEventOutput<AngularSlickgridOutputs['onGridMenuBeforeMenuShow']>>();\n  onGridMenuAfterMenuShow = output<RegularEventOutput<AngularSlickgridOutputs['onGridMenuAfterMenuShow']>>();\n  onGridMenuClearAllPinning = output<RegularEventOutput<AngularSlickgridOutputs['onGridMenuClearAllPinning']>>();\n  onGridMenuClearAllFilters = output<RegularEventOutput<AngularSlickgridOutputs['onGridMenuClearAllFilters']>>();\n  onGridMenuClearAllSorting = output<RegularEventOutput<AngularSlickgridOutputs['onGridMenuClearAllSorting']>>();\n  onGridMenuCommand = output<RegularEventOutput<AngularSlickgridOutputs['onGridMenuCommand']>>();\n  onHeaderButtonCommand = output<RegularEventOutput<AngularSlickgridOutputs['onHeaderButtonCommand']>>();\n  onHeaderMenuCommand = output<RegularEventOutput<AngularSlickgridOutputs['onHeaderMenuCommand']>>();\n  onHeaderMenuColumnResizeByContent = output<RegularEventOutput<AngularSlickgridOutputs['onHeaderMenuColumnResizeByContent']>>();\n  onHeaderMenuBeforeMenuShow = output<RegularEventOutput<AngularSlickgridOutputs['onHeaderMenuBeforeMenuShow']>>();\n  onHeaderMenuAfterMenuShow = output<RegularEventOutput<AngularSlickgridOutputs['onHeaderMenuAfterMenuShow']>>();\n  onHideColumns = output<RegularEventOutput<AngularSlickgridOutputs['onHideColumns']>>();\n  onItemsAdded = output<RegularEventOutput<AngularSlickgridOutputs['onItemsAdded']>>();\n  onItemsDeleted = output<RegularEventOutput<AngularSlickgridOutputs['onItemsDeleted']>>();\n  onItemsUpdated = output<RegularEventOutput<AngularSlickgridOutputs['onItemsUpdated']>>();\n  onItemsUpserted = output<RegularEventOutput<AngularSlickgridOutputs['onItemsUpserted']>>();\n  onFullResizeByContentRequested = output<RegularEventOutput<AngularSlickgridOutputs['onFullResizeByContentRequested']>>();\n  onGridStateChanged = output<RegularEventOutput<AngularSlickgridOutputs['onGridStateChanged']>>();\n  onBeforePaginationChange = output<RegularEventOutput<AngularSlickgridOutputs['onBeforePaginationChange']>>();\n  onPaginationChanged = output<RegularEventOutput<AngularSlickgridOutputs['onPaginationChanged']>>();\n  onPaginationRefreshed = output<RegularEventOutput<AngularSlickgridOutputs['onPaginationRefreshed']>>();\n  onPaginationVisibilityChanged = output<RegularEventOutput<AngularSlickgridOutputs['onPaginationVisibilityChanged']>>();\n  onPaginationSetCursorBased = output<RegularEventOutput<AngularSlickgridOutputs['onPaginationSetCursorBased']>>();\n  onGridBeforeResize = output<RegularEventOutput<AngularSlickgridOutputs['onGridBeforeResize']>>();\n  onGridAfterResize = output<RegularEventOutput<AngularSlickgridOutputs['onGridAfterResize']>>();\n  onBeforeResizeByContent = output<RegularEventOutput<AngularSlickgridOutputs['onBeforeResizeByContent']>>();\n  onAfterResizeByContent = output<RegularEventOutput<AngularSlickgridOutputs['onAfterResizeByContent']>>();\n  onSortCleared = output<RegularEventOutput<AngularSlickgridOutputs['onSortCleared']>>();\n  onFilterChanged = output<RegularEventOutput<AngularSlickgridOutputs['onFilterChanged']>>();\n  onFilterCleared = output<RegularEventOutput<AngularSlickgridOutputs['onFilterCleared']>>();\n  onSortChanged = output<RegularEventOutput<AngularSlickgridOutputs['onSortChanged']>>();\n  onTreeItemToggled = output<RegularEventOutput<AngularSlickgridOutputs['onTreeItemToggled']>>();\n  onTreeFullToggleEnd = output<RegularEventOutput<AngularSlickgridOutputs['onTreeFullToggleEnd']>>();\n  onTreeFullToggleStart = output<RegularEventOutput<AngularSlickgridOutputs['onTreeFullToggleStart']>>();\n\n  // Angular-Slickgrid specific events\n  onBeforeGridCreate = output<RegularEventOutput<AngularSlickgridOutputs['onBeforeGridCreate']>>();\n  onGridCreated = output<RegularEventOutput<AngularSlickgridOutputs['onGridCreated']>>();\n  onDataviewCreated = output<RegularEventOutput<AngularSlickgridOutputs['onDataviewCreated']>>();\n  onAngularGridCreated = output<RegularEventOutput<AngularSlickgridOutputs['onAngularGridCreated']>>();\n  onBeforeGridDestroy = output<RegularEventOutput<AngularSlickgridOutputs['onBeforeGridDestroy']>>();\n  onLanguageChange = output<RegularEventOutput<AngularSlickgridOutputs['onLanguageChange']>>();\n\n  @Input()\n  get dataset(): any[] {\n    return (this.customDataView ? this.slickGrid?.getData?.() : this.dataView?.getItems()) || [];\n  }\n  set dataset(newDataset: any[]) {\n    const prevDatasetLn = this._currentDatasetLength;\n    const isDatasetEqual = dequal(newDataset, this._dataset || []);\n    let data = 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.slickGrid &&\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    this._dataset = data;\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.slickGrid && this.options?.autoFitColumnsOnFirstLoad && prevDatasetLn === 0 && !this._isAutosizeColsCalled) {\n      this.slickGrid.autosizeColumns();\n      this._isAutosizeColsCalled = true;\n    }\n    this.suggestDateParsingWhenHelpful();\n  }\n\n  @Input()\n  get datasetHierarchical(): any[] | undefined {\n    return this.sharedService.hierarchicalDataset;\n  }\n  set datasetHierarchical(newHierarchicalDataset: any[] | undefined) {\n    const isDatasetEqual = dequal(newHierarchicalDataset, this.sharedService?.hierarchicalDataset ?? []);\n    const prevFlatDatasetLn = this._currentDatasetLength;\n    this.sharedService.hierarchicalDataset = newHierarchicalDataset;\n\n    if (newHierarchicalDataset && this.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 (newHierarchicalDataset && this.slickGrid && this.sortService?.processTreeDataInitialSort) {\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();\n        if (flatDatasetLn > 0 && (flatDatasetLn !== prevFlatDatasetLn || !isDatasetEqual)) {\n          this.filterService.refreshTreeDataFilters();\n        }\n      });\n      this._isDatasetHierarchicalInitialized = true;\n    }\n  }\n\n  get elementRef(): ElementRef {\n    return this.elm;\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 gridContainerElement(): HTMLElement | null {\n    return document.querySelector(`#${this.options.gridContainerId || ''}`);\n  }\n\n  /** GETTER to know if dataset was initialized or not */\n  get isDatasetInitialized(): boolean {\n    return this._isDatasetInitialized;\n  }\n  /** SETTER to change if dataset was initialized or not (stringly used for unit testing purposes) */\n  set isDatasetInitialized(isInitialized: boolean) {\n    this._isDatasetInitialized = isInitialized;\n  }\n  set isDatasetHierarchicalInitialized(isInitialized: boolean) {\n    this._isDatasetHierarchicalInitialized = isInitialized;\n  }\n\n  get registeredResources(): Array<ExternalResource | ExternalResourceConstructor> {\n    return this._registeredResources;\n  }\n\n  @ContentChild('slickgridHeader', { static: true }) slickgridHeader: TemplateRef<any> | null = null;\n  @ContentChild('slickgridFooter', { static: true }) slickgridFooter: TemplateRef<any> | null = null;\n\n  constructor(\n    protected readonly angularUtilService: AngularUtilService,\n    protected readonly appRef: ApplicationRef,\n    protected readonly containerService: ContainerService,\n    protected readonly elm: ElementRef,\n    @Optional() protected readonly translate: TranslateService,\n    @Optional() protected readonly translaterService: TranslaterService,\n    @Optional() @Inject('defaultGridOption') protected forRootConfig?: GridOption,\n    @Optional() @Inject('externalService') externalServices?: ExternalTestingDependencies\n  ) {\n    const slickgridConfig = new SlickgridConfig();\n\n    // initialize and assign all Service Dependencies\n    this._eventPubSubService = externalServices?.eventPubSubService ?? new EventPubSubService(this.elm.nativeElement);\n    this._eventPubSubService.eventNamingStyle = 'camelCase';\n\n    this.backendUtilityService = externalServices?.backendUtilityService ?? new BackendUtilityService();\n    this.gridEventService = externalServices?.gridEventService ?? new GridEventService();\n    this.sharedService = externalServices?.sharedService ?? new SharedService();\n    this.collectionService = externalServices?.collectionService ?? new CollectionService(this.translaterService);\n    // prettier-ignore\n    this.extensionUtility = externalServices?.extensionUtility ?? new ExtensionUtility(this.sharedService, this.backendUtilityService, this.translaterService);\n    this.filterFactory = new FilterFactory(slickgridConfig, this.translaterService, this.collectionService);\n    // prettier-ignore\n    this.filterService = externalServices?.filterService ?? new FilterService(this.filterFactory as any, this._eventPubSubService, this.sharedService, this.backendUtilityService);\n    this.resizerService = externalServices?.resizerService ?? new ResizerService(this._eventPubSubService);\n    // prettier-ignore\n    this.sortService = externalServices?.sortService ?? new SortService(this.collectionService, this.sharedService, this._eventPubSubService, this.backendUtilityService);\n    // prettier-ignore\n    this.treeDataService = externalServices?.treeDataService ?? new TreeDataService(this._eventPubSubService, this.filterService, this.sharedService, this.sortService);\n    // prettier-ignore\n    this.paginationService = externalServices?.paginationService ?? new PaginationService(this._eventPubSubService, this.sharedService, this.backendUtilityService);\n\n    this.extensionService =\n      externalServices?.extensionService ??\n      new ExtensionService(\n        this.extensionUtility,\n        this.filterService,\n        this._eventPubSubService,\n        this.sharedService,\n        this.sortService,\n        this.treeDataService,\n        this.translaterService,\n        () => this.gridService\n      );\n\n    // prettier-ignore\n    /* v8 ignore next 8 */\n    this.gridStateService = externalServices?.gridStateService ?? new GridStateService(\n      this.extensionService,\n      this.filterService,\n      this._eventPubSubService,\n      this.sharedService,\n      this.sortService,\n      this.treeDataService\n    );\n\n    // prettier-ignore\n    /* v8 ignore next 9 */\n    this.gridService = externalServices?.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 = externalServices?.headerGroupingService ?? new HeaderGroupingService(this.extensionUtility);\n\n    this.serviceList = [\n      this.containerService,\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    // register all Service instances in the container\n    this.containerService.registerInstance('ExtensionUtility', this.extensionUtility);\n    this.containerService.registerInstance('FilterService', this.filterService);\n    this.containerService.registerInstance('CollectionService', this.collectionService);\n    this.containerService.registerInstance('ExtensionService', this.extensionService);\n    this.containerService.registerInstance('GridEventService', this.gridEventService);\n    this.containerService.registerInstance('GridService', this.gridService);\n    this.containerService.registerInstance('GridStateService', this.gridStateService);\n    this.containerService.registerInstance('HeaderGroupingService', this.headerGroupingService);\n    this.containerService.registerInstance('PaginationService', this.paginationService);\n    this.containerService.registerInstance('ResizerService', this.resizerService);\n    this.containerService.registerInstance('SharedService', this.sharedService);\n    this.containerService.registerInstance('SortService', this.sortService);\n    this.containerService.registerInstance('EventPubSubService', this._eventPubSubService);\n    this.containerService.registerInstance('PubSubService', this._eventPubSubService);\n    this.containerService.registerInstance('TranslaterService', this.translaterService);\n    this.containerService.registerInstance('TreeDataService', this.treeDataService);\n  }\n\n  ngAfterViewInit() {\n    if (!this.columns) {\n      throw new Error(\n        'Using `<angular-slickgrid>` requires [columns], it seems that you might have forgot to provide the missing bindable input.'\n      );\n    }\n    this.initialization(this._eventHandler);\n    this._isGridInitialized = true;\n\n    // recheck the empty warning message after grid is shown so that it works in every use case\n    if (this.options?.enableEmptyDataWarningMessage && Array.isArray(this.dataset)) {\n      const finalTotalCount = this.dataset.length;\n      this.displayEmptyDataWarning(finalTotalCount < 1);\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  ngOnDestroy(): void {\n    this._eventPubSubService.publish('onBeforeGridDestroy', this.slickGrid);\n    this.destroy();\n  }\n\n  destroy(shouldEmptyDomElementContainer = false) {\n    // dispose of all Services\n    this.serviceList.forEach((service: any) => {\n      if (typeof service?.dispose === 'function') {\n        service.dispose();\n      }\n    });\n    this.serviceList.length = 0;\n    this._eventPubSubService?.unsubscribeAll();\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._eventHandler?.unsubscribeAll) {\n      this._eventHandler.unsubscribeAll();\n    }\n    if (this.dataView) {\n      this.dataView.setItems([]);\n      this.dataView.destroy();\n    }\n    if (this.slickGrid?.destroy) {\n      this.slickGrid.destroy(shouldEmptyDomElementContainer);\n    }\n\n    if (this.backendServiceApi) {\n      for (const prop of Object.keys(this.backendServiceApi)) {\n        delete this.backendServiceApi[prop as keyof BackendServiceApi];\n      }\n      this.backendServiceApi = undefined;\n    }\n    if (this.columns) {\n      for (const prop of Object.keys(this.columns)) {\n        (this.columns as any)[prop] = null;\n      }\n    }\n    for (const prop of Object.keys(this.sharedService)) {\n      (this.sharedService as any)[prop] = null;\n    }\n\n    // also unsubscribe all RxJS subscriptions\n    this.subscriptions = unsubscribeAll(this.subscriptions);\n\n    this._dataset = null;\n    this.datasetHierarchical = undefined;\n    this._columns = [];\n    this._angularGridInstances = undefined;\n    this.slickGrid = undefined as any;\n\n    // we could optionally also empty the content of the grid container DOM element\n    if (shouldEmptyDomElementContainer) {\n      this.emptyGridContainerElm();\n    }\n  }\n\n  disposeExternalResources() {\n    if (Array.isArray(this._registeredResources)) {\n      while (this._registeredResources.length > 0) {\n        const res = this._registeredResources.pop();\n        if (typeof (res as ExternalResource)?.dispose === 'function') {\n          (res as ExternalResource).dispose!();\n        }\n      }\n    }\n    this._registeredResources = [];\n  }\n\n  emptyGridContainerElm() {\n    const gridContainerId = this.options?.gridContainerId || 'grid1';\n    const gridContainerElm = document.querySelector(`#${gridContainerId}`);\n    emptyElement(gridContainerElm);\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          // prettier-ignore\n          const datasetName = backendApi && backendApiService && typeof backendApiService.getDatasetName === 'function' ? backendApiService.getDatasetName() : '';\n          if (!Array.isArray(processResult) && processResult?.data[datasetName]) {\n            const data =\n              'nodes' in processResult.data[datasetName]\n                ? (processResult as any).data[datasetName].nodes\n                : (processResult as any).data[datasetName];\n            const totalCount =\n              'totalCount' in processResult.data[datasetName]\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  initialization(eventHandler: SlickEventHandler) {\n    this.options.translater = this.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 ?? '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 ||= [];\n    this.options = this.mergeGridOptions(this.options);\n    this._paginationOptions = this.options?.pagination;\n    this.locales = this.options?.locales ?? Constants.locales;\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    // 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.customDataView) {\n      const dataviewInlineFilters = 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(this.options.groupItemMetadataOption);\n        this.sharedService.groupItemMetadataProvider = this.groupItemMetadataProvider;\n        dataViewOptions = { ...dataViewOptions, groupItemMetadataProvider: this.groupItemMetadataProvider };\n      }\n      this.dataView = new SlickDataView<TData>(dataViewOptions, 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.gridStateService.loadSlickGridEditors(this._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\n    // before certain extentions/plugins potentially adds extra columns not created by the user itself (RowMove, RowDetail, RowSelections)\n    // we'll subscribe to the event and push back the change to the user so they always use full column defs array including extra cols\n    this.subscriptions.push(\n      this._eventPubSubService.subscribe<{ columns: Column[]; grid: SlickGrid }>('onPluginColumnsChanged', (data) => {\n        this._columns = data.columns;\n        this.columnsChange.emit(this._columns);\n      })\n    );\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.slickGrid = new SlickGrid<TData, Column<TData>, GridOption<Column<TData>>>(\n      `#${this.gridId}`,\n      this.customDataView || (this.dataView as SlickDataView<TData>),\n      this._columns,\n      this.options,\n      this._eventPubSubService\n    );\n    if (typeof (this.dataView as SlickDataView<TData>).setGrid === 'function') {\n      this.dataView.setGrid(this.slickGrid);\n    }\n    this.sharedService.dataView = this.dataView;\n    this.sharedService.slickGrid = this.slickGrid;\n    this.sharedService.gridContainerElement = this.elm.nativeElement as HTMLDivElement;\n    if (this.groupItemMetadataProvider) {\n      this.slickGrid.registerPlugin(this.groupItemMetadataProvider); // register GroupItemMetadataProvider when Grouping is enabled\n    }\n\n    // get any possible Services that user want to register\n    this.registerResources();\n\n    this.extensionService.bindDifferentExtensions();\n    this.bindDifferentHooks(this.slickGrid, 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    this.sharedService.frozenVisibleColumnId = this.slickGrid.getFrozenColumnId();\n    // initialize the SlickGrid grid\n    this.slickGrid.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    if (this.gridContainerElement) {\n      this.resizerService.init(this.slickGrid, this.gridContainerElement as HTMLDivElement);\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 && this.gridContainerElement) {\n      this.slickFooter = new SlickFooterComponent(\n        this.slickGrid,\n        this.options.customFooterOptions,\n        this._eventPubSubService,\n        this.translaterService\n      );\n      this.slickFooter.renderFooter(this.gridContainerElement);\n    }\n\n    if (!this.customDataView && this.dataView) {\n      // load the data in the DataView (unless it's a hierarchical dataset, if so it will be loaded after the initial tree sort)\n      const initialDataset = this.options?.enableTreeData ? this.sortTreeDataset(this._dataset) : this._dataset;\n      this.dataView.beginUpdate();\n      this.dataView.setItems(initialDataset || [], this.options.datasetIdPropertyName ?? 'id');\n      this.dataView.endUpdate();\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.slickGrid?.getSelectionModel() && this.options?.dataView && 'syncGridSelection' in this.options.dataView) {\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 && 'syncGridSelectionWithBackendService' in this.options.dataView) {\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.slickGrid, preservedRowSelection);\n        } else if (typeof syncGridSelection === 'object') {\n          this.dataView.syncGridSelection(\n            this.slickGrid,\n            syncGridSelection.preserveHidden,\n            syncGridSelection.preserveHiddenOnSelectionChange\n          );\n        }\n      }\n\n      const datasetLn = this.dataView.getLength() || this._dataset?.length || 0;\n      if (datasetLn > 0) {\n        if (!this._isDatasetInitialized && (this.options.enableCheckboxSelector || this.options.enableSelection)) {\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.slickGrid);\n\n    // after the DataView is created & updated execute some processes\n    if (!this.customDataView) {\n      this.executeAfterDataviewCreated(this.slickGrid, this.options);\n    }\n\n    // bind resize ONLY after the dataView is ready\n    this.bindResizeHook(this.slickGrid, 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    // 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.options?.enablePagination && this._isLocalGrid) {\n      this.showPagination = true;\n      this.loadLocalGridPagination(this.dataset);\n    }\n\n    this._angularGridInstances = {\n      // Slick Grid & DataView objects\n      dataView: this.dataView,\n      slickGrid: this.slickGrid,\n      extensions: this.extensionService?.extensionList,\n\n      // public methods\n      destroy: this.destroy.bind(this),\n\n      // return all available Services (non-singleton)\n      backendService: this.backendService,\n      eventPubSubService: this._eventPubSubService,\n      filterService: this.filterService,\n      gridEventService: this.gridEventService,\n      gridStateService: this.gridStateService,\n      gridService: this.gridService,\n      headerGroupingService: this.headerGroupingService,\n      extensionService: this.extensionService,\n      paginationComponent: this.slickPagination,\n      paginationService: this.paginationService,\n      resizerService: this.resizerService,\n      sortService: this.sortService,\n      treeDataService: this.treeDataService,\n    };\n\n    // all instances (SlickGrid, DataView & all Services)\n    this._eventPubSubService.publish('onAngularGridCreated', this._angularGridInstances);\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.slickGrid &&\n      !isSyncGridSelectionEnabled &&\n      this.options?.backendServiceApi &&\n      (this.options.enableSelection || this.options.enableCheckboxSelector)\n    ) {\n      this.slickGrid.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  /**\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    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.slickGrid && 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      if (dataset) {\n        this.slickGrid.invalidate();\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\n      if (this._paginationOptions && this.options?.pagination && this.options?.backendServiceApi) {\n        const paginationOptions = this.setPaginationOptionsWhenPresetDefined(this.options, this._paginationOptions as Pagination);\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\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.slickGrid && this.options.enableAutoResize) {\n        const delay = this.options.autoResize && this.options.autoResize.delay;\n        this.resizerService.resizeGrid(delay || 10);\n      }\n    }\n  }\n\n  setData(data: TData[], shouldAutosizeColumns = false) {\n    if (shouldAutosizeColumns) {\n      this._isAutosizeColsCalled = false;\n      this._currentDatasetLength = 0;\n    }\n    this.dataset = data || [];\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 && paginationOptions && !this._isPaginationInitialized) {\n      if (this.hasBackendInfiniteScroll()) {\n        console.warn('[Angular-Slickgrid] `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  updateColumnDefinitionsList(newColumns: Column[]) {\n    // map the Editor model to editorClass and load editor collectionAsync\n    const updatedColumns = this.gridStateService.syncPluginColumns(newColumns, [...(this.sharedService.allColumns || []), ...newColumns]);\n\n    if (this.options.enableTranslate) {\n      this.extensionService.translateColumnHeaders(undefined, updatedColumns);\n    }\n    this.extensionService.renderColumnHeaders(updatedColumns, true);\n\n    if (this.options?.enableAutoSizeColumns) {\n      this.slickGrid.autosizeColumns();\n    } else if (this.options?.enableAutoResizeColumnsByCellContent && this.resizerService?.resizeColumnsByCellContent) {\n      this.resizerService.resizeColumnsByCellContent();\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.slickGrid.setHeaderRowVisibility(showing);\n    if (showing === true && this._isGridInitialized) {\n      this.slickGrid.setColumns(this.columns);\n    }\n    return showing;\n  }\n\n  /**\n   * Toggle the empty data warning message visibility.\n   * @param showWarning\n   */\n  displayEmptyDataWarning(showWarning = true) {\n    this.slickEmptyWarning?.showEmptyDataMessage(showWarning);\n  }\n  //\n  // protected functions\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[]) {\n    columns.forEach((col) => (col.originalWidth = col.width));\n  }\n\n  protected bindDifferentHooks(grid: SlickGrid, gridOptions: GridOption, dataView: SlickDataView) {\n    // on locale change, we have to manually translate the Headers, GridMenu\n    if (this.translate?.onLangChange) {\n      // translate some of them on first load, then on each language change\n      if (gridOptions.enableTranslate) {\n        this.extensionService.translateAllExtensions();\n      }\n\n      this.subscriptions.push(\n        this.translate.onLangChange.subscribe(({ lang }) => {\n          // publish event of the same name that Slickgrid-Universal uses on a language change event\n          this._eventPubSubService.publish('onLanguageChange', lang);\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\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.slickGrid, this.sharedService);\n      }\n    }\n\n    if (dataView && grid) {\n      // on cell click, mainly used with the columnDef.action callback\n      this.gridEventService.bindOnCellChange(grid);\n      this.gridEventService.bindOnClick(grid);\n\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 SharedService flag\n      this._eventHandler.subscribe(grid.onColumnsReordered, () => {\n        this.sharedService.hasColumnsReordered = true;\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.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  protected bindBackendCallbackFunctions(gridOptions: GridOption) {\n    const backendApi = gridOptions.backendServiceApi;\n    const backendApiService = backendApi?.service;\n    const serviceOptions: BackendServiceOption = backendApiService?.options ?? {};\n    // prettier-ignore\n    const isExecuteCommandOnInit = (!serviceOptions) ? false : ((serviceOptions && 'executeProcessCommandOnInit' in serviceOptions) ? serviceOptions['executeProcessCommandOnInit'] : 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        // prettier-ignore\n        const process = (isExecuteCommandOnInit) ? (backendApi.process && backendApi.process(query) || null) : (backendApi.onInit && 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                next: (processResult: any) =>\n                  backendUtilityService.executeBackendProcessesCallback(startTime, processResult, backendApi, totalItems),\n                error: (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 (\n      this.slickGrid &&\n      this.options.backendServiceApi &&\n      this.hasBackendInfiniteScroll() &&\n      !this.options.backendServiceApi?.onScrollEnd\n    ) {\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.slickGrid.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  protected bindResizeHook(grid: SlickGrid, options: GridOption) {\n    if (\n      (options.autoFitColumnsOnFirstLoad && options.autosizeColumnsByCellContentOnFirstLoad) ||\n      (options.enableAutoSizeColumns && options.enableAutoResizeColumnsByCellContent)\n    ) {\n      throw new Error(\n        `[Angular-Slickgrid] 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  protected 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 && 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  /** 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  protected initializePaginationService(paginationOptions: Pagination) {\n    if (this.options) {\n      this.paginationData = {\n        gridOptions: this.options,\n        paginationService: this.paginationService,\n      };\n      this.paginationService.totalItems = this.totalItems;\n      this.paginationService.init(this.slickGrid, paginationOptions, this.backendServiceApi);\n      this.subscriptions.push(\n        this._eventPubSubService.subscribe('onPaginationChanged', (paginationChanges: PaginationMetadata) => {\n          this.paginationChanged(paginationChanges);\n        }),\n        this._eventPubSubService.subscribe('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      // also initialize (render) the pagination component\n      this.renderPagination();\n      this._isPaginationInitialized = true;\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 (Array.isArray(this.options.presets?.columns) && this.options.presets.columns.length > 0) {\n      // delegate to GridStateService for centralized column arrangement logic\n      // we pass `false` for triggerAutoSizeColumns to maintain original behavior on preset load\n      this.gridStateService.changeColumnsArrangement(this.options.presets.columns, false);\n    }\n  }\n\n  /** Load any possible Filters Grid Presets */\n  protected loadFilterPresetsWhenDatasetInitialized() {\n    if (this.options && !this.customDataView) {\n      // if user entered some Filter \"presets\", we need to reflect them all in the DOM\n      // also note that a presets of Tree Data Toggling will also call this method because Tree Data toggling does work with data filtering\n      // (collapsing a parent will basically use Filter for hidding (aka collapsing) away the child underneat it)\n      if (Array.isArray(this.options.presets?.filters) || Array.isArray(this.options.presets?.treeData?.toggledItems)) {\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 && 'totalRows' in slickPagingInfo && 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.enableSelection);\n    if (\n      enableRowSelection &&\n      this.slickGrid?.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.slickGrid && Array.isArray(gridRowIndexes)) {\n        this.slickGrid.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    gridOptions.gridId = this.gridId;\n    gridOptions.gridContainerId = `slickGridContainer-${this.gridId}`;\n\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, this.forRootConfig, gridOptions) as GridOption;\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(gridOptions)) {\n      gridOptions.enablePagination = !!(gridOptions.backendServiceApi && gridOptions.enablePagination === undefined\n        ? true\n        : gridOptions.enablePagination);\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      (this.forRootConfig?.pagination || gridOptions.pagination)\n    ) {\n      options.pagination.pageSize =\n        gridOptions.pagination?.pageSize ?? this.forRootConfig?.pagination?.pageSize ?? GlobalGridOptions.pagination!.pageSize;\n      options.pagination.pageSizes =\n        gridOptions.pagination?.pageSizes ?? this.forRootConfig?.pagination?.pageSizes ?? GlobalGridOptions.pagination!.pageSizes;\n    }\n\n    // also make sure to show the header row if user have enabled filtering\n    this._hideHeaderRowAfterPageLoad = options.showHeaderRow === false;\n    if (options.enableFiltering && !options.showHeaderRow) {\n      options.showHeaderRow = options.enableFiltering;\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 (options && !options.enableFiltering && options.enablePagination && this._isLocalGrid) {\n      options.enableFiltering = true;\n      options.showHeaderRow = false;\n      this._hideHeaderRowAfterPageLoad = true;\n      if (this.sharedService) {\n        this.sharedService.hideHeaderRowAfterPageLoad = true;\n      }\n    }\n\n    return options;\n  }\n\n  /** Add a register of 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: Array<ExternalResource | ExternalResourceConstructor>, 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    // Angular-Slickgrid requires RxJS, so we'll register it as the first resource\n    this.registerRxJsResource(new RxJsResource() as RxJsFacade);\n\n    if (this.options.enableRowDetailView) {\n      const RowDetailClass = this._registeredResources.find((res: any) => res.pluginName === 'AngularRowDetailView') as\n        ExternalResourceConstructor | undefined;\n      if (!RowDetailClass) {\n        throw new Error(\n          '[Angular-Slickgrid] You enabled the Row Detail View feature but you did not provide the \"AngularRowDetailView\" class as an external resource.'\n        );\n      }\n\n      if (RowDetailClass) {\n        const rowDetailInstance = new RowDetailClass(\n          this.angularUtilService,\n          this.appRef,\n          this._eventPubSubService,\n          this.elm.nativeElement,\n          this.rxjs\n        ) as AngularRowDetailView;\n        this.slickRowDetailView = rowDetailInstance;\n        rowDetailInstance.create(this.columns, this.options);\n        this.extensionService.addExtensionToList('rowDetailView', {\n          name: 'rowDetailView',\n          instance: this.slickRowDetailView,\n        });\n      }\n    }\n  }\n\n  /** initialized & auto-enable external registered resources, e.g. if user registers `ExcelExportService` then let's auto-enable `enableExcelExport:true` */\n  protected autoEnableInitializedResources(resource: ExternalResource | ExternalResourceConstructor): void {\n    if (this.slickGrid && typeof (resource as ExternalResource).init === 'function') {\n      (resource as ExternalResource).init!(this.slickGrid, this.containerService);\n    }\n\n    // auto-enable unless the flag was specifically disabled by the end user\n    if ('pluginName' in (resource as ExternalResource)) {\n      const pluginFlagName = PluginFlagMappings.get((resource as ExternalResource).pluginName!);\n      if (pluginFlagName && this.options[pluginFlagName] !== false) {\n        this.options[pluginFlagName] = true;\n        this.slickGrid?.setOptions({ [pluginFlagName]: true });\n      }\n    }\n  }\n\n  protected initializeExternalResources(resources: Array<ExternalResource | ExternalResourceConstructor>) {\n    PluginFlagMappings.set('AngularRowDetailView', 'enableRowDetailView'); // map the external Row Detail View resource to its flag\n\n    if (Array.isArray(resources)) {\n      for (const resource of resources) {\n        this.autoEnableInitializedResources(resource);\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    // initialize RowDetail separately since we already added it to the ExtensionList via `addExtensionToList()` but not in external resources,\n    // because we don't want to dispose the extension/resource more than once (because externalResources/extensionList are both looping through their list to dispose of them)\n    if (this.options.enableRowDetailView && this.slickRowDetailView) {\n      this.slickRowDetailView.init(this.slickGrid);\n    }\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.gridStateService.addRxJsResource(this.rxjs);\n    this.sortService.addRxJsResource(this.rxjs);\n    this.paginationService.addRxJsResource(this.rxjs);\n    this.containerService.registerInstance('RxJsResource', this.rxjs);\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 renderPagination(showPagination = true) {\n    if (this.slickGrid && this.options?.enablePagination && !this._isPaginationInitialized && showPagination) {\n      if (this.options.customPaginationComponent) {\n        const paginationComp = this.angularUtilService.createAngularComponent(this.options.customPaginationComponent!);\n        this.slickPagination = paginationComp.componentRef.instance;\n      } else {\n        this.slickPagination = new SlickPaginationComponent();\n      }\n\n      if (this.slickPagination) {\n        this.slickPagination.init(this.slickGrid, this.paginationService, this._eventPubSubService, this.translaterService);\n        this.slickPagination.renderPagination(this.gridContainerElement as HTMLElement);\n        this._isPaginationInitialized = true;\n      }\n    } else if (!showPagination) {\n      this.slickPagination?.dispose();\n      this._isPaginationInitialized = false;\n    }\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<T>(flatDatasetInput: T[], forceGridRefresh = false): T[] {\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 (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  protected suggestDateParsingWhenHelpful() {\n    if (\n      this.dataView?.getItemCount() > WARN_NO_PREPARSE_DATE_SIZE &&\n      !this.options.silenceWarnings &&\n      !this.options.preParseDateColumns &&\n      this.slickGrid.getColumns().some((c) => isColumnDateType(c.type))\n    ) {\n      console.warn(\n        '[Slickgrid-Universal] For getting better perf, we suggest you enable the `preParseDateColumns` grid option, ' +\n          'for more info visit => https://ghiscoding.gitbook.io/angular-slickgrid/column-functionalities/sorting#pre-parse-date-columns-for-better-perf'\n      );\n    }\n  }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["UniversalGridOptions","SlickgridConfig","i1.AngularUtilService","i2.ContainerService","i3","i4.TranslaterService"],"mappings":";;;;;;;;;;;;;;MAca,kBAAkB,CAAA;AACiB,IAAA,GAAA;AAA9C,IAAA,WAAA,CAA8C,GAAqB,EAAA;QAArB,IAAA,CAAA,GAAG,GAAH,GAAG;IAAqB;AAEtE,IAAA,iCAAiC,CAC/B,SAAkB,EAClB,aAAsB,EACtB,IAAU,EACV,iBAAyC,EAAA;;AAGzC,QAAA,MAAM,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,SAAS,EAAE,iBAAiB,CAAC;;AAG3E,QAAA,IAAI,YAAY,EAAE,QAAQ,IAAI,IAAI,EAAE;YAClC,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,QAAe,EAAE,IAAI,CAAC;QACnD;;QAGA,IAAI,OAAO,GAAuB,IAAI;AACtC,QAAA,MAAM,OAAO,GAAG,YAAY,CAAC,QAAgC;AAE7D,QAAA,IAAI,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE;AACvE,YAAA,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,CAAgB;;AAG7C,YAAA,IAAI,aAAa,IAAI,OAAO,EAAE;gBAC5B,aAAa,CAAC,eAAe,CAAC,YAAY,CAAC,QAAQ,CAAC,aAAa,CAAC;YACpE;QACF;AAEA,QAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,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