drizzle-cube 0.10.1 → 0.11.1

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 (319) hide show
  1. package/dist/adapters/ActivityGridChart.config-XMtoteb6.js +2 -0
  2. package/dist/adapters/ActivityGridChart.config-h1AXPvn0.cjs +1 -0
  3. package/dist/adapters/AreaChart.config-DYf9wufo.cjs +1 -0
  4. package/dist/adapters/AreaChart.config-We6b53aT.js +2 -0
  5. package/dist/adapters/BarChart.config-4SX44IYv.cjs +1 -0
  6. package/dist/adapters/BarChart.config-CwBnyptL.js +2 -0
  7. package/dist/adapters/BoxPlotChart.config-BzNe-FlW.cjs +1 -0
  8. package/dist/adapters/BoxPlotChart.config-mfAHqmcp.js +2 -0
  9. package/dist/adapters/BubbleChart.config-CBT5jMdc.cjs +1 -0
  10. package/dist/adapters/BubbleChart.config-DxG_Umal.js +2 -0
  11. package/dist/adapters/CandlestickChart.config-Cqw3XP1h.js +2 -0
  12. package/dist/adapters/CandlestickChart.config-DPSSlzUD.cjs +1 -0
  13. package/dist/adapters/DataTable.config-DS1bvaDu.js +2 -0
  14. package/dist/adapters/DataTable.config-D_NsMeyz.cjs +1 -0
  15. package/dist/adapters/DotStripChart.config-BApWn6QV.cjs +1 -0
  16. package/dist/adapters/DotStripChart.config-Bdk5-YfB.js +2 -0
  17. package/dist/adapters/FunnelChart.config-BT5up_Bg.cjs +1 -0
  18. package/dist/adapters/FunnelChart.config-ISZiz9fn.js +2 -0
  19. package/dist/adapters/GaugeChart.config-Biaq1cKc.cjs +1 -0
  20. package/dist/adapters/GaugeChart.config-BjGfB84t.js +2 -0
  21. package/dist/adapters/HeatMapChart.config-Bmca8KiH.cjs +1 -0
  22. package/dist/adapters/HeatMapChart.config-uWvR0B-N.js +2 -0
  23. package/dist/adapters/KpiDelta.config-CJeDdj_1.js +2 -0
  24. package/dist/adapters/KpiDelta.config-CKr9pAxL.cjs +1 -0
  25. package/dist/adapters/KpiNumber.config-6YLEF2fy.cjs +1 -0
  26. package/dist/adapters/KpiNumber.config-C00M46GA.js +2 -0
  27. package/dist/adapters/KpiText.config-C8Av_D2W.cjs +1 -0
  28. package/dist/adapters/KpiText.config-bKTHob0C.js +2 -0
  29. package/dist/adapters/LineChart.config-DH68HT_B.js +2 -0
  30. package/dist/adapters/LineChart.config-DPq7GvL9.cjs +1 -0
  31. package/dist/adapters/MarkdownChart.config-CaaJPO3c.js +2 -0
  32. package/dist/adapters/MarkdownChart.config-ca_UyhWJ.cjs +1 -0
  33. package/dist/adapters/MeasureProfileChart.config-C1Il0IqL.cjs +1 -0
  34. package/dist/adapters/MeasureProfileChart.config-DMOnkmb6.js +2 -0
  35. package/dist/adapters/PieChart.config-Bg-8cxWK.js +2 -0
  36. package/dist/adapters/PieChart.config-joJcF--K.cjs +1 -0
  37. package/dist/adapters/ProportionBarChart.config-B2sltKsI.cjs +1 -0
  38. package/dist/adapters/ProportionBarChart.config-BlCedy1v.js +2 -0
  39. package/dist/adapters/RadarChart.config-DD1pX6FZ.js +2 -0
  40. package/dist/adapters/RadarChart.config-DVCCLSVw.cjs +1 -0
  41. package/dist/adapters/RadialBarChart.config--VIE2jMM.js +2 -0
  42. package/dist/adapters/RadialBarChart.config-BZwyWhTg.cjs +1 -0
  43. package/dist/adapters/RecordsTable.config-CTBQc-2r.js +2 -0
  44. package/dist/adapters/RecordsTable.config-DPdO0DL5.cjs +1 -0
  45. package/dist/adapters/RetentionCombinedChart.config-PGVxnkRL.js +2 -0
  46. package/dist/adapters/RetentionCombinedChart.config-mX5PMh82.cjs +1 -0
  47. package/dist/adapters/RetentionHeatmap.config-Co-JMzBm.js +2 -0
  48. package/dist/adapters/RetentionHeatmap.config-Cub3-ksy.cjs +1 -0
  49. package/dist/adapters/SankeyChart.config-BkIyUcAE.cjs +1 -0
  50. package/dist/adapters/SankeyChart.config-DGTnRmYg.js +2 -0
  51. package/dist/adapters/ScatterChart.config-CdZrBorg.js +2 -0
  52. package/dist/adapters/ScatterChart.config-CwN9niUL.cjs +1 -0
  53. package/dist/adapters/SunburstChart.config-D0ZkRSJv.cjs +1 -0
  54. package/dist/adapters/SunburstChart.config-RF3uu5Sa.js +2 -0
  55. package/dist/adapters/TreeMapChart.config-B2Yn_V7p.cjs +1 -0
  56. package/dist/adapters/TreeMapChart.config-diJtcs4D.js +2 -0
  57. package/dist/adapters/WaterfallChart.config-B10PxftT.cjs +1 -0
  58. package/dist/adapters/WaterfallChart.config-BImlkLmR.js +2 -0
  59. package/dist/adapters/chartConfigHelpers-BhME7ow_.cjs +1 -0
  60. package/dist/adapters/{chartConfigHelpers-BsnbxA2c.js → chartConfigHelpers-BsviVhEw.js} +27 -7
  61. package/dist/adapters/{compiler-Dw5tYox7.cjs → compiler-B-yljK02.cjs} +6 -6
  62. package/dist/adapters/{compiler-C8fOs43d.js → compiler-BhityGUO.js} +197 -186
  63. package/dist/adapters/core/index.cjs +1 -1
  64. package/dist/adapters/core/index.js +1 -1
  65. package/dist/adapters/{core-BP6GiYzO.cjs → core-CQOrzBNh.cjs} +1 -1
  66. package/dist/adapters/{core-z6vXJ8nF.js → core-xZE0miIu.js} +2 -2
  67. package/dist/adapters/express/index.cjs +1 -1
  68. package/dist/adapters/express/index.js +5 -5
  69. package/dist/adapters/fastify/index.cjs +1 -1
  70. package/dist/adapters/fastify/index.js +5 -5
  71. package/dist/adapters/{handler-CI3Rt-Zt.js → handler-ByeQ0-1r.js} +237 -234
  72. package/dist/adapters/handler-DSNmfv1R.cjs +16 -0
  73. package/dist/adapters/hono/index.cjs +1 -1
  74. package/dist/adapters/hono/index.js +4 -4
  75. package/dist/adapters/mcp-app-html-CNp0VqS_.cjs +1 -0
  76. package/dist/adapters/mcp-app-html-CvWoYMO3.js +5 -0
  77. package/dist/adapters/mcp-app-html.cjs +1 -1
  78. package/dist/adapters/mcp-app-html.js +1 -1
  79. package/dist/adapters/mcp-tools.cjs +1 -1
  80. package/dist/adapters/mcp-tools.js +3 -3
  81. package/dist/adapters/{mcp-transport-DpS_e0gL.js → mcp-transport-Cy6n4uj1.js} +1 -1
  82. package/dist/adapters/{mcp-transport-Bc7-KSG_.cjs → mcp-transport-DnLP5FPL.cjs} +1 -1
  83. package/dist/adapters/nextjs/index.cjs +1 -1
  84. package/dist/adapters/nextjs/index.js +5 -5
  85. package/dist/adapters/{openai-7064EJ1j.cjs → openai-BQl0yJCS.cjs} +1 -1
  86. package/dist/adapters/{openai-CnUBYFyY.js → openai-C4HrjyJj.js} +1 -1
  87. package/dist/adapters/{openai-DpGdZL3m.js → openai-D3Nt6Bj7.js} +1 -1
  88. package/dist/adapters/{openai-B0mByiYQ.cjs → openai-z1ai-G4Q.cjs} +1 -1
  89. package/dist/adapters/{utils-CN_bxSiq.js → utils-BaxFceDq.js} +6 -1
  90. package/dist/adapters/{utils-CvC1czqb.cjs → utils-a2p2B6x8.cjs} +2 -2
  91. package/dist/adapters/utils.cjs +1 -1
  92. package/dist/adapters/utils.js +1 -1
  93. package/dist/cjs/client/charts/chartConfigHelpers.d.ts +5 -0
  94. package/dist/cjs/client/components/AnalysisBuilder/types.d.ts +4 -0
  95. package/dist/cjs/client/components/AnalysisBuilder/utils/queryUtils.d.ts +6 -1
  96. package/dist/cjs/client/components/analyticsPortlet/usePortletQueryResults.d.ts +3 -1
  97. package/dist/cjs/client/hooks/queries/useCubeLoadQuery.d.ts +7 -0
  98. package/dist/cjs/client/hooks/queries/useMultiCubeLoadQuery.d.ts +7 -0
  99. package/dist/cjs/client/hooks/useAnalysisQuery.d.ts +6 -1
  100. package/dist/cjs/client/index.d.ts +2 -0
  101. package/dist/cjs/client/types.d.ts +5 -0
  102. package/dist/cjs/client/utils/gapFilling.d.ts +52 -0
  103. package/dist/cjs/client/utils/index.d.ts +1 -0
  104. package/dist/cjs/server/ai/query-schema.d.ts +1 -1
  105. package/dist/cjs/server/execution/result-post-processor.d.ts +4 -2
  106. package/dist/cjs/server/executor.d.ts +2 -0
  107. package/dist/cjs/server/gap-filler.d.ts +8 -43
  108. package/dist/cjs/server/types/core.d.ts +2 -0
  109. package/dist/cjs/server/types/cube.d.ts +12 -0
  110. package/dist/cjs/server/types/metadata.d.ts +5 -0
  111. package/dist/cjs/server/types/query.d.ts +2 -1
  112. package/dist/client/charts/chartConfigHelpers.d.ts +5 -0
  113. package/dist/client/charts.js +12 -12
  114. package/dist/client/chunks/{DashboardEditModal-5ZSP--FQ.js → DashboardEditModal-DifODH4h.js} +2360 -2548
  115. package/dist/client/chunks/DashboardEditModal-DifODH4h.js.map +1 -0
  116. package/dist/client/chunks/{DotStripChart-DTukhwG-.js → DotStripChart-B9IVCFPO.js} +3 -3
  117. package/dist/client/chunks/{DotStripChart-DTukhwG-.js.map → DotStripChart-B9IVCFPO.js.map} +1 -1
  118. package/dist/client/chunks/{ProportionBarChart-CPZ2cHxH.js → ProportionBarChart-DieF9AzP.js} +3 -3
  119. package/dist/client/chunks/{ProportionBarChart-CPZ2cHxH.js.map → ProportionBarChart-DieF9AzP.js.map} +1 -1
  120. package/dist/client/chunks/{RecordsTable-BC5l67Dc.js → RecordsTable-Mo3ai5_M.js} +4 -4
  121. package/dist/client/chunks/{RecordsTable-BC5l67Dc.js.map → RecordsTable-Mo3ai5_M.js.map} +1 -1
  122. package/dist/client/chunks/{RetentionCombinedChart-aj5xblfu.js → RetentionCombinedChart-Bie4ADyA.js} +3 -3
  123. package/dist/client/chunks/{RetentionCombinedChart-aj5xblfu.js.map → RetentionCombinedChart-Bie4ADyA.js.map} +1 -1
  124. package/dist/client/chunks/{RetentionHeatmap-CKckuEMF.js → RetentionHeatmap-qstIAx5B.js} +2 -2
  125. package/dist/client/chunks/{RetentionHeatmap-CKckuEMF.js.map → RetentionHeatmap-qstIAx5B.js.map} +1 -1
  126. package/dist/client/chunks/{analysis-builder-Db4umQtd.js → analysis-builder-D78aDJoL.js} +41 -41
  127. package/dist/client/chunks/analysis-builder-D78aDJoL.js.map +1 -0
  128. package/dist/client/chunks/{analysis-builder-shared-BEvvX6ln.js → analysis-builder-shared-CsIs4-Xf.js} +538 -523
  129. package/dist/client/chunks/analysis-builder-shared-CsIs4-Xf.js.map +1 -0
  130. package/dist/client/chunks/{chart-activity-grid-Bbc58UJD.js → chart-activity-grid-Ly_-2B-f.js} +7 -2
  131. package/dist/client/chunks/chart-activity-grid-Ly_-2B-f.js.map +1 -0
  132. package/dist/client/chunks/{chart-area-9uCXIvMN.js → chart-area-D3l-71Wy.js} +2 -2
  133. package/dist/client/chunks/{chart-area-9uCXIvMN.js.map → chart-area-D3l-71Wy.js.map} +1 -1
  134. package/dist/client/chunks/{chart-bar-C5a1T9Ce.js → chart-bar-BaTyQOqs.js} +3 -3
  135. package/dist/client/chunks/{chart-bar-C5a1T9Ce.js.map → chart-bar-BaTyQOqs.js.map} +1 -1
  136. package/dist/client/chunks/{chart-box-plot-BbBrZsaJ.js → chart-box-plot-Cem6PHjz.js} +2 -2
  137. package/dist/client/chunks/{chart-box-plot-BbBrZsaJ.js.map → chart-box-plot-Cem6PHjz.js.map} +1 -1
  138. package/dist/client/chunks/{chart-bubble-dt5ESb7m.js → chart-bubble-DFlfqCDG.js} +2 -2
  139. package/dist/client/chunks/{chart-bubble-dt5ESb7m.js.map → chart-bubble-DFlfqCDG.js.map} +1 -1
  140. package/dist/client/chunks/{chart-candlestick-2A2J_NsK.js → chart-candlestick-BkAFBXtZ.js} +2 -2
  141. package/dist/client/chunks/{chart-candlestick-2A2J_NsK.js.map → chart-candlestick-BkAFBXtZ.js.map} +1 -1
  142. package/dist/client/chunks/{chart-config-area-DsrZCIwF.js → chart-config-area-BnsRQ-MY.js} +35 -14
  143. package/dist/client/chunks/chart-config-area-BnsRQ-MY.js.map +1 -0
  144. package/dist/client/chunks/{chart-config-bar-BixSs43E.js → chart-config-bar-G2HJJBVV.js} +8 -7
  145. package/dist/client/chunks/chart-config-bar-G2HJJBVV.js.map +1 -0
  146. package/dist/client/chunks/{chart-config-kpi-delta-Cl7k6jTj.js → chart-config-kpi-delta-BIAq1Ftg.js} +2 -2
  147. package/dist/client/chunks/{chart-config-kpi-delta-Cl7k6jTj.js.map → chart-config-kpi-delta-BIAq1Ftg.js.map} +1 -1
  148. package/dist/client/chunks/{chart-config-kpi-number-DCcnANWC.js → chart-config-kpi-number-Dgc4gIYu.js} +2 -2
  149. package/dist/client/chunks/{chart-config-kpi-number-DCcnANWC.js.map → chart-config-kpi-number-Dgc4gIYu.js.map} +1 -1
  150. package/dist/client/chunks/{chart-config-line-CBF9Px9b.js → chart-config-line-DLkRs1Zr.js} +9 -8
  151. package/dist/client/chunks/chart-config-line-DLkRs1Zr.js.map +1 -0
  152. package/dist/client/chunks/{chart-config-pie-DZLa6Eqm.js → chart-config-pie-XrHim0C8.js} +2 -2
  153. package/dist/client/chunks/{chart-config-pie-DZLa6Eqm.js.map → chart-config-pie-XrHim0C8.js.map} +1 -1
  154. package/dist/client/chunks/{chart-config-radar-DR6vHHyd.js → chart-config-radar-xNS6Juqc.js} +2 -2
  155. package/dist/client/chunks/{chart-config-radar-DR6vHHyd.js.map → chart-config-radar-xNS6Juqc.js.map} +1 -1
  156. package/dist/client/chunks/{chart-config-radial-bar-DVFou4fB.js → chart-config-radial-bar-ChUChsEe.js} +2 -2
  157. package/dist/client/chunks/{chart-config-radial-bar-DVFou4fB.js.map → chart-config-radial-bar-ChUChsEe.js.map} +1 -1
  158. package/dist/client/chunks/{chart-config-tree-map-Uhise6Bx.js → chart-config-tree-map-CnrJ7OC1.js} +2 -2
  159. package/dist/client/chunks/{chart-config-tree-map-Uhise6Bx.js.map → chart-config-tree-map-CnrJ7OC1.js.map} +1 -1
  160. package/dist/client/chunks/{chart-data-table-zSjYEy0r.js → chart-data-table-Cxd0cdAl.js} +36 -36
  161. package/dist/client/chunks/{chart-data-table-zSjYEy0r.js.map → chart-data-table-Cxd0cdAl.js.map} +1 -1
  162. package/dist/client/chunks/{chart-funnel-CuOSCsbt.js → chart-funnel-71Kn4eeF.js} +2 -2
  163. package/dist/client/chunks/{chart-funnel-CuOSCsbt.js.map → chart-funnel-71Kn4eeF.js.map} +1 -1
  164. package/dist/client/chunks/{chart-gauge-DxKeqCCD.js → chart-gauge-BddS_9oS.js} +3 -3
  165. package/dist/client/chunks/{chart-gauge-DxKeqCCD.js.map → chart-gauge-BddS_9oS.js.map} +1 -1
  166. package/dist/client/chunks/{chart-heat-map-C1dvW-ov.js → chart-heat-map-BQIsrn8m.js} +3 -3
  167. package/dist/client/chunks/{chart-heat-map-C1dvW-ov.js.map → chart-heat-map-BQIsrn8m.js.map} +1 -1
  168. package/dist/client/chunks/{chart-kpi-delta-CgehGc9d.js → chart-kpi-delta-DndbqdZT.js} +3 -3
  169. package/dist/client/chunks/{chart-kpi-delta-CgehGc9d.js.map → chart-kpi-delta-DndbqdZT.js.map} +1 -1
  170. package/dist/client/chunks/{chart-kpi-number-C31-6A6m.js → chart-kpi-number-DAbfoHMt.js} +5 -5
  171. package/dist/client/chunks/{chart-kpi-number-C31-6A6m.js.map → chart-kpi-number-DAbfoHMt.js.map} +1 -1
  172. package/dist/client/chunks/{chart-kpi-text-D2ydQIEn.js → chart-kpi-text-D8oQgpxL.js} +3 -3
  173. package/dist/client/chunks/{chart-kpi-text-D2ydQIEn.js.map → chart-kpi-text-D8oQgpxL.js.map} +1 -1
  174. package/dist/client/chunks/{chart-line-CjW9Yo03.js → chart-line-BNqjUowg.js} +3 -3
  175. package/dist/client/chunks/{chart-line-CjW9Yo03.js.map → chart-line-BNqjUowg.js.map} +1 -1
  176. package/dist/client/chunks/{chart-markdown-Cgs62had.js → chart-markdown-DtgpU3xd.js} +2 -2
  177. package/dist/client/chunks/{chart-markdown-Cgs62had.js.map → chart-markdown-DtgpU3xd.js.map} +1 -1
  178. package/dist/client/chunks/{chart-measure-profile-Cg39gYjR.js → chart-measure-profile-D5nZMWlI.js} +3 -3
  179. package/dist/client/chunks/{chart-measure-profile-Cg39gYjR.js.map → chart-measure-profile-D5nZMWlI.js.map} +1 -1
  180. package/dist/client/chunks/{chart-pie-BTb5nKd7.js → chart-pie-D8r9HCZ4.js} +3 -3
  181. package/dist/client/chunks/{chart-pie-BTb5nKd7.js.map → chart-pie-D8r9HCZ4.js.map} +1 -1
  182. package/dist/client/chunks/{chart-radar-8384sPlX.js → chart-radar-R4PuCIWp.js} +3 -3
  183. package/dist/client/chunks/{chart-radar-8384sPlX.js.map → chart-radar-R4PuCIWp.js.map} +1 -1
  184. package/dist/client/chunks/{chart-radial-bar-CuBmmOTU.js → chart-radial-bar-hmrSFa6O.js} +3 -3
  185. package/dist/client/chunks/{chart-radial-bar-CuBmmOTU.js.map → chart-radial-bar-hmrSFa6O.js.map} +1 -1
  186. package/dist/client/chunks/{chart-sankey-CoIuG7Nu.js → chart-sankey-CFXPybny.js} +2 -2
  187. package/dist/client/chunks/{chart-sankey-CoIuG7Nu.js.map → chart-sankey-CFXPybny.js.map} +1 -1
  188. package/dist/client/chunks/{chart-scatter-Bdj95OeV.js → chart-scatter-CH82md0L.js} +3 -3
  189. package/dist/client/chunks/{chart-scatter-Bdj95OeV.js.map → chart-scatter-CH82md0L.js.map} +1 -1
  190. package/dist/client/chunks/{chart-sunburst-CuG8520_.js → chart-sunburst-CTj95eEC.js} +3 -3
  191. package/dist/client/chunks/{chart-sunburst-CuG8520_.js.map → chart-sunburst-CTj95eEC.js.map} +1 -1
  192. package/dist/client/chunks/{chart-tree-map-CtJADX87.js → chart-tree-map-CmysE4bF.js} +3 -3
  193. package/dist/client/chunks/{chart-tree-map-CtJADX87.js.map → chart-tree-map-CmysE4bF.js.map} +1 -1
  194. package/dist/client/chunks/{chart-waterfall-D430fO48.js → chart-waterfall-Bv1mPvlB.js} +3 -3
  195. package/dist/client/chunks/{chart-waterfall-D430fO48.js.map → chart-waterfall-Bv1mPvlB.js.map} +1 -1
  196. package/dist/client/chunks/{charts-core-BSmlKmf0.js → charts-core-BdEQgbqN.js} +2 -2
  197. package/dist/client/chunks/{charts-core-BSmlKmf0.js.map → charts-core-BdEQgbqN.js.map} +1 -1
  198. package/dist/client/chunks/charts-loader-DoLQqFXg.js +87 -0
  199. package/dist/client/chunks/{charts-loader-Bz9yHkW1.js.map → charts-loader-DoLQqFXg.js.map} +1 -1
  200. package/dist/client/chunks/gapFilling-DKBRHcQL.js +391 -0
  201. package/dist/client/chunks/gapFilling-DKBRHcQL.js.map +1 -0
  202. package/dist/client/chunks/{nl-NL-BrqrWoAj.js → nl-NL-DVZXf8U7.js} +6 -1
  203. package/dist/client/chunks/nl-NL-DVZXf8U7.js.map +1 -0
  204. package/dist/client/chunks/{schema-visualization-D2NvjQny.js → schema-visualization-MlRrcJQH.js} +3 -3
  205. package/dist/client/chunks/{schema-visualization-D2NvjQny.js.map → schema-visualization-MlRrcJQH.js.map} +1 -1
  206. package/dist/client/chunks/{useDirtyStateTracking-DL_AnCWZ.js → useDirtyStateTracking-DUyYwuN_.js} +318 -293
  207. package/dist/client/chunks/useDirtyStateTracking-DUyYwuN_.js.map +1 -0
  208. package/dist/client/chunks/{useExplainAI-CdPWtj7E.js → useExplainAI-BtoS3tb5.js} +4 -4
  209. package/dist/client/chunks/{useExplainAI-CdPWtj7E.js.map → useExplainAI-BtoS3tb5.js.map} +1 -1
  210. package/dist/client/chunks/utils-CToHkuhU.js.map +1 -1
  211. package/dist/client/chunks/{vendor-Bpaolt6h.js → vendor-BfBpNmMa.js} +2 -2
  212. package/dist/client/chunks/{vendor-Bpaolt6h.js.map → vendor-BfBpNmMa.js.map} +1 -1
  213. package/dist/client/components/AnalysisBuilder/types.d.ts +4 -0
  214. package/dist/client/components/AnalysisBuilder/utils/queryUtils.d.ts +6 -1
  215. package/dist/client/components/analyticsPortlet/usePortletQueryResults.d.ts +3 -1
  216. package/dist/client/components.js +2 -2
  217. package/dist/client/hooks/queries/useCubeLoadQuery.d.ts +7 -0
  218. package/dist/client/hooks/queries/useMultiCubeLoadQuery.d.ts +7 -0
  219. package/dist/client/hooks/useAnalysisQuery.d.ts +6 -1
  220. package/dist/client/hooks.js +3 -3
  221. package/dist/client/icons.js +1 -1
  222. package/dist/client/index.d.ts +2 -0
  223. package/dist/client/index.js +193 -192
  224. package/dist/client/index.js.map +1 -1
  225. package/dist/client/providers.js +1 -1
  226. package/dist/client/schema.js +1 -1
  227. package/dist/client/types.d.ts +5 -0
  228. package/dist/client/utils/gapFilling.d.ts +52 -0
  229. package/dist/client/utils/index.d.ts +1 -0
  230. package/dist/client/utils.js +9 -8
  231. package/dist/client/utils.js.map +1 -1
  232. package/dist/client-bundle-stats.html +1 -1
  233. package/dist/mcp-app/mcp-app.html +101 -101
  234. package/dist/server/ai/query-schema.d.ts +1 -1
  235. package/dist/server/chartConfigHelpers-BhME7ow_.cjs +1 -0
  236. package/dist/server/{chartConfigHelpers-BsnbxA2c.js → chartConfigHelpers-BsviVhEw.js} +27 -7
  237. package/dist/server/execution/result-post-processor.d.ts +4 -2
  238. package/dist/server/executor.d.ts +2 -0
  239. package/dist/server/gap-filler.d.ts +8 -43
  240. package/dist/server/index.cjs +34 -34
  241. package/dist/server/index.js +2049 -2030
  242. package/dist/server/types/core.d.ts +2 -0
  243. package/dist/server/types/cube.d.ts +12 -0
  244. package/dist/server/types/metadata.d.ts +5 -0
  245. package/dist/server/types/query.d.ts +2 -1
  246. package/package.json +1 -1
  247. package/dist/adapters/ActivityGridChart.config-BpGv0FYq.js +0 -2
  248. package/dist/adapters/ActivityGridChart.config-DWs9dRl7.cjs +0 -1
  249. package/dist/adapters/AreaChart.config-Cn8nAQqj.cjs +0 -1
  250. package/dist/adapters/AreaChart.config-NDMkAi9w.js +0 -2
  251. package/dist/adapters/BarChart.config-CuGCupRX.cjs +0 -1
  252. package/dist/adapters/BarChart.config-D4Ct_ZuS.js +0 -2
  253. package/dist/adapters/BoxPlotChart.config-BEHZDgrz.js +0 -2
  254. package/dist/adapters/BoxPlotChart.config-DnC3xk7q.cjs +0 -1
  255. package/dist/adapters/BubbleChart.config-D0ouKOKS.cjs +0 -1
  256. package/dist/adapters/BubbleChart.config-Du8aEfdQ.js +0 -2
  257. package/dist/adapters/CandlestickChart.config-B0B6dKYG.cjs +0 -1
  258. package/dist/adapters/CandlestickChart.config-DBilZaFc.js +0 -2
  259. package/dist/adapters/DataTable.config-BXalzUPO.cjs +0 -1
  260. package/dist/adapters/DataTable.config-CF8BzQHu.js +0 -2
  261. package/dist/adapters/DotStripChart.config-0ggseDij.cjs +0 -1
  262. package/dist/adapters/DotStripChart.config-CfHh0XSW.js +0 -2
  263. package/dist/adapters/FunnelChart.config-AcSpen_Q.js +0 -2
  264. package/dist/adapters/FunnelChart.config-D6k89qDc.cjs +0 -1
  265. package/dist/adapters/GaugeChart.config-B5BcrEvW.cjs +0 -1
  266. package/dist/adapters/GaugeChart.config-BChbha74.js +0 -2
  267. package/dist/adapters/HeatMapChart.config-BgkP8kiW.js +0 -2
  268. package/dist/adapters/HeatMapChart.config-Crq7vBwj.cjs +0 -1
  269. package/dist/adapters/KpiDelta.config-Cqu1WOkV.js +0 -2
  270. package/dist/adapters/KpiDelta.config-edWLG1bM.cjs +0 -1
  271. package/dist/adapters/KpiNumber.config-BLkE67us.cjs +0 -1
  272. package/dist/adapters/KpiNumber.config-DNsH72Rs.js +0 -2
  273. package/dist/adapters/KpiText.config-CAnLZYht.cjs +0 -1
  274. package/dist/adapters/KpiText.config-CQGd10Hj.js +0 -2
  275. package/dist/adapters/LineChart.config-C7l_xff-.js +0 -2
  276. package/dist/adapters/LineChart.config-DOxwtnfG.cjs +0 -1
  277. package/dist/adapters/MarkdownChart.config-BV5j1oJl.cjs +0 -1
  278. package/dist/adapters/MarkdownChart.config-CBkJAEpW.js +0 -2
  279. package/dist/adapters/MeasureProfileChart.config-CyyFz-x_.cjs +0 -1
  280. package/dist/adapters/MeasureProfileChart.config-VIvr7lq6.js +0 -2
  281. package/dist/adapters/PieChart.config-BP8OlSJ4.js +0 -2
  282. package/dist/adapters/PieChart.config-BaMxIlBa.cjs +0 -1
  283. package/dist/adapters/ProportionBarChart.config-CtZaP8Xn.js +0 -2
  284. package/dist/adapters/ProportionBarChart.config-DAyEQ8Pn.cjs +0 -1
  285. package/dist/adapters/RadarChart.config-CG07QZUT.cjs +0 -1
  286. package/dist/adapters/RadarChart.config-DJJuD-Tb.js +0 -2
  287. package/dist/adapters/RadialBarChart.config-BNgzWkot.cjs +0 -1
  288. package/dist/adapters/RadialBarChart.config-DVM_jg9B.js +0 -2
  289. package/dist/adapters/RecordsTable.config-BEQmKQ-S.cjs +0 -1
  290. package/dist/adapters/RecordsTable.config-d4s8HV9m.js +0 -2
  291. package/dist/adapters/RetentionCombinedChart.config-DJ4N-ffd.cjs +0 -1
  292. package/dist/adapters/RetentionCombinedChart.config-DV1h3rW2.js +0 -2
  293. package/dist/adapters/RetentionHeatmap.config-CIJDenRg.cjs +0 -1
  294. package/dist/adapters/RetentionHeatmap.config-P3VVn3QJ.js +0 -2
  295. package/dist/adapters/SankeyChart.config-CQ89DYf7.cjs +0 -1
  296. package/dist/adapters/SankeyChart.config-CfMmdmXJ.js +0 -2
  297. package/dist/adapters/ScatterChart.config-C4zrFpF-.cjs +0 -1
  298. package/dist/adapters/ScatterChart.config-DaJ3LVWH.js +0 -2
  299. package/dist/adapters/SunburstChart.config-1ZRhfGr0.cjs +0 -1
  300. package/dist/adapters/SunburstChart.config-DHgrSIkQ.js +0 -2
  301. package/dist/adapters/TreeMapChart.config-Cy3sAsJP.js +0 -2
  302. package/dist/adapters/TreeMapChart.config-D365WWEK.cjs +0 -1
  303. package/dist/adapters/WaterfallChart.config-DYEf1vQT.js +0 -2
  304. package/dist/adapters/WaterfallChart.config-s8pICbm8.cjs +0 -1
  305. package/dist/adapters/chartConfigHelpers-BZMu_1EP.cjs +0 -1
  306. package/dist/adapters/handler-B78akmC_.cjs +0 -16
  307. package/dist/adapters/mcp-app-html-C1fEW5oE.js +0 -5
  308. package/dist/adapters/mcp-app-html-CGk4ubE0.cjs +0 -1
  309. package/dist/client/chunks/DashboardEditModal-5ZSP--FQ.js.map +0 -1
  310. package/dist/client/chunks/analysis-builder-Db4umQtd.js.map +0 -1
  311. package/dist/client/chunks/analysis-builder-shared-BEvvX6ln.js.map +0 -1
  312. package/dist/client/chunks/chart-activity-grid-Bbc58UJD.js.map +0 -1
  313. package/dist/client/chunks/chart-config-area-DsrZCIwF.js.map +0 -1
  314. package/dist/client/chunks/chart-config-bar-BixSs43E.js.map +0 -1
  315. package/dist/client/chunks/chart-config-line-CBF9Px9b.js.map +0 -1
  316. package/dist/client/chunks/charts-loader-Bz9yHkW1.js +0 -87
  317. package/dist/client/chunks/nl-NL-BrqrWoAj.js.map +0 -1
  318. package/dist/client/chunks/useDirtyStateTracking-DL_AnCWZ.js.map +0 -1
  319. package/dist/server/chartConfigHelpers-BZMu_1EP.cjs +0 -1
