drizzle-cube 0.3.13 → 0.3.16

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/express/index.cjs +1 -1
  2. package/dist/adapters/express/index.d.ts +8 -1
  3. package/dist/adapters/express/index.js +162 -99
  4. package/dist/adapters/fastify/index.cjs +1 -1
  5. package/dist/adapters/fastify/index.d.ts +8 -1
  6. package/dist/adapters/fastify/index.js +183 -96
  7. package/dist/adapters/hono/index.cjs +1 -1
  8. package/dist/adapters/hono/index.d.ts +8 -1
  9. package/dist/adapters/hono/index.js +198 -142
  10. package/dist/adapters/nextjs/index.cjs +1 -1
  11. package/dist/adapters/nextjs/index.d.ts +29 -1
  12. package/dist/adapters/nextjs/index.js +251 -132
  13. package/dist/adapters/utils.d.ts +100 -1
  14. package/dist/adapters/validation-Bgauxvm6.cjs +214 -0
  15. package/dist/adapters/{compiler-DTOU8IsK.js → validation-_UkKJ2pC.js} +9582 -5295
  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-DirfDaZH.js +256 -0
  20. package/dist/client/chunks/RetentionCombinedChart-DirfDaZH.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-APeCxkEH.js +6939 -0
  28. package/dist/client/chunks/analysis-builder-APeCxkEH.js.map +1 -0
  29. package/dist/client/chunks/analysis-builder-shared-DEovRjrp.js +2779 -0
  30. package/dist/client/chunks/analysis-builder-shared-DEovRjrp.js.map +1 -0
  31. package/dist/client/chunks/{chart-activity-grid-CuPARsr1.js → chart-activity-grid-BnweuBvr.js} +11 -11
  32. package/dist/client/chunks/{chart-activity-grid-CuPARsr1.js.map → chart-activity-grid-BnweuBvr.js.map} +1 -1
  33. package/dist/client/chunks/{chart-area-cPrJnhLj.js → chart-area-DLmXFWWy.js} +2 -2
  34. package/dist/client/chunks/{chart-area-cPrJnhLj.js.map → chart-area-DLmXFWWy.js.map} +1 -1
  35. package/dist/client/chunks/{chart-bar-D68HFPpa.js → chart-bar-7y0-F27Q.js} +2 -2
  36. package/dist/client/chunks/{chart-bar-D68HFPpa.js.map → chart-bar-7y0-F27Q.js.map} +1 -1
  37. package/dist/client/chunks/{chart-bubble-CquyYfNO.js → chart-bubble-3jYKCA2B.js} +2 -2
  38. package/dist/client/chunks/{chart-bubble-CquyYfNO.js.map → chart-bubble-3jYKCA2B.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-rUFLqysu.js} +4 -4
  78. package/dist/client/chunks/{chart-data-table-D4WDqbM0.js.map → chart-data-table-rUFLqysu.js.map} +1 -1
  79. package/dist/client/chunks/{chart-funnel-Csdn4FbN.js → chart-funnel-C7zGBfSw.js} +2 -2
  80. package/dist/client/chunks/{chart-funnel-Csdn4FbN.js.map → chart-funnel-C7zGBfSw.js.map} +1 -1
  81. package/dist/client/chunks/{chart-heat-map-v1afxnjq.js → chart-heat-map-B-l8hK8b.js} +2 -2
  82. package/dist/client/chunks/{chart-heat-map-v1afxnjq.js.map → chart-heat-map-B-l8hK8b.js.map} +1 -1
  83. package/dist/client/chunks/chart-kpi-delta-sfZEvQZm.js +351 -0
  84. package/dist/client/chunks/chart-kpi-delta-sfZEvQZm.js.map +1 -0
  85. package/dist/client/chunks/chart-kpi-number-BxGNOtzI.js +473 -0
  86. package/dist/client/chunks/chart-kpi-number-BxGNOtzI.js.map +1 -0
  87. package/dist/client/chunks/{chart-kpi-text-CRp8QWYG.js → chart-kpi-text-BLQ_CWQP.js} +3 -3
  88. package/dist/client/chunks/{chart-kpi-text-CRp8QWYG.js.map → chart-kpi-text-BLQ_CWQP.js.map} +1 -1
  89. package/dist/client/chunks/{chart-line-DqqE7ky9.js → chart-line-FSEpBk6Y.js} +5 -5
  90. package/dist/client/chunks/{chart-line-DqqE7ky9.js.map → chart-line-FSEpBk6Y.js.map} +1 -1
  91. package/dist/client/chunks/{chart-pie-B5WBzIRH.js → chart-pie-BRQEH9e-.js} +2 -2
  92. package/dist/client/chunks/{chart-pie-B5WBzIRH.js.map → chart-pie-BRQEH9e-.js.map} +1 -1
  93. package/dist/client/chunks/{chart-radar-DL_dvhA-.js → chart-radar-DgsFyiIP.js} +2 -2
  94. package/dist/client/chunks/{chart-radar-DL_dvhA-.js.map → chart-radar-DgsFyiIP.js.map} +1 -1
  95. package/dist/client/chunks/{chart-radial-bar-DDRo6nz-.js → chart-radial-bar-CUMoXyl9.js} +2 -2
  96. package/dist/client/chunks/{chart-radial-bar-DDRo6nz-.js.map → chart-radial-bar-CUMoXyl9.js.map} +1 -1
  97. package/dist/client/chunks/{chart-sankey-C_bgIfg-.js → chart-sankey-IAKDEe7A.js} +2 -2
  98. package/dist/client/chunks/{chart-sankey-C_bgIfg-.js.map → chart-sankey-IAKDEe7A.js.map} +1 -1
  99. package/dist/client/chunks/{chart-scatter-DjmJRlK0.js → chart-scatter-D6XwOD2W.js} +15 -15
  100. package/dist/client/chunks/{chart-scatter-DjmJRlK0.js.map → chart-scatter-D6XwOD2W.js.map} +1 -1
  101. package/dist/client/chunks/{chart-sunburst-CbMEnaes.js → chart-sunburst-CP_pnj0S.js} +2 -2
  102. package/dist/client/chunks/{chart-sunburst-CbMEnaes.js.map → chart-sunburst-CP_pnj0S.js.map} +1 -1
  103. package/dist/client/chunks/{chart-tree-map-DEfJtJVC.js → chart-tree-map-DQMsn47a.js} +30 -30
  104. package/dist/client/chunks/{chart-tree-map-DEfJtJVC.js.map → chart-tree-map-DQMsn47a.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-Dk_9XrA7.js +230 -0
  108. package/dist/client/chunks/charts-Dk_9XrA7.js.map +1 -0
  109. package/dist/client/chunks/{charts-core-CXrhEEVF.js → charts-core-CjQZBxmv.js} +10 -10
  110. package/dist/client/chunks/{charts-core-CXrhEEVF.js.map → charts-core-CjQZBxmv.js.map} +1 -1
  111. package/dist/client/chunks/{charts-loader-BtsnUO4Q.js → charts-loader-ChTUa_-G.js} +30 -28
  112. package/dist/client/chunks/charts-loader-ChTUa_-G.js.map +1 -0
  113. package/dist/client/chunks/{components-BDrlf9Er.js → components-BKZ7EAg0.js} +3575 -3208
  114. package/dist/client/chunks/components-BKZ7EAg0.js.map +1 -0
  115. package/dist/client/chunks/{core-B8zw0qRf.js → core-BRC075EG.js} +2 -2
  116. package/dist/client/chunks/{core-B8zw0qRf.js.map → core-BRC075EG.js.map} +1 -1
  117. package/dist/client/chunks/hooks-D7APQ8uS.js +150 -0
  118. package/dist/client/chunks/{hooks-B8Zw5PfL.js.map → hooks-D7APQ8uS.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-Cj7PQfXn.js} +2 -2
  122. package/dist/client/chunks/{providers-CqCiJTEj.js.map → providers-Cj7PQfXn.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-ZSi3voVl.js} +101 -99
  126. package/dist/client/chunks/useDirtyStateTracking-ZSi3voVl.js.map +1 -0
  127. package/dist/client/chunks/{vendor-DzzxS7Ay.js → vendor-cTQhZ_G3.js} +549 -541
  128. package/dist/client/chunks/vendor-cTQhZ_G3.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 +101 -79
  163. package/dist/server/index.d.ts +427 -0
  164. package/dist/server/index.js +9140 -4934
  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,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- import { AnalysisType } from '../../types';
2
+ import { AnalysisType, CubeMeta } from '../../types';
3
3
  interface AnalysisTypeSelectorProps {
4
4
  /** Currently selected analysis type */
5
5
  value: AnalysisType;
@@ -7,6 +7,8 @@ interface AnalysisTypeSelectorProps {
7
7
  onChange: (type: AnalysisType) => void;
8
8
  /** Disable the selector */
9
9
  disabled?: boolean;
10
+ /** Cube metadata for eventStream detection */
11
+ schema?: CubeMeta | null;
10
12
  }
11
13
  /**
12
14
  * AnalysisTypeSelector - Horizontal tabs for analysis type selection
@@ -0,0 +1,36 @@
1
+ import { default as React } from 'react';
2
+ import { CubeMeta, FunnelBindingKey } from '../../types';
3
+ import { DateRange } from '../../types/retention';
4
+ export interface RetentionConfigPanelProps {
5
+ /** Currently selected cube */
6
+ selectedCube: string | null;
7
+ /** Binding key that identifies entities */
8
+ bindingKey: FunnelBindingKey | null;
9
+ /** Timestamp dimension for the analysis */
10
+ timeDimension: string | null;
11
+ /** Date range for cohort analysis (for collapsed summary display) */
12
+ dateRange: DateRange;
13
+ /** Cube metadata for field selection */
14
+ schema: CubeMeta | null;
15
+ /** Callback when cube changes */
16
+ onCubeChange: (cube: string | null) => void;
17
+ /** Callback when binding key changes */
18
+ onBindingKeyChange: (bindingKey: FunnelBindingKey | null) => void;
19
+ /** Callback when timestamp dimension changes */
20
+ onTimeDimensionChange: (dimension: string | null) => void;
21
+ }
22
+ /**
23
+ * Date range selector component
24
+ * Exported for use in RetentionModeContent
25
+ */
26
+ export interface DateRangeSelectorProps {
27
+ dateRange: DateRange;
28
+ onDateRangeChange: (range: DateRange) => void;
29
+ }
30
+ export declare const DateRangeSelector: React.NamedExoticComponent<DateRangeSelectorProps>;
31
+ /**
32
+ * RetentionConfigPanel displays selectors for cube, binding key, time dimension,
33
+ * and date range in a collapsible section.
34
+ */
35
+ declare const RetentionConfigPanel: React.NamedExoticComponent<RetentionConfigPanelProps>;
36
+ export default RetentionConfigPanel;
@@ -0,0 +1,71 @@
1
+ import { CubeMeta, FunnelBindingKey, ChartType, ChartDisplayConfig, Filter } from '../../types';
2
+ import { ColorPalette } from '../../utils/colorPalettes';
3
+ import { DateRange, RetentionGranularity, RetentionType, RetentionBreakdownItem } from '../../types/retention';
4
+ export interface RetentionModeContentProps {
5
+ /** Currently selected cube for retention analysis */
6
+ retentionCube: string | null;
7
+ /** Binding key that links events to entities */
8
+ retentionBindingKey: FunnelBindingKey | null;
9
+ /** Time dimension for event ordering */
10
+ retentionTimeDimension: string | null;
11
+ /** Date range for cohort analysis */
12
+ retentionDateRange: DateRange;
13
+ /** Cohort filters - define who enters the cohort */
14
+ retentionCohortFilters: Filter[];
15
+ /** Activity filters - define what counts as a return */
16
+ retentionActivityFilters: Filter[];
17
+ /** Breakdown dimensions for segmentation */
18
+ retentionBreakdowns: RetentionBreakdownItem[];
19
+ /** Granularity for viewing retention periods */
20
+ retentionViewGranularity: RetentionGranularity;
21
+ /** Number of periods to analyze */
22
+ retentionPeriods: number;
23
+ /** Retention calculation type */
24
+ retentionType: RetentionType;
25
+ /** Cube metadata for field selection */
26
+ schema: CubeMeta | null;
27
+ /** Callback when cube changes */
28
+ onCubeChange: (cube: string | null) => void;
29
+ /** Callback when binding key changes */
30
+ onBindingKeyChange: (key: FunnelBindingKey | null) => void;
31
+ /** Callback when time dimension changes */
32
+ onTimeDimensionChange: (dim: string | null) => void;
33
+ /** Callback when date range changes */
34
+ onDateRangeChange: (range: DateRange) => void;
35
+ /** Callback when cohort filters change */
36
+ onCohortFiltersChange: (filters: Filter[]) => void;
37
+ /** Callback when activity filters change */
38
+ onActivityFiltersChange: (filters: Filter[]) => void;
39
+ /** Callback when breakdowns change (set all) */
40
+ onBreakdownsChange: (breakdowns: RetentionBreakdownItem[]) => void;
41
+ /** Callback to add a breakdown */
42
+ onAddBreakdown: (breakdown: RetentionBreakdownItem) => void;
43
+ /** Callback to remove a breakdown */
44
+ onRemoveBreakdown: (field: string) => void;
45
+ /** Callback when granularity changes */
46
+ onGranularityChange: (granularity: RetentionGranularity) => void;
47
+ /** Callback when periods changes */
48
+ onPeriodsChange: (periods: number) => void;
49
+ /** Callback when retention type changes */
50
+ onRetentionTypeChange: (type: RetentionType) => void;
51
+ /** Callback to open field modal for adding breakdowns */
52
+ onOpenFieldModal?: () => void;
53
+ /** Chart type for retention display */
54
+ chartType?: ChartType;
55
+ /** Callback when chart type changes */
56
+ onChartTypeChange?: (type: ChartType) => void;
57
+ /** Display configuration */
58
+ displayConfig?: ChartDisplayConfig;
59
+ /** Color palette */
60
+ colorPalette?: ColorPalette;
61
+ /** Callback when display config changes */
62
+ onDisplayConfigChange?: (config: ChartDisplayConfig) => void;
63
+ }
64
+ /**
65
+ * RetentionModeContent displays the complete retention configuration interface:
66
+ * - Tabs: Retention | Display
67
+ * - Retention tab: Config panel + cohort filter + activity filter + breakdown + settings
68
+ * - Display tab: Heatmap/chart display options
69
+ */
70
+ declare const RetentionModeContent: import('react').NamedExoticComponent<RetentionModeContentProps>;
71
+ export default RetentionModeContent;
@@ -299,6 +299,54 @@ export interface AnalysisQueryPanelProps {
299
299
  flowDisplayConfig?: ChartDisplayConfig;
300
300
  /** Callback when flow display config changes */
301
301
  onFlowDisplayConfigChange?: (config: ChartDisplayConfig) => void;
302
+ /** Single cube for retention analysis */
303
+ retentionCube?: string | null;
304
+ /** Binding key for retention analysis */
305
+ retentionBindingKey?: import('../../types').FunnelBindingKey | null;
306
+ /** Single timestamp dimension for retention */
307
+ retentionTimeDimension?: string | null;
308
+ /** Date range for cohort analysis (REQUIRED) */
309
+ retentionDateRange?: import('../../types/retention').DateRange;
310
+ /** Cohort filters - define who enters the cohort */
311
+ retentionCohortFilters?: Filter[];
312
+ /** Activity filters - define what counts as a return */
313
+ retentionActivityFilters?: Filter[];
314
+ /** Breakdown dimensions for segmentation */
315
+ retentionBreakdowns?: import('../../types/retention').RetentionBreakdownItem[];
316
+ /** Granularity for viewing retention periods */
317
+ retentionViewGranularity?: import('../../types/retention').RetentionGranularity;
318
+ /** Number of periods */
319
+ retentionPeriods?: number;
320
+ /** Retention type */
321
+ retentionType?: import('../../types/retention').RetentionType;
322
+ /** Retention display config */
323
+ retentionDisplayConfig?: ChartDisplayConfig;
324
+ /** Callback when cube changes */
325
+ onRetentionCubeChange?: (cube: string | null) => void;
326
+ /** Callback when retention binding key changes */
327
+ onRetentionBindingKeyChange?: (key: import('../../types').FunnelBindingKey | null) => void;
328
+ /** Callback when time dimension changes */
329
+ onRetentionTimeDimensionChange?: (dim: string | null) => void;
330
+ /** Callback when date range changes */
331
+ onRetentionDateRangeChange?: (range: import('../../types/retention').DateRange) => void;
332
+ /** Callback when cohort filters change */
333
+ onRetentionCohortFiltersChange?: (filters: Filter[]) => void;
334
+ /** Callback when activity filters change */
335
+ onRetentionActivityFiltersChange?: (filters: Filter[]) => void;
336
+ /** Callback when breakdowns change (set all) */
337
+ onRetentionBreakdownsChange?: (breakdowns: import('../../types/retention').RetentionBreakdownItem[]) => void;
338
+ /** Callback to add a breakdown */
339
+ onAddRetentionBreakdown?: (breakdown: import('../../types/retention').RetentionBreakdownItem) => void;
340
+ /** Callback to remove a breakdown */
341
+ onRemoveRetentionBreakdown?: (field: string) => void;
342
+ /** Callback when granularity changes */
343
+ onRetentionViewGranularityChange?: (granularity: import('../../types/retention').RetentionGranularity) => void;
344
+ /** Callback when periods changes */
345
+ onRetentionPeriodsChange?: (periods: number) => void;
346
+ /** Callback when retention type changes */
347
+ onRetentionTypeChange?: (type: import('../../types/retention').RetentionType) => void;
348
+ /** Callback when retention display config changes */
349
+ onRetentionDisplayConfigChange?: (config: ChartDisplayConfig) => void;
302
350
  }
303
351
  /**
304
352
  * Props for the AnalysisResultsPanel component
@@ -429,6 +477,37 @@ export interface AnalysisResultsPanelProps {
429
477
  error: Error | null;
430
478
  flowMetadata?: unknown;
431
479
  } | null;
480
+ /**
481
+ * In retention mode, the actual server query { retention: {...} } sent to the API.
482
+ * Use this for debug display.
483
+ */
484
+ retentionServerQuery?: unknown;
485
+ /**
486
+ * Unified debug data for retention queries (SQL, analysis, loading/error state).
487
+ * Contains the CTE-based SQL for the retention analysis.
488
+ */
489
+ retentionDebugData?: {
490
+ sql: {
491
+ sql: string;
492
+ params: unknown[];
493
+ } | null;
494
+ analysis: unknown;
495
+ loading: boolean;
496
+ error: Error | null;
497
+ retentionMetadata?: unknown;
498
+ } | null;
499
+ /**
500
+ * Retention chart data (cohort × period matrix) for rendering.
501
+ */
502
+ retentionChartData?: import('../../types/retention').RetentionChartData | null;
503
+ /**
504
+ * Retention validation result (errors explaining why query cannot be built).
505
+ */
506
+ retentionValidation?: {
507
+ isValid: boolean;
508
+ errors: string[];
509
+ warnings: string[];
510
+ } | null;
432
511
  }
