@restio/ui 0.0.10-SNAPSHOT → 0.0.12

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 (263) hide show
  1. package/dist/assets/svg/discussion.svg +1 -0
  2. package/dist/assets/svg/form.svg +1 -0
  3. package/dist/assets/svg/list.svg +1 -0
  4. package/dist/assets/svg/pencil.svg +1 -1
  5. package/dist/assets/svg/pie-chart.svg +1 -0
  6. package/dist/assets/svg/table.svg +1 -0
  7. package/dist/components/checkbox-group/checkbox-group-types.d.ts +28 -0
  8. package/dist/components/checkbox-group/checkbox-group-types.d.ts.map +1 -0
  9. package/dist/components/checkbox-group/checkbox-group.d.ts +8 -0
  10. package/dist/components/checkbox-group/checkbox-group.d.ts.map +1 -0
  11. package/dist/components/menu/menu.d.ts.map +1 -1
  12. package/dist/components/progress-bar/progress-bar-types.d.ts +20 -0
  13. package/dist/components/progress-bar/progress-bar-types.d.ts.map +1 -0
  14. package/dist/components/progress-bar/progress-bar.d.ts +7 -0
  15. package/dist/components/progress-bar/progress-bar.d.ts.map +1 -0
  16. package/dist/components/radio/radio-types.d.ts +14 -0
  17. package/dist/components/radio/radio-types.d.ts.map +1 -0
  18. package/dist/components/radio/radio.d.ts +8 -0
  19. package/dist/components/radio/radio.d.ts.map +1 -0
  20. package/dist/components/radio-group/radio-group-types.d.ts +30 -0
  21. package/dist/components/radio-group/radio-group-types.d.ts.map +1 -0
  22. package/dist/components/radio-group/radio-group.d.ts +8 -0
  23. package/dist/components/radio-group/radio-group.d.ts.map +1 -0
  24. package/dist/components/typography/typography-types.d.ts +26 -2
  25. package/dist/components/typography/typography-types.d.ts.map +1 -1
  26. package/dist/components/typography/typography.d.ts +1 -1
  27. package/dist/components/typography/typography.d.ts.map +1 -1
  28. package/dist/custom-components/chat/chat.d.ts.map +1 -1
  29. package/dist/custom-components/layout/layout-renderers.d.ts +9 -0
  30. package/dist/custom-components/layout/layout-renderers.d.ts.map +1 -0
  31. package/dist/custom-components/layout/layout-types.d.ts +24 -10
  32. package/dist/custom-components/layout/layout-types.d.ts.map +1 -1
  33. package/dist/custom-components/layout/layout.d.ts +9 -0
  34. package/dist/custom-components/layout/layout.d.ts.map +1 -1
  35. package/dist/custom-components/markdown/components/img/zoomable-image.d.ts +5 -0
  36. package/dist/custom-components/markdown/components/img/zoomable-image.d.ts.map +1 -0
  37. package/dist/custom-components/markdown/markdown-types.d.ts +3 -2
  38. package/dist/custom-components/markdown/markdown-types.d.ts.map +1 -1
  39. package/dist/custom-components/markdown/markdown.d.ts.map +1 -1
  40. package/dist/data-components/assets/cell-types-asset.d.ts +39 -0
  41. package/dist/data-components/assets/cell-types-asset.d.ts.map +1 -0
  42. package/dist/data-components/assets/data-components-asset.d.ts +11 -0
  43. package/dist/data-components/assets/data-components-asset.d.ts.map +1 -1
  44. package/dist/data-components/calendar/calendar-types.d.ts +2 -1
  45. package/dist/data-components/calendar/calendar-types.d.ts.map +1 -1
  46. package/dist/data-components/calendar/calendar.d.ts +1 -1
  47. package/dist/data-components/calendar/calendar.d.ts.map +1 -1
  48. package/dist/data-components/card/card-types.d.ts +21 -0
  49. package/dist/data-components/card/card-types.d.ts.map +1 -0
  50. package/dist/data-components/card/card.d.ts +10 -0
  51. package/dist/data-components/card/card.d.ts.map +1 -0
  52. package/dist/data-components/card-list/card-list-types.d.ts +22 -0
  53. package/dist/data-components/card-list/card-list-types.d.ts.map +1 -0
  54. package/dist/data-components/card-list/card-list.d.ts +13 -0
  55. package/dist/data-components/card-list/card-list.d.ts.map +1 -0
  56. package/dist/data-components/card-list/models/ecommerce.d.ts +13 -0
  57. package/dist/data-components/card-list/models/ecommerce.d.ts.map +1 -0
  58. package/dist/data-components/cell/cell-registry.d.ts +29 -0
  59. package/dist/data-components/cell/cell-registry.d.ts.map +1 -0
  60. package/dist/data-components/cell/cell-types.d.ts +5 -0
  61. package/dist/data-components/cell/cell-types.d.ts.map +1 -1
  62. package/dist/data-components/cell/cell-utils.d.ts +0 -6
  63. package/dist/data-components/cell/cell-utils.d.ts.map +1 -1
  64. package/dist/data-components/cell/cell.d.ts +1 -1
  65. package/dist/data-components/cell/cell.d.ts.map +1 -1
  66. package/dist/data-components/chart/chart-tooltip/chart-tooltip-types.d.ts +14 -0
  67. package/dist/data-components/chart/chart-tooltip/chart-tooltip-types.d.ts.map +1 -0
  68. package/dist/data-components/chart/chart-tooltip/chart-tooltip.d.ts +7 -0
  69. package/dist/data-components/chart/chart-tooltip/chart-tooltip.d.ts.map +1 -0
  70. package/dist/data-components/chart/chart-types.d.ts +29 -2
  71. package/dist/data-components/chart/chart-types.d.ts.map +1 -1
  72. package/dist/data-components/chart/chart-utils.d.ts +28 -0
  73. package/dist/data-components/chart/chart-utils.d.ts.map +1 -0
  74. package/dist/data-components/chart/chart.d.ts +1 -1
  75. package/dist/data-components/chart/chart.d.ts.map +1 -1
  76. package/dist/data-components/chart/geo/geoChart.d.ts +10 -0
  77. package/dist/data-components/chart/geo/geoChart.d.ts.map +1 -0
  78. package/dist/data-components/chart/sankey/sankeyChart.d.ts +2 -0
  79. package/dist/data-components/chart/sankey/sankeyChart.d.ts.map +1 -1
  80. package/dist/data-components/data-component-configurator/data-component-configurator-types.d.ts +36 -0
  81. package/dist/data-components/data-component-configurator/data-component-configurator-types.d.ts.map +1 -0
  82. package/dist/data-components/data-component-configurator/data-component-configurator.d.ts +17 -0
  83. package/dist/data-components/data-component-configurator/data-component-configurator.d.ts.map +1 -0
  84. package/dist/data-components/data-component-utils.d.ts +4 -0
  85. package/dist/data-components/data-component-utils.d.ts.map +1 -0
  86. package/dist/data-components/data-structure/data-structure-utils.d.ts.map +1 -1
  87. package/dist/data-components/data-structure/data-structure.d.ts +10 -0
  88. package/dist/data-components/data-structure/data-structure.d.ts.map +1 -1
  89. package/dist/data-components/filter/filter-types.d.ts +1 -1
  90. package/dist/data-components/filter/filter-types.d.ts.map +1 -1
  91. package/dist/data-components/form/form-types.d.ts +44 -1
  92. package/dist/data-components/form/form-types.d.ts.map +1 -1
  93. package/dist/data-components/form/form.d.ts +1 -1
  94. package/dist/data-components/form/form.d.ts.map +1 -1
  95. package/dist/data-components/gantt/ai-assistant/gantt-ai-executor.d.ts +9 -0
  96. package/dist/data-components/gantt/ai-assistant/gantt-ai-executor.d.ts.map +1 -0
  97. package/dist/data-components/gantt/ai-assistant/gantt-ai-panel.d.ts +12 -0
  98. package/dist/data-components/gantt/ai-assistant/gantt-ai-panel.d.ts.map +1 -0
  99. package/dist/data-components/gantt/ai-assistant/gantt-ai-schema.d.ts +7 -0
  100. package/dist/data-components/gantt/ai-assistant/gantt-ai-schema.d.ts.map +1 -0
  101. package/dist/data-components/gantt/ai-assistant/gantt-ai-tools.d.ts +3 -0
  102. package/dist/data-components/gantt/ai-assistant/gantt-ai-tools.d.ts.map +1 -0
  103. package/dist/data-components/gantt/arrows/gantt-arrows.d.ts +21 -0
  104. package/dist/data-components/gantt/arrows/gantt-arrows.d.ts.map +1 -0
  105. package/dist/data-components/gantt/gantt-context.d.ts +13 -0
  106. package/dist/data-components/gantt/gantt-context.d.ts.map +1 -0
  107. package/dist/data-components/gantt/gantt-types.d.ts +102 -0
  108. package/dist/data-components/gantt/gantt-types.d.ts.map +1 -0
  109. package/dist/data-components/gantt/gantt-utils.d.ts +61 -0
  110. package/dist/data-components/gantt/gantt-utils.d.ts.map +1 -0
  111. package/dist/data-components/gantt/gantt.d.ts +4 -0
  112. package/dist/data-components/gantt/gantt.d.ts.map +1 -0
  113. package/dist/data-components/gantt/hooks/useGanttDrag.d.ts +15 -0
  114. package/dist/data-components/gantt/hooks/useGanttDrag.d.ts.map +1 -0
  115. package/dist/data-components/gantt/hooks/useGanttTimeline.d.ts +18 -0
  116. package/dist/data-components/gantt/hooks/useGanttTimeline.d.ts.map +1 -0
  117. package/dist/data-components/gantt/sidebar/gantt-sidebar-types.d.ts +10 -0
  118. package/dist/data-components/gantt/sidebar/gantt-sidebar-types.d.ts.map +1 -0
  119. package/dist/data-components/gantt/sidebar/gantt-sidebar.d.ts +3 -0
  120. package/dist/data-components/gantt/sidebar/gantt-sidebar.d.ts.map +1 -0
  121. package/dist/data-components/gantt/stories/gantt-stories-utils.d.ts +13 -0
  122. package/dist/data-components/gantt/stories/gantt-stories-utils.d.ts.map +1 -0
  123. package/dist/data-components/switcher/prop-form/prop-form-adapter.d.ts +8 -0
  124. package/dist/data-components/switcher/prop-form/prop-form-adapter.d.ts.map +1 -0
  125. package/dist/data-components/switcher/prop-form/prop-form-types.d.ts +17 -0
  126. package/dist/data-components/switcher/prop-form/prop-form-types.d.ts.map +1 -0
  127. package/dist/data-components/switcher/prop-form/prop-form.d.ts +6 -0
  128. package/dist/data-components/switcher/prop-form/prop-form.d.ts.map +1 -0
  129. package/dist/data-components/switcher/prop-schema/prop-schema-types.d.ts +53 -0
  130. package/dist/data-components/switcher/prop-schema/prop-schema-types.d.ts.map +1 -0
  131. package/dist/data-components/switcher/prop-schema/prop-schema-utils.d.ts +15 -0
  132. package/dist/data-components/switcher/prop-schema/prop-schema-utils.d.ts.map +1 -0
  133. package/dist/data-components/switcher/prop-schema/prop-schema.d.ts +38 -0
  134. package/dist/data-components/switcher/prop-schema/prop-schema.d.ts.map +1 -0
  135. package/dist/data-components/switcher/switcher-types.d.ts +58 -0
  136. package/dist/data-components/switcher/switcher-types.d.ts.map +1 -0
  137. package/dist/data-components/switcher/switcher.d.ts +12 -0
  138. package/dist/data-components/switcher/switcher.d.ts.map +1 -0
  139. package/dist/data-components/table-grid/ai-assistant/ai-assistant-executor.d.ts +5 -1
  140. package/dist/data-components/table-grid/ai-assistant/ai-assistant-executor.d.ts.map +1 -1
  141. package/dist/data-components/table-grid/ai-assistant/ai-assistant-panel-types.d.ts +5 -0
  142. package/dist/data-components/table-grid/ai-assistant/ai-assistant-panel-types.d.ts.map +1 -1
  143. package/dist/data-components/table-grid/ai-assistant/ai-assistant-panel.d.ts +1 -1
  144. package/dist/data-components/table-grid/ai-assistant/ai-assistant-panel.d.ts.map +1 -1
  145. package/dist/data-components/table-grid/ai-assistant/ai-assistant-tools.d.ts +2 -0
  146. package/dist/data-components/table-grid/ai-assistant/ai-assistant-tools.d.ts.map +1 -1
  147. package/dist/data-components/table-grid/ai-assistant/ai-assistant-types.d.ts +36 -0
  148. package/dist/data-components/table-grid/ai-assistant/ai-assistant-types.d.ts.map +1 -1
  149. package/dist/data-components/table-grid/ai-assistant/ai-assistant-validator.d.ts.map +1 -1
  150. package/dist/data-components/table-grid/formula/formula-builder.d.ts.map +1 -1
  151. package/dist/data-components/table-grid/grouping/grouping.d.ts +15 -0
  152. package/dist/data-components/table-grid/grouping/grouping.d.ts.map +1 -0
  153. package/dist/data-components/table-grid/header/table-grid-column-menu.d.ts.map +1 -1
  154. package/dist/data-components/table-grid/pivot/pivot-config-panel.d.ts.map +1 -1
  155. package/dist/data-components/table-grid/row/table-grid-row.d.ts.map +1 -1
  156. package/dist/data-components/table-grid/selection/selection-utils.d.ts +5 -5
  157. package/dist/data-components/table-grid/selection/selection-utils.d.ts.map +1 -1
  158. package/dist/data-components/table-grid/sorting/sorting.d.ts +3 -5
  159. package/dist/data-components/table-grid/sorting/sorting.d.ts.map +1 -1
  160. package/dist/data-components/table-grid/table-context/table-context-types.d.ts +3 -0
  161. package/dist/data-components/table-grid/table-context/table-context-types.d.ts.map +1 -1
  162. package/dist/data-components/table-grid/table-grid-context.d.ts +1 -1
  163. package/dist/data-components/table-grid/table-grid-context.d.ts.map +1 -1
  164. package/dist/data-components/table-grid/table-grid-panels.d.ts +22 -0
  165. package/dist/data-components/table-grid/table-grid-panels.d.ts.map +1 -0
  166. package/dist/data-components/table-grid/table-grid-types.d.ts +28 -1
  167. package/dist/data-components/table-grid/table-grid-types.d.ts.map +1 -1
  168. package/dist/data-components/table-grid/table-grid.d.ts +9 -2
  169. package/dist/data-components/table-grid/table-grid.d.ts.map +1 -1
  170. package/dist/data-components/table-grid/table-utils.d.ts +14 -2
  171. package/dist/data-components/table-grid/table-utils.d.ts.map +1 -1
  172. package/dist/data-components/ui-layer/ui-layer-types.d.ts +82 -0
  173. package/dist/data-components/ui-layer/ui-layer-types.d.ts.map +1 -0
  174. package/dist/data-components/ui-layer/ui-layer-utils.d.ts +13 -0
  175. package/dist/data-components/ui-layer/ui-layer-utils.d.ts.map +1 -0
  176. package/dist/experimental-components/dashboard-builder/builder-canvas.d.ts +33 -0
  177. package/dist/experimental-components/dashboard-builder/builder-canvas.d.ts.map +1 -0
  178. package/dist/experimental-components/dashboard-builder/dashboard-builder-hooks.d.ts +22 -0
  179. package/dist/experimental-components/dashboard-builder/dashboard-builder-hooks.d.ts.map +1 -0
  180. package/dist/experimental-components/dashboard-builder/dashboard-builder-types.d.ts +129 -0
  181. package/dist/experimental-components/dashboard-builder/dashboard-builder-types.d.ts.map +1 -0
  182. package/dist/experimental-components/dashboard-builder/dashboard-builder-utils.d.ts +28 -0
  183. package/dist/experimental-components/dashboard-builder/dashboard-builder-utils.d.ts.map +1 -0
  184. package/dist/experimental-components/dashboard-builder/dashboard-builder.d.ts +14 -0
  185. package/dist/experimental-components/dashboard-builder/dashboard-builder.d.ts.map +1 -0
  186. package/dist/experimental-components/dashboard-builder/widget-configurator.d.ts +24 -0
  187. package/dist/experimental-components/dashboard-builder/widget-configurator.d.ts.map +1 -0
  188. package/dist/experimental-components/dashboard-builder/widget-palette.d.ts +29 -0
  189. package/dist/experimental-components/dashboard-builder/widget-palette.d.ts.map +1 -0
  190. package/dist/framework-components/dashboard/dashboard-context.d.ts +12 -0
  191. package/dist/framework-components/dashboard/dashboard-context.d.ts.map +1 -0
  192. package/dist/framework-components/dashboard/dashboard-types.d.ts +35 -0
  193. package/dist/framework-components/dashboard/dashboard-types.d.ts.map +1 -0
  194. package/dist/framework-components/dashboard/dashboard-widget-actions.d.ts +1 -0
  195. package/dist/framework-components/dashboard/dashboard-widget-actions.d.ts.map +1 -0
  196. package/dist/framework-components/dashboard/dashboard-widget-types.d.ts +67 -0
  197. package/dist/framework-components/dashboard/dashboard-widget-types.d.ts.map +1 -0
  198. package/dist/framework-components/dashboard/dashboard-widget.d.ts +17 -0
  199. package/dist/framework-components/dashboard/dashboard-widget.d.ts.map +1 -0
  200. package/dist/framework-components/dashboard/dashboard.d.ts +11 -0
  201. package/dist/framework-components/dashboard/dashboard.d.ts.map +1 -0
  202. package/dist/framework-components/dashboard/data-engine/aggregation-engine.d.ts +11 -0
  203. package/dist/framework-components/dashboard/data-engine/aggregation-engine.d.ts.map +1 -0
  204. package/dist/framework-components/dashboard/data-engine/data-engine-client.d.ts +47 -0
  205. package/dist/framework-components/dashboard/data-engine/data-engine-client.d.ts.map +1 -0
  206. package/dist/framework-components/dashboard/data-engine/data-engine-types.d.ts +119 -0
  207. package/dist/framework-components/dashboard/data-engine/data-engine-types.d.ts.map +1 -0
  208. package/dist/framework-components/dashboard/data-engine/data-engine.d.ts +87 -0
  209. package/dist/framework-components/dashboard/data-engine/data-engine.d.ts.map +1 -0
  210. package/dist/framework-components/dashboard/data-engine/data-engine.test.d.ts +2 -0
  211. package/dist/framework-components/dashboard/data-engine/data-engine.test.d.ts.map +1 -0
  212. package/dist/framework-components/dashboard/data-engine/data-engine.worker.d.ts +2 -0
  213. package/dist/framework-components/dashboard/data-engine/data-engine.worker.d.ts.map +1 -0
  214. package/dist/framework-components/dashboard/data-engine/field-inference.d.ts +10 -0
  215. package/dist/framework-components/dashboard/data-engine/field-inference.d.ts.map +1 -0
  216. package/dist/framework-components/dashboard/data-engine/filter-adapter.d.ts +12 -0
  217. package/dist/framework-components/dashboard/data-engine/filter-adapter.d.ts.map +1 -0
  218. package/dist/framework-components/dashboard/data-engine/index.d.ts +8 -0
  219. package/dist/framework-components/dashboard/data-engine/index.d.ts.map +1 -0
  220. package/dist/framework-components/dashboard/data-engine/join-engine.d.ts +17 -0
  221. package/dist/framework-components/dashboard/data-engine/join-engine.d.ts.map +1 -0
  222. package/dist/framework-components/section/section-types.d.ts +14 -0
  223. package/dist/framework-components/section/section-types.d.ts.map +1 -0
  224. package/dist/framework-components/section/section.d.ts +9 -0
  225. package/dist/framework-components/section/section.d.ts.map +1 -0
  226. package/dist/index.d.ts +36 -12
  227. package/dist/index.d.ts.map +1 -1
  228. package/dist/providers/ai-assistant/ai-assistant-types.d.ts +2 -0
  229. package/dist/providers/ai-assistant/ai-assistant-types.d.ts.map +1 -1
  230. package/dist/providers/ai-assistant/ai-chat-panel.d.ts.map +1 -1
  231. package/dist/restio-ui.cjs.js +58 -30
  232. package/dist/restio-ui.es.js +33944 -32056
  233. package/dist/types/global-types.d.ts +11 -0
  234. package/dist/types/global-types.d.ts.map +1 -1
  235. package/dist/ui.css +1 -1
  236. package/dist/utility-components/icon/icon-assets.d.ts.map +1 -1
  237. package/package.json +1 -4
  238. package/dist/components/graph/graph-types.d.ts +0 -23
  239. package/dist/components/graph/graph-types.d.ts.map +0 -1
  240. package/dist/components/graph/graph.d.ts +0 -5
  241. package/dist/components/graph/graph.d.ts.map +0 -1
  242. package/dist/custom-components/layout-builder/layout-builder-constants.d.ts +0 -22
  243. package/dist/custom-components/layout-builder/layout-builder-constants.d.ts.map +0 -1
  244. package/dist/custom-components/layout-builder/layout-builder-schema.d.ts +0 -967
  245. package/dist/custom-components/layout-builder/layout-builder-schema.d.ts.map +0 -1
  246. package/dist/custom-components/layout-builder/layout-builder-templates.d.ts +0 -13
  247. package/dist/custom-components/layout-builder/layout-builder-templates.d.ts.map +0 -1
  248. package/dist/custom-components/layout-builder/layout-builder-types.d.ts +0 -73
  249. package/dist/custom-components/layout-builder/layout-builder-types.d.ts.map +0 -1
  250. package/dist/custom-components/layout-builder/layout-builder-utils.d.ts +0 -70
  251. package/dist/custom-components/layout-builder/layout-builder-utils.d.ts.map +0 -1
  252. package/dist/custom-components/layout-builder/layout-builder-validation.d.ts +0 -29
  253. package/dist/custom-components/layout-builder/layout-builder-validation.d.ts.map +0 -1
  254. package/dist/custom-components/layout-builder/layout-builder.d.ts +0 -4
  255. package/dist/custom-components/layout-builder/layout-builder.d.ts.map +0 -1
  256. package/dist/custom-components/layout-builder/layout-json-editor-types.d.ts +0 -60
  257. package/dist/custom-components/layout-builder/layout-json-editor-types.d.ts.map +0 -1
  258. package/dist/custom-components/layout-builder/layout-json-editor.d.ts +0 -13
  259. package/dist/custom-components/layout-builder/layout-json-editor.d.ts.map +0 -1
  260. package/dist/custom-components/layout-builder/stories/hooks/useHistory.d.ts +0 -49
  261. package/dist/custom-components/layout-builder/stories/hooks/useHistory.d.ts.map +0 -1
  262. package/dist/data-components/cell/cell-switch.d.ts +0 -17
  263. package/dist/data-components/cell/cell-switch.d.ts.map +0 -1
