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.
- package/dist/appearance-runtime/index.js +1 -1
- package/dist/brand-studio/index.js +1 -1
- package/dist/briefings/index.js +1 -1
- package/dist/chunks/{appearance-context-VJdrKi7r.js → appearance-context-DEYtWinQ.js} +0 -1
- package/dist/chunks/{appearance-runtime-provider-CC4HT2Gi.js → appearance-runtime-provider-B-M8gwlZ.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-BIRnsMqX.js → dashboard-briefing-launcher-CTEyh3FQ.js} +790 -800
- package/dist/chunks/dashboard-controls-C3KbYzz-.js +2146 -0
- package/dist/chunks/{dashboard-json-Dq5ibJr2.js → dashboard-json-Kc_M7nLP.js} +5 -5
- package/dist/chunks/edit-dashboard-visual-DqRmfRqN.js +22114 -0
- package/dist/chunks/{editor-action-buttons-DuxlCZYf.js → editor-action-buttons-s-ByVR9x.js} +740 -675
- package/dist/chunks/{index-krDPPQuA.js → index-D7GVxl4a.js} +41775 -42583
- package/dist/chunks/{index-B0KwXM6P.js → index-D9HDUSye.js} +186 -181
- package/dist/chunks/{report-preferences-dialog-BA9YJnPe.js → report-preferences-dialog-RAp0DAuw.js} +2 -2
- package/dist/chunks/{switch-evlnTA4t.js → switch-CWPcwAZ4.js} +4473 -5054
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-assistant/index.js +1 -2
- package/dist/data-app-builder/index.js +2 -2
- package/dist/index.js +9 -9
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/brand-studio/brand-studio-editor.d.ts +2 -1
- package/dist/types/briefings/index.d.ts +5 -0
- package/dist/types/components/ai/assistant-context-entity-controls.d.ts +1 -1
- package/dist/types/components/ai/assistant-message-components.d.ts +6 -6
- package/dist/types/components/ai/assistant-message.d.ts +1 -1
- package/dist/types/components/ai/assistant-virtualized-messages.d.ts +1 -1
- package/dist/types/components/ai/chat-custom-visual.d.ts +1 -1
- package/dist/types/components/ai/chat-visual-query-utils.d.ts +0 -27
- package/dist/types/components/ai/chat-visual.d.ts +1 -1
- package/dist/types/components/ai/clarification-card.d.ts +1 -1
- package/dist/types/components/ai/context-entity-display.d.ts +1 -1
- package/dist/types/components/ai/dashboard-assistant.d.ts +1 -4
- package/dist/types/components/ai/editor-assistant.d.ts +1 -1
- package/dist/types/components/ai/entity-mention-dropdown.d.ts +2 -1
- package/dist/types/components/ai/file-upload/file-preview.d.ts +3 -2
- package/dist/types/components/ai/file-upload/file-upload-button.d.ts +2 -1
- package/dist/types/components/ai/file-upload/file-upload-zone.d.ts +2 -2
- package/dist/types/components/ai/message-feedback-buttons.d.ts +1 -1
- package/dist/types/components/ai/pending-messages-display.d.ts +1 -1
- package/dist/types/components/ai/placeholders.d.ts +1 -1
- package/dist/types/components/ai/pre-block.d.ts +2 -2
- package/dist/types/components/ai/reasoning-effort-slider.d.ts +1 -1
- package/dist/types/components/ai/seed-questions.d.ts +1 -1
- package/dist/types/components/ai/tool-call-error.d.ts +1 -1
- package/dist/types/components/ai/tool-call.d.ts +1 -1
- package/dist/types/components/ai/tool-part-renderer.d.ts +1 -1
- package/dist/types/components/briefings/attachments/briefing-attachment-list.d.ts +1 -1
- package/dist/types/components/briefings/attachments/briefing-attachment-selector.d.ts +1 -1
- package/dist/types/components/briefings/attachments/briefing-attachment-settings-dialog.d.ts +1 -1
- package/dist/types/components/briefings/briefing-author/attachment-section.d.ts +1 -1
- package/dist/types/components/briefings/briefing-author/author-actions.d.ts +1 -1
- package/dist/types/components/briefings/briefing-author/content-composers.d.ts +2 -2
- package/dist/types/components/briefings/briefing-author/delivery-section.d.ts +1 -1
- package/dist/types/components/briefings/briefing-author/form-primitives.d.ts +3 -3
- package/dist/types/components/briefings/briefing-author/run-ui.d.ts +12 -12
- package/dist/types/components/briefings/briefing-author/schedule-section.d.ts +1 -1
- package/dist/types/components/briefings/briefing-author/schedule.d.ts +1 -1
- package/dist/types/components/briefings/briefing-author/scope-picker.d.ts +1 -1
- package/dist/types/components/briefings/briefing-author/slack-channel-picker.d.ts +1 -1
- package/dist/types/components/briefings/briefing-author-dialog.d.ts +1 -1
- package/dist/types/components/briefings/briefing-author.d.ts +1 -1
- package/dist/types/components/briefings/briefing-html-frame.d.ts +1 -1
- package/dist/types/components/briefings/briefing-recipient-field.d.ts +1 -1
- package/dist/types/components/briefings/briefing-ui-capabilities.d.ts +2 -2
- package/dist/types/components/briefings/dashboard-briefing-launcher-list.d.ts +1 -1
- package/dist/types/components/briefings/dashboard-briefing-launcher.d.ts +1 -1
- package/dist/types/components/briefings/dashboard-schedule-report-menu-item.d.ts +2 -2
- package/dist/types/components/briefings/watch-dashboard-button.d.ts +1 -1
- package/dist/types/components/calculated-fields/ai-compose-panel.d.ts +1 -1
- package/dist/types/components/calculated-fields/calculated-field-editor.d.ts +2 -1
- package/dist/types/components/calculated-fields/domain-definition-notice.d.ts +1 -1
- package/dist/types/components/calculated-fields/expression-validator.d.ts +1 -1
- package/dist/types/components/calculated-fields/field-picker-panel.d.ts +1 -1
- package/dist/types/components/calculated-fields/field-type-toggle.d.ts +1 -1
- package/dist/types/components/calculated-fields/insert-field-popover.d.ts +1 -1
- package/dist/types/components/calculated-fields/placeholder-field-picker.d.ts +1 -1
- package/dist/types/components/calculated-fields/summary-ribbon.d.ts +1 -1
- package/dist/types/components/calculated-fields/templates-menu.d.ts +1 -1
- package/dist/types/components/calculated-fields/validation-results.d.ts +1 -1
- package/dist/types/components/chart-selector/chart-icon.d.ts +3 -2
- package/dist/types/components/chart-selector/chart-selector-item.d.ts +7 -8
- package/dist/types/components/chart-selector/chart-selector.d.ts +9 -3
- package/dist/types/components/chart-selector/chart-type-picker.d.ts +1 -1
- package/dist/types/components/chart-selector/index.d.ts +0 -1
- package/dist/types/components/dashboard/ai-dashboard-create-dialog.d.ts +2 -2
- package/dist/types/components/dashboard/card-actions-menu.d.ts +1 -1
- package/dist/types/components/dashboard/card-selection-pill.d.ts +1 -1
- package/dist/types/components/dashboard/card-summary.d.ts +1 -1
- package/dist/types/components/dashboard/comparison-metadata-badge.d.ts +2 -2
- package/dist/types/components/dashboard/dashboard-card.d.ts +1 -1
- package/dist/types/components/dashboard/dashboard-container.d.ts +1 -1
- package/dist/types/components/dashboard/dashboard-error-state.d.ts +1 -1
- package/dist/types/components/dashboard/dashboard-export-dialog.d.ts +1 -1
- package/dist/types/components/dashboard/dashboard-frame-expand-dialog.d.ts +1 -1
- package/dist/types/components/dashboard/dashboard-frame.d.ts +1 -1
- package/dist/types/components/dashboard/dashboard-hub-row.d.ts +1 -1
- package/dist/types/components/dashboard/dashboard-hub.d.ts +1 -1
- package/dist/types/components/dashboard/dashboard-tabs.d.ts +1 -1
- package/dist/types/components/dashboard/dashboard-visual-error-state.d.ts +3 -3
- package/dist/types/components/dashboard/dashboard.d.ts +1 -1
- package/dist/types/components/dashboard/download-pdf.d.ts +1 -1
- package/dist/types/components/dashboard/drill-breadcrumb.d.ts +1 -1
- package/dist/types/components/dashboard/drill-navigation-controls.d.ts +1 -1
- package/dist/types/components/dashboard/inline-filter-bar.d.ts +2 -1
- package/dist/types/components/dashboard/inline-filter-component.d.ts +2 -1
- package/dist/types/components/dashboard/kpi-header.d.ts +1 -1
- package/dist/types/components/dashboard/sheet/delete-sheet-alert.d.ts +1 -1
- package/dist/types/components/dashboard/sheet/sheet-empty-state.d.ts +1 -1
- package/dist/types/components/dashboard/sheet/sheet-layout.d.ts +2 -1
- package/dist/types/components/dashboard/summary-card.d.ts +3 -3
- package/dist/types/components/dashboard/unconfigured-card-state.d.ts +1 -1
- package/dist/types/components/data-app-runtime/published-data-app-runtime.d.ts +1 -1
- package/dist/types/components/document-sheet/document-control-options-resolver.d.ts +1 -1
- package/dist/types/components/document-sheet/document-control-toolbar-actions.d.ts +1 -1
- package/dist/types/components/document-sheet/document-controls-settings.d.ts +1 -1
- package/dist/types/components/document-sheet/document-input-bar.d.ts +1 -1
- package/dist/types/components/document-sheet/document-insert-picker.d.ts +2 -2
- package/dist/types/components/document-sheet/document-inspector-primitives.d.ts +2 -2
- package/dist/types/components/document-sheet/document-kpi-section.d.ts +1 -1
- package/dist/types/components/document-sheet/document-matrix-section.d.ts +1 -1
- package/dist/types/components/document-sheet/document-measure-layer.d.ts +1 -1
- package/dist/types/components/document-sheet/document-outline.d.ts +1 -1
- package/dist/types/components/document-sheet/document-page-navigation.d.ts +2 -2
- package/dist/types/components/document-sheet/document-page.d.ts +3 -3
- package/dist/types/components/document-sheet/document-panel/document-side-panel.d.ts +1 -1
- package/dist/types/components/document-sheet/document-panel/inputs-panel.d.ts +1 -1
- package/dist/types/components/document-sheet/document-panel/page-panel.d.ts +1 -1
- package/dist/types/components/document-sheet/document-panel/panel-controls.d.ts +2 -2
- package/dist/types/components/document-sheet/document-panel/region-panels.d.ts +2 -2
- package/dist/types/components/document-sheet/document-panel/section-panel.d.ts +2 -2
- package/dist/types/components/document-sheet/document-section-print-boundary.d.ts +1 -1
- package/dist/types/components/document-sheet/document-sheet.d.ts +2 -2
- package/dist/types/components/document-sheet/document-table-chrome.d.ts +5 -5
- package/dist/types/components/document-sheet/document-table-section.d.ts +1 -1
- package/dist/types/components/document-sheet/document-text-editor.d.ts +1 -1
- package/dist/types/components/editor/dashboard-json.d.ts +1 -1
- package/dist/types/components/editor/editable.d.ts +1 -1
- package/dist/types/components/editor/editor-main/advanced-mode-toggle.d.ts +1 -1
- package/dist/types/components/editor/editor-main/card-display-options-dropdown.d.ts +1 -1
- package/dist/types/components/editor/editor-main/card-tabs.d.ts +1 -1
- package/dist/types/components/editor/editor-main/chart-configuration-options.d.ts +1 -1
- package/dist/types/components/editor/editor-main/code-editors/expanded-query-editor-dialog.d.ts +1 -1
- package/dist/types/components/editor/editor-main/code-editors/json-editor-readonly.d.ts +1 -1
- package/dist/types/components/editor/editor-main/content-editable-text.d.ts +2 -1
- package/dist/types/components/editor/editor-main/context-hover-card.d.ts +2 -1
- package/dist/types/components/editor/editor-main/customize-visual/customize-visual-dialog.d.ts +1 -1
- package/dist/types/components/editor/editor-main/dashboard-filter-subscription-status.d.ts +1 -1
- package/dist/types/components/editor/editor-main/data-label-settings.d.ts +1 -1
- package/dist/types/components/editor/editor-main/edit-dashboard-visual.d.ts +2 -1
- package/dist/types/components/editor/editor-main/editor-action-buttons.d.ts +7 -7
- package/dist/types/components/editor/editor-main/editor-actions-biz-mode.d.ts +1 -1
- package/dist/types/components/editor/editor-main/editor-card.d.ts +1 -1
- package/dist/types/components/editor/editor-main/editor-main-component.d.ts +1 -1
- package/dist/types/components/editor/editor-main/editor-query-section.d.ts +3 -2
- package/dist/types/components/editor/editor-main/editor-visual-section.d.ts +3 -8
- package/dist/types/components/editor/editor-main/inline-query-writer/inline-query-writer.d.ts +1 -1
- package/dist/types/components/editor/editor-main/legend-popover.d.ts +1 -1
- package/dist/types/components/editor/editor-main/raw-output-table.d.ts +2 -1
- package/dist/types/components/editor/editor-main/realtime-popover.d.ts +1 -1
- package/dist/types/components/editor/editor-main/table-type-switcher.d.ts +1 -1
- package/dist/types/components/editor/editor-main/text-card-rich-editor.d.ts +2 -1
- package/dist/types/components/editor/editor-main/text-card.d.ts +2 -1
- package/dist/types/components/editor/editor-main/visual-aside.d.ts +1 -1
- package/dist/types/components/editor/editor-main/visual-editing-controls.d.ts +1 -1
- package/dist/types/components/editor/editor-main/visual-save-as-dialog.d.ts +2 -1
- package/dist/types/components/editor/editor-main/visual-settings.d.ts +1 -1
- package/dist/types/components/editor/editor.d.ts +1 -1
- package/dist/types/components/editor/mode-toggle.d.ts +2 -2
- package/dist/types/components/editor/query-feedback/query-card-details.d.ts +2 -2
- package/dist/types/components/editor/query-feedback/query-error.d.ts +2 -2
- package/dist/types/components/editor/query-feedback/query-feedback-layout.d.ts +3 -3
- package/dist/types/components/editor/query-feedback/query-info.d.ts +1 -1
- package/dist/types/components/editor/query-feedback/query-sql-preview.d.ts +1 -1
- package/dist/types/components/editor/query-feedback/visual-query-error-state.d.ts +1 -1
- package/dist/types/components/error-fallbacks/fallback.d.ts +4 -4
- package/dist/types/components/explorer/chart-configuration/area-series-config-section.d.ts +1 -1
- package/dist/types/components/explorer/chart-configuration/axis-config-section.d.ts +1 -1
- package/dist/types/components/explorer/chart-configuration/bar-series-config-section.d.ts +1 -1
- package/dist/types/components/explorer/chart-configuration/bar-style-config-section.d.ts +1 -1
- package/dist/types/components/explorer/chart-configuration/bubble-scatter-config-section.d.ts +1 -1
- package/dist/types/components/explorer/chart-configuration/bullet-config-section.d.ts +1 -1
- package/dist/types/components/explorer/chart-configuration/chart-config-sections.d.ts +1 -1
- package/dist/types/components/explorer/chart-configuration/chart-configuration-panel.d.ts +1 -1
- package/dist/types/components/explorer/chart-configuration/chart-fields-configuration.d.ts +2 -2
- package/dist/types/components/explorer/chart-configuration/chart-type-row.d.ts +2 -2
- package/dist/types/components/explorer/chart-configuration/color-config-section.d.ts +1 -1
- package/dist/types/components/explorer/chart-configuration/combo-series-config-section.d.ts +1 -1
- package/dist/types/components/explorer/chart-configuration/comparison-config-section.d.ts +2 -2
- package/dist/types/components/explorer/chart-configuration/custom-color-picker.d.ts +1 -1
- package/dist/types/components/explorer/chart-configuration/data-labels-config-section.d.ts +1 -1
- package/dist/types/components/explorer/chart-configuration/data-labels-fields.d.ts +1 -1
- package/dist/types/components/explorer/chart-configuration/funnel-config-section.d.ts +1 -1
- package/dist/types/components/explorer/chart-configuration/heatmap-color-config-section.d.ts +1 -1
- package/dist/types/components/explorer/chart-configuration/kpi-format-config-section.d.ts +1 -1
- package/dist/types/components/explorer/chart-configuration/legend-config-section.d.ts +1 -1
- package/dist/types/components/explorer/chart-configuration/line-series-config-section.d.ts +1 -1
- package/dist/types/components/explorer/chart-configuration/line-style-config-section.d.ts +1 -1
- package/dist/types/components/explorer/chart-configuration/matrix-authoring-controls.d.ts +5 -5
- package/dist/types/components/explorer/chart-configuration/matrix-authoring-panel.d.ts +1 -1
- package/dist/types/components/explorer/chart-configuration/matrix-editor-settings.d.ts +1 -1
- package/dist/types/components/explorer/chart-configuration/metric-format-editor.d.ts +1 -1
- package/dist/types/components/explorer/chart-configuration/number-format-config.d.ts +2 -1
- package/dist/types/components/explorer/chart-configuration/stacked-sort-section.d.ts +1 -1
- package/dist/types/components/explorer/chart-configuration/summary-config-section.d.ts +1 -1
- package/dist/types/components/explorer/chart-configuration/tooltip-format-config-section.d.ts +1 -1
- package/dist/types/components/explorer/chart-configuration/treemap-color-mode-section.d.ts +1 -1
- package/dist/types/components/explorer/data-source/add-data-picker.d.ts +1 -1
- package/dist/types/components/explorer/data-source/data-source-panel.d.ts +1 -1
- package/dist/types/components/explorer/data-source/dataset-selector-popover.d.ts +1 -1
- package/dist/types/components/explorer/data-source/db-schema-selector.d.ts +1 -1
- package/dist/types/components/explorer/data-source/direct-source-tree.d.ts +1 -1
- package/dist/types/components/explorer/data-source/entity-tooltip.d.ts +2 -2
- package/dist/types/components/explorer/data-source/file-upload-manager.d.ts +1 -1
- package/dist/types/components/explorer/data-source/select-data-dialog.d.ts +1 -1
- package/dist/types/components/explorer/data-source/selected-entities-summary.d.ts +1 -1
- package/dist/types/components/explorer/data-source/semantic-domain-tree.d.ts +2 -2
- package/dist/types/components/explorer/data-source/url-source-manager.d.ts +1 -1
- package/dist/types/components/explorer/drag-and-drop/attribute-filter-dialog.d.ts +1 -1
- package/dist/types/components/explorer/drag-and-drop/data-concept-tooltip.d.ts +1 -1
- package/dist/types/components/explorer/drag-and-drop/drag-overlay.d.ts +1 -1
- package/dist/types/components/explorer/drag-and-drop/draggable-field-shell.d.ts +1 -1
- package/dist/types/components/explorer/drag-and-drop/draggable-field.d.ts +1 -1
- package/dist/types/components/explorer/drag-and-drop/droppable-zone.d.ts +1 -1
- package/dist/types/components/explorer/drag-and-drop/inline-edit-field.d.ts +2 -1
- package/dist/types/components/explorer/drag-and-drop/matrix-draggable-field.d.ts +1 -1
- package/dist/types/components/explorer/drag-and-drop/pivot-alias-template-editor.d.ts +1 -1
- package/dist/types/components/explorer/drag-and-drop/pivot-value-aliases-editor.d.ts +1 -1
- package/dist/types/components/explorer/fields/field-option-list.d.ts +1 -1
- package/dist/types/components/explorer/fields/icon-for-field-type.d.ts +1 -1
- package/dist/types/components/explorer/fields/numeric-popover.d.ts +1 -1
- package/dist/types/components/explorer/fields/source-field.d.ts +3 -3
- package/dist/types/components/explorer/fields/type-glyph.d.ts +1 -1
- package/dist/types/components/explorer/filters/card-date-filter.d.ts +1 -1
- package/dist/types/components/explorer/filters/card-filter-builder.d.ts +2 -1
- package/dist/types/components/explorer/filters/card-filter-manager.d.ts +1 -1
- package/dist/types/components/explorer/filters/field-multi-select.d.ts +2 -1
- package/dist/types/components/explorer/filters/field-single-select.d.ts +2 -1
- package/dist/types/components/explorer/filters/searchable-field-combobox.d.ts +2 -1
- package/dist/types/components/explorer/join-configuration/auto-join-info.d.ts +1 -1
- package/dist/types/components/explorer/join-configuration/join-conditions-builder.d.ts +1 -1
- package/dist/types/components/explorer/join-configuration/join-dialog.d.ts +1 -1
- package/dist/types/components/explorer/join-configuration/join-manager.d.ts +1 -1
- package/dist/types/components/explorer/join-configuration/join-tooltip-content.d.ts +1 -1
- package/dist/types/components/explorer/main/explorer.d.ts +1 -1
- package/dist/types/components/explorer/main/view-tabs.d.ts +1 -1
- package/dist/types/components/explorer/visualization/chart-settings-panel.d.ts +2 -1
- package/dist/types/components/explorer/visualization/chart-split-view.d.ts +1 -3
- package/dist/types/components/explorer/visualization/feedback-dialog.d.ts +2 -1
- package/dist/types/components/explorer/visualization/row-limit-selector.d.ts +1 -1
- package/dist/types/components/explorer/visualization/visualization-panel.d.ts +1 -1
- package/dist/types/components/icons/bullet-chart-icon.d.ts +1 -1
- package/dist/types/components/interactions/applied-filters-display.d.ts +1 -1
- package/dist/types/components/interactions/card-renderer.d.ts +1 -1
- package/dist/types/components/interactions/click-to-filter-review-dialog.d.ts +2 -1
- package/dist/types/components/interactions/dashboard-drill-host.d.ts +1 -1
- package/dist/types/components/interactions/drill-config/hierarchy-steps-display.d.ts +1 -1
- package/dist/types/components/interactions/drill-config/hierarchy-templates.d.ts +1 -1
- package/dist/types/components/interactions/drill-config/sortable-step.d.ts +1 -1
- package/dist/types/components/interactions/drill-config/step-configuration-popup.d.ts +1 -1
- package/dist/types/components/interactions/drill-hierarchy-modal.d.ts +1 -1
- package/dist/types/components/interactions/drill-to-url-modal.d.ts +1 -1
- package/dist/types/components/interactions/filter-badge-tooltip.d.ts +1 -1
- package/dist/types/components/interactions/insight-modal.d.ts +1 -1
- package/dist/types/components/interactions/insight-viewer.d.ts +1 -1
- package/dist/types/components/interactions/interactions-sheet.d.ts +2 -1
- package/dist/types/components/interactions/panels/click-to-filter-panel.d.ts +1 -1
- package/dist/types/components/interactions/panels/drill-down-panel.d.ts +2 -1
- package/dist/types/components/interactions/panels/drill-to-dashboard-panel.d.ts +1 -1
- package/dist/types/components/interactions/panels/drill-to-insight-panel.d.ts +1 -1
- package/dist/types/components/interactions/panels/drill-to-url-panel-v2.d.ts +1 -1
- package/dist/types/components/interactions/panels/dynamic-drill-panel.d.ts +1 -1
- package/dist/types/components/interactions/panels/panel-field.d.ts +1 -1
- package/dist/types/components/interactions/pickers/dashboard-picker.d.ts +1 -1
- package/dist/types/components/interactions/pickers/insight-picker.d.ts +1 -1
- package/dist/types/components/interactions/replaced-card-wrapper.d.ts +1 -1
- package/dist/types/components/interactions/reusable/field-combobox.d.ts +2 -1
- package/dist/types/components/interactions/reusable/field-selector.d.ts +1 -1
- package/dist/types/components/interactions/reusable/inline-field-selector.d.ts +1 -1
- package/dist/types/components/interactions/sheet/action-editor.d.ts +1 -1
- package/dist/types/components/interactions/sheet/action-picker.d.ts +1 -1
- package/dist/types/components/interactions/sheet/click-outcome-preview.d.ts +1 -1
- package/dist/types/components/interactions/sheet/interactions-home.d.ts +1 -1
- package/dist/types/components/interactions/sheet/sheet-parts.d.ts +4 -4
- package/dist/types/components/kpi-visual-v2/country-selector.d.ts +1 -1
- package/dist/types/components/kpi-visual-v2/kpi-card-explorer.d.ts +1 -1
- package/dist/types/components/kpi-visual-v2/kpi-settings.d.ts +1 -1
- package/dist/types/components/kpi-visual-v2/kpi-tooltip-components.d.ts +4 -4
- package/dist/types/components/kpi-visual-v2/kpi-tooltip.d.ts +2 -1
- package/dist/types/components/kpi-visual-v2/metric-comparison-indicator.d.ts +2 -1
- package/dist/types/components/kpi-visual-v2/metric-comparison-kpi.d.ts +1 -1
- package/dist/types/components/notifications/export-notification-item.d.ts +2 -1
- package/dist/types/components/notifications/export-notification-list.d.ts +2 -1
- package/dist/types/components/notifications/notification-bell.d.ts +2 -1
- package/dist/types/components/providers/appearance-runtime-provider.d.ts +2 -2
- package/dist/types/components/providers/dashboard-matrix-execution-provider.d.ts +1 -1
- package/dist/types/components/providers/dashboard-preferences-provider.d.ts +1 -1
- package/dist/types/components/providers/display-preferences-provider.d.ts +1 -1
- package/dist/types/components/providers/semaphor-context-provider.d.ts +1 -1
- package/dist/types/components/providers/semaphor-query-provider.d.ts +1 -1
- package/dist/types/components/providers/theme-provider.d.ts +1 -1
- package/dist/types/components/providers/ux-provider.d.ts +1 -1
- package/dist/types/components/semaphor/code-block.d.ts +1 -1
- package/dist/types/components/shared/unsaved-changes/unsaved-changes-alert.d.ts +1 -1
- package/dist/types/components/sharing-and-management/common-loading-skeleton.d.ts +1 -1
- package/dist/types/components/sharing-and-management/create-dashboard-dialog.d.ts +1 -1
- package/dist/types/components/sharing-and-management/create-visual-dialog.d.ts +1 -1
- package/dist/types/components/sharing-and-management/dashboard-actions-menu.d.ts +1 -1
- package/dist/types/components/sharing-and-management/group-management-dialog.d.ts +1 -1
- package/dist/types/components/sharing-and-management/resource-edit-dialog.d.ts +2 -1
- package/dist/types/components/sharing-and-management/resource-share-dialog/index.d.ts +1 -1
- package/dist/types/components/sharing-and-management/resource-share-dialog/unified/access-list.d.ts +1 -1
- package/dist/types/components/sharing-and-management/resource-share-dialog/unified/invite-combobox.d.ts +1 -1
- package/dist/types/components/sharing-and-management/resource-share-dialog/unified/primitives.d.ts +3 -3
- package/dist/types/components/sharing-and-management/resource-share-dialog/unified/share-shape.d.ts +1 -1
- package/dist/types/components/sharing-and-management/resource-share-dialog/unified/shell.d.ts +1 -1
- package/dist/types/components/sharing-and-management/resource-share-dialog/unified/status-bar.d.ts +1 -1
- package/dist/types/components/sharing-and-management/visuals-library-dialog.d.ts +1 -1
- package/dist/types/components/surfboard/card-controls-toolbar.d.ts +1 -1
- package/dist/types/components/surfboard/controls/card-runtime-controls.d.ts +1 -1
- package/dist/types/components/surfboard/controls/control-binding-list-editor.d.ts +1 -1
- package/dist/types/components/surfboard/controls/control-definition-editor-sections.d.ts +9 -9
- package/dist/types/components/surfboard/controls/control-definition-list-editor.d.ts +1 -1
- package/dist/types/components/surfboard/controls/control-toolbar-item.d.ts +1 -1
- package/dist/types/components/surfboard/controls/control-toolbar-settings-form.d.ts +1 -1
- package/dist/types/components/surfboard/controls/control-toolbar-settings-shell.d.ts +2 -2
- package/dist/types/components/surfboard/controls/dashboard-control-delete-dialog.d.ts +1 -1
- package/dist/types/components/surfboard/controls/dashboard-control-toolbar-popover.d.ts +1 -1
- package/dist/types/components/surfboard/controls/dashboard-controls-settings.d.ts +1 -1
- package/dist/types/components/surfboard/controls/dashboard-filter-controls-button.d.ts +1 -1
- package/dist/types/components/surfboard/controls/dashboard-filter-controls-launcher.d.ts +1 -1
- package/dist/types/components/surfboard/controls/dashboard-runtime-controls.d.ts +1 -1
- package/dist/types/components/surfboard/controls/matrix-structural-targets.d.ts +1 -1
- package/dist/types/components/surfboard/controls/presentation-currency-binding-editor.d.ts +1 -1
- package/dist/types/components/surfboard/controls/runtime-control-input.d.ts +1 -1
- package/dist/types/components/surfboard/controls/runtime-controls-group.d.ts +1 -1
- package/dist/types/components/surfboard/controls/sortable-control-toolbar-item.d.ts +1 -1
- package/dist/types/components/surfboard/dashboard-controls.d.ts +1 -1
- package/dist/types/components/surfboard/dashboard-plus-main.d.ts +1 -1
- package/dist/types/components/surfboard/dashboard-plus.d.ts +1 -1
- package/dist/types/components/surfboard/expanded-card-view.d.ts +2 -1
- package/dist/types/components/surfboard/export-dialog.d.ts +2 -1
- package/dist/types/components/surfboard/filter/apply-filters-check-box.d.ts +1 -1
- package/dist/types/components/surfboard/filter/custom-filter/custom-filter-selector.d.ts +1 -1
- package/dist/types/components/surfboard/filter/custom-filter/dashboard-custom-filter.d.ts +1 -1
- package/dist/types/components/surfboard/filter/custom-filter-popover.d.ts +1 -1
- package/dist/types/components/surfboard/filter/dashboard-filter-info-group.d.ts +1 -1
- package/dist/types/components/surfboard/filter/dashboard-filter-mapping-panel.d.ts +3 -3
- package/dist/types/components/surfboard/filter/date-comparison-controls.d.ts +1 -1
- package/dist/types/components/surfboard/filter/date-range-filter-v2.d.ts +1 -1
- package/dist/types/components/surfboard/filter/date-range-filter.d.ts +1 -1
- package/dist/types/components/surfboard/filter/day-picker.d.ts +2 -1
- package/dist/types/components/surfboard/filter/field-date-filter.d.ts +1 -1
- package/dist/types/components/surfboard/filter/filter-actions-popover-content.d.ts +1 -1
- package/dist/types/components/surfboard/filter/filter-aside.d.ts +1 -1
- package/dist/types/components/surfboard/filter/filter-component.d.ts +2 -1
- package/dist/types/components/surfboard/filter/filter-configuration-panel.d.ts +7 -7
- package/dist/types/components/surfboard/filter/filter-default-values-picker.d.ts +1 -1
- package/dist/types/components/surfboard/filter/filter-error-state.d.ts +1 -1
- package/dist/types/components/surfboard/filter/filter-header.d.ts +1 -1
- package/dist/types/components/surfboard/filter/filter-info.d.ts +1 -1
- package/dist/types/components/surfboard/filter/filter-option-dependencies-settings.d.ts +2 -1
- package/dist/types/components/surfboard/filter/filter-option-list.d.ts +1 -1
- package/dist/types/components/surfboard/filter/filter-option-source-settings.d.ts +2 -1
- package/dist/types/components/surfboard/filter/filter-picker-popover-content.d.ts +1 -1
- package/dist/types/components/surfboard/filter/filter-popover-parts.d.ts +3 -3
- package/dist/types/components/surfboard/filter/filter-scope-config.d.ts +1 -1
- package/dist/types/components/surfboard/filter/filter-settings-popover.d.ts +1 -1
- package/dist/types/components/surfboard/filter/filter-toolbar-item.d.ts +2 -1
- package/dist/types/components/surfboard/filter/filter-toolbar.d.ts +1 -1
- package/dist/types/components/surfboard/filter/global-date-comparison-footer.d.ts +1 -1
- package/dist/types/components/surfboard/filter/global-date-filter.d.ts +1 -1
- package/dist/types/components/surfboard/filter/hidden-filters.d.ts +1 -1
- package/dist/types/components/surfboard/filter/month-picker.d.ts +2 -1
- package/dist/types/components/surfboard/filter/multi-select-filter.d.ts +2 -2
- package/dist/types/components/surfboard/filter/multi-select-inline-content.d.ts +1 -1
- package/dist/types/components/surfboard/filter/numeric-filter-input.d.ts +1 -1
- package/dist/types/components/surfboard/filter/radio-button-filter.d.ts +1 -1
- package/dist/types/components/surfboard/filter/selection-chip.d.ts +1 -1
- package/dist/types/components/surfboard/filter/selection-filter-section.d.ts +1 -1
- package/dist/types/components/surfboard/filter/sortable-filter-toolbar-item.d.ts +1 -1
- package/dist/types/components/surfboard/filter/tabs-filter.d.ts +1 -1
- package/dist/types/components/surfboard/inline-options-error-state.d.ts +1 -1
- package/dist/types/components/surfboard/input-chip-row.d.ts +1 -1
- package/dist/types/components/surfboard/preferences/calendar-preferences-panel.d.ts +2 -1
- package/dist/types/components/surfboard/preferences/display-format-preferences-fields.d.ts +1 -1
- package/dist/types/components/surfboard/preferences/display-format-preferences-panel.d.ts +1 -1
- package/dist/types/components/surfboard/preferences/report-preferences-dialog.d.ts +1 -1
- package/dist/types/components/surfboard/toolbar-item-shell.d.ts +1 -1
- package/dist/types/components/text-variables/variable-chip-plugin.d.ts +2 -2
- package/dist/types/components/text-variables/variable-picker.d.ts +2 -2
- package/dist/types/components/ui/alert-dialog.d.ts +2 -2
- package/dist/types/components/ui/audience-type-badge.d.ts +1 -1
- package/dist/types/components/ui/calendar.d.ts +2 -2
- package/dist/types/components/ui/command.d.ts +2 -2
- package/dist/types/components/ui/context-menu.d.ts +1 -1
- package/dist/types/components/ui/dialog.d.ts +2 -2
- package/dist/types/components/ui/dropdown-menu.d.ts +1 -1
- package/dist/types/components/ui/resizable.d.ts +2 -2
- package/dist/types/components/ui/sheet.d.ts +2 -2
- package/dist/types/components/ui/skeleton.d.ts +1 -1
- package/dist/types/components/ui/sonner.d.ts +1 -1
- package/dist/types/components/ui-custom/color-field.d.ts +2 -1
- package/dist/types/components/ui-custom/column-search.d.ts +2 -1
- package/dist/types/components/ui-custom/combo-box-2.d.ts +1 -1
- package/dist/types/components/ui-custom/combo-box.d.ts +1 -1
- package/dist/types/components/ui-custom/copy-button.d.ts +1 -1
- package/dist/types/components/ui-custom/copy-on-click.d.ts +1 -1
- package/dist/types/components/ui-custom/date-range-picker.d.ts +1 -1
- package/dist/types/components/ui-custom/date-range-popover.d.ts +1 -1
- package/dist/types/components/ui-custom/details.d.ts +1 -1
- package/dist/types/components/ui-custom/editable-text.d.ts +2 -1
- package/dist/types/components/ui-custom/load-on-scroll-status.d.ts +1 -1
- package/dist/types/components/ui-custom/loading-dots.d.ts +1 -1
- package/dist/types/components/ui-custom/local-blur-input.d.ts +1 -1
- package/dist/types/components/ui-custom/option-search-input.d.ts +1 -1
- package/dist/types/components/ui-custom/overflow-div.d.ts +1 -1
- package/dist/types/components/ui-custom/overflow-span.d.ts +1 -1
- package/dist/types/components/ui-custom/pre-tag.d.ts +1 -1
- package/dist/types/components/ui-custom/radio-indicator.d.ts +1 -1
- package/dist/types/components/ui-custom/resizable-handle-custom.d.ts +1 -1
- package/dist/types/components/ui-custom/reusable-select.d.ts +1 -1
- package/dist/types/components/ui-custom/visual-badge.d.ts +1 -1
- package/dist/types/components/visual/aggregated-table/aggregate-table.d.ts +2 -1
- package/dist/types/components/visual/aggregated-table/columns/column-cell-components.d.ts +2 -1
- package/dist/types/components/visual/aggregated-table/columns/column-header-components.d.ts +3 -2
- package/dist/types/components/visual/aggregated-table/components/aggregate-table-body.d.ts +1 -1
- package/dist/types/components/visual/aggregated-table/components/grand-total-footer.d.ts +2 -1
- package/dist/types/components/visual/chartjs-visual.d.ts +1 -1
- package/dist/types/components/visual/custom-visual/component-combo-box.d.ts +2 -1
- package/dist/types/components/visual/custom-visual/custom-visual-settings.d.ts +1 -1
- package/dist/types/components/visual/custom-visual/dashboard-custom-visual.d.ts +1 -1
- package/dist/types/components/visual/custom-visual/editor-custom-visual.d.ts +1 -1
- package/dist/types/components/visual/custom-visual/multi-input-empty-renderer.d.ts +1 -1
- package/dist/types/components/visual/data-table/column-resize-handle.d.ts +1 -1
- package/dist/types/components/visual/data-table/copyable-cell.d.ts +1 -1
- package/dist/types/components/visual/data-table/data-table-column-settings.d.ts +1 -1
- package/dist/types/components/visual/data-table/data-table-conditional-formatting-settings.d.ts +1 -1
- package/dist/types/components/visual/data-table/data-table-pagination.d.ts +1 -1
- package/dist/types/components/visual/data-table/data-table-toolbar.d.ts +1 -1
- package/dist/types/components/visual/data-table/data-table.d.ts +1 -1
- package/dist/types/components/visual/data-table/overflow-cell.d.ts +1 -1
- package/dist/types/components/visual/data-table/table-settings-toolbar-button.d.ts +1 -1
- package/dist/types/components/visual/data-table/table-skeleton.d.ts +1 -1
- package/dist/types/components/visual/data-table/table-visual.d.ts +1 -1
- package/dist/types/components/visual/info-hover.d.ts +2 -1
- package/dist/types/components/visual/kpi-visual/format-number-setting.d.ts +1 -1
- package/dist/types/components/visual/kpi-visual/kpi-card-with-info.d.ts +1 -1
- package/dist/types/components/visual/kpi-visual/kpi-card.d.ts +3 -3
- package/dist/types/components/visual/kpi-visual/kpi-editor-ownership-badge.d.ts +1 -1
- package/dist/types/components/visual/matrix-table/matrix-axis-menu.d.ts +1 -1
- package/dist/types/components/visual/matrix-table/matrix-card-view.d.ts +1 -1
- package/dist/types/components/visual/matrix-table/matrix-interaction-actions.d.ts +2 -2
- package/dist/types/components/visual/matrix-table/matrix-loading-skeleton.d.ts +2 -2
- package/dist/types/components/visual/matrix-table/matrix-window-viewer.d.ts +1 -1
- package/dist/types/components/visual/pivot-table/aggregation-menu.d.ts +1 -1
- package/dist/types/components/visual/pivot-table/components/pivot-table-body.d.ts +1 -1
- package/dist/types/components/visual/pivot-table/components/pivot-table-footer.d.ts +2 -1
- package/dist/types/components/visual/pivot-table/hooks/use-pivot-column-headers.d.ts +1 -1
- package/dist/types/components/visual/pivot-table/pivot-table-tanstack.d.ts +1 -1
- package/dist/types/components/visual/settings/axis-mapping.d.ts +2 -2
- package/dist/types/components/visual/settings/chart-documentation.d.ts +3 -3
- package/dist/types/components/visual/settings/chart-orientation.d.ts +1 -1
- package/dist/types/components/visual/settings/color-format.d.ts +2 -1
- package/dist/types/components/visual/settings/controls-settings.d.ts +2 -1
- package/dist/types/components/visual/settings/dataset-label-popover.d.ts +2 -1
- package/dist/types/components/visual/settings/display-labels.d.ts +2 -1
- package/dist/types/components/visual/settings/filter-on-click-columns.d.ts +1 -1
- package/dist/types/components/visual/settings/frame-filters.d.ts +3 -2
- package/dist/types/components/visual/settings/inline-filters-settings.d.ts +2 -1
- package/dist/types/components/visual/settings/kpi-settings.d.ts +1 -1
- package/dist/types/components/visual/settings/map-chart-settings.d.ts +1 -1
- package/dist/types/components/visual/settings/scale-options.d.ts +1 -1
- package/dist/types/components/visual/settings/table-column-visibility-settings.d.ts +1 -1
- package/dist/types/components/visual/settings/table-presentation-settings.d.ts +4 -4
- package/dist/types/components/visual/settings/table-visual-settings.d.ts +1 -1
- package/dist/types/components/visual/settings/text-settings.d.ts +1 -1
- package/dist/types/components/visual/settings/text-type-radio.d.ts +2 -1
- package/dist/types/components/visual/visual-error-state.d.ts +1 -1
- package/dist/types/components/visual/visual.d.ts +1 -1
- package/dist/types/dashboard-assistant/index.d.ts +4 -25
- package/dist/types/data-app-builder/data-app-builder.d.ts +1 -1
- package/dist/types/data-app-sdk/devtools/index.d.ts +1 -1
- package/dist/types/data-app-sdk/provider.d.ts +1 -1
- package/dist/types/lib/charts/types.d.ts +1 -1
- package/dist/types/lib/contexts/interactions-popover-context.d.ts +1 -1
- package/dist/types/lib/dashboard-inputs/dashboard-input-snapshot.d.ts +26 -6
- package/dist/types/lib/document/document-generated-at.d.ts +13 -0
- package/dist/types/lib/download-pdf.d.ts +3 -0
- package/dist/types/lib/hooks/ai/use-dashboard-assistant.d.ts +1 -5
- package/dist/types/lib/hooks/semaphor-ready-indicator.d.ts +1 -1
- package/dist/types/lib/hooks/use-card-render-context.d.ts +14 -0
- package/dist/types/lib/hooks/use-dashboard-query.d.ts +0 -8
- package/dist/types/lib/hooks/use-dashboard.d.ts +3 -5
- package/dist/types/lib/hooks/use-is-dashboard-ready.d.ts +3 -0
- package/dist/types/lib/matrix-table/matrix-execution-provider.d.ts +1 -1
- package/dist/types/lib/matrix-table/matrix-runtime-types.d.ts +21 -0
- package/dist/types/lib/matrix-table/matrix-runtime.d.ts +8 -1
- package/dist/types/lib/matrix-table/use-matrix.d.ts +1 -0
- package/dist/types/lib/print/print-holds.d.ts +15 -0
- package/dist/types/lib/print/print-inputs.d.ts +104 -0
- package/dist/types/lib/print/print-sheets.d.ts +16 -0
- package/dist/types/lib/query-context/build-dashboard-card-query-contract.d.ts +0 -1
- package/dist/types/lib/query-context/dashboard-card-query-key.d.ts +0 -1
- package/dist/types/lib/stores/dashboard-store.d.ts +9 -5
- package/dist/types/lib/stores/editor-store.d.ts +1 -3
- package/dist/types/lib/types/common-types.d.ts +6 -51
- package/dist/types/lib/types/token-types.d.ts +3 -3
- package/dist/types/lib/utils/build-saved-editor-card.d.ts +15 -0
- package/dist/types/lib/utils/dashboard-controls-visibility.d.ts +1 -2
- package/dist/types/lib/utils/entity-icon-utils.d.ts +1 -1
- package/dist/types/lib/utils/field-icon-utils.d.ts +1 -1
- package/dist/types/lib/utils.d.ts +0 -4
- package/package.json +7 -6
- package/dist/chunks/dashboard-controls-D6Z6ws11.js +0 -2432
- package/dist/chunks/edit-dashboard-visual-CYZLUQlx.js +0 -23585
- package/dist/types/components/ai/dynamic-visual-host.d.ts +0 -23
- package/dist/types/components/ai/persisted-dynamic-visual.d.ts +0 -15
- package/dist/types/components/chart-selector/star-button.d.ts +0 -13
- package/dist/types/components/editor/dynamic-visualization-menu-items.d.ts +0 -3
- package/dist/types/components/editor/editor-main/dynamic-visual-editor.d.ts +0 -13
- package/dist/types/components/explorer/chart-configuration/chart-quick-selector.d.ts +0 -19
- package/dist/types/components/explorer/spreadsheet/column-header.d.ts +0 -11
- package/dist/types/components/explorer/spreadsheet/editor-panel.d.ts +0 -7
- package/dist/types/components/explorer/spreadsheet/formula-bar.d.ts +0 -11
- package/dist/types/components/explorer/spreadsheet/index.d.ts +0 -5
- package/dist/types/components/explorer/spreadsheet/spreadsheet-table.d.ts +0 -10
- package/dist/types/components/explorer/spreadsheet/spreadsheet-view.d.ts +0 -5
- package/dist/types/components/surfboard/lens/add-lens-dialog.d.ts +0 -9
- package/dist/types/components/surfboard/lens/default-lens-checkbox.d.ts +0 -1
- package/dist/types/components/surfboard/lens/lens-dropdown.d.ts +0 -10
- package/dist/types/components/surfboard/lens/lens-utils.d.ts +0 -21
- package/dist/types/lib/ai/dynamic-visual-card-utils.d.ts +0 -70
- package/dist/types/lib/ai/dynamic-visual-theme.d.ts +0 -11
- package/dist/types/lib/hooks/use-dynamic-fallback-render-context.d.ts +0 -12
- package/dist/types/lib/hooks/use-starred-charts.d.ts +0 -1
- package/dist/types/lib/stores/starred-charts-store.d.ts +0 -27
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { c as Ve, C as
|
|
2
|
-
import { useState as K, useEffect as ie, useCallback as
|
|
3
|
-
import { E as de, z as _e, u as
|
|
4
|
-
import { b6 as
|
|
5
|
-
import { jsx as
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
48
|
-
const [
|
|
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
|
-
|
|
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
|
-
|
|
79
|
-
} catch (
|
|
80
|
-
const u =
|
|
81
|
-
console.error("Failed to load remote chart store:", u),
|
|
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]),
|
|
84
|
+
}, [t, c]), a;
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function ua(t, a) {
|
|
87
87
|
if (t.length === 0)
|
|
88
88
|
return "";
|
|
89
|
-
const
|
|
89
|
+
const o = t.find(
|
|
90
90
|
(s) => {
|
|
91
|
-
var
|
|
92
|
-
return ((
|
|
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 (
|
|
96
|
-
return
|
|
97
|
-
if (
|
|
98
|
-
const s = t.find((
|
|
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
|
|
101
|
-
if (
|
|
100
|
+
const i = s.tabTitle;
|
|
101
|
+
if (i == "All__Header")
|
|
102
102
|
return t[0].id;
|
|
103
|
-
if (
|
|
104
|
-
const
|
|
105
|
-
(u) => u.tabTitle ===
|
|
103
|
+
if (i && i.endsWith("__Header")) {
|
|
104
|
+
const m = i.split("__")[0], h = t.find(
|
|
105
|
+
(u) => u.tabTitle === m
|
|
106
106
|
);
|
|
107
|
-
return
|
|
107
|
+
return h ? h.id : t[0].id;
|
|
108
108
|
}
|
|
109
|
-
return
|
|
109
|
+
return a;
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
return t[0].id;
|
|
113
113
|
}
|
|
114
|
-
|
|
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:
|
|
118
|
-
return
|
|
185
|
+
const { detailTableBackup: a, ...o } = t;
|
|
186
|
+
return o;
|
|
119
187
|
};
|
|
120
|
-
async function
|
|
121
|
-
if (!
|
|
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",
|
|
124
|
-
if (
|
|
125
|
-
return console.log("Using cached visual data for:",
|
|
126
|
-
console.log("Fetching visual data from network for:",
|
|
127
|
-
const
|
|
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/${
|
|
200
|
+
`${t}/management/v1/visuals/${o}`,
|
|
133
201
|
{
|
|
134
202
|
headers: {
|
|
135
|
-
Authorization: `Bearer ${
|
|
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),
|
|
210
|
+
return s.setQueryData(c, x), j.dismiss(h), { data: x, fromCache: !1 };
|
|
143
211
|
} catch (u) {
|
|
144
|
-
throw
|
|
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
|
|
155
|
-
var c,
|
|
156
|
-
const
|
|
157
|
-
if (!
|
|
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(
|
|
227
|
+
const s = pt(o);
|
|
160
228
|
if (!(s != null && s.cards) || s.cards.length === 0)
|
|
161
229
|
return !1;
|
|
162
|
-
const
|
|
163
|
-
(
|
|
230
|
+
const i = (m = s.cards) == null ? void 0 : m.find(
|
|
231
|
+
(h) => h.id === s.activeCardId
|
|
164
232
|
);
|
|
165
|
-
return
|
|
166
|
-
...
|
|
233
|
+
return i ? ($t({
|
|
234
|
+
...a,
|
|
167
235
|
frame: s,
|
|
168
|
-
card:
|
|
236
|
+
card: i,
|
|
169
237
|
visualId: (t == null ? void 0 : t.id) || s.visualId
|
|
170
238
|
}), !0) : !1;
|
|
171
239
|
}
|
|
172
|
-
function
|
|
240
|
+
function ga() {
|
|
173
241
|
const t = z(
|
|
174
242
|
(s) => {
|
|
175
|
-
var
|
|
176
|
-
return ((
|
|
243
|
+
var i;
|
|
244
|
+
return ((i = s.card.customCardPreferences) == null ? void 0 : i.url) || "";
|
|
177
245
|
}
|
|
178
|
-
),
|
|
179
|
-
return { getUpdatedFrame:
|
|
246
|
+
), a = ca(t);
|
|
247
|
+
return { getUpdatedFrame: U(() => {
|
|
180
248
|
var V;
|
|
181
|
-
|
|
249
|
+
Wt();
|
|
182
250
|
const {
|
|
183
251
|
frame: s,
|
|
184
|
-
card:
|
|
252
|
+
card: i,
|
|
185
253
|
isDevMode: c,
|
|
186
|
-
isShowingVisual:
|
|
187
|
-
selectedSchemaName:
|
|
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 =
|
|
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:
|
|
196
|
-
selectedSchemaName:
|
|
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:
|
|
270
|
+
stripConfig: ha
|
|
203
271
|
}), N = s.cards.map(
|
|
204
|
-
(
|
|
272
|
+
(Q) => Q.id === i.id ? S : Q
|
|
205
273
|
);
|
|
206
274
|
return {
|
|
207
275
|
...s,
|
|
208
276
|
cards: N,
|
|
209
|
-
activeCardId:
|
|
277
|
+
activeCardId: ua(N, s.activeCardId)
|
|
210
278
|
};
|
|
211
|
-
}, [
|
|
279
|
+
}, [a]) };
|
|
212
280
|
}
|
|
213
281
|
function Le() {
|
|
214
|
-
const { authToken: t, tokenProps:
|
|
215
|
-
setFrame:
|
|
216
|
-
setCard:
|
|
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:
|
|
294
|
+
setSelectedDatamodelId: Q,
|
|
227
295
|
setFilterValues: G,
|
|
228
|
-
setInlineFilterValuesMap:
|
|
296
|
+
setInlineFilterValuesMap: R,
|
|
229
297
|
setApplyFilters: $,
|
|
230
298
|
clearEditorContext: ee
|
|
231
299
|
} = de(), {
|
|
232
|
-
setIsDashboardEditing:
|
|
300
|
+
setIsDashboardEditing: I,
|
|
233
301
|
setIsVisualEditing: n,
|
|
234
302
|
setSelectedFrameId: w,
|
|
235
303
|
clearSelectedFrameId: W
|
|
236
|
-
} = _e(), O =
|
|
304
|
+
} = _e(), O = J((_) => _.selectedSheetId), P = J((_) => _.selectedFrameId), X = J((_) => _.dashboard), te = J((_) => _.filterValues), M = J(
|
|
237
305
|
(_) => _.inlineFilterValuesMap
|
|
238
|
-
), Y =
|
|
239
|
-
enabled: !!(
|
|
240
|
-
}), re =
|
|
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:
|
|
245
|
-
|
|
312
|
+
const { data: F, fromCache: H } = await Pe(
|
|
313
|
+
a.apiServiceUrl,
|
|
246
314
|
(t == null ? void 0 : t.accessToken) || "",
|
|
247
315
|
_.id,
|
|
248
|
-
|
|
316
|
+
o,
|
|
249
317
|
"Opening library visual..."
|
|
250
318
|
);
|
|
251
|
-
if (!
|
|
252
|
-
setFrame:
|
|
253
|
-
setCard:
|
|
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:
|
|
331
|
+
setSelectedDatamodelId: Q,
|
|
264
332
|
setFilterValues: G,
|
|
265
|
-
setInlineFilterValuesMap:
|
|
333
|
+
setInlineFilterValuesMap: R,
|
|
266
334
|
setApplyFilters: $,
|
|
267
|
-
setIsDashboardEditing:
|
|
335
|
+
setIsDashboardEditing: I,
|
|
268
336
|
setIsVisualEditing: n,
|
|
269
|
-
dashboard:
|
|
337
|
+
dashboard: X,
|
|
270
338
|
selectedSheetId: O,
|
|
271
|
-
selectedFrameId:
|
|
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 (
|
|
278
|
-
return console.error("Error editing visual:",
|
|
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
|
-
|
|
284
|
-
|
|
351
|
+
a.apiServiceUrl,
|
|
352
|
+
o,
|
|
285
353
|
c,
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
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
|
-
),
|
|
379
|
+
), be = U(
|
|
312
380
|
async (_) => {
|
|
313
381
|
var H;
|
|
314
|
-
const
|
|
382
|
+
const F = (L) => (j.error(L), { success: !1, error: L });
|
|
315
383
|
try {
|
|
316
384
|
if (c(_), !O)
|
|
317
|
-
return
|
|
318
|
-
const { data: L, fromCache:
|
|
319
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
397
|
+
return F("Visual frame is malformed");
|
|
330
398
|
const le = {
|
|
331
|
-
|
|
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
|
-
),
|
|
407
|
+
), I(!0), w(le.id), { success: !0, fromCache: ge };
|
|
340
408
|
} catch (L) {
|
|
341
|
-
return console.error("Error adding visual:", L),
|
|
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
|
-
|
|
349
|
-
|
|
416
|
+
a.apiServiceUrl,
|
|
417
|
+
o,
|
|
350
418
|
c,
|
|
351
419
|
O,
|
|
352
|
-
|
|
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:
|
|
364
|
-
getUpdatedFrame:
|
|
431
|
+
handleAddLibraryVisual: be,
|
|
432
|
+
getUpdatedFrame: ga().getUpdatedFrame,
|
|
365
433
|
refetch: Y.refetch
|
|
366
434
|
};
|
|
367
435
|
}
|
|
368
|
-
function
|
|
369
|
-
const t = z((
|
|
370
|
-
setSelectedConnectionId:
|
|
371
|
-
setSelectedDatabaseName:
|
|
436
|
+
function Oa() {
|
|
437
|
+
const t = z((m) => m.card.dataSource), {
|
|
438
|
+
setSelectedConnectionId: a,
|
|
439
|
+
setSelectedDatabaseName: o,
|
|
372
440
|
setSelectedSchemaName: s,
|
|
373
|
-
setSelectedTableName:
|
|
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:
|
|
380
|
-
|
|
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
|
-
|
|
384
|
-
|
|
451
|
+
a,
|
|
452
|
+
o,
|
|
385
453
|
s,
|
|
386
|
-
|
|
454
|
+
i,
|
|
387
455
|
c
|
|
388
456
|
]);
|
|
389
457
|
}
|
|
390
|
-
function
|
|
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
|
-
|
|
401
|
-
|
|
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
|
|
407
|
-
const { setTempQueryData: t } = de(),
|
|
408
|
-
setCardSql:
|
|
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:
|
|
484
|
+
setActiveTabCardId: Q
|
|
419
485
|
} = de();
|
|
420
486
|
function G() {
|
|
421
|
-
var W, O,
|
|
422
|
-
const
|
|
423
|
-
|
|
424
|
-
queryKey:
|
|
425
|
-
queryData:
|
|
426
|
-
}),
|
|
427
|
-
const $ = z.getState().frame, ee = z.getState().card,
|
|
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
|
-
}),
|
|
499
|
+
}), Q(w.id), V(w), n || S("bar");
|
|
434
500
|
}
|
|
435
501
|
return G;
|
|
436
502
|
}
|
|
437
|
-
function
|
|
503
|
+
function za({
|
|
438
504
|
type: t,
|
|
439
|
-
isLinked:
|
|
440
|
-
className:
|
|
505
|
+
isLinked: a,
|
|
506
|
+
className: o,
|
|
441
507
|
showLabel: s = !1,
|
|
442
|
-
showLocal:
|
|
508
|
+
showLocal: i = !1
|
|
443
509
|
}) {
|
|
444
|
-
const c =
|
|
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 (
|
|
449
|
-
u =
|
|
450
|
-
else if (!!!(
|
|
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 (
|
|
518
|
+
else if (m && !c)
|
|
453
519
|
u = "library";
|
|
454
|
-
else if (
|
|
520
|
+
else if (h != null && h.visualId && c)
|
|
455
521
|
u = "linked";
|
|
456
|
-
else if (
|
|
522
|
+
else if (m != null && m.id && c)
|
|
457
523
|
u = "library";
|
|
458
524
|
else
|
|
459
525
|
return null;
|
|
460
|
-
if (u === "local" && !
|
|
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__ */
|
|
480
|
-
linked: /* @__PURE__ */
|
|
481
|
-
library: /* @__PURE__ */
|
|
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__ */
|
|
488
|
-
/* @__PURE__ */
|
|
489
|
-
|
|
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
|
-
|
|
561
|
+
o
|
|
496
562
|
),
|
|
497
563
|
children: [
|
|
498
564
|
T[u],
|
|
499
|
-
s && /* @__PURE__ */
|
|
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__ */
|
|
504
|
-
|
|
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__ */
|
|
510
|
-
/* @__PURE__ */
|
|
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:
|
|
518
|
-
return /* @__PURE__ */
|
|
519
|
-
/* @__PURE__ */
|
|
520
|
-
/* @__PURE__ */
|
|
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:
|
|
590
|
+
value: a.label,
|
|
525
591
|
placeholder: "Control label",
|
|
526
|
-
onChange: (s) =>
|
|
592
|
+
onChange: (s) => o(s.target.value)
|
|
527
593
|
}
|
|
528
594
|
)
|
|
529
595
|
] });
|
|
530
596
|
}
|
|
531
|
-
function
|
|
532
|
-
const { currentStep:
|
|
533
|
-
return /* @__PURE__ */
|
|
534
|
-
const c =
|
|
535
|
-
return /* @__PURE__ */
|
|
536
|
-
/* @__PURE__ */
|
|
537
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
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__ */
|
|
613
|
+
/* @__PURE__ */ r(
|
|
548
614
|
"span",
|
|
549
615
|
{
|
|
550
616
|
className: fe(
|
|
551
617
|
"text-[12px]",
|
|
552
|
-
|
|
618
|
+
m ? "font-medium text-foreground" : "text-muted-foreground"
|
|
553
619
|
),
|
|
554
620
|
children: s
|
|
555
621
|
}
|
|
556
622
|
)
|
|
557
623
|
] }),
|
|
558
|
-
|
|
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:
|
|
570
|
-
return /* @__PURE__ */
|
|
571
|
-
|
|
572
|
-
|
|
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
|
|
577
|
-
const { control:
|
|
578
|
-
return /* @__PURE__ */
|
|
579
|
-
/* @__PURE__ */
|
|
580
|
-
/* @__PURE__ */
|
|
581
|
-
/* @__PURE__ */
|
|
582
|
-
/* @__PURE__ */
|
|
583
|
-
tt(
|
|
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(
|
|
652
|
+
rt(a),
|
|
587
653
|
" ·",
|
|
588
654
|
" ",
|
|
589
|
-
at(
|
|
655
|
+
at(o, a.placement)
|
|
590
656
|
] }),
|
|
591
|
-
s ? /* @__PURE__ */
|
|
657
|
+
s ? /* @__PURE__ */ r("div", { className: "text-[12px] text-muted-foreground", children: s }) : null
|
|
592
658
|
] })
|
|
593
659
|
] });
|
|
594
660
|
}
|
|
595
|
-
function
|
|
661
|
+
function Xe(t) {
|
|
596
662
|
const {
|
|
597
|
-
control:
|
|
598
|
-
defaultValue:
|
|
663
|
+
control: a,
|
|
664
|
+
defaultValue: o,
|
|
599
665
|
availableFieldChoices: s,
|
|
600
|
-
availableMetricChoices:
|
|
666
|
+
availableMetricChoices: i,
|
|
601
667
|
previewControlDefinitions: c,
|
|
602
|
-
previewControlValues:
|
|
603
|
-
onControlChange:
|
|
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__ */
|
|
611
|
-
/* @__PURE__ */
|
|
612
|
-
/* @__PURE__ */
|
|
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:
|
|
681
|
+
control: a,
|
|
616
682
|
availableFieldChoices: s,
|
|
617
|
-
availableMetricChoices:
|
|
683
|
+
availableMetricChoices: i,
|
|
618
684
|
previewControlDefinitions: c,
|
|
619
|
-
previewControlValues:
|
|
685
|
+
previewControlValues: m,
|
|
620
686
|
controlLifecycle: "create",
|
|
621
|
-
onChange:
|
|
687
|
+
onChange: h
|
|
622
688
|
}
|
|
623
689
|
),
|
|
624
|
-
/* @__PURE__ */
|
|
690
|
+
/* @__PURE__ */ r(
|
|
625
691
|
ct,
|
|
626
692
|
{
|
|
627
|
-
control:
|
|
628
|
-
value:
|
|
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:
|
|
700
|
+
previewControlValues: m
|
|
635
701
|
}
|
|
636
702
|
),
|
|
637
|
-
/* @__PURE__ */
|
|
703
|
+
/* @__PURE__ */ r(
|
|
638
704
|
he,
|
|
639
705
|
{
|
|
640
|
-
secondary: /* @__PURE__ */
|
|
641
|
-
primary: /* @__PURE__ */
|
|
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
|
|
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
|
|
662
|
-
const { text:
|
|
663
|
-
return /* @__PURE__ */
|
|
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":
|
|
733
|
+
"aria-label": o,
|
|
668
734
|
onClick: async () => {
|
|
669
735
|
try {
|
|
670
|
-
await navigator.clipboard.writeText(
|
|
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__ */
|
|
678
|
-
/* @__PURE__ */
|
|
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:
|
|
686
|
-
scope:
|
|
751
|
+
control: a,
|
|
752
|
+
scope: o,
|
|
687
753
|
createdReference: s,
|
|
688
|
-
explorerContent:
|
|
754
|
+
explorerContent: i,
|
|
689
755
|
sqlDescription: c,
|
|
690
|
-
summaryDetail:
|
|
691
|
-
onBack:
|
|
756
|
+
summaryDetail: m,
|
|
757
|
+
onBack: h,
|
|
692
758
|
onCancel: u,
|
|
693
759
|
onDone: x
|
|
694
|
-
} = t, y =
|
|
695
|
-
return /* @__PURE__ */
|
|
696
|
-
/* @__PURE__ */
|
|
697
|
-
|
|
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:
|
|
700
|
-
scope:
|
|
701
|
-
detail:
|
|
765
|
+
control: a,
|
|
766
|
+
scope: o,
|
|
767
|
+
detail: m
|
|
702
768
|
}
|
|
703
769
|
),
|
|
704
|
-
/* @__PURE__ */
|
|
705
|
-
/* @__PURE__ */
|
|
706
|
-
/* @__PURE__ */
|
|
707
|
-
y ? /* @__PURE__ */
|
|
708
|
-
/* @__PURE__ */
|
|
709
|
-
/* @__PURE__ */
|
|
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__ */
|
|
712
|
-
/* @__PURE__ */
|
|
713
|
-
/* @__PURE__ */
|
|
714
|
-
|
|
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__ */
|
|
721
|
-
|
|
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__ */
|
|
793
|
+
/* @__PURE__ */ p("p", { className: "text-[12px] text-muted-foreground", children: [
|
|
728
794
|
c,
|
|
729
795
|
" ",
|
|
730
|
-
/* @__PURE__ */
|
|
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__ */
|
|
811
|
+
/* @__PURE__ */ r(
|
|
746
812
|
he,
|
|
747
813
|
{
|
|
748
|
-
secondary: /* @__PURE__ */
|
|
749
|
-
tertiary: /* @__PURE__ */
|
|
750
|
-
primary: /* @__PURE__ */
|
|
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
|
|
756
|
-
const
|
|
821
|
+
function ka(t) {
|
|
822
|
+
const a = me(
|
|
757
823
|
t.scope,
|
|
758
824
|
t.existingControls,
|
|
759
825
|
t.reservedIds
|
|
760
|
-
),
|
|
761
|
-
...
|
|
762
|
-
label:
|
|
826
|
+
), o = t.type === a.type ? {
|
|
827
|
+
...a,
|
|
828
|
+
label: Fe[t.type]
|
|
763
829
|
} : {
|
|
764
830
|
...nt({
|
|
765
831
|
controls: [
|
|
766
832
|
{
|
|
767
|
-
...
|
|
768
|
-
label:
|
|
833
|
+
...a,
|
|
834
|
+
label: Fe[t.type]
|
|
769
835
|
}
|
|
770
836
|
],
|
|
771
|
-
controlId:
|
|
837
|
+
controlId: a.id,
|
|
772
838
|
nextType: t.type
|
|
773
839
|
}).controls[0],
|
|
774
|
-
label:
|
|
840
|
+
label: Fe[t.type]
|
|
775
841
|
};
|
|
776
842
|
return {
|
|
777
843
|
step: 2,
|
|
778
|
-
control:
|
|
779
|
-
defaultValue: pe(
|
|
844
|
+
control: o,
|
|
845
|
+
defaultValue: pe(o, void 0)
|
|
780
846
|
};
|
|
781
847
|
}
|
|
782
|
-
function
|
|
848
|
+
function Ua({
|
|
783
849
|
scope: t,
|
|
784
|
-
controls:
|
|
785
|
-
reservedControlIds:
|
|
850
|
+
controls: a,
|
|
851
|
+
reservedControlIds: o,
|
|
786
852
|
defaultValues: s,
|
|
787
|
-
onChange:
|
|
853
|
+
onChange: i,
|
|
788
854
|
emptyMessage: c,
|
|
789
|
-
initialCreateFlow:
|
|
790
|
-
usageByControlId:
|
|
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(
|
|
802
|
-
[
|
|
803
|
-
),
|
|
867
|
+
() => new Set(o || []),
|
|
868
|
+
[o]
|
|
869
|
+
), Q = Tt(t), G = St(t), [R, $] = K(
|
|
804
870
|
null
|
|
805
|
-
), [ee,
|
|
871
|
+
), [ee, I] = K(
|
|
806
872
|
null
|
|
807
873
|
), [n, w] = K(
|
|
808
|
-
() =>
|
|
874
|
+
() => m ? {
|
|
809
875
|
step: 1,
|
|
810
|
-
control: me(t,
|
|
876
|
+
control: me(t, a, Array.from(V))
|
|
811
877
|
} : null
|
|
812
|
-
), W = Se({}), O = Se(void 0),
|
|
813
|
-
const e =
|
|
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
|
|
817
|
-
return e.filter((
|
|
818
|
-
}, [T, C, t]), te =
|
|
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
|
|
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
|
|
827
|
-
const
|
|
828
|
-
return
|
|
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 =
|
|
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 || [],
|
|
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" ?
|
|
858
|
-
option:
|
|
859
|
-
target:
|
|
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" ?
|
|
862
|
-
option:
|
|
863
|
-
target:
|
|
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 =
|
|
877
|
-
|
|
942
|
+
const e = m && !P.current;
|
|
943
|
+
P.current = m, e && (w({
|
|
878
944
|
step: 1,
|
|
879
|
-
control: me(t,
|
|
880
|
-
}),
|
|
881
|
-
}, [
|
|
882
|
-
const
|
|
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
|
|
889
|
-
if (
|
|
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
|
|
960
|
+
const l = ke({
|
|
895
961
|
controlType: e.type,
|
|
896
962
|
participants: y || [],
|
|
897
|
-
selectedCardIds:
|
|
963
|
+
selectedCardIds: d
|
|
898
964
|
});
|
|
899
965
|
return {
|
|
900
|
-
fields: e.type === "field_selector" ?
|
|
901
|
-
option:
|
|
902
|
-
target:
|
|
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" ?
|
|
905
|
-
option:
|
|
906
|
-
target:
|
|
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
|
|
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
|
-
}),
|
|
985
|
+
}), b = At({
|
|
920
986
|
control: e.control,
|
|
921
|
-
choices:
|
|
987
|
+
choices: l.choices
|
|
922
988
|
}), v = Object.fromEntries(
|
|
923
|
-
|
|
989
|
+
d.filter((k) => !e.nextSelectedCardIds.includes(k)).map((k) => [k, void 0])
|
|
924
990
|
);
|
|
925
|
-
return e.nextSelectedCardIds.length > 0 &&
|
|
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:
|
|
994
|
+
control: b,
|
|
929
995
|
participants: y || [],
|
|
930
996
|
selectedCardIds: e.nextSelectedCardIds,
|
|
931
997
|
matrixTargetIds: e.matrixTargetIds
|
|
932
998
|
})
|
|
933
999
|
), {
|
|
934
|
-
nextControl:
|
|
1000
|
+
nextControl: b,
|
|
935
1001
|
cardBindingsById: v
|
|
936
1002
|
};
|
|
937
|
-
},
|
|
938
|
-
(e,
|
|
939
|
-
const
|
|
1003
|
+
}, F = U(
|
|
1004
|
+
(e, d = s, l = { type: "update" }) => {
|
|
1005
|
+
const b = e.map((v) => (Ne({
|
|
940
1006
|
control: v,
|
|
941
|
-
defaultValues:
|
|
942
|
-
}),
|
|
1007
|
+
defaultValues: d
|
|
1008
|
+
}), kt(
|
|
943
1009
|
v
|
|
944
1010
|
)));
|
|
945
|
-
|
|
1011
|
+
i(b, d, l);
|
|
946
1012
|
},
|
|
947
|
-
[s,
|
|
948
|
-
), H = (e,
|
|
949
|
-
const
|
|
1013
|
+
[s, i]
|
|
1014
|
+
), H = (e, d) => {
|
|
1015
|
+
const l = a.find(
|
|
950
1016
|
(E) => E.id === e
|
|
951
1017
|
);
|
|
952
|
-
let
|
|
953
|
-
const v =
|
|
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,
|
|
957
|
-
if (v && (!
|
|
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
|
-
|
|
1028
|
+
b = b.map(
|
|
963
1029
|
(ae) => ae.id === e ? se.nextControl : ae
|
|
964
|
-
), k = se.cardBindingsById,
|
|
965
|
-
} else if (
|
|
966
|
-
const E = (f == null ? void 0 : f[
|
|
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
|
-
),
|
|
1035
|
+
), g = [l.id];
|
|
970
1036
|
}
|
|
971
|
-
const D =
|
|
1037
|
+
const D = b.find(
|
|
972
1038
|
(E) => E.id === e
|
|
973
1039
|
);
|
|
974
1040
|
let A = s;
|
|
975
|
-
if (
|
|
1041
|
+
if (l && D) {
|
|
976
1042
|
const E = Ne({
|
|
977
|
-
control:
|
|
1043
|
+
control: l,
|
|
978
1044
|
defaultValues: s
|
|
979
1045
|
});
|
|
980
|
-
|
|
981
|
-
const se = E === void 0 &&
|
|
982
|
-
previousControl:
|
|
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),
|
|
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
|
-
|
|
1056
|
+
F(b, A, {
|
|
991
1057
|
type: "update",
|
|
992
1058
|
cardBindingsById: k,
|
|
993
|
-
affectedBindingControlIds:
|
|
1059
|
+
affectedBindingControlIds: g
|
|
994
1060
|
});
|
|
995
|
-
}, L = (e,
|
|
996
|
-
if (!
|
|
1061
|
+
}, L = (e, d) => {
|
|
1062
|
+
if (!d.trim())
|
|
997
1063
|
return;
|
|
998
|
-
const
|
|
999
|
-
if (
|
|
1000
|
-
(k) => k.id ===
|
|
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
|
|
1004
|
-
(k) => k.id === e ? { ...k, id:
|
|
1069
|
+
const b = a.map(
|
|
1070
|
+
(k) => k.id === e ? { ...k, id: l } : k
|
|
1005
1071
|
);
|
|
1006
1072
|
if (!s) {
|
|
1007
|
-
|
|
1073
|
+
F(b, void 0, {
|
|
1008
1074
|
type: "rename",
|
|
1009
1075
|
oldId: e,
|
|
1010
|
-
newId:
|
|
1076
|
+
newId: l
|
|
1011
1077
|
});
|
|
1012
1078
|
return;
|
|
1013
1079
|
}
|
|
1014
1080
|
const v = { ...s };
|
|
1015
|
-
Object.prototype.hasOwnProperty.call(v, e) && (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:
|
|
1084
|
+
newId: l
|
|
1019
1085
|
});
|
|
1020
|
-
},
|
|
1021
|
-
const
|
|
1086
|
+
}, ge = (e) => {
|
|
1087
|
+
const d = a.filter((b) => b.id !== e);
|
|
1022
1088
|
if (!s) {
|
|
1023
|
-
|
|
1089
|
+
F(d, void 0, { type: "remove", controlId: e });
|
|
1024
1090
|
return;
|
|
1025
1091
|
}
|
|
1026
|
-
const
|
|
1027
|
-
delete
|
|
1028
|
-
}, ue =
|
|
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,
|
|
1032
|
-
}),
|
|
1033
|
-
}, [
|
|
1097
|
+
control: me(t, a, Array.from(V))
|
|
1098
|
+
}), I(null), $(null);
|
|
1099
|
+
}, [a, V, t]), B = (e) => {
|
|
1034
1100
|
w(
|
|
1035
|
-
(
|
|
1036
|
-
const
|
|
1037
|
-
|
|
1038
|
-
const
|
|
1039
|
-
previousControl:
|
|
1040
|
-
nextControl:
|
|
1041
|
-
currentDefaultValue:
|
|
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
|
|
1044
|
-
...
|
|
1045
|
-
control:
|
|
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
|
-
(
|
|
1053
|
-
...
|
|
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 &&
|
|
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
|
|
1070
|
-
if (
|
|
1071
|
-
(
|
|
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 (
|
|
1075
|
-
const { connectionId:
|
|
1076
|
-
return
|
|
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
|
|
1079
|
-
pe(
|
|
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),
|
|
1151
|
+
const e = $e(n.control), d = Ft({
|
|
1086
1152
|
label: e.label,
|
|
1087
1153
|
fallbackId: e.id,
|
|
1088
|
-
existingControls:
|
|
1154
|
+
existingControls: a,
|
|
1089
1155
|
reservedIds: Array.from(V)
|
|
1090
|
-
}),
|
|
1156
|
+
}), l = {
|
|
1091
1157
|
...e,
|
|
1092
|
-
id:
|
|
1093
|
-
},
|
|
1094
|
-
control:
|
|
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
|
-
|
|
1165
|
+
l,
|
|
1100
1166
|
n.defaultValue
|
|
1101
1167
|
);
|
|
1102
1168
|
w({
|
|
1103
|
-
step: t === "dashboard" && (
|
|
1104
|
-
control:
|
|
1169
|
+
step: t === "dashboard" && (l.type === "field_selector" || l.type === "metric_selector") ? 4 : 3,
|
|
1170
|
+
control: l,
|
|
1105
1171
|
defaultValue: v,
|
|
1106
|
-
createdControlId:
|
|
1172
|
+
createdControlId: d,
|
|
1107
1173
|
selectedCardIds: n.selectedCardIds,
|
|
1108
1174
|
matrixTargetIds: n.matrixTargetIds,
|
|
1109
|
-
cardBindingsById:
|
|
1175
|
+
cardBindingsById: b
|
|
1110
1176
|
});
|
|
1111
|
-
}, xe =
|
|
1177
|
+
}, xe = U(() => {
|
|
1112
1178
|
w(null);
|
|
1113
|
-
}, []), Oe =
|
|
1179
|
+
}, []), Oe = U(() => {
|
|
1114
1180
|
if (!(n != null && n.createdControlId)) {
|
|
1115
1181
|
w(null);
|
|
1116
1182
|
return;
|
|
1117
1183
|
}
|
|
1118
|
-
const e = n.control,
|
|
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
|
|
1124
|
-
|
|
1189
|
+
const b = { ...s };
|
|
1190
|
+
l === void 0 ? delete b[d] : b[d] = l, F(
|
|
1125
1191
|
[
|
|
1126
|
-
...
|
|
1192
|
+
...a,
|
|
1127
1193
|
{
|
|
1128
1194
|
...e,
|
|
1129
|
-
defaultValue:
|
|
1195
|
+
defaultValue: l
|
|
1130
1196
|
}
|
|
1131
1197
|
],
|
|
1132
|
-
|
|
1198
|
+
b,
|
|
1133
1199
|
{
|
|
1134
1200
|
type: "add",
|
|
1135
1201
|
cardBindingsById: n.cardBindingsById
|
|
1136
1202
|
}
|
|
1137
1203
|
);
|
|
1138
1204
|
} else
|
|
1139
|
-
|
|
1205
|
+
F(
|
|
1140
1206
|
[
|
|
1141
|
-
...
|
|
1207
|
+
...a,
|
|
1142
1208
|
{
|
|
1143
1209
|
...e,
|
|
1144
|
-
defaultValue:
|
|
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
|
-
|
|
1154
|
-
}, [
|
|
1155
|
-
controls:
|
|
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 ? [...
|
|
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__ */
|
|
1168
|
-
n ? /* @__PURE__ */
|
|
1169
|
-
/* @__PURE__ */
|
|
1170
|
-
|
|
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
|
-
]),
|
|
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
|
-
]),
|
|
1188
|
-
(k) => !e.has(k.value) && !
|
|
1189
|
-
),
|
|
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__ */
|
|
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
|
-
|
|
1263
|
+
ka({
|
|
1198
1264
|
scope: t,
|
|
1199
|
-
existingControls:
|
|
1265
|
+
existingControls: a,
|
|
1200
1266
|
reservedIds: Array.from(V),
|
|
1201
1267
|
type: k.value
|
|
1202
1268
|
})
|
|
1203
1269
|
),
|
|
1204
1270
|
children: [
|
|
1205
|
-
/* @__PURE__ */
|
|
1206
|
-
/* @__PURE__ */
|
|
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__ */
|
|
1212
|
-
t === "card" && (C == null ? void 0 : C.sql) == null ? /* @__PURE__ */
|
|
1213
|
-
|
|
1214
|
-
/* @__PURE__ */
|
|
1215
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
1218
|
-
/* @__PURE__ */
|
|
1219
|
-
/* @__PURE__ */
|
|
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__ */
|
|
1287
|
+
/* @__PURE__ */ r(
|
|
1222
1288
|
he,
|
|
1223
1289
|
{
|
|
1224
|
-
secondary: /* @__PURE__ */
|
|
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__ */
|
|
1239
|
-
/* @__PURE__ */
|
|
1240
|
-
/* @__PURE__ */
|
|
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((
|
|
1245
|
-
...
|
|
1310
|
+
onChange: (e) => B((d) => ({
|
|
1311
|
+
...d,
|
|
1246
1312
|
label: e
|
|
1247
1313
|
}))
|
|
1248
1314
|
}
|
|
1249
1315
|
),
|
|
1250
|
-
/* @__PURE__ */
|
|
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__ */
|
|
1253
|
-
const
|
|
1254
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
1260
|
-
|
|
1325
|
+
/* @__PURE__ */ r(
|
|
1326
|
+
Gt,
|
|
1261
1327
|
{
|
|
1262
|
-
checked:
|
|
1263
|
-
onCheckedChange: (
|
|
1264
|
-
(
|
|
1265
|
-
...
|
|
1266
|
-
selectedCardIds:
|
|
1267
|
-
...
|
|
1328
|
+
checked: d,
|
|
1329
|
+
onCheckedChange: (l) => w(
|
|
1330
|
+
(b) => b && {
|
|
1331
|
+
...b,
|
|
1332
|
+
selectedCardIds: l === !0 ? [
|
|
1333
|
+
...b.selectedCardIds || [],
|
|
1268
1334
|
e.cardId
|
|
1269
|
-
] : (
|
|
1335
|
+
] : (b.selectedCardIds || []).filter(
|
|
1270
1336
|
(v) => v !== e.cardId
|
|
1271
1337
|
)
|
|
1272
1338
|
}
|
|
1273
1339
|
)
|
|
1274
1340
|
}
|
|
1275
1341
|
),
|
|
1276
|
-
/* @__PURE__ */
|
|
1277
|
-
/* @__PURE__ */
|
|
1278
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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,
|
|
1358
|
+
onChange: (e, d) => w((l) => l && { ...l, matrixTargetIds: { ...l.matrixTargetIds, [e]: d } })
|
|
1293
1359
|
}
|
|
1294
1360
|
),
|
|
1295
|
-
/* @__PURE__ */
|
|
1361
|
+
/* @__PURE__ */ r(
|
|
1296
1362
|
he,
|
|
1297
1363
|
{
|
|
1298
|
-
secondary: /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
1333
|
-
|
|
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((
|
|
1343
|
-
...
|
|
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__ */
|
|
1358
|
-
|
|
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((
|
|
1368
|
-
...
|
|
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__ */
|
|
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__ */
|
|
1454
|
+
explorerContent: /* @__PURE__ */ p(Z, { children: [
|
|
1389
1455
|
"Open the card and use",
|
|
1390
1456
|
" ",
|
|
1391
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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 &&
|
|
1432
|
-
!n &&
|
|
1433
|
-
const
|
|
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__ */
|
|
1503
|
+
return /* @__PURE__ */ p(
|
|
1438
1504
|
"div",
|
|
1439
1505
|
{
|
|
1440
1506
|
className: "rounded-control border border-border/60",
|
|
1441
1507
|
children: [
|
|
1442
|
-
/* @__PURE__ */
|
|
1443
|
-
/* @__PURE__ */
|
|
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: () =>
|
|
1449
|
-
(
|
|
1514
|
+
onClick: () => I(
|
|
1515
|
+
(g) => g === e.id ? null : e.id
|
|
1450
1516
|
),
|
|
1451
1517
|
children: [
|
|
1452
|
-
v ? /* @__PURE__ */
|
|
1453
|
-
/* @__PURE__ */
|
|
1454
|
-
/* @__PURE__ */
|
|
1455
|
-
/* @__PURE__ */
|
|
1456
|
-
/* @__PURE__ */
|
|
1457
|
-
/* @__PURE__ */
|
|
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__ */
|
|
1525
|
+
/* @__PURE__ */ p("div", { className: "mt-0.5 text-[12px] text-muted-foreground", children: [
|
|
1460
1526
|
rt(e),
|
|
1461
|
-
|
|
1527
|
+
l != null && l.status ? ` · ${l.status}` : ""
|
|
1462
1528
|
] })
|
|
1463
1529
|
] })
|
|
1464
1530
|
]
|
|
1465
1531
|
}
|
|
1466
1532
|
),
|
|
1467
|
-
/* @__PURE__ */
|
|
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: () =>
|
|
1540
|
+
onClick: () => ge(e.id),
|
|
1475
1541
|
"aria-label": `Remove ${e.label}`,
|
|
1476
|
-
children: /* @__PURE__ */
|
|
1542
|
+
children: /* @__PURE__ */ r(Pt, { className: "h-3.5 w-3.5" })
|
|
1477
1543
|
}
|
|
1478
1544
|
)
|
|
1479
1545
|
] }),
|
|
1480
|
-
v && /* @__PURE__ */
|
|
1481
|
-
/* @__PURE__ */
|
|
1482
|
-
/* @__PURE__ */
|
|
1483
|
-
/* @__PURE__ */
|
|
1484
|
-
/* @__PURE__ */
|
|
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: (
|
|
1556
|
+
onChange: (g) => H(e.id, (D) => ({
|
|
1491
1557
|
...D,
|
|
1492
|
-
label:
|
|
1558
|
+
label: g.target.value
|
|
1493
1559
|
}))
|
|
1494
1560
|
}
|
|
1495
1561
|
)
|
|
1496
1562
|
] }),
|
|
1497
|
-
/* @__PURE__ */
|
|
1498
|
-
/* @__PURE__ */
|
|
1499
|
-
/* @__PURE__ */
|
|
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: (
|
|
1569
|
+
onValueChange: (g) => {
|
|
1504
1570
|
const D = nt({
|
|
1505
|
-
controls:
|
|
1571
|
+
controls: a,
|
|
1506
1572
|
controlId: e.id,
|
|
1507
|
-
nextType:
|
|
1573
|
+
nextType: g,
|
|
1508
1574
|
defaultValues: s
|
|
1509
1575
|
});
|
|
1510
|
-
|
|
1576
|
+
F(D.controls, D.defaultValues);
|
|
1511
1577
|
},
|
|
1512
1578
|
children: [
|
|
1513
|
-
/* @__PURE__ */
|
|
1514
|
-
/* @__PURE__ */
|
|
1515
|
-
(
|
|
1516
|
-
|
|
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:
|
|
1519
|
-
children:
|
|
1584
|
+
value: g.value,
|
|
1585
|
+
children: g.label
|
|
1520
1586
|
},
|
|
1521
|
-
|
|
1587
|
+
g.value
|
|
1522
1588
|
)
|
|
1523
1589
|
) })
|
|
1524
1590
|
]
|
|
1525
1591
|
}
|
|
1526
1592
|
)
|
|
1527
1593
|
] }),
|
|
1528
|
-
/* @__PURE__ */
|
|
1529
|
-
/* @__PURE__ */
|
|
1530
|
-
/* @__PURE__ */
|
|
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: (
|
|
1600
|
+
onValueChange: (g) => H(e.id, (D) => ({
|
|
1535
1601
|
...D,
|
|
1536
|
-
placement:
|
|
1602
|
+
placement: g
|
|
1537
1603
|
})),
|
|
1538
1604
|
children: [
|
|
1539
|
-
/* @__PURE__ */
|
|
1540
|
-
/* @__PURE__ */
|
|
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__ */
|
|
1547
|
-
/* @__PURE__ */
|
|
1548
|
-
|
|
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((
|
|
1555
|
-
cardId:
|
|
1556
|
-
title:
|
|
1557
|
-
choiceCount: e.type === "field_selector" ?
|
|
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: (
|
|
1626
|
+
onChange: (g) => {
|
|
1561
1627
|
const D = _({
|
|
1562
1628
|
control: e,
|
|
1563
|
-
nextSelectedCardIds:
|
|
1564
|
-
}), A =
|
|
1629
|
+
nextSelectedCardIds: g
|
|
1630
|
+
}), A = a.map(
|
|
1565
1631
|
(E) => E.id === e.id ? D.nextControl : E
|
|
1566
1632
|
);
|
|
1567
|
-
|
|
1633
|
+
F(A, s, {
|
|
1568
1634
|
type: "update",
|
|
1569
1635
|
cardBindingsById: D.cardBindingsById
|
|
1570
1636
|
});
|
|
1571
1637
|
}
|
|
1572
1638
|
}
|
|
1573
1639
|
),
|
|
1574
|
-
/* @__PURE__ */
|
|
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: (
|
|
1646
|
+
onChange: (g, D) => {
|
|
1581
1647
|
const A = _({
|
|
1582
1648
|
control: e,
|
|
1583
1649
|
nextSelectedCardIds: (f == null ? void 0 : f[e.id]) || [],
|
|
1584
|
-
matrixTargetIds: { [
|
|
1650
|
+
matrixTargetIds: { [g]: D }
|
|
1585
1651
|
});
|
|
1586
|
-
|
|
1587
|
-
|
|
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__ */
|
|
1661
|
+
/* @__PURE__ */ r(
|
|
1596
1662
|
dt,
|
|
1597
1663
|
{
|
|
1598
1664
|
control: e,
|
|
1599
|
-
availableFieldChoices:
|
|
1600
|
-
availableMetricChoices:
|
|
1601
|
-
previewControlDefinitions:
|
|
1665
|
+
availableFieldChoices: d.fields,
|
|
1666
|
+
availableMetricChoices: d.metrics,
|
|
1667
|
+
previewControlDefinitions: a,
|
|
1602
1668
|
previewControlValues: ve,
|
|
1603
1669
|
controlLifecycle: "edit",
|
|
1604
|
-
onChange: (
|
|
1670
|
+
onChange: (g) => H(e.id, () => g)
|
|
1605
1671
|
}
|
|
1606
1672
|
),
|
|
1607
|
-
e.initialValueStrategy === "saved_default" && /* @__PURE__ */
|
|
1673
|
+
e.initialValueStrategy === "saved_default" && /* @__PURE__ */ r(
|
|
1608
1674
|
ct,
|
|
1609
1675
|
{
|
|
1610
1676
|
control: e,
|
|
1611
|
-
value:
|
|
1677
|
+
value: b,
|
|
1612
1678
|
allowNoDefault: !0,
|
|
1613
1679
|
allowCardDefault: !0,
|
|
1614
|
-
previewControlDefinitions:
|
|
1680
|
+
previewControlDefinitions: a,
|
|
1615
1681
|
previewControlValues: ve,
|
|
1616
|
-
onChange: (
|
|
1617
|
-
const D =
|
|
1618
|
-
(A) => A.id === e.id ? { ...A, defaultValue:
|
|
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] =
|
|
1686
|
+
if (e.source.kind === "manual" && (W.current[e.id] = g), s) {
|
|
1621
1687
|
const A = { ...s };
|
|
1622
|
-
|
|
1688
|
+
g === void 0 ? delete A[e.id] : A[e.id] = g, F(D, A);
|
|
1623
1689
|
return;
|
|
1624
1690
|
}
|
|
1625
|
-
|
|
1691
|
+
F(D, void 0);
|
|
1626
1692
|
}
|
|
1627
1693
|
}
|
|
1628
1694
|
),
|
|
1629
|
-
/* @__PURE__ */
|
|
1630
|
-
|
|
1695
|
+
/* @__PURE__ */ p(
|
|
1696
|
+
Jt,
|
|
1631
1697
|
{
|
|
1632
|
-
open:
|
|
1633
|
-
onOpenChange: (
|
|
1698
|
+
open: R === e.id,
|
|
1699
|
+
onOpenChange: (g) => $(g ? e.id : null),
|
|
1634
1700
|
children: [
|
|
1635
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
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__ */
|
|
1649
|
-
/* @__PURE__ */
|
|
1650
|
-
/* @__PURE__ */
|
|
1651
|
-
/* @__PURE__ */
|
|
1652
|
-
/* @__PURE__ */
|
|
1653
|
-
|
|
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: (
|
|
1722
|
+
onCommit: (g) => L(e.id, g)
|
|
1657
1723
|
},
|
|
1658
1724
|
e.id
|
|
1659
1725
|
)
|
|
1660
1726
|
] }),
|
|
1661
|
-
/* @__PURE__ */
|
|
1662
|
-
/* @__PURE__ */
|
|
1663
|
-
/* @__PURE__ */
|
|
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: (
|
|
1733
|
+
onValueChange: (g) => H(e.id, (D) => ({
|
|
1668
1734
|
...D,
|
|
1669
|
-
initialValueStrategy:
|
|
1735
|
+
initialValueStrategy: g
|
|
1670
1736
|
})),
|
|
1671
1737
|
children: [
|
|
1672
|
-
/* @__PURE__ */
|
|
1673
|
-
/* @__PURE__ */
|
|
1674
|
-
|
|
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:
|
|
1677
|
-
children:
|
|
1742
|
+
value: g.value,
|
|
1743
|
+
children: g.label
|
|
1678
1744
|
},
|
|
1679
|
-
|
|
1745
|
+
g.value
|
|
1680
1746
|
)) })
|
|
1681
1747
|
]
|
|
1682
1748
|
}
|
|
1683
1749
|
)
|
|
1684
1750
|
] })
|
|
1685
1751
|
] }),
|
|
1686
|
-
/* @__PURE__ */
|
|
1687
|
-
|
|
1752
|
+
/* @__PURE__ */ r(
|
|
1753
|
+
aa,
|
|
1688
1754
|
{
|
|
1689
1755
|
control: e,
|
|
1690
|
-
onChange: (
|
|
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__ */
|
|
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__ */
|
|
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
|
|
1784
|
+
function ja(t) {
|
|
1719
1785
|
const {
|
|
1720
|
-
open:
|
|
1721
|
-
onOpenChange:
|
|
1786
|
+
open: a,
|
|
1787
|
+
onOpenChange: o,
|
|
1722
1788
|
initialCreateFlowActive: s = !1,
|
|
1723
|
-
dismissMode:
|
|
1724
|
-
} = t, c =
|
|
1789
|
+
dismissMode: i = "passive"
|
|
1790
|
+
} = t, c = a !== void 0, [m, h] = K(!1), [u, x] = K(
|
|
1725
1791
|
s
|
|
1726
|
-
), y = c ?
|
|
1792
|
+
), y = c ? a : m, f = U(
|
|
1727
1793
|
(S) => {
|
|
1728
|
-
!S && u &&
|
|
1794
|
+
!S && u && i === "passive" || (c || h(S), S || x(!1), o == null || o(S));
|
|
1729
1795
|
},
|
|
1730
|
-
[c, u,
|
|
1731
|
-
), C =
|
|
1732
|
-
c ||
|
|
1733
|
-
}, [c,
|
|
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 =
|
|
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
|
|
1754
|
-
for (const
|
|
1755
|
-
if (
|
|
1756
|
-
return
|
|
1757
|
-
|
|
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
|
|
1825
|
+
function Qa({
|
|
1761
1826
|
className: t,
|
|
1762
|
-
variant:
|
|
1827
|
+
variant: a = "outline"
|
|
1763
1828
|
}) {
|
|
1764
|
-
const
|
|
1765
|
-
function
|
|
1829
|
+
const o = z((c) => c.onSave), { getUpdatedFrame: s } = Le();
|
|
1830
|
+
function i() {
|
|
1766
1831
|
const c = s();
|
|
1767
|
-
qe(c) && (
|
|
1832
|
+
qe(c) && (o == null || o(c));
|
|
1768
1833
|
}
|
|
1769
|
-
return /* @__PURE__ */
|
|
1834
|
+
return /* @__PURE__ */ p(
|
|
1770
1835
|
q,
|
|
1771
1836
|
{
|
|
1772
|
-
onClick:
|
|
1837
|
+
onClick: i,
|
|
1773
1838
|
className: t,
|
|
1774
1839
|
size: "xs",
|
|
1775
|
-
variant:
|
|
1840
|
+
variant: a,
|
|
1776
1841
|
children: [
|
|
1777
|
-
/* @__PURE__ */
|
|
1842
|
+
/* @__PURE__ */ r(qt, { className: "h-3.5 w-3.5" }),
|
|
1778
1843
|
"Accept"
|
|
1779
1844
|
]
|
|
1780
1845
|
}
|
|
1781
1846
|
);
|
|
1782
1847
|
}
|
|
1783
|
-
function
|
|
1848
|
+
function Ra({
|
|
1784
1849
|
className: t,
|
|
1785
|
-
variant:
|
|
1850
|
+
variant: a = "default"
|
|
1786
1851
|
}) {
|
|
1787
|
-
const
|
|
1788
|
-
return /* @__PURE__ */
|
|
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 =
|
|
1857
|
+
const f = m();
|
|
1793
1858
|
if (!qe(f))
|
|
1794
1859
|
return;
|
|
1795
|
-
const C = (u == null ? void 0 : u.visualId) || (
|
|
1860
|
+
const C = (u == null ? void 0 : u.visualId) || (h == null ? void 0 : h.id);
|
|
1796
1861
|
if (!C) {
|
|
1797
|
-
|
|
1862
|
+
j.error("No visual to save");
|
|
1798
1863
|
return;
|
|
1799
1864
|
}
|
|
1800
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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:
|
|
1823
|
-
children: s ? /* @__PURE__ */
|
|
1824
|
-
/* @__PURE__ */
|
|
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__ */
|
|
1827
|
-
/* @__PURE__ */
|
|
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
|
|
1898
|
+
function Ba({
|
|
1834
1899
|
className: t
|
|
1835
1900
|
}) {
|
|
1836
|
-
const
|
|
1837
|
-
return /* @__PURE__ */
|
|
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 (!
|
|
1842
|
-
|
|
1906
|
+
if (!m) {
|
|
1907
|
+
j.error("No sheet selected");
|
|
1843
1908
|
return;
|
|
1844
1909
|
}
|
|
1845
|
-
const S = (c == null ? void 0 : c.visualId) || (
|
|
1910
|
+
const S = (c == null ? void 0 : c.visualId) || (i == null ? void 0 : i.id);
|
|
1846
1911
|
if (!S) {
|
|
1847
|
-
|
|
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
|
-
},
|
|
1862
|
-
previousFrame:
|
|
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(
|
|
1934
|
+
}), u(m, V, {
|
|
1870
1935
|
semanticExecutionPayload: G
|
|
1871
|
-
}),
|
|
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),
|
|
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:
|
|
1886
|
-
children:
|
|
1887
|
-
/* @__PURE__ */
|
|
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__ */
|
|
1890
|
-
/* @__PURE__ */
|
|
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
|
|
1897
|
-
const { setTempQueryData:
|
|
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 (
|
|
1900
|
-
const { queryKey: f, queryData: C } =
|
|
1964
|
+
if (i) {
|
|
1965
|
+
const { queryKey: f, queryData: C } = i;
|
|
1901
1966
|
f && C && s.setQueryData(f, C);
|
|
1902
1967
|
}
|
|
1903
|
-
|
|
1968
|
+
o({}), c == null || c();
|
|
1904
1969
|
}
|
|
1905
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
1978
|
+
/* @__PURE__ */ r(et, { className: "h-3.5 w-3.5" }),
|
|
1914
1979
|
"Close"
|
|
1915
1980
|
]
|
|
1916
1981
|
}
|
|
1917
1982
|
);
|
|
1918
1983
|
}
|
|
1919
|
-
function
|
|
1984
|
+
function Wa({
|
|
1920
1985
|
label: t = "Clear",
|
|
1921
|
-
variant:
|
|
1922
|
-
className:
|
|
1986
|
+
variant: a = "secondary",
|
|
1987
|
+
className: o
|
|
1923
1988
|
} = {}) {
|
|
1924
|
-
const s =
|
|
1925
|
-
return /* @__PURE__ */
|
|
1989
|
+
const s = xa();
|
|
1990
|
+
return /* @__PURE__ */ p(
|
|
1926
1991
|
q,
|
|
1927
1992
|
{
|
|
1928
1993
|
onClick: s,
|
|
1929
|
-
className:
|
|
1994
|
+
className: o,
|
|
1930
1995
|
size: "xs",
|
|
1931
|
-
variant:
|
|
1996
|
+
variant: a,
|
|
1932
1997
|
children: [
|
|
1933
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
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
|
};
|