@pega/lists-core 8.8.0 → 9.0.0-build.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/lib/index.d.ts +2 -2
  2. package/lib/index.d.ts.map +1 -1
  3. package/lib/index.js +2 -2
  4. package/lib/index.js.map +1 -1
  5. package/lib/src/core/StateResolver.d.ts.map +1 -1
  6. package/lib/src/core/StateResolver.js +2 -1
  7. package/lib/src/core/StateResolver.js.map +1 -1
  8. package/lib/src/core/constants.d.ts +11 -101
  9. package/lib/src/core/constants.d.ts.map +1 -1
  10. package/lib/src/core/constants.js +6 -6
  11. package/lib/src/core/constants.js.map +1 -1
  12. package/lib/src/core/features/featureFactory.d.ts.map +1 -1
  13. package/lib/src/core/features/featureFactory.js +0 -1
  14. package/lib/src/core/features/featureFactory.js.map +1 -1
  15. package/lib/src/core/features/uIFeatures/afterRender/columnSizing/autoSize.d.ts.map +1 -1
  16. package/lib/src/core/features/uIFeatures/afterRender/columnSizing/autoSize.js +12 -5
  17. package/lib/src/core/features/uIFeatures/afterRender/columnSizing/autoSize.js.map +1 -1
  18. package/lib/src/core/features/uIFeatures/afterRender/columnSizing/index.d.ts.map +1 -1
  19. package/lib/src/core/features/uIFeatures/afterRender/columnSizing/index.js +13 -1
  20. package/lib/src/core/features/uIFeatures/afterRender/columnSizing/index.js.map +1 -1
  21. package/lib/src/core/features/uIFeatures/beforeRender/aggregation.d.ts +1 -0
  22. package/lib/src/core/features/uIFeatures/beforeRender/aggregation.d.ts.map +1 -1
  23. package/lib/src/core/features/uIFeatures/beforeRender/aggregation.js +3 -1
  24. package/lib/src/core/features/uIFeatures/beforeRender/aggregation.js.map +1 -1
  25. package/lib/src/core/features/uIFeatures/beforeRender/busyIndicator.d.ts +1 -0
  26. package/lib/src/core/features/uIFeatures/beforeRender/busyIndicator.d.ts.map +1 -1
  27. package/lib/src/core/features/uIFeatures/beforeRender/busyIndicator.js +3 -1
  28. package/lib/src/core/features/uIFeatures/beforeRender/busyIndicator.js.map +1 -1
  29. package/lib/src/core/features/uIFeatures/beforeRender/columnReOrder.d.ts.map +1 -1
  30. package/lib/src/core/features/uIFeatures/beforeRender/columnReOrder.js +2 -3
  31. package/lib/src/core/features/uIFeatures/beforeRender/columnReOrder.js.map +1 -1
  32. package/lib/src/core/features/uIFeatures/beforeRender/grouping.d.ts.map +1 -1
  33. package/lib/src/core/features/uIFeatures/beforeRender/grouping.js +6 -7
  34. package/lib/src/core/features/uIFeatures/beforeRender/grouping.js.map +1 -1
  35. package/lib/src/core/features/uIFeatures/beforeRender/rowDragDrop.d.ts.map +1 -1
  36. package/lib/src/core/features/uIFeatures/beforeRender/rowDragDrop.js +11 -3
  37. package/lib/src/core/features/uIFeatures/beforeRender/rowDragDrop.js.map +1 -1
  38. package/lib/src/core/features/uIFeatures/beforeRender/rowHeight.d.ts.map +1 -1
  39. package/lib/src/core/features/uIFeatures/beforeRender/rowHeight.js +4 -0
  40. package/lib/src/core/features/uIFeatures/beforeRender/rowHeight.js.map +1 -1
  41. package/lib/src/core/features/uIFeatures/beforeRender/stateHydration.d.ts.map +1 -1
  42. package/lib/src/core/features/uIFeatures/beforeRender/stateHydration.js +2 -1
  43. package/lib/src/core/features/uIFeatures/beforeRender/stateHydration.js.map +1 -1
  44. package/lib/src/core/features/uIFeatures/beforeRender/stateSanitization.d.ts.map +1 -1
  45. package/lib/src/core/features/uIFeatures/beforeRender/stateSanitization.js +19 -0
  46. package/lib/src/core/features/uIFeatures/beforeRender/stateSanitization.js.map +1 -1
  47. package/lib/src/core/features/uIFeatures/index.d.ts +0 -2
  48. package/lib/src/core/features/uIFeatures/index.d.ts.map +1 -1
  49. package/lib/src/core/features/uIFeatures/index.js +0 -2
  50. package/lib/src/core/features/uIFeatures/index.js.map +1 -1
  51. package/lib/src/core/generators/ColumnGenerator.d.ts +1 -1
  52. package/lib/src/core/generators/ColumnGenerator.d.ts.map +1 -1
  53. package/lib/src/core/generators/ColumnGenerator.js +2 -1
  54. package/lib/src/core/generators/ColumnGenerator.js.map +1 -1
  55. package/lib/src/core/generators/ColumnGenerator.types.d.ts +1 -1
  56. package/lib/src/core/generators/ColumnGenerator.types.d.ts.map +1 -1
  57. package/lib/src/core/generators/ColumnGenerator.types.js.map +1 -1
  58. package/lib/src/core/generators/GroupGenerator.d.ts +4 -1
  59. package/lib/src/core/generators/GroupGenerator.d.ts.map +1 -1
  60. package/lib/src/core/generators/GroupGenerator.js +4 -1
  61. package/lib/src/core/generators/GroupGenerator.js.map +1 -1
  62. package/lib/src/core/generators/ViewGenerator.d.ts.map +1 -1
  63. package/lib/src/core/generators/ViewGenerator.js +7 -2
  64. package/lib/src/core/generators/ViewGenerator.js.map +1 -1
  65. package/lib/src/core/generators/viewUtilityMethods.js +3 -3
  66. package/lib/src/core/generators/viewUtilityMethods.js.map +1 -1
  67. package/lib/src/core/reducers/error.d.ts.map +1 -1
  68. package/lib/src/core/reducers/index.d.ts.map +1 -1
  69. package/lib/src/core/utils/condition-utils.js +1 -1
  70. package/lib/src/core/utils/condition-utils.js.map +1 -1
  71. package/lib/src/core/utils/util.d.ts +1 -0
  72. package/lib/src/core/utils/util.d.ts.map +1 -1
  73. package/lib/src/core/utils/util.js +7 -1
  74. package/lib/src/core/utils/util.js.map +1 -1
  75. package/lib/types/ApiContext.types.d.ts +32 -3
  76. package/lib/types/ApiContext.types.d.ts.map +1 -1
  77. package/lib/types/ApiContext.types.js.map +1 -1
  78. package/lib/types/Meta.types.d.ts +36 -4
  79. package/lib/types/Meta.types.d.ts.map +1 -1
  80. package/lib/types/Meta.types.js +3 -0
  81. package/lib/types/Meta.types.js.map +1 -1
  82. package/lib/types/State.types.d.ts +21 -2
  83. package/lib/types/State.types.d.ts.map +1 -1
  84. package/lib/types/State.types.js.map +1 -1
  85. package/lib/types.d.ts +4 -1
  86. package/lib/types.d.ts.map +1 -1
  87. package/lib/types.js.map +1 -1
  88. package/package.json +3 -4
  89. package/lib/src/core/features/uIFeatures/beforeRender/resizeGroupedDragDropColumn.d.ts +0 -7
  90. package/lib/src/core/features/uIFeatures/beforeRender/resizeGroupedDragDropColumn.d.ts.map +0 -1
  91. package/lib/src/core/features/uIFeatures/beforeRender/resizeGroupedDragDropColumn.js +0 -24
  92. package/lib/src/core/features/uIFeatures/beforeRender/resizeGroupedDragDropColumn.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ViewGenerator.js","sourceRoot":"","sources":["../../../../src/core/generators/ViewGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAOpC,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,eAAe,EACf,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAS7C,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAmBvC,gGAAgG;AAChG,MAAM,CAAC,OAAO,OAAO,IAAI;IACvB,4DAA4D;IAC5D,SAAS,CAA4B;IACrC,sBAAsB;IACtB,QAAQ,CAAU;IAClB,qCAAqC;IACrC,OAAO,CAAS;IAChB,oCAAoC;IACpC,WAAW,CAAa;IACxB,kDAAkD;IAClD,WAAW,CAA4B;IACvC,+DAA+D;IAC/D,sBAAsB,CAAU;IAChC,oDAAoD;IACpD,aAAa,CAA2B;IACxC,+DAA+D;IAC/D,IAAI,CAAS;IACb,iCAAiC;IACjC,IAAI,CAAa;IACjB,mDAAmD;IACnD,OAAO,CAAY;IACnB,6CAA6C;IAC7C,IAAI,CAAS;IACb,0CAA0C;IAC1C,YAAY,CAAoB;IAChC,4GAA4G;IAC5G,YAAY,CAAU;IACtB,kEAAkE;IAClE,SAAS,CAAW;IACp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ACF","sourcesContent":["import { v4 as uuidV4 } from 'uuid';\n\nimport type { OmitStrict } from '@pega/cosmos-react-core';\n\nimport type { Meta } from '../../../types/Meta.types';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { State } from '../../../types/State.types';\nimport {\n defaultPresetIdIndex,\n rowDensityClasses,\n rowSelectColumnMeta,\n rowActionColumnMeta,\n rowDragDropColumnMeta,\n SELECTION_MODES,\n TEMPLATES\n} from '../constants';\nimport * as actions from '../actions/actions';\nimport { getExternalStateKeys, normalizeFieldDef } from '../utils/util';\nimport defaultConfig from '../config/config';\nimport type RsStore from '../RsStore';\nimport type RsInternal from '../RsInternal';\nimport type RsProps from '../RsProps';\nimport type StateResolver from '../StateResolver';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type ActionTypes from '../actions/actionConstants';\n\nimport type { UtilityFunctions } from './viewUtilityMethods';\nimport Column from './ColumnGenerator';\nimport type Row from './RowGenerator';\nimport type {\n ConfirmationActionDetails,\n DebugInfo,\n FormatterFunction,\n FreezeLine,\n RefreshNotification,\n RequiredDefinition,\n UIProps,\n ViewConfig,\n ViewContext,\n ViewState,\n VirtualizeElement\n} from './ViewGenerator.types';\nimport type { RowData } from './RowGenerator.types';\nimport type { ColumnConfig } from './ColumnGenerator.types';\nimport type GroupGenerator from './GroupGenerator';\n\n/** A view model blueprint that represents the whole view of a repeating structure component. */\nexport default class View {\n /** A dispatcher function to dispatch actions to RsCore. */\n #dispatch: StateResolver['dispatch'];\n /** Rs store object */\n #rsStore: RsStore;\n /** Unique id for the current view */\n #viewID: string;\n /** Rs internal object reference. */\n #rsInternal: RsInternal;\n /** used to pass the latest view to rsInternal. */\n #updateView!: RsInternal['updateView'];\n /** Value of unique key to identify the single selected row. */\n #singleSelectionRowKey?: string;\n /** Render factory reference from {@link RsProps} */\n renderFactory: RsProps['renderFactory'];\n /** A unique id to identify the current repeating structure. */\n rsID: string;\n /** Current data for the view. */\n data?: RowData[];\n /** Current {@link Column columns} for the view. */\n columns?: Column[];\n /** Current {@link Row rows} for the view. */\n rows?: Row[];\n /** Current group headers for the view. */\n groupHeaders?: GroupGenerator[];\n /** Indicates the visible records count for the current view after applying any type of filter operation. */\n resultsCount?: number;\n /** Indicates whether to show the overall count on view or not. */\n showCount?: boolean;\n /** Indicates if the view has more records. */\n hasMoreResults?: boolean;\n /** Indicates the total record count of the view including group headers.\n */\n totalItemCount?: number;\n /** Indicates the total selected records count. */\n selectedRecordsCount?: number;\n /** Indicates the total height of the view. */\n viewHeight?: number;\n /** Indicates the current height of the container that contains data records like rows. */\n bodyHeight?: number | string;\n /** Indicates max height of the current parent container. */\n bodyMaxHeight?: number;\n /** Indicates the current height of each data row. It does not include group header row. */\n rowHeight?: number;\n /** Indicates the class name of the current selected row density. */\n rowHeightClass?: string;\n /** Indicates if the filter is applied for the current view. */\n isFilterApplied?: boolean;\n /** Indicates if the view is in loading state and not ready. It is used to show loaders in case of api calls. */\n isLoading?: boolean;\n /** Styles for the freeze line to be shown when freezing is applied. */\n freezeLine?: FreezeLine;\n /** Meta of the repeating structures. */\n meta: Meta;\n /**\n * This function is provided a click handler for a row via row generator.\n * @param {RowData} data - current row data\n * @returns {void} void\n */\n onRowClickAction?: RsProps['onRowClickAction'];\n /** A list of customised the toolbar actions to be displayed at the top of a repeating structure, apart from ootb toolbar actions. */\n toolBarOptions?: RsProps['toolBarOptions'];\n /** An object of formatter functions which formats the raw value. */\n formatters?: RsProps['formatters'];\n /** A collection of style formats that can be applied for styling the data. */\n styleFormats?: RsProps['styleFormats'];\n /** A map of formatters that will be displayed to consumer to format a fieldDef in repeating structure. */\n renderFormatterTypeMap?: RsProps['renderFormatterTypeMap'];\n /** Reference to the top level Html element of repeating structures. */\n domContainer?: HTMLElement;\n /** Reference to the scroller element of repeating structures */\n scrollerNode?: HTMLElement;\n /** Reference to the header element of repeating structures. */\n itemElement?: HTMLElement;\n /** Reference to the virtualizer instance of the repeating structures. */\n virtualizeElements: VirtualizeElement;\n /** Indicates if hierarchical grouping is enabled. */\n hierarchicalGroupEnabled?: boolean;\n /** The details of the confirmation action modal triggered from consumer of repeating structures. */\n confirmationActionDetails?: ConfirmationActionDetails;\n /** Indicates if a count update is required. E.g. after applying filter a reset of count is required. */\n isCountUpdateRequired?: boolean;\n /** Indicates if count is generated internally. Used for RS core internal purpose. */\n countGeneratedInternally?: boolean;\n /** The state shared with the view after completion of one render cycle. */\n state: ViewState;\n /** The details of the debug information shared by the consumer of repeating structures.\n * It is displayed as one of the toolbar actions to debug the {@link ApiContext api context methods} latency. */\n debugInfo?: DebugInfo[];\n /** The definition of a required view. It has a boolean flag to indicate if the current repeating structures view\n * is required and a validation message to be displayed in case of required validation failure.\n * This definition is passed by consumer of repeating structures. */\n requiredDef?: RequiredDefinition;\n /** A set of {@link State.externalState external state} valid keys derived from meta.\n * E.g. value of {@link Meta.externalFilters external filters in meta} is a valid external state key. */\n externalStateKeys?: string[];\n /** Stores all the view related utility functions */\n type!: UtilityFunctions;\n /** Indicates if the current view object is generated via instantRender. */\n isInstantRender?: boolean;\n /** Config to show refreshNotification. This will be set upon receiving {@link ActionTypes.NOTIFY_DATA_REFRESH NOTIFY_DATA_REFRESH} action. */\n refreshNotification?: RefreshNotification;\n\n /**\n Overrides the default count announcement behavior for screen readers.\n * true: Always announce the row count, including on first render.\n * false: Never announce the row count.\n * undefined: Use default behavior (skip first count announcement, announce on subsequent count updates).\n */\n announceCount?: boolean;\n /**\n * Creates a view instance that represents the whole view of repeating structures.\n * It has properties like rows, columns, data to build a repeating structures view.\n * @param options An options object to create a view instance. If passed the view is created with this set of options.\n * @param rsInternal The {@link RsInternal} object.\n */\n constructor(config: ViewConfig, rsInternal: RsInternal) {\n const {\n data,\n columns,\n rows = [],\n groupHeaders,\n resultsCount,\n hasMoreResults,\n totalItemCount,\n showCount,\n viewHeight,\n selectedRecordsCount,\n bodyHeight,\n bodyMaxHeight,\n rowHeight,\n rowHeightClass,\n isFilterApplied,\n isLoading,\n freezeLine,\n state,\n domContainer,\n scrollerNode,\n meta,\n itemElement,\n virtualizeElements,\n debugInfo = [] as DebugInfo[],\n requiredDef,\n hierarchicalGroupEnabled,\n singleSelectionRowKey,\n confirmationActionDetails,\n externalStateKeys,\n isCountUpdateRequired,\n countGeneratedInternally,\n isInstantRender,\n refreshNotification,\n announceCount\n } = config;\n const { getRsStore, getRsProps, getRsStateResolver } = rsInternal;\n this.#rsInternal = rsInternal;\n this.#rsStore = getRsStore();\n const rsProps = getRsProps();\n const rsStateResolver = getRsStateResolver();\n\n this.#dispatch = rsStateResolver.dispatch;\n this.#viewID = uuidV4();\n\n // TODO: temporary solution until renderFactory is moved out of core library\n this.renderFactory = rsProps.renderFactory;\n this.rsID = rsInternal.getRsID();\n\n this.data = data;\n this.columns = columns!;\n this.rows = rows;\n this.groupHeaders = groupHeaders;\n this.resultsCount = resultsCount;\n this.hasMoreResults = hasMoreResults;\n this.showCount = meta.showCount ? showCount : false;\n this.totalItemCount = totalItemCount;\n this.selectedRecordsCount = selectedRecordsCount;\n this.viewHeight = viewHeight;\n this.bodyHeight = bodyHeight;\n this.bodyMaxHeight = bodyMaxHeight;\n this.rowHeight = rowHeight;\n this.rowHeightClass = rowHeightClass;\n this.isFilterApplied = isFilterApplied;\n this.isLoading = isLoading;\n this.freezeLine = freezeLine;\n this.meta = meta;\n this.onRowClickAction = rsProps.onRowClickAction;\n this.toolBarOptions = rsProps.toolBarOptions;\n this.formatters = rsProps.formatters;\n this.styleFormats = rsProps.styleFormats;\n this.renderFormatterTypeMap = rsProps.renderFormatterTypeMap;\n this.#singleSelectionRowKey = singleSelectionRowKey;\n\n this.domContainer = domContainer;\n this.scrollerNode = scrollerNode;\n this.itemElement = itemElement;\n this.virtualizeElements = virtualizeElements || {};\n this.hierarchicalGroupEnabled = hierarchicalGroupEnabled;\n this.confirmationActionDetails = {\n ...confirmationActionDetails!,\n showConfirmationAction: state?.showConfirmationAction!\n };\n this.isCountUpdateRequired = isCountUpdateRequired;\n this.countGeneratedInternally = countGeneratedInternally;\n this.debugInfo = debugInfo;\n this.requiredDef = requiredDef;\n this.externalStateKeys = externalStateKeys || getExternalStateKeys(this.meta);\n this.isInstantRender = isInstantRender;\n this.refreshNotification = refreshNotification;\n this.announceCount = announceCount;\n // FIXME: keep the state on view in sync with the emitted stated from StateResolver\n this.state = {\n searchText: state?.search?.query || '',\n personalization: state?.personalization,\n filterExpression: state?.filterExpression,\n clearColFilter: state?.clearColFilter,\n sortingOrder: state?.sortingOrder,\n groups: state?.groups,\n allGroupsExpanded: state?.allGroupsExpanded,\n groupToggle: state?.groupToggle,\n showHeaderIcons: state?.showHeaderIcons,\n colOrder: state?.colOrder,\n hiddenColumns: state?.hiddenColumns,\n freezeColumns: state?.freezeColumns,\n columnWidths: state?.columnWidths,\n customFields: state?.customFields,\n selectedHeightOption: state?.selectedHeightOption,\n paginationOptions: state?.paginationOptions,\n notifications: state?.notifications,\n rowSelectionChangeSet: state?.rowSelectionChangeSet,\n selectedRows: state?.selectedRows,\n editInfo: state?.editInfo,\n bootstrap: state?.bootstrap,\n refresh: state?.refresh,\n showSelectAllCheckbox: state?.showSelectAllCheckbox,\n externalState: state?.externalState,\n columnAlias: state?.columnAlias,\n aggregationInfo: state?.aggregationInfo,\n errors: state?.errors,\n responsive: state?.responsive, // stores the responsive behavior of DOM container w.r.t. various breakpoints.\n conditionalStyleFormats: state?.conditionalStyleFormats\n };\n\n /** IMP: For generator methods use traditional function syntax\n * rather than arrow function for memory efficiency\n * and bind 'this' to the methods which requires 'this' context. */\n this.getRenderingEnginePropsById = this.getRenderingEnginePropsById.bind(this);\n this.getFormatterByKey = this.getFormatterByKey.bind(this);\n this.getContext = this.getContext.bind(this);\n this.setProp = this.setProp.bind(this);\n this.addColumnAtIndex = this.addColumnAtIndex.bind(this);\n this.getRowDensity = this.getRowDensity.bind(this);\n this.setDomContainer = this.setDomContainer.bind(this);\n this.setItemElement = this.setItemElement.bind(this);\n this.shouldDisplayFeature = this.shouldDisplayFeature.bind(this);\n this.setScrollNode = this.setScrollNode.bind(this);\n this.putVirtualizeElement = this.putVirtualizeElement.bind(this);\n this.getDomContainer = this.getDomContainer.bind(this);\n this.getItemElement = this.getItemElement.bind(this);\n this.getScrollNode = this.getScrollNode.bind(this);\n this.getVirtualizeElement = this.getVirtualizeElement.bind(this);\n this.applyColumnsAutoSize = this.applyColumnsAutoSize.bind(this);\n this.addColumn = this.addColumn.bind(this);\n this.getUIProps = this.getUIProps.bind(this);\n }\n\n // Used by setProp for mutation\n /**\n * Retruns the View properties that is used by setProp while creating new view.\n * @returns\n */\n #get(): ViewConfig &\n Pick<RsProps, 'toolBarOptions' | 'formatters' | 'renderFormatterTypeMap' | 'onRowClickAction'> {\n return {\n data: this.data,\n singleSelectionRowKey: this.#singleSelectionRowKey,\n columns: this.columns,\n rows: this.rows,\n groupHeaders: this.groupHeaders,\n resultsCount: this.resultsCount,\n showCount: this.showCount,\n hasMoreResults: this.hasMoreResults,\n totalItemCount: this.totalItemCount,\n selectedRecordsCount: this.selectedRecordsCount,\n viewHeight: this.viewHeight,\n bodyHeight: this.bodyHeight,\n bodyMaxHeight: this.bodyMaxHeight,\n rowHeight: this.rowHeight,\n rowHeightClass: this.rowHeightClass,\n isFilterApplied: this.isFilterApplied,\n isLoading: this.isLoading,\n freezeLine: this.freezeLine,\n meta: this.meta,\n toolBarOptions: this.toolBarOptions,\n formatters: this.formatters,\n renderFormatterTypeMap: this.renderFormatterTypeMap,\n state: this.state,\n onRowClickAction: this.onRowClickAction,\n domContainer: this.domContainer,\n scrollerNode: this.scrollerNode,\n itemElement: this.itemElement,\n virtualizeElements: this.virtualizeElements,\n debugInfo: this.debugInfo,\n requiredDef: this.requiredDef,\n hierarchicalGroupEnabled: this.hierarchicalGroupEnabled,\n confirmationActionDetails: this.confirmationActionDetails,\n externalStateKeys: this.externalStateKeys,\n isCountUpdateRequired: this.isCountUpdateRequired,\n countGeneratedInternally: this.countGeneratedInternally,\n isInstantRender: this.isInstantRender,\n refreshNotification: this.refreshNotification,\n announceCount: this.announceCount\n };\n }\n\n /**\n * Attach utility functions of view to {@link type} property.\n * @param functions\n * @returns void\n */\n addUtilityFunctions(functions: UtilityFunctions) {\n this.type = functions;\n }\n\n /**\n * Sets the {@link updateView} callback function.\n * @param updateViewCallback\n * @returns void\n */\n setViewUpdateCallback(updateViewCallback: RsInternal['updateView']) {\n this.#updateView = updateViewCallback;\n }\n\n /**\n * This is used to create immutable objects of {@link View} instance. Always call setProp if updating any properties of View to make it immutable.\n * @param prop Either partial of {@link ViewConfig} or individual properties of {@link ViewConfig}.\n * @param [value] An optional parameter to provide value for {@link prop} in case prop is not of type {@link ViewConfig}\n * @returns void\n */\n setProp(prop: Partial<ViewConfig> | keyof ViewConfig, value?: ViewConfig[keyof ViewConfig]) {\n const { getView } = this.#rsInternal;\n if (getView().#viewID !== this.#viewID) {\n // eslint-disable-next-line no-console\n console.warn('Doing setProp on a stale view. This might cause bugs.');\n }\n const pObject = typeof prop === 'object' ? prop : { [prop]: value };\n\n const clonedView = new View({ ...this.#get(), ...(pObject as ViewConfig) }, this.#rsInternal);\n\n if (!Object.hasOwn(pObject, 'state')) {\n clonedView.state = this.state;\n }\n\n this.#updateView(clonedView);\n return clonedView;\n }\n\n // FIXME: add tranlsations back\n /**\n * Returns the ui props for the {@link View} used for accessibility.\n */\n getUIProps(): UIProps {\n const activeView = this.state.personalization?.active!;\n const personalizations = this.state.personalization?.allPersonalizations;\n const ariaLabel =\n personalizations && Object.keys(personalizations).length > 1\n ? `${this.meta.title}: ${personalizations[activeView]?.name}`\n : this.meta.title!;\n return {\n role: 'grid',\n 'aria-rowcount': (this.totalItemCount ?? 0) + 1, // include header row as well in total row count announcement\n 'aria-colcount': this.getVisibleColumns(true).length, // include action columns as well for total column count announcement\n 'aria-label': this.#rsStore.translate('view_navigation_instructions', [ariaLabel])\n };\n }\n\n /** Returns the default(preset at 0th index in {@link RsStore.presets presets} array) preset id. */\n get defaultPresetId(): string | undefined {\n return this.#rsStore.presets?.[defaultPresetIdIndex].id;\n }\n\n /** Indicates if the view is ready.(means the RS component is mounted). */\n get isReady() {\n return this.state.bootstrap;\n }\n\n /** Indicates if {@link Meta.selectionMode selection mode} is ON */\n get isInSelectionMode(): boolean {\n return !!(this.meta?.selectionMode && SELECTION_MODES[this.meta.selectionMode]);\n }\n\n /** Indicates if the Group Expand all functionality should be shown on UI. */\n get showGroupingExpandCollapseAll(): boolean {\n return !!this.#rsStore.groupingInfo?.length;\n }\n\n /** A set of props that can be used to configure Group Expand all Header cell. */\n get groupingHeaderCellProps() {\n if (!this.showGroupingExpandCollapseAll) return {};\n return {\n isExpanded: this.state.allGroupsExpanded,\n handleChange: (isExpanded: boolean): void =>\n this.#dispatch(actions.actionGroupingExpandCollapseAll(isExpanded)),\n enable: this.showGroupingExpandCollapseAll as boolean,\n classList: this.state.showSelectAllCheckbox ? ['no-border-right'] : []\n };\n }\n\n /** Indicates if there are no records in the view. */\n get hasNoRecords() {\n return !Number.isNaN(this.resultsCount) && this.resultsCount === 0;\n }\n\n /** Indicates if there are any frozen columns in the view. */\n get hasNoFrozenColumns() {\n return (this.columns?.filter(c => c.frozen && !c.hidden).length ?? 0) === 0;\n }\n\n /** Indicates to hide the freeze line if selection column is the only frozen column in the view. */\n get bHideFreezeLine() {\n const frozenColumns = this.columns?.filter(col => col.frozen && !col.hidden) ?? [];\n return frozenColumns.length === 1 && frozenColumns[0].field.id === rowSelectColumnMeta.field.id;\n }\n\n /** Return the predefined CSS classes for a view. */\n get className(): string {\n if (this.meta?.template !== TEMPLATES.TABLE) return '';\n // if every visible column has a width defined in field def, no need to hide the columns and wait for width calculation\n if (this.getVisibleColumns().every(col => !!col?.field?.width)) return '';\n if (!this.#rsStore.columnSizingTriggerdOnRowsAvailable) return 'hide-rows-till-ready';\n return '';\n }\n\n /**\n * Adds a column to the {@link columns Columns} of the view\n * @param field The {@link Column.field field} for the column.\n * @param option Extra options.\n * @returns the new column or existing column if it already exists.\n */\n addColumn(field: Column['field'], option: OmitStrict<ColumnConfig, 'field'>): Column {\n // Check if any column with new field exists, don't add it and show warnings.\n const existingColumn = this.columns?.find(c => c.field.id === field.id);\n\n if (!existingColumn) {\n const rowActionColumnIndex = this.columns?.findIndex(\n c => c.field.id === rowActionColumnMeta.field.id\n );\n /*\n The row action column should always be the last column in the view.\n The newly added column should take the position of the row action column\n and push it to the last in the array.\n */\n if (rowActionColumnIndex && rowActionColumnIndex !== -1) {\n return this.addColumnAtIndex(field, option, rowActionColumnIndex);\n }\n normalizeFieldDef(field, defaultConfig.defaultFieldDef);\n const column = new Column({ field, ...option }, this.#rsInternal);\n const cloned = [...this.columns!];\n cloned.push(column);\n this.columns = cloned;\n return column;\n }\n return existingColumn;\n }\n\n /**\n * Adds a column at a specified index in the {@link columns Columns} of the view.\n * @param field The {@link Column.field field} for the column.\n * @param option Extra options.\n * @param index The index at which the column needs to be inserted in the {@link columns Columns} array of view.\n * @returns void\n */\n addColumnAtIndex(\n field: Column['field'],\n option: OmitStrict<ColumnConfig, 'field'>,\n index: number\n ): Column {\n // Check if any column with new field exists, don't add it and show warnings.\n const existingColumn = this.columns?.find(c => c.field.id === field.id);\n if (!existingColumn) {\n // Full blow the meta\n normalizeFieldDef(field, defaultConfig.defaultFieldDef);\n const column = new Column({ field, ...option }, this.#rsInternal);\n const cloned = [...this.columns!];\n cloned.splice(index, 0, column);\n this.columns = cloned;\n return column;\n }\n return existingColumn;\n }\n\n /**\n * Remove a column from the {@link columns Columns} array of the view.\n * @param fieldId The {@link Column.field.id fieldId} of the column to be removed.\n * @returns boolean - Indicates if the column is successfully removed from the view.\n */\n removeColumn(fieldId: string) {\n // Check if column exists, delete it and show warnings if not exists.\n const existingColumn = this.columns?.find(c => c.field.id === fieldId);\n if (existingColumn) {\n this.columns = this.columns?.filter(c => c.field.id !== fieldId);\n return true;\n }\n // eslint-disable-next-line no-console\n console.warn(`Column with id ${fieldId} not found.`);\n\n return false;\n }\n\n /**\n * Return the rendering engine props of a given column\n * @param id The {@link Column.field.id id} of the column for which rendering engine props are required.\n * @returns\n */\n getRenderingEnginePropsById(id: string) {\n const column = this.columns?.find(c => c.field.id === id);\n return column?.getRenderingEngineProps();\n }\n\n /**\n * Returns the row density id for a given {@link rowHeightClass}.\n * @returns\n */\n getRowDensity(): string {\n return Object.values(rowDensityClasses).find(obj => obj.className === this.rowHeightClass)!.id;\n }\n\n /** Returns the current view context. While building a RS view,\n * pass getContext to the consumers of RS to access the view related information.\n *\n * @public\n * */\n getContext(): ViewContext {\n return {\n getMeta: () => this.meta,\n getState: () => this.state,\n getColumns: () => this.columns,\n getRenderingEnginePropsById: this.getRenderingEnginePropsById,\n selectedRecordsCount: this.selectedRecordsCount,\n resultsCount: this.resultsCount,\n getRequiredDef: () => this.requiredDef,\n getRowDensity: this.getRowDensity\n };\n }\n\n /**\n * It returns the formatter function available for a given formatterName from {@link RsProps.formatters formatters} passed to RS Core.\n * @param formatterName\n * @returns\n */\n getFormatterByKey(formatterName: string): FormatterFunction | undefined {\n return this.formatters?.[formatterName];\n }\n\n /**\n * This sets the parent dom container in RS core. RS Core utilizes this dom container for DOM related features.\n * Set this as part of initialization of Repeating structures.\n *\n * Refer `Initialization section` in [README.md](../../../README.md)\n * @param n - the parent container of the whole Repeating structures.\n */\n setDomContainer(n: HTMLElement): void {\n this.domContainer = n;\n }\n\n /**\n * This sets the the header element in RS core. RS Core utilizes this header element for DOM related features e.g. animation.\n * Pass Html header element of the repeating structures to this method as part of initialization of Repeating structures.\n *\n * Refer `Initialization section` in [README.md](../../../README.md)\n * @param n The header element\n */\n setItemElement(n: HTMLElement): void {\n this.itemElement = n;\n }\n\n /**\n * This sets the scroller element(the element used in virtualizer as a scrollable area, e.g. a buffer container) of repeating structures into RS core. RS Core utilizes this scroller element for scrolling related features.\n * Pass Html scrollable area element of the repeating structures to this method as part of initialization of Repeating structures.\n * @param n The scroller element\n */\n setScrollNode(n: HTMLElement): void {\n this.scrollerNode = n;\n }\n\n /**\n * This sets the virtualizer instance in the RS core.\n * @param name unique id of the virtualizer\n * @param element the instance of the virtualizer\n */\n putVirtualizeElement(\n name: string,\n virtualizerInstance: VirtualizeElement[keyof VirtualizeElement[number]]\n ) {\n this.virtualizeElements[name] = virtualizerInstance;\n }\n\n /**\n * Returns the parent dom container HTML element.\n * @returns\n */\n getDomContainer() {\n return this.domContainer;\n }\n\n /**\n * Returns the scroller element(the element used in virtualizer as a scrollable area.)\n * @returns\n */\n getScrollNode() {\n return this.scrollerNode;\n }\n\n /**\n * Returns the header row of the Repeating structures view.\n * @returns\n */\n getItemElement() {\n return this.itemElement;\n }\n\n /**\n * Indicates if the given {@link feature} should be displayed on the Repeating structures UI or not.\n * This flag can be derived for a given {@link column} too apart from the whole view.\n * This flag is just to hide the user interaction items from the UI for the respective features. It will not stop running the respective features.\n * @param feature The feature name\n * @param column an optional column parameter if you want to check if the feature is available for the given column.\n * @returns boolean\n */\n shouldDisplayFeature(feature: 'filter' | 'sort' | 'grouping', column?: Column): boolean {\n const viewDisplayFeatureFlag = this.meta?.displayFeatures![feature];\n return !!(column ? !!column.field[feature] && viewDisplayFeatureFlag : viewDisplayFeatureFlag);\n }\n\n /**\n * Returns virtualizer instance for a given virtualizer name.\n * @param name unique id of the virtualizer\n */\n getVirtualizeElement(\n name: string\n ): VirtualizeElement[keyof VirtualizeElement[number]] | undefined {\n return this.virtualizeElements[name];\n }\n\n /**\n * It triggers the autosize of columns.\n * @param reset An optional flag to reset the column widths to its default configured width.\n */\n applyColumnsAutoSize(reset = true) {\n this.#dispatch(actions.actionColumnsAutoSize(this.columns!, this.getDomContainer()!, reset));\n }\n\n /** Returns value of unique key to identify the single selected row */\n getSingleSelectionRowKey() {\n return this.#singleSelectionRowKey;\n }\n\n /** Sets the value of unique key to identify the single selected row */\n setSingleSelectionRowKey(key: string) {\n this.#singleSelectionRowKey = key;\n }\n\n /**\n * Returns the array of visible columns.\n * @function getVisibleColumns\n * @param includeActionColumns include action columns. Default value is false.\n * @returns array of visible columns with/without including action columns(rowSelect, rowDragDrop and rowActionColumn).\n */\n getVisibleColumns(includeActionColumns = false) {\n const actionColumns = [\n rowSelectColumnMeta.field.id,\n rowDragDropColumnMeta.field.id,\n rowActionColumnMeta.field.id\n ];\n return (\n this.columns?.filter(\n column =>\n !column.hidden && (includeActionColumns || !actionColumns.includes(column.field.id))\n ) ?? []\n );\n }\n}\n"]}
1
+ {"version":3,"file":"ViewGenerator.js","sourceRoot":"","sources":["../../../../src/core/generators/ViewGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAOpC,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,eAAe,EACf,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClG,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAS7C,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAmBvC,gGAAgG;AAChG,MAAM,CAAC,OAAO,OAAO,IAAI;IACvB,4DAA4D;IAC5D,SAAS,CAA4B;IACrC,sBAAsB;IACtB,QAAQ,CAAU;IAClB,qCAAqC;IACrC,OAAO,CAAS;IAChB,oCAAoC;IACpC,WAAW,CAAa;IACxB,kDAAkD;IAClD,WAAW,CAA4B;IACvC,+DAA+D;IAC/D,sBAAsB,CAAU;IAChC,oDAAoD;IACpD,aAAa,CAA2B;IACxC,+DAA+D;IAC/D,IAAI,CAAS;IACb,iCAAiC;IACjC,IAAI,CAAa;IACjB,mDAAmD;IACnD,OAAO,CAAY;IACnB,6CAA6C;IAC7C,IAAI,CAAS;IACb,0CAA0C;IAC1C,YAAY,CAAoB;IAChC,4GAA4G;IAC5G,YAAY,CAAU;IACtB,kEAAkE;IAClE,SAAS,CAAW;IACpB,8CAA8C;IAC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AAQ,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CACvF,IAAI,EAAE,CACR,CAAC;IACJ,CAAC;CACF","sourcesContent":["import { v4 as uuidV4 } from 'uuid';\n\nimport type { OmitStrict } from '@pega/cosmos-react-core';\n\nimport type { Meta } from '../../../types/Meta.types';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { State } from '../../../types/State.types';\nimport {\n defaultPresetIdIndex,\n rowDensityClasses,\n rowSelectColumnMeta,\n rowActionColumnMeta,\n rowDragDropColumnMeta,\n SELECTION_MODES,\n TEMPLATES\n} from '../constants';\nimport * as actions from '../actions/actions';\nimport { getExternalStateKeys, isRowReorderFieldEnabled, normalizeFieldDef } from '../utils/util';\nimport defaultConfig from '../config/config';\nimport type RsStore from '../RsStore';\nimport type RsInternal from '../RsInternal';\nimport type RsProps from '../RsProps';\nimport type StateResolver from '../StateResolver';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type ActionTypes from '../actions/actionConstants';\n\nimport type { UtilityFunctions } from './viewUtilityMethods';\nimport Column from './ColumnGenerator';\nimport type Row from './RowGenerator';\nimport type {\n ConfirmationActionDetails,\n DebugInfo,\n FormatterFunction,\n FreezeLine,\n RefreshNotification,\n RequiredDefinition,\n UIProps,\n ViewConfig,\n ViewContext,\n ViewState,\n VirtualizeElement\n} from './ViewGenerator.types';\nimport type { RowData } from './RowGenerator.types';\nimport type { ColumnConfig } from './ColumnGenerator.types';\nimport type GroupGenerator from './GroupGenerator';\n\n/** A view model blueprint that represents the whole view of a repeating structure component. */\nexport default class View {\n /** A dispatcher function to dispatch actions to RsCore. */\n #dispatch: StateResolver['dispatch'];\n /** Rs store object */\n #rsStore: RsStore;\n /** Unique id for the current view */\n #viewID: string;\n /** Rs internal object reference. */\n #rsInternal: RsInternal;\n /** used to pass the latest view to rsInternal. */\n #updateView!: RsInternal['updateView'];\n /** Value of unique key to identify the single selected row. */\n #singleSelectionRowKey?: string;\n /** Render factory reference from {@link RsProps} */\n renderFactory: RsProps['renderFactory'];\n /** A unique id to identify the current repeating structure. */\n rsID: string;\n /** Current data for the view. */\n data?: RowData[];\n /** Current {@link Column columns} for the view. */\n columns?: Column[];\n /** Current {@link Row rows} for the view. */\n rows?: Row[];\n /** Current group headers for the view. */\n groupHeaders?: GroupGenerator[];\n /** Indicates the visible records count for the current view after applying any type of filter operation. */\n resultsCount?: number;\n /** Indicates whether to show the overall count on view or not. */\n showCount?: boolean;\n /** Indicates if the view has more records. */\n hasMoreResults?: boolean;\n /** Indicates the total record count of the view including group headers.\n */\n totalItemCount?: number;\n /** Indicates the total selected records count. */\n selectedRecordsCount?: number;\n /** Indicates the total height of the view. */\n viewHeight?: number;\n /** Indicates the current height of the container that contains data records like rows. */\n bodyHeight?: number | string;\n /** Indicates max height of the current parent container. */\n bodyMaxHeight?: number;\n /** Indicates the current height of each data row. It does not include group header row. */\n rowHeight?: number;\n /** Indicates the class name of the current selected row density. */\n rowHeightClass?: string;\n /** Indicates if the filter is applied for the current view. */\n isFilterApplied?: boolean;\n /** Indicates if the view is in loading state and not ready. It is used to show loaders in case of api calls. */\n isLoading?: boolean;\n /** Styles for the freeze line to be shown when freezing is applied. */\n freezeLine?: FreezeLine;\n /** Meta of the repeating structures. */\n meta: Meta;\n /**\n * This function is provided a click handler for a row via row generator.\n * @param {RowData} data - current row data\n * @returns {void} void\n */\n onRowClickAction?: RsProps['onRowClickAction'];\n /** A list of customised the toolbar actions to be displayed at the top of a repeating structure, apart from ootb toolbar actions. */\n toolBarOptions?: RsProps['toolBarOptions'];\n /** An object of formatter functions which formats the raw value. */\n formatters?: RsProps['formatters'];\n /** A collection of style formats that can be applied for styling the data. */\n styleFormats?: RsProps['styleFormats'];\n /** A map of formatters that will be displayed to consumer to format a fieldDef in repeating structure. */\n renderFormatterTypeMap?: RsProps['renderFormatterTypeMap'];\n /** Reference to the top level Html element of repeating structures. */\n domContainer?: HTMLElement;\n /** Reference to the scroller element of repeating structures */\n scrollerNode?: HTMLElement;\n /** Reference to the header element of repeating structures. */\n itemElement?: HTMLElement;\n /** Reference to the virtualizer instance of the repeating structures. */\n virtualizeElements: VirtualizeElement;\n /** Indicates if hierarchical grouping is enabled. */\n hierarchicalGroupEnabled?: boolean;\n /** The details of the confirmation action modal triggered from consumer of repeating structures. */\n confirmationActionDetails?: ConfirmationActionDetails;\n /** Indicates if a count update is required. E.g. after applying filter a reset of count is required. */\n isCountUpdateRequired?: boolean;\n /** Indicates if count is generated internally. Used for RS core internal purpose. */\n countGeneratedInternally?: boolean;\n /** The state shared with the view after completion of one render cycle. */\n state: ViewState;\n /** The details of the debug information shared by the consumer of repeating structures.\n * It is displayed as one of the toolbar actions to debug the {@link ApiContext api context methods} latency. */\n debugInfo?: DebugInfo[];\n /** The definition of a required view. It has a boolean flag to indicate if the current repeating structures view\n * is required and a validation message to be displayed in case of required validation failure.\n * This definition is passed by consumer of repeating structures. */\n requiredDef?: RequiredDefinition;\n /** A set of {@link State.externalState external state} valid keys derived from meta.\n * E.g. value of {@link Meta.externalFilters external filters in meta} is a valid external state key. */\n externalStateKeys?: string[];\n /** Stores all the view related utility functions */\n type!: UtilityFunctions;\n /** Indicates if the current view object is generated via instantRender. */\n isInstantRender?: boolean;\n /** Config to show refreshNotification. This will be set upon receiving {@link ActionTypes.NOTIFY_DATA_REFRESH NOTIFY_DATA_REFRESH} action. */\n refreshNotification?: RefreshNotification;\n\n /**\n Overrides the default count announcement behavior for screen readers.\n * true: Always announce the row count, including on first render.\n * false: Never announce the row count.\n * undefined: Use default behavior (skip first count announcement, announce on subsequent count updates).\n */\n announceCount?: boolean;\n /**\n * Creates a view instance that represents the whole view of repeating structures.\n * It has properties like rows, columns, data to build a repeating structures view.\n * @param options An options object to create a view instance. If passed the view is created with this set of options.\n * @param rsInternal The {@link RsInternal} object.\n */\n constructor(config: ViewConfig, rsInternal: RsInternal) {\n const {\n data,\n columns,\n rows = [],\n groupHeaders,\n resultsCount,\n hasMoreResults,\n totalItemCount,\n showCount,\n viewHeight,\n selectedRecordsCount,\n bodyHeight,\n bodyMaxHeight,\n rowHeight,\n rowHeightClass,\n isFilterApplied,\n isLoading,\n freezeLine,\n state,\n domContainer,\n scrollerNode,\n meta,\n itemElement,\n virtualizeElements,\n debugInfo = [] as DebugInfo[],\n requiredDef,\n hierarchicalGroupEnabled,\n singleSelectionRowKey,\n confirmationActionDetails,\n externalStateKeys,\n isCountUpdateRequired,\n countGeneratedInternally,\n isInstantRender,\n refreshNotification,\n announceCount\n } = config;\n const { getRsStore, getRsProps, getRsStateResolver } = rsInternal;\n this.#rsInternal = rsInternal;\n this.#rsStore = getRsStore();\n const rsProps = getRsProps();\n const rsStateResolver = getRsStateResolver();\n\n this.#dispatch = rsStateResolver.dispatch;\n this.#viewID = uuidV4();\n\n // TODO: temporary solution until renderFactory is moved out of core library\n this.renderFactory = rsProps.renderFactory;\n this.rsID = rsInternal.getRsID();\n\n this.data = data;\n this.columns = columns!;\n this.rows = rows;\n this.groupHeaders = groupHeaders;\n this.resultsCount = resultsCount;\n this.hasMoreResults = hasMoreResults;\n this.showCount = meta.showCount ? showCount : false;\n this.totalItemCount = totalItemCount;\n this.selectedRecordsCount = selectedRecordsCount;\n this.viewHeight = viewHeight;\n this.bodyHeight = bodyHeight;\n this.bodyMaxHeight = bodyMaxHeight;\n this.rowHeight = rowHeight;\n this.rowHeightClass = rowHeightClass;\n this.isFilterApplied = isFilterApplied;\n this.isLoading = isLoading;\n this.freezeLine = freezeLine;\n this.meta = meta;\n this.onRowClickAction = rsProps.onRowClickAction;\n this.toolBarOptions = rsProps.toolBarOptions;\n this.formatters = rsProps.formatters;\n this.styleFormats = rsProps.styleFormats;\n this.renderFormatterTypeMap = rsProps.renderFormatterTypeMap;\n this.#singleSelectionRowKey = singleSelectionRowKey;\n\n this.domContainer = domContainer;\n this.scrollerNode = scrollerNode;\n this.itemElement = itemElement;\n this.virtualizeElements = virtualizeElements || {};\n this.hierarchicalGroupEnabled = hierarchicalGroupEnabled;\n this.confirmationActionDetails = {\n ...confirmationActionDetails!,\n showConfirmationAction: state?.showConfirmationAction!\n };\n this.isCountUpdateRequired = isCountUpdateRequired;\n this.countGeneratedInternally = countGeneratedInternally;\n this.debugInfo = debugInfo;\n this.requiredDef = requiredDef;\n this.externalStateKeys = externalStateKeys || getExternalStateKeys(this.meta);\n this.isInstantRender = isInstantRender;\n this.refreshNotification = refreshNotification;\n this.announceCount = announceCount;\n // FIXME: keep the state on view in sync with the emitted stated from StateResolver\n this.state = {\n searchText: state?.search?.query || '',\n personalization: state?.personalization,\n filterExpression: state?.filterExpression,\n clearColFilter: state?.clearColFilter,\n sortingOrder: state?.sortingOrder,\n groups: state?.groups,\n allGroupsExpanded: state?.allGroupsExpanded,\n groupToggle: state?.groupToggle,\n showHeaderIcons: state?.showHeaderIcons,\n colOrder: state?.colOrder,\n hiddenColumns: state?.hiddenColumns,\n freezeColumns: state?.freezeColumns,\n columnWidths: state?.columnWidths,\n customFields: state?.customFields,\n selectedHeightOption: state?.selectedHeightOption,\n paginationOptions: state?.paginationOptions,\n notifications: state?.notifications,\n rowSelectionChangeSet: state?.rowSelectionChangeSet,\n selectedRows: state?.selectedRows,\n editInfo: state?.editInfo,\n bootstrap: state?.bootstrap,\n refresh: state?.refresh,\n showSelectAllCheckbox: state?.showSelectAllCheckbox,\n externalState: state?.externalState,\n columnAlias: state?.columnAlias,\n aggregationInfo: state?.aggregationInfo,\n errors: state?.errors,\n responsive: state?.responsive, // stores the responsive behavior of DOM container w.r.t. various breakpoints.\n conditionalStyleFormats: state?.conditionalStyleFormats\n };\n\n /** IMP: For generator methods use traditional function syntax\n * rather than arrow function for memory efficiency\n * and bind 'this' to the methods which requires 'this' context. */\n this.getRenderingEnginePropsById = this.getRenderingEnginePropsById.bind(this);\n this.getFormatterByKey = this.getFormatterByKey.bind(this);\n this.getContext = this.getContext.bind(this);\n this.setProp = this.setProp.bind(this);\n this.addColumnAtIndex = this.addColumnAtIndex.bind(this);\n this.getRowDensity = this.getRowDensity.bind(this);\n this.setDomContainer = this.setDomContainer.bind(this);\n this.setItemElement = this.setItemElement.bind(this);\n this.shouldDisplayFeature = this.shouldDisplayFeature.bind(this);\n this.setScrollNode = this.setScrollNode.bind(this);\n this.putVirtualizeElement = this.putVirtualizeElement.bind(this);\n this.getDomContainer = this.getDomContainer.bind(this);\n this.getItemElement = this.getItemElement.bind(this);\n this.getScrollNode = this.getScrollNode.bind(this);\n this.getVirtualizeElement = this.getVirtualizeElement.bind(this);\n this.applyColumnsAutoSize = this.applyColumnsAutoSize.bind(this);\n this.addColumn = this.addColumn.bind(this);\n this.getUIProps = this.getUIProps.bind(this);\n }\n\n // Used by setProp for mutation\n /**\n * Retruns the View properties that is used by setProp while creating new view.\n * @returns\n */\n #get(): ViewConfig &\n Pick<RsProps, 'toolBarOptions' | 'formatters' | 'renderFormatterTypeMap' | 'onRowClickAction'> {\n return {\n data: this.data,\n singleSelectionRowKey: this.#singleSelectionRowKey,\n columns: this.columns,\n rows: this.rows,\n groupHeaders: this.groupHeaders,\n resultsCount: this.resultsCount,\n showCount: this.showCount,\n hasMoreResults: this.hasMoreResults,\n totalItemCount: this.totalItemCount,\n selectedRecordsCount: this.selectedRecordsCount,\n viewHeight: this.viewHeight,\n bodyHeight: this.bodyHeight,\n bodyMaxHeight: this.bodyMaxHeight,\n rowHeight: this.rowHeight,\n rowHeightClass: this.rowHeightClass,\n isFilterApplied: this.isFilterApplied,\n isLoading: this.isLoading,\n freezeLine: this.freezeLine,\n meta: this.meta,\n toolBarOptions: this.toolBarOptions,\n formatters: this.formatters,\n renderFormatterTypeMap: this.renderFormatterTypeMap,\n state: this.state,\n onRowClickAction: this.onRowClickAction,\n domContainer: this.domContainer,\n scrollerNode: this.scrollerNode,\n itemElement: this.itemElement,\n virtualizeElements: this.virtualizeElements,\n debugInfo: this.debugInfo,\n requiredDef: this.requiredDef,\n hierarchicalGroupEnabled: this.hierarchicalGroupEnabled,\n confirmationActionDetails: this.confirmationActionDetails,\n externalStateKeys: this.externalStateKeys,\n isCountUpdateRequired: this.isCountUpdateRequired,\n countGeneratedInternally: this.countGeneratedInternally,\n isInstantRender: this.isInstantRender,\n refreshNotification: this.refreshNotification,\n announceCount: this.announceCount\n };\n }\n\n /**\n * Attach utility functions of view to {@link type} property.\n * @param functions\n * @returns void\n */\n addUtilityFunctions(functions: UtilityFunctions) {\n this.type = functions;\n }\n\n /**\n * Sets the {@link updateView} callback function.\n * @param updateViewCallback\n * @returns void\n */\n setViewUpdateCallback(updateViewCallback: RsInternal['updateView']) {\n this.#updateView = updateViewCallback;\n }\n\n /**\n * This is used to create immutable objects of {@link View} instance. Always call setProp if updating any properties of View to make it immutable.\n * @param prop Either partial of {@link ViewConfig} or individual properties of {@link ViewConfig}.\n * @param [value] An optional parameter to provide value for {@link prop} in case prop is not of type {@link ViewConfig}\n * @returns void\n */\n setProp(prop: Partial<ViewConfig> | keyof ViewConfig, value?: ViewConfig[keyof ViewConfig]) {\n const { getView } = this.#rsInternal;\n if (getView().#viewID !== this.#viewID) {\n // eslint-disable-next-line no-console\n console.warn('Doing setProp on a stale view. This might cause bugs.');\n }\n const pObject = typeof prop === 'object' ? prop : { [prop]: value };\n\n const clonedView = new View({ ...this.#get(), ...(pObject as ViewConfig) }, this.#rsInternal);\n\n if (!Object.hasOwn(pObject, 'state')) {\n clonedView.state = this.state;\n }\n\n this.#updateView(clonedView);\n\n return clonedView;\n }\n\n // FIXME: add tranlsations back\n /**\n * Returns the ui props for the {@link View} used for accessibility.\n */\n getUIProps(): UIProps {\n const activeView = this.state.personalization?.active!;\n const personalizations = this.state.personalization?.allPersonalizations;\n const ariaLabel =\n personalizations && Object.keys(personalizations).length > 1\n ? `${this.meta.title}: ${personalizations[activeView]?.name}`\n : this.meta.title!;\n return {\n role: 'grid',\n 'aria-rowcount': (this.totalItemCount ?? 0) + 1, // include header row as well in total row count announcement\n 'aria-colcount': this.getVisibleColumns(true).length, // include action columns as well for total column count announcement\n 'aria-label': this.#rsStore.translate('view_navigation_instructions', [ariaLabel])\n };\n }\n\n /** Returns the default(preset at 0th index in {@link RsStore.presets presets} array) preset id. */\n get defaultPresetId(): string | undefined {\n return this.#rsStore.presets?.[defaultPresetIdIndex].id;\n }\n\n /** Indicates if the view is ready.(means the RS component is mounted). */\n get isReady() {\n return this.state.bootstrap;\n }\n\n /** Indicates if {@link Meta.selectionMode selection mode} is ON */\n get isInSelectionMode(): boolean {\n return !!(this.meta?.selectionMode && SELECTION_MODES[this.meta.selectionMode]);\n }\n\n /** Indicates if the Group Expand all functionality should be shown on UI. */\n get showGroupingExpandCollapseAll(): boolean {\n return !!this.#rsStore.groupingInfo?.length;\n }\n\n /** A set of props that can be used to configure Group Expand all Header cell. */\n get groupingHeaderCellProps() {\n if (!this.showGroupingExpandCollapseAll) return {};\n return {\n isExpanded: this.state.allGroupsExpanded,\n handleChange: (isExpanded: boolean): void =>\n this.#dispatch(actions.actionGroupingExpandCollapseAll(isExpanded)),\n enable: this.showGroupingExpandCollapseAll as boolean,\n // Do not show right border if OOTB columns are on.\n classList:\n this.state.showSelectAllCheckbox ||\n this.state.errors?.dataErrors ||\n isRowReorderFieldEnabled(this.meta)\n ? ['no-border-right']\n : []\n };\n }\n\n /** Indicates if there are no records in the view. */\n get hasNoRecords() {\n return !Number.isNaN(this.resultsCount) && this.resultsCount === 0;\n }\n\n /** Indicates if there are any frozen columns in the view. */\n get hasNoFrozenColumns() {\n return (this.columns?.filter(c => c.frozen && !c.hidden).length ?? 0) === 0;\n }\n\n /** Indicates to hide the freeze line if selection column is the only frozen column in the view. */\n get bHideFreezeLine() {\n const frozenColumns = this.columns?.filter(col => col.frozen && !col.hidden) ?? [];\n return frozenColumns.length === 1 && frozenColumns[0].field.id === rowSelectColumnMeta.field.id;\n }\n\n /** Return the predefined CSS classes for a view. */\n get className(): string {\n if (this.meta?.template !== TEMPLATES.TABLE) return '';\n // if every visible column has a width defined in field def, no need to hide the columns and wait for width calculation\n if (this.getVisibleColumns().every(col => !!col?.field?.width)) return '';\n if (!this.#rsStore.columnSizingTriggerdOnRowsAvailable) return 'hide-rows-till-ready';\n return '';\n }\n\n /**\n * Adds a column to the {@link columns Columns} of the view\n * @param field The {@link Column.field field} for the column.\n * @param option Extra options.\n * @returns the new column or existing column if it already exists.\n */\n addColumn(field: Column['field'], option: OmitStrict<ColumnConfig, 'field'>): Column {\n // Check if any column with new field exists, don't add it and show warnings.\n const existingColumn = this.columns?.find(c => c.field.id === field.id);\n\n if (!existingColumn) {\n const rowActionColumnIndex = this.columns?.findIndex(\n c => c.field.id === rowActionColumnMeta.field.id\n );\n /*\n The row action column should always be the last column in the view.\n The newly added column should take the position of the row action column\n and push it to the last in the array.\n */\n if (rowActionColumnIndex && rowActionColumnIndex !== -1) {\n return this.addColumnAtIndex(field, option, rowActionColumnIndex);\n }\n normalizeFieldDef(field, defaultConfig.defaultFieldDef);\n const column = new Column({ field, ...option }, this.#rsInternal);\n const cloned = [...this.columns!];\n cloned.push(column);\n this.columns = cloned;\n return column;\n }\n return existingColumn;\n }\n\n /**\n * Adds a column at a specified index in the {@link columns Columns} of the view.\n * @param field The {@link Column.field field} for the column.\n * @param option Extra options.\n * @param index The index at which the column needs to be inserted in the {@link columns Columns} array of view.\n * @returns void\n */\n addColumnAtIndex(\n field: Column['field'],\n option: OmitStrict<ColumnConfig, 'field'>,\n index: number\n ): Column {\n // Check if any column with new field exists, don't add it and show warnings.\n const existingColumn = this.columns?.find(c => c.field.id === field.id);\n if (!existingColumn) {\n // Full blow the meta\n normalizeFieldDef(field, defaultConfig.defaultFieldDef);\n const column = new Column({ field, ...option }, this.#rsInternal);\n const cloned = [...this.columns!];\n cloned.splice(index, 0, column);\n this.columns = cloned;\n return column;\n }\n return existingColumn;\n }\n\n /**\n * Remove a column from the {@link columns Columns} array of the view.\n * @param fieldId The {@link Column.field.id fieldId} of the column to be removed.\n * @returns boolean - Indicates if the column is successfully removed from the view.\n */\n removeColumn(fieldId: string) {\n // Check if column exists, delete it and show warnings if not exists.\n const existingColumn = this.columns?.find(c => c.field.id === fieldId);\n if (existingColumn) {\n this.columns = this.columns?.filter(c => c.field.id !== fieldId);\n return true;\n }\n // eslint-disable-next-line no-console\n console.warn(`Column with id ${fieldId} not found.`);\n\n return false;\n }\n\n /**\n * Return the rendering engine props of a given column\n * @param id The {@link Column.field.id id} of the column for which rendering engine props are required.\n * @returns\n */\n getRenderingEnginePropsById(id: string) {\n const column = this.columns?.find(c => c.field.id === id);\n return column?.getRenderingEngineProps();\n }\n\n /**\n * Returns the row density id for a given {@link rowHeightClass}.\n * @returns\n */\n getRowDensity(): string {\n return Object.values(rowDensityClasses).find(obj => obj.className === this.rowHeightClass)!.id;\n }\n\n /** Returns the current view context. While building a RS view,\n * pass getContext to the consumers of RS to access the view related information.\n *\n * @public\n * */\n getContext(): ViewContext {\n return {\n getMeta: () => this.meta,\n getState: () => this.state,\n getColumns: () => this.columns,\n getRenderingEnginePropsById: this.getRenderingEnginePropsById,\n selectedRecordsCount: this.selectedRecordsCount,\n resultsCount: this.resultsCount,\n getRequiredDef: () => this.requiredDef,\n getRowDensity: this.getRowDensity\n };\n }\n\n /**\n * It returns the formatter function available for a given formatterName from {@link RsProps.formatters formatters} passed to RS Core.\n * @param formatterName\n * @returns\n */\n getFormatterByKey(formatterName: string): FormatterFunction | undefined {\n return this.formatters?.[formatterName];\n }\n\n /**\n * This sets the parent dom container in RS core. RS Core utilizes this dom container for DOM related features.\n * Set this as part of initialization of Repeating structures.\n *\n * Refer `Initialization section` in [README.md](../../../README.md)\n * @param n - the parent container of the whole Repeating structures.\n */\n setDomContainer(n: HTMLElement): void {\n this.domContainer = n;\n }\n\n /**\n * This sets the the header element in RS core. RS Core utilizes this header element for DOM related features e.g. animation.\n * Pass Html header element of the repeating structures to this method as part of initialization of Repeating structures.\n *\n * Refer `Initialization section` in [README.md](../../../README.md)\n * @param n The header element\n */\n setItemElement(n: HTMLElement): void {\n this.itemElement = n;\n }\n\n /**\n * This sets the scroller element(the element used in virtualizer as a scrollable area, e.g. a buffer container) of repeating structures into RS core. RS Core utilizes this scroller element for scrolling related features.\n * Pass Html scrollable area element of the repeating structures to this method as part of initialization of Repeating structures.\n * @param n The scroller element\n */\n setScrollNode(n: HTMLElement): void {\n this.scrollerNode = n;\n }\n\n /**\n * This sets the virtualizer instance in the RS core.\n * @param name unique id of the virtualizer\n * @param element the instance of the virtualizer\n */\n putVirtualizeElement(\n name: string,\n virtualizerInstance: VirtualizeElement[keyof VirtualizeElement[number]]\n ) {\n this.virtualizeElements[name] = virtualizerInstance;\n }\n\n /**\n * Returns the parent dom container HTML element.\n * @returns\n */\n getDomContainer() {\n return this.domContainer;\n }\n\n /**\n * Returns the scroller element(the element used in virtualizer as a scrollable area.)\n * @returns\n */\n getScrollNode() {\n return this.scrollerNode;\n }\n\n /**\n * Returns the header row of the Repeating structures view.\n * @returns\n */\n getItemElement() {\n return this.itemElement;\n }\n\n /**\n * Indicates if the given {@link feature} should be displayed on the Repeating structures UI or not.\n * This flag can be derived for a given {@link column} too apart from the whole view.\n * This flag is just to hide the user interaction items from the UI for the respective features. It will not stop running the respective features.\n * @param feature The feature name\n * @param column an optional column parameter if you want to check if the feature is available for the given column.\n * @returns boolean\n */\n shouldDisplayFeature(feature: 'filter' | 'sort' | 'grouping', column?: Column): boolean {\n const viewDisplayFeatureFlag = this.meta?.displayFeatures![feature];\n return !!(column ? !!column.field[feature] && viewDisplayFeatureFlag : viewDisplayFeatureFlag);\n }\n\n /**\n * Returns virtualizer instance for a given virtualizer name.\n * @param name unique id of the virtualizer\n */\n getVirtualizeElement(\n name: string\n ): VirtualizeElement[keyof VirtualizeElement[number]] | undefined {\n return this.virtualizeElements[name];\n }\n\n /**\n * It triggers the autosize of columns.\n * @param reset An optional flag to reset the column widths to its default configured width.\n */\n applyColumnsAutoSize(reset = true) {\n this.#dispatch(actions.actionColumnsAutoSize(this.columns!, this.getDomContainer()!, reset));\n }\n\n /** Returns value of unique key to identify the single selected row */\n getSingleSelectionRowKey() {\n return this.#singleSelectionRowKey;\n }\n\n /** Sets the value of unique key to identify the single selected row */\n setSingleSelectionRowKey(key: string) {\n this.#singleSelectionRowKey = key;\n }\n\n /**\n * Returns the array of visible columns.\n * @function getVisibleColumns\n * @param includeActionColumns include action columns. Default value is false.\n * @returns array of visible columns with/without including action columns(rowSelect, rowDragDrop and rowActionColumn).\n */\n getVisibleColumns(includeActionColumns = false) {\n const actionColumns = [\n rowSelectColumnMeta.field.id,\n rowDragDropColumnMeta.field.id,\n rowActionColumnMeta.field.id\n ];\n return (\n this.columns?.filter(\n column =>\n !column.hidden && (includeActionColumns || !actionColumns.includes(column.field.id))\n ) ?? []\n );\n }\n}\n"]}
@@ -470,9 +470,9 @@ export default function viewUtilityMethods(rsInternal) {
470
470
  endIndex: getView().resultsCount - 1
471
471
  }
472
472
  },
473
- // passing groups as null to get all rows irrespective of groupfilters
474
- // @ts-expect-error Why groups is set to null? it should be set as undefined.
475
- groups: null
473
+ // passing groups and groupFilters as undefined to get all rows
474
+ groups: undefined,
475
+ groupFilters: undefined
476
476
  }, getView().meta, {});
