@parallelworks/ui 0.43.0 → 0.45.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 +348 -25
- package/dist/ai/agent/diff.d.ts +2 -1
- package/dist/ai/agent/diff.js +4 -12
- package/dist/ai/agent/diffHighlight.d.ts +1 -1
- package/dist/ai/agent/diffHighlight.js +4 -3
- package/dist/ai/agent/index.d.ts +2 -1
- package/dist/ai/agent/toolStrings.d.ts +37 -0
- package/dist/ai/agent/toolStrings.js +35 -0
- package/dist/ai/agent/toolfmt.d.ts +8 -3
- package/dist/ai/agent/toolfmt.js +50 -65
- package/dist/ai/ai.css +18 -31
- package/dist/ai/components/AllocationSelector.js +2 -2
- package/dist/ai/components/AttachmentManager.js +28 -29
- package/dist/ai/components/AttachmentUpload.js +25 -30
- package/dist/ai/components/BlockedGroupBanner.js +2 -2
- package/dist/ai/components/BranchNavigator.js +3 -4
- package/dist/ai/components/ChatEmptyState.js +8 -7
- package/dist/ai/components/ChatInput.js +10 -12
- package/dist/ai/components/ChatLayout.js +3 -3
- package/dist/ai/components/ChatMessage.js +49 -61
- package/dist/ai/components/ChatMessageList.js +46 -42
- package/dist/ai/components/ChatSidebar.js +26 -34
- package/dist/ai/components/ChatStage.js +1 -1
- package/dist/ai/components/ComposerChrome.js +3 -4
- package/dist/ai/components/DragOverlay.js +6 -4
- package/dist/ai/components/ModelSelector.js +14 -15
- package/dist/ai/components/PastedText.js +18 -14
- package/dist/ai/components/ProviderIssueBanner.js +3 -4
- package/dist/ai/components/Reasoning.d.ts +12 -6
- package/dist/ai/components/Reasoning.js +31 -18
- package/dist/ai/components/ShareDialog.js +25 -28
- package/dist/ai/components/SlashMenu.js +3 -3
- package/dist/ai/components/agent/ActivityLine.d.ts +0 -5
- package/dist/ai/components/agent/ActivityLine.js +17 -54
- package/dist/ai/components/agent/AgentMessageParts.js +139 -149
- package/dist/ai/components/conversationActions.js +16 -16
- package/dist/ai/core/ChatProvider.d.ts +2 -4
- package/dist/ai/core/ChatProvider.js +25 -38
- package/dist/ai/core/exportConversation.js +4 -4
- package/dist/ai/core/sidebarState.d.ts +8 -6
- package/dist/ai/core/sidebarState.js +21 -28
- package/dist/ai/core/useKeyboardShortcuts.js +14 -5
- package/dist/ai/index.d.ts +4 -5
- package/dist/ai/index.js +7 -7
- package/dist/ai/strings.d.ts +14 -31
- package/dist/ai/strings.js +19 -39
- package/dist/ai/types.d.ts +0 -5
- package/dist/ai/ui/ConversationSidebar.d.ts +12 -9
- package/dist/ai/ui/ConversationSidebar.js +43 -87
- package/dist/ai/ui/Markdown.d.ts +3 -6
- package/dist/ai/ui/Markdown.js +6 -73
- package/dist/ai/ui/Notice.js +10 -12
- package/dist/ai/ui/chip.d.ts +2 -2
- package/dist/ai/ui/chip.js +1 -1
- package/dist/ai/ui/sidebar.d.ts +4 -20
- package/dist/ai/ui/sidebar.js +30 -67
- package/dist/ai/utils.d.ts +0 -1
- package/dist/ai/utils.js +1 -14
- package/dist/brandIcons.d.ts +51 -0
- package/dist/brandIcons.js +75 -0
- package/dist/components/Avatar.d.ts +3 -1
- package/dist/components/Avatar.js +34 -28
- package/dist/components/Button.d.ts +12 -7
- package/dist/components/Button.js +39 -44
- package/dist/components/Callout.js +18 -12
- package/dist/components/Card.d.ts +18 -8
- package/dist/components/Card.js +17 -6
- package/dist/components/Checkbox.d.ts +9 -0
- package/dist/components/Checkbox.js +30 -0
- package/dist/components/Combobox.d.ts +9 -1
- package/dist/components/Combobox.js +71 -44
- package/dist/components/ConfirmModal.js +11 -11
- package/dist/components/ContextMenu.d.ts +2 -8
- package/dist/components/ContextMenu.js +2 -29
- package/dist/components/CopyToClipboard.js +17 -36
- package/dist/components/CreateModal.d.ts +3 -24
- package/dist/components/CreateModal.js +46 -113
- package/dist/components/DatePicker.d.ts +31 -0
- package/dist/components/DatePicker.js +191 -0
- package/dist/components/DescriptionList.js +4 -4
- package/dist/components/Disclosure.d.ts +34 -0
- package/dist/components/Disclosure.js +46 -0
- package/dist/components/Drawer.d.ts +47 -0
- package/dist/components/Drawer.js +120 -0
- package/dist/components/EmptyState.d.ts +15 -10
- package/dist/components/EmptyState.js +13 -8
- package/dist/components/ExternalLink.d.ts +8 -0
- package/dist/components/ExternalLink.js +29 -0
- package/dist/components/Field.d.ts +70 -0
- package/dist/components/Field.js +159 -0
- package/dist/components/HoverCard.js +11 -14
- package/dist/components/IconButton.d.ts +16 -13
- package/dist/components/IconButton.js +27 -18
- package/dist/components/InfoTip.js +16 -23
- package/dist/components/Input.d.ts +10 -9
- package/dist/components/Input.js +54 -96
- package/dist/components/LetterBadge.js +2 -2
- package/dist/components/Loader.d.ts +15 -8
- package/dist/components/Loader.js +29 -19
- package/dist/components/Markdown.d.ts +7 -1
- package/dist/components/Markdown.js +2 -0
- package/dist/components/MarkdownImpl.d.ts +1 -1
- package/dist/components/MarkdownImpl.js +55 -14
- package/dist/components/Menu.js +13 -15
- package/dist/components/MenuEntries.js +11 -16
- package/dist/components/Meter.d.ts +48 -0
- package/dist/components/Meter.js +94 -0
- package/dist/components/Modal.js +11 -14
- package/dist/components/NumberInput.d.ts +25 -0
- package/dist/components/NumberInput.js +55 -0
- package/dist/components/Overview.js +12 -10
- package/dist/components/PageHeader.d.ts +2 -3
- package/dist/components/PageHeader.js +30 -21
- package/dist/components/Pagination.d.ts +27 -14
- package/dist/components/Pagination.js +86 -25
- package/dist/components/Popover.d.ts +47 -0
- package/dist/components/Popover.js +63 -0
- package/dist/components/Provider.d.ts +197 -80
- package/dist/components/Provider.js +200 -118
- package/dist/components/Radio.d.ts +1 -1
- package/dist/components/Radio.js +4 -4
- package/dist/components/RefreshButton.d.ts +15 -0
- package/dist/components/RefreshButton.js +53 -0
- package/dist/components/RunStatusIcon.d.ts +12 -0
- package/dist/components/RunStatusIcon.js +84 -0
- package/dist/components/SearchInput.d.ts +16 -0
- package/dist/components/SearchInput.js +52 -0
- package/dist/components/Section.d.ts +28 -0
- package/dist/components/Section.js +76 -0
- package/dist/components/SegmentedControl.d.ts +7 -11
- package/dist/components/SegmentedControl.js +25 -56
- package/dist/components/Select.d.ts +8 -1
- package/dist/components/Select.js +47 -43
- package/dist/components/SettingModeOption.d.ts +3 -5
- package/dist/components/SettingModeOption.js +5 -6
- package/dist/components/SettingsCard.d.ts +32 -19
- package/dist/components/SettingsCard.js +40 -13
- package/dist/components/Skeleton.d.ts +22 -0
- package/dist/components/Skeleton.js +34 -0
- package/dist/components/Slider.d.ts +16 -0
- package/dist/components/Slider.js +30 -0
- package/dist/components/Sort.js +4 -6
- package/dist/components/StatusBadge.d.ts +3 -1
- package/dist/components/StatusBadge.js +9 -32
- package/dist/components/StatusIcons.d.ts +0 -4
- package/dist/components/StatusIcons.js +5 -13
- package/dist/components/Switch.d.ts +5 -1
- package/dist/components/Switch.js +23 -6
- package/dist/components/Table.js +13 -20
- package/dist/components/Tabs.d.ts +52 -0
- package/dist/components/Tabs.js +75 -0
- package/dist/components/ThemeEditor.d.ts +29 -0
- package/dist/components/ThemeEditor.js +397 -0
- package/dist/components/Toast.d.ts +57 -0
- package/dist/components/Toast.js +203 -0
- package/dist/components/Tooltip.js +12 -15
- package/dist/components/buttonClasses.d.ts +18 -0
- package/dist/components/buttonClasses.js +31 -0
- package/dist/components/codeTheme.d.ts +5 -0
- package/dist/components/codeTheme.js +93 -0
- package/dist/components/fieldBox.d.ts +14 -0
- package/dist/components/fieldBox.js +29 -0
- package/dist/components/floating.d.ts +26 -5
- package/dist/components/floating.js +31 -9
- package/dist/{ai/ui/codeBreaks.js → components/markdownCodeBreaks.js} +1 -1
- package/dist/components/persistedState.d.ts +2 -0
- package/dist/components/persistedState.js +63 -0
- package/dist/components/relativeTime.d.ts +36 -8
- package/dist/components/relativeTime.js +106 -23
- package/dist/components/segmented.d.ts +17 -0
- package/dist/components/segmented.js +27 -0
- package/dist/components/shortcutKey.d.ts +4 -0
- package/dist/components/shortcutKey.js +27 -0
- package/dist/components/splitter.d.ts +26 -0
- package/dist/components/splitter.js +69 -0
- package/dist/components/tone.d.ts +9 -0
- package/dist/components/tone.js +30 -0
- package/dist/components/useCopy.d.ts +14 -0
- package/dist/components/useCopy.js +31 -0
- package/dist/components/useCssIsDark.d.ts +2 -0
- package/dist/components/useCssIsDark.js +2 -1
- package/dist/components/useTheme.d.ts +10 -0
- package/dist/components/useTheme.js +40 -0
- package/dist/cx.d.ts +5 -0
- package/dist/cx.js +11 -0
- package/dist/editor/Editor.js +2 -2
- package/dist/editor/EditorField.js +7 -10
- package/dist/editor/FormCodePanel.js +10 -23
- package/dist/editor/Monaco.js +7 -4
- package/dist/editor/index.d.ts +1 -1
- package/dist/editor/index.js +2 -2
- package/dist/editor/themes.d.ts +4 -0
- package/dist/editor/themes.js +75 -76
- package/dist/file-explorer/FileExplorer.js +180 -187
- package/dist/file-explorer/FileExplorerContext.js +36 -58
- package/dist/file-explorer/FilePreview/CodePreviewEditor.js +2 -1
- package/dist/file-explorer/FilePreview/Inline.js +9 -7
- package/dist/file-explorer/FilePreview/StreamedBadge.js +2 -2
- package/dist/file-explorer/FilePreview/Viewer.js +32 -34
- package/dist/file-explorer/FilePreview/index.js +60 -92
- package/dist/file-explorer/FileRow.js +10 -15
- package/dist/file-explorer/FileRowsWindow.js +2 -6
- package/dist/file-explorer/FileTable.js +2 -2
- package/dist/file-explorer/FileTableHeaders.js +8 -11
- package/dist/file-explorer/LoadMoreRow.js +8 -9
- package/dist/file-explorer/TreeView.js +16 -16
- package/dist/file-explorer/helpers.d.ts +1 -4
- package/dist/file-explorer/helpers.js +101 -114
- package/dist/file-explorer/lib/utils.d.ts +0 -2
- package/dist/file-explorer/lib/utils.js +1 -25
- package/dist/file-explorer/toasts.js +104 -185
- package/dist/form/Fields/BooleanField.js +12 -14
- package/dist/form/Fields/CheckboxGroupField.d.ts +1 -1
- package/dist/form/Fields/CheckboxGroupField.js +16 -18
- package/dist/form/Fields/ColorField.js +11 -11
- package/dist/form/Fields/DropdownField.d.ts +1 -1
- package/dist/form/Fields/DropdownField.js +20 -36
- package/dist/form/Fields/DurationField.d.ts +1 -1
- package/dist/form/Fields/DurationField.js +36 -50
- package/dist/form/Fields/LabelField.js +2 -2
- package/dist/form/Fields/MultiDropdownField.d.ts +1 -1
- package/dist/form/Fields/MultiDropdownField.js +9 -14
- package/dist/form/Fields/NumberField.d.ts +1 -1
- package/dist/form/Fields/NumberField.js +13 -48
- package/dist/form/Fields/ObjectField.js +3 -3
- package/dist/form/Fields/RadioField.d.ts +1 -1
- package/dist/form/Fields/RadioField.js +15 -18
- package/dist/form/Fields/RangeField.js +34 -35
- package/dist/form/Fields/StringField.d.ts +1 -1
- package/dist/form/Fields/StringField.js +15 -25
- package/dist/form/Fields/TextAreaField.js +10 -15
- package/dist/form/Form.d.ts +7 -2
- package/dist/form/Form.js +144 -49
- package/dist/form/FormLayout.js +18 -12
- package/dist/form/Wizard/WizardContainer.js +44 -18
- package/dist/form/Wizard/WizardNavigation.d.ts +1 -1
- package/dist/form/Wizard/WizardNavigation.js +31 -56
- package/dist/form/Wizard/WizardStepIndicator.d.ts +3 -0
- package/dist/form/Wizard/WizardStepIndicator.js +98 -114
- package/dist/form/Wizard/types.d.ts +2 -2
- package/dist/form/fieldFrame.d.ts +7 -0
- package/dist/form/fieldFrame.js +19 -0
- package/dist/form/index.d.ts +5 -5
- package/dist/form/index.js +4 -6
- package/dist/form/layoutCSS.js +5 -4
- package/dist/form/types/fieldComponentTypes.d.ts +5 -3
- package/dist/form/useChoiceField.js +2 -3
- package/dist/form/useFieldValue.d.ts +3 -0
- package/dist/form/useFieldValue.js +24 -7
- package/dist/form/utils/duration.d.ts +2 -2
- package/dist/form/utils/duration.js +3 -3
- package/dist/form/utils/fieldPath.d.ts +5 -3
- package/dist/form/utils/fieldPath.js +18 -3
- package/dist/form/utils/secondaryField.d.ts +0 -7
- package/dist/form/utils/secondaryField.js +1 -12
- package/dist/form/validation.d.ts +29 -0
- package/dist/form/validation.js +14 -0
- package/dist/format.d.ts +28 -0
- package/dist/format.js +64 -0
- package/dist/graph/AnnotationBanner.js +20 -31
- package/dist/graph/Connectors.js +1 -1
- package/dist/graph/DependencyGraph.js +51 -65
- package/dist/graph/GraphEditor.js +24 -28
- package/dist/graph/GraphEditorDialogs.js +239 -245
- package/dist/graph/InputDialog.js +93 -112
- package/dist/graph/InputsEditor.js +83 -84
- package/dist/graph/JobSummary.js +10 -11
- package/dist/graph/MatrixGroup.js +3 -3
- package/dist/graph/ProblemsButton.js +9 -10
- package/dist/graph/ShortcutsButton.js +12 -17
- package/dist/graph/SuggestionInput.d.ts +1 -2
- package/dist/graph/SuggestionInput.js +1 -3
- package/dist/graph/TreeView.js +47 -45
- package/dist/graph/WorkflowSettingsDialog.js +97 -102
- package/dist/graph/editorChrome.js +10 -12
- package/dist/graph/editorFields.d.ts +19 -16
- package/dist/graph/editorFields.js +97 -135
- package/dist/graph/editorPrimitives.js +2 -2
- package/dist/graph/editorRows.js +22 -25
- package/dist/graph/editorStrings.d.ts +16 -19
- package/dist/graph/editorStrings.js +11 -23
- package/dist/graph/fieldProblems.js +2 -2
- package/dist/graph/graphEditorState.d.ts +4 -4
- package/dist/graph/inputRefs.d.ts +0 -13
- package/dist/graph/inputRefs.js +121 -159
- package/dist/graph/settingsViews.js +5 -3
- package/dist/graph/stepWith.js +100 -100
- package/dist/graph/toolbarPanel.d.ts +8 -0
- package/dist/graph/toolbarPanel.js +11 -0
- package/dist/icons.d.ts +234 -23
- package/dist/icons.js +249 -264
- package/dist/index.d.ts +38 -21
- package/dist/index.js +42 -21
- package/dist/list/ActionToolbar.d.ts +1 -5
- package/dist/list/ActionToolbar.js +21 -20
- package/dist/list/ListPage.js +7 -7
- package/dist/list/ListTable.d.ts +3 -2
- package/dist/list/ListTable.js +33 -29
- package/dist/list/ListViewControls.d.ts +0 -17
- package/dist/list/ListViewControls.js +50 -118
- package/dist/list/UserHoverCard.js +24 -32
- package/dist/list/index.d.ts +2 -4
- package/dist/list/index.js +3 -5
- package/dist/list/listSearch.d.ts +1 -1
- package/dist/list/listSearch.js +19 -14
- package/dist/list/rowMenu.js +20 -26
- package/dist/logviewer/LogViewer.js +268 -382
- package/dist/logviewer/logviewer.css +53 -41
- package/dist/styles/base.css +16 -40
- package/dist/styles/theme.css +75 -106
- package/dist/styles.css +1 -1
- package/dist/theme/color.d.ts +40 -0
- package/dist/theme/color.js +228 -0
- package/dist/theme/contrast.d.ts +42 -0
- package/dist/theme/contrast.js +145 -0
- package/dist/theme/derive.d.ts +25 -0
- package/dist/theme/derive.js +475 -0
- package/dist/theme/fit.d.ts +35 -0
- package/dist/theme/fit.js +185 -0
- package/dist/theme/index.d.ts +14 -29
- package/dist/theme/index.js +20 -279
- package/dist/theme/model.d.ts +64 -0
- package/dist/theme/model.js +219 -0
- package/package.json +9 -5
- package/dist/ai/ui/Avatar.d.ts +0 -7
- package/dist/ai/ui/Avatar.js +0 -24
- package/dist/components/Filter.d.ts +0 -15
- package/dist/components/Filter.js +0 -32
- package/dist/components/FilterPill.d.ts +0 -7
- package/dist/components/FilterPill.js +0 -14
- package/dist/components/Indicator.d.ts +0 -4
- package/dist/components/Indicator.js +0 -44
- package/dist/components/SectionHeader.d.ts +0 -8
- package/dist/components/SectionHeader.js +0 -11
- package/dist/components/SettingRow.d.ts +0 -18
- package/dist/components/SettingRow.js +0 -35
- package/dist/components/SettingsGroup.d.ts +0 -8
- package/dist/components/SettingsGroup.js +0 -17
- package/dist/components/ghostButton.d.ts +0 -4
- package/dist/components/ghostButton.js +0 -7
- package/dist/components/inputClasses.d.ts +0 -1
- package/dist/components/inputClasses.js +0 -4
- package/dist/duration.d.ts +0 -3
- package/dist/duration.js +0 -17
- package/dist/form/FieldGroup.d.ts +0 -11
- package/dist/form/FieldGroup.js +0 -36
- package/dist/form/FieldWrapper.d.ts +0 -16
- package/dist/form/FieldWrapper.js +0 -55
- package/dist/form/fieldContext.d.ts +0 -19
- package/dist/form/fieldContext.js +0 -26
- package/dist/graph/Collapse.d.ts +0 -7
- package/dist/graph/Collapse.js +0 -15
- package/dist/graph/ToolbarPopover.d.ts +0 -13
- package/dist/graph/ToolbarPopover.js +0 -39
- package/dist/icons/ai/AiOutlineRollback.js +0 -16
- package/dist/icons/bi/BiBell.js +0 -16
- package/dist/icons/bi/BiBellOff.js +0 -16
- package/dist/icons/bi/BiBuildings.js +0 -20
- package/dist/icons/bi/BiError.js +0 -20
- package/dist/icons/bi/BiExpandVertical.js +0 -16
- package/dist/icons/bi/BiPause.js +0 -16
- package/dist/icons/bi/BiPlay.js +0 -16
- package/dist/icons/bi/BiRedo.js +0 -16
- package/dist/icons/bi/BiSolidCheckShield.js +0 -16
- package/dist/icons/bi/BiSolidTrashAlt.js +0 -16
- package/dist/icons/bi/BiStop.js +0 -16
- package/dist/icons/bi/BiUndo.js +0 -16
- package/dist/icons/bs/BsArrowsCollapse.js +0 -22
- package/dist/icons/bs/BsBank2.js +0 -19
- package/dist/icons/bs/BsBriefcase.js +0 -19
- package/dist/icons/bs/BsBucket.js +0 -19
- package/dist/icons/bs/BsCalendarX.js +0 -23
- package/dist/icons/bs/BsChatLeft.js +0 -19
- package/dist/icons/bs/BsChevronDoubleDown.js +0 -29
- package/dist/icons/bs/BsChevronDoubleUp.js +0 -29
- package/dist/icons/bs/BsClipboardCheck.js +0 -34
- package/dist/icons/bs/BsCurrencyDollar.js +0 -19
- package/dist/icons/bs/BsDash.js +0 -19
- package/dist/icons/bs/BsFileEarmarkZip.js +0 -23
- package/dist/icons/bs/BsFiles.js +0 -19
- package/dist/icons/bs/BsGeoAlt.js +0 -23
- package/dist/icons/bs/BsGrid.js +0 -19
- package/dist/icons/bs/BsLayers.js +0 -19
- package/dist/icons/bs/BsLayoutThreeColumns.js +0 -19
- package/dist/icons/bs/BsListUl.js +0 -22
- package/dist/icons/bs/BsMortarboard.js +0 -23
- package/dist/icons/bs/BsMusicNoteBeamed.js +0 -34
- package/dist/icons/bs/BsOpenai.js +0 -19
- package/dist/icons/bs/BsPersonPlus.js +0 -26
- package/dist/icons/bs/BsSearch.js +0 -19
- package/dist/icons/bs/BsSend.js +0 -19
- package/dist/icons/bs/BsShieldSlash.js +0 -22
- package/dist/icons/bs/BsStar.js +0 -19
- package/dist/icons/bs/BsStarFill.js +0 -19
- package/dist/icons/bs/BsStopCircle.js +0 -23
- package/dist/icons/bs/BsTag.js +0 -23
- package/dist/icons/bs/BsTelephone.js +0 -19
- package/dist/icons/bs/BsTerminal.js +0 -23
- package/dist/icons/bs/BsTerminalFill.js +0 -19
- package/dist/icons/bs/BsThreeDots.js +0 -19
- package/dist/icons/bs/BsThreeDotsVertical.js +0 -19
- package/dist/icons/bs/BsZoomIn.js +0 -37
- package/dist/icons/fa/FaAmazon.js +0 -16
- package/dist/icons/fa/FaAngleDown.js +0 -16
- package/dist/icons/fa/FaAngleLeft.js +0 -16
- package/dist/icons/fa/FaAngleRight.js +0 -16
- package/dist/icons/fa/FaAngleUp.js +0 -16
- package/dist/icons/fa/FaArrowDown.js +0 -16
- package/dist/icons/fa/FaArrowLeft.js +0 -16
- package/dist/icons/fa/FaArrowRight.js +0 -16
- package/dist/icons/fa/FaArrowUp.js +0 -16
- package/dist/icons/fa/FaBalanceScale.js +0 -16
- package/dist/icons/fa/FaCaretDown.js +0 -16
- package/dist/icons/fa/FaCentos.js +0 -16
- package/dist/icons/fa/FaChartLine.js +0 -16
- package/dist/icons/fa/FaChartPie.js +0 -16
- package/dist/icons/fa/FaCheck.js +0 -16
- package/dist/icons/fa/FaChevronDown.js +0 -16
- package/dist/icons/fa/FaChevronUp.js +0 -16
- package/dist/icons/fa/FaChrome.js +0 -16
- package/dist/icons/fa/FaCircleNotch.js +0 -16
- package/dist/icons/fa/FaCloud.js +0 -16
- package/dist/icons/fa/FaCloudDownloadAlt.js +0 -16
- package/dist/icons/fa/FaCog.js +0 -16
- package/dist/icons/fa/FaCogs.js +0 -16
- package/dist/icons/fa/FaComments.js +0 -16
- package/dist/icons/fa/FaCompress.js +0 -16
- package/dist/icons/fa/FaDesktop.js +0 -16
- package/dist/icons/fa/FaDocker.js +0 -16
- package/dist/icons/fa/FaDollarSign.js +0 -16
- package/dist/icons/fa/FaEdge.js +0 -16
- package/dist/icons/fa/FaEdit.js +0 -16
- package/dist/icons/fa/FaExclamationTriangle.js +0 -16
- package/dist/icons/fa/FaExpand.js +0 -16
- package/dist/icons/fa/FaEye.js +0 -16
- package/dist/icons/fa/FaEyeSlash.js +0 -16
- package/dist/icons/fa/FaFile.js +0 -16
- package/dist/icons/fa/FaFilePdf.js +0 -16
- package/dist/icons/fa/FaFilter.js +0 -16
- package/dist/icons/fa/FaFirefoxBrowser.js +0 -16
- package/dist/icons/fa/FaFlask.js +0 -16
- package/dist/icons/fa/FaFolder.js +0 -16
- package/dist/icons/fa/FaGithub.js +0 -16
- package/dist/icons/fa/FaGitlab.js +0 -16
- package/dist/icons/fa/FaGlobe.js +0 -16
- package/dist/icons/fa/FaGlobeAmericas.js +0 -16
- package/dist/icons/fa/FaImage.js +0 -16
- package/dist/icons/fa/FaInfoCircle.js +0 -16
- package/dist/icons/fa/FaKey.js +0 -16
- package/dist/icons/fa/FaLayerGroup.js +0 -16
- package/dist/icons/fa/FaLink.js +0 -16
- package/dist/icons/fa/FaLinkedin.js +0 -16
- package/dist/icons/fa/FaLinux.js +0 -16
- package/dist/icons/fa/FaList.js +0 -16
- package/dist/icons/fa/FaLock.js +0 -16
- package/dist/icons/fa/FaOpenid.js +0 -16
- package/dist/icons/fa/FaOpera.js +0 -16
- package/dist/icons/fa/FaPaperclip.js +0 -16
- package/dist/icons/fa/FaPlus.js +0 -16
- package/dist/icons/fa/FaPowerOff.js +0 -16
- package/dist/icons/fa/FaPrint.js +0 -16
- package/dist/icons/fa/FaQrcode.js +0 -16
- package/dist/icons/fa/FaQuestionCircle.js +0 -16
- package/dist/icons/fa/FaRedhat.js +0 -16
- package/dist/icons/fa/FaRegCircle.js +0 -16
- package/dist/icons/fa/FaRegFileImage.js +0 -16
- package/dist/icons/fa/FaRegFolder.js +0 -16
- package/dist/icons/fa/FaRobot.js +0 -16
- package/dist/icons/fa/FaRocket.js +0 -16
- package/dist/icons/fa/FaRunning.js +0 -16
- package/dist/icons/fa/FaSafari.js +0 -16
- package/dist/icons/fa/FaSave.js +0 -16
- package/dist/icons/fa/FaSearch.js +0 -16
- package/dist/icons/fa/FaShieldAlt.js +0 -16
- package/dist/icons/fa/FaSlack.js +0 -16
- package/dist/icons/fa/FaStar.js +0 -16
- package/dist/icons/fa/FaStop.js +0 -16
- package/dist/icons/fa/FaSuse.js +0 -16
- package/dist/icons/fa/FaTerminal.js +0 -16
- package/dist/icons/fa/FaTimes.js +0 -16
- package/dist/icons/fa/FaUbuntu.js +0 -16
- package/dist/icons/fa/FaUndoAlt.js +0 -16
- package/dist/icons/fa/FaUnlink.js +0 -16
- package/dist/icons/fa/FaUser.js +0 -16
- package/dist/icons/fa/FaUsers.js +0 -16
- package/dist/icons/fa/FaWindows.js +0 -16
- package/dist/icons/fa6/FaApple.js +0 -16
- package/dist/icons/fa6/FaArrowsRotate.js +0 -16
- package/dist/icons/fa6/FaDebian.js +0 -16
- package/dist/icons/fa6/FaFilterCircleXmark.js +0 -16
- package/dist/icons/fa6/FaInbox.js +0 -16
- package/dist/icons/fa6/FaLocationDot.js +0 -16
- package/dist/icons/fa6/FaRegFilePdf.js +0 -16
- package/dist/icons/fa6/FaRegFolderOpen.js +0 -16
- package/dist/icons/fa6/FaUpRightFromSquare.js +0 -16
- package/dist/icons/fa6/FaWandMagicSparkles.js +0 -16
- package/dist/icons/fa6/FaXTwitter.js +0 -16
- package/dist/icons/fi/FiActivity.js +0 -23
- package/dist/icons/fi/FiAlertCircle.js +0 -49
- package/dist/icons/fi/FiChevronDown.js +0 -23
- package/dist/icons/fi/FiClock.js +0 -31
- package/dist/icons/fi/FiCopy.js +0 -34
- package/dist/icons/fi/FiDownload.js +0 -40
- package/dist/icons/fi/FiFile.js +0 -27
- package/dist/icons/fi/FiFileText.js +0 -55
- package/dist/icons/fi/FiHardDrive.js +0 -55
- package/dist/icons/fi/FiRotateCcw.js +0 -27
- package/dist/icons/fi/FiUpload.js +0 -40
- package/dist/icons/fi/FiX.js +0 -37
- package/dist/icons/fi/FiZap.js +0 -23
- package/dist/icons/gi/GiSpy.js +0 -16
- package/dist/icons/go/GoGitCommit.js +0 -16
- package/dist/icons/go/GoGitPullRequest.js +0 -20
- package/dist/icons/go/GoIssueOpened.js +0 -16
- package/dist/icons/go/GoPlus.js +0 -16
- package/dist/icons/go/GoRepoForked.js +0 -28
- package/dist/icons/go/GoSignOut.js +0 -16
- package/dist/icons/go/GoSkip.js +0 -20
- package/dist/icons/go/GoVideo.js +0 -20
- package/dist/icons/gr/GrCloudComputer.js +0 -20
- package/dist/icons/gr/GrInbox.js +0 -20
- package/dist/icons/gr/GrServerCluster.js +0 -20
- package/dist/icons/gr/GrStorage.js +0 -20
- package/dist/icons/gr/GrTasks.js +0 -20
- package/dist/icons/hi/HiCog.js +0 -24
- package/dist/icons/hi/HiDuplicate.js +0 -24
- package/dist/icons/hi/HiOutlineArchive.js +0 -26
- package/dist/icons/hi/HiOutlineClipboardCopy.js +0 -26
- package/dist/icons/hi/HiOutlineHome.js +0 -26
- package/dist/icons/hi/HiQuestionMarkCircle.js +0 -24
- package/dist/icons/hi/HiServer.js +0 -24
- package/dist/icons/hi2/HiMiniCheckCircle.js +0 -24
- package/dist/icons/hi2/HiMiniLanguage.js +0 -28
- package/dist/icons/hi2/HiMiniMinusCircle.js +0 -24
- package/dist/icons/hi2/HiMiniXCircle.js +0 -24
- package/dist/icons/hi2/HiSparkles.js +0 -24
- package/dist/icons/im/ImSpinner5.js +0 -19
- package/dist/icons/io/IoIosNotifications.js +0 -16
- package/dist/icons/io/IoMdBuild.js +0 -16
- package/dist/icons/io/IoMdClose.js +0 -16
- package/dist/icons/io5/IoCloudUploadOutline.js +0 -32
- package/dist/icons/io5/IoDocumentTextOutline.js +0 -31
- package/dist/icons/io5/IoFileTrayFullOutline.js +0 -31
- package/dist/icons/io5/IoHeart.js +0 -16
- package/dist/icons/io5/IoHeartDislike.js +0 -16
- package/dist/icons/io5/IoHeartOutline.js +0 -22
- package/dist/icons/io5/IoInformationCircleOutline.js +0 -50
- package/dist/icons/io5/IoSettingsOutline.js +0 -22
- package/dist/icons/io5/IoWarningOutline.js +0 -40
- package/dist/icons/lu/LuArrowRight.js +0 -27
- package/dist/icons/lu/LuBadgeCheck.js +0 -27
- package/dist/icons/lu/LuBraces.js +0 -27
- package/dist/icons/lu/LuBrainCircuit.js +0 -101
- package/dist/icons/lu/LuCalendar.js +0 -46
- package/dist/icons/lu/LuCheck.js +0 -23
- package/dist/icons/lu/LuChevronLeft.js +0 -23
- package/dist/icons/lu/LuChevronRight.js +0 -23
- package/dist/icons/lu/LuCode.js +0 -27
- package/dist/icons/lu/LuExternalLink.js +0 -35
- package/dist/icons/lu/LuEye.js +0 -31
- package/dist/icons/lu/LuEyeOff.js +0 -40
- package/dist/icons/lu/LuFolderTree.js +0 -40
- package/dist/icons/lu/LuIdCard.js +0 -55
- package/dist/icons/lu/LuKeyboard.js +0 -71
- package/dist/icons/lu/LuLogs.js +0 -65
- package/dist/icons/lu/LuMail.js +0 -33
- package/dist/icons/lu/LuMegaphone.js +0 -27
- package/dist/icons/lu/LuMoon.js +0 -23
- package/dist/icons/lu/LuNetwork.js +0 -63
- package/dist/icons/lu/LuPartyPopper.js +0 -65
- package/dist/icons/lu/LuSettings2.js +0 -48
- package/dist/icons/lu/LuSheet.js +0 -72
- package/dist/icons/lu/LuShield.js +0 -23
- package/dist/icons/lu/LuSun.js +0 -69
- package/dist/icons/lu/LuTextCursorInput.js +0 -45
- package/dist/icons/lu/LuX.js +0 -27
- package/dist/icons/lu/LuZoomIn.js +0 -59
- package/dist/icons/lu/LuZoomOut.js +0 -49
- package/dist/icons/md/MdClear.js +0 -23
- package/dist/icons/md/MdDragHandle.js +0 -23
- package/dist/icons/md/MdInstallDesktop.js +0 -31
- package/dist/icons/md/MdOutlineAttachMoney.js +0 -23
- package/dist/icons/md/MdOutlineMoneyOff.js +0 -23
- package/dist/icons/md/MdPieChart.js +0 -23
- package/dist/icons/md/MdRefresh.js +0 -23
- package/dist/icons/md/MdReplay.js +0 -23
- package/dist/icons/md/MdSmartphone.js +0 -23
- package/dist/icons/pi/PiArrowBendUpRightBold.js +0 -19
- package/dist/icons/pi/PiPlugsConnectedFill.js +0 -19
- package/dist/icons/pi/PiRectangleDashed.js +0 -19
- package/dist/icons/pi/PiShareBold.js +0 -19
- package/dist/icons/si/SiAnthropic.js +0 -19
- package/dist/icons/si/SiHelm.js +0 -19
- package/dist/icons/si/SiKubernetes.js +0 -19
- package/dist/icons/tb/TbAlertTriangle.js +0 -35
- package/dist/icons/tb/TbAlertTriangleFilled.js +0 -19
- package/dist/icons/tb/TbApi.js +0 -40
- package/dist/icons/tb/TbBrain.js +0 -50
- package/dist/icons/tb/TbBuildingTunnel.js +0 -65
- package/dist/icons/tb/TbEdit.js +0 -35
- package/dist/icons/tb/TbLayoutSidebar.js +0 -27
- package/dist/icons/tb/TbLayoutSidebarLeftCollapse.js +0 -35
- package/dist/icons/tb/TbLayoutSidebarRightCollapse.js +0 -35
- package/dist/icons/tb/TbUser.js +0 -27
- package/dist/icons/tb/TbUserOff.js +0 -35
- package/dist/icons/tb/TbWorldShare.js +0 -55
- package/dist/icons/tb/TbWorldWww.js +0 -65
- package/dist/icons/ti/TiArrowSortedDown.js +0 -20
- package/dist/icons/ti/TiArrowSortedUp.js +0 -20
- package/dist/icons/ti/TiArrowUnsorted.js +0 -20
- package/dist/icons/ti/TiCancel.js +0 -20
- package/dist/icons/vsc/VscChromeMinimize.js +0 -19
- package/dist/icons/vsc/VscJson.js +0 -19
- package/dist/icons/vsc/VscLayoutSidebarLeft.js +0 -19
- package/dist/icons/vsc/VscPass.js +0 -27
- package/dist/icons/vsc/VscSplitHorizontal.js +0 -19
- package/dist/icons/vsc/VscTerminalPowershell.js +0 -19
- package/dist/list/ListPager.d.ts +0 -14
- package/dist/list/ListPager.js +0 -62
- package/dist/list/textEntry.d.ts +0 -2
- package/dist/list/textEntry.js +0 -10
- /package/dist/{ai/ui/codeBreaks.d.ts → components/markdownCodeBreaks.d.ts} +0 -0
|
@@ -1,28 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { FaArrowUp } from "../icons/fa/FaArrowUp.js";
|
|
4
|
-
import { FaEdit } from "../icons/fa/FaEdit.js";
|
|
5
|
-
import { IoMdClose } from "../icons/io/IoMdClose.js";
|
|
1
|
+
import { cx } from "../cx.js";
|
|
2
|
+
import { ArrowDownIcon, ArrowUpIcon, EditIcon, RemoveIcon, TrashIcon } from "../icons.js";
|
|
6
3
|
import { withPositionKeys } from "../components/keys.js";
|
|
7
4
|
import { useWorkflowEditing, useWorkflowEngine } from "../components/Provider.js";
|
|
5
|
+
import { Checkbox, CheckboxGroup } from "../components/Checkbox.js";
|
|
8
6
|
import { Combobox } from "../components/Combobox.js";
|
|
9
|
-
import {
|
|
7
|
+
import { ErrorText, Field, FieldOption } from "../components/Field.js";
|
|
10
8
|
import { IconButton } from "../components/IconButton.js";
|
|
11
9
|
import { Input, Textarea } from "../components/Input.js";
|
|
12
10
|
import { useGraphEditorStrings, useInputsEditorStrings } from "./editorStrings.js";
|
|
13
11
|
import { asRecord } from "./records.js";
|
|
14
12
|
import { INPUT_YAML_PATH } from "../editor/settingsYaml.js";
|
|
15
|
-
import {
|
|
16
|
-
import { AddRowButton, ChoiceButtons, DialogShell, EXPRESSION, ExpressionToggle,
|
|
13
|
+
import { SuggestionInput } from "./SuggestionInput.js";
|
|
14
|
+
import { AddRowButton, ChoiceButtons, DialogSection, DialogShell, EXPRESSION, ExpressionToggle, GrowingTextarea, KeyHint, SectionMemory, StringListEditor, SuggestedInput, ToggleField, YamlField, diffPatch, expressionError, flagError, isEmptyPatch, isScalar, labelled, parseJson, parseScalar, sameValue, text, unchangedValue, useSectionMemory, withoutUndefined } from "./editorFields.js";
|
|
17
15
|
import { FlagField, ValueOrInputField, inputRefs } from "./inputRefs.js";
|
|
18
|
-
import {
|
|
16
|
+
import { formatDurationText, parseDurationText } from "../form/utils/duration.js";
|
|
19
17
|
import { FormEditingContext } from "../form/formEditing.js";
|
|
20
18
|
import { DynamicForm } from "../form/Form.js";
|
|
21
19
|
import { withInputLayouts } from "./inputLayout.js";
|
|
22
20
|
import { NO_SCOPED, ViewSwitch, YamlPane, yamlProblem } from "./settingsViews.js";
|
|
23
|
-
import { clsx } from "clsx";
|
|
24
21
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
25
|
-
import { useEffect,
|
|
22
|
+
import { useEffect, useMemo, useRef, useState } from "react";
|
|
26
23
|
//#region src/graph/InputDialog.tsx
|
|
27
24
|
/** Input types by menu group, in the order the add menu lists them. */
|
|
28
25
|
var INPUT_TYPE_GROUPS = [
|
|
@@ -813,7 +810,7 @@ function OptionsEditor({ draft, onChange, error, keyed, described }) {
|
|
|
813
810
|
})
|
|
814
811
|
}),
|
|
815
812
|
/* @__PURE__ */ jsx(IconButton, {
|
|
816
|
-
icon: /* @__PURE__ */ jsx(
|
|
813
|
+
icon: /* @__PURE__ */ jsx(RemoveIcon, {}),
|
|
817
814
|
label: t.removeOption,
|
|
818
815
|
variant: "ghost",
|
|
819
816
|
size: "sm",
|
|
@@ -856,7 +853,7 @@ function OptionsEditor({ draft, onChange, error, keyed, described }) {
|
|
|
856
853
|
text: e.target.value
|
|
857
854
|
})
|
|
858
855
|
})] }),
|
|
859
|
-
/* @__PURE__ */ jsx(
|
|
856
|
+
/* @__PURE__ */ jsx(ErrorText, { children: error })
|
|
860
857
|
]
|
|
861
858
|
});
|
|
862
859
|
}
|
|
@@ -872,28 +869,28 @@ function ImpliesEditor({ draft, options, onChange }) {
|
|
|
872
869
|
children: t.impliesNeedsOptions
|
|
873
870
|
});
|
|
874
871
|
const nameOf = (value) => listed.find((option) => option.value === value)?.label.trim() || value;
|
|
875
|
-
const toggle = (from, to) => {
|
|
876
|
-
const current = draft[from] ?? [];
|
|
877
|
-
onChange({
|
|
878
|
-
...draft,
|
|
879
|
-
[from]: current.includes(to) ? current.filter((value) => value !== to) : [...current, to]
|
|
880
|
-
});
|
|
881
|
-
};
|
|
882
872
|
return /* @__PURE__ */ jsx("div", {
|
|
883
873
|
className: "flex flex-col gap-2",
|
|
884
|
-
children: listed.map((option) =>
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
874
|
+
children: listed.map((option) => {
|
|
875
|
+
const when = t.impliesWhen(nameOf(option.value));
|
|
876
|
+
return /* @__PURE__ */ jsxs(CheckboxGroup, {
|
|
877
|
+
"aria-label": when,
|
|
878
|
+
value: draft[option.value] ?? [],
|
|
879
|
+
onValueChange: (next) => onChange({
|
|
880
|
+
...draft,
|
|
881
|
+
[option.value]: next
|
|
882
|
+
}),
|
|
883
|
+
className: "flex flex-wrap items-center gap-x-3 gap-y-1.5",
|
|
884
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
885
|
+
"aria-hidden": "true",
|
|
886
|
+
className: "mr-1 text-sm font-medium",
|
|
887
|
+
children: when
|
|
888
|
+
}), listed.filter((other) => other.value !== option.value).map((other) => /* @__PURE__ */ jsxs(FieldOption, {
|
|
889
|
+
className: "flex items-center gap-1.5 text-sm",
|
|
890
|
+
children: [/* @__PURE__ */ jsx(Checkbox, { value: other.value }), nameOf(other.value)]
|
|
891
|
+
}, other.value))]
|
|
892
|
+
}, option.value);
|
|
893
|
+
})
|
|
897
894
|
});
|
|
898
895
|
}
|
|
899
896
|
/** A duration's checkbox that sends a set value in place of a time, such as -1 for none. */
|
|
@@ -936,45 +933,31 @@ function OptOutCheckbox({ label, value, onLabel, onValue, errors }) {
|
|
|
936
933
|
}
|
|
937
934
|
function TypeSelect({ value, onChange, allowStep, disabled }) {
|
|
938
935
|
const t = useInputsEditorStrings();
|
|
939
|
-
const id = useId();
|
|
940
936
|
const types = t.types;
|
|
941
937
|
const help = t.typeHelp;
|
|
942
|
-
return /* @__PURE__ */
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
value: type
|
|
966
|
-
}))
|
|
967
|
-
})),
|
|
968
|
-
itemToStringLabel: (type) => types[type] ?? type,
|
|
969
|
-
onValueChange: (next) => {
|
|
970
|
-
if (next) onChange(next);
|
|
971
|
-
}
|
|
972
|
-
}),
|
|
973
|
-
/* @__PURE__ */ jsx("span", {
|
|
974
|
-
className: "text-xs text-(--theme-muted-text-color)",
|
|
975
|
-
children: help[value] ?? t.help.type
|
|
976
|
-
})
|
|
977
|
-
]
|
|
938
|
+
return /* @__PURE__ */ jsx(Field, {
|
|
939
|
+
label: t.inputType,
|
|
940
|
+
hint: /* @__PURE__ */ jsx(KeyHint, {
|
|
941
|
+
label: t.inputType,
|
|
942
|
+
yamlKey: "type"
|
|
943
|
+
}),
|
|
944
|
+
description: help[value] ?? t.help.type,
|
|
945
|
+
children: (control) => /* @__PURE__ */ jsx(Combobox, {
|
|
946
|
+
...control,
|
|
947
|
+
value,
|
|
948
|
+
disabled,
|
|
949
|
+
items: INPUT_TYPE_GROUPS.map(([group, list]) => ({
|
|
950
|
+
label: t.typeGroups[group],
|
|
951
|
+
items: list.filter((type) => allowStep || type !== "step" || value === "step").map((type) => ({
|
|
952
|
+
label: types[type] ?? type,
|
|
953
|
+
value: type
|
|
954
|
+
}))
|
|
955
|
+
})),
|
|
956
|
+
itemToStringLabel: (type) => types[type] ?? type,
|
|
957
|
+
onValueChange: (next) => {
|
|
958
|
+
if (next) onChange(next);
|
|
959
|
+
}
|
|
960
|
+
})
|
|
978
961
|
});
|
|
979
962
|
}
|
|
980
963
|
var SCALAR_KINDS = /* @__PURE__ */ new Set([
|
|
@@ -1013,7 +996,7 @@ function draftOf(kind, value) {
|
|
|
1013
996
|
expression: void 0,
|
|
1014
997
|
rows: Array.isArray(value) ? value.map(asRecord) : []
|
|
1015
998
|
};
|
|
1016
|
-
case "duration": return typeof value === "number" && value >= 0 ?
|
|
999
|
+
case "duration": return typeof value === "number" && value >= 0 ? formatDurationText(value) : text(value);
|
|
1017
1000
|
case "number": return typeof value === "string" && value.trim() !== "" && !EXPRESSION.test(value.trim()) && Number.isFinite(Number(value)) ? JSON.stringify(value) : text(value);
|
|
1018
1001
|
case "perCopy": return Array.isArray(value) ? {
|
|
1019
1002
|
list: true,
|
|
@@ -1082,7 +1065,7 @@ function writtenValue(kind, draft, context = {}) {
|
|
|
1082
1065
|
const raw = String(draft ?? "").trim();
|
|
1083
1066
|
if (!raw) return;
|
|
1084
1067
|
if (EXPRESSION.test(raw)) return raw;
|
|
1085
|
-
return
|
|
1068
|
+
return parseDurationText(raw) ?? (/^-\d+$/.test(raw) ? Number(raw) : raw);
|
|
1086
1069
|
}
|
|
1087
1070
|
case "ref":
|
|
1088
1071
|
case "choice": return String(draft ?? "").trim() || void 0;
|
|
@@ -1130,12 +1113,12 @@ function valueError(prop, kind, draft, t, g) {
|
|
|
1130
1113
|
}
|
|
1131
1114
|
case "duration": {
|
|
1132
1115
|
const raw = String(draft ?? "").trim();
|
|
1133
|
-
return raw && !EXPRESSION.test(raw) &&
|
|
1116
|
+
return raw && !EXPRESSION.test(raw) && parseDurationText(raw) === null ? t.invalidDurationText : void 0;
|
|
1134
1117
|
}
|
|
1135
1118
|
case "number": {
|
|
1136
1119
|
const raw = String(draft ?? "").trim();
|
|
1137
1120
|
if (raw && prop.wholeFrom !== void 0) return /^\d+$/.test(raw) && Number(raw) >= prop.wholeFrom ? void 0 : t.wholeNumberFrom(prop.wholeFrom);
|
|
1138
|
-
return raw && !EXPRESSION.test(raw) && !Number.isFinite(Number(raw)) ? t.invalidNumber : void 0;
|
|
1121
|
+
return raw && !EXPRESSION.test(raw) && !Number.isFinite(Number(raw)) ? t.common.invalidNumber : void 0;
|
|
1139
1122
|
}
|
|
1140
1123
|
case "flag": return flagError(draft, g);
|
|
1141
1124
|
case "options": return optionsError(draft, t, g);
|
|
@@ -1211,30 +1194,30 @@ function TemplateFields({ fields, onChange, error, inputs, adopt, home, onDialog
|
|
|
1211
1194
|
}),
|
|
1212
1195
|
/* @__PURE__ */ jsx("div", { className: "flex-1" }),
|
|
1213
1196
|
/* @__PURE__ */ jsx(IconButton, {
|
|
1214
|
-
icon: /* @__PURE__ */ jsx(
|
|
1197
|
+
icon: /* @__PURE__ */ jsx(EditIcon, {}),
|
|
1215
1198
|
label: t.editInput,
|
|
1216
1199
|
variant: "ghost",
|
|
1217
1200
|
size: "sm",
|
|
1218
1201
|
onClick: () => setEditing({ name })
|
|
1219
1202
|
}),
|
|
1220
1203
|
/* @__PURE__ */ jsx(IconButton, {
|
|
1221
|
-
icon: /* @__PURE__ */ jsx(
|
|
1222
|
-
label: t.moveUp,
|
|
1204
|
+
icon: /* @__PURE__ */ jsx(ArrowUpIcon, {}),
|
|
1205
|
+
label: t.common.moveUp,
|
|
1223
1206
|
variant: "ghost",
|
|
1224
1207
|
size: "sm",
|
|
1225
1208
|
disabled: i === 0,
|
|
1226
1209
|
onClick: () => move(i, i - 1)
|
|
1227
1210
|
}),
|
|
1228
1211
|
/* @__PURE__ */ jsx(IconButton, {
|
|
1229
|
-
icon: /* @__PURE__ */ jsx(
|
|
1230
|
-
label: t.moveDown,
|
|
1212
|
+
icon: /* @__PURE__ */ jsx(ArrowDownIcon, {}),
|
|
1213
|
+
label: t.common.moveDown,
|
|
1231
1214
|
variant: "ghost",
|
|
1232
1215
|
size: "sm",
|
|
1233
1216
|
disabled: i === names.length - 1,
|
|
1234
1217
|
onClick: () => move(i, i + 1)
|
|
1235
1218
|
}),
|
|
1236
1219
|
/* @__PURE__ */ jsx(IconButton, {
|
|
1237
|
-
icon: /* @__PURE__ */ jsx(
|
|
1220
|
+
icon: /* @__PURE__ */ jsx(TrashIcon, {}),
|
|
1238
1221
|
label: t.deleteInput,
|
|
1239
1222
|
variant: "ghost",
|
|
1240
1223
|
size: "sm",
|
|
@@ -1249,7 +1232,7 @@ function TemplateFields({ fields, onChange, error, inputs, adopt, home, onDialog
|
|
|
1249
1232
|
]
|
|
1250
1233
|
}, name);
|
|
1251
1234
|
}),
|
|
1252
|
-
/* @__PURE__ */ jsx(
|
|
1235
|
+
/* @__PURE__ */ jsx(ErrorText, { children: error }),
|
|
1253
1236
|
/* @__PURE__ */ jsx(AddRowButton, {
|
|
1254
1237
|
label: t.addField,
|
|
1255
1238
|
onClick: () => setEditing({ create: true })
|
|
@@ -1360,7 +1343,7 @@ function RowsField({ draft, template, label, onChange, error }) {
|
|
|
1360
1343
|
}
|
|
1361
1344
|
}
|
|
1362
1345
|
}, JSON.stringify(template))
|
|
1363
|
-
}), /* @__PURE__ */ jsx(
|
|
1346
|
+
}), /* @__PURE__ */ jsx(ErrorText, { children: error })]
|
|
1364
1347
|
});
|
|
1365
1348
|
}
|
|
1366
1349
|
function PropField({ prop, kind, draft, original, error, onChange, suggestions, inputType, optionRows, source, adopt, allInputs, home, template, inputLabel, onDialog, onFieldKey }) {
|
|
@@ -1394,18 +1377,16 @@ function PropField({ prop, kind, draft, original, error, onChange, suggestions,
|
|
|
1394
1377
|
});
|
|
1395
1378
|
case "bool": {
|
|
1396
1379
|
const fallback = prop.fallback ?? false;
|
|
1397
|
-
return /* @__PURE__ */
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
onChange: (on) => onChange(on !== fallback ? on : original === on ? on : void 0)
|
|
1403
|
-
}), /* @__PURE__ */ jsx(FieldError, { message: error })]
|
|
1380
|
+
return /* @__PURE__ */ jsx(ToggleField, {
|
|
1381
|
+
...field,
|
|
1382
|
+
error,
|
|
1383
|
+
checked: typeof draft === "boolean" ? draft : fallback,
|
|
1384
|
+
onChange: (on) => onChange(on !== fallback ? on : original === on ? on : void 0)
|
|
1404
1385
|
});
|
|
1405
1386
|
}
|
|
1406
1387
|
case "options": {
|
|
1407
1388
|
const options = draft;
|
|
1408
|
-
return /* @__PURE__ */ jsx(
|
|
1389
|
+
return /* @__PURE__ */ jsx(YamlField, {
|
|
1409
1390
|
...field,
|
|
1410
1391
|
actions: /* @__PURE__ */ jsx(ExpressionToggle, {
|
|
1411
1392
|
active: options.mode === "expression",
|
|
@@ -1426,17 +1407,16 @@ function PropField({ prop, kind, draft, original, error, onChange, suggestions,
|
|
|
1426
1407
|
}
|
|
1427
1408
|
case "perCopy": {
|
|
1428
1409
|
const perCopy = draft;
|
|
1429
|
-
return /* @__PURE__ */ jsx(
|
|
1410
|
+
return /* @__PURE__ */ jsx(YamlField, {
|
|
1430
1411
|
...field,
|
|
1431
1412
|
actions: /* @__PURE__ */ jsxs("label", {
|
|
1432
1413
|
className: "flex cursor-pointer items-center gap-1.5 text-xs theme-muted-text",
|
|
1433
|
-
children: [/* @__PURE__ */ jsx(
|
|
1434
|
-
type: "checkbox",
|
|
1414
|
+
children: [/* @__PURE__ */ jsx(Checkbox, {
|
|
1435
1415
|
checked: perCopy.list,
|
|
1436
|
-
|
|
1416
|
+
onCheckedChange: (list) => onChange({
|
|
1437
1417
|
...perCopy,
|
|
1438
|
-
list
|
|
1439
|
-
values:
|
|
1418
|
+
list,
|
|
1419
|
+
values: list && perCopy.values.length === 0 && perCopy.text.trim() ? [perCopy.text] : perCopy.values
|
|
1440
1420
|
})
|
|
1441
1421
|
}), t.onePerCopy]
|
|
1442
1422
|
}),
|
|
@@ -1460,10 +1440,10 @@ function PropField({ prop, kind, draft, original, error, onChange, suggestions,
|
|
|
1460
1440
|
...perCopy,
|
|
1461
1441
|
text: next
|
|
1462
1442
|
})
|
|
1463
|
-
}), /* @__PURE__ */ jsx(
|
|
1443
|
+
}), /* @__PURE__ */ jsx(ErrorText, { children: error })] })
|
|
1464
1444
|
});
|
|
1465
1445
|
}
|
|
1466
|
-
case "values": return /* @__PURE__ */ jsx(
|
|
1446
|
+
case "values": return /* @__PURE__ */ jsx(YamlField, {
|
|
1467
1447
|
...field,
|
|
1468
1448
|
actions: /* @__PURE__ */ jsx(ExpressionToggle, {
|
|
1469
1449
|
active: draft.expression !== void 0,
|
|
@@ -1480,7 +1460,7 @@ function PropField({ prop, kind, draft, original, error, onChange, suggestions,
|
|
|
1480
1460
|
error
|
|
1481
1461
|
})
|
|
1482
1462
|
});
|
|
1483
|
-
case "rows": return /* @__PURE__ */ jsx(
|
|
1463
|
+
case "rows": return /* @__PURE__ */ jsx(YamlField, {
|
|
1484
1464
|
...field,
|
|
1485
1465
|
actions: /* @__PURE__ */ jsx(ExpressionToggle, {
|
|
1486
1466
|
active: draft.expression !== void 0,
|
|
@@ -1506,7 +1486,7 @@ function PropField({ prop, kind, draft, original, error, onChange, suggestions,
|
|
|
1506
1486
|
error,
|
|
1507
1487
|
onChange: (e) => onChange(e.target.value)
|
|
1508
1488
|
});
|
|
1509
|
-
case "template": return /* @__PURE__ */ jsx(
|
|
1489
|
+
case "template": return /* @__PURE__ */ jsx(YamlField, {
|
|
1510
1490
|
...field,
|
|
1511
1491
|
actions: /* @__PURE__ */ jsx(ExpressionToggle, {
|
|
1512
1492
|
active: typeof draft === "string",
|
|
@@ -1529,7 +1509,7 @@ function PropField({ prop, kind, draft, original, error, onChange, suggestions,
|
|
|
1529
1509
|
onFieldKey
|
|
1530
1510
|
})
|
|
1531
1511
|
});
|
|
1532
|
-
case "implies": return /* @__PURE__ */ jsx(
|
|
1512
|
+
case "implies": return /* @__PURE__ */ jsx(YamlField, {
|
|
1533
1513
|
...field,
|
|
1534
1514
|
children: /* @__PURE__ */ jsx(ImpliesEditor, {
|
|
1535
1515
|
draft,
|
|
@@ -1539,16 +1519,17 @@ function PropField({ prop, kind, draft, original, error, onChange, suggestions,
|
|
|
1539
1519
|
});
|
|
1540
1520
|
case "choice": {
|
|
1541
1521
|
const choiceLabels = t.choices[prop.key];
|
|
1542
|
-
return /* @__PURE__ */
|
|
1522
|
+
return /* @__PURE__ */ jsx(YamlField, {
|
|
1543
1523
|
...field,
|
|
1544
|
-
|
|
1524
|
+
error,
|
|
1525
|
+
children: /* @__PURE__ */ jsx(ChoiceButtons, {
|
|
1545
1526
|
options: (prop.choices ?? []).map((choice) => ({
|
|
1546
1527
|
value: choice,
|
|
1547
1528
|
label: choiceLabels?.[choice] ?? choice
|
|
1548
1529
|
})),
|
|
1549
1530
|
value: String(draft ?? "") || (prop.choices?.[0] ?? ""),
|
|
1550
1531
|
onChange
|
|
1551
|
-
})
|
|
1532
|
+
})
|
|
1552
1533
|
});
|
|
1553
1534
|
}
|
|
1554
1535
|
case "json":
|
|
@@ -1801,7 +1782,7 @@ function InputViews({ textual, view, onViewChange, ...props }) {
|
|
|
1801
1782
|
}, version)
|
|
1802
1783
|
});
|
|
1803
1784
|
const nextName = name.trim();
|
|
1804
|
-
const nameError = !editing.isValidInputName(nextName) ? t.
|
|
1785
|
+
const nameError = !editing.isValidInputName(nextName) ? t.common.invalidName : nextName !== props.name && props.siblings.includes(nextName) || newInputs.pending.some((input) => input.name === nextName) ? t.inputExists : void 0;
|
|
1805
1786
|
const dirty = props.isNew || nextName !== props.name || yaml !== opening || newInputs.pending.length > 0;
|
|
1806
1787
|
return /* @__PURE__ */ jsxs(DialogShell, {
|
|
1807
1788
|
title: t.editInput,
|
|
@@ -1836,7 +1817,7 @@ function InputViews({ textual, view, onViewChange, ...props }) {
|
|
|
1836
1817
|
}
|
|
1837
1818
|
function deleteButton(t, { onDelete, onClose }) {
|
|
1838
1819
|
return /* @__PURE__ */ jsx(IconButton, {
|
|
1839
|
-
icon: /* @__PURE__ */ jsx(
|
|
1820
|
+
icon: /* @__PURE__ */ jsx(TrashIcon, {}),
|
|
1840
1821
|
label: t.deleteInput,
|
|
1841
1822
|
variant: "ghost",
|
|
1842
1823
|
size: "sm",
|
|
@@ -1920,7 +1901,7 @@ function InputForm({ name, definition, isNew, siblings, allowStep, inputs, home,
|
|
|
1920
1901
|
const optionValues = type === "dropdown" || type === "radio" ? optionRows.map((row) => row.value) : [];
|
|
1921
1902
|
const slider = type === "number" && valueFor(SLIDER) === true;
|
|
1922
1903
|
const trimmedName = draftName.trim();
|
|
1923
|
-
const errors = { name: !editing.isValidInputName(trimmedName) ? t.
|
|
1904
|
+
const errors = { name: !editing.isValidInputName(trimmedName) ? t.common.invalidName : siblings.includes(trimmedName) || newInputs.pending.some((input) => input.name === trimmedName) ? t.inputExists : void 0 };
|
|
1924
1905
|
for (const prop of props) {
|
|
1925
1906
|
const key = draftKey(prop);
|
|
1926
1907
|
const required = prop.required || keyedDropdown && optionsDraftNow?.mode === "byKey" && prop === OPTION_KEY || slider && [
|
|
@@ -1942,7 +1923,7 @@ function InputForm({ name, definition, isNew, siblings, allowStep, inputs, home,
|
|
|
1942
1923
|
const hasLabel = valueFor(DISABLE_LABEL) !== void 0;
|
|
1943
1924
|
const optOut = valueFor(DISABLE_VALUE);
|
|
1944
1925
|
if (hasLabel !== (optOut !== void 0)) errors[draftKey(hasLabel ? DISABLE_VALUE : DISABLE_LABEL)] = t.disableNeedsBoth;
|
|
1945
|
-
if (typeof optOut === "string") errors[draftKey(DISABLE_VALUE)] = t.invalidNumber;
|
|
1926
|
+
if (typeof optOut === "string") errors[draftKey(DISABLE_VALUE)] = t.common.invalidNumber;
|
|
1946
1927
|
const defaultKey = draftKey(DURATION_DEFAULT);
|
|
1947
1928
|
if (optOut !== void 0 && valueFor(DURATION_DEFAULT) === optOut) errors[defaultKey] = void 0;
|
|
1948
1929
|
}
|
|
@@ -2064,13 +2045,13 @@ function InputForm({ name, definition, isNew, siblings, allowStep, inputs, home,
|
|
|
2064
2045
|
className: "text-xs theme-muted-text",
|
|
2065
2046
|
children: t.typeChangeNote
|
|
2066
2047
|
}),
|
|
2067
|
-
textProps.length > 0 && /* @__PURE__ */ jsx(
|
|
2048
|
+
textProps.length > 0 && /* @__PURE__ */ jsx(DialogSection, {
|
|
2068
2049
|
title: t.sectionField,
|
|
2069
2050
|
open: fieldOpen,
|
|
2070
2051
|
alert: textProps.some(erred),
|
|
2071
2052
|
children: textProps.map(renderProp)
|
|
2072
2053
|
}),
|
|
2073
|
-
settingProps.length > 0 && /* @__PURE__ */ jsx(
|
|
2054
|
+
settingProps.length > 0 && /* @__PURE__ */ jsx(DialogSection, {
|
|
2074
2055
|
title: t.sectionSettings,
|
|
2075
2056
|
open: settingsOpen,
|
|
2076
2057
|
alert: settingProps.some(erred),
|
|
@@ -2085,7 +2066,7 @@ function InputForm({ name, definition, isNew, siblings, allowStep, inputs, home,
|
|
|
2085
2066
|
}
|
|
2086
2067
|
}, "opt-out") : renderProp(prop))
|
|
2087
2068
|
}),
|
|
2088
|
-
behaviorProps.length > 0 && /* @__PURE__ */ jsx(
|
|
2069
|
+
behaviorProps.length > 0 && /* @__PURE__ */ jsx(DialogSection, {
|
|
2089
2070
|
title: t.sectionBehavior,
|
|
2090
2071
|
open: behaviorProps.some(holds),
|
|
2091
2072
|
alert: behaviorProps.some(erred),
|
|
@@ -2099,7 +2080,7 @@ function InputForm({ name, definition, isNew, siblings, allowStep, inputs, home,
|
|
|
2099
2080
|
function TypeBadge({ type }) {
|
|
2100
2081
|
const types = useInputsEditorStrings().types;
|
|
2101
2082
|
return /* @__PURE__ */ jsx("span", {
|
|
2102
|
-
className:
|
|
2083
|
+
className: cx("rounded border theme-border px-1 text-[11px] leading-4 theme-muted-text"),
|
|
2103
2084
|
children: types[type] ?? (type || "?")
|
|
2104
2085
|
});
|
|
2105
2086
|
}
|