impact-nova 2.1.0-alpha.1 → 2.1.0-alpha.10

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 (249) hide show
  1. package/dist/components/data/ag-grid-react/ag-grid-tooltip-overflow.d.ts +3 -0
  2. package/dist/components/data/ag-grid-react/ag-grid-tooltip-overflow.js +6 -0
  3. package/dist/components/data/ag-grid-react/ag-grid.types.d.ts +21 -21
  4. package/dist/components/data/ag-grid-react/build-ag-grid-theme.d.ts +3 -0
  5. package/dist/components/data/ag-grid-react/cell-renderers/date-display-renderer.js +1 -1
  6. package/dist/components/data/ag-grid-react/cell-renderers/default-text-cell-renderer.d.ts +1 -2
  7. package/dist/components/data/ag-grid-react/cell-renderers/default-text-cell-renderer.js +12 -6
  8. package/dist/components/data/ag-grid-react/cell-renderers/editors/input-cell-editor.js +58 -58
  9. package/dist/components/data/ag-grid-react/cell-renderers/editors/split-cell-editor.js +73 -94
  10. package/dist/components/data/ag-grid-react/cell-renderers/editors/split-cell-focus.d.ts +53 -0
  11. package/dist/components/data/ag-grid-react/cell-renderers/editors/split-cell-focus.js +98 -0
  12. package/dist/components/data/ag-grid-react/cell-renderers/editors/textarea-cell-editor.js +19 -19
  13. package/dist/components/data/ag-grid-react/cell-renderers/select-display-renderer.js +1 -1
  14. package/dist/components/data/ag-grid-react/cell-renderers/switch-display-renderer.js +15 -15
  15. package/dist/components/data/ag-grid-react/column-indicator-sync-bus.d.ts +9 -0
  16. package/dist/components/data/ag-grid-react/column-indicator-sync-bus.js +15 -0
  17. package/dist/components/data/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.js +1 -1
  18. package/dist/components/data/ag-grid-react/headers/advanced-filter/column-filter-section.js +33 -33
  19. package/dist/components/data/ag-grid-react/headers/column-menu/column-settings-menu.js +80 -73
  20. package/dist/components/data/ag-grid-react/headers/components/header-info.js +66 -62
  21. package/dist/components/data/ag-grid-react/headers/components/info-modal.js +6 -6
  22. package/dist/components/data/ag-grid-react/headers/components/section-renderers.js +18 -18
  23. package/dist/components/data/ag-grid-react/headers/custom-header.js +112 -108
  24. package/dist/components/data/ag-grid-react/headers/custom-inner-header-group.d.ts +12 -0
  25. package/dist/components/data/ag-grid-react/headers/custom-inner-header-group.js +31 -0
  26. package/dist/components/data/ag-grid-react/headers/header-search-active-state.d.ts +10 -0
  27. package/dist/components/data/ag-grid-react/headers/header-search-active-state.js +38 -0
  28. package/dist/components/data/ag-grid-react/headers/header-search-input.js +87 -91
  29. package/dist/components/data/ag-grid-react/index.d.ts +3 -1
  30. package/dist/components/data/ag-grid-react/index.js +191 -167
  31. package/dist/components/data/ag-grid-react/notify-column-indicator-sync.d.ts +7 -0
  32. package/dist/components/data/ag-grid-react/notify-column-indicator-sync.js +7 -0
  33. package/dist/components/data/ag-grid-react/sync-ag-grid-theme-mode.d.ts +3 -0
  34. package/dist/components/data/ag-grid-react/sync-ag-grid-theme-mode.js +10 -0
  35. package/dist/components/data/ag-grid-react/theme.d.ts +1 -0
  36. package/dist/components/data/ag-grid-react/theme.js +92 -18
  37. package/dist/components/data/ag-grid-react/use-ag-grid-truncation-tooltip.d.ts +5 -0
  38. package/dist/components/data/ag-grid-react/use-ag-grid-truncation-tooltip.js +13 -0
  39. package/dist/components/data/ag-grid-react/useGridAutoSizeStrategyOnResize.js +8 -5
  40. package/dist/components/data/data-table/build-column-tree-from-grid.d.ts +14 -0
  41. package/dist/components/data/data-table/build-column-tree-from-grid.js +95 -0
  42. package/dist/components/data/data-table/column-indicator.d.ts +1 -1
  43. package/dist/components/data/data-table/column-indicator.js +15 -11
  44. package/dist/components/data/data-table/data-table-column-apply.d.ts +29 -0
  45. package/dist/components/data/data-table/data-table-column-apply.js +102 -0
  46. package/dist/components/data/data-table/data-table-column-def-pin.d.ts +30 -0
  47. package/dist/components/data/data-table/data-table-column-def-pin.js +66 -0
  48. package/dist/components/data/data-table/data-table-column-list-sync.d.ts +8 -0
  49. package/dist/components/data/data-table/data-table-column-list-sync.js +15 -0
  50. package/dist/components/data/data-table/data-table-column-list.d.ts +14 -4
  51. package/dist/components/data/data-table/data-table-column-list.js +74 -277
  52. package/dist/components/data/data-table/data-table-constants.d.ts +3 -4
  53. package/dist/components/data/data-table/data-table-context.d.ts +3 -6
  54. package/dist/components/data/data-table/data-table-context.js +21 -10
  55. package/dist/components/data/data-table/data-table-saved-views.js +61 -61
  56. package/dist/components/data/data-table/data-table-sheet-portal-store.d.ts +13 -0
  57. package/dist/components/data/data-table/data-table-sheet-portal-store.js +36 -0
  58. package/dist/components/data/data-table/data-table-sheet.d.ts +3 -6
  59. package/dist/components/data/data-table/data-table-sheet.js +19 -19
  60. package/dist/components/data/data-table/data-table-view-menu.js +40 -40
  61. package/dist/components/data/data-table/data-table.d.ts +8 -10
  62. package/dist/components/data/data-table/data-table.js +141 -109
  63. package/dist/components/data/data-table/data-table.types.d.ts +41 -0
  64. package/dist/components/data/data-table/index.js +28 -27
  65. package/dist/components/data/data-table/indicator-legend.d.ts +13 -2
  66. package/dist/components/data/data-table/indicator-legend.js +19 -16
  67. package/dist/components/data/data-table/pin-switch.js +9 -9
  68. package/dist/components/data/data-table/use-data-table-column-list-sync.d.ts +16 -0
  69. package/dist/components/data/data-table/use-data-table-column-list-sync.js +225 -0
  70. package/dist/components/data/expandable-list-item/expandable-list-item-attributes.d.ts +8 -0
  71. package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +72 -0
  72. package/dist/components/data/expandable-list-item/expandable-list-item-context.d.ts +13 -0
  73. package/dist/components/data/expandable-list-item/expandable-list-item-context.js +25 -0
  74. package/dist/components/data/expandable-list-item/expandable-list-item-metrics.d.ts +6 -0
  75. package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +41 -0
  76. package/dist/components/data/expandable-list-item/expandable-list-item-parts.d.ts +31 -0
  77. package/dist/components/data/expandable-list-item/expandable-list-item-parts.js +233 -0
  78. package/dist/components/data/expandable-list-item/expandable-list-item-preset.d.ts +18 -0
  79. package/dist/components/data/expandable-list-item/expandable-list-item-preset.js +133 -0
  80. package/dist/components/data/expandable-list-item/expandable-list-item.d.ts +5 -0
  81. package/dist/components/data/{expandable-sku/expandable-sku.types.d.ts → expandable-list-item/expandable-list-item.types.d.ts} +7 -7
  82. package/dist/components/data/expandable-list-item/index.d.ts +5 -0
  83. package/dist/components/data/expandable-list-item/index.js +19 -0
  84. package/dist/components/data/nested-list/components/NestedListHeader.js +11 -11
  85. package/dist/components/data/nested-list/components/SortableItem.d.ts +3 -1
  86. package/dist/components/data/nested-list/components/SortableItem.js +111 -109
  87. package/dist/components/data/nested-list/nested-list-change-detection.d.ts +11 -0
  88. package/dist/components/data/nested-list/nested-list-change-detection.js +13 -0
  89. package/dist/components/data/nested-list/nested-list.js +107 -97
  90. package/dist/components/data-display/avatar/avatar.types.d.ts +2 -0
  91. package/dist/components/data-display/badge/badge.types.d.ts +2 -0
  92. package/dist/components/data-display/calendar/calendar-day-picker-classnames.js +11 -11
  93. package/dist/components/data-display/calendar/calendar-month-picker-panel.js +7 -7
  94. package/dist/components/data-display/calendar/calendar-week-number-cell.js +31 -31
  95. package/dist/components/data-display/calendar/calendar.d.ts +1 -1
  96. package/dist/components/data-display/calendar/calendar.js +194 -189
  97. package/dist/components/data-display/card/card.js +8 -8
  98. package/dist/components/data-display/chart/chart-palette.d.ts +16 -0
  99. package/dist/components/data-display/chart/chart-palette.js +28 -0
  100. package/dist/components/data-display/chart/chart.js +121 -115
  101. package/dist/components/data-display/chart/chart.types.d.ts +9 -0
  102. package/dist/components/data-display/chart/chart.utils.js +9 -6
  103. package/dist/components/data-display/chart/index.d.ts +1 -0
  104. package/dist/components/data-display/chart/index.js +15 -9
  105. package/dist/components/data-display/chart/resolve-highcharts-options.d.ts +3 -0
  106. package/dist/components/data-display/chart/resolve-highcharts-options.js +35 -0
  107. package/dist/components/data-display/skeleton/skeleton.js +6 -6
  108. package/dist/components/data-display/statistics-card/statistics-card.color.d.ts +6 -0
  109. package/dist/components/data-display/statistics-card/statistics-card.color.js +19 -0
  110. package/dist/components/data-display/statistics-card/statistics-card.hooks.js +50 -48
  111. package/dist/components/data-display/statistics-card/statistics-card.js +135 -154
  112. package/dist/components/feedback/alert-dialog/alert-dialog.js +10 -10
  113. package/dist/components/feedback/dialog/dialog.js +4 -4
  114. package/dist/components/feedback/drawer/drawer.js +30 -30
  115. package/dist/components/feedback/dropdown-menu/dropdown-menu.js +68 -55
  116. package/dist/components/feedback/popover/popover.js +8 -1
  117. package/dist/components/feedback/sheet/sheet.js +9 -9
  118. package/dist/components/feedback/sheet/sheet.variants.js +1 -1
  119. package/dist/components/feedback/toast/toast.js +83 -92
  120. package/dist/components/feedback/tooltip/tooltip.js +22 -22
  121. package/dist/components/feedback/tooltip/tooltip.variants.js +1 -1
  122. package/dist/components/flows/command-palette/command-palette-context.types.d.ts +5 -0
  123. package/dist/components/flows/command-palette/command-palette.d.ts +4 -16
  124. package/dist/components/flows/command-palette/command-palette.js +226 -239
  125. package/dist/components/flows/command-palette/command-palette.types.d.ts +9 -0
  126. package/dist/components/flows/command-palette/shortcut-overlay.js +6 -6
  127. package/dist/components/flows/command-palette/shortcut-settings.js +34 -34
  128. package/dist/components/flows/filter-panel/filter-panel.d.ts +3 -2
  129. package/dist/components/flows/filter-panel/filter-panel.js +99 -104
  130. package/dist/components/flows/filter-strip/filter-strip.js +36 -29
  131. package/dist/components/flows/filter-strip/filter-summary.js +43 -43
  132. package/dist/components/flows/filter-strip/filter-tag-list.js +52 -52
  133. package/dist/components/flows/notification-panel/notification-list.js +17 -17
  134. package/dist/components/flows/notification-panel/notification-panel.js +4 -4
  135. package/dist/components/flows/notification-panel/notification-panel.types.d.ts +3 -0
  136. package/dist/components/flows/wizard/wizard.js +29 -29
  137. package/dist/components/forms/choice-card/choice-card.d.ts +2 -2
  138. package/dist/components/forms/choice-card/choice-card.js +156 -166
  139. package/dist/components/forms/combobox/combobox.js +83 -83
  140. package/dist/components/forms/date-picker/date-picker.js +42 -41
  141. package/dist/components/forms/date-picker/date-range-picker.js +3 -3
  142. package/dist/components/forms/date-picker/month-picker.js +1 -1
  143. package/dist/components/forms/date-picker/month-range-picker.js +42 -42
  144. package/dist/components/forms/date-picker/week-picker.js +15 -15
  145. package/dist/components/forms/date-picker/week-range-picker.js +3 -3
  146. package/dist/components/forms/file-upload/file-upload.js +322 -206
  147. package/dist/components/forms/file-upload/file-upload.types.d.ts +17 -2
  148. package/dist/components/forms/input/input.js +8 -8
  149. package/dist/components/forms/input/input.variants.js +3 -3
  150. package/dist/components/forms/prompt/prompt.js +47 -48
  151. package/dist/components/forms/select/components/SelectAllRow.js +14 -14
  152. package/dist/components/forms/select/components/SelectMenuFooter.js +12 -12
  153. package/dist/components/forms/select/components/SelectMenuHeader.js +44 -44
  154. package/dist/components/forms/select/components/SelectMenuListBody.js +22 -22
  155. package/dist/components/forms/select/components/SelectMenuPanel.d.ts +1 -2
  156. package/dist/components/forms/select/components/SelectMenuPanel.js +22 -24
  157. package/dist/components/forms/select/components/SelectOptionRow.js +62 -62
  158. package/dist/components/forms/select/components/SelectTrigger.d.ts +9 -6
  159. package/dist/components/forms/select/components/SelectTrigger.js +119 -116
  160. package/dist/components/forms/select/components/Submenu.js +7 -7
  161. package/dist/components/forms/select/hooks/useSelectKeyboardHandlers.d.ts +1 -1
  162. package/dist/components/forms/select/hooks/useSelectValueState.d.ts +19 -0
  163. package/dist/components/forms/select/hooks/useSelectValueState.js +41 -0
  164. package/dist/components/forms/select/index.js +4 -3
  165. package/dist/components/forms/select/select.d.ts +5 -4
  166. package/dist/components/forms/select/select.js +190 -182
  167. package/dist/components/forms/select/select.types.d.ts +95 -203
  168. package/dist/components/forms/select/select.variants.js +5 -5
  169. package/dist/components/forms/select/utils/select.d.ts +2 -1
  170. package/dist/components/forms/select/utils/select.js +47 -37
  171. package/dist/components/forms/slider/slider.js +17 -17
  172. package/dist/components/forms/smart-input/smart-input.js +49 -49
  173. package/dist/components/forms/textarea/textarea.js +25 -25
  174. package/dist/components/layout/breadcrumb/breadcrumb.js +112 -118
  175. package/dist/components/layout/header/header.d.ts +5 -17
  176. package/dist/components/layout/header/header.js +127 -123
  177. package/dist/components/layout/header/header.types.d.ts +3 -0
  178. package/dist/components/layout/horizontal-scroller/index.d.ts +1 -0
  179. package/dist/components/layout/horizontal-scroller/index.js +3 -2
  180. package/dist/components/layout/sidebar/sidebar.d.ts +10 -51
  181. package/dist/components/layout/sidebar/sidebar.js +19 -17
  182. package/dist/components/layout/sidebar/sidebar.types.d.ts +35 -1
  183. package/dist/components/layout/sidebar/sidebar.variants.js +1 -1
  184. package/dist/components/primitives/accordion/accordion.js +38 -41
  185. package/dist/components/primitives/button-group/button-group.js +32 -32
  186. package/dist/components/primitives/chips/chips.variants.js +5 -5
  187. package/dist/components/primitives/empty-container/empty-container.types.d.ts +3 -0
  188. package/dist/components/primitives/kbd/kbd.variants.js +4 -4
  189. package/dist/components/primitives/stepper/stepper.js +6 -6
  190. package/dist/components/primitives/tag/tag.variants.js +2 -2
  191. package/dist/components/ui/local-raster-icons/assets/excel-error-icon.webp.js +4 -0
  192. package/dist/components/ui/local-raster-icons/assets/file-upload-error.webp.js +4 -0
  193. package/dist/components/ui/local-raster-icons/rasterIcons.d.ts +2 -0
  194. package/dist/components/ui/local-raster-icons/rasterIcons.js +32 -22
  195. package/dist/components/ui/show.d.ts +10 -0
  196. package/dist/components/ui/show.js +7 -0
  197. package/dist/components/ui/show.types.d.ts +5 -0
  198. package/dist/i18n/defaultMessages.d.ts +19 -0
  199. package/dist/i18n/defaultMessages.js +27 -13
  200. package/dist/i18n/index.d.ts +1 -1
  201. package/dist/i18n/locales/de.js +14 -0
  202. package/dist/i18n/locales/es.js +14 -0
  203. package/dist/i18n/locales/hi.js +14 -0
  204. package/dist/i18n/locales/kn.js +14 -0
  205. package/dist/impact-nova-base.scss +14 -7
  206. package/dist/impact-nova-components.css +257 -21
  207. package/dist/impact-nova-tokens.scss +359 -179
  208. package/dist/impact-nova.css +1 -1
  209. package/dist/index.d.ts +3 -1
  210. package/dist/index.js +535 -493
  211. package/dist/lib/compose-refs.d.ts +8 -0
  212. package/dist/lib/compose-refs.js +14 -0
  213. package/dist/lib/primitives/create-component.d.ts +1 -1
  214. package/dist/lib/primitives/create-component.js +4 -4
  215. package/dist/lib/primitives/field.js +17 -18
  216. package/dist/lib/primitives/field.types.d.ts +8 -2
  217. package/dist/lib/resolve-design-token-color.d.ts +5 -0
  218. package/dist/lib/resolve-design-token-color.js +12 -0
  219. package/dist/lib/virtualized/index.d.ts +3 -0
  220. package/dist/lib/virtualized/index.js +33 -16
  221. package/dist/lib/virtualized/useVirtualizedList.d.ts +2 -0
  222. package/dist/lib/virtualized/useVirtualizedList.js +115 -109
  223. package/dist/lib/virtualized/virtualized-list-context.d.ts +12 -0
  224. package/dist/lib/virtualized/virtualized-list-context.js +21 -0
  225. package/dist/lib/virtualized/virtualized-list-parts.d.ts +50 -0
  226. package/dist/lib/virtualized/virtualized-list-parts.js +175 -0
  227. package/dist/lib/virtualized/virtualized-list-utils.d.ts +5 -0
  228. package/dist/lib/virtualized/virtualized-list-utils.js +6 -0
  229. package/dist/lib/virtualized/virtualized.types.d.ts +10 -0
  230. package/dist/llms/rules/ag-grid.js +1 -1
  231. package/dist/llms/rules/installation.js +1 -1
  232. package/dist/llms/rules/migration.js +1 -1
  233. package/dist/llms/rules/real-world-patterns.js +1 -1
  234. package/dist/llms/rules/requirements.js +1 -1
  235. package/dist/tailwind.config.js +320 -0
  236. package/dist/theme/tailwind-colors.js +201 -0
  237. package/dist/theme/tokens/chart-series-palette.json.d.ts +53 -0
  238. package/dist/theme/tokens/chart-series-palette.json.js +7 -0
  239. package/package.json +58 -270
  240. package/tailwind.config.d.ts +3 -0
  241. package/dist/components/data/ag-grid-react/headers/components/truncated-text.d.ts +0 -15
  242. package/dist/components/data/ag-grid-react/headers/components/truncated-text.js +0 -27
  243. package/dist/components/data/ag-grid-react/headers/custom-header-group.d.ts +0 -10
  244. package/dist/components/data/ag-grid-react/headers/custom-header-group.js +0 -47
  245. package/dist/components/data/expandable-sku/expandable-sku.d.ts +0 -38
  246. package/dist/components/data/expandable-sku/expandable-sku.js +0 -245
  247. package/dist/components/data/expandable-sku/index.d.ts +0 -2
  248. package/dist/components/data/expandable-sku/index.js +0 -4
  249. package/tailwind.config.js +0 -334
