impact-nova 2.5.16 → 2.6.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (254) hide show
  1. package/README.md +27 -25
  2. package/dist/components/data/ag-grid-react/ag-grid.types.d.ts +28 -1
  3. package/dist/components/data/ag-grid-react/cell-renderers/date-display-renderer.d.ts +0 -3
  4. package/dist/components/data/ag-grid-react/cell-renderers/date-display-renderer.js +31 -38
  5. package/dist/components/data/ag-grid-react/cell-renderers/input-display-renderer.d.ts +1 -1
  6. package/dist/components/data/ag-grid-react/chat/chat-capabilities.d.ts +9 -0
  7. package/dist/components/data/ag-grid-react/chat/chat-capabilities.js +22 -0
  8. package/dist/components/data/ag-grid-react/chat/chat-column.d.ts +20 -0
  9. package/dist/components/data/ag-grid-react/chat/chat-column.js +81 -0
  10. package/dist/components/data/ag-grid-react/chat/chat-composer.d.ts +10 -0
  11. package/dist/components/data/ag-grid-react/chat/chat-composer.js +352 -0
  12. package/dist/components/data/ag-grid-react/chat/chat-constants.d.ts +17 -0
  13. package/dist/components/data/ag-grid-react/chat/chat-constants.js +22 -0
  14. package/dist/components/data/ag-grid-react/chat/chat-format.d.ts +41 -0
  15. package/dist/components/data/ag-grid-react/chat/chat-format.js +94 -0
  16. package/dist/components/data/ag-grid-react/chat/chat-host.d.ts +10 -0
  17. package/dist/components/data/ag-grid-react/chat/chat-host.js +651 -0
  18. package/dist/components/data/ag-grid-react/chat/chat-host.types.d.ts +13 -0
  19. package/dist/components/data/ag-grid-react/chat/chat-html.d.ts +2 -0
  20. package/dist/components/data/ag-grid-react/chat/chat-html.js +40 -0
  21. package/dist/components/data/ag-grid-react/chat/chat-identity.d.ts +13 -0
  22. package/dist/components/data/ag-grid-react/chat/chat-identity.js +24 -0
  23. package/dist/components/data/ag-grid-react/chat/chat-menu.d.ts +13 -0
  24. package/dist/components/data/ag-grid-react/chat/chat-menu.js +15 -0
  25. package/dist/components/data/ag-grid-react/chat/chat-notify.d.ts +17 -0
  26. package/dist/components/data/ag-grid-react/chat/chat-notify.js +124 -0
  27. package/dist/components/data/ag-grid-react/chat/chat-persist.d.ts +13 -0
  28. package/dist/components/data/ag-grid-react/chat/chat-persist.js +34 -0
  29. package/dist/components/data/ag-grid-react/chat/chat-priority.d.ts +13 -0
  30. package/dist/components/data/ag-grid-react/chat/chat-priority.js +79 -0
  31. package/dist/components/data/ag-grid-react/chat/chat-summaries.d.ts +2 -0
  32. package/dist/components/data/ag-grid-react/chat/chat-summaries.js +24 -0
  33. package/dist/components/data/ag-grid-react/chat/chat-thread-ui.d.ts +72 -0
  34. package/dist/components/data/ag-grid-react/chat/chat-thread-ui.js +713 -0
  35. package/dist/components/data/ag-grid-react/chat/chat-toggle.d.ts +6 -0
  36. package/dist/components/data/ag-grid-react/chat/chat-toggle.js +25 -0
  37. package/dist/components/data/ag-grid-react/chat/chat-ui-actions.d.ts +13 -0
  38. package/dist/components/data/ag-grid-react/chat/chat-ui-actions.js +26 -0
  39. package/dist/components/data/ag-grid-react/chat/chat-window.d.ts +14 -0
  40. package/dist/components/data/ag-grid-react/chat/chat-window.js +82 -0
  41. package/dist/components/data/ag-grid-react/chat/chat-workspace.d.ts +91 -0
  42. package/dist/components/data/ag-grid-react/chat/chat-workspace.js +555 -0
  43. package/dist/components/data/ag-grid-react/chat/chat.types.d.ts +319 -0
  44. package/dist/components/data/ag-grid-react/chat/index.d.ts +6 -0
  45. package/dist/components/data/ag-grid-react/chat/index.js +24 -0
  46. package/dist/components/data/ag-grid-react/chat.story-data.d.ts +34 -0
  47. package/dist/components/data/ag-grid-react/chat.story-sources.d.ts +4 -0
  48. package/dist/components/data/ag-grid-react/comments/assets/comments-no-results.png.js +4 -0
  49. package/dist/components/data/ag-grid-react/comments/comment-mode-toggle.d.ts +6 -0
  50. package/dist/components/data/ag-grid-react/comments/comment-mode-toggle.js +29 -0
  51. package/dist/components/data/ag-grid-react/comments/comments-actions-menu.d.ts +8 -0
  52. package/dist/components/data/ag-grid-react/comments/comments-actions-menu.js +18 -0
  53. package/dist/components/data/ag-grid-react/comments/comments-ag-grid-presence.d.ts +18 -0
  54. package/dist/components/data/ag-grid-react/comments/comments-ag-grid-presence.js +16 -0
  55. package/dist/components/data/ag-grid-react/comments/comments-capabilities.d.ts +11 -0
  56. package/dist/components/data/ag-grid-react/comments/comments-capabilities.js +26 -0
  57. package/dist/components/data/ag-grid-react/comments/comments-constants.d.ts +12 -0
  58. package/dist/components/data/ag-grid-react/comments/comments-constants.js +21 -0
  59. package/dist/components/data/ag-grid-react/comments/comments-format.d.ts +20 -0
  60. package/dist/components/data/ag-grid-react/comments/comments-format.js +49 -0
  61. package/dist/components/data/ag-grid-react/comments/comments-generation.d.ts +14 -0
  62. package/dist/components/data/ag-grid-react/comments/comments-generation.js +18 -0
  63. package/dist/components/data/ag-grid-react/comments/comments-host.d.ts +10 -0
  64. package/dist/components/data/ag-grid-react/comments/comments-host.js +343 -0
  65. package/dist/components/data/ag-grid-react/comments/comments-host.types.d.ts +18 -0
  66. package/dist/components/data/ag-grid-react/comments/comments-identity.d.ts +7 -0
  67. package/dist/components/data/ag-grid-react/comments/comments-identity.js +20 -0
  68. package/dist/components/data/ag-grid-react/comments/comments-menu.d.ts +29 -0
  69. package/dist/components/data/ag-grid-react/comments/comments-menu.js +35 -0
  70. package/dist/components/data/ag-grid-react/comments/comments-overlay-anchor.d.ts +22 -0
  71. package/dist/components/data/ag-grid-react/comments/comments-overlay-anchor.js +98 -0
  72. package/dist/components/data/ag-grid-react/comments/comments-overlay.d.ts +21 -0
  73. package/dist/components/data/ag-grid-react/comments/comments-overlay.js +406 -0
  74. package/dist/components/data/ag-grid-react/comments/comments-panel.d.ts +9 -0
  75. package/dist/components/data/ag-grid-react/comments/comments-panel.js +272 -0
  76. package/dist/components/data/ag-grid-react/comments/comments-persist.d.ts +11 -0
  77. package/dist/components/data/ag-grid-react/comments/comments-persist.js +19 -0
  78. package/dist/components/data/ag-grid-react/comments/comments-reveal.d.ts +11 -0
  79. package/dist/components/data/ag-grid-react/comments/comments-reveal.js +31 -0
  80. package/dist/components/data/ag-grid-react/comments/comments-ui-actions.d.ts +18 -0
  81. package/dist/components/data/ag-grid-react/comments/comments-ui-actions.js +22 -0
  82. package/dist/components/data/ag-grid-react/comments/comments-window.d.ts +10 -0
  83. package/dist/components/data/ag-grid-react/comments/comments-window.js +62 -0
  84. package/dist/components/data/ag-grid-react/comments/comments.types.d.ts +178 -0
  85. package/dist/components/data/ag-grid-react/comments/index.d.ts +5 -0
  86. package/dist/components/data/ag-grid-react/comments/index.js +15 -0
  87. package/dist/components/data/ag-grid-react/comments-cell-renderers-showcase.d.ts +25 -0
  88. package/dist/components/data/ag-grid-react/comments.story-data.d.ts +37 -0
  89. package/dist/components/data/ag-grid-react/comments.story-sources.d.ts +11 -0
  90. package/dist/components/data/ag-grid-react/grid-cell-address.d.ts +21 -0
  91. package/dist/components/data/ag-grid-react/grid-cell-address.js +21 -0
  92. package/dist/components/data/ag-grid-react/grid-row-reveal.d.ts +34 -0
  93. package/dist/components/data/ag-grid-react/grid-row-reveal.js +33 -0
  94. package/dist/components/data/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.js +75 -65
  95. package/dist/components/data/ag-grid-react/headers/advanced-filter/column-filter-section.d.ts +1 -1
  96. package/dist/components/data/ag-grid-react/headers/advanced-filter/column-filter-section.js +54 -54
  97. package/dist/components/data/ag-grid-react/headers/components/date-filter-picker.d.ts +1 -1
  98. package/dist/components/data/ag-grid-react/headers/header-search-input.js +122 -119
  99. package/dist/components/data/ag-grid-react/headers/utils/date-utils.d.ts +2 -1
  100. package/dist/components/data/ag-grid-react/headers/utils/date-utils.js +25 -20
  101. package/dist/components/data/ag-grid-react/headers/utils/filter-utils.d.ts +1 -1
  102. package/dist/components/data/ag-grid-react/index.d.ts +1 -1
  103. package/dist/components/data/ag-grid-react/index.js +481 -254
  104. package/dist/components/data/ag-grid-react/notes/index.d.ts +2 -0
  105. package/dist/components/data/ag-grid-react/notes/index.js +1 -0
  106. package/dist/components/data/ag-grid-react/notes/notes-ag-grid-adapter.d.ts +25 -0
  107. package/dist/components/data/ag-grid-react/notes/notes-ag-grid-adapter.js +32 -0
  108. package/dist/components/data/ag-grid-react/notes/notes-constants.d.ts +2 -0
  109. package/dist/components/data/ag-grid-react/notes/notes-constants.js +4 -0
  110. package/dist/components/data/ag-grid-react/notes/notes.types.d.ts +12 -0
  111. package/dist/components/data/ag-grid-react/notes.story-sources.d.ts +7 -0
  112. package/dist/components/data/ag-grid-react/nova-system-column.d.ts +7 -0
  113. package/dist/components/data/ag-grid-react/nova-system-column.js +18 -0
  114. package/dist/components/data/ag-grid-react/theme.js +6 -2
  115. package/dist/components/data/ag-grid-react/value-formatter.types.d.ts +4 -0
  116. package/dist/components/data/ag-grid-react/value-formatters.d.ts +0 -19
  117. package/dist/components/data/ag-grid-react/value-formatters.js +88 -90
  118. package/dist/components/data/data-table/build-column-tree-from-grid.d.ts +0 -1
  119. package/dist/components/data/data-table/build-column-tree-from-grid.js +49 -53
  120. package/dist/components/data/data-table/data-table-column-apply.d.ts +0 -2
  121. package/dist/components/data/data-table/data-table-column-apply.js +73 -84
  122. package/dist/components/data/data-table/data-table-column-def-pin.js +34 -31
  123. package/dist/components/data/data-table/data-table-column-list.js +64 -94
  124. package/dist/components/data/data-table/data-table-column-tree-cache.d.ts +6 -12
  125. package/dist/components/data/data-table/data-table-column-tree-cache.js +131 -250
  126. package/dist/components/data/data-table/data-table-context.js +5 -5
  127. package/dist/components/data/data-table/data-table-sheet-context.js +1 -1
  128. package/dist/components/data/data-table/data-table-sheet.js +2 -1
  129. package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.d.ts +0 -5
  130. package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.js +11 -28
  131. package/dist/components/data/data-table/use-data-table-column-list-sync.d.ts +0 -10
  132. package/dist/components/data/data-table/use-data-table-column-list-sync.js +196 -250
  133. package/dist/components/data/nested-list/components/NestedListContent.d.ts +2 -10
  134. package/dist/components/data/nested-list/components/NestedListContent.js +138 -253
  135. package/dist/components/data/nested-list/components/SortableItem.d.ts +1 -2
  136. package/dist/components/data/nested-list/components/SortableItem.js +60 -62
  137. package/dist/components/data/nested-list/hooks/useNestedListDragDrop.d.ts +20 -10
  138. package/dist/components/data/nested-list/hooks/useNestedListDragDrop.js +233 -44
  139. package/dist/components/data/nested-list/nested-list-constants.d.ts +1 -4
  140. package/dist/components/data/nested-list/nested-list-constants.js +4 -10
  141. package/dist/components/data/nested-list/nested-list.js +336 -322
  142. package/dist/components/data/nested-list/nested-list.types.d.ts +0 -17
  143. package/dist/components/data-display/calendar/calendar-config.js +22 -21
  144. package/dist/components/data-display/calendar/calendar-day-button.js +21 -21
  145. package/dist/components/data-display/calendar/calendar-day-picker-view.js +36 -35
  146. package/dist/components/data-display/calendar/calendar-fiscal-labels.d.ts +3 -3
  147. package/dist/components/data-display/calendar/calendar-fiscal-labels.js +50 -62
  148. package/dist/components/data-display/calendar/calendar.js +138 -137
  149. package/dist/components/data-display/calendar/fiscal-period-caption-select.js +23 -22
  150. package/dist/components/data-display/calendar/use-calendar-i18n.d.ts +1 -0
  151. package/dist/components/data-display/calendar/use-calendar-i18n.js +10 -9
  152. package/dist/components/data-display/chart/chart.js +72 -72
  153. package/dist/components/data-display/chart/chart.utils.d.ts +1 -1
  154. package/dist/components/data-display/chart/chart.utils.js +40 -31
  155. package/dist/components/feedback/sheet/sheet.js +1 -1
  156. package/dist/components/feedback/toast/toast.d.ts +1 -1
  157. package/dist/components/feedback/toast/toast.variants.d.ts +1 -1
  158. package/dist/components/flows/filter-panel/filter-panel.d.ts +1 -1
  159. package/dist/components/flows/filter-panel/filter-panel.js +65 -64
  160. package/dist/components/flows/filter-panel/filter-panel.types.d.ts +1 -0
  161. package/dist/components/forms/date-picker/date-picker.js +125 -126
  162. package/dist/components/forms/date-picker/date-range-picker.js +191 -192
  163. package/dist/components/forms/date-picker/multi-date-picker.js +66 -67
  164. package/dist/components/forms/date-picker/multi-week-picker.js +82 -83
  165. package/dist/components/forms/date-picker/use-picker-i18n.d.ts +6 -0
  166. package/dist/components/forms/date-picker/use-picker-i18n.js +11 -0
  167. package/dist/components/forms/date-picker/week-picker.js +146 -147
  168. package/dist/components/forms/date-picker/week-range-picker.js +158 -159
  169. package/dist/components/ui/local-raster-icons/message3d.webp.js +4 -0
  170. package/dist/components/ui/local-raster-icons/rasterIcons.d.ts +1 -0
  171. package/dist/components/ui/local-raster-icons/rasterIcons.js +27 -25
  172. package/dist/form-react/Fields/WeekRangePicker.js +16 -16
  173. package/dist/i18n/defaultMessages.d.ts +144 -0
  174. package/dist/i18n/defaultMessages.js +161 -19
  175. package/dist/i18n/format/collator.d.ts +1 -0
  176. package/dist/i18n/format/collator.js +7 -0
  177. package/dist/i18n/format/date-pattern.d.ts +5 -0
  178. package/dist/i18n/format/date-pattern.js +20 -0
  179. package/dist/i18n/format/format-date.d.ts +9 -0
  180. package/dist/i18n/format/format-date.js +56 -0
  181. package/dist/i18n/format/format-number.d.ts +20 -0
  182. package/dist/i18n/format/format-number.js +68 -0
  183. package/dist/i18n/format/formatter-cache.d.ts +9 -0
  184. package/dist/i18n/format/formatter-cache.js +66 -0
  185. package/dist/i18n/format/index.d.ts +6 -0
  186. package/dist/i18n/format/parse-number.d.ts +6 -0
  187. package/dist/i18n/format/parse-number.js +53 -0
  188. package/dist/i18n/getDateFnsLocale.d.ts +5 -4
  189. package/dist/i18n/getDateFnsLocale.js +46 -16
  190. package/dist/i18n/i18n.types.d.ts +13 -0
  191. package/dist/i18n/impact-nova-i18n-context.d.ts +1 -1
  192. package/dist/i18n/impact-nova-i18n-context.js +33 -25
  193. package/dist/i18n/impact-nova-i18n-defaults.js +8 -6
  194. package/dist/i18n/index.d.ts +4 -1
  195. package/dist/i18n/index.js +41 -16
  196. package/dist/i18n/locale-config.d.ts +28 -0
  197. package/dist/i18n/locale-config.js +32 -0
  198. package/dist/i18n/locales/de.js +142 -0
  199. package/dist/i18n/locales/es.js +142 -0
  200. package/dist/i18n/locales/hi.js +142 -0
  201. package/dist/i18n/locales/kn.js +142 -0
  202. package/dist/i18n/week-start.d.ts +6 -0
  203. package/dist/i18n/week-start.js +30 -0
  204. package/dist/impact-nova-components.css +249 -0
  205. package/dist/impact-nova-tokens.scss +6 -0
  206. package/dist/impact-nova.css +1 -1
  207. package/dist/index.d.ts +1 -1
  208. package/dist/index.js +624 -601
  209. package/dist/llms/index.js +26 -2
  210. package/dist/llms/rules/ag-grid.js +1 -1
  211. package/dist/llms/rules/best-practices.js +1 -1
  212. package/dist/llms/rules/data-table-chat.js +1 -0
  213. package/dist/llms/rules/data-table-comments.js +1 -0
  214. package/dist/llms/rules/data-table-notes.js +1 -0
  215. package/dist/llms/rules/installation.js +1 -1
  216. package/dist/llms/rules/migration.js +1 -1
  217. package/dist/llms/rules/real-world-patterns.js +1 -1
  218. package/dist/llms/rules/requirements.js +1 -1
  219. package/dist/llms/rules/troubleshooting.js +1 -1
  220. package/dist/providers/app-providers.d.ts +3 -1
  221. package/dist/providers/app-providers.js +22 -11
  222. package/package.json +13 -1
  223. package/dist/components/data/data-table/column-picker-authority.d.ts +0 -34
  224. package/dist/components/data/data-table/column-picker-authority.js +0 -116
  225. package/dist/components/data/data-table/column-picker-drop-validation.d.ts +0 -7
  226. package/dist/components/data/data-table/column-picker-drop-validation.js +0 -37
  227. package/dist/components/data/data-table/data-table-column-list-tree-apply.d.ts +0 -10
  228. package/dist/components/data/data-table/data-table-column-list-tree-apply.js +0 -79
  229. package/dist/components/data/data-table/data-table-flat-column-virtual-rows.d.ts +0 -26
  230. package/dist/components/data/data-table/data-table-flat-column-virtual-rows.js +0 -195
  231. package/dist/components/data/data-table/data-table-picker-column-eligibility.d.ts +0 -1
  232. package/dist/components/data/data-table/data-table-picker-column-eligibility.js +0 -7
  233. package/dist/components/data/data-table/reconcile-column-tree-from-grid.d.ts +0 -12
  234. package/dist/components/data/data-table/reconcile-column-tree-from-grid.js +0 -12
  235. package/dist/components/data/nested-list/hooks/useVirtualNestedListDrag.d.ts +0 -24
  236. package/dist/components/data/nested-list/hooks/useVirtualNestedListDrag.js +0 -128
  237. package/dist/components/data/nested-list/nested-list-display-utils.d.ts +0 -11
  238. package/dist/components/data/nested-list/nested-list-display-utils.js +0 -74
  239. package/dist/components/data/nested-list/nested-list-drop-engine.d.ts +0 -31
  240. package/dist/components/data/nested-list/nested-list-drop-engine.js +0 -209
  241. package/dist/components/data/nested-list/nested-list-flat-virtual-handlers.d.ts +0 -26
  242. package/dist/components/data/nested-list/nested-list-flat-virtual-handlers.js +0 -67
  243. package/dist/components/data/nested-list/nested-list-item-tree-mutations.d.ts +0 -4
  244. package/dist/components/data/nested-list/nested-list-item-tree-mutations.js +0 -43
  245. package/dist/components/data/nested-list/nested-list-lazy-flat-rows.d.ts +0 -3
  246. package/dist/components/data/nested-list/nested-list-lazy-flat-rows.js +0 -34
  247. package/dist/components/data/nested-list/nested-list-row-estimates.d.ts +0 -9
  248. package/dist/components/data/nested-list/nested-list-row-estimates.js +0 -14
  249. package/dist/components/data/nested-list/nested-list-scroll-anchor.d.ts +0 -36
  250. package/dist/components/data/nested-list/nested-list-scroll-anchor.js +0 -47
  251. package/dist/components/data/nested-list/nested-list-virtual-drop.d.ts +0 -59
  252. package/dist/components/data/nested-list/nested-list-virtual-drop.js +0 -341
  253. package/dist/lib/hash/fnv1a128.d.ts +0 -16
  254. package/dist/lib/hash/fnv1a128.js +0 -21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impact-nova",
