drizzle-cube 0.2.28 → 0.2.30

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 (43) hide show
  1. package/dist/client/charts/chartConfigs.d.ts +1 -1
  2. package/dist/client/charts.js +2 -2
  3. package/dist/client/chunks/{charts-BfXEKIrq.js → charts-Cr9ec7VQ.js} +66 -63
  4. package/dist/client/chunks/charts-Cr9ec7VQ.js.map +1 -0
  5. package/dist/client/chunks/{charts-DQuOI5HA.js → charts-nP6WCxHG.js} +2725 -2488
  6. package/dist/client/chunks/charts-nP6WCxHG.js.map +1 -0
  7. package/dist/client/chunks/{components-CWMeA5e-.js → components-DmAEuzWC.js} +5459 -4800
  8. package/dist/client/chunks/components-DmAEuzWC.js.map +1 -0
  9. package/dist/client/chunks/core-C2bH1c5G.js +6 -0
  10. package/dist/client/chunks/core-C2bH1c5G.js.map +1 -0
  11. package/dist/client/chunks/{hooks-CAKGR-w0.js → hooks-CM78mXuP.js} +20 -19
  12. package/dist/client/chunks/{hooks-CAKGR-w0.js.map → hooks-CM78mXuP.js.map} +1 -1
  13. package/dist/client/chunks/{icons-DI4Xack3.js → icons-D7ek1iXF.js} +39 -39
  14. package/dist/client/chunks/{icons-DI4Xack3.js.map → icons-D7ek1iXF.js.map} +1 -1
  15. package/dist/client/components/AnalysisBuilder/FunnelBindingKeySelector.d.ts +21 -0
  16. package/dist/client/components/AnalysisBuilder/types.d.ts +19 -4
  17. package/dist/client/components/charts/FunnelChart.config.d.ts +9 -0
  18. package/dist/client/components/charts/FunnelChart.d.ts +11 -0
  19. package/dist/client/components.js +2 -2
  20. package/dist/client/hooks/queries/index.d.ts +1 -0
  21. package/dist/client/hooks/queries/useFunnelQuery.d.ts +25 -0
  22. package/dist/client/hooks/useAnalysisBuilderHook.d.ts +7 -3
  23. package/dist/client/hooks/useAnalysisQueryExecution.d.ts +12 -1
  24. package/dist/client/hooks.js +5 -5
  25. package/dist/client/icons/types.d.ts +1 -0
  26. package/dist/client/icons.js +1 -1
  27. package/dist/client/index.d.ts +5 -3
  28. package/dist/client/index.js +115 -99
  29. package/dist/client/providers.js +1 -1
  30. package/dist/client/stores/analysisBuilderStore.d.ts +21 -1
  31. package/dist/client/styles.css +1 -1
  32. package/dist/client/types/funnel.d.ts +231 -0
  33. package/dist/client/types.d.ts +14 -2
  34. package/dist/client/utils/funnelExecution.d.ts +111 -0
  35. package/dist/client/utils/funnelValidation.d.ts +46 -0
  36. package/dist/client/utils/multiQueryValidation.d.ts +3 -3
  37. package/dist/client-bundle-stats.html +1 -1
  38. package/package.json +1 -1
  39. package/dist/client/chunks/charts-BfXEKIrq.js.map +0 -1
  40. package/dist/client/chunks/charts-DQuOI5HA.js.map +0 -1
  41. package/dist/client/chunks/components-CWMeA5e-.js.map +0 -1
  42. package/dist/client/chunks/core-DrhYtHHa.js +0 -6
  43. package/dist/client/chunks/core-DrhYtHHa.js.map +0 -1