@@ -0,0 +1,3 @@
1
+ export type AgGridTooltipOverflowMode = "line-clamp" | "ellipsis";
2
+ /** Matches AG Grid `_isElementOverflowingCallback` (horizontal or vertical). */
3
+ export declare function isAgGridTextOverflowing(element: HTMLElement, mode?: AgGridTooltipOverflowMode): boolean;
@@ -0,0 +1,6 @@
1
+ function l(i, r = "line-clamp") {
2
+ return r === "ellipsis" ? i.clientWidth < i.scrollWidth : i.clientHeight < i.scrollHeight || i.clientWidth < i.scrollWidth;
3
+ }
4
+ export {
5
+ l as isAgGridTextOverflowing
6
+ };
@@ -1,5 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { ColDef, ColGroupDef, IHeaderParams, IHeaderGroupParams, Column, ValueFormatterParams } from 'ag-grid-community';
3
+ import { Theme } from 'ag-grid-enterprise';
3
4
  import { AgGridReactProps } from 'ag-grid-react';
4
5
  /** ColDef extended with Impact Nova runtime metadata set during column processing */
5
6
  export interface ImpactNovaColDef<TData = unknown> extends ColDef<TData> {
@@ -107,42 +108,41 @@ export interface InfoContent {
107
108
  sections: UISection[];
108
109
  }
109
110
  /**
110
- * Props for the AgGridWrapper component
111
+ * Props for `AgGridWrapper` — low-level AG Grid Enterprise surface.
112
+ *
113
+ * Forwards [`AgGridReact`](https://www.ag-grid.com/react-data-grid/grid-options/) props except `theme`
114
+ * (Impact Nova theme is applied internally). Application feature code should use
115
+ * `DataTable` / `DataTableContent` from `impact-nova/data-table` instead.
111
116
  */
112
117
  export interface AgGridWrapperProps<TData = unknown> extends Omit<AgGridReactProps<TData>, 'theme' | 'defaultColDef' | 'defaultColGroupDef'> {
113
- /**
114
- * Children to render inside the grid container
115
- */
118
+ /** Content rendered inside the grid container — rarely needed; use for overlays or custom chrome. */
116
119
  children?: ReactNode;
117
120
  /**
118
- * Default column definition (will be merged with wrapper defaults)
121
+ * Default settings applied to every column unless overridden in `columnDefs`.
122
+ * Common keys: `sortable`, `filter`, `resizable`, `flex`, `minWidth`.
123
+ * Merged with Impact Nova wrapper defaults (custom header, theme, formatters).
119
124
  */
120
125
  defaultColDef?: ColDef<TData>;
121
126
  /**
122
- * Default column group definition (will be merged with wrapper defaults)
127
+ * Default settings for column groups (nested header rows).
128
+ * Merged with wrapper defaults when using grouped column headers.
123
129
  */
124
130
  defaultColGroupDef?: ColGroupDef<TData>;
125
131
  /**
126
- * When true (default), DOM order matches visual order for screen readers.
127
- * Large planning grids should pass false for better column virtualization.
132
+ * When true (default), DOM order matches visual column order for screen readers.
133
+ * Set false on very large planning grids (10k+ columns) for better virtualization performance.
128
134
  */
129
135
  ensureDomOrder?: boolean;
130
136
  /**
131
- * Value formatter registry - maps formatter names to formatter functions
132
- * Allows backend to specify formatters by string name (e.g., "currency", "percentage")
133
- *
134
- * @example
135
- * ```typescript
136
- * valueFormatters={{
137
- * currency: (params) => `$${params.value.toFixed(2)}`,
138
- * percentage: (params) => `${params.value}%`,
139
- * }}
140
- *
141
- * // Backend can then send:
142
- * { field: 'price', valueFormatter: 'currency' }
143
- * ```
137
+ * Map of formatter name function. Lets backend column defs reference formatters by string key.
138
+ * Example: `{ currency: (p) => '$' + p.value }` then column def uses `valueFormatter: 'currency'`.
144
139
  */
145
140
  valueFormatters?: Record<string, (params: ValueFormatterParams) => string>;
141
+ /**
142
+ * Theme Builder preview only — resolves AG Grid params from a scoped DOM node.
143
+ * Application code must rely on document CSS variables and the default theme.
144
+ */
145
+ themeOverride?: Theme;
146
146
  }
147
147
  /**
148
148
  * Filter operators for advanced filtering.
@@ -0,0 +1,3 @@
1
+ import { Theme } from 'ag-grid-enterprise';
2
+ /** Resolve AG Grid theme params from live CSS variables on the preview scope. */
3
+ export declare function buildAgGridThemeFromScope(scope: HTMLElement | null): Theme;
@@ -44,7 +44,7 @@ const D = (t, i) => {
44
44
  className: `flex w-full items-center justify-between rounded-[8px] px-1.5 h-7 ${a ? "bg-canvas-elevated cursor-pointer" : "bg-inherit"}`,
45
45
  children: [
46
46
  /* @__PURE__ */ n("span", { className: `truncate text-sm font-medium text-content ${f ? "text-content-empty" : ""}`, children: f ? g : u }),
47
- a && /* @__PURE__ */ n("span", { className: "h-3.5 w-3.5 shrink-0 text-content-muted", children: /* @__PURE__ */ n(y, { className: "h-3.5 w-3.5" }) })
47
+ a && /* @__PURE__ */ n("span", { className: "h-3.5 w-3.5 shrink-0 text-content-icon", children: /* @__PURE__ */ n(y, { className: "h-3.5 w-3.5" }) })
48
48
  ]
49
49
  }
50
50
  )