3
- "version": "2.5.16",
3
+ "version": "2.6.0-alpha.0",
4
4
  "description": "Enterprise-grade React design system built with React 19, Vite, Tailwind CSS, and Radix UI. Built-in internationalization (i18n) and comprehensive UI component library for scalable, accessible, and performant applications.",
5
5
  "type": "module",
6
6
  "workspaces": [
@@ -513,6 +513,18 @@
513
513
  "./fiscal-calendar": {
514
514
  "types": "./dist/lib/fiscal-calendar/index.d.ts",
515
515
  "import": "./dist/lib/fiscal-calendar/index.js"
516
+ },
517
+ "./ag-grid-react/comments": {
518
+ "types": "./dist/components/data/ag-grid-react/comments/index.d.ts",
519
+ "import": "./dist/components/data/ag-grid-react/comments/index.js"
520
+ },
521
+ "./ag-grid-react/notes": {
522
+ "types": "./dist/components/data/ag-grid-react/notes/index.d.ts",
523
+ "import": "./dist/components/data/ag-grid-react/notes/index.js"
524
+ },
525
+ "./ag-grid-react/chat": {
526
+ "types": "./dist/components/data/ag-grid-react/chat/index.d.ts",
527
+ "import": "./dist/components/data/ag-grid-react/chat/index.js"
516
528
  }
517
529
  },
