@parallelworks/ui 0.20.0 → 0.21.1
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 +5 -0
- package/dist/ai/adapter/openai/createOpenAIStream.js +3 -2
- package/dist/ai/agent/diff.d.ts +0 -1
- package/dist/ai/agent/diff.js +3 -2
- package/dist/ai/agent/toolfmt.js +2 -3
- package/dist/ai/ai.css +5 -0
- package/dist/ai/components/AllocationSelector.js +3 -2
- package/dist/ai/components/AttachmentManager.js +7 -5
- package/dist/ai/components/AttachmentUpload.js +11 -7
- package/dist/ai/components/BlockedGroupBanner.js +2 -2
- package/dist/ai/components/BranchNavigator.js +8 -5
- package/dist/ai/components/ChatEmptyState.js +8 -5
- package/dist/ai/components/ChatInput.d.ts +2 -5
- package/dist/ai/components/ChatInput.js +16 -11
- package/dist/ai/components/ChatMessage.js +25 -17
- package/dist/ai/components/ChatMessageList.js +4 -3
- package/dist/ai/components/ChatSidebar.d.ts +0 -1
- package/dist/ai/components/ChatSidebar.js +22 -16
- package/dist/ai/components/ChatThread.js +9 -11
- package/dist/ai/components/ComposerChrome.js +2 -2
- package/dist/ai/components/ModelSelector.js +20 -14
- package/dist/ai/components/ShareDialog.js +10 -6
- package/dist/ai/components/SlashMenu.d.ts +0 -1
- package/dist/ai/components/agent/ActivityLine.d.ts +0 -1
- package/dist/ai/components/agent/ActivityLine.js +5 -4
- package/dist/ai/components/agent/AgentMessageParts.d.ts +1 -26
- package/dist/ai/components/agent/AgentMessageParts.js +13 -12
- package/dist/ai/core/ChatProvider.d.ts +2 -6
- package/dist/ai/core/ChatProvider.js +42 -67
- package/dist/ai/core/KeyboardShortcutsProvider.js +1 -1
- package/dist/ai/core/chatReducer.d.ts +0 -6
- package/dist/ai/core/chatReducer.js +1 -15
- package/dist/ai/core/useKeyboardShortcuts.d.ts +3 -1
- package/dist/ai/core/useKeyboardShortcuts.js +9 -11
- package/dist/ai/core/useSSEStream.d.ts +0 -1
- package/dist/ai/core/useSSEStream.js +5 -17
- package/dist/ai/strings.d.ts +0 -1
- package/dist/ai/strings.js +0 -1
- package/dist/ai/types.d.ts +1 -1
- package/dist/ai/ui/Avatar.d.ts +1 -2
- package/dist/ai/ui/Avatar.js +7 -18
- package/dist/ai/ui/Dropdown.js +2 -2
- package/dist/ai/ui/Markdown.d.ts +1 -3
- package/dist/ai/ui/Markdown.js +1 -2
- package/dist/ai/ui/Notice.js +5 -3
- package/dist/ai/ui/sidebar.d.ts +0 -1
- package/dist/ai/ui/sidebar.js +5 -3
- package/dist/ai/utils.js +1 -1
- package/dist/components/Avatar.js +4 -2
- package/dist/components/BareModal.js +1 -5
- package/dist/components/Breadcrumbs.js +21 -14
- package/dist/components/Button.js +3 -2
- package/dist/components/Callout.js +4 -3
- package/dist/components/CollapsiblePanel.d.ts +1 -3
- package/dist/components/CollapsiblePanel.js +7 -7
- package/dist/components/CopyToClipboard.js +8 -4
- package/dist/components/CreateModal.js +11 -7
- package/dist/components/Dropdown.d.ts +0 -4
- package/dist/components/Dropdown.js +7 -8
- package/dist/components/Filter.js +2 -2
- package/dist/components/Indicator.js +14 -9
- package/dist/components/Input.js +6 -4
- package/dist/components/Listbox.js +16 -20
- package/dist/components/Loader.js +1 -1
- package/dist/components/MultiSelect.js +5 -8
- package/dist/components/PageHeader.js +10 -7
- package/dist/components/Pagination.js +1 -1
- package/dist/components/Provider.d.ts +0 -8
- package/dist/components/Sort.js +6 -4
- package/dist/components/StatusIcons.d.ts +11 -0
- package/dist/components/StatusIcons.js +20 -0
- package/dist/components/SwitchToggle.js +3 -5
- package/dist/components/Table.d.ts +1 -3
- package/dist/components/Tooltip.js +3 -3
- package/dist/components/dropdownUtils.js +7 -8
- package/dist/components/relativeTime.d.ts +0 -7
- package/dist/components/relativeTime.js +1 -1
- package/dist/duration.js +1 -1
- package/dist/editor/Editor.d.ts +1 -1
- package/dist/editor/Editor.js +1 -1
- package/dist/editor/EditorField.d.ts +0 -1
- package/dist/editor/EditorField.js +8 -8
- package/dist/editor/FormCodePanel.js +20 -23
- package/dist/editor/yamlLanguage.js +2 -2
- package/dist/file-explorer/FileExplorer.js +94 -82
- package/dist/file-explorer/FileExplorerContext.d.ts +1 -2
- package/dist/file-explorer/FileExplorerContext.js +92 -125
- package/dist/file-explorer/FilePreview/Inline.d.ts +1 -2
- package/dist/file-explorer/FilePreview/Inline.js +4 -4
- package/dist/file-explorer/FilePreview/StreamedBadge.js +2 -2
- package/dist/file-explorer/FilePreview/Viewer.js +14 -14
- package/dist/file-explorer/FilePreview/index.d.ts +1 -2
- package/dist/file-explorer/FilePreview/index.js +20 -13
- package/dist/file-explorer/FilePreview/parse.d.ts +2 -1
- package/dist/file-explorer/FilePreview/useObjectBlobUrl.d.ts +5 -4
- package/dist/file-explorer/FilePreview/useObjectBlobUrl.js +23 -36
- package/dist/file-explorer/FilePreview/useObjectText.d.ts +1 -2
- package/dist/file-explorer/FilePreview/useObjectText.js +5 -7
- package/dist/file-explorer/FileRow.js +3 -3
- package/dist/file-explorer/FileRowsWindow.d.ts +5 -12
- package/dist/file-explorer/FileRowsWindow.js +3 -2
- package/dist/file-explorer/FileTable.d.ts +2 -6
- package/dist/file-explorer/LoadMoreRow.d.ts +8 -0
- package/dist/file-explorer/TreeView.d.ts +0 -1
- package/dist/file-explorer/TreeView.js +11 -9
- package/dist/file-explorer/helpers.js +45 -33
- package/dist/file-explorer/lib/fileExplorer.d.ts +0 -2
- package/dist/file-explorer/lib/types.d.ts +0 -1
- package/dist/file-explorer/lib/utils.js +15 -20
- package/dist/file-explorer/toasts.js +54 -45
- package/dist/form/Fields/BooleanField.js +5 -4
- package/dist/form/Fields/CheckboxGroupField.js +5 -4
- package/dist/form/Fields/ColorField.js +5 -4
- package/dist/form/Fields/DropdownField.d.ts +0 -1
- package/dist/form/Fields/DropdownField.js +10 -13
- package/dist/form/Fields/DurationField.js +2 -2
- package/dist/form/Fields/LabelField.js +5 -5
- package/dist/form/Fields/MultiDropdownField.d.ts +1 -1
- package/dist/form/Fields/MultiDropdownField.js +8 -11
- package/dist/form/Fields/NumberField.js +6 -5
- package/dist/form/Fields/ObjectField.d.ts +1 -2
- package/dist/form/Fields/ObjectField.js +22 -21
- package/dist/form/Fields/RadioField.js +4 -3
- package/dist/form/Fields/RangeField.js +7 -6
- package/dist/form/Fields/StringField.js +2 -1
- package/dist/form/Fields/TextAreaField.js +2 -1
- package/dist/form/Form.d.ts +7 -8
- package/dist/form/Form.js +56 -81
- package/dist/form/SpecialTypes/DropdownWrapper.d.ts +0 -2
- package/dist/form/SpecialTypes/DropdownWrapper.js +1 -3
- package/dist/form/SpecialTypes/FormikCustomDropdown.d.ts +1 -3
- package/dist/form/SpecialTypes/FormikCustomDropdown.js +4 -7
- package/dist/form/SpecialTypes/FormikCustomInput.js +16 -13
- package/dist/form/Wizard/WizardContainer.js +8 -25
- package/dist/form/Wizard/WizardNavigation.d.ts +1 -1
- package/dist/form/Wizard/WizardNavigation.js +5 -6
- package/dist/form/Wizard/WizardStepContent.d.ts +1 -1
- package/dist/form/Wizard/WizardStepContent.js +2 -2
- package/dist/form/Wizard/WizardStepIndicator.js +7 -17
- package/dist/form/Wizard/types.d.ts +4 -46
- package/dist/form/Wizard/useWizardState.d.ts +2 -10
- package/dist/form/Wizard/useWizardState.js +42 -92
- package/dist/form/Wizard/utils.js +6 -11
- package/dist/form/lib.js +28 -54
- package/dist/form/types/fieldTypes.d.ts +4 -5
- package/dist/form/utils/dependentOptions.d.ts +6 -0
- package/dist/form/utils/dependentOptions.js +21 -0
- package/dist/form/utils/getParentValue.d.ts +2 -1
- package/dist/form/utils/getParentValue.js +10 -15
- package/dist/form/utils/getValueUsingPath.js +1 -1
- package/dist/graph/AnnotationBanner.d.ts +1 -1
- package/dist/graph/AnnotationBanner.js +10 -6
- package/dist/graph/Collapse.d.ts +3 -3
- package/dist/graph/Collapse.js +3 -8
- package/dist/graph/DependencyGraph.d.ts +5 -4
- package/dist/graph/DependencyGraph.js +178 -226
- package/dist/graph/JobSummary.d.ts +10 -8
- package/dist/graph/JobSummary.js +17 -16
- package/dist/graph/MatrixGroup.d.ts +5 -17
- package/dist/graph/MatrixGroup.js +11 -22
- package/dist/graph/TreeView.d.ts +1 -3
- package/dist/graph/TreeView.js +106 -492
- package/dist/graph/types.d.ts +3 -2
- package/dist/graph/util.d.ts +5 -0
- package/dist/graph/util.js +18 -0
- package/dist/icons/ai/AiOutlineRollback.js +16 -0
- package/dist/icons/bi/BiBell.js +16 -0
- package/dist/icons/bi/BiBellOff.js +16 -0
- package/dist/icons/bi/BiBuildings.js +20 -0
- package/dist/icons/bi/BiError.js +20 -0
- package/dist/icons/bi/BiExpandVertical.js +16 -0
- package/dist/icons/bi/BiPause.js +16 -0
- package/dist/icons/bi/BiPlay.js +16 -0
- package/dist/icons/bi/BiSolidCheckShield.js +16 -0
- package/dist/icons/bi/BiSolidTrashAlt.js +16 -0
- package/dist/icons/bi/BiStop.js +16 -0
- package/dist/icons/bs/BsArrowsCollapse.js +22 -0
- package/dist/icons/bs/BsBank2.js +19 -0
- package/dist/icons/bs/BsBriefcase.js +19 -0
- package/dist/icons/bs/BsBucket.js +19 -0
- package/dist/icons/bs/BsCalendarX.js +23 -0
- package/dist/icons/bs/BsChatLeft.js +19 -0
- package/dist/icons/bs/BsChevronDoubleDown.js +29 -0
- package/dist/icons/bs/BsChevronDoubleUp.js +29 -0
- package/dist/icons/bs/BsClipboardCheck.js +34 -0
- package/dist/icons/bs/BsCurrencyDollar.js +19 -0
- package/dist/icons/bs/BsDash.js +19 -0
- package/dist/icons/bs/BsFileEarmarkZip.js +23 -0
- package/dist/icons/bs/BsFiles.js +19 -0
- package/dist/icons/bs/BsGeoAlt.js +23 -0
- package/dist/icons/bs/BsGrid.js +19 -0
- package/dist/icons/bs/BsLayers.js +19 -0
- package/dist/icons/bs/BsLayoutThreeColumns.js +19 -0
- package/dist/icons/bs/BsListUl.js +22 -0
- package/dist/icons/bs/BsMortarboard.js +23 -0
- package/dist/icons/bs/BsMusicNoteBeamed.js +34 -0
- package/dist/icons/bs/BsOpenai.js +19 -0
- package/dist/icons/bs/BsPersonPlus.js +26 -0
- package/dist/icons/bs/BsSearch.js +19 -0
- package/dist/icons/bs/BsSend.js +19 -0
- package/dist/icons/bs/BsShieldSlash.js +22 -0
- package/dist/icons/bs/BsStar.js +19 -0
- package/dist/icons/bs/BsStarFill.js +19 -0
- package/dist/icons/bs/BsStopCircle.js +23 -0
- package/dist/icons/bs/BsTag.js +23 -0
- package/dist/icons/bs/BsTelephone.js +19 -0
- package/dist/icons/bs/BsTerminal.js +23 -0
- package/dist/icons/bs/BsTerminalFill.js +19 -0
- package/dist/icons/bs/BsThreeDots.js +19 -0
- package/dist/icons/bs/BsThreeDotsVertical.js +19 -0
- package/dist/icons/bs/BsZoomIn.js +37 -0
- package/dist/icons/fa/FaAmazon.js +16 -0
- package/dist/icons/fa/FaAngleDown.js +16 -0
- package/dist/icons/fa/FaAngleLeft.js +16 -0
- package/dist/icons/fa/FaAngleRight.js +16 -0
- package/dist/icons/fa/FaAngleUp.js +16 -0
- package/dist/icons/fa/FaArrowDown.js +16 -0
- package/dist/icons/fa/FaArrowLeft.js +16 -0
- package/dist/icons/fa/FaArrowRight.js +16 -0
- package/dist/icons/fa/FaArrowUp.js +16 -0
- package/dist/icons/fa/FaBalanceScale.js +16 -0
- package/dist/icons/fa/FaCaretDown.js +16 -0
- package/dist/icons/fa/FaCentos.js +16 -0
- package/dist/icons/fa/FaChartLine.js +16 -0
- package/dist/icons/fa/FaChartPie.js +16 -0
- package/dist/icons/fa/FaCheck.js +16 -0
- package/dist/icons/fa/FaChevronDown.js +16 -0
- package/dist/icons/fa/FaChevronUp.js +16 -0
- package/dist/icons/fa/FaChrome.js +16 -0
- package/dist/icons/fa/FaCircleNotch.js +16 -0
- package/dist/icons/fa/FaCloud.js +16 -0
- package/dist/icons/fa/FaCloudDownloadAlt.js +16 -0
- package/dist/icons/fa/FaCog.js +16 -0
- package/dist/icons/fa/FaCogs.js +16 -0
- package/dist/icons/fa/FaComments.js +16 -0
- package/dist/icons/fa/FaCompress.js +16 -0
- package/dist/icons/fa/FaDesktop.js +16 -0
- package/dist/icons/fa/FaDocker.js +16 -0
- package/dist/icons/fa/FaDollarSign.js +16 -0
- package/dist/icons/fa/FaEdge.js +16 -0
- package/dist/icons/fa/FaEdit.js +16 -0
- package/dist/icons/fa/FaExclamationTriangle.js +16 -0
- package/dist/icons/fa/FaExpand.js +16 -0
- package/dist/icons/fa/FaEye.js +16 -0
- package/dist/icons/fa/FaEyeSlash.js +16 -0
- package/dist/icons/fa/FaFile.js +16 -0
- package/dist/icons/fa/FaFilePdf.js +16 -0
- package/dist/icons/fa/FaFilter.js +16 -0
- package/dist/icons/fa/FaFirefoxBrowser.js +16 -0
- package/dist/icons/fa/FaFlask.js +16 -0
- package/dist/icons/fa/FaFolder.js +16 -0
- package/dist/icons/fa/FaGithub.js +16 -0
- package/dist/icons/fa/FaGitlab.js +16 -0
- package/dist/icons/fa/FaGlobe.js +16 -0
- package/dist/icons/fa/FaGlobeAmericas.js +16 -0
- package/dist/icons/fa/FaImage.js +16 -0
- package/dist/icons/fa/FaInfoCircle.js +16 -0
- package/dist/icons/fa/FaKey.js +16 -0
- package/dist/icons/fa/FaLayerGroup.js +16 -0
- package/dist/icons/fa/FaLink.js +16 -0
- package/dist/icons/fa/FaLinkedin.js +16 -0
- package/dist/icons/fa/FaLinux.js +16 -0
- package/dist/icons/fa/FaList.js +16 -0
- package/dist/icons/fa/FaLock.js +16 -0
- package/dist/icons/fa/FaOpenid.js +16 -0
- package/dist/icons/fa/FaOpera.js +16 -0
- package/dist/icons/fa/FaPaperclip.js +16 -0
- package/dist/icons/fa/FaPlus.js +16 -0
- package/dist/icons/fa/FaPowerOff.js +16 -0
- package/dist/icons/fa/FaPrint.js +16 -0
- package/dist/icons/fa/FaQrcode.js +16 -0
- package/dist/icons/fa/FaQuestionCircle.js +16 -0
- package/dist/icons/fa/FaRedhat.js +16 -0
- package/dist/icons/fa/FaRegCircle.js +16 -0
- package/dist/icons/fa/FaRegFileImage.js +16 -0
- package/dist/icons/fa/FaRegFolder.js +16 -0
- package/dist/icons/fa/FaRobot.js +16 -0
- package/dist/icons/fa/FaRocket.js +16 -0
- package/dist/icons/fa/FaRunning.js +16 -0
- package/dist/icons/fa/FaSafari.js +16 -0
- package/dist/icons/fa/FaSave.js +16 -0
- package/dist/icons/fa/FaSearch.js +16 -0
- package/dist/icons/fa/FaShieldAlt.js +16 -0
- package/dist/icons/fa/FaSlack.js +16 -0
- package/dist/icons/fa/FaStar.js +16 -0
- package/dist/icons/fa/FaStop.js +16 -0
- package/dist/icons/fa/FaSuse.js +16 -0
- package/dist/icons/fa/FaTerminal.js +16 -0
- package/dist/icons/fa/FaTimes.js +16 -0
- package/dist/icons/fa/FaUbuntu.js +16 -0
- package/dist/icons/fa/FaUndoAlt.js +16 -0
- package/dist/icons/fa/FaUnlink.js +16 -0
- package/dist/icons/fa/FaUser.js +16 -0
- package/dist/icons/fa/FaUsers.js +16 -0
- package/dist/icons/fa/FaWindows.js +16 -0
- package/dist/icons/fa6/FaApple.js +16 -0
- package/dist/icons/fa6/FaArrowsRotate.js +16 -0
- package/dist/icons/fa6/FaDebian.js +16 -0
- package/dist/icons/fa6/FaFilterCircleXmark.js +16 -0
- package/dist/icons/fa6/FaInbox.js +16 -0
- package/dist/icons/fa6/FaLocationDot.js +16 -0
- package/dist/icons/fa6/FaRegFilePdf.js +16 -0
- package/dist/icons/fa6/FaRegFolderOpen.js +16 -0
- package/dist/icons/fa6/FaUpRightFromSquare.js +16 -0
- package/dist/icons/fa6/FaWandMagicSparkles.js +16 -0
- package/dist/icons/fa6/FaXTwitter.js +16 -0
- package/dist/icons/fi/FiActivity.js +23 -0
- package/dist/icons/fi/FiAlertCircle.js +49 -0
- package/dist/icons/fi/FiChevronDown.js +23 -0
- package/dist/icons/fi/FiClock.js +31 -0
- package/dist/icons/fi/FiCopy.js +34 -0
- package/dist/icons/fi/FiDownload.js +40 -0
- package/dist/icons/fi/FiFile.js +27 -0
- package/dist/icons/fi/FiFileText.js +55 -0
- package/dist/icons/fi/FiHardDrive.js +55 -0
- package/dist/icons/fi/FiRotateCcw.js +27 -0
- package/dist/icons/fi/FiUpload.js +40 -0
- package/dist/icons/fi/FiX.js +37 -0
- package/dist/icons/fi/FiZap.js +23 -0
- package/dist/icons/gi/GiSpy.js +16 -0
- package/dist/icons/go/GoGitCommit.js +16 -0
- package/dist/icons/go/GoGitPullRequest.js +20 -0
- package/dist/icons/go/GoIssueOpened.js +16 -0
- package/dist/icons/go/GoPlus.js +16 -0
- package/dist/icons/go/GoRepoForked.js +28 -0
- package/dist/icons/go/GoSignOut.js +16 -0
- package/dist/icons/go/GoSkip.js +20 -0
- package/dist/icons/go/GoVideo.js +20 -0
- package/dist/icons/gr/GrCloudComputer.js +20 -0
- package/dist/icons/gr/GrInbox.js +20 -0
- package/dist/icons/gr/GrServerCluster.js +20 -0
- package/dist/icons/gr/GrStorage.js +20 -0
- package/dist/icons/gr/GrTasks.js +20 -0
- package/dist/icons/hi/HiCog.js +24 -0
- package/dist/icons/hi/HiDuplicate.js +24 -0
- package/dist/icons/hi/HiOutlineArchive.js +26 -0
- package/dist/icons/hi/HiOutlineClipboardCopy.js +26 -0
- package/dist/icons/hi/HiOutlineHome.js +26 -0
- package/dist/icons/hi/HiQuestionMarkCircle.js +24 -0
- package/dist/icons/hi/HiServer.js +24 -0
- package/dist/icons/hi2/HiMiniCheckCircle.js +24 -0
- package/dist/icons/hi2/HiMiniLanguage.js +28 -0
- package/dist/icons/hi2/HiMiniMinusCircle.js +24 -0
- package/dist/icons/hi2/HiMiniXCircle.js +24 -0
- package/dist/icons/hi2/HiSparkles.js +24 -0
- package/dist/icons/im/ImSpinner5.js +19 -0
- package/dist/icons/io/IoIosNotifications.js +16 -0
- package/dist/icons/io/IoMdBuild.js +16 -0
- package/dist/icons/io/IoMdClose.js +16 -0
- package/dist/icons/io5/IoCloudUploadOutline.js +32 -0
- package/dist/icons/io5/IoDocumentTextOutline.js +31 -0
- package/dist/icons/io5/IoFileTrayFullOutline.js +31 -0
- package/dist/icons/io5/IoHeart.js +16 -0
- package/dist/icons/io5/IoHeartDislike.js +16 -0
- package/dist/icons/io5/IoHeartOutline.js +22 -0
- package/dist/icons/io5/IoInformationCircleOutline.js +50 -0
- package/dist/icons/io5/IoSettingsOutline.js +22 -0
- package/dist/icons/io5/IoWarningOutline.js +40 -0
- package/dist/icons/lu/LuArrowRight.js +27 -0
- package/dist/icons/lu/LuBadgeCheck.js +27 -0
- package/dist/icons/lu/LuBrainCircuit.js +101 -0
- package/dist/icons/lu/LuCalendar.js +46 -0
- package/dist/icons/lu/LuCheck.js +23 -0
- package/dist/icons/lu/LuChevronLeft.js +23 -0
- package/dist/icons/lu/LuChevronRight.js +23 -0
- package/dist/icons/lu/LuExternalLink.js +35 -0
- package/dist/icons/lu/LuEye.js +31 -0
- package/dist/icons/lu/LuEyeOff.js +40 -0
- package/dist/icons/lu/LuFolderTree.js +40 -0
- package/dist/icons/lu/LuIdCard.js +55 -0
- package/dist/icons/lu/LuLogs.js +65 -0
- package/dist/icons/lu/LuMail.js +33 -0
- package/dist/icons/lu/LuMegaphone.js +27 -0
- package/dist/icons/lu/LuMoon.js +23 -0
- package/dist/icons/lu/LuPartyPopper.js +65 -0
- package/dist/icons/lu/LuSettings2.js +48 -0
- package/dist/icons/lu/LuSheet.js +72 -0
- package/dist/icons/lu/LuShield.js +23 -0
- package/dist/icons/lu/LuSun.js +69 -0
- package/dist/icons/lu/LuX.js +27 -0
- package/dist/icons/lu/LuZoomIn.js +59 -0
- package/dist/icons/lu/LuZoomOut.js +49 -0
- package/dist/icons/md/MdClear.js +23 -0
- package/dist/icons/md/MdDragHandle.js +23 -0
- package/dist/icons/md/MdInstallDesktop.js +31 -0
- package/dist/icons/md/MdOutlineAttachMoney.js +23 -0
- package/dist/icons/md/MdOutlineMoneyOff.js +23 -0
- package/dist/icons/md/MdPieChart.js +23 -0
- package/dist/icons/md/MdRefresh.js +23 -0
- package/dist/icons/md/MdReplay.js +23 -0
- package/dist/icons/md/MdSmartphone.js +23 -0
- package/dist/icons/pi/PiArrowBendUpRightBold.js +19 -0
- package/dist/icons/pi/PiPlugsConnectedFill.js +19 -0
- package/dist/icons/pi/PiRectangleDashed.js +19 -0
- package/dist/icons/pi/PiShareBold.js +19 -0
- package/dist/icons/si/SiAnthropic.js +19 -0
- package/dist/icons/si/SiHelm.js +19 -0
- package/dist/icons/si/SiKubernetes.js +19 -0
- package/dist/icons/tb/TbAlertTriangle.js +35 -0
- package/dist/icons/tb/TbAlertTriangleFilled.js +19 -0
- package/dist/icons/tb/TbApi.js +40 -0
- package/dist/icons/tb/TbBrain.js +50 -0
- package/dist/icons/tb/TbBuildingTunnel.js +65 -0
- package/dist/icons/tb/TbEdit.js +35 -0
- package/dist/icons/tb/TbLayoutSidebar.js +27 -0
- package/dist/icons/tb/TbLayoutSidebarLeftCollapse.js +35 -0
- package/dist/icons/tb/TbLayoutSidebarRightCollapse.js +35 -0
- package/dist/icons/tb/TbUser.js +27 -0
- package/dist/icons/tb/TbUserOff.js +35 -0
- package/dist/icons/tb/TbWorldShare.js +55 -0
- package/dist/icons/tb/TbWorldWww.js +65 -0
- package/dist/icons/ti/TiArrowSortedDown.js +20 -0
- package/dist/icons/ti/TiArrowSortedUp.js +20 -0
- package/dist/icons/ti/TiArrowUnsorted.js +20 -0
- package/dist/icons/ti/TiCancel.js +20 -0
- package/dist/icons/vsc/VscChromeMinimize.js +19 -0
- package/dist/icons/vsc/VscJson.js +19 -0
- package/dist/icons/vsc/VscLayoutSidebarLeft.js +19 -0
- package/dist/icons/vsc/VscPass.js +27 -0
- package/dist/icons/vsc/VscSplitHorizontal.js +19 -0
- package/dist/icons/vsc/VscTerminalPowershell.js +19 -0
- package/dist/icons.d.ts +7 -22
- package/dist/icons.js +257 -38
- package/dist/index.d.ts +1 -1
- package/dist/list/ActionToolbar.js +2 -2
- package/dist/list/ListPager.js +4 -3
- package/dist/list/ListTable.js +2 -2
- package/dist/list/ListViewControls.js +29 -42
- package/dist/list/RowContextMenu.js +28 -19
- package/dist/list/listSearch.js +6 -5
- package/dist/logviewer/LogViewer.js +28 -20
- package/dist/logviewer/segments.js +2 -2
- package/dist/styles/theme.css +1 -0
- package/dist/styles.css +1 -1
- package/dist/theme/index.js +5 -5
- package/package.json +28 -30
- package/dist/ai/ui/buttons.d.ts +0 -1
|
@@ -10,14 +10,13 @@ function formatFileSize(bytes) {
|
|
|
10
10
|
"TB"
|
|
11
11
|
];
|
|
12
12
|
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
13
|
-
return Number.parseFloat((bytes / k ** i).toFixed(2))
|
|
13
|
+
return `${Number.parseFloat((bytes / k ** i).toFixed(2))} ${sizes[i]}`;
|
|
14
14
|
}
|
|
15
15
|
function getFileExtension(filename) {
|
|
16
16
|
return filename.match(/\.([a-zA-Z0-9]+)$/)?.[1]?.toLowerCase() ?? null;
|
|
17
17
|
}
|
|
18
18
|
function getNodeName(node) {
|
|
19
|
-
|
|
20
|
-
return parts[parts.length - 1] ?? "";
|
|
19
|
+
return removeTrailingSlash(node.path).split("/").pop() ?? "";
|
|
21
20
|
}
|
|
22
21
|
function toNode(entry, storage, storagePath, storageName) {
|
|
23
22
|
const relativePath = removeLeadingSlash(entry.path);
|
|
@@ -79,8 +78,8 @@ function createTreeBuilder() {
|
|
|
79
78
|
};
|
|
80
79
|
directories.set(dirPath, dir);
|
|
81
80
|
}
|
|
82
|
-
for (
|
|
83
|
-
const node = toNode(
|
|
81
|
+
for (const entry of entries.slice(dir.entries.length)) {
|
|
82
|
+
const node = toNode(entry, storage, storagePath, storageName);
|
|
84
83
|
if (node.path === dirPath) continue;
|
|
85
84
|
if (node.type === "directory") dir.directories.push(node);
|
|
86
85
|
else dir.files.push(node);
|
|
@@ -124,14 +123,14 @@ function createTreeBuilder() {
|
|
|
124
123
|
parentToChildrenMap: {},
|
|
125
124
|
rootNodes: []
|
|
126
125
|
};
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
const storagePath = ensureTrailingSlash(
|
|
130
|
-
tree.rootNodes.push(addStorage(
|
|
126
|
+
const onlyStorage = storages.length === 1 ? storages[0] : void 0;
|
|
127
|
+
if (onlyStorage && !options.forceUserHierarchy) {
|
|
128
|
+
const storagePath = ensureTrailingSlash(onlyStorage.user ? `${onlyStorage.user}/${onlyStorage.name}` : onlyStorage.name);
|
|
129
|
+
tree.rootNodes.push(addStorage(onlyStorage, storagePath, options, tree));
|
|
131
130
|
} else {
|
|
132
131
|
const userGroups = {};
|
|
133
132
|
for (const storage of storages) {
|
|
134
|
-
const username = storage.user
|
|
133
|
+
const username = storage.user;
|
|
135
134
|
if (!userGroups[username]) userGroups[username] = [];
|
|
136
135
|
userGroups[username].push(storage);
|
|
137
136
|
}
|
|
@@ -159,7 +158,7 @@ function createTreeBuilder() {
|
|
|
159
158
|
};
|
|
160
159
|
}
|
|
161
160
|
function getNodeChildren(parentToChildrenMap, parentPath) {
|
|
162
|
-
return parentToChildrenMap[parentPath.endsWith("/") ? parentPath : parentPath
|
|
161
|
+
return parentToChildrenMap[parentPath.endsWith("/") ? parentPath : `${parentPath}/`] || [];
|
|
163
162
|
}
|
|
164
163
|
function getParentPath(currentPath) {
|
|
165
164
|
return ensureTrailingSlash(removeLastPathSegment(currentPath));
|
|
@@ -183,13 +182,13 @@ async function getUploadNodesFromDataTransferItems(items) {
|
|
|
183
182
|
uploadNodes.push({
|
|
184
183
|
name: file.name,
|
|
185
184
|
file,
|
|
186
|
-
relativePath: path
|
|
185
|
+
relativePath: path + file.name
|
|
187
186
|
});
|
|
188
187
|
totalSize += file.size;
|
|
189
188
|
resolve();
|
|
190
189
|
}, reject);
|
|
191
190
|
else if (entry.isDirectory) entry.createReader().readEntries(async (entries) => {
|
|
192
|
-
const newPath = path
|
|
191
|
+
const newPath = `${path}${entry.name}/`;
|
|
193
192
|
if (entries.length === 0) uploadNodes.push({
|
|
194
193
|
name: entry.name,
|
|
195
194
|
file: new Blob(),
|
|
@@ -213,9 +212,7 @@ async function getUploadNodesFromDataTransferItems(items) {
|
|
|
213
212
|
};
|
|
214
213
|
}
|
|
215
214
|
function calculateUploadNodesTotalSize(uploadNodes) {
|
|
216
|
-
return uploadNodes.reduce((total, node) =>
|
|
217
|
-
return total + (node.file?.size || 0);
|
|
218
|
-
}, 0);
|
|
215
|
+
return uploadNodes.reduce((total, node) => total + node.file.size, 0);
|
|
219
216
|
}
|
|
220
217
|
function getObjectKeyFromNode(node) {
|
|
221
218
|
return node.relativePath || node.path.split("/").filter(Boolean).slice(1).join("/");
|
|
@@ -261,12 +258,10 @@ function removeLastPathSegment(path) {
|
|
|
261
258
|
return path.replace(/\/[^/]+\/?$/, "");
|
|
262
259
|
}
|
|
263
260
|
function ensureTrailingSlash(path) {
|
|
264
|
-
return path.endsWith("/") ? path : path
|
|
261
|
+
return path.endsWith("/") ? path : `${path}/`;
|
|
265
262
|
}
|
|
266
263
|
function isClientValid(client) {
|
|
267
|
-
|
|
268
|
-
const expiresAt = client.getExpiresAt();
|
|
269
|
-
return expiresAt && expiresAt > /* @__PURE__ */ new Date();
|
|
264
|
+
return client.getExpiresAt() > /* @__PURE__ */ new Date();
|
|
270
265
|
}
|
|
271
266
|
function getUploadSessionETA(totalLoadedBytes, totalSizeBytes, lastProgressTime, lastProgressBytes) {
|
|
272
267
|
const now = Date.now();
|
|
@@ -1,57 +1,69 @@
|
|
|
1
1
|
import { useStrings } from "../components/Provider.js";
|
|
2
|
-
import {
|
|
2
|
+
import { BiExpandVertical } from "../icons/bi/BiExpandVertical.js";
|
|
3
|
+
import { FaAngleDown } from "../icons/fa/FaAngleDown.js";
|
|
4
|
+
import { FaAngleUp } from "../icons/fa/FaAngleUp.js";
|
|
5
|
+
import { HiMiniCheckCircle } from "../icons/hi2/HiMiniCheckCircle.js";
|
|
6
|
+
import { IoMdClose } from "../icons/io/IoMdClose.js";
|
|
7
|
+
import { IoCloudUploadOutline } from "../icons/io5/IoCloudUploadOutline.js";
|
|
8
|
+
import { TbAlertTriangle } from "../icons/tb/TbAlertTriangle.js";
|
|
9
|
+
import { VscChromeMinimize } from "../icons/vsc/VscChromeMinimize.js";
|
|
3
10
|
import { formatETA, formatFileSize } from "./lib/utils.js";
|
|
4
11
|
import cx from "classnames";
|
|
5
|
-
import {
|
|
12
|
+
import { useState } from "react";
|
|
6
13
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
7
14
|
//#region src/file-explorer/toasts.tsx
|
|
8
15
|
function getSessionStatusInfo(session, queueLength, strings) {
|
|
9
16
|
switch (session.status) {
|
|
10
17
|
case "queued": return {
|
|
11
|
-
icon: /* @__PURE__ */ jsx(
|
|
18
|
+
icon: /* @__PURE__ */ jsx(IoCloudUploadOutline, { className: "w-5 h-5 text-blue-600" }),
|
|
12
19
|
title: strings.inQueue(session.queueIndex + 1, queueLength),
|
|
13
20
|
shortTitle: strings.queuedShort(session.queueIndex + 1, queueLength),
|
|
14
21
|
bgColor: "bg-blue-100"
|
|
15
22
|
};
|
|
16
23
|
case "uploading": return {
|
|
17
|
-
icon: /* @__PURE__ */ jsx(
|
|
24
|
+
icon: /* @__PURE__ */ jsx(IoCloudUploadOutline, { className: "w-5 h-5 text-blue-600" }),
|
|
18
25
|
title: strings.uploading,
|
|
19
26
|
shortTitle: strings.uploading,
|
|
20
27
|
bgColor: "bg-blue-100"
|
|
21
28
|
};
|
|
22
29
|
case "completed": return {
|
|
23
|
-
icon: /* @__PURE__ */ jsx(
|
|
30
|
+
icon: /* @__PURE__ */ jsx(HiMiniCheckCircle, { className: "w-5 h-5 text-green-600" }),
|
|
24
31
|
title: strings.completeTitle,
|
|
25
32
|
shortTitle: strings.completeShort,
|
|
26
33
|
bgColor: "bg-green-100"
|
|
27
34
|
};
|
|
28
35
|
case "failed": return {
|
|
29
|
-
icon: /* @__PURE__ */ jsx(
|
|
36
|
+
icon: /* @__PURE__ */ jsx(TbAlertTriangle, { className: "w-5 h-5 text-red-600" }),
|
|
30
37
|
title: strings.failedTitle,
|
|
31
38
|
shortTitle: strings.failedShort,
|
|
32
39
|
bgColor: "bg-red-100"
|
|
33
40
|
};
|
|
34
41
|
default: return {
|
|
35
|
-
icon: /* @__PURE__ */ jsx(
|
|
42
|
+
icon: /* @__PURE__ */ jsx(IoCloudUploadOutline, { className: "w-5 h-5 theme-muted-text" }),
|
|
36
43
|
title: strings.unknownTitle,
|
|
37
44
|
shortTitle: strings.unknownShort,
|
|
38
45
|
bgColor: "bg-(--theme-muted-panel-bg)"
|
|
39
46
|
};
|
|
40
47
|
}
|
|
41
48
|
}
|
|
42
|
-
function
|
|
49
|
+
function barColor({ isCompleted, isCancelled, isFailed }) {
|
|
50
|
+
if (isCompleted) return "bg-green-600";
|
|
51
|
+
if (isCancelled) return "bg-(--theme-muted-text-color)";
|
|
52
|
+
return isFailed ? "bg-red-600" : "theme-element";
|
|
53
|
+
}
|
|
54
|
+
function FileProgressBar({ fileProgress, fileName, onCancelFile }) {
|
|
43
55
|
const strings = useStrings().fileExplorer.upload;
|
|
44
56
|
const [isHovered, setIsHovered] = useState(false);
|
|
45
57
|
const [showCancelConfirm, setShowCancelConfirm] = useState(false);
|
|
46
|
-
const percentage = fileProgress
|
|
47
|
-
const loadedBytes = fileProgress
|
|
48
|
-
const totalBytes = fileProgress.fileSizeBytes || fileProgress
|
|
58
|
+
const percentage = fileProgress.percentage || 0;
|
|
59
|
+
const loadedBytes = fileProgress.loadedBytes || 0;
|
|
60
|
+
const totalBytes = fileProgress.fileSizeBytes || fileProgress.totalBytes || 0;
|
|
49
61
|
const isCompleted = percentage === 100 || fileProgress.status === "completed";
|
|
50
62
|
const isCancelled = fileProgress.status === "cancelled";
|
|
51
63
|
const isFailed = fileProgress.status === "failed";
|
|
52
|
-
const
|
|
53
|
-
const
|
|
54
|
-
const
|
|
64
|
+
const isSettled = isCompleted || isCancelled || isFailed;
|
|
65
|
+
const isUploading = fileProgress.status === "uploading" || !isSettled;
|
|
66
|
+
const canCancel = !!fileProgress.abortController && !isSettled;
|
|
55
67
|
const handleCancelClick = (e) => {
|
|
56
68
|
e.stopPropagation();
|
|
57
69
|
setShowCancelConfirm(true);
|
|
@@ -92,7 +104,11 @@ function FileProgressBar({ fileProgress, fileName, progressBarColorScheme, onCan
|
|
|
92
104
|
children: /* @__PURE__ */ jsxs("div", {
|
|
93
105
|
className: cx("w-full bg-(--theme-border) rounded-full overflow-hidden transition-all duration-300 ease-in-out flex items-center", isHovered && !isCompleted ? "h-6" : "h-2"),
|
|
94
106
|
children: [/* @__PURE__ */ jsx("div", {
|
|
95
|
-
className: cx("h-full transition-all duration-300 relative flex items-center justify-center", barColor
|
|
107
|
+
className: cx("h-full transition-all duration-300 relative flex items-center justify-center", barColor({
|
|
108
|
+
isCompleted,
|
|
109
|
+
isCancelled,
|
|
110
|
+
isFailed
|
|
111
|
+
}), isHovered && "opacity-80"),
|
|
96
112
|
style: { width: `${percentage}%` }
|
|
97
113
|
}), isHovered && !isCompleted && totalBytes > 0 && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("div", {
|
|
98
114
|
className: "absolute inset-0 flex items-center justify-center text-xs whitespace-nowrap p-0.5 z-10",
|
|
@@ -125,7 +141,7 @@ function FileProgressBar({ fileProgress, fileName, progressBarColorScheme, onCan
|
|
|
125
141
|
className: "p-1 rounded-full hover:bg-red-100 relative cursor-pointer",
|
|
126
142
|
onClick: handleCancelClick,
|
|
127
143
|
title: `Cancel ${fileName}`,
|
|
128
|
-
children: /* @__PURE__ */ jsx(
|
|
144
|
+
children: /* @__PURE__ */ jsx(IoMdClose, { className: "w-4 h-4 text-red-500 hover:text-red-700" })
|
|
129
145
|
}),
|
|
130
146
|
showCancelConfirm && canCancel && /* @__PURE__ */ jsxs("div", {
|
|
131
147
|
className: "flex items-center gap-1",
|
|
@@ -157,29 +173,24 @@ function UploadSessionToast({ session, queueLength, onCancel, onCancelFile }) {
|
|
|
157
173
|
const [isToastExpanded, setIsToastExpanded] = useState(false);
|
|
158
174
|
const [isFileListExpanded, setIsExpanded] = useState(session.uploadNodes.length <= 3);
|
|
159
175
|
const [showCancelConfirm, setShowCancelConfirm] = useState(false);
|
|
160
|
-
const statusInfo =
|
|
161
|
-
session,
|
|
162
|
-
queueLength,
|
|
163
|
-
strings
|
|
164
|
-
]);
|
|
176
|
+
const statusInfo = getSessionStatusInfo(session, queueLength, strings);
|
|
165
177
|
const targetPath = `${session.targetPath}/`;
|
|
166
|
-
const isQueued = session.status === "queued";
|
|
167
178
|
const isCompleted = session.status === "completed";
|
|
168
179
|
const isCancelled = session.status === "cancelled";
|
|
169
180
|
const isFailed = session.status === "failed";
|
|
170
|
-
const isUploading =
|
|
181
|
+
const isUploading = !isCompleted && !isCancelled && !isFailed;
|
|
171
182
|
const totalProgress = session.progress?.overallProgress || 0;
|
|
172
183
|
const totalSize = session.progress?.totalSizeBytes || 0;
|
|
173
|
-
const
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
};
|
|
179
|
-
const barColor = isCompleted ? progressBarColorScheme.completed : isCancelled ? progressBarColorScheme.cancelled : isFailed ? progressBarColorScheme.failed : progressBarColorScheme.uploading;
|
|
184
|
+
const sessionBarColor = barColor({
|
|
185
|
+
isCompleted,
|
|
186
|
+
isCancelled,
|
|
187
|
+
isFailed
|
|
188
|
+
});
|
|
180
189
|
const allFiles = session.progress?.allFiles ? Array.from(session.progress.allFiles.values()) : [];
|
|
181
|
-
const
|
|
182
|
-
const
|
|
190
|
+
const singleFile = allFiles[0];
|
|
191
|
+
const singleNode = session.uploadNodes.length === 1 ? session.uploadNodes[0] : void 0;
|
|
192
|
+
const uploadingFiles = allFiles.filter((file) => (file.percentage ?? 0) > 0 && (file.percentage ?? 0) < 100);
|
|
193
|
+
const shouldShowSessionCancelButton = !showCancelConfirm && isUploading && session.uploadNodes.length > 1;
|
|
183
194
|
const estimatedSecondsLeft = session.progress?.estimatedSecondsLeft;
|
|
184
195
|
const showETA = isUploading && estimatedSecondsLeft && estimatedSecondsLeft > 0;
|
|
185
196
|
const handleExpandClick = (e) => {
|
|
@@ -226,7 +237,7 @@ function UploadSessionToast({ session, queueLength, onCancel, onCancelFile }) {
|
|
|
226
237
|
className: "flex items-center justify-between text-xs theme-muted-text hover:theme-text cursor-pointer",
|
|
227
238
|
onClick: handleExpandClick,
|
|
228
239
|
title: strings.expandDetails,
|
|
229
|
-
children: /* @__PURE__ */ jsx(
|
|
240
|
+
children: /* @__PURE__ */ jsx(BiExpandVertical, { className: "w-4 h-4" })
|
|
230
241
|
})]
|
|
231
242
|
})]
|
|
232
243
|
}),
|
|
@@ -251,7 +262,7 @@ function UploadSessionToast({ session, queueLength, onCancel, onCancelFile }) {
|
|
|
251
262
|
children: /* @__PURE__ */ jsx("div", {
|
|
252
263
|
className: "flex-1 h-1.5 bg-(--theme-border) rounded-full overflow-hidden",
|
|
253
264
|
children: /* @__PURE__ */ jsx("div", {
|
|
254
|
-
className: cx("h-full transition-all duration-300",
|
|
265
|
+
className: cx("h-full transition-all duration-300", sessionBarColor),
|
|
255
266
|
style: { width: `${totalProgress}%` }
|
|
256
267
|
})
|
|
257
268
|
})
|
|
@@ -287,7 +298,7 @@ function UploadSessionToast({ session, queueLength, onCancel, onCancelFile }) {
|
|
|
287
298
|
className: "flex items-center justify-between text-xs theme-muted-text hover:theme-text cursor-pointer mr-2",
|
|
288
299
|
onClick: handleExpandClick,
|
|
289
300
|
title: strings.minimizeDetails,
|
|
290
|
-
children: /* @__PURE__ */ jsx(
|
|
301
|
+
children: /* @__PURE__ */ jsx(VscChromeMinimize, { className: "w-4 h-4" })
|
|
291
302
|
})]
|
|
292
303
|
}),
|
|
293
304
|
/* @__PURE__ */ jsx("div", {
|
|
@@ -317,13 +328,13 @@ function UploadSessionToast({ session, queueLength, onCancel, onCancelFile }) {
|
|
|
317
328
|
className: "mb-4 p-3 bg-amber-50 border border-amber-200 rounded-lg",
|
|
318
329
|
children: /* @__PURE__ */ jsxs("div", {
|
|
319
330
|
className: "flex gap-2",
|
|
320
|
-
children: [/* @__PURE__ */ jsx(
|
|
331
|
+
children: [/* @__PURE__ */ jsx(TbAlertTriangle, { className: "w-4 h-4 text-amber-600 flex-shrink-0 mt-0.5" }), /* @__PURE__ */ jsx("p", {
|
|
321
332
|
className: "text-xs text-amber-800",
|
|
322
333
|
children: "Please don't refresh this page during upload to prevent any data loss."
|
|
323
334
|
})]
|
|
324
335
|
})
|
|
325
336
|
}),
|
|
326
|
-
session.uploadNodes.length > 1 &&
|
|
337
|
+
session.uploadNodes.length > 1 && isUploading && /* @__PURE__ */ jsxs("div", {
|
|
327
338
|
className: "space-y-2",
|
|
328
339
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
329
340
|
className: "flex items-center justify-between text-xs theme-muted-text",
|
|
@@ -331,7 +342,7 @@ function UploadSessionToast({ session, queueLength, onCancel, onCancelFile }) {
|
|
|
331
342
|
}), /* @__PURE__ */ jsx("div", {
|
|
332
343
|
className: "h-2 w-full bg-(--theme-border) rounded-full overflow-hidden",
|
|
333
344
|
children: /* @__PURE__ */ jsx("div", {
|
|
334
|
-
className: cx("h-full transition-all duration-300",
|
|
345
|
+
className: cx("h-full transition-all duration-300", sessionBarColor),
|
|
335
346
|
style: { width: `${totalProgress}%` }
|
|
336
347
|
})
|
|
337
348
|
})]
|
|
@@ -342,7 +353,7 @@ function UploadSessionToast({ session, queueLength, onCancel, onCancelFile }) {
|
|
|
342
353
|
type: "button",
|
|
343
354
|
className: "flex items-center justify-between text-xs theme-muted-text hover:theme-text cursor-pointer",
|
|
344
355
|
onClick: () => setIsExpanded(!isFileListExpanded),
|
|
345
|
-
children: [/* @__PURE__ */ jsxs("span", { children: [session.uploadNodes.length, " files"] }), isFileListExpanded ? /* @__PURE__ */ jsx(
|
|
356
|
+
children: [/* @__PURE__ */ jsxs("span", { children: [session.uploadNodes.length, " files"] }), isFileListExpanded ? /* @__PURE__ */ jsx(FaAngleUp, { className: "w-4 h-4" }) : /* @__PURE__ */ jsx(FaAngleDown, { className: "w-4 h-4" })]
|
|
346
357
|
}), isFileListExpanded && /* @__PURE__ */ jsx("div", {
|
|
347
358
|
className: "max-h-48 overflow-y-auto space-y-2",
|
|
348
359
|
children: session.uploadNodes.map((node) => {
|
|
@@ -351,17 +362,15 @@ function UploadSessionToast({ session, queueLength, onCancel, onCancelFile }) {
|
|
|
351
362
|
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(FileProgressBar, {
|
|
352
363
|
fileProgress,
|
|
353
364
|
fileName: node.name,
|
|
354
|
-
progressBarColorScheme,
|
|
355
365
|
onCancelFile: () => onCancelFile?.(node.relativePath)
|
|
356
366
|
}) }, node.relativePath);
|
|
357
367
|
})
|
|
358
368
|
})]
|
|
359
369
|
}),
|
|
360
|
-
|
|
361
|
-
fileProgress:
|
|
362
|
-
fileName:
|
|
363
|
-
|
|
364
|
-
onCancelFile: () => onCancelFile?.(session.uploadNodes[0].relativePath)
|
|
370
|
+
singleNode && singleFile && /* @__PURE__ */ jsx(FileProgressBar, {
|
|
371
|
+
fileProgress: singleFile,
|
|
372
|
+
fileName: singleNode.name,
|
|
373
|
+
onCancelFile: () => onCancelFile?.(singleNode.relativePath)
|
|
365
374
|
}),
|
|
366
375
|
/* @__PURE__ */ jsxs("div", {
|
|
367
376
|
className: "flex items-center justify-end",
|
|
@@ -5,13 +5,14 @@ import { useField, useFormikContext } from "formik";
|
|
|
5
5
|
//#region src/form/Fields/BooleanField.tsx
|
|
6
6
|
function BooleanField(props) {
|
|
7
7
|
const { field, label, labelPosition, missing, disabled, onChange, tooltipComponent, spaceCompact, setFormDirty } = props;
|
|
8
|
-
const
|
|
8
|
+
const fieldName = field.name ?? "";
|
|
9
|
+
const [fieldState] = useField(fieldName);
|
|
9
10
|
const { setFieldValue, setFieldTouched } = useFormikContext();
|
|
10
11
|
const handleChange = (val) => {
|
|
11
12
|
if (disabled) return;
|
|
12
|
-
|
|
13
|
-
setFieldTouched(
|
|
14
|
-
setFieldValue(
|
|
13
|
+
onChange?.(val);
|
|
14
|
+
setFieldTouched(fieldName, true);
|
|
15
|
+
setFieldValue(fieldName, val);
|
|
15
16
|
setFormDirty(true);
|
|
16
17
|
};
|
|
17
18
|
const value = fieldState.value;
|
|
@@ -13,7 +13,8 @@ function union(manual, forced) {
|
|
|
13
13
|
return [...manual, ...[...forced].filter((v) => !manual.includes(v))];
|
|
14
14
|
}
|
|
15
15
|
function CheckboxGroupField({ field, label, labelPosition, missing, disabled, onChange, tooltipComponent, spaceCompact, setFormDirty }) {
|
|
16
|
-
const
|
|
16
|
+
const fieldName = field.name ?? "";
|
|
17
|
+
const [fieldState] = useField(fieldName);
|
|
17
18
|
const { setFieldValue, setFieldTouched } = useFormikContext();
|
|
18
19
|
const implies = field.implies;
|
|
19
20
|
const [manual, setManual] = useState(() => {
|
|
@@ -27,9 +28,9 @@ function CheckboxGroupField({ field, label, labelPosition, missing, disabled, on
|
|
|
27
28
|
const nextManual = manual.includes(value) ? manual.filter((v) => v !== value) : [...manual, value];
|
|
28
29
|
const next = union(nextManual, impliedFrom(nextManual, implies));
|
|
29
30
|
setManual(nextManual);
|
|
30
|
-
setFieldTouched(
|
|
31
|
-
setFieldValue(
|
|
32
|
-
|
|
31
|
+
setFieldTouched(fieldName, true);
|
|
32
|
+
setFieldValue(fieldName, next);
|
|
33
|
+
onChange?.(next);
|
|
33
34
|
setFormDirty(true);
|
|
34
35
|
};
|
|
35
36
|
return /* @__PURE__ */ jsx(FieldWrapper, {
|
|
@@ -4,13 +4,14 @@ import { Field, useField, useFormikContext } from "formik";
|
|
|
4
4
|
//#region src/form/Fields/ColorField.tsx
|
|
5
5
|
function ColorField(props) {
|
|
6
6
|
const { field, label, labelPosition, onChange, tooltipComponent, spaceCompact } = props;
|
|
7
|
-
const
|
|
7
|
+
const fieldName = field.name ?? "";
|
|
8
|
+
const [fieldState] = useField(fieldName);
|
|
8
9
|
const { setFieldValue, setFieldTouched } = useFormikContext();
|
|
9
10
|
const handleChange = (e) => {
|
|
10
11
|
const val = e.target.value;
|
|
11
|
-
|
|
12
|
-
setFieldTouched(
|
|
13
|
-
setFieldValue(
|
|
12
|
+
onChange?.(val);
|
|
13
|
+
setFieldTouched(fieldName, true);
|
|
14
|
+
setFieldValue(fieldName, val);
|
|
14
15
|
};
|
|
15
16
|
return /* @__PURE__ */ jsx(FieldWrapper, {
|
|
16
17
|
optional: field.optional,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { FieldWrapper } from "../FieldWrapper.js";
|
|
2
2
|
import FormikCustomDropdown_default from "../SpecialTypes/FormikCustomDropdown.js";
|
|
3
3
|
import { getPlaceholder } from "../utils/getPlaceholder.js";
|
|
4
|
+
import { dependentOptions } from "../utils/dependentOptions.js";
|
|
4
5
|
import { jsx } from "react/jsx-runtime";
|
|
5
6
|
//#region src/form/Fields/DropdownField.tsx
|
|
7
|
+
var missingSetter = () => {
|
|
8
|
+
throw new Error("DropdownField needs setFieldValue and setFieldTouched");
|
|
9
|
+
};
|
|
6
10
|
function DropdownField(props) {
|
|
7
|
-
const { field, label, labelPosition, missing, disabled, onChange, tooltipComponent, spaceCompact, setFieldValue, setFieldTouched, currentValue } = props;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
if (field.depends_on) {
|
|
11
|
-
parentValue = field.depends_on;
|
|
12
|
-
if (!Array.isArray(field.options)) options = field.options[parentValue] ?? [];
|
|
13
|
-
}
|
|
11
|
+
const { field, label, labelPosition, missing, disabled, onChange, tooltipComponent, spaceCompact, setFieldValue, setFieldTouched, currentValue, values } = props;
|
|
12
|
+
const fieldName = field.name ?? "";
|
|
13
|
+
const { options } = dependentOptions(field.options, field.depends_on, values);
|
|
14
14
|
const secondaryField = Array.isArray(field.secondaryField) ? field.secondaryField[0] : field.secondaryField;
|
|
15
15
|
return /* @__PURE__ */ jsx(FieldWrapper, {
|
|
16
16
|
optional: field.optional,
|
|
@@ -24,23 +24,20 @@ function DropdownField(props) {
|
|
|
24
24
|
children: /* @__PURE__ */ jsx(FormikCustomDropdown_default, {
|
|
25
25
|
invalid: missing,
|
|
26
26
|
className: "w-full",
|
|
27
|
-
name:
|
|
27
|
+
name: fieldName,
|
|
28
28
|
ariaLabel: label,
|
|
29
29
|
options,
|
|
30
30
|
setFormDirty: props.setFormDirty,
|
|
31
|
-
parentValue,
|
|
32
31
|
onChange,
|
|
33
32
|
secondaryField,
|
|
34
33
|
disabled,
|
|
35
|
-
resetOnChange: field.resetOnChange ? field.name : "",
|
|
36
|
-
loading: false,
|
|
37
34
|
autoselect: field.autoselect,
|
|
38
35
|
allowCustomValue: field.allowCustomValue,
|
|
39
36
|
customValueLabel: field.customValueLabel,
|
|
40
37
|
placeholder: getPlaceholder(field.placeholder, typeof field.default === "string" ? field.default : void 0),
|
|
41
38
|
currentValue,
|
|
42
|
-
setFieldValue,
|
|
43
|
-
setFieldTouched
|
|
39
|
+
setFieldValue: setFieldValue ?? missingSetter,
|
|
40
|
+
setFieldTouched: setFieldTouched ?? missingSetter
|
|
44
41
|
}, field.name)
|
|
45
42
|
})
|
|
46
43
|
});
|
|
@@ -15,7 +15,7 @@ var toDisplay = (value) => {
|
|
|
15
15
|
};
|
|
16
16
|
var DurationField_default = memo(function DurationField({ field, label, labelPosition, missing, disabled, onChange, tooltipComponent, spaceCompact, setFormDirty, currentValue, setFieldValue, setFieldTouched }) {
|
|
17
17
|
const { form: t } = useStrings();
|
|
18
|
-
const name = field.name;
|
|
18
|
+
const name = field.name ?? "";
|
|
19
19
|
const min = field.min !== void 0 ? Number(field.min) : Number.NEGATIVE_INFINITY;
|
|
20
20
|
const max = field.max !== void 0 ? Number(field.max) : Number.POSITIVE_INFINITY;
|
|
21
21
|
const disableValue = field.disableValue;
|
|
@@ -57,7 +57,7 @@ var DurationField_default = memo(function DurationField({ field, label, labelPos
|
|
|
57
57
|
setFormDirty(true);
|
|
58
58
|
if (checked) {
|
|
59
59
|
setText("");
|
|
60
|
-
flushToFormik(disableValue);
|
|
60
|
+
if (disableValue !== void 0) flushToFormik(disableValue);
|
|
61
61
|
} else flushToFormik(typeof field.default === "number" ? field.default : "");
|
|
62
62
|
};
|
|
63
63
|
const handleChange = (e) => {
|
|
@@ -6,12 +6,12 @@ function LabelField(props) {
|
|
|
6
6
|
return /* @__PURE__ */ jsx("div", {
|
|
7
7
|
className: "flex items-center w-full",
|
|
8
8
|
children: /* @__PURE__ */ jsx("h3", {
|
|
9
|
-
style:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
9
|
+
style: {
|
|
10
|
+
whiteSpace: "pre-wrap",
|
|
11
|
+
...field.size ? { fontSize: `${field.size}px` } : {}
|
|
12
|
+
},
|
|
13
13
|
className: cx("relative", "text-md", field.bold !== false ? "font-bold" : ""),
|
|
14
|
-
children: field.text
|
|
14
|
+
children: field.text?.toString().replace(/(\r)/g, "").replace(/(\\n)/g, "\n") || label
|
|
15
15
|
})
|
|
16
16
|
});
|
|
17
17
|
}
|
|
@@ -15,4 +15,4 @@ export interface IMultiDropdownField extends BaseField {
|
|
|
15
15
|
}>>;
|
|
16
16
|
parentValue?: string | boolean | number;
|
|
17
17
|
}
|
|
18
|
-
export default function MultiDropdownField({ field, label, tooltipComponent, labelPosition, spaceCompact, disabled, missing, setFormDirty, onChange, }: FieldComponentProps<IMultiDropdownField>): import("react").JSX.Element;
|
|
18
|
+
export default function MultiDropdownField({ field, label, tooltipComponent, labelPosition, spaceCompact, disabled, missing, setFormDirty, onChange, values, }: FieldComponentProps<IMultiDropdownField>): import("react").JSX.Element;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { FieldWrapper } from "../FieldWrapper.js";
|
|
2
|
+
import { dependentOptions } from "../utils/dependentOptions.js";
|
|
2
3
|
import { MultiSelectionDropdown } from "../Form.js";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
import { Field } from "formik";
|
|
5
6
|
//#region src/form/Fields/MultiDropdownField.tsx
|
|
6
|
-
function MultiDropdownField({ field, label, tooltipComponent, labelPosition, spaceCompact, disabled, missing, setFormDirty, onChange }) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
if (!Array.isArray(field.options)) options = field.options[parentValue] || [];
|
|
12
|
-
}
|
|
7
|
+
function MultiDropdownField({ field, label, tooltipComponent, labelPosition, spaceCompact, disabled, missing, setFormDirty, onChange, values }) {
|
|
8
|
+
const fieldName = field.name ?? "";
|
|
9
|
+
const dependent = dependentOptions(field.options, field.depends_on, values);
|
|
10
|
+
const { options } = dependent;
|
|
11
|
+
const parentValue = field.depends_on ? dependent.parentValue : field.parentValue;
|
|
13
12
|
return /* @__PURE__ */ jsx(FieldWrapper, {
|
|
14
13
|
optional: field.optional,
|
|
15
14
|
label,
|
|
@@ -24,14 +23,12 @@ function MultiDropdownField({ field, label, tooltipComponent, labelPosition, spa
|
|
|
24
23
|
disabled: true,
|
|
25
24
|
onChange
|
|
26
25
|
}, field.name) : /* @__PURE__ */ jsx(MultiSelectionDropdown, {
|
|
27
|
-
|
|
28
|
-
name: field.name,
|
|
26
|
+
name: fieldName,
|
|
29
27
|
label: field.label || label,
|
|
30
|
-
options
|
|
28
|
+
options,
|
|
31
29
|
setFormDirty,
|
|
32
30
|
parentValue,
|
|
33
31
|
onChange,
|
|
34
|
-
secondaryField: typeof field.secondaryField === "string" ? field.secondaryField : void 0,
|
|
35
32
|
invalid: missing
|
|
36
33
|
}, field.name)
|
|
37
34
|
});
|
|
@@ -8,14 +8,15 @@ import { useField, useFormikContext } from "formik";
|
|
|
8
8
|
//#region src/form/Fields/NumberField.tsx
|
|
9
9
|
function NumberField(props) {
|
|
10
10
|
const { field, label, labelPosition, missing, disabled, onChange, tooltipComponent, spaceCompact } = props;
|
|
11
|
-
const
|
|
11
|
+
const fieldName = field.name ?? "";
|
|
12
|
+
const [fieldState] = useField(fieldName);
|
|
12
13
|
const { setFieldValue } = useFormikContext();
|
|
13
14
|
useEffect(() => {
|
|
14
|
-
if (field.prefillDefault && field.default !== void 0 && (fieldState.value === void 0 || fieldState.value === null || fieldState.value === "")) setFieldValue(
|
|
15
|
+
if (field.prefillDefault && field.default !== void 0 && (fieldState.value === void 0 || fieldState.value === null || fieldState.value === "")) setFieldValue(fieldName, field.default);
|
|
15
16
|
}, [
|
|
16
17
|
field.prefillDefault,
|
|
17
18
|
field.default,
|
|
18
|
-
|
|
19
|
+
fieldName,
|
|
19
20
|
fieldState.value,
|
|
20
21
|
setFieldValue
|
|
21
22
|
]);
|
|
@@ -27,7 +28,7 @@ function NumberField(props) {
|
|
|
27
28
|
spaceCompact,
|
|
28
29
|
children: field.thousandsSeparator ? /* @__PURE__ */ jsx(FormikNumericInput, {
|
|
29
30
|
invalid: missing,
|
|
30
|
-
name:
|
|
31
|
+
name: fieldName,
|
|
31
32
|
placeholder: getPlaceholder(field.placeholder, field.default),
|
|
32
33
|
disabled,
|
|
33
34
|
min: field.min,
|
|
@@ -35,7 +36,7 @@ function NumberField(props) {
|
|
|
35
36
|
...onChange && { onChange }
|
|
36
37
|
}, field.name) : /* @__PURE__ */ jsx(FormikCustomInput, {
|
|
37
38
|
invalid: missing,
|
|
38
|
-
name:
|
|
39
|
+
name: fieldName,
|
|
39
40
|
type: "number",
|
|
40
41
|
placeholder: getPlaceholder(field.placeholder, field.default),
|
|
41
42
|
disabled,
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { FieldComponentProps } from '../types/fieldComponentTypes.js';
|
|
3
2
|
import type { BaseField, DynamicFormSchema } from '../types/fieldTypes.js';
|
|
4
3
|
export interface IObjectField extends BaseField {
|
|
5
4
|
type: 'object';
|
|
6
5
|
options: DynamicFormSchema;
|
|
7
6
|
}
|
|
8
|
-
export default function ObjectField({ field, label, tooltipComponent, missingFields, setFormDirty, workflowForm, labelPosition, spaceCompact, }: FieldComponentProps<IObjectField>):
|
|
7
|
+
export default function ObjectField({ field, label, tooltipComponent, missingFields, setFormDirty, workflowForm, labelPosition, spaceCompact, }: FieldComponentProps<IObjectField>): import("react").JSX.Element;
|