@morscherlab/mint-sdk 1.2.0-beta.8 → 1.2.0
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/README.md +60 -0
- package/dist/{ExperimentPopover-CfOdh5Rm.js → ExperimentPopover-CJdNlCZb.js} +24 -15
- package/dist/ExperimentPopover-CJdNlCZb.js.map +1 -0
- package/dist/{ExperimentSelectorModal-DvIagrxY.js → ExperimentSelectorModal-DCXmwKNS.js} +5 -5
- package/dist/ExperimentSelectorModal-DCXmwKNS.js.map +1 -0
- package/dist/{SettingsModal-W3TYfnP9.js → SettingsModal-BYR20I4c.js} +5 -5
- package/dist/SettingsModal-BYR20I4c.js.map +1 -0
- package/dist/{EmptyState-NBqf2_8z.js → Skeleton-BAF3CKY7.js} +111 -93
- package/dist/Skeleton-BAF3CKY7.js.map +1 -0
- package/dist/__tests__/components/DataStates.test.d.ts +1 -0
- package/dist/__tests__/components/ExperimentTimeline.test.d.ts +1 -0
- package/dist/__tests__/components/FileBrowserModal.test.d.ts +1 -0
- package/dist/__tests__/components/FilePicker.state.test.d.ts +1 -0
- package/dist/__tests__/components/FilePicker.test.d.ts +1 -0
- package/dist/__tests__/components/PlotlyChart.test.d.ts +1 -0
- package/dist/__tests__/components/iconButtonIconSizing.test.d.ts +1 -0
- package/dist/__tests__/composables/useFileBrowser.test.d.ts +1 -0
- package/dist/__tests__/composables/useListReorder.test.d.ts +1 -0
- package/dist/__tests__/composables/usePlatformFilePickerAdapter.test.d.ts +1 -0
- package/dist/__tests__/styles/cssTokens.test.d.ts +1 -0
- package/dist/apiErrors.d.ts +26 -0
- package/dist/components/ActionMenu.vue.d.ts +1 -1
- package/dist/components/AppPluginSwitcher.vue.d.ts +2 -0
- package/dist/components/AuditTrail.vue.d.ts +13 -0
- package/dist/components/BaseInput.vue.d.ts +1 -1
- package/dist/components/BaseSelect.vue.d.ts +1 -1
- package/dist/components/BaseTextarea.vue.d.ts +1 -1
- package/dist/components/BatchProgressList.vue.d.ts +17 -0
- package/dist/components/BioTemplateExperimentWorkspaceView.vue.d.ts +2 -2
- package/dist/components/BioTemplatePackWorkspaceView.vue.d.ts +2 -2
- package/dist/components/ConcentrationInput.vue.d.ts +1 -1
- package/dist/components/DataFrame.vue.d.ts +14 -2
- package/dist/components/DatePicker.vue.d.ts +2 -2
- package/dist/components/DateTimePicker.vue.d.ts +3 -1
- package/dist/components/ExperimentDataViewer.vue.d.ts +26 -1
- package/dist/components/ExperimentPopover.vue.d.ts +1 -0
- package/dist/components/ExperimentTimeline.vue.d.ts +29 -1
- package/dist/components/FileBrowserModal.vue.d.ts +99 -0
- package/dist/components/FilePicker.vue.d.ts +32 -0
- package/dist/components/FileUploader.vue.d.ts +5 -2
- package/dist/components/FormulaInput.vue.d.ts +1 -1
- package/dist/components/GeneratedPlotlyResult.vue.d.ts +1 -3
- package/dist/components/LcmsSequenceTable.vue.d.ts +29 -1
- package/dist/components/MobileSupportGate.vue.d.ts +1 -1
- package/dist/components/MoleculeInput.vue.d.ts +1 -1
- package/dist/components/NumberInput.vue.d.ts +1 -1
- package/dist/components/PlotlyChart.vue.d.ts +59 -0
- package/dist/components/ProgressBar.vue.d.ts +1 -1
- package/dist/components/ProtocolStepEditor.vue.d.ts +1 -0
- package/dist/components/ReagentList.vue.d.ts +29 -1
- package/dist/components/ResourceCard.vue.d.ts +1 -1
- package/dist/components/SampleHierarchyTree.vue.d.ts +29 -1
- package/dist/components/SampleSelector.drag.d.ts +13 -0
- package/dist/components/SampleSelector.tree.d.ts +2 -0
- package/dist/components/SampleSelector.vue.d.ts +34 -1
- package/dist/components/ScheduleCalendar.vue.d.ts +20 -0
- package/dist/components/SecretInput.vue.d.ts +1 -1
- package/dist/components/SequenceInput.vue.d.ts +1 -1
- package/dist/components/SmartGroupFieldRecipe.vue.d.ts +1 -0
- package/dist/components/StatusIndicator.vue.d.ts +1 -1
- package/dist/components/TagsInput.vue.d.ts +1 -1
- package/dist/components/TimePicker.vue.d.ts +2 -1
- package/dist/components/TimeRangeInput.vue.d.ts +1 -1
- package/dist/components/UnitInput.vue.d.ts +1 -1
- package/dist/components/WellPlate.geometry.d.ts +15 -0
- package/dist/components/WellPlate.interaction.d.ts +13 -0
- package/dist/components/WellPlate.vue.d.ts +30 -1
- package/dist/components/fileBrowserPresentation.d.ts +10 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +8 -8
- package/dist/components/internal/AppTopBarPageSelectorInternal.vue.d.ts +2 -0
- package/dist/components/internal/DataStateInternal.vue.d.ts +43 -0
- package/dist/components/internal/FileBrowserDialogInternal.vue.d.ts +34 -0
- package/dist/components/internal/FileBrowserListingInternal.vue.d.ts +25 -0
- package/dist/components/internal/FileBrowserToolbarInternal.vue.d.ts +26 -0
- package/dist/components/internal/FilePickerPreviewInternal.vue.d.ts +18 -0
- package/dist/components/internal/FilePickerTreeInternal.vue.d.ts +31 -0
- package/dist/{components-B80gV0P6.js → components-DIum5hkx.js} +5415 -2753
- package/dist/components-DIum5hkx.js.map +1 -0
- package/dist/composables/controlSchemaTypes.d.ts +34 -0
- package/dist/composables/filePicker/localFiles.d.ts +3 -0
- package/dist/composables/filePicker/usePickerNavigation.d.ts +96 -0
- package/dist/composables/filePicker/usePickerSelection.d.ts +31 -0
- package/dist/composables/filePicker/validation.d.ts +5 -0
- package/dist/composables/index.d.ts +3 -0
- package/dist/composables/index.js +10 -10
- package/dist/composables/useApi.d.ts +14 -7
- package/dist/composables/useDropdownState.d.ts +18 -2
- package/dist/composables/useEventStream.d.ts +9 -0
- package/dist/composables/useFileBrowser.d.ts +55 -0
- package/dist/composables/useFilePicker.d.ts +189 -0
- package/dist/composables/useListReorder.d.ts +90 -0
- package/dist/composables/useMenuKeyboard.d.ts +2 -2
- package/dist/composables/usePlatformFilePickerAdapter.d.ts +11 -0
- package/dist/composables/usePluginConfig.d.ts +3 -1
- package/dist/composables/useRequestSyncState.d.ts +42 -2
- package/dist/composables/useScheduleDrag.d.ts +1 -0
- package/dist/{composables-C8mmD5ta.js → composables-mFXsTA4g.js} +307 -74
- package/dist/composables-mFXsTA4g.js.map +1 -0
- package/dist/{useApi-CDBq6z23.js → errors-BLuqMee5.js} +178 -16
- package/dist/errors-BLuqMee5.js.map +1 -0
- package/dist/{experiment-Y9Iz7KYi.js → experiment-CVDRAnqp.js} +3 -8
- package/dist/experiment-CVDRAnqp.js.map +1 -0
- package/dist/{experiment-utils-DV3DrvE_.js → experiment-utils-CV2Wza3z.js} +1 -1
- package/dist/experiment-utils-CV2Wza3z.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +15 -15
- package/dist/install.js +2 -7
- package/dist/install.js.map +1 -1
- package/dist/permissions.d.ts +42 -1
- package/dist/permissions.js +20 -10
- package/dist/permissions.js.map +1 -1
- package/dist/stores/index.d.ts +1 -1
- package/dist/stores/index.js +3 -3
- package/dist/stores/settings.d.ts +31 -1
- package/dist/styles.css +15162 -32475
- package/dist/templates/index.js +2 -4
- package/dist/{templates-CK72aKO1.js → templates-CmGfmBRA.js} +291 -85
- package/dist/templates-CmGfmBRA.js.map +1 -0
- package/dist/types/fileBrowserTypes.d.ts +77 -0
- package/dist/types/filePicker.d.ts +77 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/{useControlSchema-_OVhavKq.js → useControlSchema-DldpxNOP.js} +234 -1121
- package/dist/useControlSchema-DldpxNOP.js.map +1 -0
- package/dist/{useDropdownState-D5G4UvWd.js → useDropdownState-C7hRiVQf.js} +22 -6
- package/dist/useDropdownState-C7hRiVQf.js.map +1 -0
- package/dist/{useExperimentSelector-DSEckf_g.js → useExperimentSelector-CEcIaueJ.js} +4 -4
- package/dist/{useExperimentSelector-DSEckf_g.js.map → useExperimentSelector-CEcIaueJ.js.map} +1 -1
- package/dist/{useFormBuilder-Bd714C7y.js → useFormBuilder-z5L_dUIy.js} +2 -2
- package/dist/{useFormBuilder-Bd714C7y.js.map → useFormBuilder-z5L_dUIy.js.map} +1 -1
- package/dist/utils/color.d.ts +13 -0
- package/dist/utils/errors.d.ts +9 -0
- package/dist/{useProtocolTemplates-Dq5Pzwyd.js → validation-uwoJGEb6.js} +231 -158
- package/dist/validation-uwoJGEb6.js.map +1 -0
- package/package.json +1 -1
- package/src/__tests__/apiErrors.test.ts +81 -0
- package/src/__tests__/components/ActionMenu.test.ts +94 -0
- package/src/__tests__/components/DataFrame.test.ts +183 -11
- package/src/__tests__/components/DataStates.test.ts +176 -0
- package/src/__tests__/components/DatePicker.test.ts +76 -0
- package/src/__tests__/components/DateTimePicker.test.ts +36 -0
- package/src/__tests__/components/ExperimentPopover.test.ts +30 -0
- package/src/__tests__/components/ExperimentTimeline.test.ts +63 -0
- package/src/__tests__/components/FileBrowserModal.test.ts +460 -0
- package/src/__tests__/components/FilePicker.state.test.ts +287 -0
- package/src/__tests__/components/FilePicker.test.ts +487 -0
- package/src/__tests__/components/GeneratedPlotlyResult.test.ts +52 -5
- package/src/__tests__/components/GroupAssigner.test.ts +53 -0
- package/src/__tests__/components/LcmsSequenceTable.test.ts +22 -0
- package/src/__tests__/components/PlotlyChart.test.ts +305 -0
- package/src/__tests__/components/RackEditor.test.ts +35 -0
- package/src/__tests__/components/ReagentList.test.ts +64 -2
- package/src/__tests__/components/RetiredStyles.test.ts +31 -0
- package/src/__tests__/components/SampleSelector.drag.test.ts +51 -1
- package/src/__tests__/components/ScheduleCalendar.test.ts +63 -0
- package/src/__tests__/components/SegmentedControl.test.ts +107 -0
- package/src/__tests__/components/TimePicker.test.ts +61 -0
- package/src/__tests__/components/WellPlate.interaction.test.ts +59 -0
- package/src/__tests__/components/iconButtonIconSizing.test.ts +18 -0
- package/src/__tests__/composables/useApi.test.ts +92 -9
- package/src/__tests__/composables/useDropdownState.test.ts +58 -1
- package/src/__tests__/composables/useFileBrowser.test.ts +305 -0
- package/src/__tests__/composables/useGeneratedAnalysis.test.ts +7 -2
- package/src/__tests__/composables/useListReorder.test.ts +145 -0
- package/src/__tests__/composables/usePlatformFilePickerAdapter.test.ts +67 -0
- package/src/__tests__/composables/usePluginClient.test.ts +3 -0
- package/src/__tests__/composables/useRequestSyncState.test.ts +140 -0
- package/src/__tests__/stores/settings.test.ts +71 -1
- package/src/__tests__/styles/cssTokens.test.ts +131 -0
- package/src/__tests__/utils/permissions.test.ts +68 -0
- package/src/apiErrors.ts +85 -0
- package/src/components/ActionMenu.vue +45 -88
- package/src/components/AlertBox.vue +0 -4
- package/src/components/AppAvatarMenu.vue +2 -14
- package/src/components/AppLayout.vue +0 -4
- package/src/components/AppPluginSwitcher.story.vue +87 -0
- package/src/components/AppPluginSwitcher.vue +2 -5
- package/src/components/AppSidebar.vue +0 -4
- package/src/components/AppToastContainer.vue +6 -8
- package/src/components/AppTopBar.vue +0 -4
- package/src/components/ArtifactSaveDialog.vue +0 -4
- package/src/components/ArtifactSelectorModal.vue +0 -4
- package/src/components/AuditTrail.story.vue +18 -0
- package/src/components/AuditTrail.vue +27 -7
- package/src/components/AutoGroupModal.vue +0 -4
- package/src/components/Avatar.vue +0 -4
- package/src/components/BaseButton.vue +0 -4
- package/src/components/BaseCheckbox.vue +0 -4
- package/src/components/BaseInput.vue +0 -4
- package/src/components/BaseModal.vue +0 -4
- package/src/components/BasePill.vue +0 -4
- package/src/components/BaseRadioGroup.vue +0 -4
- package/src/components/BaseSelect.vue +0 -4
- package/src/components/BaseSlider.vue +0 -4
- package/src/components/BaseTabs.vue +0 -4
- package/src/components/BaseTextarea.vue +0 -4
- package/src/components/BaseToggle.vue +0 -4
- package/src/components/BatchProgressList.story.vue +18 -0
- package/src/components/BatchProgressList.vue +32 -4
- package/src/components/Breadcrumb.vue +0 -4
- package/src/components/Calendar.vue +0 -4
- package/src/components/ChartContainer.story.vue +1 -1
- package/src/components/ChartContainer.vue +0 -4
- package/src/components/ChemicalFormula.vue +0 -4
- package/src/components/CollapsibleCard.vue +0 -4
- package/src/components/ColorSlider.vue +0 -4
- package/src/components/ConcentrationInput.vue +0 -4
- package/src/components/ConfirmDialog.vue +0 -4
- package/src/components/DataFrame.story.vue +14 -0
- package/src/components/DataFrame.vue +97 -23
- package/src/components/DatePicker.vue +73 -27
- package/src/components/DateTimePicker.vue +45 -17
- package/src/components/Divider.vue +0 -4
- package/src/components/DoseCalculator.vue +0 -4
- package/src/components/DropdownButton.vue +2 -14
- package/src/components/EmptyState.vue +0 -4
- package/src/components/ExperimentCodeBadge.vue +0 -4
- package/src/components/ExperimentDataViewer.story.vue +3 -0
- package/src/components/ExperimentDataViewer.vue +33 -13
- package/src/components/ExperimentPopover.vue +12 -7
- package/src/components/ExperimentSelectorModal.vue +0 -4
- package/src/components/ExperimentTimeline.story.vue +18 -0
- package/src/components/ExperimentTimeline.vue +81 -75
- package/src/components/FileBrowserModal.story.vue +203 -0
- package/src/components/FileBrowserModal.vue +384 -0
- package/src/components/FilePicker.story.vue +44 -0
- package/src/components/FilePicker.vue +284 -0
- package/src/components/FileUploader.vue +32 -18
- package/src/components/FitPanel.vue +0 -4
- package/src/components/FormActions.story.vue +96 -0
- package/src/components/FormActions.vue +0 -4
- package/src/components/FormBuilder.vue +0 -4
- package/src/components/FormField.vue +0 -4
- package/src/components/FormulaInput.vue +0 -4
- package/src/components/GeneratedPathInput.story.vue +68 -0
- package/src/components/GeneratedPlotlyResult.story.vue +96 -0
- package/src/components/GeneratedPlotlyResult.vue +34 -69
- package/src/components/GeneratedPluginView.story.vue +145 -0
- package/src/components/GeneratedPluginView.vue +10 -10
- package/src/components/GeneratedResultRenderer.story.vue +117 -0
- package/src/components/GeneratedResultRenderer.vue +4 -9
- package/src/components/GroupAssigner.vue +67 -5
- package/src/components/IconButton.vue +0 -4
- package/src/components/InstrumentAlertLog.vue +0 -4
- package/src/components/InstrumentStateBadge.vue +0 -4
- package/src/components/InstrumentStatusCard.vue +0 -4
- package/src/components/JobsStatusTray.vue +0 -4
- package/src/components/LcmsSequenceTable.vue +81 -50
- package/src/components/LoadingSpinner.vue +0 -4
- package/src/components/MobileSupportGate.vue +0 -4
- package/src/components/MoleculeInput.vue +0 -4
- package/src/components/MultiSelect.vue +0 -4
- package/src/components/NumberInput.vue +0 -4
- package/src/components/PlateMapEditor.vue +3 -14
- package/src/components/PlotlyChart.story.vue +61 -0
- package/src/components/PlotlyChart.vue +233 -0
- package/src/components/PluginIcon.vue +0 -4
- package/src/components/ProgressBar.vue +0 -4
- package/src/components/ProtocolStepEditor.vue +2 -4
- package/src/components/RackEditor.vue +51 -70
- package/src/components/ReagentEditor.vue +0 -4
- package/src/components/ReagentList.story.vue +18 -0
- package/src/components/ReagentList.vue +127 -82
- package/src/components/ResourceCard.vue +0 -4
- package/src/components/RuntimeUpdateNotice.story.vue +49 -0
- package/src/components/RuntimeUpdateNotice.vue +4 -4
- package/src/components/SampleHierarchyTree.story.vue +18 -0
- package/src/components/SampleHierarchyTree.vue +32 -9
- package/src/components/SampleLegend.vue +2 -8
- package/src/components/SampleSelector.drag.ts +51 -0
- package/src/components/SampleSelector.story.vue +6 -0
- package/src/components/SampleSelector.tree.ts +2 -0
- package/src/components/SampleSelector.vue +49 -10
- package/src/components/SampleSelectorGroupNode.vue +19 -0
- package/src/components/ScheduleCalendar.story.vue +6 -0
- package/src/components/ScheduleCalendar.vue +82 -7
- package/src/components/ScientificNumber.vue +0 -4
- package/src/components/SectionCard.vue +0 -4
- package/src/components/SegmentedControl.vue +50 -7
- package/src/components/SequenceInput.vue +0 -4
- package/src/components/SequenceProgressBar.story.vue +110 -0
- package/src/components/SequenceProgressBar.vue +0 -4
- package/src/components/SettingsModal.vue +0 -4
- package/src/components/Skeleton.vue +0 -4
- package/src/components/SmartGroupFieldRecipe.vue +8 -6
- package/src/components/SmartGroupManual.vue +0 -4
- package/src/components/StatusIndicator.vue +0 -4
- package/src/components/StepWizard.vue +0 -4
- package/src/components/TagsInput.vue +4 -6
- package/src/components/ThemeToggle.vue +0 -4
- package/src/components/TimePicker.vue +36 -7
- package/src/components/TimeRangeInput.vue +0 -4
- package/src/components/Tooltip.story.vue +3 -3
- package/src/components/Tooltip.vue +0 -4
- package/src/components/UnitInput.vue +0 -4
- package/src/components/WellPlate.geometry.ts +60 -1
- package/src/components/WellPlate.interaction.ts +44 -0
- package/src/components/WellPlate.story.vue +8 -0
- package/src/components/WellPlate.vue +53 -7
- package/src/components/fileBrowserPresentation.ts +39 -0
- package/src/components/index.ts +5 -0
- package/src/components/internal/AppTopBarPageSelectorInternal.vue +2 -5
- package/src/components/internal/AppTopBarPillNavInternal.vue +0 -4
- package/src/components/internal/DataStateInternal.vue +74 -0
- package/src/components/internal/FileBrowserDialogInternal.vue +75 -0
- package/src/components/internal/FileBrowserListingInternal.vue +197 -0
- package/src/components/internal/FileBrowserToolbarInternal.vue +136 -0
- package/src/components/internal/FilePickerPreviewInternal.vue +100 -0
- package/src/components/internal/FilePickerTreeInternal.vue +238 -0
- package/src/components/internal/FormSectionRenderer.vue +0 -4
- package/src/components/internal/WellEditPopupInternal.vue +0 -4
- package/src/composables/controlSchemaTypes.ts +34 -0
- package/src/composables/filePicker/localFiles.ts +58 -0
- package/src/composables/filePicker/usePickerNavigation.ts +220 -0
- package/src/composables/filePicker/usePickerSelection.ts +259 -0
- package/src/composables/filePicker/validation.ts +41 -0
- package/src/composables/index.ts +17 -0
- package/src/composables/useApi.ts +57 -13
- package/src/composables/useDropdownState.ts +35 -5
- package/src/composables/useEventStream.ts +14 -2
- package/src/composables/useFileBrowser.ts +314 -0
- package/src/composables/useFileImport.ts +2 -7
- package/src/composables/useFilePicker.ts +366 -0
- package/src/composables/useGeneratedAnalysis.ts +18 -26
- package/src/composables/useListReorder.story.vue +143 -0
- package/src/composables/useListReorder.ts +242 -0
- package/src/composables/useMenuKeyboard.ts +2 -2
- package/src/composables/useOptimisticMutation.ts +1 -15
- package/src/composables/usePlatformFilePickerAdapter.ts +104 -0
- package/src/composables/usePluginClient.ts +3 -0
- package/src/composables/usePluginConfig.ts +3 -1
- package/src/composables/useRackEditor.ts +2 -11
- package/src/composables/useRequestSyncState.ts +98 -28
- package/src/composables/useResourceCrud.ts +1 -15
- package/src/composables/useScheduleDrag.ts +37 -0
- package/src/composables/useWellPainting.ts +5 -29
- package/src/composables/useWellPlateEditor.ts +1 -11
- package/src/index.ts +3 -0
- package/src/permissions.ts +48 -9
- package/src/stores/experiment.ts +2 -7
- package/src/stores/index.ts +9 -1
- package/src/stores/settings.ts +93 -1
- package/src/styles/components/audit-trail.css +5 -5
- package/src/styles/components/batch-progress-list.css +7 -0
- package/src/styles/components/color-slider.css +2 -2
- package/src/styles/components/data-state.css +30 -0
- package/src/styles/components/dataframe.css +29 -35
- package/src/styles/components/experiment-data-viewer.css +4 -4
- package/src/styles/components/experiment-timeline.css +3 -30
- package/src/styles/components/file-browser-modal.css +489 -0
- package/src/styles/components/file-picker.css +502 -0
- package/src/styles/components/form-builder.css +5 -5
- package/src/styles/components/icon-button.css +9 -0
- package/src/styles/components/lcms-sequence-table.css +16 -1
- package/src/styles/components/multi-select.css +1 -1
- package/src/styles/components/reagent-list.css +38 -31
- package/src/styles/components/sample-hierarchy-tree.css +5 -19
- package/src/styles/components/sample-selector.css +9 -2
- package/src/styles/components/schedule-calendar.css +8 -0
- package/src/styles/components/scientific-number.css +1 -1
- package/src/styles/components/well-plate.css +8 -0
- package/src/styles/index.css +11 -0
- package/src/styles/variables.css +29 -0
- package/src/templates/builderPresetControls.ts +1 -1
- package/src/templates/componentPlateHelpers.ts +3 -1
- package/src/templates/doseResponseAdapters.ts +2 -13
- package/src/templates/elisaAssayCollectionBuilder.ts +2 -2
- package/src/templates/plateMapBuilder.ts +2 -2
- package/src/templates/qpcrPlateBuilder.ts +1 -1
- package/src/templates/templateValidators.ts +1 -1
- package/src/templates/timeCourseBuilder.ts +2 -2
- package/src/templates/wellPlateScreenCollectionBuilder.ts +2 -2
- package/src/types/fileBrowserTypes.ts +85 -0
- package/src/types/filePicker.ts +72 -0
- package/src/types/index.ts +14 -0
- package/src/utils/color.ts +51 -0
- package/src/utils/errors.ts +29 -0
- package/dist/EmptyState-NBqf2_8z.js.map +0 -1
- package/dist/ExperimentPopover-CfOdh5Rm.js.map +0 -1
- package/dist/ExperimentSelectorModal-DvIagrxY.js.map +0 -1
- package/dist/SettingsModal-W3TYfnP9.js.map +0 -1
- package/dist/components-B80gV0P6.js.map +0 -1
- package/dist/composables/autoGroupConstants.d.ts +0 -1
- package/dist/composables/autoGroupGrouping.d.ts +0 -3
- package/dist/composables/useAutoGroupInputSources.d.ts +0 -32
- package/dist/composables-C8mmD5ta.js.map +0 -1
- package/dist/experiment-Y9Iz7KYi.js.map +0 -1
- package/dist/experiment-utils-DV3DrvE_.js.map +0 -1
- package/dist/templates/builderDefaults.d.ts +0 -1
- package/dist/templates/plateGeometry.d.ts +0 -4
- package/dist/templates-CK72aKO1.js.map +0 -1
- package/dist/useApi-CDBq6z23.js.map +0 -1
- package/dist/useControlSchema-_OVhavKq.js.map +0 -1
- package/dist/useDropdownState-D5G4UvWd.js.map +0 -1
- package/dist/useProtocolTemplates-Dq5Pzwyd.js.map +0 -1
- package/src/__tests__/composables/useAutoGroupInputSources.test.ts +0 -127
- package/src/composables/autoGroupConstants.ts +0 -4
- package/src/composables/autoGroupGrouping.ts +0 -148
- package/src/composables/useAutoGroupInputSources.ts +0 -147
- package/src/templates/builderDefaults.ts +0 -11
- package/src/templates/plateGeometry.ts +0 -62
- /package/dist/__tests__/{composables/useAutoGroupInputSources.test.d.ts → apiErrors.test.d.ts} +0 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import {
|
|
1
|
+
import { f as MintApiError, i as useApi, p as mintApiErrorFromResponse, u as tryUseSettingsStore } from "./errors-BLuqMee5.js";
|
|
2
|
+
import { c as formatExperimentDate, f as BaseModal_default, h as BaseButton_default, m as useEventListener, p as useFocusTrap } from "./experiment-utils-CV2Wza3z.js";
|
|
3
|
+
import { a as BaseSelect_default, i as BasePill_default, n as useRequestSyncState, o as normalizeOptionInput, r as EmptyState_default, s as BaseInput_default, t as Skeleton_default } from "./Skeleton-BAF3CKY7.js";
|
|
4
|
+
import { t as useDropdownState } from "./useDropdownState-C7hRiVQf.js";
|
|
5
5
|
import { hasAllPermissions } from "./permissions.js";
|
|
6
|
-
import { Fragment, Teleport, Transition, TransitionGroup, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createStaticVNode, createTextVNode, createVNode, defineComponent, getCurrentInstance, getCurrentScope, isRef, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, onScopeDispose, onUnmounted, openBlock, reactive, ref, renderList, renderSlot, shallowRef, toDisplayString, toValue, unref, useSlots, vModelText, watch, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
6
|
+
import { Fragment, Teleport, Transition, TransitionGroup, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createStaticVNode, createTextVNode, createVNode, defineComponent, getCurrentInstance, getCurrentScope, isRef, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, onScopeDispose, onUnmounted, openBlock, reactive, ref, renderList, renderSlot, shallowRef, toDisplayString, toValue, unref, useId, useSlots, vModelText, watch, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
7
|
+
import { autoUpdate, computePosition, flip, offset, shift } from "@floating-ui/dom";
|
|
7
8
|
//#region src/components/BaseTextarea.vue?vue&type=script&setup=true&lang.ts
|
|
8
9
|
var _hoisted_1$22 = [
|
|
9
10
|
"value",
|
|
@@ -78,995 +79,10 @@ var BaseTextarea_default = /* @__PURE__ */ defineComponent({
|
|
|
78
79
|
}
|
|
79
80
|
});
|
|
80
81
|
//#endregion
|
|
81
|
-
//#region ../../node_modules/.bun/@floating-ui+utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
|
|
82
|
-
var min = Math.min;
|
|
83
|
-
var max = Math.max;
|
|
84
|
-
var round = Math.round;
|
|
85
|
-
var createCoords = (v) => ({
|
|
86
|
-
x: v,
|
|
87
|
-
y: v
|
|
88
|
-
});
|
|
89
|
-
var oppositeSideMap = {
|
|
90
|
-
left: "right",
|
|
91
|
-
right: "left",
|
|
92
|
-
bottom: "top",
|
|
93
|
-
top: "bottom"
|
|
94
|
-
};
|
|
95
|
-
function clamp(start, value, end) {
|
|
96
|
-
return max(start, min(value, end));
|
|
97
|
-
}
|
|
98
|
-
function evaluate(value, param) {
|
|
99
|
-
return typeof value === "function" ? value(param) : value;
|
|
100
|
-
}
|
|
101
|
-
function getSide(placement) {
|
|
102
|
-
return placement.split("-")[0];
|
|
103
|
-
}
|
|
104
|
-
function getAlignment(placement) {
|
|
105
|
-
return placement.split("-")[1];
|
|
106
|
-
}
|
|
107
|
-
function getOppositeAxis(axis) {
|
|
108
|
-
return axis === "x" ? "y" : "x";
|
|
109
|
-
}
|
|
110
|
-
function getAxisLength(axis) {
|
|
111
|
-
return axis === "y" ? "height" : "width";
|
|
112
|
-
}
|
|
113
|
-
function getSideAxis(placement) {
|
|
114
|
-
const firstChar = placement[0];
|
|
115
|
-
return firstChar === "t" || firstChar === "b" ? "y" : "x";
|
|
116
|
-
}
|
|
117
|
-
function getAlignmentAxis(placement) {
|
|
118
|
-
return getOppositeAxis(getSideAxis(placement));
|
|
119
|
-
}
|
|
120
|
-
function getAlignmentSides(placement, rects, rtl) {
|
|
121
|
-
if (rtl === void 0) rtl = false;
|
|
122
|
-
const alignment = getAlignment(placement);
|
|
123
|
-
const alignmentAxis = getAlignmentAxis(placement);
|
|
124
|
-
const length = getAxisLength(alignmentAxis);
|
|
125
|
-
let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
|
|
126
|
-
if (rects.reference[length] > rects.floating[length]) mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
|
|
127
|
-
return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
|
|
128
|
-
}
|
|
129
|
-
function getExpandedPlacements(placement) {
|
|
130
|
-
const oppositePlacement = getOppositePlacement(placement);
|
|
131
|
-
return [
|
|
132
|
-
getOppositeAlignmentPlacement(placement),
|
|
133
|
-
oppositePlacement,
|
|
134
|
-
getOppositeAlignmentPlacement(oppositePlacement)
|
|
135
|
-
];
|
|
136
|
-
}
|
|
137
|
-
function getOppositeAlignmentPlacement(placement) {
|
|
138
|
-
return placement.includes("start") ? placement.replace("start", "end") : placement.replace("end", "start");
|
|
139
|
-
}
|
|
140
|
-
var lrPlacement = ["left", "right"];
|
|
141
|
-
var rlPlacement = ["right", "left"];
|
|
142
|
-
var tbPlacement = ["top", "bottom"];
|
|
143
|
-
var btPlacement = ["bottom", "top"];
|
|
144
|
-
function getSideList(side, isStart, rtl) {
|
|
145
|
-
switch (side) {
|
|
146
|
-
case "top":
|
|
147
|
-
case "bottom":
|
|
148
|
-
if (rtl) return isStart ? rlPlacement : lrPlacement;
|
|
149
|
-
return isStart ? lrPlacement : rlPlacement;
|
|
150
|
-
case "left":
|
|
151
|
-
case "right": return isStart ? tbPlacement : btPlacement;
|
|
152
|
-
default: return [];
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
|
156
|
-
const alignment = getAlignment(placement);
|
|
157
|
-
let list = getSideList(getSide(placement), direction === "start", rtl);
|
|
158
|
-
if (alignment) {
|
|
159
|
-
list = list.map((side) => side + "-" + alignment);
|
|
160
|
-
if (flipAlignment) list = list.concat(list.map(getOppositeAlignmentPlacement));
|
|
161
|
-
}
|
|
162
|
-
return list;
|
|
163
|
-
}
|
|
164
|
-
function getOppositePlacement(placement) {
|
|
165
|
-
const side = getSide(placement);
|
|
166
|
-
return oppositeSideMap[side] + placement.slice(side.length);
|
|
167
|
-
}
|
|
168
|
-
function expandPaddingObject(padding) {
|
|
169
|
-
return {
|
|
170
|
-
top: 0,
|
|
171
|
-
right: 0,
|
|
172
|
-
bottom: 0,
|
|
173
|
-
left: 0,
|
|
174
|
-
...padding
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
|
-
function getPaddingObject(padding) {
|
|
178
|
-
return typeof padding !== "number" ? expandPaddingObject(padding) : {
|
|
179
|
-
top: padding,
|
|
180
|
-
right: padding,
|
|
181
|
-
bottom: padding,
|
|
182
|
-
left: padding
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
function rectToClientRect(rect) {
|
|
186
|
-
const { x, y, width, height } = rect;
|
|
187
|
-
return {
|
|
188
|
-
width,
|
|
189
|
-
height,
|
|
190
|
-
top: y,
|
|
191
|
-
left: x,
|
|
192
|
-
right: x + width,
|
|
193
|
-
bottom: y + height,
|
|
194
|
-
x,
|
|
195
|
-
y
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
//#endregion
|
|
199
|
-
//#region ../../node_modules/.bun/@floating-ui+core@1.7.5/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
|
|
200
|
-
function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
201
|
-
let { reference, floating } = _ref;
|
|
202
|
-
const sideAxis = getSideAxis(placement);
|
|
203
|
-
const alignmentAxis = getAlignmentAxis(placement);
|
|
204
|
-
const alignLength = getAxisLength(alignmentAxis);
|
|
205
|
-
const side = getSide(placement);
|
|
206
|
-
const isVertical = sideAxis === "y";
|
|
207
|
-
const commonX = reference.x + reference.width / 2 - floating.width / 2;
|
|
208
|
-
const commonY = reference.y + reference.height / 2 - floating.height / 2;
|
|
209
|
-
const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
|
|
210
|
-
let coords;
|
|
211
|
-
switch (side) {
|
|
212
|
-
case "top":
|
|
213
|
-
coords = {
|
|
214
|
-
x: commonX,
|
|
215
|
-
y: reference.y - floating.height
|
|
216
|
-
};
|
|
217
|
-
break;
|
|
218
|
-
case "bottom":
|
|
219
|
-
coords = {
|
|
220
|
-
x: commonX,
|
|
221
|
-
y: reference.y + reference.height
|
|
222
|
-
};
|
|
223
|
-
break;
|
|
224
|
-
case "right":
|
|
225
|
-
coords = {
|
|
226
|
-
x: reference.x + reference.width,
|
|
227
|
-
y: commonY
|
|
228
|
-
};
|
|
229
|
-
break;
|
|
230
|
-
case "left":
|
|
231
|
-
coords = {
|
|
232
|
-
x: reference.x - floating.width,
|
|
233
|
-
y: commonY
|
|
234
|
-
};
|
|
235
|
-
break;
|
|
236
|
-
default: coords = {
|
|
237
|
-
x: reference.x,
|
|
238
|
-
y: reference.y
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
|
-
switch (getAlignment(placement)) {
|
|
242
|
-
case "start":
|
|
243
|
-
coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
|
|
244
|
-
break;
|
|
245
|
-
case "end":
|
|
246
|
-
coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
|
|
247
|
-
break;
|
|
248
|
-
}
|
|
249
|
-
return coords;
|
|
250
|
-
}
|
|
251
|
-
/**
|
|
252
|
-
* Resolves with an object of overflow side offsets that determine how much the
|
|
253
|
-
* element is overflowing a given clipping boundary on each side.
|
|
254
|
-
* - positive = overflowing the boundary by that number of pixels
|
|
255
|
-
* - negative = how many pixels left before it will overflow
|
|
256
|
-
* - 0 = lies flush with the boundary
|
|
257
|
-
* @see https://floating-ui.com/docs/detectOverflow
|
|
258
|
-
*/
|
|
259
|
-
async function detectOverflow(state, options) {
|
|
260
|
-
var _await$platform$isEle;
|
|
261
|
-
if (options === void 0) options = {};
|
|
262
|
-
const { x, y, platform, rects, elements, strategy } = state;
|
|
263
|
-
const { boundary = "clippingAncestors", rootBoundary = "viewport", elementContext = "floating", altBoundary = false, padding = 0 } = evaluate(options, state);
|
|
264
|
-
const paddingObject = getPaddingObject(padding);
|
|
265
|
-
const element = elements[altBoundary ? elementContext === "floating" ? "reference" : "floating" : elementContext];
|
|
266
|
-
const clippingClientRect = rectToClientRect(await platform.getClippingRect({
|
|
267
|
-
element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating)),
|
|
268
|
-
boundary,
|
|
269
|
-
rootBoundary,
|
|
270
|
-
strategy
|
|
271
|
-
}));
|
|
272
|
-
const rect = elementContext === "floating" ? {
|
|
273
|
-
x,
|
|
274
|
-
y,
|
|
275
|
-
width: rects.floating.width,
|
|
276
|
-
height: rects.floating.height
|
|
277
|
-
} : rects.reference;
|
|
278
|
-
const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
|
|
279
|
-
const offsetScale = await (platform.isElement == null ? void 0 : platform.isElement(offsetParent)) ? await (platform.getScale == null ? void 0 : platform.getScale(offsetParent)) || {
|
|
280
|
-
x: 1,
|
|
281
|
-
y: 1
|
|
282
|
-
} : {
|
|
283
|
-
x: 1,
|
|
284
|
-
y: 1
|
|
285
|
-
};
|
|
286
|
-
const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
287
|
-
elements,
|
|
288
|
-
rect,
|
|
289
|
-
offsetParent,
|
|
290
|
-
strategy
|
|
291
|
-
}) : rect);
|
|
292
|
-
return {
|
|
293
|
-
top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
|
|
294
|
-
bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
|
|
295
|
-
left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
|
|
296
|
-
right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
|
|
297
|
-
};
|
|
298
|
-
}
|
|
299
|
-
var MAX_RESET_COUNT = 50;
|
|
300
|
-
/**
|
|
301
|
-
* Computes the `x` and `y` coordinates that will place the floating element
|
|
302
|
-
* next to a given reference element.
|
|
303
|
-
*
|
|
304
|
-
* This export does not have any `platform` interface logic. You will need to
|
|
305
|
-
* write one for the platform you are using Floating UI with.
|
|
306
|
-
*/
|
|
307
|
-
var computePosition$1 = async (reference, floating, config) => {
|
|
308
|
-
const { placement = "bottom", strategy = "absolute", middleware = [], platform } = config;
|
|
309
|
-
const platformWithDetectOverflow = platform.detectOverflow ? platform : {
|
|
310
|
-
...platform,
|
|
311
|
-
detectOverflow
|
|
312
|
-
};
|
|
313
|
-
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
|
|
314
|
-
let rects = await platform.getElementRects({
|
|
315
|
-
reference,
|
|
316
|
-
floating,
|
|
317
|
-
strategy
|
|
318
|
-
});
|
|
319
|
-
let { x, y } = computeCoordsFromPlacement(rects, placement, rtl);
|
|
320
|
-
let statefulPlacement = placement;
|
|
321
|
-
let resetCount = 0;
|
|
322
|
-
const middlewareData = {};
|
|
323
|
-
for (let i = 0; i < middleware.length; i++) {
|
|
324
|
-
const currentMiddleware = middleware[i];
|
|
325
|
-
if (!currentMiddleware) continue;
|
|
326
|
-
const { name, fn } = currentMiddleware;
|
|
327
|
-
const { x: nextX, y: nextY, data, reset } = await fn({
|
|
328
|
-
x,
|
|
329
|
-
y,
|
|
330
|
-
initialPlacement: placement,
|
|
331
|
-
placement: statefulPlacement,
|
|
332
|
-
strategy,
|
|
333
|
-
middlewareData,
|
|
334
|
-
rects,
|
|
335
|
-
platform: platformWithDetectOverflow,
|
|
336
|
-
elements: {
|
|
337
|
-
reference,
|
|
338
|
-
floating
|
|
339
|
-
}
|
|
340
|
-
});
|
|
341
|
-
x = nextX != null ? nextX : x;
|
|
342
|
-
y = nextY != null ? nextY : y;
|
|
343
|
-
middlewareData[name] = {
|
|
344
|
-
...middlewareData[name],
|
|
345
|
-
...data
|
|
346
|
-
};
|
|
347
|
-
if (reset && resetCount < MAX_RESET_COUNT) {
|
|
348
|
-
resetCount++;
|
|
349
|
-
if (typeof reset === "object") {
|
|
350
|
-
if (reset.placement) statefulPlacement = reset.placement;
|
|
351
|
-
if (reset.rects) rects = reset.rects === true ? await platform.getElementRects({
|
|
352
|
-
reference,
|
|
353
|
-
floating,
|
|
354
|
-
strategy
|
|
355
|
-
}) : reset.rects;
|
|
356
|
-
({x, y} = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
|
|
357
|
-
}
|
|
358
|
-
i = -1;
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
return {
|
|
362
|
-
x,
|
|
363
|
-
y,
|
|
364
|
-
placement: statefulPlacement,
|
|
365
|
-
strategy,
|
|
366
|
-
middlewareData
|
|
367
|
-
};
|
|
368
|
-
};
|
|
369
|
-
/**
|
|
370
|
-
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
371
|
-
* in order to keep it in view when the preferred placement(s) will overflow the
|
|
372
|
-
* clipping boundary. Alternative to `autoPlacement`.
|
|
373
|
-
* @see https://floating-ui.com/docs/flip
|
|
374
|
-
*/
|
|
375
|
-
var flip$1 = function(options) {
|
|
376
|
-
if (options === void 0) options = {};
|
|
377
|
-
return {
|
|
378
|
-
name: "flip",
|
|
379
|
-
options,
|
|
380
|
-
async fn(state) {
|
|
381
|
-
var _middlewareData$arrow, _middlewareData$flip;
|
|
382
|
-
const { placement, middlewareData, rects, initialPlacement, platform, elements } = state;
|
|
383
|
-
const { mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = true, fallbackPlacements: specifiedFallbackPlacements, fallbackStrategy = "bestFit", fallbackAxisSideDirection = "none", flipAlignment = true, ...detectOverflowOptions } = evaluate(options, state);
|
|
384
|
-
if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) return {};
|
|
385
|
-
const side = getSide(placement);
|
|
386
|
-
const initialSideAxis = getSideAxis(initialPlacement);
|
|
387
|
-
const isBasePlacement = getSide(initialPlacement) === initialPlacement;
|
|
388
|
-
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
389
|
-
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
|
|
390
|
-
const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
|
|
391
|
-
if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
392
|
-
const placements = [initialPlacement, ...fallbackPlacements];
|
|
393
|
-
const overflow = await platform.detectOverflow(state, detectOverflowOptions);
|
|
394
|
-
const overflows = [];
|
|
395
|
-
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
|
396
|
-
if (checkMainAxis) overflows.push(overflow[side]);
|
|
397
|
-
if (checkCrossAxis) {
|
|
398
|
-
const sides = getAlignmentSides(placement, rects, rtl);
|
|
399
|
-
overflows.push(overflow[sides[0]], overflow[sides[1]]);
|
|
400
|
-
}
|
|
401
|
-
overflowsData = [...overflowsData, {
|
|
402
|
-
placement,
|
|
403
|
-
overflows
|
|
404
|
-
}];
|
|
405
|
-
if (!overflows.every((side) => side <= 0)) {
|
|
406
|
-
var _middlewareData$flip2, _overflowsData$filter;
|
|
407
|
-
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
408
|
-
const nextPlacement = placements[nextIndex];
|
|
409
|
-
if (nextPlacement) {
|
|
410
|
-
if (!(checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false) || overflowsData.every((d) => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) return {
|
|
411
|
-
data: {
|
|
412
|
-
index: nextIndex,
|
|
413
|
-
overflows: overflowsData
|
|
414
|
-
},
|
|
415
|
-
reset: { placement: nextPlacement }
|
|
416
|
-
};
|
|
417
|
-
}
|
|
418
|
-
let resetPlacement = (_overflowsData$filter = overflowsData.filter((d) => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
|
|
419
|
-
if (!resetPlacement) switch (fallbackStrategy) {
|
|
420
|
-
case "bestFit": {
|
|
421
|
-
var _overflowsData$filter2;
|
|
422
|
-
const placement = (_overflowsData$filter2 = overflowsData.filter((d) => {
|
|
423
|
-
if (hasFallbackAxisSideDirection) {
|
|
424
|
-
const currentSideAxis = getSideAxis(d.placement);
|
|
425
|
-
return currentSideAxis === initialSideAxis || currentSideAxis === "y";
|
|
426
|
-
}
|
|
427
|
-
return true;
|
|
428
|
-
}).map((d) => [d.placement, d.overflows.filter((overflow) => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
|
|
429
|
-
if (placement) resetPlacement = placement;
|
|
430
|
-
break;
|
|
431
|
-
}
|
|
432
|
-
case "initialPlacement":
|
|
433
|
-
resetPlacement = initialPlacement;
|
|
434
|
-
break;
|
|
435
|
-
}
|
|
436
|
-
if (placement !== resetPlacement) return { reset: { placement: resetPlacement } };
|
|
437
|
-
}
|
|
438
|
-
return {};
|
|
439
|
-
}
|
|
440
|
-
};
|
|
441
|
-
};
|
|
442
|
-
var originSides = /* @__PURE__ */ new Set(["left", "top"]);
|
|
443
|
-
async function convertValueToCoords(state, options) {
|
|
444
|
-
const { placement, platform, elements } = state;
|
|
445
|
-
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
446
|
-
const side = getSide(placement);
|
|
447
|
-
const alignment = getAlignment(placement);
|
|
448
|
-
const isVertical = getSideAxis(placement) === "y";
|
|
449
|
-
const mainAxisMulti = originSides.has(side) ? -1 : 1;
|
|
450
|
-
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
451
|
-
const rawValue = evaluate(options, state);
|
|
452
|
-
let { mainAxis, crossAxis, alignmentAxis } = typeof rawValue === "number" ? {
|
|
453
|
-
mainAxis: rawValue,
|
|
454
|
-
crossAxis: 0,
|
|
455
|
-
alignmentAxis: null
|
|
456
|
-
} : {
|
|
457
|
-
mainAxis: rawValue.mainAxis || 0,
|
|
458
|
-
crossAxis: rawValue.crossAxis || 0,
|
|
459
|
-
alignmentAxis: rawValue.alignmentAxis
|
|
460
|
-
};
|
|
461
|
-
if (alignment && typeof alignmentAxis === "number") crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
|
|
462
|
-
return isVertical ? {
|
|
463
|
-
x: crossAxis * crossAxisMulti,
|
|
464
|
-
y: mainAxis * mainAxisMulti
|
|
465
|
-
} : {
|
|
466
|
-
x: mainAxis * mainAxisMulti,
|
|
467
|
-
y: crossAxis * crossAxisMulti
|
|
468
|
-
};
|
|
469
|
-
}
|
|
470
|
-
/**
|
|
471
|
-
* Modifies the placement by translating the floating element along the
|
|
472
|
-
* specified axes.
|
|
473
|
-
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
|
474
|
-
* object may be passed.
|
|
475
|
-
* @see https://floating-ui.com/docs/offset
|
|
476
|
-
*/
|
|
477
|
-
var offset$1 = function(options) {
|
|
478
|
-
if (options === void 0) options = 0;
|
|
479
|
-
return {
|
|
480
|
-
name: "offset",
|
|
481
|
-
options,
|
|
482
|
-
async fn(state) {
|
|
483
|
-
var _middlewareData$offse, _middlewareData$arrow;
|
|
484
|
-
const { x, y, placement, middlewareData } = state;
|
|
485
|
-
const diffCoords = await convertValueToCoords(state, options);
|
|
486
|
-
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) return {};
|
|
487
|
-
return {
|
|
488
|
-
x: x + diffCoords.x,
|
|
489
|
-
y: y + diffCoords.y,
|
|
490
|
-
data: {
|
|
491
|
-
...diffCoords,
|
|
492
|
-
placement
|
|
493
|
-
}
|
|
494
|
-
};
|
|
495
|
-
}
|
|
496
|
-
};
|
|
497
|
-
};
|
|
498
|
-
/**
|
|
499
|
-
* Optimizes the visibility of the floating element by shifting it in order to
|
|
500
|
-
* keep it in view when it will overflow the clipping boundary.
|
|
501
|
-
* @see https://floating-ui.com/docs/shift
|
|
502
|
-
*/
|
|
503
|
-
var shift$1 = function(options) {
|
|
504
|
-
if (options === void 0) options = {};
|
|
505
|
-
return {
|
|
506
|
-
name: "shift",
|
|
507
|
-
options,
|
|
508
|
-
async fn(state) {
|
|
509
|
-
const { x, y, placement, platform } = state;
|
|
510
|
-
const { mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = false, limiter = { fn: (_ref) => {
|
|
511
|
-
let { x, y } = _ref;
|
|
512
|
-
return {
|
|
513
|
-
x,
|
|
514
|
-
y
|
|
515
|
-
};
|
|
516
|
-
} }, ...detectOverflowOptions } = evaluate(options, state);
|
|
517
|
-
const coords = {
|
|
518
|
-
x,
|
|
519
|
-
y
|
|
520
|
-
};
|
|
521
|
-
const overflow = await platform.detectOverflow(state, detectOverflowOptions);
|
|
522
|
-
const crossAxis = getSideAxis(getSide(placement));
|
|
523
|
-
const mainAxis = getOppositeAxis(crossAxis);
|
|
524
|
-
let mainAxisCoord = coords[mainAxis];
|
|
525
|
-
let crossAxisCoord = coords[crossAxis];
|
|
526
|
-
if (checkMainAxis) {
|
|
527
|
-
const minSide = mainAxis === "y" ? "top" : "left";
|
|
528
|
-
const maxSide = mainAxis === "y" ? "bottom" : "right";
|
|
529
|
-
const min = mainAxisCoord + overflow[minSide];
|
|
530
|
-
const max = mainAxisCoord - overflow[maxSide];
|
|
531
|
-
mainAxisCoord = clamp(min, mainAxisCoord, max);
|
|
532
|
-
}
|
|
533
|
-
if (checkCrossAxis) {
|
|
534
|
-
const minSide = crossAxis === "y" ? "top" : "left";
|
|
535
|
-
const maxSide = crossAxis === "y" ? "bottom" : "right";
|
|
536
|
-
const min = crossAxisCoord + overflow[minSide];
|
|
537
|
-
const max = crossAxisCoord - overflow[maxSide];
|
|
538
|
-
crossAxisCoord = clamp(min, crossAxisCoord, max);
|
|
539
|
-
}
|
|
540
|
-
const limitedCoords = limiter.fn({
|
|
541
|
-
...state,
|
|
542
|
-
[mainAxis]: mainAxisCoord,
|
|
543
|
-
[crossAxis]: crossAxisCoord
|
|
544
|
-
});
|
|
545
|
-
return {
|
|
546
|
-
...limitedCoords,
|
|
547
|
-
data: {
|
|
548
|
-
x: limitedCoords.x - x,
|
|
549
|
-
y: limitedCoords.y - y,
|
|
550
|
-
enabled: {
|
|
551
|
-
[mainAxis]: checkMainAxis,
|
|
552
|
-
[crossAxis]: checkCrossAxis
|
|
553
|
-
}
|
|
554
|
-
}
|
|
555
|
-
};
|
|
556
|
-
}
|
|
557
|
-
};
|
|
558
|
-
};
|
|
559
|
-
//#endregion
|
|
560
|
-
//#region ../../node_modules/.bun/@floating-ui+utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
|
|
561
|
-
function hasWindow() {
|
|
562
|
-
return typeof window !== "undefined";
|
|
563
|
-
}
|
|
564
|
-
function getNodeName(node) {
|
|
565
|
-
if (isNode(node)) return (node.nodeName || "").toLowerCase();
|
|
566
|
-
return "#document";
|
|
567
|
-
}
|
|
568
|
-
function getWindow(node) {
|
|
569
|
-
var _node$ownerDocument;
|
|
570
|
-
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
571
|
-
}
|
|
572
|
-
function getDocumentElement(node) {
|
|
573
|
-
var _ref;
|
|
574
|
-
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
575
|
-
}
|
|
576
|
-
function isNode(value) {
|
|
577
|
-
if (!hasWindow()) return false;
|
|
578
|
-
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
579
|
-
}
|
|
580
|
-
function isElement(value) {
|
|
581
|
-
if (!hasWindow()) return false;
|
|
582
|
-
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
583
|
-
}
|
|
584
|
-
function isHTMLElement(value) {
|
|
585
|
-
if (!hasWindow()) return false;
|
|
586
|
-
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
587
|
-
}
|
|
588
|
-
function isShadowRoot(value) {
|
|
589
|
-
if (!hasWindow() || typeof ShadowRoot === "undefined") return false;
|
|
590
|
-
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
591
|
-
}
|
|
592
|
-
function isOverflowElement(element) {
|
|
593
|
-
const { overflow, overflowX, overflowY, display } = getComputedStyle$1(element);
|
|
594
|
-
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== "inline" && display !== "contents";
|
|
595
|
-
}
|
|
596
|
-
function isTableElement(element) {
|
|
597
|
-
return /^(table|td|th)$/.test(getNodeName(element));
|
|
598
|
-
}
|
|
599
|
-
function isTopLayer(element) {
|
|
600
|
-
try {
|
|
601
|
-
if (element.matches(":popover-open")) return true;
|
|
602
|
-
} catch (_e) {}
|
|
603
|
-
try {
|
|
604
|
-
return element.matches(":modal");
|
|
605
|
-
} catch (_e) {
|
|
606
|
-
return false;
|
|
607
|
-
}
|
|
608
|
-
}
|
|
609
|
-
var willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
|
|
610
|
-
var containRe = /paint|layout|strict|content/;
|
|
611
|
-
var isNotNone = (value) => !!value && value !== "none";
|
|
612
|
-
var isWebKitValue;
|
|
613
|
-
function isContainingBlock(elementOrCss) {
|
|
614
|
-
const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
|
|
615
|
-
return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || "") || containRe.test(css.contain || "");
|
|
616
|
-
}
|
|
617
|
-
function getContainingBlock(element) {
|
|
618
|
-
let currentNode = getParentNode(element);
|
|
619
|
-
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
620
|
-
if (isContainingBlock(currentNode)) return currentNode;
|
|
621
|
-
else if (isTopLayer(currentNode)) return null;
|
|
622
|
-
currentNode = getParentNode(currentNode);
|
|
623
|
-
}
|
|
624
|
-
return null;
|
|
625
|
-
}
|
|
626
|
-
function isWebKit() {
|
|
627
|
-
if (isWebKitValue == null) isWebKitValue = typeof CSS !== "undefined" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none");
|
|
628
|
-
return isWebKitValue;
|
|
629
|
-
}
|
|
630
|
-
function isLastTraversableNode(node) {
|
|
631
|
-
return /^(html|body|#document)$/.test(getNodeName(node));
|
|
632
|
-
}
|
|
633
|
-
function getComputedStyle$1(element) {
|
|
634
|
-
return getWindow(element).getComputedStyle(element);
|
|
635
|
-
}
|
|
636
|
-
function getNodeScroll(element) {
|
|
637
|
-
if (isElement(element)) return {
|
|
638
|
-
scrollLeft: element.scrollLeft,
|
|
639
|
-
scrollTop: element.scrollTop
|
|
640
|
-
};
|
|
641
|
-
return {
|
|
642
|
-
scrollLeft: element.scrollX,
|
|
643
|
-
scrollTop: element.scrollY
|
|
644
|
-
};
|
|
645
|
-
}
|
|
646
|
-
function getParentNode(node) {
|
|
647
|
-
if (getNodeName(node) === "html") return node;
|
|
648
|
-
const result = node.assignedSlot || node.parentNode || isShadowRoot(node) && node.host || getDocumentElement(node);
|
|
649
|
-
return isShadowRoot(result) ? result.host : result;
|
|
650
|
-
}
|
|
651
|
-
function getNearestOverflowAncestor(node) {
|
|
652
|
-
const parentNode = getParentNode(node);
|
|
653
|
-
if (isLastTraversableNode(parentNode)) return node.ownerDocument ? node.ownerDocument.body : node.body;
|
|
654
|
-
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) return parentNode;
|
|
655
|
-
return getNearestOverflowAncestor(parentNode);
|
|
656
|
-
}
|
|
657
|
-
function getOverflowAncestors(node, list, traverseIframes) {
|
|
658
|
-
var _node$ownerDocument2;
|
|
659
|
-
if (list === void 0) list = [];
|
|
660
|
-
if (traverseIframes === void 0) traverseIframes = true;
|
|
661
|
-
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
662
|
-
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
663
|
-
const win = getWindow(scrollableAncestor);
|
|
664
|
-
if (isBody) {
|
|
665
|
-
const frameElement = getFrameElement(win);
|
|
666
|
-
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
|
667
|
-
} else return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
668
|
-
}
|
|
669
|
-
function getFrameElement(win) {
|
|
670
|
-
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
671
|
-
}
|
|
672
|
-
//#endregion
|
|
673
|
-
//#region ../../node_modules/.bun/@floating-ui+dom@1.7.6/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
|
|
674
|
-
function getCssDimensions(element) {
|
|
675
|
-
const css = getComputedStyle$1(element);
|
|
676
|
-
let width = parseFloat(css.width) || 0;
|
|
677
|
-
let height = parseFloat(css.height) || 0;
|
|
678
|
-
const hasOffset = isHTMLElement(element);
|
|
679
|
-
const offsetWidth = hasOffset ? element.offsetWidth : width;
|
|
680
|
-
const offsetHeight = hasOffset ? element.offsetHeight : height;
|
|
681
|
-
const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
|
|
682
|
-
if (shouldFallback) {
|
|
683
|
-
width = offsetWidth;
|
|
684
|
-
height = offsetHeight;
|
|
685
|
-
}
|
|
686
|
-
return {
|
|
687
|
-
width,
|
|
688
|
-
height,
|
|
689
|
-
$: shouldFallback
|
|
690
|
-
};
|
|
691
|
-
}
|
|
692
|
-
function unwrapElement(element) {
|
|
693
|
-
return !isElement(element) ? element.contextElement : element;
|
|
694
|
-
}
|
|
695
|
-
function getScale(element) {
|
|
696
|
-
const domElement = unwrapElement(element);
|
|
697
|
-
if (!isHTMLElement(domElement)) return createCoords(1);
|
|
698
|
-
const rect = domElement.getBoundingClientRect();
|
|
699
|
-
const { width, height, $ } = getCssDimensions(domElement);
|
|
700
|
-
let x = ($ ? round(rect.width) : rect.width) / width;
|
|
701
|
-
let y = ($ ? round(rect.height) : rect.height) / height;
|
|
702
|
-
if (!x || !Number.isFinite(x)) x = 1;
|
|
703
|
-
if (!y || !Number.isFinite(y)) y = 1;
|
|
704
|
-
return {
|
|
705
|
-
x,
|
|
706
|
-
y
|
|
707
|
-
};
|
|
708
|
-
}
|
|
709
|
-
var noOffsets = /* @__PURE__ */ createCoords(0);
|
|
710
|
-
function getVisualOffsets(element) {
|
|
711
|
-
const win = getWindow(element);
|
|
712
|
-
if (!isWebKit() || !win.visualViewport) return noOffsets;
|
|
713
|
-
return {
|
|
714
|
-
x: win.visualViewport.offsetLeft,
|
|
715
|
-
y: win.visualViewport.offsetTop
|
|
716
|
-
};
|
|
717
|
-
}
|
|
718
|
-
function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
|
|
719
|
-
if (isFixed === void 0) isFixed = false;
|
|
720
|
-
if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) return false;
|
|
721
|
-
return isFixed;
|
|
722
|
-
}
|
|
723
|
-
function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
|
|
724
|
-
if (includeScale === void 0) includeScale = false;
|
|
725
|
-
if (isFixedStrategy === void 0) isFixedStrategy = false;
|
|
726
|
-
const clientRect = element.getBoundingClientRect();
|
|
727
|
-
const domElement = unwrapElement(element);
|
|
728
|
-
let scale = createCoords(1);
|
|
729
|
-
if (includeScale) if (offsetParent) {
|
|
730
|
-
if (isElement(offsetParent)) scale = getScale(offsetParent);
|
|
731
|
-
} else scale = getScale(element);
|
|
732
|
-
const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
|
|
733
|
-
let x = (clientRect.left + visualOffsets.x) / scale.x;
|
|
734
|
-
let y = (clientRect.top + visualOffsets.y) / scale.y;
|
|
735
|
-
let width = clientRect.width / scale.x;
|
|
736
|
-
let height = clientRect.height / scale.y;
|
|
737
|
-
if (domElement) {
|
|
738
|
-
const win = getWindow(domElement);
|
|
739
|
-
const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
|
|
740
|
-
let currentWin = win;
|
|
741
|
-
let currentIFrame = getFrameElement(currentWin);
|
|
742
|
-
while (currentIFrame && offsetParent && offsetWin !== currentWin) {
|
|
743
|
-
const iframeScale = getScale(currentIFrame);
|
|
744
|
-
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
745
|
-
const css = getComputedStyle$1(currentIFrame);
|
|
746
|
-
const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
|
|
747
|
-
const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
|
|
748
|
-
x *= iframeScale.x;
|
|
749
|
-
y *= iframeScale.y;
|
|
750
|
-
width *= iframeScale.x;
|
|
751
|
-
height *= iframeScale.y;
|
|
752
|
-
x += left;
|
|
753
|
-
y += top;
|
|
754
|
-
currentWin = getWindow(currentIFrame);
|
|
755
|
-
currentIFrame = getFrameElement(currentWin);
|
|
756
|
-
}
|
|
757
|
-
}
|
|
758
|
-
return rectToClientRect({
|
|
759
|
-
width,
|
|
760
|
-
height,
|
|
761
|
-
x,
|
|
762
|
-
y
|
|
763
|
-
});
|
|
764
|
-
}
|
|
765
|
-
function getWindowScrollBarX(element, rect) {
|
|
766
|
-
const leftScroll = getNodeScroll(element).scrollLeft;
|
|
767
|
-
if (!rect) return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
|
|
768
|
-
return rect.left + leftScroll;
|
|
769
|
-
}
|
|
770
|
-
function getHTMLOffset(documentElement, scroll) {
|
|
771
|
-
const htmlRect = documentElement.getBoundingClientRect();
|
|
772
|
-
return {
|
|
773
|
-
x: htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect),
|
|
774
|
-
y: htmlRect.top + scroll.scrollTop
|
|
775
|
-
};
|
|
776
|
-
}
|
|
777
|
-
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
778
|
-
let { elements, rect, offsetParent, strategy } = _ref;
|
|
779
|
-
const isFixed = strategy === "fixed";
|
|
780
|
-
const documentElement = getDocumentElement(offsetParent);
|
|
781
|
-
const topLayer = elements ? isTopLayer(elements.floating) : false;
|
|
782
|
-
if (offsetParent === documentElement || topLayer && isFixed) return rect;
|
|
783
|
-
let scroll = {
|
|
784
|
-
scrollLeft: 0,
|
|
785
|
-
scrollTop: 0
|
|
786
|
-
};
|
|
787
|
-
let scale = createCoords(1);
|
|
788
|
-
const offsets = createCoords(0);
|
|
789
|
-
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
790
|
-
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
791
|
-
if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) scroll = getNodeScroll(offsetParent);
|
|
792
|
-
if (isOffsetParentAnElement) {
|
|
793
|
-
const offsetRect = getBoundingClientRect(offsetParent);
|
|
794
|
-
scale = getScale(offsetParent);
|
|
795
|
-
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
796
|
-
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
797
|
-
}
|
|
798
|
-
}
|
|
799
|
-
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
800
|
-
return {
|
|
801
|
-
width: rect.width * scale.x,
|
|
802
|
-
height: rect.height * scale.y,
|
|
803
|
-
x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
|
|
804
|
-
y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
|
|
805
|
-
};
|
|
806
|
-
}
|
|
807
|
-
function getClientRects(element) {
|
|
808
|
-
return Array.from(element.getClientRects());
|
|
809
|
-
}
|
|
810
|
-
function getDocumentRect(element) {
|
|
811
|
-
const html = getDocumentElement(element);
|
|
812
|
-
const scroll = getNodeScroll(element);
|
|
813
|
-
const body = element.ownerDocument.body;
|
|
814
|
-
const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
|
|
815
|
-
const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
|
|
816
|
-
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
|
|
817
|
-
const y = -scroll.scrollTop;
|
|
818
|
-
if (getComputedStyle$1(body).direction === "rtl") x += max(html.clientWidth, body.clientWidth) - width;
|
|
819
|
-
return {
|
|
820
|
-
width,
|
|
821
|
-
height,
|
|
822
|
-
x,
|
|
823
|
-
y
|
|
824
|
-
};
|
|
825
|
-
}
|
|
826
|
-
var SCROLLBAR_MAX = 25;
|
|
827
|
-
function getViewportRect(element, strategy) {
|
|
828
|
-
const win = getWindow(element);
|
|
829
|
-
const html = getDocumentElement(element);
|
|
830
|
-
const visualViewport = win.visualViewport;
|
|
831
|
-
let width = html.clientWidth;
|
|
832
|
-
let height = html.clientHeight;
|
|
833
|
-
let x = 0;
|
|
834
|
-
let y = 0;
|
|
835
|
-
if (visualViewport) {
|
|
836
|
-
width = visualViewport.width;
|
|
837
|
-
height = visualViewport.height;
|
|
838
|
-
const visualViewportBased = isWebKit();
|
|
839
|
-
if (!visualViewportBased || visualViewportBased && strategy === "fixed") {
|
|
840
|
-
x = visualViewport.offsetLeft;
|
|
841
|
-
y = visualViewport.offsetTop;
|
|
842
|
-
}
|
|
843
|
-
}
|
|
844
|
-
const windowScrollbarX = getWindowScrollBarX(html);
|
|
845
|
-
if (windowScrollbarX <= 0) {
|
|
846
|
-
const doc = html.ownerDocument;
|
|
847
|
-
const body = doc.body;
|
|
848
|
-
const bodyStyles = getComputedStyle(body);
|
|
849
|
-
const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
|
|
850
|
-
const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
|
|
851
|
-
if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) width -= clippingStableScrollbarWidth;
|
|
852
|
-
} else if (windowScrollbarX <= SCROLLBAR_MAX) width += windowScrollbarX;
|
|
853
|
-
return {
|
|
854
|
-
width,
|
|
855
|
-
height,
|
|
856
|
-
x,
|
|
857
|
-
y
|
|
858
|
-
};
|
|
859
|
-
}
|
|
860
|
-
function getInnerBoundingClientRect(element, strategy) {
|
|
861
|
-
const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
|
|
862
|
-
const top = clientRect.top + element.clientTop;
|
|
863
|
-
const left = clientRect.left + element.clientLeft;
|
|
864
|
-
const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
|
|
865
|
-
return {
|
|
866
|
-
width: element.clientWidth * scale.x,
|
|
867
|
-
height: element.clientHeight * scale.y,
|
|
868
|
-
x: left * scale.x,
|
|
869
|
-
y: top * scale.y
|
|
870
|
-
};
|
|
871
|
-
}
|
|
872
|
-
function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
|
|
873
|
-
let rect;
|
|
874
|
-
if (clippingAncestor === "viewport") rect = getViewportRect(element, strategy);
|
|
875
|
-
else if (clippingAncestor === "document") rect = getDocumentRect(getDocumentElement(element));
|
|
876
|
-
else if (isElement(clippingAncestor)) rect = getInnerBoundingClientRect(clippingAncestor, strategy);
|
|
877
|
-
else {
|
|
878
|
-
const visualOffsets = getVisualOffsets(element);
|
|
879
|
-
rect = {
|
|
880
|
-
x: clippingAncestor.x - visualOffsets.x,
|
|
881
|
-
y: clippingAncestor.y - visualOffsets.y,
|
|
882
|
-
width: clippingAncestor.width,
|
|
883
|
-
height: clippingAncestor.height
|
|
884
|
-
};
|
|
885
|
-
}
|
|
886
|
-
return rectToClientRect(rect);
|
|
887
|
-
}
|
|
888
|
-
function hasFixedPositionAncestor(element, stopNode) {
|
|
889
|
-
const parentNode = getParentNode(element);
|
|
890
|
-
if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) return false;
|
|
891
|
-
return getComputedStyle$1(parentNode).position === "fixed" || hasFixedPositionAncestor(parentNode, stopNode);
|
|
892
|
-
}
|
|
893
|
-
function getClippingElementAncestors(element, cache) {
|
|
894
|
-
const cachedResult = cache.get(element);
|
|
895
|
-
if (cachedResult) return cachedResult;
|
|
896
|
-
let result = getOverflowAncestors(element, [], false).filter((el) => isElement(el) && getNodeName(el) !== "body");
|
|
897
|
-
let currentContainingBlockComputedStyle = null;
|
|
898
|
-
const elementIsFixed = getComputedStyle$1(element).position === "fixed";
|
|
899
|
-
let currentNode = elementIsFixed ? getParentNode(element) : element;
|
|
900
|
-
while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
901
|
-
const computedStyle = getComputedStyle$1(currentNode);
|
|
902
|
-
const currentNodeIsContaining = isContainingBlock(currentNode);
|
|
903
|
-
if (!currentNodeIsContaining && computedStyle.position === "fixed") currentContainingBlockComputedStyle = null;
|
|
904
|
-
if (elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === "absolute" || currentContainingBlockComputedStyle.position === "fixed") || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode)) result = result.filter((ancestor) => ancestor !== currentNode);
|
|
905
|
-
else currentContainingBlockComputedStyle = computedStyle;
|
|
906
|
-
currentNode = getParentNode(currentNode);
|
|
907
|
-
}
|
|
908
|
-
cache.set(element, result);
|
|
909
|
-
return result;
|
|
910
|
-
}
|
|
911
|
-
function getClippingRect(_ref) {
|
|
912
|
-
let { element, boundary, rootBoundary, strategy } = _ref;
|
|
913
|
-
const clippingAncestors = [...boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary), rootBoundary];
|
|
914
|
-
const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
|
|
915
|
-
let top = firstRect.top;
|
|
916
|
-
let right = firstRect.right;
|
|
917
|
-
let bottom = firstRect.bottom;
|
|
918
|
-
let left = firstRect.left;
|
|
919
|
-
for (let i = 1; i < clippingAncestors.length; i++) {
|
|
920
|
-
const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
|
|
921
|
-
top = max(rect.top, top);
|
|
922
|
-
right = min(rect.right, right);
|
|
923
|
-
bottom = min(rect.bottom, bottom);
|
|
924
|
-
left = max(rect.left, left);
|
|
925
|
-
}
|
|
926
|
-
return {
|
|
927
|
-
width: right - left,
|
|
928
|
-
height: bottom - top,
|
|
929
|
-
x: left,
|
|
930
|
-
y: top
|
|
931
|
-
};
|
|
932
|
-
}
|
|
933
|
-
function getDimensions(element) {
|
|
934
|
-
const { width, height } = getCssDimensions(element);
|
|
935
|
-
return {
|
|
936
|
-
width,
|
|
937
|
-
height
|
|
938
|
-
};
|
|
939
|
-
}
|
|
940
|
-
function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
941
|
-
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
942
|
-
const documentElement = getDocumentElement(offsetParent);
|
|
943
|
-
const isFixed = strategy === "fixed";
|
|
944
|
-
const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
|
|
945
|
-
let scroll = {
|
|
946
|
-
scrollLeft: 0,
|
|
947
|
-
scrollTop: 0
|
|
948
|
-
};
|
|
949
|
-
const offsets = createCoords(0);
|
|
950
|
-
function setLeftRTLScrollbarOffset() {
|
|
951
|
-
offsets.x = getWindowScrollBarX(documentElement);
|
|
952
|
-
}
|
|
953
|
-
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
954
|
-
if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) scroll = getNodeScroll(offsetParent);
|
|
955
|
-
if (isOffsetParentAnElement) {
|
|
956
|
-
const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
|
|
957
|
-
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
958
|
-
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
959
|
-
} else if (documentElement) setLeftRTLScrollbarOffset();
|
|
960
|
-
}
|
|
961
|
-
if (isFixed && !isOffsetParentAnElement && documentElement) setLeftRTLScrollbarOffset();
|
|
962
|
-
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
963
|
-
return {
|
|
964
|
-
x: rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x,
|
|
965
|
-
y: rect.top + scroll.scrollTop - offsets.y - htmlOffset.y,
|
|
966
|
-
width: rect.width,
|
|
967
|
-
height: rect.height
|
|
968
|
-
};
|
|
969
|
-
}
|
|
970
|
-
function isStaticPositioned(element) {
|
|
971
|
-
return getComputedStyle$1(element).position === "static";
|
|
972
|
-
}
|
|
973
|
-
function getTrueOffsetParent(element, polyfill) {
|
|
974
|
-
if (!isHTMLElement(element) || getComputedStyle$1(element).position === "fixed") return null;
|
|
975
|
-
if (polyfill) return polyfill(element);
|
|
976
|
-
let rawOffsetParent = element.offsetParent;
|
|
977
|
-
if (getDocumentElement(element) === rawOffsetParent) rawOffsetParent = rawOffsetParent.ownerDocument.body;
|
|
978
|
-
return rawOffsetParent;
|
|
979
|
-
}
|
|
980
|
-
function getOffsetParent(element, polyfill) {
|
|
981
|
-
const win = getWindow(element);
|
|
982
|
-
if (isTopLayer(element)) return win;
|
|
983
|
-
if (!isHTMLElement(element)) {
|
|
984
|
-
let svgOffsetParent = getParentNode(element);
|
|
985
|
-
while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
|
|
986
|
-
if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) return svgOffsetParent;
|
|
987
|
-
svgOffsetParent = getParentNode(svgOffsetParent);
|
|
988
|
-
}
|
|
989
|
-
return win;
|
|
990
|
-
}
|
|
991
|
-
let offsetParent = getTrueOffsetParent(element, polyfill);
|
|
992
|
-
while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) offsetParent = getTrueOffsetParent(offsetParent, polyfill);
|
|
993
|
-
if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) return win;
|
|
994
|
-
return offsetParent || getContainingBlock(element) || win;
|
|
995
|
-
}
|
|
996
|
-
var getElementRects = async function(data) {
|
|
997
|
-
const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
|
|
998
|
-
const getDimensionsFn = this.getDimensions;
|
|
999
|
-
const floatingDimensions = await getDimensionsFn(data.floating);
|
|
1000
|
-
return {
|
|
1001
|
-
reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
|
|
1002
|
-
floating: {
|
|
1003
|
-
x: 0,
|
|
1004
|
-
y: 0,
|
|
1005
|
-
width: floatingDimensions.width,
|
|
1006
|
-
height: floatingDimensions.height
|
|
1007
|
-
}
|
|
1008
|
-
};
|
|
1009
|
-
};
|
|
1010
|
-
function isRTL(element) {
|
|
1011
|
-
return getComputedStyle$1(element).direction === "rtl";
|
|
1012
|
-
}
|
|
1013
|
-
var platform = {
|
|
1014
|
-
convertOffsetParentRelativeRectToViewportRelativeRect,
|
|
1015
|
-
getDocumentElement,
|
|
1016
|
-
getClippingRect,
|
|
1017
|
-
getOffsetParent,
|
|
1018
|
-
getElementRects,
|
|
1019
|
-
getClientRects,
|
|
1020
|
-
getDimensions,
|
|
1021
|
-
getScale,
|
|
1022
|
-
isElement,
|
|
1023
|
-
isRTL
|
|
1024
|
-
};
|
|
1025
|
-
/**
|
|
1026
|
-
* Modifies the placement by translating the floating element along the
|
|
1027
|
-
* specified axes.
|
|
1028
|
-
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
|
1029
|
-
* object may be passed.
|
|
1030
|
-
* @see https://floating-ui.com/docs/offset
|
|
1031
|
-
*/
|
|
1032
|
-
var offset = offset$1;
|
|
1033
|
-
/**
|
|
1034
|
-
* Optimizes the visibility of the floating element by shifting it in order to
|
|
1035
|
-
* keep it in view when it will overflow the clipping boundary.
|
|
1036
|
-
* @see https://floating-ui.com/docs/shift
|
|
1037
|
-
*/
|
|
1038
|
-
var shift = shift$1;
|
|
1039
|
-
/**
|
|
1040
|
-
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
1041
|
-
* in order to keep it in view when the preferred placement(s) will overflow the
|
|
1042
|
-
* clipping boundary. Alternative to `autoPlacement`.
|
|
1043
|
-
* @see https://floating-ui.com/docs/flip
|
|
1044
|
-
*/
|
|
1045
|
-
var flip = flip$1;
|
|
1046
|
-
/**
|
|
1047
|
-
* Computes the `x` and `y` coordinates that will place the floating element
|
|
1048
|
-
* next to a given reference element.
|
|
1049
|
-
*/
|
|
1050
|
-
var computePosition = (reference, floating, options) => {
|
|
1051
|
-
const cache = /* @__PURE__ */ new Map();
|
|
1052
|
-
const mergedOptions = {
|
|
1053
|
-
platform,
|
|
1054
|
-
...options
|
|
1055
|
-
};
|
|
1056
|
-
const platformWithCache = {
|
|
1057
|
-
...mergedOptions.platform,
|
|
1058
|
-
_c: cache
|
|
1059
|
-
};
|
|
1060
|
-
return computePosition$1(reference, floating, {
|
|
1061
|
-
...mergedOptions,
|
|
1062
|
-
platform: platformWithCache
|
|
1063
|
-
});
|
|
1064
|
-
};
|
|
1065
|
-
//#endregion
|
|
1066
82
|
//#region src/components/Tooltip.vue?vue&type=script&setup=true&lang.ts
|
|
1067
83
|
var _hoisted_1$21 = ["aria-describedby"];
|
|
1068
84
|
var _hoisted_2$20 = { class: "mint-tooltip__body" };
|
|
1069
|
-
var _hoisted_3$
|
|
85
|
+
var _hoisted_3$19 = {
|
|
1070
86
|
key: 0,
|
|
1071
87
|
class: "mint-tooltip__shortcut"
|
|
1072
88
|
};
|
|
@@ -1161,7 +177,7 @@ var Tooltip_default = /* @__PURE__ */ defineComponent({
|
|
|
1161
177
|
maxWidth: resolvedMaxWidth(__props.maxWidth)
|
|
1162
178
|
}),
|
|
1163
179
|
role: "tooltip"
|
|
1164
|
-
}, [createElementVNode("span", _hoisted_2$20, toDisplayString(__props.text), 1), __props.shortcut ? (openBlock(), createElementBlock("kbd", _hoisted_3$
|
|
180
|
+
}, [createElementVNode("span", _hoisted_2$20, toDisplayString(__props.text), 1), __props.shortcut ? (openBlock(), createElementBlock("kbd", _hoisted_3$19, toDisplayString(__props.shortcut), 1)) : createCommentVNode("", true)], 6)) : createCommentVNode("", true)]))], 40, _hoisted_1$21);
|
|
1165
181
|
};
|
|
1166
182
|
}
|
|
1167
183
|
});
|
|
@@ -1178,7 +194,7 @@ var _hoisted_1$20 = {
|
|
|
1178
194
|
"stroke-linejoin": "round"
|
|
1179
195
|
};
|
|
1180
196
|
var _hoisted_2$19 = ["d"];
|
|
1181
|
-
var _hoisted_3$
|
|
197
|
+
var _hoisted_3$18 = ["d"];
|
|
1182
198
|
var _hoisted_4$15 = {
|
|
1183
199
|
key: 1,
|
|
1184
200
|
class: "mint-checkbox__row-text-icon"
|
|
@@ -1250,7 +266,7 @@ var BaseCheckbox_default = /* @__PURE__ */ defineComponent({
|
|
|
1250
266
|
}), 128)) : (openBlock(), createElementBlock("path", {
|
|
1251
267
|
key: 1,
|
|
1252
268
|
d: props.icon
|
|
1253
|
-
}, null, 8, _hoisted_3$
|
|
269
|
+
}, null, 8, _hoisted_3$18))])) : (openBlock(), createElementBlock("span", _hoisted_4$15, toDisplayString(props.icon), 1))], 4)) : createCommentVNode("", true),
|
|
1254
270
|
props.variant === "row" && props.label ? (openBlock(), createElementBlock("span", _hoisted_5$13, [props.description ? (openBlock(), createBlock(Tooltip_default, {
|
|
1255
271
|
key: 0,
|
|
1256
272
|
text: props.description,
|
|
@@ -1312,7 +328,7 @@ var _hoisted_1$19 = {
|
|
|
1312
328
|
"stroke-linejoin": "round"
|
|
1313
329
|
};
|
|
1314
330
|
var _hoisted_2$18 = ["d"];
|
|
1315
|
-
var _hoisted_3$
|
|
331
|
+
var _hoisted_3$17 = ["d"];
|
|
1316
332
|
var _hoisted_4$14 = {
|
|
1317
333
|
key: 1,
|
|
1318
334
|
class: "mint-toggle__row-text-icon"
|
|
@@ -1397,7 +413,7 @@ var BaseToggle_default = /* @__PURE__ */ defineComponent({
|
|
|
1397
413
|
}), 128)) : (openBlock(), createElementBlock("path", {
|
|
1398
414
|
key: 1,
|
|
1399
415
|
d: __props.icon
|
|
1400
|
-
}, null, 8, _hoisted_3$
|
|
416
|
+
}, null, 8, _hoisted_3$17))])) : (openBlock(), createElementBlock("span", _hoisted_4$14, toDisplayString(__props.icon), 1))], 4)) : createCommentVNode("", true),
|
|
1401
417
|
__props.variant === "row" && __props.label ? (openBlock(), createElementBlock("span", _hoisted_5$12, [__props.description ? (openBlock(), createBlock(Tooltip_default, {
|
|
1402
418
|
key: 0,
|
|
1403
419
|
text: __props.description,
|
|
@@ -1449,7 +465,7 @@ var _hoisted_1$18 = [
|
|
|
1449
465
|
"onChange"
|
|
1450
466
|
];
|
|
1451
467
|
var _hoisted_2$17 = { class: "mint-radio-option__content" };
|
|
1452
|
-
var _hoisted_3$
|
|
468
|
+
var _hoisted_3$16 = ["id"];
|
|
1453
469
|
var _hoisted_4$13 = [
|
|
1454
470
|
"name",
|
|
1455
471
|
"value",
|
|
@@ -1522,7 +538,7 @@ var BaseRadioGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
1522
538
|
key: 0,
|
|
1523
539
|
id: `${props.name}-${option.value}-desc`,
|
|
1524
540
|
class: normalizeClass(["mint-radio-option__description", `mint-radio-option__description--${props.size}`])
|
|
1525
|
-
}, toDisplayString(option.description), 11, _hoisted_3$
|
|
541
|
+
}, toDisplayString(option.description), 11, _hoisted_3$16)) : createCommentVNode("", true)])], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
1526
542
|
createElementVNode("input", {
|
|
1527
543
|
type: "radio",
|
|
1528
544
|
name: props.name,
|
|
@@ -1565,7 +581,7 @@ var _hoisted_2$16 = [
|
|
|
1565
581
|
"aria-valuemax",
|
|
1566
582
|
"aria-valuenow"
|
|
1567
583
|
];
|
|
1568
|
-
var _hoisted_3$
|
|
584
|
+
var _hoisted_3$15 = {
|
|
1569
585
|
key: 0,
|
|
1570
586
|
class: "mint-slider__value"
|
|
1571
587
|
};
|
|
@@ -1665,7 +681,7 @@ var BaseSlider_default = /* @__PURE__ */ defineComponent({
|
|
|
1665
681
|
left: thumbPosition.value
|
|
1666
682
|
})
|
|
1667
683
|
}, null, 6)
|
|
1668
|
-
]), __props.showValue ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
684
|
+
]), __props.showValue ? (openBlock(), createElementBlock("span", _hoisted_3$15, toDisplayString(currentValue.value), 1)) : createCommentVNode("", true)], 2);
|
|
1669
685
|
};
|
|
1670
686
|
}
|
|
1671
687
|
});
|
|
@@ -1799,7 +815,7 @@ var _hoisted_2$15 = {
|
|
|
1799
815
|
class: "mint-multi-select__options",
|
|
1800
816
|
role: "group"
|
|
1801
817
|
};
|
|
1802
|
-
var _hoisted_3$
|
|
818
|
+
var _hoisted_3$14 = [
|
|
1803
819
|
"aria-checked",
|
|
1804
820
|
"disabled",
|
|
1805
821
|
"onClick",
|
|
@@ -1888,7 +904,7 @@ var MultiSelect_default = /* @__PURE__ */ defineComponent({
|
|
|
1888
904
|
]),
|
|
1889
905
|
onClick: ($event) => toggleOption(option),
|
|
1890
906
|
onKeydown: ($event) => handleKeydown($event, option)
|
|
1891
|
-
}, [createElementVNode("span", _hoisted_4$12, toDisplayString(option.label), 1), isSelected(option.value) ? (openBlock(), createElementBlock("svg", _hoisted_5$10, [..._cache[0] || (_cache[0] = [createElementVNode("path", { d: "M20 6 9 17l-5-5" }, null, -1)])])) : createCommentVNode("", true)], 42, _hoisted_3$
|
|
907
|
+
}, [createElementVNode("span", _hoisted_4$12, toDisplayString(option.label), 1), isSelected(option.value) ? (openBlock(), createElementBlock("svg", _hoisted_5$10, [..._cache[0] || (_cache[0] = [createElementVNode("path", { d: "M20 6 9 17l-5-5" }, null, -1)])])) : createCommentVNode("", true)], 42, _hoisted_3$14);
|
|
1892
908
|
}), 128))]),
|
|
1893
909
|
__props.modelValue.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_6$10, toDisplayString(selectedLabels.value.join(", ")), 1)) : createCommentVNode("", true)
|
|
1894
910
|
], 2);
|
|
@@ -2003,12 +1019,12 @@ function startOfDay(date) {
|
|
|
2003
1019
|
//#region src/components/internal/CalendarGridPanelInternal.vue?vue&type=script&setup=true&lang.ts
|
|
2004
1020
|
var _hoisted_1$15 = { class: "mint-calendar-grid-panel" };
|
|
2005
1021
|
var _hoisted_2$14 = { class: "mint-date-picker__header" };
|
|
2006
|
-
var _hoisted_3$
|
|
1022
|
+
var _hoisted_3$13 = ["aria-label"];
|
|
2007
1023
|
var _hoisted_4$11 = { class: "mint-date-picker__month-year" };
|
|
2008
1024
|
var _hoisted_5$9 = ["aria-label"];
|
|
2009
1025
|
var _hoisted_6$9 = { class: "mint-date-picker__weekdays" };
|
|
2010
1026
|
var _hoisted_7$9 = { class: "mint-date-picker__grid" };
|
|
2011
|
-
var _hoisted_8$
|
|
1027
|
+
var _hoisted_8$6 = [
|
|
2012
1028
|
"disabled",
|
|
2013
1029
|
"aria-label",
|
|
2014
1030
|
"aria-selected",
|
|
@@ -2067,7 +1083,7 @@ var CalendarGridPanelInternal_default = /* @__PURE__ */ defineComponent({
|
|
|
2067
1083
|
"stroke-linecap": "round",
|
|
2068
1084
|
"stroke-linejoin": "round",
|
|
2069
1085
|
"aria-hidden": "true"
|
|
2070
|
-
}, [createElementVNode("path", { d: "m15 18-6-6 6-6" })], -1)])], 8, _hoisted_3$
|
|
1086
|
+
}, [createElementVNode("path", { d: "m15 18-6-6 6-6" })], -1)])], 8, _hoisted_3$13),
|
|
2071
1087
|
createElementVNode("span", _hoisted_4$11, toDisplayString(__props.monthYear), 1),
|
|
2072
1088
|
createElementVNode("button", {
|
|
2073
1089
|
type: "button",
|
|
@@ -2105,7 +1121,7 @@ var CalendarGridPanelInternal_default = /* @__PURE__ */ defineComponent({
|
|
|
2105
1121
|
isToday(day.date) && !isSameDay(day.date, __props.selectedDate) ? "mint-date-picker__day--today" : ""
|
|
2106
1122
|
]),
|
|
2107
1123
|
onClick: ($event) => emit("select", day)
|
|
2108
|
-
}, toDisplayString(day.date.getDate()), 11, _hoisted_8$
|
|
1124
|
+
}, toDisplayString(day.date.getDate()), 11, _hoisted_8$6);
|
|
2109
1125
|
}), 128))])
|
|
2110
1126
|
]);
|
|
2111
1127
|
};
|
|
@@ -2113,12 +1129,14 @@ var CalendarGridPanelInternal_default = /* @__PURE__ */ defineComponent({
|
|
|
2113
1129
|
});
|
|
2114
1130
|
//#endregion
|
|
2115
1131
|
//#region src/components/DatePicker.vue?vue&type=script&setup=true&lang.ts
|
|
2116
|
-
var _hoisted_1$14 =
|
|
1132
|
+
var _hoisted_1$14 = { class: "mint-date-picker__input-wrapper" };
|
|
1133
|
+
var _hoisted_2$13 = [
|
|
1134
|
+
"aria-expanded",
|
|
2117
1135
|
"value",
|
|
2118
1136
|
"placeholder",
|
|
2119
1137
|
"disabled"
|
|
2120
1138
|
];
|
|
2121
|
-
var
|
|
1139
|
+
var _hoisted_3$12 = { class: "mint-date-picker__footer" };
|
|
2122
1140
|
//#endregion
|
|
2123
1141
|
//#region src/components/DatePicker.vue
|
|
2124
1142
|
var DatePicker_default = /* @__PURE__ */ defineComponent({
|
|
@@ -2147,10 +1165,13 @@ var DatePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
2147
1165
|
/** Input that opens a calendar dropdown for selecting a single date, with clearable support. */
|
|
2148
1166
|
const props = __props;
|
|
2149
1167
|
const emit = __emit;
|
|
2150
|
-
const inputRef = ref(null);
|
|
2151
1168
|
const dropdownRef = ref(null);
|
|
2152
1169
|
const dropdownStyle = ref({});
|
|
2153
|
-
const { isOpen, rootRef: containerRef, close, toggle } = useDropdownState({ insideRefs: [dropdownRef] });
|
|
1170
|
+
const { isOpen, rootRef: containerRef, triggerRef, open, close, toggle } = useDropdownState({ insideRefs: [dropdownRef] });
|
|
1171
|
+
useFocusTrap({
|
|
1172
|
+
containerRef: dropdownRef,
|
|
1173
|
+
active: isOpen
|
|
1174
|
+
});
|
|
2154
1175
|
const { weekDays, monthYear, calendarDays, isDateDisabled, formatDateValue, setCurrentMonthFromDate, prevMonth, nextMonth } = useCalendarGrid({
|
|
2155
1176
|
min: () => props.min,
|
|
2156
1177
|
max: () => props.max
|
|
@@ -2189,40 +1210,76 @@ var DatePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
2189
1210
|
if (props.disabled) return;
|
|
2190
1211
|
toggle();
|
|
2191
1212
|
}
|
|
2192
|
-
function
|
|
2193
|
-
if (
|
|
2194
|
-
|
|
1213
|
+
function handleTriggerKeydown(event) {
|
|
1214
|
+
if (props.disabled || isOpen.value) return;
|
|
1215
|
+
if (event.key === "Enter" || event.key === " " || event.key === "ArrowDown") {
|
|
1216
|
+
event.preventDefault();
|
|
1217
|
+
open();
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
let stopAutoUpdate = null;
|
|
1221
|
+
async function updateDropdownPosition() {
|
|
1222
|
+
const trigger = triggerRef.value;
|
|
1223
|
+
const panel = dropdownRef.value;
|
|
1224
|
+
if (!trigger || !panel) return;
|
|
1225
|
+
const { x, y } = await computePosition(trigger, panel, {
|
|
1226
|
+
placement: "bottom-start",
|
|
1227
|
+
strategy: "fixed",
|
|
1228
|
+
middleware: [
|
|
1229
|
+
offset(4),
|
|
1230
|
+
flip(),
|
|
1231
|
+
shift({ padding: 8 })
|
|
1232
|
+
]
|
|
1233
|
+
});
|
|
2195
1234
|
dropdownStyle.value = {
|
|
2196
1235
|
position: "fixed",
|
|
2197
|
-
top: `${
|
|
2198
|
-
left: `${
|
|
2199
|
-
width: `${Math.max(
|
|
1236
|
+
top: `${y}px`,
|
|
1237
|
+
left: `${x}px`,
|
|
1238
|
+
width: `${Math.max(trigger.getBoundingClientRect().width, 288)}px`,
|
|
2200
1239
|
zIndex: "9999"
|
|
2201
1240
|
};
|
|
2202
1241
|
}
|
|
2203
|
-
function
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
1242
|
+
function stopPositioning() {
|
|
1243
|
+
stopAutoUpdate?.();
|
|
1244
|
+
stopAutoUpdate = null;
|
|
1245
|
+
}
|
|
1246
|
+
function startPositioning() {
|
|
1247
|
+
const trigger = triggerRef.value;
|
|
1248
|
+
const panel = dropdownRef.value;
|
|
1249
|
+
if (!trigger || !panel) return;
|
|
1250
|
+
stopPositioning();
|
|
1251
|
+
stopAutoUpdate = autoUpdate(trigger, panel, () => void updateDropdownPosition());
|
|
1252
|
+
}
|
|
1253
|
+
/** Moves focus into the calendar grid: selected day, else today, else the first day. */
|
|
1254
|
+
function focusCalendar() {
|
|
1255
|
+
const panel = dropdownRef.value;
|
|
1256
|
+
if (!panel) return;
|
|
1257
|
+
(panel.querySelector(".mint-date-picker__day--selected") ?? panel.querySelector(".mint-date-picker__day--today") ?? panel.querySelector(".mint-date-picker__day:not([disabled])"))?.focus();
|
|
1258
|
+
}
|
|
1259
|
+
watch(isOpen, async (opened) => {
|
|
1260
|
+
if (!opened) {
|
|
1261
|
+
stopPositioning();
|
|
1262
|
+
return;
|
|
2210
1263
|
}
|
|
1264
|
+
if (selectedDate.value) setCurrentMonthFromDate(selectedDate.value);
|
|
1265
|
+
await nextTick();
|
|
1266
|
+
startPositioning();
|
|
1267
|
+
await nextTick();
|
|
1268
|
+
focusCalendar();
|
|
2211
1269
|
});
|
|
2212
|
-
|
|
2213
|
-
useEventListener(() => window, "resize", handleScrollOrResize);
|
|
1270
|
+
onBeforeUnmount(stopPositioning);
|
|
2214
1271
|
return (_ctx, _cache) => {
|
|
2215
1272
|
return openBlock(), createElementBlock("div", {
|
|
2216
1273
|
ref_key: "containerRef",
|
|
2217
1274
|
ref: containerRef,
|
|
2218
1275
|
class: "mint-date-picker"
|
|
2219
|
-
}, [createElementVNode("div", {
|
|
2220
|
-
ref_key: "
|
|
2221
|
-
ref:
|
|
2222
|
-
class: "mint-date-picker__input-wrapper"
|
|
2223
|
-
}, [createElementVNode("input", {
|
|
1276
|
+
}, [createElementVNode("div", _hoisted_1$14, [createElementVNode("input", {
|
|
1277
|
+
ref_key: "triggerRef",
|
|
1278
|
+
ref: triggerRef,
|
|
2224
1279
|
type: "text",
|
|
2225
1280
|
readonly: "",
|
|
1281
|
+
"aria-haspopup": "dialog",
|
|
1282
|
+
"aria-expanded": unref(isOpen),
|
|
2226
1283
|
value: displayValue.value,
|
|
2227
1284
|
placeholder: __props.placeholder || "Select date",
|
|
2228
1285
|
disabled: __props.disabled,
|
|
@@ -2232,8 +1289,9 @@ var DatePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
2232
1289
|
__props.error ? "mint-date-picker__input--error" : "",
|
|
2233
1290
|
__props.disabled ? "mint-date-picker__input--disabled" : ""
|
|
2234
1291
|
]),
|
|
2235
|
-
onClick: toggleCalendar
|
|
2236
|
-
|
|
1292
|
+
onClick: toggleCalendar,
|
|
1293
|
+
onKeydown: handleTriggerKeydown
|
|
1294
|
+
}, null, 42, _hoisted_2$13), _cache[0] || (_cache[0] = createStaticVNode("<div class=\"mint-date-picker__icon\"><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M8 2v4\"></path><path d=\"M16 2v4\"></path><rect width=\"18\" height=\"18\" x=\"3\" y=\"4\" rx=\"2\"></rect><path d=\"M3 10h18\"></path></svg></div>", 1))]), (openBlock(), createBlock(Teleport, { to: "body" }, [createVNode(Transition, {
|
|
2237
1295
|
"enter-active-class": "mint-date-picker__dropdown-enter-active",
|
|
2238
1296
|
"enter-from-class": "mint-date-picker__dropdown-enter-from",
|
|
2239
1297
|
"enter-to-class": "mint-date-picker__dropdown-enter-to",
|
|
@@ -2248,7 +1306,6 @@ var DatePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
2248
1306
|
class: "mint-date-picker__dropdown",
|
|
2249
1307
|
style: normalizeStyle(dropdownStyle.value),
|
|
2250
1308
|
role: "dialog",
|
|
2251
|
-
"aria-modal": "true",
|
|
2252
1309
|
"aria-label": "Date picker"
|
|
2253
1310
|
}, [createVNode(CalendarGridPanelInternal_default, {
|
|
2254
1311
|
"week-days": unref(weekDays),
|
|
@@ -2265,7 +1322,7 @@ var DatePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
2265
1322
|
"selected-date",
|
|
2266
1323
|
"onPreviousMonth",
|
|
2267
1324
|
"onNextMonth"
|
|
2268
|
-
]), createElementVNode("div",
|
|
1325
|
+
]), createElementVNode("div", _hoisted_3$12, [createElementVNode("button", {
|
|
2269
1326
|
type: "button",
|
|
2270
1327
|
class: "mint-date-picker__footer-btn mint-date-picker__today-btn",
|
|
2271
1328
|
onClick: goToToday
|
|
@@ -2416,13 +1473,16 @@ var _hoisted_2$12 = [
|
|
|
2416
1473
|
"value",
|
|
2417
1474
|
"placeholder",
|
|
2418
1475
|
"disabled",
|
|
2419
|
-
"aria-expanded"
|
|
1476
|
+
"aria-expanded",
|
|
1477
|
+
"aria-controls",
|
|
1478
|
+
"aria-activedescendant"
|
|
2420
1479
|
];
|
|
2421
1480
|
var _hoisted_3$11 = {
|
|
2422
1481
|
key: 0,
|
|
2423
1482
|
class: "mint-time-picker__dropdown"
|
|
2424
1483
|
};
|
|
2425
1484
|
var _hoisted_4$10 = [
|
|
1485
|
+
"id",
|
|
2426
1486
|
"aria-selected",
|
|
2427
1487
|
"aria-disabled",
|
|
2428
1488
|
"onClick"
|
|
@@ -2459,7 +1519,10 @@ var TimePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
2459
1519
|
const emit = __emit;
|
|
2460
1520
|
const listRef = ref(null);
|
|
2461
1521
|
const highlightedIndex = ref(-1);
|
|
2462
|
-
const
|
|
1522
|
+
const listboxId = `mint-time-picker-listbox-${useId().replace(/:/g, "")}`;
|
|
1523
|
+
const { isOpen, rootRef, triggerRef, open, close, toggle } = useDropdownState();
|
|
1524
|
+
/** Id of the highlighted slot, published to the input as `aria-activedescendant`. */
|
|
1525
|
+
const activeSlotId = computed(() => isOpen.value && highlightedIndex.value >= 0 ? `${listboxId}-option-${highlightedIndex.value}` : void 0);
|
|
2463
1526
|
const slots = computed(() => {
|
|
2464
1527
|
return generateTimeSlots(props.min ?? "00:00", props.max ?? "23:59", props.step);
|
|
2465
1528
|
});
|
|
@@ -2536,9 +1599,26 @@ var TimePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
2536
1599
|
event.preventDefault();
|
|
2537
1600
|
if (highlightedIndex.value >= 0 && highlightedIndex.value < slots.value.length) selectSlot(slots.value[highlightedIndex.value]);
|
|
2538
1601
|
break;
|
|
1602
|
+
case "Home": {
|
|
1603
|
+
event.preventDefault();
|
|
1604
|
+
const first = slots.value.findIndex((slot) => !isSlotDisabled(slot));
|
|
1605
|
+
if (first >= 0) {
|
|
1606
|
+
highlightedIndex.value = first;
|
|
1607
|
+
scrollToHighlighted();
|
|
1608
|
+
}
|
|
1609
|
+
break;
|
|
1610
|
+
}
|
|
1611
|
+
case "End":
|
|
1612
|
+
event.preventDefault();
|
|
1613
|
+
for (let index = slots.value.length - 1; index >= 0; index--) if (!isSlotDisabled(slots.value[index])) {
|
|
1614
|
+
highlightedIndex.value = index;
|
|
1615
|
+
scrollToHighlighted();
|
|
1616
|
+
break;
|
|
1617
|
+
}
|
|
1618
|
+
break;
|
|
2539
1619
|
case "Escape":
|
|
2540
1620
|
event.preventDefault();
|
|
2541
|
-
close();
|
|
1621
|
+
close(true);
|
|
2542
1622
|
break;
|
|
2543
1623
|
}
|
|
2544
1624
|
}
|
|
@@ -2566,6 +1646,8 @@ var TimePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
2566
1646
|
onKeydown: handleKeydown
|
|
2567
1647
|
}, [createElementVNode("div", _hoisted_1$13, [
|
|
2568
1648
|
createElementVNode("input", {
|
|
1649
|
+
ref_key: "triggerRef",
|
|
1650
|
+
ref: triggerRef,
|
|
2569
1651
|
type: "text",
|
|
2570
1652
|
readonly: "",
|
|
2571
1653
|
value: displayValue.value,
|
|
@@ -2580,6 +1662,8 @@ var TimePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
2580
1662
|
role: "combobox",
|
|
2581
1663
|
"aria-haspopup": "listbox",
|
|
2582
1664
|
"aria-expanded": unref(isOpen),
|
|
1665
|
+
"aria-controls": unref(isOpen) ? listboxId : void 0,
|
|
1666
|
+
"aria-activedescendant": activeSlotId.value,
|
|
2583
1667
|
onClick: toggleDropdown
|
|
2584
1668
|
}, null, 10, _hoisted_2$12),
|
|
2585
1669
|
__props.clearable && __props.modelValue ? (openBlock(), createElementBlock("button", {
|
|
@@ -2617,6 +1701,7 @@ var TimePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
2617
1701
|
"leave-to-class": "mint-time-picker__dropdown-leave-to"
|
|
2618
1702
|
}, {
|
|
2619
1703
|
default: withCtx(() => [unref(isOpen) ? (openBlock(), createElementBlock("div", _hoisted_3$11, [createElementVNode("ul", {
|
|
1704
|
+
id: listboxId,
|
|
2620
1705
|
ref_key: "listRef",
|
|
2621
1706
|
ref: listRef,
|
|
2622
1707
|
class: "mint-time-picker__list",
|
|
@@ -2624,6 +1709,7 @@ var TimePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
2624
1709
|
"aria-label": "Available times"
|
|
2625
1710
|
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(slots.value, (slot, index) => {
|
|
2626
1711
|
return openBlock(), createElementBlock("li", {
|
|
1712
|
+
id: `${listboxId}-option-${index}`,
|
|
2627
1713
|
key: slot,
|
|
2628
1714
|
role: "option",
|
|
2629
1715
|
"aria-selected": slot === __props.modelValue,
|
|
@@ -2691,9 +1777,8 @@ var TagsInput_default = /* @__PURE__ */ defineComponent({
|
|
|
2691
1777
|
const props = __props;
|
|
2692
1778
|
const emit = __emit;
|
|
2693
1779
|
const inputValue = ref("");
|
|
2694
|
-
const inputRef = ref();
|
|
2695
1780
|
const highlightedIndex = ref(-1);
|
|
2696
|
-
const { isOpen: dropdownOpen, rootRef, open: openDropdown, close: closeDropdown } = useDropdownState({ onClose: () => {
|
|
1781
|
+
const { isOpen: dropdownOpen, rootRef, triggerRef: inputRef, open: openDropdown, close: closeDropdown } = useDropdownState({ onClose: () => {
|
|
2697
1782
|
highlightedIndex.value = -1;
|
|
2698
1783
|
} });
|
|
2699
1784
|
const selectionLimit = useSelectionLimit({
|
|
@@ -2751,7 +1836,7 @@ var TagsInput_default = /* @__PURE__ */ defineComponent({
|
|
|
2751
1836
|
return;
|
|
2752
1837
|
}
|
|
2753
1838
|
if (event.key === "Escape") {
|
|
2754
|
-
closeDropdown();
|
|
1839
|
+
closeDropdown(true);
|
|
2755
1840
|
return;
|
|
2756
1841
|
}
|
|
2757
1842
|
if (event.key === "Backspace" && !inputValue.value && props.modelValue.length > 0) removeTag(props.modelValue.length - 1);
|
|
@@ -3264,7 +2349,7 @@ var _hoisted_6$6 = {
|
|
|
3264
2349
|
viewBox: "0 0 24 24"
|
|
3265
2350
|
};
|
|
3266
2351
|
var _hoisted_7$6 = { class: "mint-file-uploader__text" };
|
|
3267
|
-
var _hoisted_8$
|
|
2352
|
+
var _hoisted_8$5 = {
|
|
3268
2353
|
key: 0,
|
|
3269
2354
|
class: "mint-file-uploader__actions"
|
|
3270
2355
|
};
|
|
@@ -3297,7 +2382,11 @@ var FileUploader_default = /* @__PURE__ */ defineComponent({
|
|
|
3297
2382
|
default: false
|
|
3298
2383
|
},
|
|
3299
2384
|
size: { default: "md" },
|
|
3300
|
-
mode: { default: "file" }
|
|
2385
|
+
mode: { default: "file" },
|
|
2386
|
+
showFiles: {
|
|
2387
|
+
type: Boolean,
|
|
2388
|
+
default: true
|
|
2389
|
+
}
|
|
3301
2390
|
},
|
|
3302
2391
|
emits: [
|
|
3303
2392
|
"upload",
|
|
@@ -3313,8 +2402,9 @@ var FileUploader_default = /* @__PURE__ */ defineComponent({
|
|
|
3313
2402
|
const selectedFiles = ref([]);
|
|
3314
2403
|
const folderName = ref(null);
|
|
3315
2404
|
const isFolder = computed(() => props.mode === "folder");
|
|
2405
|
+
const isMixed = computed(() => props.mode === "file+folder");
|
|
3316
2406
|
const acceptLabel = computed(() => {
|
|
3317
|
-
if (!props.accept) return "any file";
|
|
2407
|
+
if (!props.accept) return isFolder.value ? "a folder" : "any file";
|
|
3318
2408
|
return props.accept.split(",").map((a) => a.trim().replace(".", "").toUpperCase()).join(", ");
|
|
3319
2409
|
});
|
|
3320
2410
|
const maxSizeLabel = computed(() => {
|
|
@@ -3475,28 +2565,36 @@ var FileUploader_default = /* @__PURE__ */ defineComponent({
|
|
|
3475
2565
|
if (firstPath) return firstPath.split("/")[0];
|
|
3476
2566
|
return null;
|
|
3477
2567
|
}
|
|
3478
|
-
function handleDrop(event) {
|
|
2568
|
+
async function handleDrop(event) {
|
|
3479
2569
|
event.preventDefault();
|
|
3480
2570
|
isDragOver.value = false;
|
|
3481
2571
|
if (props.disabled) return;
|
|
3482
|
-
|
|
3483
|
-
|
|
2572
|
+
try {
|
|
2573
|
+
if (props.mode !== "file" && event.dataTransfer?.items?.length) await handleFolderDrop(event.dataTransfer.items);
|
|
2574
|
+
else if (event.dataTransfer?.files) handleFiles(event.dataTransfer.files);
|
|
2575
|
+
} catch (cause) {
|
|
2576
|
+
emit("error", cause instanceof Error ? cause.message : "Could not read the dropped folder.");
|
|
2577
|
+
}
|
|
3484
2578
|
}
|
|
3485
2579
|
async function handleFolderDrop(items) {
|
|
3486
2580
|
const files = [];
|
|
3487
2581
|
const relativePaths = [];
|
|
3488
2582
|
let folderNameFromDrop;
|
|
3489
|
-
|
|
2583
|
+
const dropped = Array.from(items, (item) => {
|
|
3490
2584
|
const entry = item.webkitGetAsEntry?.();
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
}
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
2585
|
+
return {
|
|
2586
|
+
entry,
|
|
2587
|
+
file: entry ? null : item.getAsFile?.()
|
|
2588
|
+
};
|
|
2589
|
+
});
|
|
2590
|
+
for (const { entry, file: droppedFile } of dropped) if (entry?.isDirectory) {
|
|
2591
|
+
folderNameFromDrop = entry.name;
|
|
2592
|
+
await readDirectory(entry, files, relativePaths, entry.name);
|
|
2593
|
+
} else {
|
|
2594
|
+
const file = entry?.isFile ? await getFile(entry) : droppedFile;
|
|
2595
|
+
if (file) {
|
|
2596
|
+
files.push(file);
|
|
2597
|
+
relativePaths.push(file.name);
|
|
3500
2598
|
}
|
|
3501
2599
|
}
|
|
3502
2600
|
if (files.length > 0) handleFiles(files, folderNameFromDrop, relativePaths);
|
|
@@ -3559,7 +2657,7 @@ var FileUploader_default = /* @__PURE__ */ defineComponent({
|
|
|
3559
2657
|
createElementVNode("div", {
|
|
3560
2658
|
role: "button",
|
|
3561
2659
|
tabindex: "0",
|
|
3562
|
-
"aria-label": __props.disabled ? "File upload disabled" : "Click or drag files to upload",
|
|
2660
|
+
"aria-label": __props.disabled ? "File upload disabled" : isMixed.value ? "Drop files or a folder, or click to choose files" : isFolder.value ? "Click or drag a folder to upload" : "Click or drag files to upload",
|
|
3563
2661
|
"aria-disabled": __props.disabled,
|
|
3564
2662
|
class: normalizeClass([
|
|
3565
2663
|
"mint-file-uploader__dropzone",
|
|
@@ -3587,9 +2685,9 @@ var FileUploader_default = /* @__PURE__ */ defineComponent({
|
|
|
3587
2685
|
createElementVNode("path", { d: "M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3" }, null, -1),
|
|
3588
2686
|
createElementVNode("path", { d: "m16 16-4-4-4 4" }, null, -1),
|
|
3589
2687
|
createElementVNode("path", { d: "M12 12v9" }, null, -1)
|
|
3590
|
-
])])), createElementVNode("p", _hoisted_7$6, "
|
|
3591
|
-
_ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_8$
|
|
3592
|
-
isFolder.value && folderName.value && selectedFiles.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_9$3, [createElementVNode("div", _hoisted_10$3, [_cache[2] || (_cache[2] = createElementVNode("div", { class: "mint-file-uploader__folder-icon-wrapper" }, [createElementVNode("svg", {
|
|
2688
|
+
])])), createElementVNode("p", _hoisted_7$6, toDisplayString(isMixed.value ? "Drop files or a folder, or click to choose files" : `Drop ${acceptLabel.value} or click`), 1)])], 42, _hoisted_2$8),
|
|
2689
|
+
_ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_8$5, [renderSlot(_ctx.$slots, "actions")])) : createCommentVNode("", true),
|
|
2690
|
+
__props.showFiles && isFolder.value && folderName.value && selectedFiles.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_9$3, [createElementVNode("div", _hoisted_10$3, [_cache[2] || (_cache[2] = createElementVNode("div", { class: "mint-file-uploader__folder-icon-wrapper" }, [createElementVNode("svg", {
|
|
3593
2691
|
class: "mint-file-uploader__folder-icon",
|
|
3594
2692
|
fill: "none",
|
|
3595
2693
|
stroke: "currentColor",
|
|
@@ -3611,7 +2709,7 @@ var FileUploader_default = /* @__PURE__ */ defineComponent({
|
|
|
3611
2709
|
"stroke-linejoin": "round",
|
|
3612
2710
|
viewBox: "0 0 24 24"
|
|
3613
2711
|
}, [createElementVNode("path", { d: "M18 6 6 18" }), createElementVNode("path", { d: "m6 6 12 12" })], -1)])])])) : createCommentVNode("", true),
|
|
3614
|
-
!isFolder.value && selectedFiles.value.length > 0 ? (openBlock(), createBlock(TransitionGroup, {
|
|
2712
|
+
__props.showFiles && !isFolder.value && selectedFiles.value.length > 0 ? (openBlock(), createBlock(TransitionGroup, {
|
|
3615
2713
|
key: 2,
|
|
3616
2714
|
tag: "ul",
|
|
3617
2715
|
name: "mint-file-uploader-item",
|
|
@@ -3693,7 +2791,7 @@ var _hoisted_6$5 = {
|
|
|
3693
2791
|
class: "mint-alert__title"
|
|
3694
2792
|
};
|
|
3695
2793
|
var _hoisted_7$5 = { class: "mint-alert__message" };
|
|
3696
|
-
var _hoisted_8$
|
|
2794
|
+
var _hoisted_8$4 = {
|
|
3697
2795
|
key: 4,
|
|
3698
2796
|
class: "mint-alert__actions"
|
|
3699
2797
|
};
|
|
@@ -3748,7 +2846,7 @@ var AlertBox_default = /* @__PURE__ */ defineComponent({
|
|
|
3748
2846
|
createElementVNode("path", { d: "M12 8h.01" }, null, -1)
|
|
3749
2847
|
])])),
|
|
3750
2848
|
createElementVNode("div", _hoisted_5$5, [props.title ? (openBlock(), createElementBlock("h4", _hoisted_6$5, toDisplayString(props.title), 1)) : createCommentVNode("", true), createElementVNode("div", _hoisted_7$5, [renderSlot(_ctx.$slots, "default")])]),
|
|
3751
|
-
hasActions() ? (openBlock(), createElementBlock("div", _hoisted_8$
|
|
2849
|
+
hasActions() ? (openBlock(), createElementBlock("div", _hoisted_8$4, [renderSlot(_ctx.$slots, "actions", {}, () => [createElementVNode("button", {
|
|
3752
2850
|
type: "button",
|
|
3753
2851
|
class: normalizeClass(["mint-alert__action-btn", `mint-alert__action-btn--${props.type}`]),
|
|
3754
2852
|
onClick: _cache[0] || (_cache[0] = ($event) => emit("action"))
|
|
@@ -3793,22 +2891,16 @@ function isObjectLike(value) {
|
|
|
3793
2891
|
//#region src/components/DateTimePicker.vue?vue&type=script&setup=true&lang.ts
|
|
3794
2892
|
var _hoisted_1$7 = { class: "mint-datetime-picker__input-wrapper" };
|
|
3795
2893
|
var _hoisted_2$6 = [
|
|
2894
|
+
"aria-expanded",
|
|
3796
2895
|
"value",
|
|
3797
2896
|
"placeholder",
|
|
3798
2897
|
"disabled"
|
|
3799
2898
|
];
|
|
3800
|
-
var _hoisted_3$5 = {
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
"aria-label": "Date and time picker"
|
|
3806
|
-
};
|
|
3807
|
-
var _hoisted_4$5 = { class: "mint-datetime-picker__calendar-section" };
|
|
3808
|
-
var _hoisted_5$4 = { class: "mint-datetime-picker__time-section" };
|
|
3809
|
-
var _hoisted_6$4 = { class: "mint-datetime-picker__time-grid" };
|
|
3810
|
-
var _hoisted_7$4 = ["disabled", "onClick"];
|
|
3811
|
-
var _hoisted_8$4 = { class: "mint-datetime-picker__footer" };
|
|
2899
|
+
var _hoisted_3$5 = { class: "mint-datetime-picker__calendar-section" };
|
|
2900
|
+
var _hoisted_4$5 = { class: "mint-datetime-picker__time-section" };
|
|
2901
|
+
var _hoisted_5$4 = { class: "mint-datetime-picker__time-grid" };
|
|
2902
|
+
var _hoisted_6$4 = ["disabled", "onClick"];
|
|
2903
|
+
var _hoisted_7$4 = { class: "mint-datetime-picker__footer" };
|
|
3812
2904
|
//#endregion
|
|
3813
2905
|
//#region src/components/DateTimePicker.vue
|
|
3814
2906
|
var DateTimePicker_default = /* @__PURE__ */ defineComponent({
|
|
@@ -3840,7 +2932,12 @@ var DateTimePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
3840
2932
|
/** Combined date and time picker with a dropdown calendar, time slots, and 12/24 h format support. */
|
|
3841
2933
|
const props = __props;
|
|
3842
2934
|
const emit = __emit;
|
|
3843
|
-
const
|
|
2935
|
+
const dropdownRef = ref(null);
|
|
2936
|
+
const { isOpen, rootRef, triggerRef, open, close, toggle } = useDropdownState();
|
|
2937
|
+
useFocusTrap({
|
|
2938
|
+
containerRef: dropdownRef,
|
|
2939
|
+
active: isOpen
|
|
2940
|
+
});
|
|
3844
2941
|
const { weekDays, monthYear, calendarDays, formatDateValue, setCurrentMonthFromDate, prevMonth, nextMonth } = useCalendarGrid({
|
|
3845
2942
|
min: () => props.min,
|
|
3846
2943
|
max: () => props.max,
|
|
@@ -3914,15 +3011,30 @@ var DateTimePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
3914
3011
|
if (props.disabled) return;
|
|
3915
3012
|
toggle();
|
|
3916
3013
|
}
|
|
3917
|
-
|
|
3918
|
-
if (
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
const active = rootRef.value?.querySelector(".mint-datetime-picker__time-chip--active");
|
|
3923
|
-
if (grid && active) active.scrollIntoView({ block: "center" });
|
|
3924
|
-
});
|
|
3014
|
+
function handleTriggerKeydown(event) {
|
|
3015
|
+
if (props.disabled || isOpen.value) return;
|
|
3016
|
+
if (event.key === "Enter" || event.key === " " || event.key === "ArrowDown") {
|
|
3017
|
+
event.preventDefault();
|
|
3018
|
+
open();
|
|
3925
3019
|
}
|
|
3020
|
+
}
|
|
3021
|
+
/** Moves focus into the calendar grid: selected day, else today, else the first day. */
|
|
3022
|
+
function focusCalendar() {
|
|
3023
|
+
const panel = dropdownRef.value;
|
|
3024
|
+
if (!panel) return;
|
|
3025
|
+
(panel.querySelector(".mint-date-picker__day--selected") ?? panel.querySelector(".mint-date-picker__day--today") ?? panel.querySelector(".mint-date-picker__day:not([disabled])"))?.focus();
|
|
3026
|
+
}
|
|
3027
|
+
watch(isOpen, async (opened) => {
|
|
3028
|
+
if (!opened) return;
|
|
3029
|
+
if (selectedDate.value) setCurrentMonthFromDate(selectedDate.value);
|
|
3030
|
+
await nextTick();
|
|
3031
|
+
if (selectedDate.value) {
|
|
3032
|
+
const grid = dropdownRef.value?.querySelector(".mint-datetime-picker__time-grid");
|
|
3033
|
+
const active = dropdownRef.value?.querySelector(".mint-datetime-picker__time-chip--active");
|
|
3034
|
+
if (grid && active) active.scrollIntoView({ block: "center" });
|
|
3035
|
+
}
|
|
3036
|
+
await nextTick();
|
|
3037
|
+
focusCalendar();
|
|
3926
3038
|
});
|
|
3927
3039
|
return (_ctx, _cache) => {
|
|
3928
3040
|
return openBlock(), createElementBlock("div", {
|
|
@@ -3941,8 +3053,12 @@ var DateTimePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
3941
3053
|
d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
|
|
3942
3054
|
})])], -1)),
|
|
3943
3055
|
createElementVNode("input", {
|
|
3056
|
+
ref_key: "triggerRef",
|
|
3057
|
+
ref: triggerRef,
|
|
3944
3058
|
type: "text",
|
|
3945
3059
|
readonly: "",
|
|
3060
|
+
"aria-haspopup": "dialog",
|
|
3061
|
+
"aria-expanded": unref(isOpen),
|
|
3946
3062
|
value: displayValue.value,
|
|
3947
3063
|
placeholder: __props.placeholder,
|
|
3948
3064
|
disabled: __props.disabled,
|
|
@@ -3953,8 +3069,9 @@ var DateTimePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
3953
3069
|
__props.disabled ? "mint-datetime-picker__input--disabled" : ""
|
|
3954
3070
|
]),
|
|
3955
3071
|
"aria-label": "Select date and time",
|
|
3956
|
-
onClick: toggleDropdown
|
|
3957
|
-
|
|
3072
|
+
onClick: toggleDropdown,
|
|
3073
|
+
onKeydown: handleTriggerKeydown
|
|
3074
|
+
}, null, 42, _hoisted_2$6),
|
|
3958
3075
|
_cache[1] || (_cache[1] = createElementVNode("div", { class: "mint-datetime-picker__icon-clock" }, [createElementVNode("svg", {
|
|
3959
3076
|
fill: "none",
|
|
3960
3077
|
stroke: "currentColor",
|
|
@@ -3973,8 +3090,15 @@ var DateTimePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
3973
3090
|
"leave-from-class": "mint-datetime-picker__dropdown-leave-from",
|
|
3974
3091
|
"leave-to-class": "mint-datetime-picker__dropdown-leave-to"
|
|
3975
3092
|
}, {
|
|
3976
|
-
default: withCtx(() => [unref(isOpen) ? (openBlock(), createElementBlock("div",
|
|
3977
|
-
|
|
3093
|
+
default: withCtx(() => [unref(isOpen) ? (openBlock(), createElementBlock("div", {
|
|
3094
|
+
key: 0,
|
|
3095
|
+
ref_key: "dropdownRef",
|
|
3096
|
+
ref: dropdownRef,
|
|
3097
|
+
class: "mint-datetime-picker__dropdown",
|
|
3098
|
+
role: "dialog",
|
|
3099
|
+
"aria-label": "Date and time picker"
|
|
3100
|
+
}, [
|
|
3101
|
+
createElementVNode("div", _hoisted_3$5, [createVNode(CalendarGridPanelInternal_default, {
|
|
3978
3102
|
"week-days": unref(weekDays),
|
|
3979
3103
|
"month-year": unref(monthYear),
|
|
3980
3104
|
days: unref(calendarDays),
|
|
@@ -3993,7 +3117,7 @@ var DateTimePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
3993
3117
|
"onNextMonth"
|
|
3994
3118
|
])]),
|
|
3995
3119
|
_cache[3] || (_cache[3] = createElementVNode("div", { class: "mint-datetime-picker__divider" }, null, -1)),
|
|
3996
|
-
createElementVNode("div",
|
|
3120
|
+
createElementVNode("div", _hoisted_4$5, [_cache[2] || (_cache[2] = createElementVNode("div", { class: "mint-datetime-picker__time-label" }, "Time", -1)), createElementVNode("div", _hoisted_5$4, [(openBlock(true), createElementBlock(Fragment, null, renderList(timeSlots.value, (time) => {
|
|
3997
3121
|
return openBlock(), createElementBlock("button", {
|
|
3998
3122
|
key: time,
|
|
3999
3123
|
type: "button",
|
|
@@ -4004,9 +3128,9 @@ var DateTimePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
4004
3128
|
isTimeDisabled(time) ? "mint-datetime-picker__time-chip--disabled" : ""
|
|
4005
3129
|
]),
|
|
4006
3130
|
onClick: ($event) => selectTime(time)
|
|
4007
|
-
}, toDisplayString(unref(formatTimeSlot)(time, __props.timeFormat)), 11,
|
|
3131
|
+
}, toDisplayString(unref(formatTimeSlot)(time, __props.timeFormat)), 11, _hoisted_6$4);
|
|
4008
3132
|
}), 128))])]),
|
|
4009
|
-
createElementVNode("div",
|
|
3133
|
+
createElementVNode("div", _hoisted_7$4, [createElementVNode("div", null, [createElementVNode("button", {
|
|
4010
3134
|
type: "button",
|
|
4011
3135
|
class: "mint-datetime-picker__footer-btn",
|
|
4012
3136
|
onClick: goToToday
|
|
@@ -4020,7 +3144,7 @@ var DateTimePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
4020
3144
|
class: "mint-datetime-picker__footer-btn mint-datetime-picker__footer-btn--muted",
|
|
4021
3145
|
onClick: clear
|
|
4022
3146
|
}, " Clear ")) : createCommentVNode("", true)])
|
|
4023
|
-
])) : createCommentVNode("", true)]),
|
|
3147
|
+
], 512)) : createCommentVNode("", true)]),
|
|
4024
3148
|
_: 1
|
|
4025
3149
|
})], 512);
|
|
4026
3150
|
};
|
|
@@ -4075,7 +3199,9 @@ function useEventStream(url, options = {}) {
|
|
|
4075
3199
|
let controller = null;
|
|
4076
3200
|
let reader = null;
|
|
4077
3201
|
let reconnectTimer = null;
|
|
4078
|
-
|
|
3202
|
+
const settings = tryUseSettingsStore();
|
|
3203
|
+
const reconnectEnabled = options.reconnect ?? settings?.wsAutoReconnect ?? true;
|
|
3204
|
+
let reconnectDelayMs = options.reconnectDelayMs ?? settings?.wsReconnectInterval ?? 2e3;
|
|
4079
3205
|
let stopped = true;
|
|
4080
3206
|
let generation = 0;
|
|
4081
3207
|
function clearReconnectTimer() {
|
|
@@ -4088,7 +3214,7 @@ function useEventStream(url, options = {}) {
|
|
|
4088
3214
|
}
|
|
4089
3215
|
function scheduleReconnect(connectionGeneration, cause) {
|
|
4090
3216
|
if (stopped || generation !== connectionGeneration) return;
|
|
4091
|
-
if (
|
|
3217
|
+
if (!reconnectEnabled || options.shouldReconnect?.(cause) === false) {
|
|
4092
3218
|
stopped = true;
|
|
4093
3219
|
return;
|
|
4094
3220
|
}
|
|
@@ -4288,24 +3414,11 @@ function jobStatusLabel(status) {
|
|
|
4288
3414
|
}
|
|
4289
3415
|
//#endregion
|
|
4290
3416
|
//#region src/composables/useGeneratedAnalysis.ts
|
|
4291
|
-
var ACTIVE_STATUSES = new Set([
|
|
4292
|
-
"awaiting_input",
|
|
4293
|
-
"queued",
|
|
4294
|
-
"running"
|
|
4295
|
-
]);
|
|
4296
3417
|
var AUTH_TOKEN_KEY = "mint-auth-token";
|
|
4297
3418
|
var SESSION_NOT_FOUND_DETAIL = "Session not found";
|
|
4298
3419
|
var MAX_RESULT_CACHE_ENTRIES = 32;
|
|
4299
3420
|
var MAX_RESULT_RETRIES = 3;
|
|
4300
3421
|
var DOWNLOAD_URL_REFRESH_SKEW_MS = 3e4;
|
|
4301
|
-
var GeneratedAnalysisRequestError = class extends Error {
|
|
4302
|
-
constructor(status, detail) {
|
|
4303
|
-
super(typeof detail === "string" ? detail : `Request failed (${status})`);
|
|
4304
|
-
this.status = status;
|
|
4305
|
-
this.detail = detail;
|
|
4306
|
-
this.name = "GeneratedAnalysisRequestError";
|
|
4307
|
-
}
|
|
4308
|
-
};
|
|
4309
3422
|
function createGeneratedAnalysisTransport(options = {}) {
|
|
4310
3423
|
const fetcher = options.fetcher ?? globalThis.fetch.bind(globalThis);
|
|
4311
3424
|
const getAccessToken = options.getAccessToken ?? readStoredAccessToken;
|
|
@@ -4544,12 +3657,12 @@ function createPluginJobs(options, manifestPath) {
|
|
|
4544
3657
|
const pending = request("/jobs", { method: "GET" }).then((payload) => {
|
|
4545
3658
|
if (disposed) return jobs.value;
|
|
4546
3659
|
if (revision !== jobsRevision) {
|
|
4547
|
-
if (jobs.value.some((job) =>
|
|
3660
|
+
if (jobs.value.some((job) => isActiveJobStatus(job.status))) schedulePoll();
|
|
4548
3661
|
return jobs.value;
|
|
4549
3662
|
}
|
|
4550
3663
|
replaceJobs(payload.jobs);
|
|
4551
3664
|
error.value = null;
|
|
4552
|
-
if (!paused && !jobStream.isConnected.value && jobs.value.some((job) =>
|
|
3665
|
+
if (!paused && !jobStream.isConnected.value && jobs.value.some((job) => isActiveJobStatus(job.status))) schedulePoll();
|
|
4553
3666
|
return jobs.value;
|
|
4554
3667
|
}).finally(() => {
|
|
4555
3668
|
if (refreshPromise === pending) refreshPromise = void 0;
|
|
@@ -4583,7 +3696,7 @@ function createPluginJobs(options, manifestPath) {
|
|
|
4583
3696
|
if (options.signal?.aborted) return Promise.reject(pluginJobWaitAbort(options.signal));
|
|
4584
3697
|
const jobId = jobIdFromReference(job);
|
|
4585
3698
|
const current = typeof job === "string" ? jobs.value.find((candidate) => candidate.job_id === jobId) : jobs.value.find((candidate) => candidate.job_id === jobId) ?? job;
|
|
4586
|
-
if (current && !
|
|
3699
|
+
if (current && !isActiveJobStatus(current.status)) return terminalWaitResult(current, options.rejectOnFailure === true);
|
|
4587
3700
|
if (paused) return Promise.reject(/* @__PURE__ */ new Error("Plugin jobs runtime is paused"));
|
|
4588
3701
|
return new Promise((resolve, reject) => {
|
|
4589
3702
|
const waiter = {
|
|
@@ -4617,7 +3730,7 @@ function createPluginJobs(options, manifestPath) {
|
|
|
4617
3730
|
});
|
|
4618
3731
|
}
|
|
4619
3732
|
function settleJobWaiters(job) {
|
|
4620
|
-
if (
|
|
3733
|
+
if (isActiveJobStatus(job.status)) return;
|
|
4621
3734
|
const waiting = jobWaiters.get(job.job_id);
|
|
4622
3735
|
if (!waiting) return;
|
|
4623
3736
|
jobWaiters.delete(job.job_id);
|
|
@@ -4786,7 +3899,7 @@ function createPluginJobs(options, manifestPath) {
|
|
|
4786
3899
|
downloadRefreshTimers.delete(jobId);
|
|
4787
3900
|
}
|
|
4788
3901
|
function handleManagedDownloadRefreshFailure(job, cause) {
|
|
4789
|
-
if (cause instanceof
|
|
3902
|
+
if (cause instanceof MintApiError) {
|
|
4790
3903
|
if (cause.status === 404 || cause.status === 410) {
|
|
4791
3904
|
discardCachedResult(job.job_id);
|
|
4792
3905
|
jobs.value = jobs.value.map((candidate) => candidate.job_id === job.job_id ? {
|
|
@@ -4844,7 +3957,7 @@ function createPluginJobs(options, manifestPath) {
|
|
|
4844
3957
|
await refreshJobs();
|
|
4845
3958
|
} catch (cause) {
|
|
4846
3959
|
error.value = errorMessage(cause, "Failed to refresh analysis jobs");
|
|
4847
|
-
if (jobs.value.some((job) =>
|
|
3960
|
+
if (jobs.value.some((job) => isActiveJobStatus(job.status))) schedulePoll();
|
|
4848
3961
|
}
|
|
4849
3962
|
}, pollInterval);
|
|
4850
3963
|
}
|
|
@@ -4854,7 +3967,7 @@ function createPluginJobs(options, manifestPath) {
|
|
|
4854
3967
|
pollTimer = void 0;
|
|
4855
3968
|
}
|
|
4856
3969
|
function schedulePollForActiveJobs() {
|
|
4857
|
-
if (jobs.value.some((job) =>
|
|
3970
|
+
if (jobs.value.some((job) => isActiveJobStatus(job.status))) schedulePoll();
|
|
4858
3971
|
}
|
|
4859
3972
|
function applyJobStreamMessage(message) {
|
|
4860
3973
|
if (message.event === "snapshot" && "jobs" in message.data) {
|
|
@@ -4909,7 +4022,7 @@ function createPluginJobs(options, manifestPath) {
|
|
|
4909
4022
|
if (!initialized) return;
|
|
4910
4023
|
for (const [jobId, result] of Object.entries(resultCache.value)) scheduleManagedDownloadRefresh(jobId, managedDownloadRefreshDelay(result));
|
|
4911
4024
|
if (streamEnabled) jobStream.start();
|
|
4912
|
-
else if (jobs.value.some((job) =>
|
|
4025
|
+
else if (jobs.value.some((job) => isActiveJobStatus(job.status))) schedulePoll();
|
|
4913
4026
|
}
|
|
4914
4027
|
function dispose() {
|
|
4915
4028
|
if (disposed) return;
|
|
@@ -4939,7 +4052,7 @@ function createPluginJobs(options, manifestPath) {
|
|
|
4939
4052
|
});
|
|
4940
4053
|
if (!response.ok) {
|
|
4941
4054
|
const payload = await response.json().catch(() => null);
|
|
4942
|
-
throw
|
|
4055
|
+
throw mintApiErrorFromResponse(response.status, payload, { requestId: response.headers.get("X-Request-ID") });
|
|
4943
4056
|
}
|
|
4944
4057
|
return await response.json();
|
|
4945
4058
|
}
|
|
@@ -5043,13 +4156,13 @@ function createGeneratedSessionStorage(candidate) {
|
|
|
5043
4156
|
};
|
|
5044
4157
|
}
|
|
5045
4158
|
function isSessionNotFoundError(error) {
|
|
5046
|
-
return error instanceof
|
|
4159
|
+
return error instanceof MintApiError && error.status === 404 && (error.detail === SESSION_NOT_FOUND_DETAIL || error.message === SESSION_NOT_FOUND_DETAIL);
|
|
5047
4160
|
}
|
|
5048
4161
|
function isRetryableResultError(error) {
|
|
5049
|
-
return !(error instanceof
|
|
4162
|
+
return !(error instanceof MintApiError) || error.status === 409 || error.status === 429 || error.status >= 500;
|
|
5050
4163
|
}
|
|
5051
4164
|
function isRetryableJobLookupError(error) {
|
|
5052
|
-
return !(error instanceof
|
|
4165
|
+
return !(error instanceof MintApiError) || error.status === 408 || error.status === 429 || error.status >= 500;
|
|
5053
4166
|
}
|
|
5054
4167
|
function isManagedDownloadResult(result) {
|
|
5055
4168
|
return result.kind === "artifact" && result.managed === true;
|
|
@@ -8073,6 +7186,6 @@ function useControlSchema(controls, options = {}) {
|
|
|
8073
7186
|
};
|
|
8074
7187
|
}
|
|
8075
7188
|
//#endregion
|
|
8076
|
-
export { resolveJobCapabilities as $, useConcentrationUnits as A, formatTimeSlot as At, currentExperimentFromContext as B, MultiSelect_default as Bt, controlsToViewIds as C, addMinutes as Ct, getTypeDefault as D, findNearestTimeSlotIndex as Dt, getFieldRegistryEntry as E, findAvailableSlots as Et, ATOMIC_WEIGHTS as F, rangesOverlap as Ft, createGeneratedAnalysisTransport as G, BaseToggle_default as Gt, parseExperimentId as H, useSelectionLimit as Ht, useChemicalFormula as I, snapToSlot as It, isActiveJobStatus as J,
|
|
7189
|
+
export { resolveJobCapabilities as $, useConcentrationUnits as A, formatTimeSlot as At, currentExperimentFromContext as B, MultiSelect_default as Bt, controlsToViewIds as C, addMinutes as Ct, getTypeDefault as D, findNearestTimeSlotIndex as Dt, getFieldRegistryEntry as E, findAvailableSlots as Et, ATOMIC_WEIGHTS as F, rangesOverlap as Ft, createGeneratedAnalysisTransport as G, BaseToggle_default as Gt, parseExperimentId as H, useSelectionLimit as Ht, useChemicalFormula as I, snapToSlot as It, isActiveJobStatus as J, BaseTextarea_default as Jt, useGeneratedAnalysis as K, BaseCheckbox_default as Kt, GeneratedPathInput_default as L, toMinutes as Lt, SequenceInput_default as M, generateTimeSlots as Mt, useSequenceUtils as N, isTimeInRange as Nt, ConcentrationInput_default as O, formatDuration as Ot, FormulaInput_default as P, parseTime as Pt, normalizeJobState as Q, ArtifactSelectorModal_default as R, useTimeUtils as Rt, controlsToTopBarSettingsConfig as S, TimePicker_default as St, getDefaultControlView as T, durationMinutes as Tt, resolveCurrentExperimentId as U, BaseSlider_default as Ut, getInjectedPlatformContext as V, useListSelection as Vt, resolveCurrentPluginId as W, BaseRadioGroup_default as Wt, jobStatusLabel as X, isTerminalJobStatus as Y, normalizeJobPercent as Z, controlsToFormSchema as _, pluginSecretLabel as _t, defineDoseCalculatorControlProps as a, AlertBox_default as at, controlsToSettingsSchema as b, usesPluginSecretReferences as bt, defineWellPlateDoseComponentBindings as c, SecretInput_default as ct, defineControlModel as d, PLUGIN_SECRET_REF_KEY as dt, useEventStream as et, resolveControlModel as f, clearPluginSecret as ft, mergeControlWorkspaceOptions as g, pluginSecretId as gt, controlValuesToComponentProps as h, keepPluginSecret as ht, useControlSchema as i, _plugin_vue_export_helper_default as it, MoleculeInput_default as j, fromMinutes as jt, UnitInput_default as k, formatTime as kt, defineWellPlateDoseControlProps as l, PLUGIN_SECRET_FORMAT_KEY as lt, controlValuesToComponentBindingsById as m, isPluginSecretRef as mt, defineControls as n, isObjectLike as nt, defineDoseDesignControlModel as o, FileUploader_default as ot, controlValuesToComponentBindings as p, isPluginSecretLocked as pt, usePluginJobs as q, Tooltip_default as qt, getControlDefaults as r, isRecord as rt, defineWellPlateControlProps as s, NumberInput_default as st, defineControlComponentBindings as t, DateTimePicker_default as tt, useControlWorkspace as u, PLUGIN_SECRET_FORMAT_REF as ut, controlsToSectionFormSchema as v, pluginSecretState as vt, controlsToViewItems as w, compareTime as wt, controlsToSidebarPanels as x, TagsInput_default as xt, controlsToSectionFormSchemas as y, setPluginSecret as yt, useAnalysisArtifacts as z, DatePicker_default as zt };
|
|
8077
7190
|
|
|
8078
|
-
//# sourceMappingURL=useControlSchema-
|
|
7191
|
+
//# sourceMappingURL=useControlSchema-DldpxNOP.js.map
|