@restio/ui 0.0.11-SNAPSHOT → 0.1.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.
- package/dist/assets/svg/chart-area.svg +9 -0
- package/dist/assets/svg/chart-bar-stacked.svg +9 -0
- package/dist/assets/svg/chart-bar.svg +6 -0
- package/dist/assets/svg/chart-candlestick.svg +17 -0
- package/dist/assets/svg/chart-gantt.svg +9 -0
- package/dist/assets/svg/chart-line.svg +9 -0
- package/dist/assets/svg/chart-pie.svg +9 -0
- package/dist/assets/svg/chart-sankey.svg +18 -0
- package/dist/assets/svg/form.svg +16 -0
- package/dist/assets/svg/list.svg +15 -0
- package/dist/assets/svg/pie-chart.svg +1 -0
- package/dist/assets/svg/table.svg +18 -0
- package/dist/components/anchored-overlay/anchored-overlay-types.d.ts +2 -0
- package/dist/components/anchored-overlay/anchored-overlay-types.d.ts.map +1 -1
- package/dist/components/anchored-overlay/anchored-overlay.d.ts.map +1 -1
- package/dist/components/button-dropdown/button-dropdown-types.d.ts +20 -0
- package/dist/components/button-dropdown/button-dropdown-types.d.ts.map +1 -0
- package/dist/components/button-dropdown/button-dropdown.d.ts +8 -0
- package/dist/components/button-dropdown/button-dropdown.d.ts.map +1 -0
- package/dist/components/checkbox-group/checkbox-group-types.d.ts +28 -0
- package/dist/components/checkbox-group/checkbox-group-types.d.ts.map +1 -0
- package/dist/components/checkbox-group/checkbox-group.d.ts +8 -0
- package/dist/components/checkbox-group/checkbox-group.d.ts.map +1 -0
- package/dist/components/list/list-types.d.ts +22 -1
- package/dist/components/list/list-types.d.ts.map +1 -1
- package/dist/components/list/list.d.ts.map +1 -1
- package/dist/components/menu/menu.d.ts.map +1 -1
- package/dist/components/progress-bar/progress-bar-types.d.ts +20 -0
- package/dist/components/progress-bar/progress-bar-types.d.ts.map +1 -0
- package/dist/components/progress-bar/progress-bar.d.ts +7 -0
- package/dist/components/progress-bar/progress-bar.d.ts.map +1 -0
- package/dist/components/radio/radio-types.d.ts +14 -0
- package/dist/components/radio/radio-types.d.ts.map +1 -0
- package/dist/components/radio/radio.d.ts +8 -0
- package/dist/components/radio/radio.d.ts.map +1 -0
- package/dist/components/radio-group/radio-group-types.d.ts +30 -0
- package/dist/components/radio-group/radio-group-types.d.ts.map +1 -0
- package/dist/components/radio-group/radio-group.d.ts +8 -0
- package/dist/components/radio-group/radio-group.d.ts.map +1 -0
- package/dist/components/select/select-types.d.ts +29 -1
- package/dist/components/select/select-types.d.ts.map +1 -1
- package/dist/components/select/select.d.ts.map +1 -1
- package/dist/components/selection-grid/selection-grid-types.d.ts +20 -0
- package/dist/components/selection-grid/selection-grid-types.d.ts.map +1 -0
- package/dist/components/selection-grid/selection-grid.d.ts +8 -0
- package/dist/components/selection-grid/selection-grid.d.ts.map +1 -0
- package/dist/components/typography/typography-types.d.ts +15 -0
- package/dist/components/typography/typography-types.d.ts.map +1 -1
- package/dist/components/typography/typography.d.ts +1 -1
- package/dist/components/typography/typography.d.ts.map +1 -1
- package/dist/custom-components/chat/chat.d.ts.map +1 -1
- package/dist/custom-components/layout/layout-renderers.d.ts +9 -0
- package/dist/custom-components/layout/layout-renderers.d.ts.map +1 -0
- package/dist/custom-components/layout/layout-types.d.ts +24 -10
- package/dist/custom-components/layout/layout-types.d.ts.map +1 -1
- package/dist/custom-components/layout/layout.d.ts +9 -0
- package/dist/custom-components/layout/layout.d.ts.map +1 -1
- package/dist/custom-components/markdown/markdown-types.d.ts +0 -2
- package/dist/custom-components/markdown/markdown-types.d.ts.map +1 -1
- package/dist/custom-components/markdown/markdown.d.ts.map +1 -1
- package/dist/data-components/assets/cell-types-asset.d.ts +39 -0
- package/dist/data-components/assets/cell-types-asset.d.ts.map +1 -0
- package/dist/data-components/assets/data-components-asset.d.ts +11 -0
- package/dist/data-components/assets/data-components-asset.d.ts.map +1 -1
- package/dist/data-components/calendar/calendar-types.d.ts +2 -1
- package/dist/data-components/calendar/calendar-types.d.ts.map +1 -1
- package/dist/data-components/calendar/calendar.d.ts +1 -1
- package/dist/data-components/calendar/calendar.d.ts.map +1 -1
- package/dist/data-components/card/card-types.d.ts +21 -0
- package/dist/data-components/card/card-types.d.ts.map +1 -0
- package/dist/data-components/card/card.d.ts +10 -0
- package/dist/data-components/card/card.d.ts.map +1 -0
- package/dist/data-components/card-list/card-list-types.d.ts +22 -0
- package/dist/data-components/card-list/card-list-types.d.ts.map +1 -0
- package/dist/data-components/card-list/card-list.d.ts +13 -0
- package/dist/data-components/card-list/card-list.d.ts.map +1 -0
- package/dist/data-components/card-list/models/ecommerce.d.ts +13 -0
- package/dist/data-components/card-list/models/ecommerce.d.ts.map +1 -0
- package/dist/data-components/cell/cell-registry.d.ts +29 -0
- package/dist/data-components/cell/cell-registry.d.ts.map +1 -0
- package/dist/data-components/cell/cell-types.d.ts +5 -0
- package/dist/data-components/cell/cell-types.d.ts.map +1 -1
- package/dist/data-components/cell/cell-utils.d.ts +0 -6
- package/dist/data-components/cell/cell-utils.d.ts.map +1 -1
- package/dist/data-components/cell/cell.d.ts +1 -1
- package/dist/data-components/cell/cell.d.ts.map +1 -1
- package/dist/data-components/chart/chart-tooltip/chart-tooltip-types.d.ts +14 -0
- package/dist/data-components/chart/chart-tooltip/chart-tooltip-types.d.ts.map +1 -0
- package/dist/data-components/chart/chart-tooltip/chart-tooltip.d.ts +7 -0
- package/dist/data-components/chart/chart-tooltip/chart-tooltip.d.ts.map +1 -0
- package/dist/data-components/chart/chart-types.d.ts +29 -2
- package/dist/data-components/chart/chart-types.d.ts.map +1 -1
- package/dist/data-components/chart/chart-utils.d.ts +28 -0
- package/dist/data-components/chart/chart-utils.d.ts.map +1 -0
- package/dist/data-components/chart/chart.d.ts +1 -1
- package/dist/data-components/chart/chart.d.ts.map +1 -1
- package/dist/data-components/chart/geo/geoChart.d.ts +10 -0
- package/dist/data-components/chart/geo/geoChart.d.ts.map +1 -0
- package/dist/data-components/chart/sankey/sankeyChart.d.ts +2 -0
- package/dist/data-components/chart/sankey/sankeyChart.d.ts.map +1 -1
- package/dist/data-components/data-component-configurator/data-component-configurator-types.d.ts +36 -0
- package/dist/data-components/data-component-configurator/data-component-configurator-types.d.ts.map +1 -0
- package/dist/data-components/data-component-configurator/data-component-configurator.d.ts +17 -0
- package/dist/data-components/data-component-configurator/data-component-configurator.d.ts.map +1 -0
- package/dist/data-components/data-component-types.d.ts +11 -0
- package/dist/data-components/data-component-types.d.ts.map +1 -0
- package/dist/data-components/data-component-utils.d.ts +4 -0
- package/dist/data-components/data-component-utils.d.ts.map +1 -0
- package/dist/data-components/data-structure/data-structure-utils.d.ts.map +1 -1
- package/dist/data-components/data-structure/data-structure.d.ts +10 -0
- package/dist/data-components/data-structure/data-structure.d.ts.map +1 -1
- package/dist/data-components/filter/filter-types.d.ts +1 -1
- package/dist/data-components/filter/filter-types.d.ts.map +1 -1
- package/dist/data-components/form/form-types.d.ts +44 -1
- package/dist/data-components/form/form-types.d.ts.map +1 -1
- package/dist/data-components/form/form.d.ts +1 -1
- package/dist/data-components/form/form.d.ts.map +1 -1
- package/dist/data-components/gantt/ai-assistant/gantt-ai-panel.d.ts +3 -3
- package/dist/data-components/gantt/ai-assistant/gantt-ai-panel.d.ts.map +1 -1
- package/dist/data-components/gantt/gantt-types.d.ts +2 -1
- package/dist/data-components/gantt/gantt-types.d.ts.map +1 -1
- package/dist/data-components/switcher/prop-form/prop-form-adapter.d.ts +8 -0
- package/dist/data-components/switcher/prop-form/prop-form-adapter.d.ts.map +1 -0
- package/dist/data-components/switcher/prop-form/prop-form-types.d.ts +17 -0
- package/dist/data-components/switcher/prop-form/prop-form-types.d.ts.map +1 -0
- package/dist/data-components/switcher/prop-form/prop-form.d.ts +6 -0
- package/dist/data-components/switcher/prop-form/prop-form.d.ts.map +1 -0
- package/dist/data-components/switcher/prop-schema/prop-schema-types.d.ts +53 -0
- package/dist/data-components/switcher/prop-schema/prop-schema-types.d.ts.map +1 -0
- package/dist/data-components/switcher/prop-schema/prop-schema-utils.d.ts +15 -0
- package/dist/data-components/switcher/prop-schema/prop-schema-utils.d.ts.map +1 -0
- package/dist/data-components/switcher/prop-schema/prop-schema.d.ts +38 -0
- package/dist/data-components/switcher/prop-schema/prop-schema.d.ts.map +1 -0
- package/dist/data-components/switcher/switcher-types.d.ts +58 -0
- package/dist/data-components/switcher/switcher-types.d.ts.map +1 -0
- package/dist/data-components/switcher/switcher.d.ts +12 -0
- package/dist/data-components/switcher/switcher.d.ts.map +1 -0
- package/dist/data-components/table-grid/formula/formula-builder.d.ts.map +1 -1
- package/dist/data-components/table-grid/row/table-grid-row.d.ts.map +1 -1
- package/dist/data-components/table-grid/table-context/table-context-types.d.ts +3 -0
- package/dist/data-components/table-grid/table-context/table-context-types.d.ts.map +1 -1
- package/dist/data-components/table-grid/table-grid-context.d.ts +1 -1
- package/dist/data-components/table-grid/table-grid-context.d.ts.map +1 -1
- package/dist/data-components/table-grid/table-grid-panels.d.ts.map +1 -1
- package/dist/data-components/table-grid/table-grid-types.d.ts +7 -1
- package/dist/data-components/table-grid/table-grid-types.d.ts.map +1 -1
- package/dist/data-components/table-grid/table-grid.d.ts +1 -1
- package/dist/data-components/table-grid/table-grid.d.ts.map +1 -1
- package/dist/data-components/ui-layer/ui-layer-types.d.ts +82 -0
- package/dist/data-components/ui-layer/ui-layer-types.d.ts.map +1 -0
- package/dist/data-components/ui-layer/ui-layer-utils.d.ts +13 -0
- package/dist/data-components/ui-layer/ui-layer-utils.d.ts.map +1 -0
- package/dist/experimental-components/dashboard-builder/builder-canvas-hooks.d.ts +47 -0
- package/dist/experimental-components/dashboard-builder/builder-canvas-hooks.d.ts.map +1 -0
- package/dist/experimental-components/dashboard-builder/builder-canvas.d.ts +33 -0
- package/dist/experimental-components/dashboard-builder/builder-canvas.d.ts.map +1 -0
- package/dist/experimental-components/dashboard-builder/dashboard-builder-hooks.d.ts +23 -0
- package/dist/experimental-components/dashboard-builder/dashboard-builder-hooks.d.ts.map +1 -0
- package/dist/experimental-components/dashboard-builder/dashboard-builder-types.d.ts +150 -0
- package/dist/experimental-components/dashboard-builder/dashboard-builder-types.d.ts.map +1 -0
- package/dist/experimental-components/dashboard-builder/dashboard-builder-utils.d.ts +28 -0
- package/dist/experimental-components/dashboard-builder/dashboard-builder-utils.d.ts.map +1 -0
- package/dist/experimental-components/dashboard-builder/dashboard-builder.d.ts +14 -0
- package/dist/experimental-components/dashboard-builder/dashboard-builder.d.ts.map +1 -0
- package/dist/experimental-components/dashboard-builder/widget-configurator.d.ts +24 -0
- package/dist/experimental-components/dashboard-builder/widget-configurator.d.ts.map +1 -0
- package/dist/experimental-components/dashboard-builder/widget-palette.d.ts +20 -0
- package/dist/experimental-components/dashboard-builder/widget-palette.d.ts.map +1 -0
- package/dist/framework-components/dashboard/dashboard-context.d.ts +12 -0
- package/dist/framework-components/dashboard/dashboard-context.d.ts.map +1 -0
- package/dist/framework-components/dashboard/dashboard-types.d.ts +35 -0
- package/dist/framework-components/dashboard/dashboard-types.d.ts.map +1 -0
- package/dist/framework-components/dashboard/dashboard-widget-actions.d.ts +1 -0
- package/dist/framework-components/dashboard/dashboard-widget-actions.d.ts.map +1 -0
- package/dist/framework-components/dashboard/dashboard-widget-types.d.ts +67 -0
- package/dist/framework-components/dashboard/dashboard-widget-types.d.ts.map +1 -0
- package/dist/framework-components/dashboard/dashboard-widget.d.ts +17 -0
- package/dist/framework-components/dashboard/dashboard-widget.d.ts.map +1 -0
- package/dist/framework-components/dashboard/dashboard.d.ts +11 -0
- package/dist/framework-components/dashboard/dashboard.d.ts.map +1 -0
- package/dist/framework-components/dashboard/data-engine/aggregation-engine.d.ts +11 -0
- package/dist/framework-components/dashboard/data-engine/aggregation-engine.d.ts.map +1 -0
- package/dist/framework-components/dashboard/data-engine/data-engine-client.d.ts +47 -0
- package/dist/framework-components/dashboard/data-engine/data-engine-client.d.ts.map +1 -0
- package/dist/framework-components/dashboard/data-engine/data-engine-types.d.ts +119 -0
- package/dist/framework-components/dashboard/data-engine/data-engine-types.d.ts.map +1 -0
- package/dist/framework-components/dashboard/data-engine/data-engine.d.ts +87 -0
- package/dist/framework-components/dashboard/data-engine/data-engine.d.ts.map +1 -0
- package/dist/framework-components/dashboard/data-engine/data-engine.test.d.ts +2 -0
- package/dist/framework-components/dashboard/data-engine/data-engine.test.d.ts.map +1 -0
- package/dist/framework-components/dashboard/data-engine/data-engine.worker.d.ts +2 -0
- package/dist/framework-components/dashboard/data-engine/data-engine.worker.d.ts.map +1 -0
- package/dist/framework-components/dashboard/data-engine/field-inference.d.ts +10 -0
- package/dist/framework-components/dashboard/data-engine/field-inference.d.ts.map +1 -0
- package/dist/framework-components/dashboard/data-engine/filter-adapter.d.ts +12 -0
- package/dist/framework-components/dashboard/data-engine/filter-adapter.d.ts.map +1 -0
- package/dist/framework-components/dashboard/data-engine/index.d.ts +8 -0
- package/dist/framework-components/dashboard/data-engine/index.d.ts.map +1 -0
- package/dist/framework-components/dashboard/data-engine/join-engine.d.ts +17 -0
- package/dist/framework-components/dashboard/data-engine/join-engine.d.ts.map +1 -0
- package/dist/framework-components/section/section-types.d.ts +14 -0
- package/dist/framework-components/section/section-types.d.ts.map +1 -0
- package/dist/framework-components/section/section.d.ts +9 -0
- package/dist/framework-components/section/section.d.ts.map +1 -0
- package/dist/index.d.ts +40 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/restio-ui.cjs.js +76 -30
- package/dist/restio-ui.es.js +28469 -27492
- package/dist/types/global-types.d.ts +16 -0
- package/dist/types/global-types.d.ts.map +1 -1
- package/dist/ui.css +1 -1
- package/dist/utility-components/icon/icon-assets.d.ts.map +1 -1
- package/dist/utility-components/overlay-panel/overlay-panel.d.ts.map +1 -1
- package/package.json +1 -4
- package/dist/components/graph/graph-types.d.ts +0 -23
- package/dist/components/graph/graph-types.d.ts.map +0 -1
- package/dist/components/graph/graph.d.ts +0 -5
- package/dist/components/graph/graph.d.ts.map +0 -1
- package/dist/custom-components/layout-builder/layout-builder-constants.d.ts +0 -22
- package/dist/custom-components/layout-builder/layout-builder-constants.d.ts.map +0 -1
- package/dist/custom-components/layout-builder/layout-builder-schema.d.ts +0 -967
- package/dist/custom-components/layout-builder/layout-builder-schema.d.ts.map +0 -1
- package/dist/custom-components/layout-builder/layout-builder-templates.d.ts +0 -13
- package/dist/custom-components/layout-builder/layout-builder-templates.d.ts.map +0 -1
- package/dist/custom-components/layout-builder/layout-builder-types.d.ts +0 -73
- package/dist/custom-components/layout-builder/layout-builder-types.d.ts.map +0 -1
- package/dist/custom-components/layout-builder/layout-builder-utils.d.ts +0 -70
- package/dist/custom-components/layout-builder/layout-builder-utils.d.ts.map +0 -1
- package/dist/custom-components/layout-builder/layout-builder-validation.d.ts +0 -29
- package/dist/custom-components/layout-builder/layout-builder-validation.d.ts.map +0 -1
- package/dist/custom-components/layout-builder/layout-builder.d.ts +0 -4
- package/dist/custom-components/layout-builder/layout-builder.d.ts.map +0 -1
- package/dist/custom-components/layout-builder/layout-json-editor-types.d.ts +0 -60
- package/dist/custom-components/layout-builder/layout-json-editor-types.d.ts.map +0 -1
- package/dist/custom-components/layout-builder/layout-json-editor.d.ts +0 -13
- package/dist/custom-components/layout-builder/layout-json-editor.d.ts.map +0 -1
- package/dist/custom-components/layout-builder/stories/hooks/useHistory.d.ts +0 -49
- package/dist/custom-components/layout-builder/stories/hooks/useHistory.d.ts.map +0 -1
- package/dist/data-components/cell/cell-switch.d.ts +0 -17
- package/dist/data-components/cell/cell-switch.d.ts.map +0 -1
|
@@ -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"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qDAAqD,CAAC;AAC/F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AAC3F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,4BAA4B,CAAC,KAAK;IACjD,2EAA2E;IAC3E,IAAI,EAAE,KAAK,EAAE,CAAC;CACf;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,oBAAoB,CAAC,KAAK;IACzC,mEAAmE;IACnE,EAAE,EAAE,MAAM,CAAC;IACX,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC;IACf;;;OAGG;IACH,OAAO,CAAC,EAAE,mBAAmB,CAAC,KAAK,CAAC,EAAE,CAAC;IAGvC;;;OAGG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;IAEd,iDAAiD;IACjD,QAAQ,CAAC,EAAE,qBAAqB,CAAC,KAAK,CAAC,CAAC;IACxC,0CAA0C;IAC1C,QAAQ,EAAE,CAAC,OAAO,EAAE,4BAA4B,CAAC,KAAK,CAAC,KAAK,SAAS,CAAC;IACtE,yCAAyC;IACzC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,wCAAwC;IACxC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,wDAAwD;IACxD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,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.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { DataEngineConfig, DataEngineResult, DataEngineRow, DataEngineState, FieldDefinition, Query } from './data-engine-types';
|
|
2
|
+
/**
|
|
3
|
+
* The DataEngine is the core query layer for the dashboard.
|
|
4
|
+
*
|
|
5
|
+
* It takes raw data sources, optional relationships, and optional
|
|
6
|
+
* expressions, and provides an `execute(query)` method that runs
|
|
7
|
+
* the full pipeline:
|
|
8
|
+
*
|
|
9
|
+
* JOIN → FILTER → AGGREGATE → SORT → LIMIT
|
|
10
|
+
*
|
|
11
|
+
* The engine is framework-agnostic (pure TypeScript) and can run
|
|
12
|
+
* in the main thread or inside a Web Worker.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const engine = new DataEngine({
|
|
17
|
+
* sources: [
|
|
18
|
+
* { id: 'products', name: 'Products', data: products },
|
|
19
|
+
* { id: 'orders', name: 'Orders', data: orders },
|
|
20
|
+
* ],
|
|
21
|
+
* relationships: [
|
|
22
|
+
* {
|
|
23
|
+
* id: 'order-product',
|
|
24
|
+
* source: { tableId: 'orders', fieldId: 'product_id' },
|
|
25
|
+
* target: { tableId: 'products', fieldId: 'id' },
|
|
26
|
+
* type: 'many-to-one',
|
|
27
|
+
* },
|
|
28
|
+
* ],
|
|
29
|
+
* });
|
|
30
|
+
*
|
|
31
|
+
* const result = engine.execute({
|
|
32
|
+
* select: [
|
|
33
|
+
* { tableId: 'products', fieldId: 'category' },
|
|
34
|
+
* ],
|
|
35
|
+
* groupBy: [{ tableId: 'products', fieldId: 'category' }],
|
|
36
|
+
* aggregations: [
|
|
37
|
+
* { field: { tableId: 'orders', fieldId: 'amount' }, function: 'sum', alias: 'total' },
|
|
38
|
+
* ],
|
|
39
|
+
* });
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export declare class DataEngine {
|
|
43
|
+
private sources;
|
|
44
|
+
private relationships;
|
|
45
|
+
private fieldDefs;
|
|
46
|
+
constructor(config: DataEngineConfig);
|
|
47
|
+
/**
|
|
48
|
+
* Executes a query against the data engine.
|
|
49
|
+
*
|
|
50
|
+
* Pipeline: JOIN → FILTER → AGGREGATE → SELECT → SORT → LIMIT
|
|
51
|
+
*/
|
|
52
|
+
execute(query: Query): DataEngineResult;
|
|
53
|
+
/**
|
|
54
|
+
* Returns the full joined dataset without any query applied.
|
|
55
|
+
* Useful for debugging or when the consumer wants raw access.
|
|
56
|
+
*/
|
|
57
|
+
getJoinedData(): DataEngineRow[];
|
|
58
|
+
/**
|
|
59
|
+
* Returns the field definitions for a given source.
|
|
60
|
+
*/
|
|
61
|
+
getFields(sourceId: string): FieldDefinition[];
|
|
62
|
+
/**
|
|
63
|
+
* Returns all field definitions across all sources.
|
|
64
|
+
*/
|
|
65
|
+
getAllFields(): Array<FieldDefinition & {
|
|
66
|
+
sourceId: string;
|
|
67
|
+
}>;
|
|
68
|
+
/**
|
|
69
|
+
* Serialises the engine configuration to a plain object
|
|
70
|
+
* that can be persisted and restored.
|
|
71
|
+
*/
|
|
72
|
+
getState(): DataEngineState;
|
|
73
|
+
/**
|
|
74
|
+
* Step 1: Hash-join all sources based on relationships.
|
|
75
|
+
*/
|
|
76
|
+
private join;
|
|
77
|
+
/**
|
|
78
|
+
* Step 3: Project only the requested fields.
|
|
79
|
+
* When aggregations are present, their aliases are also kept.
|
|
80
|
+
*/
|
|
81
|
+
private project;
|
|
82
|
+
/**
|
|
83
|
+
* Step 5: Sort rows by the given conditions.
|
|
84
|
+
*/
|
|
85
|
+
private sort;
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=data-engine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-engine.d.ts","sourceRoot":"","sources":["../../../../src/framework-components/dashboard/data-engine/data-engine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,eAAe,EAEf,eAAe,EAEf,KAAK,EACN,MAAM,qBAAqB,CAAC;AAU7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,OAAO,CAAqB;IACpC,OAAO,CAAC,aAAa,CAAyD;IAC9E,OAAO,CAAC,SAAS,CAAwC;gBAE7C,MAAM,EAAE,gBAAgB;IAmBpC;;;;OAIG;IACH,OAAO,CAAC,KAAK,EAAE,KAAK,GAAG,gBAAgB;IAoCvC;;;OAGG;IACH,aAAa,IAAI,aAAa,EAAE;IAIhC;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,eAAe,EAAE;IAI9C;;OAEG;IACH,YAAY,IAAI,KAAK,CAAC,eAAe,GAAG;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IAU7D;;;OAGG;IACH,QAAQ,IAAI,eAAe;IAmB3B;;OAEG;IACH,OAAO,CAAC,IAAI;IAeZ;;;OAGG;IACH,OAAO,CAAC,OAAO;IA4Bf;;OAEG;IACH,OAAO,CAAC,IAAI;CAiBb"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-engine.test.d.ts","sourceRoot":"","sources":["../../../../src/framework-components/dashboard/data-engine/data-engine.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-engine.worker.d.ts","sourceRoot":"","sources":["../../../../src/framework-components/dashboard/data-engine/data-engine.worker.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FieldDefinition, FieldFormat } from './data-engine-types';
|
|
2
|
+
/**
|
|
3
|
+
* Infers field definitions from the first row of a data array.
|
|
4
|
+
*/
|
|
5
|
+
export declare function inferFields<TData extends object>(data: TData[]): FieldDefinition[];
|
|
6
|
+
/**
|
|
7
|
+
* Infers the format of a single value.
|
|
8
|
+
*/
|
|
9
|
+
export declare function inferFormat(value: unknown): FieldFormat;
|
|
10
|
+
//# sourceMappingURL=field-inference.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field-inference.d.ts","sourceRoot":"","sources":["../../../../src/framework-components/dashboard/data-engine/field-inference.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAExE;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,SAAS,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,eAAe,EAAE,CAelF;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW,CAgBvD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DataEngineRow } from './data-engine-types';
|
|
2
|
+
import { FilterGroup } from '../../../data-components/filter/filter-types';
|
|
3
|
+
/**
|
|
4
|
+
* Filters `DataEngineRow[]` using the provided `FilterGroup` AST.
|
|
5
|
+
*
|
|
6
|
+
* - Returns the original array reference unchanged when `filter` is
|
|
7
|
+
* `null` or contains no active conditions.
|
|
8
|
+
* - Works with prefixed keys (`tableId.fieldId`) and falls back to
|
|
9
|
+
* suffix matching for unprefixed field references.
|
|
10
|
+
*/
|
|
11
|
+
export declare function applyFilterToDataEngineRows(rows: DataEngineRow[], filter: FilterGroup | null): DataEngineRow[];
|
|
12
|
+
//# sourceMappingURL=filter-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter-adapter.d.ts","sourceRoot":"","sources":["../../../../src/framework-components/dashboard/data-engine/filter-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAEV,WAAW,EAGZ,MAAM,8CAA8C,CAAC;AAuItD;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,aAAa,EAAE,EACrB,MAAM,EAAE,WAAW,GAAG,IAAI,GACzB,aAAa,EAAE,CAGjB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { DataEngine } from './data-engine';
|
|
2
|
+
export { DataEngineClient } from './data-engine-client';
|
|
3
|
+
export { inferFields, inferFormat } from './field-inference';
|
|
4
|
+
export { hashJoin } from './join-engine';
|
|
5
|
+
export { aggregate } from './aggregation-engine';
|
|
6
|
+
export { applyFilterToDataEngineRows } from './filter-adapter';
|
|
7
|
+
export type { FieldRef, FieldFormat, FieldDefinition, DataSourceConfig, RelationshipType, Relationship, ExpressionOperator, ExpressionInput, LiteralValue, ExpressionNode, ExpressionDefinition, AggregationFunction, Aggregation, SortDirection, SortCondition, Query, DataEngineConfig, DataEngineRow, DataEngineResult, DataEngineState, } from './data-engine-types';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/framework-components/dashboard/data-engine/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAC/D,YAAY,EACV,QAAQ,EACR,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,cAAc,EACd,oBAAoB,EACpB,mBAAmB,EACnB,WAAW,EACX,aAAa,EACb,aAAa,EACb,KAAK,EACL,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAChB,eAAe,GAChB,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DataSourceConfig, DataEngineRow, Relationship } from './data-engine-types';
|
|
2
|
+
/**
|
|
3
|
+
* Performs a left join from `source` to `target` using a hash map
|
|
4
|
+
* on the target's join key.
|
|
5
|
+
*
|
|
6
|
+
* Algorithm:
|
|
7
|
+
* 1. Build a Map<targetKey, targetRow> from the target table
|
|
8
|
+
* 2. For each source row, look up the matching target row in O(1)
|
|
9
|
+
* 3. Prefix all columns with `tableId.` to avoid collisions
|
|
10
|
+
*
|
|
11
|
+
* For `many-to-one`: each source row gets at most one target row.
|
|
12
|
+
* For `one-to-many`: each source row may match multiple target rows
|
|
13
|
+
* (produces multiple output rows — cartesian expansion).
|
|
14
|
+
* For `one-to-one`: same as many-to-one.
|
|
15
|
+
*/
|
|
16
|
+
export declare function hashJoin(sources: DataSourceConfig[], relationships: Relationship[]): DataEngineRow[];
|
|
17
|
+
//# sourceMappingURL=join-engine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"join-engine.d.ts","sourceRoot":"","sources":["../../../../src/framework-components/dashboard/data-engine/join-engine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,aAAa,EACb,YAAY,EACb,MAAM,qBAAqB,CAAC;AAM7B;;;;;;;;;;;;;GAaG;AACH,wBAAgB,QAAQ,CACtB,OAAO,EAAE,gBAAgB,EAAE,EAC3B,aAAa,EAAE,YAAY,EAAE,GAC5B,aAAa,EAAE,CA4CjB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface SectionProps {
|
|
3
|
+
/** The title displayed at the top of the section */
|
|
4
|
+
title: string;
|
|
5
|
+
/** Optional subtitle displayed below the title */
|
|
6
|
+
subtitle?: string;
|
|
7
|
+
/** Optional actions rendered on the right side of the header */
|
|
8
|
+
headerActions?: React.ReactNode;
|
|
9
|
+
/** The content rendered inside the section body */
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
/** Additional CSS class names */
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=section-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"section-types.d.ts","sourceRoot":"","sources":["../../../src/framework-components/section/section-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,YAAY;IAC3B,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gEAAgE;IAChE,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,mDAAmD;IACnD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SectionProps } from './section-types';
|
|
3
|
+
/**
|
|
4
|
+
* Section is a layout container that groups content with a title and optional subtitle.
|
|
5
|
+
* It features a box-shadow to visually separate zones within a page.
|
|
6
|
+
*/
|
|
7
|
+
export declare const Section: React.FC<SectionProps>;
|
|
8
|
+
export default Section;
|
|
9
|
+
//# sourceMappingURL=section.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"section.d.ts","sourceRoot":"","sources":["../../../src/framework-components/section/section.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAG/C;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAe1C,CAAC;AAIF,eAAe,OAAO,CAAC"}
|