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,34 +1,34 @@
|
|
|
1
|
-
import { jsx as t, jsxs as r, Fragment as
|
|
2
|
-
import Nt, { useState as
|
|
3
|
-
import { B as
|
|
4
|
-
import {
|
|
1
|
+
import { jsx as t, jsxs as r, Fragment as $ } from "react/jsx-runtime";
|
|
2
|
+
import Nt, { useState as A, useEffect as Q, useMemo as Y, useCallback as W, useLayoutEffect as xt, useRef as ce, useContext as Gt } from "react";
|
|
3
|
+
import { B as T, O as Ne, Z as et, L as re, M as St, d as Dt, a4 as z, c as K, K as Kt, u as L, D as me, z as be, ay as tt, E as kt, P as Pe, a as Me, b as Oe, aI as qt, aJ as Qt, S as Et, aK as Xt, aL as Yt, aM as Zt, aN as Jt, aG as er } from "./switch-CWPcwAZ4.js";
|
|
4
|
+
import { cf as rt, aG as Se, aH as De, aJ as ke, bb as At, bR as tr, cg as rr, ch as ar, aY as ge, c3 as It, bm as _e, r as nr, n as sr, ci as or, aO as at, aR as nt, aS as st, aT as ot, aU as it, aV as lt, aW as dt, aX as Ft, bk as ct, cj as ir, ck as lr, cl as Xe, c4 as je, c5 as We, cm as Lt, c6 as He, bP as G, b0 as dr, cd as ze, cn as cr, bO as ur, aI as ut, aK as ht, co as hr, aF as mr, ba as pr, bx as Bt, cp as fr, bS as gr, u as br, aL as xr, b2 as vr, az as Ge, N as he, aw as mt, as as Tt, at as $e, O as Ut, ar as yr, ay as Cr, R as Rt, cq as wr, cr as Nr, au as vt, Q as Sr, cs as Dr, ct as kr, cu as Er, cv as Ar, cw as Ir, cx as Fr, cy as Vt, cz as Lr, b3 as Br, cA as Tr, c7 as Pt, cB as Ur, cC as Rr, cD as Ue, cE as Vr, cF as Pr, cG as Mr, an as Or, ap as _r, a3 as zr, a2 as $r, a1 as jr, a0 as Wr, Z as Hr, X as Gr, cH as Kr, cI as qr, cJ as Qr, cK as Xr, cL as Yr, al as Zr, cM as Jr, cN as ea, a9 as ta, cO as ra, cP as aa, cQ as na } from "./index-D7GVxl4a.js";
|
|
5
5
|
import { L as pt } from "./layout-grid-CiubineE.js";
|
|
6
|
-
import { c as
|
|
7
|
-
import { u as ft, V as
|
|
8
|
-
import { v as yt, s as
|
|
6
|
+
import { c as Ke, X as qe, C as Mt } from "./x-CXDkqdur.js";
|
|
7
|
+
import { u as ft, V as sa, E as Ye, a as Ze, b as oa, c as ia, L as la, d as da, e as Ot, C as _t, F as ca, f as ua } from "./editor-action-buttons-s-ByVR9x.js";
|
|
8
|
+
import { v as yt, s as ha } from "./card-config-utils-CAyjC5Tp.js";
|
|
9
9
|
import "./validators-CsdOtZI6.js";
|
|
10
10
|
import "./matrix-operation-contract-D32U2CSw.js";
|
|
11
11
|
import "../value-format-preferences/index.js";
|
|
12
|
-
import { S as
|
|
13
|
-
import { s as
|
|
14
|
-
import { M as
|
|
15
|
-
import { k as
|
|
16
|
-
import "./appearance-runtime-provider-
|
|
17
|
-
import "./appearance-context-
|
|
12
|
+
import { S as ma } from "./selection-reducer-CvCBQbl2.js";
|
|
13
|
+
import { s as Re } from "./normalize-dashboard-for-dirty-check-Bk3VYv_q.js";
|
|
14
|
+
import { M as pa } from "./mouse-pointer-2-BZvGk45-.js";
|
|
15
|
+
import { k as fa } from "./matrix-formatter-WBgtebUT.js";
|
|
16
|
+
import "./appearance-runtime-provider-B-M8gwlZ.js";
|
|
17
|
+
import "./appearance-context-DEYtWinQ.js";
|
|
18
18
|
import "./index-CLIro-EG.js";
|
|
19
19
|
import "./field-aggregations-BQjogiI1.js";
|
|
20
20
|
import "zod";
|
|
21
21
|
import "./matrix-continuation-C4sRcjZU.js";
|
|
22
22
|
import "./color-CJvdlFM_.js";
|
|
23
23
|
import "react-dom";
|
|
24
|
-
import { g as se, d as
|
|
24
|
+
import { g as se, d as ga, a as ba } from "./index-D9HDUSye.js";
|
|
25
25
|
/**
|
|
26
26
|
* @license lucide-react v0.453.0 - ISC
|
|
27
27
|
*
|
|
28
28
|
* This source code is licensed under the ISC license.
|
|
29
29
|
* See the LICENSE file in the root directory of this source tree.
|
|
30
30
|
*/
|
|
31
|
-
const
|
|
31
|
+
const xa = Ke("ArrowUpRight", [
|
|
32
32
|
["path", { d: "M7 7h10v10", key: "1tivn9" }],
|
|
33
33
|
["path", { d: "M7 17 17 7", key: "1vkiza" }]
|
|
34
34
|
]);
|
|
@@ -38,7 +38,7 @@ const va = qe("ArrowUpRight", [
|
|
|
38
38
|
* This source code is licensed under the ISC license.
|
|
39
39
|
* See the LICENSE file in the root directory of this source tree.
|
|
40
40
|
*/
|
|
41
|
-
const
|
|
41
|
+
const va = Ke("CalendarRange", [
|
|
42
42
|
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
43
43
|
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
44
44
|
["path", { d: "M3 10h18", key: "8toen8" }],
|
|
@@ -54,7 +54,7 @@ const ya = qe("CalendarRange", [
|
|
|
54
54
|
* This source code is licensed under the ISC license.
|
|
55
55
|
* See the LICENSE file in the root directory of this source tree.
|
|
56
56
|
*/
|
|
57
|
-
const
|
|
57
|
+
const ya = Ke("FileDown", [
|
|
58
58
|
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
|
|
59
59
|
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
|
|
60
60
|
["path", { d: "M12 18v-6", key: "17g6i2" }],
|
|
@@ -66,7 +66,7 @@ const Ca = qe("FileDown", [
|
|
|
66
66
|
* This source code is licensed under the ISC license.
|
|
67
67
|
* See the LICENSE file in the root directory of this source tree.
|
|
68
68
|
*/
|
|
69
|
-
const
|
|
69
|
+
const Ca = Ke("Newspaper", [
|
|
70
70
|
[
|
|
71
71
|
"path",
|
|
72
72
|
{
|
|
@@ -78,7 +78,7 @@ const wa = qe("Newspaper", [
|
|
|
78
78
|
["path", { d: "M15 18h-5", key: "95g1m2" }],
|
|
79
79
|
["path", { d: "M10 6h8v4h-8V6Z", key: "smlsk5" }]
|
|
80
80
|
]);
|
|
81
|
-
function
|
|
81
|
+
function wa() {
|
|
82
82
|
return /* @__PURE__ */ t("div", { className: "space-y-1.5 py-1", children: [...Array(5)].map((e, a) => /* @__PURE__ */ r(
|
|
83
83
|
"div",
|
|
84
84
|
{
|
|
@@ -94,23 +94,23 @@ function Na() {
|
|
|
94
94
|
a
|
|
95
95
|
)) });
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function Na({
|
|
98
98
|
open: e,
|
|
99
99
|
onOpenChange: a,
|
|
100
100
|
onSubmit: o,
|
|
101
101
|
isCreating: n
|
|
102
102
|
}) {
|
|
103
|
-
const i = rt("interactive"), [s, c] =
|
|
104
|
-
|
|
103
|
+
const i = rt("interactive"), [s, c] = A(""), [m, l] = A("");
|
|
104
|
+
Q(() => {
|
|
105
105
|
e || (c(""), l(""));
|
|
106
106
|
}, [e]);
|
|
107
107
|
const u = () => {
|
|
108
|
-
s.trim() && o({ title: s, description:
|
|
109
|
-
}, d = (
|
|
110
|
-
a(
|
|
108
|
+
s.trim() && o({ title: s, description: m });
|
|
109
|
+
}, d = (p) => {
|
|
110
|
+
a(p);
|
|
111
111
|
};
|
|
112
|
-
return /* @__PURE__ */ t(
|
|
113
|
-
|
|
112
|
+
return /* @__PURE__ */ t(Se, { open: e, onOpenChange: d, children: /* @__PURE__ */ r(
|
|
113
|
+
De,
|
|
114
114
|
{
|
|
115
115
|
showCloseButton: !1,
|
|
116
116
|
className: "flex max-w-lg grid-cols-none flex-col gap-0 overflow-hidden rounded-card border-border/60 p-0 shadow-lg sm:rounded-card",
|
|
@@ -120,12 +120,12 @@ function Sa({
|
|
|
120
120
|
/* @__PURE__ */ r("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
121
121
|
/* @__PURE__ */ t(pt, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
|
|
122
122
|
/* @__PURE__ */ r("div", { className: "flex min-w-0 items-baseline gap-2", children: [
|
|
123
|
-
/* @__PURE__ */ t(
|
|
123
|
+
/* @__PURE__ */ t(ke, { className: "truncate text-[13px] font-medium leading-none tracking-normal", children: "New library visual" }),
|
|
124
124
|
/* @__PURE__ */ t("span", { className: "shrink-0 text-[10px] font-medium uppercase leading-none tracking-[0.08em] text-muted-foreground", children: "Visual" })
|
|
125
125
|
] })
|
|
126
126
|
] }),
|
|
127
127
|
/* @__PURE__ */ t(
|
|
128
|
-
|
|
128
|
+
T,
|
|
129
129
|
{
|
|
130
130
|
size: "xs",
|
|
131
131
|
variant: "ghost",
|
|
@@ -133,14 +133,14 @@ function Sa({
|
|
|
133
133
|
onClick: () => d(!1),
|
|
134
134
|
"aria-label": "Close",
|
|
135
135
|
disabled: n,
|
|
136
|
-
children: /* @__PURE__ */ t(
|
|
136
|
+
children: /* @__PURE__ */ t(qe, { className: "h-3.5 w-3.5" })
|
|
137
137
|
}
|
|
138
138
|
)
|
|
139
139
|
] }),
|
|
140
140
|
/* @__PURE__ */ r("div", { className: "space-y-3 px-4 py-3", children: [
|
|
141
141
|
/* @__PURE__ */ t("p", { className: "text-[12px] text-muted-foreground", children: "Create a saved visual that can be reused across dashboards." }),
|
|
142
142
|
/* @__PURE__ */ r("div", { className: "space-y-1.5", children: [
|
|
143
|
-
/* @__PURE__ */ t(
|
|
143
|
+
/* @__PURE__ */ t(Ne, { htmlFor: "visual-title", className: "text-[12px]", children: "Name" }),
|
|
144
144
|
/* @__PURE__ */ t(
|
|
145
145
|
et,
|
|
146
146
|
{
|
|
@@ -148,24 +148,24 @@ function Sa({
|
|
|
148
148
|
size: "sm",
|
|
149
149
|
placeholder: "Untitled visual",
|
|
150
150
|
value: s,
|
|
151
|
-
onChange: (
|
|
151
|
+
onChange: (p) => c(p.target.value),
|
|
152
152
|
disabled: n,
|
|
153
|
-
onKeyDown: (
|
|
154
|
-
|
|
153
|
+
onKeyDown: (p) => {
|
|
154
|
+
p.key === "Enter" && !p.shiftKey && (p.preventDefault(), u());
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
)
|
|
158
158
|
] }),
|
|
159
159
|
/* @__PURE__ */ r("div", { className: "space-y-1.5", children: [
|
|
160
|
-
/* @__PURE__ */ t(
|
|
160
|
+
/* @__PURE__ */ t(Ne, { htmlFor: "visual-description", className: "text-[12px]", children: "Description" }),
|
|
161
161
|
/* @__PURE__ */ t(
|
|
162
162
|
et,
|
|
163
163
|
{
|
|
164
164
|
id: "visual-description",
|
|
165
165
|
size: "sm",
|
|
166
166
|
placeholder: "Optional",
|
|
167
|
-
value:
|
|
168
|
-
onChange: (
|
|
167
|
+
value: m,
|
|
168
|
+
onChange: (p) => l(p.target.value),
|
|
169
169
|
disabled: n
|
|
170
170
|
}
|
|
171
171
|
)
|
|
@@ -173,7 +173,7 @@ function Sa({
|
|
|
173
173
|
] }),
|
|
174
174
|
/* @__PURE__ */ r("div", { className: "flex shrink-0 justify-end gap-2 border-t border-border/60 px-4 py-2.5", children: [
|
|
175
175
|
/* @__PURE__ */ t(
|
|
176
|
-
|
|
176
|
+
T,
|
|
177
177
|
{
|
|
178
178
|
size: "xs",
|
|
179
179
|
variant: "outline",
|
|
@@ -183,13 +183,13 @@ function Sa({
|
|
|
183
183
|
}
|
|
184
184
|
),
|
|
185
185
|
/* @__PURE__ */ t(
|
|
186
|
-
|
|
186
|
+
T,
|
|
187
187
|
{
|
|
188
188
|
size: "xs",
|
|
189
189
|
onClick: u,
|
|
190
190
|
disabled: !s.trim() || n,
|
|
191
|
-
children: n ? /* @__PURE__ */ r(
|
|
192
|
-
/* @__PURE__ */ t(
|
|
191
|
+
children: n ? /* @__PURE__ */ r($, { children: [
|
|
192
|
+
/* @__PURE__ */ t(re, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
193
193
|
"Creating..."
|
|
194
194
|
] }) : "Create library visual"
|
|
195
195
|
}
|
|
@@ -199,30 +199,30 @@ function Sa({
|
|
|
199
199
|
}
|
|
200
200
|
) });
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function zt(e) {
|
|
203
203
|
return e ? new Date(e).toLocaleDateString("en-US", {
|
|
204
204
|
month: "short",
|
|
205
205
|
day: "numeric",
|
|
206
206
|
year: "numeric"
|
|
207
207
|
}) : "Unknown";
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function $t(e, a) {
|
|
210
210
|
var n;
|
|
211
211
|
const o = (n = e.ownership.createdBy) == null ? void 0 : n.type;
|
|
212
212
|
return o === "tenant" || o === "organization" && a;
|
|
213
213
|
}
|
|
214
214
|
function gt(e, a) {
|
|
215
215
|
var o, n;
|
|
216
|
-
return
|
|
216
|
+
return $t(e, a) ? ((o = e.ownership.createdBy) == null ? void 0 : o.name) || ((n = e.createdByTenantUserRel) == null ? void 0 : n.name) || e.lastModifiedBy || "Unknown" : "Organization";
|
|
217
217
|
}
|
|
218
|
-
function
|
|
218
|
+
function Sa(e, a) {
|
|
219
219
|
return gt(e, a).split(/\s+/).filter(Boolean).slice(0, 2).map((n) => n.charAt(0).toUpperCase()).join("") || "?";
|
|
220
220
|
}
|
|
221
|
-
function
|
|
221
|
+
function Da(e) {
|
|
222
222
|
const a = (e || "").toLowerCase();
|
|
223
|
-
return a.includes("table") ? St : a.includes("pie") || a.includes("donut") ?
|
|
223
|
+
return a.includes("table") ? St : a.includes("pie") || a.includes("donut") ? ir : a.includes("line") ? lr : a.includes("bar") ? Kt : pt;
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function ka({ visual: e }) {
|
|
226
226
|
const a = e.ownership.status === "public" ? "Public" : e.ownership.status === "shared" || e.ownership.sharedCount > 0 ? "Shared" : "Private";
|
|
227
227
|
return /* @__PURE__ */ t("span", { className: "inline-flex items-center rounded-[4px] border border-border/60 px-1.5 py-px text-[11px] text-muted-foreground", children: a });
|
|
228
228
|
}
|
|
@@ -230,149 +230,149 @@ function Kn({
|
|
|
230
230
|
open: e,
|
|
231
231
|
onOpenChange: a
|
|
232
232
|
}) {
|
|
233
|
-
const o = rt("interactive"), [n, i] =
|
|
233
|
+
const o = rt("interactive"), [n, i] = A(""), [s, c] = A(/* @__PURE__ */ new Set()), [m, l] = A(!1), [u, d] = A(
|
|
234
234
|
null
|
|
235
|
-
), [
|
|
235
|
+
), [p, h] = A(
|
|
236
236
|
null
|
|
237
|
-
), [f, g] =
|
|
237
|
+
), [f, g] = A(!1), [k, x] = A(null), [D, S] = A(null), C = () => {
|
|
238
238
|
c(/* @__PURE__ */ new Set()), d(null), h(null), g(!1), x(null);
|
|
239
239
|
}, w = () => {
|
|
240
240
|
a(!1), C();
|
|
241
|
-
}, { selectVisual: E } =
|
|
242
|
-
resources:
|
|
243
|
-
isLoading:
|
|
244
|
-
isError:
|
|
245
|
-
createResource:
|
|
246
|
-
updateResource:
|
|
247
|
-
deleteResourceAsync:
|
|
248
|
-
duplicateResource:
|
|
249
|
-
isCreating:
|
|
241
|
+
}, { selectVisual: E } = At(), { handleAddLibraryVisual: U, handleEditLibraryVisual: b } = ft(), { isConsoleMode: y } = tr(), {
|
|
242
|
+
resources: R,
|
|
243
|
+
isLoading: I,
|
|
244
|
+
isError: H,
|
|
245
|
+
createResource: F,
|
|
246
|
+
updateResource: P,
|
|
247
|
+
deleteResourceAsync: Z,
|
|
248
|
+
duplicateResource: ae,
|
|
249
|
+
isCreating: Ee,
|
|
250
250
|
isDeleting: oe
|
|
251
|
-
} =
|
|
251
|
+
} = rr(
|
|
252
252
|
void 0,
|
|
253
|
-
(
|
|
254
|
-
l(!1),
|
|
253
|
+
(v) => {
|
|
254
|
+
l(!1), v && (E(v), b(v), w());
|
|
255
255
|
}
|
|
256
256
|
), {
|
|
257
257
|
startUpdating: Ae,
|
|
258
258
|
stopUpdating: Ie,
|
|
259
259
|
isUpdating: ie
|
|
260
|
-
} =
|
|
261
|
-
const
|
|
262
|
-
return
|
|
260
|
+
} = ar(), j = R, J = Y(() => {
|
|
261
|
+
const v = n.trim().toLowerCase();
|
|
262
|
+
return v ? j.filter(
|
|
263
263
|
(B) => {
|
|
264
|
-
var M,
|
|
265
|
-
return ((M = B.title) == null ? void 0 : M.toLowerCase().includes(
|
|
264
|
+
var M, te, de;
|
|
265
|
+
return ((M = B.title) == null ? void 0 : M.toLowerCase().includes(v)) || ((te = B.description) == null ? void 0 : te.toLowerCase().includes(v)) || ((de = B.kind) == null ? void 0 : de.toLowerCase().includes(v));
|
|
266
266
|
}
|
|
267
|
-
) :
|
|
268
|
-
}, [n,
|
|
269
|
-
() =>
|
|
270
|
-
(
|
|
267
|
+
) : j;
|
|
268
|
+
}, [n, j]), le = Y(
|
|
269
|
+
() => j.filter(
|
|
270
|
+
(v) => s.has(v.id)
|
|
271
271
|
),
|
|
272
|
-
[s,
|
|
272
|
+
[s, j]
|
|
273
273
|
), ee = le.filter(
|
|
274
|
-
(
|
|
274
|
+
(v) => v.permissions.canDelete
|
|
275
275
|
), Fe = le.filter(
|
|
276
|
-
(
|
|
277
|
-
),
|
|
278
|
-
(
|
|
276
|
+
(v) => v.permissions.canShare
|
|
277
|
+
), xe = J.length > 0 && J.every(
|
|
278
|
+
(v) => s.has(v.id)
|
|
279
279
|
), ue = J.some(
|
|
280
|
-
(
|
|
281
|
-
), pe = (
|
|
280
|
+
(v) => s.has(v.id)
|
|
281
|
+
), pe = (v) => {
|
|
282
282
|
const B = new Set(s);
|
|
283
|
-
|
|
284
|
-
},
|
|
283
|
+
v(B), c(B);
|
|
284
|
+
}, X = (v) => {
|
|
285
285
|
pe((B) => {
|
|
286
|
-
B.has(
|
|
286
|
+
B.has(v) ? B.delete(v) : B.add(v);
|
|
287
287
|
});
|
|
288
|
-
},
|
|
289
|
-
c((
|
|
290
|
-
const B = new Set(
|
|
291
|
-
return
|
|
288
|
+
}, ve = () => {
|
|
289
|
+
c((v) => {
|
|
290
|
+
const B = new Set(v);
|
|
291
|
+
return xe ? J.forEach(
|
|
292
292
|
(M) => B.delete(M.id)
|
|
293
293
|
) : J.forEach(
|
|
294
294
|
(M) => B.add(M.id)
|
|
295
295
|
), B;
|
|
296
296
|
});
|
|
297
|
-
},
|
|
298
|
-
(await
|
|
299
|
-
},
|
|
300
|
-
const
|
|
301
|
-
if (
|
|
297
|
+
}, O = async (v) => {
|
|
298
|
+
(await U(v)).success && w();
|
|
299
|
+
}, _ = async () => {
|
|
300
|
+
const v = le;
|
|
301
|
+
if (v.length === 0) return;
|
|
302
302
|
let B = !1;
|
|
303
|
-
for (const M of
|
|
304
|
-
if (!(await
|
|
303
|
+
for (const M of v)
|
|
304
|
+
if (!(await U(M)).success) {
|
|
305
305
|
B = !0;
|
|
306
306
|
break;
|
|
307
307
|
}
|
|
308
308
|
B || w();
|
|
309
|
-
}, ne = (
|
|
310
|
-
b(
|
|
311
|
-
}, fe = (
|
|
312
|
-
S(
|
|
309
|
+
}, ne = (v) => {
|
|
310
|
+
b(v), w();
|
|
311
|
+
}, fe = (v) => {
|
|
312
|
+
S(v), ae(v, {
|
|
313
313
|
onSettled: () => S(null)
|
|
314
314
|
});
|
|
315
315
|
}, Le = () => {
|
|
316
316
|
if (ee.length === 0) {
|
|
317
|
-
|
|
317
|
+
z.error("Select a visual you can delete");
|
|
318
318
|
return;
|
|
319
319
|
}
|
|
320
320
|
x(null), g(!0);
|
|
321
321
|
}, Qe = async () => {
|
|
322
|
-
const
|
|
322
|
+
const v = k ? [k] : ee;
|
|
323
323
|
try {
|
|
324
|
-
for (const B of
|
|
325
|
-
await
|
|
324
|
+
for (const B of v)
|
|
325
|
+
await Z(B.id);
|
|
326
326
|
c((B) => {
|
|
327
327
|
const M = new Set(B);
|
|
328
|
-
return
|
|
329
|
-
(
|
|
328
|
+
return v.forEach(
|
|
329
|
+
(te) => M.delete(te.id)
|
|
330
330
|
), M;
|
|
331
331
|
}), g(!1), x(null);
|
|
332
332
|
} catch {
|
|
333
333
|
}
|
|
334
|
-
},
|
|
334
|
+
}, ye = () => {
|
|
335
335
|
if (le.length !== 1) {
|
|
336
|
-
|
|
336
|
+
z.error("Select one visual to share");
|
|
337
337
|
return;
|
|
338
338
|
}
|
|
339
|
-
const [
|
|
340
|
-
if (!
|
|
341
|
-
|
|
339
|
+
const [v] = le;
|
|
340
|
+
if (!v.permissions.canShare) {
|
|
341
|
+
z.error("You do not have permission to share this visual");
|
|
342
342
|
return;
|
|
343
343
|
}
|
|
344
|
-
d(
|
|
345
|
-
},
|
|
346
|
-
title:
|
|
344
|
+
d(v);
|
|
345
|
+
}, Ce = ({
|
|
346
|
+
title: v,
|
|
347
347
|
description: B
|
|
348
348
|
}) => {
|
|
349
|
-
if (!
|
|
349
|
+
if (!p) return;
|
|
350
350
|
const M = {};
|
|
351
|
-
if (
|
|
351
|
+
if (v !== p.title && (M.title = v), (p.description || "") !== B && (M.description = B), Object.keys(M).length === 0) {
|
|
352
352
|
h(null);
|
|
353
353
|
return;
|
|
354
354
|
}
|
|
355
|
-
const
|
|
356
|
-
Ae(
|
|
355
|
+
const te = Object.keys(M), de = te.length === 1 ? te[0] : void 0;
|
|
356
|
+
Ae(p.id, de), P(
|
|
357
357
|
{
|
|
358
|
-
resourceId:
|
|
358
|
+
resourceId: p.id,
|
|
359
359
|
data: M
|
|
360
360
|
},
|
|
361
361
|
{
|
|
362
362
|
onSuccess: () => {
|
|
363
|
-
Ie(
|
|
363
|
+
Ie(p.id, de), h(null);
|
|
364
364
|
},
|
|
365
365
|
onError: () => {
|
|
366
|
-
Ie(
|
|
366
|
+
Ie(p.id, de);
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
369
|
);
|
|
370
|
-
},
|
|
371
|
-
a(
|
|
372
|
-
},
|
|
373
|
-
return /* @__PURE__ */ r(
|
|
374
|
-
/* @__PURE__ */ t(
|
|
375
|
-
|
|
370
|
+
}, q = (v) => {
|
|
371
|
+
a(v), v || C();
|
|
372
|
+
}, we = k ? 1 : ee.length;
|
|
373
|
+
return /* @__PURE__ */ r($, { children: [
|
|
374
|
+
/* @__PURE__ */ t(Se, { open: e, onOpenChange: q, children: /* @__PURE__ */ r(
|
|
375
|
+
De,
|
|
376
376
|
{
|
|
377
377
|
showCloseButton: !1,
|
|
378
378
|
className: "flex max-h-[80vh] w-[min(72rem,calc(100vw-2rem))] max-w-none grid-cols-none flex-col gap-0 overflow-hidden rounded-card border-border/60 p-0 shadow-lg sm:rounded-card",
|
|
@@ -382,17 +382,17 @@ function Kn({
|
|
|
382
382
|
/* @__PURE__ */ r("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
383
383
|
/* @__PURE__ */ t(St, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
|
|
384
384
|
/* @__PURE__ */ r("div", { className: "flex min-w-0 items-baseline gap-2", children: [
|
|
385
|
-
/* @__PURE__ */ t(
|
|
385
|
+
/* @__PURE__ */ t(ke, { className: "truncate text-[13px] font-medium leading-none tracking-normal", children: "Visuals library" }),
|
|
386
386
|
/* @__PURE__ */ t("span", { className: "shrink-0 text-[10px] font-medium uppercase leading-none tracking-[0.08em] text-muted-foreground", children: "Add to dashboard" })
|
|
387
387
|
] })
|
|
388
388
|
] }),
|
|
389
389
|
/* @__PURE__ */ t(
|
|
390
|
-
|
|
390
|
+
T,
|
|
391
391
|
{
|
|
392
392
|
size: "xs",
|
|
393
393
|
variant: "ghost",
|
|
394
394
|
className: "w-7 px-0 text-muted-foreground hover:text-foreground",
|
|
395
|
-
onClick: () =>
|
|
395
|
+
onClick: () => q(!1),
|
|
396
396
|
"aria-label": "Close visuals library",
|
|
397
397
|
children: "×"
|
|
398
398
|
}
|
|
@@ -400,13 +400,13 @@ function Kn({
|
|
|
400
400
|
] }),
|
|
401
401
|
/* @__PURE__ */ r("div", { className: "flex shrink-0 items-center gap-2 border-b border-border/60 px-3 py-2", children: [
|
|
402
402
|
/* @__PURE__ */ r("div", { className: "relative min-w-[12rem] flex-1 md:max-w-md", children: [
|
|
403
|
-
/* @__PURE__ */ t(
|
|
403
|
+
/* @__PURE__ */ t(ma, { className: "pointer-events-none absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }),
|
|
404
404
|
/* @__PURE__ */ t(
|
|
405
405
|
"input",
|
|
406
406
|
{
|
|
407
407
|
autoFocus: !0,
|
|
408
408
|
value: n,
|
|
409
|
-
onChange: (
|
|
409
|
+
onChange: (v) => i(v.target.value),
|
|
410
410
|
placeholder: "Search visuals...",
|
|
411
411
|
className: "h-7 w-full rounded-control border border-input bg-background pl-7 pr-2 text-[12px] text-foreground placeholder:text-muted-foreground focus:border-ring focus:outline-none",
|
|
412
412
|
"aria-label": "Search visuals"
|
|
@@ -414,7 +414,7 @@ function Kn({
|
|
|
414
414
|
)
|
|
415
415
|
] }),
|
|
416
416
|
/* @__PURE__ */ r(
|
|
417
|
-
|
|
417
|
+
T,
|
|
418
418
|
{
|
|
419
419
|
size: "xs",
|
|
420
420
|
variant: "outline",
|
|
@@ -427,41 +427,41 @@ function Kn({
|
|
|
427
427
|
}
|
|
428
428
|
)
|
|
429
429
|
] }),
|
|
430
|
-
/* @__PURE__ */ t("div", { className: "min-h-0 flex-1 overflow-auto", children:
|
|
430
|
+
/* @__PURE__ */ t("div", { className: "min-h-0 flex-1 overflow-auto", children: I ? /* @__PURE__ */ t("div", { className: "p-3", children: /* @__PURE__ */ t(wa, {}) }) : H ? /* @__PURE__ */ t("div", { className: "flex flex-col items-center gap-2 px-4 py-12 text-center", children: /* @__PURE__ */ t("p", { className: "text-[13px] text-destructive", children: "Failed to load visuals" }) }) : J.length === 0 ? /* @__PURE__ */ r("div", { className: "flex flex-col items-center gap-2 px-4 py-12 text-center", children: [
|
|
431
431
|
/* @__PURE__ */ t(pt, { className: "h-5 w-5 text-muted-foreground/60" }),
|
|
432
432
|
/* @__PURE__ */ t("p", { className: "text-[13px] font-medium", children: n ? "No visuals found" : "No visuals yet" }),
|
|
433
433
|
/* @__PURE__ */ t("p", { className: "text-[12px] text-muted-foreground", children: n ? "Try a different search." : "Create a saved visual to add it here." })
|
|
434
434
|
] }) : /* @__PURE__ */ t(
|
|
435
|
-
|
|
435
|
+
Ea,
|
|
436
436
|
{
|
|
437
437
|
visuals: J,
|
|
438
438
|
selectedIds: s,
|
|
439
|
-
allFilteredSelected:
|
|
439
|
+
allFilteredSelected: xe,
|
|
440
440
|
someFilteredSelected: ue,
|
|
441
|
-
onSelectAll:
|
|
442
|
-
onToggleSelection:
|
|
443
|
-
onAddVisual:
|
|
441
|
+
onSelectAll: ve,
|
|
442
|
+
onToggleSelection: X,
|
|
443
|
+
onAddVisual: O,
|
|
444
444
|
onOpenVisual: ne,
|
|
445
445
|
onEditDetails: h,
|
|
446
446
|
onShareVisual: d,
|
|
447
|
-
onDeleteVisual: (
|
|
448
|
-
x(
|
|
447
|
+
onDeleteVisual: (v) => {
|
|
448
|
+
x(v), g(!0);
|
|
449
449
|
},
|
|
450
450
|
onDuplicateVisual: fe,
|
|
451
451
|
duplicatingId: D,
|
|
452
452
|
isDeleting: oe,
|
|
453
|
-
isConsoleMode:
|
|
453
|
+
isConsoleMode: y
|
|
454
454
|
}
|
|
455
455
|
) }),
|
|
456
456
|
/* @__PURE__ */ r("div", { className: "flex shrink-0 items-center justify-between gap-2 border-t border-border/60 px-3 py-2", children: [
|
|
457
|
-
/* @__PURE__ */ t("div", { className: "flex min-w-0 items-center gap-1.5", children: s.size > 0 && /* @__PURE__ */ r(
|
|
457
|
+
/* @__PURE__ */ t("div", { className: "flex min-w-0 items-center gap-1.5", children: s.size > 0 && /* @__PURE__ */ r($, { children: [
|
|
458
458
|
/* @__PURE__ */ r("span", { className: "text-[12px] text-muted-foreground", children: [
|
|
459
459
|
/* @__PURE__ */ t("span", { className: "font-medium tabular-nums text-foreground", children: s.size }),
|
|
460
460
|
" ",
|
|
461
461
|
"selected"
|
|
462
462
|
] }),
|
|
463
463
|
/* @__PURE__ */ t(
|
|
464
|
-
|
|
464
|
+
T,
|
|
465
465
|
{
|
|
466
466
|
size: "xs",
|
|
467
467
|
variant: "ghost",
|
|
@@ -470,20 +470,20 @@ function Kn({
|
|
|
470
470
|
}
|
|
471
471
|
),
|
|
472
472
|
/* @__PURE__ */ r(
|
|
473
|
-
|
|
473
|
+
T,
|
|
474
474
|
{
|
|
475
475
|
size: "xs",
|
|
476
476
|
variant: "outline",
|
|
477
|
-
onClick:
|
|
477
|
+
onClick: ye,
|
|
478
478
|
disabled: le.length !== 1 || Fe.length !== 1,
|
|
479
479
|
children: [
|
|
480
|
-
/* @__PURE__ */ t(
|
|
480
|
+
/* @__PURE__ */ t(It, { className: "h-3.5 w-3.5" }),
|
|
481
481
|
"Share"
|
|
482
482
|
]
|
|
483
483
|
}
|
|
484
484
|
),
|
|
485
485
|
/* @__PURE__ */ r(
|
|
486
|
-
|
|
486
|
+
T,
|
|
487
487
|
{
|
|
488
488
|
size: "xs",
|
|
489
489
|
variant: "outline",
|
|
@@ -500,19 +500,19 @@ function Kn({
|
|
|
500
500
|
] }) }),
|
|
501
501
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
502
502
|
/* @__PURE__ */ t(
|
|
503
|
-
|
|
503
|
+
T,
|
|
504
504
|
{
|
|
505
505
|
size: "xs",
|
|
506
506
|
variant: "outline",
|
|
507
|
-
onClick: () =>
|
|
507
|
+
onClick: () => q(!1),
|
|
508
508
|
children: "Close"
|
|
509
509
|
}
|
|
510
510
|
),
|
|
511
511
|
/* @__PURE__ */ r(
|
|
512
|
-
|
|
512
|
+
T,
|
|
513
513
|
{
|
|
514
514
|
size: "xs",
|
|
515
|
-
onClick:
|
|
515
|
+
onClick: _,
|
|
516
516
|
disabled: s.size === 0,
|
|
517
517
|
children: [
|
|
518
518
|
/* @__PURE__ */ t(Dt, { className: "h-3.5 w-3.5" }),
|
|
@@ -526,48 +526,48 @@ function Kn({
|
|
|
526
526
|
}
|
|
527
527
|
) }),
|
|
528
528
|
/* @__PURE__ */ t(
|
|
529
|
-
|
|
529
|
+
Na,
|
|
530
530
|
{
|
|
531
|
-
open:
|
|
531
|
+
open: m,
|
|
532
532
|
onOpenChange: l,
|
|
533
|
-
onSubmit:
|
|
534
|
-
isCreating:
|
|
533
|
+
onSubmit: F,
|
|
534
|
+
isCreating: Ee
|
|
535
535
|
}
|
|
536
536
|
),
|
|
537
537
|
u && /* @__PURE__ */ t(
|
|
538
|
-
|
|
538
|
+
nr,
|
|
539
539
|
{
|
|
540
540
|
resource: u,
|
|
541
|
-
resourceType:
|
|
541
|
+
resourceType: sr.VISUAL,
|
|
542
542
|
onClose: () => d(null)
|
|
543
543
|
}
|
|
544
544
|
),
|
|
545
|
-
|
|
546
|
-
|
|
545
|
+
p && /* @__PURE__ */ t(
|
|
546
|
+
or,
|
|
547
547
|
{
|
|
548
|
-
open: !!
|
|
548
|
+
open: !!p,
|
|
549
549
|
resourceLabel: "Visual",
|
|
550
|
-
initialTitle:
|
|
551
|
-
initialDescription:
|
|
550
|
+
initialTitle: p.title || "",
|
|
551
|
+
initialDescription: p.description || "",
|
|
552
552
|
onClose: () => h(null),
|
|
553
|
-
onSave:
|
|
554
|
-
isSaving: ie(
|
|
553
|
+
onSave: Ce,
|
|
554
|
+
isSaving: ie(p.id)
|
|
555
555
|
}
|
|
556
556
|
),
|
|
557
557
|
/* @__PURE__ */ t(
|
|
558
558
|
at,
|
|
559
559
|
{
|
|
560
560
|
open: f,
|
|
561
|
-
onOpenChange: (
|
|
562
|
-
!
|
|
561
|
+
onOpenChange: (v) => {
|
|
562
|
+
!v && oe || (g(v), v || x(null));
|
|
563
563
|
},
|
|
564
564
|
children: /* @__PURE__ */ r(nt, { children: [
|
|
565
565
|
/* @__PURE__ */ r(st, { children: [
|
|
566
566
|
/* @__PURE__ */ r(ot, { children: [
|
|
567
567
|
"Delete ",
|
|
568
|
-
|
|
568
|
+
we,
|
|
569
569
|
" visual",
|
|
570
|
-
|
|
570
|
+
we === 1 ? "" : "s",
|
|
571
571
|
"?"
|
|
572
572
|
] }),
|
|
573
573
|
/* @__PURE__ */ t(it, { children: "This cannot be undone. Visuals already added to dashboards may need to be removed from those dashboards separately." })
|
|
@@ -575,14 +575,14 @@ function Kn({
|
|
|
575
575
|
/* @__PURE__ */ r(lt, { children: [
|
|
576
576
|
/* @__PURE__ */ t(dt, { disabled: oe, children: "Cancel" }),
|
|
577
577
|
/* @__PURE__ */ r(
|
|
578
|
-
|
|
578
|
+
Ft,
|
|
579
579
|
{
|
|
580
|
-
onClick: (
|
|
581
|
-
|
|
580
|
+
onClick: (v) => {
|
|
581
|
+
v.preventDefault(), Qe();
|
|
582
582
|
},
|
|
583
|
-
disabled: oe ||
|
|
583
|
+
disabled: oe || we === 0,
|
|
584
584
|
children: [
|
|
585
|
-
oe ? /* @__PURE__ */ t(
|
|
585
|
+
oe ? /* @__PURE__ */ t(re, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ t(_e, { className: "h-3.5 w-3.5" }),
|
|
586
586
|
oe ? "Deleting..." : "Delete"
|
|
587
587
|
]
|
|
588
588
|
}
|
|
@@ -593,7 +593,7 @@ function Kn({
|
|
|
593
593
|
)
|
|
594
594
|
] });
|
|
595
595
|
}
|
|
596
|
-
function
|
|
596
|
+
function Ea({
|
|
597
597
|
visuals: e,
|
|
598
598
|
selectedIds: a,
|
|
599
599
|
allFilteredSelected: o,
|
|
@@ -601,11 +601,11 @@ function Aa({
|
|
|
601
601
|
onSelectAll: i,
|
|
602
602
|
onToggleSelection: s,
|
|
603
603
|
onAddVisual: c,
|
|
604
|
-
onOpenVisual:
|
|
604
|
+
onOpenVisual: m,
|
|
605
605
|
onEditDetails: l,
|
|
606
606
|
onShareVisual: u,
|
|
607
607
|
onDeleteVisual: d,
|
|
608
|
-
onDuplicateVisual:
|
|
608
|
+
onDuplicateVisual: p,
|
|
609
609
|
duplicatingId: h,
|
|
610
610
|
isDeleting: f,
|
|
611
611
|
isConsoleMode: g
|
|
@@ -628,17 +628,17 @@ function Aa({
|
|
|
628
628
|
/* @__PURE__ */ t("span", { className: "text-right", children: "Actions" })
|
|
629
629
|
] }),
|
|
630
630
|
e.map((k) => /* @__PURE__ */ t(
|
|
631
|
-
|
|
631
|
+
Aa,
|
|
632
632
|
{
|
|
633
633
|
visual: k,
|
|
634
634
|
selected: a.has(k.id),
|
|
635
635
|
onToggleSelection: s,
|
|
636
636
|
onAddVisual: c,
|
|
637
|
-
onOpenVisual:
|
|
637
|
+
onOpenVisual: m,
|
|
638
638
|
onEditDetails: l,
|
|
639
639
|
onShareVisual: u,
|
|
640
640
|
onDeleteVisual: d,
|
|
641
|
-
onDuplicateVisual:
|
|
641
|
+
onDuplicateVisual: p,
|
|
642
642
|
duplicatingId: h,
|
|
643
643
|
isDeleting: f,
|
|
644
644
|
isConsoleMode: g
|
|
@@ -647,7 +647,7 @@ function Aa({
|
|
|
647
647
|
))
|
|
648
648
|
] });
|
|
649
649
|
}
|
|
650
|
-
function
|
|
650
|
+
function Aa({
|
|
651
651
|
visual: e,
|
|
652
652
|
selected: a,
|
|
653
653
|
onToggleSelection: o,
|
|
@@ -655,14 +655,14 @@ function Ia({
|
|
|
655
655
|
onOpenVisual: i,
|
|
656
656
|
onEditDetails: s,
|
|
657
657
|
onShareVisual: c,
|
|
658
|
-
onDeleteVisual:
|
|
658
|
+
onDeleteVisual: m,
|
|
659
659
|
onDuplicateVisual: l,
|
|
660
660
|
duplicatingId: u,
|
|
661
661
|
isDeleting: d,
|
|
662
|
-
isConsoleMode:
|
|
662
|
+
isConsoleMode: p
|
|
663
663
|
}) {
|
|
664
664
|
var g;
|
|
665
|
-
const h =
|
|
665
|
+
const h = Da(e.kind), f = () => {
|
|
666
666
|
n(e);
|
|
667
667
|
};
|
|
668
668
|
return /* @__PURE__ */ r(
|
|
@@ -712,31 +712,31 @@ function Ia({
|
|
|
712
712
|
}
|
|
713
713
|
),
|
|
714
714
|
/* @__PURE__ */ r("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
715
|
-
/* @__PURE__ */ t("div", { className: "flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-muted text-[9px] font-medium text-muted-foreground", children:
|
|
716
|
-
/* @__PURE__ */ t("span", { className: "truncate text-muted-foreground", children: gt(e,
|
|
715
|
+
/* @__PURE__ */ t("div", { className: "flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-muted text-[9px] font-medium text-muted-foreground", children: Sa(e, p) }),
|
|
716
|
+
/* @__PURE__ */ t("span", { className: "truncate text-muted-foreground", children: gt(e, p) })
|
|
717
717
|
] }),
|
|
718
|
-
/* @__PURE__ */ t("span", { className: "text-muted-foreground", children:
|
|
719
|
-
/* @__PURE__ */ t(
|
|
718
|
+
/* @__PURE__ */ t("span", { className: "text-muted-foreground", children: zt(e.updatedAt) }),
|
|
719
|
+
/* @__PURE__ */ t(ka, { visual: e }),
|
|
720
720
|
/* @__PURE__ */ t("span", { className: "text-right tabular-nums text-muted-foreground", children: e.ownership.sharedCount > 0 ? e.ownership.sharedCount : "—" }),
|
|
721
721
|
/* @__PURE__ */ t(
|
|
722
|
-
|
|
722
|
+
Ia,
|
|
723
723
|
{
|
|
724
724
|
visual: e,
|
|
725
725
|
onOpenVisual: i,
|
|
726
726
|
onEditDetails: s,
|
|
727
727
|
onShareVisual: c,
|
|
728
|
-
onDeleteVisual:
|
|
728
|
+
onDeleteVisual: m,
|
|
729
729
|
onDuplicateVisual: l,
|
|
730
730
|
duplicatingId: u,
|
|
731
731
|
isDeleting: d,
|
|
732
|
-
isConsoleMode:
|
|
732
|
+
isConsoleMode: p
|
|
733
733
|
}
|
|
734
734
|
)
|
|
735
735
|
]
|
|
736
736
|
}
|
|
737
737
|
);
|
|
738
738
|
}
|
|
739
|
-
function
|
|
739
|
+
function Ia({
|
|
740
740
|
visual: e,
|
|
741
741
|
onOpenVisual: a,
|
|
742
742
|
onEditDetails: o,
|
|
@@ -744,7 +744,7 @@ function Fa({
|
|
|
744
744
|
onDeleteVisual: i,
|
|
745
745
|
onDuplicateVisual: s,
|
|
746
746
|
duplicatingId: c,
|
|
747
|
-
isDeleting:
|
|
747
|
+
isDeleting: m,
|
|
748
748
|
isConsoleMode: l
|
|
749
749
|
}) {
|
|
750
750
|
return /* @__PURE__ */ r(
|
|
@@ -754,25 +754,25 @@ function Fa({
|
|
|
754
754
|
onClick: (u) => u.stopPropagation(),
|
|
755
755
|
children: [
|
|
756
756
|
/* @__PURE__ */ t(
|
|
757
|
-
|
|
757
|
+
T,
|
|
758
758
|
{
|
|
759
759
|
size: "xs",
|
|
760
760
|
variant: "ghost",
|
|
761
761
|
className: "w-7 px-0",
|
|
762
762
|
onClick: () => a(e),
|
|
763
763
|
"aria-label": "Edit visual",
|
|
764
|
-
children: /* @__PURE__ */ t(
|
|
764
|
+
children: /* @__PURE__ */ t(Xe, { className: "h-3.5 w-3.5" })
|
|
765
765
|
}
|
|
766
766
|
),
|
|
767
767
|
/* @__PURE__ */ r(je, { modal: !1, children: [
|
|
768
768
|
/* @__PURE__ */ t(We, { asChild: !0, children: /* @__PURE__ */ t(
|
|
769
|
-
|
|
769
|
+
T,
|
|
770
770
|
{
|
|
771
771
|
size: "xs",
|
|
772
772
|
variant: "ghost",
|
|
773
773
|
className: "w-7 px-0",
|
|
774
774
|
"aria-label": "More actions",
|
|
775
|
-
children: /* @__PURE__ */ t(
|
|
775
|
+
children: /* @__PURE__ */ t(Lt, { className: "h-3.5 w-3.5" })
|
|
776
776
|
}
|
|
777
777
|
) }),
|
|
778
778
|
/* @__PURE__ */ r(
|
|
@@ -781,53 +781,53 @@ function Fa({
|
|
|
781
781
|
align: "end",
|
|
782
782
|
className: "z-[60] w-44 rounded-[6px] border-border/60 p-1 shadow-sm",
|
|
783
783
|
children: [
|
|
784
|
-
/* @__PURE__ */ r(
|
|
785
|
-
/* @__PURE__ */ t(
|
|
784
|
+
/* @__PURE__ */ r(G, { onClick: () => a(e), children: [
|
|
785
|
+
/* @__PURE__ */ t(Xe, { className: "h-3.5 w-3.5" }),
|
|
786
786
|
"Edit visual"
|
|
787
787
|
] }),
|
|
788
788
|
/* @__PURE__ */ r(
|
|
789
|
-
|
|
789
|
+
G,
|
|
790
790
|
{
|
|
791
791
|
onClick: () => s(e.id),
|
|
792
792
|
disabled: c === e.id,
|
|
793
793
|
children: [
|
|
794
|
-
c === e.id ? /* @__PURE__ */ t(
|
|
794
|
+
c === e.id ? /* @__PURE__ */ t(re, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ t(dr, { className: "h-3.5 w-3.5" }),
|
|
795
795
|
c === e.id ? "Duplicating..." : "Duplicate"
|
|
796
796
|
]
|
|
797
797
|
}
|
|
798
798
|
),
|
|
799
|
-
e.permissions.canEdit && /* @__PURE__ */ r(
|
|
800
|
-
/* @__PURE__ */ t(
|
|
799
|
+
e.permissions.canEdit && /* @__PURE__ */ r(G, { onClick: () => o(e), children: [
|
|
800
|
+
/* @__PURE__ */ t(Xe, { className: "h-3.5 w-3.5" }),
|
|
801
801
|
"Edit details"
|
|
802
802
|
] }),
|
|
803
|
-
e.permissions.canShare && /* @__PURE__ */ r(
|
|
804
|
-
/* @__PURE__ */ t(
|
|
803
|
+
e.permissions.canShare && /* @__PURE__ */ r(G, { onClick: () => n(e), children: [
|
|
804
|
+
/* @__PURE__ */ t(It, { className: "h-3.5 w-3.5" }),
|
|
805
805
|
"Share"
|
|
806
806
|
] }),
|
|
807
|
-
e.permissions.canDelete && /* @__PURE__ */ r(
|
|
807
|
+
e.permissions.canDelete && /* @__PURE__ */ r($, { children: [
|
|
808
808
|
/* @__PURE__ */ t(ze, {}),
|
|
809
809
|
/* @__PURE__ */ r(
|
|
810
|
-
|
|
810
|
+
G,
|
|
811
811
|
{
|
|
812
812
|
className: "text-destructive focus:bg-destructive/10 focus:text-destructive",
|
|
813
813
|
onClick: () => i(e),
|
|
814
|
-
disabled:
|
|
814
|
+
disabled: m,
|
|
815
815
|
children: [
|
|
816
816
|
/* @__PURE__ */ t(_e, { className: "h-3.5 w-3.5" }),
|
|
817
|
-
|
|
817
|
+
m ? "Deleting..." : "Delete"
|
|
818
818
|
]
|
|
819
819
|
}
|
|
820
820
|
)
|
|
821
821
|
] }),
|
|
822
822
|
/* @__PURE__ */ t(ze, {}),
|
|
823
823
|
/* @__PURE__ */ r("div", { className: "space-y-1 px-2 py-1.5 text-[11px] text-muted-foreground", children: [
|
|
824
|
-
|
|
825
|
-
/* @__PURE__ */ t(
|
|
824
|
+
$t(e, l) && /* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children: [
|
|
825
|
+
/* @__PURE__ */ t(cr, { className: "h-3 w-3" }),
|
|
826
826
|
/* @__PURE__ */ t("span", { className: "truncate", children: gt(e, l) })
|
|
827
827
|
] }),
|
|
828
828
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children: [
|
|
829
|
-
/* @__PURE__ */ t(
|
|
830
|
-
/* @__PURE__ */ t("span", { children:
|
|
829
|
+
/* @__PURE__ */ t(ur, { className: "h-3 w-3" }),
|
|
830
|
+
/* @__PURE__ */ t("span", { children: zt(e.updatedAt) })
|
|
831
831
|
] })
|
|
832
832
|
] })
|
|
833
833
|
]
|
|
@@ -838,21 +838,21 @@ function Fa({
|
|
|
838
838
|
}
|
|
839
839
|
);
|
|
840
840
|
}
|
|
841
|
-
function
|
|
841
|
+
function qn(e, a, o = !1) {
|
|
842
842
|
const n = L((u) => u.dashboard), i = L(
|
|
843
843
|
(u) => u.isDashboardEditing
|
|
844
844
|
), s = L(
|
|
845
845
|
(u) => u.onDashboardLifecycleEvent
|
|
846
|
-
), c =
|
|
846
|
+
), c = W(() => {
|
|
847
847
|
const u = L.getState().dashboard;
|
|
848
|
-
return a || !e || !u || u.id !== e.id ? !1 :
|
|
848
|
+
return a || !e || !u || u.id !== e.id ? !1 : Re(u) !== Re(e);
|
|
849
849
|
}, [e, a]);
|
|
850
850
|
xt(() => (L.setState({ checkUnsavedDashboardChanges: c }), () => {
|
|
851
851
|
L.getState().checkUnsavedDashboardChanges === c && L.setState({ checkUnsavedDashboardChanges: null });
|
|
852
852
|
}), [c]);
|
|
853
|
-
const
|
|
853
|
+
const m = Y(() => !o || a || !n || i && (!e || n.id !== e.id) ? null : {
|
|
854
854
|
dashboardId: n.id,
|
|
855
|
-
dirty: i && e ?
|
|
855
|
+
dirty: i && e ? Re(n) !== Re(e) : !1
|
|
856
856
|
}, [
|
|
857
857
|
i,
|
|
858
858
|
a,
|
|
@@ -861,23 +861,23 @@ function Qn(e, a, o = !1) {
|
|
|
861
861
|
n
|
|
862
862
|
]), l = ce(null);
|
|
863
863
|
return xt(() => {
|
|
864
|
-
if (!s || !
|
|
864
|
+
if (!s || !m) {
|
|
865
865
|
l.current = null;
|
|
866
866
|
return;
|
|
867
867
|
}
|
|
868
868
|
const u = l.current;
|
|
869
|
-
(u == null ? void 0 : u.callback) === s && u.dashboardId ===
|
|
869
|
+
(u == null ? void 0 : u.callback) === s && u.dashboardId === m.dashboardId && u.dirty === m.dirty || (l.current = {
|
|
870
870
|
callback: s,
|
|
871
|
-
dashboardId:
|
|
872
|
-
dirty:
|
|
871
|
+
dashboardId: m.dashboardId,
|
|
872
|
+
dirty: m.dirty
|
|
873
873
|
}, s({
|
|
874
874
|
type: "dashboard:dirty-state",
|
|
875
|
-
dashboardId:
|
|
876
|
-
payload: { dirty:
|
|
875
|
+
dashboardId: m.dashboardId,
|
|
876
|
+
payload: { dirty: m.dirty }
|
|
877
877
|
}));
|
|
878
|
-
}, [
|
|
878
|
+
}, [m, s]), c;
|
|
879
879
|
}
|
|
880
|
-
function
|
|
880
|
+
function Fa({
|
|
881
881
|
open: e,
|
|
882
882
|
onOpenChange: a,
|
|
883
883
|
isLibraryVisual: o,
|
|
@@ -886,15 +886,15 @@ function La({
|
|
|
886
886
|
destinationMode: s = "both",
|
|
887
887
|
onConfirm: c
|
|
888
888
|
}) {
|
|
889
|
-
const [
|
|
889
|
+
const [m, l] = A(
|
|
890
890
|
o && n ? `Copy of ${n}` : n || ""
|
|
891
|
-
), [u, d] =
|
|
891
|
+
), [u, d] = A("");
|
|
892
892
|
Nt.useEffect(() => {
|
|
893
893
|
e && (l(
|
|
894
894
|
o && n ? `Copy of ${n}` : n || ""
|
|
895
895
|
), d(""));
|
|
896
896
|
}, [e, o, n]);
|
|
897
|
-
const
|
|
897
|
+
const p = !!m.trim(), h = s === "local" ? {
|
|
898
898
|
saveToLibrary: !1,
|
|
899
899
|
saveToCurrentDashboard: !0,
|
|
900
900
|
badgeType: "local",
|
|
@@ -913,19 +913,19 @@ function La({
|
|
|
913
913
|
description: "Creates a new library visual and adds a linked copy to this dashboard.",
|
|
914
914
|
actionLabel: "Save Copy as Linked Visual"
|
|
915
915
|
}, f = () => {
|
|
916
|
-
!
|
|
917
|
-
name:
|
|
916
|
+
!p || i || c({
|
|
917
|
+
name: m.trim(),
|
|
918
918
|
description: u.trim() || void 0,
|
|
919
919
|
saveToLibrary: h.saveToLibrary,
|
|
920
920
|
saveToCurrentDashboard: h.saveToCurrentDashboard
|
|
921
921
|
});
|
|
922
922
|
};
|
|
923
|
-
return /* @__PURE__ */ t(
|
|
923
|
+
return /* @__PURE__ */ t(Se, { open: e, onOpenChange: a, children: /* @__PURE__ */ r(De, { className: "sm:max-w-[500px]", children: [
|
|
924
924
|
/* @__PURE__ */ r(ut, { children: [
|
|
925
|
-
/* @__PURE__ */ r(
|
|
925
|
+
/* @__PURE__ */ r(ke, { className: "flex items-center gap-2", children: [
|
|
926
926
|
/* @__PURE__ */ t("span", { children: "Save Visual As" }),
|
|
927
927
|
h.badgeType !== "local" && /* @__PURE__ */ t(
|
|
928
|
-
|
|
928
|
+
sa,
|
|
929
929
|
{
|
|
930
930
|
type: h.badgeType,
|
|
931
931
|
showLabel: !0,
|
|
@@ -937,12 +937,12 @@ function La({
|
|
|
937
937
|
] }),
|
|
938
938
|
/* @__PURE__ */ r("div", { className: "grid gap-4 py-4", children: [
|
|
939
939
|
/* @__PURE__ */ r("div", { className: "grid gap-2", children: [
|
|
940
|
-
/* @__PURE__ */ t(
|
|
940
|
+
/* @__PURE__ */ t(Ne, { htmlFor: "name", children: "Name" }),
|
|
941
941
|
/* @__PURE__ */ t(
|
|
942
942
|
et,
|
|
943
943
|
{
|
|
944
944
|
id: "name",
|
|
945
|
-
value:
|
|
945
|
+
value: m,
|
|
946
946
|
onChange: (g) => l(g.target.value),
|
|
947
947
|
placeholder: "Enter visual name",
|
|
948
948
|
disabled: i
|
|
@@ -950,9 +950,9 @@ function La({
|
|
|
950
950
|
)
|
|
951
951
|
] }),
|
|
952
952
|
/* @__PURE__ */ r("div", { className: "grid gap-2", children: [
|
|
953
|
-
/* @__PURE__ */ t(
|
|
953
|
+
/* @__PURE__ */ t(Ne, { htmlFor: "description", children: "Description (optional)" }),
|
|
954
954
|
/* @__PURE__ */ t(
|
|
955
|
-
|
|
955
|
+
hr,
|
|
956
956
|
{
|
|
957
957
|
id: "description",
|
|
958
958
|
value: u,
|
|
@@ -964,9 +964,9 @@ function La({
|
|
|
964
964
|
)
|
|
965
965
|
] })
|
|
966
966
|
] }),
|
|
967
|
-
/* @__PURE__ */ r(
|
|
967
|
+
/* @__PURE__ */ r(mr, { children: [
|
|
968
968
|
/* @__PURE__ */ t(
|
|
969
|
-
|
|
969
|
+
T,
|
|
970
970
|
{
|
|
971
971
|
variant: "outline",
|
|
972
972
|
onClick: () => a(!1),
|
|
@@ -974,36 +974,36 @@ function La({
|
|
|
974
974
|
children: "Cancel"
|
|
975
975
|
}
|
|
976
976
|
),
|
|
977
|
-
/* @__PURE__ */ r(
|
|
978
|
-
i && /* @__PURE__ */ t(
|
|
977
|
+
/* @__PURE__ */ r(T, { onClick: f, disabled: !p || i, children: [
|
|
978
|
+
i && /* @__PURE__ */ t(re, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
979
979
|
h.actionLabel
|
|
980
980
|
] })
|
|
981
981
|
] })
|
|
982
982
|
] }) });
|
|
983
983
|
}
|
|
984
|
-
function
|
|
985
|
-
const [e, a] =
|
|
986
|
-
var b,
|
|
987
|
-
return ((b = l == null ? void 0 : l.cards) == null ? void 0 : b.length) === 1 && ((
|
|
988
|
-
})(), E =
|
|
989
|
-
b != null && b.id && (g(b), o && i && c &&
|
|
984
|
+
function La() {
|
|
985
|
+
const [e, a] = A(!1), [o, n] = A(!1), [i, s] = A(null), [c, m] = A(null), l = me((b) => b.frame), u = me((b) => b.card), d = pr(), p = L((b) => b.selectedSheetId), h = L((b) => b.dashboard), { getUpdatedFrame: f } = ft(), { selectVisual: g } = At(), { addFrame: k, setSelectedFrameId: x, setIsVisualEditing: D } = be(), S = Bt(), C = !!(l != null && l.visualId), w = (() => {
|
|
986
|
+
var b, y;
|
|
987
|
+
return ((b = l == null ? void 0 : l.cards) == null ? void 0 : b.length) === 1 && ((y = l.cards[0]) != null && y.title) ? l.cards[0].title : d != null && d.title ? d.title : (u == null ? void 0 : u.title) || "Untitled Visual";
|
|
988
|
+
})(), E = fr((b) => {
|
|
989
|
+
b != null && b.id && (g(b), o && i && c && p && (async () => {
|
|
990
990
|
try {
|
|
991
|
-
const
|
|
991
|
+
const y = {
|
|
992
992
|
...i,
|
|
993
993
|
id: yt(),
|
|
994
994
|
visualId: b.id
|
|
995
995
|
// Link to the newly created library visual
|
|
996
996
|
};
|
|
997
|
-
k(
|
|
997
|
+
k(p, y, {
|
|
998
998
|
position: "end",
|
|
999
999
|
semanticExecutionPayload: c
|
|
1000
|
-
}), x(
|
|
1001
|
-
} catch (
|
|
1000
|
+
}), x(y.id), n(!1), s(null), m(null), D(!1);
|
|
1001
|
+
} catch (y) {
|
|
1002
1002
|
console.error(
|
|
1003
1003
|
"Failed to promote semantic metadata for saved visual:",
|
|
1004
|
-
|
|
1005
|
-
),
|
|
1006
|
-
|
|
1004
|
+
y
|
|
1005
|
+
), z.error(
|
|
1006
|
+
y instanceof Error ? y.message : "Failed to prepare semantic metadata for the saved visual"
|
|
1007
1007
|
);
|
|
1008
1008
|
}
|
|
1009
1009
|
})(), a(!1));
|
|
@@ -1012,67 +1012,62 @@ function Ba() {
|
|
|
1012
1012
|
saveAsDialogOpen: e,
|
|
1013
1013
|
setSaveAsDialogOpen: a,
|
|
1014
1014
|
handleSaveAs: async (b) => {
|
|
1015
|
-
if (!
|
|
1016
|
-
|
|
1017
|
-
return;
|
|
1018
|
-
}
|
|
1019
|
-
const v = f(), T = kt(v);
|
|
1020
|
-
if (T) {
|
|
1021
|
-
O.error(T);
|
|
1015
|
+
if (!p) {
|
|
1016
|
+
z.error("No sheet selected");
|
|
1022
1017
|
return;
|
|
1023
1018
|
}
|
|
1024
|
-
const
|
|
1025
|
-
...
|
|
1026
|
-
cards:
|
|
1027
|
-
...
|
|
1019
|
+
const y = f(), I = y.cards.length === 1 ? {
|
|
1020
|
+
...y,
|
|
1021
|
+
cards: y.cards.map((H) => ({
|
|
1022
|
+
...H,
|
|
1028
1023
|
title: b.name
|
|
1029
1024
|
// Use visual name as card title
|
|
1030
1025
|
}))
|
|
1031
|
-
} :
|
|
1026
|
+
} : y;
|
|
1032
1027
|
if (b.saveToLibrary) {
|
|
1033
|
-
let
|
|
1028
|
+
let H = null;
|
|
1034
1029
|
if (b.saveToCurrentDashboard)
|
|
1035
1030
|
try {
|
|
1036
|
-
|
|
1037
|
-
previousFrame: tt(h,
|
|
1031
|
+
H = await S(I, {
|
|
1032
|
+
previousFrame: tt(h, I.id)
|
|
1038
1033
|
});
|
|
1039
|
-
} catch (
|
|
1034
|
+
} catch (P) {
|
|
1040
1035
|
console.error(
|
|
1041
1036
|
"Failed to prepare semantic metadata before saving visual:",
|
|
1042
|
-
|
|
1043
|
-
),
|
|
1044
|
-
|
|
1037
|
+
P
|
|
1038
|
+
), z.error(
|
|
1039
|
+
P instanceof Error ? P.message : "Failed to prepare semantic metadata for the saved visual"
|
|
1045
1040
|
);
|
|
1046
1041
|
return;
|
|
1047
1042
|
}
|
|
1048
|
-
n(b.saveToCurrentDashboard), s(
|
|
1049
|
-
const
|
|
1043
|
+
n(b.saveToCurrentDashboard), s(I), m(H);
|
|
1044
|
+
const F = {
|
|
1050
1045
|
title: b.name,
|
|
1051
1046
|
description: b.description,
|
|
1052
|
-
frameObject:
|
|
1047
|
+
frameObject: I,
|
|
1053
1048
|
// Card title synced for single-card frames
|
|
1054
1049
|
isPrivate: !1
|
|
1055
1050
|
};
|
|
1056
|
-
E.mutate(
|
|
1051
|
+
E.mutate(F);
|
|
1057
1052
|
} else if (b.saveToCurrentDashboard) {
|
|
1058
|
-
const
|
|
1059
|
-
...
|
|
1053
|
+
const H = {
|
|
1054
|
+
...I,
|
|
1060
1055
|
// Card title already synced
|
|
1061
1056
|
id: yt(),
|
|
1062
1057
|
visualId: void 0
|
|
1063
1058
|
// Explicitly no visualId for local visuals
|
|
1064
1059
|
};
|
|
1065
1060
|
try {
|
|
1066
|
-
const
|
|
1067
|
-
previousFrame: tt(h,
|
|
1061
|
+
const F = await S(I, {
|
|
1062
|
+
previousFrame: tt(h, I.id)
|
|
1068
1063
|
});
|
|
1069
|
-
k(
|
|
1064
|
+
k(p, H, {
|
|
1070
1065
|
position: "end",
|
|
1071
|
-
semanticExecutionPayload:
|
|
1072
|
-
}), x(
|
|
1073
|
-
} catch (
|
|
1074
|
-
console.error("Failed to save visual to dashboard:",
|
|
1075
|
-
|
|
1066
|
+
semanticExecutionPayload: F
|
|
1067
|
+
}), x(H.id), z.success("Visual saved to dashboard"), a(!1), D(!1);
|
|
1068
|
+
} catch (F) {
|
|
1069
|
+
console.error("Failed to save visual to dashboard:", F), z.error(
|
|
1070
|
+
F instanceof Error ? F.message : "Failed to prepare semantic metadata for the visual"
|
|
1076
1071
|
);
|
|
1077
1072
|
}
|
|
1078
1073
|
}
|
|
@@ -1082,81 +1077,76 @@ function Ba() {
|
|
|
1082
1077
|
isSaving: E.isPending
|
|
1083
1078
|
};
|
|
1084
1079
|
}
|
|
1085
|
-
function
|
|
1086
|
-
const { isInspectionMode: a } =
|
|
1080
|
+
function Qn(e = {}) {
|
|
1081
|
+
const { isInspectionMode: a } = gr(), o = me((F) => F.frame), n = me((F) => F.editorContext), i = br((F) => F.selectedVisual), s = L((F) => F.selectedFrameId), c = L((F) => F.selectedSheetId), m = L((F) => F.dashboard), { setIsVisualEditing: l, updateFrame: u } = be(), [d, p] = A(!1), [h, f] = A("both"), g = Bt(), k = (n == null ? void 0 : n.type) === "documentSection", x = !!(o != null && o.visualId || i != null && i.id), D = !!(o != null && o.visualId && s), S = x && !D, {
|
|
1087
1082
|
saveAsDialogOpen: C,
|
|
1088
1083
|
setSaveAsDialogOpen: w,
|
|
1089
1084
|
handleSaveAs: E,
|
|
1090
|
-
isLibraryVisual:
|
|
1085
|
+
isLibraryVisual: U,
|
|
1091
1086
|
currentVisualName: b,
|
|
1092
|
-
isSaving:
|
|
1093
|
-
} =
|
|
1087
|
+
isSaving: y
|
|
1088
|
+
} = La(), { getUpdatedFrame: R } = ft();
|
|
1094
1089
|
if (a)
|
|
1095
|
-
return /* @__PURE__ */ r(
|
|
1090
|
+
return /* @__PURE__ */ r($, { children: [
|
|
1096
1091
|
/* @__PURE__ */ t(
|
|
1097
|
-
|
|
1092
|
+
Ye,
|
|
1098
1093
|
{
|
|
1099
1094
|
className: "rounded-control",
|
|
1100
1095
|
variant: "default"
|
|
1101
1096
|
}
|
|
1102
1097
|
),
|
|
1103
|
-
/* @__PURE__ */ t(
|
|
1098
|
+
/* @__PURE__ */ t(Ze, {})
|
|
1104
1099
|
] });
|
|
1105
1100
|
if (k)
|
|
1106
|
-
return /* @__PURE__ */ r(
|
|
1107
|
-
/* @__PURE__ */ t(
|
|
1108
|
-
/* @__PURE__ */ t(
|
|
1101
|
+
return /* @__PURE__ */ r($, { children: [
|
|
1102
|
+
/* @__PURE__ */ t(Ye, { className: "rounded-control", variant: "default" }),
|
|
1103
|
+
/* @__PURE__ */ t(Ze, {})
|
|
1109
1104
|
] });
|
|
1110
|
-
const
|
|
1105
|
+
const I = async () => {
|
|
1111
1106
|
if (!c) {
|
|
1112
|
-
|
|
1107
|
+
z.error("No sheet selected");
|
|
1113
1108
|
return;
|
|
1114
1109
|
}
|
|
1115
1110
|
if (d) return;
|
|
1116
|
-
|
|
1117
|
-
const
|
|
1118
|
-
|
|
1119
|
-
m(!1), O.error(R);
|
|
1120
|
-
return;
|
|
1121
|
-
}
|
|
1122
|
-
const $ = {
|
|
1123
|
-
...A,
|
|
1111
|
+
p(!0);
|
|
1112
|
+
const P = {
|
|
1113
|
+
...R(),
|
|
1124
1114
|
visualId: void 0
|
|
1125
|
-
},
|
|
1115
|
+
}, Z = tt(m, P.id);
|
|
1126
1116
|
try {
|
|
1127
|
-
const
|
|
1128
|
-
previousFrame:
|
|
1117
|
+
const ae = await g(P, {
|
|
1118
|
+
previousFrame: Z
|
|
1129
1119
|
});
|
|
1130
|
-
u(c,
|
|
1131
|
-
semanticExecutionPayload:
|
|
1120
|
+
u(c, P, {
|
|
1121
|
+
semanticExecutionPayload: ae
|
|
1132
1122
|
});
|
|
1133
|
-
} catch (
|
|
1134
|
-
console.error("Failed to apply local semantic metadata:",
|
|
1135
|
-
|
|
1123
|
+
} catch (ae) {
|
|
1124
|
+
console.error("Failed to apply local semantic metadata:", ae), p(!1), z.error(
|
|
1125
|
+
ae instanceof Error ? ae.message : "Failed to prepare semantic metadata for this visual"
|
|
1136
1126
|
);
|
|
1137
1127
|
return;
|
|
1138
1128
|
}
|
|
1139
1129
|
setTimeout(() => {
|
|
1140
|
-
|
|
1130
|
+
p(!1), z.success("Changes applied. Visual is now local to this dashboard"), l(!1);
|
|
1141
1131
|
}, 300);
|
|
1142
|
-
},
|
|
1143
|
-
f(
|
|
1132
|
+
}, H = (F) => {
|
|
1133
|
+
f(F), w(!0);
|
|
1144
1134
|
};
|
|
1145
|
-
return /* @__PURE__ */ r(
|
|
1135
|
+
return /* @__PURE__ */ r($, { children: [
|
|
1146
1136
|
/* @__PURE__ */ r("div", { className: "inline-flex items-center overflow-hidden rounded-control", children: [
|
|
1147
|
-
!x && /* @__PURE__ */ t(
|
|
1148
|
-
x && S && /* @__PURE__ */ t(
|
|
1149
|
-
x && D && /* @__PURE__ */ t(
|
|
1137
|
+
!x && /* @__PURE__ */ t(Ye, { className: "!rounded-none", variant: "default" }),
|
|
1138
|
+
x && S && /* @__PURE__ */ t(oa, { className: "!rounded-none", variant: "default" }),
|
|
1139
|
+
x && D && /* @__PURE__ */ t(ia, { className: "!rounded-none" }),
|
|
1150
1140
|
/* @__PURE__ */ r(je, { modal: !1, children: [
|
|
1151
1141
|
/* @__PURE__ */ t(We, { asChild: !0, children: /* @__PURE__ */ t(
|
|
1152
|
-
|
|
1142
|
+
T,
|
|
1153
1143
|
{
|
|
1154
1144
|
variant: "default",
|
|
1155
1145
|
size: "xs",
|
|
1156
1146
|
className: "w-7 !rounded-none border-l border-primary-foreground/20 px-0",
|
|
1157
1147
|
"aria-label": "Open visual save options",
|
|
1158
|
-
disabled:
|
|
1159
|
-
children: /* @__PURE__ */ t(
|
|
1148
|
+
disabled: y || d,
|
|
1149
|
+
children: /* @__PURE__ */ t(Mt, { className: "h-3.5 w-3.5" })
|
|
1160
1150
|
}
|
|
1161
1151
|
) }),
|
|
1162
1152
|
/* @__PURE__ */ r(
|
|
@@ -1165,11 +1155,11 @@ function Yn(e = {}) {
|
|
|
1165
1155
|
align: "end",
|
|
1166
1156
|
className: "min-w-[220px] rounded-control border border-border/60 p-1 shadow-sm",
|
|
1167
1157
|
children: [
|
|
1168
|
-
D && /* @__PURE__ */ r(
|
|
1158
|
+
D && /* @__PURE__ */ r($, { children: [
|
|
1169
1159
|
/* @__PURE__ */ r(
|
|
1170
|
-
|
|
1160
|
+
G,
|
|
1171
1161
|
{
|
|
1172
|
-
onClick:
|
|
1162
|
+
onClick: I,
|
|
1173
1163
|
disabled: d,
|
|
1174
1164
|
children: [
|
|
1175
1165
|
/* @__PURE__ */ t(Dt, { className: "h-3.5 w-3.5" }),
|
|
@@ -1180,10 +1170,10 @@ function Yn(e = {}) {
|
|
|
1180
1170
|
/* @__PURE__ */ t(ze, {})
|
|
1181
1171
|
] }),
|
|
1182
1172
|
/* @__PURE__ */ r(
|
|
1183
|
-
|
|
1173
|
+
G,
|
|
1184
1174
|
{
|
|
1185
|
-
onClick: () =>
|
|
1186
|
-
disabled:
|
|
1175
|
+
onClick: () => H("local"),
|
|
1176
|
+
disabled: y,
|
|
1187
1177
|
children: [
|
|
1188
1178
|
/* @__PURE__ */ t(ge, { className: "h-3.5 w-3.5" }),
|
|
1189
1179
|
"Add to Dashboard (Local)"
|
|
@@ -1191,23 +1181,23 @@ function Yn(e = {}) {
|
|
|
1191
1181
|
}
|
|
1192
1182
|
),
|
|
1193
1183
|
/* @__PURE__ */ r(
|
|
1194
|
-
|
|
1184
|
+
G,
|
|
1195
1185
|
{
|
|
1196
|
-
onClick: () =>
|
|
1197
|
-
disabled:
|
|
1186
|
+
onClick: () => H("library"),
|
|
1187
|
+
disabled: y,
|
|
1198
1188
|
children: [
|
|
1199
|
-
/* @__PURE__ */ t(
|
|
1189
|
+
/* @__PURE__ */ t(la, { className: "h-3.5 w-3.5" }),
|
|
1200
1190
|
"Save as Library Visual"
|
|
1201
1191
|
]
|
|
1202
1192
|
}
|
|
1203
1193
|
),
|
|
1204
1194
|
/* @__PURE__ */ r(
|
|
1205
|
-
|
|
1195
|
+
G,
|
|
1206
1196
|
{
|
|
1207
|
-
onClick: () =>
|
|
1208
|
-
disabled:
|
|
1197
|
+
onClick: () => H("both"),
|
|
1198
|
+
disabled: y,
|
|
1209
1199
|
children: [
|
|
1210
|
-
/* @__PURE__ */ t(
|
|
1200
|
+
/* @__PURE__ */ t(da, { className: "h-3.5 w-3.5" }),
|
|
1211
1201
|
"Save Copy as Linked Visual"
|
|
1212
1202
|
]
|
|
1213
1203
|
}
|
|
@@ -1217,28 +1207,28 @@ function Yn(e = {}) {
|
|
|
1217
1207
|
)
|
|
1218
1208
|
] })
|
|
1219
1209
|
] }),
|
|
1220
|
-
/* @__PURE__ */ t(
|
|
1210
|
+
/* @__PURE__ */ t(Ze, {}),
|
|
1221
1211
|
/* @__PURE__ */ t(
|
|
1222
|
-
|
|
1212
|
+
Fa,
|
|
1223
1213
|
{
|
|
1224
1214
|
open: C,
|
|
1225
|
-
onOpenChange: (
|
|
1226
|
-
|
|
1215
|
+
onOpenChange: (F) => {
|
|
1216
|
+
y || w(F);
|
|
1227
1217
|
},
|
|
1228
|
-
isLibraryVisual:
|
|
1218
|
+
isLibraryVisual: U,
|
|
1229
1219
|
currentVisualName: b,
|
|
1230
|
-
isSaving:
|
|
1220
|
+
isSaving: y,
|
|
1231
1221
|
destinationMode: h,
|
|
1232
1222
|
onConfirm: E
|
|
1233
1223
|
}
|
|
1234
1224
|
)
|
|
1235
1225
|
] });
|
|
1236
1226
|
}
|
|
1237
|
-
function
|
|
1238
|
-
const a = me((d) => d.isDevMode), o = me((d) => d.card.type), n = L((d) => d.isVisualEditing), { setIsDevMode: i } =
|
|
1239
|
-
if (!n || !c || !
|
|
1227
|
+
function Xn({ className: e }) {
|
|
1228
|
+
const a = me((d) => d.isDevMode), o = me((d) => d.card.type), n = L((d) => d.isVisualEditing), { setIsDevMode: i } = kt(), { config: s } = Gt(xr).tokenProps, c = (s == null ? void 0 : s.showAdvancedMode) !== !1;
|
|
1229
|
+
if (!n || !c || !ha(o))
|
|
1240
1230
|
return null;
|
|
1241
|
-
const
|
|
1231
|
+
const m = a ? pa : vr, l = a ? "Visual editor" : "SQL editor", u = a ? "Switch to visual editor" : "Switch to SQL editor";
|
|
1242
1232
|
return /* @__PURE__ */ r(
|
|
1243
1233
|
"button",
|
|
1244
1234
|
{
|
|
@@ -1251,13 +1241,13 @@ function Zn({ className: e }) {
|
|
|
1251
1241
|
e
|
|
1252
1242
|
),
|
|
1253
1243
|
children: [
|
|
1254
|
-
/* @__PURE__ */ t(
|
|
1244
|
+
/* @__PURE__ */ t(m, { className: "h-3 w-3 text-muted-foreground" }),
|
|
1255
1245
|
l
|
|
1256
1246
|
]
|
|
1257
1247
|
}
|
|
1258
1248
|
);
|
|
1259
1249
|
}
|
|
1260
|
-
function
|
|
1250
|
+
function Yn({
|
|
1261
1251
|
open: e,
|
|
1262
1252
|
onOpenChange: a,
|
|
1263
1253
|
onSave: o,
|
|
@@ -1265,12 +1255,12 @@ function Xn({
|
|
|
1265
1255
|
isSaving: i,
|
|
1266
1256
|
title: s = "Unsaved changes",
|
|
1267
1257
|
description: c = "You have unsaved changes to this dashboard. What would you like to do?",
|
|
1268
|
-
cancelLabel:
|
|
1258
|
+
cancelLabel: m = "Cancel",
|
|
1269
1259
|
discardLabel: l = "Discard changes",
|
|
1270
1260
|
saveLabel: u = "Save"
|
|
1271
1261
|
}) {
|
|
1272
|
-
return /* @__PURE__ */ t(at, { open: e, onOpenChange: (
|
|
1273
|
-
!
|
|
1262
|
+
return /* @__PURE__ */ t(at, { open: e, onOpenChange: (p) => {
|
|
1263
|
+
!p && i || a(p);
|
|
1274
1264
|
}, children: /* @__PURE__ */ r(nt, { children: [
|
|
1275
1265
|
/* @__PURE__ */ r(st, { children: [
|
|
1276
1266
|
/* @__PURE__ */ t(ot, { children: s }),
|
|
@@ -1278,7 +1268,7 @@ function Xn({
|
|
|
1278
1268
|
] }),
|
|
1279
1269
|
/* @__PURE__ */ r(lt, { children: [
|
|
1280
1270
|
/* @__PURE__ */ t(
|
|
1281
|
-
|
|
1271
|
+
T,
|
|
1282
1272
|
{
|
|
1283
1273
|
type: "button",
|
|
1284
1274
|
size: "xs",
|
|
@@ -1289,9 +1279,9 @@ function Xn({
|
|
|
1289
1279
|
children: l
|
|
1290
1280
|
}
|
|
1291
1281
|
),
|
|
1292
|
-
/* @__PURE__ */ t(dt, { disabled: i, children:
|
|
1293
|
-
/* @__PURE__ */ t(
|
|
1294
|
-
/* @__PURE__ */ t(
|
|
1282
|
+
/* @__PURE__ */ t(dt, { disabled: i, children: m }),
|
|
1283
|
+
/* @__PURE__ */ t(T, { type: "button", size: "xs", onClick: o, disabled: i, children: i ? /* @__PURE__ */ r($, { children: [
|
|
1284
|
+
/* @__PURE__ */ t(re, { className: "mr-2 h-3.5 w-3.5 animate-spin" }),
|
|
1295
1285
|
"Saving..."
|
|
1296
1286
|
] }) : u })
|
|
1297
1287
|
] })
|
|
@@ -1314,21 +1304,21 @@ function bt(e, a) {
|
|
|
1314
1304
|
downloadUrl: a
|
|
1315
1305
|
};
|
|
1316
1306
|
}
|
|
1317
|
-
const
|
|
1318
|
-
function
|
|
1307
|
+
const Ba = 1e4, Ta = 15e3, Ua = 3e4, Ra = 3e4, Va = 12e4, Ct = 2 * 60 * 60 * 1e3;
|
|
1308
|
+
function Pa(e) {
|
|
1319
1309
|
const a = Date.now() - e.getTime();
|
|
1320
|
-
return a < Ra ?
|
|
1310
|
+
return a < Ra ? Ba : a < Va ? Ta : Ua;
|
|
1321
1311
|
}
|
|
1322
|
-
function
|
|
1323
|
-
const { authToken: e, tokenProps: a } = Ge(), o = he((h) => h.activeExports), [n, i] =
|
|
1312
|
+
function Zn() {
|
|
1313
|
+
const { authToken: e, tokenProps: a } = Ge(), o = he((h) => h.activeExports), [n, i] = A(
|
|
1324
1314
|
typeof document < "u" ? !document.hidden : !0
|
|
1325
|
-
), s = ce(null), c = ce(!1),
|
|
1315
|
+
), s = ce(null), c = ce(!1), m = ce(void 0), l = a == null ? void 0 : a.apiServiceUrl, u = e == null ? void 0 : e.accessToken, d = W(() => {
|
|
1326
1316
|
const h = he.getState().activeExports;
|
|
1327
1317
|
return Array.from(h.values()).filter(
|
|
1328
1318
|
(f) => mt(f.status)
|
|
1329
1319
|
);
|
|
1330
1320
|
}, []);
|
|
1331
|
-
|
|
1321
|
+
Q(() => {
|
|
1332
1322
|
if (typeof document > "u") return;
|
|
1333
1323
|
const h = () => {
|
|
1334
1324
|
i(!document.hidden);
|
|
@@ -1337,7 +1327,7 @@ function Jn() {
|
|
|
1337
1327
|
document.removeEventListener("visibilitychange", h);
|
|
1338
1328
|
};
|
|
1339
1329
|
}, []);
|
|
1340
|
-
const
|
|
1330
|
+
const p = W(async () => {
|
|
1341
1331
|
if (!l || !u) {
|
|
1342
1332
|
c.current = !1;
|
|
1343
1333
|
return;
|
|
@@ -1369,15 +1359,15 @@ function Jn() {
|
|
|
1369
1359
|
const x = await Promise.allSettled(
|
|
1370
1360
|
k.map(async (C) => {
|
|
1371
1361
|
try {
|
|
1372
|
-
const w = await
|
|
1362
|
+
const w = await Tt(l, u, C.id);
|
|
1373
1363
|
let E;
|
|
1374
1364
|
if (w.status === "completed")
|
|
1375
1365
|
try {
|
|
1376
1366
|
E = await $e(l, u, C.id);
|
|
1377
|
-
} catch (
|
|
1367
|
+
} catch (U) {
|
|
1378
1368
|
console.error(
|
|
1379
1369
|
`[useExportPolling] Failed to get download URL for ${C.id}:`,
|
|
1380
|
-
|
|
1370
|
+
U
|
|
1381
1371
|
);
|
|
1382
1372
|
}
|
|
1383
1373
|
return bt(w, E);
|
|
@@ -1394,28 +1384,28 @@ function Jn() {
|
|
|
1394
1384
|
const S = d();
|
|
1395
1385
|
if (S.length > 0 && !document.hidden) {
|
|
1396
1386
|
const C = S.reduce(
|
|
1397
|
-
(E,
|
|
1387
|
+
(E, U) => U.startedAt < E ? U.startedAt : E,
|
|
1398
1388
|
S[0].startedAt
|
|
1399
|
-
), w =
|
|
1389
|
+
), w = Pa(C);
|
|
1400
1390
|
s.current && clearTimeout(s.current), s.current = setTimeout(() => {
|
|
1401
1391
|
var E;
|
|
1402
|
-
(E =
|
|
1392
|
+
(E = m.current) == null || E.call(m);
|
|
1403
1393
|
}, w);
|
|
1404
1394
|
} else
|
|
1405
1395
|
c.current = !1;
|
|
1406
1396
|
}, [l, u, d]);
|
|
1407
|
-
return
|
|
1408
|
-
|
|
1409
|
-
}, [
|
|
1397
|
+
return Q(() => {
|
|
1398
|
+
m.current = p;
|
|
1399
|
+
}, [p]), Q(() => {
|
|
1410
1400
|
var f;
|
|
1411
|
-
d().length > 0 && n && !c.current && (c.current = !0, (f =
|
|
1412
|
-
}, [o, n, d]),
|
|
1401
|
+
d().length > 0 && n && !c.current && (c.current = !0, (f = m.current) == null || f.call(m));
|
|
1402
|
+
}, [o, n, d]), Q(() => {
|
|
1413
1403
|
var f;
|
|
1414
1404
|
const h = d();
|
|
1415
|
-
n && h.length > 0 && !c.current && (c.current = !0, (f =
|
|
1416
|
-
}, [n, d]),
|
|
1405
|
+
n && h.length > 0 && !c.current && (c.current = !0, (f = m.current) == null || f.call(m));
|
|
1406
|
+
}, [n, d]), Q(() => {
|
|
1417
1407
|
!n && s.current && (clearTimeout(s.current), s.current = null, c.current = !1);
|
|
1418
|
-
}, [n]),
|
|
1408
|
+
}, [n]), Q(() => () => {
|
|
1419
1409
|
s.current && (clearTimeout(s.current), s.current = null);
|
|
1420
1410
|
}, []), {
|
|
1421
1411
|
isPolling: c.current,
|
|
@@ -1423,13 +1413,13 @@ function Jn() {
|
|
|
1423
1413
|
inProgressCount: d().length
|
|
1424
1414
|
};
|
|
1425
1415
|
}
|
|
1426
|
-
function
|
|
1427
|
-
const { authToken: e, tokenProps: a } = Ge(), o = he((
|
|
1428
|
-
|
|
1416
|
+
function Jn() {
|
|
1417
|
+
const { authToken: e, tokenProps: a } = Ge(), o = he((m) => m.activeExports), { addExport: n } = Ut(), i = ce(!1), s = a == null ? void 0 : a.apiServiceUrl, c = e == null ? void 0 : e.accessToken;
|
|
1418
|
+
Q(() => {
|
|
1429
1419
|
if (i.current || !s || !c) return;
|
|
1430
1420
|
(async () => {
|
|
1431
1421
|
try {
|
|
1432
|
-
const { exports: l } = await
|
|
1422
|
+
const { exports: l } = await yr(s, c, {
|
|
1433
1423
|
status: ["pending", "processing", "chunking", "compacting", "completed", "failed"],
|
|
1434
1424
|
limit: 20
|
|
1435
1425
|
// Limit to recent exports
|
|
@@ -1446,13 +1436,13 @@ function es() {
|
|
|
1446
1436
|
h
|
|
1447
1437
|
);
|
|
1448
1438
|
}
|
|
1449
|
-
const
|
|
1439
|
+
const p = {
|
|
1450
1440
|
...bt(u, d),
|
|
1451
|
-
title:
|
|
1441
|
+
title: Ma(u),
|
|
1452
1442
|
startedAt: new Date(u.createdAt),
|
|
1453
1443
|
expiresAt: new Date(u.expiresAt)
|
|
1454
1444
|
};
|
|
1455
|
-
n(
|
|
1445
|
+
n(p);
|
|
1456
1446
|
}
|
|
1457
1447
|
i.current = !0;
|
|
1458
1448
|
} catch (l) {
|
|
@@ -1461,18 +1451,18 @@ function es() {
|
|
|
1461
1451
|
})();
|
|
1462
1452
|
}, [s, c, n, o]);
|
|
1463
1453
|
}
|
|
1464
|
-
function
|
|
1454
|
+
function Ma(e) {
|
|
1465
1455
|
return e.title ? e.title : mt(
|
|
1466
1456
|
e.status
|
|
1467
1457
|
) ? "Export in progress..." : e.status === "completed" ? "Export completed" : e.status === "failed" ? "Export failed" : "Export";
|
|
1468
1458
|
}
|
|
1469
|
-
function
|
|
1459
|
+
function Oa({
|
|
1470
1460
|
export: e,
|
|
1471
1461
|
onRemove: a,
|
|
1472
1462
|
onDownload: o
|
|
1473
1463
|
}) {
|
|
1474
|
-
const [n, i] =
|
|
1475
|
-
|
|
1464
|
+
const [n, i] = A("idle");
|
|
1465
|
+
Q(() => {
|
|
1476
1466
|
e.downloadUrl && i("idle");
|
|
1477
1467
|
}, [e.downloadUrl]);
|
|
1478
1468
|
const s = async () => {
|
|
@@ -1485,7 +1475,7 @@ function _a({
|
|
|
1485
1475
|
i(g === "denied" ? "denied" : "idle");
|
|
1486
1476
|
}, c = (g) => {
|
|
1487
1477
|
g.stopPropagation(), a == null || a(e.id);
|
|
1488
|
-
},
|
|
1478
|
+
}, m = mt(e.status), l = (() => {
|
|
1489
1479
|
switch (e.status) {
|
|
1490
1480
|
case "pending":
|
|
1491
1481
|
return "Queued...";
|
|
@@ -1494,9 +1484,9 @@ function _a({
|
|
|
1494
1484
|
default:
|
|
1495
1485
|
return "Processing...";
|
|
1496
1486
|
}
|
|
1497
|
-
})(), u = e.status === "completed" ? "bg-emerald-500" : e.status === "failed" ? "bg-destructive" : e.status === "pending" ? "bg-muted-foreground/40" : "animate-pulse bg-muted-foreground/60", d = e.status === "completed" ? "Ready" : e.status === "failed" ? "Failed" : "In progress",
|
|
1487
|
+
})(), u = e.status === "completed" ? "bg-emerald-500" : e.status === "failed" ? "bg-destructive" : e.status === "pending" ? "bg-muted-foreground/40" : "animate-pulse bg-muted-foreground/60", d = e.status === "completed" ? "Ready" : e.status === "failed" ? "Failed" : "In progress", p = fa(e.startedAt, { addSuffix: !0 }), h = [
|
|
1498
1488
|
e.status === "completed" && e.totalRows !== null ? `${e.totalRows.toLocaleString()} rows` : null,
|
|
1499
|
-
e.status === "completed" && e.fileSize ?
|
|
1489
|
+
e.status === "completed" && e.fileSize ? Cr(e.fileSize) : null
|
|
1500
1490
|
].filter((g) => !!g), f = /* @__PURE__ */ t("span", { className: "text-muted-foreground/50", children: "·" });
|
|
1501
1491
|
return /* @__PURE__ */ r("div", { className: "group flex items-start gap-2.5 px-3 py-2 transition-colors hover:bg-muted/40 focus-within:bg-muted/40", children: [
|
|
1502
1492
|
/* @__PURE__ */ t("span", { className: "flex h-5 shrink-0 items-center", "aria-hidden": "true", children: /* @__PURE__ */ t("span", { className: `h-1.5 w-1.5 rounded-full ${u}` }) }),
|
|
@@ -1518,7 +1508,7 @@ function _a({
|
|
|
1518
1508
|
}
|
|
1519
1509
|
),
|
|
1520
1510
|
/* @__PURE__ */ t(
|
|
1521
|
-
|
|
1511
|
+
T,
|
|
1522
1512
|
{
|
|
1523
1513
|
variant: "ghost",
|
|
1524
1514
|
size: "xs",
|
|
@@ -1526,11 +1516,11 @@ function _a({
|
|
|
1526
1516
|
onClick: c,
|
|
1527
1517
|
"aria-label": "Remove notification",
|
|
1528
1518
|
title: "Remove",
|
|
1529
|
-
children: /* @__PURE__ */ t(
|
|
1519
|
+
children: /* @__PURE__ */ t(qe, { className: "h-3.5 w-3.5", strokeWidth: 1.75 })
|
|
1530
1520
|
}
|
|
1531
1521
|
)
|
|
1532
1522
|
] }),
|
|
1533
|
-
!
|
|
1523
|
+
!m && e.status !== "failed" && /* @__PURE__ */ r("div", { className: "flex items-center gap-1.5 text-[12px] leading-4 text-muted-foreground", children: [
|
|
1534
1524
|
h.length > 0 && // Disclosed on hover or focus only; the time is what a reader scans.
|
|
1535
1525
|
/* @__PURE__ */ r("span", { className: "hidden group-hover:contents group-focus-within:contents", children: [
|
|
1536
1526
|
h.map((g, k) => /* @__PURE__ */ r(Nt.Fragment, { children: [
|
|
@@ -1539,48 +1529,48 @@ function _a({
|
|
|
1539
1529
|
] }, k)),
|
|
1540
1530
|
f
|
|
1541
1531
|
] }),
|
|
1542
|
-
/* @__PURE__ */ t("span", { children:
|
|
1532
|
+
/* @__PURE__ */ t("span", { children: p })
|
|
1543
1533
|
] }),
|
|
1544
1534
|
e.status === "completed" && n === "denied" && /* @__PURE__ */ r("div", { role: "alert", className: "mt-1 flex items-start gap-1.5 text-[12px] leading-4 text-foreground", children: [
|
|
1545
|
-
/* @__PURE__ */ t(
|
|
1535
|
+
/* @__PURE__ */ t(wr, { className: "mt-0.5 h-3 w-3 shrink-0 text-destructive", strokeWidth: 1.75 }),
|
|
1546
1536
|
/* @__PURE__ */ t("span", { children: "This link expired. Refresh the tray to sign the file again." })
|
|
1547
1537
|
] }),
|
|
1548
|
-
|
|
1538
|
+
m && /* @__PURE__ */ r("div", { className: "text-[12px] leading-4 text-muted-foreground", children: [
|
|
1549
1539
|
l,
|
|
1550
|
-
(e.progress !== null || e.rowsProcessed !== void 0) && /* @__PURE__ */ r(
|
|
1540
|
+
(e.progress !== null || e.rowsProcessed !== void 0) && /* @__PURE__ */ r($, { children: [
|
|
1551
1541
|
" ",
|
|
1552
1542
|
f,
|
|
1553
1543
|
" ",
|
|
1554
1544
|
/* @__PURE__ */ t("span", { className: "tabular-nums", children: e.progress === null ? `${e.rowsProcessed.toLocaleString()} rows processed` : `${e.progress}% complete` })
|
|
1555
1545
|
] }),
|
|
1556
|
-
e.progress !== null && /* @__PURE__ */ t(
|
|
1546
|
+
e.progress !== null && /* @__PURE__ */ t(Nr, { value: e.progress, className: "mt-1.5 h-1" })
|
|
1557
1547
|
] }),
|
|
1558
|
-
e.status === "failed" && /* @__PURE__ */ r(
|
|
1548
|
+
e.status === "failed" && /* @__PURE__ */ r($, { children: [
|
|
1559
1549
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-1.5 text-[12px] leading-4 text-muted-foreground", children: [
|
|
1560
1550
|
/* @__PURE__ */ t("span", { children: "Failed" }),
|
|
1561
1551
|
f,
|
|
1562
|
-
/* @__PURE__ */ t("span", { children:
|
|
1552
|
+
/* @__PURE__ */ t("span", { children: p })
|
|
1563
1553
|
] }),
|
|
1564
1554
|
/* @__PURE__ */ t("div", { className: "mt-1 whitespace-pre-wrap break-words text-[12px] leading-4 text-destructive", children: e.error || "Export failed" })
|
|
1565
1555
|
] })
|
|
1566
1556
|
] })
|
|
1567
1557
|
] });
|
|
1568
1558
|
}
|
|
1569
|
-
function
|
|
1570
|
-
const { authToken: e, tokenProps: a } = Ge(), o = he((x) => x.activeExports), { clearCompleted: n, removeExport: i, updateExport: s } =
|
|
1559
|
+
function _a() {
|
|
1560
|
+
const { authToken: e, tokenProps: a } = Ge(), o = he((x) => x.activeExports), { clearCompleted: n, removeExport: i, updateExport: s } = Ut(), [c, m] = A(!1), [l, u] = A(!1), d = Array.from(o.values()).sort(
|
|
1571
1561
|
(x, D) => D.startedAt.getTime() - x.startedAt.getTime()
|
|
1572
|
-
),
|
|
1562
|
+
), p = d.some(
|
|
1573
1563
|
(x) => x.status === "completed" || x.status === "failed"
|
|
1574
|
-
), h =
|
|
1564
|
+
), h = W(async () => {
|
|
1575
1565
|
const x = a == null ? void 0 : a.apiServiceUrl, D = e == null ? void 0 : e.accessToken;
|
|
1576
1566
|
if (!(!x || !D)) {
|
|
1577
|
-
|
|
1567
|
+
m(!0);
|
|
1578
1568
|
try {
|
|
1579
1569
|
const S = Array.from(o.values());
|
|
1580
1570
|
await Promise.all(
|
|
1581
1571
|
S.map(async (C) => {
|
|
1582
1572
|
try {
|
|
1583
|
-
const w = await
|
|
1573
|
+
const w = await Tt(x, D, C.id);
|
|
1584
1574
|
let E;
|
|
1585
1575
|
if (w.status === "completed")
|
|
1586
1576
|
try {
|
|
@@ -1589,8 +1579,8 @@ function za() {
|
|
|
1589
1579
|
D,
|
|
1590
1580
|
C.id
|
|
1591
1581
|
);
|
|
1592
|
-
} catch (
|
|
1593
|
-
console.error(`Failed to get download URL for ${C.id}:`,
|
|
1582
|
+
} catch (U) {
|
|
1583
|
+
console.error(`Failed to get download URL for ${C.id}:`, U);
|
|
1594
1584
|
}
|
|
1595
1585
|
s(C.id, bt(w, E));
|
|
1596
1586
|
} catch (w) {
|
|
@@ -1599,7 +1589,7 @@ function za() {
|
|
|
1599
1589
|
})
|
|
1600
1590
|
);
|
|
1601
1591
|
} finally {
|
|
1602
|
-
|
|
1592
|
+
m(!1);
|
|
1603
1593
|
}
|
|
1604
1594
|
}
|
|
1605
1595
|
}, [
|
|
@@ -1607,7 +1597,7 @@ function za() {
|
|
|
1607
1597
|
e == null ? void 0 : e.accessToken,
|
|
1608
1598
|
a == null ? void 0 : a.apiServiceUrl,
|
|
1609
1599
|
s
|
|
1610
|
-
]), f =
|
|
1600
|
+
]), f = W(async () => {
|
|
1611
1601
|
const x = a == null ? void 0 : a.apiServiceUrl, D = e == null ? void 0 : e.accessToken;
|
|
1612
1602
|
if (!x || !D) {
|
|
1613
1603
|
n();
|
|
@@ -1631,7 +1621,7 @@ function za() {
|
|
|
1631
1621
|
e == null ? void 0 : e.accessToken,
|
|
1632
1622
|
n,
|
|
1633
1623
|
i
|
|
1634
|
-
]), g =
|
|
1624
|
+
]), g = W(
|
|
1635
1625
|
async (x) => {
|
|
1636
1626
|
const D = a == null ? void 0 : a.apiServiceUrl, S = e == null ? void 0 : e.accessToken;
|
|
1637
1627
|
if (D && S)
|
|
@@ -1644,7 +1634,7 @@ function za() {
|
|
|
1644
1634
|
i(x);
|
|
1645
1635
|
},
|
|
1646
1636
|
[a == null ? void 0 : a.apiServiceUrl, e == null ? void 0 : e.accessToken, i]
|
|
1647
|
-
), k =
|
|
1637
|
+
), k = W(
|
|
1648
1638
|
async (x) => {
|
|
1649
1639
|
if (x.downloadUrl)
|
|
1650
1640
|
return window.open(x.downloadUrl, "_blank"), "opened";
|
|
@@ -1660,7 +1650,7 @@ function za() {
|
|
|
1660
1650
|
[a == null ? void 0 : a.apiServiceUrl, e == null ? void 0 : e.accessToken, s]
|
|
1661
1651
|
);
|
|
1662
1652
|
return d.length === 0 ? /* @__PURE__ */ r("div", { className: "flex flex-col items-center gap-1.5 px-6 py-8 text-center", children: [
|
|
1663
|
-
/* @__PURE__ */ t("span", { className: "flex h-8 w-8 items-center justify-center rounded-[6px] border border-border text-muted-foreground", children: /* @__PURE__ */ t(
|
|
1653
|
+
/* @__PURE__ */ t("span", { className: "flex h-8 w-8 items-center justify-center rounded-[6px] border border-border text-muted-foreground", children: /* @__PURE__ */ t(ya, { className: "h-3.5 w-3.5", strokeWidth: 1.75 }) }),
|
|
1664
1654
|
/* @__PURE__ */ t("p", { className: "text-[13px] font-medium", children: "No exports yet" }),
|
|
1665
1655
|
/* @__PURE__ */ t("p", { className: "text-[12px] text-muted-foreground", children: "Large exports run in the background and land here." })
|
|
1666
1656
|
] }) : /* @__PURE__ */ r("div", { className: "flex flex-col", children: [
|
|
@@ -1668,8 +1658,8 @@ function za() {
|
|
|
1668
1658
|
/* @__PURE__ */ t("span", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Exports" }),
|
|
1669
1659
|
/* @__PURE__ */ t("span", { className: "text-[10px] tabular-nums text-muted-foreground/70", children: d.length }),
|
|
1670
1660
|
/* @__PURE__ */ r("div", { className: "ml-auto flex items-center gap-0.5", children: [
|
|
1671
|
-
|
|
1672
|
-
|
|
1661
|
+
p && /* @__PURE__ */ t(
|
|
1662
|
+
T,
|
|
1673
1663
|
{
|
|
1674
1664
|
variant: "ghost",
|
|
1675
1665
|
size: "xs",
|
|
@@ -1680,7 +1670,7 @@ function za() {
|
|
|
1680
1670
|
}
|
|
1681
1671
|
),
|
|
1682
1672
|
/* @__PURE__ */ t(
|
|
1683
|
-
|
|
1673
|
+
T,
|
|
1684
1674
|
{
|
|
1685
1675
|
variant: "ghost",
|
|
1686
1676
|
size: "xs",
|
|
@@ -1701,7 +1691,7 @@ function za() {
|
|
|
1701
1691
|
] })
|
|
1702
1692
|
] }),
|
|
1703
1693
|
/* @__PURE__ */ t("div", { className: "max-h-[320px] overflow-y-auto", children: /* @__PURE__ */ t("div", { className: "divide-y divide-border/70", children: d.map((x) => /* @__PURE__ */ t(
|
|
1704
|
-
|
|
1694
|
+
Oa,
|
|
1705
1695
|
{
|
|
1706
1696
|
export: x,
|
|
1707
1697
|
onRemove: g,
|
|
@@ -1711,22 +1701,22 @@ function za() {
|
|
|
1711
1701
|
)) }) })
|
|
1712
1702
|
] });
|
|
1713
1703
|
}
|
|
1714
|
-
function
|
|
1704
|
+
function es({
|
|
1715
1705
|
variant: e
|
|
1716
1706
|
}) {
|
|
1717
|
-
const a = he((l) => l.activeExports), o =
|
|
1707
|
+
const a = he((l) => l.activeExports), o = Sr(), n = a.size > 0, i = Array.from(a.values()).some(
|
|
1718
1708
|
(l) => l.status === "completed" || l.status === "failed"
|
|
1719
1709
|
), c = o > 0 ? o > 9 ? "9+" : String(o) : null;
|
|
1720
1710
|
return /* @__PURE__ */ r(Pe, { children: [
|
|
1721
1711
|
/* @__PURE__ */ t(Me, { asChild: !0, children: /* @__PURE__ */ r(
|
|
1722
|
-
|
|
1712
|
+
T,
|
|
1723
1713
|
{
|
|
1724
1714
|
variant: e ?? "ghost",
|
|
1725
1715
|
size: "xs",
|
|
1726
1716
|
className: "relative w-7 px-0 text-muted-foreground hover:text-foreground",
|
|
1727
1717
|
"aria-label": "Export notifications",
|
|
1728
1718
|
children: [
|
|
1729
|
-
/* @__PURE__ */ t(
|
|
1719
|
+
/* @__PURE__ */ t(Dr, { className: "h-3.5 w-3.5" }),
|
|
1730
1720
|
n && /* @__PURE__ */ t(
|
|
1731
1721
|
"span",
|
|
1732
1722
|
{
|
|
@@ -1737,10 +1727,10 @@ function ts({
|
|
|
1737
1727
|
]
|
|
1738
1728
|
}
|
|
1739
1729
|
) }),
|
|
1740
|
-
/* @__PURE__ */ t(Oe, { className: "w-80 p-0", align: "end", sideOffset: 8, children: /* @__PURE__ */ t(
|
|
1730
|
+
/* @__PURE__ */ t(Oe, { className: "w-80 p-0", align: "end", sideOffset: 8, children: /* @__PURE__ */ t(_a, {}) })
|
|
1741
1731
|
] });
|
|
1742
1732
|
}
|
|
1743
|
-
function
|
|
1733
|
+
function za(e) {
|
|
1744
1734
|
if (e)
|
|
1745
1735
|
return {
|
|
1746
1736
|
renamed: e.type === "rename" ? { oldId: e.oldId, newId: e.newId } : void 0,
|
|
@@ -1749,7 +1739,7 @@ function $a(e) {
|
|
|
1749
1739
|
affectedBindingControlIds: e.type === "add" || e.type === "update" ? e.affectedBindingControlIds : void 0
|
|
1750
1740
|
};
|
|
1751
1741
|
}
|
|
1752
|
-
function
|
|
1742
|
+
function $a({
|
|
1753
1743
|
open: e,
|
|
1754
1744
|
onOpenChange: a,
|
|
1755
1745
|
trigger: o,
|
|
@@ -1758,12 +1748,12 @@ function ja({
|
|
|
1758
1748
|
}) {
|
|
1759
1749
|
const s = i === "create", {
|
|
1760
1750
|
forceClose: c,
|
|
1761
|
-
handleOpenChange:
|
|
1751
|
+
handleOpenChange: m,
|
|
1762
1752
|
isCreateFlowActive: l,
|
|
1763
1753
|
preventPassiveDismissDuringCreate: u,
|
|
1764
1754
|
resolvedOpen: d,
|
|
1765
|
-
setIsCreateFlowActive:
|
|
1766
|
-
} =
|
|
1755
|
+
setIsCreateFlowActive: p
|
|
1756
|
+
} = Ot({
|
|
1767
1757
|
open: e,
|
|
1768
1758
|
onOpenChange: a,
|
|
1769
1759
|
initialCreateFlowActive: i === "create",
|
|
@@ -1774,16 +1764,16 @@ function ja({
|
|
|
1774
1764
|
// create and make consumers use `forceClose()` from a dedicated
|
|
1775
1765
|
// button.
|
|
1776
1766
|
dismissMode: n ? "passive" : "explicit-only"
|
|
1777
|
-
}), h = L((
|
|
1767
|
+
}), h = L((y) => y.dashboard), { setDashboardControlsModel: f } = be(), { participants: g } = kr(qt(h)), k = Array.from(
|
|
1778
1768
|
new Map(
|
|
1779
1769
|
g.flatMap(
|
|
1780
|
-
(
|
|
1781
|
-
var
|
|
1770
|
+
(y) => y.fieldChoices.map((R) => {
|
|
1771
|
+
var I;
|
|
1782
1772
|
return [
|
|
1783
|
-
|
|
1773
|
+
R.value,
|
|
1784
1774
|
{
|
|
1785
|
-
option:
|
|
1786
|
-
target: (
|
|
1775
|
+
option: R,
|
|
1776
|
+
target: (I = y.fieldTargetMap) == null ? void 0 : I[R.value]
|
|
1787
1777
|
}
|
|
1788
1778
|
];
|
|
1789
1779
|
})
|
|
@@ -1792,61 +1782,61 @@ function ja({
|
|
|
1792
1782
|
), x = Array.from(
|
|
1793
1783
|
new Map(
|
|
1794
1784
|
g.flatMap(
|
|
1795
|
-
(
|
|
1796
|
-
var
|
|
1785
|
+
(y) => y.metricChoices.map((R) => {
|
|
1786
|
+
var I;
|
|
1797
1787
|
return [
|
|
1798
|
-
|
|
1788
|
+
R.value,
|
|
1799
1789
|
{
|
|
1800
|
-
option:
|
|
1801
|
-
target: (
|
|
1790
|
+
option: R,
|
|
1791
|
+
target: (I = y.metricTargetMap) == null ? void 0 : I[R.value]
|
|
1802
1792
|
}
|
|
1803
1793
|
];
|
|
1804
1794
|
})
|
|
1805
1795
|
)
|
|
1806
1796
|
).values()
|
|
1807
|
-
), D =
|
|
1797
|
+
), D = Qt({
|
|
1808
1798
|
...h || {},
|
|
1809
1799
|
controls: []
|
|
1810
|
-
}), S =
|
|
1800
|
+
}), S = Er(h), C = (y, R, I) => {
|
|
1811
1801
|
f(
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1802
|
+
y,
|
|
1803
|
+
R,
|
|
1804
|
+
za(I)
|
|
1815
1805
|
);
|
|
1816
|
-
}, w =
|
|
1806
|
+
}, w = W(() => {
|
|
1817
1807
|
if (s) {
|
|
1818
1808
|
c();
|
|
1819
1809
|
return;
|
|
1820
1810
|
}
|
|
1821
|
-
|
|
1822
|
-
}, [s, c,
|
|
1823
|
-
|
|
1811
|
+
p(!1);
|
|
1812
|
+
}, [s, c, p]), E = /* @__PURE__ */ t(
|
|
1813
|
+
_t,
|
|
1824
1814
|
{
|
|
1825
1815
|
scope: "dashboard",
|
|
1826
1816
|
controls: h.controls || [],
|
|
1827
1817
|
reservedControlIds: D,
|
|
1828
1818
|
defaultValues: h.defaultControlValues || {},
|
|
1829
|
-
usageByControlId:
|
|
1819
|
+
usageByControlId: Ar(h),
|
|
1830
1820
|
availableFieldChoices: k,
|
|
1831
1821
|
availableMetricChoices: x,
|
|
1832
1822
|
structuralParticipants: g,
|
|
1833
1823
|
structuralParticipantIdsByControlId: S,
|
|
1834
1824
|
initialCreateFlow: i === "create",
|
|
1835
|
-
onCreateFlowActiveChange:
|
|
1825
|
+
onCreateFlowActiveChange: p,
|
|
1836
1826
|
onCreateFlowComplete: w,
|
|
1837
1827
|
onChange: C,
|
|
1838
1828
|
emptyMessage: "No dashboard controls yet."
|
|
1839
1829
|
}
|
|
1840
|
-
),
|
|
1830
|
+
), U = l ? "Add dashboard control" : "Dashboard Controls", b = /* @__PURE__ */ r($, { children: [
|
|
1841
1831
|
/* @__PURE__ */ r("div", { className: "space-y-1", children: [
|
|
1842
1832
|
/* @__PURE__ */ t("h4", { className: "text-sm font-medium", children: "Dashboard Controls" }),
|
|
1843
1833
|
/* @__PURE__ */ t("p", { className: "text-xs text-muted-foreground", children: "Add shared controls viewers can use across the dashboard. Each card can decide how to respond to the same control." })
|
|
1844
1834
|
] }),
|
|
1845
1835
|
E
|
|
1846
1836
|
] });
|
|
1847
|
-
return n ? /* @__PURE__ */ r(Pe, { open: d, onOpenChange:
|
|
1848
|
-
/* @__PURE__ */ t(Me, { asChild: !0, children: o || /* @__PURE__ */ r(
|
|
1849
|
-
/* @__PURE__ */ t(
|
|
1837
|
+
return n ? /* @__PURE__ */ r(Pe, { open: d, onOpenChange: m, children: [
|
|
1838
|
+
/* @__PURE__ */ t(Me, { asChild: !0, children: o || /* @__PURE__ */ r(T, { variant: "outline", className: "h-7 px-2", size: "sm", children: [
|
|
1839
|
+
/* @__PURE__ */ t(Et, { className: "mr-2 h-4 w-4" }),
|
|
1850
1840
|
"Controls"
|
|
1851
1841
|
] }) }),
|
|
1852
1842
|
/* @__PURE__ */ t(
|
|
@@ -1859,8 +1849,8 @@ function ja({
|
|
|
1859
1849
|
children: b
|
|
1860
1850
|
}
|
|
1861
1851
|
)
|
|
1862
|
-
] }) : /* @__PURE__ */ t(
|
|
1863
|
-
|
|
1852
|
+
] }) : /* @__PURE__ */ t(Se, { open: d, onOpenChange: m, children: /* @__PURE__ */ r(
|
|
1853
|
+
De,
|
|
1864
1854
|
{
|
|
1865
1855
|
className: "flex max-h-[88vh] flex-col overflow-hidden sm:max-w-[600px]",
|
|
1866
1856
|
onEscapeKeyDown: u,
|
|
@@ -1871,7 +1861,7 @@ function ja({
|
|
|
1871
1861
|
{
|
|
1872
1862
|
className: l ? "space-y-0" : void 0,
|
|
1873
1863
|
children: [
|
|
1874
|
-
/* @__PURE__ */ t(
|
|
1864
|
+
/* @__PURE__ */ t(ke, { className: "text-[15px]", children: U }),
|
|
1875
1865
|
/* @__PURE__ */ t(
|
|
1876
1866
|
ht,
|
|
1877
1867
|
{
|
|
@@ -1887,7 +1877,7 @@ function ja({
|
|
|
1887
1877
|
}
|
|
1888
1878
|
) });
|
|
1889
1879
|
}
|
|
1890
|
-
const
|
|
1880
|
+
const ja = [
|
|
1891
1881
|
"enum",
|
|
1892
1882
|
"multi_enum",
|
|
1893
1883
|
"text",
|
|
@@ -1895,7 +1885,7 @@ const Wa = [
|
|
|
1895
1885
|
"boolean",
|
|
1896
1886
|
"date"
|
|
1897
1887
|
];
|
|
1898
|
-
function
|
|
1888
|
+
function Wa({
|
|
1899
1889
|
open: e,
|
|
1900
1890
|
onOpenChange: a,
|
|
1901
1891
|
initialMode: o = "manage"
|
|
@@ -1905,49 +1895,49 @@ function Ha({
|
|
|
1905
1895
|
forceClose: i,
|
|
1906
1896
|
handleOpenChange: s,
|
|
1907
1897
|
isCreateFlowActive: c,
|
|
1908
|
-
preventPassiveDismissDuringCreate:
|
|
1898
|
+
preventPassiveDismissDuringCreate: m,
|
|
1909
1899
|
resolvedOpen: l,
|
|
1910
1900
|
setIsCreateFlowActive: u
|
|
1911
|
-
} =
|
|
1901
|
+
} = Ot({
|
|
1912
1902
|
open: e,
|
|
1913
1903
|
onOpenChange: a,
|
|
1914
1904
|
initialCreateFlowActive: o === "create",
|
|
1915
1905
|
dismissMode: "explicit-only"
|
|
1916
|
-
}), d = L((
|
|
1917
|
-
(
|
|
1918
|
-
), g = (f == null ? void 0 : f.kind) === "document" && !!f.document, k =
|
|
1919
|
-
() => g && (f != null && f.document) ?
|
|
1906
|
+
}), d = L((y) => y.dashboard), p = L((y) => y.selectedSheetId), { setDashboardInputs: h } = be(), f = (b = d.sheets) == null ? void 0 : b.find(
|
|
1907
|
+
(y) => y.id === p
|
|
1908
|
+
), g = (f == null ? void 0 : f.kind) === "document" && !!f.document, k = Y(
|
|
1909
|
+
() => g && (f != null && f.document) ? Ir(d, f.id) : [],
|
|
1920
1910
|
[d, g, f == null ? void 0 : f.document, f == null ? void 0 : f.id]
|
|
1921
|
-
), x =
|
|
1911
|
+
), x = Y(
|
|
1922
1912
|
() => k.filter(
|
|
1923
|
-
(
|
|
1913
|
+
(y) => y.kind === "control"
|
|
1924
1914
|
),
|
|
1925
1915
|
[k]
|
|
1926
|
-
), D =
|
|
1927
|
-
() => x.map((
|
|
1916
|
+
), D = Y(
|
|
1917
|
+
() => x.map((y) => y.control),
|
|
1928
1918
|
[x]
|
|
1929
|
-
), S =
|
|
1930
|
-
() =>
|
|
1919
|
+
), S = Y(
|
|
1920
|
+
() => Ga(D),
|
|
1931
1921
|
[D]
|
|
1932
|
-
), C =
|
|
1933
|
-
() =>
|
|
1922
|
+
), C = Y(
|
|
1923
|
+
() => Ha(d),
|
|
1934
1924
|
[d]
|
|
1935
|
-
), w =
|
|
1925
|
+
), w = W(() => {
|
|
1936
1926
|
if (n) {
|
|
1937
1927
|
i();
|
|
1938
1928
|
return;
|
|
1939
1929
|
}
|
|
1940
1930
|
u(!1);
|
|
1941
|
-
}, [n, i, u]), E =
|
|
1942
|
-
(
|
|
1931
|
+
}, [n, i, u]), E = W(
|
|
1932
|
+
(y, R, I) => {
|
|
1943
1933
|
!g || !(f != null && f.document) || h(
|
|
1944
|
-
|
|
1934
|
+
qa({
|
|
1945
1935
|
allInputs: d.inputs || [],
|
|
1946
1936
|
documentSheetId: f.id,
|
|
1947
1937
|
currentDocumentInputs: k,
|
|
1948
|
-
nextControls:
|
|
1949
|
-
nextDefaultValues:
|
|
1950
|
-
change:
|
|
1938
|
+
nextControls: y,
|
|
1939
|
+
nextDefaultValues: R,
|
|
1940
|
+
change: I
|
|
1951
1941
|
})
|
|
1952
1942
|
);
|
|
1953
1943
|
},
|
|
@@ -1959,15 +1949,15 @@ function Ha({
|
|
|
1959
1949
|
h
|
|
1960
1950
|
]
|
|
1961
1951
|
);
|
|
1962
|
-
return !g || !(f != null && f.document) ? null : /* @__PURE__ */ t(
|
|
1963
|
-
|
|
1952
|
+
return !g || !(f != null && f.document) ? null : /* @__PURE__ */ t(Se, { open: l, onOpenChange: s, children: /* @__PURE__ */ r(
|
|
1953
|
+
De,
|
|
1964
1954
|
{
|
|
1965
1955
|
className: "flex max-h-[88vh] flex-col overflow-hidden sm:max-w-[600px]",
|
|
1966
|
-
onEscapeKeyDown:
|
|
1967
|
-
onPointerDownOutside:
|
|
1956
|
+
onEscapeKeyDown: m,
|
|
1957
|
+
onPointerDownOutside: m,
|
|
1968
1958
|
children: [
|
|
1969
1959
|
/* @__PURE__ */ r(ut, { className: c ? "space-y-0" : void 0, children: [
|
|
1970
|
-
/* @__PURE__ */ t(
|
|
1960
|
+
/* @__PURE__ */ t(ke, { className: "text-[15px]", children: c ? "Add document control" : "Document Controls" }),
|
|
1971
1961
|
/* @__PURE__ */ t(
|
|
1972
1962
|
ht,
|
|
1973
1963
|
{
|
|
@@ -1977,7 +1967,7 @@ function Ha({
|
|
|
1977
1967
|
)
|
|
1978
1968
|
] }),
|
|
1979
1969
|
/* @__PURE__ */ t("div", { className: "min-h-0 overflow-y-auto pr-1", children: /* @__PURE__ */ t(
|
|
1980
|
-
|
|
1970
|
+
_t,
|
|
1981
1971
|
{
|
|
1982
1972
|
scope: "dashboard",
|
|
1983
1973
|
controls: D,
|
|
@@ -1988,7 +1978,7 @@ function Ha({
|
|
|
1988
1978
|
availableMetricChoices: [],
|
|
1989
1979
|
structuralParticipants: [],
|
|
1990
1980
|
structuralParticipantIdsByControlId: {},
|
|
1991
|
-
allowedControlTypes:
|
|
1981
|
+
allowedControlTypes: ja,
|
|
1992
1982
|
initialCreateFlow: o === "create",
|
|
1993
1983
|
onCreateFlowActiveChange: u,
|
|
1994
1984
|
onCreateFlowComplete: w,
|
|
@@ -2000,10 +1990,10 @@ function Ha({
|
|
|
2000
1990
|
}
|
|
2001
1991
|
) });
|
|
2002
1992
|
}
|
|
2003
|
-
function
|
|
1993
|
+
function Ha(e) {
|
|
2004
1994
|
return (e.controls || []).map((a) => a.id);
|
|
2005
1995
|
}
|
|
2006
|
-
function
|
|
1996
|
+
function Ga(e) {
|
|
2007
1997
|
const a = {};
|
|
2008
1998
|
for (const o of e)
|
|
2009
1999
|
o.defaultValue !== void 0 && (a[o.id] = o.defaultValue);
|
|
@@ -2015,7 +2005,7 @@ function Ka(e, a) {
|
|
|
2015
2005
|
defaultValue: a[e.id]
|
|
2016
2006
|
} : e.defaultValue === void 0 ? e : { ...e, defaultValue: void 0 } : e.defaultValue === void 0 ? e : { ...e, defaultValue: void 0 };
|
|
2017
2007
|
}
|
|
2018
|
-
function
|
|
2008
|
+
function qa({
|
|
2019
2009
|
allInputs: e,
|
|
2020
2010
|
documentSheetId: a,
|
|
2021
2011
|
currentDocumentInputs: o,
|
|
@@ -2028,17 +2018,17 @@ function Qa({
|
|
|
2028
2018
|
h.id,
|
|
2029
2019
|
Ka(h, i)
|
|
2030
2020
|
])
|
|
2031
|
-
),
|
|
2021
|
+
), m = (s == null ? void 0 : s.type) === "rename" ? { oldId: s.oldId, newId: s.newId } : null, l = /* @__PURE__ */ new Set(), u = [];
|
|
2032
2022
|
for (const h of o) {
|
|
2033
2023
|
if (h.kind !== "control") {
|
|
2034
2024
|
u.push(h);
|
|
2035
2025
|
continue;
|
|
2036
2026
|
}
|
|
2037
|
-
const f = c.get(h.control.id) || ((
|
|
2027
|
+
const f = c.get(h.control.id) || ((m == null ? void 0 : m.oldId) === h.control.id ? c.get(m.newId) : void 0);
|
|
2038
2028
|
if (!f)
|
|
2039
2029
|
continue;
|
|
2040
2030
|
l.add(f.id);
|
|
2041
|
-
const g =
|
|
2031
|
+
const g = Xt(
|
|
2042
2032
|
f.id,
|
|
2043
2033
|
[...e, ...u].filter(
|
|
2044
2034
|
(x) => x.id !== h.id
|
|
@@ -2054,7 +2044,7 @@ function Qa({
|
|
|
2054
2044
|
}
|
|
2055
2045
|
for (const h of c.values())
|
|
2056
2046
|
l.has(h.id) || u.push(
|
|
2057
|
-
|
|
2047
|
+
Fr({
|
|
2058
2048
|
control: h,
|
|
2059
2049
|
existingInputs: [...e, ...u],
|
|
2060
2050
|
sheetId: a
|
|
@@ -2067,7 +2057,7 @@ function Qa({
|
|
|
2067
2057
|
(h) => !d.has(h.id)
|
|
2068
2058
|
), ...u];
|
|
2069
2059
|
}
|
|
2070
|
-
function
|
|
2060
|
+
function Qa({
|
|
2071
2061
|
showFilters: e,
|
|
2072
2062
|
onShowFiltersChange: a,
|
|
2073
2063
|
pickerContent: o,
|
|
@@ -2075,11 +2065,11 @@ function Ya({
|
|
|
2075
2065
|
size: i = "default",
|
|
2076
2066
|
className: s,
|
|
2077
2067
|
primaryButtonClassName: c,
|
|
2078
|
-
secondaryButtonClassName:
|
|
2068
|
+
secondaryButtonClassName: m,
|
|
2079
2069
|
pickerContentClassName: l,
|
|
2080
2070
|
settingsContentClassName: u
|
|
2081
2071
|
}) {
|
|
2082
|
-
const d = i === "toolbar", [
|
|
2072
|
+
const d = i === "toolbar", [p, h] = A(!1), f = rt("interactive");
|
|
2083
2073
|
return /* @__PURE__ */ r(
|
|
2084
2074
|
"div",
|
|
2085
2075
|
{
|
|
@@ -2094,7 +2084,7 @@ function Ya({
|
|
|
2094
2084
|
children: [
|
|
2095
2085
|
/* @__PURE__ */ r(Pe, { open: e, onOpenChange: a, children: [
|
|
2096
2086
|
/* @__PURE__ */ t(Me, { asChild: !0, children: /* @__PURE__ */ r(
|
|
2097
|
-
|
|
2087
|
+
T,
|
|
2098
2088
|
{
|
|
2099
2089
|
variant: "ghost",
|
|
2100
2090
|
size: "xs",
|
|
@@ -2103,7 +2093,7 @@ function Ya({
|
|
|
2103
2093
|
c
|
|
2104
2094
|
),
|
|
2105
2095
|
children: [
|
|
2106
|
-
e ? /* @__PURE__ */ t(
|
|
2096
|
+
e ? /* @__PURE__ */ t(ca, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ t(Vt, { className: "h-3.5 w-3.5" }),
|
|
2107
2097
|
"Filter"
|
|
2108
2098
|
]
|
|
2109
2099
|
}
|
|
@@ -2122,18 +2112,18 @@ function Ya({
|
|
|
2122
2112
|
}
|
|
2123
2113
|
)
|
|
2124
2114
|
] }),
|
|
2125
|
-
/* @__PURE__ */ r(Pe, { open:
|
|
2115
|
+
/* @__PURE__ */ r(Pe, { open: p, onOpenChange: h, children: [
|
|
2126
2116
|
/* @__PURE__ */ t(Me, { asChild: !0, children: /* @__PURE__ */ t(
|
|
2127
|
-
|
|
2117
|
+
T,
|
|
2128
2118
|
{
|
|
2129
2119
|
variant: "ghost",
|
|
2130
2120
|
size: "xs",
|
|
2131
2121
|
className: K(
|
|
2132
2122
|
"h-full w-7 rounded-none border-0 border-l border-border/60 bg-transparent px-0 shadow-none hover:bg-accent/50 data-[state=open]:bg-accent/60",
|
|
2133
|
-
|
|
2123
|
+
m
|
|
2134
2124
|
),
|
|
2135
2125
|
"aria-label": "Filter and control actions",
|
|
2136
|
-
children: /* @__PURE__ */ t(
|
|
2126
|
+
children: /* @__PURE__ */ t(Mt, { className: "h-3.5 w-3.5" })
|
|
2137
2127
|
}
|
|
2138
2128
|
) }),
|
|
2139
2129
|
/* @__PURE__ */ t(
|
|
@@ -2154,41 +2144,41 @@ function Ya({
|
|
|
2154
2144
|
}
|
|
2155
2145
|
);
|
|
2156
2146
|
}
|
|
2157
|
-
function
|
|
2158
|
-
|
|
2159
|
-
const e = L((l) => l.selectedSheetId), a = L((l) => l.selectedFrameId), o = L((l) => l.dashboard), n = L((l) => l.actions.getSelectedFrame), { setSelectedFrameId: i } = be(), { setCard: s } =
|
|
2160
|
-
return
|
|
2147
|
+
function Xa() {
|
|
2148
|
+
ua();
|
|
2149
|
+
const e = L((l) => l.selectedSheetId), a = L((l) => l.selectedFrameId), o = L((l) => l.dashboard), n = L((l) => l.actions.getSelectedFrame), { setSelectedFrameId: i } = be(), { setCard: s } = kt(), c = me((l) => l.card.dataSource);
|
|
2150
|
+
return Q(() => {
|
|
2161
2151
|
var u, d;
|
|
2162
2152
|
let l = n();
|
|
2163
2153
|
if (!l) {
|
|
2164
|
-
const
|
|
2154
|
+
const p = (u = o == null ? void 0 : o.sheets) == null ? void 0 : u.find((f) => f.id === e), h = (d = p == null ? void 0 : p.frames) == null ? void 0 : d[0];
|
|
2165
2155
|
h && (i(h.id), l = h);
|
|
2166
2156
|
}
|
|
2167
2157
|
if (l) {
|
|
2168
|
-
const
|
|
2169
|
-
|
|
2158
|
+
const p = l.cards.find((h) => h.id === l.activeCardId);
|
|
2159
|
+
p && s(p);
|
|
2170
2160
|
}
|
|
2171
2161
|
}, [n, e, a, o, i, s]), {
|
|
2172
2162
|
hasEntities: !!(c != null && c.selectedEntities && c.selectedEntities.length > 0)
|
|
2173
2163
|
};
|
|
2174
2164
|
}
|
|
2175
|
-
function
|
|
2165
|
+
function Ya() {
|
|
2176
2166
|
const e = L((l) => l.dashboard), a = L(
|
|
2177
2167
|
(l) => l.semanticExecutionPayload
|
|
2178
|
-
), o = L((l) => l.actions.addFilter), { hasEntities: n } =
|
|
2179
|
-
() =>
|
|
2168
|
+
), o = L((l) => l.actions.addFilter), { hasEntities: n } = Xa(), { isLoading: i } = Lr(), s = Y(
|
|
2169
|
+
() => Yt(e, a),
|
|
2180
2170
|
[e, a]
|
|
2181
|
-
),
|
|
2171
|
+
), m = !Zt(e.filters) && s.hasEligibleCards && !i;
|
|
2182
2172
|
return /* @__PURE__ */ r("div", { className: "flex h-[520px] w-[400px] flex-col", children: [
|
|
2183
|
-
|
|
2173
|
+
m && /* @__PURE__ */ t("div", { className: "border-b border-border/60 p-2", children: /* @__PURE__ */ r(
|
|
2184
2174
|
"button",
|
|
2185
2175
|
{
|
|
2186
2176
|
type: "button",
|
|
2187
|
-
onClick: () => o(
|
|
2177
|
+
onClick: () => o(Jt()),
|
|
2188
2178
|
title: `Applies to ${s.eligibleCardCount} of ${s.totalCardCount} date-aware cards`,
|
|
2189
2179
|
className: "flex w-full items-start gap-2 rounded-control px-2 py-1.5 text-left outline-none transition-colors hover:bg-muted/40 focus-visible:bg-muted/40 focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-border",
|
|
2190
2180
|
children: [
|
|
2191
|
-
/* @__PURE__ */ t(
|
|
2181
|
+
/* @__PURE__ */ t(va, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
|
|
2192
2182
|
/* @__PURE__ */ r("span", { className: "flex min-w-0 flex-col", children: [
|
|
2193
2183
|
/* @__PURE__ */ t("span", { className: "text-[12px] font-medium text-foreground", children: "Add global date filter" }),
|
|
2194
2184
|
/* @__PURE__ */ t("span", { className: "text-[11px] leading-[1.4] text-muted-foreground", children: "One date range across all date-aware cards." })
|
|
@@ -2197,22 +2187,22 @@ function Xa() {
|
|
|
2197
2187
|
}
|
|
2198
2188
|
) }),
|
|
2199
2189
|
!n && /* @__PURE__ */ r("div", { className: "flex flex-1 flex-col items-center justify-center px-6 py-8 text-center", children: [
|
|
2200
|
-
/* @__PURE__ */ t(
|
|
2190
|
+
/* @__PURE__ */ t(Br, { className: "mb-3 h-10 w-10 text-muted-foreground/50" }),
|
|
2201
2191
|
/* @__PURE__ */ t("h3", { className: "mb-1 text-[13px] font-medium text-foreground", children: "No fields configured" }),
|
|
2202
2192
|
/* @__PURE__ */ t("p", { className: "text-[11px] text-muted-foreground", children: "Configure a data source for this card to enable filtering." })
|
|
2203
2193
|
] }),
|
|
2204
|
-
n && /* @__PURE__ */ t("div", { className: "flex flex-1 overflow-hidden", children: /* @__PURE__ */ t(
|
|
2194
|
+
n && /* @__PURE__ */ t("div", { className: "flex flex-1 overflow-hidden", children: /* @__PURE__ */ t(Tr, { context: "filter" }) })
|
|
2205
2195
|
] });
|
|
2206
2196
|
}
|
|
2207
2197
|
const wt = !1;
|
|
2208
|
-
function
|
|
2198
|
+
function Za({
|
|
2209
2199
|
onAddFilter: e,
|
|
2210
2200
|
onAddControl: a,
|
|
2211
2201
|
onManageControls: o,
|
|
2212
2202
|
onDismiss: n
|
|
2213
2203
|
}) {
|
|
2214
2204
|
const i = L(
|
|
2215
|
-
(
|
|
2205
|
+
(m) => m.dashboard.filterLayout
|
|
2216
2206
|
), { setFilterLayout: s } = be();
|
|
2217
2207
|
i != null && i.displayMode;
|
|
2218
2208
|
const c = (i == null ? void 0 : i.toolbarWrap) ?? !1;
|
|
@@ -2221,7 +2211,7 @@ function Ja({
|
|
|
2221
2211
|
/* @__PURE__ */ t(
|
|
2222
2212
|
Je,
|
|
2223
2213
|
{
|
|
2224
|
-
icon:
|
|
2214
|
+
icon: Vt,
|
|
2225
2215
|
label: "Add filter",
|
|
2226
2216
|
onClick: () => {
|
|
2227
2217
|
e(), n();
|
|
@@ -2231,7 +2221,7 @@ function Ja({
|
|
|
2231
2221
|
/* @__PURE__ */ t(
|
|
2232
2222
|
Je,
|
|
2233
2223
|
{
|
|
2234
|
-
icon:
|
|
2224
|
+
icon: Et,
|
|
2235
2225
|
label: "Add control",
|
|
2236
2226
|
onClick: () => {
|
|
2237
2227
|
a(), n();
|
|
@@ -2241,7 +2231,7 @@ function Ja({
|
|
|
2241
2231
|
/* @__PURE__ */ t(
|
|
2242
2232
|
Je,
|
|
2243
2233
|
{
|
|
2244
|
-
icon:
|
|
2234
|
+
icon: Pt,
|
|
2245
2235
|
label: "Manage controls",
|
|
2246
2236
|
onClick: () => {
|
|
2247
2237
|
o(), n();
|
|
@@ -2254,12 +2244,12 @@ function Ja({
|
|
|
2254
2244
|
/* @__PURE__ */ t("p", { className: "px-1 text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Display" }),
|
|
2255
2245
|
wt,
|
|
2256
2246
|
/* @__PURE__ */ t(
|
|
2257
|
-
|
|
2247
|
+
Ja,
|
|
2258
2248
|
{
|
|
2259
2249
|
id: "filter-display-wrap",
|
|
2260
2250
|
label: "Wrap to multiple lines",
|
|
2261
2251
|
checked: c,
|
|
2262
|
-
onCheckedChange: (
|
|
2252
|
+
onCheckedChange: (m) => s({ toolbarWrap: m === !0 })
|
|
2263
2253
|
}
|
|
2264
2254
|
),
|
|
2265
2255
|
wt
|
|
@@ -2284,7 +2274,7 @@ function Je({
|
|
|
2284
2274
|
}
|
|
2285
2275
|
);
|
|
2286
2276
|
}
|
|
2287
|
-
function
|
|
2277
|
+
function Ja({
|
|
2288
2278
|
id: e,
|
|
2289
2279
|
label: a,
|
|
2290
2280
|
checked: o,
|
|
@@ -2293,7 +2283,7 @@ function en({
|
|
|
2293
2283
|
return /* @__PURE__ */ r("div", { className: "flex items-center gap-2 rounded-control px-1 py-1 transition-colors hover:bg-muted/40 focus-within:bg-muted/40", children: [
|
|
2294
2284
|
/* @__PURE__ */ t(ct, { id: e, checked: o, onCheckedChange: n }),
|
|
2295
2285
|
/* @__PURE__ */ t(
|
|
2296
|
-
|
|
2286
|
+
Ne,
|
|
2297
2287
|
{
|
|
2298
2288
|
htmlFor: e,
|
|
2299
2289
|
className: "cursor-pointer text-[12px] font-normal leading-[1.3]",
|
|
@@ -2302,7 +2292,7 @@ function en({
|
|
|
2302
2292
|
)
|
|
2303
2293
|
] });
|
|
2304
2294
|
}
|
|
2305
|
-
function
|
|
2295
|
+
function ts({
|
|
2306
2296
|
size: e,
|
|
2307
2297
|
className: a,
|
|
2308
2298
|
primaryButtonClassName: o,
|
|
@@ -2310,14 +2300,14 @@ function rs({
|
|
|
2310
2300
|
pickerContentClassName: i,
|
|
2311
2301
|
settingsContentClassName: s
|
|
2312
2302
|
}) {
|
|
2313
|
-
var
|
|
2314
|
-
const [c,
|
|
2303
|
+
var U;
|
|
2304
|
+
const [c, m] = A(null), l = L((b) => b.dashboard), u = L((b) => b.selectedSheetId), d = L((b) => b.showFilters), p = Ur((b) => b.setPanelOpen), h = L((b) => b.actions), { setDocumentPanelTarget: f, setShowFilters: g } = h, k = (U = l.sheets) == null ? void 0 : U.find(
|
|
2315
2305
|
(b) => b.id === u
|
|
2316
|
-
), x =
|
|
2306
|
+
), x = er(k), D = W((b) => {
|
|
2317
2307
|
window.setTimeout(() => {
|
|
2318
|
-
|
|
2308
|
+
m(b);
|
|
2319
2309
|
}, 0);
|
|
2320
|
-
}, []), S =
|
|
2310
|
+
}, []), S = W(
|
|
2321
2311
|
(b) => {
|
|
2322
2312
|
if (x && u) {
|
|
2323
2313
|
b && f(u, {
|
|
@@ -2326,31 +2316,31 @@ function rs({
|
|
|
2326
2316
|
});
|
|
2327
2317
|
return;
|
|
2328
2318
|
}
|
|
2329
|
-
b &&
|
|
2319
|
+
b && p("dashboard", !1), g(b);
|
|
2330
2320
|
},
|
|
2331
2321
|
[
|
|
2332
2322
|
x,
|
|
2333
2323
|
u,
|
|
2334
2324
|
f,
|
|
2335
|
-
|
|
2325
|
+
p,
|
|
2336
2326
|
g
|
|
2337
2327
|
]
|
|
2338
|
-
), C =
|
|
2328
|
+
), C = W(() => {
|
|
2339
2329
|
S(!0);
|
|
2340
|
-
}, [S]), w =
|
|
2330
|
+
}, [S]), w = W(() => {
|
|
2341
2331
|
D("create");
|
|
2342
|
-
}, [D]), E =
|
|
2332
|
+
}, [D]), E = W(() => {
|
|
2343
2333
|
D("manage");
|
|
2344
2334
|
}, [D]);
|
|
2345
|
-
return /* @__PURE__ */ r(
|
|
2335
|
+
return /* @__PURE__ */ r($, { children: [
|
|
2346
2336
|
/* @__PURE__ */ t(
|
|
2347
|
-
|
|
2337
|
+
Qa,
|
|
2348
2338
|
{
|
|
2349
2339
|
showFilters: x ? !1 : d,
|
|
2350
2340
|
onShowFiltersChange: S,
|
|
2351
|
-
pickerContent: /* @__PURE__ */ t(
|
|
2341
|
+
pickerContent: /* @__PURE__ */ t(Ya, {}),
|
|
2352
2342
|
settingsContent: (b) => /* @__PURE__ */ t(
|
|
2353
|
-
|
|
2343
|
+
Za,
|
|
2354
2344
|
{
|
|
2355
2345
|
onAddFilter: C,
|
|
2356
2346
|
onAddControl: w,
|
|
@@ -2367,20 +2357,20 @@ function rs({
|
|
|
2367
2357
|
}
|
|
2368
2358
|
),
|
|
2369
2359
|
c ? x ? /* @__PURE__ */ t(
|
|
2370
|
-
|
|
2360
|
+
Wa,
|
|
2371
2361
|
{
|
|
2372
2362
|
open: !0,
|
|
2373
2363
|
onOpenChange: (b) => {
|
|
2374
|
-
b ||
|
|
2364
|
+
b || m(null);
|
|
2375
2365
|
},
|
|
2376
2366
|
initialMode: c
|
|
2377
2367
|
}
|
|
2378
2368
|
) : /* @__PURE__ */ t(
|
|
2379
|
-
|
|
2369
|
+
$a,
|
|
2380
2370
|
{
|
|
2381
2371
|
open: !0,
|
|
2382
2372
|
onOpenChange: (b) => {
|
|
2383
|
-
b ||
|
|
2373
|
+
b || m(null);
|
|
2384
2374
|
},
|
|
2385
2375
|
showTrigger: !1,
|
|
2386
2376
|
initialMode: c
|
|
@@ -2388,7 +2378,7 @@ function rs({
|
|
|
2388
2378
|
) : null
|
|
2389
2379
|
] });
|
|
2390
2380
|
}
|
|
2391
|
-
function
|
|
2381
|
+
function en({
|
|
2392
2382
|
disabled: e,
|
|
2393
2383
|
briefingCount: a,
|
|
2394
2384
|
className: o,
|
|
@@ -2396,7 +2386,7 @@ function tn({
|
|
|
2396
2386
|
}) {
|
|
2397
2387
|
const i = typeof a == "number" && a > 0;
|
|
2398
2388
|
return /* @__PURE__ */ r(
|
|
2399
|
-
|
|
2389
|
+
T,
|
|
2400
2390
|
{
|
|
2401
2391
|
type: "button",
|
|
2402
2392
|
size: "xs",
|
|
@@ -2406,18 +2396,18 @@ function tn({
|
|
|
2406
2396
|
onClick: n,
|
|
2407
2397
|
"aria-label": "Reports & briefings",
|
|
2408
2398
|
children: [
|
|
2409
|
-
/* @__PURE__ */ t(
|
|
2399
|
+
/* @__PURE__ */ t(Ca, { className: "h-3.5 w-3.5" }),
|
|
2410
2400
|
"Reports & briefings",
|
|
2411
2401
|
i ? /* @__PURE__ */ t("span", { className: "ml-0.5 rounded-control bg-muted px-1 text-[10px] tabular-nums text-foreground/70", children: a }) : null
|
|
2412
2402
|
]
|
|
2413
2403
|
}
|
|
2414
2404
|
);
|
|
2415
2405
|
}
|
|
2416
|
-
const
|
|
2417
|
-
function
|
|
2406
|
+
const tn = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", jt = "inline-flex h-7 items-center gap-1.5 rounded-control px-2 text-[12px] text-muted-foreground hover:bg-muted hover:text-foreground disabled:opacity-50", Ve = "inline-flex h-7 items-center gap-1.5 rounded-control bg-primary px-3 text-[12px] font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-50";
|
|
2407
|
+
function rn(e) {
|
|
2418
2408
|
return e === "dashboard" ? "This dashboard" : "Project";
|
|
2419
2409
|
}
|
|
2420
|
-
function
|
|
2410
|
+
function an(e) {
|
|
2421
2411
|
if (!e) return "Never";
|
|
2422
2412
|
const a = new Date(e);
|
|
2423
2413
|
if (Number.isNaN(a.getTime())) return "Unknown";
|
|
@@ -2431,26 +2421,26 @@ function nn(e) {
|
|
|
2431
2421
|
const c = Math.round(s / 7);
|
|
2432
2422
|
return c < 5 ? `${c}w ago` : `${Math.round(s / 30)}mo ago`;
|
|
2433
2423
|
}
|
|
2434
|
-
function
|
|
2435
|
-
return e.scheduleExpr ?
|
|
2424
|
+
function nn(e) {
|
|
2425
|
+
return e.scheduleExpr ? ga(
|
|
2436
2426
|
e.scheduleExpr,
|
|
2437
2427
|
e.timezone || "UTC"
|
|
2438
2428
|
) ?? "Invalid schedule" : "On demand";
|
|
2439
2429
|
}
|
|
2440
|
-
function
|
|
2430
|
+
function sn(e) {
|
|
2441
2431
|
if (e.lastRunStatus) {
|
|
2442
2432
|
const a = e.lastRunStatus.toString().toUpperCase();
|
|
2443
2433
|
return a === "SUCCESS" ? "Last run completed." : a === "FAILED" ? "Last run failed." : `Last run ${e.lastRunStatus.toString().toLowerCase()}`;
|
|
2444
2434
|
}
|
|
2445
2435
|
return null;
|
|
2446
2436
|
}
|
|
2447
|
-
function
|
|
2437
|
+
function Wt(e) {
|
|
2448
2438
|
return e.hasActiveRun ? "Running" : e.lastRunStatus ? `Last run ${e.lastRunStatus.toString().toLowerCase()}` : "Idle";
|
|
2449
2439
|
}
|
|
2450
|
-
function
|
|
2440
|
+
function on(e) {
|
|
2451
2441
|
return e.source.type === "dashboard" ? "This dashboard" : "Project";
|
|
2452
2442
|
}
|
|
2453
|
-
function
|
|
2443
|
+
function ln({
|
|
2454
2444
|
activeView: e,
|
|
2455
2445
|
onChange: a
|
|
2456
2446
|
}) {
|
|
@@ -2473,7 +2463,7 @@ function dn({
|
|
|
2473
2463
|
"h-6 rounded-[3px] px-2 text-[11px] transition-colors",
|
|
2474
2464
|
n ? "bg-background font-medium text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"
|
|
2475
2465
|
),
|
|
2476
|
-
children:
|
|
2466
|
+
children: rn(o)
|
|
2477
2467
|
},
|
|
2478
2468
|
o
|
|
2479
2469
|
);
|
|
@@ -2481,7 +2471,7 @@ function dn({
|
|
|
2481
2471
|
}
|
|
2482
2472
|
);
|
|
2483
2473
|
}
|
|
2484
|
-
function
|
|
2474
|
+
function dn({
|
|
2485
2475
|
briefings: e,
|
|
2486
2476
|
dashboardLabel: a,
|
|
2487
2477
|
sourceView: o,
|
|
@@ -2489,11 +2479,11 @@ function cn({
|
|
|
2489
2479
|
loading: i,
|
|
2490
2480
|
onSourceViewChange: s,
|
|
2491
2481
|
onClose: c,
|
|
2492
|
-
onEdit:
|
|
2482
|
+
onEdit: m,
|
|
2493
2483
|
onNew: l,
|
|
2494
2484
|
canCreate: u,
|
|
2495
2485
|
canCreateScheduledReport: d,
|
|
2496
|
-
analyticalBriefingsEnabled:
|
|
2486
|
+
analyticalBriefingsEnabled: p,
|
|
2497
2487
|
onRunNow: h,
|
|
2498
2488
|
onTogglePause: f,
|
|
2499
2489
|
onDelete: g,
|
|
@@ -2503,17 +2493,17 @@ function cn({
|
|
|
2503
2493
|
contentKind: S,
|
|
2504
2494
|
hideHeader: C = !1
|
|
2505
2495
|
}) {
|
|
2506
|
-
const w = e.length, E = e.filter((
|
|
2496
|
+
const w = e.length, E = e.filter((I) => I.status === "ACTIVE").length, U = S === "reports" ? w === 1 ? "report" : "reports" : S === "briefings" ? w === 1 ? "briefing" : "briefings" : w === 1 ? "item" : "items", b = e.find((I) => I.hasActiveRun) ?? null, y = S ?? "reports & briefings", R = o === "dashboard" ? a : `Project ${y}`;
|
|
2507
2497
|
return /* @__PURE__ */ r(
|
|
2508
2498
|
"section",
|
|
2509
2499
|
{
|
|
2510
|
-
"aria-label": `Dashboard ${
|
|
2500
|
+
"aria-label": `Dashboard ${y.replace("&", "and")}`,
|
|
2511
2501
|
className: "flex h-full min-h-0 flex-col bg-background text-foreground",
|
|
2512
2502
|
children: [
|
|
2513
2503
|
C ? null : /* @__PURE__ */ r("header", { className: "flex items-start justify-between gap-3 border-b border-border px-4 py-3", children: [
|
|
2514
2504
|
/* @__PURE__ */ r("div", { className: "min-w-0", children: [
|
|
2515
|
-
/* @__PURE__ */ t("div", { className:
|
|
2516
|
-
/* @__PURE__ */ t("h2", { className: "mt-0.5 truncate text-[14px] font-semibold leading-5", children:
|
|
2505
|
+
/* @__PURE__ */ t("div", { className: tn, children: y }),
|
|
2506
|
+
/* @__PURE__ */ t("h2", { className: "mt-0.5 truncate text-[14px] font-semibold leading-5", children: R })
|
|
2517
2507
|
] }),
|
|
2518
2508
|
/* @__PURE__ */ t(
|
|
2519
2509
|
"button",
|
|
@@ -2521,15 +2511,15 @@ function cn({
|
|
|
2521
2511
|
type: "button",
|
|
2522
2512
|
onClick: c,
|
|
2523
2513
|
className: "rounded-control p-1 text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
2524
|
-
"aria-label": `Close ${
|
|
2525
|
-
children: /* @__PURE__ */ t(
|
|
2514
|
+
"aria-label": `Close ${y.replace("&", "and")} panel`,
|
|
2515
|
+
children: /* @__PURE__ */ t(qe, { className: "h-3.5 w-3.5" })
|
|
2526
2516
|
}
|
|
2527
2517
|
)
|
|
2528
2518
|
] }),
|
|
2529
2519
|
/* @__PURE__ */ r("div", { className: "flex items-center justify-between gap-3 border-b border-border px-4 py-2", children: [
|
|
2530
2520
|
/* @__PURE__ */ r("div", { className: "flex min-w-0 items-center gap-3", children: [
|
|
2531
2521
|
/* @__PURE__ */ t(
|
|
2532
|
-
|
|
2522
|
+
ln,
|
|
2533
2523
|
{
|
|
2534
2524
|
activeView: o,
|
|
2535
2525
|
onChange: s
|
|
@@ -2537,17 +2527,17 @@ function cn({
|
|
|
2537
2527
|
),
|
|
2538
2528
|
/* @__PURE__ */ t("div", { className: "flex min-w-0 items-center gap-1.5 text-[11px] text-muted-foreground", children: i && w === 0 ? /* @__PURE__ */ r("span", { children: [
|
|
2539
2529
|
"Loading ",
|
|
2540
|
-
|
|
2530
|
+
y,
|
|
2541
2531
|
"…"
|
|
2542
2532
|
] }) : w === 0 ? /* @__PURE__ */ r("span", { children: [
|
|
2543
2533
|
"No ",
|
|
2544
|
-
|
|
2534
|
+
y,
|
|
2545
2535
|
" yet"
|
|
2546
|
-
] }) : /* @__PURE__ */ r(
|
|
2536
|
+
] }) : /* @__PURE__ */ r($, { children: [
|
|
2547
2537
|
/* @__PURE__ */ r("span", { className: "font-medium text-foreground/80", children: [
|
|
2548
2538
|
w,
|
|
2549
2539
|
" ",
|
|
2550
|
-
|
|
2540
|
+
U
|
|
2551
2541
|
] }),
|
|
2552
2542
|
/* @__PURE__ */ t("span", { className: "text-border", children: "·" }),
|
|
2553
2543
|
/* @__PURE__ */ r("span", { children: [
|
|
@@ -2562,17 +2552,17 @@ function cn({
|
|
|
2562
2552
|
// when a manual reload is in flight, but don't show a separate
|
|
2563
2553
|
// refresh button — close+reopen handles the rare "stale list"
|
|
2564
2554
|
// case without crowding the toolbar.
|
|
2565
|
-
/* @__PURE__ */ t(
|
|
2555
|
+
/* @__PURE__ */ t(re, { className: "h-3.5 w-3.5 animate-spin text-muted-foreground" })
|
|
2566
2556
|
) : null,
|
|
2567
|
-
w > 0 && u ?
|
|
2568
|
-
/* @__PURE__ */ t(We, { asChild: !0, children: /* @__PURE__ */ r("button", { className:
|
|
2557
|
+
w > 0 && u ? p && d ? /* @__PURE__ */ r(je, { children: [
|
|
2558
|
+
/* @__PURE__ */ t(We, { asChild: !0, children: /* @__PURE__ */ r("button", { className: Ve, children: [
|
|
2569
2559
|
/* @__PURE__ */ t(ge, { className: "h-3 w-3" }),
|
|
2570
2560
|
" New"
|
|
2571
2561
|
] }) }),
|
|
2572
2562
|
/* @__PURE__ */ r(He, { align: "end", children: [
|
|
2573
|
-
/* @__PURE__ */ t(
|
|
2563
|
+
/* @__PURE__ */ t(G, { onClick: () => l("scheduled_report"), children: "Schedule a report" }),
|
|
2574
2564
|
/* @__PURE__ */ t(
|
|
2575
|
-
|
|
2565
|
+
G,
|
|
2576
2566
|
{
|
|
2577
2567
|
onClick: () => l("analytical_briefing"),
|
|
2578
2568
|
children: "Create analytical briefing"
|
|
@@ -2583,17 +2573,17 @@ function cn({
|
|
|
2583
2573
|
"button",
|
|
2584
2574
|
{
|
|
2585
2575
|
onClick: () => l("scheduled_report"),
|
|
2586
|
-
className:
|
|
2576
|
+
className: Ve,
|
|
2587
2577
|
children: [
|
|
2588
2578
|
/* @__PURE__ */ t(ge, { className: "h-3 w-3" }),
|
|
2589
2579
|
" Schedule report"
|
|
2590
2580
|
]
|
|
2591
2581
|
}
|
|
2592
|
-
) :
|
|
2582
|
+
) : p ? /* @__PURE__ */ r(
|
|
2593
2583
|
"button",
|
|
2594
2584
|
{
|
|
2595
2585
|
onClick: () => l("analytical_briefing"),
|
|
2596
|
-
className:
|
|
2586
|
+
className: Ve,
|
|
2597
2587
|
children: [
|
|
2598
2588
|
/* @__PURE__ */ t(ge, { className: "h-3 w-3" }),
|
|
2599
2589
|
" New briefing"
|
|
@@ -2603,45 +2593,45 @@ function cn({
|
|
|
2603
2593
|
] })
|
|
2604
2594
|
] }),
|
|
2605
2595
|
b ? /* @__PURE__ */ r("div", { className: "flex items-center gap-2 border-b border-border bg-muted/60 px-4 py-2 text-[12px]", children: [
|
|
2606
|
-
/* @__PURE__ */ t(
|
|
2596
|
+
/* @__PURE__ */ t(re, { className: "h-3 w-3 shrink-0 animate-spin text-muted-foreground" }),
|
|
2607
2597
|
/* @__PURE__ */ t("span", { className: "font-medium text-foreground", children: b.name }),
|
|
2608
2598
|
/* @__PURE__ */ t("span", { className: "text-border", children: "·" }),
|
|
2609
|
-
/* @__PURE__ */ t("span", { className: "truncate text-muted-foreground", children:
|
|
2599
|
+
/* @__PURE__ */ t("span", { className: "truncate text-muted-foreground", children: Wt(b) })
|
|
2610
2600
|
] }) : null,
|
|
2611
2601
|
/* @__PURE__ */ r("div", { className: "flex-1 overflow-y-auto", children: [
|
|
2612
2602
|
n ? /* @__PURE__ */ t("div", { className: "m-4 rounded-card border border-destructive/30 bg-destructive/10 px-3 py-2 text-[12px] text-destructive", children: n }) : null,
|
|
2613
2603
|
!i && e.length === 0 && !n ? /* @__PURE__ */ t(
|
|
2614
|
-
|
|
2604
|
+
cn,
|
|
2615
2605
|
{
|
|
2616
2606
|
onNew: l,
|
|
2617
2607
|
canCreate: u,
|
|
2618
2608
|
canCreateScheduledReport: d,
|
|
2619
|
-
analyticalBriefingsEnabled:
|
|
2609
|
+
analyticalBriefingsEnabled: p,
|
|
2620
2610
|
contentKind: S
|
|
2621
2611
|
}
|
|
2622
2612
|
) : null,
|
|
2623
|
-
e.map((
|
|
2624
|
-
|
|
2613
|
+
e.map((I) => /* @__PURE__ */ t(
|
|
2614
|
+
hn,
|
|
2625
2615
|
{
|
|
2626
|
-
briefing:
|
|
2627
|
-
isOpening: k ===
|
|
2628
|
-
isBusy: x ===
|
|
2629
|
-
onOpen: () =>
|
|
2630
|
-
onRunNow: () => h(
|
|
2631
|
-
onTogglePause: () => f(
|
|
2632
|
-
onDelete: () => g(
|
|
2616
|
+
briefing: I,
|
|
2617
|
+
isOpening: k === I.id,
|
|
2618
|
+
isBusy: x === I.id,
|
|
2619
|
+
onOpen: () => m(I.id),
|
|
2620
|
+
onRunNow: () => h(I),
|
|
2621
|
+
onTogglePause: () => f(I),
|
|
2622
|
+
onDelete: () => g(I)
|
|
2633
2623
|
},
|
|
2634
|
-
|
|
2624
|
+
I.id
|
|
2635
2625
|
))
|
|
2636
2626
|
] }),
|
|
2637
2627
|
D ? /* @__PURE__ */ t("div", { className: "border-t border-border px-4 py-2.5", children: /* @__PURE__ */ r(
|
|
2638
2628
|
"a",
|
|
2639
2629
|
{
|
|
2640
2630
|
href: D,
|
|
2641
|
-
className: K(
|
|
2631
|
+
className: K(jt, "h-6 px-1 text-[11px]"),
|
|
2642
2632
|
children: [
|
|
2643
2633
|
"Manage all reports & briefings",
|
|
2644
|
-
/* @__PURE__ */ t(
|
|
2634
|
+
/* @__PURE__ */ t(xa, { className: "h-3 w-3" })
|
|
2645
2635
|
]
|
|
2646
2636
|
}
|
|
2647
2637
|
) }) : null
|
|
@@ -2649,7 +2639,7 @@ function cn({
|
|
|
2649
2639
|
}
|
|
2650
2640
|
);
|
|
2651
2641
|
}
|
|
2652
|
-
function
|
|
2642
|
+
function cn({
|
|
2653
2643
|
onNew: e,
|
|
2654
2644
|
canCreate: a,
|
|
2655
2645
|
canCreateScheduledReport: o,
|
|
@@ -2664,7 +2654,7 @@ function un({
|
|
|
2664
2654
|
description: "Create an analytical briefing to monitor this dashboard and brief your team."
|
|
2665
2655
|
} : null;
|
|
2666
2656
|
return /* @__PURE__ */ r("div", { className: "flex h-full flex-col items-center justify-center px-8 py-12 text-center", children: [
|
|
2667
|
-
/* @__PURE__ */ t(
|
|
2657
|
+
/* @__PURE__ */ t(un, { className: "mb-5 h-[88px] w-[112px] text-border" }),
|
|
2668
2658
|
/* @__PURE__ */ t("div", { className: "text-[13px] font-medium text-foreground", children: (s == null ? void 0 : s.title) ?? "Have an analyst brief your team" }),
|
|
2669
2659
|
/* @__PURE__ */ t("p", { className: "mt-1.5 max-w-[320px] text-[12px] leading-5 text-muted-foreground", children: (s == null ? void 0 : s.description) ?? "Describe what to watch. An analyst digs into this dashboard and the data behind it, then briefs your team on the cadence you choose." }),
|
|
2670
2660
|
a ? /* @__PURE__ */ r("div", { className: "mt-4 flex flex-wrap justify-center gap-2", children: [
|
|
@@ -2672,7 +2662,7 @@ function un({
|
|
|
2672
2662
|
"button",
|
|
2673
2663
|
{
|
|
2674
2664
|
onClick: () => e("scheduled_report"),
|
|
2675
|
-
className:
|
|
2665
|
+
className: Ve,
|
|
2676
2666
|
children: [
|
|
2677
2667
|
/* @__PURE__ */ t(ge, { className: "h-3 w-3" }),
|
|
2678
2668
|
" Schedule a report"
|
|
@@ -2683,14 +2673,14 @@ function un({
|
|
|
2683
2673
|
"button",
|
|
2684
2674
|
{
|
|
2685
2675
|
onClick: () => e("analytical_briefing"),
|
|
2686
|
-
className:
|
|
2676
|
+
className: jt,
|
|
2687
2677
|
children: "Create analytical briefing"
|
|
2688
2678
|
}
|
|
2689
2679
|
) : null
|
|
2690
2680
|
] }) : null
|
|
2691
2681
|
] });
|
|
2692
2682
|
}
|
|
2693
|
-
function
|
|
2683
|
+
function un({ className: e }) {
|
|
2694
2684
|
return /* @__PURE__ */ r(
|
|
2695
2685
|
"svg",
|
|
2696
2686
|
{
|
|
@@ -2867,7 +2857,7 @@ function hn({ className: e }) {
|
|
|
2867
2857
|
}
|
|
2868
2858
|
);
|
|
2869
2859
|
}
|
|
2870
|
-
function
|
|
2860
|
+
function hn({
|
|
2871
2861
|
briefing: e,
|
|
2872
2862
|
isOpening: a,
|
|
2873
2863
|
isBusy: o,
|
|
@@ -2876,13 +2866,13 @@ function mn({
|
|
|
2876
2866
|
onTogglePause: s,
|
|
2877
2867
|
onDelete: c
|
|
2878
2868
|
}) {
|
|
2879
|
-
const
|
|
2869
|
+
const m = e.status === "PAUSED", l = e.hasActiveRun, u = sn(e), d = an(e.lastRunAt), p = e.lastRunStatus, h = se(e), f = p === "SUCCESS" ? Ue.success.dot : p === "FAILED" ? Ue.danger.dot : p ? Ue.warning.dot : Ue.neutral.dot;
|
|
2880
2870
|
return /* @__PURE__ */ r(
|
|
2881
2871
|
"div",
|
|
2882
2872
|
{
|
|
2883
2873
|
className: K(
|
|
2884
2874
|
"group relative border-b border-border/60 px-4 py-3 transition-colors hover:bg-muted/60",
|
|
2885
|
-
|
|
2875
|
+
m && "opacity-70"
|
|
2886
2876
|
),
|
|
2887
2877
|
children: [
|
|
2888
2878
|
/* @__PURE__ */ r(
|
|
@@ -2898,16 +2888,16 @@ function mn({
|
|
|
2898
2888
|
children: [
|
|
2899
2889
|
/* @__PURE__ */ r("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
2900
2890
|
/* @__PURE__ */ t("span", { className: "truncate text-[13px] font-medium text-foreground", children: e.name }),
|
|
2901
|
-
|
|
2891
|
+
m ? /* @__PURE__ */ t("span", { className: "shrink-0 text-[11px] text-muted-foreground", children: "· Paused" }) : null
|
|
2902
2892
|
] }),
|
|
2903
2893
|
/* @__PURE__ */ r("div", { className: "mt-1 flex flex-wrap items-center gap-x-1.5 text-[11px] text-muted-foreground", children: [
|
|
2904
2894
|
/* @__PURE__ */ t("span", { children: h.typeLabel }),
|
|
2905
2895
|
/* @__PURE__ */ t("span", { className: "text-border", children: "·" }),
|
|
2906
|
-
/* @__PURE__ */ t("span", { children:
|
|
2896
|
+
/* @__PURE__ */ t("span", { children: on(e) }),
|
|
2907
2897
|
/* @__PURE__ */ t("span", { className: "text-border", children: "·" }),
|
|
2908
2898
|
/* @__PURE__ */ t(Rr, { className: "h-3 w-3" }),
|
|
2909
|
-
/* @__PURE__ */ t("span", { className: "truncate", children:
|
|
2910
|
-
e.lastRunAt ? /* @__PURE__ */ r(
|
|
2899
|
+
/* @__PURE__ */ t("span", { className: "truncate", children: nn(e) }),
|
|
2900
|
+
e.lastRunAt ? /* @__PURE__ */ r($, { children: [
|
|
2911
2901
|
/* @__PURE__ */ t("span", { className: "text-border", children: "·" }),
|
|
2912
2902
|
/* @__PURE__ */ r("span", { children: [
|
|
2913
2903
|
"Last run ",
|
|
@@ -2916,7 +2906,7 @@ function mn({
|
|
|
2916
2906
|
] }) : null
|
|
2917
2907
|
] }),
|
|
2918
2908
|
u || l ? /* @__PURE__ */ r("div", { className: "mt-1.5 flex items-center gap-1.5 text-[12px] leading-[1.5] text-foreground/80", children: [
|
|
2919
|
-
l ? /* @__PURE__ */ t(
|
|
2909
|
+
l ? /* @__PURE__ */ t(re, { className: "h-3 w-3 shrink-0 animate-spin text-muted-foreground/70" }) : /* @__PURE__ */ t(
|
|
2920
2910
|
"span",
|
|
2921
2911
|
{
|
|
2922
2912
|
className: K(
|
|
@@ -2925,12 +2915,12 @@ function mn({
|
|
|
2925
2915
|
)
|
|
2926
2916
|
}
|
|
2927
2917
|
),
|
|
2928
|
-
/* @__PURE__ */ t("span", { className: "truncate", children: l ?
|
|
2918
|
+
/* @__PURE__ */ t("span", { className: "truncate", children: l ? Wt(e) : u })
|
|
2929
2919
|
] }) : null
|
|
2930
2920
|
]
|
|
2931
2921
|
}
|
|
2932
2922
|
),
|
|
2933
|
-
/* @__PURE__ */ t("div", { className: "absolute right-3 top-3", children: o ? /* @__PURE__ */ t(
|
|
2923
|
+
/* @__PURE__ */ t("div", { className: "absolute right-3 top-3", children: o ? /* @__PURE__ */ t(re, { className: "h-3.5 w-3.5 animate-spin text-muted-foreground/70" }) : a ? /* @__PURE__ */ t(re, { className: "h-3.5 w-3.5 animate-spin text-muted-foreground/70" }) : /* @__PURE__ */ r(je, { children: [
|
|
2934
2924
|
/* @__PURE__ */ t(We, { asChild: !0, children: /* @__PURE__ */ t(
|
|
2935
2925
|
"button",
|
|
2936
2926
|
{
|
|
@@ -2938,45 +2928,45 @@ function mn({
|
|
|
2938
2928
|
onClick: (g) => g.stopPropagation(),
|
|
2939
2929
|
className: "inline-flex h-6 w-6 items-center justify-center rounded-control text-muted-foreground/70 opacity-60 hover:bg-muted hover:text-foreground/80 focus-visible:opacity-100 group-hover:opacity-100",
|
|
2940
2930
|
"aria-label": `${h.noun === "report" ? "Report" : "Briefing"} actions`,
|
|
2941
|
-
children: /* @__PURE__ */ t(
|
|
2931
|
+
children: /* @__PURE__ */ t(Lt, { className: "h-3.5 w-3.5" })
|
|
2942
2932
|
}
|
|
2943
2933
|
) }),
|
|
2944
2934
|
/* @__PURE__ */ r(He, { align: "end", className: "w-44", children: [
|
|
2945
|
-
/* @__PURE__ */ r(
|
|
2946
|
-
/* @__PURE__ */ t(
|
|
2935
|
+
/* @__PURE__ */ r(G, { onClick: n, children: [
|
|
2936
|
+
/* @__PURE__ */ t(Pt, { className: "h-3.5 w-3.5" }),
|
|
2947
2937
|
"Edit ",
|
|
2948
2938
|
h.noun
|
|
2949
2939
|
] }),
|
|
2950
2940
|
/* @__PURE__ */ r(
|
|
2951
|
-
|
|
2941
|
+
G,
|
|
2952
2942
|
{
|
|
2953
2943
|
onClick: (g) => {
|
|
2954
2944
|
g.preventDefault(), i();
|
|
2955
2945
|
},
|
|
2956
2946
|
children: [
|
|
2957
|
-
/* @__PURE__ */ t(
|
|
2947
|
+
/* @__PURE__ */ t(Vr, { className: "h-3.5 w-3.5" }),
|
|
2958
2948
|
"Run now"
|
|
2959
2949
|
]
|
|
2960
2950
|
}
|
|
2961
2951
|
),
|
|
2962
2952
|
e.scheduleExpr ? /* @__PURE__ */ t(
|
|
2963
|
-
|
|
2953
|
+
G,
|
|
2964
2954
|
{
|
|
2965
2955
|
onClick: (g) => {
|
|
2966
2956
|
g.preventDefault(), s();
|
|
2967
2957
|
},
|
|
2968
|
-
children:
|
|
2969
|
-
/* @__PURE__ */ t(
|
|
2958
|
+
children: m ? /* @__PURE__ */ r($, { children: [
|
|
2959
|
+
/* @__PURE__ */ t(Pr, { className: "h-3.5 w-3.5" }),
|
|
2970
2960
|
"Resume"
|
|
2971
|
-
] }) : /* @__PURE__ */ r(
|
|
2972
|
-
/* @__PURE__ */ t(
|
|
2961
|
+
] }) : /* @__PURE__ */ r($, { children: [
|
|
2962
|
+
/* @__PURE__ */ t(Mr, { className: "h-3.5 w-3.5" }),
|
|
2973
2963
|
"Pause"
|
|
2974
2964
|
] })
|
|
2975
2965
|
}
|
|
2976
2966
|
) : null,
|
|
2977
2967
|
/* @__PURE__ */ t(ze, {}),
|
|
2978
2968
|
/* @__PURE__ */ r(
|
|
2979
|
-
|
|
2969
|
+
G,
|
|
2980
2970
|
{
|
|
2981
2971
|
onClick: (g) => {
|
|
2982
2972
|
g.preventDefault(), c();
|
|
@@ -2995,19 +2985,19 @@ function mn({
|
|
|
2995
2985
|
}
|
|
2996
2986
|
);
|
|
2997
2987
|
}
|
|
2998
|
-
const
|
|
2999
|
-
function
|
|
2988
|
+
const mn = 2e3, pn = 20 * 6e4;
|
|
2989
|
+
function fn(e) {
|
|
3000
2990
|
return (e == null ? void 0 : e.trim()) || "This dashboard";
|
|
3001
2991
|
}
|
|
3002
|
-
function
|
|
2992
|
+
function gn(e) {
|
|
3003
2993
|
return e === "This dashboard" ? "Watch this dashboard" : `Watch ${e}`;
|
|
3004
2994
|
}
|
|
3005
|
-
function
|
|
2995
|
+
function bn(e, a, o) {
|
|
3006
2996
|
return a !== "dashboard" ? e : e.filter(
|
|
3007
2997
|
(n) => n.source.type === "dashboard" && n.source.dashboardId === o
|
|
3008
2998
|
);
|
|
3009
2999
|
}
|
|
3010
|
-
async function
|
|
3000
|
+
async function xn(e) {
|
|
3011
3001
|
const o = [];
|
|
3012
3002
|
let n = 1, i = 0, s = Number.POSITIVE_INFINITY;
|
|
3013
3003
|
for (; i < s; ) {
|
|
@@ -3021,15 +3011,15 @@ async function vn(e) {
|
|
|
3021
3011
|
}
|
|
3022
3012
|
return o;
|
|
3023
3013
|
}
|
|
3024
|
-
const
|
|
3025
|
-
listBriefings:
|
|
3026
|
-
getBriefing:
|
|
3027
|
-
pauseBriefing:
|
|
3028
|
-
resumeBriefing:
|
|
3029
|
-
deleteBriefing:
|
|
3030
|
-
runBriefingNow:
|
|
3014
|
+
const vn = {
|
|
3015
|
+
listBriefings: Gr,
|
|
3016
|
+
getBriefing: Hr,
|
|
3017
|
+
pauseBriefing: Wr,
|
|
3018
|
+
resumeBriefing: jr,
|
|
3019
|
+
deleteBriefing: $r,
|
|
3020
|
+
runBriefingNow: zr
|
|
3031
3021
|
};
|
|
3032
|
-
function
|
|
3022
|
+
function yn({
|
|
3033
3023
|
briefingId: e,
|
|
3034
3024
|
initialRun: a,
|
|
3035
3025
|
apiServiceUrl: o,
|
|
@@ -3038,34 +3028,34 @@ function Cn({
|
|
|
3038
3028
|
onTimeout: s,
|
|
3039
3029
|
onExpand: c
|
|
3040
3030
|
}) {
|
|
3041
|
-
const [
|
|
3031
|
+
const [m, l] = A(a), { startRun: u } = ea({
|
|
3042
3032
|
apiServiceUrl: o,
|
|
3043
3033
|
token: n,
|
|
3044
|
-
intervalMs:
|
|
3045
|
-
timeoutMs:
|
|
3034
|
+
intervalMs: mn,
|
|
3035
|
+
timeoutMs: pn,
|
|
3046
3036
|
fetchRun: ({
|
|
3047
|
-
apiServiceUrl:
|
|
3037
|
+
apiServiceUrl: p,
|
|
3048
3038
|
token: h,
|
|
3049
3039
|
runId: f
|
|
3050
|
-
}) =>
|
|
3051
|
-
onRun: (
|
|
3052
|
-
l(
|
|
3040
|
+
}) => ta(p, h, e, f),
|
|
3041
|
+
onRun: (p) => {
|
|
3042
|
+
l(p);
|
|
3053
3043
|
},
|
|
3054
|
-
onTerminalRun: (
|
|
3055
|
-
i(
|
|
3044
|
+
onTerminalRun: (p) => {
|
|
3045
|
+
i(p);
|
|
3056
3046
|
},
|
|
3057
3047
|
onTimeout: () => {
|
|
3058
3048
|
s();
|
|
3059
3049
|
}
|
|
3060
3050
|
}), d = ce(!1);
|
|
3061
|
-
return
|
|
3062
|
-
d.current || (d.current = !0,
|
|
3063
|
-
}, [a, i, u]), /* @__PURE__ */ t(
|
|
3051
|
+
return Q(() => {
|
|
3052
|
+
d.current || (d.current = !0, ra(a.status) ? u(a) : aa(a.status) && i(a));
|
|
3053
|
+
}, [a, i, u]), /* @__PURE__ */ t(na, { run: m, onExpand: c });
|
|
3064
3054
|
}
|
|
3065
|
-
function
|
|
3066
|
-
return /* @__PURE__ */ t(
|
|
3055
|
+
function rs(e) {
|
|
3056
|
+
return /* @__PURE__ */ t(Or, { children: /* @__PURE__ */ t(Cn, { ...e }) });
|
|
3067
3057
|
}
|
|
3068
|
-
function
|
|
3058
|
+
function Cn({
|
|
3069
3059
|
dashboardId: e,
|
|
3070
3060
|
dashboardTitle: a,
|
|
3071
3061
|
apiServiceUrl: o,
|
|
@@ -3073,62 +3063,62 @@ function wn({
|
|
|
3073
3063
|
disabled: i,
|
|
3074
3064
|
className: s,
|
|
3075
3065
|
manageBriefingsHref: c,
|
|
3076
|
-
open:
|
|
3066
|
+
open: m,
|
|
3077
3067
|
onOpenChange: l,
|
|
3078
3068
|
hideTrigger: u = !1,
|
|
3079
3069
|
workflowIntent: d,
|
|
3080
|
-
client:
|
|
3070
|
+
client: p
|
|
3081
3071
|
}) {
|
|
3082
|
-
const { authToken: h, tokenProps: f } = Ge(), g =
|
|
3083
|
-
|
|
3084
|
-
}, [w, E] =
|
|
3072
|
+
const { authToken: h, tokenProps: f } = Ge(), g = _r(), k = !d || g.canCreate && (d === "scheduled_report" || g.analyticalBriefingsEnabled), [x, D] = A(!1), S = m ?? x, C = (N) => {
|
|
3073
|
+
m === void 0 && D(N), l == null || l(N);
|
|
3074
|
+
}, [w, E] = A(
|
|
3085
3075
|
d ? "author" : "list"
|
|
3086
|
-
), [
|
|
3076
|
+
), [U, b] = A(
|
|
3087
3077
|
d ?? "analytical_briefing"
|
|
3088
|
-
), [
|
|
3078
|
+
), [y, R] = A("dashboard"), [I, H] = A(
|
|
3089
3079
|
[]
|
|
3090
|
-
), [
|
|
3080
|
+
), [F, P] = A(null), Z = d && !k && !F ? "list" : w, [ae, Ee] = A(!1), [oe, Ae] = A(null), [Ie, ie] = A(null), [j, J] = A(
|
|
3091
3081
|
null
|
|
3092
|
-
), [le, ee] =
|
|
3093
|
-
|
|
3094
|
-
const N = S && !
|
|
3095
|
-
|
|
3082
|
+
), [le, ee] = A(null), Fe = ce(null), xe = ce(S);
|
|
3083
|
+
Q(() => {
|
|
3084
|
+
const N = S && !xe.current;
|
|
3085
|
+
xe.current = S, !(!N || !d) && (P(null), R("dashboard"), b(d), E("author"), ee(null));
|
|
3096
3086
|
}, [S, d]);
|
|
3097
|
-
const [ue, pe] =
|
|
3087
|
+
const [ue, pe] = A(
|
|
3098
3088
|
null
|
|
3099
|
-
), [
|
|
3100
|
-
const N =
|
|
3101
|
-
|
|
3102
|
-
|
|
3089
|
+
), [X, ve] = A(null), O = o ?? (f == null ? void 0 : f.apiServiceUrl), _ = n ?? (h == null ? void 0 : h.accessToken), ne = Y(() => ({ ...vn, ...p }), [p]), fe = fn(a), Le = Y(() => {
|
|
3090
|
+
const N = bn(
|
|
3091
|
+
I,
|
|
3092
|
+
y,
|
|
3103
3093
|
e
|
|
3104
3094
|
);
|
|
3105
3095
|
if (!d)
|
|
3106
3096
|
return N;
|
|
3107
|
-
const
|
|
3097
|
+
const V = d === "scheduled_report" ? "report" : "briefing";
|
|
3108
3098
|
return N.filter(
|
|
3109
|
-
(Be) => se(Be).noun ===
|
|
3099
|
+
(Be) => se(Be).noun === V
|
|
3110
3100
|
);
|
|
3111
|
-
}, [e,
|
|
3101
|
+
}, [e, I, y, d]), Qe = Y(() => y === "dashboard" ? {
|
|
3112
3102
|
source: { type: "dashboard", dashboardId: e },
|
|
3113
3103
|
label: fe,
|
|
3114
|
-
detail:
|
|
3104
|
+
detail: gn(fe)
|
|
3115
3105
|
} : {
|
|
3116
3106
|
source: { type: "project" },
|
|
3117
3107
|
label: "This project",
|
|
3118
3108
|
detail: "Use any data in this project."
|
|
3119
|
-
}, [e, fe,
|
|
3109
|
+
}, [e, fe, y]), ye = !!(O && _), Ce = ba({
|
|
3120
3110
|
canCreate: g.canCreate,
|
|
3121
3111
|
analyticalBriefingsEnabled: g.analyticalBriefingsEnabled,
|
|
3122
|
-
scheduledReportAvailable:
|
|
3123
|
-
}),
|
|
3124
|
-
if (!(!
|
|
3125
|
-
|
|
3112
|
+
scheduledReportAvailable: y === "dashboard"
|
|
3113
|
+
}), q = W(async () => {
|
|
3114
|
+
if (!(!O || !_)) {
|
|
3115
|
+
Ee(!0), ee(null);
|
|
3126
3116
|
try {
|
|
3127
|
-
|
|
3128
|
-
await
|
|
3117
|
+
H(
|
|
3118
|
+
await xn({
|
|
3129
3119
|
apiClient: ne,
|
|
3130
|
-
apiServiceUrl:
|
|
3131
|
-
token:
|
|
3120
|
+
apiServiceUrl: O,
|
|
3121
|
+
token: _
|
|
3132
3122
|
})
|
|
3133
3123
|
);
|
|
3134
3124
|
} catch (N) {
|
|
@@ -3136,122 +3126,122 @@ function wn({
|
|
|
3136
3126
|
N instanceof Error ? N.message : "Could not load briefings."
|
|
3137
3127
|
);
|
|
3138
3128
|
} finally {
|
|
3139
|
-
|
|
3129
|
+
Ee(!1);
|
|
3140
3130
|
}
|
|
3141
3131
|
}
|
|
3142
|
-
}, [ne,
|
|
3143
|
-
|
|
3144
|
-
!S ||
|
|
3145
|
-
}, [
|
|
3146
|
-
const
|
|
3147
|
-
|
|
3148
|
-
},
|
|
3149
|
-
|
|
3132
|
+
}, [ne, O, _]);
|
|
3133
|
+
Q(() => {
|
|
3134
|
+
!S || Z !== "list" || !ye || q();
|
|
3135
|
+
}, [ye, Z, q, S]);
|
|
3136
|
+
const we = () => {
|
|
3137
|
+
P(null), R("dashboard"), E("list"), C(!0);
|
|
3138
|
+
}, v = (N) => {
|
|
3139
|
+
P(null), b(N), E("author");
|
|
3150
3140
|
}, B = async (N) => {
|
|
3151
|
-
if (!(!
|
|
3141
|
+
if (!(!O || !_)) {
|
|
3152
3142
|
Ae(N), ee(null);
|
|
3153
3143
|
try {
|
|
3154
|
-
const
|
|
3144
|
+
const V = await ne.getBriefing(
|
|
3145
|
+
O,
|
|
3155
3146
|
_,
|
|
3156
|
-
z,
|
|
3157
3147
|
N
|
|
3158
3148
|
);
|
|
3159
|
-
|
|
3160
|
-
} catch (
|
|
3149
|
+
P(V.briefing), E("author");
|
|
3150
|
+
} catch (V) {
|
|
3161
3151
|
ee(
|
|
3162
|
-
|
|
3152
|
+
V instanceof Error ? V.message : "Could not open briefing."
|
|
3163
3153
|
);
|
|
3164
3154
|
} finally {
|
|
3165
3155
|
Ae(null);
|
|
3166
3156
|
}
|
|
3167
3157
|
}
|
|
3168
3158
|
}, M = async (N) => {
|
|
3169
|
-
if (!(!
|
|
3159
|
+
if (!(!O || !_)) {
|
|
3170
3160
|
ie(N.id);
|
|
3171
3161
|
try {
|
|
3172
3162
|
await ne.runBriefingNow(
|
|
3163
|
+
O,
|
|
3173
3164
|
_,
|
|
3174
|
-
z,
|
|
3175
3165
|
N.id,
|
|
3176
|
-
{ requestId:
|
|
3177
|
-
),
|
|
3178
|
-
} catch (
|
|
3179
|
-
|
|
3180
|
-
|
|
3166
|
+
{ requestId: wn() }
|
|
3167
|
+
), q();
|
|
3168
|
+
} catch (V) {
|
|
3169
|
+
z.error(
|
|
3170
|
+
V instanceof Error ? V.message : "Could not start the run."
|
|
3181
3171
|
);
|
|
3182
3172
|
} finally {
|
|
3183
3173
|
ie(null);
|
|
3184
3174
|
}
|
|
3185
3175
|
}
|
|
3186
|
-
},
|
|
3187
|
-
if (!
|
|
3188
|
-
const { noun:
|
|
3176
|
+
}, te = async (N) => {
|
|
3177
|
+
if (!O || !_) return;
|
|
3178
|
+
const { noun: V } = se(N), Be = V === "report" ? "Report" : "Briefing";
|
|
3189
3179
|
ie(N.id);
|
|
3190
3180
|
try {
|
|
3191
3181
|
const Te = N.status === "PAUSED" ? await ne.resumeBriefing(
|
|
3182
|
+
O,
|
|
3192
3183
|
_,
|
|
3193
|
-
z,
|
|
3194
3184
|
N.id
|
|
3195
3185
|
) : await ne.pauseBriefing(
|
|
3186
|
+
O,
|
|
3196
3187
|
_,
|
|
3197
|
-
z,
|
|
3198
3188
|
N.id
|
|
3199
3189
|
);
|
|
3200
|
-
|
|
3190
|
+
z.success(
|
|
3201
3191
|
Te.briefing.status === "PAUSED" ? `${Be} paused` : `${Be} resumed`
|
|
3202
|
-
),
|
|
3192
|
+
), q();
|
|
3203
3193
|
} catch (Te) {
|
|
3204
|
-
|
|
3205
|
-
Te instanceof Error ? Te.message : `Could not update the ${
|
|
3194
|
+
z.error(
|
|
3195
|
+
Te instanceof Error ? Te.message : `Could not update the ${V} status.`
|
|
3206
3196
|
);
|
|
3207
3197
|
} finally {
|
|
3208
3198
|
ie(null);
|
|
3209
3199
|
}
|
|
3210
3200
|
}, de = async () => {
|
|
3211
|
-
if (!
|
|
3212
|
-
const N =
|
|
3201
|
+
if (!j || !O || !_) return;
|
|
3202
|
+
const N = j;
|
|
3213
3203
|
ie(N.id);
|
|
3214
3204
|
try {
|
|
3215
3205
|
await ne.deleteBriefing(
|
|
3206
|
+
O,
|
|
3216
3207
|
_,
|
|
3217
|
-
z,
|
|
3218
3208
|
N.id
|
|
3219
3209
|
);
|
|
3220
|
-
const { noun:
|
|
3221
|
-
|
|
3222
|
-
} catch (
|
|
3223
|
-
|
|
3224
|
-
|
|
3210
|
+
const { noun: V } = se(N);
|
|
3211
|
+
z.success(`${V === "report" ? "Report" : "Briefing"} deleted`), J(null), q();
|
|
3212
|
+
} catch (V) {
|
|
3213
|
+
z.error(
|
|
3214
|
+
V instanceof Error ? V.message : "Could not delete the briefing."
|
|
3225
3215
|
);
|
|
3226
3216
|
} finally {
|
|
3227
3217
|
ie(null);
|
|
3228
3218
|
}
|
|
3229
|
-
},
|
|
3219
|
+
}, Ht = Le.length;
|
|
3230
3220
|
return g.surfaceVisible ? /* @__PURE__ */ r(Kr, { open: S, onOpenChange: C, children: [
|
|
3231
3221
|
u ? null : /* @__PURE__ */ t(
|
|
3232
|
-
|
|
3222
|
+
en,
|
|
3233
3223
|
{
|
|
3234
|
-
disabled: i || !
|
|
3235
|
-
briefingCount:
|
|
3224
|
+
disabled: i || !ye,
|
|
3225
|
+
briefingCount: Ht,
|
|
3236
3226
|
className: s,
|
|
3237
|
-
onClick:
|
|
3227
|
+
onClick: we
|
|
3238
3228
|
}
|
|
3239
3229
|
),
|
|
3240
3230
|
/* @__PURE__ */ r(
|
|
3241
|
-
|
|
3231
|
+
qr,
|
|
3242
3232
|
{
|
|
3243
3233
|
ref: Fe,
|
|
3244
3234
|
side: "right",
|
|
3245
3235
|
hideClose: !0,
|
|
3246
3236
|
className: "flex h-full w-full flex-col overflow-hidden p-0 outline-none sm:max-w-[560px]",
|
|
3247
3237
|
onOpenAutoFocus: (N) => {
|
|
3248
|
-
var
|
|
3249
|
-
N.preventDefault(), (
|
|
3238
|
+
var V;
|
|
3239
|
+
N.preventDefault(), (V = Fe.current) == null || V.focus({ preventScroll: !0 });
|
|
3250
3240
|
},
|
|
3251
3241
|
children: [
|
|
3252
|
-
/* @__PURE__ */ r(
|
|
3253
|
-
/* @__PURE__ */ t(
|
|
3254
|
-
/* @__PURE__ */ t(
|
|
3242
|
+
/* @__PURE__ */ r(Qr, { className: "sr-only", children: [
|
|
3243
|
+
/* @__PURE__ */ t(Xr, { children: "Reports & briefings" }),
|
|
3244
|
+
/* @__PURE__ */ t(Yr, { children: "Manage reports and briefings for this dashboard." })
|
|
3255
3245
|
] }),
|
|
3256
3246
|
d ? /* @__PURE__ */ r("div", { className: "flex shrink-0 items-start justify-between gap-3 border-b border-border pl-4 pr-3 pt-2", children: [
|
|
3257
3247
|
/* @__PURE__ */ r(
|
|
@@ -3266,17 +3256,17 @@ function wn({
|
|
|
3266
3256
|
{
|
|
3267
3257
|
type: "button",
|
|
3268
3258
|
role: "tab",
|
|
3269
|
-
"aria-selected":
|
|
3259
|
+
"aria-selected": Z === "author",
|
|
3270
3260
|
disabled: !k,
|
|
3271
3261
|
className: K(
|
|
3272
3262
|
"-mb-px border-b-2 px-0.5 pb-2 text-[12px] transition-colors",
|
|
3273
|
-
|
|
3263
|
+
Z === "author" ? "border-foreground font-medium text-foreground" : "border-transparent text-muted-foreground hover:text-foreground",
|
|
3274
3264
|
!k && "cursor-not-allowed opacity-50"
|
|
3275
3265
|
),
|
|
3276
3266
|
onClick: () => {
|
|
3277
|
-
k && (
|
|
3267
|
+
k && (P(null), b(d), R("dashboard"), E("author"));
|
|
3278
3268
|
},
|
|
3279
|
-
children:
|
|
3269
|
+
children: F ? `Edit ${se(F).noun}` : d === "scheduled_report" ? "Schedule report" : "Create briefing"
|
|
3280
3270
|
}
|
|
3281
3271
|
),
|
|
3282
3272
|
/* @__PURE__ */ t(
|
|
@@ -3284,10 +3274,10 @@ function wn({
|
|
|
3284
3274
|
{
|
|
3285
3275
|
type: "button",
|
|
3286
3276
|
role: "tab",
|
|
3287
|
-
"aria-selected":
|
|
3277
|
+
"aria-selected": Z === "list",
|
|
3288
3278
|
className: K(
|
|
3289
3279
|
"-mb-px border-b-2 px-0.5 pb-2 text-[12px] transition-colors",
|
|
3290
|
-
|
|
3280
|
+
Z === "list" ? "border-foreground font-medium text-foreground" : "border-transparent text-muted-foreground hover:text-foreground"
|
|
3291
3281
|
),
|
|
3292
3282
|
onClick: () => E("list"),
|
|
3293
3283
|
children: d === "scheduled_report" ? "Manage reports" : "Manage briefings"
|
|
@@ -3303,36 +3293,36 @@ function wn({
|
|
|
3303
3293
|
onClick: () => C(!1),
|
|
3304
3294
|
className: "rounded-control p-1 text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
3305
3295
|
"aria-label": d === "scheduled_report" ? "Close email report workflow" : "Close analytical briefing workflow",
|
|
3306
|
-
children: /* @__PURE__ */ t(
|
|
3296
|
+
children: /* @__PURE__ */ t(qe, { className: "h-3.5 w-3.5" })
|
|
3307
3297
|
}
|
|
3308
3298
|
)
|
|
3309
3299
|
] }) : null,
|
|
3310
|
-
|
|
3311
|
-
|
|
3300
|
+
Z === "list" ? /* @__PURE__ */ t(
|
|
3301
|
+
dn,
|
|
3312
3302
|
{
|
|
3313
3303
|
briefings: Le,
|
|
3314
3304
|
dashboardLabel: fe,
|
|
3315
|
-
sourceView:
|
|
3305
|
+
sourceView: y,
|
|
3316
3306
|
error: le,
|
|
3317
|
-
loading:
|
|
3318
|
-
onSourceViewChange:
|
|
3307
|
+
loading: ae,
|
|
3308
|
+
onSourceViewChange: R,
|
|
3319
3309
|
onClose: () => C(!1),
|
|
3320
3310
|
onEdit: (N) => {
|
|
3321
3311
|
B(N);
|
|
3322
3312
|
},
|
|
3323
|
-
onNew:
|
|
3324
|
-
canCreate: !d &&
|
|
3325
|
-
canCreateScheduledReport:
|
|
3313
|
+
onNew: v,
|
|
3314
|
+
canCreate: !d && Ce.length > 0,
|
|
3315
|
+
canCreateScheduledReport: Ce.includes(
|
|
3326
3316
|
"scheduled_report"
|
|
3327
3317
|
),
|
|
3328
|
-
analyticalBriefingsEnabled:
|
|
3318
|
+
analyticalBriefingsEnabled: Ce.includes(
|
|
3329
3319
|
"analytical_briefing"
|
|
3330
3320
|
),
|
|
3331
3321
|
onRunNow: (N) => {
|
|
3332
3322
|
M(N);
|
|
3333
3323
|
},
|
|
3334
3324
|
onTogglePause: (N) => {
|
|
3335
|
-
|
|
3325
|
+
te(N);
|
|
3336
3326
|
},
|
|
3337
3327
|
onDelete: (N) => J(N),
|
|
3338
3328
|
selectingId: oe,
|
|
@@ -3342,77 +3332,77 @@ function wn({
|
|
|
3342
3332
|
hideHeader: !!d
|
|
3343
3333
|
}
|
|
3344
3334
|
) : /* @__PURE__ */ t(
|
|
3345
|
-
|
|
3335
|
+
Zr,
|
|
3346
3336
|
{
|
|
3347
|
-
apiServiceUrl:
|
|
3348
|
-
token:
|
|
3349
|
-
briefing:
|
|
3350
|
-
intent:
|
|
3351
|
-
sourceContext:
|
|
3352
|
-
title:
|
|
3337
|
+
apiServiceUrl: O,
|
|
3338
|
+
token: _,
|
|
3339
|
+
briefing: F,
|
|
3340
|
+
intent: U,
|
|
3341
|
+
sourceContext: F ? void 0 : Qe,
|
|
3342
|
+
title: F ? `Edit ${se(F).noun}` : U === "scheduled_report" ? "Schedule report" : "Create analytical briefing",
|
|
3353
3343
|
hideHeader: !!d,
|
|
3354
3344
|
className: "h-full min-h-0 max-w-none border-0 shadow-none",
|
|
3355
3345
|
onBack: d ? void 0 : () => E("list"),
|
|
3356
3346
|
onCancel: () => C(!1),
|
|
3357
3347
|
onDeleted: () => {
|
|
3358
|
-
const N =
|
|
3359
|
-
|
|
3348
|
+
const N = F ? se(F).noun : "briefing";
|
|
3349
|
+
z.success(`${N === "report" ? "Report" : "Briefing"} deleted`), P(null), E("list"), q();
|
|
3360
3350
|
},
|
|
3361
3351
|
onRunStarted: () => {
|
|
3362
3352
|
},
|
|
3363
3353
|
onSaved: (N) => {
|
|
3364
|
-
|
|
3354
|
+
P(N), q();
|
|
3365
3355
|
},
|
|
3366
|
-
onMinimizeRun: ({ briefing: N, run:
|
|
3367
|
-
pe({ briefing: N, run:
|
|
3356
|
+
onMinimizeRun: ({ briefing: N, run: V }) => {
|
|
3357
|
+
pe({ briefing: N, run: V }), C(!1);
|
|
3368
3358
|
}
|
|
3369
3359
|
}
|
|
3370
3360
|
)
|
|
3371
3361
|
]
|
|
3372
3362
|
}
|
|
3373
3363
|
),
|
|
3374
|
-
ue &&
|
|
3375
|
-
|
|
3364
|
+
ue && O && _ ? /* @__PURE__ */ t(
|
|
3365
|
+
yn,
|
|
3376
3366
|
{
|
|
3377
3367
|
briefingId: ue.briefing.id,
|
|
3378
3368
|
initialRun: ue.run,
|
|
3379
|
-
apiServiceUrl:
|
|
3380
|
-
token:
|
|
3369
|
+
apiServiceUrl: O,
|
|
3370
|
+
token: _,
|
|
3381
3371
|
onTerminal: (N) => {
|
|
3382
|
-
|
|
3372
|
+
ve({
|
|
3383
3373
|
briefing: ue.briefing,
|
|
3384
3374
|
run: N
|
|
3385
|
-
}), pe(null),
|
|
3375
|
+
}), pe(null), q();
|
|
3386
3376
|
},
|
|
3387
3377
|
onTimeout: () => {
|
|
3388
|
-
pe(null),
|
|
3378
|
+
pe(null), q();
|
|
3389
3379
|
},
|
|
3390
3380
|
onExpand: () => {
|
|
3391
|
-
|
|
3381
|
+
P(ue.briefing), E("author"), pe(null), C(!0);
|
|
3392
3382
|
}
|
|
3393
3383
|
}
|
|
3394
3384
|
) : null,
|
|
3395
|
-
|
|
3396
|
-
|
|
3385
|
+
X ? /* @__PURE__ */ t("div", { className: "fixed bottom-4 right-4 z-50 w-[360px]", children: /* @__PURE__ */ t(
|
|
3386
|
+
Jr,
|
|
3397
3387
|
{
|
|
3398
|
-
title:
|
|
3399
|
-
durationSeconds:
|
|
3388
|
+
title: X.run.status === "SUCCESS" ? `${X.briefing.name} is ready` : `${X.briefing.name} run failed`,
|
|
3389
|
+
durationSeconds: X.run.startedAt && X.run.completedAt ? Math.max(
|
|
3400
3390
|
0,
|
|
3401
3391
|
Math.floor(
|
|
3402
|
-
(new Date(
|
|
3392
|
+
(new Date(X.run.completedAt).getTime() - new Date(X.run.startedAt).getTime()) / 1e3
|
|
3403
3393
|
)
|
|
3404
3394
|
) : null,
|
|
3405
|
-
status:
|
|
3395
|
+
status: X.run.status === "SUCCESS" ? "success" : "failed",
|
|
3406
3396
|
onView: () => {
|
|
3407
|
-
|
|
3397
|
+
P(X.briefing), E("author"), ve(null), C(!0);
|
|
3408
3398
|
},
|
|
3409
|
-
onDismiss: () =>
|
|
3399
|
+
onDismiss: () => ve(null)
|
|
3410
3400
|
}
|
|
3411
3401
|
) }) : null,
|
|
3412
3402
|
/* @__PURE__ */ t(
|
|
3413
3403
|
at,
|
|
3414
3404
|
{
|
|
3415
|
-
open: !!
|
|
3405
|
+
open: !!j,
|
|
3416
3406
|
onOpenChange: (N) => {
|
|
3417
3407
|
N || J(null);
|
|
3418
3408
|
},
|
|
@@ -3421,26 +3411,26 @@ function wn({
|
|
|
3421
3411
|
/* @__PURE__ */ r(ot, { children: [
|
|
3422
3412
|
"Delete",
|
|
3423
3413
|
" ",
|
|
3424
|
-
|
|
3414
|
+
j ? se(j).noun : "briefing",
|
|
3425
3415
|
"?"
|
|
3426
3416
|
] }),
|
|
3427
3417
|
/* @__PURE__ */ r(it, { children: [
|
|
3428
3418
|
"This permanently deletes ",
|
|
3429
|
-
/* @__PURE__ */ t("strong", { children:
|
|
3419
|
+
/* @__PURE__ */ t("strong", { children: j == null ? void 0 : j.name }),
|
|
3430
3420
|
". Recipients will stop receiving it."
|
|
3431
3421
|
] })
|
|
3432
3422
|
] }),
|
|
3433
3423
|
/* @__PURE__ */ r(lt, { children: [
|
|
3434
3424
|
/* @__PURE__ */ t(dt, { children: "Cancel" }),
|
|
3435
3425
|
/* @__PURE__ */ r(
|
|
3436
|
-
|
|
3426
|
+
Ft,
|
|
3437
3427
|
{
|
|
3438
3428
|
className: "bg-destructive/90 hover:bg-destructive",
|
|
3439
3429
|
onClick: de,
|
|
3440
3430
|
children: [
|
|
3441
3431
|
"Delete",
|
|
3442
3432
|
" ",
|
|
3443
|
-
|
|
3433
|
+
j ? se(j).noun : "briefing"
|
|
3444
3434
|
]
|
|
3445
3435
|
}
|
|
3446
3436
|
)
|
|
@@ -3450,24 +3440,24 @@ function wn({
|
|
|
3450
3440
|
)
|
|
3451
3441
|
] }) : null;
|
|
3452
3442
|
}
|
|
3453
|
-
function
|
|
3443
|
+
function wn() {
|
|
3454
3444
|
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `briefing-run-now-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
3455
3445
|
}
|
|
3456
3446
|
export {
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3447
|
+
Xn as A,
|
|
3448
|
+
$a as D,
|
|
3449
|
+
_a as E,
|
|
3450
|
+
es as N,
|
|
3451
|
+
Yn as U,
|
|
3462
3452
|
Kn as V,
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3453
|
+
en as W,
|
|
3454
|
+
Qn as a,
|
|
3455
|
+
Oa as b,
|
|
3456
|
+
Zn as c,
|
|
3457
|
+
Jn as d,
|
|
3458
|
+
Wa as e,
|
|
3459
|
+
Qa as f,
|
|
3460
|
+
ts as g,
|
|
3461
|
+
rs as h,
|
|
3462
|
+
qn as u
|
|
3473
3463
|
};
|