react-semaphor 0.1.522 → 0.1.524

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (536) hide show
  1. package/dist/appearance-runtime/index.js +1 -1
  2. package/dist/brand-studio/index.js +1 -1
  3. package/dist/briefings/index.js +1 -1
  4. package/dist/chunks/{appearance-context-VJdrKi7r.js → appearance-context-DEYtWinQ.js} +0 -1
  5. package/dist/chunks/{appearance-runtime-provider-CC4HT2Gi.js → appearance-runtime-provider-B-M8gwlZ.js} +1 -1
  6. package/dist/chunks/{dashboard-briefing-launcher-BIRnsMqX.js → dashboard-briefing-launcher-CTEyh3FQ.js} +790 -800
  7. package/dist/chunks/dashboard-controls-C3KbYzz-.js +2146 -0
  8. package/dist/chunks/{dashboard-json-Dq5ibJr2.js → dashboard-json-Kc_M7nLP.js} +5 -5
  9. package/dist/chunks/edit-dashboard-visual-DqRmfRqN.js +22114 -0
  10. package/dist/chunks/{editor-action-buttons-DuxlCZYf.js → editor-action-buttons-s-ByVR9x.js} +740 -675
  11. package/dist/chunks/{index-krDPPQuA.js → index-D7GVxl4a.js} +41775 -42583
  12. package/dist/chunks/{index-B0KwXM6P.js → index-D9HDUSye.js} +186 -181
  13. package/dist/chunks/{report-preferences-dialog-BA9YJnPe.js → report-preferences-dialog-RAp0DAuw.js} +2 -2
  14. package/dist/chunks/{switch-evlnTA4t.js → switch-CWPcwAZ4.js} +4473 -5054
  15. package/dist/dashboard/index.js +1 -1
  16. package/dist/dashboard-assistant/index.js +1 -2
  17. package/dist/data-app-builder/index.js +2 -2
  18. package/dist/index.js +9 -9
  19. package/dist/style.css +1 -1
  20. package/dist/surfboard/index.js +2 -2
  21. package/dist/types/brand-studio/brand-studio-editor.d.ts +2 -1
  22. package/dist/types/briefings/index.d.ts +5 -0
  23. package/dist/types/components/ai/assistant-context-entity-controls.d.ts +1 -1
  24. package/dist/types/components/ai/assistant-message-components.d.ts +6 -6
  25. package/dist/types/components/ai/assistant-message.d.ts +1 -1
  26. package/dist/types/components/ai/assistant-virtualized-messages.d.ts +1 -1
  27. package/dist/types/components/ai/chat-custom-visual.d.ts +1 -1
  28. package/dist/types/components/ai/chat-visual-query-utils.d.ts +0 -27
  29. package/dist/types/components/ai/chat-visual.d.ts +1 -1
  30. package/dist/types/components/ai/clarification-card.d.ts +1 -1
  31. package/dist/types/components/ai/context-entity-display.d.ts +1 -1
  32. package/dist/types/components/ai/dashboard-assistant.d.ts +1 -4
  33. package/dist/types/components/ai/editor-assistant.d.ts +1 -1
  34. package/dist/types/components/ai/entity-mention-dropdown.d.ts +2 -1
  35. package/dist/types/components/ai/file-upload/file-preview.d.ts +3 -2
  36. package/dist/types/components/ai/file-upload/file-upload-button.d.ts +2 -1
  37. package/dist/types/components/ai/file-upload/file-upload-zone.d.ts +2 -2
  38. package/dist/types/components/ai/message-feedback-buttons.d.ts +1 -1
  39. package/dist/types/components/ai/pending-messages-display.d.ts +1 -1
  40. package/dist/types/components/ai/placeholders.d.ts +1 -1
  41. package/dist/types/components/ai/pre-block.d.ts +2 -2
  42. package/dist/types/components/ai/reasoning-effort-slider.d.ts +1 -1
  43. package/dist/types/components/ai/seed-questions.d.ts +1 -1
  44. package/dist/types/components/ai/tool-call-error.d.ts +1 -1
  45. package/dist/types/components/ai/tool-call.d.ts +1 -1
  46. package/dist/types/components/ai/tool-part-renderer.d.ts +1 -1
  47. package/dist/types/components/briefings/attachments/briefing-attachment-list.d.ts +1 -1
  48. package/dist/types/components/briefings/attachments/briefing-attachment-selector.d.ts +1 -1
  49. package/dist/types/components/briefings/attachments/briefing-attachment-settings-dialog.d.ts +1 -1
  50. package/dist/types/components/briefings/briefing-author/attachment-section.d.ts +1 -1
  51. package/dist/types/components/briefings/briefing-author/author-actions.d.ts +1 -1
  52. package/dist/types/components/briefings/briefing-author/content-composers.d.ts +2 -2
  53. package/dist/types/components/briefings/briefing-author/delivery-section.d.ts +1 -1
  54. package/dist/types/components/briefings/briefing-author/form-primitives.d.ts +3 -3
  55. package/dist/types/components/briefings/briefing-author/run-ui.d.ts +12 -12
  56. package/dist/types/components/briefings/briefing-author/schedule-section.d.ts +1 -1
  57. package/dist/types/components/briefings/briefing-author/schedule.d.ts +1 -1
  58. package/dist/types/components/briefings/briefing-author/scope-picker.d.ts +1 -1
  59. package/dist/types/components/briefings/briefing-author/slack-channel-picker.d.ts +1 -1
  60. package/dist/types/components/briefings/briefing-author-dialog.d.ts +1 -1
  61. package/dist/types/components/briefings/briefing-author.d.ts +1 -1
  62. package/dist/types/components/briefings/briefing-html-frame.d.ts +1 -1
  63. package/dist/types/components/briefings/briefing-recipient-field.d.ts +1 -1
  64. package/dist/types/components/briefings/briefing-ui-capabilities.d.ts +2 -2
  65. package/dist/types/components/briefings/dashboard-briefing-launcher-list.d.ts +1 -1
  66. package/dist/types/components/briefings/dashboard-briefing-launcher.d.ts +1 -1
  67. package/dist/types/components/briefings/dashboard-schedule-report-menu-item.d.ts +2 -2
  68. package/dist/types/components/briefings/watch-dashboard-button.d.ts +1 -1
  69. package/dist/types/components/calculated-fields/ai-compose-panel.d.ts +1 -1
  70. package/dist/types/components/calculated-fields/calculated-field-editor.d.ts +2 -1
  71. package/dist/types/components/calculated-fields/domain-definition-notice.d.ts +1 -1
  72. package/dist/types/components/calculated-fields/expression-validator.d.ts +1 -1
  73. package/dist/types/components/calculated-fields/field-picker-panel.d.ts +1 -1
  74. package/dist/types/components/calculated-fields/field-type-toggle.d.ts +1 -1
  75. package/dist/types/components/calculated-fields/insert-field-popover.d.ts +1 -1
  76. package/dist/types/components/calculated-fields/placeholder-field-picker.d.ts +1 -1
  77. package/dist/types/components/calculated-fields/summary-ribbon.d.ts +1 -1
  78. package/dist/types/components/calculated-fields/templates-menu.d.ts +1 -1
  79. package/dist/types/components/calculated-fields/validation-results.d.ts +1 -1
  80. package/dist/types/components/chart-selector/chart-icon.d.ts +3 -2
  81. package/dist/types/components/chart-selector/chart-selector-item.d.ts +7 -8
  82. package/dist/types/components/chart-selector/chart-selector.d.ts +9 -3
  83. package/dist/types/components/chart-selector/chart-type-picker.d.ts +1 -1
  84. package/dist/types/components/chart-selector/index.d.ts +0 -1
  85. package/dist/types/components/dashboard/ai-dashboard-create-dialog.d.ts +2 -2
  86. package/dist/types/components/dashboard/card-actions-menu.d.ts +1 -1
  87. package/dist/types/components/dashboard/card-selection-pill.d.ts +1 -1
  88. package/dist/types/components/dashboard/card-summary.d.ts +1 -1
  89. package/dist/types/components/dashboard/comparison-metadata-badge.d.ts +2 -2
  90. package/dist/types/components/dashboard/dashboard-card.d.ts +1 -1
  91. package/dist/types/components/dashboard/dashboard-container.d.ts +1 -1
  92. package/dist/types/components/dashboard/dashboard-error-state.d.ts +1 -1
  93. package/dist/types/components/dashboard/dashboard-export-dialog.d.ts +1 -1
  94. package/dist/types/components/dashboard/dashboard-frame-expand-dialog.d.ts +1 -1
  95. package/dist/types/components/dashboard/dashboard-frame.d.ts +1 -1
  96. package/dist/types/components/dashboard/dashboard-hub-row.d.ts +1 -1
  97. package/dist/types/components/dashboard/dashboard-hub.d.ts +1 -1
  98. package/dist/types/components/dashboard/dashboard-tabs.d.ts +1 -1
  99. package/dist/types/components/dashboard/dashboard-visual-error-state.d.ts +3 -3
  100. package/dist/types/components/dashboard/dashboard.d.ts +1 -1
  101. package/dist/types/components/dashboard/download-pdf.d.ts +1 -1
  102. package/dist/types/components/dashboard/drill-breadcrumb.d.ts +1 -1
  103. package/dist/types/components/dashboard/drill-navigation-controls.d.ts +1 -1
  104. package/dist/types/components/dashboard/inline-filter-bar.d.ts +2 -1
  105. package/dist/types/components/dashboard/inline-filter-component.d.ts +2 -1
  106. package/dist/types/components/dashboard/kpi-header.d.ts +1 -1
  107. package/dist/types/components/dashboard/sheet/delete-sheet-alert.d.ts +1 -1
  108. package/dist/types/components/dashboard/sheet/sheet-empty-state.d.ts +1 -1
  109. package/dist/types/components/dashboard/sheet/sheet-layout.d.ts +2 -1
  110. package/dist/types/components/dashboard/summary-card.d.ts +3 -3
  111. package/dist/types/components/dashboard/unconfigured-card-state.d.ts +1 -1
  112. package/dist/types/components/data-app-runtime/published-data-app-runtime.d.ts +1 -1
  113. package/dist/types/components/document-sheet/document-control-options-resolver.d.ts +1 -1
  114. package/dist/types/components/document-sheet/document-control-toolbar-actions.d.ts +1 -1
  115. package/dist/types/components/document-sheet/document-controls-settings.d.ts +1 -1
  116. package/dist/types/components/document-sheet/document-input-bar.d.ts +1 -1
  117. package/dist/types/components/document-sheet/document-insert-picker.d.ts +2 -2
  118. package/dist/types/components/document-sheet/document-inspector-primitives.d.ts +2 -2
  119. package/dist/types/components/document-sheet/document-kpi-section.d.ts +1 -1
  120. package/dist/types/components/document-sheet/document-matrix-section.d.ts +1 -1
  121. package/dist/types/components/document-sheet/document-measure-layer.d.ts +1 -1
  122. package/dist/types/components/document-sheet/document-outline.d.ts +1 -1
  123. package/dist/types/components/document-sheet/document-page-navigation.d.ts +2 -2
  124. package/dist/types/components/document-sheet/document-page.d.ts +3 -3
  125. package/dist/types/components/document-sheet/document-panel/document-side-panel.d.ts +1 -1
  126. package/dist/types/components/document-sheet/document-panel/inputs-panel.d.ts +1 -1
  127. package/dist/types/components/document-sheet/document-panel/page-panel.d.ts +1 -1
  128. package/dist/types/components/document-sheet/document-panel/panel-controls.d.ts +2 -2
  129. package/dist/types/components/document-sheet/document-panel/region-panels.d.ts +2 -2
  130. package/dist/types/components/document-sheet/document-panel/section-panel.d.ts +2 -2
  131. package/dist/types/components/document-sheet/document-section-print-boundary.d.ts +1 -1
  132. package/dist/types/components/document-sheet/document-sheet.d.ts +2 -2
  133. package/dist/types/components/document-sheet/document-table-chrome.d.ts +5 -5
  134. package/dist/types/components/document-sheet/document-table-section.d.ts +1 -1
  135. package/dist/types/components/document-sheet/document-text-editor.d.ts +1 -1
  136. package/dist/types/components/editor/dashboard-json.d.ts +1 -1
  137. package/dist/types/components/editor/editable.d.ts +1 -1
  138. package/dist/types/components/editor/editor-main/advanced-mode-toggle.d.ts +1 -1
  139. package/dist/types/components/editor/editor-main/card-display-options-dropdown.d.ts +1 -1
  140. package/dist/types/components/editor/editor-main/card-tabs.d.ts +1 -1
  141. package/dist/types/components/editor/editor-main/chart-configuration-options.d.ts +1 -1
  142. package/dist/types/components/editor/editor-main/code-editors/expanded-query-editor-dialog.d.ts +1 -1
  143. package/dist/types/components/editor/editor-main/code-editors/json-editor-readonly.d.ts +1 -1
  144. package/dist/types/components/editor/editor-main/content-editable-text.d.ts +2 -1
  145. package/dist/types/components/editor/editor-main/context-hover-card.d.ts +2 -1
  146. package/dist/types/components/editor/editor-main/customize-visual/customize-visual-dialog.d.ts +1 -1
  147. package/dist/types/components/editor/editor-main/dashboard-filter-subscription-status.d.ts +1 -1
  148. package/dist/types/components/editor/editor-main/data-label-settings.d.ts +1 -1
  149. package/dist/types/components/editor/editor-main/edit-dashboard-visual.d.ts +2 -1
  150. package/dist/types/components/editor/editor-main/editor-action-buttons.d.ts +7 -7
  151. package/dist/types/components/editor/editor-main/editor-actions-biz-mode.d.ts +1 -1
  152. package/dist/types/components/editor/editor-main/editor-card.d.ts +1 -1
  153. package/dist/types/components/editor/editor-main/editor-main-component.d.ts +1 -1
  154. package/dist/types/components/editor/editor-main/editor-query-section.d.ts +3 -2
  155. package/dist/types/components/editor/editor-main/editor-visual-section.d.ts +3 -8
  156. package/dist/types/components/editor/editor-main/inline-query-writer/inline-query-writer.d.ts +1 -1
  157. package/dist/types/components/editor/editor-main/legend-popover.d.ts +1 -1
  158. package/dist/types/components/editor/editor-main/raw-output-table.d.ts +2 -1
  159. package/dist/types/components/editor/editor-main/realtime-popover.d.ts +1 -1
  160. package/dist/types/components/editor/editor-main/table-type-switcher.d.ts +1 -1
  161. package/dist/types/components/editor/editor-main/text-card-rich-editor.d.ts +2 -1
  162. package/dist/types/components/editor/editor-main/text-card.d.ts +2 -1
  163. package/dist/types/components/editor/editor-main/visual-aside.d.ts +1 -1
  164. package/dist/types/components/editor/editor-main/visual-editing-controls.d.ts +1 -1
  165. package/dist/types/components/editor/editor-main/visual-save-as-dialog.d.ts +2 -1
  166. package/dist/types/components/editor/editor-main/visual-settings.d.ts +1 -1
  167. package/dist/types/components/editor/editor.d.ts +1 -1
  168. package/dist/types/components/editor/mode-toggle.d.ts +2 -2
  169. package/dist/types/components/editor/query-feedback/query-card-details.d.ts +2 -2
  170. package/dist/types/components/editor/query-feedback/query-error.d.ts +2 -2
  171. package/dist/types/components/editor/query-feedback/query-feedback-layout.d.ts +3 -3
  172. package/dist/types/components/editor/query-feedback/query-info.d.ts +1 -1
  173. package/dist/types/components/editor/query-feedback/query-sql-preview.d.ts +1 -1
  174. package/dist/types/components/editor/query-feedback/visual-query-error-state.d.ts +1 -1
  175. package/dist/types/components/error-fallbacks/fallback.d.ts +4 -4
  176. package/dist/types/components/explorer/chart-configuration/area-series-config-section.d.ts +1 -1
  177. package/dist/types/components/explorer/chart-configuration/axis-config-section.d.ts +1 -1
  178. package/dist/types/components/explorer/chart-configuration/bar-series-config-section.d.ts +1 -1
  179. package/dist/types/components/explorer/chart-configuration/bar-style-config-section.d.ts +1 -1
  180. package/dist/types/components/explorer/chart-configuration/bubble-scatter-config-section.d.ts +1 -1
  181. package/dist/types/components/explorer/chart-configuration/bullet-config-section.d.ts +1 -1
  182. package/dist/types/components/explorer/chart-configuration/chart-config-sections.d.ts +1 -1
  183. package/dist/types/components/explorer/chart-configuration/chart-configuration-panel.d.ts +1 -1
  184. package/dist/types/components/explorer/chart-configuration/chart-fields-configuration.d.ts +2 -2
  185. package/dist/types/components/explorer/chart-configuration/chart-type-row.d.ts +2 -2
  186. package/dist/types/components/explorer/chart-configuration/color-config-section.d.ts +1 -1
  187. package/dist/types/components/explorer/chart-configuration/combo-series-config-section.d.ts +1 -1
  188. package/dist/types/components/explorer/chart-configuration/comparison-config-section.d.ts +2 -2
  189. package/dist/types/components/explorer/chart-configuration/custom-color-picker.d.ts +1 -1
  190. package/dist/types/components/explorer/chart-configuration/data-labels-config-section.d.ts +1 -1
  191. package/dist/types/components/explorer/chart-configuration/data-labels-fields.d.ts +1 -1
  192. package/dist/types/components/explorer/chart-configuration/funnel-config-section.d.ts +1 -1
  193. package/dist/types/components/explorer/chart-configuration/heatmap-color-config-section.d.ts +1 -1
  194. package/dist/types/components/explorer/chart-configuration/kpi-format-config-section.d.ts +1 -1
  195. package/dist/types/components/explorer/chart-configuration/legend-config-section.d.ts +1 -1
  196. package/dist/types/components/explorer/chart-configuration/line-series-config-section.d.ts +1 -1
  197. package/dist/types/components/explorer/chart-configuration/line-style-config-section.d.ts +1 -1
  198. package/dist/types/components/explorer/chart-configuration/matrix-authoring-controls.d.ts +5 -5
  199. package/dist/types/components/explorer/chart-configuration/matrix-authoring-panel.d.ts +1 -1
  200. package/dist/types/components/explorer/chart-configuration/matrix-editor-settings.d.ts +1 -1
  201. package/dist/types/components/explorer/chart-configuration/metric-format-editor.d.ts +1 -1
  202. package/dist/types/components/explorer/chart-configuration/number-format-config.d.ts +2 -1
  203. package/dist/types/components/explorer/chart-configuration/stacked-sort-section.d.ts +1 -1
  204. package/dist/types/components/explorer/chart-configuration/summary-config-section.d.ts +1 -1
  205. package/dist/types/components/explorer/chart-configuration/tooltip-format-config-section.d.ts +1 -1
  206. package/dist/types/components/explorer/chart-configuration/treemap-color-mode-section.d.ts +1 -1
  207. package/dist/types/components/explorer/data-source/add-data-picker.d.ts +1 -1
  208. package/dist/types/components/explorer/data-source/data-source-panel.d.ts +1 -1
  209. package/dist/types/components/explorer/data-source/dataset-selector-popover.d.ts +1 -1
  210. package/dist/types/components/explorer/data-source/db-schema-selector.d.ts +1 -1
  211. package/dist/types/components/explorer/data-source/direct-source-tree.d.ts +1 -1
  212. package/dist/types/components/explorer/data-source/entity-tooltip.d.ts +2 -2
  213. package/dist/types/components/explorer/data-source/file-upload-manager.d.ts +1 -1
  214. package/dist/types/components/explorer/data-source/select-data-dialog.d.ts +1 -1
  215. package/dist/types/components/explorer/data-source/selected-entities-summary.d.ts +1 -1
  216. package/dist/types/components/explorer/data-source/semantic-domain-tree.d.ts +2 -2
  217. package/dist/types/components/explorer/data-source/url-source-manager.d.ts +1 -1
  218. package/dist/types/components/explorer/drag-and-drop/attribute-filter-dialog.d.ts +1 -1
  219. package/dist/types/components/explorer/drag-and-drop/data-concept-tooltip.d.ts +1 -1
  220. package/dist/types/components/explorer/drag-and-drop/drag-overlay.d.ts +1 -1
  221. package/dist/types/components/explorer/drag-and-drop/draggable-field-shell.d.ts +1 -1
  222. package/dist/types/components/explorer/drag-and-drop/draggable-field.d.ts +1 -1
  223. package/dist/types/components/explorer/drag-and-drop/droppable-zone.d.ts +1 -1
  224. package/dist/types/components/explorer/drag-and-drop/inline-edit-field.d.ts +2 -1
  225. package/dist/types/components/explorer/drag-and-drop/matrix-draggable-field.d.ts +1 -1
  226. package/dist/types/components/explorer/drag-and-drop/pivot-alias-template-editor.d.ts +1 -1
  227. package/dist/types/components/explorer/drag-and-drop/pivot-value-aliases-editor.d.ts +1 -1
  228. package/dist/types/components/explorer/fields/field-option-list.d.ts +1 -1
  229. package/dist/types/components/explorer/fields/icon-for-field-type.d.ts +1 -1
  230. package/dist/types/components/explorer/fields/numeric-popover.d.ts +1 -1
  231. package/dist/types/components/explorer/fields/source-field.d.ts +3 -3
  232. package/dist/types/components/explorer/fields/type-glyph.d.ts +1 -1
  233. package/dist/types/components/explorer/filters/card-date-filter.d.ts +1 -1
  234. package/dist/types/components/explorer/filters/card-filter-builder.d.ts +2 -1
  235. package/dist/types/components/explorer/filters/card-filter-manager.d.ts +1 -1
  236. package/dist/types/components/explorer/filters/field-multi-select.d.ts +2 -1
  237. package/dist/types/components/explorer/filters/field-single-select.d.ts +2 -1
  238. package/dist/types/components/explorer/filters/searchable-field-combobox.d.ts +2 -1
  239. package/dist/types/components/explorer/join-configuration/auto-join-info.d.ts +1 -1
  240. package/dist/types/components/explorer/join-configuration/join-conditions-builder.d.ts +1 -1
  241. package/dist/types/components/explorer/join-configuration/join-dialog.d.ts +1 -1
  242. package/dist/types/components/explorer/join-configuration/join-manager.d.ts +1 -1
  243. package/dist/types/components/explorer/join-configuration/join-tooltip-content.d.ts +1 -1
  244. package/dist/types/components/explorer/main/explorer.d.ts +1 -1
  245. package/dist/types/components/explorer/main/view-tabs.d.ts +1 -1
  246. package/dist/types/components/explorer/visualization/chart-settings-panel.d.ts +2 -1
  247. package/dist/types/components/explorer/visualization/chart-split-view.d.ts +1 -3
  248. package/dist/types/components/explorer/visualization/feedback-dialog.d.ts +2 -1
  249. package/dist/types/components/explorer/visualization/row-limit-selector.d.ts +1 -1
  250. package/dist/types/components/explorer/visualization/visualization-panel.d.ts +1 -1
  251. package/dist/types/components/icons/bullet-chart-icon.d.ts +1 -1
  252. package/dist/types/components/interactions/applied-filters-display.d.ts +1 -1
  253. package/dist/types/components/interactions/card-renderer.d.ts +1 -1
  254. package/dist/types/components/interactions/click-to-filter-review-dialog.d.ts +2 -1
  255. package/dist/types/components/interactions/dashboard-drill-host.d.ts +1 -1
  256. package/dist/types/components/interactions/drill-config/hierarchy-steps-display.d.ts +1 -1
  257. package/dist/types/components/interactions/drill-config/hierarchy-templates.d.ts +1 -1
  258. package/dist/types/components/interactions/drill-config/sortable-step.d.ts +1 -1
  259. package/dist/types/components/interactions/drill-config/step-configuration-popup.d.ts +1 -1
  260. package/dist/types/components/interactions/drill-hierarchy-modal.d.ts +1 -1
  261. package/dist/types/components/interactions/drill-to-url-modal.d.ts +1 -1
  262. package/dist/types/components/interactions/filter-badge-tooltip.d.ts +1 -1
  263. package/dist/types/components/interactions/insight-modal.d.ts +1 -1
  264. package/dist/types/components/interactions/insight-viewer.d.ts +1 -1
  265. package/dist/types/components/interactions/interactions-sheet.d.ts +2 -1
  266. package/dist/types/components/interactions/panels/click-to-filter-panel.d.ts +1 -1
  267. package/dist/types/components/interactions/panels/drill-down-panel.d.ts +2 -1
  268. package/dist/types/components/interactions/panels/drill-to-dashboard-panel.d.ts +1 -1
  269. package/dist/types/components/interactions/panels/drill-to-insight-panel.d.ts +1 -1
  270. package/dist/types/components/interactions/panels/drill-to-url-panel-v2.d.ts +1 -1
  271. package/dist/types/components/interactions/panels/dynamic-drill-panel.d.ts +1 -1
  272. package/dist/types/components/interactions/panels/panel-field.d.ts +1 -1
  273. package/dist/types/components/interactions/pickers/dashboard-picker.d.ts +1 -1
  274. package/dist/types/components/interactions/pickers/insight-picker.d.ts +1 -1
  275. package/dist/types/components/interactions/replaced-card-wrapper.d.ts +1 -1
  276. package/dist/types/components/interactions/reusable/field-combobox.d.ts +2 -1
  277. package/dist/types/components/interactions/reusable/field-selector.d.ts +1 -1
  278. package/dist/types/components/interactions/reusable/inline-field-selector.d.ts +1 -1
  279. package/dist/types/components/interactions/sheet/action-editor.d.ts +1 -1
  280. package/dist/types/components/interactions/sheet/action-picker.d.ts +1 -1
  281. package/dist/types/components/interactions/sheet/click-outcome-preview.d.ts +1 -1
  282. package/dist/types/components/interactions/sheet/interactions-home.d.ts +1 -1
  283. package/dist/types/components/interactions/sheet/sheet-parts.d.ts +4 -4
  284. package/dist/types/components/kpi-visual-v2/country-selector.d.ts +1 -1
  285. package/dist/types/components/kpi-visual-v2/kpi-card-explorer.d.ts +1 -1
  286. package/dist/types/components/kpi-visual-v2/kpi-settings.d.ts +1 -1
  287. package/dist/types/components/kpi-visual-v2/kpi-tooltip-components.d.ts +4 -4
  288. package/dist/types/components/kpi-visual-v2/kpi-tooltip.d.ts +2 -1
  289. package/dist/types/components/kpi-visual-v2/metric-comparison-indicator.d.ts +2 -1
  290. package/dist/types/components/kpi-visual-v2/metric-comparison-kpi.d.ts +1 -1
  291. package/dist/types/components/notifications/export-notification-item.d.ts +2 -1
  292. package/dist/types/components/notifications/export-notification-list.d.ts +2 -1
  293. package/dist/types/components/notifications/notification-bell.d.ts +2 -1
  294. package/dist/types/components/providers/appearance-runtime-provider.d.ts +2 -2
  295. package/dist/types/components/providers/dashboard-matrix-execution-provider.d.ts +1 -1
  296. package/dist/types/components/providers/dashboard-preferences-provider.d.ts +1 -1
  297. package/dist/types/components/providers/display-preferences-provider.d.ts +1 -1
  298. package/dist/types/components/providers/semaphor-context-provider.d.ts +1 -1
  299. package/dist/types/components/providers/semaphor-query-provider.d.ts +1 -1
  300. package/dist/types/components/providers/theme-provider.d.ts +1 -1
  301. package/dist/types/components/providers/ux-provider.d.ts +1 -1
  302. package/dist/types/components/semaphor/code-block.d.ts +1 -1
  303. package/dist/types/components/shared/unsaved-changes/unsaved-changes-alert.d.ts +1 -1
  304. package/dist/types/components/sharing-and-management/common-loading-skeleton.d.ts +1 -1
  305. package/dist/types/components/sharing-and-management/create-dashboard-dialog.d.ts +1 -1
  306. package/dist/types/components/sharing-and-management/create-visual-dialog.d.ts +1 -1
  307. package/dist/types/components/sharing-and-management/dashboard-actions-menu.d.ts +1 -1
  308. package/dist/types/components/sharing-and-management/group-management-dialog.d.ts +1 -1
  309. package/dist/types/components/sharing-and-management/resource-edit-dialog.d.ts +2 -1
  310. package/dist/types/components/sharing-and-management/resource-share-dialog/index.d.ts +1 -1
  311. package/dist/types/components/sharing-and-management/resource-share-dialog/unified/access-list.d.ts +1 -1
  312. package/dist/types/components/sharing-and-management/resource-share-dialog/unified/invite-combobox.d.ts +1 -1
  313. package/dist/types/components/sharing-and-management/resource-share-dialog/unified/primitives.d.ts +3 -3
  314. package/dist/types/components/sharing-and-management/resource-share-dialog/unified/share-shape.d.ts +1 -1
  315. package/dist/types/components/sharing-and-management/resource-share-dialog/unified/shell.d.ts +1 -1
  316. package/dist/types/components/sharing-and-management/resource-share-dialog/unified/status-bar.d.ts +1 -1
  317. package/dist/types/components/sharing-and-management/visuals-library-dialog.d.ts +1 -1
  318. package/dist/types/components/surfboard/card-controls-toolbar.d.ts +1 -1
  319. package/dist/types/components/surfboard/controls/card-runtime-controls.d.ts +1 -1
  320. package/dist/types/components/surfboard/controls/control-binding-list-editor.d.ts +1 -1
  321. package/dist/types/components/surfboard/controls/control-definition-editor-sections.d.ts +9 -9
  322. package/dist/types/components/surfboard/controls/control-definition-list-editor.d.ts +1 -1
  323. package/dist/types/components/surfboard/controls/control-toolbar-item.d.ts +1 -1
  324. package/dist/types/components/surfboard/controls/control-toolbar-settings-form.d.ts +1 -1
  325. package/dist/types/components/surfboard/controls/control-toolbar-settings-shell.d.ts +2 -2
  326. package/dist/types/components/surfboard/controls/dashboard-control-delete-dialog.d.ts +1 -1
  327. package/dist/types/components/surfboard/controls/dashboard-control-toolbar-popover.d.ts +1 -1
  328. package/dist/types/components/surfboard/controls/dashboard-controls-settings.d.ts +1 -1
  329. package/dist/types/components/surfboard/controls/dashboard-filter-controls-button.d.ts +1 -1
  330. package/dist/types/components/surfboard/controls/dashboard-filter-controls-launcher.d.ts +1 -1
  331. package/dist/types/components/surfboard/controls/dashboard-runtime-controls.d.ts +1 -1
  332. package/dist/types/components/surfboard/controls/matrix-structural-targets.d.ts +1 -1
  333. package/dist/types/components/surfboard/controls/presentation-currency-binding-editor.d.ts +1 -1
  334. package/dist/types/components/surfboard/controls/runtime-control-input.d.ts +1 -1
  335. package/dist/types/components/surfboard/controls/runtime-controls-group.d.ts +1 -1
  336. package/dist/types/components/surfboard/controls/sortable-control-toolbar-item.d.ts +1 -1
  337. package/dist/types/components/surfboard/dashboard-controls.d.ts +1 -1
  338. package/dist/types/components/surfboard/dashboard-plus-main.d.ts +1 -1
  339. package/dist/types/components/surfboard/dashboard-plus.d.ts +1 -1
  340. package/dist/types/components/surfboard/expanded-card-view.d.ts +2 -1
  341. package/dist/types/components/surfboard/export-dialog.d.ts +2 -1
  342. package/dist/types/components/surfboard/filter/apply-filters-check-box.d.ts +1 -1
  343. package/dist/types/components/surfboard/filter/custom-filter/custom-filter-selector.d.ts +1 -1
  344. package/dist/types/components/surfboard/filter/custom-filter/dashboard-custom-filter.d.ts +1 -1
  345. package/dist/types/components/surfboard/filter/custom-filter-popover.d.ts +1 -1
  346. package/dist/types/components/surfboard/filter/dashboard-filter-info-group.d.ts +1 -1
  347. package/dist/types/components/surfboard/filter/dashboard-filter-mapping-panel.d.ts +3 -3
  348. package/dist/types/components/surfboard/filter/date-comparison-controls.d.ts +1 -1
  349. package/dist/types/components/surfboard/filter/date-range-filter-v2.d.ts +1 -1
  350. package/dist/types/components/surfboard/filter/date-range-filter.d.ts +1 -1
  351. package/dist/types/components/surfboard/filter/day-picker.d.ts +2 -1
  352. package/dist/types/components/surfboard/filter/field-date-filter.d.ts +1 -1
  353. package/dist/types/components/surfboard/filter/filter-actions-popover-content.d.ts +1 -1
  354. package/dist/types/components/surfboard/filter/filter-aside.d.ts +1 -1
  355. package/dist/types/components/surfboard/filter/filter-component.d.ts +2 -1
  356. package/dist/types/components/surfboard/filter/filter-configuration-panel.d.ts +7 -7
  357. package/dist/types/components/surfboard/filter/filter-default-values-picker.d.ts +1 -1
  358. package/dist/types/components/surfboard/filter/filter-error-state.d.ts +1 -1
  359. package/dist/types/components/surfboard/filter/filter-header.d.ts +1 -1
  360. package/dist/types/components/surfboard/filter/filter-info.d.ts +1 -1
  361. package/dist/types/components/surfboard/filter/filter-option-dependencies-settings.d.ts +2 -1
  362. package/dist/types/components/surfboard/filter/filter-option-list.d.ts +1 -1
  363. package/dist/types/components/surfboard/filter/filter-option-source-settings.d.ts +2 -1
  364. package/dist/types/components/surfboard/filter/filter-picker-popover-content.d.ts +1 -1
  365. package/dist/types/components/surfboard/filter/filter-popover-parts.d.ts +3 -3
  366. package/dist/types/components/surfboard/filter/filter-scope-config.d.ts +1 -1
  367. package/dist/types/components/surfboard/filter/filter-settings-popover.d.ts +1 -1
  368. package/dist/types/components/surfboard/filter/filter-toolbar-item.d.ts +2 -1
  369. package/dist/types/components/surfboard/filter/filter-toolbar.d.ts +1 -1
  370. package/dist/types/components/surfboard/filter/global-date-comparison-footer.d.ts +1 -1
  371. package/dist/types/components/surfboard/filter/global-date-filter.d.ts +1 -1
  372. package/dist/types/components/surfboard/filter/hidden-filters.d.ts +1 -1
  373. package/dist/types/components/surfboard/filter/month-picker.d.ts +2 -1
  374. package/dist/types/components/surfboard/filter/multi-select-filter.d.ts +2 -2
  375. package/dist/types/components/surfboard/filter/multi-select-inline-content.d.ts +1 -1
  376. package/dist/types/components/surfboard/filter/numeric-filter-input.d.ts +1 -1
  377. package/dist/types/components/surfboard/filter/radio-button-filter.d.ts +1 -1
  378. package/dist/types/components/surfboard/filter/selection-chip.d.ts +1 -1
  379. package/dist/types/components/surfboard/filter/selection-filter-section.d.ts +1 -1
  380. package/dist/types/components/surfboard/filter/sortable-filter-toolbar-item.d.ts +1 -1
  381. package/dist/types/components/surfboard/filter/tabs-filter.d.ts +1 -1
  382. package/dist/types/components/surfboard/inline-options-error-state.d.ts +1 -1
  383. package/dist/types/components/surfboard/input-chip-row.d.ts +1 -1
  384. package/dist/types/components/surfboard/preferences/calendar-preferences-panel.d.ts +2 -1
  385. package/dist/types/components/surfboard/preferences/display-format-preferences-fields.d.ts +1 -1
  386. package/dist/types/components/surfboard/preferences/display-format-preferences-panel.d.ts +1 -1
  387. package/dist/types/components/surfboard/preferences/report-preferences-dialog.d.ts +1 -1
  388. package/dist/types/components/surfboard/toolbar-item-shell.d.ts +1 -1
  389. package/dist/types/components/text-variables/variable-chip-plugin.d.ts +2 -2
  390. package/dist/types/components/text-variables/variable-picker.d.ts +2 -2
  391. package/dist/types/components/ui/alert-dialog.d.ts +2 -2
  392. package/dist/types/components/ui/audience-type-badge.d.ts +1 -1
  393. package/dist/types/components/ui/calendar.d.ts +2 -2
  394. package/dist/types/components/ui/command.d.ts +2 -2
  395. package/dist/types/components/ui/context-menu.d.ts +1 -1
  396. package/dist/types/components/ui/dialog.d.ts +2 -2
  397. package/dist/types/components/ui/dropdown-menu.d.ts +1 -1
  398. package/dist/types/components/ui/resizable.d.ts +2 -2
  399. package/dist/types/components/ui/sheet.d.ts +2 -2
  400. package/dist/types/components/ui/skeleton.d.ts +1 -1
  401. package/dist/types/components/ui/sonner.d.ts +1 -1
  402. package/dist/types/components/ui-custom/color-field.d.ts +2 -1
  403. package/dist/types/components/ui-custom/column-search.d.ts +2 -1
  404. package/dist/types/components/ui-custom/combo-box-2.d.ts +1 -1
  405. package/dist/types/components/ui-custom/combo-box.d.ts +1 -1
  406. package/dist/types/components/ui-custom/copy-button.d.ts +1 -1
  407. package/dist/types/components/ui-custom/copy-on-click.d.ts +1 -1
  408. package/dist/types/components/ui-custom/date-range-picker.d.ts +1 -1
  409. package/dist/types/components/ui-custom/date-range-popover.d.ts +1 -1
  410. package/dist/types/components/ui-custom/details.d.ts +1 -1
  411. package/dist/types/components/ui-custom/editable-text.d.ts +2 -1
  412. package/dist/types/components/ui-custom/load-on-scroll-status.d.ts +1 -1
  413. package/dist/types/components/ui-custom/loading-dots.d.ts +1 -1
  414. package/dist/types/components/ui-custom/local-blur-input.d.ts +1 -1
  415. package/dist/types/components/ui-custom/option-search-input.d.ts +1 -1
  416. package/dist/types/components/ui-custom/overflow-div.d.ts +1 -1
  417. package/dist/types/components/ui-custom/overflow-span.d.ts +1 -1
  418. package/dist/types/components/ui-custom/pre-tag.d.ts +1 -1
  419. package/dist/types/components/ui-custom/radio-indicator.d.ts +1 -1
  420. package/dist/types/components/ui-custom/resizable-handle-custom.d.ts +1 -1
  421. package/dist/types/components/ui-custom/reusable-select.d.ts +1 -1
  422. package/dist/types/components/ui-custom/visual-badge.d.ts +1 -1
  423. package/dist/types/components/visual/aggregated-table/aggregate-table.d.ts +2 -1
  424. package/dist/types/components/visual/aggregated-table/columns/column-cell-components.d.ts +2 -1
  425. package/dist/types/components/visual/aggregated-table/columns/column-header-components.d.ts +3 -2
  426. package/dist/types/components/visual/aggregated-table/components/aggregate-table-body.d.ts +1 -1
  427. package/dist/types/components/visual/aggregated-table/components/grand-total-footer.d.ts +2 -1
  428. package/dist/types/components/visual/chartjs-visual.d.ts +1 -1
  429. package/dist/types/components/visual/custom-visual/component-combo-box.d.ts +2 -1
  430. package/dist/types/components/visual/custom-visual/custom-visual-settings.d.ts +1 -1
  431. package/dist/types/components/visual/custom-visual/dashboard-custom-visual.d.ts +1 -1
  432. package/dist/types/components/visual/custom-visual/editor-custom-visual.d.ts +1 -1
  433. package/dist/types/components/visual/custom-visual/multi-input-empty-renderer.d.ts +1 -1
  434. package/dist/types/components/visual/data-table/column-resize-handle.d.ts +1 -1
  435. package/dist/types/components/visual/data-table/copyable-cell.d.ts +1 -1
  436. package/dist/types/components/visual/data-table/data-table-column-settings.d.ts +1 -1
  437. package/dist/types/components/visual/data-table/data-table-conditional-formatting-settings.d.ts +1 -1
  438. package/dist/types/components/visual/data-table/data-table-pagination.d.ts +1 -1
  439. package/dist/types/components/visual/data-table/data-table-toolbar.d.ts +1 -1
  440. package/dist/types/components/visual/data-table/data-table.d.ts +1 -1
  441. package/dist/types/components/visual/data-table/overflow-cell.d.ts +1 -1
  442. package/dist/types/components/visual/data-table/table-settings-toolbar-button.d.ts +1 -1
  443. package/dist/types/components/visual/data-table/table-skeleton.d.ts +1 -1
  444. package/dist/types/components/visual/data-table/table-visual.d.ts +1 -1
  445. package/dist/types/components/visual/info-hover.d.ts +2 -1
  446. package/dist/types/components/visual/kpi-visual/format-number-setting.d.ts +1 -1
  447. package/dist/types/components/visual/kpi-visual/kpi-card-with-info.d.ts +1 -1
  448. package/dist/types/components/visual/kpi-visual/kpi-card.d.ts +3 -3
  449. package/dist/types/components/visual/kpi-visual/kpi-editor-ownership-badge.d.ts +1 -1
  450. package/dist/types/components/visual/matrix-table/matrix-axis-menu.d.ts +1 -1
  451. package/dist/types/components/visual/matrix-table/matrix-card-view.d.ts +1 -1
  452. package/dist/types/components/visual/matrix-table/matrix-interaction-actions.d.ts +2 -2
  453. package/dist/types/components/visual/matrix-table/matrix-loading-skeleton.d.ts +2 -2
  454. package/dist/types/components/visual/matrix-table/matrix-window-viewer.d.ts +1 -1
  455. package/dist/types/components/visual/pivot-table/aggregation-menu.d.ts +1 -1
  456. package/dist/types/components/visual/pivot-table/components/pivot-table-body.d.ts +1 -1
  457. package/dist/types/components/visual/pivot-table/components/pivot-table-footer.d.ts +2 -1
  458. package/dist/types/components/visual/pivot-table/hooks/use-pivot-column-headers.d.ts +1 -1
  459. package/dist/types/components/visual/pivot-table/pivot-table-tanstack.d.ts +1 -1
  460. package/dist/types/components/visual/settings/axis-mapping.d.ts +2 -2
  461. package/dist/types/components/visual/settings/chart-documentation.d.ts +3 -3
  462. package/dist/types/components/visual/settings/chart-orientation.d.ts +1 -1
  463. package/dist/types/components/visual/settings/color-format.d.ts +2 -1
  464. package/dist/types/components/visual/settings/controls-settings.d.ts +2 -1
  465. package/dist/types/components/visual/settings/dataset-label-popover.d.ts +2 -1
  466. package/dist/types/components/visual/settings/display-labels.d.ts +2 -1
  467. package/dist/types/components/visual/settings/filter-on-click-columns.d.ts +1 -1
  468. package/dist/types/components/visual/settings/frame-filters.d.ts +3 -2
  469. package/dist/types/components/visual/settings/inline-filters-settings.d.ts +2 -1
  470. package/dist/types/components/visual/settings/kpi-settings.d.ts +1 -1
  471. package/dist/types/components/visual/settings/map-chart-settings.d.ts +1 -1
  472. package/dist/types/components/visual/settings/scale-options.d.ts +1 -1
  473. package/dist/types/components/visual/settings/table-column-visibility-settings.d.ts +1 -1
  474. package/dist/types/components/visual/settings/table-presentation-settings.d.ts +4 -4
  475. package/dist/types/components/visual/settings/table-visual-settings.d.ts +1 -1
  476. package/dist/types/components/visual/settings/text-settings.d.ts +1 -1
  477. package/dist/types/components/visual/settings/text-type-radio.d.ts +2 -1
  478. package/dist/types/components/visual/visual-error-state.d.ts +1 -1
  479. package/dist/types/components/visual/visual.d.ts +1 -1
  480. package/dist/types/dashboard-assistant/index.d.ts +4 -25
  481. package/dist/types/data-app-builder/data-app-builder.d.ts +1 -1
  482. package/dist/types/data-app-sdk/devtools/index.d.ts +1 -1
  483. package/dist/types/data-app-sdk/provider.d.ts +1 -1
  484. package/dist/types/lib/charts/types.d.ts +1 -1
  485. package/dist/types/lib/contexts/interactions-popover-context.d.ts +1 -1
  486. package/dist/types/lib/dashboard-inputs/dashboard-input-snapshot.d.ts +26 -6
  487. package/dist/types/lib/document/document-generated-at.d.ts +13 -0
  488. package/dist/types/lib/download-pdf.d.ts +3 -0
  489. package/dist/types/lib/hooks/ai/use-dashboard-assistant.d.ts +1 -5
  490. package/dist/types/lib/hooks/semaphor-ready-indicator.d.ts +1 -1
  491. package/dist/types/lib/hooks/use-card-render-context.d.ts +14 -0
  492. package/dist/types/lib/hooks/use-dashboard-query.d.ts +0 -8
  493. package/dist/types/lib/hooks/use-dashboard.d.ts +3 -5
  494. package/dist/types/lib/hooks/use-is-dashboard-ready.d.ts +3 -0
  495. package/dist/types/lib/matrix-table/matrix-execution-provider.d.ts +1 -1
  496. package/dist/types/lib/matrix-table/matrix-runtime-types.d.ts +21 -0
  497. package/dist/types/lib/matrix-table/matrix-runtime.d.ts +8 -1
  498. package/dist/types/lib/matrix-table/use-matrix.d.ts +1 -0
  499. package/dist/types/lib/print/print-holds.d.ts +15 -0
  500. package/dist/types/lib/print/print-inputs.d.ts +104 -0
  501. package/dist/types/lib/print/print-sheets.d.ts +16 -0
  502. package/dist/types/lib/query-context/build-dashboard-card-query-contract.d.ts +0 -1
  503. package/dist/types/lib/query-context/dashboard-card-query-key.d.ts +0 -1
  504. package/dist/types/lib/stores/dashboard-store.d.ts +9 -5
  505. package/dist/types/lib/stores/editor-store.d.ts +1 -3
  506. package/dist/types/lib/types/common-types.d.ts +6 -51
  507. package/dist/types/lib/types/token-types.d.ts +3 -3
  508. package/dist/types/lib/utils/build-saved-editor-card.d.ts +15 -0
  509. package/dist/types/lib/utils/dashboard-controls-visibility.d.ts +1 -2
  510. package/dist/types/lib/utils/entity-icon-utils.d.ts +1 -1
  511. package/dist/types/lib/utils/field-icon-utils.d.ts +1 -1
  512. package/dist/types/lib/utils.d.ts +0 -4
  513. package/package.json +7 -6
  514. package/dist/chunks/dashboard-controls-D6Z6ws11.js +0 -2432
  515. package/dist/chunks/edit-dashboard-visual-CYZLUQlx.js +0 -23585
  516. package/dist/types/components/ai/dynamic-visual-host.d.ts +0 -23
  517. package/dist/types/components/ai/persisted-dynamic-visual.d.ts +0 -15
  518. package/dist/types/components/chart-selector/star-button.d.ts +0 -13
  519. package/dist/types/components/editor/dynamic-visualization-menu-items.d.ts +0 -3
  520. package/dist/types/components/editor/editor-main/dynamic-visual-editor.d.ts +0 -13
  521. package/dist/types/components/explorer/chart-configuration/chart-quick-selector.d.ts +0 -19
  522. package/dist/types/components/explorer/spreadsheet/column-header.d.ts +0 -11
  523. package/dist/types/components/explorer/spreadsheet/editor-panel.d.ts +0 -7
  524. package/dist/types/components/explorer/spreadsheet/formula-bar.d.ts +0 -11
  525. package/dist/types/components/explorer/spreadsheet/index.d.ts +0 -5
  526. package/dist/types/components/explorer/spreadsheet/spreadsheet-table.d.ts +0 -10
  527. package/dist/types/components/explorer/spreadsheet/spreadsheet-view.d.ts +0 -5
  528. package/dist/types/components/surfboard/lens/add-lens-dialog.d.ts +0 -9
  529. package/dist/types/components/surfboard/lens/default-lens-checkbox.d.ts +0 -1
  530. package/dist/types/components/surfboard/lens/lens-dropdown.d.ts +0 -10
  531. package/dist/types/components/surfboard/lens/lens-utils.d.ts +0 -21
  532. package/dist/types/lib/ai/dynamic-visual-card-utils.d.ts +0 -70
  533. package/dist/types/lib/ai/dynamic-visual-theme.d.ts +0 -11
  534. package/dist/types/lib/hooks/use-dynamic-fallback-render-context.d.ts +0 -12
  535. package/dist/types/lib/hooks/use-starred-charts.d.ts +0 -1
  536. package/dist/types/lib/stores/starred-charts-store.d.ts +0 -27
