react-semaphor 0.1.523 → 0.1.525
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 +38 -33
- 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-CYiPCXQv.js → dashboard-briefing-launcher-BilVIEyw.js} +790 -800
- package/dist/chunks/dashboard-controls-DyLPcvCK.js +2146 -0
- package/dist/chunks/{dashboard-json-D_70142A.js → dashboard-json-QEoU-mx4.js} +5 -5
- package/dist/chunks/edit-dashboard-visual-DtmKNNdE.js +22120 -0
- package/dist/chunks/{editor-action-buttons-CEw61v6F.js → editor-action-buttons-B9VRW3Bh.js} +740 -675
- package/dist/chunks/{index-BBn_2FHm.js → index-DYOaHuLS.js} +40215 -40411
- package/dist/chunks/{index-BnZz-3jX.js → index-ON7Gpvcv.js} +1186 -1018
- package/dist/chunks/{report-preferences-dialog-B7Ny-bLC.js → report-preferences-dialog-BLaFmlE2.js} +2 -2
- package/dist/chunks/{switch-BxOntwjd.js → switch-CWPcwAZ4.js} +4543 -5123
- 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 +1 -1
- package/dist/types/briefings/schedule.d.ts +49 -2
- 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 +4 -4
- package/dist/types/components/briefings/briefing-author/run-ui.d.ts +12 -12
- package/dist/types/components/briefings/briefing-author/schedule-model.d.ts +12 -2
- 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/hooks/use-groups.d.ts +5 -1
- package/dist/types/components/sharing-and-management/hooks/use-unified-users.d.ts +9 -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 +2 -2
- 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/adapter.d.ts +21 -1
- package/dist/types/components/sharing-and-management/resource-share-dialog/unified/configs.d.ts +12 -0
- package/dist/types/components/sharing-and-management/resource-share-dialog/unified/invite-combobox.d.ts +6 -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 +8 -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/resource-share-dialog/unified/types.d.ts +2 -0
- package/dist/types/components/sharing-and-management/utils/shares-types.d.ts +8 -0
- package/dist/types/components/sharing-and-management/utils/types.d.ts +2 -0
- 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 +3 -3
- 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/area-chart.d.ts +1 -1
- package/dist/types/lib/charts/bar-chart.d.ts +1 -1
- package/dist/types/lib/charts/cartesian-data.d.ts +72 -0
- package/dist/types/lib/charts/cartesian-fields.d.ts +60 -0
- package/dist/types/lib/charts/chart-utils.d.ts +3 -0
- package/dist/types/lib/charts/combo-chart.d.ts +1 -1
- package/dist/types/lib/charts/create-chart.d.ts +1 -1
- package/dist/types/lib/charts/line-chart.d.ts +1 -1
- package/dist/types/lib/charts/shared/category-group-axis-plugin.d.ts +23 -0
- package/dist/types/lib/charts/stacked-line-chart.d.ts +2 -0
- package/dist/types/lib/charts/types.d.ts +2 -8
- package/dist/types/lib/contexts/interactions-popover-context.d.ts +1 -1
- package/dist/types/lib/formatters/cartesian-temporal-presentation.d.ts +6 -1
- 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 +0 -4
- package/dist/types/lib/matrix-table/matrix-execution-provider.d.ts +1 -1
- package/dist/types/lib/print/print-inputs.d.ts +1 -1
- 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 +1 -5
- package/dist/types/lib/stores/editor-store.d.ts +1 -3
- package/dist/types/lib/types/common-types.d.ts +0 -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-lzfI5yqq.js +0 -2432
- package/dist/chunks/edit-dashboard-visual-wlJKYkAf.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
|
@@ -0,0 +1,2146 @@
|
|
|
1
|
+
import { jsx as e, jsxs as s, Fragment as F } from "react/jsx-runtime";
|
|
2
|
+
import { u as C, B as V, az as Tr, aA as Fr, aB as Xe, c as xe, a4 as D, aC as ve, aD as tt, aE as qt, L as Re, aF as zt, aG as $r, D as Ct, Q as kt, V as Et, W as At, Y as It, X as Br, i as Gr, aH as Hr } from "./switch-CWPcwAZ4.js";
|
|
3
|
+
import { by as Vr, bz as qr, bA as rt, bB as zr, bC as jr, bD as Kr, bE as Qr, bF as Wr, bG as Jr, az as W, b8 as ye, bH as we, bI as Yr, aG as Xr, aH as Zr, aJ as Mt, aK as Lt, bJ as jt, bm as at, aY as ae, bK as ea, bL as ta, bM as Kt, bN as ra, bO as Qt, bP as U, bQ as aa, ap as na, bR as oa, bS as sa, bT as ia, bU as da, m as ca, u as Pe, s as la, n as Qe, bV as ua, bW as ma, bX as ha, bY as pa, L as fa, bZ as ba, b_ as ga, I as Pt, b$ as xa, c0 as va, c1 as ya, c2 as wa, c3 as Na, c4 as _t, c5 as Ot, c6 as Rt, c7 as Sa, c8 as Da, c9 as Ca, ca as ka, cb as _e, cc as Ea, cd as We, b0 as Ut, r as Aa, ce as Ia, aO as Ma, aR as La, aS as Pa, aT as _a, aU as Oa, aV as Ra, aW as Ua, aX as Tt } from "./index-DYOaHuLS.js";
|
|
4
|
+
import { c as ne, X as Wt, C as Ta } from "./x-CXDkqdur.js";
|
|
5
|
+
import "./card-config-utils-CAyjC5Tp.js";
|
|
6
|
+
import "./validators-CsdOtZI6.js";
|
|
7
|
+
import "./matrix-operation-contract-D32U2CSw.js";
|
|
8
|
+
import "../value-format-preferences/index.js";
|
|
9
|
+
import * as k from "react";
|
|
10
|
+
import Jt, { useMemo as Q, useState as N, useEffect as Ue, useRef as Ft, useLayoutEffect as Fa } from "react";
|
|
11
|
+
import "./appearance-context-DEYtWinQ.js";
|
|
12
|
+
import "./index-CLIro-EG.js";
|
|
13
|
+
import "./field-aggregations-BQjogiI1.js";
|
|
14
|
+
import "zod";
|
|
15
|
+
import "./matrix-continuation-C4sRcjZU.js";
|
|
16
|
+
import "./color-CJvdlFM_.js";
|
|
17
|
+
import { createPortal as $a } from "react-dom";
|
|
18
|
+
import "./index-ON7Gpvcv.js";
|
|
19
|
+
import { d as Ba, c as Ga, u as Ha, A as Va, a as qa, g as za, V as ja, N as Ka, h as Qa, U as Wa } from "./dashboard-briefing-launcher-BilVIEyw.js";
|
|
20
|
+
import { S as Ja, C as Ya } from "./selection-reducer-CvCBQbl2.js";
|
|
21
|
+
import { d as Yt } from "./semantic-format-Baqp8kD_.js";
|
|
22
|
+
import { c as Ze } from "./calculated-field-identity-Dy_WpDdo.js";
|
|
23
|
+
import { R as Xa } from "./report-preferences-dialog-BLaFmlE2.js";
|
|
24
|
+
import { u as Za } from "./use-debounced-dirty-check-BwAbnX_5.js";
|
|
25
|
+
import { s as en } from "./normalize-dashboard-for-dirty-check-Bk3VYv_q.js";
|
|
26
|
+
import { S as tn } from "./save-DgMfP0j8.js";
|
|
27
|
+
import { P as rn } from "./palette-Cp1hqZtm.js";
|
|
28
|
+
import { B as an } from "./braces-8TRlDwDw.js";
|
|
29
|
+
/**
|
|
30
|
+
* @license lucide-react v0.453.0 - ISC
|
|
31
|
+
*
|
|
32
|
+
* This source code is licensed under the ISC license.
|
|
33
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
34
|
+
*/
|
|
35
|
+
const nn = ne("Monitor", [
|
|
36
|
+
["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
|
|
37
|
+
["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
|
|
38
|
+
["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
|
|
39
|
+
]);
|
|
40
|
+
/**
|
|
41
|
+
* @license lucide-react v0.453.0 - ISC
|
|
42
|
+
*
|
|
43
|
+
* This source code is licensed under the ISC license.
|
|
44
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
45
|
+
*/
|
|
46
|
+
const on = ne("Moon", [
|
|
47
|
+
["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z", key: "a7tn18" }]
|
|
48
|
+
]);
|
|
49
|
+
/**
|
|
50
|
+
* @license lucide-react v0.453.0 - ISC
|
|
51
|
+
*
|
|
52
|
+
* This source code is licensed under the ISC license.
|
|
53
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
54
|
+
*/
|
|
55
|
+
const sn = ne("ShieldX", [
|
|
56
|
+
[
|
|
57
|
+
"path",
|
|
58
|
+
{
|
|
59
|
+
d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
|
|
60
|
+
key: "oel41y"
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
["path", { d: "m14.5 9.5-5 5", key: "17q4r4" }],
|
|
64
|
+
["path", { d: "m9.5 9.5 5 5", key: "18nt4w" }]
|
|
65
|
+
]);
|
|
66
|
+
/**
|
|
67
|
+
* @license lucide-react v0.453.0 - ISC
|
|
68
|
+
*
|
|
69
|
+
* This source code is licensed under the ISC license.
|
|
70
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
+
*/
|
|
72
|
+
const dn = ne("Sun", [
|
|
73
|
+
["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
|
|
74
|
+
["path", { d: "M12 2v2", key: "tus03m" }],
|
|
75
|
+
["path", { d: "M12 20v2", key: "1lh1kg" }],
|
|
76
|
+
["path", { d: "m4.93 4.93 1.41 1.41", key: "149t6j" }],
|
|
77
|
+
["path", { d: "m17.66 17.66 1.41 1.41", key: "ptbguv" }],
|
|
78
|
+
["path", { d: "M2 12h2", key: "1t8f8n" }],
|
|
79
|
+
["path", { d: "M20 12h2", key: "1q8mjw" }],
|
|
80
|
+
["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
|
|
81
|
+
["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
|
|
82
|
+
]);
|
|
83
|
+
/**
|
|
84
|
+
* @license lucide-react v0.453.0 - ISC
|
|
85
|
+
*
|
|
86
|
+
* This source code is licensed under the ISC license.
|
|
87
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
88
|
+
*/
|
|
89
|
+
const cn = ne("UserPlus", [
|
|
90
|
+
["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
|
|
91
|
+
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
|
|
92
|
+
["line", { x1: "19", x2: "19", y1: "8", y2: "14", key: "1bvyxn" }],
|
|
93
|
+
["line", { x1: "22", x2: "16", y1: "11", y2: "11", key: "1shjgl" }]
|
|
94
|
+
]);
|
|
95
|
+
/**
|
|
96
|
+
* @license lucide-react v0.453.0 - ISC
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the ISC license.
|
|
99
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
+
*/
|
|
101
|
+
const Xt = ne("UserRound", [
|
|
102
|
+
["circle", { cx: "12", cy: "8", r: "5", key: "1hypcn" }],
|
|
103
|
+
["path", { d: "M20 21a8 8 0 0 0-16 0", key: "rfgkzh" }]
|
|
104
|
+
]);
|
|
105
|
+
var et = { exports: {} }, Je = {};
|
|
106
|
+
/**
|
|
107
|
+
* @license React
|
|
108
|
+
* use-sync-external-store-shim.production.js
|
|
109
|
+
*
|
|
110
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
111
|
+
*
|
|
112
|
+
* This source code is licensed under the MIT license found in the
|
|
113
|
+
* LICENSE file in the root directory of this source tree.
|
|
114
|
+
*/
|
|
115
|
+
var $t;
|
|
116
|
+
function ln() {
|
|
117
|
+
if ($t) return Je;
|
|
118
|
+
$t = 1;
|
|
119
|
+
var t = Jt;
|
|
120
|
+
function n(c, h) {
|
|
121
|
+
return c === h && (c !== 0 || 1 / c === 1 / h) || c !== c && h !== h;
|
|
122
|
+
}
|
|
123
|
+
var a = typeof Object.is == "function" ? Object.is : n, r = t.useState, o = t.useEffect, l = t.useLayoutEffect, m = t.useDebugValue;
|
|
124
|
+
function u(c, h) {
|
|
125
|
+
var i = h(), x = r({ inst: { value: i, getSnapshot: h } }), v = x[0].inst, w = x[1];
|
|
126
|
+
return l(
|
|
127
|
+
function() {
|
|
128
|
+
v.value = i, v.getSnapshot = h, g(v) && w({ inst: v });
|
|
129
|
+
},
|
|
130
|
+
[c, i, h]
|
|
131
|
+
), o(
|
|
132
|
+
function() {
|
|
133
|
+
return g(v) && w({ inst: v }), c(function() {
|
|
134
|
+
g(v) && w({ inst: v });
|
|
135
|
+
});
|
|
136
|
+
},
|
|
137
|
+
[c]
|
|
138
|
+
), m(i), i;
|
|
139
|
+
}
|
|
140
|
+
function g(c) {
|
|
141
|
+
var h = c.getSnapshot;
|
|
142
|
+
c = c.value;
|
|
143
|
+
try {
|
|
144
|
+
var i = h();
|
|
145
|
+
return !a(c, i);
|
|
146
|
+
} catch {
|
|
147
|
+
return !0;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
function f(c, h) {
|
|
151
|
+
return h();
|
|
152
|
+
}
|
|
153
|
+
var b = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? f : u;
|
|
154
|
+
return Je.useSyncExternalStore = t.useSyncExternalStore !== void 0 ? t.useSyncExternalStore : b, Je;
|
|
155
|
+
}
|
|
156
|
+
var Ye = {};
|
|
157
|
+
/**
|
|
158
|
+
* @license React
|
|
159
|
+
* use-sync-external-store-shim.development.js
|
|
160
|
+
*
|
|
161
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
162
|
+
*
|
|
163
|
+
* This source code is licensed under the MIT license found in the
|
|
164
|
+
* LICENSE file in the root directory of this source tree.
|
|
165
|
+
*/
|
|
166
|
+
var Bt;
|
|
167
|
+
function un() {
|
|
168
|
+
return Bt || (Bt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
169
|
+
function t(i, x) {
|
|
170
|
+
return i === x && (i !== 0 || 1 / i === 1 / x) || i !== i && x !== x;
|
|
171
|
+
}
|
|
172
|
+
function n(i, x) {
|
|
173
|
+
b || o.startTransition === void 0 || (b = !0, console.error(
|
|
174
|
+
"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
|
|
175
|
+
));
|
|
176
|
+
var v = x();
|
|
177
|
+
if (!c) {
|
|
178
|
+
var w = x();
|
|
179
|
+
l(v, w) || (console.error(
|
|
180
|
+
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
181
|
+
), c = !0);
|
|
182
|
+
}
|
|
183
|
+
w = m({
|
|
184
|
+
inst: { value: v, getSnapshot: x }
|
|
185
|
+
});
|
|
186
|
+
var S = w[0].inst, p = w[1];
|
|
187
|
+
return g(
|
|
188
|
+
function() {
|
|
189
|
+
S.value = v, S.getSnapshot = x, a(S) && p({ inst: S });
|
|
190
|
+
},
|
|
191
|
+
[i, v, x]
|
|
192
|
+
), u(
|
|
193
|
+
function() {
|
|
194
|
+
return a(S) && p({ inst: S }), i(function() {
|
|
195
|
+
a(S) && p({ inst: S });
|
|
196
|
+
});
|
|
197
|
+
},
|
|
198
|
+
[i]
|
|
199
|
+
), f(v), v;
|
|
200
|
+
}
|
|
201
|
+
function a(i) {
|
|
202
|
+
var x = i.getSnapshot;
|
|
203
|
+
i = i.value;
|
|
204
|
+
try {
|
|
205
|
+
var v = x();
|
|
206
|
+
return !l(i, v);
|
|
207
|
+
} catch {
|
|
208
|
+
return !0;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
function r(i, x) {
|
|
212
|
+
return x();
|
|
213
|
+
}
|
|
214
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
215
|
+
var o = Jt, l = typeof Object.is == "function" ? Object.is : t, m = o.useState, u = o.useEffect, g = o.useLayoutEffect, f = o.useDebugValue, b = !1, c = !1, h = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? r : n;
|
|
216
|
+
Ye.useSyncExternalStore = o.useSyncExternalStore !== void 0 ? o.useSyncExternalStore : h, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
217
|
+
}()), Ye;
|
|
218
|
+
}
|
|
219
|
+
process.env.NODE_ENV === "production" ? et.exports = ln() : et.exports = un();
|
|
220
|
+
var mn = et.exports;
|
|
221
|
+
const Oe = ["light", "dark", "system"];
|
|
222
|
+
function hn() {
|
|
223
|
+
const { theme: t, setTheme: n } = Vr(), a = C(
|
|
224
|
+
(m) => m.actions.setDashboardTheme
|
|
225
|
+
);
|
|
226
|
+
function r() {
|
|
227
|
+
const m = Oe.includes(t) ? t : "system", u = Oe[(Oe.indexOf(m) + 1) % Oe.length];
|
|
228
|
+
n(u), a(u);
|
|
229
|
+
}
|
|
230
|
+
const o = t === "light" ? dn : t === "dark" ? on : nn, l = t === "light" ? "Theme: light (click for dark)" : t === "dark" ? "Theme: dark (click for system)" : "Theme: system (click for light)";
|
|
231
|
+
return /* @__PURE__ */ e(
|
|
232
|
+
V,
|
|
233
|
+
{
|
|
234
|
+
type: "button",
|
|
235
|
+
variant: "ghost",
|
|
236
|
+
size: "xs",
|
|
237
|
+
className: "h-7 w-7 p-0 text-muted-foreground hover:text-foreground",
|
|
238
|
+
onClick: r,
|
|
239
|
+
"aria-label": l,
|
|
240
|
+
title: l,
|
|
241
|
+
children: /* @__PURE__ */ e(o, { className: "h-3.5 w-3.5", strokeWidth: 1.5 })
|
|
242
|
+
}
|
|
243
|
+
);
|
|
244
|
+
}
|
|
245
|
+
function pn() {
|
|
246
|
+
const { displayPreferences: t, shouldShowElement: n } = qr(), { currentUser: a, userContext: r } = rt(), o = Q(
|
|
247
|
+
() => zr(a),
|
|
248
|
+
[a]
|
|
249
|
+
), l = Q(() => (u) => o && o[u] !== void 0 && o[u] === !1 ? !1 : n(u), [o, n, t]), m = Q(
|
|
250
|
+
() => {
|
|
251
|
+
var u, g, f, b, c;
|
|
252
|
+
return {
|
|
253
|
+
canEdit: ((u = r == null ? void 0 : r.permissions) == null ? void 0 : u.canEdit) ?? Jr(a),
|
|
254
|
+
canUseFilters: ((g = r == null ? void 0 : r.permissions) == null ? void 0 : g.canEdit) ?? Wr(a),
|
|
255
|
+
canManageDashboards: ((f = r == null ? void 0 : r.permissions) == null ? void 0 : f.canCreateDashboard) ?? Qr(a),
|
|
256
|
+
canCreateDashboards: ((b = r == null ? void 0 : r.permissions) == null ? void 0 : b.canCreateDashboard) ?? Kr(a),
|
|
257
|
+
canAccessVisuals: ((c = r == null ? void 0 : r.permissions) == null ? void 0 : c.canEdit) ?? jr(a)
|
|
258
|
+
};
|
|
259
|
+
},
|
|
260
|
+
[a, r]
|
|
261
|
+
);
|
|
262
|
+
return {
|
|
263
|
+
displayPreferences: t,
|
|
264
|
+
shouldShowElement: l,
|
|
265
|
+
permissions: m,
|
|
266
|
+
currentUser: a
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
function fn(t, n = []) {
|
|
270
|
+
let a = [];
|
|
271
|
+
function r(l, m) {
|
|
272
|
+
const u = k.createContext(m);
|
|
273
|
+
u.displayName = l + "Context";
|
|
274
|
+
const g = a.length;
|
|
275
|
+
a = [...a, m];
|
|
276
|
+
const f = (c) => {
|
|
277
|
+
var S;
|
|
278
|
+
const { scope: h, children: i, ...x } = c, v = ((S = h == null ? void 0 : h[t]) == null ? void 0 : S[g]) || u, w = k.useMemo(() => x, Object.values(x));
|
|
279
|
+
return /* @__PURE__ */ e(v.Provider, { value: w, children: i });
|
|
280
|
+
};
|
|
281
|
+
f.displayName = l + "Provider";
|
|
282
|
+
function b(c, h) {
|
|
283
|
+
var v;
|
|
284
|
+
const i = ((v = h == null ? void 0 : h[t]) == null ? void 0 : v[g]) || u, x = k.useContext(i);
|
|
285
|
+
if (x) return x;
|
|
286
|
+
if (m !== void 0) return m;
|
|
287
|
+
throw new Error(`\`${c}\` must be used within \`${l}\``);
|
|
288
|
+
}
|
|
289
|
+
return [f, b];
|
|
290
|
+
}
|
|
291
|
+
const o = () => {
|
|
292
|
+
const l = a.map((m) => k.createContext(m));
|
|
293
|
+
return function(u) {
|
|
294
|
+
const g = (u == null ? void 0 : u[t]) || l;
|
|
295
|
+
return k.useMemo(
|
|
296
|
+
() => ({ [`__scope${t}`]: { ...u, [t]: g } }),
|
|
297
|
+
[u, g]
|
|
298
|
+
);
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
return o.scopeName = t, [r, bn(o, ...n)];
|
|
302
|
+
}
|
|
303
|
+
function bn(...t) {
|
|
304
|
+
const n = t[0];
|
|
305
|
+
if (t.length === 1) return n;
|
|
306
|
+
const a = () => {
|
|
307
|
+
const r = t.map((o) => ({
|
|
308
|
+
useScope: o(),
|
|
309
|
+
scopeName: o.scopeName
|
|
310
|
+
}));
|
|
311
|
+
return function(l) {
|
|
312
|
+
const m = r.reduce((u, { useScope: g, scopeName: f }) => {
|
|
313
|
+
const c = g(l)[`__scope${f}`];
|
|
314
|
+
return { ...u, ...c };
|
|
315
|
+
}, {});
|
|
316
|
+
return k.useMemo(() => ({ [`__scope${n.scopeName}`]: m }), [m]);
|
|
317
|
+
};
|
|
318
|
+
};
|
|
319
|
+
return a.scopeName = n.scopeName, a;
|
|
320
|
+
}
|
|
321
|
+
var gn = [
|
|
322
|
+
"a",
|
|
323
|
+
"button",
|
|
324
|
+
"div",
|
|
325
|
+
"form",
|
|
326
|
+
"h2",
|
|
327
|
+
"h3",
|
|
328
|
+
"img",
|
|
329
|
+
"input",
|
|
330
|
+
"label",
|
|
331
|
+
"li",
|
|
332
|
+
"nav",
|
|
333
|
+
"ol",
|
|
334
|
+
"p",
|
|
335
|
+
"select",
|
|
336
|
+
"span",
|
|
337
|
+
"svg",
|
|
338
|
+
"ul"
|
|
339
|
+
], nt = gn.reduce((t, n) => {
|
|
340
|
+
const a = Tr(`Primitive.${n}`), r = k.forwardRef((o, l) => {
|
|
341
|
+
const { asChild: m, ...u } = o, g = m ? a : n;
|
|
342
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ e(g, { ...u, ref: l });
|
|
343
|
+
});
|
|
344
|
+
return r.displayName = `Primitive.${n}`, { ...t, [n]: r };
|
|
345
|
+
}, {});
|
|
346
|
+
function xn() {
|
|
347
|
+
return mn.useSyncExternalStore(
|
|
348
|
+
vn,
|
|
349
|
+
() => !0,
|
|
350
|
+
() => !1
|
|
351
|
+
);
|
|
352
|
+
}
|
|
353
|
+
function vn() {
|
|
354
|
+
return () => {
|
|
355
|
+
};
|
|
356
|
+
}
|
|
357
|
+
var ot = "Avatar", [yn] = fn(ot), [wn, Zt] = yn(ot), er = k.forwardRef(
|
|
358
|
+
(t, n) => {
|
|
359
|
+
const { __scopeAvatar: a, ...r } = t, [o, l] = k.useState("idle");
|
|
360
|
+
return /* @__PURE__ */ e(
|
|
361
|
+
wn,
|
|
362
|
+
{
|
|
363
|
+
scope: a,
|
|
364
|
+
imageLoadingStatus: o,
|
|
365
|
+
onImageLoadingStatusChange: l,
|
|
366
|
+
children: /* @__PURE__ */ e(nt.span, { ...r, ref: n })
|
|
367
|
+
}
|
|
368
|
+
);
|
|
369
|
+
}
|
|
370
|
+
);
|
|
371
|
+
er.displayName = ot;
|
|
372
|
+
var tr = "AvatarImage", rr = k.forwardRef(
|
|
373
|
+
(t, n) => {
|
|
374
|
+
const { __scopeAvatar: a, src: r, onLoadingStatusChange: o = () => {
|
|
375
|
+
}, ...l } = t, m = Zt(tr, a), u = Nn(r, l), g = Fr((f) => {
|
|
376
|
+
o(f), m.onImageLoadingStatusChange(f);
|
|
377
|
+
});
|
|
378
|
+
return Xe(() => {
|
|
379
|
+
u !== "idle" && g(u);
|
|
380
|
+
}, [u, g]), u === "loaded" ? /* @__PURE__ */ e(nt.img, { ...l, ref: n, src: r }) : null;
|
|
381
|
+
}
|
|
382
|
+
);
|
|
383
|
+
rr.displayName = tr;
|
|
384
|
+
var ar = "AvatarFallback", nr = k.forwardRef(
|
|
385
|
+
(t, n) => {
|
|
386
|
+
const { __scopeAvatar: a, delayMs: r, ...o } = t, l = Zt(ar, a), [m, u] = k.useState(r === void 0);
|
|
387
|
+
return k.useEffect(() => {
|
|
388
|
+
if (r !== void 0) {
|
|
389
|
+
const g = window.setTimeout(() => u(!0), r);
|
|
390
|
+
return () => window.clearTimeout(g);
|
|
391
|
+
}
|
|
392
|
+
}, [r]), m && l.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ e(nt.span, { ...o, ref: n }) : null;
|
|
393
|
+
}
|
|
394
|
+
);
|
|
395
|
+
nr.displayName = ar;
|
|
396
|
+
function Gt(t, n) {
|
|
397
|
+
return t ? n ? (t.src !== n && (t.src = n), t.complete && t.naturalWidth > 0 ? "loaded" : "loading") : "error" : "idle";
|
|
398
|
+
}
|
|
399
|
+
function Nn(t, { referrerPolicy: n, crossOrigin: a }) {
|
|
400
|
+
const r = xn(), o = k.useRef(null), l = r ? (o.current || (o.current = new window.Image()), o.current) : null, [m, u] = k.useState(
|
|
401
|
+
() => Gt(l, t)
|
|
402
|
+
);
|
|
403
|
+
return Xe(() => {
|
|
404
|
+
u(Gt(l, t));
|
|
405
|
+
}, [l, t]), Xe(() => {
|
|
406
|
+
const g = (c) => () => {
|
|
407
|
+
u(c);
|
|
408
|
+
};
|
|
409
|
+
if (!l) return;
|
|
410
|
+
const f = g("loaded"), b = g("error");
|
|
411
|
+
return l.addEventListener("load", f), l.addEventListener("error", b), n && (l.referrerPolicy = n), typeof a == "string" && (l.crossOrigin = a), () => {
|
|
412
|
+
l.removeEventListener("load", f), l.removeEventListener("error", b);
|
|
413
|
+
};
|
|
414
|
+
}, [l, a, n]), m;
|
|
415
|
+
}
|
|
416
|
+
var or = er, sr = rr, ir = nr;
|
|
417
|
+
const dr = k.forwardRef(({ className: t, ...n }, a) => /* @__PURE__ */ e(
|
|
418
|
+
or,
|
|
419
|
+
{
|
|
420
|
+
ref: a,
|
|
421
|
+
className: xe(
|
|
422
|
+
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
|
|
423
|
+
t
|
|
424
|
+
),
|
|
425
|
+
...n
|
|
426
|
+
}
|
|
427
|
+
));
|
|
428
|
+
dr.displayName = or.displayName;
|
|
429
|
+
const Sn = k.forwardRef(({ className: t, ...n }, a) => /* @__PURE__ */ e(
|
|
430
|
+
sr,
|
|
431
|
+
{
|
|
432
|
+
ref: a,
|
|
433
|
+
className: xe("aspect-square h-full w-full", t),
|
|
434
|
+
...n
|
|
435
|
+
}
|
|
436
|
+
));
|
|
437
|
+
Sn.displayName = sr.displayName;
|
|
438
|
+
const cr = k.forwardRef(({ className: t, ...n }, a) => /* @__PURE__ */ e(
|
|
439
|
+
ir,
|
|
440
|
+
{
|
|
441
|
+
ref: a,
|
|
442
|
+
className: xe(
|
|
443
|
+
"flex h-full w-full items-center justify-center rounded-full bg-muted",
|
|
444
|
+
t
|
|
445
|
+
),
|
|
446
|
+
...n
|
|
447
|
+
}
|
|
448
|
+
));
|
|
449
|
+
cr.displayName = ir.displayName;
|
|
450
|
+
const Dn = async (t, n, a) => {
|
|
451
|
+
const r = `${t}/management/v1/groups`;
|
|
452
|
+
return await qt(r, n, a);
|
|
453
|
+
}, Cn = async (t, n, a, r) => {
|
|
454
|
+
const o = `${t}/management/v1/groups/${a}`;
|
|
455
|
+
return tt(o, n, "PATCH", r);
|
|
456
|
+
}, kn = async (t, n, a) => {
|
|
457
|
+
const r = `${t}/management/v1/groups/${a}`;
|
|
458
|
+
await tt(r, n, "DELETE");
|
|
459
|
+
}, En = async (t, n, a, r) => {
|
|
460
|
+
const o = `${t}/management/v1/groups/${a}/members`;
|
|
461
|
+
return await qt(o, n, r);
|
|
462
|
+
}, An = async (t, n, a, r) => {
|
|
463
|
+
const o = `${t}/management/v1/groups/${a}/members`;
|
|
464
|
+
await tt(o, n, "DELETE", r);
|
|
465
|
+
};
|
|
466
|
+
function In() {
|
|
467
|
+
const { authToken: t, tokenProps: n } = W(), a = ye();
|
|
468
|
+
return we({
|
|
469
|
+
mutationFn: (r) => Dn(n.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", r),
|
|
470
|
+
onSuccess: () => {
|
|
471
|
+
a.invalidateQueries({ queryKey: ["groups"] }), D.success("Group created successfully");
|
|
472
|
+
},
|
|
473
|
+
onError: (r) => {
|
|
474
|
+
console.error("Failed to create group:", r), D.error("Failed to create group", {
|
|
475
|
+
description: ve(r, "Failed to create group")
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
});
|
|
479
|
+
}
|
|
480
|
+
function Mn() {
|
|
481
|
+
const { authToken: t, tokenProps: n } = W(), a = ye();
|
|
482
|
+
return we({
|
|
483
|
+
mutationFn: ({
|
|
484
|
+
groupId: r,
|
|
485
|
+
data: o
|
|
486
|
+
}) => Cn(n.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", r, o),
|
|
487
|
+
onSuccess: (r, o) => {
|
|
488
|
+
a.invalidateQueries({ queryKey: ["group", o.groupId] }), a.invalidateQueries({ queryKey: ["groups"] }), D.success("Group updated successfully");
|
|
489
|
+
},
|
|
490
|
+
onError: (r) => {
|
|
491
|
+
console.error("Failed to update group:", r), D.error("Failed to update group", {
|
|
492
|
+
description: ve(r, "Failed to update group")
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
});
|
|
496
|
+
}
|
|
497
|
+
function Ln() {
|
|
498
|
+
const { authToken: t, tokenProps: n } = W(), a = ye();
|
|
499
|
+
return we({
|
|
500
|
+
mutationFn: (r) => kn(n.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", r),
|
|
501
|
+
onSuccess: (r, o) => {
|
|
502
|
+
a.invalidateQueries({ queryKey: ["groups"] }), a.removeQueries({ queryKey: ["group", o] }), D.success("Group deleted successfully");
|
|
503
|
+
},
|
|
504
|
+
onError: (r) => {
|
|
505
|
+
console.error("Failed to delete group:", r), D.error("Failed to delete group", {
|
|
506
|
+
description: ve(r, "Failed to delete group")
|
|
507
|
+
});
|
|
508
|
+
}
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
function Pn() {
|
|
512
|
+
const { authToken: t, tokenProps: n } = W(), a = ye();
|
|
513
|
+
return we({
|
|
514
|
+
mutationFn: ({
|
|
515
|
+
groupId: r,
|
|
516
|
+
data: o
|
|
517
|
+
}) => En(n.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", r, o),
|
|
518
|
+
onSuccess: (r, o) => {
|
|
519
|
+
a.invalidateQueries({ queryKey: ["group", o.groupId] }), a.invalidateQueries({
|
|
520
|
+
queryKey: ["group-members", o.groupId]
|
|
521
|
+
}), a.invalidateQueries({ queryKey: ["groups"] }), D.success("Members added successfully");
|
|
522
|
+
},
|
|
523
|
+
onError: (r) => {
|
|
524
|
+
console.error("Failed to add group members:", r), D.error("Failed to add members", {
|
|
525
|
+
description: ve(r, "Failed to add members")
|
|
526
|
+
});
|
|
527
|
+
}
|
|
528
|
+
});
|
|
529
|
+
}
|
|
530
|
+
function _n() {
|
|
531
|
+
const { authToken: t, tokenProps: n } = W(), a = ye();
|
|
532
|
+
return we({
|
|
533
|
+
mutationFn: ({
|
|
534
|
+
groupId: r,
|
|
535
|
+
data: o
|
|
536
|
+
}) => An(n.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", r, o),
|
|
537
|
+
onSuccess: (r, o) => {
|
|
538
|
+
a.invalidateQueries({ queryKey: ["group", o.groupId] }), a.invalidateQueries({
|
|
539
|
+
queryKey: ["group-members", o.groupId]
|
|
540
|
+
}), a.invalidateQueries({ queryKey: ["groups"] }), D.success("Members removed successfully");
|
|
541
|
+
},
|
|
542
|
+
onError: (r) => {
|
|
543
|
+
console.error("Failed to remove group members:", r), D.error("Failed to remove members", {
|
|
544
|
+
description: ve(r, "Failed to remove members")
|
|
545
|
+
});
|
|
546
|
+
}
|
|
547
|
+
});
|
|
548
|
+
}
|
|
549
|
+
const On = [];
|
|
550
|
+
function Rn({
|
|
551
|
+
open: t,
|
|
552
|
+
onOpenChange: n
|
|
553
|
+
}) {
|
|
554
|
+
var p, $, T;
|
|
555
|
+
const { tokenProps: a } = W(), { currentUser: r } = rt(), o = (r == null ? void 0 : r.type) === "tenant", l = a == null ? void 0 : a.tenantId, {
|
|
556
|
+
groups: m,
|
|
557
|
+
isLoading: u,
|
|
558
|
+
error: g,
|
|
559
|
+
refetch: f
|
|
560
|
+
} = Yr({
|
|
561
|
+
type: o ? "TENANT_GROUP" : "all",
|
|
562
|
+
tenantId: o ? l : void 0,
|
|
563
|
+
includeMembers: !1
|
|
564
|
+
}), b = g ? lr(g, "Unable to load groups.") : null, [c, h] = N({ kind: "list" }), [i, x] = N(null), v = Ln();
|
|
565
|
+
Ue(() => {
|
|
566
|
+
t || (h({ kind: "list" }), x(null));
|
|
567
|
+
}, [t]);
|
|
568
|
+
const w = c.kind === "members" && m.find((M) => M.id === c.groupId) || null, S = async () => {
|
|
569
|
+
if (i)
|
|
570
|
+
try {
|
|
571
|
+
await v.mutateAsync(i.id), x(null), h({ kind: "list" }), f();
|
|
572
|
+
} catch {
|
|
573
|
+
}
|
|
574
|
+
};
|
|
575
|
+
return /* @__PURE__ */ e(Xr, { open: t, onOpenChange: n, children: /* @__PURE__ */ s(Zr, { className: "flex max-h-[640px] w-[720px] max-w-[92vw] flex-col gap-0 overflow-hidden p-0", children: [
|
|
576
|
+
c.kind === "list" ? /* @__PURE__ */ s("div", { className: "shrink-0 border-b border-border px-5 pt-4 pb-3.5", children: [
|
|
577
|
+
/* @__PURE__ */ e(Mt, { className: "text-[15px] font-semibold tracking-tight", children: "Group management" }),
|
|
578
|
+
/* @__PURE__ */ e(Lt, { className: "mt-1 text-[12px] leading-[1.5] text-muted-foreground", children: "Organize people into groups for shared access." })
|
|
579
|
+
] }) : c.kind === "create" ? /* @__PURE__ */ s("div", { className: "flex h-10 shrink-0 items-center gap-1.5 border-b border-border px-5", children: [
|
|
580
|
+
/* @__PURE__ */ e(
|
|
581
|
+
"button",
|
|
582
|
+
{
|
|
583
|
+
type: "button",
|
|
584
|
+
onClick: () => h({ kind: "list" }),
|
|
585
|
+
"aria-label": "Back",
|
|
586
|
+
className: "-ml-1 flex h-6 w-6 items-center justify-center rounded-[3px] text-muted-foreground hover:bg-accent hover:text-foreground",
|
|
587
|
+
children: /* @__PURE__ */ e(jt, { className: "h-3.5 w-3.5" })
|
|
588
|
+
}
|
|
589
|
+
),
|
|
590
|
+
/* @__PURE__ */ e(Mt, { className: "truncate text-[13px] font-medium", children: "New group" }),
|
|
591
|
+
/* @__PURE__ */ e(Lt, { className: "sr-only", children: "Create a new group to organize members." })
|
|
592
|
+
] }) : null,
|
|
593
|
+
c.kind === "list" && /* @__PURE__ */ e(
|
|
594
|
+
Un,
|
|
595
|
+
{
|
|
596
|
+
groups: m,
|
|
597
|
+
isLoading: u,
|
|
598
|
+
errorMessage: b,
|
|
599
|
+
onRetry: () => f(),
|
|
600
|
+
currentUserId: r == null ? void 0 : r.id,
|
|
601
|
+
onOpenGroup: (M) => h({ kind: "members", groupId: M }),
|
|
602
|
+
onCreate: () => h({ kind: "create" }),
|
|
603
|
+
onDeleteRequest: (M) => x(M)
|
|
604
|
+
}
|
|
605
|
+
),
|
|
606
|
+
c.kind === "members" && w && /* @__PURE__ */ e(
|
|
607
|
+
$n,
|
|
608
|
+
{
|
|
609
|
+
group: w,
|
|
610
|
+
isTenantViewer: o,
|
|
611
|
+
canEdit: ((p = w.permissions) == null ? void 0 : p.canEdit) ?? w.createdBy === (r == null ? void 0 : r.id),
|
|
612
|
+
canDelete: (($ = w.permissions) == null ? void 0 : $.canDelete) ?? w.createdBy === (r == null ? void 0 : r.id),
|
|
613
|
+
canManageMembers: ((T = w.permissions) == null ? void 0 : T.canManageMembers) ?? w.createdBy === (r == null ? void 0 : r.id),
|
|
614
|
+
onBack: () => h({ kind: "list" }),
|
|
615
|
+
onMembersChanged: f,
|
|
616
|
+
onUpdated: f,
|
|
617
|
+
onRequestDelete: () => x(w)
|
|
618
|
+
},
|
|
619
|
+
w.id
|
|
620
|
+
),
|
|
621
|
+
c.kind === "create" && /* @__PURE__ */ e(
|
|
622
|
+
Bn,
|
|
623
|
+
{
|
|
624
|
+
isTenantUser: o,
|
|
625
|
+
tenantId: l,
|
|
626
|
+
onCancel: () => h({ kind: "list" }),
|
|
627
|
+
onCreated: (M) => {
|
|
628
|
+
f(), h({ kind: "members", groupId: M });
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
),
|
|
632
|
+
i && /* @__PURE__ */ s("div", { className: "flex shrink-0 items-center justify-between gap-3 border-t border-border bg-muted/40 px-5 py-2.5", children: [
|
|
633
|
+
/* @__PURE__ */ s("div", { className: "min-w-0 text-[12px] text-foreground", children: [
|
|
634
|
+
"Delete ",
|
|
635
|
+
/* @__PURE__ */ e("span", { className: "font-medium", children: i.name }),
|
|
636
|
+
"?",
|
|
637
|
+
/* @__PURE__ */ e("span", { className: "ml-2 text-muted-foreground", children: "Members lose any access granted via this group." })
|
|
638
|
+
] }),
|
|
639
|
+
/* @__PURE__ */ s("div", { className: "flex shrink-0 items-center gap-1.5", children: [
|
|
640
|
+
/* @__PURE__ */ e(
|
|
641
|
+
"button",
|
|
642
|
+
{
|
|
643
|
+
type: "button",
|
|
644
|
+
onClick: () => x(null),
|
|
645
|
+
disabled: v.isPending,
|
|
646
|
+
className: "h-7 rounded-[5px] px-2.5 text-[12px] font-medium text-foreground/80 hover:bg-background",
|
|
647
|
+
children: "Cancel"
|
|
648
|
+
}
|
|
649
|
+
),
|
|
650
|
+
/* @__PURE__ */ s(
|
|
651
|
+
"button",
|
|
652
|
+
{
|
|
653
|
+
type: "button",
|
|
654
|
+
onClick: S,
|
|
655
|
+
disabled: v.isPending,
|
|
656
|
+
className: "inline-flex h-7 items-center gap-1.5 rounded-[5px] bg-rose-600 px-2.5 text-[12px] font-medium text-white hover:bg-rose-700 disabled:opacity-60",
|
|
657
|
+
children: [
|
|
658
|
+
v.isPending ? /* @__PURE__ */ e(Re, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ e(at, { className: "h-3 w-3" }),
|
|
659
|
+
"Delete group"
|
|
660
|
+
]
|
|
661
|
+
}
|
|
662
|
+
)
|
|
663
|
+
] })
|
|
664
|
+
] })
|
|
665
|
+
] }) });
|
|
666
|
+
}
|
|
667
|
+
function Un({
|
|
668
|
+
groups: t,
|
|
669
|
+
isLoading: n,
|
|
670
|
+
errorMessage: a,
|
|
671
|
+
onRetry: r,
|
|
672
|
+
currentUserId: o,
|
|
673
|
+
onOpenGroup: l,
|
|
674
|
+
onCreate: m,
|
|
675
|
+
onDeleteRequest: u
|
|
676
|
+
}) {
|
|
677
|
+
const [g, f] = N(""), b = Q(
|
|
678
|
+
() => t.filter(
|
|
679
|
+
(c) => !g.trim() || c.name.toLowerCase().includes(g.toLowerCase()) || (c.description || "").toLowerCase().includes(g.toLowerCase())
|
|
680
|
+
),
|
|
681
|
+
[t, g]
|
|
682
|
+
);
|
|
683
|
+
return /* @__PURE__ */ s("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
|
|
684
|
+
/* @__PURE__ */ s("div", { className: "flex shrink-0 items-center gap-2 border-b border-border px-5 py-2.5", children: [
|
|
685
|
+
/* @__PURE__ */ s("div", { className: "flex flex-1 items-center gap-2 rounded-[5px] border border-border bg-background px-2 focus-within:border-foreground/40", children: [
|
|
686
|
+
/* @__PURE__ */ e(Ja, { className: "h-3 w-3 text-muted-foreground" }),
|
|
687
|
+
/* @__PURE__ */ e(
|
|
688
|
+
"input",
|
|
689
|
+
{
|
|
690
|
+
value: g,
|
|
691
|
+
onChange: (c) => f(c.target.value),
|
|
692
|
+
placeholder: "Search groups…",
|
|
693
|
+
className: "h-7 flex-1 bg-transparent text-[12px] text-foreground placeholder:text-muted-foreground focus:outline-none"
|
|
694
|
+
}
|
|
695
|
+
),
|
|
696
|
+
g && /* @__PURE__ */ e(
|
|
697
|
+
"button",
|
|
698
|
+
{
|
|
699
|
+
type: "button",
|
|
700
|
+
onClick: () => f(""),
|
|
701
|
+
className: "flex h-4 w-4 items-center justify-center rounded-[3px] text-muted-foreground hover:bg-accent hover:text-foreground",
|
|
702
|
+
children: /* @__PURE__ */ e(Wt, { className: "h-2.5 w-2.5" })
|
|
703
|
+
}
|
|
704
|
+
)
|
|
705
|
+
] }),
|
|
706
|
+
/* @__PURE__ */ s(
|
|
707
|
+
"button",
|
|
708
|
+
{
|
|
709
|
+
type: "button",
|
|
710
|
+
onClick: m,
|
|
711
|
+
className: "inline-flex h-7 items-center gap-1.5 rounded-[5px] bg-foreground px-2.5 text-[12px] font-medium text-background hover:opacity-90",
|
|
712
|
+
children: [
|
|
713
|
+
/* @__PURE__ */ e(ae, { className: "h-3 w-3" }),
|
|
714
|
+
"New group"
|
|
715
|
+
]
|
|
716
|
+
}
|
|
717
|
+
)
|
|
718
|
+
] }),
|
|
719
|
+
/* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto", children: n ? /* @__PURE__ */ e("div", { className: "space-y-px p-3", children: [1, 2, 3].map((c) => /* @__PURE__ */ e(
|
|
720
|
+
"div",
|
|
721
|
+
{
|
|
722
|
+
className: "h-12 animate-pulse rounded-[4px] bg-muted/60"
|
|
723
|
+
},
|
|
724
|
+
c
|
|
725
|
+
)) }) : a ? /* @__PURE__ */ e(
|
|
726
|
+
ur,
|
|
727
|
+
{
|
|
728
|
+
title: "Can't load groups",
|
|
729
|
+
message: a,
|
|
730
|
+
onRetry: r
|
|
731
|
+
}
|
|
732
|
+
) : b.length === 0 && t.length === 0 ? /* @__PURE__ */ e(Fn, { onCreate: m }) : b.length === 0 ? /* @__PURE__ */ s("div", { className: "flex h-full flex-col items-center justify-center gap-1 py-10 text-center", children: [
|
|
733
|
+
/* @__PURE__ */ s("div", { className: "text-[12px] text-foreground", children: [
|
|
734
|
+
'No groups match "',
|
|
735
|
+
g,
|
|
736
|
+
'"'
|
|
737
|
+
] }),
|
|
738
|
+
/* @__PURE__ */ e("div", { className: "text-[11px] text-muted-foreground", children: "Try a different search." })
|
|
739
|
+
] }) : b.map((c) => {
|
|
740
|
+
var h;
|
|
741
|
+
return /* @__PURE__ */ e(
|
|
742
|
+
Tn,
|
|
743
|
+
{
|
|
744
|
+
group: c,
|
|
745
|
+
canDelete: ((h = c.permissions) == null ? void 0 : h.canDelete) ?? c.createdBy === o,
|
|
746
|
+
onClick: () => l(c.id),
|
|
747
|
+
onDelete: () => u(c)
|
|
748
|
+
},
|
|
749
|
+
c.id
|
|
750
|
+
);
|
|
751
|
+
}) })
|
|
752
|
+
] });
|
|
753
|
+
}
|
|
754
|
+
function Tn({
|
|
755
|
+
group: t,
|
|
756
|
+
canDelete: n,
|
|
757
|
+
onClick: a,
|
|
758
|
+
onDelete: r
|
|
759
|
+
}) {
|
|
760
|
+
let o = "";
|
|
761
|
+
try {
|
|
762
|
+
o = Yt(new Date(t.createdAt), "MMM d, yyyy");
|
|
763
|
+
} catch {
|
|
764
|
+
o = "";
|
|
765
|
+
}
|
|
766
|
+
return /* @__PURE__ */ s(
|
|
767
|
+
"button",
|
|
768
|
+
{
|
|
769
|
+
type: "button",
|
|
770
|
+
onClick: a,
|
|
771
|
+
className: "group flex w-full items-center gap-3 border-b border-border/60 px-5 py-2.5 text-left hover:bg-accent/40",
|
|
772
|
+
children: [
|
|
773
|
+
/* @__PURE__ */ e("div", { className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-[4px] border border-border bg-background text-muted-foreground", children: /* @__PURE__ */ e(ra, { className: "h-3.5 w-3.5" }) }),
|
|
774
|
+
/* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: [
|
|
775
|
+
/* @__PURE__ */ e("div", { className: "truncate text-[13px] font-medium text-foreground", children: t.name }),
|
|
776
|
+
/* @__PURE__ */ s("div", { className: "mt-0.5 flex items-center gap-2 text-[11px] text-muted-foreground", children: [
|
|
777
|
+
/* @__PURE__ */ s("span", { className: "inline-flex items-center gap-1", children: [
|
|
778
|
+
/* @__PURE__ */ e(Xt, { className: "h-2.5 w-2.5" }),
|
|
779
|
+
t.memberCount,
|
|
780
|
+
" member",
|
|
781
|
+
t.memberCount === 1 ? "" : "s"
|
|
782
|
+
] }),
|
|
783
|
+
o && /* @__PURE__ */ s(F, { children: [
|
|
784
|
+
/* @__PURE__ */ e("span", { className: "text-border", children: "·" }),
|
|
785
|
+
/* @__PURE__ */ s("span", { className: "inline-flex items-center gap-1", children: [
|
|
786
|
+
/* @__PURE__ */ e(Qt, { className: "h-2.5 w-2.5" }),
|
|
787
|
+
o
|
|
788
|
+
] })
|
|
789
|
+
] }),
|
|
790
|
+
t.description && /* @__PURE__ */ s(F, { children: [
|
|
791
|
+
/* @__PURE__ */ e("span", { className: "text-border", children: "·" }),
|
|
792
|
+
/* @__PURE__ */ e("span", { className: "truncate text-muted-foreground", children: t.description })
|
|
793
|
+
] })
|
|
794
|
+
] })
|
|
795
|
+
] }),
|
|
796
|
+
/* @__PURE__ */ s("div", { className: "flex items-center gap-0.5 opacity-0 transition-opacity group-hover:opacity-100", children: [
|
|
797
|
+
n && /* @__PURE__ */ e(
|
|
798
|
+
"span",
|
|
799
|
+
{
|
|
800
|
+
role: "button",
|
|
801
|
+
tabIndex: 0,
|
|
802
|
+
onClick: (l) => {
|
|
803
|
+
l.stopPropagation(), r();
|
|
804
|
+
},
|
|
805
|
+
onKeyDown: (l) => {
|
|
806
|
+
(l.key === "Enter" || l.key === " ") && (l.preventDefault(), l.stopPropagation(), r());
|
|
807
|
+
},
|
|
808
|
+
"aria-label": `Delete ${t.name}`,
|
|
809
|
+
className: "flex h-6 w-6 items-center justify-center rounded-[3px] text-muted-foreground hover:bg-accent hover:text-foreground",
|
|
810
|
+
children: /* @__PURE__ */ e(at, { className: "h-3 w-3" })
|
|
811
|
+
}
|
|
812
|
+
),
|
|
813
|
+
/* @__PURE__ */ e(Ya, { className: "h-3.5 w-3.5 text-muted-foreground" })
|
|
814
|
+
] })
|
|
815
|
+
]
|
|
816
|
+
}
|
|
817
|
+
);
|
|
818
|
+
}
|
|
819
|
+
function Fn({ onCreate: t }) {
|
|
820
|
+
return /* @__PURE__ */ s("div", { className: "flex h-full flex-col items-center justify-center gap-2 py-12 text-center", children: [
|
|
821
|
+
/* @__PURE__ */ e("div", { className: "flex h-9 w-9 items-center justify-center rounded-full border border-border bg-muted/40 text-muted-foreground", children: /* @__PURE__ */ e(Kt, { className: "h-4 w-4" }) }),
|
|
822
|
+
/* @__PURE__ */ e("div", { className: "text-[13px] font-medium text-foreground", children: "No groups yet" }),
|
|
823
|
+
/* @__PURE__ */ e("div", { className: "max-w-[320px] text-[11.5px] leading-[1.55] text-muted-foreground", children: "Groups let you grant shared access to dashboards. Create one and add members." }),
|
|
824
|
+
/* @__PURE__ */ s(
|
|
825
|
+
"button",
|
|
826
|
+
{
|
|
827
|
+
type: "button",
|
|
828
|
+
onClick: t,
|
|
829
|
+
className: "mt-1 inline-flex h-7 items-center gap-1.5 rounded-[5px] bg-foreground px-2.5 text-[12px] font-medium text-background hover:opacity-90",
|
|
830
|
+
children: [
|
|
831
|
+
/* @__PURE__ */ e(ae, { className: "h-3 w-3" }),
|
|
832
|
+
"New group"
|
|
833
|
+
]
|
|
834
|
+
}
|
|
835
|
+
)
|
|
836
|
+
] });
|
|
837
|
+
}
|
|
838
|
+
function $n({
|
|
839
|
+
group: t,
|
|
840
|
+
isTenantViewer: n,
|
|
841
|
+
canEdit: a,
|
|
842
|
+
canDelete: r,
|
|
843
|
+
canManageMembers: o,
|
|
844
|
+
onBack: l,
|
|
845
|
+
onMembersChanged: m,
|
|
846
|
+
onUpdated: u,
|
|
847
|
+
onRequestDelete: g
|
|
848
|
+
}) {
|
|
849
|
+
const {
|
|
850
|
+
data: f,
|
|
851
|
+
isLoading: b,
|
|
852
|
+
error: c,
|
|
853
|
+
refetch: h
|
|
854
|
+
} = ea(t.id), i = (f == null ? void 0 : f.members) ?? On, x = c ? lr(c, "Unable to load members for this group.") : null, v = t.type === "TENANT_GROUP" ? "tenant" : "organization", { users: w } = ta({
|
|
855
|
+
type: v,
|
|
856
|
+
tenantId: t.tenantId || void 0,
|
|
857
|
+
active: !0,
|
|
858
|
+
limit: 200
|
|
859
|
+
}), S = Q(
|
|
860
|
+
() => new Set(i.map((y) => y.userId)),
|
|
861
|
+
[i]
|
|
862
|
+
), p = Pn(), $ = _n(), T = Mn(), [M, A] = N(!1), [E, J] = N(t.name), [Te, q] = N(!1), [oe, z] = N(t.description || ""), [se, ie] = N(""), [Ne, Y] = N(!1), Fe = Q(() => {
|
|
863
|
+
const y = se.trim().toLowerCase();
|
|
864
|
+
return w.filter((R) => !S.has(R.id)).filter(
|
|
865
|
+
(R) => !y || (R.name || "").toLowerCase().includes(y) || (R.email || "").toLowerCase().includes(y)
|
|
866
|
+
).slice(0, 50);
|
|
867
|
+
}, [w, S, se]), de = async () => {
|
|
868
|
+
const y = E.trim();
|
|
869
|
+
if (A(!1), y.length >= 3 && y !== t.name)
|
|
870
|
+
try {
|
|
871
|
+
await T.mutateAsync({
|
|
872
|
+
groupId: t.id,
|
|
873
|
+
data: { name: y }
|
|
874
|
+
}), u();
|
|
875
|
+
} catch {
|
|
876
|
+
}
|
|
877
|
+
}, Se = async () => {
|
|
878
|
+
const y = oe.trim();
|
|
879
|
+
if (q(!1), y !== (t.description || ""))
|
|
880
|
+
try {
|
|
881
|
+
await T.mutateAsync({
|
|
882
|
+
groupId: t.id,
|
|
883
|
+
data: { description: y }
|
|
884
|
+
}), u();
|
|
885
|
+
} catch {
|
|
886
|
+
}
|
|
887
|
+
}, X = async (y) => {
|
|
888
|
+
if (o) {
|
|
889
|
+
ie(""), Y(!1);
|
|
890
|
+
try {
|
|
891
|
+
await p.mutateAsync({
|
|
892
|
+
groupId: t.id,
|
|
893
|
+
data: {
|
|
894
|
+
userIds: [y.id],
|
|
895
|
+
userType: v === "tenant" ? "tenant" : "org"
|
|
896
|
+
}
|
|
897
|
+
}), h(), m();
|
|
898
|
+
} catch {
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
}, Z = async (y) => {
|
|
902
|
+
if (o)
|
|
903
|
+
try {
|
|
904
|
+
await $.mutateAsync({
|
|
905
|
+
groupId: t.id,
|
|
906
|
+
data: { userIds: [y] }
|
|
907
|
+
}), h(), m();
|
|
908
|
+
} catch {
|
|
909
|
+
}
|
|
910
|
+
};
|
|
911
|
+
let B = "";
|
|
912
|
+
try {
|
|
913
|
+
B = Yt(new Date(t.createdAt), "MMM d, yyyy");
|
|
914
|
+
} catch {
|
|
915
|
+
B = "";
|
|
916
|
+
}
|
|
917
|
+
return /* @__PURE__ */ s("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
|
|
918
|
+
/* @__PURE__ */ s("div", { className: "flex h-10 shrink-0 items-center gap-1.5 border-b border-border px-5", children: [
|
|
919
|
+
/* @__PURE__ */ e(
|
|
920
|
+
"button",
|
|
921
|
+
{
|
|
922
|
+
type: "button",
|
|
923
|
+
onClick: l,
|
|
924
|
+
"aria-label": "Back",
|
|
925
|
+
className: "-ml-1 flex h-6 w-6 items-center justify-center rounded-[3px] text-muted-foreground hover:bg-accent hover:text-foreground",
|
|
926
|
+
children: /* @__PURE__ */ e(jt, { className: "h-3.5 w-3.5" })
|
|
927
|
+
}
|
|
928
|
+
),
|
|
929
|
+
M ? /* @__PURE__ */ e(
|
|
930
|
+
"input",
|
|
931
|
+
{
|
|
932
|
+
autoFocus: !0,
|
|
933
|
+
value: E,
|
|
934
|
+
onChange: (y) => J(y.target.value),
|
|
935
|
+
onBlur: de,
|
|
936
|
+
onKeyDown: (y) => {
|
|
937
|
+
y.key === "Enter" && de(), y.key === "Escape" && (J(t.name), A(!1));
|
|
938
|
+
},
|
|
939
|
+
className: "h-6 min-w-0 flex-1 rounded-[3px] border border-border bg-background px-1.5 text-[13px] font-medium text-foreground focus:border-foreground/40 focus:outline-none"
|
|
940
|
+
}
|
|
941
|
+
) : /* @__PURE__ */ e(
|
|
942
|
+
"button",
|
|
943
|
+
{
|
|
944
|
+
type: "button",
|
|
945
|
+
onClick: () => {
|
|
946
|
+
a && (J(t.name), A(!0));
|
|
947
|
+
},
|
|
948
|
+
title: a ? "Click to rename" : t.name,
|
|
949
|
+
disabled: !a,
|
|
950
|
+
className: "truncate rounded-[3px] px-1 text-[13px] font-medium text-foreground enabled:hover:bg-accent disabled:cursor-default",
|
|
951
|
+
children: t.name
|
|
952
|
+
}
|
|
953
|
+
),
|
|
954
|
+
/* @__PURE__ */ s("span", { className: "ml-1 inline-flex shrink-0 items-center gap-1 text-[10.5px] text-muted-foreground", children: [
|
|
955
|
+
/* @__PURE__ */ e(Xt, { className: "h-2.5 w-2.5" }),
|
|
956
|
+
i.length,
|
|
957
|
+
" member",
|
|
958
|
+
i.length === 1 ? "" : "s"
|
|
959
|
+
] })
|
|
960
|
+
] }),
|
|
961
|
+
/* @__PURE__ */ e("div", { className: "shrink-0 border-b border-border px-5 py-2.5", children: Te ? /* @__PURE__ */ s("div", { children: [
|
|
962
|
+
/* @__PURE__ */ e(
|
|
963
|
+
"textarea",
|
|
964
|
+
{
|
|
965
|
+
autoFocus: !0,
|
|
966
|
+
rows: 2,
|
|
967
|
+
value: oe,
|
|
968
|
+
onChange: (y) => z(y.target.value),
|
|
969
|
+
maxLength: 200,
|
|
970
|
+
onKeyDown: (y) => {
|
|
971
|
+
y.key === "Escape" && (z(t.description || ""), q(!1)), y.key === "Enter" && (y.metaKey || y.ctrlKey) && Se();
|
|
972
|
+
},
|
|
973
|
+
placeholder: "What is this group for?",
|
|
974
|
+
className: "block w-full resize-none rounded-[5px] border border-border bg-background px-2 py-1.5 text-[12px] text-foreground placeholder:text-muted-foreground focus:border-foreground/40 focus:outline-none"
|
|
975
|
+
}
|
|
976
|
+
),
|
|
977
|
+
/* @__PURE__ */ s("div", { className: "mt-1.5 flex items-center justify-between", children: [
|
|
978
|
+
/* @__PURE__ */ s("span", { className: "text-[10.5px] text-muted-foreground", children: [
|
|
979
|
+
oe.length,
|
|
980
|
+
"/200 · Esc to cancel · ⌘↩ to save"
|
|
981
|
+
] }),
|
|
982
|
+
/* @__PURE__ */ s("div", { className: "flex items-center gap-1.5", children: [
|
|
983
|
+
/* @__PURE__ */ e(
|
|
984
|
+
"button",
|
|
985
|
+
{
|
|
986
|
+
type: "button",
|
|
987
|
+
onClick: () => {
|
|
988
|
+
z(t.description || ""), q(!1);
|
|
989
|
+
},
|
|
990
|
+
className: "h-6 rounded-[5px] px-2 text-[11px] font-medium text-foreground/80 hover:bg-accent",
|
|
991
|
+
children: "Cancel"
|
|
992
|
+
}
|
|
993
|
+
),
|
|
994
|
+
/* @__PURE__ */ e(
|
|
995
|
+
"button",
|
|
996
|
+
{
|
|
997
|
+
type: "button",
|
|
998
|
+
onClick: Se,
|
|
999
|
+
className: "inline-flex h-6 items-center rounded-[5px] bg-foreground px-2 text-[11px] font-medium text-background hover:opacity-90",
|
|
1000
|
+
children: "Save"
|
|
1001
|
+
}
|
|
1002
|
+
)
|
|
1003
|
+
] })
|
|
1004
|
+
] })
|
|
1005
|
+
] }) : /* @__PURE__ */ s(
|
|
1006
|
+
"button",
|
|
1007
|
+
{
|
|
1008
|
+
type: "button",
|
|
1009
|
+
onClick: () => {
|
|
1010
|
+
a && (z(t.description || ""), q(!0));
|
|
1011
|
+
},
|
|
1012
|
+
disabled: !a,
|
|
1013
|
+
title: a ? "Click to edit description" : void 0,
|
|
1014
|
+
className: "block w-full rounded-[3px] px-1 py-0.5 text-left enabled:hover:bg-accent/40 disabled:cursor-default",
|
|
1015
|
+
children: [
|
|
1016
|
+
t.description ? /* @__PURE__ */ e("p", { className: "text-[12px] leading-[1.55] text-foreground/90", children: t.description }) : /* @__PURE__ */ e("p", { className: "text-[12px] leading-[1.55] text-muted-foreground", children: a ? "Add a description…" : "No description" }),
|
|
1017
|
+
/* @__PURE__ */ s("p", { className: "mt-1 text-[10.5px] text-muted-foreground", children: [
|
|
1018
|
+
B ? `Created ${B}` : "Recently created",
|
|
1019
|
+
a ? " · You can edit this group" : ""
|
|
1020
|
+
] })
|
|
1021
|
+
]
|
|
1022
|
+
}
|
|
1023
|
+
) }),
|
|
1024
|
+
o && /* @__PURE__ */ e(
|
|
1025
|
+
Gn,
|
|
1026
|
+
{
|
|
1027
|
+
query: se,
|
|
1028
|
+
setQuery: ie,
|
|
1029
|
+
open: Ne,
|
|
1030
|
+
setOpen: Y,
|
|
1031
|
+
candidates: Fe,
|
|
1032
|
+
showKindChip: !n,
|
|
1033
|
+
onAdd: X,
|
|
1034
|
+
busy: p.isPending
|
|
1035
|
+
}
|
|
1036
|
+
),
|
|
1037
|
+
/* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto", children: b ? /* @__PURE__ */ e("div", { className: "space-y-px p-3", children: [1, 2, 3].map((y) => /* @__PURE__ */ e(
|
|
1038
|
+
"div",
|
|
1039
|
+
{
|
|
1040
|
+
className: "h-10 animate-pulse rounded-[4px] bg-muted/60"
|
|
1041
|
+
},
|
|
1042
|
+
y
|
|
1043
|
+
)) }) : x ? /* @__PURE__ */ e(
|
|
1044
|
+
ur,
|
|
1045
|
+
{
|
|
1046
|
+
title: "Can't load members",
|
|
1047
|
+
message: x,
|
|
1048
|
+
onRetry: () => h()
|
|
1049
|
+
}
|
|
1050
|
+
) : i.length === 0 ? /* @__PURE__ */ s("div", { className: "flex h-full flex-col items-center justify-center gap-1 py-10 text-center", children: [
|
|
1051
|
+
/* @__PURE__ */ e("div", { className: "text-[12px] text-foreground", children: "No members yet" }),
|
|
1052
|
+
/* @__PURE__ */ e("div", { className: "text-[11px] text-muted-foreground", children: o ? "Search above to add people to this group." : "This group does not have any members." })
|
|
1053
|
+
] }) : i.map((y) => {
|
|
1054
|
+
var R, ce, j, De, le, I;
|
|
1055
|
+
return /* @__PURE__ */ s(
|
|
1056
|
+
"div",
|
|
1057
|
+
{
|
|
1058
|
+
className: "group flex items-center gap-2 border-b border-border/60 px-5 py-2",
|
|
1059
|
+
children: [
|
|
1060
|
+
/* @__PURE__ */ e(mr, { name: ((R = y.user) == null ? void 0 : R.name) || ((ce = y.user) == null ? void 0 : ce.email) || "?" }),
|
|
1061
|
+
/* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: [
|
|
1062
|
+
/* @__PURE__ */ e("div", { className: "truncate text-[12.5px] font-medium text-foreground", children: ((j = y.user) == null ? void 0 : j.name) || ((De = y.user) == null ? void 0 : De.email) || "Unknown" }),
|
|
1063
|
+
((le = y.user) == null ? void 0 : le.email) && y.user.name && /* @__PURE__ */ e("div", { className: "truncate text-[10.5px] text-muted-foreground", children: y.user.email })
|
|
1064
|
+
] }),
|
|
1065
|
+
!n && /* @__PURE__ */ e("span", { className: "text-[10px] uppercase tracking-[0.06em] text-muted-foreground", children: y.userType }),
|
|
1066
|
+
/* @__PURE__ */ e(
|
|
1067
|
+
"button",
|
|
1068
|
+
{
|
|
1069
|
+
type: "button",
|
|
1070
|
+
onClick: () => Z(y.userId),
|
|
1071
|
+
disabled: !o || $.isPending,
|
|
1072
|
+
"aria-label": `Remove ${((I = y.user) == null ? void 0 : I.name) || "member"}`,
|
|
1073
|
+
className: "flex h-6 w-6 items-center justify-center rounded-[3px] text-muted-foreground opacity-0 transition-opacity hover:bg-accent hover:text-foreground group-hover:opacity-100 disabled:opacity-30",
|
|
1074
|
+
children: /* @__PURE__ */ e(Wt, { className: "h-3 w-3" })
|
|
1075
|
+
}
|
|
1076
|
+
)
|
|
1077
|
+
]
|
|
1078
|
+
},
|
|
1079
|
+
y.id
|
|
1080
|
+
);
|
|
1081
|
+
}) }),
|
|
1082
|
+
r && /* @__PURE__ */ e("div", { className: "flex shrink-0 items-center justify-end gap-1.5 border-t border-border bg-muted/30 px-5 py-2.5", children: /* @__PURE__ */ s(
|
|
1083
|
+
"button",
|
|
1084
|
+
{
|
|
1085
|
+
type: "button",
|
|
1086
|
+
onClick: g,
|
|
1087
|
+
className: "inline-flex h-7 items-center gap-1.5 rounded-[5px] border border-rose-200 bg-background px-2.5 text-[12px] font-medium text-rose-600 hover:bg-rose-50 dark:border-rose-900/60 dark:text-rose-400 dark:hover:bg-rose-950/30",
|
|
1088
|
+
children: [
|
|
1089
|
+
/* @__PURE__ */ e(at, { className: "h-3 w-3" }),
|
|
1090
|
+
"Delete group"
|
|
1091
|
+
]
|
|
1092
|
+
}
|
|
1093
|
+
) })
|
|
1094
|
+
] });
|
|
1095
|
+
}
|
|
1096
|
+
function Bn({
|
|
1097
|
+
isTenantUser: t,
|
|
1098
|
+
tenantId: n,
|
|
1099
|
+
onCancel: a,
|
|
1100
|
+
onCreated: r
|
|
1101
|
+
}) {
|
|
1102
|
+
const [o, l] = N(""), [m, u] = N(""), [g, f] = N(null), b = In(), c = o.trim().length >= 3 && o.trim().length <= 50, h = async () => {
|
|
1103
|
+
if (!c) return;
|
|
1104
|
+
f(null);
|
|
1105
|
+
const i = {
|
|
1106
|
+
name: o.trim(),
|
|
1107
|
+
description: m.trim() || void 0,
|
|
1108
|
+
type: t ? "TENANT_GROUP" : "ORG_GROUP",
|
|
1109
|
+
...t && n ? { tenantId: n } : {}
|
|
1110
|
+
};
|
|
1111
|
+
try {
|
|
1112
|
+
const x = await b.mutateAsync(i), v = x == null ? void 0 : x.id;
|
|
1113
|
+
v ? r(v) : a();
|
|
1114
|
+
} catch (x) {
|
|
1115
|
+
f(x instanceof Error ? x.message : "Failed to create group");
|
|
1116
|
+
}
|
|
1117
|
+
};
|
|
1118
|
+
return /* @__PURE__ */ s("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
|
|
1119
|
+
/* @__PURE__ */ s("div", { className: "flex-1 overflow-y-auto px-5 py-4", children: [
|
|
1120
|
+
/* @__PURE__ */ e(Ht, { children: "Name" }),
|
|
1121
|
+
/* @__PURE__ */ e(
|
|
1122
|
+
"input",
|
|
1123
|
+
{
|
|
1124
|
+
autoFocus: !0,
|
|
1125
|
+
value: o,
|
|
1126
|
+
onChange: (i) => l(i.target.value),
|
|
1127
|
+
placeholder: "Marketing leads, North America sales, …",
|
|
1128
|
+
maxLength: 50,
|
|
1129
|
+
className: "mt-1 block h-7 w-full rounded-[5px] border border-border bg-background px-2 text-[12px] text-foreground placeholder:text-muted-foreground focus:border-foreground/40 focus:outline-none"
|
|
1130
|
+
}
|
|
1131
|
+
),
|
|
1132
|
+
/* @__PURE__ */ e("div", { className: "mt-1 text-[10.5px] text-muted-foreground", children: "3–50 characters." }),
|
|
1133
|
+
/* @__PURE__ */ s("div", { className: "mt-4", children: [
|
|
1134
|
+
/* @__PURE__ */ e(Ht, { children: "Description (optional)" }),
|
|
1135
|
+
/* @__PURE__ */ e(
|
|
1136
|
+
"textarea",
|
|
1137
|
+
{
|
|
1138
|
+
rows: 2,
|
|
1139
|
+
value: m,
|
|
1140
|
+
onChange: (i) => u(i.target.value),
|
|
1141
|
+
maxLength: 200,
|
|
1142
|
+
placeholder: "What is this group for?",
|
|
1143
|
+
className: "mt-1 block w-full resize-none rounded-[5px] border border-border bg-background px-2 py-1.5 text-[12px] text-foreground placeholder:text-muted-foreground focus:border-foreground/40 focus:outline-none"
|
|
1144
|
+
}
|
|
1145
|
+
),
|
|
1146
|
+
/* @__PURE__ */ s("div", { className: "mt-1 flex justify-end text-[10.5px] text-muted-foreground", children: [
|
|
1147
|
+
m.length,
|
|
1148
|
+
"/200"
|
|
1149
|
+
] })
|
|
1150
|
+
] }),
|
|
1151
|
+
g && /* @__PURE__ */ e("div", { className: "mt-3 rounded-[5px] border border-rose-200 bg-rose-50 px-2 py-1.5 text-[11.5px] text-rose-700 dark:border-rose-900/60 dark:bg-rose-950/30 dark:text-rose-300", children: g })
|
|
1152
|
+
] }),
|
|
1153
|
+
/* @__PURE__ */ s("div", { className: "flex shrink-0 items-center justify-end gap-1.5 border-t border-border bg-muted/30 px-5 py-2.5", children: [
|
|
1154
|
+
/* @__PURE__ */ e(
|
|
1155
|
+
"button",
|
|
1156
|
+
{
|
|
1157
|
+
type: "button",
|
|
1158
|
+
onClick: a,
|
|
1159
|
+
disabled: b.isPending,
|
|
1160
|
+
className: "h-7 rounded-[5px] px-2.5 text-[12px] font-medium text-foreground/80 hover:bg-accent",
|
|
1161
|
+
children: "Cancel"
|
|
1162
|
+
}
|
|
1163
|
+
),
|
|
1164
|
+
/* @__PURE__ */ e(
|
|
1165
|
+
"button",
|
|
1166
|
+
{
|
|
1167
|
+
type: "button",
|
|
1168
|
+
onClick: h,
|
|
1169
|
+
disabled: !c || b.isPending,
|
|
1170
|
+
className: "inline-flex h-7 items-center gap-1.5 rounded-[5px] bg-foreground px-2.5 text-[12px] font-medium text-background hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-60",
|
|
1171
|
+
children: b.isPending ? /* @__PURE__ */ s(F, { children: [
|
|
1172
|
+
/* @__PURE__ */ e(Re, { className: "h-3 w-3 animate-spin" }),
|
|
1173
|
+
"Creating…"
|
|
1174
|
+
] }) : /* @__PURE__ */ s(F, { children: [
|
|
1175
|
+
/* @__PURE__ */ e(ae, { className: "h-3 w-3" }),
|
|
1176
|
+
"Create group"
|
|
1177
|
+
] })
|
|
1178
|
+
}
|
|
1179
|
+
)
|
|
1180
|
+
] })
|
|
1181
|
+
] });
|
|
1182
|
+
}
|
|
1183
|
+
function Gn({
|
|
1184
|
+
query: t,
|
|
1185
|
+
setQuery: n,
|
|
1186
|
+
open: a,
|
|
1187
|
+
setOpen: r,
|
|
1188
|
+
candidates: o,
|
|
1189
|
+
showKindChip: l,
|
|
1190
|
+
onAdd: m,
|
|
1191
|
+
busy: u
|
|
1192
|
+
}) {
|
|
1193
|
+
const g = Ft(null), f = Ft(null), [b, c] = N(null);
|
|
1194
|
+
Fa(() => {
|
|
1195
|
+
if (!a) {
|
|
1196
|
+
c(null);
|
|
1197
|
+
return;
|
|
1198
|
+
}
|
|
1199
|
+
const i = () => {
|
|
1200
|
+
const x = g.current;
|
|
1201
|
+
if (!x) return;
|
|
1202
|
+
const v = x.getBoundingClientRect(), w = 240, p = window.innerHeight - v.bottom < w + 16 && v.top > w;
|
|
1203
|
+
c({
|
|
1204
|
+
left: v.left,
|
|
1205
|
+
top: p ? v.top - 6 : v.bottom + 6,
|
|
1206
|
+
width: v.width,
|
|
1207
|
+
above: p
|
|
1208
|
+
});
|
|
1209
|
+
};
|
|
1210
|
+
return i(), window.addEventListener("resize", i), window.addEventListener("scroll", i, !0), () => {
|
|
1211
|
+
window.removeEventListener("resize", i), window.removeEventListener("scroll", i, !0);
|
|
1212
|
+
};
|
|
1213
|
+
}, [a, o.length]), Ue(() => {
|
|
1214
|
+
if (!a) return;
|
|
1215
|
+
const i = (x) => {
|
|
1216
|
+
var w, S;
|
|
1217
|
+
const v = x.target;
|
|
1218
|
+
(w = g.current) != null && w.contains(v) || (S = f.current) != null && S.contains(v) || r(!1);
|
|
1219
|
+
};
|
|
1220
|
+
return document.addEventListener("mousedown", i), () => document.removeEventListener("mousedown", i);
|
|
1221
|
+
}, [a, r]);
|
|
1222
|
+
const h = a && o.length > 0 && b;
|
|
1223
|
+
return /* @__PURE__ */ s("div", { className: "shrink-0 border-b border-border px-5 py-2.5", children: [
|
|
1224
|
+
/* @__PURE__ */ s(
|
|
1225
|
+
"div",
|
|
1226
|
+
{
|
|
1227
|
+
ref: g,
|
|
1228
|
+
className: "flex items-center gap-2 rounded-[5px] border border-border bg-background px-2 focus-within:border-foreground/40",
|
|
1229
|
+
children: [
|
|
1230
|
+
/* @__PURE__ */ e(cn, { className: "h-3 w-3 text-muted-foreground" }),
|
|
1231
|
+
/* @__PURE__ */ e(
|
|
1232
|
+
"input",
|
|
1233
|
+
{
|
|
1234
|
+
value: t,
|
|
1235
|
+
onChange: (i) => {
|
|
1236
|
+
n(i.target.value), r(!0);
|
|
1237
|
+
},
|
|
1238
|
+
onFocus: () => r(!0),
|
|
1239
|
+
placeholder: "Add a member by name or email…",
|
|
1240
|
+
disabled: u,
|
|
1241
|
+
className: "h-7 flex-1 bg-transparent text-[12px] text-foreground placeholder:text-muted-foreground focus:outline-none disabled:cursor-not-allowed"
|
|
1242
|
+
}
|
|
1243
|
+
)
|
|
1244
|
+
]
|
|
1245
|
+
}
|
|
1246
|
+
),
|
|
1247
|
+
h && typeof document < "u" && $a(
|
|
1248
|
+
/* @__PURE__ */ e(
|
|
1249
|
+
"div",
|
|
1250
|
+
{
|
|
1251
|
+
ref: f,
|
|
1252
|
+
style: {
|
|
1253
|
+
position: "fixed",
|
|
1254
|
+
left: b.left,
|
|
1255
|
+
top: b.top,
|
|
1256
|
+
width: b.width,
|
|
1257
|
+
transform: b.above ? "translateY(-100%)" : void 0
|
|
1258
|
+
},
|
|
1259
|
+
className: "z-[60] max-h-[240px] overflow-y-auto rounded-[5px] border border-border bg-background shadow-[0_8px_24px_-12px_rgba(0,0,0,0.18)]",
|
|
1260
|
+
children: o.map((i) => /* @__PURE__ */ s(
|
|
1261
|
+
"button",
|
|
1262
|
+
{
|
|
1263
|
+
type: "button",
|
|
1264
|
+
onClick: () => m(i),
|
|
1265
|
+
className: "flex w-full items-center gap-2 border-b border-border/60 px-2.5 py-2 text-left last:border-b-0 hover:bg-accent",
|
|
1266
|
+
children: [
|
|
1267
|
+
/* @__PURE__ */ e(mr, { name: i.name || i.email || "?" }),
|
|
1268
|
+
/* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: [
|
|
1269
|
+
/* @__PURE__ */ e("div", { className: "truncate text-[12px] font-medium text-foreground", children: i.name || i.email || "Unknown" }),
|
|
1270
|
+
i.email && i.name && /* @__PURE__ */ e("div", { className: "truncate text-[10.5px] text-muted-foreground", children: i.email })
|
|
1271
|
+
] }),
|
|
1272
|
+
l && i.type && /* @__PURE__ */ e("span", { className: "text-[10px] uppercase tracking-[0.06em] text-muted-foreground", children: i.type === "tenant" ? "tenant" : "org" })
|
|
1273
|
+
]
|
|
1274
|
+
},
|
|
1275
|
+
i.id
|
|
1276
|
+
))
|
|
1277
|
+
}
|
|
1278
|
+
),
|
|
1279
|
+
document.body
|
|
1280
|
+
)
|
|
1281
|
+
] });
|
|
1282
|
+
}
|
|
1283
|
+
function lr(t, n) {
|
|
1284
|
+
if (!t) return n;
|
|
1285
|
+
if (t instanceof Error) {
|
|
1286
|
+
const a = t.message || "", r = a.match(/\{[\s\S]*"error"\s*:\s*"([^"]+)"[\s\S]*\}/);
|
|
1287
|
+
return r ? r[1] : a || n;
|
|
1288
|
+
}
|
|
1289
|
+
return typeof t == "string" ? t : n;
|
|
1290
|
+
}
|
|
1291
|
+
function ur({
|
|
1292
|
+
title: t,
|
|
1293
|
+
message: n,
|
|
1294
|
+
onRetry: a
|
|
1295
|
+
}) {
|
|
1296
|
+
return /* @__PURE__ */ s("div", { className: "flex h-full flex-col items-center justify-center gap-2 px-6 py-10 text-center", children: [
|
|
1297
|
+
/* @__PURE__ */ e("div", { className: "text-[12.5px] font-medium text-foreground", children: t }),
|
|
1298
|
+
/* @__PURE__ */ e("div", { className: "max-w-[360px] text-[11.5px] leading-[1.55] text-muted-foreground", children: n }),
|
|
1299
|
+
a && /* @__PURE__ */ e(
|
|
1300
|
+
"button",
|
|
1301
|
+
{
|
|
1302
|
+
type: "button",
|
|
1303
|
+
onClick: a,
|
|
1304
|
+
className: "mt-1 inline-flex h-7 items-center rounded-[5px] border border-border bg-background px-2.5 text-[11.5px] font-medium text-foreground hover:bg-accent",
|
|
1305
|
+
children: "Try again"
|
|
1306
|
+
}
|
|
1307
|
+
)
|
|
1308
|
+
] });
|
|
1309
|
+
}
|
|
1310
|
+
function Ht({ children: t }) {
|
|
1311
|
+
return /* @__PURE__ */ e("label", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: t });
|
|
1312
|
+
}
|
|
1313
|
+
function mr({ name: t }) {
|
|
1314
|
+
const n = t.split(" ").map((a) => a[0]).filter(Boolean).slice(0, 2).join("").toUpperCase();
|
|
1315
|
+
return /* @__PURE__ */ e(dr, { className: "h-6 w-6 shrink-0", children: /* @__PURE__ */ e(cr, { className: "text-[9px] font-semibold", children: n || "?" }) });
|
|
1316
|
+
}
|
|
1317
|
+
function be(t, n, a) {
|
|
1318
|
+
var l, m;
|
|
1319
|
+
const r = (t.controls || []).find(
|
|
1320
|
+
(u) => u.id === a
|
|
1321
|
+
);
|
|
1322
|
+
if (r)
|
|
1323
|
+
return r.label;
|
|
1324
|
+
const o = (m = (l = zt(t, n)) == null ? void 0 : l.controls) == null ? void 0 : m.find(
|
|
1325
|
+
(u) => u.id === a
|
|
1326
|
+
);
|
|
1327
|
+
return (o == null ? void 0 : o.label) || a;
|
|
1328
|
+
}
|
|
1329
|
+
function ge(t, n) {
|
|
1330
|
+
var a;
|
|
1331
|
+
return ((a = zt(t, n)) == null ? void 0 : a.title) || n;
|
|
1332
|
+
}
|
|
1333
|
+
function Hn(t) {
|
|
1334
|
+
const { errors: n, dashboard: a } = t;
|
|
1335
|
+
if (!a)
|
|
1336
|
+
return n;
|
|
1337
|
+
const r = /* @__PURE__ */ new Map();
|
|
1338
|
+
for (const o of n) {
|
|
1339
|
+
const l = o.match(
|
|
1340
|
+
/^Card '(.+)' binding for control '(.+)' maps to missing metric '(.+)'\.$/
|
|
1341
|
+
);
|
|
1342
|
+
if (l) {
|
|
1343
|
+
const [, b, c] = l, h = `${b}:${c}:missing-metric`;
|
|
1344
|
+
r.has(h) || r.set(
|
|
1345
|
+
h,
|
|
1346
|
+
`"${ge(a, b)}" has an outdated "${be(
|
|
1347
|
+
a,
|
|
1348
|
+
b,
|
|
1349
|
+
c
|
|
1350
|
+
)}" mapping. Some choices still point to metrics that are no longer available on this card. Open the card controls and choose replacements.`
|
|
1351
|
+
);
|
|
1352
|
+
continue;
|
|
1353
|
+
}
|
|
1354
|
+
const m = o.match(
|
|
1355
|
+
/^Card '(.+)' binding for control '(.+)' maps to missing group-by field '(.+)'\.$/
|
|
1356
|
+
);
|
|
1357
|
+
if (m) {
|
|
1358
|
+
const [, b, c] = m, h = `${b}:${c}:missing-group-by`;
|
|
1359
|
+
r.has(h) || r.set(
|
|
1360
|
+
h,
|
|
1361
|
+
`"${ge(a, b)}" has an outdated "${be(
|
|
1362
|
+
a,
|
|
1363
|
+
b,
|
|
1364
|
+
c
|
|
1365
|
+
)}" mapping. Some choices still point to fields that are no longer available on this card. Open the card controls and choose replacements.`
|
|
1366
|
+
);
|
|
1367
|
+
continue;
|
|
1368
|
+
}
|
|
1369
|
+
const u = o.match(
|
|
1370
|
+
/^Card '(.+)' binding for control '(.+)' maps to an invalid metric target\.$/
|
|
1371
|
+
);
|
|
1372
|
+
if (u) {
|
|
1373
|
+
const [, b, c] = u, h = `${b}:${c}:invalid-metric`;
|
|
1374
|
+
r.has(h) || r.set(
|
|
1375
|
+
h,
|
|
1376
|
+
`"${ge(a, b)}" has an invalid "${be(
|
|
1377
|
+
a,
|
|
1378
|
+
b,
|
|
1379
|
+
c
|
|
1380
|
+
)}" metric mapping. Open the card controls and choose a valid metric for each option.`
|
|
1381
|
+
);
|
|
1382
|
+
continue;
|
|
1383
|
+
}
|
|
1384
|
+
const g = o.match(
|
|
1385
|
+
/^Card '(.+)' binding for control '(.+)' maps to an invalid group-by target\.$/
|
|
1386
|
+
);
|
|
1387
|
+
if (g) {
|
|
1388
|
+
const [, b, c] = g, h = `${b}:${c}:invalid-group-by`;
|
|
1389
|
+
r.has(h) || r.set(
|
|
1390
|
+
h,
|
|
1391
|
+
`"${ge(a, b)}" has an invalid "${be(
|
|
1392
|
+
a,
|
|
1393
|
+
b,
|
|
1394
|
+
c
|
|
1395
|
+
)}" field mapping. Open the card controls and choose a valid field for each option.`
|
|
1396
|
+
);
|
|
1397
|
+
continue;
|
|
1398
|
+
}
|
|
1399
|
+
const f = o.match(
|
|
1400
|
+
/^Card '(.+)' binding for control '(.+)' requires at least one temporal group-by field\.$/
|
|
1401
|
+
);
|
|
1402
|
+
if (f) {
|
|
1403
|
+
const [, b, c] = f, h = `${b}:${c}:missing-temporal-group-by`;
|
|
1404
|
+
r.has(h) || r.set(
|
|
1405
|
+
h,
|
|
1406
|
+
`"${ge(a, b)}" can no longer use "${be(
|
|
1407
|
+
a,
|
|
1408
|
+
b,
|
|
1409
|
+
c
|
|
1410
|
+
)}" for time grain because the card does not currently group by a date field.`
|
|
1411
|
+
);
|
|
1412
|
+
continue;
|
|
1413
|
+
}
|
|
1414
|
+
r.set(o, o);
|
|
1415
|
+
}
|
|
1416
|
+
return Array.from(r.values());
|
|
1417
|
+
}
|
|
1418
|
+
function Vn({
|
|
1419
|
+
visible: t,
|
|
1420
|
+
onSelect: n
|
|
1421
|
+
}) {
|
|
1422
|
+
return t ? /* @__PURE__ */ s(U, { onSelect: n, children: [
|
|
1423
|
+
/* @__PURE__ */ e(aa, { className: "h-3.5 w-3.5" }),
|
|
1424
|
+
"Schedule email report"
|
|
1425
|
+
] }) : null;
|
|
1426
|
+
}
|
|
1427
|
+
function qn({
|
|
1428
|
+
scheduleReportVisible: t,
|
|
1429
|
+
analyticalBriefingVisible: n,
|
|
1430
|
+
onScheduleReport: a,
|
|
1431
|
+
onCreateAnalyticalBriefing: r
|
|
1432
|
+
}) {
|
|
1433
|
+
return /* @__PURE__ */ s(F, { children: [
|
|
1434
|
+
/* @__PURE__ */ e(
|
|
1435
|
+
Vn,
|
|
1436
|
+
{
|
|
1437
|
+
visible: t,
|
|
1438
|
+
onSelect: a
|
|
1439
|
+
}
|
|
1440
|
+
),
|
|
1441
|
+
n ? /* @__PURE__ */ s(U, { onSelect: r, children: [
|
|
1442
|
+
/* @__PURE__ */ e(ae, { className: "h-3.5 w-3.5" }),
|
|
1443
|
+
"Create analytical briefing"
|
|
1444
|
+
] }) : null
|
|
1445
|
+
] });
|
|
1446
|
+
}
|
|
1447
|
+
function Vt(t, n) {
|
|
1448
|
+
return {
|
|
1449
|
+
dashboard: Ze(t),
|
|
1450
|
+
semanticExecutionPayload: Ze(n)
|
|
1451
|
+
};
|
|
1452
|
+
}
|
|
1453
|
+
function yo() {
|
|
1454
|
+
var vt, yt, wt, Nt, St;
|
|
1455
|
+
Ba(), Ga();
|
|
1456
|
+
const {
|
|
1457
|
+
authToken: t,
|
|
1458
|
+
tokenProps: n,
|
|
1459
|
+
id: a,
|
|
1460
|
+
showBriefings: r
|
|
1461
|
+
} = W(), o = na(), { isLocalDev: l } = oa(), {
|
|
1462
|
+
canEditDashboard: m,
|
|
1463
|
+
hasInspectionUser: u,
|
|
1464
|
+
inspectionMessage: g,
|
|
1465
|
+
isInspectionMode: f,
|
|
1466
|
+
isInspectionSurface: b
|
|
1467
|
+
} = sa(), { openBrandStudioPreview: c } = ia(), { permissions: h } = pn(), i = da(), { isLoading: x } = ca(), v = C((d) => d.theme), w = C((d) => d.isDownloadingPdf), S = C(
|
|
1468
|
+
(d) => d.dashboardAssistantDraftScopeKey
|
|
1469
|
+
), p = C((d) => d.dashboard), $ = C((d) => d.selectedSheetId), T = (vt = p == null ? void 0 : p.sheets) == null ? void 0 : vt.find(
|
|
1470
|
+
(d) => d.id === $
|
|
1471
|
+
), M = $r(T), A = M ? (yt = T == null ? void 0 : T.document) == null ? void 0 : yt.page : void 0, E = C(
|
|
1472
|
+
(d) => d.isDashboardEditing
|
|
1473
|
+
), { setDashboardTitle: J } = C((d) => d.actions), [Te, q] = N(!1), [oe, z] = N(!1), [se, ie] = N(!1), [Ne, Y] = N(null), [Fe, de] = N(!1), [Se, X] = N(!1), [Z, B] = N(null), [y, R] = N([]), [ce, j] = N(!1), [De, le] = N(!1), I = C((d) => d.isVisualEditing);
|
|
1474
|
+
Ct((d) => d.card);
|
|
1475
|
+
const hr = Pe(
|
|
1476
|
+
(d) => d.selectedDashboard
|
|
1477
|
+
), pr = Pe(
|
|
1478
|
+
(d) => d.initialDashboard
|
|
1479
|
+
);
|
|
1480
|
+
Pe((d) => d.selectedVisual), C((d) => d.selectedFrameId), Ct((d) => d.frame);
|
|
1481
|
+
const st = C(
|
|
1482
|
+
(d) => d.showDashboardJSON
|
|
1483
|
+
);
|
|
1484
|
+
C((d) => d.onSaveFunction);
|
|
1485
|
+
const { setIsDashboardEditing: it, setShowDashboardJSON: dt } = C(
|
|
1486
|
+
(d) => d.actions
|
|
1487
|
+
), { setInitialDashboard: ct, clearSelectedDashboard: $e } = Pe(
|
|
1488
|
+
(d) => d.actions
|
|
1489
|
+
), ue = !!n.orgUserId || !!(n.tenantId && n.endUserId && n.endUserEmail), { resources: Ce } = la(Qe.DASHBOARD), { data: Be } = ua(), fr = ((wt = Be == null ? void 0 : Be.preference) == null ? void 0 : wt.defaultDashboardId) || null, { mutate: br, isPending: gr } = ma(), { currentUser: xr } = rt(), vr = ha(xr), G = hr || pr, ee = pa({
|
|
1490
|
+
config: n.config,
|
|
1491
|
+
canNavigateDashboardHub: ue,
|
|
1492
|
+
canShareDashboard: ((Nt = G == null ? void 0 : G.permissions) == null ? void 0 : Nt.canShare) === !0,
|
|
1493
|
+
canManageGroups: vr
|
|
1494
|
+
}), lt = G ? {
|
|
1495
|
+
id: G.id,
|
|
1496
|
+
title: (p == null ? void 0 : p.title) || G.title || "Dashboard"
|
|
1497
|
+
} : null, { handleAddNewFrame: yr } = fa(), [Ge, He] = N(!1), [wr, me] = N(!1), [Ve, ke] = N("close"), he = ba(Qe.DASHBOARD), [L, pe] = N(null), Nr = async (d, P) => {
|
|
1498
|
+
if (!f) {
|
|
1499
|
+
if (!(p != null && p.id)) {
|
|
1500
|
+
console.log("No dashboard ID found");
|
|
1501
|
+
return;
|
|
1502
|
+
}
|
|
1503
|
+
console.log("Updating dashboard title:", {
|
|
1504
|
+
dashboardId: p.id,
|
|
1505
|
+
newTitle: d,
|
|
1506
|
+
previousTitle: P
|
|
1507
|
+
}), he.mutate(
|
|
1508
|
+
{
|
|
1509
|
+
resourceId: p.id,
|
|
1510
|
+
data: { title: d }
|
|
1511
|
+
},
|
|
1512
|
+
{
|
|
1513
|
+
onSuccess: () => {
|
|
1514
|
+
pe(
|
|
1515
|
+
(_) => (_ == null ? void 0 : _.dashboard.id) === p.id ? {
|
|
1516
|
+
..._,
|
|
1517
|
+
dashboard: { ..._.dashboard, title: d }
|
|
1518
|
+
} : _
|
|
1519
|
+
), D.success("Dashboard title updated");
|
|
1520
|
+
},
|
|
1521
|
+
onError: (_) => {
|
|
1522
|
+
console.error("Failed to update dashboard title:", _), D.error("Failed to update dashboard title");
|
|
1523
|
+
const re = C.getState().dashboard;
|
|
1524
|
+
(re == null ? void 0 : re.id) === p.id && re.title === d && J(P);
|
|
1525
|
+
}
|
|
1526
|
+
}
|
|
1527
|
+
);
|
|
1528
|
+
}
|
|
1529
|
+
};
|
|
1530
|
+
Ue(() => {
|
|
1531
|
+
if (Ce && Ce.length > 0) {
|
|
1532
|
+
const d = p == null ? void 0 : p.id;
|
|
1533
|
+
if (d) {
|
|
1534
|
+
const P = Ce.find(
|
|
1535
|
+
(_) => _.id === d
|
|
1536
|
+
);
|
|
1537
|
+
P && ct(P);
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
1540
|
+
}, [Ce, p == null ? void 0 : p.id, ct]);
|
|
1541
|
+
const Sr = n.orgUserId || n.tenantId, qe = Q(
|
|
1542
|
+
() => zn({
|
|
1543
|
+
accessToken: t == null ? void 0 : t.accessToken,
|
|
1544
|
+
dashboardId: (p == null ? void 0 : p.id) || a || n.dashboard_id,
|
|
1545
|
+
selectedSheetId: M ? $ : void 0,
|
|
1546
|
+
pageSize: A == null ? void 0 : A.size,
|
|
1547
|
+
orientation: A == null ? void 0 : A.orientation,
|
|
1548
|
+
theme: v
|
|
1549
|
+
}),
|
|
1550
|
+
[
|
|
1551
|
+
t == null ? void 0 : t.accessToken,
|
|
1552
|
+
a,
|
|
1553
|
+
p == null ? void 0 : p.id,
|
|
1554
|
+
M,
|
|
1555
|
+
A == null ? void 0 : A.orientation,
|
|
1556
|
+
A == null ? void 0 : A.size,
|
|
1557
|
+
$,
|
|
1558
|
+
v,
|
|
1559
|
+
n.dashboard_id
|
|
1560
|
+
]
|
|
1561
|
+
), ut = E && !I && !f && Sr && m, { setDashboard: ze } = C((d) => d.actions), mt = C(
|
|
1562
|
+
(d) => d.semanticExecutionPayload
|
|
1563
|
+
), Dr = () => {
|
|
1564
|
+
it(!0);
|
|
1565
|
+
}, Ee = () => {
|
|
1566
|
+
it(!1), dt(!1), pe(null);
|
|
1567
|
+
};
|
|
1568
|
+
Ue(() => {
|
|
1569
|
+
if (!E) {
|
|
1570
|
+
L && pe(null);
|
|
1571
|
+
return;
|
|
1572
|
+
}
|
|
1573
|
+
L || !p || x || pe(
|
|
1574
|
+
Vt(
|
|
1575
|
+
p,
|
|
1576
|
+
mt
|
|
1577
|
+
)
|
|
1578
|
+
);
|
|
1579
|
+
}, [
|
|
1580
|
+
p,
|
|
1581
|
+
L,
|
|
1582
|
+
E,
|
|
1583
|
+
x,
|
|
1584
|
+
mt
|
|
1585
|
+
]);
|
|
1586
|
+
const ht = (L == null ? void 0 : L.dashboard) ?? null, { isDirty: pt, isDirtyPending: Cr, resetDirty: fe } = Za(
|
|
1587
|
+
p,
|
|
1588
|
+
ht,
|
|
1589
|
+
300,
|
|
1590
|
+
1e3,
|
|
1591
|
+
en
|
|
1592
|
+
), ft = Ha(
|
|
1593
|
+
ht,
|
|
1594
|
+
f,
|
|
1595
|
+
m
|
|
1596
|
+
), bt = pt || Cr, Ae = Ge || he.isPending, kr = () => {
|
|
1597
|
+
if (f) {
|
|
1598
|
+
L && ze(L.dashboard, {
|
|
1599
|
+
semanticExecutionPayload: L.semanticExecutionPayload
|
|
1600
|
+
}), Ee(), fe();
|
|
1601
|
+
return;
|
|
1602
|
+
}
|
|
1603
|
+
ft() ? (ke("close"), me(!0)) : (Ee(), fe());
|
|
1604
|
+
}, Er = async () => {
|
|
1605
|
+
await je({
|
|
1606
|
+
closeAfterSave: !0,
|
|
1607
|
+
navigateHomeAfterSave: Ve === "home"
|
|
1608
|
+
});
|
|
1609
|
+
}, Ar = () => {
|
|
1610
|
+
const d = Ve === "home" && !!ue;
|
|
1611
|
+
L && ze(L.dashboard, {
|
|
1612
|
+
semanticExecutionPayload: L.semanticExecutionPayload
|
|
1613
|
+
}), Ee(), d && $e(), ke("close"), me(!1), fe();
|
|
1614
|
+
}, Ir = () => {
|
|
1615
|
+
L && (ze(L.dashboard, {
|
|
1616
|
+
semanticExecutionPayload: L.semanticExecutionPayload
|
|
1617
|
+
}), fe());
|
|
1618
|
+
}, Mr = () => {
|
|
1619
|
+
if (ue) {
|
|
1620
|
+
if (E && ft()) {
|
|
1621
|
+
ke("home"), me(!0);
|
|
1622
|
+
return;
|
|
1623
|
+
}
|
|
1624
|
+
$e();
|
|
1625
|
+
}
|
|
1626
|
+
};
|
|
1627
|
+
async function je(d) {
|
|
1628
|
+
if (f)
|
|
1629
|
+
return;
|
|
1630
|
+
const P = C.getState().dashboard;
|
|
1631
|
+
if (!P)
|
|
1632
|
+
return;
|
|
1633
|
+
const _ = (d == null ? void 0 : d.closeAfterSave) ?? ce, re = (d == null ? void 0 : d.navigateHomeAfterSave) ?? !1;
|
|
1634
|
+
j(_), _ && me(!1);
|
|
1635
|
+
const Rr = Ze(P);
|
|
1636
|
+
X(!0), B(null), R([]), He(!0);
|
|
1637
|
+
const Ur = {
|
|
1638
|
+
template: P
|
|
1639
|
+
};
|
|
1640
|
+
he.mutate(
|
|
1641
|
+
{
|
|
1642
|
+
resourceId: P.id,
|
|
1643
|
+
data: Ur
|
|
1644
|
+
},
|
|
1645
|
+
{
|
|
1646
|
+
onSuccess: (O) => {
|
|
1647
|
+
var Ie, Me, Dt;
|
|
1648
|
+
const K = (O == null ? void 0 : O.id) || ((Ie = O == null ? void 0 : O.dashboard) == null ? void 0 : Ie.id) || ((Me = O == null ? void 0 : O.resource) == null ? void 0 : Me.id) || ((Dt = O == null ? void 0 : O.template) == null ? void 0 : Dt.id) || null;
|
|
1649
|
+
if (!P.id && K) {
|
|
1650
|
+
const Ke = Hr.getState(), Le = Ke.pendingDashboardDraftMigration;
|
|
1651
|
+
(Le == null ? void 0 : Le.scopeKey) === S ? Ke.actions.setPendingDashboardDraftMigrationExpectedDashboardId(
|
|
1652
|
+
K
|
|
1653
|
+
) : Le && Ke.actions.clearPendingDashboardDraftMigration();
|
|
1654
|
+
}
|
|
1655
|
+
He(!1), D.success("Dashboard saved!"), pe(
|
|
1656
|
+
Vt(
|
|
1657
|
+
Rr,
|
|
1658
|
+
C.getState().semanticExecutionPayload
|
|
1659
|
+
)
|
|
1660
|
+
), X(!1), j(!1), _ && (Ee(), fe(), re && ue && $e()), ke("close");
|
|
1661
|
+
},
|
|
1662
|
+
onError: (O) => {
|
|
1663
|
+
He(!1), B("Failed to save dashboard. Please try again.");
|
|
1664
|
+
const K = O.details, Ie = Array.isArray(
|
|
1665
|
+
K == null ? void 0 : K.errors
|
|
1666
|
+
) ? (K.errors || []).filter(
|
|
1667
|
+
(Me) => typeof Me == "string"
|
|
1668
|
+
) : [];
|
|
1669
|
+
R(
|
|
1670
|
+
Hn({
|
|
1671
|
+
errors: Ie,
|
|
1672
|
+
dashboard: P || void 0
|
|
1673
|
+
})
|
|
1674
|
+
), D.error("Failed to save dashboard");
|
|
1675
|
+
}
|
|
1676
|
+
}
|
|
1677
|
+
);
|
|
1678
|
+
}
|
|
1679
|
+
const gt = p.title;
|
|
1680
|
+
he.isPending && console.log("Title during update:", {
|
|
1681
|
+
title: gt,
|
|
1682
|
+
dashboardStateTitle: p.title,
|
|
1683
|
+
dashboardId: p == null ? void 0 : p.id
|
|
1684
|
+
});
|
|
1685
|
+
const Lr = ue && !!(t != null && t.accessToken) && !!(n != null && n.apiServiceUrl), Pr = !f && ee.showDashboardHub && Lr, _r = !f && i && ee.showDashboardHub, H = (p == null ? void 0 : p.id) || null, xt = ga(
|
|
1686
|
+
(St = n.config) == null ? void 0 : St.showBriefings,
|
|
1687
|
+
r
|
|
1688
|
+
), te = !!H && fr === H, Or = () => {
|
|
1689
|
+
!H || f || br({
|
|
1690
|
+
dashboardId: te ? null : H
|
|
1691
|
+
});
|
|
1692
|
+
};
|
|
1693
|
+
return !i && !I ? null : /* @__PURE__ */ s(
|
|
1694
|
+
"div",
|
|
1695
|
+
{
|
|
1696
|
+
className: "flex min-h-11 shrink-0 items-center justify-between gap-2 overflow-x-auto border-b px-4 py-1.5",
|
|
1697
|
+
role: "dashboard-controls",
|
|
1698
|
+
children: [
|
|
1699
|
+
/* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
1700
|
+
_r && !I && /* @__PURE__ */ e(
|
|
1701
|
+
Pt,
|
|
1702
|
+
{
|
|
1703
|
+
"aria-label": "Dashboard Hub",
|
|
1704
|
+
tooltip: "Dashboard Hub",
|
|
1705
|
+
onClick: Mr,
|
|
1706
|
+
className: "h-7 w-7 px-0",
|
|
1707
|
+
buttonProps: { size: "xs" },
|
|
1708
|
+
children: /* @__PURE__ */ e(xa, { className: "h-3.5 w-3.5" })
|
|
1709
|
+
}
|
|
1710
|
+
),
|
|
1711
|
+
!I && i && (x ? /* @__PURE__ */ e(
|
|
1712
|
+
"div",
|
|
1713
|
+
{
|
|
1714
|
+
className: "h-4 w-28 animate-pulse rounded-md bg-muted/70",
|
|
1715
|
+
"aria-label": "Loading dashboard title",
|
|
1716
|
+
role: "status",
|
|
1717
|
+
children: /* @__PURE__ */ e("span", { className: "sr-only", children: "Loading dashboard title" })
|
|
1718
|
+
}
|
|
1719
|
+
) : /* @__PURE__ */ s(F, { children: [
|
|
1720
|
+
/* @__PURE__ */ e(
|
|
1721
|
+
va,
|
|
1722
|
+
{
|
|
1723
|
+
value: gt || "Untitled Dashboard",
|
|
1724
|
+
onSave: (d) => {
|
|
1725
|
+
console.log("EditableText onSave called:", {
|
|
1726
|
+
newTitle: d,
|
|
1727
|
+
canEditDashboard: m,
|
|
1728
|
+
dashboardId: p == null ? void 0 : p.id
|
|
1729
|
+
});
|
|
1730
|
+
const P = (p == null ? void 0 : p.title) || "";
|
|
1731
|
+
J(d), Nr(d, P);
|
|
1732
|
+
},
|
|
1733
|
+
isEditable: ya({
|
|
1734
|
+
isDashboardEditing: E,
|
|
1735
|
+
canEditDashboard: m === !0 && !f
|
|
1736
|
+
}),
|
|
1737
|
+
displayClassName: "text-[13px] font-medium",
|
|
1738
|
+
inputClassName: "text-[13px] font-medium",
|
|
1739
|
+
placeholder: "Dashboard Title",
|
|
1740
|
+
isPending: he.isPending
|
|
1741
|
+
}
|
|
1742
|
+
),
|
|
1743
|
+
ee.showDashboardHub && te && /* @__PURE__ */ e(
|
|
1744
|
+
"span",
|
|
1745
|
+
{
|
|
1746
|
+
className: "shrink-0 rounded-[4px] border border-border/60 px-1.5 py-px text-[10px] font-medium uppercase tracking-[0.06em] text-muted-foreground",
|
|
1747
|
+
title: "Default dashboard",
|
|
1748
|
+
children: "Default"
|
|
1749
|
+
}
|
|
1750
|
+
),
|
|
1751
|
+
Pr && H && /* @__PURE__ */ e(kt, { children: /* @__PURE__ */ s(Et, { children: [
|
|
1752
|
+
/* @__PURE__ */ e(At, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1753
|
+
V,
|
|
1754
|
+
{
|
|
1755
|
+
variant: "ghost",
|
|
1756
|
+
size: "xs",
|
|
1757
|
+
onClick: Or,
|
|
1758
|
+
disabled: gr || !(t != null && t.accessToken) || !(n != null && n.apiServiceUrl),
|
|
1759
|
+
className: xe(
|
|
1760
|
+
"w-7 px-0",
|
|
1761
|
+
te ? "bg-primary/10 text-primary hover:bg-primary/15 hover:text-primary focus-visible:bg-primary/15" : "text-muted-foreground hover:text-foreground"
|
|
1762
|
+
),
|
|
1763
|
+
"aria-pressed": te,
|
|
1764
|
+
"aria-label": te ? "Remove as default dashboard" : "Set as default dashboard",
|
|
1765
|
+
children: /* @__PURE__ */ e(wa, { className: "h-3.5 w-3.5" })
|
|
1766
|
+
}
|
|
1767
|
+
) }),
|
|
1768
|
+
/* @__PURE__ */ e(It, { children: /* @__PURE__ */ e("p", { children: te ? "Remove as default dashboard" : "Set as default dashboard" }) })
|
|
1769
|
+
] }) })
|
|
1770
|
+
] }))
|
|
1771
|
+
] }),
|
|
1772
|
+
/* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
1773
|
+
I && /* @__PURE__ */ s(F, { children: [
|
|
1774
|
+
/* @__PURE__ */ e(Va, {}),
|
|
1775
|
+
/* @__PURE__ */ e(qa, {})
|
|
1776
|
+
] }),
|
|
1777
|
+
!I && i && !f && ee.showDashboardSharing && /* @__PURE__ */ s(
|
|
1778
|
+
V,
|
|
1779
|
+
{
|
|
1780
|
+
variant: "outline",
|
|
1781
|
+
size: "xs",
|
|
1782
|
+
onClick: () => q(!0),
|
|
1783
|
+
children: [
|
|
1784
|
+
/* @__PURE__ */ e(Na, { className: "h-3.5 w-3.5" }),
|
|
1785
|
+
"Share"
|
|
1786
|
+
]
|
|
1787
|
+
}
|
|
1788
|
+
),
|
|
1789
|
+
!I && E && !f && h.canUseFilters && i && /* @__PURE__ */ e(za, {}),
|
|
1790
|
+
E && !I && !f && i && !M && /* @__PURE__ */ s("div", { className: "inline-flex h-7 items-stretch overflow-hidden rounded-control border border-input bg-background", children: [
|
|
1791
|
+
/* @__PURE__ */ s(
|
|
1792
|
+
V,
|
|
1793
|
+
{
|
|
1794
|
+
variant: "ghost",
|
|
1795
|
+
size: "xs",
|
|
1796
|
+
disabled: !E,
|
|
1797
|
+
onClick: () => void yr(),
|
|
1798
|
+
className: "h-full rounded-none border-0 shadow-none hover:bg-accent",
|
|
1799
|
+
children: [
|
|
1800
|
+
/* @__PURE__ */ e(ae, { className: "h-3.5 w-3.5" }),
|
|
1801
|
+
"Visual"
|
|
1802
|
+
]
|
|
1803
|
+
}
|
|
1804
|
+
),
|
|
1805
|
+
/* @__PURE__ */ s(_t, { modal: !1, children: [
|
|
1806
|
+
/* @__PURE__ */ e(Ot, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1807
|
+
V,
|
|
1808
|
+
{
|
|
1809
|
+
variant: "ghost",
|
|
1810
|
+
size: "xs",
|
|
1811
|
+
className: "h-full w-7 rounded-none border-0 border-l border-border/60 px-0 shadow-none hover:bg-accent",
|
|
1812
|
+
"aria-label": "Open visual options",
|
|
1813
|
+
disabled: !E,
|
|
1814
|
+
children: /* @__PURE__ */ e(Ta, { className: "h-3.5 w-3.5" })
|
|
1815
|
+
}
|
|
1816
|
+
) }),
|
|
1817
|
+
/* @__PURE__ */ e(
|
|
1818
|
+
Rt,
|
|
1819
|
+
{
|
|
1820
|
+
align: "end",
|
|
1821
|
+
className: "z-[60] w-48 rounded-[6px] border-border/60 p-1 shadow-sm",
|
|
1822
|
+
children: /* @__PURE__ */ s(U, { onClick: () => le(!0), children: [
|
|
1823
|
+
/* @__PURE__ */ e(ae, { className: "h-3.5 w-3.5" }),
|
|
1824
|
+
"From library..."
|
|
1825
|
+
] })
|
|
1826
|
+
}
|
|
1827
|
+
)
|
|
1828
|
+
] }),
|
|
1829
|
+
/* @__PURE__ */ e(
|
|
1830
|
+
ja,
|
|
1831
|
+
{
|
|
1832
|
+
open: De,
|
|
1833
|
+
onOpenChange: le
|
|
1834
|
+
}
|
|
1835
|
+
)
|
|
1836
|
+
] }),
|
|
1837
|
+
!I && !E && (m || f) && (!b || !u || m !== void 0) && i && /* @__PURE__ */ s("div", { className: "inline-flex items-center gap-1", children: [
|
|
1838
|
+
/* @__PURE__ */ s(V, { size: "xs", onClick: Dr, children: [
|
|
1839
|
+
/* @__PURE__ */ e(Sa, { className: "h-3.5 w-3.5" }),
|
|
1840
|
+
f ? "Inspect" : "Edit"
|
|
1841
|
+
] }),
|
|
1842
|
+
g ? /* @__PURE__ */ e(kt, { children: /* @__PURE__ */ s(Et, { children: [
|
|
1843
|
+
/* @__PURE__ */ e(At, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1844
|
+
"button",
|
|
1845
|
+
{
|
|
1846
|
+
type: "button",
|
|
1847
|
+
"aria-label": g,
|
|
1848
|
+
className: "inline-flex size-6 items-center justify-center rounded-control text-muted-foreground outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
1849
|
+
children: /* @__PURE__ */ e(Br, { "aria-hidden": "true", className: "size-3.5" })
|
|
1850
|
+
}
|
|
1851
|
+
) }),
|
|
1852
|
+
/* @__PURE__ */ e(It, { children: /* @__PURE__ */ e("p", { children: g }) })
|
|
1853
|
+
] }) }) : null
|
|
1854
|
+
] }),
|
|
1855
|
+
ut && i && pt && /* @__PURE__ */ s(
|
|
1856
|
+
V,
|
|
1857
|
+
{
|
|
1858
|
+
variant: "outline",
|
|
1859
|
+
size: "xs",
|
|
1860
|
+
onClick: Ir,
|
|
1861
|
+
disabled: Ae,
|
|
1862
|
+
children: [
|
|
1863
|
+
/* @__PURE__ */ e(Da, { className: "h-3.5 w-3.5" }),
|
|
1864
|
+
"Undo"
|
|
1865
|
+
]
|
|
1866
|
+
}
|
|
1867
|
+
),
|
|
1868
|
+
ut && i && /* @__PURE__ */ s(
|
|
1869
|
+
V,
|
|
1870
|
+
{
|
|
1871
|
+
size: "xs",
|
|
1872
|
+
className: xe(!bt && "opacity-60"),
|
|
1873
|
+
disabled: Ae || !bt,
|
|
1874
|
+
onClick: () => je(),
|
|
1875
|
+
children: [
|
|
1876
|
+
Ae ? /* @__PURE__ */ e(Re, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ e(tn, { className: "h-3.5 w-3.5" }),
|
|
1877
|
+
Ae ? "Saving..." : "Save"
|
|
1878
|
+
]
|
|
1879
|
+
}
|
|
1880
|
+
),
|
|
1881
|
+
E && !I && i && /* @__PURE__ */ s(V, { variant: "outline", size: "xs", onClick: kr, children: [
|
|
1882
|
+
/* @__PURE__ */ e(Ca, { className: "h-3.5 w-3.5" }),
|
|
1883
|
+
"Close"
|
|
1884
|
+
] }),
|
|
1885
|
+
!I && i && /* @__PURE__ */ e("div", { className: "ml-2 flex items-center", children: /* @__PURE__ */ e(Ka, {}) }),
|
|
1886
|
+
!I && l && /* @__PURE__ */ e(hn, {}),
|
|
1887
|
+
!I && i && !f && /* @__PURE__ */ s(_t, { children: [
|
|
1888
|
+
/* @__PURE__ */ e(Ot, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1889
|
+
Pt,
|
|
1890
|
+
{
|
|
1891
|
+
tooltip: "More Options",
|
|
1892
|
+
className: "w-7 px-0 text-muted-foreground hover:text-foreground",
|
|
1893
|
+
buttonProps: {
|
|
1894
|
+
size: "xs",
|
|
1895
|
+
variant: "ghost",
|
|
1896
|
+
"aria-label": "More dashboard options"
|
|
1897
|
+
},
|
|
1898
|
+
children: /* @__PURE__ */ e(ka, { className: "h-3.5 w-3.5" })
|
|
1899
|
+
}
|
|
1900
|
+
) }),
|
|
1901
|
+
/* @__PURE__ */ s(
|
|
1902
|
+
Rt,
|
|
1903
|
+
{
|
|
1904
|
+
align: "end",
|
|
1905
|
+
className: "w-56 rounded-control border border-border/60 p-1 shadow-sm",
|
|
1906
|
+
children: [
|
|
1907
|
+
/* @__PURE__ */ e(_e, { children: "Reports & briefings" }),
|
|
1908
|
+
/* @__PURE__ */ s(
|
|
1909
|
+
U,
|
|
1910
|
+
{
|
|
1911
|
+
disabled: w,
|
|
1912
|
+
onSelect: () => de(!0),
|
|
1913
|
+
children: [
|
|
1914
|
+
/* @__PURE__ */ e(Ea, { className: "h-3.5 w-3.5" }),
|
|
1915
|
+
"Export"
|
|
1916
|
+
]
|
|
1917
|
+
}
|
|
1918
|
+
),
|
|
1919
|
+
/* @__PURE__ */ e(
|
|
1920
|
+
qn,
|
|
1921
|
+
{
|
|
1922
|
+
scheduleReportVisible: !!(xt && o.surfaceVisible && H && !E),
|
|
1923
|
+
analyticalBriefingVisible: !!(xt && o.surfaceVisible && H && !E),
|
|
1924
|
+
onScheduleReport: () => Y("scheduled_report"),
|
|
1925
|
+
onCreateAnalyticalBriefing: () => Y("analytical_briefing")
|
|
1926
|
+
}
|
|
1927
|
+
),
|
|
1928
|
+
/* @__PURE__ */ e(We, {}),
|
|
1929
|
+
ee.showGroupManagement && /* @__PURE__ */ s(F, { children: [
|
|
1930
|
+
/* @__PURE__ */ e(_e, { children: "Access" }),
|
|
1931
|
+
/* @__PURE__ */ s(
|
|
1932
|
+
U,
|
|
1933
|
+
{
|
|
1934
|
+
onClick: () => z(!0),
|
|
1935
|
+
children: [
|
|
1936
|
+
/* @__PURE__ */ e(Kt, { className: "h-3.5 w-3.5" }),
|
|
1937
|
+
"Manage Groups"
|
|
1938
|
+
]
|
|
1939
|
+
}
|
|
1940
|
+
),
|
|
1941
|
+
/* @__PURE__ */ e(We, {})
|
|
1942
|
+
] }),
|
|
1943
|
+
/* @__PURE__ */ e(_e, { children: "Preferences" }),
|
|
1944
|
+
/* @__PURE__ */ s(U, { onClick: () => ie(!0), children: [
|
|
1945
|
+
/* @__PURE__ */ e(Qt, { className: "h-3.5 w-3.5" }),
|
|
1946
|
+
"Report preferences"
|
|
1947
|
+
] }),
|
|
1948
|
+
l && i && /* @__PURE__ */ s(F, { children: [
|
|
1949
|
+
/* @__PURE__ */ e(We, {}),
|
|
1950
|
+
/* @__PURE__ */ e(_e, { children: "Developer" }),
|
|
1951
|
+
/* @__PURE__ */ s(
|
|
1952
|
+
U,
|
|
1953
|
+
{
|
|
1954
|
+
onSelect: () => {
|
|
1955
|
+
var d;
|
|
1956
|
+
t != null && t.accessToken && ((d = navigator == null ? void 0 : navigator.clipboard) != null && d.writeText ? navigator.clipboard.writeText(t.accessToken).then(
|
|
1957
|
+
() => D.success("Token copied to clipboard")
|
|
1958
|
+
).catch(() => D.error("Unable to copy token")) : D.error("Clipboard not available"));
|
|
1959
|
+
},
|
|
1960
|
+
children: [
|
|
1961
|
+
/* @__PURE__ */ e(Ut, { className: "h-3.5 w-3.5" }),
|
|
1962
|
+
"Copy token"
|
|
1963
|
+
]
|
|
1964
|
+
}
|
|
1965
|
+
),
|
|
1966
|
+
M && /* @__PURE__ */ s(
|
|
1967
|
+
U,
|
|
1968
|
+
{
|
|
1969
|
+
disabled: !qe,
|
|
1970
|
+
onSelect: () => {
|
|
1971
|
+
var d;
|
|
1972
|
+
if (!qe) {
|
|
1973
|
+
D.error(
|
|
1974
|
+
"Open a document sheet with a token to copy the local PDF URL"
|
|
1975
|
+
);
|
|
1976
|
+
return;
|
|
1977
|
+
}
|
|
1978
|
+
(d = navigator == null ? void 0 : navigator.clipboard) != null && d.writeText ? navigator.clipboard.writeText(qe).then(
|
|
1979
|
+
() => D.success(
|
|
1980
|
+
"Local document PDF URL copied to clipboard"
|
|
1981
|
+
)
|
|
1982
|
+
).catch(
|
|
1983
|
+
() => D.error(
|
|
1984
|
+
"Unable to copy local document PDF URL"
|
|
1985
|
+
)
|
|
1986
|
+
) : D.error("Clipboard not available");
|
|
1987
|
+
},
|
|
1988
|
+
children: [
|
|
1989
|
+
/* @__PURE__ */ e(Ut, { className: "h-3.5 w-3.5" }),
|
|
1990
|
+
"Copy local document PDF URL"
|
|
1991
|
+
]
|
|
1992
|
+
}
|
|
1993
|
+
),
|
|
1994
|
+
/* @__PURE__ */ s(
|
|
1995
|
+
U,
|
|
1996
|
+
{
|
|
1997
|
+
onSelect: () => Gr(n.apiServiceUrl),
|
|
1998
|
+
children: [
|
|
1999
|
+
/* @__PURE__ */ e(sn, { className: "h-3.5 w-3.5" }),
|
|
2000
|
+
"Invalidate token"
|
|
2001
|
+
]
|
|
2002
|
+
}
|
|
2003
|
+
),
|
|
2004
|
+
/* @__PURE__ */ s(U, { onSelect: c, children: [
|
|
2005
|
+
/* @__PURE__ */ e(rn, { className: "h-3.5 w-3.5" }),
|
|
2006
|
+
"Brand Studio"
|
|
2007
|
+
] }),
|
|
2008
|
+
E && /* @__PURE__ */ s(
|
|
2009
|
+
U,
|
|
2010
|
+
{
|
|
2011
|
+
onSelect: () => dt(!st),
|
|
2012
|
+
children: [
|
|
2013
|
+
/* @__PURE__ */ e(an, { className: "h-3.5 w-3.5" }),
|
|
2014
|
+
st ? "Hide dashboard JSON" : "Show dashboard JSON"
|
|
2015
|
+
]
|
|
2016
|
+
}
|
|
2017
|
+
)
|
|
2018
|
+
] })
|
|
2019
|
+
]
|
|
2020
|
+
}
|
|
2021
|
+
)
|
|
2022
|
+
] }),
|
|
2023
|
+
Te && lt && /* @__PURE__ */ e(
|
|
2024
|
+
Aa,
|
|
2025
|
+
{
|
|
2026
|
+
resource: lt,
|
|
2027
|
+
resourceType: Qe.DASHBOARD,
|
|
2028
|
+
onClose: () => q(!1)
|
|
2029
|
+
}
|
|
2030
|
+
),
|
|
2031
|
+
ee.showGroupManagement && /* @__PURE__ */ e(
|
|
2032
|
+
Rn,
|
|
2033
|
+
{
|
|
2034
|
+
open: oe,
|
|
2035
|
+
onOpenChange: z
|
|
2036
|
+
}
|
|
2037
|
+
),
|
|
2038
|
+
/* @__PURE__ */ e(
|
|
2039
|
+
Xa,
|
|
2040
|
+
{
|
|
2041
|
+
open: se,
|
|
2042
|
+
onOpenChange: ie
|
|
2043
|
+
}
|
|
2044
|
+
),
|
|
2045
|
+
H && Ne ? /* @__PURE__ */ e(
|
|
2046
|
+
Qa,
|
|
2047
|
+
{
|
|
2048
|
+
dashboardId: H,
|
|
2049
|
+
dashboardTitle: (p == null ? void 0 : p.title) || (G == null ? void 0 : G.title),
|
|
2050
|
+
open: !0,
|
|
2051
|
+
onOpenChange: (d) => {
|
|
2052
|
+
d || Y(null);
|
|
2053
|
+
},
|
|
2054
|
+
hideTrigger: !0,
|
|
2055
|
+
workflowIntent: Ne
|
|
2056
|
+
}
|
|
2057
|
+
) : null,
|
|
2058
|
+
i && /* @__PURE__ */ e(
|
|
2059
|
+
Ia,
|
|
2060
|
+
{
|
|
2061
|
+
open: Fe,
|
|
2062
|
+
onOpenChange: de
|
|
2063
|
+
}
|
|
2064
|
+
),
|
|
2065
|
+
/* @__PURE__ */ e(
|
|
2066
|
+
Ma,
|
|
2067
|
+
{
|
|
2068
|
+
open: Se,
|
|
2069
|
+
onOpenChange: (d) => {
|
|
2070
|
+
!d && Ge && !Z || (X(d), d || (B(null), R([]), j(!1)));
|
|
2071
|
+
},
|
|
2072
|
+
children: /* @__PURE__ */ s(La, { className: "max-w-sm", children: [
|
|
2073
|
+
/* @__PURE__ */ s(Pa, { children: [
|
|
2074
|
+
/* @__PURE__ */ e(_a, { children: Z ? "Save failed" : "Saving dashboard" }),
|
|
2075
|
+
/* @__PURE__ */ e(Oa, { className: "pt-2", children: Z ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." }),
|
|
2076
|
+
y.length > 0 && /* @__PURE__ */ s("div", { className: "space-y-1 rounded-md border border-destructive/20 bg-destructive/5 p-3 text-left", children: [
|
|
2077
|
+
/* @__PURE__ */ e("div", { className: "text-sm font-medium text-destructive", children: "What needs attention" }),
|
|
2078
|
+
/* @__PURE__ */ e("ul", { className: "list-disc space-y-1 pl-4 text-xs text-muted-foreground", children: y.slice(0, 5).map((d) => /* @__PURE__ */ e("li", { children: d }, d)) })
|
|
2079
|
+
] })
|
|
2080
|
+
] }),
|
|
2081
|
+
/* @__PURE__ */ e(Ra, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: Z ? /* @__PURE__ */ s(F, { children: [
|
|
2082
|
+
/* @__PURE__ */ e(
|
|
2083
|
+
Ua,
|
|
2084
|
+
{
|
|
2085
|
+
onClick: () => {
|
|
2086
|
+
X(!1), B(null), R([]), j(!1);
|
|
2087
|
+
},
|
|
2088
|
+
className: "m-0",
|
|
2089
|
+
children: "Close"
|
|
2090
|
+
}
|
|
2091
|
+
),
|
|
2092
|
+
/* @__PURE__ */ e(
|
|
2093
|
+
Tt,
|
|
2094
|
+
{
|
|
2095
|
+
onClick: () => je({
|
|
2096
|
+
closeAfterSave: ce,
|
|
2097
|
+
navigateHomeAfterSave: Ve === "home"
|
|
2098
|
+
}),
|
|
2099
|
+
className: "m-0",
|
|
2100
|
+
children: "Retry"
|
|
2101
|
+
}
|
|
2102
|
+
)
|
|
2103
|
+
] }) : /* @__PURE__ */ s(Tt, { disabled: !0, className: "m-0 cursor-default", children: [
|
|
2104
|
+
/* @__PURE__ */ e(Re, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
2105
|
+
"Saving..."
|
|
2106
|
+
] }) })
|
|
2107
|
+
] })
|
|
2108
|
+
}
|
|
2109
|
+
),
|
|
2110
|
+
/* @__PURE__ */ e(
|
|
2111
|
+
Wa,
|
|
2112
|
+
{
|
|
2113
|
+
open: wr,
|
|
2114
|
+
onOpenChange: (d) => {
|
|
2115
|
+
me(d);
|
|
2116
|
+
},
|
|
2117
|
+
onSave: Er,
|
|
2118
|
+
onDiscard: Ar,
|
|
2119
|
+
isSaving: Ge,
|
|
2120
|
+
saveLabel: "Save",
|
|
2121
|
+
discardLabel: "Discard changes"
|
|
2122
|
+
}
|
|
2123
|
+
)
|
|
2124
|
+
] })
|
|
2125
|
+
]
|
|
2126
|
+
}
|
|
2127
|
+
);
|
|
2128
|
+
}
|
|
2129
|
+
function zn({
|
|
2130
|
+
accessToken: t,
|
|
2131
|
+
dashboardId: n,
|
|
2132
|
+
selectedSheetId: a,
|
|
2133
|
+
pageSize: r,
|
|
2134
|
+
orientation: o,
|
|
2135
|
+
theme: l
|
|
2136
|
+
}) {
|
|
2137
|
+
if (!t || !a)
|
|
2138
|
+
return null;
|
|
2139
|
+
const m = new URL("http://localhost:5173/print-document");
|
|
2140
|
+
m.searchParams.set("token", t), n && m.searchParams.set("dashboardId", n), m.searchParams.set("selectedSheetId", a), l && m.searchParams.set("theme", l);
|
|
2141
|
+
const u = new URL("http://127.0.0.1:3002/");
|
|
2142
|
+
return u.searchParams.set("pdfMode", "document"), u.searchParams.set("pageSize", r || "letter"), u.searchParams.set("orientation", o || "portrait"), u.searchParams.set("url", m.toString()), u.toString();
|
|
2143
|
+
}
|
|
2144
|
+
export {
|
|
2145
|
+
yo as default
|
|
2146
|
+
};
|