477
477
  if (response) {
478
478
  const { data = [] } = response;
@@ -1 +1 @@
1
- {"version":3,"file":"viewUtilityMethods.js","sourceRoot":"","sources":["../../../../src/core/generators/viewUtilityMethods.ts"],"names":[],"mappings":"AAIA,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGnD,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAqC1E,SAAS,QAAQ,CAAC,GAAW,EAAE,WAAsB,EAAE,aAAwB;IAC7E,OAAO,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;QAC5B,MAAM,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,GA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AE,CAAC,iBAAiB,IAAI;oBACpC,eAAe,EAAE,IAAI;oBACrB,oBAAoB,EAAE,UAAU,EAAE,CAAC,YAAY;iBAChD,CAAC;aACH,CAAC;iBACD,KAAK,CAAC,GAAG,CAAC,EAAE;gBACX,kBAAkB,EAAE,CAAC,QAAQ,CAC3B,OAAO,CAAC,qBAAqB,CAAC;oBAC5B,OAAO,EAAE,GAAG;iBACb,CAAC,CACH,CAAC;YACJ,CAAC,CAAC,CAAC;QACP,CAAC;QAED;;;WAGG;QACH,uBAAuB,CAAC,OAA2C;YACjE,kBAAkB,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC,CAAC;QAC1E,CAAC;QAED,0BAA0B,CACxB,uBAAsE;YAEtE,kBAAkB,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,0BAA0B,CAAC,uBAAuB,CAAC,CAAC,CAAC;QAC7F,CAAC;KACF,CAAC;IACF,OAAO,WAAW,CAAC;AACrB,CAAC","sourcesContent":["import type { OmitStrict } from '@pega/cosmos-react-core';\nimport type { ModalManagerContextValue } from '@pega/cosmos-react-core/lib/components/Modal/Modal.types';\n\nimport type RsInternal from '../RsInternal';\nimport ActionTypes from '../actions/actionConstants';\nimport * as actions from '../actions/actions';\nimport { rowSelectColumnMeta } from '../constants';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { SUPPORTED_AVOIDABLE_FEATURES, SUPPORTED_FLUSH_KEYS } from '../constants';\nimport { validateAction, passablePromise, deepCopy } from '../utils/util';\nimport type { Errors, State } from '../../../types/State.types';\n// This is being used in JSdoc.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { ApiContext, ApiOptions } from '../../../types/ApiContext.types';\n// This is being used in JSdoc.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { FieldDef, Meta, ROW_DENSITY } from '../../../types/Meta.types';\nimport type {\n ActionMeta,\n ApplyAliasesActionPayload,\n ColumnFilteringActionPayload,\n ExpandCollapsePayload,\n PaginationPayload\n} from '../actions/actions.types';\n\nimport type View from './ViewGenerator';\nimport type { RowData } from './RowGenerator.types';\nimport type { DebugInfo, RefreshNotification, RequiredDefinition } from './ViewGenerator.types';\n\nexport type RefreshNotificationForConsumer = OmitStrict<RefreshNotification, 'id'>;\n\nexport type SupportedConsumerPayloads = {\n [ActionTypes.USER_CONFIRMATION_ACTION]: OmitStrict<\n NonNullable<View['confirmationActionDetails']>,\n 'onSubmit' | 'onCancel'\n >;\n [ActionTypes.UPDATE_DEBUG_INFO]: DebugInfo;\n [ActionTypes.TOGGLE_DISABLE_SELECTION]: boolean;\n [ActionTypes.TOGGLE_REQUIRED]: RequiredDefinition;\n [ActionTypes.NOTIFY_DATA_REFRESH]: RefreshNotificationForConsumer;\n [ActionTypes.SET_IN_EXTERNAL_STATE]: NonNullable<State['externalState']>;\n [ActionTypes.UPDATE_SELECTED_ROWS]: undefined;\n};\n\nexport type SupportedConsumerActionType = keyof SupportedConsumerPayloads;\n\nfunction syncData(key: string, sourceArray: RowData[], modifiedArray: RowData[]) {\n return sourceArray.map(item => {\n const item2 = modifiedArray.find(i2 => i2[key] === item[key]);\n return item2 || item;\n });\n}\n\nexport default function viewUtilityMethods(rsInternal: RsInternal) {\n const { getRsProps, getRsStateResolver, getView, getRsStore } = rsInternal;\n\n const utilMethods = {\n /**\n * Dispatches an action that creates a new state object without any internal modifications.\n *\n * If {@link instantRender} is false and {@link forceUpdateFeatures} are provided,\n * it updates the {@link State.forceUpdateFeatures forceUpdateFeatures} slice in the state.\n *\n * @param instantRender - Determines if the render should happen instantly.\n * @param forceUpdateFeatures - The features to force update in the state on next render cycle.\n */\n forceUpdate(instantRender?: boolean, forceUpdateFeatures?: State['forceUpdateFeatures']) {\n getRsStateResolver().dispatch(actions.actionForceUpdate(instantRender, forceUpdateFeatures));\n },\n\n /**\n * Handles the reordering of rows.\n *\n * If {@link Meta.moveListRecords moveListRecords} is set to true in Meta, it dispatches an action\n * that updates the keys of the {@link sourceKey source} row and the {@link destinationKey destination} row\n * in the {@link State.sourceKey sourceKey} and {@link State.destinationKey destinationKey} state slices, respectively.\n *\n * Otherwise, it calls {@link ApiContext.applyRowReorder applyRowReorder} from the apiContext and triggers\n * a {@link utilMethods.forceRefresh forceRefresh} on the state.\n *\n * @param sourceKey - The itemKey for the row being dragged.\n * @param destinationKey - The itemKey for the row on which it is dropped.\n * @returns\n */\n handleRowReorder(sourceKey: string, destinationKey: string) {\n if (getView()?.meta?.moveListRecords) {\n getRsStateResolver().dispatch(\n actions.actionMoveRecordKeysUpdate({\n sourceKey,\n destinationKey\n })\n );\n return;\n }\n getRsProps()\n .apiContext.applyRowReorder?.(sourceKey, destinationKey)\n .then(() => {\n utilMethods.forceRefresh();\n });\n },\n\n /**\n * Sets the count-related information onto the {@link View view} via {@link View.setProp setProp} and triggers {@link utilMethods.forceUpdate forceUpdate}.\n *\n * @param args - The count information object.\n * @param args.count - The total record count of the view, including group headers.\n * @param args.hasMoreResults - Indicates if the view has more records.\n * @param args.selectedRecordsCount - The total count of selected records.\n * @param args._countGeneratedInternally - Indicates if the count is generated internally. This is used for RS core internal purposes. Setting this from apiContext might lead to erroneous behavior.\n * @returns void\n */\n setRecordCount({\n count,\n hasMoreResults,\n selectedRecordsCount,\n _countGeneratedInternally,\n announce\n }: {\n count?: View['resultsCount'];\n hasMoreResults?: View['hasMoreResults'];\n selectedRecordsCount?: View['selectedRecordsCount'];\n _countGeneratedInternally?: View['countGeneratedInternally'];\n announce?: View['announceCount'];\n }) {\n // NOTE: setRecordCount can be called with partial props. So while doing setProp we need to make sure to check the existence of incoming prop value.\n // If incoming prop is undefined then it should have a fallback otherwise it will override existing value on view to undefined.\n getView().setProp({\n countGeneratedInternally: !!_countGeneratedInternally,\n hasMoreResults: hasMoreResults ?? false,\n resultsCount: count,\n selectedRecordsCount: selectedRecordsCount ?? getView().selectedRecordsCount,\n showCount: !Number.isFinite(count) ? false : !_countGeneratedInternally,\n announceCount: announce\n });\n // If count is not finite then do instantRender as we want to hide the count immediately and don't want the StateResolver queue to be empty.\n // Else the count will be displayed after the StateResolver queue becomes empty.\n const instantRender = !Number.isFinite(count);\n utilMethods.forceUpdate(instantRender);\n },\n\n /**\n * Dispatches an action to interact with repeating structures, allowing consumers\n * to perform operations using standard actions and payloads.\n *\n * @param action The action to be dispatched.\n * @param payload The payload associated with the action.\n * @returns The return value after the action has been processed by the repeating structure.\n */\n // TODO Refactor- this method to have only one parameter action object that contains type and payload. Maintenance of it will be easy.\n // TODO Make it generic specific.\n dispatchAction<T extends SupportedConsumerActionType>(\n action: T,\n payload?: SupportedConsumerPayloads[T]\n ): Promise<any> | undefined {\n const { dispatch } = getRsStateResolver();\n validateAction(action, payload, getView().externalStateKeys);\n\n let actionReturnValue;\n switch (action) {\n case ActionTypes.USER_CONFIRMATION_ACTION:\n // eslint-disable-next-line no-case-declarations\n const [promise, onSubmit, onCancel] = passablePromise<any>();\n getView().setProp({\n confirmationActionDetails: {\n onSubmit,\n onCancel,\n ...(payload as OmitStrict<\n NonNullable<View['confirmationActionDetails']>,\n 'onSubmit' | 'onCancel'\n >)\n }\n });\n dispatch(actions.showConfirmationAction());\n actionReturnValue = promise;\n break;\n case ActionTypes.UPDATE_DEBUG_INFO:\n getView().setProp({ debugInfo: [payload as DebugInfo] });\n utilMethods.forceUpdate(false);\n break;\n case ActionTypes.TOGGLE_DISABLE_SELECTION: {\n let rowSelectColumn = getView().columns?.find(\n column => column.field.name === rowSelectColumnMeta.field.name\n );\n if (rowSelectColumn) {\n rowSelectColumn = rowSelectColumn.setProp({\n disableSelection: payload as boolean\n });\n utilMethods.forceUpdate(false);\n }\n break;\n }\n case ActionTypes.TOGGLE_REQUIRED:\n getView().setProp({ requiredDef: payload as RequiredDefinition });\n utilMethods.forceUpdate(false);\n break;\n case ActionTypes.NOTIFY_DATA_REFRESH:\n getView().setProp('refreshNotification', {\n id: Date.now(),\n ...(payload as RefreshNotificationForConsumer)\n });\n utilMethods.forceUpdate(false);\n break;\n case ActionTypes.SET_IN_EXTERNAL_STATE:\n dispatch(actions.setExternalState(payload as NonNullable<State['externalState']>));\n break;\n case ActionTypes.UPDATE_SELECTED_ROWS:\n utilMethods.forceUpdate(false, {\n updateSelectedRows: new Date().getTime()\n });\n break;\n\n default:\n }\n return actionReturnValue;\n },\n\n /** Returns the Html events required for reordering a column. */\n getFieldReorderProps() {\n return getRsStore().getFieldReorderProps?.();\n },\n\n // TODO: this should be moved to group generator instance.\n /**\n * Triggers the expand or collapse action for a group header.\n * Dispatches an action to update the {@link State.groupToggle groupToggle} slices in the state.\n *\n * @param payload The data related to the groups.\n */\n toggleGroupExpansion(payload: OmitStrict<ExpandCollapsePayload, 'groups'>) {\n getRsStateResolver().dispatch(actions.actionToggleExpandCollpase(payload));\n },\n\n /**\n * Clears hierarchical groups by dispatching an action to reset the {@link State.hierarchicalGroup hierarchicalGroup} slice in the state.\n */\n clearHierarchicalGroup() {\n getRsStore().groupingInfo = [];\n getRsStateResolver().dispatch(actions.actionUpdateDisplayMode({}));\n },\n\n /**\n * Dispatches a pagination action to update {@link State.paginationOptions paginationOptions} in the state slice.\n *\n * @param payload - The pagination options to update.\n * @param actionMeta - The action metadata.\n */\n onPaginate(payload: PaginationPayload, actionMeta?: ActionMeta) {\n getRsStateResolver().dispatch(actions.actionPaginate(payload, actionMeta));\n },\n\n /**\n * Removes a notification message.\n * Dispatches an action to update the {@link State.notifications notifications} slice in the state.\n *\n * @param payload The notification messages to be removed.\n */\n removeNotification(payload: string[]) {\n getRsStateResolver().dispatch(actions.actionNotificationRemove(payload));\n },\n\n /**\n * Applies a filter to the repeating structures.\n * Dispatches an action that updates the {@link State.filterExpression filterExpression} in the state.\n *\n * @param params The filter expression to apply.\n */\n applyFilter(params: ColumnFilteringActionPayload) {\n getRsStateResolver().dispatch(actions.actionColumnFiltering(params));\n },\n\n /**\n * Dispatches an action to replace the {@link State.columnAlias columnAlias} slice in the state.\n *\n * @param params - Parameters for the action. Specify the necessary details.\n */\n applyAliases(params: ApplyAliasesActionPayload) {\n getRsStateResolver().dispatch(actions.actionReplaceLabels(params));\n },\n\n /**\n * Clears filters for the specified {@link columnId}.\n * Dispatches an action to update the {@link State.clearColFilter clearColFilter} slice in the state.\n * @param columnId - The column on which the filter should be cleared.\n */\n clearFilter(columnId: string) {\n getRsStateResolver().dispatch(actions.actionClearFiltering(columnId));\n },\n\n /**\n * Applies grouping to repeating structures.\n * Dispatches an action that adds {@link State.groups groups} in the state.\n * @param payload\n */\n applyGrouping(payload: NonNullable<State['groups']>) {\n getRsStateResolver().dispatch(actions.actionAddGroups(payload));\n },\n\n /**\n * Applies sorting the repeating structures.\n * Dispatches an action that adds {@link State.sortingOrder sortingOrder} in state.\n * @param payload\n */\n applySorting(payload: NonNullable<State['sortingOrder']>) {\n getRsStateResolver().dispatch(actions.actionUpdateSort(payload));\n },\n\n /**\n * Toggles the visibility of header icons.\n * Dispatches an action to update {@link State.showHeaderIcons} in the state.\n *\n * @param status The status indicating whether to show or hide header icons.\n */\n updateHeaderIconsVisibility(status: NonNullable<State['showHeaderIcons']>) {\n getRsStateResolver().dispatch(actions.actionShowHeaderIcons(status));\n },\n\n /**\n * Applies freezing to a set of columns.\n * Dispatches an action to update {@link State.freezeColumns freezeColumns} in the state.\n *\n * @param payload The payload containing information about the columns to freeze.\n */\n applyFreeze(payload: string[]) {\n getRsStateResolver().dispatch(actions.actionColumnPin(payload));\n },\n\n /**\n * Toggles the visibility of columns.\n * Dispatches an action that updates {@link State.hiddenColumns hiddenColumns} in the state.\n * @param payload\n */\n applyToggleVisibility(payload: string[]) {\n getRsStateResolver().dispatch(actions.actionColumnToggle(payload));\n },\n\n /**\n * Sets the {@link State.hiddenColumns hiddenColumns} in the state, including out-of-the-box columns like dragHandle.\n *\n * @param payload - The payload containing columns to hide.\n * @param ootbColumns - The out-of-the-box columns to include in {@link State.hiddenColumns hiddenColumns}.\n */\n applyHiddenColumns(payload: string[], ootbColumns?: { dragHandle?: boolean }) {\n getRsStateResolver().dispatch(actions.actionHiddenColumnUpdate(payload, ootbColumns));\n },\n\n /**\n * Dispatches an action that replace {@link State.aggregationInfo aggregationInfo} slice in the state with the given {@link payload}.\n * @param payload\n */\n applyAggregations(payload: NonNullable<State['aggregationInfo']>) {\n getRsStateResolver().dispatch(actions.actionUpdateAggregations(payload));\n },\n\n /**\n * Applies order to columns of a repeatings structure with the given {@link payload}.\n * Dispatches an action that sets {@link State.colOrder columnOrder} in the state with the given {@link payload}.\n * @param payload\n */\n applyOrder(payload: string[]) {\n getRsStateResolver().dispatch(actions.actionNewColumnOrder(payload));\n },\n\n /**\n * Saves the current personalization state.\n * Dispatches an action that invokes {@link ApiContext.updatePersonalization} to persist the changes.\n *\n * @param personalizationKey The key representing the current personalization.\n * @param markAsDefault Whether to mark the current personalization as default.\n * @param markAsAppDefault Whether to mark the current personalization as app default.\n */\n updatePersonalization(\n personalizationKey: string,\n markAsDefault: boolean,\n markAsAppDefault: boolean\n ) {\n getRsStateResolver().dispatch(\n actions.actionPersonalizationUpdate(personalizationKey, markAsDefault, markAsAppDefault)\n );\n },\n\n /**\n * Sets the selected personalization state as the current state of the repeating structures.\n * Dispatches an action to update the {@link State} of the repeating structures with the selected personalization state,\n * and updates the active personalization in the {@link State.personalization personalization} state slice.\n *\n * @param args Method arguments.\n * @param args.id ID of the personalization to be set active.\n * @param args.isPreset Indicates if the personalization is preset.\n */\n applyActivePersonalization({ id, isPreset = false }: { id: string; isPreset: boolean }) {\n getRsStateResolver().dispatch(\n actions.actionPersonalizationSetActive({\n id,\n isPreset\n })\n );\n getRsStateResolver().dispatch(actions.actionUpdateStateVersion());\n },\n\n /**\n * Creates a new personalization in the state.\n * Dispatches an action that calls {@link ApiContext.createPersonalization createPersonalization} API to create\n * a new personalization with the provided name and saves it in the {@link State.personalization personalization}.\n *\n * @param name The name of the personalization.\n * @param markAsDefault Indicates whether the new personalization should be marked as default.\n */\n createPersonalization(name: string, markAsDefault: boolean) {\n getRsStateResolver().dispatch(actions.actionPersonalizationCreate(name, markAsDefault));\n },\n\n /**\n * Updates the name, markAsDefault, and markAsAppDefault flags of the current personalization.\n *\n * @param active The current active personalization key.\n * @param name The updated name.\n * @param markAsDefault Indicates whether the current personalization should be marked as default.\n * @param markAsAppDefault Indicates whether the current personalization should be marked as app default.\n */\n editPersonalization(\n active: string,\n name: string,\n markAsDefault: boolean,\n markAsAppDefault: boolean\n ) {\n getRsStateResolver().dispatch(\n actions.actionPersonalizationEdit(active, name, markAsDefault, markAsAppDefault)\n );\n },\n\n /**\n * Deletes the current personalization identified by the given key.\n * Dispatches an action that calls {@link ApiContext.deletePersonalization deletePersonalization} API\n * and updates the {@link State.personalization personalization} state by removing the deleted personalization.\n *\n * @param personalizationKey - The key or ID of the personalization to be deleted.\n */\n deletePersonalization(personalizationKey: string) {\n getRsStateResolver().dispatch(actions.actionPersonalizationDelete(personalizationKey));\n },\n\n /**\n * Sets the current personalization key as the default personalization.\n * Dispatches an action to update `defaultPersonalization` in the `personalization` state slice\n * and calls {@link ApiContext.updatePersonalization updatePersonalization} API.\n *\n * @param personalizationKey - The key identifying the personalization to set as default.\n */\n setDefaultPersonalization(personalizationKey: string) {\n getRsStateResolver().dispatch(actions.actionPersonalizationSetDefault(personalizationKey));\n },\n\n /**\n * Sets the current {@link personalizationKey} as the app's default personalization.\n * Dispatches an action that invokes {@link ApiContext.updatePersonalization updatePersonalization} api with markAsAppDefault=true for the current personalization.\n *\n * @param personalizationKey The key of the personalization to set as default.\n * @param trimmedName The name of the personalization to update.\n */\n setAppDefaultPersonalization(personalizationKey: string, trimmedName: string) {\n getRsStateResolver().dispatch(\n actions.actionPersonalizationSetAppDefault(personalizationKey, trimmedName)\n );\n },\n\n /**\n * Applies the provided search value as a filter expression in the state,\n * using an OR condition with a contains clause.\n *\n * @param value The search value to apply.\n */\n\n applySearch(value: string) {\n getRsStateResolver().dispatch(actions.actionSearchGlobal(value));\n },\n\n /**\n * Applies the given row density in {@link State.selectedHeightOption selectedHeightOption} state slice.\n *\n * @param payload the row density id.\n */\n applyRowHeight(payload: (typeof ROW_DENSITY)[keyof typeof ROW_DENSITY]) {\n getRsStateResolver().dispatch(actions.actionRowHeightChange(payload));\n },\n\n /**\n * Sets the {@link State.bootstrap bootstrap} status of repeating structures and update the {@link State.version version}in state.\n */\n doBootstrap() {\n getRsStateResolver().dispatch(actions.actionBootstrap());\n getRsStateResolver().dispatch(actions.actionUpdateStateVersion());\n },\n\n /**\n * Triggers a refresh of data in repeating structures.\n * Dispatches an action that injects {@link State.refresh refresh} flag in the state.\n * @param flushState The state slice that needs to be reset on refresh. See {@link SUPPORTED_AVOIDABLE_FEATURES}.\n * @param featuresToAvoid The features that should not run as part of refresh. See {@link SUPPORTED_FLUSH_KEYS}.\n */\n forceRefresh(flushState: { [k: string]: boolean } = {}, featuresToAvoid: string[] = []) {\n // If a refresh is in progress, don't trigger another refresh.\n if (getRsStore().refreshInProgress) return;\n\n getRsStore().refreshInProgress = true;\n getRsStore().refreshToken = Date.now();\n\n getRsStateResolver().dispatch(actions.actionForceRefresh(flushState, featuresToAvoid));\n },\n\n /**\n * Fetches actions for the {@link selectedItems} using {@link ApiContext.fetchActions fetchActions} api.\n * @param selectedItems\n * @returns\n */\n fetchActions(selectedItems: string[]) {\n return getRsProps().apiContext.fetchActions?.(selectedItems);\n },\n\n /**\n * This resets the selection and refreshes the {@link rows} data.\n * @param rows\n */\n async clearSelectionAndRefreshRows(rows: string[]) {\n await Promise.allSettled([utilMethods.selectAllRows(false), utilMethods.refreshRows(rows)]);\n },\n\n /**\n * This removes {@link State.showConfirmationAction confirmationAction} from the state.\n */\n completeConfirmationAction() {\n getRsStateResolver().dispatch(actions.completeConfirmationAction());\n },\n\n /**\n * This sets the {@link State.errors errors} in the state.\n * @param payload\n */\n setErrors(payload: Errors) {\n if (payload.dataErrors) {\n getRsStateResolver().dispatch(actions.setDataErrors(payload.dataErrors));\n }\n },\n\n /**\n * Dispatches the dom container responsive breakpoints to state.\n * @param {*} breakpoint\n * @param {*} value\n */\n setDomContainerResponsiveBreakpoints(breakpoint: string, value: boolean) {\n const payload = { breakpoint, value };\n getRsStateResolver().dispatch(actions.setDomContainerResponsiveBreakpoints(payload));\n },\n\n /**\n * Refreshes the {@link View.data data} for {@link rows} by calling {@link ApiContext.fetchRowsData fetchRowsData} api.\n * It also calls {@link utilMethods.forceUpdate forceUpdate } to trigger state change for re-rendering.\n * @param rows\n * @returns\n */\n async refreshRows(rows: string[] = []) {\n const rsProps = getRsProps();\n if (rows.length === 0) {\n return;\n }\n const state = getRsStateResolver().getState();\n const { fetchRowsData } = rsProps.apiContext;\n const response = await fetchRowsData?.(\n deepCopy(state),\n getView().meta,\n rows,\n getView().meta.itemKey,\n {\n ...(getRsStore().refreshInProgress && {\n invalidateCache: true,\n invalidateCacheToken: getRsStore().refreshToken\n })\n }\n );\n\n const data = syncData(getView().meta.itemKey, getView().data!, response!);\n getView().setProp({\n data: [...data]\n });\n utilMethods.forceUpdate(false, { forceRenderOnNextRun: true });\n },\n\n /**\n * Select/Deselect all rows(all pages in case of paginated data) by calling {@link ApiContext.setSelectedRows setSelectedRows}/ {@link ApiContext.clearSelectedRows clearSelectedRows} api.\n * It also updates the selected rows received from {@link ApiContext.getSelectedRows getSelectedRows} api in {@link State.selectedRows selectedRows} state slice.\n * @param isSelected\n */\n async selectAllRows(isSelected: boolean) {\n const rsProps = getRsProps();\n let selectedRows: (RowData & { $selected: boolean })[] = [];\n if (isSelected) {\n const response = await rsProps.apiContext.fetchData(\n {\n ...getRsStateResolver().getState(),\n paginationOptions: {\n rootVirtualiser: {\n startIndex: 0,\n endIndex: getView().resultsCount! - 1\n }\n },\n // passing groups as null to get all rows irrespective of groupfilters\n // @ts-expect-error Why groups is set to null? it should be set as undefined.\n groups: null\n },\n getView().meta,\n {}\n );\n if (response) {\n const { data = [] } = response;\n selectedRows = data.map(item => ({ ...item, $selected: true })) || [];\n }\n try {\n await rsProps.apiContext.setSelectedRows?.(selectedRows);\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error('setSelectedRows api resulting into error.', e);\n }\n } else {\n // clear all selections when selectAll is unchecked\n await rsProps.apiContext.clearSelectedRows?.();\n }\n\n const rows = await rsProps.apiContext.getSelectedRows?.();\n\n if (rows)\n getRsStateResolver().dispatch(\n actions.actionRowSelectionItemsUpdate({\n selectedRows: rows,\n mode: getView().meta.selectionMode!\n })\n );\n },\n\n /**\n * Triggers {@link ApiContext.importCSVData importCSVData} api.\n * @param create\n * @returns\n */\n importCSVData(create: ModalManagerContextValue['create']) {\n return getRsProps()\n .apiContext.importCSVData?.(create)\n .catch(err => {\n getRsStateResolver().dispatch(\n actions.actionNotificationAdd({\n content: err\n })\n );\n });\n },\n\n /**\n * Triggers {@link ApiContext.exportData exportData} api.\n * @returns\n */\n exportToExcel() {\n return getRsProps()\n .apiContext.exportData?.(deepCopy(getView().state), getView().meta, {\n ...(getRsStore().refreshInProgress && {\n invalidateCache: true,\n invalidateCacheToken: getRsStore().refreshToken\n })\n })\n .catch(err => {\n getRsStateResolver().dispatch(\n actions.actionNotificationAdd({\n content: err\n })\n );\n });\n },\n\n /**\n * Triggers {@link ApiContext.exportDataToCSV exportDataToCSV} api.\n * @returns\n */\n exportToCSV() {\n return getRsProps()\n .apiContext.exportDataToCSV?.(deepCopy(getView().state), getView().meta, {\n ...(getRsStore().refreshInProgress && {\n invalidateCache: true,\n invalidateCacheToken: getRsStore().refreshToken\n })\n })\n .catch(err => {\n getRsStateResolver().dispatch(\n actions.actionNotificationAdd({\n content: err\n })\n );\n });\n },\n\n /**\n * Updates the visibility of columns by modifying {@link State.hiddenColumns}.\n * @param columns - An object mapping column IDs to their visibility status. `true` indicates the column is visible, and `false` means it is hidden.\n */\n updateColumnsVisibility(columns: { [key: FieldDef['id']]: boolean }) {\n getRsStateResolver().dispatch(actions.updateColumnsVisibility(columns));\n },\n\n setConditionalStyleFormats(\n conditionalStyleFormats: NonNullable<State['conditionalStyleFormats']>\n ) {\n getRsStateResolver().dispatch(actions.setConditionalStyleFormats(conditionalStyleFormats));\n }\n };\n return utilMethods;\n}\nexport type UtilityFunctions = ReturnType<typeof viewUtilityMethods>;\n"]}
1
+ {"version":3,"file":"viewUtilityMethods.js","sourceRoot":"","sources":["../../../../src/core/generators/viewUtilityMethods.ts"],"names":[],"mappings":"AAIA,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGnD,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAqC1E,SAAS,QAAQ,CAAC,GAAW,EAAE,WAAsB,EAAE,aAAwB;IAC7E,OAAO,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;QAC5B,MAAM,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QAC9D,OAAO,KAAK,IAAI,IAAI,CAAC;IACvB,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,UAAsB;IAC/D,MAAM,EAAE,UAAU,EAAE,kBAAkB,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,UAAU,CAAC;IAE3E,MAAM,WAAW,GAAG;QAClB;;;;;;;;WAQG;QACH,WAAW,CAAC,aAAuB,EAAE,mBAAkD;YACrF,kBAAkB,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,iBAAiB,CAAC,aAAa,EAAE,mBAAmB,CAAC,CAAC,CAAC;QAC/F,CAAC;QAED;;;;;;;;;;;;;WAaG;QACH,gBAAgB,CAAC,SAAiB,EAAE,cAAsB;YACxD,IAAI,OAAO,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;gBACrC,kBAAkB,EAAE,CAAC,QAAQ,CAC3B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CAAC;IACF,OAAO,WAAW,CAAC;AACrB,CAAC","sourcesContent":["import type { OmitStrict } from '@pega/cosmos-react-core';\nimport type { ModalManagerContextValue } from '@pega/cosmos-react-core/lib/components/Modal/Modal.types';\n\nimport type RsInternal from '../RsInternal';\nimport ActionTypes from '../actions/actionConstants';\nimport * as actions from '../actions/actions';\nimport { rowSelectColumnMeta } from '../constants';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { SUPPORTED_AVOIDABLE_FEATURES, SUPPORTED_FLUSH_KEYS } from '../constants';\nimport { validateAction, passablePromise, deepCopy } from '../utils/util';\nimport type { Errors, State } from '../../../types/State.types';\n// This is being used in JSdoc.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { ApiContext, ApiOptions } from '../../../types/ApiContext.types';\n// This is being used in JSdoc.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { FieldDef, Meta, ROW_DENSITY } from '../../../types/Meta.types';\nimport type {\n ActionMeta,\n ApplyAliasesActionPayload,\n ColumnFilteringActionPayload,\n ExpandCollapsePayload,\n PaginationPayload\n} from '../actions/actions.types';\n\nimport type View from './ViewGenerator';\nimport type { RowData } from './RowGenerator.types';\nimport type { DebugInfo, RefreshNotification, RequiredDefinition } from './ViewGenerator.types';\n\nexport type RefreshNotificationForConsumer = OmitStrict<RefreshNotification, 'id'>;\n\nexport type SupportedConsumerPayloads = {\n [ActionTypes.USER_CONFIRMATION_ACTION]: OmitStrict<\n NonNullable<View['confirmationActionDetails']>,\n 'onSubmit' | 'onCancel'\n >;\n [ActionTypes.UPDATE_DEBUG_INFO]: DebugInfo;\n [ActionTypes.TOGGLE_DISABLE_SELECTION]: boolean;\n [ActionTypes.TOGGLE_REQUIRED]: RequiredDefinition;\n [ActionTypes.NOTIFY_DATA_REFRESH]: RefreshNotificationForConsumer;\n [ActionTypes.SET_IN_EXTERNAL_STATE]: NonNullable<State['externalState']>;\n [ActionTypes.UPDATE_SELECTED_ROWS]: undefined;\n};\n\nexport type SupportedConsumerActionType = keyof SupportedConsumerPayloads;\n\nfunction syncData(key: string, sourceArray: RowData[], modifiedArray: RowData[]) {\n return sourceArray.map(item => {\n const item2 = modifiedArray.find(i2 => i2[key] === item[key]);\n return item2 || item;\n });\n}\n\nexport default function viewUtilityMethods(rsInternal: RsInternal) {\n const { getRsProps, getRsStateResolver, getView, getRsStore } = rsInternal;\n\n const utilMethods = {\n /**\n * Dispatches an action that creates a new state object without any internal modifications.\n *\n * If {@link instantRender} is false and {@link forceUpdateFeatures} are provided,\n * it updates the {@link State.forceUpdateFeatures forceUpdateFeatures} slice in the state.\n *\n * @param instantRender - Determines if the render should happen instantly.\n * @param forceUpdateFeatures - The features to force update in the state on next render cycle.\n */\n forceUpdate(instantRender?: boolean, forceUpdateFeatures?: State['forceUpdateFeatures']) {\n getRsStateResolver().dispatch(actions.actionForceUpdate(instantRender, forceUpdateFeatures));\n },\n\n /**\n * Handles the reordering of rows.\n *\n * If {@link Meta.moveListRecords moveListRecords} is set to true in Meta, it dispatches an action\n * that updates the keys of the {@link sourceKey source} row and the {@link destinationKey destination} row\n * in the {@link State.sourceKey sourceKey} and {@link State.destinationKey destinationKey} state slices, respectively.\n *\n * Otherwise, it calls {@link ApiContext.applyRowReorder applyRowReorder} from the apiContext and triggers\n * a {@link utilMethods.forceRefresh forceRefresh} on the state.\n *\n * @param sourceKey - The itemKey for the row being dragged.\n * @param destinationKey - The itemKey for the row on which it is dropped.\n * @returns\n */\n handleRowReorder(sourceKey: string, destinationKey: string) {\n if (getView()?.meta?.moveListRecords) {\n getRsStateResolver().dispatch(\n actions.actionMoveRecordKeysUpdate({\n sourceKey,\n destinationKey\n })\n );\n return;\n }\n getRsProps()\n .apiContext.applyRowReorder?.(sourceKey, destinationKey)\n .then(() => {\n utilMethods.forceRefresh();\n });\n },\n\n /**\n * Sets the count-related information onto the {@link View view} via {@link View.setProp setProp} and triggers {@link utilMethods.forceUpdate forceUpdate}.\n *\n * @param args - The count information object.\n * @param args.count - The total record count of the view, including group headers.\n * @param args.hasMoreResults - Indicates if the view has more records.\n * @param args.selectedRecordsCount - The total count of selected records.\n * @param args._countGeneratedInternally - Indicates if the count is generated internally. This is used for RS core internal purposes. Setting this from apiContext might lead to erroneous behavior.\n * @returns void\n */\n setRecordCount({\n count,\n hasMoreResults,\n selectedRecordsCount,\n _countGeneratedInternally,\n announce\n }: {\n count?: View['resultsCount'];\n hasMoreResults?: View['hasMoreResults'];\n selectedRecordsCount?: View['selectedRecordsCount'];\n _countGeneratedInternally?: View['countGeneratedInternally'];\n announce?: View['announceCount'];\n }) {\n // NOTE: setRecordCount can be called with partial props. So while doing setProp we need to make sure to check the existence of incoming prop value.\n // If incoming prop is undefined then it should have a fallback otherwise it will override existing value on view to undefined.\n getView().setProp({\n countGeneratedInternally: !!_countGeneratedInternally,\n hasMoreResults: hasMoreResults ?? false,\n resultsCount: count,\n selectedRecordsCount: selectedRecordsCount ?? getView().selectedRecordsCount,\n showCount: !Number.isFinite(count) ? false : !_countGeneratedInternally,\n announceCount: announce\n });\n // If count is not finite then do instantRender as we want to hide the count immediately and don't want the StateResolver queue to be empty.\n // Else the count will be displayed after the StateResolver queue becomes empty.\n const instantRender = !Number.isFinite(count);\n utilMethods.forceUpdate(instantRender);\n },\n\n /**\n * Dispatches an action to interact with repeating structures, allowing consumers\n * to perform operations using standard actions and payloads.\n *\n * @param action The action to be dispatched.\n * @param payload The payload associated with the action.\n * @returns The return value after the action has been processed by the repeating structure.\n */\n // TODO Refactor- this method to have only one parameter action object that contains type and payload. Maintenance of it will be easy.\n // TODO Make it generic specific.\n dispatchAction<T extends SupportedConsumerActionType>(\n action: T,\n payload?: SupportedConsumerPayloads[T]\n ): Promise<any> | undefined {\n const { dispatch } = getRsStateResolver();\n validateAction(action, payload, getView().externalStateKeys);\n\n let actionReturnValue;\n switch (action) {\n case ActionTypes.USER_CONFIRMATION_ACTION:\n // eslint-disable-next-line no-case-declarations\n const [promise, onSubmit, onCancel] = passablePromise<any>();\n getView().setProp({\n confirmationActionDetails: {\n onSubmit,\n onCancel,\n ...(payload as OmitStrict<\n NonNullable<View['confirmationActionDetails']>,\n 'onSubmit' | 'onCancel'\n >)\n }\n });\n dispatch(actions.showConfirmationAction());\n actionReturnValue = promise;\n break;\n case ActionTypes.UPDATE_DEBUG_INFO:\n getView().setProp({ debugInfo: [payload as DebugInfo] });\n utilMethods.forceUpdate(false);\n break;\n case ActionTypes.TOGGLE_DISABLE_SELECTION: {\n let rowSelectColumn = getView().columns?.find(\n column => column.field.name === rowSelectColumnMeta.field.name\n );\n if (rowSelectColumn) {\n rowSelectColumn = rowSelectColumn.setProp({\n disableSelection: payload as boolean\n });\n utilMethods.forceUpdate(false);\n }\n break;\n }\n case ActionTypes.TOGGLE_REQUIRED:\n getView().setProp({ requiredDef: payload as RequiredDefinition });\n utilMethods.forceUpdate(false);\n break;\n case ActionTypes.NOTIFY_DATA_REFRESH:\n getView().setProp('refreshNotification', {\n id: Date.now(),\n ...(payload as RefreshNotificationForConsumer)\n });\n utilMethods.forceUpdate(false);\n break;\n case ActionTypes.SET_IN_EXTERNAL_STATE:\n dispatch(actions.setExternalState(payload as NonNullable<State['externalState']>));\n break;\n case ActionTypes.UPDATE_SELECTED_ROWS:\n utilMethods.forceUpdate(false, {\n updateSelectedRows: new Date().getTime()\n });\n break;\n\n default:\n }\n return actionReturnValue;\n },\n\n /** Returns the Html events required for reordering a column. */\n getFieldReorderProps() {\n return getRsStore().getFieldReorderProps?.();\n },\n\n // TODO: this should be moved to group generator instance.\n /**\n * Triggers the expand or collapse action for a group header.\n * Dispatches an action to update the {@link State.groupToggle groupToggle} slices in the state.\n *\n * @param payload The data related to the groups.\n */\n toggleGroupExpansion(payload: OmitStrict<ExpandCollapsePayload, 'groups'>) {\n getRsStateResolver().dispatch(actions.actionToggleExpandCollpase(payload));\n },\n\n /**\n * Clears hierarchical groups by dispatching an action to reset the {@link State.hierarchicalGroup hierarchicalGroup} slice in the state.\n */\n clearHierarchicalGroup() {\n getRsStore().groupingInfo = [];\n getRsStateResolver().dispatch(actions.actionUpdateDisplayMode({}));\n },\n\n /**\n * Dispatches a pagination action to update {@link State.paginationOptions paginationOptions} in the state slice.\n *\n * @param payload - The pagination options to update.\n * @param actionMeta - The action metadata.\n */\n onPaginate(payload: PaginationPayload, actionMeta?: ActionMeta) {\n getRsStateResolver().dispatch(actions.actionPaginate(payload, actionMeta));\n },\n\n /**\n * Removes a notification message.\n * Dispatches an action to update the {@link State.notifications notifications} slice in the state.\n *\n * @param payload The notification messages to be removed.\n */\n removeNotification(payload: string[]) {\n getRsStateResolver().dispatch(actions.actionNotificationRemove(payload));\n },\n\n /**\n * Applies a filter to the repeating structures.\n * Dispatches an action that updates the {@link State.filterExpression filterExpression} in the state.\n *\n * @param params The filter expression to apply.\n */\n applyFilter(params: ColumnFilteringActionPayload) {\n getRsStateResolver().dispatch(actions.actionColumnFiltering(params));\n },\n\n /**\n * Dispatches an action to replace the {@link State.columnAlias columnAlias} slice in the state.\n *\n * @param params - Parameters for the action. Specify the necessary details.\n */\n applyAliases(params: ApplyAliasesActionPayload) {\n getRsStateResolver().dispatch(actions.actionReplaceLabels(params));\n },\n\n /**\n * Clears filters for the specified {@link columnId}.\n * Dispatches an action to update the {@link State.clearColFilter clearColFilter} slice in the state.\n * @param columnId - The column on which the filter should be cleared.\n */\n clearFilter(columnId: string) {\n getRsStateResolver().dispatch(actions.actionClearFiltering(columnId));\n },\n\n /**\n * Applies grouping to repeating structures.\n * Dispatches an action that adds {@link State.groups groups} in the state.\n * @param payload\n */\n applyGrouping(payload: NonNullable<State['groups']>) {\n getRsStateResolver().dispatch(actions.actionAddGroups(payload));\n },\n\n /**\n * Applies sorting the repeating structures.\n * Dispatches an action that adds {@link State.sortingOrder sortingOrder} in state.\n * @param payload\n */\n applySorting(payload: NonNullable<State['sortingOrder']>) {\n getRsStateResolver().dispatch(actions.actionUpdateSort(payload));\n },\n\n /**\n * Toggles the visibility of header icons.\n * Dispatches an action to update {@link State.showHeaderIcons} in the state.\n *\n * @param status The status indicating whether to show or hide header icons.\n */\n updateHeaderIconsVisibility(status: NonNullable<State['showHeaderIcons']>) {\n getRsStateResolver().dispatch(actions.actionShowHeaderIcons(status));\n },\n\n /**\n * Applies freezing to a set of columns.\n * Dispatches an action to update {@link State.freezeColumns freezeColumns} in the state.\n *\n * @param payload The payload containing information about the columns to freeze.\n */\n applyFreeze(payload: string[]) {\n getRsStateResolver().dispatch(actions.actionColumnPin(payload));\n },\n\n /**\n * Toggles the visibility of columns.\n * Dispatches an action that updates {@link State.hiddenColumns hiddenColumns} in the state.\n * @param payload\n */\n applyToggleVisibility(payload: string[]) {\n getRsStateResolver().dispatch(actions.actionColumnToggle(payload));\n },\n\n /**\n * Sets the {@link State.hiddenColumns hiddenColumns} in the state, including out-of-the-box columns like dragHandle.\n *\n * @param payload - The payload containing columns to hide.\n * @param ootbColumns - The out-of-the-box columns to include in {@link State.hiddenColumns hiddenColumns}.\n */\n applyHiddenColumns(payload: string[], ootbColumns?: { dragHandle?: boolean }) {\n getRsStateResolver().dispatch(actions.actionHiddenColumnUpdate(payload, ootbColumns));\n },\n\n /**\n * Dispatches an action that replace {@link State.aggregationInfo aggregationInfo} slice in the state with the given {@link payload}.\n * @param payload\n */\n applyAggregations(payload: NonNullable<State['aggregationInfo']>) {\n getRsStateResolver().dispatch(actions.actionUpdateAggregations(payload));\n },\n\n /**\n * Applies order to columns of a repeatings structure with the given {@link payload}.\n * Dispatches an action that sets {@link State.colOrder columnOrder} in the state with the given {@link payload}.\n * @param payload\n */\n applyOrder(payload: string[]) {\n getRsStateResolver().dispatch(actions.actionNewColumnOrder(payload));\n },\n\n /**\n * Saves the current personalization state.\n * Dispatches an action that invokes {@link ApiContext.updatePersonalization} to persist the changes.\n *\n * @param personalizationKey The key representing the current personalization.\n * @param markAsDefault Whether to mark the current personalization as default.\n * @param markAsAppDefault Whether to mark the current personalization as app default.\n */\n updatePersonalization(\n personalizationKey: string,\n markAsDefault: boolean,\n markAsAppDefault: boolean\n ) {\n getRsStateResolver().dispatch(\n actions.actionPersonalizationUpdate(personalizationKey, markAsDefault, markAsAppDefault)\n );\n },\n\n /**\n * Sets the selected personalization state as the current state of the repeating structures.\n * Dispatches an action to update the {@link State} of the repeating structures with the selected personalization state,\n * and updates the active personalization in the {@link State.personalization personalization} state slice.\n *\n * @param args Method arguments.\n * @param args.id ID of the personalization to be set active.\n * @param args.isPreset Indicates if the personalization is preset.\n */\n applyActivePersonalization({ id, isPreset = false }: { id: string; isPreset: boolean }) {\n getRsStateResolver().dispatch(\n actions.actionPersonalizationSetActive({\n id,\n isPreset\n })\n );\n getRsStateResolver().dispatch(actions.actionUpdateStateVersion());\n },\n\n /**\n * Creates a new personalization in the state.\n * Dispatches an action that calls {@link ApiContext.createPersonalization createPersonalization} API to create\n * a new personalization with the provided name and saves it in the {@link State.personalization personalization}.\n *\n * @param name The name of the personalization.\n * @param markAsDefault Indicates whether the new personalization should be marked as default.\n */\n createPersonalization(name: string, markAsDefault: boolean) {\n getRsStateResolver().dispatch(actions.actionPersonalizationCreate(name, markAsDefault));\n },\n\n /**\n * Updates the name, markAsDefault, and markAsAppDefault flags of the current personalization.\n *\n * @param active The current active personalization key.\n * @param name The updated name.\n * @param markAsDefault Indicates whether the current personalization should be marked as default.\n * @param markAsAppDefault Indicates whether the current personalization should be marked as app default.\n */\n editPersonalization(\n active: string,\n name: string,\n markAsDefault: boolean,\n markAsAppDefault: boolean\n ) {\n getRsStateResolver().dispatch(\n actions.actionPersonalizationEdit(active, name, markAsDefault, markAsAppDefault)\n );\n },\n\n /**\n * Deletes the current personalization identified by the given key.\n * Dispatches an action that calls {@link ApiContext.deletePersonalization deletePersonalization} API\n * and updates the {@link State.personalization personalization} state by removing the deleted personalization.\n *\n * @param personalizationKey - The key or ID of the personalization to be deleted.\n */\n deletePersonalization(personalizationKey: string) {\n getRsStateResolver().dispatch(actions.actionPersonalizationDelete(personalizationKey));\n },\n\n /**\n * Sets the current personalization key as the default personalization.\n * Dispatches an action to update `defaultPersonalization` in the `personalization` state slice\n * and calls {@link ApiContext.updatePersonalization updatePersonalization} API.\n *\n * @param personalizationKey - The key identifying the personalization to set as default.\n */\n setDefaultPersonalization(personalizationKey: string) {\n getRsStateResolver().dispatch(actions.actionPersonalizationSetDefault(personalizationKey));\n },\n\n /**\n * Sets the current {@link personalizationKey} as the app's default personalization.\n * Dispatches an action that invokes {@link ApiContext.updatePersonalization updatePersonalization} api with markAsAppDefault=true for the current personalization.\n *\n * @param personalizationKey The key of the personalization to set as default.\n * @param trimmedName The name of the personalization to update.\n */\n setAppDefaultPersonalization(personalizationKey: string, trimmedName: string) {\n getRsStateResolver().dispatch(\n actions.actionPersonalizationSetAppDefault(personalizationKey, trimmedName)\n );\n },\n\n /**\n * Applies the provided search value as a filter expression in the state,\n * using an OR condition with a contains clause.\n *\n * @param value The search value to apply.\n */\n\n applySearch(value: string) {\n getRsStateResolver().dispatch(actions.actionSearchGlobal(value));\n },\n\n /**\n * Applies the given row density in {@link State.selectedHeightOption selectedHeightOption} state slice.\n *\n * @param payload the row density id.\n */\n applyRowHeight(payload: (typeof ROW_DENSITY)[keyof typeof ROW_DENSITY]) {\n getRsStateResolver().dispatch(actions.actionRowHeightChange(payload));\n },\n\n /**\n * Sets the {@link State.bootstrap bootstrap} status of repeating structures and update the {@link State.version version}in state.\n */\n doBootstrap() {\n getRsStateResolver().dispatch(actions.actionBootstrap());\n getRsStateResolver().dispatch(actions.actionUpdateStateVersion());\n },\n\n /**\n * Triggers a refresh of data in repeating structures.\n * Dispatches an action that injects {@link State.refresh refresh} flag in the state.\n * @param flushState The state slice that needs to be reset on refresh. See {@link SUPPORTED_AVOIDABLE_FEATURES}.\n * @param featuresToAvoid The features that should not run as part of refresh. See {@link SUPPORTED_FLUSH_KEYS}.\n */\n forceRefresh(flushState: { [k: string]: boolean } = {}, featuresToAvoid: string[] = []) {\n // If a refresh is in progress, don't trigger another refresh.\n if (getRsStore().refreshInProgress) return;\n\n getRsStore().refreshInProgress = true;\n getRsStore().refreshToken = Date.now();\n\n getRsStateResolver().dispatch(actions.actionForceRefresh(flushState, featuresToAvoid));\n },\n\n /**\n * Fetches actions for the {@link selectedItems} using {@link ApiContext.fetchActions fetchActions} api.\n * @param selectedItems\n * @returns\n */\n fetchActions(selectedItems: string[]) {\n return getRsProps().apiContext.fetchActions?.(selectedItems);\n },\n\n /**\n * This resets the selection and refreshes the {@link rows} data.\n * @param rows\n */\n async clearSelectionAndRefreshRows(rows: string[]) {\n await Promise.allSettled([utilMethods.selectAllRows(false), utilMethods.refreshRows(rows)]);\n },\n\n /**\n * This removes {@link State.showConfirmationAction confirmationAction} from the state.\n */\n completeConfirmationAction() {\n getRsStateResolver().dispatch(actions.completeConfirmationAction());\n },\n\n /**\n * This sets the {@link State.errors errors} in the state.\n * @param payload\n */\n setErrors(payload: Errors) {\n if (payload.dataErrors) {\n getRsStateResolver().dispatch(actions.setDataErrors(payload.dataErrors));\n }\n },\n\n /**\n * Dispatches the dom container responsive breakpoints to state.\n * @param {*} breakpoint\n * @param {*} value\n */\n setDomContainerResponsiveBreakpoints(breakpoint: string, value: boolean) {\n const payload = { breakpoint, value };\n getRsStateResolver().dispatch(actions.setDomContainerResponsiveBreakpoints(payload));\n },\n\n /**\n * Refreshes the {@link View.data data} for {@link rows} by calling {@link ApiContext.fetchRowsData fetchRowsData} api.\n * It also calls {@link utilMethods.forceUpdate forceUpdate } to trigger state change for re-rendering.\n * @param rows\n * @returns\n */\n async refreshRows(rows: string[] = []) {\n const rsProps = getRsProps();\n if (rows.length === 0) {\n return;\n }\n const state = getRsStateResolver().getState();\n const { fetchRowsData } = rsProps.apiContext;\n const response = await fetchRowsData?.(\n deepCopy(state),\n getView().meta,\n rows,\n getView().meta.itemKey,\n {\n ...(getRsStore().refreshInProgress && {\n invalidateCache: true,\n invalidateCacheToken: getRsStore().refreshToken\n })\n }\n );\n\n const data = syncData(getView().meta.itemKey, getView().data!, response!);\n getView().setProp({\n data: [...data]\n });\n utilMethods.forceUpdate(false, { forceRenderOnNextRun: true });\n },\n\n /**\n * Select/Deselect all rows(all pages in case of paginated data) by calling {@link ApiContext.setSelectedRows setSelectedRows}/ {@link ApiContext.clearSelectedRows clearSelectedRows} api.\n * It also updates the selected rows received from {@link ApiContext.getSelectedRows getSelectedRows} api in {@link State.selectedRows selectedRows} state slice.\n * @param isSelected\n */\n async selectAllRows(isSelected: boolean) {\n const rsProps = getRsProps();\n let selectedRows: (RowData & { $selected: boolean })[] = [];\n if (isSelected) {\n const response = await rsProps.apiContext.fetchData(\n {\n ...getRsStateResolver().getState(),\n paginationOptions: {\n rootVirtualiser: {\n startIndex: 0,\n endIndex: getView().resultsCount! - 1\n }\n },\n // passing groups and groupFilters as undefined to get all rows\n groups: undefined,\n groupFilters: undefined\n },\n getView().meta,\n {}\n );\n if (response) {\n const { data = [] } = response;\n selectedRows = data.map(item => ({ ...item, $selected: true })) || [];\n }\n try {\n await rsProps.apiContext.setSelectedRows?.(selectedRows);\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error('setSelectedRows api resulting into error.', e);\n }\n } else {\n // clear all selections when selectAll is unchecked\n await rsProps.apiContext.clearSelectedRows?.();\n }\n\n const rows = await rsProps.apiContext.getSelectedRows?.();\n\n if (rows)\n getRsStateResolver().dispatch(\n actions.actionRowSelectionItemsUpdate({\n selectedRows: rows,\n mode: getView().meta.selectionMode!\n })\n );\n },\n\n /**\n * Triggers {@link ApiContext.importCSVData importCSVData} api.\n * @param create\n * @returns\n */\n importCSVData(create: ModalManagerContextValue['create']) {\n return getRsProps()\n .apiContext.importCSVData?.(create)\n .catch(err => {\n getRsStateResolver().dispatch(\n actions.actionNotificationAdd({\n content: err\n })\n );\n });\n },\n\n /**\n * Triggers {@link ApiContext.exportData exportData} api.\n * @returns\n */\n exportToExcel() {\n return getRsProps()\n .apiContext.exportData?.(deepCopy(getView().state), getView().meta, {\n ...(getRsStore().refreshInProgress && {\n invalidateCache: true,\n invalidateCacheToken: getRsStore().refreshToken\n })\n })\n .catch(err => {\n getRsStateResolver().dispatch(\n actions.actionNotificationAdd({\n content: err\n })\n );\n });\n },\n\n /**\n * Triggers {@link ApiContext.exportDataToCSV exportDataToCSV} api.\n * @returns\n */\n exportToCSV() {\n return getRsProps()\n .apiContext.exportDataToCSV?.(deepCopy(getView().state), getView().meta, {\n ...(getRsStore().refreshInProgress && {\n invalidateCache: true,\n invalidateCacheToken: getRsStore().refreshToken\n })\n })\n .catch(err => {\n getRsStateResolver().dispatch(\n actions.actionNotificationAdd({\n content: err\n })\n );\n });\n },\n\n /**\n * Updates the visibility of columns by modifying {@link State.hiddenColumns}.\n * @param columns - An object mapping column IDs to their visibility status. `true` indicates the column is visible, and `false` means it is hidden.\n */\n updateColumnsVisibility(columns: { [key: FieldDef['id']]: boolean }) {\n getRsStateResolver().dispatch(actions.updateColumnsVisibility(columns));\n },\n\n setConditionalStyleFormats(\n conditionalStyleFormats: NonNullable<State['conditionalStyleFormats']>\n ) {\n getRsStateResolver().dispatch(actions.setConditionalStyleFormats(conditionalStyleFormats));\n }\n };\n return utilMethods;\n}\nexport type UtilityFunctions = ReturnType<typeof viewUtilityMethods>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../../src/core/reducers/error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAExD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;yBAEvC,OAAO,KAAK,EAAE,QAAQ,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;4BAmB67R,CAAC;+BAAkI,CAAC;0BAAmJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAnBjwS,wBAkBE"}
1
+ {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../../src/core/reducers/error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAExD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;yBAEvC,OAAO,KAAK,EAAE,QAAQ,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;4BAmB85T,CAAC;+BAAkI,CAAC;0BAAmJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAnBluU,wBAkBE"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/reducers/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAgExD,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EAAE,UAAU,EAAE,EAAE,UAAU,IAC3D,OAAO,KAAK,EAAE,QAAQ,MAAM,EAAE,YAAY,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;4BAesnO,CAAC;+BAAkI,CAAC;0BAAmJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAD38O"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/reducers/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAgExD,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EAAE,UAAU,EAAE,EAAE,UAAU,IAC3D,OAAO,KAAK,EAAE,QAAQ,MAAM,EAAE,YAAY,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;4BAeulQ,CAAC;+BAAkI,CAAC;0BAAmJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAD56Q"}
@@ -85,7 +85,7 @@ function transformCondition(condition, meta, conditionBuilderFieldsConfig) {
85
85
  const { conditionBuilderFields: fields, conditionBuilderFieldsTypeMap: fieldsTypeMap } = conditionBuilderFieldsConfig;
86
86
  // cspell:ignore DDTHH
87
87
  const currentDateTimeWithTimeZone = dayjs().tz(meta.timezone).format('YYYY-MM-DDTHH:mm:ss.SSS');
88
- condition = transformComplexCondition(condition, fields, currentDateTimeWithTimeZone);
88
+ condition = transformComplexCondition(condition, fields, true, currentDateTimeWithTimeZone);
89
89
  const { logic, conditions } = splitConditionTree(condition);
90
90
  Object.entries(conditions).forEach(([, singleCondition]) => {
91
91
  transformConditionBasedOnType(singleCondition, fieldsTypeMap, meta);
@@ -1 +1 @@
1
- {"version":3,"file":"condition-utils.js","sourceRoot":"","sources":["../../../../src/core/utils/condition-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,MAAM,uBAAuB,CAAC;AAC1C,OAAO,GAAG,MAAM,kBAAkB,CAAC;AAEnC,OAAO,EACL,iBAAiB,IAAI,wBAAwB,EAC7C,gBAAgB,EAChB,kBAAkB,EAClB,yBAAyB,EAK1B,MAAM,sCAAsC,CAAC;AAM9C,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAElC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACpB,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAElB,MAAM,CAAC,MAAM,kBAAkB,GAA8B;IAC3D,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,SAAS;IACjB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,WAAW;IACrB,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,WAAW;CACT,CAAC;AAEX,MAAM,+BAA+B,GAAG,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;AAC7D,MAAM,aAAa,GAAG,GAAG,CAAC;AAO1B,SAAS,4BAA4B,CAAC,S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AAoB,EACpB,aAAqC,EAC3B,EAAE;IACZ,MAAM,MAAM,GAAG,4BAA4B,CAAC,SAAS,CAAC,CAAC;IACvD,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,aAAa,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;AACrE,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CACvC,IAAU,EACV,eAAwD;IAExD,IAAI,EAAE,SAAS,EAAE,GAAG,eAAe,CAAC;IACpC,MAAM,EAAE,IAAI,EAAE,GAAG,eAAe,CAAC;IACjC,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;IAC3B,MAAM,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,GAC7D,iCAAiC,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAE1D,oEAAoE;IACpE,SAAS,GAAG,kBAAkB,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE;QACxD,sBAAsB;QACtB,6BAA6B;KAC9B,CAAC,CAAC;IAEH,OAAO,wBAAwB,CAAC,SAAS,EAAE,IAAI,EAAE,sBAAsB,EAAE,aAAa,CAAC,CAAC;AAC1F,CAAC","sourcesContent":["import dayjs from 'dayjs';\nimport tZone from 'dayjs/plugin/timezone';\nimport utc from 'dayjs/plugin/utc';\n\nimport {\n evaluateCondition as evaluateConditionUtility,\n parseLogicString,\n splitConditionTree,\n transformComplexCondition,\n type Condition,\n type Field,\n type LeafCondition,\n type FieldType\n} from '@pega/cosmos-react-condition-builder';\n\nimport type { FieldDef, Meta } from '../../../types/Meta.types';\nimport type { RowData } from '../generators/RowGenerator.types';\nimport type { State } from '../../../types/State.types';\n\nimport { deepCopy } from './util';\n\ndayjs.extend(tZone);\ndayjs.extend(utc);\n\nexport const RsToCBFieldTypeMap: Record<string, FieldType> = {\n text: 'TEXT',\n number: 'DECIMAL',\n boolean: 'BOOLEAN',\n datetime: 'DATE_TIME',\n date: 'DATE_ONLY',\n time: 'TIME_ONLY'\n} as const;\n\nconst DateFunctionsWithRhsAsDateInput = ['HOURS', 'MINUTES'];\nconst DOT_DELIMITER = '.';\n\ntype ConditionBuilderFieldsConfig = {\n conditionBuilderFields: Field[];\n conditionBuilderFieldsTypeMap: Record<string, FieldType>;\n};\n\nfunction getUniqueFieldsFromCondition(condition: Condition, uniqueFields: Set<string> = new Set()) {\n if ('AND' in condition) {\n condition.AND.forEach(andCondition => getUniqueFieldsFromCondition(andCondition, uniqueFields));\n } else if ('OR' in condition) {\n condition.OR.forEach(orCondition => getUniqueFieldsFromCondition(orCondition, uniqueFields));\n } else if ('NOT' in condition) {\n getUniqueFieldsFromCondition(condition.NOT, uniqueFields);\n } else {\n const leaf = condition.condition;\n uniqueFields.add(leaf.lhs.field);\n if (leaf.rhs && 'field' in leaf.rhs) {\n uniqueFields.add(leaf.rhs.field);\n }\n }\n return uniqueFields;\n}\n\n/**\n * This api is used to transform the fields present in {@link condition} to a condition builder fields structure\n * @param condition\n * @param fieldDefs meta fieldDefs which needs to be transformed to condition builder fields structure\n * @returns condition builder fields structure\n */\nfunction getConditionBuilderFieldsContract(\n condition: Condition,\n fieldDefs: FieldDef[]\n): ConditionBuilderFieldsConfig {\n const uniqueFieldsInCondition = getUniqueFieldsFromCondition(condition);\n const fieldDefsForFieldInConditions = fieldDefs.filter(field =>\n uniqueFieldsInCondition.has(field.name)\n );\n const conditionBuilderFields = [] as Field[];\n const conditionBuilderFieldsTypeMap = {} as Record<string, FieldType>;\n\n fieldDefsForFieldInConditions.forEach(field => {\n const type = RsToCBFieldTypeMap[field.type.toLowerCase()] ?? 'TEXT';\n conditionBuilderFields.push({\n id: field.name ? field.name : field.label,\n primary: field.name ? field.name : field.label,\n type\n });\n conditionBuilderFieldsTypeMap[field.name] =\n RsToCBFieldTypeMap[field.type.toLowerCase()] ?? 'TEXT';\n });\n\n return { conditionBuilderFields, conditionBuilderFieldsTypeMap };\n}\n\nfunction transformConditionForDateTimeType(condition: LeafCondition, timezone: string) {\n const { rhs } = condition;\n\n if (!rhs || !('value' in rhs)) return;\n\n if ('dateFunction' in rhs && rhs.dateFunction === 'HOURS_OF_DAY') {\n rhs.value = Number(rhs.value).toString().padStart(2, '0');\n return;\n }\n // Adjusting the date inputs for timezone offset.\n // For dateFunctionsWithRhsAsDateInput(HOURS, MINUTES) a date input is present in rhs, so it also needs to be adjusted.\n if (!('dateFunction' in rhs) || DateFunctionsWithRhsAsDateInput.includes(rhs.dateFunction)) {\n const isoDateString = dayjs.tz(rhs.value, timezone).toISOString();\n rhs.value = isoDateString;\n }\n}\n\nfunction transformConditionBasedOnType(\n condition: LeafCondition,\n fieldTypeMap: Record<string, FieldType>,\n meta: Meta\n) {\n const {\n lhs: { field }\n } = condition;\n const type = fieldTypeMap[field];\n const { timezone } = meta;\n\n // For date time the rhs values need to be adjusted for timezone offset.\n if (type === 'DATE_TIME') {\n transformConditionForDateTimeType(condition, timezone!);\n }\n}\n\nfunction transformCondition(\n condition: Condition,\n meta: Meta,\n conditionBuilderFieldsConfig: ConditionBuilderFieldsConfig\n): Condition {\n const { conditionBuilderFields: fields, conditionBuilderFieldsTypeMap: fieldsTypeMap } =\n conditionBuilderFieldsConfig;\n // cspell:ignore DDTHH\n const currentDateTimeWithTimeZone = dayjs().tz(meta.timezone).format('YYYY-MM-DDTHH:mm:ss.SSS');\n\n condition = transformComplexCondition(condition, fields, currentDateTimeWithTimeZone);\n const { logic, conditions } = splitConditionTree(condition);\n\n Object.entries(conditions).forEach(([, singleCondition]) => {\n transformConditionBasedOnType(singleCondition, fieldsTypeMap, meta);\n });\n\n return (\n parseLogicString(logic, conditions) as {\n condition: Condition;\n }\n ).condition;\n}\n\n/**\n * Retrieves columns that are referenced in the given condition but are hidden.\n * @param condition - The condition\n * @param hiddenColumns - An array of hidden columns\n * @returns An array of hidden columns that are referenced in the condition.\n */\nexport const getHiddenColumnsReferredInCondition = (\n condition: Condition,\n hiddenColumns: State['hiddenColumns']\n): string[] => {\n const fields = getUniqueFieldsFromCondition(condition);\n return [...fields].filter(field => hiddenColumns?.includes(field));\n};\n\n/**\n * Evaluates whether the the `data` specified in {@link conditionConfig} satisfies the `condition`.\n * @param meta - Repeating structures meta\n * @param conditionConfig - condition config.\n * @returns true if the data satisfies condition, otherwise false.\n */\nexport default function evaluateCondition(\n meta: Meta,\n conditionConfig: { condition: Condition; data: RowData }\n): boolean {\n let { condition } = conditionConfig;\n const { data } = conditionConfig;\n const { fieldDefs } = meta;\n const { conditionBuilderFields, conditionBuilderFieldsTypeMap } =\n getConditionBuilderFieldsContract(condition, fieldDefs);\n\n // TODO: Remove this once evaluateCondition handles Timezone offset.\n condition = transformCondition(deepCopy(condition), meta, {\n conditionBuilderFields,\n conditionBuilderFieldsTypeMap\n });\n\n return evaluateConditionUtility(condition, data, conditionBuilderFields, DOT_DELIMITER);\n}\n"]}
1
+ {"version":3,"file":"condition-utils.js","sourceRoot":"","sources":["../../../../src/core/utils/condition-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,MAAM,uBAAuB,CAAC;AAC1C,OAAO,GAAG,MAAM,kBAAkB,CAAC;AAEnC,OAAO,EACL,iBAAiB,IAAI,wBAAwB,EAC7C,gBAAgB,EAChB,kBAAkB,EAClB,yBAAyB,EAK1B,MAAM,sCAAsC,CAAC;AAM9C,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAElC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACpB,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAElB,MAAM,CAAC,MAAM,kBAAkB,GAA8B;IAC3D,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,SAAS;IACjB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,WAAW;IACrB,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,WAAW;CACT,CAAC;AAE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AEH,OACE,gBAAgB,CAAC,KAAK,EAAE,UAAU,CAGnC,CAAC,SAAS,CAAC;AACd,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG,CACjD,SAAoB,EACpB,aAAqC,EAC3B,EAAE;IACZ,MAAM,MAAM,GAAG,4BAA4B,CAAC,SAAS,CAAC,CAAC;IACvD,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,aAAa,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;AACrE,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CACvC,IAAU,EACV,eAAwD;IAExD,IAAI,EAAE,SAAS,EAAE,GAAG,eAAe,CAAC;IACpC,MAAM,EAAE,IAAI,EAAE,GAAG,eAAe,CAAC;IACjC,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;IAC3B,MAAM,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,GAC7D,iCAAiC,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAE1D,oEAAoE;IACpE,SAAS,GAAG,kBAAkB,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE;QACxD,sBAAsB;QACtB,6BAA6B;KAC9B,CAAC,CAAC;IAEH,OAAO,wBAAwB,CAAC,SAAS,EAAE,IAAI,EAAE,sBAAsB,EAAE,aAAa,CAAC,CAAC;AAC1F,CAAC","sourcesContent":["import dayjs from 'dayjs';\nimport tZone from 'dayjs/plugin/timezone';\nimport utc from 'dayjs/plugin/utc';\n\nimport {\n evaluateCondition as evaluateConditionUtility,\n parseLogicString,\n splitConditionTree,\n transformComplexCondition,\n type Condition,\n type Field,\n type LeafCondition,\n type FieldType\n} from '@pega/cosmos-react-condition-builder';\n\nimport type { FieldDef, Meta } from '../../../types/Meta.types';\nimport type { RowData } from '../generators/RowGenerator.types';\nimport type { State } from '../../../types/State.types';\n\nimport { deepCopy } from './util';\n\ndayjs.extend(tZone);\ndayjs.extend(utc);\n\nexport const RsToCBFieldTypeMap: Record<string, FieldType> = {\n text: 'TEXT',\n number: 'DECIMAL',\n boolean: 'BOOLEAN',\n datetime: 'DATE_TIME',\n date: 'DATE_ONLY',\n time: 'TIME_ONLY'\n} as const;\n\nconst DateFunctionsWithRhsAsDateInput = ['HOURS', 'MINUTES'];\nconst DOT_DELIMITER = '.';\n\ntype ConditionBuilderFieldsConfig = {\n conditionBuilderFields: Field[];\n conditionBuilderFieldsTypeMap: Record<string, FieldType>;\n};\n\nfunction getUniqueFieldsFromCondition(condition: Condition, uniqueFields: Set<string> = new Set()) {\n if ('AND' in condition) {\n condition.AND.forEach(andCondition => getUniqueFieldsFromCondition(andCondition, uniqueFields));\n } else if ('OR' in condition) {\n condition.OR.forEach(orCondition => getUniqueFieldsFromCondition(orCondition, uniqueFields));\n } else if ('NOT' in condition) {\n getUniqueFieldsFromCondition(condition.NOT, uniqueFields);\n } else {\n const leaf = condition.condition;\n uniqueFields.add(leaf.lhs.field);\n if (leaf.rhs && 'field' in leaf.rhs) {\n uniqueFields.add(leaf.rhs.field);\n }\n }\n return uniqueFields;\n}\n\n/**\n * This api is used to transform the fields present in {@link condition} to a condition builder fields structure\n * @param condition\n * @param fieldDefs meta fieldDefs which needs to be transformed to condition builder fields structure\n * @returns condition builder fields structure\n */\nfunction getConditionBuilderFieldsContract(\n condition: Condition,\n fieldDefs: FieldDef[]\n): ConditionBuilderFieldsConfig {\n const uniqueFieldsInCondition = getUniqueFieldsFromCondition(condition);\n const fieldDefsForFieldInConditions = fieldDefs.filter(field =>\n uniqueFieldsInCondition.has(field.name)\n );\n const conditionBuilderFields = [] as Field[];\n const conditionBuilderFieldsTypeMap = {} as Record<string, FieldType>;\n\n fieldDefsForFieldInConditions.forEach(field => {\n const type = RsToCBFieldTypeMap[field.type.toLowerCase()] ?? 'TEXT';\n conditionBuilderFields.push({\n id: field.name ? field.name : field.label,\n primary: field.name ? field.name : field.label,\n type\n });\n conditionBuilderFieldsTypeMap[field.name] =\n RsToCBFieldTypeMap[field.type.toLowerCase()] ?? 'TEXT';\n });\n\n return { conditionBuilderFields, conditionBuilderFieldsTypeMap };\n}\n\nfunction transformConditionForDateTimeType(condition: LeafCondition, timezone: string) {\n const { rhs } = condition;\n\n if (!rhs || !('value' in rhs)) return;\n\n if ('dateFunction' in rhs && rhs.dateFunction === 'HOURS_OF_DAY') {\n rhs.value = Number(rhs.value).toString().padStart(2, '0');\n return;\n }\n // Adjusting the date inputs for timezone offset.\n // For dateFunctionsWithRhsAsDateInput(HOURS, MINUTES) a date input is present in rhs, so it also needs to be adjusted.\n if (!('dateFunction' in rhs) || DateFunctionsWithRhsAsDateInput.includes(rhs.dateFunction)) {\n const isoDateString = dayjs.tz(rhs.value, timezone).toISOString();\n rhs.value = isoDateString;\n }\n}\n\nfunction transformConditionBasedOnType(\n condition: LeafCondition,\n fieldTypeMap: Record<string, FieldType>,\n meta: Meta\n) {\n const {\n lhs: { field }\n } = condition;\n const type = fieldTypeMap[field];\n const { timezone } = meta;\n\n // For date time the rhs values need to be adjusted for timezone offset.\n if (type === 'DATE_TIME') {\n transformConditionForDateTimeType(condition, timezone!);\n }\n}\n\nfunction transformCondition(\n condition: Condition,\n meta: Meta,\n conditionBuilderFieldsConfig: ConditionBuilderFieldsConfig\n): Condition {\n const { conditionBuilderFields: fields, conditionBuilderFieldsTypeMap: fieldsTypeMap } =\n conditionBuilderFieldsConfig;\n // cspell:ignore DDTHH\n const currentDateTimeWithTimeZone = dayjs().tz(meta.timezone).format('YYYY-MM-DDTHH:mm:ss.SSS');\n\n condition = transformComplexCondition(condition, fields, true, currentDateTimeWithTimeZone);\n const { logic, conditions } = splitConditionTree(condition);\n\n Object.entries(conditions).forEach(([, singleCondition]) => {\n transformConditionBasedOnType(singleCondition, fieldsTypeMap, meta);\n });\n\n return (\n parseLogicString(logic, conditions) as {\n condition: Condition;\n }\n ).condition;\n}\n\n/**\n * Retrieves columns that are referenced in the given condition but are hidden.\n * @param condition - The condition\n * @param hiddenColumns - An array of hidden columns\n * @returns An array of hidden columns that are referenced in the condition.\n */\nexport const getHiddenColumnsReferredInCondition = (\n condition: Condition,\n hiddenColumns: State['hiddenColumns']\n): string[] => {\n const fields = getUniqueFieldsFromCondition(condition);\n return [...fields].filter(field => hiddenColumns?.includes(field));\n};\n\n/**\n * Evaluates whether the the `data` specified in {@link conditionConfig} satisfies the `condition`.\n * @param meta - Repeating structures meta\n * @param conditionConfig - condition config.\n * @returns true if the data satisfies condition, otherwise false.\n */\nexport default function evaluateCondition(\n meta: Meta,\n conditionConfig: { condition: Condition; data: RowData }\n): boolean {\n let { condition } = conditionConfig;\n const { data } = conditionConfig;\n const { fieldDefs } = meta;\n const { conditionBuilderFields, conditionBuilderFieldsTypeMap } =\n getConditionBuilderFieldsContract(condition, fieldDefs);\n\n // TODO: Remove this once evaluateCondition handles Timezone offset.\n condition = transformCondition(deepCopy(condition), meta, {\n conditionBuilderFields,\n conditionBuilderFieldsTypeMap\n });\n\n return evaluateConditionUtility(condition, data, conditionBuilderFields, DOT_DELIMITER);\n}\n"]}
@@ -11,6 +11,7 @@ import type Column from '../generators/ColumnGenerator';
11
11
  import type RsInternal from '../RsInternal';
12
12
  import type { FilterInfo, FilterInitializers, AddFilterParams, GenericObject, PassablePromise, DeepNonNullableArray, FunctionToBeMemoized, MemoizedFunction } from './util.types';
13
13
  export declare const EXCLUDED_NUMERIC_TYPES: string[];
14
+ export declare const OOTB_COLUMNS: string[];
14
15
  /**
15
16
  * Memoizes a function, returning a memoized version that caches the result based on dependencies.
16
17
  *
@@ -1 +1 @@
1
- {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../src/core/utils/util.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,aAAa,EACnB,MAAM,sCAAsC,CAAC;AAK9C,OAAoB,EAAE,KAAK,UAAU,EAAE,MAAM,4BAA4B,CAAC;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M,EAAE,aAAa,EAAE,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,GAAG,OAAO,CAU7F;AAED;;;;;;;;GAQG;AACH,wBAAgB,8BAA8B,CAC5C,aAAa,EAAE,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,EACtC,2BAA2B,EAAE,MAAM,EAAE,GACpC,OAAO,CAmBT;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,KAAK,KAAG,MAS1C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAAI,SAAS,MAAM,EAAE,QAAQ,KAAK,CAAC,QAAQ,CAAC,KAAG,KAAK,GAAG,SAIlF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,GAAI,cAAc,KAAK,CAAC,cAAc,CAAC,KAAG,OAK/E,CAAC;AAGF,eAAO,MAAM,wBAAwB,GAAI,MAAM,IAAI,KAAG,OAErD,CAAC;AAGF,eAAO,MAAM,sBAAsB,GAAI,MAAM,IAAI,KAAG,OAEnD,CAAC;AAeF;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,GACrC,QAAQ,MAAM,EACd,YAAY,UAAU,KACrB,WAAW,GAAG,SAoBhB,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,MAAM,IAAI,KAAG,OAQpD,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,MAAM,IAAI,KAAG,OAO9C,CAAC"}
@@ -2,10 +2,16 @@ import fastDeepEqual from 'fast-deep-equal/es6';
2
2
  import { splitConditionTree } from '@pega/cosmos-react-condition-builder';
3
3
  import { hasProp } from '@pega/cosmos-react-core';
4
4
  import { filterParams, comparatorMap } from '../config/filterConfig';
5
- import { EXTERNAL_FILTERS, rowDragDropColumnMeta, SELECTION_MODES, TEMPLATES } from '../constants';
5
+ import { EXTERNAL_FILTERS, rowActionColumnMeta, rowDragDropColumnMeta, rowErrorColumnMeta, rowSelectColumnMeta, SELECTION_MODES, TEMPLATES } from '../constants';
6
6
  import ActionTypes, {} from '../actions/actionConstants';
7
7
  import evaluateConditionLocally from './condition-utils';
8
8
  export const EXCLUDED_NUMERIC_TYPES = ['Currency'];
9
+ export const OOTB_COLUMNS = [
10
+ rowDragDropColumnMeta.field.id,
11
+ rowErrorColumnMeta.field.id,
12
+ rowActionColumnMeta.field.id,
13
+ rowSelectColumnMeta.field.id
14
+ ];
9
15
  const groupBySeparator = '||'; // To avoid any ambiguities
10
16
  /**
11
17
  * Creates an object mapping for each property in `propertiesArr` to a boolean flag indicating whether the feature is enabled.