@@ -1,6 +1,5 @@
1
1
  import { ICellRendererParams } from 'ag-grid-community';
2
2
  /**
3
- * Lightweight default cell renderer for AgGridWrapper.
4
- * Stable module-level reference — avoids inline function allocation in defaultColDef.
3
+ * Default text cell renderer truncation + AG Grid tooltip when overflowed.
5
4
  */
6
5
  export declare const DefaultTextCellRenderer: import('react').NamedExoticComponent<ICellRendererParams<any, any, any>>;
@@ -1,9 +1,15 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { memo as r } from "react";
3
- const a = r(function(e) {
4
- const l = e.valueFormatted ?? (e.value != null ? String(e.value) : "");
5
- return /* @__PURE__ */ t("span", { className: "truncate block w-full", children: l });
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { memo as u, useRef as f, useEffect as i } from "react";
3
+ import { isAgGridTextOverflowing as s } from "../ag-grid-tooltip-overflow.js";
4
+ const x = u(function(e) {
5
+ const r = f(null), t = e.valueFormatted ?? (e.value != null ? String(e.value) : ""), { setTooltip: l } = e;
6
+ return i(() => {
7
+ t.trim() && l(t, () => {
8
+ const n = r.current;
9
+ return n ? s(n, "ellipsis") : !1;
10
+ });
11
+ }, [t, l]), /* @__PURE__ */ o("span", { ref: r, className: "truncate block w-full", children: t });
6
12
  });
7
13
  export {
8
- a as DefaultTextCellRenderer
14
+ x as DefaultTextCellRenderer
9
15
  };
@@ -1,61 +1,61 @@
1
1
  import { jsxs as Z, jsx as m } from "react/jsx-runtime";
2
- import ee, { forwardRef as te, useRef as d, useMemo as $, useState as P, useImperativeHandle as ne, useEffect as C, useCallback as E } from "react";
2
+ import ee, { forwardRef as te, useRef as d, useMemo as O, useState as P, useImperativeHandle as ne, useEffect as C, useCallback as E } from "react";
3
3
  import { createPortal as re } from "react-dom";
4
4
  function oe(r) {
5
5
  if ("options" in r && r.options) return r.options;
6
6
  const f = [];
7
7
  if (!r || r.step <= 0 || r.min > r.max) return f;
8
8
  for (let n = r.min; n <= r.max; n += r.step) {
9
- const v = Math.round(n * 1e10) / 1e10;
10
- f.push(String(v));
9
+ const x = Math.round(n * 1e10) / 1e10;
10
+ f.push(String(x));
11
11
  }
12
12
  return f;
13
13
  }
14
14
  function ae(r, f) {
15
15
  if (!f) return r;
16
16
  const n = f.toLowerCase();
17
- return r.filter((v) => v.toLowerCase().includes(n));
17
+ return r.filter((x) => x.toLowerCase().includes(n));
18
18
  }
19
- const O = te((r, f) => {
19
+ const K = te((r, f) => {
20
20
  const {
21
21
  value: n,
22
- placeholder: v,
23
- min: K,
24
- max: F,
25
- step: U,
22
+ placeholder: x,
23
+ min: F,
24
+ max: U,
25
+ step: _,
26
26
  maxLength: D,
27
27
  onValueChange: p,
28
28
  colDef: q,
29
29
  className: z,
30
30
  autocompleteRule: w
31
- } = r, l = q?.cellDataType === "number", G = w ? "text" : l ? "number" : "text", i = d(null), a = !!w, S = $(
31
+ } = r, u = q?.cellDataType === "number", G = w ? "text" : u ? "number" : "text", i = d(null), a = !!w, S = O(
32
32
  () => w ? oe(w) : [],
33
33
  [w]
34
- ), [c, J] = P(""), [b, x] = P(-1), M = d(-1);
34
+ ), [c, J] = P(""), [b, v] = P(-1), M = d(-1);
35
35
  M.current = b;
36
- const g = d("keyboard"), H = d(null), A = d(null), L = d(null), I = d(!1), [R, Q] = P(null), s = $(() => ae(S, c), [S, c]), _ = d(s);
37
- _.current = s;
36
+ const g = d("keyboard"), H = d(null), A = d(null), L = d(null), I = d(!1), [R, Q] = P(null), s = O(() => ae(S, c), [S, c]), B = d(s);
37
+ B.current = s;
38
38
  const y = n && typeof n == "object" && "value" in n, N = y ? n.cellMetadata : void 0, W = y ? n.value : n;
39
39
  ne(f, () => ({
40
40
  getValue() {
41
41
  if (a) {
42
- const u = H.current;
43
- if (u == null)
42
+ const l = H.current;
43
+ if (l == null)
44
44
  return n;
45
- const h = Number(u), T = l && !isNaN(h) ? h : u;
45
+ const h = Number(l), $ = u && !isNaN(h) ? h : l;
46
46
  return y ? {
47
- value: T,
47
+ value: $,
48
48
  ...N !== void 0 && { cellMetadata: N }
49
- } : T;
49
+ } : $;
50
50
  }
51
51
  const t = i.current?.value;
52
52
  let o;
53
- if (l)
53
+ if (u)
54
54
  if (!t || t === "" || t === "-")
55
55
  o = null;
56
56
  else {
57
- const u = Number(t);
58
- o = isNaN(u) ? null : u;
57
+ const l = Number(t);
58
+ o = isNaN(l) ? null : l;
59
59
  }
60
60
  else
61
61
  o = t === "" ? null : t;
@@ -70,18 +70,18 @@ const O = te((r, f) => {
70
70
  isCancelAfterEnd() {
71
71
  return !1;
72
72
  }
73
- }), [a, l, y, N, n]), C(() => {
73
+ }), [a, u, y, N, n]), C(() => {
74
74
  if (i.current) {
75
75
  const e = n && typeof n == "object" && "value" in n ? n.value : n;
76
- if (i.current.value = e != null ? String(e) : "", l) {
76
+ if (i.current.value = e != null ? String(e) : "", u) {
77
77
  const t = i.current, o = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value");
78
78
  Object.defineProperty(t, "value", {
79
79
  get() {
80
- const u = this.valueAsNumber;
81
- return isNaN(u) ? o.get.call(this) : u;
80
+ const l = this.valueAsNumber;
81
+ return isNaN(l) ? o.get.call(this) : l;
82
82
  },
83
- set(u) {
84
- o.set.call(this, u);
83
+ set(l) {
84
+ o.set.call(this, l);
85
85
  },
86
86
  configurable: !0
87
87
  });
@@ -90,16 +90,16 @@ const O = te((r, f) => {
90
90
  }
91
91
  return () => {
92
92
  };
93
- }, [n, l, r.suppressAutoFocus]);
93
+ }, [n, u, r.suppressAutoFocus]);
94
94
  const j = E(() => {
95
95
  I.current || (I.current = !0, r.stopEditing?.());
96
96
  }, [r]), V = E((e) => {
97
97
  if (H.current = e, p) {
98
- const t = Number(e), o = l && !isNaN(t) ? t : e;
98
+ const t = Number(e), o = u && !isNaN(t) ? t : e;
99
99
  p(o);
100
100
  }
101
101
  I.current = !0, r.stopEditing?.();
102
- }, [l, p, r]), k = d(V);
102
+ }, [u, p, r]), k = d(V);
103
103
  k.current = V, C(() => {
104
104
  if (a && L.current) {
105
105
  const e = L.current.getBoundingClientRect();
@@ -108,9 +108,9 @@ const O = te((r, f) => {
108
108
  }, [a]), C(() => {
109
109
  if (!a) return;
110
110
  const e = k, t = (o) => {
111
- const u = o.target.closest?.("[data-autocomplete-value]");
112
- if (u && A.current?.contains(u)) {
113
- const h = u.getAttribute("data-autocomplete-value");
111
+ const l = o.target.closest?.("[data-autocomplete-value]");
112
+ if (l && A.current?.contains(l)) {
113
+ const h = l.getAttribute("data-autocomplete-value");
114
114
  h != null && (o.stopImmediatePropagation(), o.preventDefault(), e.current(h));
115
115
  }
116
116
  };
@@ -119,11 +119,11 @@ const O = te((r, f) => {
119
119
  a && b >= 0 && A.current && A.current.querySelectorAll("[data-autocomplete-item]")[b]?.scrollIntoView({ block: "nearest" });
120
120
  }, [b, a]), C(() => {
121
121
  if (!a || !c) {
122
- x(-1);
122
+ v(-1);
123
123
  return;
124
124
  }
125
125
  const e = s.findIndex((t) => t.toLowerCase() === c.toLowerCase());
126
- g.current = "mouse", x(e >= 0 ? e : -1);
126
+ g.current = "mouse", v(e >= 0 ? e : -1);
127
127
  }, [a, c, s]);
128
128
  const X = E(() => {
129
129
  const e = i.current?.value;
@@ -132,34 +132,34 @@ const O = te((r, f) => {
132
132
  return;
133
133
  }
134
134
  if (!(D && e && e.length > D)) {
135
- if (l && i.current) {
135
+ if (u && i.current) {
136
136
  const t = i.current.valueAsNumber;
137
137
  isNaN(t) || i.current.setAttribute("data-value", String(t));
138
138
  }
139
139
  p?.(e);
140
140
  }
141
- }, [D, p, l, a]), B = E((e) => {
141
+ }, [D, p, u, a]), T = E((e) => {
142
142
  if (a) {
143
143
  if (e.key === "Escape") {
144
144
  e.stopPropagation(), j();
145
145
  return;
146
146
  }
147
147
  if (e.key === "ArrowDown") {
148
- e.preventDefault(), e.stopPropagation(), g.current = "keyboard", x((t) => t < s.length - 1 ? t + 1 : 0);
148
+ e.preventDefault(), e.stopPropagation(), g.current = "keyboard", v((t) => t < s.length - 1 ? t + 1 : 0);
149
149
  return;
150
150
  }
151
151
  if (e.key === "ArrowUp") {
152
- e.preventDefault(), e.stopPropagation(), g.current = "keyboard", x((t) => t > 0 ? t - 1 : s.length - 1);
152
+ e.preventDefault(), e.stopPropagation(), g.current = "keyboard", v((t) => t > 0 ? t - 1 : s.length - 1);
153
153
  return;
154
154
  }
155
155
  if (e.key === "Enter" || e.key === "Tab") {
156
156
  e.preventDefault(), e.stopPropagation(), e.nativeEvent.stopImmediatePropagation();
157
- const t = M.current, o = _.current;
157
+ const t = M.current, o = B.current;
158
158
  if (t >= 0 && t < o.length)
159
159
  k.current(o[t]);
160
160
  else {
161
- const u = o.find((h) => h.toLowerCase() === c.toLowerCase());
162
- u ? k.current(u) : j();
161
+ const l = o.find((h) => h.toLowerCase() === c.toLowerCase());
162
+ l ? k.current(l) : j();
163
163
  }
164
164
  return;
165
165
  }
@@ -190,25 +190,25 @@ const O = te((r, f) => {
190
190
  {
191
191
  ref: L,
192
192
  className: `w-full h-full flex items-center ag-cell-inner-padding in-ag-editable-cell-highlight ${z ?? ""}`,
193
- onKeyDownCapture: a ? B : void 0,
193
+ onKeyDownCapture: a ? T : void 0,
194
194
  children: [
195
195
  /* @__PURE__ */ m(
196
196
  "div",
197
197
  {
198
- className: `flex w-full items-center rounded-[8px] bg-canvas-elevated px-1.5 h-7 ${l ? "justify-end text-right" : ""}`,
198
+ className: `flex w-full items-center rounded-[8px] bg-canvas-elevated px-1.5 h-7 ${u ? "justify-end text-right" : ""}`,
199
199
  children: /* @__PURE__ */ m(
200
200
  "input",
201
201
  {
202
202
  ref: i,
203
203
  type: G,
204
204
  onChange: X,
205
- onKeyDown: a ? void 0 : B,
205
+ onKeyDown: a ? void 0 : T,
206
206
  onBlur: Y,
207
- placeholder: v,
208
- className: `flex h-full w-full bg-transparent p-0 text-sm font-medium text-content outline-none placeholder:font-medium placeholder:text-content-empty ${l ? "text-right" : ""}`,
209
- min: a ? void 0 : K,
210
- max: a ? void 0 : F,
211
- step: a ? void 0 : U
207
+ placeholder: x,
208
+ className: `flex h-full w-full bg-transparent p-0 text-sm font-medium text-content outline-none placeholder:font-medium placeholder:text-content-empty ${u ? "text-right" : ""}`,
209
+ min: a ? void 0 : F,
210
+ max: a ? void 0 : U,
211
+ step: a ? void 0 : _
212
212
  }
213
213
  )
214
214
  }
@@ -218,7 +218,7 @@ const O = te((r, f) => {
218
218
  "div",
219
219
  {
220
220
  ref: A,
221
- className: "fixed z-[9999] overflow-hidden rounded-[12px] bg-white text-base shadow-[0px_1px_6px_0px_rgba(26,39,124,0.14)] focus:outline-none sm:text-sm flex flex-col border-none",
221
+ className: "fixed z-[9999] overflow-hidden rounded-[12px] bg-canvas-elevated text-base shadow-elevation-select focus:outline-none sm:text-sm flex flex-col border-none",
222
222
  style: { top: R.top, left: R.left, width: R.width, maxHeight: 250 },
223
223
  children: /* @__PURE__ */ m(
224
224
  "div",
@@ -227,10 +227,10 @@ const O = te((r, f) => {
227
227
  style: { maxHeight: 240, overscrollBehavior: "contain" },
228
228
  role: "listbox",
229
229
  onMouseLeave: () => {
230
- g.current = "mouse", x(-1);
230
+ g.current = "mouse", v(-1);
231
231
  },
232
- children: s.length === 0 ? /* @__PURE__ */ m("div", { className: "flex items-center justify-center py-6 text-sm text-gray-500", children: "No options found" }) : s.map((e, t) => {
233
- const o = t === b, u = e === String(W ?? "");
232
+ children: s.length === 0 ? /* @__PURE__ */ m("div", { className: "flex items-center justify-center py-6 text-sm text-content-secondary", children: "No options found" }) : s.map((e, t) => {
233
+ const o = t === b, l = e === String(W ?? "");
234
234
  return /* @__PURE__ */ m(
235
235
  "div",
236
236
  {
@@ -241,10 +241,10 @@ const O = te((r, f) => {
241
241
  "data-autocomplete-item": !0,
242
242
  role: "option",
243
243
  "aria-selected": o,
244
- className: `cursor-default select-none py-[6px] px-3 flex items-center ${l ? "justify-end text-right" : "justify-between"} transition-colors rounded-md ${o && g.current === "keyboard" ? "ring-2 ring-inset ring-primary bg-accent text-content" : o && g.current === "mouse" ? "bg-muted text-content" : u ? "bg-accent text-content" : "text-content hover:bg-muted cursor-pointer"}`,
244
+ className: `cursor-default select-none py-[6px] px-3 flex items-center ${u ? "justify-end text-right" : "justify-between"} transition-colors rounded-md ${o && g.current === "keyboard" ? "ring-2 ring-inset ring-primary bg-accent text-content" : o && g.current === "mouse" ? "bg-muted text-content" : l ? "bg-accent text-content" : "text-content hover:bg-muted cursor-pointer"}`,
245
245
  "data-autocomplete-value": e,
246
246
  onMouseEnter: () => {
247
- g.current = "mouse", x(t);
247
+ g.current = "mouse", v(t);
248
248
  },
249
249
  children: /* @__PURE__ */ m("span", { className: "text-sm", children: e })
250
250
  }
@@ -263,8 +263,8 @@ const O = te((r, f) => {
263
263
  }
264
264
  );
265
265
  });
266
- O.displayName = "InputCellEditor";
267
- const se = ee.memo(O, () => !0);
266
+ K.displayName = "InputCellEditor";
267
+ const se = ee.memo(K, () => !0);
268
268
  export {
269
269
  se as InputCellEditor
270
270
  };
@@ -1,127 +1,106 @@
1
- import { jsx as I } from "react/jsx-runtime";
2
- import { forwardRef as $, useMemo as x, useEffect as R, useImperativeHandle as B, useState as G, useCallback as H } from "react";
3
- import { resolveCellEditable as D, resolveValueFormatter as q, applyValueFormatter as z } from "../cell-renderer-utils.js";
4
- function Y() {
1
+ import { jsx as C } from "react/jsx-runtime";
2
+ import { forwardRef as z, useState as F, useImperativeHandle as B, useEffect as H, useMemo as L, useCallback as M } from "react";
3
+ import { resolveValueFormatter as q, applyValueFormatter as J, resolveCellEditable as I } from "../cell-renderer-utils.js";
4
+ import { initializeSplitCellFocusSession as Q } from "./split-cell-focus.js";
5
+ function X() {
5
6
  return document;
6
7
  }
7
- function A(g, _, l, m, r) {
8
- const s = l, f = typeof m?.editable == "boolean" ? m.editable : void 0, C = g[_], c = C?.field?.split(".")?.pop(), n = c ? r?.[c] : void 0;
9
- return D(f, C?.editable, s, n);
8
+ function Y(p, w, a, u, r) {
9
+ const n = a, s = typeof u?.editable == "boolean" ? u.editable : void 0, f = p[w], i = f?.field?.split(".")?.pop(), l = i ? r?.[i] : void 0;
10
+ return I(s, f?.editable, n, l);
10
11
  }
11
- const J = $((g, _) => {
12
- const { splits: l, commonParams: m, data: r, node: s, api: f, column: C, context: c, value: n, colDef: i, valueFormatter: U } = g, S = x(() => document.__splitCellLastClickY == null, []), M = x(() => document.__splitCellLastWasEditable !== !1, []), v = x(() => {
13
- let e = 0, t = !0, a = !1, o;
14
- try {
15
- const d = g.eGridCell;
16
- if (!d || !l?.length)
17
- return { index: e, wasEditable: t, clearClickY: a, activeIndex: o };
18
- if (S) {
19
- const u = Y().__splitCellLastActiveIndex;
20
- if (u != null && u >= 0 && u < l.length)
21
- return e = u, t = A(l, u, r, i, n), { index: e, wasEditable: t, clearClickY: a, activeIndex: o };
22
- for (let p = 0; p < l.length; p++)
23
- if (A(l, p, r, i, n))
24
- return e = p, t = !0, { index: e, wasEditable: t, clearClickY: a, activeIndex: o };
25
- return { index: 0, wasEditable: !1, clearClickY: a, activeIndex: o };
26
- }
27
- const h = Y().__splitCellLastClickY;
28
- if (h == null)
29
- return { index: e, wasEditable: t, clearClickY: a, activeIndex: o };
30
- const w = d.getBoundingClientRect(), K = h - w.top, E = w.height / l.length, F = Math.floor(K / E);
31
- return e = Math.max(0, Math.min(F, l.length - 1)), a = !0, o = e, t = A(l, e, r, i, n), { index: e, wasEditable: t, clearClickY: a, activeIndex: o };
32
- } catch {
33
- return { index: 0, wasEditable: !0, clearClickY: !1, activeIndex: void 0 };
34
- }
35
- }, [l, g, S, r, i, n]);
36
- R(() => {
37
- const e = Y();
38
- v.clearClickY && (e.__splitCellLastClickY = void 0), v.activeIndex != null && (e.__splitCellLastActiveIndex = v.activeIndex), e.__splitCellLastWasEditable = v.wasEditable;
39
- }, [v]);
40
- const k = v.index, y = x(() => {
41
- if (!l?.length) return !1;
42
- const e = l[k];
43
- if (!e) return !1;
44
- const t = r, a = typeof i?.editable == "boolean" ? i.editable : void 0, o = e.field?.split(".")?.pop(), d = o ? n?.[o] : void 0;
45
- return !D(a, e.editable, t, d);
46
- }, [l, k, r, i, n]) || S && !M;
47
- B(_, () => ({
12
+ const Z = z((p, w) => {
13
+ const { splits: a, commonParams: u, data: r, node: n, api: s, column: f, context: i, value: l, colDef: o, valueFormatter: U, eventKey: D } = p, [N] = F(() => {
14
+ const e = p.eGridCell;
15
+ return Q({
16
+ cellElement: e,
17
+ splits: a,
18
+ eventKey: D,
19
+ data: r,
20
+ colDef: o,
21
+ value: l,
22
+ documentState: X(),
23
+ resolveSplitEditable: Y
24
+ });
25
+ }), { targetSplitIndex: k, isKeyboardEntry: A, lastWasEditable: P, targetIsNonEditable: R } = N, v = R || A && !P;
26
+ B(w, () => ({
48
27
  getValue() {
49
- const e = i?.field;
50
- return e && s?.data ? s.data[e] : n;
28
+ const e = o?.field;
29
+ return e && n?.data ? n.data[e] : l;
51
30
  },
52
31
  isCancelBeforeStart() {
53
- return y;
32
+ return v;
54
33
  },
55
34
  isCancelAfterEnd() {
56
35
  return !1;
57
36
  }
58
- }), [i, s, n, y]), R(() => {
59
- y && setTimeout(() => {
60
- f?.stopEditing();
37
+ }), [o, n, l, v]), H(() => {
38
+ v && setTimeout(() => {
39
+ s?.stopEditing();
61
40
  }, 0);
62
- }, [y, f]);
63
- const j = x(() => l?.map((e) => {
64
- const t = e?.field?.split(".")?.pop() ?? "", a = n?.[t]?.value;
65
- return { valueKey: t, field: e.field, newValue: a };
66
- }) ?? [], [l, n]), [V, O] = G(j), P = H((e) => {
67
- const t = V.find((b) => b.field === e);
68
- if (!t || !i.field) return;
69
- const a = n?.[t.valueKey]?.value;
70
- if (String(t.newValue ?? "") === String(a ?? ""))
41
+ }, [v, s]);
42
+ const j = L(() => a?.map((e) => {
43
+ const t = e?.field?.split(".")?.pop() ?? "", d = l?.[t]?.value;
44
+ return { valueKey: t, field: e.field, newValue: d };
45
+ }) ?? [], [a, l]), [g, O] = F(j), $ = M((e) => {
46
+ const t = g.find((b) => b.field === e);
47
+ if (!t || !o.field) return;
48
+ const d = l?.[t.valueKey]?.value;
49
+ if (String(t.newValue ?? "") === String(d ?? ""))
71
50
  return;
72
51
  document.__splitCellLastWasEditable = !0;
73
- const o = {
74
- api: f,
75
- colDef: i,
76
- column: C,
77
- context: c,
52
+ const c = {
53
+ api: s,
54
+ colDef: o,
55
+ column: f,
56
+ context: i,
78
57
  data: r,
79
- field: i.field,
80
- node: s,
81
- rowIndex: s?.rowIndex ?? null,
82
- rowPinned: s?.rowPinned ?? void 0,
58
+ field: o.field,
59
+ node: n,
60
+ rowIndex: n?.rowIndex ?? null,
61
+ rowPinned: n?.rowPinned ?? void 0,
83
62
  source: "edit",
84
63
  type: "cellValueChanged",
85
64
  currentCellUpdate: t,
86
65
  newValue: { [t.valueKey]: { value: t.newValue } },
87
- oldValue: { [t.valueKey]: { value: n?.[t.valueKey]?.value } },
66
+ oldValue: { [t.valueKey]: { value: l?.[t.valueKey]?.value } },
88
67
  value: { [t.valueKey]: { value: t.newValue } }
89
- }, d = n?.[t.valueKey] ?? {};
90
- s.setDataValue(i.field, { ...n, [t.valueKey]: { ...d, value: t.newValue } }), c?.onCellUpdate?.(o);
91
- }, [V, f, i, C, c, r, s, n]), W = (e) => {
68
+ }, m = l?.[t.valueKey] ?? {};
69
+ n.setDataValue(o.field, { ...l, [t.valueKey]: { ...m, value: t.newValue } }), i?.onCellUpdate?.(c);
70
+ }, [g, s, o, f, i, r, n, l]), G = (e) => {
92
71
  if (typeof e == "string") {
93
- const t = f?.getGridOption("components");
94
- return c?.frameworkComponents?.[e] || t?.[e];
72
+ const t = s?.getGridOption("components");
73
+ return i?.frameworkComponents?.[e] || t?.[e];
95
74
  }
96
75
  return e;
97
76
  };
98
- return /* @__PURE__ */ I("div", { style: { display: "grid", gridTemplateRows: `repeat(${l?.length}, 1fr)`, height: "100%", width: "100%" }, children: l?.map((e, t) => {
99
- const a = e?.field?.split(".")?.pop();
100
- if (!a) return null;
101
- const o = n?.[a], d = o?.value, b = r, h = q(o, b, e?.valueFormatter, U ?? null), w = h ? z(h, d) : d?.toString(), K = typeof i?.editable == "boolean" ? i.editable : void 0, E = D(K, e.editable, b, o), F = t === k && E, L = E ? m?.cellEditor ?? m?.cellRenderer : m?.cellRenderer ?? void 0, u = L ? W(L) : void 0;
102
- return /* @__PURE__ */ I("div", { className: "flex items-center max-h-full overflow-hidden", children: u ? /* @__PURE__ */ I(
103
- u,
77
+ return /* @__PURE__ */ C("div", { style: { display: "grid", gridTemplateRows: `repeat(${a?.length}, 1fr)`, height: "100%", width: "100%" }, children: a?.map((e, t) => {
78
+ const d = e?.field?.split(".")?.pop();
79
+ if (!d) return null;
80
+ const c = l?.[d], m = c?.value, b = r, V = q(c, b, e?.valueFormatter, U ?? null), h = V ? J(V, m) : m?.toString(), T = typeof o?.editable == "boolean" ? o.editable : void 0, y = I(T, e.editable, b, c), W = t === k && y, E = y ? u?.cellEditor ?? u?.cellRenderer : u?.cellRenderer ?? void 0, S = E ? G(E) : void 0;
81
+ return /* @__PURE__ */ C("div", { className: "flex items-center max-h-full overflow-hidden", children: S ? /* @__PURE__ */ C(
82
+ S,
104
83
  {
105
- context: c,
84
+ context: i,
106
85
  data: r,
107
- value: o,
108
- onValueChange: (p) => {
109
- const N = V.find((T) => T.field === e.field);
110
- N ? N.newValue = p : O([...V, { valueKey: a, field: e.field, newValue: p }]);
86
+ value: c,
87
+ onValueChange: (x) => {
88
+ const K = g.find((_) => _.field === e.field);
89
+ K ? K.newValue = x : O([...g, { valueKey: d, field: e.field, newValue: x }]);
111
90
  },
112
- valueFormatted: w ?? void 0,
113
- colDef: { ...e, editable: E },
91
+ valueFormatted: h ?? void 0,
92
+ colDef: { ...e, editable: y },
114
93
  stopEditing: () => {
115
- P(e.field);
94
+ $(e.field);
116
95
  },
117
- node: s,
118
- suppressAutoFocus: !F,
119
- className: t !== l.length - 1 ? "border-b border-stroke-hairline" : ""
96
+ node: n,
97
+ suppressAutoFocus: !W,
98
+ className: t !== a.length - 1 ? "border-b border-stroke-hairline" : ""
120
99
  }
121
- ) : /* @__PURE__ */ I("div", { className: "w-full h-full flex items-center ag-cell-inner-padding overflow-hidden text-ellipsis whitespace-nowrap", children: String(w ?? d ?? "") }) }, `${e.field}-${t}`);
100
+ ) : /* @__PURE__ */ C("div", { className: "w-full h-full flex items-center ag-cell-inner-padding overflow-hidden text-ellipsis whitespace-nowrap", children: String(h ?? m ?? "") }) }, `${e.field}-${t}`);
122
101
  }) });
123
102
  });
124
- J.displayName = "SplitCellEditor";
103
+ Z.displayName = "SplitCellEditor";
125
104
  export {
126
- J as SplitCellEditor
105
+ Z as SplitCellEditor
127
106
  };