drizzle-cube 0.3.13 → 0.3.15

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 (182) hide show
  1. package/dist/adapters/{compiler-DTOU8IsK.js → compiler-DdcGVWIl.js} +7429 -4165
  2. package/dist/adapters/compiler-mAJDpIQx.cjs +214 -0
  3. package/dist/adapters/express/index.cjs +1 -1
  4. package/dist/adapters/express/index.d.ts +1 -1
  5. package/dist/adapters/express/index.js +1 -1
  6. package/dist/adapters/fastify/index.cjs +1 -1
  7. package/dist/adapters/fastify/index.d.ts +1 -1
  8. package/dist/adapters/fastify/index.js +1 -1
  9. package/dist/adapters/hono/index.cjs +1 -1
  10. package/dist/adapters/hono/index.d.ts +1 -1
  11. package/dist/adapters/hono/index.js +1 -1
  12. package/dist/adapters/nextjs/index.cjs +1 -1
  13. package/dist/adapters/nextjs/index.d.ts +1 -1
  14. package/dist/adapters/nextjs/index.js +1 -1
  15. package/dist/adapters/utils.d.ts +29 -0
  16. package/dist/client/adapters/index.d.ts +2 -0
  17. package/dist/client/adapters/retentionModeAdapter.d.ts +3 -0
  18. package/dist/client/charts.js +12 -12
  19. package/dist/client/chunks/RetentionCombinedChart-CqMAkdcR.js +256 -0
  20. package/dist/client/chunks/RetentionCombinedChart-CqMAkdcR.js.map +1 -0
  21. package/dist/client/chunks/RetentionCombinedChart.config-C-ILIaEb.js +47 -0
  22. package/dist/client/chunks/RetentionCombinedChart.config-C-ILIaEb.js.map +1 -0
  23. package/dist/client/chunks/RetentionHeatmap-Bofadstm.js +178 -0
  24. package/dist/client/chunks/RetentionHeatmap-Bofadstm.js.map +1 -0
  25. package/dist/client/chunks/RetentionHeatmap.config-CIvhc-GT.js +28 -0
  26. package/dist/client/chunks/RetentionHeatmap.config-CIvhc-GT.js.map +1 -0
  27. package/dist/client/chunks/analysis-builder-D0MIKiKS.js +6939 -0
  28. package/dist/client/chunks/analysis-builder-D0MIKiKS.js.map +1 -0
  29. package/dist/client/chunks/analysis-builder-shared-gS0TDC6Y.js +2779 -0
  30. package/dist/client/chunks/analysis-builder-shared-gS0TDC6Y.js.map +1 -0
  31. package/dist/client/chunks/{chart-activity-grid-CuPARsr1.js → chart-activity-grid-B37W8fcE.js} +11 -11
  32. package/dist/client/chunks/{chart-activity-grid-CuPARsr1.js.map → chart-activity-grid-B37W8fcE.js.map} +1 -1
  33. package/dist/client/chunks/{chart-area-cPrJnhLj.js → chart-area-DZcxSVB1.js} +2 -2
  34. package/dist/client/chunks/{chart-area-cPrJnhLj.js.map → chart-area-DZcxSVB1.js.map} +1 -1
  35. package/dist/client/chunks/{chart-bar-D68HFPpa.js → chart-bar-BFAdRj-E.js} +2 -2
  36. package/dist/client/chunks/{chart-bar-D68HFPpa.js.map → chart-bar-BFAdRj-E.js.map} +1 -1
  37. package/dist/client/chunks/{chart-bubble-CquyYfNO.js → chart-bubble-eoCCbl3h.js} +2 -2
  38. package/dist/client/chunks/{chart-bubble-CquyYfNO.js.map → chart-bubble-eoCCbl3h.js.map} +1 -1
  39. package/dist/client/chunks/{chart-config-activity-grid-Bkvx0F-G.js → chart-config-activity-grid-BBSNCbkb.js} +2 -2
  40. package/dist/client/chunks/{chart-config-activity-grid-Bkvx0F-G.js.map → chart-config-activity-grid-BBSNCbkb.js.map} +1 -1
  41. package/dist/client/chunks/{chart-config-area-OApsRaYC.js → chart-config-area-CyyJOO2T.js} +2 -2
  42. package/dist/client/chunks/{chart-config-area-OApsRaYC.js.map → chart-config-area-CyyJOO2T.js.map} +1 -1
  43. package/dist/client/chunks/{chart-config-bar-Dy21oaIA.js → chart-config-bar-BJKGnfLt.js} +2 -2
  44. package/dist/client/chunks/{chart-config-bar-Dy21oaIA.js.map → chart-config-bar-BJKGnfLt.js.map} +1 -1
  45. package/dist/client/chunks/{chart-config-bubble-Chv0SoFm.js → chart-config-bubble-CuSsCHZ4.js} +2 -2
  46. package/dist/client/chunks/{chart-config-bubble-Chv0SoFm.js.map → chart-config-bubble-CuSsCHZ4.js.map} +1 -1
  47. package/dist/client/chunks/{chart-config-data-table-DTIdC35a.js → chart-config-data-table-BhgqwoqT.js} +2 -2
  48. package/dist/client/chunks/{chart-config-data-table-DTIdC35a.js.map → chart-config-data-table-BhgqwoqT.js.map} +1 -1
  49. package/dist/client/chunks/{chart-config-funnel-f17Livgr.js → chart-config-funnel-BlSQYng0.js} +4 -4
  50. package/dist/client/chunks/{chart-config-funnel-f17Livgr.js.map → chart-config-funnel-BlSQYng0.js.map} +1 -1
  51. package/dist/client/chunks/{chart-config-heat-map-DPhNICha.js → chart-config-heat-map-DHQGFZhX.js} +2 -2
  52. package/dist/client/chunks/{chart-config-heat-map-DPhNICha.js.map → chart-config-heat-map-DHQGFZhX.js.map} +1 -1
  53. package/dist/client/chunks/{chart-config-kpi-delta-CCl1d-St.js → chart-config-kpi-delta-yTA5ug_l.js} +2 -2
  54. package/dist/client/chunks/{chart-config-kpi-delta-CCl1d-St.js.map → chart-config-kpi-delta-yTA5ug_l.js.map} +1 -1
  55. package/dist/client/chunks/{chart-config-kpi-number-DkE3eSwH.js → chart-config-kpi-number-nVAwDXzq.js} +2 -2
  56. package/dist/client/chunks/{chart-config-kpi-number-DkE3eSwH.js.map → chart-config-kpi-number-nVAwDXzq.js.map} +1 -1
  57. package/dist/client/chunks/{chart-config-kpi-text-BMbgdxZm.js → chart-config-kpi-text-DZjqsx-b.js} +2 -2
  58. package/dist/client/chunks/{chart-config-kpi-text-BMbgdxZm.js.map → chart-config-kpi-text-DZjqsx-b.js.map} +1 -1
  59. package/dist/client/chunks/{chart-config-line-BnLlRUQE.js → chart-config-line-DR0ThxZy.js} +2 -2
  60. package/dist/client/chunks/{chart-config-line-BnLlRUQE.js.map → chart-config-line-DR0ThxZy.js.map} +1 -1
  61. package/dist/client/chunks/{chart-config-markdown-DIaMFC0Z.js → chart-config-markdown-DZxdGNVQ.js} +2 -2
  62. package/dist/client/chunks/{chart-config-markdown-DIaMFC0Z.js.map → chart-config-markdown-DZxdGNVQ.js.map} +1 -1
  63. package/dist/client/chunks/{chart-config-pie-O9y_T0BQ.js → chart-config-pie-BM5lgH-w.js} +2 -2
  64. package/dist/client/chunks/{chart-config-pie-O9y_T0BQ.js.map → chart-config-pie-BM5lgH-w.js.map} +1 -1
  65. package/dist/client/chunks/{chart-config-radar-CXa0354h.js → chart-config-radar-BBAVIF0S.js} +2 -2
  66. package/dist/client/chunks/{chart-config-radar-CXa0354h.js.map → chart-config-radar-BBAVIF0S.js.map} +1 -1
  67. package/dist/client/chunks/{chart-config-radial-bar-BppJU8-Q.js → chart-config-radial-bar-CTwjDRnB.js} +2 -2
  68. package/dist/client/chunks/{chart-config-radial-bar-BppJU8-Q.js.map → chart-config-radial-bar-CTwjDRnB.js.map} +1 -1
  69. package/dist/client/chunks/{chart-config-sankey-BfBHgL4x.js → chart-config-sankey-CNAgsMQ4.js} +2 -2
  70. package/dist/client/chunks/{chart-config-sankey-BfBHgL4x.js.map → chart-config-sankey-CNAgsMQ4.js.map} +1 -1
  71. package/dist/client/chunks/{chart-config-scatter-BTt8a10R.js → chart-config-scatter-CWvN2E-X.js} +2 -2
  72. package/dist/client/chunks/{chart-config-scatter-BTt8a10R.js.map → chart-config-scatter-CWvN2E-X.js.map} +1 -1
  73. package/dist/client/chunks/{chart-config-sunburst-DNmQpIIx.js → chart-config-sunburst-W_SKwaj0.js} +4 -4
  74. package/dist/client/chunks/{chart-config-sunburst-DNmQpIIx.js.map → chart-config-sunburst-W_SKwaj0.js.map} +1 -1
  75. package/dist/client/chunks/{chart-config-tree-map-HVgG4oa0.js → chart-config-tree-map-CLmRvvMR.js} +2 -2
  76. package/dist/client/chunks/{chart-config-tree-map-HVgG4oa0.js.map → chart-config-tree-map-CLmRvvMR.js.map} +1 -1
  77. package/dist/client/chunks/{chart-data-table-D4WDqbM0.js → chart-data-table-kudRwZxJ.js} +4 -4
  78. package/dist/client/chunks/{chart-data-table-D4WDqbM0.js.map → chart-data-table-kudRwZxJ.js.map} +1 -1
  79. package/dist/client/chunks/{chart-funnel-Csdn4FbN.js → chart-funnel-CA0XJkfh.js} +2 -2
  80. package/dist/client/chunks/{chart-funnel-Csdn4FbN.js.map → chart-funnel-CA0XJkfh.js.map} +1 -1
  81. package/dist/client/chunks/{chart-heat-map-v1afxnjq.js → chart-heat-map-DUy9_pWM.js} +2 -2
  82. package/dist/client/chunks/{chart-heat-map-v1afxnjq.js.map → chart-heat-map-DUy9_pWM.js.map} +1 -1
  83. package/dist/client/chunks/chart-kpi-delta-MIGGCpkG.js +351 -0
  84. package/dist/client/chunks/chart-kpi-delta-MIGGCpkG.js.map +1 -0
  85. package/dist/client/chunks/chart-kpi-number-DM0Brd91.js +473 -0
  86. package/dist/client/chunks/chart-kpi-number-DM0Brd91.js.map +1 -0
  87. package/dist/client/chunks/{chart-kpi-text-CRp8QWYG.js → chart-kpi-text-BAb28V4X.js} +3 -3
  88. package/dist/client/chunks/{chart-kpi-text-CRp8QWYG.js.map → chart-kpi-text-BAb28V4X.js.map} +1 -1
  89. package/dist/client/chunks/{chart-line-DqqE7ky9.js → chart-line-e3h8sa1R.js} +5 -5
  90. package/dist/client/chunks/{chart-line-DqqE7ky9.js.map → chart-line-e3h8sa1R.js.map} +1 -1
  91. package/dist/client/chunks/{chart-pie-B5WBzIRH.js → chart-pie-CFoHYqDB.js} +2 -2
  92. package/dist/client/chunks/{chart-pie-B5WBzIRH.js.map → chart-pie-CFoHYqDB.js.map} +1 -1
  93. package/dist/client/chunks/{chart-radar-DL_dvhA-.js → chart-radar-CPPwkfxj.js} +2 -2
  94. package/dist/client/chunks/{chart-radar-DL_dvhA-.js.map → chart-radar-CPPwkfxj.js.map} +1 -1
  95. package/dist/client/chunks/{chart-radial-bar-DDRo6nz-.js → chart-radial-bar-BdEOM-P1.js} +2 -2
  96. package/dist/client/chunks/{chart-radial-bar-DDRo6nz-.js.map → chart-radial-bar-BdEOM-P1.js.map} +1 -1
  97. package/dist/client/chunks/{chart-sankey-C_bgIfg-.js → chart-sankey-Bbady-8g.js} +2 -2
  98. package/dist/client/chunks/{chart-sankey-C_bgIfg-.js.map → chart-sankey-Bbady-8g.js.map} +1 -1
  99. package/dist/client/chunks/{chart-scatter-DjmJRlK0.js → chart-scatter-JFu0Pv3a.js} +15 -15
  100. package/dist/client/chunks/{chart-scatter-DjmJRlK0.js.map → chart-scatter-JFu0Pv3a.js.map} +1 -1
  101. package/dist/client/chunks/{chart-sunburst-CbMEnaes.js → chart-sunburst-sayxze15.js} +2 -2
  102. package/dist/client/chunks/{chart-sunburst-CbMEnaes.js.map → chart-sunburst-sayxze15.js.map} +1 -1
  103. package/dist/client/chunks/{chart-tree-map-DEfJtJVC.js → chart-tree-map-Ks2xev8b.js} +30 -30
  104. package/dist/client/chunks/{chart-tree-map-DEfJtJVC.js.map → chart-tree-map-Ks2xev8b.js.map} +1 -1
  105. package/dist/client/chunks/chartConfigRegistry-BumUIPw4.js +44 -0
  106. package/dist/client/chunks/{chartConfigRegistry-CiOq-PqX.js.map → chartConfigRegistry-BumUIPw4.js.map} +1 -1
  107. package/dist/client/chunks/charts-_yZ9gBJU.js +230 -0
  108. package/dist/client/chunks/charts-_yZ9gBJU.js.map +1 -0
  109. package/dist/client/chunks/{charts-core-CXrhEEVF.js → charts-core-Bzu9PzMd.js} +10 -10
  110. package/dist/client/chunks/{charts-core-CXrhEEVF.js.map → charts-core-Bzu9PzMd.js.map} +1 -1
  111. package/dist/client/chunks/{charts-loader-BtsnUO4Q.js → charts-loader-cMtx4zHx.js} +30 -28
  112. package/dist/client/chunks/charts-loader-cMtx4zHx.js.map +1 -0
  113. package/dist/client/chunks/{components-BDrlf9Er.js → components-DQuPThfA.js} +3575 -3208
  114. package/dist/client/chunks/components-DQuPThfA.js.map +1 -0
  115. package/dist/client/chunks/{core-B8zw0qRf.js → core-DwOXVb87.js} +2 -2
  116. package/dist/client/chunks/{core-B8zw0qRf.js.map → core-DwOXVb87.js.map} +1 -1
  117. package/dist/client/chunks/hooks-DPRv1Xhb.js +150 -0
  118. package/dist/client/chunks/{hooks-B8Zw5PfL.js.map → hooks-DPRv1Xhb.js.map} +1 -1
  119. package/dist/client/chunks/{icons-NzFHtqeM.js → icons-DRreo6m8.js} +128 -112
  120. package/dist/client/chunks/{icons-NzFHtqeM.js.map → icons-DRreo6m8.js.map} +1 -1
  121. package/dist/client/chunks/{providers-CqCiJTEj.js → providers-BW8D7Wso.js} +2 -2
  122. package/dist/client/chunks/{providers-CqCiJTEj.js.map → providers-BW8D7Wso.js.map} +1 -1
  123. package/dist/client/chunks/retention-CzCo8262.js +120 -0
  124. package/dist/client/chunks/retention-CzCo8262.js.map +1 -0
  125. package/dist/client/chunks/{useDirtyStateTracking-C_mitVwh.js → useDirtyStateTracking-Yu_qQXb-.js} +101 -99
  126. package/dist/client/chunks/useDirtyStateTracking-Yu_qQXb-.js.map +1 -0
  127. package/dist/client/chunks/{vendor-DzzxS7Ay.js → vendor-BSkQZgtm.js} +548 -540
  128. package/dist/client/chunks/vendor-BSkQZgtm.js.map +1 -0
  129. package/dist/client/components/AnalysisBuilder/AnalysisTypeSelector.d.ts +3 -1
  130. package/dist/client/components/AnalysisBuilder/RetentionConfigPanel.d.ts +36 -0
  131. package/dist/client/components/AnalysisBuilder/RetentionModeContent.d.ts +71 -0
  132. package/dist/client/components/AnalysisBuilder/types.d.ts +99 -0
  133. package/dist/client/components/DebugModal.d.ts +2 -1
  134. package/dist/client/components/charts/RetentionCombinedChart.config.d.ts +2 -0
  135. package/dist/client/components/charts/RetentionCombinedChart.d.ts +14 -0
  136. package/dist/client/components/charts/RetentionHeatmap.config.d.ts +2 -0
  137. package/dist/client/components/charts/RetentionHeatmap.d.ts +7 -0
  138. package/dist/client/components.js +2 -2
  139. package/dist/client/hooks/queries/index.d.ts +2 -1
  140. package/dist/client/hooks/queries/useDryRunQuery.d.ts +26 -0
  141. package/dist/client/hooks/queries/useExplainQuery.d.ts +3 -1
  142. package/dist/client/hooks/queries/useFlowQuery.d.ts +5 -0
  143. package/dist/client/hooks/queries/useRetentionQuery.d.ts +67 -0
  144. package/dist/client/hooks/useAnalysisBuilderHook.d.ts +61 -0
  145. package/dist/client/hooks/useAnalysisQueryExecution.d.ts +42 -1
  146. package/dist/client/hooks.js +3 -3
  147. package/dist/client/icons/customIcons.d.ts +7 -0
  148. package/dist/client/icons/types.d.ts +1 -0
  149. package/dist/client/icons.js +1 -1
  150. package/dist/client/index.js +11 -11
  151. package/dist/client/providers.js +1 -1
  152. package/dist/client/stores/analysisBuilderStore.d.ts +86 -1
  153. package/dist/client/stores/dashboardStore.d.ts +2 -1
  154. package/dist/client/stores/slices/index.d.ts +2 -0
  155. package/dist/client/stores/slices/retentionSlice.d.ts +66 -0
  156. package/dist/client/styles.css +1 -1
  157. package/dist/client/types/analysisConfig.d.ts +29 -4
  158. package/dist/client/types/funnel.d.ts +5 -0
  159. package/dist/client/types/retention.d.ts +301 -0
  160. package/dist/client/types.d.ts +6 -3
  161. package/dist/client-bundle-stats.html +1 -1
  162. package/dist/server/index.cjs +76 -54
  163. package/dist/server/index.d.ts +217 -0
  164. package/dist/server/index.js +7363 -4152
  165. package/package.json +5 -2
  166. package/dist/adapters/compiler-CO13DaEb.cjs +0 -192
  167. package/dist/client/chunks/analysis-builder-Dc9NrG_N.js +0 -6013
  168. package/dist/client/chunks/analysis-builder-Dc9NrG_N.js.map +0 -1
  169. package/dist/client/chunks/analysis-builder-shared-B3-UWqQ2.js +0 -2540
  170. package/dist/client/chunks/analysis-builder-shared-B3-UWqQ2.js.map +0 -1
  171. package/dist/client/chunks/chart-kpi-delta-Bs5R5xr4.js +0 -435
  172. package/dist/client/chunks/chart-kpi-delta-Bs5R5xr4.js.map +0 -1
  173. package/dist/client/chunks/chart-kpi-number-Cf4Pgkm9.js +0 -392
  174. package/dist/client/chunks/chart-kpi-number-Cf4Pgkm9.js.map +0 -1
  175. package/dist/client/chunks/chartConfigRegistry-CiOq-PqX.js +0 -44
  176. package/dist/client/chunks/charts-loader-BtsnUO4Q.js.map +0 -1
  177. package/dist/client/chunks/charts-xNubY0vm.js +0 -226
  178. package/dist/client/chunks/charts-xNubY0vm.js.map +0 -1
  179. package/dist/client/chunks/components-BDrlf9Er.js.map +0 -1
  180. package/dist/client/chunks/hooks-B8Zw5PfL.js +0 -123
  181. package/dist/client/chunks/useDirtyStateTracking-C_mitVwh.js.map +0 -1
  182. package/dist/client/chunks/vendor-DzzxS7Ay.js.map +0 -1