@@ -1,14 +1,14 @@
1
- import { c as Ve, C as Re, X as et } from "./x-CXDkqdur.js";
2
- import { useState as K, useEffect as ie, useCallback as j, useMemo as oe, useRef as Se, Fragment as gt } from "react";
3
- import { E as de, z as _e, u as P, a4 as U, D as z, a5 as bt, Q as yt, V as xt, W as vt, c as fe, Y as Ct, a6 as St, a7 as kt, a8 as me, a9 as Qe, aa as Be, ab as ke, ac as Ne, ad as Nt, ae as wt, af as $e, ag as Dt, ah as Et, ai as pe, aj as Tt, ak as We, B as q, al as tt, am as at, an as rt, O as ne, Z as st, _ as we, $ as De, a0 as Ee, a1 as Te, a2 as Fe, ao as nt, ap as Ft, aq as It, ar as He, as as Vt, at as Ke, au as _t, av as At, aw as Lt, ax as qt, ay as Ie, d as Mt, L as ot, az as Ot, aA as zt } from "./switch-evlnTA4t.js";
4
- import { b6 as Ut, az as jt, b7 as ce, b8 as Rt, b9 as Ae, ba as Qt, bb as Bt, bc as $t, bd as Wt, be as Ht, bf as Kt, bg as lt, bh as it, u as Yt, bi as Gt, bj as Xt, bk as Ye, bl as Jt, bm as Pt, bn as dt, bo as ct, bp as Zt, bq as ea, br as ta, bs as aa, bt as ra, aY as sa, bu as na, bv as ut, bw as oa } from "./index-krDPPQuA.js";
5
- import { jsx as a, jsxs as m, Fragment as Z } from "react/jsx-runtime";
1
+ import { c as Ve, C as Qe, X as et } from "./x-CXDkqdur.js";
2
+ import { useState as K, useEffect as ie, useCallback as U, useMemo as oe, useRef as Se, Fragment as bt } from "react";
3
+ import { E as de, z as _e, u as J, a4 as j, D as z, Q as gt, V as yt, W as xt, c as fe, Y as vt, a5 as Ct, a6 as St, a7 as me, a8 as Re, a9 as Be, aa as ke, ab as Ne, ac as kt, ad as Nt, ae as $e, af as wt, ag as Dt, ah as pe, ai as Et, aj as We, B as q, ak as tt, al as at, am as rt, O as ne, Z as st, _ as we, $ as De, a0 as Ee, a1 as Te, a2 as Ie, an as nt, ao as Tt, ap as It, aq as He, ar as Ft, as as Ke, at as Vt, au as _t, av as At, aw as Lt, ax as Fe, d as qt, L as ot, ay as Mt } from "./switch-CWPcwAZ4.js";
4
+ import { b6 as Ot, b7 as zt, az as Ut, b8 as ce, b9 as jt, ba as Ae, bb as Qt, bc as Rt, bd as Bt, be as $t, bf as Wt, bg as Ht, bh as lt, bi as it, u as Kt, bj as Yt, bk as Gt, bl as Ye, bm as Pt, bn as Xt, bo as dt, bp as ct, bq as Jt, br as Zt, bs as ea, bt as ta, bu as aa, aY as ra, bv as sa, bw as ut, bx as na } from "./index-D7GVxl4a.js";
5
+ import { jsx as r, jsxs as p, Fragment as Z } from "react/jsx-runtime";
6
6
  import "./card-config-utils-CAyjC5Tp.js";
