drizzle-cube 0.4.53 → 0.5.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.
- package/dist/adapters/express/index.cjs +2 -2
- package/dist/adapters/express/index.js +109 -96
- package/dist/adapters/fastify/index.cjs +2 -2
- package/dist/adapters/fastify/index.js +148 -134
- package/dist/adapters/{handler-RItnSaEl.js → handler-3LGcjLtr.js} +617 -612
- package/dist/adapters/handler-BzzbVpcl.cjs +25 -0
- package/dist/adapters/hono/index.cjs +1 -1
- package/dist/adapters/hono/index.js +103 -99
- package/dist/adapters/{compiler-S6KHiOY6.js → locale-DTnJrxm1.js} +1700 -1563
- package/dist/adapters/locale-DueXjqMh.cjs +198 -0
- package/dist/adapters/locale.d.ts +8 -0
- package/dist/adapters/mcp-tools.cjs +1 -1
- package/dist/adapters/mcp-tools.d.ts +7 -3
- package/dist/adapters/mcp-tools.js +27 -27
- package/dist/adapters/mcp-transport-C7VLf4T5.js +579 -0
- package/dist/adapters/mcp-transport-poPHl_2j.cjs +39 -0
- package/dist/adapters/mcp-transport.d.ts +25 -2
- package/dist/adapters/nextjs/index.cjs +1 -1
- package/dist/adapters/nextjs/index.js +152 -132
- package/dist/adapters/utils-DNrj-ryp.cjs +17 -0
- package/dist/adapters/{utils-IH1ePsBd.js → utils-DOg9oGdt.js} +2341 -819
- package/dist/adapters/utils.cjs +1 -1
- package/dist/adapters/utils.d.ts +45 -2
- package/dist/adapters/utils.js +1 -1
- package/dist/client/charts.js +12 -12
- package/dist/client/chunks/{DashboardEditModal-BTdV528l.js → DashboardEditModal-cSSIAZGy.js} +1968 -1973
- package/dist/client/chunks/DashboardEditModal-cSSIAZGy.js.map +1 -0
- package/dist/client/chunks/{FieldSearchModal-D75vy4Wb.js → FieldSearchModal-CZNo4pNK.js} +550 -536
- package/dist/client/chunks/FieldSearchModal-CZNo4pNK.js.map +1 -0
- package/dist/client/chunks/KpiDelta-Dll_eCV1.js +2 -0
- package/dist/client/chunks/KpiNumber-BPlR92hI.js +2 -0
- package/dist/client/chunks/KpiText-BIxq7Jso.js +2 -0
- package/dist/client/chunks/{RetentionCombinedChart-DIhK5pD8.js → RetentionCombinedChart-BD8tGeM_.js} +96 -96
- package/dist/client/chunks/RetentionCombinedChart-BD8tGeM_.js.map +1 -0
- package/dist/client/chunks/{RetentionHeatmap-CyREolyP.js → RetentionHeatmap-B_5sewwi.js} +77 -77
- package/dist/client/chunks/RetentionHeatmap-B_5sewwi.js.map +1 -0
- package/dist/client/chunks/SchemaVisualization-CCICjhvv.js +2 -0
- package/dist/client/chunks/SchemaVisualizationLazy-DraGsMx6.js +2 -0
- package/dist/client/chunks/af-ZA-xDmO5F0s.js +1431 -0
- package/dist/client/chunks/af-ZA-xDmO5F0s.js.map +1 -0
- package/dist/client/chunks/{analysis-builder-C1CJ0c7L.js → analysis-builder-BeVZhiQ5.js} +1519 -1507
- package/dist/client/chunks/analysis-builder-BeVZhiQ5.js.map +1 -0
- package/dist/client/chunks/{analysis-builder-shared-rkjJfWLT.js → analysis-builder-shared-BWc7ZZnG.js} +925 -954
- package/dist/client/chunks/analysis-builder-shared-BWc7ZZnG.js.map +1 -0
- package/dist/client/chunks/chart-activity-grid-CWT0gLv4.js +2376 -0
- package/dist/client/chunks/chart-activity-grid-CWT0gLv4.js.map +1 -0
- package/dist/client/chunks/{chart-area-BwYaflNk.js → chart-area-D63kG8OT.js} +157 -157
- package/dist/client/chunks/chart-area-D63kG8OT.js.map +1 -0
- package/dist/client/chunks/{chart-bar-BiENfFgE.js → chart-bar-BEfsCLjl.js} +78 -78
- package/dist/client/chunks/chart-bar-BEfsCLjl.js.map +1 -0
- package/dist/client/chunks/{chart-box-plot-BJF1tBXC.js → chart-box-plot-o-h9MRX5.js} +111 -114
- package/dist/client/chunks/chart-box-plot-o-h9MRX5.js.map +1 -0
- package/dist/client/chunks/{chart-bubble-DQQhGVDJ.js → chart-bubble-CMDp4Pfm.js} +121 -121
- package/dist/client/chunks/chart-bubble-CMDp4Pfm.js.map +1 -0
- package/dist/client/chunks/chart-candlestick-WyANJ0Ky.js +303 -0
- package/dist/client/chunks/chart-candlestick-WyANJ0Ky.js.map +1 -0
- package/dist/client/chunks/chart-config-activity-grid-C-EkgYoa.js +51 -0
- package/dist/client/chunks/chart-config-activity-grid-C-EkgYoa.js.map +1 -0
- package/dist/client/chunks/chart-config-area-CMZpbIah.js +93 -0
- package/dist/client/chunks/chart-config-area-CMZpbIah.js.map +1 -0
- package/dist/client/chunks/chart-config-bar-B8_V4YLg.js +87 -0
- package/dist/client/chunks/chart-config-bar-B8_V4YLg.js.map +1 -0
- package/dist/client/chunks/chart-config-box-plot-Dwj7sEbU.js +35 -0
- package/dist/client/chunks/chart-config-box-plot-Dwj7sEbU.js.map +1 -0
- package/dist/client/chunks/chart-config-bubble-B0w0ZVp4.js +82 -0
- package/dist/client/chunks/chart-config-bubble-B0w0ZVp4.js.map +1 -0
- package/dist/client/chunks/chart-config-candlestick-Bvo3zeIn.js +72 -0
- package/dist/client/chunks/chart-config-candlestick-Bvo3zeIn.js.map +1 -0
- package/dist/client/chunks/{chart-config-data-table-Bhdx5Hem.js → chart-config-data-table-BQXSn4b_.js} +9 -9
- package/dist/client/chunks/chart-config-data-table-BQXSn4b_.js.map +1 -0
- package/dist/client/chunks/chart-config-funnel-BzEsHmjR.js +93 -0
- package/dist/client/chunks/chart-config-funnel-BzEsHmjR.js.map +1 -0
- package/dist/client/chunks/chart-config-gauge-C5ZiyZy7.js +64 -0
- package/dist/client/chunks/chart-config-gauge-C5ZiyZy7.js.map +1 -0
- package/dist/client/chunks/chart-config-heat-map-Cv8qNnVP.js +91 -0
- package/dist/client/chunks/chart-config-heat-map-Cv8qNnVP.js.map +1 -0
- package/dist/client/chunks/chart-config-kpi-delta-BraHQc2E.js +94 -0
- package/dist/client/chunks/chart-config-kpi-delta-BraHQc2E.js.map +1 -0
- package/dist/client/chunks/chart-config-kpi-number-CeCkx7mC.js +75 -0
- package/dist/client/chunks/chart-config-kpi-number-CeCkx7mC.js.map +1 -0
- package/dist/client/chunks/chart-config-kpi-text-CImM3SvH.js +47 -0
- package/dist/client/chunks/chart-config-kpi-text-CImM3SvH.js.map +1 -0
- package/dist/client/chunks/chart-config-line-BVKapAQK.js +104 -0
- package/dist/client/chunks/chart-config-line-BVKapAQK.js.map +1 -0
- package/dist/client/chunks/chart-config-markdown-C-_g_8te.js +117 -0
- package/dist/client/chunks/chart-config-markdown-C-_g_8te.js.map +1 -0
- package/dist/client/chunks/chart-config-measure-profile-KTVV1gO3.js +82 -0
- package/dist/client/chunks/chart-config-measure-profile-KTVV1gO3.js.map +1 -0
- package/dist/client/chunks/chart-config-pie-BZxVl25X.js +68 -0
- package/dist/client/chunks/chart-config-pie-BZxVl25X.js.map +1 -0
- package/dist/client/chunks/chart-config-radar-B7FByX3t.js +49 -0
- package/dist/client/chunks/chart-config-radar-B7FByX3t.js.map +1 -0
- package/dist/client/chunks/chart-config-radial-bar-UfW_3yyX.js +38 -0
- package/dist/client/chunks/chart-config-radial-bar-UfW_3yyX.js.map +1 -0
- package/dist/client/chunks/chart-config-sankey-DGAThN9i.js +66 -0
- package/dist/client/chunks/chart-config-sankey-DGAThN9i.js.map +1 -0
- package/dist/client/chunks/chart-config-scatter-BVVJuOnt.js +61 -0
- package/dist/client/chunks/chart-config-scatter-BVVJuOnt.js.map +1 -0
- package/dist/client/chunks/chart-config-sunburst-utejM2YS.js +45 -0
- package/dist/client/chunks/chart-config-sunburst-utejM2YS.js.map +1 -0
- package/dist/client/chunks/chart-config-tree-map-IHp97OyV.js +51 -0
- package/dist/client/chunks/chart-config-tree-map-IHp97OyV.js.map +1 -0
- package/dist/client/chunks/chart-config-waterfall-BdqG1V-x.js +59 -0
- package/dist/client/chunks/chart-config-waterfall-BdqG1V-x.js.map +1 -0
- package/dist/client/chunks/{chart-data-table-2iCsn0CF.js → chart-data-table-C3Xh9jwL.js} +1083 -1086
- package/dist/client/chunks/chart-data-table-C3Xh9jwL.js.map +1 -0
- package/dist/client/chunks/{chart-funnel-poyOf7-e.js → chart-funnel-C7pgktN5.js} +132 -132
- package/dist/client/chunks/chart-funnel-C7pgktN5.js.map +1 -0
- package/dist/client/chunks/{chart-gauge-D5J4gRky.js → chart-gauge-D2r2B_AR.js} +150 -150
- package/dist/client/chunks/chart-gauge-D2r2B_AR.js.map +1 -0
- package/dist/client/chunks/{chart-heat-map-BAMVhLGG.js → chart-heat-map-Dw2yjwfO.js} +75 -80
- package/dist/client/chunks/chart-heat-map-Dw2yjwfO.js.map +1 -0
- package/dist/client/chunks/{chart-kpi-delta-KQjUIeal.js → chart-kpi-delta-CYE0S1x_.js} +117 -117
- package/dist/client/chunks/chart-kpi-delta-CYE0S1x_.js.map +1 -0
- package/dist/client/chunks/chart-kpi-number-BlZ79xHW.js +321 -0
- package/dist/client/chunks/chart-kpi-number-BlZ79xHW.js.map +1 -0
- package/dist/client/chunks/chart-kpi-text-DY1BnxPe.js +148 -0
- package/dist/client/chunks/chart-kpi-text-DY1BnxPe.js.map +1 -0
- package/dist/client/chunks/{chart-line-B5_WntY5.js → chart-line-CBsTThTv.js} +123 -123
- package/dist/client/chunks/chart-line-CBsTThTv.js.map +1 -0
- package/dist/client/chunks/chart-markdown-BWaWVkuz.js +3474 -0
- package/dist/client/chunks/chart-markdown-BWaWVkuz.js.map +1 -0
- package/dist/client/chunks/chart-measure-profile-B41qCTBG.js +179 -0
- package/dist/client/chunks/chart-measure-profile-B41qCTBG.js.map +1 -0
- package/dist/client/chunks/chart-pie-Djbu8x2v.js +172 -0
- package/dist/client/chunks/chart-pie-Djbu8x2v.js.map +1 -0
- package/dist/client/chunks/chart-radar-BsTcKV0K.js +154 -0
- package/dist/client/chunks/chart-radar-BsTcKV0K.js.map +1 -0
- package/dist/client/chunks/chart-radial-bar-Du7XNnwE.js +148 -0
- package/dist/client/chunks/chart-radial-bar-Du7XNnwE.js.map +1 -0
- package/dist/client/chunks/{chart-sankey-BOyxfG1Q.js → chart-sankey-WwkZAhLy.js} +73 -73
- package/dist/client/chunks/chart-sankey-WwkZAhLy.js.map +1 -0
- package/dist/client/chunks/chart-scatter-D8krEYsA.js +255 -0
- package/dist/client/chunks/chart-scatter-D8krEYsA.js.map +1 -0
- package/dist/client/chunks/{chart-sunburst-D9lGEOCc.js → chart-sunburst-CIDB_pTl.js} +66 -66
- package/dist/client/chunks/chart-sunburst-CIDB_pTl.js.map +1 -0
- package/dist/client/chunks/chart-tree-map-C5C2iaWM.js +298 -0
- package/dist/client/chunks/chart-tree-map-C5C2iaWM.js.map +1 -0
- package/dist/client/chunks/{chart-waterfall-BCdUx4DC.js → chart-waterfall-BGdPrJ5Y.js} +80 -80
- package/dist/client/chunks/chart-waterfall-BGdPrJ5Y.js.map +1 -0
- package/dist/client/chunks/{charts-core-C5Yokk-x.js → charts-core-BXOqaYFn.js} +92 -92
- package/dist/client/chunks/charts-core-BXOqaYFn.js.map +1 -0
- package/dist/client/chunks/en-US-5xPTdCXg.js +35 -0
- package/dist/client/chunks/en-US-5xPTdCXg.js.map +1 -0
- package/dist/client/chunks/nl-NL-vCifBijs.js +1491 -0
- package/dist/client/chunks/nl-NL-vCifBijs.js.map +1 -0
- package/dist/client/chunks/{schema-visualization-t1KiOORo.js → schema-visualization-Xp60Ff2W.js} +352 -364
- package/dist/client/chunks/schema-visualization-Xp60Ff2W.js.map +1 -0
- package/dist/client/chunks/{useDebounce-CKqkM42n.js → useDebounce-CfmUMFau.js} +85 -85
- package/dist/client/chunks/useDebounce-CfmUMFau.js.map +1 -0
- package/dist/client/chunks/{useExplainAI-DBIfYwz-.js → useExplainAI-BKGmejIj.js} +4 -4
- package/dist/client/chunks/{useExplainAI-DBIfYwz-.js.map → useExplainAI-BKGmejIj.js.map} +1 -1
- package/dist/client/chunks/{utils--qCr8Yn5.js → utils-BldkcRHv.js} +2 -2
- package/dist/client/chunks/{utils--qCr8Yn5.js.map → utils-BldkcRHv.js.map} +1 -1
- package/dist/client/chunks/{vendor-BRlsCGnK.js → vendor-ClXpIiea.js} +2 -2
- package/dist/client/chunks/{vendor-BRlsCGnK.js.map → vendor-ClXpIiea.js.map} +1 -1
- package/dist/client/components/AnalysisBuilder/types.d.ts +6 -6
- package/dist/client/components.js +3 -3
- package/dist/client/hooks/useTranslation.d.ts +21 -0
- package/dist/client/hooks.js +3 -3
- package/dist/client/icons.js +1 -1
- package/dist/client/index.js +493 -488
- package/dist/client/index.js.map +1 -1
- package/dist/client/providers/CubeApiProvider.d.ts +2 -1
- package/dist/client/providers/CubeProvider.d.ts +7 -1
- package/dist/client/providers/I18nProvider.d.ts +18 -0
- package/dist/client/providers.js +1 -1
- package/dist/client/schema.js +1 -1
- package/dist/client/shared/types.d.ts +5 -20
- package/dist/client/styles.css +1 -1
- package/dist/client/utils.js +5 -5
- package/dist/client-bundle-stats.html +1 -1
- package/dist/mcp-app/mcp-app.html +40 -36
- package/dist/server/index.cjs +42 -40
- package/dist/server/index.js +3311 -1672
- package/package.json +5 -2
- package/dist/adapters/compiler-CRgLzmSn.cjs +0 -198
- package/dist/adapters/handler-DumFgnNM.cjs +0 -25
- package/dist/adapters/mcp-transport-C6bsIOSV.js +0 -545
- package/dist/adapters/mcp-transport-DMhuYmFp.cjs +0 -39
- package/dist/adapters/utils-CyBt-as9.cjs +0 -15
- package/dist/client/chunks/DashboardEditModal-BTdV528l.js.map +0 -1
- package/dist/client/chunks/FieldSearchModal-D75vy4Wb.js.map +0 -1
- package/dist/client/chunks/KpiDelta-Bk8bzKYM.js +0 -2
- package/dist/client/chunks/KpiNumber-CKF-8e_T.js +0 -2
- package/dist/client/chunks/KpiText-Iz1vIvu_.js +0 -2
- package/dist/client/chunks/RetentionCombinedChart-DIhK5pD8.js.map +0 -1
- package/dist/client/chunks/RetentionHeatmap-CyREolyP.js.map +0 -1
- package/dist/client/chunks/SchemaVisualization-B1GUT-FM.js +0 -2
- package/dist/client/chunks/SchemaVisualizationLazy-DymwT34e.js +0 -2
- package/dist/client/chunks/analysis-builder-C1CJ0c7L.js.map +0 -1
- package/dist/client/chunks/analysis-builder-shared-rkjJfWLT.js.map +0 -1
- package/dist/client/chunks/chart-activity-grid-DLktOINm.js +0 -806
- package/dist/client/chunks/chart-activity-grid-DLktOINm.js.map +0 -1
- package/dist/client/chunks/chart-area-BwYaflNk.js.map +0 -1
- package/dist/client/chunks/chart-bar-BiENfFgE.js.map +0 -1
- package/dist/client/chunks/chart-box-plot-BJF1tBXC.js.map +0 -1
- package/dist/client/chunks/chart-bubble-DQQhGVDJ.js.map +0 -1
- package/dist/client/chunks/chart-candlestick-C2UuXbLe.js +0 -306
- package/dist/client/chunks/chart-candlestick-C2UuXbLe.js.map +0 -1
- package/dist/client/chunks/chart-config-activity-grid-DJOU3TEz.js +0 -51
- package/dist/client/chunks/chart-config-activity-grid-DJOU3TEz.js.map +0 -1
- package/dist/client/chunks/chart-config-area-CWnWVT6a.js +0 -93
- package/dist/client/chunks/chart-config-area-CWnWVT6a.js.map +0 -1
- package/dist/client/chunks/chart-config-bar-C-7Dr1Ho.js +0 -87
- package/dist/client/chunks/chart-config-bar-C-7Dr1Ho.js.map +0 -1
- package/dist/client/chunks/chart-config-box-plot-mVOwmLdu.js +0 -35
- package/dist/client/chunks/chart-config-box-plot-mVOwmLdu.js.map +0 -1
- package/dist/client/chunks/chart-config-bubble-BPE2CeiD.js +0 -82
- package/dist/client/chunks/chart-config-bubble-BPE2CeiD.js.map +0 -1
- package/dist/client/chunks/chart-config-candlestick-BSB9DRy2.js +0 -72
- package/dist/client/chunks/chart-config-candlestick-BSB9DRy2.js.map +0 -1
- package/dist/client/chunks/chart-config-data-table-Bhdx5Hem.js.map +0 -1
- package/dist/client/chunks/chart-config-funnel-Cl-v-bm1.js +0 -93
- package/dist/client/chunks/chart-config-funnel-Cl-v-bm1.js.map +0 -1
- package/dist/client/chunks/chart-config-gauge-CdrUTJMJ.js +0 -64
- package/dist/client/chunks/chart-config-gauge-CdrUTJMJ.js.map +0 -1
- package/dist/client/chunks/chart-config-heat-map-DGE3NzoF.js +0 -91
- package/dist/client/chunks/chart-config-heat-map-DGE3NzoF.js.map +0 -1
- package/dist/client/chunks/chart-config-kpi-delta-DMrQerUW.js +0 -94
- package/dist/client/chunks/chart-config-kpi-delta-DMrQerUW.js.map +0 -1
- package/dist/client/chunks/chart-config-kpi-number-DCytCytn.js +0 -75
- package/dist/client/chunks/chart-config-kpi-number-DCytCytn.js.map +0 -1
- package/dist/client/chunks/chart-config-kpi-text-KdKQUvHo.js +0 -47
- package/dist/client/chunks/chart-config-kpi-text-KdKQUvHo.js.map +0 -1
- package/dist/client/chunks/chart-config-line-Bl9VDAdz.js +0 -104
- package/dist/client/chunks/chart-config-line-Bl9VDAdz.js.map +0 -1
- package/dist/client/chunks/chart-config-markdown-BX26b94i.js +0 -117
- package/dist/client/chunks/chart-config-markdown-BX26b94i.js.map +0 -1
- package/dist/client/chunks/chart-config-measure-profile-DwtRhEFh.js +0 -82
- package/dist/client/chunks/chart-config-measure-profile-DwtRhEFh.js.map +0 -1
- package/dist/client/chunks/chart-config-pie-BzBcqPMJ.js +0 -68
- package/dist/client/chunks/chart-config-pie-BzBcqPMJ.js.map +0 -1
- package/dist/client/chunks/chart-config-radar-6ZOgt__z.js +0 -49
- package/dist/client/chunks/chart-config-radar-6ZOgt__z.js.map +0 -1
- package/dist/client/chunks/chart-config-radial-bar-Df6Eta7N.js +0 -38
- package/dist/client/chunks/chart-config-radial-bar-Df6Eta7N.js.map +0 -1
- package/dist/client/chunks/chart-config-sankey-DgqKBFvN.js +0 -66
- package/dist/client/chunks/chart-config-sankey-DgqKBFvN.js.map +0 -1
- package/dist/client/chunks/chart-config-scatter-D5nVLDvi.js +0 -61
- package/dist/client/chunks/chart-config-scatter-D5nVLDvi.js.map +0 -1
- package/dist/client/chunks/chart-config-sunburst-Ca3FX9nW.js +0 -45
- package/dist/client/chunks/chart-config-sunburst-Ca3FX9nW.js.map +0 -1
- package/dist/client/chunks/chart-config-tree-map-Bjy4QNa3.js +0 -51
- package/dist/client/chunks/chart-config-tree-map-Bjy4QNa3.js.map +0 -1
- package/dist/client/chunks/chart-config-waterfall-C5K2eqR7.js +0 -59
- package/dist/client/chunks/chart-config-waterfall-C5K2eqR7.js.map +0 -1
- package/dist/client/chunks/chart-data-table-2iCsn0CF.js.map +0 -1
- package/dist/client/chunks/chart-funnel-poyOf7-e.js.map +0 -1
- package/dist/client/chunks/chart-gauge-D5J4gRky.js.map +0 -1
- package/dist/client/chunks/chart-heat-map-BAMVhLGG.js.map +0 -1
- package/dist/client/chunks/chart-kpi-delta-KQjUIeal.js.map +0 -1
- package/dist/client/chunks/chart-kpi-number-CsQgV_x3.js +0 -325
- package/dist/client/chunks/chart-kpi-number-CsQgV_x3.js.map +0 -1
- package/dist/client/chunks/chart-kpi-text-BR0IyeUU.js +0 -148
- package/dist/client/chunks/chart-kpi-text-BR0IyeUU.js.map +0 -1
- package/dist/client/chunks/chart-line-B5_WntY5.js.map +0 -1
- package/dist/client/chunks/chart-markdown-B6bENbel.js +0 -3473
- package/dist/client/chunks/chart-markdown-B6bENbel.js.map +0 -1
- package/dist/client/chunks/chart-measure-profile-yWk-obNb.js +0 -179
- package/dist/client/chunks/chart-measure-profile-yWk-obNb.js.map +0 -1
- package/dist/client/chunks/chart-pie-BodrUoHv.js +0 -172
- package/dist/client/chunks/chart-pie-BodrUoHv.js.map +0 -1
- package/dist/client/chunks/chart-radar-gG3zfLud.js +0 -154
- package/dist/client/chunks/chart-radar-gG3zfLud.js.map +0 -1
- package/dist/client/chunks/chart-radial-bar-C2IPCV8c.js +0 -148
- package/dist/client/chunks/chart-radial-bar-C2IPCV8c.js.map +0 -1
- package/dist/client/chunks/chart-sankey-BOyxfG1Q.js.map +0 -1
- package/dist/client/chunks/chart-scatter-B8OwlsAX.js +0 -255
- package/dist/client/chunks/chart-scatter-B8OwlsAX.js.map +0 -1
- package/dist/client/chunks/chart-sunburst-D9lGEOCc.js.map +0 -1
- package/dist/client/chunks/chart-tree-map-DZaKy9he.js +0 -298
- package/dist/client/chunks/chart-tree-map-DZaKy9he.js.map +0 -1
- package/dist/client/chunks/chart-waterfall-BCdUx4DC.js.map +0 -1
- package/dist/client/chunks/charts-core-C5Yokk-x.js.map +0 -1
- package/dist/client/chunks/schema-visualization-t1KiOORo.js.map +0 -1
- package/dist/client/chunks/useDebounce-CKqkM42n.js.map +0 -1
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { A as e, P as t, b as n, k as r } from "./chart-data-table-
|
|
2
|
-
import {
|
|
3
|
-
import { a as
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
1
|
+
import { A as e, P as t, b as n, k as r } from "./chart-data-table-C3Xh9jwL.js";
|
|
2
|
+
import { k as i } from "./chart-activity-grid-CWT0gLv4.js";
|
|
3
|
+
import { a, l as o, s } from "./retention-YhT1Oohi.js";
|
|
4
|
+
import { a as c, t as l } from "./syntaxHighlighting-CnDujqwg.js";
|
|
5
|
+
import { n as u, t as d } from "./charts-core-BXOqaYFn.js";
|
|
6
|
+
import f, { memo as p, useCallback as m, useEffect as h, useMemo as g, useRef as _, useState as v } from "react";
|
|
7
|
+
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
7
8
|
//#region src/client/types/analysisConfig.ts
|
|
8
|
-
var
|
|
9
|
+
var S = (e) => e.analysisType === "query", C = (e) => e.analysisType === "funnel", w = (e) => e.analysisType === "flow", T = (e) => e.analysisType === "retention", E = (e) => "queries" in e.query && Array.isArray(e.query.queries), D = (e) => !E(e), O = (e) => {
|
|
9
10
|
if (!e || typeof e != "object") return !1;
|
|
10
11
|
let t = e;
|
|
11
12
|
return !(t.version !== 1 || t.analysisType !== "query" && t.analysisType !== "funnel" && t.analysisType !== "flow" && t.analysisType !== "retention" || !t.query || typeof t.query != "object" || t.activeView !== "table" && t.activeView !== "chart");
|
|
12
|
-
},
|
|
13
|
+
}, k = () => ({
|
|
13
14
|
version: 1,
|
|
14
15
|
analysisType: "query",
|
|
15
16
|
activeView: "chart",
|
|
@@ -22,7 +23,7 @@ var x = (e) => e.analysisType === "query", S = (e) => e.analysisType === "funnel
|
|
|
22
23
|
measures: [],
|
|
23
24
|
dimensions: []
|
|
24
25
|
}
|
|
25
|
-
}),
|
|
26
|
+
}), A = () => ({
|
|
26
27
|
version: 1,
|
|
27
28
|
analysisType: "funnel",
|
|
28
29
|
activeView: "chart",
|
|
@@ -36,7 +37,7 @@ var x = (e) => e.analysisType === "query", S = (e) => e.analysisType === "funnel
|
|
|
36
37
|
timeDimension: "",
|
|
37
38
|
steps: []
|
|
38
39
|
} }
|
|
39
|
-
}),
|
|
40
|
+
}), j = () => ({
|
|
40
41
|
version: 1,
|
|
41
42
|
analysisType: "flow",
|
|
42
43
|
activeView: "chart",
|
|
@@ -57,7 +58,7 @@ var x = (e) => e.analysisType === "query", S = (e) => e.analysisType === "funnel
|
|
|
57
58
|
stepsAfter: 3,
|
|
58
59
|
joinStrategy: "auto"
|
|
59
60
|
} }
|
|
60
|
-
}),
|
|
61
|
+
}), M = () => ({
|
|
61
62
|
version: 1,
|
|
62
63
|
analysisType: "retention",
|
|
63
64
|
activeView: "chart",
|
|
@@ -77,42 +78,42 @@ var x = (e) => e.analysisType === "query", S = (e) => e.analysisType === "funnel
|
|
|
77
78
|
periods: 12,
|
|
78
79
|
retentionType: "classic"
|
|
79
80
|
} }
|
|
80
|
-
}),
|
|
81
|
+
}), N = (e = "query") => {
|
|
81
82
|
switch (e) {
|
|
82
|
-
case "funnel": return
|
|
83
|
-
case "flow": return
|
|
84
|
-
case "retention": return
|
|
85
|
-
default: return
|
|
83
|
+
case "funnel": return A();
|
|
84
|
+
case "flow": return j();
|
|
85
|
+
case "retention": return M();
|
|
86
|
+
default: return k();
|
|
86
87
|
}
|
|
87
|
-
},
|
|
88
|
+
}, P = (e) => {
|
|
88
89
|
if (!e || typeof e != "object") return !1;
|
|
89
90
|
let t = e;
|
|
90
91
|
return !(t.version !== 1 || t.activeType !== "query" && t.activeType !== "funnel" && t.activeType !== "flow" && t.activeType !== "retention" || !t.modes || typeof t.modes != "object");
|
|
91
|
-
},
|
|
92
|
+
}, F = () => ({
|
|
92
93
|
version: 1,
|
|
93
94
|
activeType: "query",
|
|
94
95
|
modes: {
|
|
95
|
-
query:
|
|
96
|
-
funnel:
|
|
97
|
-
flow:
|
|
98
|
-
retention:
|
|
96
|
+
query: k(),
|
|
97
|
+
funnel: A(),
|
|
98
|
+
flow: j(),
|
|
99
|
+
retention: M()
|
|
99
100
|
}
|
|
100
101
|
});
|
|
101
102
|
//#endregion
|
|
102
103
|
//#region src/client/utils/configMigration.ts
|
|
103
|
-
function
|
|
104
|
+
function I(e) {
|
|
104
105
|
return typeof e == "object" && !!e && "queries" in e && Array.isArray(e.queries);
|
|
105
106
|
}
|
|
106
|
-
function
|
|
107
|
+
function L(e) {
|
|
107
108
|
return typeof e == "object" && !!e && "queries" in e && Array.isArray(e.queries) && "mergeStrategy" in e && e.mergeStrategy === "funnel";
|
|
108
109
|
}
|
|
109
|
-
function
|
|
110
|
+
function R(e) {
|
|
110
111
|
return typeof e == "object" && !!e && "funnel" in e && typeof e.funnel == "object";
|
|
111
112
|
}
|
|
112
|
-
function
|
|
113
|
+
function z(e) {
|
|
113
114
|
return typeof e == "object" && !!e && "flow" in e && typeof e.flow == "object";
|
|
114
115
|
}
|
|
115
|
-
function
|
|
116
|
+
function B(e, t) {
|
|
116
117
|
return t === "funnel" ? {
|
|
117
118
|
chartType: e.funnelChartType || e.chartType || "funnel",
|
|
118
119
|
chartConfig: e.funnelChartConfig || e.chartConfig || {},
|
|
@@ -131,44 +132,44 @@ function z(e, t) {
|
|
|
131
132
|
displayConfig: e.displayConfig || {}
|
|
132
133
|
};
|
|
133
134
|
}
|
|
134
|
-
function
|
|
135
|
+
function V(e) {
|
|
135
136
|
try {
|
|
136
137
|
let t = JSON.parse(e.query);
|
|
137
|
-
if (
|
|
138
|
+
if (o(t)) return {
|
|
138
139
|
version: 1,
|
|
139
140
|
analysisType: "retention",
|
|
140
141
|
activeView: "chart",
|
|
141
|
-
charts: { retention:
|
|
142
|
+
charts: { retention: B(e, "retention") },
|
|
142
143
|
query: t
|
|
143
144
|
};
|
|
144
|
-
if (
|
|
145
|
+
if (z(t)) return {
|
|
145
146
|
version: 1,
|
|
146
147
|
analysisType: "flow",
|
|
147
148
|
activeView: "chart",
|
|
148
|
-
charts: { flow:
|
|
149
|
+
charts: { flow: B(e, "flow") },
|
|
149
150
|
query: t
|
|
150
151
|
};
|
|
151
|
-
if (
|
|
152
|
+
if (R(t)) return {
|
|
152
153
|
version: 1,
|
|
153
154
|
analysisType: "funnel",
|
|
154
155
|
activeView: "chart",
|
|
155
|
-
charts: { funnel:
|
|
156
|
+
charts: { funnel: B(e, "funnel") },
|
|
156
157
|
query: t
|
|
157
158
|
};
|
|
158
|
-
if (
|
|
159
|
+
if (L(t)) return ee(t, e);
|
|
159
160
|
if (e.analysisType === "funnel") return {
|
|
160
161
|
version: 1,
|
|
161
162
|
analysisType: "funnel",
|
|
162
163
|
activeView: "chart",
|
|
163
|
-
charts: { funnel:
|
|
164
|
-
query:
|
|
164
|
+
charts: { funnel: B(e, "funnel") },
|
|
165
|
+
query: R(t) ? t : { funnel: {
|
|
165
166
|
bindingKey: "",
|
|
166
167
|
timeDimension: "",
|
|
167
168
|
steps: []
|
|
168
169
|
} }
|
|
169
170
|
};
|
|
170
|
-
let n =
|
|
171
|
-
return
|
|
171
|
+
let n = B(e, "query");
|
|
172
|
+
return I(t) ? {
|
|
172
173
|
version: 1,
|
|
173
174
|
analysisType: "query",
|
|
174
175
|
activeView: "chart",
|
|
@@ -187,7 +188,7 @@ function B(e) {
|
|
|
187
188
|
query: t
|
|
188
189
|
};
|
|
189
190
|
} catch (e) {
|
|
190
|
-
return console.warn("[configMigration] Failed to parse legacy portlet:", e),
|
|
191
|
+
return console.warn("[configMigration] Failed to parse legacy portlet:", e), k();
|
|
191
192
|
}
|
|
192
193
|
}
|
|
193
194
|
function ee(e, t) {
|
|
@@ -206,7 +207,7 @@ function ee(e, t) {
|
|
|
206
207
|
version: 1,
|
|
207
208
|
analysisType: "funnel",
|
|
208
209
|
activeView: "chart",
|
|
209
|
-
charts: { funnel: t ?
|
|
210
|
+
charts: { funnel: t ? B(t, "funnel") : {
|
|
210
211
|
chartType: "funnel",
|
|
211
212
|
chartConfig: {},
|
|
212
213
|
displayConfig: {}
|
|
@@ -220,19 +221,19 @@ function ee(e, t) {
|
|
|
220
221
|
};
|
|
221
222
|
}
|
|
222
223
|
function te(e) {
|
|
223
|
-
if (
|
|
224
|
-
if (e && typeof e == "object" && "query" in e && typeof e.query == "string") return
|
|
224
|
+
if (O(e)) return e;
|
|
225
|
+
if (e && typeof e == "object" && "query" in e && typeof e.query == "string") return V(e);
|
|
225
226
|
if (e && typeof e == "object") try {
|
|
226
|
-
return
|
|
227
|
+
return V({ query: JSON.stringify(e) });
|
|
227
228
|
} catch {}
|
|
228
|
-
return console.warn("[configMigration] Unknown config format, using defaults"),
|
|
229
|
+
return console.warn("[configMigration] Unknown config format, using defaults"), k();
|
|
229
230
|
}
|
|
230
231
|
function ne(e) {
|
|
231
|
-
return typeof e == "object" && !!e && "analysisConfig" in e &&
|
|
232
|
+
return typeof e == "object" && !!e && "analysisConfig" in e && O(e.analysisConfig);
|
|
232
233
|
}
|
|
233
|
-
function
|
|
234
|
+
function re(e) {
|
|
234
235
|
if (ne(e)) return e;
|
|
235
|
-
let t =
|
|
236
|
+
let t = V({
|
|
236
237
|
query: e.query ?? "{}",
|
|
237
238
|
chartType: e.chartType,
|
|
238
239
|
chartConfig: e.chartConfig,
|
|
@@ -261,7 +262,7 @@ function H(e) {
|
|
|
261
262
|
}
|
|
262
263
|
return "type" in e && "filters" in e ? e.filters.filter((e) => H(e)).length > 0 : !1;
|
|
263
264
|
}
|
|
264
|
-
function
|
|
265
|
+
function ie(e, t) {
|
|
265
266
|
return !e || !e.length || !t || !t.length ? [] : e.filter((e) => t.includes(e.id)).filter((e) => H(e.filter)).map((e) => e.filter);
|
|
266
267
|
}
|
|
267
268
|
function U(e) {
|
|
@@ -271,17 +272,17 @@ function U(e) {
|
|
|
271
272
|
}
|
|
272
273
|
return e;
|
|
273
274
|
}
|
|
274
|
-
function
|
|
275
|
+
function ae(e, t, n = "server") {
|
|
275
276
|
return !e || e.length === 0 ? t : !t || t.length === 0 ? [...e] : n === "server" ? [{ and: [...e, ...t].map(U) }] : [{
|
|
276
277
|
type: "and",
|
|
277
278
|
filters: [...e, ...t]
|
|
278
279
|
}];
|
|
279
280
|
}
|
|
280
|
-
function
|
|
281
|
+
function oe(e) {
|
|
281
282
|
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
282
283
|
return e.portlets.forEach((e) => {
|
|
283
284
|
try {
|
|
284
|
-
let i =
|
|
285
|
+
let i = re(e).analysisConfig.query, a = (e) => {
|
|
285
286
|
e.measures && Array.isArray(e.measures) && e.measures.forEach((e) => t.add(e)), e.dimensions && Array.isArray(e.dimensions) && e.dimensions.forEach((e) => n.add(e)), e.timeDimensions && Array.isArray(e.timeDimensions) && e.timeDimensions.forEach((e) => {
|
|
286
287
|
e.dimension && r.add(e.dimension);
|
|
287
288
|
}), e.filters && W(e.filters).forEach((e) => {
|
|
@@ -311,7 +312,7 @@ function G(e) {
|
|
|
311
312
|
if (e.dateRange) return e.dateRange;
|
|
312
313
|
if (e.values && e.values.length > 0) return e.values.length === 1 ? e.values[0] : e.values;
|
|
313
314
|
}
|
|
314
|
-
function
|
|
315
|
+
function se(e, t, n) {
|
|
315
316
|
if (!n || n.length === 0 || !t || t.length === 0) return n;
|
|
316
317
|
let r = e?.filter((e) => e.isUniversalTime && t.includes(e.id))?.filter((e) => {
|
|
317
318
|
if (!("member" in e.filter)) return !1;
|
|
@@ -327,60 +328,60 @@ function oe(e, t, n) {
|
|
|
327
328
|
}
|
|
328
329
|
//#endregion
|
|
329
330
|
//#region src/client/shared/components/CodeBlock.tsx
|
|
330
|
-
var
|
|
331
|
-
let [
|
|
332
|
-
return
|
|
333
|
-
if (!
|
|
334
|
-
let e =
|
|
335
|
-
return e.textContent = t,
|
|
331
|
+
var ce = ({ code: t, language: n, title: r, maxHeight: a = "16rem", height: o, className: s = "", headerRight: u }) => {
|
|
332
|
+
let { t: d } = i(), [f, p] = v(!1), m = _(null), g = e("copy"), S = e("check");
|
|
333
|
+
return h(() => {
|
|
334
|
+
if (!m.current) return;
|
|
335
|
+
let e = m.current, r = !0;
|
|
336
|
+
return e.textContent = t, c().then(() => {
|
|
336
337
|
if (!r) return;
|
|
337
|
-
let i =
|
|
338
|
+
let i = l();
|
|
338
339
|
i && (e.innerHTML = i.highlight(t, { language: n }).value);
|
|
339
340
|
}).catch(() => {
|
|
340
341
|
r && (e.textContent = t);
|
|
341
342
|
}), () => {
|
|
342
343
|
r = !1;
|
|
343
344
|
};
|
|
344
|
-
}, [t, n]), /* @__PURE__ */
|
|
345
|
-
className: `dc:relative ${
|
|
346
|
-
children: [/* @__PURE__ */
|
|
345
|
+
}, [t, n]), /* @__PURE__ */ x("div", {
|
|
346
|
+
className: `dc:relative ${s}`,
|
|
347
|
+
children: [/* @__PURE__ */ x("div", {
|
|
347
348
|
className: "dc:flex dc:items-center dc:justify-between dc:mb-2 dc:gap-2",
|
|
348
|
-
children: [r && /* @__PURE__ */
|
|
349
|
+
children: [r && /* @__PURE__ */ b("h4", {
|
|
349
350
|
className: "dc:text-sm dc:font-semibold text-dc-text",
|
|
350
351
|
children: r
|
|
351
|
-
}), /* @__PURE__ */
|
|
352
|
+
}), /* @__PURE__ */ x("div", {
|
|
352
353
|
className: "dc:flex dc:items-center dc:gap-2 dc:ml-auto",
|
|
353
|
-
children: [
|
|
354
|
+
children: [u, /* @__PURE__ */ b("button", {
|
|
354
355
|
onClick: async () => {
|
|
355
356
|
try {
|
|
356
|
-
await navigator.clipboard.writeText(t),
|
|
357
|
+
await navigator.clipboard.writeText(t), p(!0), setTimeout(() => p(!1), 2e3);
|
|
357
358
|
} catch {
|
|
358
359
|
let e = document.createElement("textarea");
|
|
359
|
-
e.value = t, e.style.position = "fixed", e.style.left = "-999999px", document.body.appendChild(e), e.select(), document.execCommand("copy"), document.body.removeChild(e),
|
|
360
|
+
e.value = t, e.style.position = "fixed", e.style.left = "-999999px", document.body.appendChild(e), e.select(), document.execCommand("copy"), document.body.removeChild(e), p(!0), setTimeout(() => p(!1), 2e3);
|
|
360
361
|
}
|
|
361
362
|
},
|
|
362
363
|
className: "dc:px-2 dc:py-1 dc:text-xs dc:rounded hover:bg-dc-surface-secondary dc:border border-dc-border dc:transition-colors dc:flex dc:items-center dc:gap-1.5",
|
|
363
|
-
title:
|
|
364
|
-
children:
|
|
364
|
+
title: f ? "Copied!" : "Copy to clipboard",
|
|
365
|
+
children: f ? /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(S, { className: "dc:w-3.5 dc:h-3.5 text-dc-success" }), /* @__PURE__ */ b("span", {
|
|
365
366
|
className: "text-dc-success",
|
|
366
|
-
children: "
|
|
367
|
-
})] }) : /* @__PURE__ */
|
|
367
|
+
children: d("common.actions.copied")
|
|
368
|
+
})] }) : /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(g, { className: "dc:w-3.5 dc:h-3.5 text-dc-text-secondary" }), /* @__PURE__ */ b("span", {
|
|
368
369
|
className: "text-dc-text-secondary",
|
|
369
|
-
children: "
|
|
370
|
+
children: d("common.actions.copy")
|
|
370
371
|
})] })
|
|
371
372
|
})]
|
|
372
373
|
})]
|
|
373
|
-
}), /* @__PURE__ */
|
|
374
|
+
}), /* @__PURE__ */ b("div", {
|
|
374
375
|
className: "bg-dc-surface-secondary dc:border border-dc-border dc:rounded dc:overflow-auto",
|
|
375
|
-
style:
|
|
376
|
-
height:
|
|
377
|
-
minHeight:
|
|
378
|
-
maxHeight:
|
|
379
|
-
} : { maxHeight:
|
|
380
|
-
children: /* @__PURE__ */
|
|
376
|
+
style: o ? {
|
|
377
|
+
height: o,
|
|
378
|
+
minHeight: o,
|
|
379
|
+
maxHeight: o
|
|
380
|
+
} : { maxHeight: a },
|
|
381
|
+
children: /* @__PURE__ */ b("pre", {
|
|
381
382
|
className: "dc:p-3 dc:text-xs dc:m-0",
|
|
382
|
-
children: /* @__PURE__ */
|
|
383
|
-
ref:
|
|
383
|
+
children: /* @__PURE__ */ b("code", {
|
|
384
|
+
ref: m,
|
|
384
385
|
className: `hljs language-${n}`,
|
|
385
386
|
children: t
|
|
386
387
|
})
|
|
@@ -1076,20 +1077,20 @@ function q(e) {
|
|
|
1076
1077
|
//#endregion
|
|
1077
1078
|
//#region src/client/components/Modal.tsx
|
|
1078
1079
|
var J = ({ isOpen: e, onClose: t, title: n, size: r = "md", closeOnBackdropClick: i = !0, closeOnEscape: a = !0, showCloseButton: o = !0, children: s, footer: c, noPadding: l = !1 }) => {
|
|
1079
|
-
let u =
|
|
1080
|
+
let u = m((e) => {
|
|
1080
1081
|
e.key === "Escape" && a && t();
|
|
1081
1082
|
}, [a, t]);
|
|
1082
|
-
return
|
|
1083
|
+
return h(() => (e ? (a && document.addEventListener("keydown", u), document.body.style.overflow = "hidden") : document.body.style.overflow = "unset", () => {
|
|
1083
1084
|
document.removeEventListener("keydown", u), document.body.style.overflow = "unset";
|
|
1084
1085
|
}), [
|
|
1085
1086
|
e,
|
|
1086
1087
|
a,
|
|
1087
1088
|
u
|
|
1088
|
-
]), e ? /* @__PURE__ */
|
|
1089
|
+
]), e ? /* @__PURE__ */ b("div", {
|
|
1089
1090
|
className: `dc:fixed dc:inset-0 dc:z-50 dc:backdrop-blur-md ${r === "fullscreen-mobile" ? "dc:flex dc:md:flex dc:md:items-center dc:md:justify-center" : "dc:flex dc:items-center dc:justify-center"}`,
|
|
1090
1091
|
style: { backgroundColor: "var(--dc-overlay)" },
|
|
1091
1092
|
onClick: i ? t : void 0,
|
|
1092
|
-
children: /* @__PURE__ */
|
|
1093
|
+
children: /* @__PURE__ */ x("div", {
|
|
1093
1094
|
className: `dc:relative bg-dc-surface dc:border border-dc-border ${r === "fullscreen-mobile" ? "dc:rounded-none dc:md:rounded-lg" : "dc:rounded-lg"} ${r === "fullscreen" || r === "fullscreen-mobile" ? "" : "dc:mx-4"} ${(() => {
|
|
1094
1095
|
switch (r) {
|
|
1095
1096
|
case "sm": return "dc:max-w-md";
|
|
@@ -1109,24 +1110,24 @@ var J = ({ isOpen: e, onClose: t, title: n, size: r = "md", closeOnBackdropClick
|
|
|
1109
1110
|
"aria-modal": "true",
|
|
1110
1111
|
"aria-labelledby": n ? "modal-title" : void 0,
|
|
1111
1112
|
children: [
|
|
1112
|
-
(n || o) && /* @__PURE__ */
|
|
1113
|
+
(n || o) && /* @__PURE__ */ x("div", {
|
|
1113
1114
|
className: "dc:flex dc:items-center dc:justify-between dc:px-6 dc:py-4 dc:border-b border-dc-border",
|
|
1114
|
-
children: [n && /* @__PURE__ */
|
|
1115
|
+
children: [n && /* @__PURE__ */ b("h2", {
|
|
1115
1116
|
id: "modal-title",
|
|
1116
1117
|
className: "dc:text-xl dc:font-semibold text-dc-text",
|
|
1117
1118
|
children: n
|
|
1118
|
-
}), o && /* @__PURE__ */
|
|
1119
|
+
}), o && /* @__PURE__ */ b("button", {
|
|
1119
1120
|
type: "button",
|
|
1120
1121
|
onClick: t,
|
|
1121
1122
|
className: "text-dc-text-muted hover:text-dc-text-secondary dc:transition-colors dc:p-2 dc:-mr-2",
|
|
1122
1123
|
"aria-label": "Close modal",
|
|
1123
|
-
children: /* @__PURE__ */
|
|
1124
|
+
children: /* @__PURE__ */ b("svg", {
|
|
1124
1125
|
width: "24",
|
|
1125
1126
|
height: "24",
|
|
1126
1127
|
fill: "none",
|
|
1127
1128
|
viewBox: "0 0 24 24",
|
|
1128
1129
|
stroke: "currentColor",
|
|
1129
|
-
children: /* @__PURE__ */
|
|
1130
|
+
children: /* @__PURE__ */ b("path", {
|
|
1130
1131
|
strokeLinecap: "round",
|
|
1131
1132
|
strokeLinejoin: "round",
|
|
1132
1133
|
strokeWidth: 2,
|
|
@@ -1135,13 +1136,13 @@ var J = ({ isOpen: e, onClose: t, title: n, size: r = "md", closeOnBackdropClick
|
|
|
1135
1136
|
})
|
|
1136
1137
|
})]
|
|
1137
1138
|
}),
|
|
1138
|
-
/* @__PURE__ */
|
|
1139
|
+
/* @__PURE__ */ b("div", {
|
|
1139
1140
|
className: `dc:flex-1 dc:overflow-y-auto ${l ? "" : "dc:px-6 dc:py-4"}`,
|
|
1140
1141
|
children: s
|
|
1141
1142
|
}),
|
|
1142
|
-
c && /* @__PURE__ */
|
|
1143
|
+
c && /* @__PURE__ */ b("div", {
|
|
1143
1144
|
className: "dc:flex dc:items-center dc:justify-end dc:space-x-3 dc:px-6 dc:py-4 dc:border-t border-dc-border bg-dc-surface-secondary",
|
|
1144
|
-
children:
|
|
1145
|
+
children: f.Children.toArray(c)
|
|
1145
1146
|
})
|
|
1146
1147
|
]
|
|
1147
1148
|
})
|
|
@@ -1152,7 +1153,7 @@ var J = ({ isOpen: e, onClose: t, title: n, size: r = "md", closeOnBackdropClick
|
|
|
1152
1153
|
function Y() {
|
|
1153
1154
|
return `${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
1154
1155
|
}
|
|
1155
|
-
function
|
|
1156
|
+
function le(e) {
|
|
1156
1157
|
let t = "", n = e;
|
|
1157
1158
|
do
|
|
1158
1159
|
t = String.fromCharCode(65 + n % 26) + t, n = Math.floor(n / 26) - 1;
|
|
@@ -1179,7 +1180,7 @@ function X(e, t) {
|
|
|
1179
1180
|
}
|
|
1180
1181
|
return null;
|
|
1181
1182
|
}
|
|
1182
|
-
function
|
|
1183
|
+
function ue(e, t) {
|
|
1183
1184
|
let n = X(e, t);
|
|
1184
1185
|
return n && (n.field.title || n.field.shortTitle) || e;
|
|
1185
1186
|
}
|
|
@@ -1226,7 +1227,7 @@ function Z(e, t) {
|
|
|
1226
1227
|
}
|
|
1227
1228
|
return n;
|
|
1228
1229
|
}
|
|
1229
|
-
function
|
|
1230
|
+
function de(e, t, n) {
|
|
1230
1231
|
let r = e;
|
|
1231
1232
|
if (n && n !== "all" && (r = r.filter((e) => e.cubeName === n)), t.trim()) {
|
|
1232
1233
|
let e = t.toLowerCase();
|
|
@@ -1234,7 +1235,7 @@ function ue(e, t, n) {
|
|
|
1234
1235
|
}
|
|
1235
1236
|
return r;
|
|
1236
1237
|
}
|
|
1237
|
-
function
|
|
1238
|
+
function fe(e) {
|
|
1238
1239
|
let t = /* @__PURE__ */ new Map();
|
|
1239
1240
|
for (let n of e) {
|
|
1240
1241
|
let e = t.get(n.cubeName) || [];
|
|
@@ -1242,13 +1243,13 @@ function de(e) {
|
|
|
1242
1243
|
}
|
|
1243
1244
|
return t;
|
|
1244
1245
|
}
|
|
1245
|
-
function
|
|
1246
|
+
function pe(e) {
|
|
1246
1247
|
return e ? e.cubes.map((e) => e.name) : [];
|
|
1247
1248
|
}
|
|
1248
1249
|
function Q(e, t) {
|
|
1249
1250
|
return t && t.cubes.find((t) => t.name === e)?.title || e;
|
|
1250
1251
|
}
|
|
1251
|
-
function
|
|
1252
|
+
function me(e, t) {
|
|
1252
1253
|
let n = /* @__PURE__ */ new Set();
|
|
1253
1254
|
if (!t) return n;
|
|
1254
1255
|
n.add(e);
|
|
@@ -1257,9 +1258,9 @@ function pe(e, t) {
|
|
|
1257
1258
|
for (let e of r.relationships) n.add(e.targetCube);
|
|
1258
1259
|
return n;
|
|
1259
1260
|
}
|
|
1260
|
-
function
|
|
1261
|
+
function he(e, t) {
|
|
1261
1262
|
if (!t) return null;
|
|
1262
|
-
let n =
|
|
1263
|
+
let n = me(e, t);
|
|
1263
1264
|
return { cubes: t.cubes.filter((e) => n.has(e.name)).map((e) => ({
|
|
1264
1265
|
...e,
|
|
1265
1266
|
description: e.description || ""
|
|
@@ -1267,10 +1268,10 @@ function me(e, t) {
|
|
|
1267
1268
|
}
|
|
1268
1269
|
//#endregion
|
|
1269
1270
|
//#region src/client/components/AnalysisBuilder/utils/recentFieldsUtils.ts
|
|
1270
|
-
var
|
|
1271
|
-
function
|
|
1271
|
+
var ge = "drizzle-cube-recent-fields", _e = 10;
|
|
1272
|
+
function ve() {
|
|
1272
1273
|
try {
|
|
1273
|
-
let e = localStorage.getItem(
|
|
1274
|
+
let e = localStorage.getItem(ge);
|
|
1274
1275
|
if (e) return JSON.parse(e);
|
|
1275
1276
|
} catch {}
|
|
1276
1277
|
return {
|
|
@@ -1278,13 +1279,13 @@ function ge() {
|
|
|
1278
1279
|
breakdowns: []
|
|
1279
1280
|
};
|
|
1280
1281
|
}
|
|
1281
|
-
function
|
|
1282
|
+
function ye(e, t) {
|
|
1282
1283
|
try {
|
|
1283
|
-
let n =
|
|
1284
|
-
r.unshift(e), n[t] = r.slice(0,
|
|
1284
|
+
let n = ve(), r = n[t].filter((t) => t !== e);
|
|
1285
|
+
r.unshift(e), n[t] = r.slice(0, _e), localStorage.setItem(ge, JSON.stringify(n));
|
|
1285
1286
|
} catch {}
|
|
1286
1287
|
}
|
|
1287
|
-
function
|
|
1288
|
+
function be(e, t, n) {
|
|
1288
1289
|
if (!e || n.length === 0) return [];
|
|
1289
1290
|
let r = Z(e, t), i = [];
|
|
1290
1291
|
for (let e of n) {
|
|
@@ -1295,7 +1296,7 @@ function ve(e, t, n) {
|
|
|
1295
1296
|
}
|
|
1296
1297
|
//#endregion
|
|
1297
1298
|
//#region src/client/adapters/funnelModeAdapter.ts
|
|
1298
|
-
function
|
|
1299
|
+
function xe(e) {
|
|
1299
1300
|
let t = "";
|
|
1300
1301
|
e.funnelBindingKey && (typeof e.funnelBindingKey.dimension == "string" ? t = e.funnelBindingKey.dimension : Array.isArray(e.funnelBindingKey.dimension) && (t = e.funnelBindingKey.dimension.map((e) => ({
|
|
1301
1302
|
cube: e.cube,
|
|
@@ -1312,7 +1313,7 @@ function ye(e) {
|
|
|
1312
1313
|
includeTimeMetrics: !0
|
|
1313
1314
|
} };
|
|
1314
1315
|
}
|
|
1315
|
-
function
|
|
1316
|
+
function Se(e) {
|
|
1316
1317
|
let { funnel: t } = e, n = null;
|
|
1317
1318
|
if (t.steps.length > 0 && t.steps[0].cube) n = t.steps[0].cube;
|
|
1318
1319
|
else if (typeof t.bindingKey == "string") {
|
|
@@ -1344,14 +1345,14 @@ function be(e) {
|
|
|
1344
1345
|
funnelBindingKey: r
|
|
1345
1346
|
};
|
|
1346
1347
|
}
|
|
1347
|
-
function
|
|
1348
|
+
function Ce(e) {
|
|
1348
1349
|
if (!e || typeof e != "object") return !1;
|
|
1349
1350
|
let t = e;
|
|
1350
1351
|
if (t.version !== 1 || t.analysisType !== "funnel" || !t.query || typeof t.query != "object") return !1;
|
|
1351
1352
|
let n = t.query;
|
|
1352
1353
|
return !(!n.funnel || typeof n.funnel != "object");
|
|
1353
1354
|
}
|
|
1354
|
-
var
|
|
1355
|
+
var we = {
|
|
1355
1356
|
type: "funnel",
|
|
1356
1357
|
createInitial() {
|
|
1357
1358
|
return {
|
|
@@ -1372,11 +1373,11 @@ var Se = {
|
|
|
1372
1373
|
};
|
|
1373
1374
|
},
|
|
1374
1375
|
canLoad(e) {
|
|
1375
|
-
return
|
|
1376
|
+
return Ce(e);
|
|
1376
1377
|
},
|
|
1377
1378
|
load(e) {
|
|
1378
1379
|
if (e.analysisType !== "funnel") throw Error(`Cannot load ${e.analysisType} config with funnel adapter`);
|
|
1379
|
-
return
|
|
1380
|
+
return Se(e.query);
|
|
1380
1381
|
},
|
|
1381
1382
|
save(e, t, n) {
|
|
1382
1383
|
return {
|
|
@@ -1384,7 +1385,7 @@ var Se = {
|
|
|
1384
1385
|
analysisType: "funnel",
|
|
1385
1386
|
activeView: n,
|
|
1386
1387
|
charts: { funnel: t.funnel || this.getDefaultChartConfig() },
|
|
1387
|
-
query:
|
|
1388
|
+
query: xe(e)
|
|
1388
1389
|
};
|
|
1389
1390
|
},
|
|
1390
1391
|
validate(e) {
|
|
@@ -1419,7 +1420,7 @@ var Se = {
|
|
|
1419
1420
|
};
|
|
1420
1421
|
//#endregion
|
|
1421
1422
|
//#region src/client/adapters/flowModeAdapter.ts
|
|
1422
|
-
function
|
|
1423
|
+
function Te(e) {
|
|
1423
1424
|
let t = "";
|
|
1424
1425
|
return e.flowBindingKey && (typeof e.flowBindingKey.dimension == "string" ? t = e.flowBindingKey.dimension : Array.isArray(e.flowBindingKey.dimension) && (t = e.flowBindingKey.dimension.map((e) => ({
|
|
1425
1426
|
cube: e.cube,
|
|
@@ -1437,7 +1438,7 @@ function Ce(e) {
|
|
|
1437
1438
|
joinStrategy: e.joinStrategy
|
|
1438
1439
|
} };
|
|
1439
1440
|
}
|
|
1440
|
-
function
|
|
1441
|
+
function Ee(e) {
|
|
1441
1442
|
let { flow: t } = e, n = null;
|
|
1442
1443
|
if (typeof t.bindingKey == "string") {
|
|
1443
1444
|
let e = t.bindingKey.split(".");
|
|
@@ -1465,14 +1466,14 @@ function we(e) {
|
|
|
1465
1466
|
joinStrategy: t.joinStrategy || "auto"
|
|
1466
1467
|
};
|
|
1467
1468
|
}
|
|
1468
|
-
function
|
|
1469
|
+
function De(e) {
|
|
1469
1470
|
if (!e || typeof e != "object") return !1;
|
|
1470
1471
|
let t = e;
|
|
1471
1472
|
if (t.version !== 1 || t.analysisType !== "flow" || !t.query || typeof t.query != "object") return !1;
|
|
1472
1473
|
let n = t.query;
|
|
1473
1474
|
return !(!n.flow || typeof n.flow != "object");
|
|
1474
1475
|
}
|
|
1475
|
-
var
|
|
1476
|
+
var Oe = {
|
|
1476
1477
|
type: "flow",
|
|
1477
1478
|
createInitial() {
|
|
1478
1479
|
return {
|
|
@@ -1502,11 +1503,11 @@ var Ee = {
|
|
|
1502
1503
|
};
|
|
1503
1504
|
},
|
|
1504
1505
|
canLoad(e) {
|
|
1505
|
-
return
|
|
1506
|
+
return De(e);
|
|
1506
1507
|
},
|
|
1507
1508
|
load(e) {
|
|
1508
1509
|
if (e.analysisType !== "flow") throw Error(`Cannot load ${e.analysisType} config with flow adapter`);
|
|
1509
|
-
return
|
|
1510
|
+
return Ee(e.query);
|
|
1510
1511
|
},
|
|
1511
1512
|
save(e, t, n) {
|
|
1512
1513
|
return {
|
|
@@ -1514,7 +1515,7 @@ var Ee = {
|
|
|
1514
1515
|
analysisType: "flow",
|
|
1515
1516
|
activeView: n,
|
|
1516
1517
|
charts: { flow: t.flow || this.getDefaultChartConfig() },
|
|
1517
|
-
query:
|
|
1518
|
+
query: Te(e)
|
|
1518
1519
|
};
|
|
1519
1520
|
},
|
|
1520
1521
|
validate(e) {
|
|
@@ -1549,7 +1550,7 @@ var Ee = {
|
|
|
1549
1550
|
};
|
|
1550
1551
|
//#endregion
|
|
1551
1552
|
//#region src/client/adapters/retentionModeAdapter.ts
|
|
1552
|
-
function
|
|
1553
|
+
function ke(e) {
|
|
1553
1554
|
let t = "";
|
|
1554
1555
|
e.retentionBindingKey && (typeof e.retentionBindingKey.dimension == "string" ? t = e.retentionBindingKey.dimension : Array.isArray(e.retentionBindingKey.dimension) && (t = e.retentionBindingKey.dimension.map((e) => ({
|
|
1555
1556
|
cube: e.cube,
|
|
@@ -1565,7 +1566,7 @@ function De(e) {
|
|
|
1565
1566
|
} };
|
|
1566
1567
|
return e.retentionCohortFilters.length > 0 && (n.retention.cohortFilters = e.retentionCohortFilters.length === 1 ? e.retentionCohortFilters[0] : e.retentionCohortFilters), e.retentionActivityFilters.length > 0 && (n.retention.activityFilters = e.retentionActivityFilters.length === 1 ? e.retentionActivityFilters[0] : e.retentionActivityFilters), e.retentionBreakdowns && e.retentionBreakdowns.length > 0 && (n.retention.breakdownDimensions = e.retentionBreakdowns.map((e) => e.field)), n;
|
|
1567
1568
|
}
|
|
1568
|
-
function
|
|
1569
|
+
function Ae(e) {
|
|
1569
1570
|
let { retention: t } = e, n = null;
|
|
1570
1571
|
if (typeof t.timeDimension == "string") {
|
|
1571
1572
|
let e = t.timeDimension.split(".");
|
|
@@ -1580,14 +1581,14 @@ function Oe(e) {
|
|
|
1580
1581
|
t.timeDimension && (i = typeof t.timeDimension == "string" ? t.timeDimension : `${t.timeDimension.cube}.${t.timeDimension.dimension}`);
|
|
1581
1582
|
let a = [];
|
|
1582
1583
|
t.cohortFilters && (a = Array.isArray(t.cohortFilters) ? t.cohortFilters : [t.cohortFilters]);
|
|
1583
|
-
let
|
|
1584
|
-
t.activityFilters && (
|
|
1584
|
+
let o = [];
|
|
1585
|
+
t.activityFilters && (o = Array.isArray(t.activityFilters) ? t.activityFilters : [t.activityFilters]);
|
|
1585
1586
|
let c = [];
|
|
1586
1587
|
t.breakdownDimensions && Array.isArray(t.breakdownDimensions) && (c = t.breakdownDimensions.map((e) => ({
|
|
1587
1588
|
field: e,
|
|
1588
1589
|
label: e.split(".").pop() || e
|
|
1589
1590
|
})));
|
|
1590
|
-
let l = t.dateRange ||
|
|
1591
|
+
let l = t.dateRange || s("last_3_months");
|
|
1591
1592
|
return {
|
|
1592
1593
|
retentionCube: n,
|
|
1593
1594
|
retentionBindingKey: r,
|
|
@@ -1597,28 +1598,28 @@ function Oe(e) {
|
|
|
1597
1598
|
retentionPeriods: t.periods,
|
|
1598
1599
|
retentionType: t.retentionType,
|
|
1599
1600
|
retentionCohortFilters: a,
|
|
1600
|
-
retentionActivityFilters:
|
|
1601
|
+
retentionActivityFilters: o,
|
|
1601
1602
|
retentionBreakdowns: c
|
|
1602
1603
|
};
|
|
1603
1604
|
}
|
|
1604
|
-
function
|
|
1605
|
+
function je(e) {
|
|
1605
1606
|
if (!e || typeof e != "object") return !1;
|
|
1606
1607
|
let t = e;
|
|
1607
1608
|
if (t.version !== 1 || t.analysisType !== "retention" || !t.query || typeof t.query != "object") return !1;
|
|
1608
1609
|
let n = t.query;
|
|
1609
1610
|
return !(!n.retention || typeof n.retention != "object");
|
|
1610
1611
|
}
|
|
1611
|
-
var
|
|
1612
|
+
var Me = {
|
|
1612
1613
|
type: "retention",
|
|
1613
1614
|
createInitial() {
|
|
1614
|
-
return { ...
|
|
1615
|
+
return { ...a };
|
|
1615
1616
|
},
|
|
1616
1617
|
extractState(e) {
|
|
1617
1618
|
return {
|
|
1618
1619
|
retentionCube: e.retentionCube,
|
|
1619
1620
|
retentionBindingKey: e.retentionBindingKey,
|
|
1620
1621
|
retentionTimeDimension: e.retentionTimeDimension,
|
|
1621
|
-
retentionDateRange: e.retentionDateRange ||
|
|
1622
|
+
retentionDateRange: e.retentionDateRange || s("last_3_months"),
|
|
1622
1623
|
retentionViewGranularity: e.retentionViewGranularity || "week",
|
|
1623
1624
|
retentionPeriods: e.retentionPeriods || 12,
|
|
1624
1625
|
retentionType: e.retentionType || "classic",
|
|
@@ -1628,11 +1629,11 @@ var Ae = {
|
|
|
1628
1629
|
};
|
|
1629
1630
|
},
|
|
1630
1631
|
canLoad(e) {
|
|
1631
|
-
return
|
|
1632
|
+
return je(e);
|
|
1632
1633
|
},
|
|
1633
1634
|
load(e) {
|
|
1634
1635
|
if (e.analysisType !== "retention") throw Error(`Cannot load ${e.analysisType} config with retention adapter`);
|
|
1635
|
-
return
|
|
1636
|
+
return Ae(e.query);
|
|
1636
1637
|
},
|
|
1637
1638
|
save(e, t, n) {
|
|
1638
1639
|
return {
|
|
@@ -1640,7 +1641,7 @@ var Ae = {
|
|
|
1640
1641
|
analysisType: "retention",
|
|
1641
1642
|
activeView: n,
|
|
1642
1643
|
charts: { retention: t.retention || this.getDefaultChartConfig() },
|
|
1643
|
-
query:
|
|
1644
|
+
query: ke(e)
|
|
1644
1645
|
};
|
|
1645
1646
|
},
|
|
1646
1647
|
validate(e) {
|
|
@@ -1678,22 +1679,22 @@ var Ae = {
|
|
|
1678
1679
|
};
|
|
1679
1680
|
//#endregion
|
|
1680
1681
|
//#region src/client/components/AnalysisBuilder/AnalysisDisplayConfigPanel.tsx
|
|
1681
|
-
function
|
|
1682
|
-
let [a, o] =
|
|
1683
|
-
|
|
1682
|
+
function Ne({ label: e, value: t, onChange: n, placeholder: r, description: i }) {
|
|
1683
|
+
let [a, o] = v(() => t.join("\n"));
|
|
1684
|
+
h(() => {
|
|
1684
1685
|
o(t.join("\n"));
|
|
1685
1686
|
}, [t]);
|
|
1686
|
-
let s =
|
|
1687
|
+
let s = m(() => {
|
|
1687
1688
|
n(a.split("\n").map((e) => e.trim()).filter((e) => e.length > 0));
|
|
1688
1689
|
}, [a, n]);
|
|
1689
|
-
return /* @__PURE__ */
|
|
1690
|
+
return /* @__PURE__ */ x("div", {
|
|
1690
1691
|
className: "dc:space-y-1",
|
|
1691
1692
|
children: [
|
|
1692
|
-
/* @__PURE__ */
|
|
1693
|
+
/* @__PURE__ */ b("label", {
|
|
1693
1694
|
className: "dc:text-sm text-dc-text-secondary",
|
|
1694
1695
|
children: e
|
|
1695
1696
|
}),
|
|
1696
|
-
/* @__PURE__ */
|
|
1697
|
+
/* @__PURE__ */ b("textarea", {
|
|
1697
1698
|
value: a,
|
|
1698
1699
|
onChange: (e) => o(e.target.value),
|
|
1699
1700
|
onBlur: s,
|
|
@@ -1701,184 +1702,184 @@ function je({ label: e, value: t, onChange: n, placeholder: r, description: i })
|
|
|
1701
1702
|
rows: 4,
|
|
1702
1703
|
className: "dc:w-full dc:px-2 dc:py-1 dc:text-sm dc:border border-dc-border dc:rounded-sm focus:ring-dc-accent focus:border-dc-accent bg-dc-surface text-dc-text dc:resize-y"
|
|
1703
1704
|
}),
|
|
1704
|
-
i && /* @__PURE__ */
|
|
1705
|
+
i && /* @__PURE__ */ b("p", {
|
|
1705
1706
|
className: "dc:text-xs text-dc-text-muted",
|
|
1706
1707
|
children: i
|
|
1707
1708
|
})
|
|
1708
1709
|
]
|
|
1709
1710
|
});
|
|
1710
1711
|
}
|
|
1711
|
-
function
|
|
1712
|
-
let { config:
|
|
1713
|
-
return
|
|
1712
|
+
function Pe({ chartType: e, displayConfig: t, colorPalette: r, onDisplayConfigChange: a, excludeKeys: o }) {
|
|
1713
|
+
let { t: s } = i(), { config: c, loaded: l } = n(e);
|
|
1714
|
+
return l ? c.displayOptions && c.displayOptions.length > 0 || c.displayOptionsConfig && c.displayOptionsConfig.length > 0 ? /* @__PURE__ */ b("div", {
|
|
1714
1715
|
className: "dc:space-y-6",
|
|
1715
|
-
children: /* @__PURE__ */
|
|
1716
|
+
children: /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b(u, {
|
|
1716
1717
|
className: "dc:mb-2",
|
|
1717
|
-
children: "
|
|
1718
|
-
}), /* @__PURE__ */
|
|
1718
|
+
children: s("display.heading")
|
|
1719
|
+
}), /* @__PURE__ */ x("div", {
|
|
1719
1720
|
className: "dc:space-y-2",
|
|
1720
1721
|
children: [
|
|
1721
|
-
|
|
1722
|
+
c.displayOptions?.includes("showLegend") && /* @__PURE__ */ x("label", {
|
|
1722
1723
|
className: "dc:flex dc:items-center dc:space-x-2",
|
|
1723
|
-
children: [/* @__PURE__ */
|
|
1724
|
+
children: [/* @__PURE__ */ b("input", {
|
|
1724
1725
|
type: "checkbox",
|
|
1725
1726
|
checked: t.showLegend ?? !0,
|
|
1726
|
-
onChange: (e) =>
|
|
1727
|
+
onChange: (e) => a({
|
|
1727
1728
|
...t,
|
|
1728
1729
|
showLegend: e.target.checked
|
|
1729
1730
|
}),
|
|
1730
1731
|
className: "dc:rounded border-dc-border focus:ring-dc-accent",
|
|
1731
1732
|
style: { color: "var(--dc-primary)" }
|
|
1732
|
-
}), /* @__PURE__ */
|
|
1733
|
+
}), /* @__PURE__ */ b("span", {
|
|
1733
1734
|
className: "dc:text-sm text-dc-text",
|
|
1734
|
-
children: "
|
|
1735
|
+
children: s("display.showLegend")
|
|
1735
1736
|
})]
|
|
1736
1737
|
}),
|
|
1737
|
-
|
|
1738
|
+
c.displayOptions?.includes("showGrid") && /* @__PURE__ */ x("label", {
|
|
1738
1739
|
className: "dc:flex dc:items-center dc:space-x-2",
|
|
1739
|
-
children: [/* @__PURE__ */
|
|
1740
|
+
children: [/* @__PURE__ */ b("input", {
|
|
1740
1741
|
type: "checkbox",
|
|
1741
1742
|
checked: t.showGrid ?? !0,
|
|
1742
|
-
onChange: (e) =>
|
|
1743
|
+
onChange: (e) => a({
|
|
1743
1744
|
...t,
|
|
1744
1745
|
showGrid: e.target.checked
|
|
1745
1746
|
}),
|
|
1746
1747
|
className: "dc:rounded border-dc-border focus:ring-dc-accent",
|
|
1747
1748
|
style: { color: "var(--dc-primary)" }
|
|
1748
|
-
}), /* @__PURE__ */
|
|
1749
|
+
}), /* @__PURE__ */ b("span", {
|
|
1749
1750
|
className: "dc:text-sm text-dc-text",
|
|
1750
|
-
children: "
|
|
1751
|
+
children: s("display.showGrid")
|
|
1751
1752
|
})]
|
|
1752
1753
|
}),
|
|
1753
|
-
|
|
1754
|
+
c.displayOptions?.includes("showTooltip") && /* @__PURE__ */ x("label", {
|
|
1754
1755
|
className: "dc:flex dc:items-center dc:space-x-2",
|
|
1755
|
-
children: [/* @__PURE__ */
|
|
1756
|
+
children: [/* @__PURE__ */ b("input", {
|
|
1756
1757
|
type: "checkbox",
|
|
1757
1758
|
checked: t.showTooltip ?? !0,
|
|
1758
|
-
onChange: (e) =>
|
|
1759
|
+
onChange: (e) => a({
|
|
1759
1760
|
...t,
|
|
1760
1761
|
showTooltip: e.target.checked
|
|
1761
1762
|
}),
|
|
1762
1763
|
className: "dc:rounded border-dc-border focus:ring-dc-accent",
|
|
1763
1764
|
style: { color: "var(--dc-primary)" }
|
|
1764
|
-
}), /* @__PURE__ */
|
|
1765
|
+
}), /* @__PURE__ */ b("span", {
|
|
1765
1766
|
className: "dc:text-sm text-dc-text",
|
|
1766
|
-
children: "
|
|
1767
|
+
children: s("display.showTooltip")
|
|
1767
1768
|
})]
|
|
1768
1769
|
}),
|
|
1769
|
-
|
|
1770
|
+
c.displayOptions?.includes("stacked") && /* @__PURE__ */ x("label", {
|
|
1770
1771
|
className: "dc:flex dc:items-center dc:space-x-2",
|
|
1771
|
-
children: [/* @__PURE__ */
|
|
1772
|
+
children: [/* @__PURE__ */ b("input", {
|
|
1772
1773
|
type: "checkbox",
|
|
1773
1774
|
checked: t.stacked ?? !1,
|
|
1774
|
-
onChange: (e) =>
|
|
1775
|
+
onChange: (e) => a({
|
|
1775
1776
|
...t,
|
|
1776
1777
|
stacked: e.target.checked
|
|
1777
1778
|
}),
|
|
1778
1779
|
className: "dc:rounded border-dc-border focus:ring-dc-accent",
|
|
1779
1780
|
style: { color: "var(--dc-primary)" }
|
|
1780
|
-
}), /* @__PURE__ */
|
|
1781
|
+
}), /* @__PURE__ */ b("span", {
|
|
1781
1782
|
className: "dc:text-sm text-dc-text",
|
|
1782
|
-
children: "
|
|
1783
|
+
children: s("display.stacked")
|
|
1783
1784
|
})]
|
|
1784
1785
|
}),
|
|
1785
|
-
|
|
1786
|
+
c.displayOptions?.includes("hideHeader") && /* @__PURE__ */ x("label", {
|
|
1786
1787
|
className: "dc:flex dc:items-center dc:space-x-2",
|
|
1787
|
-
children: [/* @__PURE__ */
|
|
1788
|
+
children: [/* @__PURE__ */ b("input", {
|
|
1788
1789
|
type: "checkbox",
|
|
1789
1790
|
checked: t.hideHeader ?? !1,
|
|
1790
|
-
onChange: (e) =>
|
|
1791
|
+
onChange: (e) => a({
|
|
1791
1792
|
...t,
|
|
1792
1793
|
hideHeader: e.target.checked
|
|
1793
1794
|
}),
|
|
1794
1795
|
className: "dc:rounded border-dc-border focus:ring-dc-accent",
|
|
1795
1796
|
style: { color: "var(--dc-primary)" }
|
|
1796
|
-
}), /* @__PURE__ */
|
|
1797
|
+
}), /* @__PURE__ */ b("span", {
|
|
1797
1798
|
className: "dc:text-sm text-dc-text",
|
|
1798
|
-
children: "
|
|
1799
|
+
children: s("display.hideHeader")
|
|
1799
1800
|
})]
|
|
1800
1801
|
}),
|
|
1801
|
-
|
|
1802
|
+
c.displayOptionsConfig?.filter((e) => !o?.includes(e.key)).map((e) => /* @__PURE__ */ x("div", {
|
|
1802
1803
|
className: `dc:space-y-1 ${e.type === "axisFormat" ? "dc:mt-6 dc:pt-2" : ""}`,
|
|
1803
1804
|
children: [
|
|
1804
|
-
e.type === "boolean" && /* @__PURE__ */
|
|
1805
|
+
e.type === "boolean" && /* @__PURE__ */ x("label", {
|
|
1805
1806
|
className: "dc:flex dc:items-center dc:space-x-2",
|
|
1806
|
-
children: [/* @__PURE__ */
|
|
1807
|
+
children: [/* @__PURE__ */ b("input", {
|
|
1807
1808
|
type: "checkbox",
|
|
1808
1809
|
checked: t[e.key] ?? e.defaultValue ?? !1,
|
|
1809
|
-
onChange: (n) =>
|
|
1810
|
+
onChange: (n) => a({
|
|
1810
1811
|
...t,
|
|
1811
1812
|
[e.key]: n.target.checked
|
|
1812
1813
|
}),
|
|
1813
1814
|
className: "dc:rounded border-dc-border focus:ring-dc-accent",
|
|
1814
1815
|
style: { color: "var(--dc-primary)" }
|
|
1815
|
-
}), /* @__PURE__ */
|
|
1816
|
+
}), /* @__PURE__ */ b("span", {
|
|
1816
1817
|
className: "dc:text-sm text-dc-text",
|
|
1817
|
-
children: e.label
|
|
1818
|
+
children: s(e.label)
|
|
1818
1819
|
})]
|
|
1819
1820
|
}),
|
|
1820
|
-
e.type === "string" && /* @__PURE__ */
|
|
1821
|
+
e.type === "string" && /* @__PURE__ */ x("div", {
|
|
1821
1822
|
className: "dc:space-y-1",
|
|
1822
1823
|
children: [
|
|
1823
|
-
/* @__PURE__ */
|
|
1824
|
+
/* @__PURE__ */ x("label", {
|
|
1824
1825
|
className: "dc:text-sm text-dc-text-secondary",
|
|
1825
|
-
children: [e.label, e.key === "content" && /* @__PURE__ */
|
|
1826
|
+
children: [s(e.label), e.key === "content" && /* @__PURE__ */ b("span", {
|
|
1826
1827
|
className: "dc:text-xs text-dc-text-muted dc:ml-1",
|
|
1827
1828
|
children: "(only headers, lists and links)"
|
|
1828
1829
|
})]
|
|
1829
1830
|
}),
|
|
1830
|
-
e.key === "content" ? /* @__PURE__ */
|
|
1831
|
+
e.key === "content" ? /* @__PURE__ */ b("textarea", {
|
|
1831
1832
|
value: t[e.key] ?? e.defaultValue ?? "",
|
|
1832
|
-
onChange: (n) =>
|
|
1833
|
+
onChange: (n) => a({
|
|
1833
1834
|
...t,
|
|
1834
1835
|
[e.key]: n.target.value
|
|
1835
1836
|
}),
|
|
1836
1837
|
placeholder: e.placeholder,
|
|
1837
1838
|
rows: 8,
|
|
1838
1839
|
className: "dc:w-full dc:px-2 dc:py-1 dc:text-sm dc:border border-dc-border dc:rounded-sm focus:ring-dc-accent focus:border-dc-accent dc:font-mono dc:resize-y bg-dc-surface text-dc-text"
|
|
1839
|
-
}) : /* @__PURE__ */
|
|
1840
|
+
}) : /* @__PURE__ */ b("input", {
|
|
1840
1841
|
type: "text",
|
|
1841
1842
|
value: t[e.key] ?? e.defaultValue ?? "",
|
|
1842
|
-
onChange: (n) =>
|
|
1843
|
+
onChange: (n) => a({
|
|
1843
1844
|
...t,
|
|
1844
1845
|
[e.key]: n.target.value
|
|
1845
1846
|
}),
|
|
1846
1847
|
placeholder: e.placeholder,
|
|
1847
1848
|
className: "dc:w-full dc:px-2 dc:py-1 dc:text-sm dc:border border-dc-border dc:rounded-sm focus:ring-dc-accent focus:border-dc-accent bg-dc-surface text-dc-text"
|
|
1848
1849
|
}),
|
|
1849
|
-
e.description && /* @__PURE__ */
|
|
1850
|
+
e.description && /* @__PURE__ */ b("p", {
|
|
1850
1851
|
className: "dc:text-xs text-dc-text-muted",
|
|
1851
|
-
children: e.description
|
|
1852
|
+
children: s(e.description)
|
|
1852
1853
|
})
|
|
1853
1854
|
]
|
|
1854
1855
|
}),
|
|
1855
|
-
e.type === "paletteColor" && /* @__PURE__ */
|
|
1856
|
+
e.type === "paletteColor" && /* @__PURE__ */ x("div", {
|
|
1856
1857
|
className: "dc:space-y-1",
|
|
1857
1858
|
children: [
|
|
1858
|
-
/* @__PURE__ */
|
|
1859
|
+
/* @__PURE__ */ b("label", {
|
|
1859
1860
|
className: "dc:text-sm text-dc-text-secondary",
|
|
1860
|
-
children: e.label
|
|
1861
|
+
children: s(e.label)
|
|
1861
1862
|
}),
|
|
1862
|
-
/* @__PURE__ */
|
|
1863
|
+
/* @__PURE__ */ b("div", {
|
|
1863
1864
|
className: "dc:flex dc:flex-wrap dc:gap-2",
|
|
1864
1865
|
children: r?.colors.map((n, r) => {
|
|
1865
|
-
let
|
|
1866
|
-
return /* @__PURE__ */
|
|
1866
|
+
let i = (t[e.key] ?? e.defaultValue ?? 0) === r;
|
|
1867
|
+
return /* @__PURE__ */ b("button", {
|
|
1867
1868
|
type: "button",
|
|
1868
|
-
onClick: () =>
|
|
1869
|
+
onClick: () => a({
|
|
1869
1870
|
...t,
|
|
1870
1871
|
[e.key]: r
|
|
1871
1872
|
}),
|
|
1872
|
-
className: `dc:w-8 dc:h-8 dc:rounded dc:border-2 dc:transition-all dc:duration-200 dc:hover:scale-110 focus:outline-hidden dc:focus:ring-2 focus:ring-dc-accent dc:focus:ring-offset-1 ${
|
|
1873
|
+
className: `dc:w-8 dc:h-8 dc:rounded dc:border-2 dc:transition-all dc:duration-200 dc:hover:scale-110 focus:outline-hidden dc:focus:ring-2 focus:ring-dc-accent dc:focus:ring-offset-1 ${i ? "dc:ring-2 dc:ring-offset-1 dc:scale-110" : "hover:border-dc-text-muted"}`,
|
|
1873
1874
|
style: {
|
|
1874
1875
|
backgroundColor: n,
|
|
1875
|
-
borderColor:
|
|
1876
|
+
borderColor: i ? "var(--dc-primary)" : "var(--dc-border)"
|
|
1876
1877
|
},
|
|
1877
1878
|
title: `Color ${r + 1}: ${n}`
|
|
1878
1879
|
}, r);
|
|
1879
|
-
}) || [/* @__PURE__ */
|
|
1880
|
+
}) || [/* @__PURE__ */ b("button", {
|
|
1880
1881
|
type: "button",
|
|
1881
|
-
onClick: () =>
|
|
1882
|
+
onClick: () => a({
|
|
1882
1883
|
...t,
|
|
1883
1884
|
[e.key]: 0
|
|
1884
1885
|
}),
|
|
@@ -1891,23 +1892,23 @@ function Me({ chartType: e, displayConfig: t, colorPalette: r, onDisplayConfigCh
|
|
|
1891
1892
|
title: "Default Color"
|
|
1892
1893
|
}, 0)]
|
|
1893
1894
|
}),
|
|
1894
|
-
e.description && /* @__PURE__ */
|
|
1895
|
+
e.description && /* @__PURE__ */ b("p", {
|
|
1895
1896
|
className: "dc:text-xs text-dc-text-muted",
|
|
1896
|
-
children: e.description
|
|
1897
|
+
children: s(e.description)
|
|
1897
1898
|
})
|
|
1898
1899
|
]
|
|
1899
1900
|
}),
|
|
1900
|
-
e.type === "number" && /* @__PURE__ */
|
|
1901
|
+
e.type === "number" && /* @__PURE__ */ x("div", {
|
|
1901
1902
|
className: "dc:space-y-1",
|
|
1902
1903
|
children: [
|
|
1903
|
-
/* @__PURE__ */
|
|
1904
|
+
/* @__PURE__ */ b("label", {
|
|
1904
1905
|
className: "dc:text-sm text-dc-text-secondary",
|
|
1905
|
-
children: e.label
|
|
1906
|
+
children: s(e.label)
|
|
1906
1907
|
}),
|
|
1907
|
-
/* @__PURE__ */
|
|
1908
|
+
/* @__PURE__ */ b("input", {
|
|
1908
1909
|
type: "number",
|
|
1909
1910
|
value: t[e.key] ?? e.defaultValue ?? 0,
|
|
1910
|
-
onChange: (n) =>
|
|
1911
|
+
onChange: (n) => a({
|
|
1911
1912
|
...t,
|
|
1912
1913
|
[e.key]: n.target.value === "" ? void 0 : Number(n.target.value)
|
|
1913
1914
|
}),
|
|
@@ -1917,58 +1918,58 @@ function Me({ chartType: e, displayConfig: t, colorPalette: r, onDisplayConfigCh
|
|
|
1917
1918
|
step: e.step,
|
|
1918
1919
|
className: "dc:w-full dc:px-2 dc:py-1 dc:text-sm dc:border border-dc-border dc:rounded-sm focus:ring-dc-accent focus:border-dc-accent bg-dc-surface text-dc-text"
|
|
1919
1920
|
}),
|
|
1920
|
-
e.description && /* @__PURE__ */
|
|
1921
|
+
e.description && /* @__PURE__ */ b("p", {
|
|
1921
1922
|
className: "dc:text-xs text-dc-text-muted",
|
|
1922
|
-
children: e.description
|
|
1923
|
+
children: s(e.description)
|
|
1923
1924
|
})
|
|
1924
1925
|
]
|
|
1925
1926
|
}),
|
|
1926
|
-
e.type === "select" && /* @__PURE__ */
|
|
1927
|
+
e.type === "select" && /* @__PURE__ */ x("div", {
|
|
1927
1928
|
className: "dc:space-y-1",
|
|
1928
1929
|
children: [
|
|
1929
|
-
/* @__PURE__ */
|
|
1930
|
+
/* @__PURE__ */ b("label", {
|
|
1930
1931
|
className: "dc:text-sm text-dc-text-secondary",
|
|
1931
|
-
children: e.label
|
|
1932
|
+
children: s(e.label)
|
|
1932
1933
|
}),
|
|
1933
|
-
/* @__PURE__ */
|
|
1934
|
+
/* @__PURE__ */ b("select", {
|
|
1934
1935
|
value: t[e.key] ?? e.defaultValue ?? "",
|
|
1935
|
-
onChange: (n) =>
|
|
1936
|
+
onChange: (n) => a({
|
|
1936
1937
|
...t,
|
|
1937
1938
|
[e.key]: n.target.value
|
|
1938
1939
|
}),
|
|
1939
1940
|
className: "dc:w-full dc:px-2 dc:py-1 dc:text-sm dc:border border-dc-border dc:rounded-sm focus:ring-dc-accent focus:border-dc-accent bg-dc-surface text-dc-text",
|
|
1940
|
-
children: e.options?.map((e) => /* @__PURE__ */
|
|
1941
|
+
children: e.options?.map((e) => /* @__PURE__ */ b("option", {
|
|
1941
1942
|
value: e.value,
|
|
1942
|
-
children: e.label
|
|
1943
|
+
children: s(e.label)
|
|
1943
1944
|
}, e.value))
|
|
1944
1945
|
}),
|
|
1945
|
-
e.description && /* @__PURE__ */
|
|
1946
|
+
e.description && /* @__PURE__ */ b("p", {
|
|
1946
1947
|
className: "dc:text-xs text-dc-text-muted",
|
|
1947
|
-
children: e.description
|
|
1948
|
+
children: s(e.description)
|
|
1948
1949
|
})
|
|
1949
1950
|
]
|
|
1950
1951
|
}),
|
|
1951
|
-
e.type === "color" && /* @__PURE__ */
|
|
1952
|
+
e.type === "color" && /* @__PURE__ */ x("div", {
|
|
1952
1953
|
className: "dc:space-y-1",
|
|
1953
1954
|
children: [
|
|
1954
|
-
/* @__PURE__ */
|
|
1955
|
+
/* @__PURE__ */ b("label", {
|
|
1955
1956
|
className: "dc:text-sm text-dc-text-secondary",
|
|
1956
|
-
children: e.label
|
|
1957
|
+
children: s(e.label)
|
|
1957
1958
|
}),
|
|
1958
|
-
/* @__PURE__ */
|
|
1959
|
+
/* @__PURE__ */ x("div", {
|
|
1959
1960
|
className: "dc:flex dc:items-center dc:space-x-2",
|
|
1960
|
-
children: [/* @__PURE__ */
|
|
1961
|
+
children: [/* @__PURE__ */ b("input", {
|
|
1961
1962
|
type: "color",
|
|
1962
1963
|
value: t[e.key] ?? e.defaultValue ?? "#8884d8",
|
|
1963
|
-
onChange: (n) =>
|
|
1964
|
+
onChange: (n) => a({
|
|
1964
1965
|
...t,
|
|
1965
1966
|
[e.key]: n.target.value
|
|
1966
1967
|
}),
|
|
1967
1968
|
className: "dc:w-12 dc:h-8 dc:border border-dc-border dc:rounded-sm dc:cursor-pointer"
|
|
1968
|
-
}), /* @__PURE__ */
|
|
1969
|
+
}), /* @__PURE__ */ b("input", {
|
|
1969
1970
|
type: "text",
|
|
1970
1971
|
value: t[e.key] ?? e.defaultValue ?? "#8884d8",
|
|
1971
|
-
onChange: (n) =>
|
|
1972
|
+
onChange: (n) => a({
|
|
1972
1973
|
...t,
|
|
1973
1974
|
[e.key]: n.target.value
|
|
1974
1975
|
}),
|
|
@@ -1976,52 +1977,52 @@ function Me({ chartType: e, displayConfig: t, colorPalette: r, onDisplayConfigCh
|
|
|
1976
1977
|
className: "dc:flex-1 dc:px-2 dc:py-1 dc:text-sm dc:border border-dc-border dc:rounded-sm focus:ring-dc-accent focus:border-dc-accent bg-dc-surface text-dc-text"
|
|
1977
1978
|
})]
|
|
1978
1979
|
}),
|
|
1979
|
-
e.description && /* @__PURE__ */
|
|
1980
|
+
e.description && /* @__PURE__ */ b("p", {
|
|
1980
1981
|
className: "dc:text-xs text-dc-text-muted",
|
|
1981
|
-
children: e.description
|
|
1982
|
+
children: s(e.description)
|
|
1982
1983
|
})
|
|
1983
1984
|
]
|
|
1984
1985
|
}),
|
|
1985
|
-
e.type === "axisFormat" && /* @__PURE__ */
|
|
1986
|
-
axisLabel: e.label,
|
|
1986
|
+
e.type === "axisFormat" && /* @__PURE__ */ b(d, {
|
|
1987
|
+
axisLabel: s(e.label),
|
|
1987
1988
|
value: t[e.key] || {},
|
|
1988
|
-
onChange: (n) =>
|
|
1989
|
+
onChange: (n) => a({
|
|
1989
1990
|
...t,
|
|
1990
1991
|
[e.key]: Object.keys(n).length > 0 ? n : void 0
|
|
1991
1992
|
})
|
|
1992
1993
|
}),
|
|
1993
|
-
e.type === "stringArray" && /* @__PURE__ */
|
|
1994
|
-
label: e.label,
|
|
1994
|
+
e.type === "stringArray" && /* @__PURE__ */ b(Ne, {
|
|
1995
|
+
label: s(e.label),
|
|
1995
1996
|
value: t[e.key] ?? [],
|
|
1996
|
-
onChange: (n) =>
|
|
1997
|
+
onChange: (n) => a({
|
|
1997
1998
|
...t,
|
|
1998
1999
|
[e.key]: n.length > 0 ? n : void 0
|
|
1999
2000
|
}),
|
|
2000
2001
|
placeholder: e.placeholder,
|
|
2001
|
-
description: e.description
|
|
2002
|
+
description: e.description ? s(e.description) : void 0
|
|
2002
2003
|
}),
|
|
2003
|
-
e.type === "buttonGroup" && /* @__PURE__ */
|
|
2004
|
+
e.type === "buttonGroup" && /* @__PURE__ */ x("div", {
|
|
2004
2005
|
className: "dc:space-y-1",
|
|
2005
2006
|
children: [
|
|
2006
|
-
/* @__PURE__ */
|
|
2007
|
+
/* @__PURE__ */ b("label", {
|
|
2007
2008
|
className: "dc:text-sm text-dc-text-secondary",
|
|
2008
|
-
children: e.label
|
|
2009
|
+
children: s(e.label)
|
|
2009
2010
|
}),
|
|
2010
|
-
/* @__PURE__ */
|
|
2011
|
+
/* @__PURE__ */ b("div", {
|
|
2011
2012
|
className: "dc:flex dc:border border-dc-border dc:rounded-sm dc:overflow-hidden",
|
|
2012
|
-
children: e.options?.map((n) => /* @__PURE__ */
|
|
2013
|
+
children: e.options?.map((n) => /* @__PURE__ */ b("button", {
|
|
2013
2014
|
type: "button",
|
|
2014
|
-
onClick: () =>
|
|
2015
|
+
onClick: () => a({
|
|
2015
2016
|
...t,
|
|
2016
2017
|
[e.key]: n.value
|
|
2017
2018
|
}),
|
|
2018
2019
|
className: `dc:flex-1 dc:px-3 dc:py-1.5 dc:text-sm dc:font-medium dc:transition-colors ${(t[e.key] ?? e.defaultValue) === n.value ? "bg-dc-primary text-white" : "bg-dc-surface text-dc-text hover:bg-dc-border"}`,
|
|
2019
|
-
children: n.label
|
|
2020
|
+
children: s(n.label)
|
|
2020
2021
|
}, n.value))
|
|
2021
2022
|
}),
|
|
2022
|
-
e.description && /* @__PURE__ */
|
|
2023
|
+
e.description && /* @__PURE__ */ b("p", {
|
|
2023
2024
|
className: "dc:text-xs text-dc-text-muted",
|
|
2024
|
-
children: e.description
|
|
2025
|
+
children: s(e.description)
|
|
2025
2026
|
})
|
|
2026
2027
|
]
|
|
2027
2028
|
})
|
|
@@ -2029,73 +2030,76 @@ function Me({ chartType: e, displayConfig: t, colorPalette: r, onDisplayConfigCh
|
|
|
2029
2030
|
}, e.key))
|
|
2030
2031
|
]
|
|
2031
2032
|
})] })
|
|
2032
|
-
}) : /* @__PURE__ */
|
|
2033
|
+
}) : /* @__PURE__ */ b("div", {
|
|
2033
2034
|
className: "dc:text-center text-dc-text-muted dc:text-sm dc:py-4",
|
|
2034
|
-
children: /* @__PURE__ */
|
|
2035
|
-
}) : /* @__PURE__ */
|
|
2035
|
+
children: /* @__PURE__ */ b("p", { children: s("display.noOptions") })
|
|
2036
|
+
}) : /* @__PURE__ */ b("div", {
|
|
2036
2037
|
className: "dc:text-center text-dc-text-muted dc:text-sm dc:py-4",
|
|
2037
|
-
children: "
|
|
2038
|
+
children: s("display.loading")
|
|
2038
2039
|
});
|
|
2039
2040
|
}
|
|
2040
2041
|
//#endregion
|
|
2041
2042
|
//#region src/client/components/ConfirmModal.tsx
|
|
2042
|
-
var
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
children:
|
|
2072
|
-
className: "dc:
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
children:
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2043
|
+
var Fe = ({ isOpen: e, onClose: t, onConfirm: n, title: r, message: a, confirmText: o, cancelText: s, confirmVariant: c = "primary", isLoading: l = !1 }) => {
|
|
2044
|
+
let { t: u } = i(), d = r ?? u("common.actions.confirm"), f = o ?? u("common.actions.confirm"), p = s ?? u("common.actions.cancel");
|
|
2045
|
+
return /* @__PURE__ */ b(J, {
|
|
2046
|
+
isOpen: e,
|
|
2047
|
+
onClose: t,
|
|
2048
|
+
title: d,
|
|
2049
|
+
size: "sm",
|
|
2050
|
+
closeOnBackdropClick: !l,
|
|
2051
|
+
closeOnEscape: !l,
|
|
2052
|
+
footer: /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("button", {
|
|
2053
|
+
type: "button",
|
|
2054
|
+
onClick: t,
|
|
2055
|
+
disabled: l,
|
|
2056
|
+
className: "dc:px-4 dc:py-2 dc:text-sm dc:font-medium text-dc-text-secondary bg-dc-surface dc:border border-dc-border dc:rounded-md hover:bg-dc-surface-hover dc:transition-colors dc:focus:outline-none dc:focus:ring-2 dc:focus:ring-offset-2 focus:ring-dc-primary dc:disabled:opacity-50 dc:disabled:cursor-not-allowed",
|
|
2057
|
+
children: p
|
|
2058
|
+
}), /* @__PURE__ */ b("button", {
|
|
2059
|
+
type: "button",
|
|
2060
|
+
onClick: async () => {
|
|
2061
|
+
await n(), t();
|
|
2062
|
+
},
|
|
2063
|
+
disabled: l,
|
|
2064
|
+
className: (() => {
|
|
2065
|
+
let e = "dc:px-4 dc:py-2 dc:text-sm dc:font-medium dc:rounded-md dc:transition-colors dc:focus:outline-none dc:focus:ring-2 dc:focus:ring-offset-2 dc:disabled:opacity-50 dc:disabled:cursor-not-allowed";
|
|
2066
|
+
switch (c) {
|
|
2067
|
+
case "danger": return `${e} bg-dc-danger dc:text-white dc:hover:bg-dc-danger/90 focus:ring-dc-danger`;
|
|
2068
|
+
case "warning": return `${e} bg-dc-warning dc:text-white dc:hover:bg-dc-warning/90 focus:ring-dc-warning`;
|
|
2069
|
+
default: return `${e} bg-dc-primary dc:text-white dc:hover:bg-dc-primary/90 focus:ring-dc-primary`;
|
|
2070
|
+
}
|
|
2071
|
+
})(),
|
|
2072
|
+
children: l ? /* @__PURE__ */ x("span", {
|
|
2073
|
+
className: "dc:flex dc:items-center dc:gap-2",
|
|
2074
|
+
children: [/* @__PURE__ */ x("svg", {
|
|
2075
|
+
className: "dc:animate-spin dc:h-4 dc:w-4",
|
|
2076
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2077
|
+
fill: "none",
|
|
2078
|
+
viewBox: "0 0 24 24",
|
|
2079
|
+
children: [/* @__PURE__ */ b("circle", {
|
|
2080
|
+
className: "dc:opacity-25",
|
|
2081
|
+
cx: "12",
|
|
2082
|
+
cy: "12",
|
|
2083
|
+
r: "10",
|
|
2084
|
+
stroke: "currentColor",
|
|
2085
|
+
strokeWidth: "4"
|
|
2086
|
+
}), /* @__PURE__ */ b("path", {
|
|
2087
|
+
className: "dc:opacity-75",
|
|
2088
|
+
fill: "currentColor",
|
|
2089
|
+
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
2090
|
+
})]
|
|
2091
|
+
}), u("common.modal.processing")]
|
|
2092
|
+
}) : f
|
|
2093
|
+
})] }),
|
|
2094
|
+
children: /* @__PURE__ */ b("div", {
|
|
2095
|
+
className: "text-dc-text-secondary",
|
|
2096
|
+
children: a
|
|
2097
|
+
})
|
|
2098
|
+
});
|
|
2099
|
+
}, Ie = e("chevronDown");
|
|
2100
|
+
function Le({ currentPalette: e = "default", onPaletteChange: t, className: n = "" }) {
|
|
2101
|
+
let [r, i] = v(!1), a = _(null), o = q(e);
|
|
2102
|
+
h(() => {
|
|
2099
2103
|
function e(e) {
|
|
2100
2104
|
a.current && !a.current.contains(e.target) && i(!1);
|
|
2101
2105
|
}
|
|
@@ -2104,32 +2108,32 @@ function Fe({ currentPalette: e = "default", onPaletteChange: t, className: n =
|
|
|
2104
2108
|
let s = (e) => {
|
|
2105
2109
|
t(e), i(!1);
|
|
2106
2110
|
};
|
|
2107
|
-
return /* @__PURE__ */
|
|
2111
|
+
return /* @__PURE__ */ x("div", {
|
|
2108
2112
|
className: `dc:relative ${n}`,
|
|
2109
2113
|
ref: a,
|
|
2110
|
-
children: [/* @__PURE__ */
|
|
2114
|
+
children: [/* @__PURE__ */ x("button", {
|
|
2111
2115
|
type: "button",
|
|
2112
2116
|
onClick: () => i(!r),
|
|
2113
2117
|
className: "dc:inline-flex dc:items-center dc:gap-2 dc:px-3 dc:py-1.5 bg-dc-surface dc:border border-dc-border dc:rounded-md shadow-xs dc:text-sm dc:font-medium text-dc-text-secondary hover:bg-dc-surface-hover focus:outline-hidden dc:focus:ring-2 dc:focus:ring-offset-2 focus:ring-dc-accent",
|
|
2114
2118
|
children: [
|
|
2115
|
-
/* @__PURE__ */
|
|
2119
|
+
/* @__PURE__ */ x("div", {
|
|
2116
2120
|
className: "dc:hidden dc:md:flex dc:items-center dc:gap-1.5",
|
|
2117
2121
|
children: [
|
|
2118
|
-
/* @__PURE__ */
|
|
2122
|
+
/* @__PURE__ */ b("div", {
|
|
2119
2123
|
className: "dc:flex dc:gap-0.5",
|
|
2120
|
-
children: o.colors.slice(0, 4).map((e, t) => /* @__PURE__ */
|
|
2124
|
+
children: o.colors.slice(0, 4).map((e, t) => /* @__PURE__ */ b("div", {
|
|
2121
2125
|
className: "dc:w-3 dc:h-3 rounded-xs dc:border border-dc-border",
|
|
2122
2126
|
style: { backgroundColor: e },
|
|
2123
2127
|
title: `Series Color ${t + 1}`
|
|
2124
2128
|
}, t))
|
|
2125
2129
|
}),
|
|
2126
|
-
/* @__PURE__ */
|
|
2130
|
+
/* @__PURE__ */ b("span", {
|
|
2127
2131
|
className: "dc:text-xs text-dc-text-secondary",
|
|
2128
2132
|
children: "|"
|
|
2129
2133
|
}),
|
|
2130
|
-
/* @__PURE__ */
|
|
2134
|
+
/* @__PURE__ */ b("div", {
|
|
2131
2135
|
className: "dc:flex dc:gap-0.5",
|
|
2132
|
-
children: o.gradient.slice(0, 3).map((e, t) => /* @__PURE__ */
|
|
2136
|
+
children: o.gradient.slice(0, 3).map((e, t) => /* @__PURE__ */ b("div", {
|
|
2133
2137
|
className: "dc:w-2 dc:h-3 dc:border-r dc:first:rounded-l-sm dc:last:rounded-r-sm dc:last:border-r-0",
|
|
2134
2138
|
style: {
|
|
2135
2139
|
backgroundColor: e,
|
|
@@ -2140,48 +2144,48 @@ function Fe({ currentPalette: e = "default", onPaletteChange: t, className: n =
|
|
|
2140
2144
|
})
|
|
2141
2145
|
]
|
|
2142
2146
|
}),
|
|
2143
|
-
/* @__PURE__ */
|
|
2144
|
-
/* @__PURE__ */
|
|
2147
|
+
/* @__PURE__ */ b("span", { children: o.label }),
|
|
2148
|
+
/* @__PURE__ */ b(Ie, { className: `dc:w-4 dc:h-4 dc:transition-transform ${r ? "dc:rotate-180" : ""}` })
|
|
2145
2149
|
]
|
|
2146
|
-
}), r && /* @__PURE__ */
|
|
2150
|
+
}), r && /* @__PURE__ */ b("div", {
|
|
2147
2151
|
className: "dc:absolute dc:top-full dc:left-0 dc:mt-1 dc:w-72 dc:md:w-80 dc:lg:w-96 bg-dc-surface dc:border border-dc-border dc:rounded-md dc:shadow-lg dc:z-50 dc:max-h-80 dc:overflow-y-auto",
|
|
2148
|
-
children: /* @__PURE__ */
|
|
2152
|
+
children: /* @__PURE__ */ b("div", {
|
|
2149
2153
|
className: "dc:py-1",
|
|
2150
|
-
children: K.slice().sort((e, t) => e.label.localeCompare(t.label)).map((t) => /* @__PURE__ */
|
|
2154
|
+
children: K.slice().sort((e, t) => e.label.localeCompare(t.label)).map((t) => /* @__PURE__ */ b("button", {
|
|
2151
2155
|
type: "button",
|
|
2152
2156
|
onClick: () => s(t.name),
|
|
2153
2157
|
className: `dc:w-full dc:px-3 dc:py-2 dc:text-left dc:text-sm hover:bg-dc-surface-hover focus:outline-hidden focus:bg-dc-surface-hover ${t.name === e ? "bg-dc-surface-secondary" : "text-dc-text-secondary"}`,
|
|
2154
2158
|
style: t.name === e ? { color: "var(--dc-primary)" } : void 0,
|
|
2155
|
-
children: /* @__PURE__ */
|
|
2159
|
+
children: /* @__PURE__ */ x("div", {
|
|
2156
2160
|
className: "dc:flex dc:items-center dc:gap-3",
|
|
2157
2161
|
children: [
|
|
2158
|
-
/* @__PURE__ */
|
|
2162
|
+
/* @__PURE__ */ x("div", {
|
|
2159
2163
|
className: "dc:hidden dc:md:flex dc:items-center dc:gap-2",
|
|
2160
2164
|
children: [
|
|
2161
|
-
/* @__PURE__ */
|
|
2165
|
+
/* @__PURE__ */ b("div", {
|
|
2162
2166
|
className: "dc:flex dc:gap-0.5",
|
|
2163
|
-
children: t.colors.slice(0, 6).map((e, t) => /* @__PURE__ */
|
|
2167
|
+
children: t.colors.slice(0, 6).map((e, t) => /* @__PURE__ */ b("div", {
|
|
2164
2168
|
className: "dc:w-3 dc:h-3 rounded-xs dc:border border-dc-border",
|
|
2165
2169
|
style: { backgroundColor: e }
|
|
2166
2170
|
}, `series-${t}`))
|
|
2167
2171
|
}),
|
|
2168
|
-
/* @__PURE__ */
|
|
2169
|
-
/* @__PURE__ */
|
|
2172
|
+
/* @__PURE__ */ b("div", { className: "dc:w-px dc:h-4 bg-dc-border" }),
|
|
2173
|
+
/* @__PURE__ */ b("div", {
|
|
2170
2174
|
className: "dc:flex",
|
|
2171
|
-
children: t.gradient.map((e, t) => /* @__PURE__ */
|
|
2175
|
+
children: t.gradient.map((e, t) => /* @__PURE__ */ b("div", {
|
|
2172
2176
|
className: "dc:w-2 dc:h-4 dc:first:rounded-l-sm dc:last:rounded-r-sm",
|
|
2173
2177
|
style: { backgroundColor: e }
|
|
2174
2178
|
}, `gradient-${t}`))
|
|
2175
2179
|
})
|
|
2176
2180
|
]
|
|
2177
2181
|
}),
|
|
2178
|
-
/* @__PURE__ */
|
|
2182
|
+
/* @__PURE__ */ b("span", {
|
|
2179
2183
|
className: "dc:font-medium",
|
|
2180
2184
|
children: t.label
|
|
2181
2185
|
}),
|
|
2182
|
-
t.name === e && /* @__PURE__ */
|
|
2186
|
+
t.name === e && /* @__PURE__ */ b("div", {
|
|
2183
2187
|
className: "dc:ml-auto",
|
|
2184
|
-
children: /* @__PURE__ */
|
|
2188
|
+
children: /* @__PURE__ */ b("div", {
|
|
2185
2189
|
className: "dc:w-2 dc:h-2 dc:rounded-full",
|
|
2186
2190
|
style: { backgroundColor: "var(--dc-primary)" }
|
|
2187
2191
|
})
|
|
@@ -2195,386 +2199,380 @@ function Fe({ currentPalette: e = "default", onPaletteChange: t, className: n =
|
|
|
2195
2199
|
}
|
|
2196
2200
|
//#endregion
|
|
2197
2201
|
//#region src/client/components/AnalysisBuilder/FieldSearchItem.tsx
|
|
2198
|
-
var
|
|
2199
|
-
function
|
|
2202
|
+
var Re = e("check");
|
|
2203
|
+
function ze({ field: e, isSelected: n, isFocused: i, onClick: a, onMouseEnter: o, ...s }) {
|
|
2200
2204
|
let c = () => {
|
|
2201
2205
|
if (e.fieldType === "measure") {
|
|
2202
2206
|
let n = t(e.type);
|
|
2203
|
-
return n ? /* @__PURE__ */
|
|
2207
|
+
return n ? /* @__PURE__ */ b(n, { className: "dc:w-4 dc:h-4" }) : null;
|
|
2204
2208
|
} else if (e.fieldType === "timeDimension") {
|
|
2205
2209
|
let e = r("time");
|
|
2206
|
-
return e ? /* @__PURE__ */
|
|
2210
|
+
return e ? /* @__PURE__ */ b(e, { className: "dc:w-4 dc:h-4" }) : null;
|
|
2207
2211
|
} else {
|
|
2208
2212
|
let e = r("dimension");
|
|
2209
|
-
return e ? /* @__PURE__ */
|
|
2213
|
+
return e ? /* @__PURE__ */ b(e, { className: "dc:w-4 dc:h-4" }) : null;
|
|
2210
2214
|
}
|
|
2211
2215
|
}, l = () => e.fieldType === "measure" ? "bg-dc-measure text-dc-measure-text" : e.fieldType === "timeDimension" ? "bg-dc-time-dimension text-dc-time-dimension-text" : "bg-dc-dimension text-dc-dimension-text", u = () => e.fieldType === "measure" ? e.type.charAt(0).toUpperCase() + e.type.slice(1) : e.fieldType === "timeDimension" ? "Time" : "Dim";
|
|
2212
|
-
return /* @__PURE__ */
|
|
2216
|
+
return /* @__PURE__ */ x("button", {
|
|
2213
2217
|
onClick: a,
|
|
2214
2218
|
onMouseEnter: o,
|
|
2215
2219
|
className: `dc:w-full dc:text-left dc:px-3 dc:py-2 dc:rounded-lg dc:flex dc:items-center dc:gap-3 dc:transition-colors dc:group ${i ? "bg-dc-primary/10 dc:ring-1 ring-dc-primary" : n ? "bg-dc-success/10" : "hover:bg-dc-surface-hover"}`,
|
|
2216
2220
|
...s,
|
|
2217
2221
|
children: [
|
|
2218
|
-
/* @__PURE__ */
|
|
2222
|
+
/* @__PURE__ */ b("span", {
|
|
2219
2223
|
className: `dc:shrink-0 dc:w-8 dc:h-8 dc:flex dc:items-center dc:justify-center dc:rounded-md ${e.fieldType === "measure" ? "bg-dc-measure text-dc-measure-text" : e.fieldType === "timeDimension" ? "bg-dc-time-dimension text-dc-time-dimension-text" : "bg-dc-dimension text-dc-dimension-text"}`,
|
|
2220
2224
|
children: c()
|
|
2221
2225
|
}),
|
|
2222
|
-
/* @__PURE__ */
|
|
2226
|
+
/* @__PURE__ */ x("div", {
|
|
2223
2227
|
className: "dc:flex-1 dc:min-w-0",
|
|
2224
|
-
children: [/* @__PURE__ */
|
|
2228
|
+
children: [/* @__PURE__ */ b("div", {
|
|
2225
2229
|
className: "dc:text-sm dc:font-medium text-dc-text dc:truncate",
|
|
2226
2230
|
children: e.title
|
|
2227
|
-
}), /* @__PURE__ */
|
|
2231
|
+
}), /* @__PURE__ */ b("div", {
|
|
2228
2232
|
className: "dc:text-xs text-dc-text-muted dc:truncate",
|
|
2229
2233
|
children: e.name
|
|
2230
2234
|
})]
|
|
2231
2235
|
}),
|
|
2232
|
-
/* @__PURE__ */
|
|
2236
|
+
/* @__PURE__ */ b("span", {
|
|
2233
2237
|
className: `dc:shrink-0 dc:px-2 dc:py-0.5 dc:rounded dc:text-xs dc:font-medium ${l()}`,
|
|
2234
2238
|
children: u()
|
|
2235
2239
|
}),
|
|
2236
|
-
n && /* @__PURE__ */
|
|
2240
|
+
n && /* @__PURE__ */ b("span", {
|
|
2237
2241
|
className: "dc:shrink-0 dc:w-5 dc:h-5 dc:flex dc:items-center dc:justify-center dc:rounded-full bg-dc-success text-white",
|
|
2238
|
-
children: /* @__PURE__ */
|
|
2242
|
+
children: /* @__PURE__ */ b(Re, { className: "dc:w-3 dc:h-3" })
|
|
2239
2243
|
})
|
|
2240
2244
|
]
|
|
2241
2245
|
});
|
|
2242
2246
|
}
|
|
2243
|
-
var
|
|
2247
|
+
var $ = p(ze);
|
|
2244
2248
|
//#endregion
|
|
2245
2249
|
//#region src/client/components/AnalysisBuilder/FieldDetailPanel.tsx
|
|
2246
|
-
function
|
|
2247
|
-
|
|
2250
|
+
function Be({ field: e }) {
|
|
2251
|
+
let { t: n } = i();
|
|
2252
|
+
return e ? /* @__PURE__ */ x("div", {
|
|
2248
2253
|
className: "dc:p-4",
|
|
2249
2254
|
children: [
|
|
2250
|
-
/* @__PURE__ */
|
|
2255
|
+
/* @__PURE__ */ x("div", {
|
|
2251
2256
|
className: "dc:flex dc:items-start dc:gap-3 dc:mb-4",
|
|
2252
|
-
children: [/* @__PURE__ */
|
|
2257
|
+
children: [/* @__PURE__ */ b("span", {
|
|
2253
2258
|
className: `dc:shrink-0 dc:w-12 dc:h-12 dc:flex dc:items-center dc:justify-center dc:rounded-lg ${e.fieldType === "measure" ? "bg-dc-measure text-dc-measure-text" : e.fieldType === "timeDimension" ? "bg-dc-time-dimension text-dc-time-dimension-text" : "bg-dc-dimension text-dc-dimension-text"}`,
|
|
2254
2259
|
children: (() => {
|
|
2255
2260
|
if (e.fieldType === "measure") {
|
|
2256
2261
|
let n = t(e.type);
|
|
2257
|
-
return n ? /* @__PURE__ */
|
|
2262
|
+
return n ? /* @__PURE__ */ b(n, { className: "dc:w-6 dc:h-6" }) : null;
|
|
2258
2263
|
} else if (e.fieldType === "timeDimension") {
|
|
2259
2264
|
let e = r("time");
|
|
2260
|
-
return e ? /* @__PURE__ */
|
|
2265
|
+
return e ? /* @__PURE__ */ b(e, { className: "dc:w-6 dc:h-6" }) : null;
|
|
2261
2266
|
} else {
|
|
2262
2267
|
let e = r("dimension");
|
|
2263
|
-
return e ? /* @__PURE__ */
|
|
2268
|
+
return e ? /* @__PURE__ */ b(e, { className: "dc:w-6 dc:h-6" }) : null;
|
|
2264
2269
|
}
|
|
2265
2270
|
})()
|
|
2266
|
-
}), /* @__PURE__ */
|
|
2271
|
+
}), /* @__PURE__ */ x("div", {
|
|
2267
2272
|
className: "dc:flex-1 dc:min-w-0",
|
|
2268
|
-
children: [/* @__PURE__ */
|
|
2273
|
+
children: [/* @__PURE__ */ b("h3", {
|
|
2269
2274
|
className: "dc:text-base dc:font-semibold text-dc-text dc:leading-tight",
|
|
2270
2275
|
children: e.title
|
|
2271
|
-
}), /* @__PURE__ */
|
|
2276
|
+
}), /* @__PURE__ */ b("p", {
|
|
2272
2277
|
className: "dc:text-xs text-dc-text-muted dc:mt-0.5 dc:truncate",
|
|
2273
2278
|
children: e.name
|
|
2274
2279
|
})]
|
|
2275
2280
|
})]
|
|
2276
2281
|
}),
|
|
2277
|
-
e.description && /* @__PURE__ */
|
|
2282
|
+
e.description && /* @__PURE__ */ b("div", {
|
|
2278
2283
|
className: "dc:mb-4",
|
|
2279
|
-
children: /* @__PURE__ */
|
|
2284
|
+
children: /* @__PURE__ */ b("p", {
|
|
2280
2285
|
className: "dc:text-sm text-dc-text-secondary dc:leading-relaxed",
|
|
2281
2286
|
children: e.description
|
|
2282
2287
|
})
|
|
2283
2288
|
}),
|
|
2284
|
-
/* @__PURE__ */
|
|
2289
|
+
/* @__PURE__ */ x("div", {
|
|
2285
2290
|
className: "dc:space-y-3 dc:pt-4 dc:border-t border-dc-border",
|
|
2286
2291
|
children: [
|
|
2287
|
-
/* @__PURE__ */
|
|
2292
|
+
/* @__PURE__ */ x("div", {
|
|
2288
2293
|
className: "dc:flex dc:items-center dc:justify-between",
|
|
2289
|
-
children: [/* @__PURE__ */
|
|
2294
|
+
children: [/* @__PURE__ */ b("span", {
|
|
2290
2295
|
className: "dc:text-xs text-dc-text-muted",
|
|
2291
|
-
children: "
|
|
2292
|
-
}), /* @__PURE__ */
|
|
2296
|
+
children: n("fieldPanel.labels.type")
|
|
2297
|
+
}), /* @__PURE__ */ b("span", {
|
|
2293
2298
|
className: "dc:text-sm text-dc-text dc:font-medium",
|
|
2294
2299
|
children: e.fieldType === "measure" ? {
|
|
2295
|
-
count: "
|
|
2296
|
-
countDistinct: "
|
|
2297
|
-
countDistinctApprox: "
|
|
2298
|
-
sum: "
|
|
2299
|
-
avg: "
|
|
2300
|
-
min: "
|
|
2301
|
-
max: "
|
|
2302
|
-
runningTotal: "
|
|
2303
|
-
number: "
|
|
2304
|
-
}[e.type] || e.type : e.fieldType === "timeDimension" ? "
|
|
2305
|
-
string: "
|
|
2306
|
-
number: "
|
|
2307
|
-
boolean: "
|
|
2308
|
-
geo: "
|
|
2309
|
-
}[e.type] || "
|
|
2300
|
+
count: n("fieldTypes.count"),
|
|
2301
|
+
countDistinct: n("fieldTypes.countDistinct"),
|
|
2302
|
+
countDistinctApprox: n("fieldTypes.countDistinctApprox"),
|
|
2303
|
+
sum: n("fieldTypes.sum"),
|
|
2304
|
+
avg: n("fieldTypes.avg"),
|
|
2305
|
+
min: n("fieldTypes.min"),
|
|
2306
|
+
max: n("fieldTypes.max"),
|
|
2307
|
+
runningTotal: n("fieldTypes.runningTotal"),
|
|
2308
|
+
number: n("fieldTypes.number")
|
|
2309
|
+
}[e.type] || e.type : e.fieldType === "timeDimension" ? n("fieldTypes.time") : {
|
|
2310
|
+
string: n("fieldTypes.string"),
|
|
2311
|
+
number: n("fieldTypes.number"),
|
|
2312
|
+
boolean: n("fieldTypes.boolean"),
|
|
2313
|
+
geo: n("fieldTypes.geo")
|
|
2314
|
+
}[e.type] || n("fieldTypes.dimension")
|
|
2310
2315
|
})]
|
|
2311
2316
|
}),
|
|
2312
|
-
/* @__PURE__ */
|
|
2317
|
+
/* @__PURE__ */ x("div", {
|
|
2313
2318
|
className: "dc:flex dc:items-center dc:justify-between",
|
|
2314
|
-
children: [/* @__PURE__ */
|
|
2319
|
+
children: [/* @__PURE__ */ b("span", {
|
|
2315
2320
|
className: "dc:text-xs text-dc-text-muted",
|
|
2316
|
-
children: "
|
|
2317
|
-
}), /* @__PURE__ */
|
|
2321
|
+
children: n("fieldPanel.labels.cube")
|
|
2322
|
+
}), /* @__PURE__ */ b("span", {
|
|
2318
2323
|
className: "dc:text-sm text-dc-text dc:font-medium",
|
|
2319
2324
|
children: e.cubeName
|
|
2320
2325
|
})]
|
|
2321
2326
|
}),
|
|
2322
|
-
/* @__PURE__ */
|
|
2327
|
+
/* @__PURE__ */ x("div", {
|
|
2323
2328
|
className: "dc:flex dc:items-center dc:justify-between",
|
|
2324
|
-
children: [/* @__PURE__ */
|
|
2329
|
+
children: [/* @__PURE__ */ b("span", {
|
|
2325
2330
|
className: "dc:text-xs text-dc-text-muted",
|
|
2326
|
-
children: "
|
|
2327
|
-
}), /* @__PURE__ */
|
|
2331
|
+
children: n("fieldPanel.labels.category")
|
|
2332
|
+
}), /* @__PURE__ */ b("span", {
|
|
2328
2333
|
className: `dc:text-xs dc:px-2 dc:py-0.5 dc:rounded dc:font-medium ${e.fieldType === "measure" ? "bg-dc-measure text-dc-measure-text" : e.fieldType === "timeDimension" ? "bg-dc-time-dimension text-dc-time-dimension-text" : "bg-dc-dimension text-dc-dimension-text"}`,
|
|
2329
|
-
children: e.fieldType === "measure" ? "
|
|
2334
|
+
children: n(e.fieldType === "measure" ? "fieldCategory.measure" : e.fieldType === "timeDimension" ? "fieldCategory.timeDimension" : "fieldCategory.dimension")
|
|
2330
2335
|
})]
|
|
2331
2336
|
})
|
|
2332
2337
|
]
|
|
2333
2338
|
}),
|
|
2334
|
-
/* @__PURE__ */
|
|
2339
|
+
/* @__PURE__ */ b("div", {
|
|
2335
2340
|
className: "dc:mt-6 dc:p-3 bg-dc-surface dc:rounded-lg",
|
|
2336
2341
|
children: /* @__PURE__ */ b("p", {
|
|
2337
2342
|
className: "dc:text-xs text-dc-text-muted",
|
|
2338
|
-
children:
|
|
2339
|
-
"Press ",
|
|
2340
|
-
/* @__PURE__ */ y("kbd", {
|
|
2341
|
-
className: "dc:px-1 dc:py-0.5 bg-dc-surface-tertiary dc:rounded dc:text-xs",
|
|
2342
|
-
children: "Enter"
|
|
2343
|
-
}),
|
|
2344
|
-
" or click to add this field to your query."
|
|
2345
|
-
]
|
|
2343
|
+
children: n("fieldPanel.usageHint")
|
|
2346
2344
|
})
|
|
2347
2345
|
})
|
|
2348
2346
|
]
|
|
2349
|
-
}) : /* @__PURE__ */
|
|
2347
|
+
}) : /* @__PURE__ */ b("div", {
|
|
2350
2348
|
className: "dc:p-6 dc:text-center text-dc-text-muted",
|
|
2351
|
-
children: /* @__PURE__ */
|
|
2349
|
+
children: /* @__PURE__ */ b("p", {
|
|
2352
2350
|
className: "dc:text-sm",
|
|
2353
|
-
children: "
|
|
2351
|
+
children: n("fieldPanel.emptyState")
|
|
2354
2352
|
})
|
|
2355
2353
|
});
|
|
2356
2354
|
}
|
|
2357
|
-
var
|
|
2358
|
-
function
|
|
2359
|
-
let
|
|
2360
|
-
if (
|
|
2361
|
-
let e =
|
|
2355
|
+
var Ve = p(Be), He = e("search"), Ue = e("close");
|
|
2356
|
+
function We({ isOpen: e, onClose: t, onSelect: n, mode: r, schema: a, selectedFields: o, recentFields: s }) {
|
|
2357
|
+
let { t: c } = i(), [l, u] = v(""), [d, f] = v(null), [p, y] = v(null), [S, C] = v(-1), [w, T] = v(null), E = _(null), D = _(null), O = g(() => {
|
|
2358
|
+
if (s) return s;
|
|
2359
|
+
let e = ve();
|
|
2362
2360
|
return r === "metrics" ? e.metrics : e.breakdowns;
|
|
2363
|
-
}, [
|
|
2361
|
+
}, [s, r]), k = r, A = g(() => Z(a, k), [a, k]), j = g(() => pe(a), [a]), M = g(() => de(A, l, d), [
|
|
2362
|
+
A,
|
|
2363
|
+
l,
|
|
2364
|
+
d
|
|
2365
|
+
]), N = g(() => fe(M), [M]), P = g(() => l.trim() ? [] : be(a, k, O).filter((e) => !d || e.cubeName === d), [
|
|
2366
|
+
a,
|
|
2367
|
+
k,
|
|
2364
2368
|
O,
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
]),
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
E,
|
|
2371
|
-
s,
|
|
2372
|
-
l
|
|
2373
|
-
]), N = h(() => {
|
|
2374
|
-
let e = [...M];
|
|
2375
|
-
return j.forEach((t) => {
|
|
2369
|
+
l,
|
|
2370
|
+
d
|
|
2371
|
+
]), F = g(() => {
|
|
2372
|
+
let e = [...P];
|
|
2373
|
+
return N.forEach((t) => {
|
|
2376
2374
|
e.push(...t);
|
|
2377
2375
|
}), e;
|
|
2378
|
-
}, [
|
|
2379
|
-
|
|
2380
|
-
e &&
|
|
2381
|
-
}, [e]),
|
|
2382
|
-
e || (
|
|
2376
|
+
}, [P, N]);
|
|
2377
|
+
h(() => {
|
|
2378
|
+
e && E.current && E.current.focus();
|
|
2379
|
+
}, [e]), h(() => {
|
|
2380
|
+
e || (u(""), f(null), y(null), C(-1), T(null));
|
|
2383
2381
|
}, [e]);
|
|
2384
|
-
let
|
|
2385
|
-
|
|
2382
|
+
let I = m((e, t = !1) => {
|
|
2383
|
+
ye(e.name, r === "metrics" ? "metrics" : "breakdowns"), n({
|
|
2386
2384
|
name: e.name,
|
|
2387
2385
|
title: e.title,
|
|
2388
2386
|
shortTitle: e.shortTitle,
|
|
2389
2387
|
type: e.type,
|
|
2390
2388
|
description: e.description
|
|
2391
2389
|
}, e.fieldType, e.cubeName, t);
|
|
2392
|
-
}, [r, n]),
|
|
2393
|
-
if (n &&
|
|
2394
|
-
let e = Math.min(
|
|
2390
|
+
}, [r, n]), L = m((e, t, n = !1) => {
|
|
2391
|
+
if (n && w !== null && w !== t) {
|
|
2392
|
+
let e = Math.min(w, t), n = Math.max(w, t);
|
|
2395
2393
|
for (let t = e; t <= n; t++) {
|
|
2396
|
-
let e =
|
|
2397
|
-
e && !
|
|
2394
|
+
let e = F[t];
|
|
2395
|
+
e && !o.includes(e.name) && I(e, !0);
|
|
2398
2396
|
}
|
|
2399
|
-
} else n ?
|
|
2400
|
-
|
|
2397
|
+
} else n ? I(e, !0) : I(e, !1);
|
|
2398
|
+
T(t);
|
|
2401
2399
|
}, [
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
]),
|
|
2407
|
-
if (
|
|
2400
|
+
F,
|
|
2401
|
+
w,
|
|
2402
|
+
I,
|
|
2403
|
+
o
|
|
2404
|
+
]), R = m((e) => {
|
|
2405
|
+
if (F.length !== 0) switch (e.key) {
|
|
2408
2406
|
case "ArrowDown":
|
|
2409
|
-
e.preventDefault(),
|
|
2410
|
-
let t = Math.min(e + 1,
|
|
2411
|
-
return
|
|
2407
|
+
e.preventDefault(), C((e) => {
|
|
2408
|
+
let t = Math.min(e + 1, F.length - 1);
|
|
2409
|
+
return y(F[t]), t;
|
|
2412
2410
|
});
|
|
2413
2411
|
break;
|
|
2414
2412
|
case "ArrowUp":
|
|
2415
|
-
e.preventDefault(),
|
|
2413
|
+
e.preventDefault(), C((e) => {
|
|
2416
2414
|
let t = Math.max(e - 1, 0);
|
|
2417
|
-
return
|
|
2415
|
+
return y(F[t]), t;
|
|
2418
2416
|
});
|
|
2419
2417
|
break;
|
|
2420
2418
|
case "Enter":
|
|
2421
|
-
e.preventDefault(),
|
|
2419
|
+
e.preventDefault(), S >= 0 && F[S] && L(F[S], S, e.shiftKey);
|
|
2422
2420
|
break;
|
|
2423
2421
|
case "Escape":
|
|
2424
2422
|
e.preventDefault(), t();
|
|
2425
2423
|
break;
|
|
2426
2424
|
}
|
|
2427
2425
|
}, [
|
|
2428
|
-
N,
|
|
2429
|
-
v,
|
|
2430
2426
|
F,
|
|
2427
|
+
S,
|
|
2428
|
+
L,
|
|
2431
2429
|
t
|
|
2432
2430
|
]);
|
|
2433
|
-
if (
|
|
2434
|
-
if (
|
|
2435
|
-
let e =
|
|
2431
|
+
if (h(() => {
|
|
2432
|
+
if (S >= 0 && D.current) {
|
|
2433
|
+
let e = D.current.querySelector(`[data-field-index="${S}"]`);
|
|
2436
2434
|
e && e.scrollIntoView({
|
|
2437
2435
|
block: "nearest",
|
|
2438
2436
|
behavior: "smooth"
|
|
2439
2437
|
});
|
|
2440
2438
|
}
|
|
2441
|
-
}, [
|
|
2442
|
-
let
|
|
2443
|
-
return /* @__PURE__ */
|
|
2439
|
+
}, [S]), !e) return null;
|
|
2440
|
+
let z = c(r === "metrics" ? "fieldSearch.placeholder.metrics" : r === "filter" ? "fieldSearch.placeholder.filter" : "fieldSearch.placeholder.dimensions"), B = c(r === "metrics" ? "fieldSearch.modal.title.metrics" : r === "filter" ? "fieldSearch.modal.title.filter" : "fieldSearch.modal.title.dimensions"), V = S >= 0 && F[S] ? `field-option-${F[S].name.replace(/\./g, "-")}` : void 0;
|
|
2441
|
+
return /* @__PURE__ */ b("div", {
|
|
2444
2442
|
className: "dc:fixed dc:inset-0 dc:z-50 dc:flex dc:items-center dc:justify-center",
|
|
2445
2443
|
style: { backgroundColor: "var(--dc-overlay)" },
|
|
2446
2444
|
onClick: t,
|
|
2447
2445
|
role: "presentation",
|
|
2448
|
-
children: /* @__PURE__ */
|
|
2446
|
+
children: /* @__PURE__ */ x("div", {
|
|
2449
2447
|
role: "dialog",
|
|
2450
2448
|
"aria-modal": "true",
|
|
2451
|
-
"aria-label":
|
|
2449
|
+
"aria-label": B,
|
|
2452
2450
|
className: "bg-dc-surface dc:shadow-xl dc:w-full dc:h-full dc:md:rounded-lg dc:md:w-[900px] dc:md:max-w-[900px] dc:md:h-[80vh] dc:md:max-h-[700px] dc:flex dc:flex-col dc:overflow-hidden",
|
|
2453
2451
|
onClick: (e) => e.stopPropagation(),
|
|
2454
|
-
onKeyDown:
|
|
2452
|
+
onKeyDown: R,
|
|
2455
2453
|
children: [
|
|
2456
|
-
/* @__PURE__ */
|
|
2454
|
+
/* @__PURE__ */ x("div", {
|
|
2457
2455
|
className: "dc:shrink-0 dc:border-b border-dc-border",
|
|
2458
|
-
children: [/* @__PURE__ */
|
|
2456
|
+
children: [/* @__PURE__ */ x("div", {
|
|
2459
2457
|
className: "dc:flex dc:items-center dc:px-4 dc:py-3 dc:gap-3",
|
|
2460
2458
|
children: [
|
|
2461
|
-
/* @__PURE__ */
|
|
2459
|
+
/* @__PURE__ */ b(He, {
|
|
2462
2460
|
className: "dc:w-5 dc:h-5 text-dc-text-muted",
|
|
2463
2461
|
"aria-hidden": !0
|
|
2464
2462
|
}),
|
|
2465
|
-
/* @__PURE__ */
|
|
2466
|
-
ref:
|
|
2463
|
+
/* @__PURE__ */ b("input", {
|
|
2464
|
+
ref: E,
|
|
2467
2465
|
type: "text",
|
|
2468
|
-
value:
|
|
2466
|
+
value: l,
|
|
2469
2467
|
onChange: (e) => {
|
|
2470
|
-
|
|
2468
|
+
u(e.target.value), C(-1);
|
|
2471
2469
|
},
|
|
2472
|
-
placeholder:
|
|
2470
|
+
placeholder: z,
|
|
2473
2471
|
className: "dc:flex-1 bg-transparent dc:border-none dc:outline-none text-dc-text placeholder-dc-text-muted dc:text-lg",
|
|
2474
|
-
"aria-label":
|
|
2472
|
+
"aria-label": z,
|
|
2475
2473
|
"aria-controls": "field-search-results",
|
|
2476
|
-
"aria-activedescendant":
|
|
2474
|
+
"aria-activedescendant": V,
|
|
2477
2475
|
role: "combobox",
|
|
2478
2476
|
"aria-expanded": "true",
|
|
2479
2477
|
"aria-autocomplete": "list"
|
|
2480
2478
|
}),
|
|
2481
|
-
/* @__PURE__ */
|
|
2479
|
+
/* @__PURE__ */ b("button", {
|
|
2482
2480
|
onClick: t,
|
|
2483
2481
|
className: "dc:p-1 text-dc-text-secondary hover:text-dc-text dc:rounded",
|
|
2484
2482
|
"aria-label": "Close dialog",
|
|
2485
|
-
children: /* @__PURE__ */
|
|
2483
|
+
children: /* @__PURE__ */ b(Ue, {
|
|
2486
2484
|
className: "dc:w-5 dc:h-5",
|
|
2487
2485
|
"aria-hidden": !0
|
|
2488
2486
|
})
|
|
2489
2487
|
})
|
|
2490
2488
|
]
|
|
2491
|
-
}),
|
|
2489
|
+
}), j.length > 1 && /* @__PURE__ */ b("div", {
|
|
2492
2490
|
className: "dc:md:hidden dc:px-4 dc:pb-3",
|
|
2493
|
-
children: /* @__PURE__ */
|
|
2494
|
-
value:
|
|
2495
|
-
onChange: (e) =>
|
|
2491
|
+
children: /* @__PURE__ */ x("select", {
|
|
2492
|
+
value: d || "",
|
|
2493
|
+
onChange: (e) => f(e.target.value || null),
|
|
2496
2494
|
className: "dc:w-full dc:px-3 dc:py-2 bg-dc-surface dc:border border-dc-border dc:rounded-lg dc:text-sm text-dc-text dc:focus:outline-none dc:focus:ring-1 focus:ring-dc-primary",
|
|
2497
2495
|
"aria-label": "Filter by cube",
|
|
2498
|
-
children: [/* @__PURE__ */
|
|
2496
|
+
children: [/* @__PURE__ */ b("option", {
|
|
2499
2497
|
value: "",
|
|
2500
|
-
children: "
|
|
2501
|
-
}),
|
|
2498
|
+
children: c("fieldSearch.filter.allCubes")
|
|
2499
|
+
}), j.map((e) => /* @__PURE__ */ b("option", {
|
|
2502
2500
|
value: e,
|
|
2503
|
-
children: Q(e,
|
|
2501
|
+
children: Q(e, a)
|
|
2504
2502
|
}, e))]
|
|
2505
2503
|
})
|
|
2506
2504
|
})]
|
|
2507
2505
|
}),
|
|
2508
|
-
/* @__PURE__ */
|
|
2506
|
+
/* @__PURE__ */ x("div", {
|
|
2509
2507
|
className: "dc:flex-1 dc:flex dc:overflow-hidden",
|
|
2510
2508
|
children: [
|
|
2511
|
-
/* @__PURE__ */
|
|
2509
|
+
/* @__PURE__ */ b("nav", {
|
|
2512
2510
|
className: "dc:hidden dc:md:block dc:w-48 dc:shrink-0 dc:border-r border-dc-border dc:overflow-y-auto bg-dc-surface-secondary",
|
|
2513
2511
|
"aria-label": "Filter by cube",
|
|
2514
|
-
children: /* @__PURE__ */
|
|
2512
|
+
children: /* @__PURE__ */ x("div", {
|
|
2515
2513
|
className: "dc:p-2",
|
|
2516
2514
|
role: "group",
|
|
2517
2515
|
"aria-label": "Cube categories",
|
|
2518
|
-
children: [/* @__PURE__ */
|
|
2519
|
-
onClick: () =>
|
|
2520
|
-
className: `dc:w-full dc:text-left dc:px-3 dc:py-2 dc:rounded-md dc:text-sm dc:transition-colors ${
|
|
2521
|
-
"aria-pressed":
|
|
2522
|
-
children: "
|
|
2523
|
-
}),
|
|
2524
|
-
onClick: () =>
|
|
2525
|
-
className: `dc:w-full dc:text-left dc:px-3 dc:py-2 dc:rounded-md dc:text-sm dc:transition-colors dc:truncate ${
|
|
2526
|
-
title: Q(e,
|
|
2527
|
-
"aria-pressed":
|
|
2528
|
-
children: Q(e,
|
|
2516
|
+
children: [/* @__PURE__ */ b("button", {
|
|
2517
|
+
onClick: () => f(null),
|
|
2518
|
+
className: `dc:w-full dc:text-left dc:px-3 dc:py-2 dc:rounded-md dc:text-sm dc:transition-colors ${d === null ? "bg-dc-primary/10 text-dc-primary dc:font-medium" : "text-dc-text hover:bg-dc-surface-hover"}`,
|
|
2519
|
+
"aria-pressed": d === null,
|
|
2520
|
+
children: c("fieldSearch.categories.all")
|
|
2521
|
+
}), j.map((e) => /* @__PURE__ */ b("button", {
|
|
2522
|
+
onClick: () => f(e),
|
|
2523
|
+
className: `dc:w-full dc:text-left dc:px-3 dc:py-2 dc:rounded-md dc:text-sm dc:transition-colors dc:truncate ${d === e ? "bg-dc-primary/10 text-dc-primary dc:font-medium" : "text-dc-text hover:bg-dc-surface-hover"}`,
|
|
2524
|
+
title: Q(e, a),
|
|
2525
|
+
"aria-pressed": d === e,
|
|
2526
|
+
children: Q(e, a)
|
|
2529
2527
|
}, e))]
|
|
2530
2528
|
})
|
|
2531
2529
|
}),
|
|
2532
|
-
/* @__PURE__ */
|
|
2530
|
+
/* @__PURE__ */ b("div", {
|
|
2533
2531
|
id: "field-search-results",
|
|
2534
|
-
ref:
|
|
2532
|
+
ref: D,
|
|
2535
2533
|
className: "dc:flex-1 dc:overflow-y-auto dc:p-4",
|
|
2536
2534
|
role: "listbox",
|
|
2537
2535
|
"aria-label": "Available fields",
|
|
2538
|
-
children:
|
|
2536
|
+
children: M.length === 0 && P.length === 0 ? /* @__PURE__ */ x("div", {
|
|
2539
2537
|
className: "dc:text-center dc:py-12 text-dc-text-muted",
|
|
2540
|
-
children: [/* @__PURE__ */
|
|
2538
|
+
children: [/* @__PURE__ */ b("p", {
|
|
2541
2539
|
className: "dc:text-lg dc:mb-2",
|
|
2542
|
-
children: "
|
|
2543
|
-
}), /* @__PURE__ */
|
|
2540
|
+
children: c("fieldSearch.empty.heading")
|
|
2541
|
+
}), /* @__PURE__ */ b("p", {
|
|
2544
2542
|
className: "dc:text-sm",
|
|
2545
|
-
children:
|
|
2543
|
+
children: l ? c(r === "metrics" ? "fieldSearch.empty.noMatchMetrics" : "fieldSearch.empty.noMatchDimensions", { searchTerm: l }) : c(r === "metrics" ? "fieldSearch.empty.noMetrics" : "fieldSearch.empty.noDimensions")
|
|
2546
2544
|
})]
|
|
2547
|
-
}) : /* @__PURE__ */
|
|
2545
|
+
}) : /* @__PURE__ */ x("div", {
|
|
2548
2546
|
className: "dc:space-y-6",
|
|
2549
|
-
children: [
|
|
2547
|
+
children: [P.length > 0 && /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("h3", {
|
|
2550
2548
|
className: "dc:text-xs dc:font-semibold text-dc-text-muted dc:uppercase dc:tracking-wider dc:mb-2",
|
|
2551
|
-
children: "
|
|
2552
|
-
}), /* @__PURE__ */
|
|
2549
|
+
children: c("fieldSearch.section.recents")
|
|
2550
|
+
}), /* @__PURE__ */ b("div", {
|
|
2553
2551
|
className: "dc:space-y-1",
|
|
2554
|
-
children:
|
|
2552
|
+
children: P.map((e, t) => /* @__PURE__ */ b($, {
|
|
2555
2553
|
field: e,
|
|
2556
|
-
isSelected:
|
|
2557
|
-
isFocused:
|
|
2558
|
-
onClick: (n) =>
|
|
2554
|
+
isSelected: o.includes(e.name),
|
|
2555
|
+
isFocused: S === t,
|
|
2556
|
+
onClick: (n) => L(e, t, n.shiftKey),
|
|
2559
2557
|
onMouseEnter: () => {
|
|
2560
|
-
|
|
2558
|
+
y(e), C(t);
|
|
2561
2559
|
},
|
|
2562
2560
|
"data-field-index": t
|
|
2563
2561
|
}, `recent-${e.name}`))
|
|
2564
|
-
})] }), Array.from(
|
|
2562
|
+
})] }), Array.from(N.entries()).map(([e, t]) => /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("h3", {
|
|
2565
2563
|
className: "dc:text-xs dc:font-semibold text-dc-text-muted dc:uppercase dc:tracking-wider dc:mb-2",
|
|
2566
|
-
children: Q(e,
|
|
2567
|
-
}), /* @__PURE__ */
|
|
2564
|
+
children: Q(e, a)
|
|
2565
|
+
}), /* @__PURE__ */ b("div", {
|
|
2568
2566
|
className: "dc:space-y-1",
|
|
2569
2567
|
children: t.map((n) => {
|
|
2570
|
-
let r =
|
|
2571
|
-
return /* @__PURE__ */
|
|
2568
|
+
let r = P.length + Array.from(N.entries()).slice(0, Array.from(N.keys()).indexOf(e)).reduce((e, [, t]) => e + t.length, 0) + t.indexOf(n);
|
|
2569
|
+
return /* @__PURE__ */ b($, {
|
|
2572
2570
|
field: n,
|
|
2573
|
-
isSelected:
|
|
2574
|
-
isFocused:
|
|
2575
|
-
onClick: (e) =>
|
|
2571
|
+
isSelected: o.includes(n.name),
|
|
2572
|
+
isFocused: S === r,
|
|
2573
|
+
onClick: (e) => L(n, r, e.shiftKey),
|
|
2576
2574
|
onMouseEnter: () => {
|
|
2577
|
-
|
|
2575
|
+
y(n), C(r);
|
|
2578
2576
|
},
|
|
2579
2577
|
"data-field-index": r
|
|
2580
2578
|
}, n.name);
|
|
@@ -2582,41 +2580,57 @@ function Ue({ isOpen: e, onClose: t, onSelect: n, mode: r, schema: i, selectedFi
|
|
|
2582
2580
|
})] }, e))]
|
|
2583
2581
|
})
|
|
2584
2582
|
}),
|
|
2585
|
-
/* @__PURE__ */
|
|
2583
|
+
/* @__PURE__ */ b("div", {
|
|
2586
2584
|
className: "dc:hidden dc:md:block dc:w-72 dc:shrink-0 dc:border-l border-dc-border bg-dc-surface-secondary dc:overflow-y-auto",
|
|
2587
|
-
children: /* @__PURE__ */
|
|
2585
|
+
children: /* @__PURE__ */ b(Ve, { field: p })
|
|
2588
2586
|
})
|
|
2589
2587
|
]
|
|
2590
2588
|
}),
|
|
2591
|
-
/* @__PURE__ */
|
|
2589
|
+
/* @__PURE__ */ x("div", {
|
|
2592
2590
|
className: "dc:shrink-0 dc:border-t border-dc-border dc:px-4 dc:py-3 dc:flex dc:items-center dc:justify-between dc:text-sm text-dc-text-muted",
|
|
2593
|
-
children: [/* @__PURE__ */
|
|
2594
|
-
/* @__PURE__ */
|
|
2591
|
+
children: [/* @__PURE__ */ x("div", { children: [
|
|
2592
|
+
/* @__PURE__ */ b("span", {
|
|
2595
2593
|
className: "text-dc-text-secondary",
|
|
2596
|
-
children:
|
|
2594
|
+
children: M.length
|
|
2597
2595
|
}),
|
|
2598
2596
|
" ",
|
|
2599
|
-
r === "metrics" ? "
|
|
2600
|
-
|
|
2601
|
-
] }), /* @__PURE__ */ b("div", {
|
|
2597
|
+
c(r === "metrics" ? "fieldSearch.footer.metricsAvailable" : r === "filter" ? "fieldSearch.footer.fieldsAvailable" : "fieldSearch.footer.dimensionsAvailable")
|
|
2598
|
+
] }), /* @__PURE__ */ x("div", {
|
|
2602
2599
|
className: "dc:hidden dc:md:flex dc:items-center dc:gap-4",
|
|
2603
2600
|
children: [
|
|
2604
|
-
/* @__PURE__ */
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
/* @__PURE__ */
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2601
|
+
/* @__PURE__ */ x("span", { children: [
|
|
2602
|
+
/* @__PURE__ */ b("kbd", {
|
|
2603
|
+
className: "dc:px-1.5 dc:py-0.5 bg-dc-surface-tertiary dc:rounded dc:text-xs",
|
|
2604
|
+
children: "↑↓"
|
|
2605
|
+
}),
|
|
2606
|
+
" ",
|
|
2607
|
+
c("fieldSearch.shortcut.navigate")
|
|
2608
|
+
] }),
|
|
2609
|
+
/* @__PURE__ */ x("span", { children: [
|
|
2610
|
+
/* @__PURE__ */ b("kbd", {
|
|
2611
|
+
className: "dc:px-1.5 dc:py-0.5 bg-dc-surface-tertiary dc:rounded dc:text-xs",
|
|
2612
|
+
children: c("fieldSearch.shortcut.keyEnter")
|
|
2613
|
+
}),
|
|
2614
|
+
" ",
|
|
2615
|
+
c("fieldSearch.shortcut.select")
|
|
2616
|
+
] }),
|
|
2617
|
+
/* @__PURE__ */ x("span", { children: [
|
|
2618
|
+
/* @__PURE__ */ b("kbd", {
|
|
2619
|
+
className: "dc:px-1.5 dc:py-0.5 bg-dc-surface-tertiary dc:rounded dc:text-xs",
|
|
2620
|
+
children: c("fieldSearch.shortcut.keyShift")
|
|
2621
|
+
}),
|
|
2622
|
+
c("fieldSearch.shortcut.plusClick"),
|
|
2623
|
+
" ",
|
|
2624
|
+
c("fieldSearch.shortcut.multiSelect")
|
|
2625
|
+
] }),
|
|
2626
|
+
/* @__PURE__ */ x("span", { children: [
|
|
2627
|
+
/* @__PURE__ */ b("kbd", {
|
|
2628
|
+
className: "dc:px-1.5 dc:py-0.5 bg-dc-surface-tertiary dc:rounded dc:text-xs",
|
|
2629
|
+
children: c("fieldSearch.shortcut.keyEsc")
|
|
2630
|
+
}),
|
|
2631
|
+
" ",
|
|
2632
|
+
c("fieldSearch.shortcut.close")
|
|
2633
|
+
] })
|
|
2620
2634
|
]
|
|
2621
2635
|
})]
|
|
2622
2636
|
})
|
|
@@ -2625,6 +2639,6 @@ function Ue({ isOpen: e, onClose: t, onSelect: n, mode: r, schema: i, selectedFi
|
|
|
2625
2639
|
});
|
|
2626
2640
|
}
|
|
2627
2641
|
//#endregion
|
|
2628
|
-
export {
|
|
2642
|
+
export { F as A, te as C, A as D, j as E, T as F, D as I, O as L, C as M, E as N, k as O, S as P, P as R, re as S, N as T, se as _, Me as a, ae as b, X as c, Y as d, le as f, ce as g, q as h, Pe as i, w as j, M as k, ue as l, K as m, Le as n, Oe as o, J as p, Fe as r, we as s, We as t, he as u, oe as v, V as w, H as x, ie as y };
|
|
2629
2643
|
|
|
2630
|
-
//# sourceMappingURL=FieldSearchModal-
|
|
2644
|
+
//# sourceMappingURL=FieldSearchModal-CZNo4pNK.js.map
|