433
512
  /**
434
513
  * Props for the MetricsSection component
@@ -580,6 +659,24 @@ export interface AnalysisBuilderInitialFlowState {
580
659
  flowChartConfig?: ChartAxisConfig;
581
660
  flowDisplayConfig?: ChartDisplayConfig;
582
661
  }
662
+ /**
663
+ * Initial retention state for AnalysisBuilder (matches RetentionSliceState in store)
664
+ */
665
+ export interface AnalysisBuilderInitialRetentionState {
666
+ retentionCube?: string | null;
667
+ retentionBindingKey?: FunnelBindingKey | null;
668
+ retentionTimeDimension?: string | null;
669
+ retentionDateRange?: import('../../types/retention').DateRange;
670
+ retentionCohortFilters?: Filter[];
671
+ retentionActivityFilters?: Filter[];
672
+ retentionBreakdowns?: import('../../types/retention').RetentionBreakdownItem[];
673
+ retentionViewGranularity?: import('../../types/retention').RetentionGranularity;
674
+ retentionPeriods?: number;
675
+ retentionType?: import('../../types/retention').RetentionType;
676
+ retentionChartType?: ChartType;
677
+ retentionChartConfig?: ChartAxisConfig;
678
+ retentionDisplayConfig?: ChartDisplayConfig;
679
+ }
583
680
  /**
584
681
  * Props for the main AnalysisBuilder component
585
682
  */