7
- import { t as la } from "./validators-CsdOtZI6.js";
7
+ import { t as oa } from "./validators-CsdOtZI6.js";
8
8
  import "./matrix-operation-contract-D32U2CSw.js";
9
9
  import "../value-format-preferences/index.js";
10
10
  import { C as Ge } from "./selection-reducer-CvCBQbl2.js";
11
- import { f as ia } from "./index-B0KwXM6P.js";
11
+ import { f as la } from "./index-D9HDUSye.js";
12
12
  import { S as mt } from "./save-DgMfP0j8.js";
13
13
  /**
14
14
  * @license lucide-react v0.453.0 - ISC
@@ -16,7 +16,7 @@ import { S as mt } from "./save-DgMfP0j8.js";
16
16
  * This source code is licensed under the ISC license.
17
17
  * See the LICENSE file in the root directory of this source tree.
18
18
  */
19
- const La = Ve("FilterX", [
19
+ const Ma = Ve("FilterX", [
20
20
  ["path", { d: "M13.013 3H2l8 9.46V19l4 2v-8.54l.9-1.055", key: "1fi1da" }],
21
21
  ["path", { d: "m22 3-5 5", key: "12jva0" }],
22
22
  ["path", { d: "m17 3 5 5", key: "k36vhe" }]
@@ -27,7 +27,7 @@ const La = Ve("FilterX", [
27
27
  * This source code is licensed under the ISC license.
28
28
  * See the LICENSE file in the root directory of this source tree.
29
29
  */
30
- const da = Ve("Library", [
30
+ const ia = Ve("Library", [
31
31
  ["path", { d: "m16 6 4 14", key: "ji33uf" }],
32
32
  ["path", { d: "M12 6v14", key: "1n7gus" }],
33
33
  ["path", { d: "M8 8v12", key: "1gg7y9" }],
@@ -39,16 +39,16 @@ const da = Ve("Library", [
39
39
  * This source code is licensed under the ISC license.
40
40
  * See the LICENSE file in the root directory of this source tree.
41
41
  */
42
- const ca = Ve("Link2", [
42
+ const da = Ve("Link2", [
43
43
  ["path", { d: "M9 17H7A5 5 0 0 1 7 7h2", key: "8i5ue5" }],
44
44
  ["path", { d: "M15 7h2a5 5 0 1 1 0 10h-2", key: "1b9ql8" }],
45
45
  ["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }]
46
46
  ]);
47
- function ua(t) {
48
- const [r, l] = K(null), [s, d] = K(null), c = Ut();
47
+ function ca(t) {
48
+ const [a, o] = K(null), [s, i] = K(null), c = Ot();
49
49
  return ie(() => {
50
50
  if (!t || t.trim() === "") {
51
- l(null), d(null);
51
+ o(null), i(null);
52
52
  return;
53
53
  }
54
54
  if (!c)
@@ -75,73 +75,141 @@ function ua(t) {
75
75
  );
76
76
  if (typeof x.useChartStore != "function")
77
77
  throw new Error("useChartStore is not a function");
78
- l(() => x.useChartStore), d(null);
79
- } catch (g) {
80
- const u = g instanceof Error ? g.message : "Unknown error";
81
- console.error("Failed to load remote chart store:", u), d(u), l(null);
78
+ o(() => x.useChartStore), i(null);
79
+ } catch (h) {
80
+ const u = h instanceof Error ? h.message : "Unknown error";
81
+ console.error("Failed to load remote chart store:", u), i(u), o(null);
82
82
  }
83
83
  })();
84
- }, [t, c]), r;
84
+ }, [t, c]), a;
85
85
  }
86
- function ma(t, r) {
86
+ function ua(t, a) {
87
87
  if (t.length === 0)
88
88
  return "";
89
- const l = t.find(
89
+ const o = t.find(
90
90
  (s) => {
91
- var d, c;
92
- return ((d = s.customCardPreferences) == null ? void 0 : d.visualType) === "multiple" || !!((c = s.customCardPreferences) != null && c.dataInputCardIds);
91
+ var i, c;
92
+ return ((i = s.customCardPreferences) == null ? void 0 : i.visualType) === "multiple" || !!((c = s.customCardPreferences) != null && c.dataInputCardIds);
93
93
  }
94
94
  );
95
- if (l)
96
- return l.id;
97
- if (r) {
98
- const s = t.find((d) => d.id === r);
95
+ if (o)
96
+ return o.id;
97
+ if (a) {
98
+ const s = t.find((i) => i.id === a);
99
99
  if (s) {
100
- const d = s.tabTitle;
101
- if (d == "All__Header")
100
+ const i = s.tabTitle;
101
+ if (i == "All__Header")
102
102
  return t[0].id;
103
- if (d && d.endsWith("__Header")) {
104
- const p = d.split("__")[0], g = t.find(
105
- (u) => u.tabTitle === p
103
+ if (i && i.endsWith("__Header")) {
104
+ const m = i.split("__")[0], h = t.find(
105
+ (u) => u.tabTitle === m
106
106
  );
107
- return g ? g.id : t[0].id;
107
+ return h ? h.id : t[0].id;
108
108
  }
109
- return r;
109
+ return a;
110
110
  }
111
111
  }
112
112
  return t[0].id;
113
113
  }
114
- const pa = (t) => {
114
+ function ma(t, a) {
115
+ return a ? {
116
+ ...t,
117
+ settings: a
118
+ } : t;
119
+ }
120
+ function pa(t, a) {
121
+ const o = a.selectedConnectionId || t.connectionId || "";
122
+ if (!t.dataSource) {
123
+ if (!o)
124
+ return;
125
+ const s = a.selectedDatabaseName || t.lastSelectedDatabase, i = a.selectedSchemaName || t.lastSelectedSchema, c = a.selectedTableName || t.lastSelectedTable;
126
+ return {
127
+ connectionId: o,
128
+ connectionType: "",
129
+ mode: "database",
130
+ selectedEntities: [],
131
+ ...s && i && c ? {
132
+ dbSelection: {
133
+ database: s,
134
+ schema: i,
135
+ entityType: "table"
136
+ }
137
+ } : {}
138
+ };
139
+ }
140
+ return {
141
+ ...t.dataSource,
142
+ connectionId: a.selectedConnectionId || t.dataSource.connectionId || t.connectionId || ""
143
+ };
144
+ }
145
+ function fa(t, {
146
+ isDevMode: a,
147
+ cardSql: o,
148
+ isShowingVisual: s,
149
+ selectedSchemaName: i,
150
+ selectedDatamodelId: c,
151
+ selectedDatabaseName: m,
152
+ selectedTableName: h,
153
+ selectedConnectionId: u,
154
+ remoteChartSettings: x,
155
+ stripConfig: y
156
+ }) {
157
+ const f = a || zt(t);
158
+ return {
159
+ ...t,
160
+ dataSource: pa(t, {
161
+ selectedConnectionId: u,
162
+ selectedDatabaseName: m,
163
+ selectedSchemaName: i,
164
+ selectedTableName: h
165
+ }),
166
+ lastSelectedSchema: i,
167
+ lastSelectedDatamodelId: c,
168
+ lastSelectedDatabase: m,
169
+ lastSelectedTable: h,
170
+ connectionId: u || t.connectionId,
171
+ sql: f ? o || t.sql : void 0,
172
+ python: f ? t.python : void 0,
173
+ config: a || !t.config ? void 0 : y(t.config),
174
+ customCfg: s ? t.customCfg : null,
175
+ preferences: t.preferences,
176
+ customCardPreferences: ma(
177
+ t.customCardPreferences,
178
+ x
179
+ )
180
+ };
181
+ }
182
+ const ha = (t) => {
115
183
  if (!t || !("detailTableBackup" in t))
116
184
  return t;
117
- const { detailTableBackup: r, ...l } = t;
118
- return l;
185
+ const { detailTableBackup: a, ...o } = t;
186
+ return o;
119
187
  };
120
- async function Xe(t, r, l, s, d = "Opening library visual...") {
121
- if (!r || !l)
188
+ async function Pe(t, a, o, s, i = "Opening library visual...") {
189
+ if (!a || !o)
122
190
  throw new Error("Missing auth token or visual ID");
123
- const c = ["resource-by-id", "visual", l], p = s.getQueryData(c);
124
- if (p)
125
- return console.log("Using cached visual data for:", l), { data: p, fromCache: !0 };
126
- console.log("Fetching visual data from network for:", l);
127
- const g = U.loading(d, {
191
+ const c = ["resource-by-id", "visual", o], m = s.getQueryData(c);
192
+ if (m)
193
+ return console.log("Using cached visual data for:", o), { data: m, fromCache: !0 };
194
+ console.log("Fetching visual data from network for:", o);
195
+ const h = j.loading(i, {
128
196
  position: "top-center"
129
197
  });
130
198
  try {
131
199
  const u = await fetch(
132
- `${t}/management/v1/visuals/${l}`,
200
+ `${t}/management/v1/visuals/${o}`,
133
201
  {
134
202
  headers: {
135
- Authorization: `Bearer ${r}`
203
+ Authorization: `Bearer ${a}`
136
204
  }
137
205
  }
138
206
  );
139
207
  if (!u.ok)
140
208
  throw new Error("Failed to load visual");
141
209
  const x = await u.json();
142
- return s.setQueryData(c, x), U.dismiss(g), { data: x, fromCache: !1 };
210
+ return s.setQueryData(c, x), j.dismiss(h), { data: x, fromCache: !1 };
143
211
  } catch (u) {
144
- throw U.dismiss(g), u;
212
+ throw j.dismiss(h), u;
145
213
  }
146
214
  }
147
215
  function pt(t) {
@@ -151,69 +219,69 @@ function pt(t) {
151
219
  return t;
152
220
  throw new Error("Invalid frame object format");
153
221
  }
154
- function fa(t, r) {
155
- var c, p;
156
- const l = (t == null ? void 0 : t.frameObject) ?? ((c = t == null ? void 0 : t.visual) == null ? void 0 : c.frameObject);
157
- if (!l)
222
+ function ba(t, a) {
223
+ var c, m;
224
+ const o = (t == null ? void 0 : t.frameObject) ?? ((c = t == null ? void 0 : t.visual) == null ? void 0 : c.frameObject);
225
+ if (!o)
158
226
  return !1;
159
- const s = pt(l);
227
+ const s = pt(o);
160
228
  if (!(s != null && s.cards) || s.cards.length === 0)
161
229
  return !1;
162
- const d = (p = s.cards) == null ? void 0 : p.find(
163
- (g) => g.id === s.activeCardId
230
+ const i = (m = s.cards) == null ? void 0 : m.find(
231
+ (h) => h.id === s.activeCardId
164
232
  );
165
- return d ? (Wt({
166
- ...r,
233
+ return i ? ($t({
234
+ ...a,
167
235
  frame: s,
168
- card: d,
236
+ card: i,
169
237
  visualId: (t == null ? void 0 : t.id) || s.visualId
170
238
  }), !0) : !1;
171
239
  }
172
- function ha() {
240
+ function ga() {
173
241
  const t = z(
174
242
  (s) => {
175
- var d;
176
- return ((d = s.card.customCardPreferences) == null ? void 0 : d.url) || "";
243
+ var i;
244
+ return ((i = s.card.customCardPreferences) == null ? void 0 : i.url) || "";
177
245
  }
178
- ), r = ua(t);
179
- return { getUpdatedFrame: j(() => {
246
+ ), a = ca(t);
247
+ return { getUpdatedFrame: U(() => {
180
248
  var V;
181
- Ht();
249
+ Wt();
182
250
  const {
183
251
  frame: s,
184
- card: d,
252
+ card: i,
185
253
  isDevMode: c,
186
- isShowingVisual: p,
187
- selectedSchemaName: g,
254
+ isShowingVisual: m,
255
+ selectedSchemaName: h,
188
256
  selectedDatamodelId: u,
189
257
  selectedDatabaseName: x,
190
258
  selectedTableName: y,
191
259
  selectedConnectionId: f
192
- } = z.getState(), C = d.sql, T = (V = r == null ? void 0 : r.getState()) == null ? void 0 : V.settings, S = bt(d, {
260
+ } = z.getState(), C = i.sql, T = (V = a == null ? void 0 : a.getState()) == null ? void 0 : V.settings, S = fa(i, {
193
261
  isDevMode: c,
194
262
  cardSql: C,
195
- isShowingVisual: p,
196
- selectedSchemaName: g,
263
+ isShowingVisual: m,
264
+ selectedSchemaName: h,
197
265
  selectedDatamodelId: u,
198
266
  selectedDatabaseName: x,
199
267
  selectedTableName: y,
200
268
  selectedConnectionId: f,
201
269
  remoteChartSettings: T,
202
- stripConfig: pa
270
+ stripConfig: ha
203
271
  }), N = s.cards.map(
204
- (R) => R.id === d.id ? S : R
272
+ (Q) => Q.id === i.id ? S : Q
205
273
  );
206
274
  return {
207
275
  ...s,
208
276
  cards: N,
209
- activeCardId: ma(N, s.activeCardId)
277
+ activeCardId: ua(N, s.activeCardId)
210
278
  };
211
- }, [r]) };
279
+ }, [a]) };
212
280
  }
213
281
  function Le() {
214
- const { authToken: t, tokenProps: r } = jt(), l = ce(), s = Rt(), d = Ae(), { selectVisual: c } = Qt(), {
215
- setFrame: p,
216
- setCard: g,
282
+ const { authToken: t, tokenProps: a } = Ut(), o = ce(), s = jt(), i = Ae(), { selectVisual: c } = Qt(), {
283
+ setFrame: m,
284
+ setCard: h,
217
285
  setIsDevMode: u,
218
286
  initializeModeDrafts: x,
219
287
  setActiveTabCardId: y,
@@ -223,34 +291,34 @@ function Le() {
223
291
  setSelectedDatabaseName: S,
224
292
  setSelectedSchemaName: N,
225
293
  setSelectedTableName: V,
226
- setSelectedDatamodelId: R,
294
+ setSelectedDatamodelId: Q,
227
295
  setFilterValues: G,
228
- setInlineFilterValuesMap: Q,
296
+ setInlineFilterValuesMap: R,
229
297
  setApplyFilters: $,
230
298
  clearEditorContext: ee
231
299
  } = de(), {
232
- setIsDashboardEditing: F,
300
+ setIsDashboardEditing: I,
233
301
  setIsVisualEditing: n,
234
302
  setSelectedFrameId: w,
235
303
  clearSelectedFrameId: W
236
- } = _e(), O = P((_) => _.selectedSheetId), X = P((_) => _.selectedFrameId), J = P((_) => _.dashboard), te = P((_) => _.filterValues), M = P(
304
+ } = _e(), O = J((_) => _.selectedSheetId), P = J((_) => _.selectedFrameId), X = J((_) => _.dashboard), te = J((_) => _.filterValues), M = J(
237
305
  (_) => _.inlineFilterValuesMap
238
- ), Y = Bt((d == null ? void 0 : d.id) || "", {
239
- enabled: !!(d != null && d.id) && !!(t != null && t.accessToken)
240
- }), re = j(
306
+ ), Y = Rt((i == null ? void 0 : i.id) || "", {
307
+ enabled: !!(i != null && i.id) && !!(t != null && t.accessToken)
308
+ }), re = U(
241
309
  async (_) => {
242
310
  try {
243
311
  c(_), W(), ee();
244
- const { data: I, fromCache: H } = await Xe(
245
- r.apiServiceUrl,
312
+ const { data: F, fromCache: H } = await Pe(
313
+ a.apiServiceUrl,
246
314
  (t == null ? void 0 : t.accessToken) || "",
247
315
  _.id,
248
- l,
316
+ o,
249
317
  "Opening library visual..."
250
318
  );
251
- if (!fa(I, {
252
- setFrame: p,
253
- setCard: g,
319
+ if (!ba(F, {
320
+ setFrame: m,
321
+ setCard: h,
254
322
  setIsDevMode: u,
255
323
  initializeModeDrafts: x,
256
324
  setActiveTabCardId: y,
@@ -260,32 +328,32 @@ function Le() {
260
328
  setSelectedDatabaseName: S,
261
329
  setSelectedSchemaName: N,
262
330
  setSelectedTableName: V,
263
- setSelectedDatamodelId: R,
331
+ setSelectedDatamodelId: Q,
264
332
  setFilterValues: G,
265
- setInlineFilterValuesMap: Q,
333
+ setInlineFilterValuesMap: R,
266
334
  setApplyFilters: $,
267
- setIsDashboardEditing: F,
335
+ setIsDashboardEditing: I,
268
336
  setIsVisualEditing: n,
269
- dashboard: J,
337
+ dashboard: X,
270
338
  selectedSheetId: O,
271
- selectedFrameId: X,
339
+ selectedFrameId: P,
272
340
  filterValues: te,
273
341
  inlineFilterValuesMap: M
274
342
  }))
275
343
  throw new Error("Failed to setup editor with visual data");
276
344
  return { success: !0, fromCache: H };
277
- } catch (I) {
278
- return console.error("Error editing visual:", I), { success: !1, error: "Failed to load visual for editing" };
345
+ } catch (F) {
346
+ return console.error("Error editing visual:", F), { success: !1, error: "Failed to load visual for editing" };
279
347
  }
280
348
  },
281
349
  [
282
350
  t == null ? void 0 : t.accessToken,
283
- r.apiServiceUrl,
284
- l,
351
+ a.apiServiceUrl,
352
+ o,
285
353
  c,
286
- p,
287
- g,
288
- F,
354
+ m,
355
+ h,
356
+ I,
289
357
  n,
290
358
  u,
291
359
  x,
@@ -296,39 +364,39 @@ function Le() {
296
364
  S,
297
365
  N,
298
366
  V,
299
- R,
300
- G,
301
367
  Q,
368
+ G,
369
+ R,
302
370
  $,
303
371
  ee,
304
372
  W,
305
- J,
306
- O,
307
373
  X,
374
+ O,
375
+ P,
308
376
  te,
309
377
  M
310
378
  ]
311
- ), ge = j(
379
+ ), be = U(
312
380
  async (_) => {
313
381
  var H;
314
- const I = (L) => (U.error(L), { success: !1, error: L });
382
+ const F = (L) => (j.error(L), { success: !1, error: L });
315
383
  try {
316
384
  if (c(_), !O)
317
- return I("No sheet selected. Please select a sheet first.");
318
- const { data: L, fromCache: be } = await Xe(
319
- r.apiServiceUrl,
385
+ return F("No sheet selected. Please select a sheet first.");
386
+ const { data: L, fromCache: ge } = await Pe(
387
+ a.apiServiceUrl,
320
388
  (t == null ? void 0 : t.accessToken) || "",
321
389
  _.id,
322
- l,
390
+ o,
323
391
  "Adding visual to dashboard..."
324
392
  ), ue = (L == null ? void 0 : L.frameObject) ?? ((H = L == null ? void 0 : L.visual) == null ? void 0 : H.frameObject);
325
393
  if (!ue)
326
- return I("Visual has no frame data");
394
+ return F("Visual has no frame data");
327
395
  const B = pt(ue);
328
396
  if (!(B != null && B.cards) || B.cards.length === 0)
329
- return I("Visual frame is malformed");
397
+ return F("Visual frame is malformed");
330
398
  const le = {
331
- ...$t(B),
399
+ ...Bt(B),
332
400
  visualId: _.id
333
401
  // Link this frame to the library visual
334
402
  };
@@ -336,20 +404,20 @@ function Le() {
336
404
  O,
337
405
  le,
338
406
  "end"
339
- ), F(!0), w(le.id), { success: !0, fromCache: be };
407
+ ), I(!0), w(le.id), { success: !0, fromCache: ge };
340
408
  } catch (L) {
341
- return console.error("Error adding visual:", L), I(
409
+ return console.error("Error adding visual:", L), F(
342
410
  L instanceof Error ? L.message : "Failed to add visual to dashboard"
343
411
  );
344
412
  }
345
413
  },
346
414
  [
347
415
  t == null ? void 0 : t.accessToken,
348
- r.apiServiceUrl,
349
- l,
416
+ a.apiServiceUrl,
417
+ o,
350
418
  c,
351
419
  O,
352
- F,
420
+ I,
353
421
  w,
354
422
  s
355
423
  ]
@@ -360,34 +428,34 @@ function Le() {
360
428
  isError: Y.isError,
361
429
  error: Y.error,
362
430
  handleEditLibraryVisual: re,
363
- handleAddLibraryVisual: ge,
364
- getUpdatedFrame: ha().getUpdatedFrame,
431
+ handleAddLibraryVisual: be,
432
+ getUpdatedFrame: ga().getUpdatedFrame,
365
433
  refetch: Y.refetch
366
434
  };
367
435
  }
368
- function qa() {
369
- const t = z((p) => p.card.dataSource), {
370
- setSelectedConnectionId: r,
371
- setSelectedDatabaseName: l,
436
+ function Oa() {
437
+ const t = z((m) => m.card.dataSource), {
438
+ setSelectedConnectionId: a,
439
+ setSelectedDatabaseName: o,
372
440
  setSelectedSchemaName: s,
373
- setSelectedTableName: d,
441
+ setSelectedTableName: i,
374
442
  setSelectedDatamodelId: c
375
443
  } = de();
376
444
  ie(() => {
377
445
  var T;
378
446
  if (!t) return;
379
- const { tableName: p, schemaName: g, databaseName: u, connectionId: x } = Kt(t), y = (T = t.selectedEntities) == null ? void 0 : T[0], C = (y == null ? void 0 : y.type) === "model" && "id" in y ? y.id : "";
380
- r(x || ""), l(u || ""), s(g || ""), d(p || ""), c(C);
447
+ const { tableName: m, schemaName: h, databaseName: u, connectionId: x } = Ht(t), y = (T = t.selectedEntities) == null ? void 0 : T[0], C = (y == null ? void 0 : y.type) === "model" && "id" in y ? y.id : "";
448
+ a(x || ""), o(u || ""), s(h || ""), i(m || ""), c(C);
381
449
  }, [
382
450
  t,
383
- r,
384
- l,
451
+ a,
452
+ o,
385
453
  s,
386
- d,
454
+ i,
387
455
  c
388
456
  ]);
389
457
  }
390
- function ga(t, r) {
458
+ function ya(t, a) {
391
459
  return {
392
460
  ...t,
393
461
  sql: "",
@@ -397,15 +465,13 @@ function ga(t, r) {
397
465
  preferences: {},
398
466
  interactionConfig: void 0,
399
467
  linkedInteractionTargetOverrides: void 0,
400
- dynamicCardPreferences: void 0,
401
- customCardPreferences: r ? t.customCardPreferences : void 0,
402
- visualizationMode: "builtin",
403
- type: r ? t.type : "bar"
468
+ customCardPreferences: a ? t.customCardPreferences : void 0,
469
+ type: a ? t.type : "bar"
404
470
  };
405
471
  }
406
- function ba() {
407
- const { setTempQueryData: t } = de(), r = ce(), l = z((Q) => Q.tempQueryData), s = z((Q) => Q.card), d = lt(), c = oe(() => d !== s.type ? { ...s, type: d } : s, [s, d]), { queryKey: p } = it(c), {
408
- setCardSql: g,
472
+ function xa() {
473
+ const { setTempQueryData: t } = de(), a = ce(), o = z((R) => R.tempQueryData), s = z((R) => R.card), i = lt(), c = oe(() => i !== s.type ? { ...s, type: i } : s, [s, i]), { queryKey: m } = it(c), {
474
+ setCardSql: h,
409
475
  setSqlGen: u,
410
476
  setCardPython: x,
411
477
  setCardCustomCfg: y,
@@ -415,49 +481,49 @@ function ba() {
415
481
  setCardType: S,
416
482
  setFrame: N,
417
483
  setCard: V,
418
- setActiveTabCardId: R
484
+ setActiveTabCardId: Q
419
485
  } = de();
420
486
  function G() {
421
- var W, O, X, J;
422
- const Q = r.getQueryData(p);
423
- l != null && l.queryData || t({
424
- queryKey: p,
425
- queryData: Q
426
- }), r.setQueryData(p, null), r.removeQueries({ queryKey: p, exact: !0 }), g(""), u({}), C(), T(void 0), x(""), y(""), f({});
427
- const $ = z.getState().frame, ee = z.getState().card, F = ia($, ee), n = ((W = F == null ? void 0 : F.customCardPreferences) == null ? void 0 : W.visualType) === "multiple" || !!((O = F == null ? void 0 : F.customCardPreferences) != null && O.dataInputCardIds) || (((X = F == null ? void 0 : F.customCardPreferences) == null ? void 0 : X.minInputs) || 0) > 1 || (((J = F == null ? void 0 : F.customCardPreferences) == null ? void 0 : J.maxInputs) || 0) > 1, w = ga(ee, n);
487
+ var W, O, P, X;
488
+ const R = a.getQueryData(m);
489
+ o != null && o.queryData || t({
490
+ queryKey: m,
491
+ queryData: R
492
+ }), a.setQueryData(m, null), a.removeQueries({ queryKey: m, exact: !0 }), h(""), u({}), C(), T(void 0), x(""), y(""), f({});
493
+ const $ = z.getState().frame, ee = z.getState().card, I = la($, ee), n = ((W = I == null ? void 0 : I.customCardPreferences) == null ? void 0 : W.visualType) === "multiple" || !!((O = I == null ? void 0 : I.customCardPreferences) != null && O.dataInputCardIds) || (((P = I == null ? void 0 : I.customCardPreferences) == null ? void 0 : P.minInputs) || 0) > 1 || (((X = I == null ? void 0 : I.customCardPreferences) == null ? void 0 : X.maxInputs) || 0) > 1, w = ya(ee, n);
428
494
  N({
429
495
  ...$,
430
496
  cards: $.cards.map(
431
497
  (te) => te.id === w.id ? w : te
432
498
  )
433
- }), R(w.id), V(w), n || S("bar");
499
+ }), Q(w.id), V(w), n || S("bar");
434
500
  }
435
501
  return G;
436
502
  }
437
- function Ma({
503
+ function za({
438
504
  type: t,
439
- isLinked: r,
440
- className: l,
505
+ isLinked: a,
506
+ className: o,
441
507
  showLabel: s = !1,
442
- showLocal: d = !1
508
+ showLocal: i = !1
443
509
  }) {
444
- const c = P((N) => N.selectedFrameId), p = Yt((N) => N.selectedVisual), g = z((N) => N.frame);
510
+ const c = J((N) => N.selectedFrameId), m = Kt((N) => N.selectedVisual), h = z((N) => N.frame);
445
511
  let u;
446
512
  if (t)
447
513
  u = t;
448
- else if (r !== void 0)
449
- u = r ? "linked" : "library";
450
- else if (!!!(g != null && g.visualId || p != null && p.id) && c)
514
+ else if (a !== void 0)
515
+ u = a ? "linked" : "library";
516
+ else if (!!!(h != null && h.visualId || m != null && m.id) && c)
451
517
  u = "local";
452
- else if (p && !c)
518
+ else if (m && !c)
453
519
  u = "library";
454
- else if (g != null && g.visualId && c)
520
+ else if (h != null && h.visualId && c)
455
521
  u = "linked";
456
- else if (p != null && p.id && c)
522
+ else if (m != null && m.id && c)
457
523
  u = "library";
458
524
  else
459
525
  return null;
460
- if (u === "local" && !d)
526
+ if (u === "local" && !i)
461
527
  return null;
462
528
  const x = {
463
529
  local: "border-slate-200/70 bg-slate-50/80 text-slate-700 shadow-sm hover:bg-slate-100/80 dark:border-slate-700 dark:bg-slate-900/70 dark:text-slate-200 dark:hover:bg-slate-800/80",
@@ -476,86 +542,86 @@ function Ma({
476
542
  linked: "fill-purple-50 dark:fill-purple-950",
477
543
  library: "fill-blue-50 dark:fill-blue-950"
478
544
  }, T = {
479
- local: /* @__PURE__ */ a("span", { className: "h-2 w-2 rounded-full bg-current/70" }),
480
- linked: /* @__PURE__ */ a(ca, { className: "h-3.5 w-3.5" }),
481
- library: /* @__PURE__ */ a(da, { className: "h-3.5 w-3.5" })
545
+ local: /* @__PURE__ */ r("span", { className: "h-2 w-2 rounded-full bg-current/70" }),
546
+ linked: /* @__PURE__ */ r(da, { className: "h-3.5 w-3.5" }),
547
+ library: /* @__PURE__ */ r(ia, { className: "h-3.5 w-3.5" })
482
548
  }, S = {
483
549
  local: "Local",
484
550
  linked: "Linked",
485
551
  library: "Library"
486
552
  };
487
- return /* @__PURE__ */ a(yt, { children: /* @__PURE__ */ m(xt, { delayDuration: 300, children: [
488
- /* @__PURE__ */ a(vt, { asChild: !0, children: /* @__PURE__ */ m(
489
- Gt,
553
+ return /* @__PURE__ */ r(gt, { children: /* @__PURE__ */ p(yt, { delayDuration: 300, children: [
554
+ /* @__PURE__ */ r(xt, { asChild: !0, children: /* @__PURE__ */ p(
555
+ Yt,
490
556
  {
491
557
  variant: "outline",
492
558
  className: fe(
493
559
  "cursor-help select-none transition-all",
494
560
  x[u],
495
- l
561
+ o
496
562
  ),
497
563
  children: [
498
564
  T[u],
499
- s && /* @__PURE__ */ a("span", { className: "ml-1 text-xs font-medium leading-none", children: S[u] })
565
+ s && /* @__PURE__ */ r("span", { className: "ml-1 text-xs font-medium leading-none", children: S[u] })
500
566
  ]
501
567
  }
502
568
  ) }),
503
- /* @__PURE__ */ m(
504
- Ct,
569
+ /* @__PURE__ */ p(
570
+ vt,
505
571
  {
506
572
  side: "bottom",
507
573
  className: fe("max-w-xs", f[u]),
508
574
  children: [
509
- /* @__PURE__ */ a(St, { className: C[u] }),
510
- /* @__PURE__ */ a("p", { children: y[u] })
575
+ /* @__PURE__ */ r(Ct, { className: C[u] }),
576
+ /* @__PURE__ */ r("p", { children: y[u] })
511
577
  ]
512
578
  }
513
579
  )
514
580
  ] }) });
515
581
  }
516
582
  function ft(t) {
517
- const { control: r, onChange: l } = t;
518
- return /* @__PURE__ */ m("div", { className: "flex flex-col gap-1.5", children: [
519
- /* @__PURE__ */ a(ne, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Label" }),
520
- /* @__PURE__ */ a(
583
+ const { control: a, onChange: o } = t;
584
+ return /* @__PURE__ */ p("div", { className: "flex flex-col gap-1.5", children: [
585
+ /* @__PURE__ */ r(ne, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Label" }),
586
+ /* @__PURE__ */ r(
521
587
  st,
522
588
  {
523
589
  size: "xs",
524
- value: r.label,
590
+ value: a.label,
525
591
  placeholder: "Control label",
526
- onChange: (s) => l(s.target.value)
592
+ onChange: (s) => o(s.target.value)
527
593
  }
528
594
  )
529
595
  ] });
530
596
  }
531
- function ya(t) {
532
- const { currentStep: r, labels: l } = t;
533
- return /* @__PURE__ */ a("div", { className: "sticky top-0 z-10 -mx-1 border-b border-border/60 bg-background/95 px-1 pb-2.5 pt-1 backdrop-blur supports-[backdrop-filter]:bg-background/85", children: /* @__PURE__ */ a("div", { className: "flex flex-wrap items-center gap-2 sm:gap-2.5", children: l.map((s, d) => {
534
- const c = d + 1, p = c === r, g = c < r;
535
- return /* @__PURE__ */ m(gt, { children: [
536
- /* @__PURE__ */ m("div", { className: "flex items-center gap-1.5", children: [
537
- /* @__PURE__ */ a(
597
+ function va(t) {
598
+ const { currentStep: a, labels: o } = t;
599
+ return /* @__PURE__ */ r("div", { className: "sticky top-0 z-10 -mx-1 border-b border-border/60 bg-background/95 px-1 pb-2.5 pt-1 backdrop-blur supports-[backdrop-filter]:bg-background/85", children: /* @__PURE__ */ r("div", { className: "flex flex-wrap items-center gap-2 sm:gap-2.5", children: o.map((s, i) => {
600
+ const c = i + 1, m = c === a, h = c < a;
601
+ return /* @__PURE__ */ p(bt, { children: [
602
+ /* @__PURE__ */ p("div", { className: "flex items-center gap-1.5", children: [
603
+ /* @__PURE__ */ r(
538
604
  "span",
539
605
  {
540
606
  className: fe(
541
607
  "flex h-5 w-5 items-center justify-center rounded-full border text-[10px] font-medium tabular-nums",
542
- p ? "border-foreground bg-foreground text-background" : g ? "border-foreground/30 bg-foreground/10 text-foreground" : "border-border/60 bg-background text-muted-foreground"
608
+ m ? "border-foreground bg-foreground text-background" : h ? "border-foreground/30 bg-foreground/10 text-foreground" : "border-border/60 bg-background text-muted-foreground"
543
609
  ),
544
610
  children: c
545
611
  }
546
612
  ),
547
- /* @__PURE__ */ a(
613
+ /* @__PURE__ */ r(
548
614
  "span",
549
615
  {
550
616
  className: fe(
551
617
  "text-[12px]",
552
- p ? "font-medium text-foreground" : "text-muted-foreground"
618
+ m ? "font-medium text-foreground" : "text-muted-foreground"
553
619
  ),
554
620
  children: s
555
621
  }
556
622
  )
557
623
  ] }),
558
- d < l.length - 1 ? /* @__PURE__ */ a(
624
+ i < o.length - 1 ? /* @__PURE__ */ r(
559
625
  "span",
560
626
  {
561
627
  className: "h-px w-4 bg-border/60 sm:w-6",
@@ -566,79 +632,79 @@ function ya(t) {
566
632
  }) }) });
567
633
  }
568
634
  function he(t) {
569
- const { secondary: r, tertiary: l, primary: s } = t;
570
- return /* @__PURE__ */ m("div", { className: "sticky bottom-0 z-10 -mx-1 flex justify-end gap-2 border-t bg-background/95 px-1 pb-1 pt-3 backdrop-blur supports-[backdrop-filter]:bg-background/85", children: [
571
- r,
572
- l,
635
+ const { secondary: a, tertiary: o, primary: s } = t;
636
+ return /* @__PURE__ */ p("div", { className: "sticky bottom-0 z-10 -mx-1 flex justify-end gap-2 border-t bg-background/95 px-1 pb-1 pt-3 backdrop-blur supports-[backdrop-filter]:bg-background/85", children: [
637
+ a,
638
+ o,
573
639
  s
574
640
  ] });
575
641
  }
576
- function xa(t) {
577
- const { control: r, scope: l, detail: s } = t;
578
- return /* @__PURE__ */ m("div", { className: "flex items-start gap-2.5 rounded-control border border-border/60 bg-muted/30 px-3 py-2.5", children: [
579
- /* @__PURE__ */ a(na, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-foreground" }),
580
- /* @__PURE__ */ m("div", { className: "min-w-0 space-y-0.5", children: [
581
- /* @__PURE__ */ a("div", { className: "text-[13px] font-medium text-foreground", children: r.label }),
582
- /* @__PURE__ */ m("div", { className: "text-[12px] text-muted-foreground", children: [
583
- tt(r.type).label,
642
+ function Ca(t) {
643
+ const { control: a, scope: o, detail: s } = t;
644
+ return /* @__PURE__ */ p("div", { className: "flex items-start gap-2.5 rounded-control border border-border/60 bg-muted/30 px-3 py-2.5", children: [
645
+ /* @__PURE__ */ r(sa, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-foreground" }),
646
+ /* @__PURE__ */ p("div", { className: "min-w-0 space-y-0.5", children: [
647
+ /* @__PURE__ */ r("div", { className: "text-[13px] font-medium text-foreground", children: a.label }),
648
+ /* @__PURE__ */ p("div", { className: "text-[12px] text-muted-foreground", children: [
649
+ tt(a.type).label,
584
650
  " ·",
585
651
  " ",
586
- rt(r),
652
+ rt(a),
587
653
  " ·",
588
654
  " ",
589
- at(l, r.placement)
655
+ at(o, a.placement)
590
656
  ] }),
591
- s ? /* @__PURE__ */ a("div", { className: "text-[12px] text-muted-foreground", children: s }) : null
657
+ s ? /* @__PURE__ */ r("div", { className: "text-[12px] text-muted-foreground", children: s }) : null
592
658
  ] })
593
659
  ] });
594
660
  }
595
- function Je(t) {
661
+ function Xe(t) {
596
662
  const {
597
- control: r,
598
- defaultValue: l,
663
+ control: a,
664
+ defaultValue: o,
599
665
  availableFieldChoices: s,
600
- availableMetricChoices: d,
666
+ availableMetricChoices: i,
601
667
  previewControlDefinitions: c,
602
- previewControlValues: p,
603
- onControlChange: g,
668
+ previewControlValues: m,
669
+ onControlChange: h,
604
670
  onLabelChange: u,
605
671
  onDefaultValueChange: x,
606
672
  onBack: y,
607
673
  onNext: f,
608
674
  nextDisabled: C
609
675
  } = t;
610
- return /* @__PURE__ */ m("div", { className: "space-y-3", children: [
611
- /* @__PURE__ */ a(ft, { control: r, onChange: u }),
612
- /* @__PURE__ */ a(
676
+ return /* @__PURE__ */ p("div", { className: "space-y-3", children: [
677
+ /* @__PURE__ */ r(ft, { control: a, onChange: u }),
678
+ /* @__PURE__ */ r(
613
679
  dt,
614
680
  {
615
- control: r,
681
+ control: a,
616
682
  availableFieldChoices: s,
617
- availableMetricChoices: d,
683
+ availableMetricChoices: i,
618
684
  previewControlDefinitions: c,
619
- previewControlValues: p,
685
+ previewControlValues: m,
620
686
  controlLifecycle: "create",
621
- onChange: g
687
+ onChange: h
622
688
  }
623
689
  ),
624
- /* @__PURE__ */ a(
690
+ /* @__PURE__ */ r(
625
691
  ct,
626
692
  {
627
- control: r,
628
- value: l,
693
+ control: a,
694
+ value: o,
629
695
  onChange: x,
630
696
  allowNoDefault: !0,
631
697
  allowCardDefault: !0,
632
698
  hint: "This is the value viewers will see first.",
633
699
  previewControlDefinitions: c,
634
- previewControlValues: p
700
+ previewControlValues: m
635
701
  }
636
702
  ),
637
- /* @__PURE__ */ a(
703
+ /* @__PURE__ */ r(
638
704
  he,
639
705
  {
640
- secondary: /* @__PURE__ */ a(q, { type: "button", variant: "outline", size: "xs", onClick: y, children: "Back" }),
641
- primary: /* @__PURE__ */ a(
706
+ secondary: /* @__PURE__ */ r(q, { type: "button", variant: "outline", size: "xs", onClick: y, children: "Back" }),
707
+ primary: /* @__PURE__ */ r(
642
708
  q,
643
709
  {
644
710
  type: "button",
@@ -652,82 +718,82 @@ function Je(t) {
652
718
  )
653
719
  ] });
654
720
  }
655
- const va = /* @__PURE__ */ new Set([
721
+ const Sa = /* @__PURE__ */ new Set([
656
722
  "grain_selector",
657
723
  "aggregation_selector",
658
724
  "field_selector",
659
725
  "metric_selector"
660
726
  ]);
661
- function Pe(t) {
662
- const { text: r, ariaLabel: l } = t, [s, d] = K(!1);
663
- return /* @__PURE__ */ m(
727
+ function Je(t) {
728
+ const { text: a, ariaLabel: o } = t, [s, i] = K(!1);
729
+ return /* @__PURE__ */ p(
664
730
  "button",
665
731
  {
666
732
  type: "button",
667
- "aria-label": l,
733
+ "aria-label": o,
668
734
  onClick: async () => {
669
735
  try {
670
- await navigator.clipboard.writeText(r), d(!0), setTimeout(() => d(!1), 1200);
736
+ await navigator.clipboard.writeText(a), i(!0), setTimeout(() => i(!1), 1200);
671
737
  } catch (c) {
672
738
  console.error("Failed to copy", c);
673
739
  }
674
740
  },
675
741
  className: "group flex w-full items-center justify-between gap-2 rounded-control bg-muted/40 px-2 py-1 text-left transition-colors hover:bg-muted/60 focus-visible:bg-muted/60 focus-visible:outline-none",
676
742
  children: [
677
- /* @__PURE__ */ a("code", { className: "min-w-0 truncate font-mono text-[12px] text-foreground", children: r }),
678
- /* @__PURE__ */ a("span", { className: "shrink-0 text-[11px] text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100", children: s ? "Copied" : "Click to copy" })
743
+ /* @__PURE__ */ r("code", { className: "min-w-0 truncate font-mono text-[12px] text-foreground", children: a }),
744
+ /* @__PURE__ */ r("span", { className: "shrink-0 text-[11px] text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100", children: s ? "Copied" : "Click to copy" })
679
745
  ]
680
746
  }
681
747
  );
682
748
  }
683
749
  function Ze(t) {
684
750
  const {
685
- control: r,
686
- scope: l,
751
+ control: a,
752
+ scope: o,
687
753
  createdReference: s,
688
- explorerContent: d,
754
+ explorerContent: i,
689
755
  sqlDescription: c,
690
- summaryDetail: p,
691
- onBack: g,
756
+ summaryDetail: m,
757
+ onBack: h,
692
758
  onCancel: u,
693
759
  onDone: x
694
- } = t, y = va.has(r.type), f = s.match(/\[\[param\.(.+?)\]\]/), C = f ? `{{ param('${f[1]}') }}` : "";
695
- return /* @__PURE__ */ m("div", { className: "space-y-4", children: [
696
- /* @__PURE__ */ a(
697
- xa,
760
+ } = t, y = Sa.has(a.type), f = s.match(/\[\[param\.(.+?)\]\]/), C = f ? `{{ param('${f[1]}') }}` : "";
761
+ return /* @__PURE__ */ p("div", { className: "space-y-4", children: [
762
+ /* @__PURE__ */ r(
763
+ Ca,
698
764
  {
699
- control: r,
700
- scope: l,
701
- detail: p
765
+ control: a,
766
+ scope: o,
767
+ detail: m
702
768
  }
703
769
  ),
704
- /* @__PURE__ */ m("div", { className: "space-y-2", children: [
705
- /* @__PURE__ */ a("p", { className: "text-[13px] font-medium text-foreground", children: "How cards use this control" }),
706
- /* @__PURE__ */ m("div", { className: "divide-y divide-border/60 overflow-hidden rounded-control border border-border/60", children: [
707
- y ? /* @__PURE__ */ m("div", { className: "space-y-1 px-3 py-2.5", children: [
708
- /* @__PURE__ */ a("p", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Explorer cards" }),
709
- /* @__PURE__ */ a("div", { className: "text-[12px] text-muted-foreground", children: d })
770
+ /* @__PURE__ */ p("div", { className: "space-y-2", children: [
771
+ /* @__PURE__ */ r("p", { className: "text-[13px] font-medium text-foreground", children: "How cards use this control" }),
772
+ /* @__PURE__ */ p("div", { className: "divide-y divide-border/60 overflow-hidden rounded-control border border-border/60", children: [
773
+ y ? /* @__PURE__ */ p("div", { className: "space-y-1 px-3 py-2.5", children: [
774
+ /* @__PURE__ */ r("p", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Explorer cards" }),
775
+ /* @__PURE__ */ r("div", { className: "text-[12px] text-muted-foreground", children: i })
710
776
  ] }) : null,
711
- /* @__PURE__ */ m("div", { className: "space-y-1.5 px-3 py-2.5", children: [
712
- /* @__PURE__ */ a("p", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "SQL cards" }),
713
- /* @__PURE__ */ a(
714
- Pe,
777
+ /* @__PURE__ */ p("div", { className: "space-y-1.5 px-3 py-2.5", children: [
778
+ /* @__PURE__ */ r("p", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "SQL cards" }),
779
+ /* @__PURE__ */ r(
780
+ Je,
715
781
  {
716
782
  text: s,
717
783
  ariaLabel: "Copy SQL control reference"
718
784
  }
719
785
  ),
720
- C ? /* @__PURE__ */ a(
721
- Pe,
786
+ C ? /* @__PURE__ */ r(
787
+ Je,
722
788
  {
723
789
  text: C,
724
790
  ariaLabel: "Copy Jinja control reference"
725
791
  }
726
792
  ) : null,
727
- /* @__PURE__ */ m("p", { className: "text-[12px] text-muted-foreground", children: [
793
+ /* @__PURE__ */ p("p", { className: "text-[12px] text-muted-foreground", children: [
728
794
  c,
729
795
  " ",
730
- /* @__PURE__ */ a(
796
+ /* @__PURE__ */ r(
731
797
  "a",
732
798
  {
733
799
  href: "https://docs.semaphor.cloud/docs/concepts/template-expressions",
@@ -742,52 +808,52 @@ function Ze(t) {
742
808
  ] })
743
809
  ] })
744
810
  ] }),
745
- /* @__PURE__ */ a(
811
+ /* @__PURE__ */ r(
746
812
  he,
747
813
  {
748
- secondary: /* @__PURE__ */ a(q, { type: "button", variant: "outline", size: "xs", onClick: g, children: "Back" }),
749
- tertiary: /* @__PURE__ */ a(q, { type: "button", variant: "outline", size: "xs", onClick: u, children: "Cancel" }),
750
- primary: /* @__PURE__ */ a(q, { type: "button", size: "xs", onClick: x, children: "Done" })
814
+ secondary: /* @__PURE__ */ r(q, { type: "button", variant: "outline", size: "xs", onClick: h, children: "Back" }),
815
+ tertiary: /* @__PURE__ */ r(q, { type: "button", variant: "outline", size: "xs", onClick: u, children: "Cancel" }),
816
+ primary: /* @__PURE__ */ r(q, { type: "button", size: "xs", onClick: x, children: "Done" })
751
817
  }
752
818
  )
753
819
  ] });
754
820
  }
755
- function Ca(t) {
756
- const r = me(
821
+ function ka(t) {
822
+ const a = me(
757
823
  t.scope,
758
824
  t.existingControls,
759
825
  t.reservedIds
760
- ), l = t.type === r.type ? {
761
- ...r,
762
- label: Ie[t.type]
826
+ ), o = t.type === a.type ? {
827
+ ...a,
828
+ label: Fe[t.type]
763
829
  } : {
764
830
  ...nt({
765
831
  controls: [
766
832
  {
767
- ...r,
768
- label: Ie[t.type]
833
+ ...a,
834
+ label: Fe[t.type]
769
835
  }
770
836
  ],
771
- controlId: r.id,
837
+ controlId: a.id,
772
838
  nextType: t.type
773
839
  }).controls[0],
774
- label: Ie[t.type]
840
+ label: Fe[t.type]
775
841
  };
776
842
  return {
777
843
  step: 2,
778
- control: l,
779
- defaultValue: pe(l, void 0)
844
+ control: o,
845
+ defaultValue: pe(o, void 0)
780
846
  };
781
847
  }
782
- function Oa({
848
+ function Ua({
783
849
  scope: t,
784
- controls: r,
785
- reservedControlIds: l,
850
+ controls: a,
851
+ reservedControlIds: o,
786
852
  defaultValues: s,
787
- onChange: d,
853
+ onChange: i,
788
854
  emptyMessage: c,
789
- initialCreateFlow: p = !1,
790
- usageByControlId: g,
855
+ initialCreateFlow: m = !1,
856
+ usageByControlId: h,
791
857
  availableFieldChoices: u,
792
858
  availableMetricChoices: x,
793
859
  structuralParticipants: y,
@@ -798,37 +864,37 @@ function Oa({
798
864
  onCreateFlowComplete: N
799
865
  }) {
800
866
  const V = oe(
801
- () => new Set(l || []),
802
- [l]
803
- ), R = Ft(t), G = kt(t), [Q, $] = K(
867
+ () => new Set(o || []),
868
+ [o]
869
+ ), Q = Tt(t), G = St(t), [R, $] = K(
804
870
  null
805
- ), [ee, F] = K(
871
+ ), [ee, I] = K(
806
872
  null
807
873
  ), [n, w] = K(
808
- () => p ? {
874
+ () => m ? {
809
875
  step: 1,
810
- control: me(t, r, Array.from(V))
876
+ control: me(t, a, Array.from(V))
811
877
  } : null
812
- ), W = Se({}), O = Se(void 0), X = Se(p), J = oe(() => {
813
- const e = Qe({ scope: t, card: C });
878
+ ), W = Se({}), O = Se(void 0), P = Se(m), X = oe(() => {
879
+ const e = Re({ scope: t, card: C });
814
880
  if (!T)
815
881
  return e;
816
- const i = new Set(T);
817
- return e.filter((o) => i.has(o.value));
818
- }, [T, C, t]), te = j(
882
+ const d = new Set(T);
883
+ return e.filter((l) => d.has(l.value));
884
+ }, [T, C, t]), te = U(
819
885
  (e) => {
820
- const i = Qe({
886
+ const d = Re({
821
887
  scope: t,
822
888
  card: C,
823
889
  includeType: T ? void 0 : e
824
890
  });
825
891
  if (!T)
826
- return i;
827
- const o = new Set(T);
828
- return i.filter((h) => o.has(h.value));
892
+ return d;
893
+ const l = new Set(T);
894
+ return d.filter((b) => l.has(b.value));
829
895
  },
830
896
  [T, C, t]
831
- ), M = j(
897
+ ), M = U(
832
898
  (e) => t === "dashboard" && (e === "field_selector" || e === "metric_selector"),
833
899
  [t]
834
900
  ), Y = oe(
@@ -848,19 +914,19 @@ function Oa({
848
914
  fields: u || [],
849
915
  metrics: x || []
850
916
  };
851
- const e = n.selectedCardIds || [], i = ke({
917
+ const e = n.selectedCardIds || [], d = ke({
852
918
  controlType: n.control.type,
853
919
  participants: y || [],
854
920
  selectedCardIds: e
855
921
  });
856
922
  return {
857
- fields: n.control.type === "field_selector" ? i.choices.map((o) => ({
858
- option: o,
859
- target: i.fieldTargetMap[o.value]
923
+ fields: n.control.type === "field_selector" ? d.choices.map((l) => ({
924
+ option: l,
925
+ target: d.fieldTargetMap[l.value]
860
926
  })) : [],
861
- metrics: n.control.type === "metric_selector" ? i.choices.map((o) => ({
862
- option: o,
863
- target: i.metricTargetMap[o.value]
927
+ metrics: n.control.type === "metric_selector" ? d.choices.map((l) => ({
928
+ option: l,
929
+ target: d.metricTargetMap[l.value]
864
930
  })) : []
865
931
  };
866
932
  }, [
@@ -873,37 +939,37 @@ function Oa({
873
939
  ie(() => {
874
940
  S == null || S(!!n);
875
941
  }, [n, S]), ie(() => {
876
- const e = p && !X.current;
877
- X.current = p, e && (w({
942
+ const e = m && !P.current;
943
+ P.current = m, e && (w({
878
944
  step: 1,
879
- control: me(t, r, Array.from(V))
880
- }), F(null), $(null));
881
- }, [r, p, V, t]);
882
- const ge = (e) => {
945
+ control: me(t, a, Array.from(V))
946
+ }), I(null), $(null));
947
+ }, [a, m, V, t]);
948
+ const be = (e) => {
883
949
  if (!M(e.type))
884
950
  return {
885
951
  fields: u || [],
886
952
  metrics: x || []
887
953
  };
888
- const i = (f == null ? void 0 : f[e.id]) || [];
889
- if (i.length === 0)
954
+ const d = (f == null ? void 0 : f[e.id]) || [];
955
+ if (d.length === 0)
890
956
  return {
891
957
  fields: u || [],
892
958
  metrics: x || []
893
959
  };
894
- const o = ke({
960
+ const l = ke({
895
961
  controlType: e.type,
896
962
  participants: y || [],
897
- selectedCardIds: i
963
+ selectedCardIds: d
898
964
  });
899
965
  return {
900
- fields: e.type === "field_selector" ? o.choices.map((h) => ({
901
- option: h,
902
- target: o.fieldTargetMap[h.value]
966
+ fields: e.type === "field_selector" ? l.choices.map((b) => ({
967
+ option: b,
968
+ target: l.fieldTargetMap[b.value]
903
969
  })) : [],
904
- metrics: e.type === "metric_selector" ? o.choices.map((h) => ({
905
- option: h,
906
- target: o.metricTargetMap[h.value]
970
+ metrics: e.type === "metric_selector" ? l.choices.map((b) => ({
971
+ option: b,
972
+ target: l.metricTargetMap[b.value]
907
973
  })) : []
908
974
  };
909
975
  }, _ = (e) => {
@@ -912,145 +978,145 @@ function Oa({
912
978
  nextControl: e.control,
913
979
  cardBindingsById: void 0
914
980
  };
915
- const i = (f == null ? void 0 : f[e.control.id]) || [], o = ke({
981
+ const d = (f == null ? void 0 : f[e.control.id]) || [], l = ke({
916
982
  controlType: e.control.type,
917
983
  participants: y || [],
918
984
  selectedCardIds: e.nextSelectedCardIds
919
- }), h = Lt({
985
+ }), b = At({
920
986
  control: e.control,
921
- choices: o.choices
987
+ choices: l.choices
922
988
  }), v = Object.fromEntries(
923
- i.filter((k) => !e.nextSelectedCardIds.includes(k)).map((k) => [k, void 0])
989
+ d.filter((k) => !e.nextSelectedCardIds.includes(k)).map((k) => [k, void 0])
924
990
  );
925
- return e.nextSelectedCardIds.length > 0 && h.source.kind === "manual" && h.source.options.length > 0 && Object.assign(
991
+ return e.nextSelectedCardIds.length > 0 && b.source.kind === "manual" && b.source.options.length > 0 && Object.assign(
926
992
  v,
927
993
  Ke({
928
- control: h,
994
+ control: b,
929
995
  participants: y || [],
930
996
  selectedCardIds: e.nextSelectedCardIds,
931
997
  matrixTargetIds: e.matrixTargetIds
932
998
  })
933
999
  ), {
934
- nextControl: h,
1000
+ nextControl: b,
935
1001
  cardBindingsById: v
936
1002
  };
937
- }, I = j(
938
- (e, i = s, o = { type: "update" }) => {
939
- const h = e.map((v) => (Ne({
1003
+ }, F = U(
1004
+ (e, d = s, l = { type: "update" }) => {
1005
+ const b = e.map((v) => (Ne({
940
1006
  control: v,
941
- defaultValues: i
942
- }), Nt(
1007
+ defaultValues: d
1008
+ }), kt(
943
1009
  v
944
1010
  )));
945
- d(h, i, o);
1011
+ i(b, d, l);
946
1012
  },
947
- [s, d]
948
- ), H = (e, i) => {
949
- const o = r.find(
1013
+ [s, i]
1014
+ ), H = (e, d) => {
1015
+ const l = a.find(
950
1016
  (E) => E.id === e
951
1017
  );
952
- let h = r.map((E) => E.id !== e ? E : i(E));
953
- const v = h.find(
1018
+ let b = a.map((E) => E.id !== e ? E : d(E));
1019
+ const v = b.find(
954
1020
  (E) => E.id === e
955
1021
  );
956
- let k, b;
957
- if (v && (!o || _t({ control: o }, { control: v })) && t === "dashboard" && (v.type === "field_selector" || v.type === "metric_selector")) {
1022
+ let k, g;
1023
+ if (v && (!l || Vt({ control: l }, { control: v })) && t === "dashboard" && (v.type === "field_selector" || v.type === "metric_selector")) {
958
1024
  const E = (f == null ? void 0 : f[v.id]) || [], se = _({
959
1025
  control: v,
960
1026
  nextSelectedCardIds: E
961
1027
  });
962
- h = h.map(
1028
+ b = b.map(
963
1029
  (ae) => ae.id === e ? se.nextControl : ae
964
- ), k = se.cardBindingsById, b = [v.id];
965
- } else if (o && (!v || !At(v.type)) && t === "dashboard" && (o.type === "field_selector" || o.type === "metric_selector")) {
966
- const E = (f == null ? void 0 : f[o.id]) || [];
1030
+ ), k = se.cardBindingsById, g = [v.id];
1031
+ } else if (l && (!v || !_t(v.type)) && t === "dashboard" && (l.type === "field_selector" || l.type === "metric_selector")) {
1032
+ const E = (f == null ? void 0 : f[l.id]) || [];
967
1033
  k = Object.fromEntries(
968
1034
  E.map((se) => [se, void 0])
969
- ), b = [o.id];
1035
+ ), g = [l.id];
970
1036
  }
971
- const D = h.find(
1037
+ const D = b.find(
972
1038
  (E) => E.id === e
973
1039
  );
974
1040
  let A = s;
975
- if (o && D) {
1041
+ if (l && D) {
976
1042
  const E = Ne({
977
- control: o,
1043
+ control: l,
978
1044
  defaultValues: s
979
1045
  });
980
- o.source.kind === "manual" && D.source.kind === "sql_query" && (W.current[e] = E);
981
- const se = E === void 0 && o.source.kind === "sql_query" && D.source.kind === "manual" ? W.current[e] : E, ae = He({
982
- previousControl: o,
1046
+ l.source.kind === "manual" && D.source.kind === "sql_query" && (W.current[e] = E);
1047
+ const se = E === void 0 && l.source.kind === "sql_query" && D.source.kind === "manual" ? W.current[e] : E, ae = He({
1048
+ previousControl: l,
983
1049
  nextControl: D,
984
1050
  currentDefaultValue: se
985
1051
  });
986
- D.source.kind === "manual" && (W.current[e] = ae), s && (A = { ...s }, ae === void 0 ? delete A[e] : A[e] = ae), h = h.map(
1052
+ D.source.kind === "manual" && (W.current[e] = ae), s && (A = { ...s }, ae === void 0 ? delete A[e] : A[e] = ae), b = b.map(
987
1053
  (je) => je.id === e ? { ...D, defaultValue: ae } : je
988
1054
  );
989
1055
  }
990
- I(h, A, {
1056
+ F(b, A, {
991
1057
  type: "update",
992
1058
  cardBindingsById: k,
993
- affectedBindingControlIds: b
1059
+ affectedBindingControlIds: g
994
1060
  });
995
- }, L = (e, i) => {
996
- if (!i.trim())
1061
+ }, L = (e, d) => {
1062
+ if (!d.trim())
997
1063
  return;
998
- const o = qt(i);
999
- if (o === e || V.has(o) || r.some(
1000
- (k) => k.id === o && k.id !== e
1064
+ const l = Lt(d);
1065
+ if (l === e || V.has(l) || a.some(
1066
+ (k) => k.id === l && k.id !== e
1001
1067
  ))
1002
1068
  return;
1003
- const h = r.map(
1004
- (k) => k.id === e ? { ...k, id: o } : k
1069
+ const b = a.map(
1070
+ (k) => k.id === e ? { ...k, id: l } : k
1005
1071
  );
1006
1072
  if (!s) {
1007
- I(h, void 0, {
1073
+ F(b, void 0, {
1008
1074
  type: "rename",
1009
1075
  oldId: e,
1010
- newId: o
1076
+ newId: l
1011
1077
  });
1012
1078
  return;
1013
1079
  }
1014
1080
  const v = { ...s };
1015
- Object.prototype.hasOwnProperty.call(v, e) && (v[o] = v[e], delete v[e]), I(h, v, {
1081
+ Object.prototype.hasOwnProperty.call(v, e) && (v[l] = v[e], delete v[e]), F(b, v, {
1016
1082
  type: "rename",
1017
1083
  oldId: e,
1018
- newId: o
1084
+ newId: l
1019
1085
  });
1020
- }, be = (e) => {
1021
- const i = r.filter((h) => h.id !== e);
1086
+ }, ge = (e) => {
1087
+ const d = a.filter((b) => b.id !== e);
1022
1088
  if (!s) {
1023
- I(i, void 0, { type: "remove", controlId: e });
1089
+ F(d, void 0, { type: "remove", controlId: e });
1024
1090
  return;
1025
1091
  }
1026
- const o = { ...s };
1027
- delete o[e], I(i, o, { type: "remove", controlId: e });
1028
- }, ue = j(() => {
1092
+ const l = { ...s };
1093
+ delete l[e], F(d, l, { type: "remove", controlId: e });
1094
+ }, ue = U(() => {
1029
1095
  O.current = void 0, w({
1030
1096
  step: 1,
1031
- control: me(t, r, Array.from(V))
1032
- }), F(null), $(null);
1033
- }, [r, V, t]), B = (e) => {
1097
+ control: me(t, a, Array.from(V))
1098
+ }), I(null), $(null);
1099
+ }, [a, V, t]), B = (e) => {
1034
1100
  w(
1035
- (i) => i && (() => {
1036
- const o = e(i.control);
1037
- i.control.source.kind === "manual" && o.source.kind === "sql_query" && (O.current = i.defaultValue);
1038
- const h = i.defaultValue === void 0 && i.control.source.kind === "sql_query" && o.source.kind === "manual" ? O.current : i.defaultValue, v = He({
1039
- previousControl: i.control,
1040
- nextControl: o,
1041
- currentDefaultValue: h
1101
+ (d) => d && (() => {
1102
+ const l = e(d.control);
1103
+ d.control.source.kind === "manual" && l.source.kind === "sql_query" && (O.current = d.defaultValue);
1104
+ const b = d.defaultValue === void 0 && d.control.source.kind === "sql_query" && l.source.kind === "manual" ? O.current : d.defaultValue, v = He({
1105
+ previousControl: d.control,
1106
+ nextControl: l,
1107
+ currentDefaultValue: b
1042
1108
  });
1043
- return o.source.kind === "manual" && (O.current = v), {
1044
- ...i,
1045
- control: o,
1109
+ return l.source.kind === "manual" && (O.current = v), {
1110
+ ...d,
1111
+ control: l,
1046
1112
  defaultValue: v
1047
1113
  };
1048
1114
  })()
1049
1115
  );
1050
1116
  }, le = (e) => {
1051
1117
  w(
1052
- (i) => i && (i.control.source.kind === "manual" && (O.current = e), {
1053
- ...i,
1118
+ (d) => d && (d.control.source.kind === "manual" && (O.current = e), {
1119
+ ...d,
1054
1120
  defaultValue: e
1055
1121
  })
1056
1122
  );
@@ -1058,7 +1124,7 @@ function Oa({
1058
1124
  if (!n)
1059
1125
  return !1;
1060
1126
  if (n.step === 2 && M(n.control.type))
1061
- return (n.selectedCardIds || []).length > 0 && wt({
1127
+ return (n.selectedCardIds || []).length > 0 && Nt({
1062
1128
  participants: y || [],
1063
1129
  selectedCardIds: n.selectedCardIds || [],
1064
1130
  control: n.control,
@@ -1066,82 +1132,82 @@ function Oa({
1066
1132
  });
1067
1133
  if (n.step !== 2 && n.step !== 3 || !n.control.label.trim())
1068
1134
  return !1;
1069
- const i = n.control.source.kind === "sql_query" ? n.control : $e(n.control);
1070
- if (i.source.kind === "manual" && (Dt(i) && i.source.options.length === 0 || i.source.options.some(
1071
- (h) => h.label.trim().length === 0 || h.value.trim().length === 0
1135
+ const d = n.control.source.kind === "sql_query" ? n.control : $e(n.control);
1136
+ if (d.source.kind === "manual" && (wt(d) && d.source.options.length === 0 || d.source.options.some(
1137
+ (b) => b.label.trim().length === 0 || b.value.trim().length === 0
1072
1138
  )))
1073
1139
  return !1;
1074
- if (i.source.kind === "sql_query") {
1075
- const { connectionId: o, sql: h, valueColumn: v } = i.source;
1076
- return o.trim().length > 0 && h.trim().length > 0 && v.trim().length > 0;
1140
+ if (d.source.kind === "sql_query") {
1141
+ const { connectionId: l, sql: b, valueColumn: v } = d.source;
1142
+ return l.trim().length > 0 && b.trim().length > 0 && v.trim().length > 0;
1077
1143
  }
1078
- return Et(
1079
- pe(i, n.defaultValue)
1144
+ return Dt(
1145
+ pe(d, n.defaultValue)
1080
1146
  );
1081
1147
  })(), Me = () => {
1082
1148
  var k;
1083
1149
  if (!n)
1084
1150
  return;
1085
- const e = $e(n.control), i = Vt({
1151
+ const e = $e(n.control), d = Ft({
1086
1152
  label: e.label,
1087
1153
  fallbackId: e.id,
1088
- existingControls: r,
1154
+ existingControls: a,
1089
1155
  reservedIds: Array.from(V)
1090
- }), o = {
1156
+ }), l = {
1091
1157
  ...e,
1092
- id: i
1093
- }, h = t === "dashboard" && (o.type === "field_selector" || o.type === "metric_selector") && ((k = n.selectedCardIds) != null && k.length) ? Ke({
1094
- control: o,
1158
+ id: d
1159
+ }, b = t === "dashboard" && (l.type === "field_selector" || l.type === "metric_selector") && ((k = n.selectedCardIds) != null && k.length) ? Ke({
1160
+ control: l,
1095
1161
  participants: y || [],
1096
1162
  selectedCardIds: n.selectedCardIds,
1097
1163
  matrixTargetIds: n.matrixTargetIds
1098
1164
  }) : void 0, v = pe(
1099
- o,
1165
+ l,
1100
1166
  n.defaultValue
1101
1167
  );
1102
1168
  w({
1103
- step: t === "dashboard" && (o.type === "field_selector" || o.type === "metric_selector") ? 4 : 3,
1104
- control: o,
1169
+ step: t === "dashboard" && (l.type === "field_selector" || l.type === "metric_selector") ? 4 : 3,
1170
+ control: l,
1105
1171
  defaultValue: v,
1106
- createdControlId: i,
1172
+ createdControlId: d,
1107
1173
  selectedCardIds: n.selectedCardIds,
1108
1174
  matrixTargetIds: n.matrixTargetIds,
1109
- cardBindingsById: h
1175
+ cardBindingsById: b
1110
1176
  });
1111
- }, xe = j(() => {
1177
+ }, xe = U(() => {
1112
1178
  w(null);
1113
- }, []), Oe = j(() => {
1179
+ }, []), Oe = U(() => {
1114
1180
  if (!(n != null && n.createdControlId)) {
1115
1181
  w(null);
1116
1182
  return;
1117
1183
  }
1118
- const e = n.control, i = n.createdControlId, o = pe(
1184
+ const e = n.control, d = n.createdControlId, l = pe(
1119
1185
  e,
1120
1186
  n.defaultValue
1121
1187
  );
1122
1188
  if (s) {
1123
- const h = { ...s };
1124
- o === void 0 ? delete h[i] : h[i] = o, I(
1189
+ const b = { ...s };
1190
+ l === void 0 ? delete b[d] : b[d] = l, F(
1125
1191
  [
1126
- ...r,
1192
+ ...a,
1127
1193
  {
1128
1194
  ...e,
1129
- defaultValue: o
1195
+ defaultValue: l
1130
1196
  }
1131
1197
  ],
1132
- h,
1198
+ b,
1133
1199
  {
1134
1200
  type: "add",
1135
1201
  cardBindingsById: n.cardBindingsById
1136
1202
  }
1137
1203
  );
1138
1204
  } else
1139
- I(
1205
+ F(
1140
1206
  [
1141
- ...r,
1207
+ ...a,
1142
1208
  {
1143
1209
  ...e,
1144
- defaultValue: o
1210
+ defaultValue: l
1145
1211
  }
1146
1212
  ],
1147
1213
  void 0,
@@ -1150,11 +1216,11 @@ function Oa({
1150
1216
  cardBindingsById: n.cardBindingsById
1151
1217
  }
1152
1218
  );
1153
- F(i), w(null), N == null || N();
1154
- }, [r, n, s, I, N]), ht = n ? M(n.control.type) ? ["Choose type", "Select cards", "Configure", "Finish"] : ["Choose type", "Configure", "Finish"] : [], ze = n != null && n.createdControlId ? `[[param.${n.createdControlId}]]` : n ? `[[param.${Tt(n.control.label) || n.control.id}]]` : "", ve = We({
1155
- controls: r,
1219
+ I(d), w(null), N == null || N();
1220
+ }, [a, n, s, F, N]), ht = n ? M(n.control.type) ? ["Choose type", "Select cards", "Configure", "Finish"] : ["Choose type", "Configure", "Finish"] : [], ze = n != null && n.createdControlId ? `[[param.${n.createdControlId}]]` : n ? `[[param.${Et(n.control.label) || n.control.id}]]` : "", ve = We({
1221
+ controls: a,
1156
1222
  defaultValues: s
1157
- }), Ce = n ? [...r, n.control] : r, Ue = n ? We({
1223
+ }), Ce = n ? [...a, n.control] : a, Ue = n ? We({
1158
1224
  controls: Ce,
1159
1225
  defaultValues: s,
1160
1226
  overrides: [
@@ -1164,10 +1230,10 @@ function Oa({
1164
1230
  }
1165
1231
  ]
1166
1232
  }) : ve;
1167
- return /* @__PURE__ */ m("div", { className: "space-y-4", children: [
1168
- n ? /* @__PURE__ */ m("div", { className: "space-y-4 pb-1", children: [
1169
- /* @__PURE__ */ a(
1170
- ya,
1233
+ return /* @__PURE__ */ p("div", { className: "space-y-4", children: [
1234
+ n ? /* @__PURE__ */ p("div", { className: "space-y-4 pb-1", children: [
1235
+ /* @__PURE__ */ r(
1236
+ va,
1171
1237
  {
1172
1238
  currentStep: n.step,
1173
1239
  labels: ht
@@ -1179,49 +1245,49 @@ function Oa({
1179
1245
  "aggregation_selector",
1180
1246
  "field_selector",
1181
1247
  "metric_selector"
1182
- ]), i = /* @__PURE__ */ new Set([
1248
+ ]), d = /* @__PURE__ */ new Set([
1183
1249
  // Temporarily hide these from the add-control dialog while
1184
1250
  // keeping the shared definitions for existing controls.
1185
1251
  "date",
1186
1252
  "text"
1187
- ]), o = J.filter(
1188
- (k) => !e.has(k.value) && !i.has(k.value)
1189
- ), h = J.filter(
1253
+ ]), l = X.filter(
1254
+ (k) => !e.has(k.value) && !d.has(k.value)
1255
+ ), b = X.filter(
1190
1256
  (k) => e.has(k.value)
1191
- ), v = (k) => /* @__PURE__ */ m(
1257
+ ), v = (k) => /* @__PURE__ */ p(
1192
1258
  "button",
1193
1259
  {
1194
1260
  type: "button",
1195
1261
  className: "rounded-control border border-border/60 bg-background px-3 py-2.5 text-left transition-colors hover:bg-muted/40 focus-visible:bg-muted/40 focus-visible:outline-none",
1196
1262
  onClick: () => w(
1197
- Ca({
1263
+ ka({
1198
1264
  scope: t,
1199
- existingControls: r,
1265
+ existingControls: a,
1200
1266
  reservedIds: Array.from(V),
1201
1267
  type: k.value
1202
1268
  })
1203
1269
  ),
1204
1270
  children: [
1205
- /* @__PURE__ */ a("div", { className: "text-[13px] font-medium text-foreground", children: k.label }),
1206
- /* @__PURE__ */ a("p", { className: "mt-0.5 text-[12px] text-muted-foreground", children: k.description })
1271
+ /* @__PURE__ */ r("div", { className: "text-[13px] font-medium text-foreground", children: k.label }),
1272
+ /* @__PURE__ */ r("p", { className: "mt-0.5 text-[12px] text-muted-foreground", children: k.description })
1207
1273
  ]
1208
1274
  },
1209
1275
  k.value
1210
1276
  );
1211
- return /* @__PURE__ */ m("div", { className: "space-y-4", children: [
1212
- t === "card" && (C == null ? void 0 : C.sql) == null ? /* @__PURE__ */ a("p", { className: "text-[12px] text-muted-foreground", children: "Explorer cards support displayed metric, group by field, aggregation, and time grain controls here." }) : null,
1213
- o.length > 0 && /* @__PURE__ */ m("div", { className: "space-y-1.5", children: [
1214
- /* @__PURE__ */ a("p", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Input controls" }),
1215
- /* @__PURE__ */ a("div", { className: "grid gap-1.5 sm:grid-cols-2", children: o.map(v) })
1277
+ return /* @__PURE__ */ p("div", { className: "space-y-4", children: [
1278
+ t === "card" && (C == null ? void 0 : C.sql) == null ? /* @__PURE__ */ r("p", { className: "text-[12px] text-muted-foreground", children: "Explorer cards support displayed metric, group by field, aggregation, and time grain controls here." }) : null,
1279
+ l.length > 0 && /* @__PURE__ */ p("div", { className: "space-y-1.5", children: [
1280
+ /* @__PURE__ */ r("p", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Input controls" }),
1281
+ /* @__PURE__ */ r("div", { className: "grid gap-1.5 sm:grid-cols-2", children: l.map(v) })
1216
1282
  ] }),
1217
- h.length > 0 && /* @__PURE__ */ m("div", { className: "space-y-1.5", children: [
1218
- /* @__PURE__ */ a("p", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Data-driven controls" }),
1219
- /* @__PURE__ */ a("div", { className: "grid gap-1.5 sm:grid-cols-2", children: h.map(v) })
1283
+ b.length > 0 && /* @__PURE__ */ p("div", { className: "space-y-1.5", children: [
1284
+ /* @__PURE__ */ r("p", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Data-driven controls" }),
1285
+ /* @__PURE__ */ r("div", { className: "grid gap-1.5 sm:grid-cols-2", children: b.map(v) })
1220
1286
  ] }),
1221
- /* @__PURE__ */ a(
1287
+ /* @__PURE__ */ r(
1222
1288
  he,
1223
1289
  {
1224
- secondary: /* @__PURE__ */ a(
1290
+ secondary: /* @__PURE__ */ r(
1225
1291
  q,
1226
1292
  {
1227
1293
  type: "button",
@@ -1235,67 +1301,67 @@ function Oa({
1235
1301
  )
1236
1302
  ] });
1237
1303
  })(),
1238
- n.step === 2 && M(n.control.type) && /* @__PURE__ */ m("div", { className: "space-y-3", children: [
1239
- /* @__PURE__ */ m("div", { className: "space-y-3", children: [
1240
- /* @__PURE__ */ a(
1304
+ n.step === 2 && M(n.control.type) && /* @__PURE__ */ p("div", { className: "space-y-3", children: [
1305
+ /* @__PURE__ */ p("div", { className: "space-y-3", children: [
1306
+ /* @__PURE__ */ r(
1241
1307
  ft,
1242
1308
  {
1243
1309
  control: n.control,
1244
- onChange: (e) => B((i) => ({
1245
- ...i,
1310
+ onChange: (e) => B((d) => ({
1311
+ ...d,
1246
1312
  label: e
1247
1313
  }))
1248
1314
  }
1249
1315
  ),
1250
- /* @__PURE__ */ a("p", { className: "text-[12px] text-muted-foreground", children: "Choose which cards should respond to this shared control." })
1316
+ /* @__PURE__ */ r("p", { className: "text-[12px] text-muted-foreground", children: "Choose which cards should respond to this shared control." })
1251
1317
  ] }),
1252
- Y.length === 0 ? /* @__PURE__ */ a("div", { className: "rounded-control border border-border/60 bg-muted/30 px-3 py-2.5 text-[12px] text-muted-foreground", children: "No eligible cards are available yet. Add compatible metrics or group-by fields to cards first." }) : /* @__PURE__ */ a("div", { className: "space-y-1 rounded-control border border-border/60 bg-background p-2", children: Y.map((e) => {
1253
- const i = (n.selectedCardIds || []).includes(e.cardId);
1254
- return /* @__PURE__ */ m(
1318
+ Y.length === 0 ? /* @__PURE__ */ r("div", { className: "rounded-control border border-border/60 bg-muted/30 px-3 py-2.5 text-[12px] text-muted-foreground", children: "No eligible cards are available yet. Add compatible metrics or group-by fields to cards first." }) : /* @__PURE__ */ r("div", { className: "space-y-1 rounded-control border border-border/60 bg-background p-2", children: Y.map((e) => {
1319
+ const d = (n.selectedCardIds || []).includes(e.cardId);
1320
+ return /* @__PURE__ */ p(
1255
1321
  "label",
1256
1322
  {
1257
1323
  className: "flex items-start gap-2 rounded-control px-1.5 py-1 text-[13px] hover:bg-muted/40",
1258
1324
  children: [
1259
- /* @__PURE__ */ a(
1260
- Xt,
1325
+ /* @__PURE__ */ r(
1326
+ Gt,
1261
1327
  {
1262
- checked: i,
1263
- onCheckedChange: (o) => w(
1264
- (h) => h && {
1265
- ...h,
1266
- selectedCardIds: o === !0 ? [
1267
- ...h.selectedCardIds || [],
1328
+ checked: d,
1329
+ onCheckedChange: (l) => w(
1330
+ (b) => b && {
1331
+ ...b,
1332
+ selectedCardIds: l === !0 ? [
1333
+ ...b.selectedCardIds || [],
1268
1334
  e.cardId
1269
- ] : (h.selectedCardIds || []).filter(
1335
+ ] : (b.selectedCardIds || []).filter(
1270
1336
  (v) => v !== e.cardId
1271
1337
  )
1272
1338
  }
1273
1339
  )
1274
1340
  }
1275
1341
  ),
1276
- /* @__PURE__ */ m("div", { className: "min-w-0", children: [
1277
- /* @__PURE__ */ a("div", { className: "font-medium text-foreground", children: e.title }),
1278
- /* @__PURE__ */ a("div", { className: "text-[12px] text-muted-foreground", children: n.control.type === "field_selector" ? `${e.fieldChoices.length} compatible group-by fields` : `${e.metricChoices.length} compatible metrics` })
1342
+ /* @__PURE__ */ p("div", { className: "min-w-0", children: [
1343
+ /* @__PURE__ */ r("div", { className: "font-medium text-foreground", children: e.title }),
1344
+ /* @__PURE__ */ r("div", { className: "text-[12px] text-muted-foreground", children: n.control.type === "field_selector" ? `${e.fieldChoices.length} compatible group-by fields` : `${e.metricChoices.length} compatible metrics` })
1279
1345
  ] })
1280
1346
  ]
1281
1347
  },
1282
1348
  e.cardId
1283
1349
  );
1284
1350
  }) }),
1285
- /* @__PURE__ */ a(
1351
+ /* @__PURE__ */ r(
1286
1352
  Ye,
1287
1353
  {
1288
1354
  participants: Y,
1289
1355
  selectedCardIds: n.selectedCardIds || [],
1290
1356
  control: n.control,
1291
1357
  selected: n.matrixTargetIds,
1292
- onChange: (e, i) => w((o) => o && { ...o, matrixTargetIds: { ...o.matrixTargetIds, [e]: i } })
1358
+ onChange: (e, d) => w((l) => l && { ...l, matrixTargetIds: { ...l.matrixTargetIds, [e]: d } })
1293
1359
  }
1294
1360
  ),
1295
- /* @__PURE__ */ a(
1361
+ /* @__PURE__ */ r(
1296
1362
  he,
1297
1363
  {
1298
- secondary: /* @__PURE__ */ a(
1364
+ secondary: /* @__PURE__ */ r(
1299
1365
  q,
1300
1366
  {
1301
1367
  type: "button",
@@ -1311,7 +1377,7 @@ function Oa({
1311
1377
  children: "Back"
1312
1378
  }
1313
1379
  ),
1314
- primary: /* @__PURE__ */ a(
1380
+ primary: /* @__PURE__ */ r(
1315
1381
  q,
1316
1382
  {
1317
1383
  type: "button",
@@ -1329,8 +1395,8 @@ function Oa({
1329
1395
  }
1330
1396
  )
1331
1397
  ] }),
1332
- n.step === 2 && !M(n.control.type) && /* @__PURE__ */ a(
1333
- Je,
1398
+ n.step === 2 && !M(n.control.type) && /* @__PURE__ */ r(
1399
+ Xe,
1334
1400
  {
1335
1401
  control: n.control,
1336
1402
  defaultValue: n.defaultValue,
@@ -1339,8 +1405,8 @@ function Oa({
1339
1405
  previewControlDefinitions: Ce,
1340
1406
  previewControlValues: Ue,
1341
1407
  onControlChange: (e) => B(() => e),
1342
- onLabelChange: (e) => B((i) => ({
1343
- ...i,
1408
+ onLabelChange: (e) => B((d) => ({
1409
+ ...d,
1344
1410
  label: e
1345
1411
  })),
1346
1412
  onDefaultValueChange: le,
@@ -1354,8 +1420,8 @@ function Oa({
1354
1420
  nextDisabled: !ye
1355
1421
  }
1356
1422
  ),
1357
- n.step === 3 && M(n.control.type) && /* @__PURE__ */ a(
1358
- Je,
1423
+ n.step === 3 && M(n.control.type) && /* @__PURE__ */ r(
1424
+ Xe,
1359
1425
  {
1360
1426
  control: n.control,
1361
1427
  defaultValue: n.defaultValue,
@@ -1364,8 +1430,8 @@ function Oa({
1364
1430
  previewControlDefinitions: Ce,
1365
1431
  previewControlValues: Ue,
1366
1432
  onControlChange: (e) => B(() => e),
1367
- onLabelChange: (e) => B((i) => ({
1368
- ...i,
1433
+ onLabelChange: (e) => B((d) => ({
1434
+ ...d,
1369
1435
  label: e
1370
1436
  })),
1371
1437
  onDefaultValueChange: le,
@@ -1379,16 +1445,16 @@ function Oa({
1379
1445
  nextDisabled: !ye
1380
1446
  }
1381
1447
  ),
1382
- n.step === 3 && !M(n.control.type) && /* @__PURE__ */ a(
1448
+ n.step === 3 && !M(n.control.type) && /* @__PURE__ */ r(
1383
1449
  Ze,
1384
1450
  {
1385
1451
  control: n.control,
1386
1452
  scope: t,
1387
1453
  createdReference: ze,
1388
- explorerContent: /* @__PURE__ */ m(Z, { children: [
1454
+ explorerContent: /* @__PURE__ */ p(Z, { children: [
1389
1455
  "Open the card and use",
1390
1456
  " ",
1391
- /* @__PURE__ */ a("span", { className: "font-medium text-foreground", children: "Settings → Controls" }),
1457
+ /* @__PURE__ */ r("span", { className: "font-medium text-foreground", children: "Settings → Controls" }),
1392
1458
  " ",
1393
1459
  "to choose what this control changes."
1394
1460
  ] }),
@@ -1403,19 +1469,19 @@ function Oa({
1403
1469
  onDone: Oe
1404
1470
  }
1405
1471
  ),
1406
- n.step === 4 && M(n.control.type) && /* @__PURE__ */ a(
1472
+ n.step === 4 && M(n.control.type) && /* @__PURE__ */ r(
1407
1473
  Ze,
1408
1474
  {
1409
1475
  control: n.control,
1410
1476
  scope: t,
1411
1477
  createdReference: ze,
1412
- summaryDetail: /* @__PURE__ */ m(Z, { children: [
1478
+ summaryDetail: /* @__PURE__ */ p(Z, { children: [
1413
1479
  "Used by ",
1414
1480
  (n.selectedCardIds || []).length,
1415
1481
  " selected card",
1416
1482
  (n.selectedCardIds || []).length === 1 ? "" : "s"
1417
1483
  ] }),
1418
- explorerContent: /* @__PURE__ */ a(Z, { children: "Selected cards have been set up to respond to this control automatically." }),
1484
+ explorerContent: /* @__PURE__ */ r(Z, { children: "Selected cards have been set up to respond to this control automatically." }),
1419
1485
  sqlDescription: "SQL cards can still reference this control directly in the SQL editor.",
1420
1486
  onBack: () => w(
1421
1487
  (e) => e && {
@@ -1428,163 +1494,163 @@ function Oa({
1428
1494
  }
1429
1495
  )
1430
1496
  ] }) : null,
1431
- !n && r.length === 0 ? /* @__PURE__ */ a("div", { className: "rounded-md border border-dashed p-3 text-sm text-muted-foreground", children: c }) : null,
1432
- !n && r.map((e) => {
1433
- const i = ge(e), o = g == null ? void 0 : g[e.id], h = Ne({
1497
+ !n && a.length === 0 ? /* @__PURE__ */ r("div", { className: "rounded-md border border-dashed p-3 text-sm text-muted-foreground", children: c }) : null,
1498
+ !n && a.map((e) => {
1499
+ const d = be(e), l = h == null ? void 0 : h[e.id], b = Ne({
1434
1500
  control: e,
1435
1501
  defaultValues: s
1436
1502
  }), v = ee === e.id, k = "inline-flex shrink-0 items-center rounded-[4px] border border-border/60 bg-muted/40 px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground";
1437
- return /* @__PURE__ */ m(
1503
+ return /* @__PURE__ */ p(
1438
1504
  "div",
1439
1505
  {
1440
1506
  className: "rounded-control border border-border/60",
1441
1507
  children: [
1442
- /* @__PURE__ */ m("div", { className: "flex items-center gap-2 px-3 py-2.5", children: [
1443
- /* @__PURE__ */ m(
1508
+ /* @__PURE__ */ p("div", { className: "flex items-center gap-2 px-3 py-2.5", children: [
1509
+ /* @__PURE__ */ p(
1444
1510
  "button",
1445
1511
  {
1446
1512
  type: "button",
1447
1513
  className: "flex min-w-0 flex-1 items-start gap-2 rounded-control text-left focus:outline-none focus-visible:bg-muted/40",
1448
- onClick: () => F(
1449
- (b) => b === e.id ? null : e.id
1514
+ onClick: () => I(
1515
+ (g) => g === e.id ? null : e.id
1450
1516
  ),
1451
1517
  children: [
1452
- v ? /* @__PURE__ */ a(Re, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground" }) : /* @__PURE__ */ a(Ge, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
1453
- /* @__PURE__ */ m("div", { className: "min-w-0", children: [
1454
- /* @__PURE__ */ m("div", { className: "flex flex-wrap items-center gap-1.5", children: [
1455
- /* @__PURE__ */ a("span", { className: "truncate text-[13px] font-medium text-foreground", children: e.label || "Untitled control" }),
1456
- /* @__PURE__ */ a("span", { className: k, children: tt(e.type).label }),
1457
- /* @__PURE__ */ a("span", { className: k, children: at(t, e.placement) })
1518
+ v ? /* @__PURE__ */ r(Qe, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground" }) : /* @__PURE__ */ r(Ge, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
1519
+ /* @__PURE__ */ p("div", { className: "min-w-0", children: [
1520
+ /* @__PURE__ */ p("div", { className: "flex flex-wrap items-center gap-1.5", children: [
1521
+ /* @__PURE__ */ r("span", { className: "truncate text-[13px] font-medium text-foreground", children: e.label || "Untitled control" }),
1522
+ /* @__PURE__ */ r("span", { className: k, children: tt(e.type).label }),
1523
+ /* @__PURE__ */ r("span", { className: k, children: at(t, e.placement) })
1458
1524
  ] }),
1459
- /* @__PURE__ */ m("div", { className: "mt-0.5 text-[12px] text-muted-foreground", children: [
1525
+ /* @__PURE__ */ p("div", { className: "mt-0.5 text-[12px] text-muted-foreground", children: [
1460
1526
  rt(e),
1461
- o != null && o.status ? ` · ${o.status}` : ""
1527
+ l != null && l.status ? ` · ${l.status}` : ""
1462
1528
  ] })
1463
1529
  ] })
1464
1530
  ]
1465
1531
  }
1466
1532
  ),
1467
- /* @__PURE__ */ a(
1533
+ /* @__PURE__ */ r(
1468
1534
  q,
1469
1535
  {
1470
1536
  type: "button",
1471
1537
  size: "xs",
1472
1538
  variant: "ghost",
1473
1539
  className: "h-7 w-7 shrink-0 p-0 text-muted-foreground",
1474
- onClick: () => be(e.id),
1540
+ onClick: () => ge(e.id),
1475
1541
  "aria-label": `Remove ${e.label}`,
1476
- children: /* @__PURE__ */ a(Jt, { className: "h-3.5 w-3.5" })
1542
+ children: /* @__PURE__ */ r(Pt, { className: "h-3.5 w-3.5" })
1477
1543
  }
1478
1544
  )
1479
1545
  ] }),
1480
- v && /* @__PURE__ */ m("div", { className: "space-y-4 border-t border-border/60 px-3 py-3", children: [
1481
- /* @__PURE__ */ m("div", { className: "grid gap-3 md:grid-cols-3", children: [
1482
- /* @__PURE__ */ m("div", { className: "flex flex-col gap-1.5", children: [
1483
- /* @__PURE__ */ a(ne, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Label" }),
1484
- /* @__PURE__ */ a(
1546
+ v && /* @__PURE__ */ p("div", { className: "space-y-4 border-t border-border/60 px-3 py-3", children: [
1547
+ /* @__PURE__ */ p("div", { className: "grid gap-3 md:grid-cols-3", children: [
1548
+ /* @__PURE__ */ p("div", { className: "flex flex-col gap-1.5", children: [
1549
+ /* @__PURE__ */ r(ne, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Label" }),
1550
+ /* @__PURE__ */ r(
1485
1551
  st,
1486
1552
  {
1487
1553
  size: "xs",
1488
1554
  value: e.label,
1489
1555
  placeholder: "Control label",
1490
- onChange: (b) => H(e.id, (D) => ({
1556
+ onChange: (g) => H(e.id, (D) => ({
1491
1557
  ...D,
1492
- label: b.target.value
1558
+ label: g.target.value
1493
1559
  }))
1494
1560
  }
1495
1561
  )
1496
1562
  ] }),
1497
- /* @__PURE__ */ m("div", { className: "flex flex-col gap-1.5", children: [
1498
- /* @__PURE__ */ a(ne, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Type" }),
1499
- /* @__PURE__ */ m(
1563
+ /* @__PURE__ */ p("div", { className: "flex flex-col gap-1.5", children: [
1564
+ /* @__PURE__ */ r(ne, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Type" }),
1565
+ /* @__PURE__ */ p(
1500
1566
  we,
1501
1567
  {
1502
1568
  value: e.type,
1503
- onValueChange: (b) => {
1569
+ onValueChange: (g) => {
1504
1570
  const D = nt({
1505
- controls: r,
1571
+ controls: a,
1506
1572
  controlId: e.id,
1507
- nextType: b,
1573
+ nextType: g,
1508
1574
  defaultValues: s
1509
1575
  });
1510
- I(D.controls, D.defaultValues);
1576
+ F(D.controls, D.defaultValues);
1511
1577
  },
1512
1578
  children: [
1513
- /* @__PURE__ */ a(De, { size: "xs", children: /* @__PURE__ */ a(Ee, {}) }),
1514
- /* @__PURE__ */ a(Te, { children: te(e.type).map(
1515
- (b) => /* @__PURE__ */ a(
1516
- Fe,
1579
+ /* @__PURE__ */ r(De, { size: "xs", children: /* @__PURE__ */ r(Ee, {}) }),
1580
+ /* @__PURE__ */ r(Te, { children: te(e.type).map(
1581
+ (g) => /* @__PURE__ */ r(
1582
+ Ie,
1517
1583
  {
1518
- value: b.value,
1519
- children: b.label
1584
+ value: g.value,
1585
+ children: g.label
1520
1586
  },
1521
- b.value
1587
+ g.value
1522
1588
  )
1523
1589
  ) })
1524
1590
  ]
1525
1591
  }
1526
1592
  )
1527
1593
  ] }),
1528
- /* @__PURE__ */ m("div", { className: "flex flex-col gap-1.5", children: [
1529
- /* @__PURE__ */ a(ne, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Show in" }),
1530
- /* @__PURE__ */ m(
1594
+ /* @__PURE__ */ p("div", { className: "flex flex-col gap-1.5", children: [
1595
+ /* @__PURE__ */ r(ne, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Show in" }),
1596
+ /* @__PURE__ */ p(
1531
1597
  we,
1532
1598
  {
1533
1599
  value: e.placement || G,
1534
- onValueChange: (b) => H(e.id, (D) => ({
1600
+ onValueChange: (g) => H(e.id, (D) => ({
1535
1601
  ...D,
1536
- placement: b
1602
+ placement: g
1537
1603
  })),
1538
1604
  children: [
1539
- /* @__PURE__ */ a(De, { size: "xs", children: /* @__PURE__ */ a(Ee, {}) }),
1540
- /* @__PURE__ */ a(Te, { children: R.map((b) => /* @__PURE__ */ a(Fe, { value: b.value, children: b.label }, b.value)) })
1605
+ /* @__PURE__ */ r(De, { size: "xs", children: /* @__PURE__ */ r(Ee, {}) }),
1606
+ /* @__PURE__ */ r(Te, { children: Q.map((g) => /* @__PURE__ */ r(Ie, { value: g.value, children: g.label }, g.value)) })
1541
1607
  ]
1542
1608
  }
1543
1609
  )
1544
1610
  ] })
1545
1611
  ] }),
1546
- M(e.type) ? /* @__PURE__ */ m(Z, { children: [
1547
- /* @__PURE__ */ a(
1548
- Pt,
1612
+ M(e.type) ? /* @__PURE__ */ p(Z, { children: [
1613
+ /* @__PURE__ */ r(
1614
+ Xt,
1549
1615
  {
1550
1616
  type: e.type,
1551
1617
  participants: Be(
1552
1618
  y || [],
1553
1619
  e.type
1554
- ).map((b) => ({
1555
- cardId: b.cardId,
1556
- title: b.title,
1557
- choiceCount: e.type === "field_selector" ? b.fieldChoices.length : b.metricChoices.length
1620
+ ).map((g) => ({
1621
+ cardId: g.cardId,
1622
+ title: g.title,
1623
+ choiceCount: e.type === "field_selector" ? g.fieldChoices.length : g.metricChoices.length
1558
1624
  })),
1559
1625
  selectedCardIds: (f == null ? void 0 : f[e.id]) || [],
1560
- onChange: (b) => {
1626
+ onChange: (g) => {
1561
1627
  const D = _({
1562
1628
  control: e,
1563
- nextSelectedCardIds: b
1564
- }), A = r.map(
1629
+ nextSelectedCardIds: g
1630
+ }), A = a.map(
1565
1631
  (E) => E.id === e.id ? D.nextControl : E
1566
1632
  );
1567
- I(A, s, {
1633
+ F(A, s, {
1568
1634
  type: "update",
1569
1635
  cardBindingsById: D.cardBindingsById
1570
1636
  });
1571
1637
  }
1572
1638
  }
1573
1639
  ),
1574
- /* @__PURE__ */ a(
1640
+ /* @__PURE__ */ r(
1575
1641
  Ye,
1576
1642
  {
1577
1643
  participants: y || [],
1578
1644
  selectedCardIds: (f == null ? void 0 : f[e.id]) || [],
1579
1645
  control: e,
1580
- onChange: (b, D) => {
1646
+ onChange: (g, D) => {
1581
1647
  const A = _({
1582
1648
  control: e,
1583
1649
  nextSelectedCardIds: (f == null ? void 0 : f[e.id]) || [],
1584
- matrixTargetIds: { [b]: D }
1650
+ matrixTargetIds: { [g]: D }
1585
1651
  });
1586
- I(
1587
- r.map((E) => E.id === e.id ? A.nextControl : E),
1652
+ F(
1653
+ a.map((E) => E.id === e.id ? A.nextControl : E),
1588
1654
  s,
1589
1655
  { type: "update", cardBindingsById: A.cardBindingsById }
1590
1656
  );
@@ -1592,47 +1658,47 @@ function Oa({
1592
1658
  }
1593
1659
  )
1594
1660
  ] }) : null,
1595
- /* @__PURE__ */ a(
1661
+ /* @__PURE__ */ r(
1596
1662
  dt,
1597
1663
  {
1598
1664
  control: e,
1599
- availableFieldChoices: i.fields,
1600
- availableMetricChoices: i.metrics,
1601
- previewControlDefinitions: r,
1665
+ availableFieldChoices: d.fields,
1666
+ availableMetricChoices: d.metrics,
1667
+ previewControlDefinitions: a,
1602
1668
  previewControlValues: ve,
1603
1669
  controlLifecycle: "edit",
1604
- onChange: (b) => H(e.id, () => b)
1670
+ onChange: (g) => H(e.id, () => g)
1605
1671
  }
1606
1672
  ),
1607
- e.initialValueStrategy === "saved_default" && /* @__PURE__ */ a(
1673
+ e.initialValueStrategy === "saved_default" && /* @__PURE__ */ r(
1608
1674
  ct,
1609
1675
  {
1610
1676
  control: e,
1611
- value: h,
1677
+ value: b,
1612
1678
  allowNoDefault: !0,
1613
1679
  allowCardDefault: !0,
1614
- previewControlDefinitions: r,
1680
+ previewControlDefinitions: a,
1615
1681
  previewControlValues: ve,
1616
- onChange: (b) => {
1617
- const D = r.map(
1618
- (A) => A.id === e.id ? { ...A, defaultValue: b } : A
1682
+ onChange: (g) => {
1683
+ const D = a.map(
1684
+ (A) => A.id === e.id ? { ...A, defaultValue: g } : A
1619
1685
  );
1620
- if (e.source.kind === "manual" && (W.current[e.id] = b), s) {
1686
+ if (e.source.kind === "manual" && (W.current[e.id] = g), s) {
1621
1687
  const A = { ...s };
1622
- b === void 0 ? delete A[e.id] : A[e.id] = b, I(D, A);
1688
+ g === void 0 ? delete A[e.id] : A[e.id] = g, F(D, A);
1623
1689
  return;
1624
1690
  }
1625
- I(D, void 0);
1691
+ F(D, void 0);
1626
1692
  }
1627
1693
  }
1628
1694
  ),
1629
- /* @__PURE__ */ m(
1630
- Zt,
1695
+ /* @__PURE__ */ p(
1696
+ Jt,
1631
1697
  {
1632
- open: Q === e.id,
1633
- onOpenChange: (b) => $(b ? e.id : null),
1698
+ open: R === e.id,
1699
+ onOpenChange: (g) => $(g ? e.id : null),
1634
1700
  children: [
1635
- /* @__PURE__ */ a(ea, { asChild: !0, children: /* @__PURE__ */ m(
1701
+ /* @__PURE__ */ r(Zt, { asChild: !0, children: /* @__PURE__ */ p(
1636
1702
  q,
1637
1703
  {
1638
1704
  type: "button",
@@ -1640,54 +1706,54 @@ function Oa({
1640
1706
  size: "xs",
1641
1707
  className: "-ml-2 gap-1 text-muted-foreground hover:text-foreground",
1642
1708
  children: [
1643
- Q === e.id ? /* @__PURE__ */ a(Re, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ a(Ge, { className: "h-3.5 w-3.5" }),
1709
+ R === e.id ? /* @__PURE__ */ r(Qe, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ r(Ge, { className: "h-3.5 w-3.5" }),
1644
1710
  "Advanced"
1645
1711
  ]
1646
1712
  }
1647
1713
  ) }),
1648
- /* @__PURE__ */ m(ta, { className: "space-y-3 pt-2", children: [
1649
- /* @__PURE__ */ m("div", { className: "grid gap-3 md:grid-cols-2", children: [
1650
- /* @__PURE__ */ m("div", { className: "flex flex-col gap-1.5", children: [
1651
- /* @__PURE__ */ a(ne, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Variable name" }),
1652
- /* @__PURE__ */ a(
1653
- aa,
1714
+ /* @__PURE__ */ p(ea, { className: "space-y-3 pt-2", children: [
1715
+ /* @__PURE__ */ p("div", { className: "grid gap-3 md:grid-cols-2", children: [
1716
+ /* @__PURE__ */ p("div", { className: "flex flex-col gap-1.5", children: [
1717
+ /* @__PURE__ */ r(ne, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Variable name" }),
1718
+ /* @__PURE__ */ r(
1719
+ ta,
1654
1720
  {
1655
1721
  controlId: e.id,
1656
- onCommit: (b) => L(e.id, b)
1722
+ onCommit: (g) => L(e.id, g)
1657
1723
  },
1658
1724
  e.id
1659
1725
  )
1660
1726
  ] }),
1661
- /* @__PURE__ */ m("div", { className: "flex flex-col gap-1.5", children: [
1662
- /* @__PURE__ */ a(ne, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Initial value" }),
1663
- /* @__PURE__ */ m(
1727
+ /* @__PURE__ */ p("div", { className: "flex flex-col gap-1.5", children: [
1728
+ /* @__PURE__ */ r(ne, { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Initial value" }),
1729
+ /* @__PURE__ */ p(
1664
1730
  we,
1665
1731
  {
1666
1732
  value: e.initialValueStrategy,
1667
- onValueChange: (b) => H(e.id, (D) => ({
1733
+ onValueChange: (g) => H(e.id, (D) => ({
1668
1734
  ...D,
1669
- initialValueStrategy: b
1735
+ initialValueStrategy: g
1670
1736
  })),
1671
1737
  children: [
1672
- /* @__PURE__ */ a(De, { size: "xs", children: /* @__PURE__ */ a(Ee, {}) }),
1673
- /* @__PURE__ */ a(Te, { children: It.map((b) => /* @__PURE__ */ a(
1674
- Fe,
1738
+ /* @__PURE__ */ r(De, { size: "xs", children: /* @__PURE__ */ r(Ee, {}) }),
1739
+ /* @__PURE__ */ r(Te, { children: It.map((g) => /* @__PURE__ */ r(
1740
+ Ie,
1675
1741
  {
1676
- value: b.value,
1677
- children: b.label
1742
+ value: g.value,
1743
+ children: g.label
1678
1744
  },
1679
- b.value
1745
+ g.value
1680
1746
  )) })
1681
1747
  ]
1682
1748
  }
1683
1749
  )
1684
1750
  ] })
1685
1751
  ] }),
1686
- /* @__PURE__ */ a(
1687
- ra,
1752
+ /* @__PURE__ */ r(
1753
+ aa,
1688
1754
  {
1689
1755
  control: e,
1690
- onChange: (b) => H(e.id, () => b)
1756
+ onChange: (g) => H(e.id, () => g)
1691
1757
  }
1692
1758
  )
1693
1759
  ] })
@@ -1700,7 +1766,7 @@ function Oa({
1700
1766
  e.id
1701
1767
  );
1702
1768
  }),
1703
- !n && /* @__PURE__ */ m(
1769
+ !n && /* @__PURE__ */ p(
1704
1770
  q,
1705
1771
  {
1706
1772
  type: "button",
@@ -1708,33 +1774,33 @@ function Oa({
1708
1774
  size: "xs",
1709
1775
  onClick: ue,
1710
1776
  children: [
1711
- /* @__PURE__ */ a(sa, { className: "h-3.5 w-3.5" }),
1777
+ /* @__PURE__ */ r(ra, { className: "h-3.5 w-3.5" }),
1712
1778
  "Add control"
1713
1779
  ]
1714
1780
  }
1715
1781
  )
1716
1782
  ] });
1717
1783
  }
1718
- function za(t) {
1784
+ function ja(t) {
1719
1785
  const {
1720
- open: r,
1721
- onOpenChange: l,
1786
+ open: a,
1787
+ onOpenChange: o,
1722
1788
  initialCreateFlowActive: s = !1,
1723
- dismissMode: d = "passive"
1724
- } = t, c = r !== void 0, [p, g] = K(!1), [u, x] = K(
1789
+ dismissMode: i = "passive"
1790
+ } = t, c = a !== void 0, [m, h] = K(!1), [u, x] = K(
1725
1791
  s
1726
- ), y = c ? r : p, f = j(
1792
+ ), y = c ? a : m, f = U(
1727
1793
  (S) => {
1728
- !S && u && d === "passive" || (c || g(S), S || x(!1), l == null || l(S));
1794
+ !S && u && i === "passive" || (c || h(S), S || x(!1), o == null || o(S));
1729
1795
  },
1730
- [c, u, d, l]
1731
- ), C = j(() => {
1732
- c || g(!1), x(!1), l == null || l(!1);
1733
- }, [c, l]);
1796
+ [c, u, i, o]
1797
+ ), C = U(() => {
1798
+ c || h(!1), x(!1), o == null || o(!1);
1799
+ }, [c, o]);
1734
1800
  ie(() => {
1735
1801
  y || x(!1);
1736
1802
  }, [y]);
1737
- const T = j(
1803
+ const T = U(
1738
1804
  (S) => {
1739
1805
  u && S.preventDefault();
1740
1806
  },
@@ -1750,54 +1816,53 @@ function za(t) {
1750
1816
  };
1751
1817
  }
1752
1818
  function qe(t) {
1753
- var l;
1754
- for (const s of t.cards)
1755
- if (s.type === "matrixTable" && !la.safeParse((l = s.config) == null ? void 0 : l.matrix).success)
1756
- return U.error("Matrix requires at least one row field, one metric, and valid settings."), !1;
1757
- const r = zt(t);
1758
- return r ? (U.error(r), !1) : !0;
1819
+ var a;
1820
+ for (const o of t.cards)
1821
+ if (o.type === "matrixTable" && !oa.safeParse((a = o.config) == null ? void 0 : a.matrix).success)
1822
+ return j.error("Matrix requires at least one row field, one metric, and valid settings."), !1;
1823
+ return !0;
1759
1824
  }
1760
- function Ua({
1825
+ function Qa({
1761
1826
  className: t,
1762
- variant: r = "outline"
1827
+ variant: a = "outline"
1763
1828
  }) {
1764
- const l = z((c) => c.onSave), { getUpdatedFrame: s } = Le();
1765
- function d() {
1829
+ const o = z((c) => c.onSave), { getUpdatedFrame: s } = Le();
1830
+ function i() {
1766
1831
  const c = s();
1767
- qe(c) && (l == null || l(c));
1832
+ qe(c) && (o == null || o(c));
1768
1833
  }
1769
- return /* @__PURE__ */ m(
1834
+ return /* @__PURE__ */ p(
1770
1835
  q,
1771
1836
  {
1772
- onClick: d,
1837
+ onClick: i,
1773
1838
  className: t,
1774
1839
  size: "xs",
1775
- variant: r,
1840
+ variant: a,
1776
1841
  children: [
1777
- /* @__PURE__ */ a(Mt, { className: "h-3.5 w-3.5" }),
1842
+ /* @__PURE__ */ r(qt, { className: "h-3.5 w-3.5" }),
1778
1843
  "Accept"
1779
1844
  ]
1780
1845
  }
1781
1846
  );
1782
1847
  }
1783
- function ja({
1848
+ function Ra({
1784
1849
  className: t,
1785
- variant: r = "default"
1850
+ variant: a = "default"
1786
1851
  }) {
1787
- const l = ce(), [s, d] = K(!1), { setIsVisualEditing: c } = _e(), { getUpdatedFrame: p } = Le(), g = Ae(), u = z((f) => f.frame), x = ut();
1788
- return /* @__PURE__ */ a(
1852
+ const o = ce(), [s, i] = K(!1), { setIsVisualEditing: c } = _e(), { getUpdatedFrame: m } = Le(), h = Ae(), u = z((f) => f.frame), x = ut();
1853
+ return /* @__PURE__ */ r(
1789
1854
  q,
1790
1855
  {
1791
1856
  onClick: () => {
1792
- const f = p();
1857
+ const f = m();
1793
1858
  if (!qe(f))
1794
1859
  return;
1795
- const C = (u == null ? void 0 : u.visualId) || (g == null ? void 0 : g.id);
1860
+ const C = (u == null ? void 0 : u.visualId) || (h == null ? void 0 : h.id);
1796
1861
  if (!C) {
1797
- U.error("No visual to save");
1862
+ j.error("No visual to save");
1798
1863
  return;
1799
1864
  }
1800
- d(!0), x.mutate(
1865
+ i(!0), x.mutate(
1801
1866
  {
1802
1867
  visualId: C,
1803
1868
  data: {
@@ -1806,45 +1871,45 @@ function ja({
1806
1871
  },
1807
1872
  {
1808
1873
  onSuccess: () => {
1809
- d(!1), U.success("Visual updated successfully"), l.invalidateQueries({
1874
+ i(!1), j.success("Visual updated successfully"), o.invalidateQueries({
1810
1875
  queryKey: ["resource-by-id", "visual", C],
1811
1876
  exact: !0
1812
1877
  });
1813
1878
  },
1814
1879
  onError: () => {
1815
- d(!1), U.error("Failed to update visual");
1880
+ i(!1), j.error("Failed to update visual");
1816
1881
  }
1817
1882
  }
1818
1883
  );
1819
1884
  },
1820
1885
  className: t,
1821
1886
  size: "xs",
1822
- variant: r,
1823
- children: s ? /* @__PURE__ */ m(Z, { children: [
1824
- /* @__PURE__ */ a(ot, { className: "h-3.5 w-3.5 animate-spin" }),
1887
+ variant: a,
1888
+ children: s ? /* @__PURE__ */ p(Z, { children: [
1889
+ /* @__PURE__ */ r(ot, { className: "h-3.5 w-3.5 animate-spin" }),
1825
1890
  "Saving"
1826
- ] }) : /* @__PURE__ */ m(Z, { children: [
1827
- /* @__PURE__ */ a(mt, { className: "h-3.5 w-3.5" }),
1891
+ ] }) : /* @__PURE__ */ p(Z, { children: [
1892
+ /* @__PURE__ */ r(mt, { className: "h-3.5 w-3.5" }),
1828
1893
  "Save to Library"
1829
1894
  ] })
1830
1895
  }
1831
1896
  );
1832
1897
  }
1833
- function Ra({
1898
+ function Ba({
1834
1899
  className: t
1835
1900
  }) {
1836
- const r = ce(), [l, s] = K(!1), d = Ae(), c = z((S) => S.frame), p = P((S) => S.selectedSheetId), g = P((S) => S.dashboard), { updateFrame: u, setIsVisualEditing: x } = _e(), { getUpdatedFrame: y } = Le(), f = ut(), C = oa();
1837
- return /* @__PURE__ */ a(
1901
+ const a = ce(), [o, s] = K(!1), i = Ae(), c = z((S) => S.frame), m = J((S) => S.selectedSheetId), h = J((S) => S.dashboard), { updateFrame: u, setIsVisualEditing: x } = _e(), { getUpdatedFrame: y } = Le(), f = ut(), C = na();
1902
+ return /* @__PURE__ */ r(
1838
1903
  q,
1839
1904
  {
1840
1905
  onClick: async () => {
1841
- if (!p) {
1842
- U.error("No sheet selected");
1906
+ if (!m) {
1907
+ j.error("No sheet selected");
1843
1908
  return;
1844
1909
  }
1845
- const S = (c == null ? void 0 : c.visualId) || (d == null ? void 0 : d.id);
1910
+ const S = (c == null ? void 0 : c.visualId) || (i == null ? void 0 : i.id);
1846
1911
  if (!S) {
1847
- U.error("No visual to update");
1912
+ j.error("No visual to update");
1848
1913
  return;
1849
1914
  }
1850
1915
  s(!0);
@@ -1858,21 +1923,21 @@ function Ra({
1858
1923
  ...N,
1859
1924
  visualId: S
1860
1925
  // Keep the link to library visual
1861
- }, R = Ot(g, V.id), G = await C(V, {
1862
- previousFrame: R
1926
+ }, Q = Mt(h, V.id), G = await C(V, {
1927
+ previousFrame: Q
1863
1928
  });
1864
1929
  await f.mutateAsync({
1865
1930
  visualId: S,
1866
1931
  data: {
1867
1932
  frameObject: N
1868
1933
  }
1869
- }), u(p, V, {
1934
+ }), u(m, V, {
1870
1935
  semanticExecutionPayload: G
1871
- }), r.invalidateQueries({ queryKey: ["visuals"] }), r.invalidateQueries({ queryKey: ["visual", S] }), U.success("Saved to library and applied locally"), setTimeout(() => {
1936
+ }), a.invalidateQueries({ queryKey: ["visuals"] }), a.invalidateQueries({ queryKey: ["visual", S] }), j.success("Saved to library and applied locally"), setTimeout(() => {
1872
1937
  x(!1);
1873
1938
  }, 300);
1874
1939
  } catch (N) {
1875
- console.error("Failed to save and apply:", N), U.error(
1940
+ console.error("Failed to save and apply:", N), j.error(
1876
1941
  N instanceof Error ? N.message : "Failed to save and apply changes"
1877
1942
  );
1878
1943
  } finally {
@@ -1882,27 +1947,27 @@ function Ra({
1882
1947
  className: t,
1883
1948
  size: "xs",
1884
1949
  variant: "default",
1885
- disabled: l,
1886
- children: l ? /* @__PURE__ */ m(Z, { children: [
1887
- /* @__PURE__ */ a(ot, { className: "h-3.5 w-3.5 animate-spin" }),
1950
+ disabled: o,
1951
+ children: o ? /* @__PURE__ */ p(Z, { children: [
1952
+ /* @__PURE__ */ r(ot, { className: "h-3.5 w-3.5 animate-spin" }),
1888
1953
  "Saving..."
1889
- ] }) : /* @__PURE__ */ m(Z, { children: [
1890
- /* @__PURE__ */ a(mt, { className: "h-3.5 w-3.5" }),
1954
+ ] }) : /* @__PURE__ */ p(Z, { children: [
1955
+ /* @__PURE__ */ r(mt, { className: "h-3.5 w-3.5" }),
1891
1956
  "Save & Apply"
1892
1957
  ] })
1893
1958
  }
1894
1959
  );
1895
1960
  }
1896
- function Qa({ className: t }) {
1897
- const { setTempQueryData: r, setSqlGen: l } = de(), s = ce(), d = z((f) => f.tempQueryData), c = z((f) => f.onClose), p = z((f) => f.card), g = lt(), u = oe(() => g !== p.type ? { ...p, type: g } : p, [p, g]), { queryKey: x } = it(u);
1961
+ function $a({ className: t }) {
1962
+ const { setTempQueryData: a, setSqlGen: o } = de(), s = ce(), i = z((f) => f.tempQueryData), c = z((f) => f.onClose), m = z((f) => f.card), h = lt(), u = oe(() => h !== m.type ? { ...m, type: h } : m, [m, h]), { queryKey: x } = it(u);
1898
1963
  function y() {
1899
- if (d) {
1900
- const { queryKey: f, queryData: C } = d;
1964
+ if (i) {
1965
+ const { queryKey: f, queryData: C } = i;
1901
1966
  f && C && s.setQueryData(f, C);
1902
1967
  }
1903
- l({}), c == null || c();
1968
+ o({}), c == null || c();
1904
1969
  }
1905
- return /* @__PURE__ */ m(
1970
+ return /* @__PURE__ */ p(
1906
1971
  q,
1907
1972
  {
1908
1973
  onClick: y,
@@ -1910,45 +1975,45 @@ function Qa({ className: t }) {
1910
1975
  size: "xs",
1911
1976
  variant: "outline",
1912
1977
  children: [
1913
- /* @__PURE__ */ a(et, { className: "h-3.5 w-3.5" }),
1978
+ /* @__PURE__ */ r(et, { className: "h-3.5 w-3.5" }),
1914
1979
  "Close"
1915
1980
  ]
1916
1981
  }
1917
1982
  );
1918
1983
  }
1919
- function Ba({
1984
+ function Wa({
1920
1985
  label: t = "Clear",
1921
- variant: r = "secondary",
1922
- className: l
1986
+ variant: a = "secondary",
1987
+ className: o
1923
1988
  } = {}) {
1924
- const s = ba();
1925
- return /* @__PURE__ */ m(
1989
+ const s = xa();
1990
+ return /* @__PURE__ */ p(
1926
1991
  q,
1927
1992
  {
1928
1993
  onClick: s,
1929
- className: l,
1994
+ className: o,
1930
1995
  size: "xs",
1931
- variant: r,
1996
+ variant: a,
1932
1997
  children: [
1933
- /* @__PURE__ */ a(et, { className: "h-3.5 w-3.5" }),
1998
+ /* @__PURE__ */ r(et, { className: "h-3.5 w-3.5" }),
1934
1999
  t
1935
2000
  ]
1936
2001
  }
1937
2002
  );
1938
2003
  }
1939
2004
  export {
1940
- Oa as C,
1941
- Ua as E,
1942
- La as F,
1943
- da as L,
1944
- Ma as V,
1945
- Qa as a,
1946
- ja as b,
1947
- Ra as c,
1948
- ca as d,
1949
- za as e,
1950
- qa as f,
1951
- ba as g,
1952
- Ba as h,
2005
+ Ua as C,
2006
+ Qa as E,
2007
+ Ma as F,
2008
+ ia as L,
2009
+ za as V,
2010
+ $a as a,
2011
+ Ra as b,
2012
+ Ba as c,
2013
+ da as d,
2014
+ ja as e,
2015
+ Oa as f,
2016
+ xa as g,
2017
+ Wa as h,
1953
2018
  Le as u
1954
2019
  };