@@ -33,7 +33,7 @@ export interface DisplayOptionConfig {
33
33
  /** Display label for the option */
34
34
  label: string;
35
35
  /** Type of input control to render */
36
- type: 'boolean' | 'string' | 'number' | 'select' | 'color' | 'paletteColor' | 'axisFormat';
36
+ type: 'boolean' | 'string' | 'number' | 'select' | 'color' | 'paletteColor' | 'axisFormat' | 'stringArray' | 'buttonGroup';
37
37
  /** Default value for the option */
38
38
  defaultValue?: any;
39
39
  /** Placeholder text for string/number inputs */
@@ -1,5 +1,5 @@
1
- import { L as s, r as t, f as C, g as e, k as h, l as o, m as R, i, q as l, p as c, n as f, o as g, a as n, u as d } from "./chunks/charts-BfXEKIrq.js";
2
- import { I as A, K as T, H as L, N as O, J as S, E as y, B as I, A as m, P as E, R as _, F as B, S as G, G as H } from "./chunks/charts-DQuOI5HA.js";
1
+ import { L as s, r as t, f as C, g as e, k as h, l as o, m as R, i, q as l, p as c, n as f, o as g, a as n, u as d } from "./chunks/charts-Cr9ec7VQ.js";
2
+ import { I as A, K as T, H as L, N as O, J as S, E as y, B as I, A as m, P as E, R as _, F as B, S as G, G as H } from "./chunks/charts-nP6WCxHG.js";
3
3
  export {
4
4
  A as CHART_COLORS,
5
5
  T as CHART_MARGINS,
@@ -1,22 +1,23 @@
1
1
  import { jsx as u } from "react/jsx-runtime";
2
2
  import { Suspense as C, lazy as g, useState as c, useEffect as y } from "react";
3
- import "./charts-DQuOI5HA.js";
3
+ import "./charts-nP6WCxHG.js";
4
4
  const p = /* @__PURE__ */ new Map(), l = {
5
- bar: () => import("./charts-DQuOI5HA.js").then((t) => t.ao),
6
- line: () => import("./charts-DQuOI5HA.js").then((t) => t.ap),
7
- area: () => import("./charts-DQuOI5HA.js").then((t) => t.aq),
8
- pie: () => import("./charts-DQuOI5HA.js").then((t) => t.ar),
9
- scatter: () => import("./charts-DQuOI5HA.js").then((t) => t.as),
10
- radar: () => import("./charts-DQuOI5HA.js").then((t) => t.at),
11
- radialBar: () => import("./charts-DQuOI5HA.js").then((t) => t.au),
12
- treemap: () => import("./charts-DQuOI5HA.js").then((t) => t.av),
13
- bubble: () => import("./charts-DQuOI5HA.js").then((t) => t.aw),
14
- table: () => import("./charts-DQuOI5HA.js").then((t) => t.ax),
15
- activityGrid: () => import("./charts-DQuOI5HA.js").then((t) => t.ay),
16
- kpiNumber: () => import("./charts-DQuOI5HA.js").then((t) => t.az),
17
- kpiDelta: () => import("./charts-DQuOI5HA.js").then((t) => t.aA),
18
- kpiText: () => import("./charts-DQuOI5HA.js").then((t) => t.aB),
19
- markdown: () => import("./charts-DQuOI5HA.js").then((t) => t.aC)
5
+ bar: () => import("./charts-nP6WCxHG.js").then((t) => t.aq),
6
+ line: () => import("./charts-nP6WCxHG.js").then((t) => t.ar),
7
+ area: () => import("./charts-nP6WCxHG.js").then((t) => t.as),
8
+ pie: () => import("./charts-nP6WCxHG.js").then((t) => t.at),
9
+ scatter: () => import("./charts-nP6WCxHG.js").then((t) => t.au),
10
+ radar: () => import("./charts-nP6WCxHG.js").then((t) => t.av),
11
+ radialBar: () => import("./charts-nP6WCxHG.js").then((t) => t.aw),
12
+ treemap: () => import("./charts-nP6WCxHG.js").then((t) => t.ax),
13
+ bubble: () => import("./charts-nP6WCxHG.js").then((t) => t.ay),
14
+ table: () => import("./charts-nP6WCxHG.js").then((t) => t.az),
15
+ activityGrid: () => import("./charts-nP6WCxHG.js").then((t) => t.aA),
16
+ kpiNumber: () => import("./charts-nP6WCxHG.js").then((t) => t.aB),
17
+ kpiDelta: () => import("./charts-nP6WCxHG.js").then((t) => t.aC),
18
+ kpiText: () => import("./charts-nP6WCxHG.js").then((t) => t.aD),
19
+ markdown: () => import("./charts-nP6WCxHG.js").then((t) => t.aE),
20
+ funnel: () => import("./charts-nP6WCxHG.js").then((t) => t.aF)
20
21
  };
21
22
  function b(t) {
22
23
  if (!p.has(t)) {
@@ -44,10 +45,10 @@ function A({
44
45
  chartType: t,
45
46
  fallback: e,
46
47
  height: a,
47
- ...n
48
+ ...r
48
49
  }) {
49
- const r = b(t);
50
- return /* @__PURE__ */ u(C, { fallback: e ?? /* @__PURE__ */ u(w, { height: a }), children: /* @__PURE__ */ u(r, { height: a, ...n }) });
50
+ const n = b(t);
51
+ return /* @__PURE__ */ u(C, { fallback: e ?? /* @__PURE__ */ u(w, { height: a }), children: /* @__PURE__ */ u(n, { height: a, ...r }) });
51
52
  }
52
53
  function x(t) {
53
54
  const e = l[t];
@@ -92,21 +93,22 @@ function G(t, e) {
92
93
  return e[t] || f;
93
94
  }
94
95
  const d = {
95
- bar: () => import("./charts-DQuOI5HA.js").then((t) => t.a9),
96
- line: () => import("./charts-DQuOI5HA.js").then((t) => t.aa),
97
- area: () => import("./charts-DQuOI5HA.js").then((t) => t.ab),
98
- pie: () => import("./charts-DQuOI5HA.js").then((t) => t.ac),
99
- scatter: () => import("./charts-DQuOI5HA.js").then((t) => t.ad),
100
- radar: () => import("./charts-DQuOI5HA.js").then((t) => t.af),
101
- radialBar: () => import("./charts-DQuOI5HA.js").then((t) => t.ag),
102
- treemap: () => import("./charts-DQuOI5HA.js").then((t) => t.ah),
103
- bubble: () => import("./charts-DQuOI5HA.js").then((t) => t.ae),
104
- table: () => import("./charts-DQuOI5HA.js").then((t) => t.ai),
105
- activityGrid: () => import("./charts-DQuOI5HA.js").then((t) => t.aj),
106
- kpiNumber: () => import("./charts-DQuOI5HA.js").then((t) => t.ak),
107
- kpiDelta: () => import("./charts-DQuOI5HA.js").then((t) => t.al),
108
- kpiText: () => import("./charts-DQuOI5HA.js").then((t) => t.am),
109
- markdown: () => import("./charts-DQuOI5HA.js").then((t) => t.an)
96
+ bar: () => import("./charts-nP6WCxHG.js").then((t) => t.aa),
97
+ line: () => import("./charts-nP6WCxHG.js").then((t) => t.ab),
98
+ area: () => import("./charts-nP6WCxHG.js").then((t) => t.ac),
99
+ pie: () => import("./charts-nP6WCxHG.js").then((t) => t.ad),
100
+ scatter: () => import("./charts-nP6WCxHG.js").then((t) => t.ae),
101
+ radar: () => import("./charts-nP6WCxHG.js").then((t) => t.ag),
102
+ radialBar: () => import("./charts-nP6WCxHG.js").then((t) => t.ah),
103
+ treemap: () => import("./charts-nP6WCxHG.js").then((t) => t.ai),
104
+ bubble: () => import("./charts-nP6WCxHG.js").then((t) => t.af),
105
+ table: () => import("./charts-nP6WCxHG.js").then((t) => t.aj),
106
+ activityGrid: () => import("./charts-nP6WCxHG.js").then((t) => t.ak),
107
+ kpiNumber: () => import("./charts-nP6WCxHG.js").then((t) => t.al),
108
+ kpiDelta: () => import("./charts-nP6WCxHG.js").then((t) => t.am),
109
+ kpiText: () => import("./charts-nP6WCxHG.js").then((t) => t.an),
110
+ markdown: () => import("./charts-nP6WCxHG.js").then((t) => t.ao),
111
+ funnel: () => import("./charts-nP6WCxHG.js").then((t) => t.ap)
110
112
  }, k = {
111
113
  bar: "barChartConfig",
112
114
  line: "lineChartConfig",
@@ -122,7 +124,8 @@ const d = {
122
124
  kpiNumber: "kpiNumberConfig",
123
125
  kpiDelta: "kpiDeltaConfig",
124
126
  kpiText: "kpiTextConfig",
125
- markdown: "markdownConfig"
127
+ markdown: "markdownConfig",
128
+ funnel: "funnelChartConfig"
126
129
  }, i = /* @__PURE__ */ new Map();
127
130
  async function h(t) {
128
131
  if (i.has(t))
@@ -131,8 +134,8 @@ async function h(t) {
131
134
  if (!e)
132
135
  return null;
133
136
  try {
134
- const a = await e(), n = k[t], r = a[n];
135
- return r ? (i.set(t, r), r) : null;
137
+ const a = await e(), r = k[t], n = a[r];
138
+ return n ? (i.set(t, n), n) : null;
136
139
  } catch (a) {
137
140
  return console.error(`Failed to load config for chart type: ${t}`, a), null;
138
141
  }
@@ -143,10 +146,10 @@ function v(t) {
143
146
  function B(t) {
144
147
  return i.has(t);
145
148
  }
146
- function $(t) {
149
+ function E(t) {
147
150
  const [e, a] = c(
148
151
  t ? v(t) : f
149
- ), [n, r] = c(!1), [m, o] = c(!1);
152
+ ), [r, n] = c(!1), [m, o] = c(!1);
150
153
  return y(() => {
151
154
  if (!t) {
152
155
  a(f), o(!1);
@@ -156,38 +159,38 @@ function $(t) {
156
159
  a(i.get(t)), o(!0);
157
160
  return;
158
161
  }
159
- r(!0), h(t).then((s) => {
162
+ n(!0), h(t).then((s) => {
160
163
  s ? (a(s), o(!0)) : (a(f), o(!0));
161
- }).finally(() => r(!1));
162
- }, [t]), { config: e, loading: n, loaded: m };
164
+ }).finally(() => n(!1));
165
+ }, [t]), { config: e, loading: r, loaded: m };
163
166
  }
164
- async function N(t) {
167
+ async function D(t) {
165
168
  i.has(t) || await h(t);
166
169
  }
167
- async function q(t) {
168
- await Promise.all(t.map(N));
170
+ async function $(t) {
171
+ await Promise.all(t.map(D));
169
172
  }
170
- async function z() {
173
+ async function q() {
171
174
  const t = Object.keys(d);
172
175
  await Promise.all(t.map(h));
173
176
  const e = {};
174
177
  for (const a of t) {
175
- const n = i.get(a);
176
- n && (e[a] = n);
178
+ const r = i.get(a);
179
+ r && (e[a] = r);
177
180
  }
178
181
  return e;
179
182
  }
180
- function E() {
183
+ function z() {
181
184
  i.clear();
182
185
  }
183
186
  function I(t) {
184
- const e = D(t);
187
+ const e = N(t);
185
188
  return {
186
189
  portlets: t,
187
190
  layouts: e
188
191
  };
189
192
  }
190
- function D(t) {
193
+ function N(t) {
191
194
  const e = t.map((a) => ({
192
195
  i: a.id,
193
196
  x: a.x,
@@ -206,11 +209,11 @@ function D(t) {
206
209
  };
207
210
  }
208
211
  function J(t, e = {}) {
209
- const { formatNumbers: a = !0, precision: n = 2 } = e;
210
- return a ? t.map((r) => {
212
+ const { formatNumbers: a = !0, precision: r = 2 } = e;
213
+ return a ? t.map((n) => {
211
214
  const m = {};
212
- for (const [o, s] of Object.entries(r))
213
- typeof s == "number" ? m[o] = Number(s.toFixed(n)) : m[o] = s;
215
+ for (const [o, s] of Object.entries(n))
216
+ typeof s == "number" ? m[o] = Number(s.toFixed(r)) : m[o] = s;
214
217
  return m;
215
218
  }) : t;
216
219
  }
@@ -218,7 +221,7 @@ function P() {
218
221
  return `portlet-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
219
222
  }
220
223
  function Q(t, e = 6, a = 4) {
221
- return t.length === 0 ? { x: 0, y: 0 } : { x: 0, y: Math.max(...t.map((r) => r.y + r.h)) };
224
+ return t.length === 0 ? { x: 0, y: 0 } : { x: 0, y: Math.max(...t.map((n) => n.y + n.h)) };
222
225
  }
223
226
  function Y(t) {
224
227
  try {
@@ -256,7 +259,7 @@ export {
256
259
  O as a,
257
260
  G as b,
258
261
  I as c,
259
- D as d,
262
+ N as d,
260
263
  P as e,
261
264
  J as f,
262
265
  F as g,
@@ -266,12 +269,12 @@ export {
266
269
  h as k,
267
270
  v as l,
268
271
  B as m,
269
- N as n,
270
- q as o,
272
+ D as n,
273
+ $ as o,
271
274
  x as p,
272
- z as q,
273
- E as r,
274
- $ as u,
275
+ q,
276
+ z as r,
277
+ E as u,
275
278
  Y as v
276
279
  };
277
- //# sourceMappingURL=charts-BfXEKIrq.js.map
280
+ //# sourceMappingURL=charts-Cr9ec7VQ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"charts-Cr9ec7VQ.js","sources":["../../../src/client/charts/ChartLoader.tsx","../../../src/client/charts/chartConfigs.ts","../../../src/client/charts/lazyChartConfigRegistry.ts","../../../src/client/utils/index.ts"],"sourcesContent":["/**\n * Lazy Chart Loader\n *\n * Provides React.lazy-based dynamic loading for chart components.\n * This enables code splitting - each chart type loads only when needed.\n */\n\nimport { lazy, Suspense, ComponentType, ReactNode, LazyExoticComponent } from 'react'\nimport type { ChartType, ChartProps } from '../types'\n\n// Type for lazy-loaded chart components\ntype LazyChartComponent = ComponentType<ChartProps>\n\n// Chart loader cache to prevent re-creating lazy components\nconst chartLoaderCache = new Map<ChartType, LazyExoticComponent<LazyChartComponent>>()\n\n// Dynamic import functions for each chart type\nconst chartImportMap: Record<ChartType, () => Promise<{ default: LazyChartComponent }>> = {\n bar: () => import('../components/charts/BarChart'),\n line: () => import('../components/charts/LineChart'),\n area: () => import('../components/charts/AreaChart'),\n pie: () => import('../components/charts/PieChart'),\n scatter: () => import('../components/charts/ScatterChart'),\n radar: () => import('../components/charts/RadarChart'),\n radialBar: () => import('../components/charts/RadialBarChart'),\n treemap: () => import('../components/charts/TreeMapChart'),\n bubble: () => import('../components/charts/BubbleChart'),\n table: () => import('../components/charts/DataTable'),\n activityGrid: () => import('../components/charts/ActivityGridChart'),\n kpiNumber: () => import('../components/charts/KpiNumber'),\n kpiDelta: () => import('../components/charts/KpiDelta'),\n kpiText: () => import('../components/charts/KpiText'),\n markdown: () => import('../components/charts/MarkdownChart'),\n funnel: () => import('../components/charts/FunnelChart'),\n}\n\n/**\n * Get or create a lazy component for a chart type\n */\nfunction getLazyChart(chartType: ChartType): LazyExoticComponent<LazyChartComponent> {\n if (!chartLoaderCache.has(chartType)) {\n const importFn = chartImportMap[chartType]\n if (!importFn) {\n throw new Error(`Unknown chart type: ${chartType}`)\n }\n chartLoaderCache.set(chartType, lazy(importFn))\n }\n return chartLoaderCache.get(chartType)!\n}\n\n/**\n * Check if a chart type is supported\n */\nexport function isValidChartType(chartType: string): chartType is ChartType {\n return chartType in chartImportMap\n}\n\n// Props for the LazyChart wrapper\nexport interface LazyChartProps extends ChartProps {\n chartType: ChartType\n fallback?: ReactNode\n}\n\n/**\n * Default loading placeholder for charts\n */\nfunction DefaultChartFallback({ height }: { height?: string | number }) {\n return (\n <div\n className=\"flex items-center justify-center w-full\"\n style={{ height: typeof height === 'number' ? `${height}px` : height || '200px' }}\n >\n <div className=\"animate-pulse bg-dc-surface-secondary rounded w-full h-full min-h-[100px]\" />\n </div>\n )\n}\n\n/**\n * Lazy Chart Component\n *\n * Renders a chart component with React.lazy dynamic loading.\n * The chart type determines which chart component is loaded.\n *\n * @example\n * ```tsx\n * <LazyChart\n * chartType=\"bar\"\n * data={chartData}\n * chartConfig={{ yAxis: ['value'] }}\n * height={300}\n * />\n * ```\n */\nexport function LazyChart({\n chartType,\n fallback,\n height,\n ...chartProps\n}: LazyChartProps) {\n const ChartComponent = getLazyChart(chartType)\n\n return (\n <Suspense fallback={fallback ?? <DefaultChartFallback height={height} />}>\n <ChartComponent height={height} {...chartProps} />\n </Suspense>\n )\n}\n\n/**\n * Preload a chart type\n *\n * Triggers the dynamic import without rendering.\n * Useful for prefetching charts that will likely be needed.\n *\n * @example\n * ```tsx\n * // Preload bar chart on hover\n * onMouseEnter={() => preloadChart('bar')}\n * ```\n */\nexport function preloadChart(chartType: ChartType): void {\n const importFn = chartImportMap[chartType]\n if (importFn) {\n importFn()\n }\n}\n\n/**\n * Preload multiple chart types\n *\n * @example\n * ```tsx\n * // Preload common charts on app init\n * useEffect(() => {\n * preloadCharts(['bar', 'line', 'pie'])\n * }, [])\n * ```\n */\nexport function preloadCharts(chartTypes: ChartType[]): void {\n chartTypes.forEach(preloadChart)\n}\n\n/**\n * Get all available chart types\n */\nexport function getAvailableChartTypes(): ChartType[] {\n return Object.keys(chartImportMap) as ChartType[]\n}\n","import { ComponentType } from 'react'\n\n/**\n * Configuration for a single axis drop zone in the chart configuration UI\n */\nexport interface AxisDropZoneConfig {\n /** The key to store this field in chartConfig (e.g., 'xAxis', 'yAxis', 'sizeField') */\n key: string\n \n /** Display label for the drop zone */\n label: string\n \n /** Optional description/help text shown below the label */\n description?: string\n \n /** Whether at least one field is required in this drop zone */\n mandatory?: boolean\n \n /** Maximum number of items allowed in this drop zone */\n maxItems?: number\n \n /** Which field types this drop zone accepts */\n acceptTypes?: ('dimension' | 'timeDimension' | 'measure')[]\n \n /** Optional icon component to display */\n icon?: ComponentType<{ className?: string }>\n\n /** Placeholder text when drop zone is empty */\n emptyText?: string\n\n /** Enable L/R axis toggle for items in this drop zone (for dual Y-axis support) */\n enableDualAxis?: boolean\n}\n\n/**\n * Configuration for a single display option\n */\nexport interface DisplayOptionConfig {\n /** The key to store this field in displayConfig */\n key: string\n \n /** Display label for the option */\n label: string\n \n /** Type of input control to render */\n type: 'boolean' | 'string' | 'number' | 'select' | 'color' | 'paletteColor' | 'axisFormat' | 'stringArray' | 'buttonGroup'\n \n /** Default value for the option */\n defaultValue?: any\n \n /** Placeholder text for string/number inputs */\n placeholder?: string\n \n /** Options for select type */\n options?: Array<{ value: any; label: string }>\n \n /** Help text shown below the input */\n description?: string\n \n /** Minimum value for number inputs */\n min?: number\n \n /** Maximum value for number inputs */\n max?: number\n \n /** Step value for number inputs */\n step?: number\n}\n\n/**\n * Complete configuration for a chart type\n */\nexport interface ChartTypeConfig {\n /** Configuration for each drop zone */\n dropZones: AxisDropZoneConfig[]\n \n /** Simple display options (backward compatibility) - rendered as boolean checkboxes */\n displayOptions?: string[]\n \n /** Structured display options with metadata for different input types */\n displayOptionsConfig?: DisplayOptionConfig[]\n \n /** Optional custom validation function */\n validate?: (config: any) => { isValid: boolean; message?: string }\n \n /** Icon component for the chart type */\n icon?: ComponentType<{ className?: string }>\n \n /** Brief description of the chart */\n description?: string\n \n /** When to use this chart type */\n useCase?: string\n \n /** Whether this chart type skips query requirements (for content-based charts like markdown) */\n skipQuery?: boolean\n}\n\n/**\n * Registry of all chart type configurations\n */\nexport interface ChartConfigRegistry {\n [chartType: string]: ChartTypeConfig\n}\n\n/**\n * Default configuration for charts without specific requirements\n */\nexport const defaultChartConfig: ChartTypeConfig = {\n dropZones: [\n {\n key: 'xAxis',\n label: 'X-Axis (Categories)',\n description: 'Dimensions and time dimensions for grouping',\n mandatory: false,\n acceptTypes: ['dimension', 'timeDimension'],\n emptyText: 'Drop dimensions & time dimensions here'\n },\n {\n key: 'yAxis',\n label: 'Y-Axis (Values)',\n description: 'Measures for values or dimensions for series',\n mandatory: false,\n acceptTypes: ['measure', 'dimension'],\n emptyText: 'Drop measures or dimensions here'\n },\n {\n key: 'series',\n label: 'Series (Split into Multiple Series)',\n description: 'Dimensions to create separate data series',\n mandatory: false,\n acceptTypes: ['dimension'],\n emptyText: 'Drop dimensions here to split data into series'\n }\n ],\n displayOptions: ['showLegend', 'showGrid', 'showTooltip']\n}\n\n/**\n * Helper function to get configuration for a chart type\n */\nexport function getChartConfig(chartType: string, registry: ChartConfigRegistry): ChartTypeConfig {\n return registry[chartType] || defaultChartConfig\n}","/**\n * Lazy Chart Config Registry\n *\n * Provides async loading for chart configurations.\n * This enables code splitting - each chart config loads only when needed.\n */\n\nimport { useState, useEffect } from 'react'\nimport type { ChartType } from '../types'\nimport type { ChartTypeConfig, ChartConfigRegistry } from './chartConfigs'\nimport { defaultChartConfig } from './chartConfigs'\n\n// Config import map - lazy imports for each chart config\nconst configImportMap: Record<ChartType, () => Promise<{ [key: string]: ChartTypeConfig }>> = {\n bar: () => import('../components/charts/BarChart.config'),\n line: () => import('../components/charts/LineChart.config'),\n area: () => import('../components/charts/AreaChart.config'),\n pie: () => import('../components/charts/PieChart.config'),\n scatter: () => import('../components/charts/ScatterChart.config'),\n radar: () => import('../components/charts/RadarChart.config'),\n radialBar: () => import('../components/charts/RadialBarChart.config'),\n treemap: () => import('../components/charts/TreeMapChart.config'),\n bubble: () => import('../components/charts/BubbleChart.config'),\n table: () => import('../components/charts/DataTable.config'),\n activityGrid: () => import('../components/charts/ActivityGridChart.config'),\n kpiNumber: () => import('../components/charts/KpiNumber.config'),\n kpiDelta: () => import('../components/charts/KpiDelta.config'),\n kpiText: () => import('../components/charts/KpiText.config'),\n markdown: () => import('../components/charts/MarkdownChart.config'),\n funnel: () => import('../components/charts/FunnelChart.config'),\n}\n\n// Map from chart type to expected export name\nconst configExportNames: Record<ChartType, string> = {\n bar: 'barChartConfig',\n line: 'lineChartConfig',\n area: 'areaChartConfig',\n pie: 'pieChartConfig',\n scatter: 'scatterChartConfig',\n radar: 'radarChartConfig',\n radialBar: 'radialBarChartConfig',\n treemap: 'treemapChartConfig',\n bubble: 'bubbleChartConfig',\n table: 'dataTableConfig',\n activityGrid: 'activityGridChartConfig',\n kpiNumber: 'kpiNumberConfig',\n kpiDelta: 'kpiDeltaConfig',\n kpiText: 'kpiTextConfig',\n markdown: 'markdownConfig',\n funnel: 'funnelChartConfig',\n}\n\n// Cache for loaded configs\nconst configCache = new Map<ChartType, ChartTypeConfig>()\n\n/**\n * Get a chart config asynchronously\n *\n * @param chartType The chart type to load config for\n * @returns The chart type config, or null if not found\n *\n * @example\n * ```typescript\n * const config = await getChartConfigAsync('bar')\n * console.log(config?.dropZones)\n * ```\n */\nexport async function getChartConfigAsync(chartType: ChartType): Promise<ChartTypeConfig | null> {\n // Check cache first\n if (configCache.has(chartType)) {\n return configCache.get(chartType)!\n }\n\n const importFn = configImportMap[chartType]\n if (!importFn) {\n return null\n }\n\n try {\n const module = await importFn()\n const exportName = configExportNames[chartType]\n const config = module[exportName]\n\n if (config) {\n configCache.set(chartType, config)\n return config\n }\n return null\n } catch (error) {\n console.error(`Failed to load config for chart type: ${chartType}`, error)\n return null\n }\n}\n\n/**\n * Get a chart config synchronously from cache\n *\n * Returns the cached config if available, otherwise returns the default config.\n * Use this when you need sync access and have already preloaded the config.\n *\n * @param chartType The chart type to get config for\n * @returns The chart type config (from cache or default)\n */\nexport function getChartConfigSync(chartType: ChartType): ChartTypeConfig {\n return configCache.get(chartType) || defaultChartConfig\n}\n\n/**\n * Check if a chart config is already loaded\n */\nexport function isChartConfigLoaded(chartType: ChartType): boolean {\n return configCache.has(chartType)\n}\n\n/**\n * React hook for using chart config\n *\n * Loads the chart config asynchronously and caches it.\n * Returns the default config while loading.\n *\n * @param chartType The chart type to load config for\n * @returns Object with config, loading state, and loaded flag\n *\n * @example\n * ```tsx\n * function ChartSetup({ chartType }) {\n * const { config, loading } = useChartConfig(chartType)\n *\n * if (loading) return <Spinner />\n * return <ConfigForm config={config} />\n * }\n * ```\n */\nexport function useChartConfig(chartType: ChartType | undefined): {\n config: ChartTypeConfig\n loading: boolean\n loaded: boolean\n} {\n const [config, setConfig] = useState<ChartTypeConfig>(\n chartType ? getChartConfigSync(chartType) : defaultChartConfig\n )\n const [loading, setLoading] = useState(false)\n const [loaded, setLoaded] = useState(false)\n\n useEffect(() => {\n if (!chartType) {\n setConfig(defaultChartConfig)\n setLoaded(false)\n return\n }\n\n // Check cache synchronously first\n if (configCache.has(chartType)) {\n setConfig(configCache.get(chartType)!)\n setLoaded(true)\n return\n }\n\n // Load async\n setLoading(true)\n getChartConfigAsync(chartType)\n .then((loadedConfig) => {\n if (loadedConfig) {\n setConfig(loadedConfig)\n setLoaded(true)\n } else {\n setConfig(defaultChartConfig)\n setLoaded(true)\n }\n })\n .finally(() => setLoading(false))\n }, [chartType])\n\n return { config, loading, loaded }\n}\n\n/**\n * Preload a chart config\n *\n * Triggers the async import without needing to use the config immediately.\n * Useful for prefetching configs that will likely be needed.\n *\n * @param chartType The chart type to preload config for\n */\nexport async function preloadChartConfig(chartType: ChartType): Promise<void> {\n if (!configCache.has(chartType)) {\n await getChartConfigAsync(chartType)\n }\n}\n\n/**\n * Preload multiple chart configs\n *\n * @param chartTypes Array of chart types to preload\n */\nexport async function preloadChartConfigs(chartTypes: ChartType[]): Promise<void> {\n await Promise.all(chartTypes.map(preloadChartConfig))\n}\n\n/**\n * Load all chart configs and return as a registry\n *\n * Useful for SSR or when you need all configs upfront.\n * After calling this, all configs are cached and available synchronously.\n *\n * @returns Complete chart config registry\n *\n * @example\n * ```typescript\n * // On server or during initialization\n * const registry = await loadAllChartConfigs()\n * // Now all configs are cached and getChartConfigSync works for all types\n * ```\n */\nexport async function loadAllChartConfigs(): Promise<ChartConfigRegistry> {\n const chartTypes = Object.keys(configImportMap) as ChartType[]\n await Promise.all(chartTypes.map(getChartConfigAsync))\n\n const registry: ChartConfigRegistry = {}\n for (const chartType of chartTypes) {\n const config = configCache.get(chartType)\n if (config) {\n registry[chartType] = config\n }\n }\n return registry\n}\n\n/**\n * Clear the config cache\n *\n * Useful for testing or when configs need to be reloaded.\n */\nexport function clearChartConfigCache(): void {\n configCache.clear()\n}\n","/**\n * Utility functions for drizzle-cube client\n */\n\nimport type { PortletConfig, DashboardConfig } from '../types'\n\n// Re-export chart utilities\nexport * from './chartUtils'\nexport * from './chartConstants'\nexport * from './measureIcons'\nexport * from './periodUtils'\nexport * from './pivotUtils'\nexport * from './syntaxHighlighting'\nexport * from './comparisonUtils'\n\n/**\n * Create a dashboard layout from portlet configurations\n */\nexport function createDashboardLayout(portlets: PortletConfig[]): DashboardConfig {\n const layouts = generateResponsiveLayouts(portlets)\n \n return {\n portlets,\n layouts\n }\n}\n\n/**\n * Generate responsive layouts for different breakpoints\n */\nexport function generateResponsiveLayouts(portlets: PortletConfig[]) {\n const gridLayout = portlets.map(portlet => ({\n i: portlet.id,\n x: portlet.x,\n y: portlet.y,\n w: portlet.w,\n h: portlet.h,\n minW: 3,\n minH: 3\n }))\n\n return {\n lg: gridLayout,\n md: gridLayout.map(item => ({ ...item, w: Math.min(item.w, 8) })),\n sm: gridLayout.map(item => ({ ...item, w: Math.min(item.w, 6) })),\n xs: gridLayout.map(item => ({ ...item, w: Math.min(item.w, 4) })),\n xxs: gridLayout.map(item => ({ ...item, w: 2 }))\n }\n}\n\n/**\n * Format chart data for display\n */\nexport function formatChartData(data: any[], options: {\n formatNumbers?: boolean\n precision?: number\n} = {}): any[] {\n const { formatNumbers = true, precision = 2 } = options\n\n if (!formatNumbers) return data\n\n return data.map(row => {\n const formattedRow: any = {}\n \n for (const [key, value] of Object.entries(row)) {\n if (typeof value === 'number') {\n formattedRow[key] = Number(value.toFixed(precision))\n } else {\n formattedRow[key] = value\n }\n }\n \n return formattedRow\n })\n}\n\n/**\n * Generate a unique ID for new portlets\n */\nexport function generatePortletId(): string {\n return `portlet-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`\n}\n\n/**\n * Find the next available position in a grid\n */\nexport function findNextPosition(existingPortlets: PortletConfig[], _w: number = 6, _h: number = 4): { x: number; y: number } {\n if (existingPortlets.length === 0) {\n return { x: 0, y: 0 }\n }\n\n // Find the maximum Y position and height\n const maxY = Math.max(...existingPortlets.map(p => p.y + p.h))\n \n return { x: 0, y: maxY }\n}\n\n/**\n * Validate a cube query JSON string\n */\nexport function validateCubeQuery(queryString: string): { valid: boolean; error?: string; query?: any } {\n try {\n const query = JSON.parse(queryString)\n \n // Basic validation\n if (typeof query !== 'object' || query === null) {\n return { valid: false, error: 'Query must be a JSON object' }\n }\n\n // Check for required fields\n if (!query.measures && !query.dimensions) {\n return { valid: false, error: 'Query must have at least measures or dimensions' }\n }\n\n return { valid: true, query }\n } catch {\n return { valid: false, error: 'Invalid JSON format' }\n }\n}\n\n/**\n * Create a sample portlet configuration\n */\nexport function createSamplePortlet(): Omit<PortletConfig, 'id'> {\n return {\n title: 'Sample Chart',\n query: JSON.stringify({\n measures: ['count'],\n dimensions: ['category']\n }, null, 2),\n chartType: 'bar',\n chartConfig: {\n x: 'category',\n y: ['count']\n },\n displayConfig: {\n showLegend: true,\n showGrid: true,\n showTooltip: true\n },\n w: 6,\n h: 4,\n x: 0,\n y: 0\n }\n}"],"names":["chartLoaderCache","chartImportMap","n","getLazyChart","chartType","importFn","lazy","isValidChartType","DefaultChartFallback","height","jsx","LazyChart","fallback","chartProps","ChartComponent","Suspense","preloadChart","preloadCharts","chartTypes","getAvailableChartTypes","defaultChartConfig","getChartConfig","registry","configImportMap","configExportNames","configCache","getChartConfigAsync","module","exportName","config","error","getChartConfigSync","isChartConfigLoaded","useChartConfig","setConfig","useState","loading","setLoading","loaded","setLoaded","useEffect","loadedConfig","preloadChartConfig","preloadChartConfigs","loadAllChartConfigs","clearChartConfigCache","createDashboardLayout","portlets","layouts","generateResponsiveLayouts","gridLayout","portlet","item","formatChartData","data","options","formatNumbers","precision","row","formattedRow","key","value","generatePortletId","findNextPosition","existingPortlets","_w","_h","p","validateCubeQuery","queryString","query","createSamplePortlet"],"mappings":";;;AAcA,MAAMA,wBAAuB,IAAA,GAGvBC,IAAoF;AAAA,EACxF,KAAK,MAAM,OAAO,sBAA+B,EAAA,KAAA,CAAAC,MAAAA,EAAA,EAAA;AAAA,EACjD,MAAM,MAAM,OAAO,sBAAgC,EAAA,KAAA,CAAAA,MAAAA,EAAA,EAAA;AAAA,EACnD,MAAM,MAAM,OAAO,sBAAgC,EAAA,KAAA,CAAAA,MAAAA,EAAA,EAAA;AAAA,EACnD,KAAK,MAAM,OAAO,sBAA+B,EAAA,KAAA,CAAAA,MAAAA,EAAA,EAAA;AAAA,EACjD,SAAS,MAAM,OAAO,sBAAmC,EAAA,KAAA,CAAAA,MAAAA,EAAA,EAAA;AAAA,EACzD,OAAO,MAAM,OAAO,sBAAiC,EAAA,KAAA,CAAAA,MAAAA,EAAA,EAAA;AAAA,EACrD,WAAW,MAAM,OAAO,sBAAqC,EAAA,KAAA,CAAAA,MAAAA,EAAA,EAAA;AAAA,EAC7D,SAAS,MAAM,OAAO,sBAAmC,EAAA,KAAA,CAAAA,MAAAA,EAAA,EAAA;AAAA,EACzD,QAAQ,MAAM,OAAO,sBAAkC,EAAA,KAAA,CAAAA,MAAAA,EAAA,EAAA;AAAA,EACvD,OAAO,MAAM,OAAO,sBAAgC,EAAA,KAAA,CAAAA,MAAAA,EAAA,EAAA;AAAA,EACpD,cAAc,MAAM,OAAO,sBAAwC,EAAA,KAAA,CAAAA,MAAA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