@@ -606,6 +703,8 @@ export interface AnalysisBuilderProps {
606
703
  initialFunnelState?: AnalysisBuilderInitialFunnelState;
607
704
  /** Initial flow state (when initialAnalysisType === 'flow') */
608
705
  initialFlowState?: AnalysisBuilderInitialFlowState;
706
+ /** Initial retention state (when initialAnalysisType === 'retention') */
707
+ initialRetentionState?: AnalysisBuilderInitialRetentionState;
609
708
  /** Initial data to display (avoids re-fetching when editing existing portlets) */
610
709
  initialData?: any[];
611
710
  /** Color palette for chart visualization */
@@ -1,9 +1,10 @@
1
1
  import { FlowChartData } from '../types/flow';
2
+ import { RetentionChartData } from '../types/retention';
2
3
  interface DebugModalProps {
3
4
  chartConfig: any;
4
5
  displayConfig: any;
5
6
  queryObject: any;
6
- data: any[] | FlowChartData;
7
+ data: any[] | FlowChartData | RetentionChartData;
7
8
  chartType: string;
8
9
  cacheInfo?: {
9
10
  hit: true;
@@ -0,0 +1,2 @@
1
+ import { ChartTypeConfig } from '../../charts/chartConfigs';
2
+ export declare const retentionCombinedConfig: ChartTypeConfig;
@@ -0,0 +1,14 @@
1
+ import { default as React } from 'react';
2
+ import { ChartProps } from '../../types';
3
+ /**
4
+ * Retention display mode
5
+ * - 'heatmap': Show retention as color-coded bars
6
+ * - 'line': Show retention as line curves
7
+ * - 'combined': Show both heatmap background and line overlay
8
+ */
9
+ export type RetentionDisplayMode = 'heatmap' | 'line' | 'combined';
10
+ /**
11
+ * RetentionCombinedChart Component
12
+ */
13
+ declare const RetentionCombinedChart: React.NamedExoticComponent<ChartProps>;
14
+ export default RetentionCombinedChart;
@@ -0,0 +1,2 @@
1
+ import { ChartTypeConfig } from '../../charts/chartConfigs';
2
+ export declare const retentionHeatmapConfig: ChartTypeConfig;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ import { ChartProps } from '../../types';
3
+ /**
4
+ * RetentionHeatmap Component
5
+ */
6
+ declare const RetentionHeatmap: React.NamedExoticComponent<ChartProps>;
7
+ export default RetentionHeatmap;
@@ -1,5 +1,5 @@
1
- import { a as s, A as t, c as r, D as o, M as d, P as i, Q as l } from "./chunks/components-BDrlf9Er.js";
2
- import { c as b, d as c, b as u, a as y, g as P, v as D } from "./chunks/charts-xNubY0vm.js";
1
+ import { a as s, A as t, c as r, D as o, M as d, P as i, Q as l } from "./chunks/components-BKZ7EAg0.js";
2
+ import { c as b, d as c, b as u, a as y, g as P, v as D } from "./chunks/charts-Dk_9XrA7.js";
3
3
  export {
4
4
  s as AnalyticsDashboard,
5
5
  t as AnalyticsPortlet,
@@ -12,8 +12,9 @@
12
12
  export { useCubeMetaQuery, prefetchCubeMeta, CUBE_META_QUERY_KEY, type UseCubeMetaQueryOptions, type UseCubeMetaQueryResult, } from './useCubeMetaQuery';
13
13
  export { useCubeLoadQuery, useCubeLoadQuery as useCubeQuery, createQueryKey, type UseCubeLoadQueryOptions, type UseCubeLoadQueryResult, } from './useCubeLoadQuery';
14
14
  export { useMultiCubeLoadQuery, createMultiQueryKey, type UseMultiCubeLoadQueryOptions, type UseMultiCubeLoadQueryResult, } from './useMultiCubeLoadQuery';
15
- export { useDryRunQuery, useMultiDryRunQueries, useDryRunQueries, useFunnelDryRunQuery, useFlowDryRunQuery, createDryRunQueryKey, type DebugDataEntry, type FunnelDebugDataEntry, type FlowDebugDataEntry, type UseDryRunQueryOptions, type UseDryRunQueryResult, type UseMultiDryRunQueriesOptions, type UseMultiDryRunQueriesResult, } from './useDryRunQuery';
15
+ export { useDryRunQuery, useMultiDryRunQueries, useDryRunQueries, useFunnelDryRunQuery, useFlowDryRunQuery, useRetentionDryRunQuery, createDryRunQueryKey, type DebugDataEntry, type FunnelDebugDataEntry, type FlowDebugDataEntry, type RetentionDebugDataEntry, type UseDryRunQueryOptions, type UseDryRunQueryResult, type UseMultiDryRunQueriesOptions, type UseMultiDryRunQueriesResult, } from './useDryRunQuery';
16
16
  export { useFunnelQuery, createFunnelQueryKey, } from './useFunnelQuery';
17
17
  export { useFlowQuery, createFlowQueryKey, type UseFlowQueryOptions, type UseFlowQueryResult, } from './useFlowQuery';
18
+ export { useRetentionQuery, type UseRetentionQueryOptions, type UseRetentionQueryResult, } from './useRetentionQuery';
18
19
  export { useExplainQuery, createExplainQueryKey, type UseExplainQueryOptions, type UseExplainQueryResult, } from './useExplainQuery';
19
20
  export { useExplainAI, type UseExplainAIOptions, type UseExplainAIResult, } from './useExplainAI';
@@ -159,3 +159,29 @@ export declare function useFlowDryRunQuery(serverQuery: unknown | null, options?
159
159
  debugData: FlowDebugDataEntry;
160
160
  refetch: () => void;
161
161
  };
162
+ /**
163
+ * Debug data entry for retention queries
164
+ */
165
+ export interface RetentionDebugDataEntry extends DebugDataEntry {
166
+ /** Retention-specific metadata from server */
167
+ retentionMetadata?: {
168
+ totalCohorts: number;
169
+ totalUsers: number;
170
+ periods: number;
171
+ cohortGranularity: string;
172
+ periodGranularity: string;
173
+ retentionType: string;
174
+ };
175
+ }
176
+ /**
177
+ * TanStack Query hook for retention query dry-run (debug) data
178
+ *
179
+ * Usage:
180
+ * ```tsx
181
+ * const { debugData } = useRetentionDryRunQuery(serverQuery, { skip: !isRetentionMode })
182
+ * ```
183
+ */
184
+ export declare function useRetentionDryRunQuery(serverQuery: unknown | null, options?: UseDryRunQueryOptions): {
185
+ debugData: RetentionDebugDataEntry;
186
+ refetch: () => void;
187
+ };
@@ -1,11 +1,13 @@
1
1
  import { CubeQuery, ExplainResult, ExplainOptions } from '../../types';
2
2
  /**
3
- * Query type that can be explained - includes standard queries, funnel queries, and flow queries
3
+ * Query type that can be explained - includes standard queries, funnel queries, flow queries, and retention queries
4
4
  */
5
5
  export type ExplainableQuery = CubeQuery | {
6
6
  funnel: unknown;
7
7
  } | {
8
8
  flow: unknown;
9
+ } | {
10
+ retention: unknown;
9
11
  } | unknown;
10
12
  /**
11
13
  * Create a stable query key for explain
@@ -45,6 +45,11 @@ export interface UseFlowQueryResult {
45
45
  reset: () => void;
46
46
  /** The server query being executed */
47
47
  serverQuery: ServerFlowQuery | null;
48
+ /**
49
+ * Whether the query needs to be refreshed (manual refresh mode only).
50
+ * True when the current flow config differs from the last executed query.
51
+ */
52
+ needsRefresh: boolean;
48
53
  }
49
54
  /**
50
55
  * Hook for server-side flow query execution
@@ -0,0 +1,67 @@
1
+ import { ServerRetentionQuery, RetentionChartData, RetentionResultRow } from '../../types/retention';
2
+ /**
3
+ * Options for retention query hook
4
+ */
5
+ export interface UseRetentionQueryOptions {
6
+ /** Skip execution */
7
+ skip?: boolean;
8
+ /** Debounce delay in milliseconds */
9
+ debounceMs?: number;
10
+ /** Callback when query completes */
11
+ onComplete?: (result: RetentionChartData) => void;
12
+ /** Callback when query fails */
13
+ onError?: (error: Error) => void;
14
+ /** Function to resolve field names to human-readable display labels */
15
+ getFieldLabel?: (fieldName: string) => string;
16
+ }
17
+ /**
18
+ * Result from retention query hook
19
+ */
20
+ export interface UseRetentionQueryResult {
21
+ /** Retention chart data */
22
+ chartData: RetentionChartData | null;
23
+ /** Raw data rows from server */
24
+ rawData: RetentionResultRow[] | null;
25
+ /** Current execution status */
26
+ status: 'idle' | 'loading' | 'success' | 'error';
27
+ /** Whether currently loading */
28
+ isLoading: boolean;
29
+ /** Whether fetching (includes refetch) */
30
+ isFetching: boolean;
31
+ /** Whether waiting for debounce */
32
+ isDebouncing: boolean;
33
+ /** Error if execution failed */
34
+ error: Error | null;
35
+ /** Cache metadata when served from cache */
36
+ cacheInfo?: {
37
+ hit: true;
38
+ cachedAt: string;
39
+ ttlMs: number;
40
+ ttlRemainingMs: number;
41
+ } | null;
42
+ /** Execute the query (for manual refresh mode) */
43
+ execute: (options?: {
44
+ bustCache?: boolean;
45
+ }) => Promise<RetentionChartData | null>;
46
+ /** Refetch the query */
47
+ refetch: () => void;
48
+ /**
49
+ * Whether the query needs to be refreshed (manual refresh mode only).
50
+ * True when the current query config differs from the last executed query.
51
+ */
52
+ needsRefresh: boolean;
53
+ }
54
+ /**
55
+ * Hook for server-side retention query execution
56
+ *
57
+ * Usage:
58
+ * ```tsx
59
+ * const { chartData, isLoading, error } = useRetentionQuery(serverQuery, {
60
+ * debounceMs: 300,
61
+ * skip: !hasRequiredFields
62
+ * })
63
+ *
64
+ * <RetentionHeatmap data={chartData} />
65
+ * ```
66
+ */
67
+ export declare function useRetentionQuery(serverQuery: ServerRetentionQuery | null, options?: UseRetentionQueryOptions): UseRetentionQueryResult;
@@ -68,6 +68,28 @@ export interface UseAnalysisBuilderResult {
68
68
  joinStrategy: 'auto' | 'lateral' | 'window';
69
69
  /** Display config for flow mode */
70
70
  flowDisplayConfig: ChartDisplayConfig;
71
+ /** Single cube for retention analysis */
72
+ retentionCube: string | null;
73
+ /** Binding key for retention mode */
74
+ retentionBindingKey: import('../types/funnel').FunnelBindingKey | null;
75
+ /** Single timestamp dimension for retention mode */
76
+ retentionTimeDimension: string | null;
77
+ /** Date range for cohort analysis (REQUIRED) */
78
+ retentionDateRange: import('../types/retention').DateRange;
79
+ /** Cohort filters for retention mode */
80
+ retentionCohortFilters: import('../types').Filter[];
81
+ /** Activity filters for retention mode */
82
+ retentionActivityFilters: import('../types').Filter[];
83
+ /** Optional breakdown dimensions for segmenting the cohort */
84
+ retentionBreakdowns: import('../types/retention').RetentionBreakdownItem[];
85
+ /** Granularity for viewing retention periods (day/week/month) */
86
+ retentionViewGranularity: import('../types/retention').RetentionGranularity;
87
+ /** Number of periods for retention mode */
88
+ retentionPeriods: number;
89
+ /** Retention calculation type */
90
+ retentionType: import('../types/retention').RetentionType;
91
+ /** Display config for retention mode */
92
+ retentionDisplayConfig: ChartDisplayConfig | undefined;
71
93
  executionStatus: ExecutionStatus;
72
94
  executionResults: unknown[] | null;
73
95
  perQueryResults: (unknown[] | null)[] | null;
@@ -76,6 +98,11 @@ export interface UseAnalysisBuilderResult {
76
98
  error: Error | null;
77
99
  isValidQuery: boolean;
78
100
  debugDataPerQuery: DebugDataEntry[];
101
+ /**
102
+ * Whether the current query config differs from the last executed query.
103
+ * Used for manual refresh mode to show "needs refresh" indicator.
104
+ */
105
+ needsRefresh: boolean;
79
106
  /** In funnel mode, the actually executed queries with binding key dimension and IN filters */
80
107
  funnelExecutedQueries: CubeQuery[] | null;
81
108
  /** In funnel mode, the actual server query { funnel: {...} } sent to the API */
@@ -104,6 +131,27 @@ export interface UseAnalysisBuilderResult {
104
131
  error: Error | null;
105
132
  flowMetadata?: unknown;
106
133
  } | null;
134
+ /** In retention mode, the actual server query { retention: {...} } sent to the API */
135
+ retentionServerQuery: unknown | null;
136
+ /** In retention mode, unified debug data (SQL, analysis, retention metadata) */
137
+ retentionDebugData: {
138
+ sql: {
139
+ sql: string;
140
+ params: unknown[];
141
+ } | null;
142
+ analysis: unknown | null;
143
+ loading: boolean;
144
+ error: Error | null;
145
+ retentionMetadata?: unknown;
146
+ } | null;
147
+ /** In retention mode, the chart data (cohort × period matrix) */
148
+ retentionChartData: import('../types/retention').RetentionChartData | null;
149
+ /** In retention mode, validation result (errors explaining why query cannot be built) */
150
+ retentionValidation: {
151
+ isValid: boolean;
152
+ errors: string[];
153
+ warnings: string[];
154
+ } | null;
107
155
  chartType: ChartType;
108
156
  chartConfig: ChartAxisConfig;
109
157
  displayConfig: ChartDisplayConfig;
@@ -171,6 +219,19 @@ export interface UseAnalysisBuilderResult {
171
219
  setStepsAfter: (count: number) => void;
172
220
  setJoinStrategy: (strategy: 'auto' | 'lateral' | 'window') => void;
173
221
  setFlowDisplayConfig: (config: ChartDisplayConfig) => void;
222
+ setRetentionCube: (cube: string | null) => void;
223
+ setRetentionBindingKey: (key: import('../types/funnel').FunnelBindingKey | null) => void;
224
+ setRetentionTimeDimension: (dim: string | null) => void;
225
+ setRetentionDateRange: (range: import('../types/retention').DateRange) => void;
226
+ setRetentionCohortFilters: (filters: import('../types').Filter[]) => void;
227
+ setRetentionActivityFilters: (filters: import('../types').Filter[]) => void;
228
+ setRetentionBreakdowns: (breakdowns: import('../types/retention').RetentionBreakdownItem[]) => void;
229
+ addRetentionBreakdown: (breakdown: import('../types/retention').RetentionBreakdownItem) => void;
230
+ removeRetentionBreakdown: (field: string) => void;
231
+ setRetentionViewGranularity: (granularity: import('../types/retention').RetentionGranularity) => void;
232
+ setRetentionPeriods: (periods: number) => void;
233
+ setRetentionType: (type: import('../types/retention').RetentionType) => void;
234
+ setRetentionDisplayConfig: (config: ChartDisplayConfig) => void;
174
235
  setChartType: (type: ChartType) => void;
175
236
  setChartConfig: (config: ChartAxisConfig) => void;
176
237
  setDisplayConfig: (config: ChartDisplayConfig) => void;
@@ -1,8 +1,9 @@
1
- import { DebugDataEntry, FunnelDebugDataEntry, FlowDebugDataEntry } from './queries';
1
+ import { DebugDataEntry, FunnelDebugDataEntry, FlowDebugDataEntry, RetentionDebugDataEntry } from './queries';
2
2
  import { CubeQuery, MultiQueryConfig, FunnelBindingKey, QueryMergeStrategy, AnalysisType } from '../types';
3
3
  import { ExecutionStatus } from '../components/AnalysisBuilder/types';
4
4
  import { ServerFunnelQuery } from '../types/funnel';
5
5
  import { ServerFlowQuery, FlowChartData } from '../types/flow';
6
+ import { ServerRetentionQuery, RetentionChartData } from '../types/retention';
6
7
  export interface UseAnalysisQueryExecutionOptions {
7
8
  /** Current query (for single-query mode) */
8
9
  currentQuery: CubeQuery;
@@ -41,6 +42,20 @@ export interface UseAnalysisQueryExecutionOptions {
41
42
  * Used when analysisType === 'flow' with the new dedicated flow state.
42
43
  */
43
44
  serverFlowQuery?: ServerFlowQuery | null;
45
+ /**
46
+ * Pre-built server retention query from store's buildRetentionQuery().
47
+ * Used when analysisType === 'retention' with the new dedicated retention state.
48
+ */
49
+ serverRetentionQuery?: ServerRetentionQuery | null;
50
+ /**
51
+ * Validation result for retention mode from store's getRetentionValidation().
52
+ * Used to display specific errors in the debug panel.
53
+ */
54
+ retentionValidation?: {
55
+ isValid: boolean;
56
+ errors: string[];
57
+ warnings: string[];
58
+ } | null;
44
59
  }
45
60
  export interface UseAnalysisQueryExecutionResult {
46
61
  /** Query execution status */
@@ -94,5 +109,31 @@ export interface UseAnalysisQueryExecutionResult {
94
109
  * Contains the flow SQL and flow-specific metadata
95
110
  */
96
111
  flowDebugData: FlowDebugDataEntry | null;
112
+ /**
113
+ * The server retention query being executed (when analysisType === 'retention')
114
+ */
115
+ retentionServerQuery: ServerRetentionQuery | null;
116
+ /**
117
+ * Retention chart data (cohort × period matrix)
118
+ */
119
+ retentionChartData: RetentionChartData | null;
120
+ /**
121
+ * Debug data specifically for retention mode
122
+ * Contains the retention SQL and retention-specific metadata
123
+ */
124
+ retentionDebugData: RetentionDebugDataEntry | null;
125
+ /**
126
+ * Retention validation result (errors explaining why query cannot be built)
127
+ */
128
+ retentionValidation: {
129
+ isValid: boolean;
130
+ errors: string[];
131
+ warnings: string[];
132
+ } | null;
133
+ /**
134
+ * Whether the current query config differs from the last executed query.
135
+ * Used for manual refresh mode to show "needs refresh" indicator.
136
+ */
137
+ needsRefresh: boolean;
97
138
  }
98
139
  export declare function useAnalysisQueryExecution(options: UseAnalysisQueryExecutionOptions): UseAnalysisQueryExecutionResult;
@@ -1,6 +1,6 @@
1
- import { u as s, u as a, k as r, o, n as t, a as y, p as i } from "./chunks/useDirtyStateTracking-C_mitVwh.js";
2
- import { g as n } from "./chunks/providers-CqCiJTEj.js";
3
- import { b as D, u as p, a as l } from "./chunks/hooks-B8Zw5PfL.js";
1
+ import { u as s, u as a, k as r, o, n as t, a as y, p as i } from "./chunks/useDirtyStateTracking-ZSi3voVl.js";
2
+ import { g as n } from "./chunks/providers-Cj7PQfXn.js";
3
+ import { b as D, u as p, a as l } from "./chunks/hooks-D7APQ8uS.js";
4
4
  export {
5
5
  s as useCubeLoadQuery,
6
6
  n as useCubeMetaQuery,
@@ -13,3 +13,10 @@ export declare const flowIcon: IconifyIcon;
13
13
  * 24x24 viewBox, stroke-width 1.5 for clean appearance
14
14
  */
15
15
  export declare const funnelIcon: IconifyIcon;
16
+ /**
17
+ * Custom Retention icon
18
+ * Grid/heatmap pattern representing cohort retention matrix
19
+ * Shows users tracked across time periods with varying intensity cells
20
+ * 24x24 viewBox, stroke-width 1.5 for clean appearance
21
+ */
22
+ export declare const retentionIcon: IconifyIcon;
@@ -84,6 +84,7 @@ export interface IconRegistry {
84
84
  chartSankey: IconDefinition;
85
85
  chartSunburst: IconDefinition;
86
86
  chartHeatmap: IconDefinition;
87
+ chartRetention: IconDefinition;
87
88
  measureCount: IconDefinition;
88
89
  measureCountDistinct: IconDefinition;
89
90
  measureCountDistinctApprox: IconDefinition;
@@ -1,4 +1,4 @@
1
- import { D as a, g as t, i as o, b as c, c as g, f as I, h as n, a as r, r as y, e as i, s as p } from "./chunks/icons-NzFHtqeM.js";
1
+ import { D as a, a as t, i as o, b as c, c as g, f as I, h as n, g as r, r as y, e as i, s as p } from "./chunks/icons-DRreo6m8.js";
2
2
  export {
3
3
  a as DEFAULT_ICONS,
4
4
  t as getChartTypeIcon,