@@ -1,6 +1,6 @@
1
- import { u as W, a as B } from "./vendor-DzzxS7Ay.js";
2
- import { useState as q, useRef as _, useMemo as w, useEffect as k, useCallback as D } from "react";
3
- import { e as K, f as N } from "./providers-CqCiJTEj.js";
1
+ import { u as W, a as B } from "./vendor-BSkQZgtm.js";
2
+ import { useState as k, useRef as _, useMemo as w, useEffect as E, useCallback as D } from "react";
3
+ import { e as K, f as N } from "./providers-BW8D7Wso.js";
4
4
  const G = {
5
5
  // String operators
6
6
  equals: {
@@ -355,8 +355,8 @@ function A(e) {
355
355
  return t(e);
356
356
  }
357
357
  function P(e, r) {
358
- const { isValid: t, skip: s = !1, debounceMs: n = 300 } = r, [u, o] = q(null), [f, p] = q(!1), d = _(null), c = _(""), a = _(s), i = w(() => e ? A(e) : "", [e]);
359
- return k(() => {
358
+ const { isValid: t, skip: s = !1, debounceMs: n = 300 } = r, [l, o] = k(null), [f, p] = k(!1), d = _(null), c = _(""), a = _(s), i = w(() => e ? A(e) : "", [e]);
359
+ return E(() => {
360
360
  const m = a.current && !s;
361
361
  if (a.current = s, !(i === c.current && !m))
362
362
  return d.current && clearTimeout(d.current), t && !s ? (p(!0), d.current = setTimeout(() => {
@@ -365,7 +365,7 @@ function P(e, r) {
365
365
  d.current && clearTimeout(d.current);
366
366
  };
367
367
  }, [i, t, s, n, e]), {
368
- debouncedValue: u,
368
+ debouncedValue: l,
369
369
  isDebouncing: f
370
370
  };
371
371
  }
@@ -383,51 +383,53 @@ function Z(e, r = {}) {
383
383
  skip: t = !1,
384
384
  debounceMs: s = Y,
385
385
  resetResultSetOnChange: n = !0,
386
- staleTime: u = 60 * 1e3,
386
+ staleTime: l = 60 * 1e3,
387
387
  keepPreviousData: o = !0
388
- } = r, { cubeApi: f, batchCoordinator: p, enableBatching: d } = K(), c = W(), { features: a } = N(), i = a.manualRefresh ?? !1, [l, m] = q(null), R = X(e), { debouncedValue: E, isDebouncing: M } = P(e, {
388
+ } = r, { cubeApi: f, batchCoordinator: p, enableBatching: d } = K(), c = W(), { features: a } = N(), i = a.manualRefresh ?? !1, [u, m] = k(null), R = X(e), { debouncedValue: M, isDebouncing: S } = P(e, {
389
389
  isValid: R,
390
390
  skip: t,
391
391
  debounceMs: s
392
- }), y = w(() => E ? j(E) : null, [E]), V = y ? A(y) : null, I = w(() => !i || !V ? !1 : l === null ? !0 : V !== l, [i, V, l]), b = w(() => !y || t ? !1 : i ? l === V : !0, [y, t, i, l, V]), h = _(!1), g = B({
392
+ }), y = w(() => M ? j(M) : null, [M]), T = y ? A(y) : null, I = w(() => !i || !T || u === null ? !1 : T !== u, [i, T, u]), b = w(() => !y || t ? !1 : !i || u === null ? !0 : u === T, [y, t, i, u, T]), g = _(!1), h = B({
393
393
  queryKey: O(y),
394
394
  queryFn: async () => {
395
395
  if (!y) throw new Error("No query provided");
396
- const C = h.current;
397
- return h.current = !1, C ? f.load(y, { bustCache: !0 }) : d && p ? p.register(y) : f.load(y);
396
+ const C = g.current;
397
+ return g.current = !1, C ? f.load(y, { bustCache: !0 }) : d && p ? p.register(y) : f.load(y);
398
398
  },
399
399
  enabled: b,
400
- staleTime: u,
400
+ staleTime: l,
401
401
  placeholderData: o ? (C) => C : void 0
402
402
  });
403
- k(() => {
404
- !i && y && !t && m(V);
405
- }, [i, y, t, V]);
403
+ E(() => {
404
+ !i && y && !t && m(T);
405
+ }, [i, y, t, T]), E(() => {
406
+ i && b && h.isSuccess && !h.isFetching && y && m(T);
407
+ }, [i, b, h.isSuccess, h.isFetching, y, T]);
406
408
  const Q = w(() => {
407
- if (!g.data) return null;
409
+ if (!h.data) return null;
408
410
  try {
409
- return g.data.rawData();
411
+ return h.data.rawData();
410
412
  } catch {
411
413
  return null;
412
414
  }
413
- }, [g.data]), S = D((C) => {
414
- y && (m(V), C?.bustCache && (h.current = !0), c.invalidateQueries({ queryKey: O(y) }));
415
- }, [y, V, c]), T = S, v = () => {
415
+ }, [h.data]), L = D((C) => {
416
+ y && (m(T), C?.bustCache && (g.current = !0), c.invalidateQueries({ queryKey: O(y) }));
417
+ }, [y, T, c]), V = L, v = () => {
416
418
  c.removeQueries({ queryKey: ["cube", "load"] });
417
419
  };
418
420
  return {
419
- resultSet: w(() => g.data ?? null, [g.data, M, n]),
421
+ resultSet: w(() => h.data ?? null, [h.data, S, n]),
420
422
  rawData: Q,
421
- isLoading: g.isLoading || M,
422
- isFetching: g.isFetching,
423
- isDebouncing: M,
424
- error: g.error,
425
- debouncedQuery: E,
423
+ isLoading: h.isLoading || S,
424
+ isFetching: h.isFetching,
425
+ isDebouncing: S,
426
+ error: h.error,
427
+ debouncedQuery: M,
426
428
  isValidQuery: R,
427
- refetch: T,
429
+ refetch: V,
428
430
  clearCache: v,
429
431
  needsRefresh: I,
430
- executeQuery: S
432
+ executeQuery: L
431
433
  };
432
434
  }
433
435
  function $(e) {
@@ -453,12 +455,12 @@ function ye(e) {
453
455
  }
454
456
  function ee(e, r, t) {
455
457
  const s = [];
456
- return e.forEach((n, u) => {
457
- const o = n.rawData(), f = t?.[u] || `Query ${u + 1}`;
458
+ return e.forEach((n, l) => {
459
+ const o = n.rawData(), f = t?.[l] || `Query ${l + 1}`;
458
460
  o.forEach((p) => {
459
461
  s.push({
460
462
  ...p,
461
- __queryIndex: u,
463
+ __queryIndex: l,
462
464
  __queryLabel: f
463
465
  });
464
466
  });
@@ -466,14 +468,14 @@ function ee(e, r, t) {
466
468
  }
467
469
  function te(e, r, t, s) {
468
470
  const n = /* @__PURE__ */ new Map();
469
- return e.forEach((u, o) => {
470
- const f = u.rawData(), p = r[o].measures || [];
471
+ return e.forEach((l, o) => {
472
+ const f = l.rawData(), p = r[o].measures || [];
471
473
  f.forEach((d) => {
472
474
  const c = t.map((i) => String(d[i] ?? "")).join("|");
473
475
  if (!n.has(c)) {
474
476
  const i = {};
475
- t.forEach((l) => {
476
- i[l] = d[l];
477
+ t.forEach((u) => {
478
+ i[u] = d[u];
477
479
  }), n.set(c, i);
478
480
  }
479
481
  const a = n.get(c);
@@ -483,8 +485,8 @@ function te(e, r, t, s) {
483
485
  !t.includes(i) && !p.includes(i) && (i in a || (a[i] = d[i]));
484
486
  });
485
487
  });
486
- }), Array.from(n.values()).sort((u, o) => {
487
- const f = String(u[t[0]] ?? ""), p = String(o[t[0]] ?? "");
488
+ }), Array.from(n.values()).sort((l, o) => {
489
+ const f = String(l[t[0]] ?? ""), p = String(o[t[0]] ?? "");
488
490
  return f.localeCompare(p);
489
491
  });
490
492
  }
@@ -493,8 +495,8 @@ function se(e, r, t, s, n) {
493
495
  }
494
496
  function he(e, r) {
495
497
  const t = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
496
- return e.forEach((u) => {
497
- u.measures?.forEach((o) => t.add(o)), u.dimensions?.forEach((o) => s.add(o)), u.timeDimensions?.forEach((o) => n.add(o.dimension));
498
+ return e.forEach((l) => {
499
+ l.measures?.forEach((o) => t.add(o)), l.dimensions?.forEach((o) => s.add(o)), l.timeDimensions?.forEach((o) => n.add(o.dimension));
498
500
  }), {
499
501
  measures: Array.from(t),
500
502
  dimensions: Array.from(s),
@@ -534,86 +536,86 @@ function ve(e, r = {}) {
534
536
  skip: t = !1,
535
537
  debounceMs: s = re,
536
538
  staleTime: n = 60 * 1e3,
537
- keepPreviousData: u = !0
539
+ keepPreviousData: l = !0
538
540
  } = r, { cubeApi: o, batchCoordinator: f, enableBatching: p } = K(), d = W(), c = ne(e), { debouncedValue: a, isDebouncing: i } = P(e, {
539
541
  isValid: c,
540
542
  skip: t,
541
543
  debounceMs: s
542
- }), l = w(() => a ? {
544
+ }), u = w(() => a ? {
543
545
  ...a,
544
546
  queries: a.queries.map((b) => j(b))
545
547
  } : null, [a]), m = B({
546
- queryKey: x(l),
548
+ queryKey: x(u),
547
549
  queryFn: async () => {
548
- if (!l) throw new Error("No config provided");
550
+ if (!u) throw new Error("No config provided");
549
551
  let b;
550
552
  p && f ? b = await Promise.all(
551
- l.queries.map((v) => f.register(v))
552
- ) : b = await o.batchLoad(l.queries);
553
- const h = b.map((v) => v && "error" in v && v.error ? new Error(v.error) : null), g = b.map((v, L) => {
554
- if (h[L]) return null;
553
+ u.queries.map((v) => f.register(v))
554
+ ) : b = await o.batchLoad(u.queries);
555
+ const g = b.map((v) => v && "error" in v && v.error ? new Error(v.error) : null), h = b.map((v, q) => {
556
+ if (g[q]) return null;
555
557
  try {
556
558
  return v.rawData();
557
559
  } catch {
558
560
  return null;
559
561
  }
560
- }), Q = b.filter((v, L) => !h[L]), S = l.queries.filter((v, L) => !h[L]);
562
+ }), Q = b.filter((v, q) => !g[q]), L = u.queries.filter((v, q) => !g[q]);
561
563
  return {
562
564
  data: Q.length > 0 ? se(
563
565
  Q,
564
- S,
565
- l.mergeStrategy,
566
- l.mergeKeys,
567
- l.queryLabels
566
+ L,
567
+ u.mergeStrategy,
568
+ u.mergeKeys,
569
+ u.queryLabels
568
570
  ) : [],
569
571
  resultSets: b,
570
- perQueryData: g,
571
- errors: h,
572
- firstError: h.find((v) => v !== null) || null
572
+ perQueryData: h,
573
+ errors: g,
574
+ firstError: g.find((v) => v !== null) || null
573
575
  };
574
576
  },
575
- enabled: !!l && !t,
577
+ enabled: !!u && !t,
576
578
  staleTime: n,
577
- placeholderData: u ? (b) => b : void 0
579
+ placeholderData: l ? (b) => b : void 0
578
580
  }), R = (b) => {
579
- l && (b?.bustCache ? (d.removeQueries({
580
- queryKey: x(l)
581
+ u && (b?.bustCache ? (d.removeQueries({
582
+ queryKey: x(u)
581
583
  }), d.fetchQuery({
582
- queryKey: x(l),
584
+ queryKey: x(u),
583
585
  queryFn: async () => {
584
- const h = await o.batchLoad(
585
- l.queries,
586
+ const g = await o.batchLoad(
587
+ u.queries,
586
588
  { bustCache: !0 }
587
- ), g = h.map((T) => T && "error" in T && T.error ? new Error(T.error) : null), Q = l.mergeStrategy === "concat" ? h.flatMap((T) => T?.rawData() || []) : h[0]?.rawData() || [], S = l.mergeStrategy === "concat" ? h.map((T) => T?.rawData() || []) : [];
589
+ ), h = g.map((V) => V && "error" in V && V.error ? new Error(V.error) : null), Q = u.mergeStrategy === "concat" ? g.flatMap((V) => V?.rawData() || []) : g[0]?.rawData() || [], L = u.mergeStrategy === "concat" ? g.map((V) => V?.rawData() || []) : [];
588
590
  return {
589
591
  data: Q,
590
- resultSets: h,
591
- perQueryData: S,
592
- errors: g,
593
- firstError: g.find((T) => T !== null) || null
592
+ resultSets: g,
593
+ perQueryData: L,
594
+ errors: h,
595
+ firstError: h.find((V) => V !== null) || null
594
596
  };
595
597
  }
596
598
  })) : d.refetchQueries({
597
- queryKey: x(l)
599
+ queryKey: x(u)
598
600
  }));
599
- }, E = m.data?.data ?? null, M = m.data?.resultSets ?? null, y = m.data?.perQueryData ?? null, V = m.data?.errors ?? [], I = m.data?.firstError ?? m.error;
601
+ }, M = m.data?.data ?? null, S = m.data?.resultSets ?? null, y = m.data?.perQueryData ?? null, T = m.data?.errors ?? [], I = m.data?.firstError ?? m.error;
600
602
  return {
601
- data: E,
602
- resultSets: M,
603
+ data: M,
604
+ resultSets: S,
603
605
  perQueryData: y,
604
606
  isLoading: m.isLoading || i,
605
607
  isFetching: m.isFetching,
606
608
  isDebouncing: i,
607
609
  error: I,
608
- errors: V,
610
+ errors: T,
609
611
  debouncedConfig: a,
610
612
  isValidConfig: c,
611
613
  refetch: R
612
614
  };
613
615
  }
614
616
  function Te(e, r = !0) {
615
- const [t, s] = q(null), n = _(""), {
616
- resultSet: u,
617
+ const [t, s] = k(null), n = _(""), {
618
+ resultSet: l,
617
619
  isLoading: o,
618
620
  error: f
619
621
  } = Z(t, {
@@ -622,19 +624,19 @@ function Te(e, r = !0) {
622
624
  // Quick debounce for filter searches
623
625
  keepPreviousData: !0
624
626
  }), p = w(() => {
625
- if (!u || o || f || !e)
627
+ if (!l || o || f || !e)
626
628
  return [];
627
629
  try {
628
- const a = u.tablePivot(), i = /* @__PURE__ */ new Set();
629
- return a.forEach((l) => {
630
- const m = l[e];
630
+ const a = l.tablePivot(), i = /* @__PURE__ */ new Set();
631
+ return a.forEach((u) => {
632
+ const m = u[e];
631
633
  m != null && m !== "" && i.add(m);
632
634
  }), Array.from(i);
633
635
  } catch (a) {
634
636
  return console.error("Error extracting values from result set:", a), [];
635
637
  }
636
- }, [u, o, f, e]);
637
- k(() => {
638
+ }, [l, o, f, e]);
639
+ E(() => {
638
640
  (!e || !r) && (s(null), n.current = "");
639
641
  }, [e, r]);
640
642
  const d = D(() => {
@@ -655,18 +657,18 @@ function Te(e, r = !0) {
655
657
  if (e && !(!i && a === n.current)) {
656
658
  n.current = a;
657
659
  try {
658
- const l = {
660
+ const u = {
659
661
  dimensions: [e],
660
662
  limit: 25,
661
663
  order: { [e]: "asc" }
662
664
  };
663
- a && a.trim() && (l.filters = [{
665
+ a && a.trim() && (u.filters = [{
664
666
  member: e,
665
667
  operator: "contains",
666
668
  values: [a.trim()]
667
- }]), s(l);
668
- } catch (l) {
669
- console.error("Error creating search query:", l);
669
+ }]), s(u);
670
+ } catch (u) {
671
+ console.error("Error creating search query:", u);
670
672
  }
671
673
  }
672
674
  }, [e]);
@@ -679,8 +681,8 @@ function Te(e, r = !0) {
679
681
  };
680
682
  }
681
683
  function Ve(e, r) {
682
- const [t, s] = q(e);
683
- return k(() => {
684
+ const [t, s] = k(e);
685
+ return E(() => {
684
686
  const n = setTimeout(() => {
685
687
  s(e);
686
688
  }, r);
@@ -691,7 +693,7 @@ function Ve(e, r) {
691
693
  }
692
694
  const F = 1200, ae = 768;
693
695
  function we() {
694
- const [e, r] = q(
696
+ const [e, r] = k(
695
697
  () => typeof window < "u" ? window.innerWidth : F
696
698
  ), t = _(null), s = _(null), n = D((p) => {
697
699
  if (t.current && (t.current.disconnect(), t.current = null), s.current = p, p) {
@@ -702,9 +704,9 @@ function we() {
702
704
  }), t.current.observe(p);
703
705
  }
704
706
  }, []);
705
- k(() => () => {
707
+ E(() => () => {
706
708
  t.current && t.current.disconnect();
707
- }, []), k(() => {
709
+ }, []), E(() => {
708
710
  const p = () => {
709
711
  if (s.current) {
710
712
  const c = s.current.offsetWidth;
@@ -717,13 +719,13 @@ function we() {
717
719
  window.removeEventListener("resize", p), clearTimeout(d);
718
720
  };
719
721
  }, []);
720
- const u = w(() => e >= F ? "desktop" : e >= ae ? "scaled" : "mobile", [e]), o = w(() => u !== "scaled" ? 1 : e / F, [e, u]);
722
+ const l = w(() => e >= F ? "desktop" : e >= ae ? "scaled" : "mobile", [e]), o = w(() => l !== "scaled" ? 1 : e / F, [e, l]);
721
723
  return {
722
724
  containerRef: n,
723
725
  containerWidth: e,
724
- displayMode: u,
726
+ displayMode: l,
725
727
  scaleFactor: o,
726
- isEditable: u === "desktop",
728
+ isEditable: l === "desktop",
727
729
  designWidth: F
728
730
  };
729
731
  }
@@ -733,9 +735,9 @@ function _e({
733
735
  onSave: t,
734
736
  onDirtyStateChange: s
735
737
  }) {
736
- const n = _(e), u = _(!1), o = D(
738
+ const n = _(e), l = _(!1), o = D(
737
739
  async (c) => {
738
- if (u.current) {
740
+ if (l.current) {
739
741
  s && s(!0);
740
742
  try {
741
743
  t && await t(c), n.current = c, s && s(!1);
@@ -749,11 +751,11 @@ function _e({
749
751
  (c) => {
750
752
  r && r(c);
751
753
  const a = JSON.stringify(c), i = JSON.stringify(n.current);
752
- a !== i && (u.current = !0, s && s(!0));
754
+ a !== i && (l.current = !0, s && s(!0));
753
755
  },
754
756
  [r, s]
755
- ), p = D(() => u.current, []), d = D((c) => {
756
- n.current = c, u.current = !1;
757
+ ), p = D(() => l.current, []), d = D((c) => {
758
+ n.current = c, l.current = !1;
757
759
  }, []);
758
760
  return {
759
761
  handleConfigChange: f,
@@ -790,4 +792,4 @@ export {
790
792
  O as w,
791
793
  de as x
792
794
  };
793
- //# sourceMappingURL=useDirtyStateTracking-C_mitVwh.js.map
795
+ //# sourceMappingURL=useDirtyStateTracking-Yu_qQXb-.js.map