@pega/lists-core 9.0.0-build.2.9 → 9.0.0-build.20.1

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 (169) 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 +6 -2
  7. package/lib/src/core/StateResolver.js.map +1 -1
  8. package/lib/src/core/a11y/BaseA11y.d.ts +11 -0
  9. package/lib/src/core/a11y/BaseA11y.d.ts.map +1 -1
  10. package/lib/src/core/a11y/BaseA11y.js +17 -0
  11. package/lib/src/core/a11y/BaseA11y.js.map +1 -1
  12. package/lib/src/core/actions/actionConstants.d.ts +1 -3
  13. package/lib/src/core/actions/actionConstants.d.ts.map +1 -1
  14. package/lib/src/core/actions/actionConstants.js +1 -3
  15. package/lib/src/core/actions/actionConstants.js.map +1 -1
  16. package/lib/src/core/actions/actions.d.ts +6 -18
  17. package/lib/src/core/actions/actions.d.ts.map +1 -1
  18. package/lib/src/core/actions/actions.js +7 -25
  19. package/lib/src/core/actions/actions.js.map +1 -1
  20. package/lib/src/core/actions/actions.types.d.ts +8 -17
  21. package/lib/src/core/actions/actions.types.d.ts.map +1 -1
  22. package/lib/src/core/actions/actions.types.js.map +1 -1
  23. package/lib/src/core/config/config.d.ts.map +1 -1
  24. package/lib/src/core/config/config.js +2 -1
  25. package/lib/src/core/config/config.js.map +1 -1
  26. package/lib/src/core/constants.d.ts +11 -101
  27. package/lib/src/core/constants.d.ts.map +1 -1
  28. package/lib/src/core/constants.js +8 -8
  29. package/lib/src/core/constants.js.map +1 -1
  30. package/lib/src/core/defaultTranslations.d.ts +6 -1
  31. package/lib/src/core/defaultTranslations.d.ts.map +1 -1
  32. package/lib/src/core/defaultTranslations.js +6 -1
  33. package/lib/src/core/defaultTranslations.js.map +1 -1
  34. package/lib/src/core/features/featureFactory.d.ts +1 -1
  35. package/lib/src/core/features/featureFactory.d.ts.map +1 -1
  36. package/lib/src/core/features/featureFactory.js +0 -2
  37. package/lib/src/core/features/featureFactory.js.map +1 -1
  38. package/lib/src/core/features/uIFeatures/afterRender/animation.d.ts.map +1 -1
  39. package/lib/src/core/features/uIFeatures/afterRender/animation.js +6 -0
  40. package/lib/src/core/features/uIFeatures/afterRender/animation.js.map +1 -1
  41. package/lib/src/core/features/uIFeatures/afterRender/columnSizing/autoSize.d.ts +2 -16
  42. package/lib/src/core/features/uIFeatures/afterRender/columnSizing/autoSize.d.ts.map +1 -1
  43. package/lib/src/core/features/uIFeatures/afterRender/columnSizing/autoSize.js +45 -81
  44. package/lib/src/core/features/uIFeatures/afterRender/columnSizing/autoSize.js.map +1 -1
  45. package/lib/src/core/features/uIFeatures/afterRender/columnSizing/index.d.ts.map +1 -1
  46. package/lib/src/core/features/uIFeatures/afterRender/columnSizing/index.js +13 -1
  47. package/lib/src/core/features/uIFeatures/afterRender/columnSizing/index.js.map +1 -1
  48. package/lib/src/core/features/uIFeatures/beforeRender/aggregation.d.ts +1 -0
  49. package/lib/src/core/features/uIFeatures/beforeRender/aggregation.d.ts.map +1 -1
  50. package/lib/src/core/features/uIFeatures/beforeRender/aggregation.js +3 -1
  51. package/lib/src/core/features/uIFeatures/beforeRender/aggregation.js.map +1 -1
  52. package/lib/src/core/features/uIFeatures/beforeRender/busyIndicator.d.ts +1 -0
  53. package/lib/src/core/features/uIFeatures/beforeRender/busyIndicator.d.ts.map +1 -1
  54. package/lib/src/core/features/uIFeatures/beforeRender/busyIndicator.js +3 -1
  55. package/lib/src/core/features/uIFeatures/beforeRender/busyIndicator.js.map +1 -1
  56. package/lib/src/core/features/uIFeatures/beforeRender/columnFormatter.d.ts.map +1 -1
  57. package/lib/src/core/features/uIFeatures/beforeRender/columnFormatter.js +5 -4
  58. package/lib/src/core/features/uIFeatures/beforeRender/columnFormatter.js.map +1 -1
  59. package/lib/src/core/features/uIFeatures/beforeRender/columnReOrder.d.ts.map +1 -1
  60. package/lib/src/core/features/uIFeatures/beforeRender/columnReOrder.js +2 -3
  61. package/lib/src/core/features/uIFeatures/beforeRender/columnReOrder.js.map +1 -1
  62. package/lib/src/core/features/uIFeatures/beforeRender/columnSizing/resize.d.ts +2 -4
  63. package/lib/src/core/features/uIFeatures/beforeRender/columnSizing/resize.d.ts.map +1 -1
  64. package/lib/src/core/features/uIFeatures/beforeRender/columnSizing/resize.js +47 -29
  65. package/lib/src/core/features/uIFeatures/beforeRender/columnSizing/resize.js.map +1 -1
  66. package/lib/src/core/features/uIFeatures/beforeRender/columnToggle.d.ts +1 -1
  67. package/lib/src/core/features/uIFeatures/beforeRender/columnToggle.d.ts.map +1 -1
  68. package/lib/src/core/features/uIFeatures/beforeRender/columnToggle.js +6 -1
  69. package/lib/src/core/features/uIFeatures/beforeRender/columnToggle.js.map +1 -1
  70. package/lib/src/core/features/uIFeatures/beforeRender/grouping.d.ts.map +1 -1
  71. package/lib/src/core/features/uIFeatures/beforeRender/grouping.js +28 -30
  72. package/lib/src/core/features/uIFeatures/beforeRender/grouping.js.map +1 -1
  73. package/lib/src/core/features/uIFeatures/beforeRender/prepareColumns.d.ts +2 -0
  74. package/lib/src/core/features/uIFeatures/beforeRender/prepareColumns.d.ts.map +1 -1
  75. package/lib/src/core/features/uIFeatures/beforeRender/prepareColumns.js +32 -5
  76. package/lib/src/core/features/uIFeatures/beforeRender/prepareColumns.js.map +1 -1
  77. package/lib/src/core/features/uIFeatures/beforeRender/rowDragDrop.d.ts.map +1 -1
  78. package/lib/src/core/features/uIFeatures/beforeRender/rowDragDrop.js +11 -3
  79. package/lib/src/core/features/uIFeatures/beforeRender/rowDragDrop.js.map +1 -1
  80. package/lib/src/core/features/uIFeatures/beforeRender/rowHeight.d.ts.map +1 -1
  81. package/lib/src/core/features/uIFeatures/beforeRender/rowHeight.js +4 -0
  82. package/lib/src/core/features/uIFeatures/beforeRender/rowHeight.js.map +1 -1
  83. package/lib/src/core/features/uIFeatures/beforeRender/stateHydration.d.ts.map +1 -1
  84. package/lib/src/core/features/uIFeatures/beforeRender/stateHydration.js +2 -1
  85. package/lib/src/core/features/uIFeatures/beforeRender/stateHydration.js.map +1 -1
  86. package/lib/src/core/features/uIFeatures/beforeRender/stateSanitization.d.ts.map +1 -1
  87. package/lib/src/core/features/uIFeatures/beforeRender/stateSanitization.js +53 -14
  88. package/lib/src/core/features/uIFeatures/beforeRender/stateSanitization.js.map +1 -1
  89. package/lib/src/core/features/uIFeatures/index.d.ts +0 -3
  90. package/lib/src/core/features/uIFeatures/index.d.ts.map +1 -1
  91. package/lib/src/core/features/uIFeatures/index.js +0 -4
  92. package/lib/src/core/features/uIFeatures/index.js.map +1 -1
  93. package/lib/src/core/generators/ColumnGenerator.d.ts +14 -19
  94. package/lib/src/core/generators/ColumnGenerator.d.ts.map +1 -1
  95. package/lib/src/core/generators/ColumnGenerator.js +28 -88
  96. package/lib/src/core/generators/ColumnGenerator.js.map +1 -1
  97. package/lib/src/core/generators/ColumnGenerator.types.d.ts +17 -14
  98. package/lib/src/core/generators/ColumnGenerator.types.d.ts.map +1 -1
  99. package/lib/src/core/generators/ColumnGenerator.types.js.map +1 -1
  100. package/lib/src/core/generators/GroupGenerator.d.ts +8 -1
  101. package/lib/src/core/generators/GroupGenerator.d.ts.map +1 -1
  102. package/lib/src/core/generators/GroupGenerator.js +24 -1
  103. package/lib/src/core/generators/GroupGenerator.js.map +1 -1
  104. package/lib/src/core/generators/RowGenerator.d.ts +1 -1
  105. package/lib/src/core/generators/RowGenerator.d.ts.map +1 -1
  106. package/lib/src/core/generators/RowGenerator.js +1 -1
  107. package/lib/src/core/generators/RowGenerator.js.map +1 -1
  108. package/lib/src/core/generators/RowGenerator.types.d.ts +2 -1
  109. package/lib/src/core/generators/RowGenerator.types.d.ts.map +1 -1
  110. package/lib/src/core/generators/RowGenerator.types.js.map +1 -1
  111. package/lib/src/core/generators/ViewGenerator.d.ts +6 -1
  112. package/lib/src/core/generators/ViewGenerator.d.ts.map +1 -1
  113. package/lib/src/core/generators/ViewGenerator.js +33 -8
  114. package/lib/src/core/generators/ViewGenerator.js.map +1 -1
  115. package/lib/src/core/generators/ViewGenerator.types.d.ts +3 -1
  116. package/lib/src/core/generators/ViewGenerator.types.d.ts.map +1 -1
  117. package/lib/src/core/generators/ViewGenerator.types.js.map +1 -1
  118. package/lib/src/core/generators/viewUtilityMethods.d.ts.map +1 -1
  119. package/lib/src/core/generators/viewUtilityMethods.js +6 -3
  120. package/lib/src/core/generators/viewUtilityMethods.js.map +1 -1
  121. package/lib/src/core/reducers/error.d.ts +4 -3
  122. package/lib/src/core/reducers/error.d.ts.map +1 -1
  123. package/lib/src/core/reducers/index.d.ts +4 -3
  124. package/lib/src/core/reducers/index.d.ts.map +1 -1
  125. package/lib/src/core/reducers/index.js +0 -2
  126. package/lib/src/core/reducers/index.js.map +1 -1
  127. package/lib/src/core/reducers/personalizationReducer.d.ts +1 -1
  128. package/lib/src/core/reducers/renderFormatter.d.ts.map +1 -1
  129. package/lib/src/core/reducers/renderFormatter.js +13 -3
  130. package/lib/src/core/reducers/renderFormatter.js.map +1 -1
  131. package/lib/src/core/test/junitMocks.d.ts +12 -0
  132. package/lib/src/core/test/junitMocks.d.ts.map +1 -1
  133. package/lib/src/core/test/junitMocks.js +15 -40
  134. package/lib/src/core/test/junitMocks.js.map +1 -1
  135. package/lib/src/core/utils/condition-utils.js +1 -1
  136. package/lib/src/core/utils/condition-utils.js.map +1 -1
  137. package/lib/src/core/utils/util.d.ts +3 -7
  138. package/lib/src/core/utils/util.d.ts.map +1 -1
  139. package/lib/src/core/utils/util.js +36 -15
  140. package/lib/src/core/utils/util.js.map +1 -1
  141. package/lib/types/ApiContext.types.d.ts +82 -6
  142. package/lib/types/ApiContext.types.d.ts.map +1 -1
  143. package/lib/types/ApiContext.types.js.map +1 -1
  144. package/lib/types/Meta.types.d.ts +101 -12
  145. package/lib/types/Meta.types.d.ts.map +1 -1
  146. package/lib/types/Meta.types.js +5 -1
  147. package/lib/types/Meta.types.js.map +1 -1
  148. package/lib/types/RsCoreBootArgs.types.d.ts +11 -0
  149. package/lib/types/RsCoreBootArgs.types.d.ts.map +1 -1
  150. package/lib/types/RsCoreBootArgs.types.js.map +1 -1
  151. package/lib/types/State.types.d.ts +27 -25
  152. package/lib/types/State.types.d.ts.map +1 -1
  153. package/lib/types/State.types.js.map +1 -1
  154. package/lib/types.d.ts +9 -2
  155. package/lib/types.d.ts.map +1 -1
  156. package/lib/types.js.map +1 -1
  157. package/package.json +6 -7
  158. package/lib/src/core/features/uIFeatures/beforeRender/edit.d.ts +0 -12
  159. package/lib/src/core/features/uIFeatures/beforeRender/edit.d.ts.map +0 -1
  160. package/lib/src/core/features/uIFeatures/beforeRender/edit.js +0 -94
  161. package/lib/src/core/features/uIFeatures/beforeRender/edit.js.map +0 -1
  162. package/lib/src/core/features/uIFeatures/beforeRender/resizeGroupedDragDropColumn.d.ts +0 -7
  163. package/lib/src/core/features/uIFeatures/beforeRender/resizeGroupedDragDropColumn.d.ts.map +0 -1
  164. package/lib/src/core/features/uIFeatures/beforeRender/resizeGroupedDragDropColumn.js +0 -24
  165. package/lib/src/core/features/uIFeatures/beforeRender/resizeGroupedDragDropColumn.js.map +0 -1
  166. package/lib/src/core/reducers/edit.d.ts +0 -5
  167. package/lib/src/core/reducers/edit.d.ts.map +0 -1
  168. package/lib/src/core/reducers/edit.js +0 -65
  169. package/lib/src/core/reducers/edit.js.map +0 -1