@@ -1,37 +1,38 @@
1
- import { A as e, B as t, W as n, ct as r } from "./chart-data-table-zSjYEy0r.js";
2
- import { n as i } from "./chart-sankey-CoIuG7Nu.js";
3
- import { i as a, l as o } from "./chart-funnel-CuOSCsbt.js";
4
- import { useCallback as s, useEffect as c, useMemo as l, useRef as u, useState as d } from "react";
1
+ import { A as e, B as t, W as n, ct as r } from "./chart-data-table-Cxd0cdAl.js";
2
+ import { n as i } from "./chart-sankey-CFXPybny.js";
3
+ import { n as a } from "./gapFilling-DKBRHcQL.js";
4
+ import { i as o, l as s } from "./chart-funnel-71Kn4eeF.js";
5
+ import { useCallback as c, useEffect as l, useMemo as u, useRef as d, useState as f } from "react";
5
6
  //#region src/client/shared/queryTransforms.ts
6
- function f(e) {
7
+ function p(e) {
7
8
  let t = {};
8
- return e.measures && e.measures.length > 0 && (t.measures = e.measures), e.dimensions && e.dimensions.length > 0 && (t.dimensions = e.dimensions), e.timeDimensions && e.timeDimensions.length > 0 && (t.timeDimensions = e.timeDimensions), e.filters && e.filters.length > 0 && (t.filters = e.filters), e.order && (t.order = e.order), e.limit && (t.limit = e.limit), e.offset && (t.offset = e.offset), e.segments && e.segments.length > 0 && (t.segments = e.segments), t;
9
+ return e.measures && e.measures.length > 0 && (t.measures = e.measures), e.dimensions && e.dimensions.length > 0 && (t.dimensions = e.dimensions), e.timeDimensions && e.timeDimensions.length > 0 && (t.timeDimensions = e.timeDimensions), e.filters && e.filters.length > 0 && (t.filters = e.filters), e.order && (t.order = e.order), e.limit && (t.limit = e.limit), e.offset && (t.offset = e.offset), e.total && (t.total = e.total), e.ungrouped && (t.ungrouped = e.ungrouped), e.segments && e.segments.length > 0 && (t.segments = e.segments), e.fillMissingDatesValue !== void 0 && (t.fillMissingDatesValue = e.fillMissingDatesValue), t;
9
10
  }
10
11
  //#endregion
11
12
  //#region src/client/shared/filters/filterOperations.ts
12
- function p(e) {
13
+ function m(e) {
13
14
  return "member" in e && "operator" in e;
14
15
  }
15
- function m(e) {
16
+ function h(e) {
16
17
  return "type" in e && "filters" in e;
17
18
  }
18
- function h(e) {
19
+ function g(e) {
19
20
  let t = 0, n = (e) => {
20
- p(e) ? t++ : m(e) && e.filters.forEach(n);
21
+ m(e) ? t++ : h(e) && e.filters.forEach(n);
21
22
  };
22
23
  return e.forEach(n), t;
23
24
  }
24
- function g(e) {
25
+ function _(e) {
25
26
  let t = [], n = (e) => {
26
- p(e) ? t.push(e.member) : m(e) && e.filters.forEach(n);
27
+ m(e) ? t.push(e.member) : h(e) && e.filters.forEach(n);
27
28
  };
28
29
  return e.forEach(n), t;
29
30
  }
30
- function _(e, t, n) {
31
- if (t.length === 0) return e.length === 0 ? [n] : e.length === 1 && p(e[0]) ? [{
31
+ function v(e, t, n) {
32
+ if (t.length === 0) return e.length === 0 ? [n] : e.length === 1 && m(e[0]) ? [{
32
33
  type: "and",
33
34
  filters: [e[0], n]
34
- }] : e.length === 1 && m(e[0]) ? [{
35
+ }] : e.length === 1 && h(e[0]) ? [{
35
36
  ...e[0],
36
37
  filters: [...e[0].filters, n]
37
38
  }] : [{
@@ -39,50 +40,50 @@ function _(e, t, n) {
39
40
  filters: [...e, n]
40
41
  }];
41
42
  let [r, ...i] = t, a = [...e], o = a[r];
42
- return m(o) && (a[r] = i.length === 0 ? {
43
+ return h(o) && (a[r] = i.length === 0 ? {
43
44
  ...o,
44
45
  filters: [...o.filters, n]
45
46
  } : {
46
47
  ...o,
47
- filters: _(o.filters, i, n)
48
+ filters: v(o.filters, i, n)
48
49
  }), a;
49
50
  }
50
- function v(e, t) {
51
+ function y(e, t) {
51
52
  let n = e.filter((e, n) => n !== t);
52
- if (n.length === 1 && m(n[0])) {
53
+ if (n.length === 1 && h(n[0])) {
53
54
  let e = n[0];
54
55
  if (e.filters.length === 1) return [e.filters[0]];
55
56
  }
56
57
  return n;
57
58
  }
58
- function y(e) {
59
+ function b(e) {
59
60
  return {
60
61
  ...e,
61
62
  type: e.type === "and" ? "or" : "and"
62
63
  };
63
64
  }
64
- function b(e, t) {
65
- for (let n of e) if (m(n)) {
66
- let e = b(n.filters, t);
65
+ function x(e, t) {
66
+ for (let n of e) if (h(n)) {
67
+ let e = x(n.filters, t);
67
68
  if (e) return e;
68
- } else if (p(n) && n.member === t && n.operator === "inDateRange" && n.dateRange) return { dateRange: n.dateRange };
69
+ } else if (m(n) && n.member === t && n.operator === "inDateRange" && n.dateRange) return { dateRange: n.dateRange };
69
70
  }
70
- function x(e, t, n) {
71
+ function S(e, t, n) {
71
72
  return e.reduce((e, r) => {
72
- if (m(r)) {
73
- let i = x(r.filters, t, n);
73
+ if (h(r)) {
74
+ let i = S(r.filters, t, n);
74
75
  i.length > 0 && e.push({
75
76
  type: r.type,
76
77
  filters: i
77
78
  });
78
- } else p(r) ? (r.member !== t || n !== void 0 && r.operator !== n) && e.push(r) : e.push(r);
79
+ } else m(r) ? (r.member !== t || n !== void 0 && r.operator !== n) && e.push(r) : e.push(r);
79
80
  return e;
80
81
  }, []);
81
82
  }
82
- function S(e) {
83
+ function C(e) {
83
84
  let t = (e) => {
84
- if (p(e)) return e;
85
- if (m(e)) {
85
+ if (m(e)) return e;
86
+ if (h(e)) {
86
87
  let n = e.filters.map(t);
87
88
  return e.type === "and" ? { and: n } : { or: n };
88
89
  }
@@ -92,11 +93,11 @@ function S(e) {
92
93
  }
93
94
  //#endregion
94
95
  //#region src/client/shared/utils.ts
95
- function C(e) {
96
- let t = f(e);
97
- return t.filters && t.filters.length > 0 && (t.filters = S(t.filters)), t;
96
+ function w(e) {
97
+ let t = p(e);
98
+ return t.filters && t.filters.length > 0 && (t.filters = C(t.filters)), t;
98
99
  }
99
- function w(e, t) {
100
+ function T(e, t) {
100
101
  let n = {
101
102
  today: "today",
102
103
  yesterday: "yesterday",
@@ -118,15 +119,15 @@ function w(e, t) {
118
119
  }
119
120
  return n[e] || e;
120
121
  }
121
- function T(e) {
122
+ function E(e) {
122
123
  return e.startsWith("last_n_");
123
124
  }
124
- function E(e) {
125
+ function D(e) {
125
126
  return e.toISOString().split("T")[0];
126
127
  }
127
128
  //#endregion
128
129
  //#region src/client/shared/queryKey.ts
129
- function D(e) {
130
+ function O(e) {
130
131
  let t = /* @__PURE__ */ new WeakSet(), n = (e) => {
131
132
  if (typeof e != "object" || !e) return JSON.stringify(e);
132
133
  if (t.has(e)) return "\"[Circular]\"";
@@ -138,13 +139,13 @@ function D(e) {
138
139
  }
139
140
  //#endregion
140
141
  //#region src/client/hooks/useDebounceQuery.ts
141
- function O(e, t) {
142
- let { isValid: n, skip: r = !1, debounceMs: i = 300 } = t, [a, o] = d(null), [s, f] = d(!1), p = u(null), m = u(""), h = u(r), g = l(() => e ? D(e) : "", [e]);
143
- return c(() => {
142
+ function k(e, t) {
143
+ let { isValid: n, skip: r = !1, debounceMs: i = 300 } = t, [a, o] = f(null), [s, c] = f(!1), p = d(null), m = d(""), h = d(r), g = u(() => e ? O(e) : "", [e]);
144
+ return l(() => {
144
145
  let t = h.current && !r;
145
- if (h.current = r, g !== m.current || t) return p.current && clearTimeout(p.current), n && !r ? (f(!0), p.current = setTimeout(() => {
146
- m.current = g, o(e), f(!1);
147
- }, i)) : (m.current = g, o(null), f(!1)), () => {
146
+ if (h.current = r, g !== m.current || t) return p.current && clearTimeout(p.current), n && !r ? (c(!0), p.current = setTimeout(() => {
147
+ m.current = g, o(e), c(!1);
148
+ }, i)) : (m.current = g, o(null), c(!1)), () => {
148
149
  p.current && clearTimeout(p.current);
149
150
  };
150
151
  }, [
@@ -160,111 +161,115 @@ function O(e, t) {
160
161
  }
161
162
  //#endregion
162
163
  //#region src/client/hooks/queries/useCubeLoadQuery.ts
163
- var k = 300;
164
- function A(e) {
164
+ var A = 300;
165
+ function j(e) {
165
166
  return e ? [
166
167
  "cube",
167
168
  "load",
168
- D(e)
169
+ O(e)
169
170
  ] : [
170
171
  "cube",
171
172
  "load",
172
173
  null
173
174
  ];
174
175
  }
175
- function j(e) {
176
+ function M(e) {
176
177
  return e ? !!(e.measures && e.measures.length > 0) || !!(e.dimensions && e.dimensions.length > 0) || !!(e.timeDimensions && e.timeDimensions.length > 0) : !1;
177
178
  }
178
- function M(i, a = {}) {
179
- let { skip: o = !1, debounceMs: f = k, resetResultSetOnChange: p = !0, staleTime: m = 6e4, keepPreviousData: h = !0 } = a, { cubeApi: g, batchCoordinator: _, enableBatching: v } = t(), y = r(), { features: b } = e(), x = b.manualRefresh ?? !1, [S, w] = d(null), T = j(i), { debouncedValue: E, isDebouncing: M } = O(i, {
180
- isValid: T,
181
- skip: o,
182
- debounceMs: f
183
- }), N = l(() => E ? C(E) : null, [E]), P = N ? D(N) : null, F = l(() => !x || !P || S === null ? !1 : P !== S, [
184
- x,
185
- P,
186
- S
187
- ]), I = l(() => !N || o ? !1 : !x || S === null || S === P, [
188
- N,
189
- o,
190
- x,
191
- S,
192
- P
193
- ]), L = u(!1), R = n({
194
- queryKey: A(N),
179
+ function N(i, o = {}) {
180
+ let { skip: s = !1, debounceMs: p = A, resetResultSetOnChange: m = !0, staleTime: h = 6e4, keepPreviousData: g = !0, gapFill: _ } = o, v = !!_, y = _?.fillMissingDates, { cubeApi: b, batchCoordinator: x, enableBatching: S } = t(), C = r(), { features: T } = e(), E = T.manualRefresh ?? !1, [D, N] = f(null), P = M(i), { debouncedValue: F, isDebouncing: I } = k(i, {
181
+ isValid: P,
182
+ skip: s,
183
+ debounceMs: p
184
+ }), L = u(() => F ? w(F) : null, [F]), R = L ? O(L) : null, z = u(() => !E || !R || D === null ? !1 : R !== D, [
185
+ E,
186
+ R,
187
+ D
188
+ ]), B = u(() => !L || s ? !1 : !E || D === null || D === R, [
189
+ L,
190
+ s,
191
+ E,
192
+ D,
193
+ R
194
+ ]), V = d(!1), H = n({
195
+ queryKey: j(L),
195
196
  queryFn: async () => {
196
- if (!N) throw Error("No query provided");
197
- let e = L.current;
198
- return L.current = !1, e ? g.load(N, { bustCache: !0 }) : v && _ ? _.register(N) : g.load(N);
197
+ if (!L) throw Error("No query provided");
198
+ let e = V.current;
199
+ return V.current = !1, e ? b.load(L, { bustCache: !0 }) : S && x ? x.register(L) : b.load(L);
199
200
  },
200
- enabled: I,
201
- staleTime: m,
202
- placeholderData: h ? (e) => e : void 0
201
+ enabled: B,
202
+ staleTime: h,
203
+ placeholderData: g ? (e) => e : void 0
203
204
  });
204
- c(() => {
205
- !x && N && !o && w(P);
205
+ l(() => {
206
+ !E && L && !s && N(R);
206
207
  }, [
207
- x,
208
- N,
209
- o,
210
- P
211
- ]), c(() => {
212
- x && I && R.isSuccess && !R.isFetching && N && w(P);
208
+ E,
209
+ L,
210
+ s,
211
+ R
212
+ ]), l(() => {
213
+ E && B && H.isSuccess && !H.isFetching && L && N(R);
213
214
  }, [
214
- x,
215
- I,
216
- R.isSuccess,
217
- R.isFetching,
218
- N,
219
- P
215
+ E,
216
+ B,
217
+ H.isSuccess,
218
+ H.isFetching,
219
+ L,
220
+ R
220
221
  ]);
221
- let z = l(() => {
222
- if (!R.data) return null;
222
+ let U = u(() => H.data ? v ? a(H.data, { fillMissingDates: y }) : H.data : null, [
223
+ H.data,
224
+ v,
225
+ y
226
+ ]), W = u(() => {
227
+ if (!U) return null;
223
228
  try {
224
- return R.data.rawData();
229
+ return U.rawData();
225
230
  } catch {
226
231
  return null;
227
232
  }
228
- }, [R.data]), B = l(() => {
229
- if (!R.data?.loadResponse) return;
230
- let e = R.data.loadResponse;
233
+ }, [U]), G = u(() => {
234
+ if (!H.data?.loadResponse) return;
235
+ let e = H.data.loadResponse;
231
236
  return e.results && e.results[0]?.warnings ? e.results[0].warnings : e.warnings;
232
- }, [R.data]), V = s((e) => {
233
- N && (w(P), e?.bustCache && (L.current = !0), y.invalidateQueries({ queryKey: A(N) }));
237
+ }, [H.data]), K = c((e) => {
238
+ L && (N(R), e?.bustCache && (V.current = !0), C.invalidateQueries({ queryKey: j(L) }));
234
239
  }, [
235
- N,
236
- P,
237
- y
238
- ]), H = V;
240
+ L,
241
+ R,
242
+ C
243
+ ]), q = K;
239
244
  return {
240
- resultSet: l(() => R.data ?? null, [
241
- R.data,
242
- M,
243
- p
245
+ resultSet: u(() => U, [
246
+ U,
247
+ I,
248
+ m
244
249
  ]),
245
- rawData: z,
246
- isLoading: R.isLoading || M,
247
- isFetching: R.isFetching,
248
- isDebouncing: M,
249
- error: R.error,
250
- debouncedQuery: E,
251
- isValidQuery: T,
252
- refetch: H,
250
+ rawData: W,
251
+ isLoading: H.isLoading || I,
252
+ isFetching: H.isFetching,
253
+ isDebouncing: I,
254
+ error: H.error,
255
+ debouncedQuery: F,
256
+ isValidQuery: P,
257
+ refetch: q,
253
258
  clearCache: () => {
254
- y.removeQueries({ queryKey: ["cube", "load"] });
259
+ C.removeQueries({ queryKey: ["cube", "load"] });
255
260
  },
256
- needsRefresh: F,
257
- executeQuery: V,
258
- warnings: B
261
+ needsRefresh: z,
262
+ executeQuery: K,
263
+ warnings: G
259
264
  };
260
265
  }
261
266
  //#endregion
262
267
  //#region src/client/utils/multiQueryUtils.ts
263
- function N(e) {
268
+ function P(e) {
264
269
  return e.length > 0 && typeof e[0] == "object" && e[0] !== null && "__queryIndex" in e[0];
265
270
  }
266
- function P(e) {
267
- if (!N(e)) return [];
271
+ function F(e) {
272
+ if (!P(e)) return [];
268
273
  let t = /* @__PURE__ */ new Set();
269
274
  for (let n of e) {
270
275
  let e = n.__queryLabel;
@@ -272,8 +277,8 @@ function P(e) {
272
277
  }
273
278
  return Array.from(t);
274
279
  }
275
- function F(e) {
276
- if (!N(e)) return [];
280
+ function I(e) {
281
+ if (!P(e)) return [];
277
282
  let t = /* @__PURE__ */ new Set();
278
283
  for (let n of e) {
279
284
  let e = n.__queryIndex;
@@ -281,7 +286,7 @@ function F(e) {
281
286
  }
282
287
  return Array.from(t).sort((e, t) => e - t);
283
288
  }
284
- function I(e, t, n) {
289
+ function L(e, t, n) {
285
290
  let r = [];
286
291
  return e.forEach((e, t) => {
287
292
  let i = e.rawData(), a = n?.[t] || `Query ${t + 1}`;
@@ -294,7 +299,7 @@ function I(e, t, n) {
294
299
  });
295
300
  }), r;
296
301
  }
297
- function L(e, t, n, r) {
302
+ function R(e, t, n, r) {
298
303
  let i = /* @__PURE__ */ new Map();
299
304
  return e.forEach((e, r) => {
300
305
  let a = e.rawData(), o = t[r].measures || [];
@@ -315,10 +320,10 @@ function L(e, t, n, r) {
315
320
  });
316
321
  }), Array.from(i.values()).sort((e, t) => String(e[n[0]] ?? "").localeCompare(String(t[n[0]] ?? "")));
317
322
  }
318
- function R(e, t, n, r, i) {
319
- return e.length === 0 ? [] : e.length === 1 ? e[0].rawData() : n === "merge" && r && r.length > 0 ? L(e, t, r, i) : I(e, t, i);
323
+ function z(e, t, n, r, i) {
324
+ return e.length === 0 ? [] : e.length === 1 ? e[0].rawData() : n === "merge" && r && r.length > 0 ? R(e, t, r, i) : L(e, t, i);
320
325
  }
321
- function z(e, t) {
326
+ function B(e, t) {
322
327
  let n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set();
323
328
  return e.forEach((e) => {
324
329
  e.measures?.forEach((e) => n.add(e)), e.dimensions?.forEach((e) => r.add(e)), e.timeDimensions?.forEach((e) => i.add(e.dimension));
@@ -328,14 +333,14 @@ function z(e, t) {
328
333
  timeDimensions: Array.from(i)
329
334
  };
330
335
  }
331
- function B(e, t) {
336
+ function V(e, t) {
332
337
  if (e.measures && e.measures.length > 0) {
333
338
  let t = e.measures[0], n = t.split(".");
334
339
  return n.length > 1 ? n[n.length - 1] : t;
335
340
  }
336
341
  return `Query ${t + 1}`;
337
342
  }
338
- function V(e, t) {
343
+ function H(e, t) {
339
344
  let n = [];
340
345
  return e.forEach((e, r) => {
341
346
  [...e.dimensions || [], ...e.timeDimensions?.map((e) => e.dimension) || []].includes(t) || n.push(r);
@@ -346,35 +351,43 @@ function V(e, t) {
346
351
  }
347
352
  //#endregion
348
353
  //#region src/client/hooks/queries/useMultiCubeLoadQuery.ts
349
- var H = 300;
350
- function U(e) {
354
+ function U(e, t, n, r) {
355
+ let i = e.map((e, n) => t[n] || !e ? e : a(e, r)), o = i.filter((e, n) => !t[n]), s = n.queries.filter((e, n) => !t[n]);
356
+ return {
357
+ resultSets: i,
358
+ data: o.length > 0 ? z(o, s, n.mergeStrategy, n.mergeKeys, n.queryLabels) : [],
359
+ perQueryData: i.map((e, n) => t[n] ? null : e.rawData())
360
+ };
361
+ }
362
+ var W = 300;
363
+ function G(e) {
351
364
  return e ? [
352
365
  "cube",
353
366
  "multiLoad",
354
- D(e)
367
+ O(e)
355
368
  ] : [
356
369
  "cube",
357
370
  "multiLoad",
358
371
  null
359
372
  ];
360
373
  }
361
- function ee(e) {
374
+ function K(e) {
362
375
  return !e || !e.queries || e.queries.length < 2 ? !1 : e.queries.filter((e) => e.measures && e.measures.length > 0 || e.dimensions && e.dimensions.length > 0 || e.timeDimensions && e.timeDimensions.length > 0).length >= 2;
363
376
  }
364
- function te(e, i = {}) {
365
- let { skip: a = !1, debounceMs: o = H, resetResultSetOnChange: s = !0, staleTime: c = 6e4, keepPreviousData: u = !0 } = i, { cubeApi: d, batchCoordinator: f, enableBatching: p } = t(), m = r(), h = ee(e), { debouncedValue: g, isDebouncing: _ } = O(e, {
366
- isValid: h,
377
+ function q(e, i = {}) {
378
+ let { skip: a = !1, debounceMs: o = W, resetResultSetOnChange: s = !0, staleTime: c = 6e4, keepPreviousData: l = !0, gapFill: d } = i, f = !!d, p = d?.fillMissingDates, { cubeApi: m, batchCoordinator: h, enableBatching: g } = t(), _ = r(), v = K(e), { debouncedValue: y, isDebouncing: b } = k(e, {
379
+ isValid: v,
367
380
  skip: a,
368
381
  debounceMs: o
369
- }), v = l(() => g ? {
370
- ...g,
371
- queries: g.queries.map((e) => C(e))
372
- } : null, [g]), y = n({
373
- queryKey: U(v),
382
+ }), x = u(() => y ? {
383
+ ...y,
384
+ queries: y.queries.map((e) => w(e))
385
+ } : null, [y]), S = n({
386
+ queryKey: G(x),
374
387
  queryFn: async () => {
375
- if (!v) throw Error("No config provided");
388
+ if (!x) throw Error("No config provided");
376
389
  let e;
377
- e = p && f ? await Promise.all(v.queries.map((e) => f.register(e))) : await d.batchLoad(v.queries);
390
+ e = g && h ? await Promise.all(x.queries.map((e) => h.register(e))) : await m.batchLoad(x.queries);
378
391
  let t = e.map((e) => e && "error" in e && e.error ? Error(e.error) : null), n = e.map((e, n) => {
379
392
  if (t[n]) return null;
380
393
  try {
@@ -382,54 +395,66 @@ function te(e, i = {}) {
382
395
  } catch {
383
396
  return null;
384
397
  }
385
- }), r = e.filter((e, n) => !t[n]), i = v.queries.filter((e, n) => !t[n]);
398
+ }), r = e.filter((e, n) => !t[n]), i = x.queries.filter((e, n) => !t[n]);
386
399
  return {
387
- data: r.length > 0 ? R(r, i, v.mergeStrategy, v.mergeKeys, v.queryLabels) : [],
400
+ data: r.length > 0 ? z(r, i, x.mergeStrategy, x.mergeKeys, x.queryLabels) : [],
388
401
  resultSets: e,
389
402
  perQueryData: n,
390
403
  errors: t,
391
- firstError: t.find((e) => e !== null) || null
404
+ firstError: t.find((e) => e !== null) || null,
405
+ config: x
392
406
  };
393
407
  },
394
- enabled: !!v && !a,
408
+ enabled: !!x && !a,
395
409
  staleTime: c,
396
- placeholderData: u ? (e) => e : void 0
397
- });
410
+ placeholderData: l ? (e) => e : void 0
411
+ }), C = (e) => {
412
+ x && (e?.bustCache ? (_.removeQueries({ queryKey: G(x) }), _.fetchQuery({
413
+ queryKey: G(x),
414
+ queryFn: async () => {
415
+ let e = await m.batchLoad(x.queries, { bustCache: !0 }), t = e.map((e) => e && "error" in e && e.error ? Error(e.error) : null);
416
+ return {
417
+ data: x.mergeStrategy === "concat" ? e.flatMap((e) => e?.rawData() || []) : e[0]?.rawData() || [],
418
+ resultSets: e,
419
+ perQueryData: x.mergeStrategy === "concat" ? e.map((e) => e?.rawData() || []) : [],
420
+ errors: t,
421
+ firstError: t.find((e) => e !== null) || null,
422
+ config: x
423
+ };
424
+ }
425
+ })) : _.refetchQueries({ queryKey: G(x) }));
426
+ }, T = u(() => {
427
+ let e = S.data;
428
+ return !e || !f ? e : {
429
+ ...e,
430
+ ...U(e.resultSets, e.errors, e.config, { fillMissingDates: p })
431
+ };
432
+ }, [
433
+ S.data,
434
+ f,
435
+ p
436
+ ]);
398
437
  return {
399
- data: y.data?.data ?? null,
400
- resultSets: y.data?.resultSets ?? null,
401
- perQueryData: y.data?.perQueryData ?? null,
402
- isLoading: y.isLoading || _,
403
- isFetching: y.isFetching,
404
- isDebouncing: _,
405
- error: y.data?.firstError ?? y.error,
406
- errors: y.data?.errors ?? [],
407
- debouncedConfig: g,
408
- isValidConfig: h,
409
- refetch: (e) => {
410
- v && (e?.bustCache ? (m.removeQueries({ queryKey: U(v) }), m.fetchQuery({
411
- queryKey: U(v),
412
- queryFn: async () => {
413
- let e = await d.batchLoad(v.queries, { bustCache: !0 }), t = e.map((e) => e && "error" in e && e.error ? Error(e.error) : null);
414
- return {
415
- data: v.mergeStrategy === "concat" ? e.flatMap((e) => e?.rawData() || []) : e[0]?.rawData() || [],
416
- resultSets: e,
417
- perQueryData: v.mergeStrategy === "concat" ? e.map((e) => e?.rawData() || []) : [],
418
- errors: t,
419
- firstError: t.find((e) => e !== null) || null
420
- };
421
- }
422
- })) : m.refetchQueries({ queryKey: U(v) }));
423
- }
438
+ data: T?.data ?? null,
439
+ resultSets: T?.resultSets ?? null,
440
+ perQueryData: T?.perQueryData ?? null,
441
+ isLoading: S.isLoading || b,
442
+ isFetching: S.isFetching,
443
+ isDebouncing: b,
444
+ error: S.data?.firstError ?? S.error,
445
+ errors: T?.errors ?? [],
446
+ debouncedConfig: y,
447
+ isValidConfig: v,
448
+ refetch: C
424
449
  };
425
450
  }
426
451
  //#endregion
427
452
  //#region src/client/hooks/queries/useFunnelQuery.ts
428
- var ne = 300;
429
- function W(e) {
453
+ var ee = 300;
454
+ function J(e) {
430
455
  return e.isError ? "error" : e.isLoading ? "executing" : e.isSuccess ? "success" : "idle";
431
456
  }
432
- function G(e, t, n, r, i) {
457
+ function te(e, t, n, r, i) {
433
458
  return {
434
459
  stepIndex: t,
435
460
  stepName: e.name,
@@ -444,7 +469,7 @@ function G(e, t, n, r, i) {
444
469
  error: null
445
470
  };
446
471
  }
447
- function K(e, t) {
472
+ function ne(e, t) {
448
473
  return e || {
449
474
  id: "prebuilt-funnel",
450
475
  name: "Funnel Analysis",
@@ -457,7 +482,7 @@ function K(e, t) {
457
482
  }))
458
483
  };
459
484
  }
460
- function q(e) {
485
+ function Y(e) {
461
486
  if (!e || !e.bindingKey || !e.steps || e.steps.length < 2) return !1;
462
487
  if (typeof e.bindingKey.dimension == "string") {
463
488
  if (!e.bindingKey.dimension) return !1;
@@ -468,16 +493,16 @@ function q(e) {
468
493
  }
469
494
  return !0;
470
495
  }
471
- function J(i, u = {}) {
472
- let { skip: f = !1, debounceMs: p = ne, onComplete: m, onError: h, prebuiltServerQuery: g } = u, { cubeApi: _ } = t(), v = r(), { features: y } = e(), b = y.manualRefresh ?? !1, [x, S] = d(null), C = q(i), { debouncedValue: w, isDebouncing: T } = O(i, {
496
+ function X(i, a = {}) {
497
+ let { skip: d = !1, debounceMs: p = ee, onComplete: m, onError: h, prebuiltServerQuery: g } = a, { cubeApi: _ } = t(), v = r(), { features: y } = e(), b = y.manualRefresh ?? !1, [x, S] = f(null), C = Y(i), { debouncedValue: w, isDebouncing: T } = k(i, {
473
498
  isValid: C,
474
- skip: f,
499
+ skip: d,
475
500
  debounceMs: p
476
- }), E = l(() => {
501
+ }), E = u(() => {
477
502
  if (g) return g;
478
503
  if (!w || !C) return null;
479
504
  try {
480
- return a(w.steps.map((e) => e.query), w.bindingKey, w.steps.map((e) => e.name), w.steps.map((e) => e.timeToConvert || null), !0);
505
+ return o(w.steps.map((e) => e.query), w.bindingKey, w.steps.map((e) => e.name), w.steps.map((e) => e.timeToConvert || null), !0);
481
506
  } catch (e) {
482
507
  return console.error("Failed to build server funnel query:", e), null;
483
508
  }
@@ -485,7 +510,7 @@ function J(i, u = {}) {
485
510
  g,
486
511
  w,
487
512
  C
488
- ]), k = l(() => E ? [
513
+ ]), D = u(() => E ? [
489
514
  "cube",
490
515
  "funnel",
491
516
  E.funnel?.steps?.length || 0,
@@ -494,27 +519,27 @@ function J(i, u = {}) {
494
519
  "cube",
495
520
  "funnel",
496
521
  null
497
- ], [E]), A = E ? D(E) : null, j = l(() => !b || !A || x === null ? !1 : A !== x, [
522
+ ], [E]), A = E ? O(E) : null, j = u(() => !b || !A || x === null ? !1 : A !== x, [
498
523
  b,
499
524
  A,
500
525
  x
501
- ]), M = l(() => !E || f ? !1 : !b || x === null || x === A, [
526
+ ]), M = u(() => !E || d ? !1 : !b || x === null || x === A, [
502
527
  E,
503
- f,
528
+ d,
504
529
  b,
505
530
  x,
506
531
  A
507
532
  ]);
508
- c(() => {
509
- !b && E && !f && S(A);
533
+ l(() => {
534
+ !b && E && !d && S(A);
510
535
  }, [
511
536
  b,
512
537
  E,
513
- f,
538
+ d,
514
539
  A
515
540
  ]);
516
541
  let N = n({
517
- queryKey: k,
542
+ queryKey: D,
518
543
  queryFn: async () => {
519
544
  if (!E) throw Error("No server query available");
520
545
  let e = performance.now();
@@ -534,7 +559,7 @@ function J(i, u = {}) {
534
559
  staleTime: 6e4,
535
560
  gcTime: 3e5
536
561
  });
537
- c(() => {
562
+ l(() => {
538
563
  b && M && N.isSuccess && !N.isFetching && E && S(A);
539
564
  }, [
540
565
  b,
@@ -544,22 +569,22 @@ function J(i, u = {}) {
544
569
  E,
545
570
  A
546
571
  ]);
547
- let P = l(() => g?.funnel?.steps ? g.funnel.steps.map((e) => e.name) : w?.steps?.map((e) => e.name), [g, w]), F = l(() => g?.funnel?.steps ? g.funnel.steps.length : w?.steps?.length || 0, [g, w]), I = l(() => !N.data?.rawData || N.data.rawData.length !== F ? [] : o(N.data.rawData, P), [
572
+ let P = u(() => g?.funnel?.steps ? g.funnel.steps.map((e) => e.name) : w?.steps?.map((e) => e.name), [g, w]), F = u(() => g?.funnel?.steps ? g.funnel.steps.length : w?.steps?.length || 0, [g, w]), I = u(() => !N.data?.rawData || N.data.rawData.length !== F ? [] : s(N.data.rawData, P), [
548
573
  N.data,
549
574
  F,
550
575
  P
551
- ]), L = l(() => {
576
+ ]), L = u(() => {
552
577
  if (!I.length) return [];
553
578
  let e = I[0]?.value || 0, t = N.data?.executionTime || 0;
554
- return I.map((n, r) => G(n, r, e, w, t));
579
+ return I.map((n, r) => te(n, r, e, w, t));
555
580
  }, [
556
581
  I,
557
582
  w,
558
583
  N.data?.executionTime
559
- ]), R = l(() => {
584
+ ]), R = u(() => {
560
585
  if (!I.length || !w && !g) return null;
561
586
  let e = I[0]?.value || 0, t = I[I.length - 1]?.value || 0, n = {
562
- config: K(w, g),
587
+ config: ne(w, g),
563
588
  steps: L,
564
589
  summary: {
565
590
  totalEntries: e,
@@ -568,7 +593,7 @@ function J(i, u = {}) {
568
593
  totalExecutionTime: N.data?.executionTime || 0
569
594
  },
570
595
  chartData: I,
571
- status: W(N),
596
+ status: J(N),
572
597
  error: N.error,
573
598
  currentStepIndex: null
574
599
  };
@@ -580,12 +605,12 @@ function J(i, u = {}) {
580
605
  L,
581
606
  N,
582
607
  m
583
- ]), z = W(N), B = s(async (e) => {
608
+ ]), z = J(N), B = c(async (e) => {
584
609
  if (!E) return null;
585
610
  S(A);
586
611
  try {
587
- return e?.bustCache ? (v.removeQueries({ queryKey: k }), await v.fetchQuery({
588
- queryKey: k,
612
+ return e?.bustCache ? (v.removeQueries({ queryKey: D }), await v.fetchQuery({
613
+ queryKey: D,
589
614
  queryFn: async () => {
590
615
  let e = performance.now(), t = await _.load(E, { bustCache: !0 });
591
616
  return {
@@ -603,12 +628,12 @@ function J(i, u = {}) {
603
628
  N,
604
629
  R,
605
630
  v,
606
- k,
631
+ D,
607
632
  _,
608
633
  A
609
- ]), V = s(() => {}, []), H = s(() => {
610
- v.removeQueries({ queryKey: k });
611
- }, [v, k]);
634
+ ]), V = c(() => {}, []), H = c(() => {
635
+ v.removeQueries({ queryKey: D });
636
+ }, [v, D]);
612
637
  return {
613
638
  result: R,
614
639
  status: z,
@@ -628,7 +653,7 @@ function J(i, u = {}) {
628
653
  needsRefresh: j
629
654
  };
630
655
  }
631
- function Y(e) {
656
+ function re(e) {
632
657
  return e ? [
633
658
  "cube",
634
659
  "funnel",
@@ -641,13 +666,13 @@ function Y(e) {
641
666
  }
642
667
  //#endregion
643
668
  //#region src/client/hooks/queries/useFlowQuery.ts
644
- var X = 300;
645
- function re(e) {
669
+ var ie = 300;
670
+ function ae(e) {
646
671
  if (!e?.flow) return !1;
647
672
  let { flow: t } = e;
648
673
  return !(!t.bindingKey || !t.timeDimension || !t.eventDimension || !t.startingStep?.filter || t.stepsBefore < 0 || t.stepsBefore > 5 || t.stepsAfter < 0 || t.stepsAfter > 5);
649
674
  }
650
- function ie(e) {
675
+ function oe(e) {
651
676
  if (e.length === 1) {
652
677
  let t = e[0];
653
678
  if (t && typeof t == "object" && "nodes" in t && "links" in t) return t;
@@ -658,12 +683,12 @@ function ie(e) {
658
683
  }
659
684
  return null;
660
685
  }
661
- function ae(i, a = {}) {
662
- let { skip: o = !1, debounceMs: u = X, onComplete: f, onError: p } = a, { cubeApi: m } = t(), h = r(), { features: g } = e(), _ = g.manualRefresh ?? !1, [v, y] = d(null), b = re(i), { debouncedValue: x, isDebouncing: S } = O(i, {
686
+ function se(i, a = {}) {
687
+ let { skip: o = !1, debounceMs: s = ie, onComplete: d, onError: p } = a, { cubeApi: m } = t(), h = r(), { features: g } = e(), _ = g.manualRefresh ?? !1, [v, y] = f(null), b = ae(i), { debouncedValue: x, isDebouncing: S } = k(i, {
663
688
  isValid: b,
664
689
  skip: o,
665
- debounceMs: u
666
- }), C = l(() => x ? JSON.stringify(x) : null, [x]), w = l(() => i ? JSON.stringify(i) : null, [i]), T = l(() => x ? [
690
+ debounceMs: s
691
+ }), C = u(() => x ? JSON.stringify(x) : null, [x]), w = u(() => i ? JSON.stringify(i) : null, [i]), T = u(() => x ? [
667
692
  "cube",
668
693
  "flow",
669
694
  C
@@ -671,11 +696,11 @@ function ae(i, a = {}) {
671
696
  "cube",
672
697
  "flow",
673
698
  null
674
- ], [x, C]), E = i ? D(i) : null, k = l(() => !_ || !E || v === null ? !1 : E !== v, [
699
+ ], [x, C]), E = i ? O(i) : null, D = u(() => !_ || !E || v === null ? !1 : E !== v, [
675
700
  _,
676
701
  E,
677
702
  v
678
- ]), A = l(() => !b || !x || o ? !1 : !_ || v === null || v === E, [
703
+ ]), A = u(() => !b || !x || o ? !1 : !_ || v === null || v === E, [
679
704
  b,
680
705
  x,
681
706
  o,
@@ -683,7 +708,7 @@ function ae(i, a = {}) {
683
708
  v,
684
709
  E
685
710
  ]);
686
- c(() => {
711
+ l(() => {
687
712
  !_ && i && !o && b && y(E);
688
713
  }, [
689
714
  _,
@@ -714,7 +739,7 @@ function ae(i, a = {}) {
714
739
  staleTime: 6e4,
715
740
  gcTime: 3e5
716
741
  });
717
- c(() => {
742
+ l(() => {
718
743
  _ && A && j.isSuccess && !j.isFetching && x && y(E);
719
744
  }, [
720
745
  _,
@@ -724,17 +749,17 @@ function ae(i, a = {}) {
724
749
  x,
725
750
  E
726
751
  ]);
727
- let M = w !== null && j.data?.queryKeyString !== void 0 && j.data.queryKeyString !== w, N = l(() => {
752
+ let M = w !== null && j.data?.queryKeyString !== void 0 && j.data.queryKeyString !== w, N = u(() => {
728
753
  if (M || !j.data?.rawData) return null;
729
- let e = ie(j.data.rawData);
730
- return e && j.isSuccess && !j.isFetching && f?.(e), e;
754
+ let e = oe(j.data.rawData);
755
+ return e && j.isSuccess && !j.isFetching && d?.(e), e;
731
756
  }, [
732
757
  j.data,
733
758
  j.isSuccess,
734
759
  j.isFetching,
735
- f,
760
+ d,
736
761
  M
737
- ]), P = s((e) => {
762
+ ]), P = c((e) => {
738
763
  x && b && (y(E), e?.bustCache ? (h.removeQueries({ queryKey: T }), h.fetchQuery({
739
764
  queryKey: T,
740
765
  queryFn: async () => {
@@ -754,7 +779,7 @@ function ae(i, a = {}) {
754
779
  T,
755
780
  m,
756
781
  E
757
- ]), F = s(() => {
782
+ ]), F = c(() => {
758
783
  h.removeQueries({ queryKey: T });
759
784
  }, [h, T]);
760
785
  return {
@@ -769,10 +794,10 @@ function ae(i, a = {}) {
769
794
  refetch: P,
770
795
  reset: F,
771
796
  serverQuery: x,
772
- needsRefresh: k
797
+ needsRefresh: D
773
798
  };
774
799
  }
775
- function oe(e) {
800
+ function ce(e) {
776
801
  return e ? [
777
802
  "cube",
778
803
  "flow",
@@ -785,11 +810,11 @@ function oe(e) {
785
810
  }
786
811
  //#endregion
787
812
  //#region src/client/hooks/queries/useRetentionQuery.ts
788
- var se = 300;
789
- function ce(e) {
813
+ var le = 300;
814
+ function ue(e) {
790
815
  return !(!e || !e.retention || !e.retention.timeDimension || !e.retention.bindingKey || !e.retention.periods || e.retention.periods < 1);
791
816
  }
792
- function le(e) {
817
+ function de(e) {
793
818
  if (e) {
794
819
  if (typeof e == "string") return e.split(".").pop();
795
820
  if (Array.isArray(e) && e.length > 0) {
@@ -798,7 +823,7 @@ function le(e) {
798
823
  }
799
824
  }
800
825
  }
801
- function Z(e) {
826
+ function fe(e) {
802
827
  if (typeof e == "string") return e;
803
828
  if (e && typeof e == "object" && !Array.isArray(e)) {
804
829
  let t = Object.values(e);
@@ -806,7 +831,7 @@ function Z(e) {
806
831
  }
807
832
  return null;
808
833
  }
809
- function Q(e, t, n) {
834
+ function Z(e, t, n) {
810
835
  if (!e || !Array.isArray(e) || e.length === 0) return {
811
836
  rows: [],
812
837
  periods: [],
@@ -820,7 +845,7 @@ function Q(e, t, n) {
820
845
  cohortSize: Number(t.cohortSize ?? t.cohort_size ?? 0),
821
846
  retainedUsers: Number(t.retainedUsers ?? t.retained_users ?? 0),
822
847
  retentionRate: Number(t.retentionRate ?? t.retention_rate ?? 0),
823
- breakdownValue: Z(t.breakdownValues) ?? t.breakdownValue ?? t.breakdown_value ?? null
848
+ breakdownValue: fe(t.breakdownValues) ?? t.breakdownValue ?? t.breakdown_value ?? null
824
849
  };
825
850
  }), i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set();
826
851
  r.forEach((e) => {
@@ -831,12 +856,12 @@ function Q(e, t, n) {
831
856
  rows: r,
832
857
  periods: o,
833
858
  breakdownValues: s,
834
- summary: ue(r, s),
859
+ summary: pe(r, s),
835
860
  granularity: t,
836
861
  bindingKeyLabel: n
837
862
  };
838
863
  }
839
- function ue(e, t) {
864
+ function pe(e, t) {
840
865
  let n = e.filter((e) => e.period === 1).map((e) => e.retentionRate);
841
866
  return {
842
867
  totalUsers: e.filter((e) => e.period === 0).reduce((e, t) => e + t.cohortSize, 0),
@@ -846,12 +871,12 @@ function ue(e, t) {
846
871
  segmentCount: t?.length || 1
847
872
  };
848
873
  }
849
- function de(i, a = {}) {
850
- let { skip: o = !1, debounceMs: u = se, onComplete: f, onError: p, getFieldLabel: m } = a, { cubeApi: h } = t(), g = r(), { features: _ } = e(), v = _.manualRefresh ?? !1, [y, b] = d(null), { debouncedValue: x, isDebouncing: S } = O(i, {
851
- isValid: ce(i),
874
+ function me(i, a = {}) {
875
+ let { skip: o = !1, debounceMs: s = le, onComplete: d, onError: p, getFieldLabel: m } = a, { cubeApi: h } = t(), g = r(), { features: _ } = e(), v = _.manualRefresh ?? !1, [y, b] = f(null), { debouncedValue: x, isDebouncing: S } = k(i, {
876
+ isValid: ue(i),
852
877
  skip: o,
853
- debounceMs: u
854
- }), C = l(() => x ? [
878
+ debounceMs: s
879
+ }), C = u(() => x ? [
855
880
  "cube",
856
881
  "retention",
857
882
  JSON.stringify(x)
@@ -859,18 +884,18 @@ function de(i, a = {}) {
859
884
  "cube",
860
885
  "retention",
861
886
  null
862
- ], [x]), w = x ? D(x) : null, T = l(() => !v || !w || y === null ? !1 : w !== y, [
887
+ ], [x]), w = x ? O(x) : null, T = u(() => !v || !w || y === null ? !1 : w !== y, [
863
888
  v,
864
889
  w,
865
890
  y
866
- ]), E = l(() => !x || o ? !1 : !v || y === null || y === w, [
891
+ ]), E = u(() => !x || o ? !1 : !v || y === null || y === w, [
867
892
  x,
868
893
  o,
869
894
  v,
870
895
  y,
871
896
  w
872
897
  ]);
873
- c(() => {
898
+ l(() => {
874
899
  !v && x && !o && b(w);
875
900
  }, [
876
901
  v,
@@ -878,7 +903,7 @@ function de(i, a = {}) {
878
903
  o,
879
904
  w
880
905
  ]);
881
- let k = n({
906
+ let D = n({
882
907
  queryKey: C,
883
908
  queryFn: async () => {
884
909
  if (!x) throw Error("No retention query available");
@@ -899,44 +924,44 @@ function de(i, a = {}) {
899
924
  staleTime: 6e4,
900
925
  gcTime: 3e5
901
926
  });
902
- c(() => {
903
- v && E && k.isSuccess && !k.isFetching && x && b(w);
927
+ l(() => {
928
+ v && E && D.isSuccess && !D.isFetching && x && b(w);
904
929
  }, [
905
930
  v,
906
931
  E,
907
- k.isSuccess,
908
- k.isFetching,
932
+ D.isSuccess,
933
+ D.isFetching,
909
934
  x,
910
935
  w
911
936
  ]);
912
- let A = i?.retention?.granularity, j = l(() => {
937
+ let A = i?.retention?.granularity, j = u(() => {
913
938
  let e = i?.retention?.bindingKey;
914
939
  if (e) {
915
940
  if (typeof e == "string") return e;
916
941
  if (Array.isArray(e) && e.length > 0) return e[0]?.dimension;
917
942
  }
918
- }, [i?.retention?.bindingKey]), M = l(() => {
943
+ }, [i?.retention?.bindingKey]), M = u(() => {
919
944
  if (j && m) {
920
945
  let e = m(j);
921
946
  if (e && e !== j) return e;
922
947
  }
923
- return le(i?.retention?.bindingKey);
948
+ return de(i?.retention?.bindingKey);
924
949
  }, [
925
950
  j,
926
951
  m,
927
952
  i?.retention?.bindingKey
928
- ]), N = l(() => {
929
- if (!k.data?.rawData) return null;
930
- let e = Q(k.data.rawData, A, M);
931
- return k.isSuccess && !k.isFetching && f?.(e), e;
953
+ ]), N = u(() => {
954
+ if (!D.data?.rawData) return null;
955
+ let e = Z(D.data.rawData, A, M);
956
+ return D.isSuccess && !D.isFetching && d?.(e), e;
932
957
  }, [
933
- k.data,
934
- k.isSuccess,
935
- k.isFetching,
936
- f,
958
+ D.data,
959
+ D.isSuccess,
960
+ D.isFetching,
961
+ d,
937
962
  A,
938
963
  M
939
- ]), P = s(async (e) => x ? (e?.bustCache && g.removeQueries({ queryKey: C }), b(w), Q((await g.fetchQuery({
964
+ ]), P = c(async (e) => x ? (e?.bustCache && g.removeQueries({ queryKey: C }), b(w), Z((await g.fetchQuery({
940
965
  queryKey: C,
941
966
  queryFn: async () => {
942
967
  let e = await h.load(x);
@@ -954,22 +979,22 @@ function de(i, a = {}) {
954
979
  w,
955
980
  A,
956
981
  M
957
- ]), F = s(() => {
958
- k.refetch();
959
- }, [k]), I = l(() => k.isError ? "error" : k.isLoading ? "loading" : k.isSuccess ? "success" : "idle", [
960
- k.isError,
961
- k.isLoading,
962
- k.isSuccess
982
+ ]), F = c(() => {
983
+ D.refetch();
984
+ }, [D]), I = u(() => D.isError ? "error" : D.isLoading ? "loading" : D.isSuccess ? "success" : "idle", [
985
+ D.isError,
986
+ D.isLoading,
987
+ D.isSuccess
963
988
  ]);
964
989
  return {
965
990
  chartData: N,
966
- rawData: k.data?.rawData ?? null,
991
+ rawData: D.data?.rawData ?? null,
967
992
  status: I,
968
- isLoading: k.isLoading,
969
- isFetching: k.isFetching,
993
+ isLoading: D.isLoading,
994
+ isFetching: D.isFetching,
970
995
  isDebouncing: S,
971
- error: k.error,
972
- cacheInfo: k.data?.cacheInfo ?? null,
996
+ error: D.error,
997
+ cacheInfo: D.data?.cacheInfo ?? null,
973
998
  execute: P,
974
999
  refetch: F,
975
1000
  needsRefresh: T
@@ -977,9 +1002,9 @@ function de(i, a = {}) {
977
1002
  }
978
1003
  //#endregion
979
1004
  //#region src/client/hooks/useResponsiveDashboard.ts
980
- var $ = 1200, fe = 768;
981
- function pe() {
982
- let [e, t] = d(() => typeof window < "u" ? window.innerWidth : $), n = u(null), r = u(null), i = s((e) => {
1005
+ var Q = 1200, $ = 768;
1006
+ function he() {
1007
+ let [e, t] = f(() => typeof window < "u" ? window.innerWidth : Q), n = d(null), r = d(null), i = c((e) => {
983
1008
  if (n.current &&= (n.current.disconnect(), null), r.current = e, e) {
984
1009
  let r = e.offsetWidth;
985
1010
  r > 0 && t(r), n.current = new ResizeObserver((e) => {
@@ -988,9 +1013,9 @@ function pe() {
988
1013
  }), n.current.observe(e);
989
1014
  }
990
1015
  }, []);
991
- c(() => () => {
1016
+ l(() => () => {
992
1017
  n.current && n.current.disconnect();
993
- }, []), c(() => {
1018
+ }, []), l(() => {
994
1019
  let e = () => {
995
1020
  if (r.current) {
996
1021
  let e = r.current.offsetWidth;
@@ -1003,25 +1028,25 @@ function pe() {
1003
1028
  window.removeEventListener("resize", e), clearTimeout(n);
1004
1029
  };
1005
1030
  }, []);
1006
- let a = l(() => e >= $ ? "desktop" : e >= fe ? "scaled" : "mobile", [e]);
1031
+ let a = u(() => e >= Q ? "desktop" : e >= $ ? "scaled" : "mobile", [e]);
1007
1032
  return {
1008
1033
  containerRef: i,
1009
1034
  containerWidth: e,
1010
1035
  displayMode: a,
1011
- scaleFactor: l(() => a === "scaled" ? e / $ : 1, [e, a]),
1036
+ scaleFactor: u(() => a === "scaled" ? e / Q : 1, [e, a]),
1012
1037
  isEditable: a === "desktop",
1013
- designWidth: $
1038
+ designWidth: Q
1014
1039
  };
1015
1040
  }
1016
1041
  //#endregion
1017
1042
  //#region src/client/hooks/useFilterValues.ts
1018
- function me(e, t = !0) {
1019
- let [n, r] = d(null), i = u(""), { resultSet: a, isLoading: o, error: f } = M(n, {
1043
+ function ge(e, t = !0) {
1044
+ let [n, r] = f(null), i = d(""), { resultSet: a, isLoading: o, error: s } = N(n, {
1020
1045
  skip: !n || !t || !e,
1021
1046
  debounceMs: 150,
1022
1047
  keepPreviousData: !0
1023
- }), p = l(() => {
1024
- if (!a || o || f || !e) return [];
1048
+ }), p = u(() => {
1049
+ if (!a || o || s || !e) return [];
1025
1050
  try {
1026
1051
  let t = a.tablePivot(), n = /* @__PURE__ */ new Set();
1027
1052
  return t.forEach((t) => {
@@ -1034,13 +1059,13 @@ function me(e, t = !0) {
1034
1059
  }, [
1035
1060
  a,
1036
1061
  o,
1037
- f,
1062
+ s,
1038
1063
  e
1039
1064
  ]);
1040
- c(() => {
1065
+ l(() => {
1041
1066
  (!e || !t) && (r(null), i.current = "");
1042
1067
  }, [e, t]);
1043
- let m = s(() => {
1068
+ let m = c(() => {
1044
1069
  if (e) {
1045
1070
  i.current = "";
1046
1071
  try {
@@ -1053,7 +1078,7 @@ function me(e, t = !0) {
1053
1078
  console.error("Error creating query:", e);
1054
1079
  }
1055
1080
  }
1056
- }, [e]), h = s((t, n = !1) => {
1081
+ }, [e]), h = c((t, n = !1) => {
1057
1082
  if (e && (n || t !== i.current)) {
1058
1083
  i.current = t;
1059
1084
  try {
@@ -1075,16 +1100,16 @@ function me(e, t = !0) {
1075
1100
  return {
1076
1101
  values: p,
1077
1102
  loading: o,
1078
- error: f ? f instanceof Error ? f.message : String(f) : null,
1103
+ error: s ? s instanceof Error ? s.message : String(s) : null,
1079
1104
  refetch: m,
1080
1105
  searchValues: h
1081
1106
  };
1082
1107
  }
1083
1108
  //#endregion
1084
1109
  //#region src/client/hooks/useDebounce.ts
1085
- function he(e, t) {
1086
- let [n, r] = d(e);
1087
- return c(() => {
1110
+ function _e(e, t) {
1111
+ let [n, r] = f(e);
1112
+ return l(() => {
1088
1113
  let n = setTimeout(() => {
1089
1114
  r(e);
1090
1115
  }, t);
@@ -1095,8 +1120,8 @@ function he(e, t) {
1095
1120
  }
1096
1121
  //#endregion
1097
1122
  //#region src/client/hooks/useDirtyStateTracking.ts
1098
- function ge({ initialConfig: e, onConfigChange: t, onSave: n, onDirtyStateChange: r }) {
1099
- let i = u(e), a = u(!1), o = s(async (e) => {
1123
+ function ve({ initialConfig: e, onConfigChange: t, onSave: n, onDirtyStateChange: r }) {
1124
+ let i = d(e), a = d(!1), o = c(async (e) => {
1100
1125
  if (a.current) {
1101
1126
  r && r(!0);
1102
1127
  try {
@@ -1107,17 +1132,17 @@ function ge({ initialConfig: e, onConfigChange: t, onSave: n, onDirtyStateChange
1107
1132
  }
1108
1133
  }, [n, r]);
1109
1134
  return {
1110
- handleConfigChange: s((e) => {
1135
+ handleConfigChange: c((e) => {
1111
1136
  t && t(e), JSON.stringify(e) !== JSON.stringify(i.current) && (a.current = !0, r && r(!0));
1112
1137
  }, [t, r]),
1113
1138
  handleSave: o,
1114
- hasChanged: s(() => a.current, []),
1115
- resetInitialConfig: s((e) => {
1139
+ hasChanged: c(() => a.current, []),
1140
+ resetInitialConfig: c((e) => {
1116
1141
  i.current = e, a.current = !1;
1117
1142
  }, [])
1118
1143
  };
1119
1144
  }
1120
1145
  //#endregion
1121
- export { g as A, D as C, T as D, E, x as F, y as I, S as L, m as M, p as N, _ as O, v as P, M as S, w as T, R as _, de as a, V as b, Y as c, te as d, B as f, N as g, P as h, pe as i, b as j, h as k, J as l, F as m, he as n, oe as o, z as p, me as r, ae as s, ge as t, U as u, L as v, C as w, A as x, I as y };
1146
+ export { _ as A, O as C, E as D, D as E, S as F, b as I, C as L, h as M, m as N, v as O, y as P, N as S, T, z as _, me as a, H as b, re as c, q as d, V as f, P as g, F as h, he as i, x as j, g as k, X as l, I as m, _e as n, ce as o, B as p, ge as r, se as s, ve as t, G as u, R as v, w, j as x, L as y };
1122
1147
 
1123
- //# sourceMappingURL=useDirtyStateTracking-DL_AnCWZ.js.map
1148
+ //# sourceMappingURL=useDirtyStateTracking-DUyYwuN_.js.map