518
530
  "scripts": {
@@ -1,34 +0,0 @@
1
- import { ColumnState, GridApi } from 'ag-grid-community';
2
- import { NormalizedColumnPin } from './data-table-column-apply';
3
- export interface GroupNodeMeta {
4
- groupId: string;
5
- label: string;
6
- parentGroupId: string | null;
7
- }
8
- export interface ColumnLeafMeta {
9
- columnId: string;
10
- label: string;
11
- groupChain: string[];
12
- }
13
- export interface ColumnPickerAuthority {
14
- readonly orderedColumnIds: readonly string[];
15
- readonly visibilityByColumnId: ReadonlyMap<string, boolean>;
16
- readonly pinByColumnId: ReadonlyMap<string, NormalizedColumnPin>;
17
- readonly labelByColumnId: ReadonlyMap<string, string>;
18
- readonly groupMetadata: ReadonlyMap<string, GroupNodeMeta>;
19
- readonly columnGroupChain: ReadonlyMap<string, string[]>;
20
- readonly sortAppliedByColumnId: ReadonlyMap<string, boolean>;
21
- readonly filterAppliedByColumnId: ReadonlyMap<string, boolean>;
22
- readonly revision: number;
23
- }
24
- export declare function buildAuthorityFromGrid(gridApi: GridApi): ColumnPickerAuthority | null;
25
- export declare function toggleColumnVisibility(authority: ColumnPickerAuthority, columnId: string, isVisible: boolean): ColumnPickerAuthority;
26
- export declare function toggleAllColumnsVisibility(authority: ColumnPickerAuthority, isVisible: boolean): ColumnPickerAuthority;
27
- export declare function toggleColumnsVisibility(authority: ColumnPickerAuthority, columnIds: readonly string[], isVisible: boolean): ColumnPickerAuthority;
28
- export declare function reorderColumn(authority: ColumnPickerAuthority, fromIndex: number, toIndex: number): ColumnPickerAuthority;
29
- export declare function updateColumnPin(authority: ColumnPickerAuthority, columnId: string, pin: NormalizedColumnPin): ColumnPickerAuthority;
30
- export declare function buildColumnStateFromAuthority(authority: ColumnPickerAuthority): ColumnState[];
31
- export declare function fingerprintAuthority(authority: ColumnPickerAuthority): {
32
- layout: string;
33
- visibility: string;
34
- };
@@ -1,116 +0,0 @@
1
- import { resolveColumnPinnedFromGridState as D } from "./data-table-column-apply.js";
2
- import { isPickerEligibleColumnId as P } from "./data-table-picker-column-eligibility.js";
3
- import { buildColumnIndicatorMapsFromGrid as F } from "./patch-column-tree-indicators-from-grid.js";
4
- import { Fnv1a128Hasher as G } from "../../../lib/hash/fnv1a128.js";
5
- let u = 0;
6
- function O(n) {
7
- const o = n.getColumnState(), i = n.getAllGridColumns?.() ?? n.getColumns?.() ?? [], e = new Map(
8
- i.map((t) => [t.getColId(), t])
9
- ), l = [], g = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new Map();
10
- for (const t of o) {
11
- const d = e.get(t.colId) ?? n.getColumn(t.colId);
12
- if (!d) continue;
13
- const a = d.getColDef(), p = a.headerName;
14
- if (p != null && p.trim() === "" || !P(t.colId))
15
- continue;
16
- const C = a.headerName;
17
- let r = typeof C == "string" && C.trim() !== "" ? C : n.getDisplayNameForColumn(d, "header");
18
- if ((!r || r.trim() === "") && (r = a.field ?? t.colId), !r || r.trim() === "")
19
- continue;
20
- const N = D(t, d);
21
- l.push(t.colId), g.set(t.colId, !t.hide), y.set(t.colId, N), b.set(t.colId, r);
22
- const w = [];
23
- let s = d.getOriginalParent();
24
- for (; s; ) {
25
- const f = s.getColGroupDef();
26
- if (f?.headerName && f?.children) {
27
- const m = s.getGroupId();
28
- if (w.unshift(m), !c.has(m)) {
29
- const I = s.getOriginalParent();
30
- let h = null;
31
- for (; I; ) {
32
- const M = I.getColGroupDef();
33
- if (M?.headerName && M?.children) {
34
- h = I.getGroupId();
35
- break;
36
- }
37
- }
38
- c.set(m, {
39
- groupId: m,
40
- label: f.headerName,
41
- parentGroupId: h
42
- });
43
- }
44
- }
45
- s = s.getOriginalParent();
46
- }
47
- v.set(t.colId, w);
48
- }
49
- if (l.length === 0)
50
- return null;
51
- const B = F(n);
52
- return {
53
- orderedColumnIds: l,
54
- visibilityByColumnId: g,
55
- pinByColumnId: y,
56
- labelByColumnId: b,
57
- groupMetadata: c,
58
- columnGroupChain: v,
59
- sortAppliedByColumnId: B.sortAppliedByColumnId,
60
- filterAppliedByColumnId: B.filterAppliedByColumnId,
61
- revision: ++u
62
- };
63
- }
64
- function S(n, o, i) {
65
- const e = new Map(n.visibilityByColumnId);
66
- return e.set(o, i), { ...n, visibilityByColumnId: e, revision: ++u };
67
- }
68
- function k(n, o) {
69
- const i = /* @__PURE__ */ new Map();
70
- for (const e of n.orderedColumnIds)
71
- i.set(e, o);
72
- return { ...n, visibilityByColumnId: i, revision: ++u };
73
- }
74
- function E(n, o, i) {
75
- const e = new Map(n.visibilityByColumnId);
76
- for (const l of o)
77
- e.set(l, i);
78
- return { ...n, visibilityByColumnId: e, revision: ++u };
79
- }
80
- function j(n, o, i) {
81
- if (o === i) return n;
82
- const e = [...n.orderedColumnIds], [l] = e.splice(o, 1);
83
- return e.splice(i, 0, l), { ...n, orderedColumnIds: e, revision: ++u };
84
- }
85
- function q(n, o, i) {
86
- const e = new Map(n.pinByColumnId);
87
- return e.set(o, i), { ...n, pinByColumnId: e, revision: ++u };
88
- }
89
- function z(n) {
90
- return n.orderedColumnIds.map((o) => ({
91
- colId: o,
92
- hide: !n.visibilityByColumnId.get(o),
93
- pinned: n.pinByColumnId.get(o) ?? null
94
- }));
95
- }
96
- function J(n) {
97
- const o = new G(), i = new G();
98
- for (const e of n.orderedColumnIds) {
99
- const l = n.pinByColumnId.get(e) ?? "0";
100
- o.update(e).update(":").update(l === null ? "0" : l).update("|"), i.update(e).update(":").update(n.visibilityByColumnId.get(e) ? "1" : "0").update("|");
101
- }
102
- return {
103
- layout: o.digest(),
104
- visibility: i.digest()
105
- };
106
- }
107
- export {
108
- O as buildAuthorityFromGrid,
109
- z as buildColumnStateFromAuthority,
110
- J as fingerprintAuthority,
111
- j as reorderColumn,
112
- k as toggleAllColumnsVisibility,
113
- S as toggleColumnVisibility,
114
- E as toggleColumnsVisibility,
115
- q as updateColumnPin
116
- };
@@ -1,7 +0,0 @@
1
- import { NestedListItem } from '../nested-list/nested-list.types';
2
- export declare function isValidColumnPickerGroupDrop(options: {
3
- items: NestedListItem[];
4
- activeItemId: string;
5
- overItemId: string;
6
- insertAfter?: boolean;
7
- }): boolean;
@@ -1,37 +0,0 @@
1
- import { findNestedListItemById as c, findNestedListParentId as i } from "../nested-list/nested-list-drop-engine.js";
2
- import { NESTED_LIST_SECTION_IDS as l } from "../nested-list/nested-list-constants.js";
3
- function f(t) {
4
- const e = t.indexOf("__");
5
- return e === -1 ? t : t.slice(0, e);
6
- }
7
- function m(t) {
8
- return t?.data?.columnGroupChain ?? [];
9
- }
10
- function h(t, e) {
11
- const n = [];
12
- let r = i(t, e);
13
- for (; r && !l.has(r); ) {
14
- const o = c(t, r);
15
- (o?.category === "group" || o?.children) && n.unshift(f(r)), r = i(t, r);
16
- }
17
- return n;
18
- }
19
- function v(t, e) {
20
- return t.length !== e.length ? !1 : t.every((n, r) => n === e[r]);
21
- }
22
- function C(t) {
23
- const { items: e, activeItemId: n, overItemId: r, insertAfter: o } = t, I = c(e, n), u = m(I);
24
- if (u.length === 0)
25
- return !0;
26
- const d = i(e, n), p = i(e, r);
27
- if (d === p)
28
- return !0;
29
- const a = c(e, r);
30
- if (a?.category !== "group" || o === !1)
31
- return !0;
32
- const s = h(e, r);
33
- return s.push(f(a.id)), v(u, s);
34
- }
35
- export {
36
- C as isValidColumnPickerGroupDrop
37
- };
@@ -1,10 +0,0 @@
1
- import { GridApi } from 'ag-grid-community';
2
- import { NestedListItem } from '../nested-list/nested-list.types';
3
- export interface TreeColumnChangeContext {
4
- gridApi: GridApi;
5
- newItems: NestedListItem[];
6
- releaseLockAndRebuildTreeFromGrid: () => void;
7
- applyExternalGridSync: () => void;
8
- setIsUpdating: (isUpdating: boolean) => void;
9
- }
10
- export declare function applyTreeColumnChanges(context: TreeColumnChangeContext): void;
@@ -1,79 +0,0 @@
1
- import { mergePartialOrderedColumnState as T } from "./data-table-column-state.js";
2
- import { afterSynchronousColumnApply as I, normalizeColumnPinned as C, GRID_AUTO_UNPIN_WAIT_MS as b } from "./data-table-column-apply.js";
3
- import { buildColumnStateFromTree as P } from "./build-column-state-from-tree.js";
4
- import { subscribeGridApiEvent as h } from "../ag-grid-react/grid-api-event-subscription.js";
5
- function k(a) {
6
- const {
7
- gridApi: t,
8
- newItems: r,
9
- releaseLockAndRebuildTreeFromGrid: o,
10
- applyExternalGridSync: s,
11
- setIsUpdating: i
12
- } = a;
13
- i(!0);
14
- const l = P(r);
15
- if (l.length === 0) {
16
- I(() => {
17
- o();
18
- });
19
- return;
20
- }
21
- const c = t.getColumnState(), d = T(c, l);
22
- U({
23
- gridApi: t,
24
- mergedState: d,
25
- releaseLockAndRebuildTreeFromGrid: o,
26
- applyExternalGridSync: s,
27
- setIsUpdating: i
28
- });
29
- }
30
- function U(a) {
31
- const {
32
- gridApi: t,
33
- mergedState: r,
34
- releaseLockAndRebuildTreeFromGrid: o,
35
- applyExternalGridSync: s,
36
- setIsUpdating: i
37
- } = a, l = t.getColumnState(), c = new Set(
38
- l.filter((e) => C(e.pinned)).map((e) => e.colId)
39
- ), d = r.filter(
40
- (e) => C(e.pinned) && !c.has(e.colId)
41
- ), y = new Set(d.map((e) => e.colId));
42
- t.applyColumnState({ state: r, applyOrder: !0 });
43
- const A = () => {
44
- o();
45
- };
46
- if (y.size === 0) {
47
- I(A);
48
- return;
49
- }
50
- let u = !1, m = null, f = null;
51
- f = h(t, "columnPinned", () => {
52
- if (u || t.isDestroyed())
53
- return;
54
- const e = t.getColumnState();
55
- if (d.filter((p) => {
56
- const n = e.find((S) => S.colId === p.colId);
57
- return n && !n.pinned;
58
- }).length > 0) {
59
- u = !0, m && clearTimeout(m), f?.();
60
- const p = r.filter(
61
- (n) => n.pinned && !y.has(n.colId)
62
- );
63
- if (p.length > 0) {
64
- const n = p[0], S = r.map(
65
- (g) => g.colId === n.colId ? { ...g, pinned: null } : g
66
- );
67
- t.applyColumnState({ state: S, applyOrder: !0 });
68
- }
69
- I(() => {
70
- i(!1), s();
71
- });
72
- }
73
- }), m = setTimeout(() => {
74
- f?.(), u || A();
75
- }, b);
76
- }
77
- export {
78
- k as applyTreeColumnChanges
79
- };
@@ -1,26 +0,0 @@
1
- import { FlatNestedListRow } from '../nested-list/nested-list-virtual-drop';
2
- import { NestedListItem } from '../nested-list/nested-list.types';
3
- import { ColumnPickerAuthority } from './column-picker-authority';
4
- import { BuildColumnTreeLabels } from './build-column-tree-from-grid';
5
- export interface FlatColumnVirtualRowModelOptions {
6
- searchQuery?: string;
7
- sortAppliedByColumnId?: ReadonlyMap<string, boolean>;
8
- filterAppliedByColumnId?: ReadonlyMap<string, boolean>;
9
- }
10
- export interface FlatColumnVirtualRowModel {
11
- rowCount: number;
12
- frozenColumnIds: readonly string[];
13
- scrollableColumnIds: readonly string[];
14
- getRowAt: (index: number) => FlatNestedListRow;
15
- getColumnIdAt: (index: number) => string | null;
16
- findFlatIndexByColumnId: (columnId: string) => number;
17
- }
18
- export declare function buildFlatColumnVirtualRowModel(authority: ColumnPickerAuthority, labels: BuildColumnTreeLabels, options?: FlatColumnVirtualRowModelOptions): FlatColumnVirtualRowModel;
19
- export declare function buildAuthorityFlatShellItems(authority: ColumnPickerAuthority, labels: BuildColumnTreeLabels): NestedListItem[];
20
- export declare function isFlatLargeColumnPicker(authority: ColumnPickerAuthority, threshold: number): boolean;
21
- export interface FlatVirtualDropToAuthorityOptions {
22
- draggedColumnId: string;
23
- overId: string;
24
- insertAfter: boolean;
25
- }
26
- export declare function applyFlatVirtualDropToAuthority(authority: ColumnPickerAuthority, rowModel: FlatColumnVirtualRowModel, options: FlatVirtualDropToAuthorityOptions): ColumnPickerAuthority | null;
@@ -1,195 +0,0 @@
1
- import { getSectionIdFromDroppable as S } from "../nested-list/nested-list-drop-engine.js";
2
- import { NESTED_LIST_ROOT_FROZEN_ID as d, NESTED_LIST_ROOT_SCROLLABLE_ID as u } from "../nested-list/nested-list-constants.js";
3
- import { updateColumnPin as h, reorderColumn as k } from "./column-picker-authority.js";
4
- function g(e) {
5
- const n = [], t = [];
6
- for (const l of e.orderedColumnIds)
7
- e.pinByColumnId.get(l) ? n.push(l) : t.push(l);
8
- return { frozenColumnIds: n, scrollableColumnIds: t };
9
- }
10
- function b(e, n, t) {
11
- const l = t.trim().toLowerCase();
12
- return l === "" ? [...n] : n.filter((r) => (e.labelByColumnId.get(r) ?? r).toLowerCase().includes(l));
13
- }
14
- function C(e, n) {
15
- if (e.length === 0)
16
- return { checked: !1, indeterminate: !1 };
17
- let t = 0;
18
- for (const l of e)
19
- (n.visibilityByColumnId.get(l) ?? !0) && (t += 1);
20
- return {
21
- checked: t === e.length,
22
- indeterminate: t > 0 && t < e.length
23
- };
24
- }
25
- function D(e, n, t) {
26
- const l = t.searchQuery ?? "", { frozenColumnIds: r, scrollableColumnIds: c } = g(e), s = b(e, r, l), o = b(e, c, l), i = C(s, e), f = C(o, e), m = [
27
- {
28
- kind: "structure",
29
- sectionId: d,
30
- label: n.frozenColumns,
31
- checked: i.checked,
32
- indeterminate: i.indeterminate,
33
- hasVirtualColumnChildren: s.length > 0
34
- }
35
- ];
36
- for (const a of s)
37
- m.push({ kind: "column", columnId: a, sectionId: d });
38
- m.push({
39
- kind: "structure",
40
- sectionId: u,
41
- label: n.scrollableColumns,
42
- checked: f.checked,
43
- indeterminate: f.indeterminate,
44
- hasVirtualColumnChildren: o.length > 0
45
- });
46
- for (const a of o)
47
- m.push({ kind: "column", columnId: a, sectionId: u });
48
- return m;
49
- }
50
- function z(e, n, t) {
51
- const l = e.pinByColumnId.get(n) ?? null, r = e.visibilityByColumnId.get(n) ?? !0, c = e.labelByColumnId.get(n) ?? n, s = t.sortAppliedByColumnId?.get(n) ?? !1, o = t.filterAppliedByColumnId?.get(n) ?? !1;
52
- return {
53
- item: {
54
- id: n,
55
- label: c,
56
- checked: r,
57
- data: {
58
- hasSortApplied: s,
59
- hasFilterApplied: o,
60
- pinned: l
61
- }
62
- },
63
- level: 1,
64
- indentLevel: 1
65
- };
66
- }
67
- function F(e) {
68
- return {
69
- item: {
70
- id: e.sectionId,
71
- label: e.label,
72
- checked: e.checked,
73
- indeterminate: e.indeterminate,
74
- children: [],
75
- category: "structure",
76
- isDragDisabled: !0,
77
- data: { hasVirtualColumnChildren: e.hasVirtualColumnChildren }
78
- },
79
- level: 0,
80
- indentLevel: 0
81
- };
82
- }
83
- function v(e, n, t = {}) {
84
- const l = D(e, n, t), r = /* @__PURE__ */ new Map();
85
- for (let o = 0; o < l.length; o += 1) {
86
- const i = l[o];
87
- i.kind === "column" && r.set(i.columnId, o);
88
- }
89
- const { frozenColumnIds: c, scrollableColumnIds: s } = g(e);
90
- return {
91
- rowCount: l.length,
92
- frozenColumnIds: c,
93
- scrollableColumnIds: s,
94
- getRowAt: (o) => {
95
- const i = l[o];
96
- if (!i)
97
- throw new RangeError(`Flat column virtual row index out of bounds: ${o}`);
98
- return i.kind === "structure" ? F(i) : z(e, i.columnId, t);
99
- },
100
- getColumnIdAt: (o) => {
101
- const i = l[o];
102
- return i?.kind === "column" ? i.columnId : null;
103
- },
104
- findFlatIndexByColumnId: (o) => r.get(o) ?? -1
105
- };
106
- }
107
- function P(e, n) {
108
- const { frozenColumnIds: t, scrollableColumnIds: l } = g(e), r = C(t, e), c = C(l, e);
109
- return [
110
- {
111
- id: d,
112
- label: n.frozenColumns,
113
- checked: r.checked,
114
- indeterminate: r.indeterminate,
115
- children: [],
116
- category: "structure",
117
- isDragDisabled: !0
118
- },
119
- {
120
- id: u,
121
- label: n.scrollableColumns,
122
- checked: c.checked,
123
- indeterminate: c.indeterminate,
124
- children: [],
125
- category: "structure",
126
- isDragDisabled: !0
127
- }
128
- ];
129
- }
130
- function V(e, n) {
131
- if (e.orderedColumnIds.length < n)
132
- return !1;
133
- for (const t of e.orderedColumnIds) {
134
- const l = e.columnGroupChain.get(t);
135
- if (l && l.length > 0)
136
- return !1;
137
- }
138
- return !0;
139
- }
140
- function A(e, n) {
141
- const t = e.pinByColumnId.get(n);
142
- return t === "left" || t === "right";
143
- }
144
- function B(e, n) {
145
- if (n === d)
146
- return 0;
147
- for (let t = 0; t < e.orderedColumnIds.length; t += 1) {
148
- const l = e.orderedColumnIds[t];
149
- if (!A(e, l))
150
- return t;
151
- }
152
- return e.orderedColumnIds.length;
153
- }
154
- function R(e, n, t, l) {
155
- const r = e.orderedColumnIds.indexOf(n), c = e.orderedColumnIds.indexOf(t);
156
- if (r === -1 || c === -1)
157
- return null;
158
- const s = [...e.orderedColumnIds];
159
- s.splice(r, 1);
160
- const o = s.indexOf(t);
161
- if (o === -1)
162
- return null;
163
- const i = l ? o + 1 : o;
164
- return s.splice(i, 0, n), r === i ? e : k(e, r, i);
165
- }
166
- function O(e, n) {
167
- const t = S(e);
168
- return t === d || t === u ? t : e === d || e === u ? e : n.frozenColumnIds.includes(e) ? d : n.scrollableColumnIds.includes(e) ? u : null;
169
- }
170
- function _(e, n, t) {
171
- const { draggedColumnId: l, overId: r, insertAfter: c } = t;
172
- if (l === r || !e.orderedColumnIds.includes(l))
173
- return null;
174
- const s = O(r, n);
175
- if (s) {
176
- if (S(r) !== null || r === d || r === u) {
177
- const I = h(e, l, s === d ? "left" : null), x = B(I, s), p = I.orderedColumnIds.indexOf(l);
178
- return p === -1 ? null : k(I, p, x);
179
- }
180
- const i = n.frozenColumnIds.includes(l), f = s === d ? "left" : null, m = i === (f === "left") ? e : h(e, l, f);
181
- return R(
182
- m,
183
- l,
184
- r,
185
- c
186
- );
187
- }
188
- return null;
189
- }
190
- export {
191
- _ as applyFlatVirtualDropToAuthority,
192
- P as buildAuthorityFlatShellItems,
193
- v as buildFlatColumnVirtualRowModel,
194
- V as isFlatLargeColumnPicker
195
- };
@@ -1 +0,0 @@
1
- export declare function isPickerEligibleColumnId(columnId: string | null | undefined): boolean;
@@ -1,7 +0,0 @@
1
- const i = /* @__PURE__ */ new Set(["ag-Grid-SelectionColumn"]);
2
- function n(e) {
3
- return e ? !i.has(e) : !1;
4
- }
5
- export {
6
- n as isPickerEligibleColumnId
7
- };
@@ -1,12 +0,0 @@
1
- import { GridApi } from 'ag-grid-community';
2
- import { NestedListItem } from '../nested-list/nested-list.types';
3
- import { ColumnListSyncFingerprints } from './data-table-column-list-sync';
4
- import { BuildColumnTreeLabels } from './build-column-tree-from-grid';
5
- export declare function rebuildColumnTreeFromGrid(gridApi: GridApi, labels: BuildColumnTreeLabels): NestedListItem[] | null;
6
- export declare function commitRebuiltColumnTreeFromGrid(options: {
7
- gridApi: GridApi;
8
- labels: BuildColumnTreeLabels;
9
- }): {
10
- tree: NestedListItem[];
11
- fingerprints: ColumnListSyncFingerprints;
12
- } | null;
@@ -1,12 +0,0 @@
1
- import { buildColumnTreeFromGrid as m } from "./build-column-tree-from-grid.js";
2
- import { writeColumnTreeCache as t } from "./data-table-column-tree-cache.js";
3
- function l(r) {
4
- const e = m(r.gridApi, r.labels);
5
- if (!e)
6
- return null;
7
- const i = t(r.gridApi, e);
8
- return { tree: e, fingerprints: i };
9
- }
10
- export {
11
- l as commitRebuiltColumnTreeFromGrid
12
- };
@@ -1,24 +0,0 @@
1
- import { NestedListItem } from '../nested-list.types';
2
- import { FlatNestedListRow, VirtualDropRowGeometry, VirtualDropTarget } from '../nested-list-virtual-drop';
3
- export type VirtualDragSession = {
4
- draggedId: string;
5
- draggedItem: NestedListItem;
6
- dropTarget: VirtualDropTarget | null;
7
- pointerX: number;
8
- pointerY: number;
9
- isPointerInsideScrollContainer: boolean;
10
- } | null;
11
- export interface UseVirtualNestedListDragOptions {
12
- items: FlatNestedListRow[];
13
- scrollElementRef: React.RefObject<HTMLDivElement | null>;
14
- virtualizer: VirtualDropRowGeometry;
15
- estimateRowSize: (index: number) => number;
16
- onDrop: (activeId: string, overId: string, insertAfter: boolean) => void;
17
- collapsedItems?: Record<string, boolean>;
18
- }
19
- export declare function useVirtualNestedListDrag({ items, scrollElementRef, virtualizer, estimateRowSize, onDrop, collapsedItems, }: UseVirtualNestedListDragOptions): {
20
- dragSession: VirtualDragSession;
21
- handlePointerDown: (event: React.PointerEvent, itemId: string) => void;
22
- handleKeyboardReorder: (itemId: string, direction: "up" | "down") => void;
23
- isDragging: boolean;
24
- };