@@ -5,7 +5,7 @@ import type { Sort, AggregationType } from '../../../types/State.types';
5
5
  import type RsProps from '../RsProps';
6
6
  import type RsInternal from '../RsInternal';
7
7
  import type Row from './RowGenerator';
8
- import { type ColumnConfig, type ColumnResizerProps, type ColumnStyle, type SortProperties, type ColumnContext, type ColumnRenderingEngineProps } from './ColumnGenerator.types';
8
+ import type { ColumnConfig, ColumnResizerProps, ColumnStyle, SortProperties, ColumnContext, ColumnRenderingEngineProps } from './ColumnGenerator.types';
9
9
  import type { RowContext, RowData } from './RowGenerator.types';
10
10
  import type { FormatterFunction } from './ViewGenerator.types';
11
11
  export default class Column {
@@ -53,8 +53,11 @@ export default class Column {
53
53
  */
54
54
  formatterAllowed: boolean;
55
55
  /** Indicates the current formatter applied to the column. */
56
- formatterName?: string;
57
- /** The formatter function corresponding toe the {@link formatterName}. */
56
+ formatterConfig?: string | {
57
+ type: string;
58
+ config: unknown;
59
+ };
60
+ /** The formatter function corresponding to the {@link formatterConfig}. */
58
61
  formatter?: FormatterFunction;
59
62
  /** The name of the renderer for this cell. */
60
63
  cellRenderer?: string;
@@ -79,8 +82,6 @@ export default class Column {
79
82
  /** Indicates if the column is a custom column derived from Customize column feature.
80
83
  * E.g. column generated by joining 2 columns. */
81
84
  isCustomColumn: boolean;
82
- /** Indicates if the column is in edit mode. */
83
- editMode: boolean;
84
85
  /** Visual order of the column with respect to other columns */
85
86
  order?: number;
86
87
  /** CSS classes for the column.
@@ -144,7 +145,7 @@ export default class Column {
144
145
  * Returns the formatters available for the current column from
145
146
  * {@link RsProps.renderFormatterTypeMap renderFormatterTypeMap} based on its {@link FieldDef.type type}
146
147
  */
147
- getRenderFormatters(): import("../../../types/RsCoreBootArgs.types").RenderFormatterType[] | undefined;
148
+ getRenderFormatters(): import("../../../types/RsCoreBootArgs.types").RenderFormatterType[];
148
149
  /** Returns the sorting information for the current column. */
149
150
  getSortProperties(): {
150
151
  sorted: boolean;
@@ -167,8 +168,6 @@ export default class Column {
167
168
  width: `${number}px`;
168
169
  };
169
170
  'data-col-id': string;
170
- onDoubleClick: ((e: KeyboardEvent | MouseEvent) => void) | null;
171
- onKeyDown: ((e: KeyboardEvent | MouseEvent) => void) | null;
172
171
  classList: string[];
173
172
  'aria-colindex': number;
174
173
  role: string;
@@ -199,21 +198,12 @@ export default class Column {
199
198
  * Sets the current execution context, {@link RowContext}, when rendering a cell for this column.
200
199
  * This dynamic context is updated for each cell in the column as it is rendered.
201
200
  */
202
- setExecutionContext(row: Row): void;
201
+ setExecutionContext(row: Row | null): void;
203
202
  /**
204
203
  * Retrieves the current execution context, i.e., {@link RowContext}, when rendering a cell for this column.
205
204
  * This context dynamically updates as each cell in the column is rendered.
206
205
  */
207
206
  getExecutionContext(): RowContext | null;
208
- /**
209
- * Sets the {@link Column.executionContext execution context} to the row of the cell being edited.
210
- * It relies on the editInfo state to identify the cell being edited.
211
- */
212
- setEditContext(): void;
213
- /**
214
- * Checks whether any value cell in this column is currently in edit mode.
215
- */
216
- isCellInEditMode(): boolean | null;
217
207
  /**
218
208
  * Returns the current column {@link ColumnContext context}.
219
209
  * @param overriddenExecutionContext - optional param to override the execution context with custom {@link RowContext}.
@@ -292,7 +282,12 @@ export default class Column {
292
282
  * Dispatches an action that updates {@link State.renderFormatter renderFormatter} in the state.
293
283
  * @param name - Formatter name.
294
284
  */
295
- applyFormatter(name: NonNullable<Column['formatterName']>): void;
285
+ applyFormatter(config: NonNullable<Column['formatterConfig']>): void;
286
+ /** Removes formatter of the current column.
287
+ *
288
+ * Dispatches an action that updates {@link State.renderFormatter renderFormatter} in the state.
289
+ */
290
+ removeFormatter(): void;
296
291
  /**
297
292
  * Applies {@link mode displayMode} to hierarchical column.
298
293
  *
@@ -1 +1 @@
1
- {"version":3,"file":"ColumnGenerator.d.ts","sourceRoot":"","sources":["../../../../src/core/generators/ColumnGenerator.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAEtE,OAAO,KAAK,EACV,sBAAsB,EACtB,QAAQ,EACR,IAAI,EACJ,WAAW,EACZ,MAAM,2BAA2B,CAAC;AAEnC,OAAO,KAAK,EAAgB,IAAI,EAAE,eAAe,EAAY,MAAM,4BAA4B,CAAC;AAIhG,OAAO,KAAK,OAAO,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,UAAU,MAAM,eAAe,C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AW,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAS9C;;;;OAIG;IACH,cAAc,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAS7D;;;OAGG;IACH,eAAe;IAQf;;;;;;OAMG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM;IAezB;;;;;;;;OAQG;IACH,UAAU,CACR,SAAS,EAAE,MAAM,GAAG,OAAO,EAC3B,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,WAAW,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,EACzE,YAAY,EAAE,OAAO;IAgBvB;;;;OAIG;IACH,kBAAkB;IAQlB;;;;OAIG;IAEH,mBAAmB;IAInB;;OAEG;IACH,IAAI,aAAa,wBAEhB;IAED;;OAEG;IACH,iBAAiB;IAOjB;;;;;;OAMG;IAEH,oBAAoB;CAUrB"}
@@ -1,8 +1,7 @@
1
- import get from 'lodash.get';
1
+ import get from 'lodash-es/get';
2
2
  import { compareObjects, evaluateStyleFormatForCell } from '../utils/util';
3
3
  import * as actions from '../actions/actions';
4
4
  import { RICH_TEXT } from '../constants';
5
- import { DATA_KEY } from './ColumnGenerator.types';
6
5
  export default class Column {
7
6
  /** Reference to repeating structure props. */
8
7
  #rsProps;
@@ -55,8 +54,8 @@ export default class Column {
55
54
  */
56
55
  formatterAllowed = true;
57
56
  /** Indicates the current formatter applied to the column. */
58
- formatterName;
59
- /** The formatter function corresponding toe the {@link formatterName}. */
57
+ formatterConfig;
58
+ /** The formatter function corresponding to the {@link formatterConfig}. */
60
59
  formatter;
61
60
  /** The name of the renderer for this cell. */
62
61
  cellRenderer;
@@ -81,8 +80,6 @@ export default class Column {
81
80
  /** Indicates if the column is a custom column derived from Customize column feature.
82
81
  * E.g. column generated by joining 2 columns. */
83
82
  isCustomColumn = false;
84
- /** Indicates if the column is in edit mode. */
85
- editMode = false;
86
83
  /** Visual order of the column with respect to other columns */
87
84
  order;
88
85
  /** CSS classes for the column.
@@ -129,7 +126,7 @@ export default class Column {
129
126
  * @param rsInternal A reference to rsInternal object.
130
127
  */
131
128
  constructor(config, rsInternal) {
132
- const { aggregateValue, aggregationType, currentWidth, field, formatterName, formatter, cellRenderer, label, alias, categorizedHeaderLabel, sortSequence, sortOrder, order, displayMode, disableSelection, filtered = false, formatterAllowed = true, hidden = false, style = {}, grouped = false, frozen = false, lastFrozen = false, aggregated = false, sorted = false, isFirstVisualColumn = false, isFirstDataColumn = false, isLastColumn = false, isCustomColumn = false, editMode = false, classList = [], showHeaderIcons = false, showTooltip = !!(field.showTooltip === undefined ? true : field.showTooltip), isWidthChanged = false, refresh, conditionalStyleFormats } = config;
129
+ const { aggregateValue, aggregationType, currentWidth, field, formatterConfig, formatter, cellRenderer, label, alias, categorizedHeaderLabel, sortSequence, sortOrder, order, displayMode, disableSelection, filtered = false, formatterAllowed = true, hidden = false, style = {}, grouped = false, frozen = false, lastFrozen = false, aggregated = false, sorted = false, isFirstVisualColumn = false, isFirstDataColumn = false, isLastColumn = false, isCustomColumn = false, classList = [], showHeaderIcons = false, showTooltip = !!(field.showTooltip === undefined ? true : field.showTooltip), isWidthChanged = false, refresh, conditionalStyleFormats } = config;
133
130
  const { getRsStore, getRsProps, getRsStateResolver } = rsInternal;
134
131
  const rsStore = getRsStore();
135
132
  const rsProps = getRsProps();
@@ -155,7 +152,7 @@ export default class Column {
155
152
  this.currentWidth = currentWidth;
156
153
  this.field = field;
157
154
  this.formatterAllowed = formatterAllowed;
158
- this.formatterName = formatterName;
155
+ this.formatterConfig = formatterConfig;
159
156
  this.formatter = formatter;
160
157
  this.cellRenderer = cellRenderer;
161
158
  this.hidden = hidden;
@@ -167,7 +164,6 @@ export default class Column {
167
164
  this.isFirstDataColumn = isFirstDataColumn;
168
165
  this.isLastColumn = isLastColumn;
169
166
  this.isCustomColumn = isCustomColumn;
170
- this.editMode = editMode;
171
167
  this.order = order;
172
168
  this.classList = classList;
173
169
  this.showHeaderIcons = showHeaderIcons;
@@ -197,8 +193,6 @@ export default class Column {
197
193
  this.getExecutionContext = this.getExecutionContext.bind(this);
198
194
  this.getContext = this.getContext.bind(this);
199
195
  this.getExpression = this.getExpression.bind(this);
200
- this.setEditContext = this.setEditContext.bind(this);
201
- this.isCellInEditMode = this.isCellInEditMode.bind(this);
202
196
  // All action APIs supported on instance
203
197
  this.applyGrouping = this.applyGrouping.bind(this);
204
198
  this.applySorting = this.applySorting.bind(this);
@@ -208,6 +202,7 @@ export default class Column {
208
202
  this.applyAggregation = this.applyAggregation.bind(this);
209
203
  this.applyLabel = this.applyLabel.bind(this);
210
204
  this.applyFormatter = this.applyFormatter.bind(this);
205
+ this.removeFormatter = this.removeFormatter.bind(this);
211
206
  this.applyMerge = this.applyMerge.bind(this);
212
207
  this.deleteCustomColumn = this.deleteCustomColumn.bind(this);
213
208
  this.applyColumnAutoSize = this.applyColumnAutoSize.bind(this);
@@ -246,7 +241,7 @@ export default class Column {
246
241
  frozen: this.frozen,
247
242
  lastFrozen: this.lastFrozen,
248
243
  formatterAllowed: this.formatterAllowed,
249
- formatterName: this.formatterName,
244
+ formatterConfig: this.formatterConfig,
250
245
  formatter: this.formatter,
251
246
  hidden: this.hidden,
252
247
  label: this.label,
@@ -260,7 +255,6 @@ export default class Column {
260
255
  isFirstVisualColumn: this.isFirstVisualColumn,
261
256
  isFirstDataColumn: this.isFirstDataColumn,
262
257
  isLastColumn: this.isLastColumn,
263
- editMode: this.editMode,
264
258
  order: this.order,
265
259
  classList: this.classList,
266
260
  showHeaderIcons: this.showHeaderIcons,
@@ -275,7 +269,7 @@ export default class Column {
275
269
  * Indicates if tooltip needs to be shown or not for the current column cells.
276
270
  */
277
271
  get showTooltip() {
278
- return this.#showToolTip && this.cellRenderer !== RICH_TEXT && !this.isCellInEditMode();
272
+ return this.#showToolTip && this.cellRenderer !== RICH_TEXT;
279
273
  }
280
274
  /**
281
275
  * Sets the showTooltip flag for the current column.
@@ -299,7 +293,8 @@ export default class Column {
299
293
  * {@link RsProps.renderFormatterTypeMap renderFormatterTypeMap} based on its {@link FieldDef.type type}
300
294
  */
301
295
  getRenderFormatters() {
302
- return this.parent.renderFormatterTypeMap?.[this.field.type];
296
+ const formattersForType = this.parent.renderFormatterTypeMap?.[this.field.type] || [];
297
+ return this.field.formatters ?? formattersForType;
303
298
  }
304
299
  /** Returns the sorting information for the current column. */
305
300
  getSortProperties() {
@@ -320,27 +315,11 @@ export default class Column {
320
315
  * Retrieves the UI properties for the column, which can be applied to value cells within this column.
321
316
  */
322
317
  getUIProps() {
323
- const editHandler = (e) => {
324
- if (!this.isCellInEditMode() &&
325
- (e.type === 'dblclick' || (e.type === 'keydown' && e.keyCode === 13))) {
326
- this.setProp('editMode', true);
327
- const row = e.target.closest('[role="row"]');
328
- if (row)
329
- this.#dispatch(actions.actionEditCell({
330
- rowId: row.dataset.key,
331
- colId: this.field.id
332
- }));
333
- }
334
- };
335
318
  // FIXME: aria-colIndex is NaN sometimes
336
319
  return {
337
320
  style: { ...this.style },
338
321
  'data-col-id': this.field.id,
339
- onDoubleClick: this.field.editable ? editHandler : null,
340
- onKeyDown: this.field.editable ? editHandler : null,
341
- classList: this.isCellInEditMode()
342
- ? [...this.classList, 'editable-cell']
343
- : [...this.classList],
322
+ classList: [...this.classList],
344
323
  'aria-colindex': this.order + 1,
345
324
  role: this.field.isRowHeader ? 'rowheader' : 'gridcell'
346
325
  };
@@ -382,7 +361,7 @@ export default class Column {
382
361
  */
383
362
  setExecutionContext(row) {
384
363
  this.#pRow = row;
385
- this.#executionContext = row?.getContext();
364
+ this.#executionContext = row ? row.getContext() : null;
386
365
  }
387
366
  /**
388
367
  * Retrieves the current execution context, i.e., {@link RowContext}, when rendering a cell for this column.
@@ -391,25 +370,6 @@ export default class Column {
391
370
  getExecutionContext() {
392
371
  return this.#executionContext;
393
372
  }
394
- /**
395
- * Sets the {@link Column.executionContext execution context} to the row of the cell being edited.
396
- * It relies on the editInfo state to identify the cell being edited.
397
- */
398
- setEditContext() {
399
- const editedRow = this.parent.rows?.find(r => r[DATA_KEY] === this.parent?.state?.editInfo?.rowId);
400
- if (editedRow) {
401
- this.setExecutionContext(editedRow);
402
- }
403
- }
404
- /**
405
- * Checks whether any value cell in this column is currently in edit mode.
406
- */
407
- isCellInEditMode() {
408
- return (this.editMode &&
409
- this.field.id === this.parent?.state?.editInfo?.colId &&
410
- this.#pRow && // Checking if context is set properly to avoid undefined === undefined
411
- this.#pRow[DATA_KEY] === this.parent?.state?.editInfo?.rowId);
412
- }
413
373
  /**
414
374
  * Returns the current column {@link ColumnContext context}.
415
375
  * @param overriddenExecutionContext - optional param to override the execution context with custom {@link RowContext}.
@@ -418,9 +378,6 @@ export default class Column {
418
378
  * @public
419
379
  */
420
380
  getContext(overriddenExecutionContext) {
421
- const applyEdit = (payload) => {
422
- this.#dispatch(actions.actionEditCell({ ...payload, colId: this.field.id }));
423
- };
424
381
  return {
425
382
  name: 'column',
426
383
  getField: () => this.field,
@@ -430,7 +387,7 @@ export default class Column {
430
387
  getFormatter: () => this.formatter,
431
388
  formatterAllowed: () => this.formatterAllowed,
432
389
  getCellRenderer: () => this.cellRenderer,
433
- getFormatterName: () => this.formatterName,
390
+ getFormatterValue: () => this.formatterConfig,
434
391
  getFormattedValue: () => this.formattedValue,
435
392
  getSearchKeyword: () => this.parent?.state?.searchText,
436
393
  showTooltip: () => this.showTooltip,
@@ -441,6 +398,8 @@ export default class Column {
441
398
  }
442
399
  return (overriddenExecutionContext || this.#executionContext)?.getValue?.()?.[tooltip];
443
400
  },
401
+ /** Returns the header label */
402
+ getLabel: () => this.categorizedHeaderLabel,
444
403
  setProp: (prop, value) => this.setPropMutatively(prop, value),
445
404
  getSortProperties: this.getSortProperties,
446
405
  getExpression: this.getExpression,
@@ -455,39 +414,11 @@ export default class Column {
455
414
  applyAggregation: this.applyAggregation,
456
415
  applyLabel: this.applyLabel,
457
416
  applyFormatter: this.applyFormatter,
417
+ removeFormatter: this.removeFormatter,
458
418
  applyMerge: this.applyMerge,
459
419
  deleteCustomColumn: this.deleteCustomColumn,
460
- setEditContext: this.setEditContext,
461
420
  getRendererType: () => {
462
- // TODO: Need to revisit this . Why to have different renderer type. Doing this to keep contract same with nebula render factory.
463
- if (this.isCellInEditMode())
464
- return 'cellEditRenderer';
465
- if (this.isCustomColumn)
466
- return 'customCellRenderer';
467
- return 'cellRenderer';
468
- },
469
- onSubmit: (editContext = {}) => {
470
- const { oldValue, newValue } = editContext;
471
- if (oldValue !== newValue) {
472
- // dispatch actions (Cell_editing, submit) with data
473
- this.setEditContext(); /* Set the correct context from state before applying any actions */
474
- if (this.#pRow) {
475
- const payload = {
476
- newValue,
477
- name: this.field.name,
478
- key: this.#pRow.key,
479
- oldValue: this.getContext().getValue()
480
- };
481
- this.#dispatch(actions.actionUpdateChangeSet({ ...payload, status: 'pending' }));
482
- this.#dispatch(actions.actionSubmitChangeSet({ ...payload, status: 'inProgress' }));
483
- }
484
- }
485
- this.setProp('editMode', false);
486
- applyEdit({});
487
- },
488
- onCancel: () => {
489
- this.setProp('editMode', false);
490
- applyEdit({});
421
+ return this.isCustomColumn ? 'customCellRenderer' : 'cellRenderer';
491
422
  },
492
423
  selectAllRows: this.parent.type.selectAllRows,
493
424
  getDisableSelection: () => this.disableSelection
@@ -620,10 +551,19 @@ export default class Column {
620
551
  * Dispatches an action that updates {@link State.renderFormatter renderFormatter} in the state.
621
552
  * @param name - Formatter name.
622
553
  */
623
- applyFormatter(name) {
554
+ applyFormatter(config) {
624
555
  this.#dispatch(actions.actionUpdateRenderFormatter({
625
556
  columnId: this.field.id,
626
- name
557
+ formatter: config
558
+ }));
559
+ }
560
+ /** Removes formatter of the current column.
561
+ *
562
+ * Dispatches an action that updates {@link State.renderFormatter renderFormatter} in the state.
563
+ */
564
+ removeFormatter() {
565
+ this.#dispatch(actions.actionRemoveRenderFormatter({
566
+ columnId: this.field.id
627
567
  }));
628
568
  }
629
569
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ColumnGenerator.js","sourceRoot":"","sources":["../../../../src/core/generators/ColumnGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,YAAY,CAAC;AAa7B,OAAO,EAAE,cAAc,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AASzC,OAAO,EACL,QAAQ,EAOT,MAAM,yBAAyB,CAAC;AAIjC,MAAM,CAAC,OAAO,OAAO,MAAM;IACzB,8CAA8C;IAC9C,QAAQ,CAAU;IAClB,8CAA8C;IAC9C,QAAQ,CAAU;IAClB,uCAAuC;IACvC,WAAW,CAAa;IACxB,MAAM;IACN,SAAS,CAA4B;IACrC,gEAAgE;IAChE,KAAK,GAAG,EAAiB,CAAC;IAC1B;;OAEG;IACH,OAAO,GAAG,KAAK,CAAC;IAChB;;OAEG;IACH,MAAM,GAAG,KAAK,CAAC;IACf;;OAEG;IACH,QAAQ,GAAG,KAAK,CAAC;IACjB;;OAEG;IACH,MAAM,GAAG,KAAK,CAAC;IACf,4EAA4E;IAC5E,YAAY,CAAkC;IAC9C,yEAAyE;IACzE,SAAS,CAA+B;IACxC;;OAEG;IACH,UAAU,GAAG,KAAK,CAAC;IACnB;;OAEG;IACH,UAAU,GAAG,KAAK,CAAC;IACnB,oHAAoH;IACpH,cAAc,CAAU;IACxB,sDAAsD;IACtD,eAAe,CAAmB;IAClC,iDAAiD;IACjD,YAAY,CAAU;IACtB,6EAA6E;IAC7E,KAAK,CAAW;IAChB;;OAEG;IACH,gBAAgB,GAAG,IAAI,CAAC;IACxB,6DAA6D;IAC7D,aAAa,CAAU;IACvB,0EAA0E;IAC1E,SAAS,CAAqB;IAC9B,8CAA8C;IAC9C,YAAY,CAAU;IACtB;;OAEG;IACH,MAAM,GAAG,KAAK,CAAC;IACf,8DAA8D;IAC9D,KAAK,CAAU;IACf,4GAA4G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KAAK,CAAC,EAAE,CAAC,CAAC;IACvC,CAAC;CACF","sourcesContent":["import get from 'lodash.get';\n\nimport type { ExcludeStrict, OmitStrict } from '@pega/cosmos-react-core';\nimport type { Condition } from '@pega/cosmos-react-condition-builder';\n\nimport type {\n ConditionalStyleFormat,\n FieldDef,\n Meta,\n StyleFormat\n} from '../../../types/Meta.types';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { State, Group, Sort, AggregationType, EditInfo } from '../../../types/State.types';\nimport { compareObjects, evaluateStyleFormatForCell } from '../utils/util';\nimport * as actions from '../actions/actions';\nimport { RICH_TEXT } from '../constants';\nimport type RsProps from '../RsProps';\nimport type RsInternal from '../RsInternal';\nimport type RsStore from '../RsStore';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { ApiContext } from '../../../types/ApiContext.types';\nimport type StateResolver from '../StateResolver';\n\nimport type Row from './RowGenerator';\nimport {\n DATA_KEY,\n type ColumnConfig,\n type ColumnResizerProps,\n type ColumnStyle,\n type SortProperties,\n type ColumnContext,\n type ColumnRenderingEngineProps\n} from './ColumnGenerator.types';\nimport type { RowContext, RowData } from './RowGenerator.types';\nimport type { FormatterFunction } from './ViewGenerator.types';\n\nexport default class Column {\n /** Reference to repeating structure props. */\n #rsProps: RsProps;\n /** Reference to repeating structure store. */\n #rsStore: RsStore;\n /** Reference to rs internal object. */\n #rsInternal: RsInternal;\n /** */\n #dispatch: StateResolver['dispatch'];\n /** The common CSS styles for a column like width, order etc. */\n style = {} as ColumnStyle;\n /** Indicates if the column is grouped.\n * @default false\n */\n grouped = false;\n /** Indicates if the column is frozen.\n * @default false\n */\n frozen = false;\n /** Indicates if any filter is appplied to the column.\n * @default false\n */\n filtered = false;\n /** Indicates if any sorting is applied to the column.\n * @default false\n */\n sorted = false;\n /** Indicates the sorting sequence of the column if it is {@link sorted}. */\n sortSequence?: SortProperties['sortSequence'];\n /** Indicates the sorting order of the column if it is {@link sorted}. */\n sortOrder?: SortProperties['sortOrder'];\n /** Indicates if the column is lastFrozen column if it is {@link frozen}.\n * @default false\n */\n lastFrozen = false;\n /** Indicates if aggregation is applied on the column.\n * @default false\n */\n aggregated = false;\n /** Aggregated value for the column for an {@link aggregationType} if {@link aggregated aggregation} is applied. */\n aggregateValue?: number;\n /** Current aggregation type applied on the column. */\n aggregationType?: AggregationType;\n /** Indicates the current width of the column. */\n currentWidth?: number;\n /** Field meta for this column from {@link Meta.fieldDefs meta fieldDefs}. */\n field: FieldDef;\n /** Indicates if the formatting is allowed on this column.\n * @default true\n */\n formatterAllowed = true;\n /** Indicates the current formatter applied to the column. */\n formatterName?: string;\n /** The formatter function corresponding toe the {@link formatterName}. */\n formatter?: FormatterFunction;\n /** The name of the renderer for this cell. */\n cellRenderer?: string;\n /** Indicates if the column is hidden.\n * @default false\n */\n hidden = false;\n /** Label for the column that can be displayed to end user. */\n label?: string;\n /** Categorized label for the column if the column has categories derived from {@link FieldDef.category}. */\n categorizedHeaderLabel?: string;\n /** Indicates if the column is first visual column for the end user.\n * @default false\n */\n isFirstVisualColumn = false;\n /** Indicates if the column is first data column, excluding any action column like checkbox, row action, drag drop column.\n * @default false\n */\n isFirstDataColumn = false;\n /** Indicates if the column is last column. */\n isLastColumn = false;\n /** Indicates if the column is a custom column derived from Customize column feature.\n * E.g. column generated by joining 2 columns. */\n isCustomColumn = false;\n /** Indicates if the column is in edit mode. */\n editMode = false;\n /** Visual order of the column with respect to other columns */\n order?: number;\n /** CSS classes for the column.\n * @default empty array.\n */\n classList = [] as string[];\n /** Indicates if the icons should be shown for the column on the header based on {@link FieldDef.type type}. */\n showHeaderIcons = false;\n /** Indicates if the width of the column is changed. */\n isWidthChanged = false;\n /** Indicates if tooltip should be shown for the column in cells. */\n #showToolTip!: boolean;\n /** Indicates the current display mode for hierarchical columns. */\n displayMode?: string | null;\n /** Indicates if the selection column is disabled for selection. */\n disableSelection?: boolean;\n // TODO: Update executionContext type. 'RowContext' | 'ViewContext' | null\n /** The current running execution context i.e. row context for the column in which the column is being rendered. */\n #executionContext: RowContext | null;\n /** The {@link Row row} in which column is being rendered. */\n #pRow: Row | null;\n /** The formatted value for the column. */\n formattedValue: string | null;\n /** Returns the resize events that can be attached to column DOM node. */\n getResizerProps: () => ColumnResizerProps | undefined;\n /** Alias of the column */\n alias?: string;\n /** Indicates a re-render is triggered for the column. */\n refresh?: number;\n /** A factory function provided to RsCore that returns component or component definition for specified type\n * @param type It is equal to value of {@link FieldDef.cellRenderer cellRenderer}(if added in fieldDefs of that column).\n * @returns It should return a component definition (or an object that contains component definition).\n * This component definition will be used by RepeatingStructures to render a cell with the component provided by renderFactory.\n * If component definition is not provided from render factory or renderFactory is not provided to Repeating structures then cell will be rendered directly with value derived for the cell or the formatted value(if {@link RsProps.formatters formatters} are provided for that column)\n */\n renderFactory?: RsProps['renderFactory'];\n /** Reference to {@link Column} class construtcor. */\n type?: typeof Column;\n /** Array of conditional style formats applied to this column. */\n conditionalStyleFormats?: OmitStrict<ConditionalStyleFormat, 'fieldName'>[];\n\n /**\n * Creates a new instance of a column within a repeating structure template.\n * @param config It represents few config properties which is used to create column instance.\n * @param rsInternal A reference to rsInternal object.\n */\n constructor(config: ColumnConfig, rsInternal: RsInternal) {\n const {\n aggregateValue,\n aggregationType,\n currentWidth,\n field,\n formatterName,\n formatter,\n cellRenderer,\n label,\n alias,\n categorizedHeaderLabel,\n sortSequence,\n sortOrder,\n order,\n displayMode,\n disableSelection,\n filtered = false,\n formatterAllowed = true,\n hidden = false,\n style = {} as ColumnStyle,\n grouped = false,\n frozen = false,\n lastFrozen = false,\n aggregated = false,\n sorted = false,\n isFirstVisualColumn = false,\n isFirstDataColumn = false,\n isLastColumn = false,\n isCustomColumn = false,\n editMode = false,\n classList = [],\n showHeaderIcons = false,\n showTooltip = !!(field.showTooltip === undefined ? true : field.showTooltip),\n isWidthChanged = false,\n refresh,\n conditionalStyleFormats\n } = config;\n const { getRsStore, getRsProps, getRsStateResolver } = rsInternal;\n const rsStore = getRsStore();\n const rsProps = getRsProps();\n const { dispatch } = getRsStateResolver();\n this.#rsInternal = rsInternal;\n this.#rsProps = rsProps;\n this.#rsStore = rsStore;\n this.#dispatch = dispatch;\n this.renderFactory = rsProps.renderFactory;\n this.type = this.constructor as typeof Column;\n // Persisted props at column level.\n this.style = style;\n this.grouped = grouped;\n this.frozen = frozen;\n this.filtered = filtered;\n this.sorted = sorted;\n this.sortSequence = sortSequence;\n this.sortOrder = sortOrder;\n this.lastFrozen = lastFrozen;\n this.aggregated = aggregated;\n this.aggregateValue = aggregateValue;\n this.aggregationType = aggregationType;\n this.currentWidth = currentWidth;\n this.field = field;\n this.formatterAllowed = formatterAllowed;\n this.formatterName = formatterName;\n this.formatter = formatter;\n this.cellRenderer = cellRenderer;\n this.hidden = hidden;\n this.label = label;\n this.alias = alias;\n this.refresh = refresh;\n this.categorizedHeaderLabel = categorizedHeaderLabel;\n this.isFirstVisualColumn = isFirstVisualColumn;\n this.isFirstDataColumn = isFirstDataColumn;\n this.isLastColumn = isLastColumn;\n this.isCustomColumn = isCustomColumn;\n this.editMode = editMode;\n this.order = order;\n this.classList = classList;\n this.showHeaderIcons = showHeaderIcons;\n this.showTooltip = showTooltip;\n this.isWidthChanged = isWidthChanged;\n this.displayMode = displayMode;\n this.disableSelection = disableSelection;\n this.conditionalStyleFormats = conditionalStyleFormats;\n\n // this props are only used at time of rendering. values are not persisted across rows / cells\n this.#executionContext = null;\n this.#pRow = null;\n this.formattedValue = null;\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.getUniqueValues = this.getUniqueValues.bind(this);\n this.getRenderFormatters = this.getRenderFormatters.bind(this);\n this.getSortProperties = this.getSortProperties.bind(this);\n this.getFilterProperties = this.getFilterProperties.bind(this);\n this.getUIProps = this.getUIProps.bind(this);\n this.getHeaderUIProps = this.getHeaderUIProps.bind(this);\n this.getResizerProps = () => getRsStore().getColumnResizerProps?.();\n this.setProp = this.setProp.bind(this);\n this.getRenderingEngineProps = this.getRenderingEngineProps.bind(this);\n this.renderDisplayMode = this.renderDisplayMode.bind(this);\n\n this.setExecutionContext = this.setExecutionContext.bind(this);\n this.getExecutionContext = this.getExecutionContext.bind(this);\n this.getContext = this.getContext.bind(this);\n this.getExpression = this.getExpression.bind(this);\n this.setEditContext = this.setEditContext.bind(this);\n this.isCellInEditMode = this.isCellInEditMode.bind(this);\n\n // All action APIs supported on instance\n this.applyGrouping = this.applyGrouping.bind(this);\n this.applySorting = this.applySorting.bind(this);\n this.applyToggleVisibility = this.applyToggleVisibility.bind(this);\n this.applyFreeze = this.applyFreeze.bind(this);\n this.applyFreezeAtIndex = this.applyFreezeAtIndex.bind(this);\n this.applyAggregation = this.applyAggregation.bind(this);\n this.applyLabel = this.applyLabel.bind(this);\n this.applyFormatter = this.applyFormatter.bind(this);\n this.applyMerge = this.applyMerge.bind(this);\n this.deleteCustomColumn = this.deleteCustomColumn.bind(this);\n this.applyColumnAutoSize = this.applyColumnAutoSize.bind(this);\n this.applyDisplay = this.applyDisplay.bind(this);\n this.getCellStyleFormat = this.getCellStyleFormat.bind(this);\n }\n\n /** Reference to current view object. */\n get parent() {\n return this.#rsInternal.getView();\n }\n\n /** The data for all the cells for the column. */\n get data(): RowData[keyof RowData][] {\n return this.parent.data?.map(d => get(d, this.field.name)) || [];\n }\n\n /**\n * It returns the expression for the column if it is a {@link isCustomColumn custom} column.\n */\n getExpression() {\n return this.parent.state?.customFields?.find(c => c.id === this.field.id)?.expression;\n }\n\n // Used by setProp for mutation\n /**\n * Returns the current column config, which can be used to create a new instance of the column.\n * This is typically used with {@link setProp}\n * @returns {ColumnConfig}\n */\n #get(): ColumnConfig {\n return {\n aggregated: this.aggregated,\n grouped: this.grouped,\n aggregateValue: this.aggregateValue,\n aggregationType: this.aggregationType,\n currentWidth: this.currentWidth,\n field: this.field,\n style: this.style,\n frozen: this.frozen,\n lastFrozen: this.lastFrozen,\n formatterAllowed: this.formatterAllowed,\n formatterName: this.formatterName,\n formatter: this.formatter,\n hidden: this.hidden,\n label: this.label,\n categorizedHeaderLabel: this.categorizedHeaderLabel,\n cellRenderer: this.cellRenderer,\n filtered: this.filtered,\n sorted: this.sorted,\n sortSequence: this.sortSequence,\n sortOrder: this.sortOrder,\n isCustomColumn: this.isCustomColumn,\n isFirstVisualColumn: this.isFirstVisualColumn,\n isFirstDataColumn: this.isFirstDataColumn,\n isLastColumn: this.isLastColumn,\n editMode: this.editMode,\n order: this.order,\n classList: this.classList,\n showHeaderIcons: this.showHeaderIcons,\n isWidthChanged: this.isWidthChanged,\n displayMode: this.displayMode,\n disableSelection: this.disableSelection,\n alias: this.alias,\n conditionalStyleFormats: this.conditionalStyleFormats\n };\n }\n\n /**\n * Indicates if tooltip needs to be shown or not for the current column cells.\n */\n get showTooltip() {\n return this.#showToolTip && this.cellRenderer !== RICH_TEXT && !this.isCellInEditMode();\n }\n\n /**\n * Sets the showTooltip flag for the current column.\n */\n set showTooltip(showTooltip) {\n this.#showToolTip = showTooltip;\n }\n\n /**\n * Retrieves the distinct values for this column using {@link ApiContext.fetchUniqueColValues fetchUniqueColValues}.\n */\n async getUniqueValues() {\n return (\n this.#rsProps.apiContext.fetchUniqueColValues?.(\n this.parent.state,\n this.parent.meta,\n this.field.id,\n {\n ...(this.#rsStore.refreshInProgress && {\n invalidateCache: true,\n invalidateCacheToken: this.#rsStore.refreshToken\n })\n }\n ) || Promise.resolve([])\n );\n }\n\n /**\n * Returns the formatters available for the current column from\n * {@link RsProps.renderFormatterTypeMap renderFormatterTypeMap} based on its {@link FieldDef.type type}\n */\n getRenderFormatters() {\n return this.parent.renderFormatterTypeMap?.[this.field.type];\n }\n\n /** Returns the sorting information for the current column. */\n getSortProperties() {\n return {\n sorted: this.sorted,\n sortSequence: this.sortSequence,\n sortOrder: this.sortOrder\n };\n }\n\n /** Returns the filter information for the current column. */\n getFilterProperties(): { filtered: boolean; filterExpression: Condition | undefined } {\n return {\n filtered: this.filtered,\n filterExpression: this.parent.state.filterExpression\n };\n }\n\n /**\n * Retrieves the UI properties for the column, which can be applied to value cells within this column.\n */\n getUIProps() {\n const editHandler = (e: KeyboardEvent | MouseEvent) => {\n if (\n !this.isCellInEditMode() &&\n (e.type === 'dblclick' || (e.type === 'keydown' && (e as KeyboardEvent).keyCode === 13))\n ) {\n this.setProp('editMode', true);\n const row = (e.target as HTMLElement).closest('[role=\"row\"]') as HTMLElement;\n if (row)\n this.#dispatch(\n actions.actionEditCell({\n rowId: row.dataset.key!,\n colId: this.field.id\n })\n );\n }\n };\n\n // FIXME: aria-colIndex is NaN sometimes\n return {\n style: { ...this.style },\n 'data-col-id': this.field.id,\n onDoubleClick: this.field.editable ? editHandler : null,\n onKeyDown: this.field.editable ? editHandler : null,\n classList: this.isCellInEditMode()\n ? [...this.classList, 'editable-cell']\n : [...this.classList],\n 'aria-colindex': this.order! + 1,\n role: this.field.isRowHeader ? 'rowheader' : 'gridcell'\n };\n }\n\n /**\n * Retrieves the {@link StyleFormat style format} style format applicable to the cell\n * @returns The style format if applicable, otherwise `undefined`.\n *\n */\n getCellStyleFormat(): StyleFormat | undefined {\n return evaluateStyleFormatForCell(this, this.#rsInternal);\n }\n\n /**\n * Retrieves the UI properties for the column, which can be applied to the header cells of this column.\n */\n getHeaderUIProps() {\n return {\n 'data-col-id': this.field.id,\n draggable: this.field.reorderFields,\n role: 'columnheader',\n ...(this.field.reorderFields && this.parent.type.getFieldReorderProps?.())\n };\n }\n\n // TODO: why return search query in column rendering engine props.\n /**\n * Provides essential information for cell rendering, including the column and row.\n * Additionally, it supplies the current search query.\n */\n getRenderingEngineProps(): ColumnRenderingEngineProps {\n return {\n column: this as Column,\n row: this.#pRow,\n searchKeyword: this.parent?.state?.search?.query\n };\n }\n\n /**\n * Sets the current execution context, {@link RowContext}, when rendering a cell for this column.\n * This dynamic context is updated for each cell in the column as it is rendered.\n */\n setExecutionContext(row: Row) {\n this.#pRow = row;\n this.#executionContext = row?.getContext();\n }\n\n /**\n * Retrieves the current execution context, i.e., {@link RowContext}, when rendering a cell for this column.\n * This context dynamically updates as each cell in the column is rendered.\n */\n getExecutionContext() {\n return this.#executionContext;\n }\n\n /**\n * Sets the {@link Column.executionContext execution context} to the row of the cell being edited.\n * It relies on the editInfo state to identify the cell being edited.\n */\n\n setEditContext() {\n const editedRow = this.parent.rows?.find(\n r => r[DATA_KEY] === this.parent?.state?.editInfo?.rowId\n );\n if (editedRow) {\n this.setExecutionContext(editedRow);\n }\n }\n\n /**\n * Checks whether any value cell in this column is currently in edit mode.\n */\n\n isCellInEditMode() {\n return (\n this.editMode &&\n this.field.id === this.parent?.state?.editInfo?.colId &&\n this.#pRow && // Checking if context is set properly to avoid undefined === undefined\n this.#pRow[DATA_KEY] === this.parent?.state?.editInfo?.rowId\n );\n }\n\n /**\n * Returns the current column {@link ColumnContext context}.\n * @param overriddenExecutionContext - optional param to override the execution context with custom {@link RowContext}.\n * @returns\n *\n * @public\n */\n getContext(overriddenExecutionContext?: RowContext | null): ColumnContext {\n const applyEdit = (payload: EditInfo) => {\n this.#dispatch(actions.actionEditCell({ ...payload, colId: this.field.id }));\n };\n\n return {\n name: 'column',\n getField: () => this.field,\n getValue: () =>\n get((overriddenExecutionContext || this.#executionContext)?.getValue?.(), this.field?.name),\n getExecutionContext: () => overriddenExecutionContext || this.#executionContext,\n getParentContext: () => this.parent.getContext(),\n getFormatter: () => this.formatter,\n formatterAllowed: () => this.formatterAllowed,\n getCellRenderer: () => this.cellRenderer,\n getFormatterName: () => this.formatterName,\n getFormattedValue: () => this.formattedValue,\n getSearchKeyword: () => this.parent?.state?.searchText,\n showTooltip: () => this.showTooltip,\n getToolTipValue: () => {\n const tooltip = this.field?.tooltip;\n if (!tooltip) {\n return this.formattedValue;\n }\n return (overriddenExecutionContext || this.#executionContext)?.getValue?.()?.[tooltip];\n },\n setProp: (\n prop:\n | Partial<OmitStrict<Column, 'data' | 'isAutoSizable' | 'parent'>>\n | ExcludeStrict<keyof Column, 'data' | 'isAutoSizable' | 'parent'>,\n value?: Column[keyof Column]\n ) => this.setPropMutatively(prop, value),\n getSortProperties: this.getSortProperties,\n getExpression: this.getExpression,\n getFilterProperties: this.getFilterProperties,\n searchKeyword: this.parent?.state?.searchText,\n getTableMeta: () => this.parent.meta,\n getRsMeta: () => this.parent.meta,\n applyGrouping: this.applyGrouping,\n applySorting: this.applySorting,\n applyToggleVisibility: this.applyToggleVisibility,\n applyFreeze: this.applyFreeze,\n applyAggregation: this.applyAggregation,\n applyLabel: this.applyLabel,\n applyFormatter: this.applyFormatter,\n applyMerge: this.applyMerge,\n deleteCustomColumn: this.deleteCustomColumn,\n setEditContext: this.setEditContext,\n getRendererType: () => {\n // TODO: Need to revisit this . Why to have different renderer type. Doing this to keep contract same with nebula render factory.\n if (this.isCellInEditMode()) return 'cellEditRenderer';\n if (this.isCustomColumn) return 'customCellRenderer';\n return 'cellRenderer';\n },\n onSubmit: (\n editContext = {} as {\n oldValue: string | number | boolean | Date;\n newValue: string | number | boolean | Date;\n }\n ) => {\n const { oldValue, newValue } = editContext;\n if (oldValue !== newValue) {\n // dispatch actions (Cell_editing, submit) with data\n this.setEditContext(); /* Set the correct context from state before applying any actions */\n if (this.#pRow) {\n const payload = {\n newValue,\n name: this.field.name,\n key: this.#pRow.key,\n oldValue: this.getContext().getValue() as string | number | boolean | Date\n };\n this.#dispatch(actions.actionUpdateChangeSet({ ...payload, status: 'pending' }));\n this.#dispatch(actions.actionSubmitChangeSet({ ...payload, status: 'inProgress' }));\n }\n }\n this.setProp('editMode', false);\n applyEdit({});\n },\n onCancel: () => {\n this.setProp('editMode', false);\n applyEdit({});\n },\n selectAllRows: this.parent.type.selectAllRows,\n getDisableSelection: () => this.disableSelection\n };\n }\n\n /**\n * Updates property of the column with value. The updated value will be reflected on next re-render.\n * @param prop Either partial of {@link Column} or individual properties of {@link Column}.\n * @param [value] An optional parameter to provide value for {@link prop} in case prop is not of type {@link ColumnConfig}\n * @returns void\n */\n setPropMutatively(\n prop:\n | Partial<OmitStrict<Column, 'data' | 'isAutoSizable' | 'parent'>>\n | ExcludeStrict<keyof Column, 'data' | 'isAutoSizable' | 'parent'>,\n value?: Column[keyof Column]\n ) {\n if (typeof prop !== 'object' && value) {\n // @ts-expect-error check the index based type error.\n this[prop] = value;\n } else {\n Object.entries(prop).forEach(([k, v]) => {\n // @ts-expect-error Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Column'.\n this[k] = v;\n });\n }\n }\n\n // setProp is used to make columns immutables.\n /**\n * Sets a {@link prop property} and its {@link value} in the {@link Column} instance, creating an immutable instance.\n * Always use `setProp` to update properties of {@link Column} to ensure immutability.\n *\n * @param prop Either a partial {@link ColumnConfig} or individual properties of {@link ColumnConfig}.\n * @param [value] Optional value to set for `prop` if `prop` is not of type {@link ColumnConfig}.\n * @returns void\n */\n\n setProp(\n prop: Partial<ColumnConfig> | keyof ColumnConfig,\n value?: ColumnConfig[keyof ColumnConfig]\n ) {\n const { getView } = this.#rsInternal;\n const index = getView().columns!.findIndex(c => c === this);\n let pObject = prop;\n if (typeof prop !== 'object') {\n pObject = { [prop]: value };\n }\n\n // Change object if any value changes actually.\n // @ts-expect-error utils should be converted to TS in order to resolve this.\n if (!compareObjects(this, pObject, Object.keys(pObject)) && index >= 0) {\n const newColumn = new Column(\n {\n ...this.#get(),\n ...(pObject as Partial<ColumnConfig>)\n },\n this.#rsInternal\n );\n const cloned = [...getView().columns!];\n cloned.splice(index, 1, newColumn);\n getView().columns = cloned;\n return newColumn;\n }\n return this;\n }\n\n /**\n * Applies grouping to this column.\n *\n * Dispatches an action that modifies the {@link State.groups groups} in the state.\n */\n applyGrouping() {\n this.#dispatch(actions.actionToggleGrouping(this.field));\n }\n\n /**\n * Applies sorting to this column.\n *\n * Dispatches an action that updates the {@link State.sortingOrder sortingOrder} in the state.\n *\n * @param flushState If true, it will reset the existing {@link State.sortingOrder sortingOrder} state for this column.\n * @param sortOrderId The sort order, either 'asc' or 'desc'.\n */\n // eslint-disable-next-line @typescript-eslint/default-param-last\n applySorting(flushState = false, sortOrderId: Sort['order']) {\n this.#dispatch(\n actions.actionColumnSort({\n id: this.field.id,\n flushState,\n sortOrderId\n })\n );\n }\n\n /**\n * Toggles the visibility of a column, allowing it to be shown or hidden.\n *\n * Dispatches an action that updates {@link State.hiddenColumns hiddenColumns} in the state.\n *\n * @param column The column to be toggled.\n */\n\n applyToggleVisibility() {\n this.#dispatch(actions.actionColumnToggle([this.field.id]));\n }\n\n /**\n * Toggles the \"freeze\" effect on a column, locking it to the left while the rest of the content scrolls.\n * This helps keep key columns visible in large datasets.\n *\n * Dispatches an action that updates {@link State.freezeColumns freezeColumns} in the state.\n */\n applyFreeze() {\n this.#dispatch(actions.actionColumnPin([this.field.id]));\n }\n\n /**\n * Toggles the \"freeze\" effect on a column, locking it at given index while the rest of the columns\n * continues to scroll. This can be used to keep key columns visible in large datasets.\n * The freeze order of the given column is defined by {@link index} passed.\n *\n * Dispatches an action that modifies {@link State.freezeColumns freezeColumns} in the state.\n * @param index\n */\n applyFreezeAtIndex(index: number) {\n this.#dispatch(actions.actionColumnPinAtIndex(this.field.id, index));\n }\n\n /** Applies aggregation to the column, summarizing the data based on a specified {@link type aggregationType}.\n *\n * Dispatches an action that modifies {@link State.aggregationInfo aggregation} in the state.\n */\n applyAggregation(type: AggregationType) {\n this.#dispatch(\n actions.actionUpdateAggregation({\n columnId: this.field.id,\n type\n })\n );\n }\n\n /** Applies label to the current column.\n *\n * Dispatches an action that updates {@link State.columnAlias columnAlias} in the state.\n */\n applyLabel(label: NonNullable<Column['label']>) {\n this.#dispatch(\n actions.actionChangeLabel({\n columnId: this.field.id,\n label\n })\n );\n }\n\n /** Applies formatter to the current column.\n *\n * Dispatches an action that updates {@link State.renderFormatter renderFormatter} in the state.\n * @param name - Formatter name.\n */\n applyFormatter(name: NonNullable<Column['formatterName']>) {\n this.#dispatch(\n actions.actionUpdateRenderFormatter({\n columnId: this.field.id,\n name\n })\n );\n }\n\n /**\n * Applies {@link mode displayMode} to hierarchical column.\n *\n * Dispatches an action that modifies {@link State.hierarchicalGroup hierarchicalGroups},\n * {@link State.groupToggle groupToggle}, {@link State.groups groups} in the state.\n * @param mode\n */\n applyDisplay(mode: string) {\n const { hierarchicalInfo } = this.field;\n this.#rsStore.groupingInfo = [] as NonNullable<RsStore['groupingInfo']>;\n this.#dispatch(\n actions.actionUpdateDisplayMode({\n parentId: hierarchicalInfo!.parentId,\n materializedPathId: hierarchicalInfo!.materializedPathId,\n targetId: hierarchicalInfo!.targetId,\n columnId: this.field.id,\n sortById: hierarchicalInfo!.sortById || hierarchicalInfo!.targetId,\n mode\n })\n );\n }\n\n /**\n * Applies merge operation(combine columns) to 2 columns based on selected template.\n *\n * Dispatches an action that modifies {@link State.customFields customFields} in the state.\n * @param mergeWith On which column the merge operation to be performed(left/right)\n * @param title label for the new custom column.\n * @param templateName The template which should be used to merge the columns\n * @param bHideColumns Hide the existing columns.\n */\n applyMerge(\n mergeWith: 'left' | 'right',\n title: string,\n templateName: NonNullable<Meta['dynamicFieldTemplates']>[number]['value'],\n bHideColumns: boolean\n ) {\n const step = mergeWith === 'left' ? -1 : 1;\n const targetId = this.parent.columns!.find(c => c.order === this.order! + step)!.field.id;\n this.#dispatch(\n actions.actionMergeColumns({\n sourceId: this.field.id,\n targetId,\n title,\n templateName,\n bHideColumns,\n uniqueID: String(+new Date())\n })\n );\n }\n\n /**\n * Deletes the custom column.\n *\n * Dispatches an action that modifies {@link State.customFields customFields} in the state by removing this column from it.\n */\n deleteCustomColumn() {\n this.#dispatch(\n actions.actionDeleteCustomColumn({\n columnId: this.field.id\n })\n );\n }\n\n /**\n * Updates column's width based on the autosize logic.\n *\n * Dispatches an action that modifies the {@link State.columnWidths columnWidths} in the state.\n */\n\n applyColumnAutoSize() {\n this.#dispatch(actions.actionColumnAutoSize(this, this.parent.getDomContainer()!));\n }\n\n /**\n * Determines if autosize is enabled for this column.\n */\n get isAutoSizable() {\n return this.field.autosize && !this.hidden && this.cellRenderer !== RICH_TEXT;\n }\n\n /**\n * Determines whether hierarchical mode should be enabled for this column.\n */\n renderDisplayMode() {\n const { meta } = this.parent;\n const { hierarchicalInfo } = this.field;\n\n return hierarchicalInfo?.materializedPathId && meta.grouping && !meta.editing;\n }\n\n /**\n * Retrieves the personalized width of the column, sourced from either\n * {@link RsProps.persistedInfo persistedInfo} or the current\n * {@link State.personalization personalized state}.\n *\n * @returns The personalized width of the column.\n */\n\n getPersonalizedWidth() {\n let columnWidths: State['columnWidths'] = {};\n if (this.#rsProps.persistedInfo) {\n columnWidths = this.#rsProps.persistedInfo.columnWidths;\n } else {\n const { active, allPersonalizations } = this.parent.state?.personalization ?? {};\n columnWidths = allPersonalizations?.[active!]?.personalizationState?.columnWidths;\n }\n return columnWidths?.[this.field.id];\n }\n}\n"]}
1
+ {"version":3,"file":"ColumnGenerator.js","sourceRoot":"","sources":["../../../../src/core/generators/ColumnGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,eAAe,CAAC;AAYhC,OAAO,EAAE,cAAc,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAoBzC,MAAM,CAAC,OAAO,OAAO,MAAM;IACzB,8CAA8C;IAC9C,QAAQ,CAAU;IAClB,8CAA8C;IAC9C,QAAQ,CAAU;IAClB,uCAAuC;IACvC,WAAW,CAAa;IACxB,MAAM;IACN,SAAS,CAA4B;IACrC,gEAAgE;IAChE,KAAK,GAAG,EAAiB,CAAC;IAC1B;;OAEG;IACH,OAAO,GAAG,KAAK,CAAC;IAChB;;OAEG;IACH,MAAM,GAAG,KAAK,CAAC;IACf;;OAEG;IACH,QAAQ,GAAG,KAAK,CAAC;IACjB;;OAEG;IACH,MAAM,GAAG,KAAK,CAAC;IACf,4EAA4E;IAC5E,YAAY,CAAkC;IAC9C,yEAAyE;IACzE,SAAS,CAA+B;IACxC;;OA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,EAAE,CAAC;YACjF,YAAY,GAAG,mBAAmB,EAAE,CAAC,MAAO,CAAC,EAAE,oBAAoB,EAAE,YAAY,CAAC;QACpF,CAAC;QACD,OAAO,YAAY,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACvC,CAAC;CACF","sourcesContent":["import get from 'lodash-es/get';\n\nimport type { ExcludeStrict, OmitStrict } from '@pega/cosmos-react-core';\nimport type { Condition } from '@pega/cosmos-react-condition-builder';\n\nimport type {\n ConditionalStyleFormat,\n FieldDef,\n Meta,\n StyleFormat\n} from '../../../types/Meta.types';\nimport type { State, Sort, AggregationType } from '../../../types/State.types';\nimport { compareObjects, evaluateStyleFormatForCell } from '../utils/util';\nimport * as actions from '../actions/actions';\nimport { RICH_TEXT } from '../constants';\nimport type RsProps from '../RsProps';\nimport type RsInternal from '../RsInternal';\nimport type RsStore from '../RsStore';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { ApiContext } from '../../../types/ApiContext.types';\nimport type StateResolver from '../StateResolver';\n\nimport type Row from './RowGenerator';\nimport type {\n ColumnConfig,\n ColumnResizerProps,\n ColumnStyle,\n SortProperties,\n ColumnContext,\n ColumnRenderingEngineProps\n} from './ColumnGenerator.types';\nimport type { RowContext, RowData } from './RowGenerator.types';\nimport type { FormatterFunction } from './ViewGenerator.types';\n\nexport default class Column {\n /** Reference to repeating structure props. */\n #rsProps: RsProps;\n /** Reference to repeating structure store. */\n #rsStore: RsStore;\n /** Reference to rs internal object. */\n #rsInternal: RsInternal;\n /** */\n #dispatch: StateResolver['dispatch'];\n /** The common CSS styles for a column like width, order etc. */\n style = {} as ColumnStyle;\n /** Indicates if the column is grouped.\n * @default false\n */\n grouped = false;\n /** Indicates if the column is frozen.\n * @default false\n */\n frozen = false;\n /** Indicates if any filter is appplied to the column.\n * @default false\n */\n filtered = false;\n /** Indicates if any sorting is applied to the column.\n * @default false\n */\n sorted = false;\n /** Indicates the sorting sequence of the column if it is {@link sorted}. */\n sortSequence?: SortProperties['sortSequence'];\n /** Indicates the sorting order of the column if it is {@link sorted}. */\n sortOrder?: SortProperties['sortOrder'];\n /** Indicates if the column is lastFrozen column if it is {@link frozen}.\n * @default false\n */\n lastFrozen = false;\n /** Indicates if aggregation is applied on the column.\n * @default false\n */\n aggregated = false;\n /** Aggregated value for the column for an {@link aggregationType} if {@link aggregated aggregation} is applied. */\n aggregateValue?: number;\n /** Current aggregation type applied on the column. */\n aggregationType?: AggregationType;\n /** Indicates the current width of the column. */\n currentWidth?: number;\n /** Field meta for this column from {@link Meta.fieldDefs meta fieldDefs}. */\n field: FieldDef;\n /** Indicates if the formatting is allowed on this column.\n * @default true\n */\n formatterAllowed = true;\n /** Indicates the current formatter applied to the column. */\n formatterConfig?:\n | string\n | {\n type: string;\n config: unknown;\n };\n\n /** The formatter function corresponding to the {@link formatterConfig}. */\n formatter?: FormatterFunction;\n /** The name of the renderer for this cell. */\n cellRenderer?: string;\n /** Indicates if the column is hidden.\n * @default false\n */\n hidden = false;\n /** Label for the column that can be displayed to end user. */\n label?: string;\n /** Categorized label for the column if the column has categories derived from {@link FieldDef.category}. */\n categorizedHeaderLabel?: string;\n /** Indicates if the column is first visual column for the end user.\n * @default false\n */\n isFirstVisualColumn = false;\n /** Indicates if the column is first data column, excluding any action column like checkbox, row action, drag drop column.\n * @default false\n */\n isFirstDataColumn = false;\n /** Indicates if the column is last column. */\n isLastColumn = false;\n /** Indicates if the column is a custom column derived from Customize column feature.\n * E.g. column generated by joining 2 columns. */\n isCustomColumn = false;\n /** Visual order of the column with respect to other columns */\n order?: number;\n /** CSS classes for the column.\n * @default empty array.\n */\n classList = [] as string[];\n /** Indicates if the icons should be shown for the column on the header based on {@link FieldDef.type type}. */\n showHeaderIcons = false;\n /** Indicates if the width of the column is changed. */\n isWidthChanged = false;\n /** Indicates if tooltip should be shown for the column in cells. */\n #showToolTip!: boolean;\n /** Indicates the current display mode for hierarchical columns. */\n displayMode?: string | null;\n /** Indicates if the selection column is disabled for selection. */\n disableSelection?: boolean;\n // TODO: Update executionContext type. 'RowContext' | 'ViewContext' | null\n /** The current running execution context i.e. row context for the column in which the column is being rendered. */\n #executionContext: RowContext | null;\n /** The {@link Row row} in which column is being rendered. */\n #pRow: Row | null;\n /** The formatted value for the column. */\n formattedValue: string | null;\n /** Returns the resize events that can be attached to column DOM node. */\n getResizerProps: () => ColumnResizerProps | undefined;\n /** Alias of the column */\n alias?: string;\n /** Indicates a re-render is triggered for the column. */\n refresh?: number;\n /** A factory function provided to RsCore that returns component or component definition for specified type\n * @param type It is equal to value of {@link FieldDef.cellRenderer cellRenderer}(if added in fieldDefs of that column).\n * @returns It should return a component definition (or an object that contains component definition).\n * This component definition will be used by RepeatingStructures to render a cell with the component provided by renderFactory.\n * If component definition is not provided from render factory or renderFactory is not provided to Repeating structures then cell will be rendered directly with value derived for the cell or the formatted value(if {@link RsProps.formatters formatters} are provided for that column)\n */\n renderFactory?: RsProps['renderFactory'];\n /** Reference to {@link Column} class construtcor. */\n type?: typeof Column;\n /** Array of conditional style formats applied to this column. */\n conditionalStyleFormats?: OmitStrict<ConditionalStyleFormat, 'fieldName'>[];\n\n /**\n * Creates a new instance of a column within a repeating structure template.\n * @param config It represents few config properties which is used to create column instance.\n * @param rsInternal A reference to rsInternal object.\n */\n constructor(config: ColumnConfig, rsInternal: RsInternal) {\n const {\n aggregateValue,\n aggregationType,\n currentWidth,\n field,\n formatterConfig,\n formatter,\n cellRenderer,\n label,\n alias,\n categorizedHeaderLabel,\n sortSequence,\n sortOrder,\n order,\n displayMode,\n disableSelection,\n filtered = false,\n formatterAllowed = true,\n hidden = false,\n style = {} as ColumnStyle,\n grouped = false,\n frozen = false,\n lastFrozen = false,\n aggregated = false,\n sorted = false,\n isFirstVisualColumn = false,\n isFirstDataColumn = false,\n isLastColumn = false,\n isCustomColumn = false,\n classList = [],\n showHeaderIcons = false,\n showTooltip = !!(field.showTooltip === undefined ? true : field.showTooltip),\n isWidthChanged = false,\n refresh,\n conditionalStyleFormats\n } = config;\n const { getRsStore, getRsProps, getRsStateResolver } = rsInternal;\n const rsStore = getRsStore();\n const rsProps = getRsProps();\n const { dispatch } = getRsStateResolver();\n this.#rsInternal = rsInternal;\n this.#rsProps = rsProps;\n this.#rsStore = rsStore;\n this.#dispatch = dispatch;\n this.renderFactory = rsProps.renderFactory;\n this.type = this.constructor as typeof Column;\n // Persisted props at column level.\n this.style = style;\n this.grouped = grouped;\n this.frozen = frozen;\n this.filtered = filtered;\n this.sorted = sorted;\n this.sortSequence = sortSequence;\n this.sortOrder = sortOrder;\n this.lastFrozen = lastFrozen;\n this.aggregated = aggregated;\n this.aggregateValue = aggregateValue;\n this.aggregationType = aggregationType;\n this.currentWidth = currentWidth;\n this.field = field;\n this.formatterAllowed = formatterAllowed;\n this.formatterConfig = formatterConfig;\n this.formatter = formatter;\n this.cellRenderer = cellRenderer;\n this.hidden = hidden;\n this.label = label;\n this.alias = alias;\n this.refresh = refresh;\n this.categorizedHeaderLabel = categorizedHeaderLabel;\n this.isFirstVisualColumn = isFirstVisualColumn;\n this.isFirstDataColumn = isFirstDataColumn;\n this.isLastColumn = isLastColumn;\n this.isCustomColumn = isCustomColumn;\n this.order = order;\n this.classList = classList;\n this.showHeaderIcons = showHeaderIcons;\n this.showTooltip = showTooltip;\n this.isWidthChanged = isWidthChanged;\n this.displayMode = displayMode;\n this.disableSelection = disableSelection;\n this.conditionalStyleFormats = conditionalStyleFormats;\n\n // this props are only used at time of rendering. values are not persisted across rows / cells\n this.#executionContext = null;\n this.#pRow = null;\n this.formattedValue = null;\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.getUniqueValues = this.getUniqueValues.bind(this);\n this.getRenderFormatters = this.getRenderFormatters.bind(this);\n this.getSortProperties = this.getSortProperties.bind(this);\n this.getFilterProperties = this.getFilterProperties.bind(this);\n this.getUIProps = this.getUIProps.bind(this);\n this.getHeaderUIProps = this.getHeaderUIProps.bind(this);\n this.getResizerProps = () => getRsStore().getColumnResizerProps?.();\n this.setProp = this.setProp.bind(this);\n this.getRenderingEngineProps = this.getRenderingEngineProps.bind(this);\n this.renderDisplayMode = this.renderDisplayMode.bind(this);\n\n this.setExecutionContext = this.setExecutionContext.bind(this);\n this.getExecutionContext = this.getExecutionContext.bind(this);\n this.getContext = this.getContext.bind(this);\n this.getExpression = this.getExpression.bind(this);\n // All action APIs supported on instance\n this.applyGrouping = this.applyGrouping.bind(this);\n this.applySorting = this.applySorting.bind(this);\n this.applyToggleVisibility = this.applyToggleVisibility.bind(this);\n this.applyFreeze = this.applyFreeze.bind(this);\n this.applyFreezeAtIndex = this.applyFreezeAtIndex.bind(this);\n this.applyAggregation = this.applyAggregation.bind(this);\n this.applyLabel = this.applyLabel.bind(this);\n this.applyFormatter = this.applyFormatter.bind(this);\n this.removeFormatter = this.removeFormatter.bind(this);\n this.applyMerge = this.applyMerge.bind(this);\n this.deleteCustomColumn = this.deleteCustomColumn.bind(this);\n this.applyColumnAutoSize = this.applyColumnAutoSize.bind(this);\n this.applyDisplay = this.applyDisplay.bind(this);\n this.getCellStyleFormat = this.getCellStyleFormat.bind(this);\n }\n\n /** Reference to current view object. */\n get parent() {\n return this.#rsInternal.getView();\n }\n\n /** The data for all the cells for the column. */\n get data(): RowData[keyof RowData][] {\n return this.parent.data?.map(d => get(d, this.field.name)) || [];\n }\n\n /**\n * It returns the expression for the column if it is a {@link isCustomColumn custom} column.\n */\n getExpression() {\n return this.parent.state?.customFields?.find(c => c.id === this.field.id)?.expression;\n }\n\n // Used by setProp for mutation\n /**\n * Returns the current column config, which can be used to create a new instance of the column.\n * This is typically used with {@link setProp}\n * @returns {ColumnConfig}\n */\n #get(): ColumnConfig {\n return {\n aggregated: this.aggregated,\n grouped: this.grouped,\n aggregateValue: this.aggregateValue,\n aggregationType: this.aggregationType,\n currentWidth: this.currentWidth,\n field: this.field,\n style: this.style,\n frozen: this.frozen,\n lastFrozen: this.lastFrozen,\n formatterAllowed: this.formatterAllowed,\n formatterConfig: this.formatterConfig,\n formatter: this.formatter,\n hidden: this.hidden,\n label: this.label,\n categorizedHeaderLabel: this.categorizedHeaderLabel,\n cellRenderer: this.cellRenderer,\n filtered: this.filtered,\n sorted: this.sorted,\n sortSequence: this.sortSequence,\n sortOrder: this.sortOrder,\n isCustomColumn: this.isCustomColumn,\n isFirstVisualColumn: this.isFirstVisualColumn,\n isFirstDataColumn: this.isFirstDataColumn,\n isLastColumn: this.isLastColumn,\n order: this.order,\n classList: this.classList,\n showHeaderIcons: this.showHeaderIcons,\n isWidthChanged: this.isWidthChanged,\n displayMode: this.displayMode,\n disableSelection: this.disableSelection,\n alias: this.alias,\n conditionalStyleFormats: this.conditionalStyleFormats\n };\n }\n\n /**\n * Indicates if tooltip needs to be shown or not for the current column cells.\n */\n get showTooltip() {\n return this.#showToolTip && this.cellRenderer !== RICH_TEXT;\n }\n\n /**\n * Sets the showTooltip flag for the current column.\n */\n set showTooltip(showTooltip) {\n this.#showToolTip = showTooltip;\n }\n\n /**\n * Retrieves the distinct values for this column using {@link ApiContext.fetchUniqueColValues fetchUniqueColValues}.\n */\n async getUniqueValues() {\n return (\n this.#rsProps.apiContext.fetchUniqueColValues?.(\n this.parent.state,\n this.parent.meta,\n this.field.id,\n {\n ...(this.#rsStore.refreshInProgress && {\n invalidateCache: true,\n invalidateCacheToken: this.#rsStore.refreshToken\n })\n }\n ) || Promise.resolve([])\n );\n }\n\n /**\n * Returns the formatters available for the current column from\n * {@link RsProps.renderFormatterTypeMap renderFormatterTypeMap} based on its {@link FieldDef.type type}\n */\n getRenderFormatters() {\n const formattersForType = this.parent.renderFormatterTypeMap?.[this.field.type] || [];\n return this.field.formatters ?? formattersForType;\n }\n\n /** Returns the sorting information for the current column. */\n getSortProperties() {\n return {\n sorted: this.sorted,\n sortSequence: this.sortSequence,\n sortOrder: this.sortOrder\n };\n }\n\n /** Returns the filter information for the current column. */\n getFilterProperties(): { filtered: boolean; filterExpression: Condition | undefined } {\n return {\n filtered: this.filtered,\n filterExpression: this.parent.state.filterExpression\n };\n }\n\n /**\n * Retrieves the UI properties for the column, which can be applied to value cells within this column.\n */\n getUIProps() {\n // FIXME: aria-colIndex is NaN sometimes\n return {\n style: { ...this.style },\n 'data-col-id': this.field.id,\n classList: [...this.classList],\n 'aria-colindex': this.order! + 1,\n role: this.field.isRowHeader ? 'rowheader' : 'gridcell'\n };\n }\n\n /**\n * Retrieves the {@link StyleFormat style format} style format applicable to the cell\n * @returns The style format if applicable, otherwise `undefined`.\n *\n */\n getCellStyleFormat(): StyleFormat | undefined {\n return evaluateStyleFormatForCell(this, this.#rsInternal);\n }\n\n /**\n * Retrieves the UI properties for the column, which can be applied to the header cells of this column.\n */\n getHeaderUIProps() {\n return {\n 'data-col-id': this.field.id,\n draggable: this.field.reorderFields,\n role: 'columnheader',\n ...(this.field.reorderFields && this.parent.type.getFieldReorderProps?.())\n };\n }\n\n // TODO: why return search query in column rendering engine props.\n /**\n * Provides essential information for cell rendering, including the column and row.\n * Additionally, it supplies the current search query.\n */\n getRenderingEngineProps(): ColumnRenderingEngineProps {\n return {\n column: this as Column,\n row: this.#pRow,\n searchKeyword: this.parent?.state?.search?.query\n };\n }\n\n /**\n * Sets the current execution context, {@link RowContext}, when rendering a cell for this column.\n * This dynamic context is updated for each cell in the column as it is rendered.\n */\n setExecutionContext(row: Row | null) {\n this.#pRow = row;\n this.#executionContext = row ? row.getContext() : null;\n }\n\n /**\n * Retrieves the current execution context, i.e., {@link RowContext}, when rendering a cell for this column.\n * This context dynamically updates as each cell in the column is rendered.\n */\n getExecutionContext() {\n return this.#executionContext;\n }\n\n /**\n * Returns the current column {@link ColumnContext context}.\n * @param overriddenExecutionContext - optional param to override the execution context with custom {@link RowContext}.\n * @returns\n *\n * @public\n */\n getContext(overriddenExecutionContext?: RowContext | null): ColumnContext {\n return {\n name: 'column',\n getField: () => this.field,\n getValue: () =>\n get((overriddenExecutionContext || this.#executionContext)?.getValue?.(), this.field?.name),\n getExecutionContext: () => overriddenExecutionContext || this.#executionContext,\n getParentContext: () => this.parent.getContext(),\n getFormatter: () => this.formatter,\n formatterAllowed: () => this.formatterAllowed,\n getCellRenderer: () => this.cellRenderer,\n getFormatterValue: () => this.formatterConfig,\n getFormattedValue: () => this.formattedValue,\n getSearchKeyword: () => this.parent?.state?.searchText,\n showTooltip: () => this.showTooltip,\n getToolTipValue: () => {\n const tooltip = this.field?.tooltip;\n if (!tooltip) {\n return this.formattedValue;\n }\n return (overriddenExecutionContext || this.#executionContext)?.getValue?.()?.[tooltip];\n },\n /** Returns the header label */\n getLabel: () => this.categorizedHeaderLabel,\n setProp: (\n prop:\n | Partial<OmitStrict<Column, 'data' | 'isAutoSizable' | 'parent'>>\n | ExcludeStrict<keyof Column, 'data' | 'isAutoSizable' | 'parent'>,\n value?: Column[keyof Column]\n ) => this.setPropMutatively(prop, value),\n getSortProperties: this.getSortProperties,\n getExpression: this.getExpression,\n getFilterProperties: this.getFilterProperties,\n searchKeyword: this.parent?.state?.searchText,\n getTableMeta: () => this.parent.meta,\n getRsMeta: () => this.parent.meta,\n applyGrouping: this.applyGrouping,\n applySorting: this.applySorting,\n applyToggleVisibility: this.applyToggleVisibility,\n applyFreeze: this.applyFreeze,\n applyAggregation: this.applyAggregation,\n applyLabel: this.applyLabel,\n applyFormatter: this.applyFormatter,\n removeFormatter: this.removeFormatter,\n applyMerge: this.applyMerge,\n deleteCustomColumn: this.deleteCustomColumn,\n getRendererType: () => {\n return this.isCustomColumn ? 'customCellRenderer' : 'cellRenderer';\n },\n selectAllRows: this.parent.type.selectAllRows,\n getDisableSelection: () => this.disableSelection\n };\n }\n\n /**\n * Updates property of the column with value. The updated value will be reflected on next re-render.\n * @param prop Either partial of {@link Column} or individual properties of {@link Column}.\n * @param [value] An optional parameter to provide value for {@link prop} in case prop is not of type {@link ColumnConfig}\n * @returns void\n */\n setPropMutatively(\n prop:\n | Partial<OmitStrict<Column, 'data' | 'isAutoSizable' | 'parent'>>\n | ExcludeStrict<keyof Column, 'data' | 'isAutoSizable' | 'parent'>,\n value?: Column[keyof Column]\n ) {\n if (typeof prop !== 'object' && value) {\n // @ts-expect-error check the index based type error.\n this[prop] = value;\n } else {\n Object.entries(prop).forEach(([k, v]) => {\n // @ts-expect-error Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Column'.\n this[k] = v;\n });\n }\n }\n\n // setProp is used to make columns immutables.\n /**\n * Sets a {@link prop property} and its {@link value} in the {@link Column} instance, creating an immutable instance.\n * Always use `setProp` to update properties of {@link Column} to ensure immutability.\n *\n * @param prop Either a partial {@link ColumnConfig} or individual properties of {@link ColumnConfig}.\n * @param [value] Optional value to set for `prop` if `prop` is not of type {@link ColumnConfig}.\n * @returns void\n */\n\n setProp(\n prop: Partial<ColumnConfig> | keyof ColumnConfig,\n value?: ColumnConfig[keyof ColumnConfig]\n ) {\n const { getView } = this.#rsInternal;\n const index = getView().columns!.findIndex(c => c === this);\n let pObject = prop;\n if (typeof prop !== 'object') {\n pObject = { [prop]: value };\n }\n\n // Change object if any value changes actually.\n // @ts-expect-error utils should be converted to TS in order to resolve this.\n if (!compareObjects(this, pObject, Object.keys(pObject)) && index >= 0) {\n const newColumn = new Column(\n {\n ...this.#get(),\n ...(pObject as Partial<ColumnConfig>)\n },\n this.#rsInternal\n );\n const cloned = [...getView().columns!];\n cloned.splice(index, 1, newColumn);\n getView().columns = cloned;\n return newColumn;\n }\n return this;\n }\n\n /**\n * Applies grouping to this column.\n *\n * Dispatches an action that modifies the {@link State.groups groups} in the state.\n */\n applyGrouping() {\n this.#dispatch(actions.actionToggleGrouping(this.field));\n }\n\n /**\n * Applies sorting to this column.\n *\n * Dispatches an action that updates the {@link State.sortingOrder sortingOrder} in the state.\n *\n * @param flushState If true, it will reset the existing {@link State.sortingOrder sortingOrder} state for this column.\n * @param sortOrderId The sort order, either 'asc' or 'desc'.\n */\n // eslint-disable-next-line @typescript-eslint/default-param-last\n applySorting(flushState = false, sortOrderId: Sort['order']) {\n this.#dispatch(\n actions.actionColumnSort({\n id: this.field.id,\n flushState,\n sortOrderId\n })\n );\n }\n\n /**\n * Toggles the visibility of a column, allowing it to be shown or hidden.\n *\n * Dispatches an action that updates {@link State.hiddenColumns hiddenColumns} in the state.\n *\n * @param column The column to be toggled.\n */\n\n applyToggleVisibility() {\n this.#dispatch(actions.actionColumnToggle([this.field.id]));\n }\n\n /**\n * Toggles the \"freeze\" effect on a column, locking it to the left while the rest of the content scrolls.\n * This helps keep key columns visible in large datasets.\n *\n * Dispatches an action that updates {@link State.freezeColumns freezeColumns} in the state.\n */\n applyFreeze() {\n this.#dispatch(actions.actionColumnPin([this.field.id]));\n }\n\n /**\n * Toggles the \"freeze\" effect on a column, locking it at given index while the rest of the columns\n * continues to scroll. This can be used to keep key columns visible in large datasets.\n * The freeze order of the given column is defined by {@link index} passed.\n *\n * Dispatches an action that modifies {@link State.freezeColumns freezeColumns} in the state.\n * @param index\n */\n applyFreezeAtIndex(index: number) {\n this.#dispatch(actions.actionColumnPinAtIndex(this.field.id, index));\n }\n\n /** Applies aggregation to the column, summarizing the data based on a specified {@link type aggregationType}.\n *\n * Dispatches an action that modifies {@link State.aggregationInfo aggregation} in the state.\n */\n applyAggregation(type: AggregationType) {\n this.#dispatch(\n actions.actionUpdateAggregation({\n columnId: this.field.id,\n type\n })\n );\n }\n\n /** Applies label to the current column.\n *\n * Dispatches an action that updates {@link State.columnAlias columnAlias} in the state.\n */\n applyLabel(label: NonNullable<Column['label']>) {\n this.#dispatch(\n actions.actionChangeLabel({\n columnId: this.field.id,\n label\n })\n );\n }\n\n /** Applies formatter to the current column.\n *\n * Dispatches an action that updates {@link State.renderFormatter renderFormatter} in the state.\n * @param name - Formatter name.\n */\n applyFormatter(config: NonNullable<Column['formatterConfig']>) {\n this.#dispatch(\n actions.actionUpdateRenderFormatter({\n columnId: this.field.id,\n formatter: config\n })\n );\n }\n\n /** Removes formatter of the current column.\n *\n * Dispatches an action that updates {@link State.renderFormatter renderFormatter} in the state.\n */\n removeFormatter() {\n this.#dispatch(\n actions.actionRemoveRenderFormatter({\n columnId: this.field.id\n })\n );\n }\n\n /**\n * Applies {@link mode displayMode} to hierarchical column.\n *\n * Dispatches an action that modifies {@link State.hierarchicalGroup hierarchicalGroups},\n * {@link State.groupToggle groupToggle}, {@link State.groups groups} in the state.\n * @param mode\n */\n applyDisplay(mode: string) {\n const { hierarchicalInfo } = this.field;\n this.#rsStore.groupingInfo = [] as NonNullable<RsStore['groupingInfo']>;\n this.#dispatch(\n actions.actionUpdateDisplayMode({\n parentId: hierarchicalInfo!.parentId,\n materializedPathId: hierarchicalInfo!.materializedPathId,\n targetId: hierarchicalInfo!.targetId,\n columnId: this.field.id,\n sortById: hierarchicalInfo!.sortById || hierarchicalInfo!.targetId,\n mode\n })\n );\n }\n\n /**\n * Applies merge operation(combine columns) to 2 columns based on selected template.\n *\n * Dispatches an action that modifies {@link State.customFields customFields} in the state.\n * @param mergeWith On which column the merge operation to be performed(left/right)\n * @param title label for the new custom column.\n * @param templateName The template which should be used to merge the columns\n * @param bHideColumns Hide the existing columns.\n */\n applyMerge(\n mergeWith: 'left' | 'right',\n title: string,\n templateName: NonNullable<Meta['dynamicFieldTemplates']>[number]['value'],\n bHideColumns: boolean\n ) {\n const step = mergeWith === 'left' ? -1 : 1;\n const targetId = this.parent.columns!.find(c => c.order === this.order! + step)!.field.id;\n this.#dispatch(\n actions.actionMergeColumns({\n sourceId: this.field.id,\n targetId,\n title,\n templateName,\n bHideColumns,\n uniqueID: String(+new Date())\n })\n );\n }\n\n /**\n * Deletes the custom column.\n *\n * Dispatches an action that modifies {@link State.customFields customFields} in the state by removing this column from it.\n */\n deleteCustomColumn() {\n this.#dispatch(\n actions.actionDeleteCustomColumn({\n columnId: this.field.id\n })\n );\n }\n\n /**\n * Updates column's width based on the autosize logic.\n *\n * Dispatches an action that modifies the {@link State.columnWidths columnWidths} in the state.\n */\n\n applyColumnAutoSize() {\n this.#dispatch(actions.actionColumnAutoSize(this, this.parent.getDomContainer()!));\n }\n\n /**\n * Determines if autosize is enabled for this column.\n */\n get isAutoSizable() {\n return this.field.autosize && !this.hidden && this.cellRenderer !== RICH_TEXT;\n }\n\n /**\n * Determines whether hierarchical mode should be enabled for this column.\n */\n renderDisplayMode() {\n const { meta } = this.parent;\n const { hierarchicalInfo } = this.field;\n\n return hierarchicalInfo?.materializedPathId && meta.grouping && !meta.editing;\n }\n\n /**\n * Retrieves the personalized width of the column, sourced from either\n * {@link RsProps.persistedInfo persistedInfo} or the current\n * {@link State.personalization personalized state}.\n *\n * @returns The personalized width of the column.\n */\n\n getPersonalizedWidth() {\n let columnWidths: State['columnWidths'] = {};\n if (this.#rsProps.persistedInfo) {\n columnWidths = this.#rsProps.persistedInfo.columnWidths;\n } else {\n const { active, allPersonalizations } = this.parent.state?.personalization ?? {};\n columnWidths = allPersonalizations?.[active!]?.personalizationState?.columnWidths;\n }\n return columnWidths?.[this.field.id];\n }\n}\n"]}