@@ -0,0 +1,129 @@
1
+ import { FilterGroup } from '../../data-components/filter/filter-types';
2
+ import { DataStructureColumn } from '../../data-components/data-structure/data-structure';
3
+ import { DataStructureUIConfig } from '../../data-components/ui-layer/ui-layer-types';
4
+ /**
5
+ * A widget type that can be placed on the dashboard canvas.
6
+ */
7
+ export type WidgetComponentType = "table-grid" | "chart" | "calendar" | "form" | "card-list" | "gantt";
8
+ /**
9
+ * Metadata for a widget type shown in the palette.
10
+ */
11
+ export interface WidgetTypeDescriptor {
12
+ type: WidgetComponentType;
13
+ label: string;
14
+ icon: string;
15
+ description: string;
16
+ }
17
+ /**
18
+ * Grid position for a widget on the canvas (desktop-only for now).
19
+ */
20
+ export interface WidgetPosition {
21
+ col: number;
22
+ row: number;
23
+ w: number;
24
+ h: number;
25
+ }
26
+ /**
27
+ * Configuration for a single widget on the dashboard.
28
+ */
29
+ export interface DashboardWidgetConfig {
30
+ /** Unique widget id */
31
+ id: string;
32
+ /** Display title */
33
+ title: string;
34
+ /** Optional subtitle */
35
+ subtitle?: string;
36
+ /** Which data-component to render */
37
+ componentType: WidgetComponentType;
38
+ /** References a data source exposed by the host application */
39
+ dataSourceId: string;
40
+ /** Column definitions (optional — auto-inferred if omitted) */
41
+ columns?: DataStructureColumn<object>[];
42
+ /** Widget-level filters (combined with global filters) */
43
+ filters?: FilterGroup | null;
44
+ /** Conditional styling rules */
45
+ uiConfig?: DataStructureUIConfig<object>;
46
+ /** Component-specific props (e.g. enableSorting, chart type, calendar view) */
47
+ componentProps?: Record<string, unknown>;
48
+ /** Grid position on the canvas */
49
+ position: WidgetPosition;
50
+ /** Per-widget action toggles. Falls back to global defaults if undefined. */
51
+ enableExport?: boolean;
52
+ enableScreenshot?: boolean;
53
+ enableExpand?: boolean;
54
+ }
55
+ /**
56
+ * Global defaults for widget actions. Applied to all widgets unless
57
+ * overridden per-widget.
58
+ */
59
+ export interface WidgetActionDefaults {
60
+ /** Show the export CSV button. Default: true. */
61
+ enableExport?: boolean;
62
+ /** Show the screenshot button. Default: false. */
63
+ enableScreenshot?: boolean;
64
+ /** Show the expand/fullscreen button. Default: true. */
65
+ enableExpand?: boolean;
66
+ }
67
+ /**
68
+ * The full dashboard configuration — what gets saved to DB as JSONB.
69
+ */
70
+ export interface DashboardConfig {
71
+ version: 1;
72
+ name: string;
73
+ /** Global filters applied to all widgets */
74
+ filters: FilterGroup | null;
75
+ /** Widgets placed on the dashboard */
76
+ widgets: DashboardWidgetConfig[];
77
+ }
78
+ /**
79
+ * Field format for display and aggregation.
80
+ */
81
+ export type FieldFormat = "text" | "number" | "currency" | "percentage" | "date" | "datetime" | "boolean";
82
+ /**
83
+ * Describes a single field in a data source.
84
+ */
85
+ export interface DataSourceField {
86
+ id: string;
87
+ name: string;
88
+ format: FieldFormat;
89
+ }
90
+ /**
91
+ * A data source exposed by the host application.
92
+ * `data` is sample/preview data used in the builder.
93
+ */
94
+ export interface DataSourceDefinition {
95
+ id: string;
96
+ name: string;
97
+ fields: DataSourceField[];
98
+ data: object[];
99
+ }
100
+ /**
101
+ * Registry of all available data sources, keyed by id.
102
+ */
103
+ export type DataSourceRegistry = Record<string, DataSourceDefinition>;
104
+ /**
105
+ * Props for the DashboardBuilder component.
106
+ */
107
+ export interface DashboardBuilderProps {
108
+ /** Available data sources (provided by the host application) */
109
+ dataSources: DataSourceRegistry;
110
+ /** Initial config to edit (undefined = start from scratch) */
111
+ initialConfig?: DashboardConfig;
112
+ /** Called when the user saves the dashboard */
113
+ onSave: (config: DashboardConfig) => void;
114
+ /** Called on every config change (for live preview) */
115
+ onChange?: (config: DashboardConfig) => void;
116
+ /** Global defaults for widget action buttons (export, screenshot, expand) */
117
+ widgetActionDefaults?: WidgetActionDefaults;
118
+ /** Additional CSS class name */
119
+ className?: string;
120
+ }
121
+ /**
122
+ * Internal builder state managed by the useDashboardBuilder hook.
123
+ */
124
+ export interface DashboardBuilderState {
125
+ config: DashboardConfig;
126
+ selectedWidgetId: string | null;
127
+ isDirty: boolean;
128
+ }
129
+ //# sourceMappingURL=dashboard-builder-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard-builder-types.d.ts","sourceRoot":"","sources":["../../../src/experimental-components/dashboard-builder/dashboard-builder-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qDAAqD,CAAC;AAC/F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AAM3F;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,YAAY,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,GAAG,WAAW,GAAG,OAAO,CAAC;AAEvG;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,mBAAmB,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,uBAAuB;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,oBAAoB;IAC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AAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,WAAW,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;AAMtE;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,gEAAgE;IAChE,WAAW,EAAE,kBAAkB,CAAC;IAChC,8DAA8D;IAC9D,aAAa,CAAC,EAAE,eAAe,CAAC;IAChC,+CAA+C;IAC/C,MAAM,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IAC1C,uDAAuD;IACvD,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IAC7C,6EAA6E;IAC7E,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAMD;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,eAAe,CAAC;IACxB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,OAAO,EAAE,OAAO,CAAC;CAClB"}
@@ -0,0 +1,28 @@
1
+ import { WidgetPosition } from './dashboard-builder-types';
2
+ /**
3
+ * Checks whether two grid rectangles overlap.
4
+ * Rectangles are defined by (col, row) top-left and (w, h) dimensions.
5
+ */
6
+ export declare function positionsOverlap(a: WidgetPosition, b: WidgetPosition): boolean;
7
+ /**
8
+ * Checks whether a position is within the grid bounds (12 cols × 30 rows).
9
+ */
10
+ export declare function isWithinBounds(pos: WidgetPosition): boolean;
11
+ /**
12
+ * Finds the first widget (by id) that overlaps with the given position.
13
+ * Returns the widget id or null.
14
+ */
15
+ export declare function findCollision(position: WidgetPosition, widgets: {
16
+ id: string;
17
+ position: WidgetPosition;
18
+ }[], excludeId?: string): string | null;
19
+ /**
20
+ * Finds the first free position on the grid for a widget of the given size.
21
+ * Scans left-to-right, top-to-bottom and returns the first spot with no collision.
22
+ * Falls back to appending after the last widget if the grid is full.
23
+ */
24
+ export declare function findFreePosition(w: number, h: number, widgets: {
25
+ id: string;
26
+ position: WidgetPosition;
27
+ }[]): WidgetPosition;
28
+ //# sourceMappingURL=dashboard-builder-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard-builder-utils.d.ts","sourceRoot":"","sources":["../../../src/experimental-components/dashboard-builder/dashboard-builder-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEhE;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,cAAc,GAAG,OAAO,CAO9E;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAE3D;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,cAAc,CAAA;CAAE,EAAE,EACnD,SAAS,CAAC,EAAE,MAAM,GACjB,MAAM,GAAG,IAAI,CAQf;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,OAAO,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,cAAc,CAAA;CAAE,EAAE,GAClD,cAAc,CAgBhB"}
@@ -0,0 +1,14 @@
1
+ import { default as React } from 'react';
2
+ import { DashboardBuilderProps } from './dashboard-builder-types';
3
+ /**
4
+ * DashboardBuilder is a visual, Notion-style dashboard configurator.
5
+ *
6
+ * Two modes:
7
+ * - **Edit**: palette, canvas with drag/resize, configurator panel
8
+ * - **View**: renders the actual Dashboard with real data components
9
+ *
10
+ * The builder produces a `DashboardConfig` object that can be serialized
11
+ * to JSON and saved to a database.
12
+ */
13
+ export declare const DashboardBuilder: React.FC<DashboardBuilderProps>;
14
+ //# sourceMappingURL=dashboard-builder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard-builder.d.ts","sourceRoot":"","sources":["../../../src/experimental-components/dashboard-builder/dashboard-builder.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkD,MAAM,OAAO,CAAC;AACvE,OAAO,KAAK,EAAE,qBAAqB,EAAyB,MAAM,2BAA2B,CAAC;AAS9F;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA+G5D,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { default as React } from 'react';
2
+ import { DashboardWidgetConfig, DataSourceRegistry, WidgetComponentType } from './dashboard-builder-types';
3
+ interface WidgetConfiguratorProps {
4
+ readonly widget: DashboardWidgetConfig | null;
5
+ readonly dataSources: DataSourceRegistry;
6
+ readonly onUpdate: (patch: Partial<DashboardWidgetConfig>) => void;
7
+ readonly onRemove: () => void;
8
+ readonly onClose: () => void;
9
+ readonly onAddWidget: (componentType: WidgetComponentType) => void;
10
+ }
11
+ /**
12
+ * Right-side panel to configure the selected widget.
13
+ *
14
+ * Uses the existing DataComponentConfigurator + PropForm system to show
15
+ * component-specific props (enableSorting, chart type, calendar view, etc.)
16
+ * based on the propSchemaRegistry.
17
+ *
18
+ * Custom fields (title, subtitle, data source) are rendered above the
19
+ * dynamic configurator. The component type selector is handled by the
20
+ * DataComponentConfigurator's built-in CardList.
21
+ */
22
+ export declare const WidgetConfigurator: React.FC<WidgetConfiguratorProps>;
23
+ export {};
24
+ //# sourceMappingURL=widget-configurator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widget-configurator.d.ts","sourceRoot":"","sources":["../../../src/experimental-components/dashboard-builder/widget-configurator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,KAAK,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAehH,UAAU,uBAAuB;IAC/B,QAAQ,CAAC,MAAM,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAC9C,QAAQ,CAAC,WAAW,EAAE,kBAAkB,CAAC;IACzC,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,qBAAqB,CAAC,KAAK,IAAI,CAAC;IACnE,QAAQ,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,CAAC,aAAa,EAAE,mBAAmB,KAAK,IAAI,CAAC;CACpE;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAiJhE,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { default as React } from 'react';
2
+ import { WidgetComponentType } from './dashboard-builder-types';
3
+ /**
4
+ * Available widget types shown in the palette.
5
+ */
6
+ export declare const WIDGET_TYPES: {
7
+ type: WidgetComponentType;
8
+ label: string;
9
+ icon: string;
10
+ description: string;
11
+ }[];
12
+ interface WidgetPaletteProps {
13
+ readonly onAddWidget: (componentType: WidgetComponentType, dataSourceId: string, position: {
14
+ col: number;
15
+ row: number;
16
+ w: number;
17
+ h: number;
18
+ }) => void;
19
+ }
20
+ /**
21
+ * Sidebar palette listing available widget types.
22
+ *
23
+ * Users drag a widget type from the palette onto the canvas to add it.
24
+ * For simplicity, the first available data source is auto-selected;
25
+ * the user can change it later in the configurator.
26
+ */
27
+ export declare const WidgetPalette: React.FC<WidgetPaletteProps>;
28
+ export {};
29
+ //# sourceMappingURL=widget-palette.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widget-palette.d.ts","sourceRoot":"","sources":["../../../src/experimental-components/dashboard-builder/widget-palette.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAKrE;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE;IAAE,IAAI,EAAE,mBAAmB,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,EAOzG,CAAC;AAEF,UAAU,kBAAkB;IAC1B,QAAQ,CAAC,WAAW,EAAE,CAAC,aAAa,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CACxJ;AAED;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA+BtD,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { DashboardContextValue } from './dashboard-types';
2
+ /**
3
+ * Context that shares global filters from Dashboard down to every DashboardWidget.
4
+ */
5
+ export declare const DashboardContext: import('react').Context<DashboardContextValue | null>;
6
+ /**
7
+ * Hook to consume the DashboardContext.
8
+ * Returns the current filters and onFilterChange callback.
9
+ * Returns null when used outside a Dashboard.
10
+ */
11
+ export declare function useDashboard(): DashboardContextValue | null;
12
+ //# sourceMappingURL=dashboard-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard-context.d.ts","sourceRoot":"","sources":["../../../src/framework-components/dashboard/dashboard-context.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE/D;;GAEG;AACH,eAAO,MAAM,gBAAgB,uDAAoD,CAAC;AAElF;;;;GAIG;AACH,wBAAgB,YAAY,IAAI,qBAAqB,GAAG,IAAI,CAE3D"}
@@ -0,0 +1,35 @@
1
+ import { ReactNode } from 'react';
2
+ import { ResponsiveLayout } from '../../custom-components/layout/layout-types';
3
+ import { FilterGroup, FilterField } from '../../data-components/filter/filter-types';
4
+ /**
5
+ * Props for the Dashboard orchestrator component.
6
+ *
7
+ * Dashboard provides global filters to all child DashboardWidget instances
8
+ * and arranges them using the responsive Layout system.
9
+ */
10
+ export interface DashboardProps {
11
+ /** Global filter tree applied to every widget's data */
12
+ filters: FilterGroup | null;
13
+ /** Called when the global filter tree changes */
14
+ onFilterChange: (filters: FilterGroup | null) => void;
15
+ /** Responsive layout configuration (mobile / tablet / desktop breakpoints) */
16
+ layout: ResponsiveLayout;
17
+ /** Field definitions for the FilterBuilder (required when enableFilter is true) */
18
+ fieldOptions?: FilterField[];
19
+ /** Show a filter button that opens the FilterBuilder overlay */
20
+ enableFilter?: boolean;
21
+ /** DashboardWidget children */
22
+ children: ReactNode;
23
+ /** Additional CSS class name */
24
+ className?: string;
25
+ }
26
+ /**
27
+ * Value provided by DashboardContext to all child DashboardWidgets.
28
+ */
29
+ export interface DashboardContextValue {
30
+ /** The current global filter tree */
31
+ filters: FilterGroup | null;
32
+ /** Update the global filter tree */
33
+ onFilterChange: (filters: FilterGroup | null) => void;
34
+ }
35
+ //# sourceMappingURL=dashboard-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard-types.d.ts","sourceRoot":"","sources":["../../../src/framework-components/dashboard/dashboard-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AACpF,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAE1F;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,wDAAwD;IACxD,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5B,iDAAiD;IACjD,cAAc,EAAE,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;IACtD,8EAA8E;IAC9E,MAAM,EAAE,gBAAgB,CAAC;IACzB,mFAAmF;IACnF,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;IAC7B,gEAAgE;IAChE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,+BAA+B;IAC/B,QAAQ,EAAE,SAAS,CAAC;IACpB,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,qCAAqC;IACrC,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5B,oCAAoC;IACpC,cAAc,EAAE,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;CACvD"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=dashboard-widget-actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard-widget-actions.d.ts","sourceRoot":"","sources":["../../../src/framework-components/dashboard/dashboard-widget-actions.ts"],"names":[],"mappings":""}
@@ -0,0 +1,67 @@
1
+ import { ReactNode } from 'react';
2
+ import { DataStructureColumn } from '../../data-components/data-structure/data-structure';
3
+ import { DataStructureUIConfig } from '../../data-components/ui-layer/ui-layer-types';
4
+ import { DataEngine } from './data-engine/data-engine';
5
+ import { Query } from './data-engine/data-engine-types';
6
+ /**
7
+ * Filtered data payload passed to the DashboardWidget render prop.
8
+ */
9
+ export interface DashboardWidgetRenderPayload<TData> {
10
+ /** Data filtered by the global dashboard filters (or by the DataEngine) */
11
+ data: TData[];
12
+ }
13
+ /**
14
+ * Props for the DashboardWidget component.
15
+ *
16
+ * Three modes are supported, depending on which props you provide:
17
+ *
18
+ * - **Passthrough mode**: provide only `data`. The data is used as-is —
19
+ * the server already prepared it. Zero frontend processing.
20
+ * - **Legacy mode**: provide `data` + `columns`. Global dashboard filters
21
+ * are applied client-side via `applyFilter()`.
22
+ * - **Engine mode**: provide `dataEngine` + `query`. The DataEngine handles
23
+ * joins, aggregations, filtering, sorting, and limiting.
24
+ */
25
+ export interface DashboardWidgetProps<TData> {
26
+ /** Unique identifier for this widget (used as Layout block key) */
27
+ id: string;
28
+ /** Widget title displayed in the Section header */
29
+ title: string;
30
+ /** Optional subtitle displayed below the title */
31
+ subtitle?: string;
32
+ /**
33
+ * Data for this widget.
34
+ *
35
+ * - **Passthrough**: provide `data` alone → used as-is (server-ready).
36
+ * - **Legacy**: provide `data` + `columns` → global filters applied.
37
+ */
38
+ data?: TData[];
39
+ /**
40
+ * Column definitions. When provided, global dashboard filters are
41
+ * applied client-side via `applyFilter()`. Omit for passthrough mode.
42
+ */
43
+ columns?: DataStructureColumn<TData>[];
44
+ /**
45
+ * DataEngine instance. When provided, the widget uses the engine
46
+ * to execute the query instead of using raw data + applyFilter().
47
+ */
48
+ dataEngine?: DataEngine;
49
+ /**
50
+ * Query to execute against the DataEngine.
51
+ * Only used when `dataEngine` is provided.
52
+ */
53
+ query?: Query;
54
+ /** Optional UI config for conditional styling */
55
+ uiConfig?: DataStructureUIConfig<TData>;
56
+ /** Render prop receiving filtered data */
57
+ children: (payload: DashboardWidgetRenderPayload<TData>) => ReactNode;
58
+ /** Show the export data action button */
59
+ enableExport?: boolean;
60
+ /** Show the screenshot action button */
61
+ enableScreenshot?: boolean;
62
+ /** Show the visual expand (fullscreen) action button */
63
+ enableExpand?: boolean;
64
+ /** Additional CSS class name */
65
+ className?: string;
66
+ }
67
+ //# sourceMappingURL=dashboard-widget-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard-widget-types.d.ts","sourceRoot":"","sources":["../../../src/framework-components/dashboard/dashboard-widget-types.ts"],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,0 +1,17 @@
1
+ import { DashboardWidgetProps } from './dashboard-widget-types';
2
+ /**
3
+ * DashboardWidget is a self-contained widget that:
4
+ * 1. Receives its own data (raw, pre-filtered, or engine-backed)
5
+ * 2. Renders a Section with a toolbar of actions (export, screenshot, expand)
6
+ * 3. Passes data to the render prop
7
+ *
8
+ * Three modes:
9
+ * - **Passthrough**: provide only `data` → used as-is (server-ready, zero processing)
10
+ * - **Legacy**: provide `data` + `columns` → global filters applied via `applyFilter()`
11
+ * - **Engine**: provide `dataEngine` + `query` → DataEngine handles everything
12
+ */
13
+ export declare const DashboardWidget: {
14
+ <TData extends object>({ title, subtitle, data, columns, dataEngine, query, children, enableExport, enableScreenshot, enableExpand, className, }: DashboardWidgetProps<TData>): import("react/jsx-runtime").JSX.Element;
15
+ displayName: string;
16
+ };
17
+ //# sourceMappingURL=dashboard-widget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard-widget.d.ts","sourceRoot":"","sources":["../../../src/framework-components/dashboard/dashboard-widget.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAOrE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe;KAAI,KAAK,SAAS,MAAM,6HAajD,oBAAoB,CAAC,KAAK,CAAC;;CAgF7B,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ import { DashboardProps } from './dashboard-types';
3
+ /**
4
+ * Dashboard is the top-level orchestrator for a page of data widgets.
5
+ *
6
+ * It provides global filters to all child DashboardWidget instances via context
7
+ * and arranges them using the responsive Layout system.
8
+ * When `enableFilter` is set, a filter button opens the FilterBuilder overlay.
9
+ */
10
+ export declare const Dashboard: React.FC<DashboardProps>;
11
+ //# sourceMappingURL=dashboard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../../../src/framework-components/dashboard/dashboard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAErD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAMxD;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAoC9C,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { Aggregation, DataEngineRow, FieldRef } from './data-engine-types';
2
+ /**
3
+ * Applies group-by and aggregation functions to a set of rows.
4
+ *
5
+ * @param rows - The input rows (already joined and filtered)
6
+ * @param groupBy - Fields to group by
7
+ * @param aggregations - Aggregation definitions
8
+ * @returns New rows with group-by keys + aggregation results
9
+ */
10
+ export declare function aggregate(rows: DataEngineRow[], groupBy: FieldRef[], aggregations: Aggregation[]): DataEngineRow[];
11
+ //# sourceMappingURL=aggregation-engine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aggregation-engine.d.ts","sourceRoot":"","sources":["../../../../src/framework-components/dashboard/data-engine/aggregation-engine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EAEX,aAAa,EACb,QAAQ,EACT,MAAM,qBAAqB,CAAC;AAM7B;;;;;;;GAOG;AACH,wBAAgB,SAAS,CACvB,IAAI,EAAE,aAAa,EAAE,EACrB,OAAO,EAAE,QAAQ,EAAE,EACnB,YAAY,EAAE,WAAW,EAAE,GAC1B,aAAa,EAAE,CAqCjB"}
@@ -0,0 +1,47 @@
1
+ import { DataEngineConfig, DataEngineResult, DataEngineState, Query } from './data-engine-types';
2
+ /**
3
+ * A main-thread client that communicates with the DataEngine Web Worker.
4
+ *
5
+ * Provides the same API as the synchronous `DataEngine` class, but all
6
+ * heavy operations run off the main thread.
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * const client = new DataEngineClient();
11
+ * await client.init({ sources: [...], relationships: [...] });
12
+ * const result = await client.execute({ select: [...], groupBy: [...] });
13
+ * ```
14
+ */
15
+ export declare class DataEngineClient {
16
+ private worker;
17
+ private pending;
18
+ private requestCounter;
19
+ private ready;
20
+ private readyPromise;
21
+ private readyResolve;
22
+ constructor();
23
+ /**
24
+ * Initialises the worker and configures the data engine.
25
+ * Must be called before any other method.
26
+ */
27
+ init(config: DataEngineConfig): Promise<void>;
28
+ /**
29
+ * Executes a query against the data engine.
30
+ */
31
+ execute(query: Query): Promise<DataEngineResult>;
32
+ /**
33
+ * Returns the full joined dataset.
34
+ */
35
+ getJoinedData(): Promise<unknown[]>;
36
+ /**
37
+ * Returns the serialisable engine state.
38
+ */
39
+ getState(): Promise<DataEngineState>;
40
+ /**
41
+ * Terminates the worker. Call when the client is no longer needed.
42
+ */
43
+ destroy(): void;
44
+ private ensureReady;
45
+ private nextRequestId;
46
+ }
47
+ //# sourceMappingURL=data-engine-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-engine-client.d.ts","sourceRoot":"","sources":["../../../../src/framework-components/dashboard/data-engine/data-engine-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,KAAK,EACN,MAAM,qBAAqB,CAAC;AAW7B;;;;;;;;;;;;GAYG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,MAAM,CAAuB;IACrC,OAAO,CAAC,OAAO,CAAqC;IACpD,OAAO,CAAC,cAAc,CAAK;IAC3B,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,YAAY,CAAgB;IACpC,OAAO,CAAC,YAAY,CAAc;;IAQlC;;;OAGG;IACG,IAAI,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IA+CnD;;OAEG;IACG,OAAO,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAUtD;;OAEG;IACG,aAAa,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;IAUzC;;OAEG;IACG,QAAQ,IAAI,OAAO,CAAC,eAAe,CAAC;IAU1C;;OAEG;IACH,OAAO,IAAI,IAAI;IAef,OAAO,CAAC,WAAW;IAMnB,OAAO,CAAC,aAAa;CAGtB"}
@@ -0,0 +1,119 @@
1
+ import { FilterGroup } from '../../../data-components/filter/filter-types';
2
+ /**
3
+ * Identifies a field within a data source table.
4
+ */
5
+ export interface FieldRef {
6
+ tableId: string;
7
+ fieldId: string;
8
+ }
9
+ export type FieldFormat = "text" | "number" | "currency" | "percentage" | "date" | "datetime" | "boolean";
10
+ export interface FieldDefinition {
11
+ /** Must match a property key in the row data */
12
+ id: string;
13
+ /** Human-readable display name */
14
+ name: string;
15
+ /** Data format used for display and aggregation */
16
+ format: FieldFormat;
17
+ }
18
+ export interface DataSourceConfig<T extends object = object> {
19
+ /** Unique identifier for this data source */
20
+ id: string;
21
+ /** Human-readable name */
22
+ name: string;
23
+ /** Raw row data */
24
+ data: T[];
25
+ /**
26
+ * Field definitions. If omitted, fields are auto-inferred from the first row.
27
+ * @see inferFields
28
+ */
29
+ fields?: FieldDefinition[];
30
+ }
31
+ export type RelationshipType = "many-to-one" | "one-to-many" | "one-to-one";
32
+ export interface Relationship {
33
+ /** Unique identifier for this relationship */
34
+ id: string;
35
+ /** The "from" side of the join (foreign key) */
36
+ source: FieldRef;
37
+ /** The "to" side of the join (primary key) */
38
+ target: FieldRef;
39
+ /** Cardinality */
40
+ type: RelationshipType;
41
+ }
42
+ export type ExpressionOperator = "add" | "subtract" | "multiply" | "divide" | "concat" | "equals" | "notEquals" | "greaterThan" | "lessThan" | "and" | "or" | "not" | "if" | "coalesce";
43
+ export type ExpressionInput = FieldRef | LiteralValue | ExpressionNode;
44
+ export interface LiteralValue {
45
+ type: "literal";
46
+ value: unknown;
47
+ }
48
+ export interface ExpressionNode {
49
+ operator: ExpressionOperator;
50
+ inputs: ExpressionInput[];
51
+ }
52
+ export interface ExpressionDefinition {
53
+ /** Unique identifier, usable as a field reference */
54
+ id: string;
55
+ /** Human-readable name */
56
+ name: string;
57
+ /** Display format */
58
+ format: FieldFormat;
59
+ /** The expression tree */
60
+ expression: ExpressionNode;
61
+ }
62
+ export type AggregationFunction = "sum" | "count" | "avg" | "min" | "max" | "countDistinct";
63
+ export interface Aggregation {
64
+ /** The field to aggregate */
65
+ field: FieldRef;
66
+ /** Aggregation function */
67
+ function: AggregationFunction;
68
+ /** Output column alias (defaults to `function_fieldId`) */
69
+ alias?: string;
70
+ }
71
+ export type SortDirection = "asc" | "desc";
72
+ export interface SortCondition {
73
+ field: FieldRef;
74
+ direction: SortDirection;
75
+ }
76
+ export interface Query {
77
+ /** Fields to include in the result */
78
+ select: FieldRef[];
79
+ /** Group-by fields (required for aggregations) */
80
+ groupBy?: FieldRef[];
81
+ /** Aggregation definitions */
82
+ aggregations?: Aggregation[];
83
+ /** Filter conditions (uses the existing FilterGroup AST) */
84
+ filters?: FilterGroup | null;
85
+ /** Sort conditions */
86
+ sort?: SortCondition[];
87
+ /** Maximum number of rows to return */
88
+ limit?: number;
89
+ }
90
+ export interface DataEngineConfig {
91
+ /** Data sources (tables) */
92
+ sources: DataSourceConfig[];
93
+ /** Relationships between sources */
94
+ relationships?: Relationship[];
95
+ /** Calculated field definitions */
96
+ expressions?: ExpressionDefinition[];
97
+ }
98
+ /**
99
+ * A flat row produced by the data engine.
100
+ * Keys are in the format `tableId.fieldId` for source fields,
101
+ * or just `fieldId` for expressions.
102
+ */
103
+ export type DataEngineRow = Record<string, unknown>;
104
+ export interface DataEngineResult {
105
+ /** The result rows */
106
+ rows: DataEngineRow[];
107
+ /** Total row count before limit was applied */
108
+ total: number;
109
+ }
110
+ /**
111
+ * Full serialisable snapshot of the data engine configuration.
112
+ * Can be persisted and restored.
113
+ */
114
+ export interface DataEngineState {
115
+ sources: DataSourceConfig[];
116
+ relationships: Relationship[];
117
+ expressions: ExpressionDefinition[];
118
+ }
119
+ //# sourceMappingURL=data-engine-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-engine-types.d.ts","sourceRoot":"","sources":["../../../../src/framework-components/dashboard/data-engine/data-engine-types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