@mcp-b/react-components 0.63.0 → 0.64.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/dist/{AgentActivity-DptCj8XQ.d.ts → AgentActivity-Cngwkalq.d.ts} +2 -9
- package/dist/{AgentChatQueue-DG2rGyCI.d.ts → AgentChatQueue-C1TDnVAn.d.ts} +1 -1
- package/dist/{AppTopBar-DwzydmXu.d.ts → AppTopBar-CM57rJID.d.ts} +7 -3
- package/dist/ChatGptSignInScreen-CmbBe09G.js +298 -0
- package/dist/{CodeBlock-BTkag9ms.d.ts → CodeBlock-BDupVceI.d.ts} +1 -1
- package/dist/CodeBlock-dt0L8md0.js +892 -0
- package/dist/{EmployeeChrome--PWdtg4B.d.ts → EmployeeChrome-kegSASjC.d.ts} +6 -5
- package/dist/{ExecutionBoard-DvPGdn4F.d.ts → ExecutionBoard-DBj1Aiva.d.ts} +8 -1
- package/dist/ExecutionResult-CXnGcmM4.js +671 -0
- package/dist/FileTree-CjfzpN6X.js +968 -0
- package/dist/{IconButton-FWsa9562.d.ts → IconButton-DXtGMkMI.d.ts} +7 -5
- package/dist/ManagerOffice-T79utm-P.js +2469 -0
- package/dist/{Menu-FA4P6KrA.d.ts → Menu-DajfQr3T.d.ts} +4 -2
- package/dist/{Message-BUedRDN1.d.ts → Message-BLyl6kWe.d.ts} +2 -2
- package/dist/{PromptInput-Dbe6WgWA.d.ts → PromptInput-DEwFMj6f.d.ts} +5 -8
- package/dist/{ResponsiveSidebarShell-DSAMNDdg.d.ts → ResponsiveSidebarShell-RwvmlMHS.d.ts} +23 -13
- package/dist/SetupChecklist-DwscX3Bw.js +230 -0
- package/dist/{Tabs-BYs-RgJ7.d.ts → Tabs-tyvVX3nc.d.ts} +29 -10
- package/dist/{ThinkChatActivity-zZaSsbC-.d.ts → ThinkChatActivity-C7xnO0Fx.d.ts} +1 -1
- package/dist/{ThinkChatActivitySummary-8MO1VjAJ.d.ts → ThinkChatActivitySummary-Dh4Av7x_.d.ts} +1 -1
- package/dist/{ThinkExecutionRun-DJ2TFDmZ.d.ts → ThinkExecutionRun-QzZVWX75.d.ts} +11 -3
- package/dist/ThinkSchedule-D4Ulsa0-.d.ts +53 -0
- package/dist/{ThinkThreadPicker-BmIZmpae.d.ts → ThinkThreadPicker-O-i2KloZ.d.ts} +1 -1
- package/dist/{Workspace-42LA9Zrb.d.ts → Workspace-B9nuTfIi.d.ts} +1 -1
- package/dist/{WorkspaceAutomation-yDZorXla.d.ts → WorkspaceAutomation-C0fghGLi.d.ts} +3 -3
- package/dist/WorkspaceBrowser-oBJv-Dac.js +985 -0
- package/dist/{WorkspaceConcept-BjrgGE1w.d.ts → WorkspaceConcept-D46cYerS.d.ts} +1 -1
- package/dist/{WorkspaceFile-nK2n0i4S.d.ts → WorkspaceFile-BJC6vlp_.d.ts} +15 -4
- package/dist/WorkspaceFileCommands-SNIjRgtU.d.ts +145 -0
- package/dist/WorkspaceFileTransfer-BRD22nW-.d.ts +159 -0
- package/dist/WorkspaceLink-DDkj-Tq5.js +407 -0
- package/dist/{WorkspaceMessageResponse-BZ-_I18b.js → WorkspaceMessageResponse-CXGOQgpo.js} +111 -24
- package/dist/{agent-tool-runs-DsOp_X2y.js → agent-tool-runs-BXKdcxl8.js} +55 -28
- package/dist/app-bar-outlet-BEIGl9iF.js +35 -0
- package/{LICENSE → dist/assets/desktop/LICENSE.fluent.txt} +1 -1
- package/dist/assets/desktop/LICENSE.mac-icons.txt +7 -0
- package/dist/assets/desktop/README.md +43 -0
- package/dist/assets/desktop/automations.svg +19 -0
- package/dist/assets/desktop/document.svg +24 -0
- package/dist/assets/desktop/folder.png +0 -0
- package/dist/assets/desktop/mail.svg +31 -0
- package/dist/assets/desktop/settings.svg +9 -0
- package/dist/assets/desktop/trash-full.svg +23 -0
- package/dist/assets/desktop/trash.svg +19 -0
- package/dist/attachment-preview-DeRqFjdz.js +68 -0
- package/dist/attempt-CySQHJsF.js +21 -0
- package/dist/command-search-1fjmCBBo.js +34 -0
- package/dist/components/agents-sdk/AIProviderDialog.js +757 -224
- package/dist/components/agents-sdk/AgentActivity.d.ts +2 -2
- package/dist/components/agents-sdk/AgentActivity.js +78 -31
- package/dist/components/agents-sdk/AgentChat.d.ts +3 -3
- package/dist/components/agents-sdk/AgentChat.js +1113 -386
- package/dist/components/agents-sdk/AgentChatQueue.d.ts +1 -1
- package/dist/components/agents-sdk/AgentChatQueue.js +290 -173
- package/dist/components/agents-sdk/AgentComputer.d.ts +270 -0
- package/dist/components/agents-sdk/AgentComputer.js +8045 -0
- package/dist/components/agents-sdk/AgentEvent.js +164 -21
- package/dist/components/agents-sdk/AgentScreenSwitcher.d.ts +46 -0
- package/dist/components/agents-sdk/AgentScreenSwitcher.js +409 -0
- package/dist/components/agents-sdk/AgentToolRunsContext.js +139 -41
- package/dist/components/agents-sdk/BrowserLiveScreen.js +860 -551
- package/dist/components/agents-sdk/BrowserLiveView.d.ts +1 -1
- package/dist/components/agents-sdk/BrowserLiveView.js +244 -88
- package/dist/components/agents-sdk/BrowserReplay.js +298 -133
- package/dist/components/agents-sdk/BrowserRunPanel.d.ts +57 -1
- package/dist/components/agents-sdk/BrowserRunPanel.js +979 -129
- package/dist/components/agents-sdk/DiscordConnectionDialog.js +104 -57
- package/dist/components/agents-sdk/EmployeeApp.d.ts +1 -1
- package/dist/components/agents-sdk/EmployeeApp.js +108 -46
- package/dist/components/agents-sdk/EmployeeChat.d.ts +1 -1
- package/dist/components/agents-sdk/EmployeeChat.js +500 -99
- package/dist/components/agents-sdk/EmployeeChrome.d.ts +1 -1
- package/dist/components/agents-sdk/EmployeeChrome.js +1375 -557
- package/dist/components/agents-sdk/EmployeeSchedules.d.ts +3 -3
- package/dist/components/agents-sdk/EmployeeSchedules.js +281 -64
- package/dist/components/agents-sdk/EmployeeStartScreen.d.ts +2 -2
- package/dist/components/agents-sdk/EmployeeStartScreen.js +185 -52
- package/dist/components/agents-sdk/ExecutionBoard.d.ts +1 -1
- package/dist/components/agents-sdk/ExecutionBoard.js +1661 -462
- package/dist/components/agents-sdk/ManagerAccountActions.js +142 -35
- package/dist/components/agents-sdk/ManagerOffice.d.ts +15 -8
- package/dist/components/agents-sdk/ManagerOffice.js +1 -1
- package/dist/components/agents-sdk/ManagerOfficeScreens.d.ts +1 -1
- package/dist/components/agents-sdk/ManagerOfficeScreens.js +551 -185
- package/dist/components/agents-sdk/McpConnectionRequest.js +332 -117
- package/dist/components/agents-sdk/McpConnectorForm.js +320 -100
- package/dist/components/agents-sdk/McpPluginCatalog.js +697 -249
- package/dist/components/agents-sdk/McpServerIcon.js +57 -14
- package/dist/components/agents-sdk/McpServerPicker.d.ts +1 -1
- package/dist/components/agents-sdk/McpServerPicker.js +542 -158
- package/dist/components/agents-sdk/ModelSelector.js +1151 -253
- package/dist/components/agents-sdk/PromptInputApproval.js +115 -27
- package/dist/components/agents-sdk/PromptInputCommands.d.ts +1 -1
- package/dist/components/agents-sdk/PromptInputCommands.js +33 -46
- package/dist/components/agents-sdk/SlackConnectionDialog.js +38 -14
- package/dist/components/agents-sdk/SubagentRunIndicator.js +118 -25
- package/dist/components/agents-sdk/SubagentRunLanes.js +291 -107
- package/dist/components/agents-sdk/SubagentRunPanel.js +357 -129
- package/dist/components/agents-sdk/SubagentRunSelector.js +123 -26
- package/dist/components/agents-sdk/ThinkChat.d.ts +2 -2
- package/dist/components/agents-sdk/ThinkChat.js +321 -132
- package/dist/components/agents-sdk/ThinkChatActivity.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkChatActivity.js +306 -100
- package/dist/components/agents-sdk/ThinkChatActivitySummary.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkChatActivitySummary.js +15 -9
- package/dist/components/agents-sdk/ThinkChatToolPanels.js +1386 -404
- package/dist/components/agents-sdk/ThinkExecutionDetail.d.ts +5 -3
- package/dist/components/agents-sdk/ThinkExecutionDetail.js +219 -45
- package/dist/components/agents-sdk/ThinkExecutionRun.d.ts +2 -2
- package/dist/components/agents-sdk/ThinkExecutionRun.js +19 -11
- package/dist/components/agents-sdk/ThinkExecutionStatus.d.ts +5 -3
- package/dist/components/agents-sdk/ThinkExecutionStatus.js +224 -37
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.d.ts +8 -5
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +505 -124
- package/dist/components/agents-sdk/ThinkFullApp.js +147 -44
- package/dist/components/agents-sdk/ThinkPendingApproval.js +381 -75
- package/dist/components/agents-sdk/ThinkRecoveryNotice.js +71 -26
- package/dist/components/agents-sdk/ThinkSchedule.d.ts +2 -2
- package/dist/components/agents-sdk/ThinkSchedule.js +124 -1
- package/dist/components/agents-sdk/ThinkScheduleActions.d.ts +3 -3
- package/dist/components/agents-sdk/ThinkScheduleActions.js +363 -132
- package/dist/components/agents-sdk/ThinkScheduleBrowser.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkScheduleBrowser.js +249 -116
- package/dist/components/agents-sdk/ThinkScheduleDetail.d.ts +2 -2
- package/dist/components/agents-sdk/ThinkScheduleDetail.js +311 -90
- package/dist/components/agents-sdk/ThinkScheduleForm.d.ts +6 -2
- package/dist/components/agents-sdk/ThinkScheduleForm.js +1318 -475
- package/dist/components/agents-sdk/ThinkThreadPicker.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkThreadPicker.js +434 -214
- package/dist/components/agents-sdk/TypeSafeConnectionDialog.js +30 -13
- package/dist/components/agents-sdk/WorkbenchBack.js +66 -20
- package/dist/components/agents-sdk/Workspace.d.ts +1 -1
- package/dist/components/agents-sdk/Workspace.js +491 -166
- package/dist/components/agents-sdk/WorkspaceAutomation.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceAutomation.js +1492 -415
- package/dist/components/agents-sdk/WorkspaceAutomationTable.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceAutomationTable.js +1316 -525
- package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +72 -2
- package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -94
- package/dist/components/agents-sdk/WorkspaceConcept.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceCorrespondence.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceCorrespondence.js +619 -178
- package/dist/components/agents-sdk/WorkspaceDesktop.d.ts +45 -0
- package/dist/components/agents-sdk/WorkspaceDesktop.js +240 -0
- package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +52 -1
- package/dist/components/agents-sdk/WorkspaceExplorer.js +267 -85
- package/dist/components/agents-sdk/WorkspaceFile.d.ts +2 -2
- package/dist/components/agents-sdk/WorkspaceFile.js +30 -9
- package/dist/components/agents-sdk/WorkspaceFileCommands.d.ts +2 -0
- package/dist/components/agents-sdk/WorkspaceFileCommands.js +890 -0
- package/dist/components/agents-sdk/WorkspaceFileDetails.d.ts +29 -0
- package/dist/components/agents-sdk/WorkspaceFileDetails.js +271 -0
- package/dist/components/agents-sdk/WorkspaceFileTransfer.d.ts +2 -0
- package/dist/components/agents-sdk/WorkspaceFileTransfer.js +505 -0
- package/dist/components/agents-sdk/WorkspaceFileView.d.ts +18 -3
- package/dist/components/agents-sdk/WorkspaceFileView.js +866 -1
- package/dist/components/agents-sdk/WorkspaceHeader.js +71 -26
- package/dist/components/agents-sdk/WorkspaceLink.js +2 -2
- package/dist/components/agents-sdk/WorkspaceLive.d.ts +2 -2
- package/dist/components/agents-sdk/WorkspaceLive.js +126 -73
- package/dist/components/agents-sdk/WorkspaceLocalFolder.d.ts +63 -0
- package/dist/components/agents-sdk/WorkspaceLocalFolder.js +455 -0
- package/dist/components/agents-sdk/WorkspaceMessageResponse.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceMessageResponse.js +1 -1
- package/dist/components/agents-sdk/WorkspaceMountManager.js +118 -58
- package/dist/components/agents-sdk/WorkspaceNavigationRestoration.js +90 -54
- package/dist/components/agents-sdk/WorkspacePerson.d.ts +2 -2
- package/dist/components/agents-sdk/WorkspacePerson.js +172 -41
- package/dist/components/agents-sdk/WorkspaceProject.d.ts +2 -2
- package/dist/components/agents-sdk/WorkspaceProject.js +175 -41
- package/dist/components/ai-sdk/Activity.js +768 -192
- package/dist/components/ai-sdk/AgentAttention.js +286 -58
- package/dist/components/ai-sdk/AgentChatMessageEditor.js +193 -68
- package/dist/components/ai-sdk/AgentChatStartScreen.d.ts +1 -1
- package/dist/components/ai-sdk/AgentChatStartScreen.js +368 -80
- package/dist/components/ai-sdk/AgentChatTurnError.js +75 -25
- package/dist/components/ai-sdk/AgentMessageParts.js +0 -1
- package/dist/components/ai-sdk/Approval.js +574 -172
- package/dist/components/ai-sdk/Artifact.d.ts +1 -1
- package/dist/components/ai-sdk/Artifact.js +535 -128
- package/dist/components/ai-sdk/ChainOfThought.d.ts +1 -1
- package/dist/components/ai-sdk/ChainOfThought.js +404 -80
- package/dist/components/ai-sdk/Checkpoint.js +229 -45
- package/dist/components/ai-sdk/CodeBlock.d.ts +1 -1
- package/dist/components/ai-sdk/CodeBlock.js +1 -1
- package/dist/components/ai-sdk/ComposerLink.js +216 -48
- package/dist/components/ai-sdk/ConnectedAppCards.js +229 -52
- package/dist/components/ai-sdk/Context.js +737 -178
- package/dist/components/ai-sdk/Conversation.d.ts +1 -1
- package/dist/components/ai-sdk/Conversation.js +305 -68
- package/dist/components/ai-sdk/ExpansionState.js +74 -15
- package/dist/components/ai-sdk/Goal.js +435 -116
- package/dist/components/ai-sdk/InlineCitation.js +313 -76
- package/dist/components/ai-sdk/MediaPreviewCard.js +451 -135
- package/dist/components/ai-sdk/Message.d.ts +1 -1
- package/dist/components/ai-sdk/Message.js +1010 -195
- package/dist/components/ai-sdk/MessageScroller.d.ts +1 -1
- package/dist/components/ai-sdk/MessageScroller.js +264 -46
- package/dist/components/ai-sdk/MessageScrollerVirtual.js +6 -6
- package/dist/components/ai-sdk/Plan.js +639 -128
- package/dist/components/ai-sdk/PromptInput.d.ts +1 -1
- package/dist/components/ai-sdk/PromptInput.js +2735 -794
- package/dist/components/ai-sdk/PromptInputComposerEditor.d.ts +1 -3
- package/dist/components/ai-sdk/PromptInputComposerEditor.js +188 -83
- package/dist/components/ai-sdk/Queue.js +792 -154
- package/dist/components/ai-sdk/Reasoning.js +268 -69
- package/dist/components/ai-sdk/Sources.js +226 -63
- package/dist/components/ai-sdk/Task.js +294 -71
- package/dist/components/ai-sdk/ToolApproval.js +126 -26
- package/dist/components/ai-sdk/ToolInvocation.js +112 -22
- package/dist/components/extension/ChatGptSignInScreen.js +1 -82
- package/dist/components/extension/CodexModelSelector.d.ts +1 -1
- package/dist/components/extension/CodexModelSelector.js +467 -146
- package/dist/components/extension/ConversationTabPicker.d.ts +1 -1
- package/dist/components/extension/ConversationTabPicker.js +254 -76
- package/dist/components/extension/FirstRunSetup.d.ts +61 -35
- package/dist/components/extension/FirstRunSetup.js +3834 -1012
- package/dist/components/foundations/Accordion.js +186 -41
- package/dist/components/foundations/AlertDialog.js +425 -97
- package/dist/components/foundations/AppIcon.d.ts +13 -13
- package/dist/components/foundations/AppIcon.js +183 -34
- package/dist/components/foundations/Autocomplete.js +408 -89
- package/dist/components/foundations/Avatar.d.ts +100 -2
- package/dist/components/foundations/Avatar.js +204 -44
- package/dist/components/foundations/Button.js +64 -13
- package/dist/components/foundations/Card.js +357 -63
- package/dist/components/foundations/Checkbox.js +82 -17
- package/dist/components/foundations/CheckboxGroup.js +266 -58
- package/dist/components/foundations/Collapsible.d.ts +2 -1
- package/dist/components/foundations/Collapsible.js +129 -26
- package/dist/components/foundations/Combobox.js +408 -89
- package/dist/components/foundations/ContextMenu.d.ts +2 -2
- package/dist/components/foundations/ContextMenu.js +591 -117
- package/dist/components/foundations/DescriptionList.js +159 -28
- package/dist/components/foundations/Dialog.js +373 -89
- package/dist/components/foundations/EmptyState.js +86 -23
- package/dist/components/foundations/Favicon.d.ts +17 -0
- package/dist/components/foundations/Favicon.js +62 -0
- package/dist/components/foundations/Field.js +525 -108
- package/dist/components/foundations/Fieldset.js +115 -23
- package/dist/components/foundations/Form.js +38 -9
- package/dist/components/foundations/FormattedDate.d.ts +19 -5
- package/dist/components/foundations/FormattedDate.js +82 -12
- package/dist/components/foundations/IconButton.d.ts +1 -1
- package/dist/components/foundations/IconButton.js +114 -17
- package/dist/components/foundations/Input.js +38 -9
- package/dist/components/foundations/Kbd.js +55 -10
- package/dist/components/foundations/Label.js +56 -12
- package/dist/components/foundations/LinkButton.js +67 -15
- package/dist/components/foundations/Marker.js +138 -29
- package/dist/components/foundations/Menu.d.ts +1 -1
- package/dist/components/foundations/Menu.js +634 -136
- package/dist/components/foundations/Menubar.d.ts +2 -2
- package/dist/components/foundations/Menubar.js +685 -130
- package/dist/components/foundations/Meter.js +186 -41
- package/dist/components/foundations/NavigationMenu.js +426 -95
- package/dist/components/foundations/NumberField.js +223 -49
- package/dist/components/foundations/Popover.js +398 -88
- package/dist/components/foundations/PreviewCard.js +234 -53
- package/dist/components/foundations/Progress.js +117 -25
- package/dist/components/foundations/RadioGroup.d.ts +13 -5
- package/dist/components/foundations/RadioGroup.js +132 -25
- package/dist/components/foundations/ScrollArea.js +230 -51
- package/dist/components/foundations/SearchField.d.ts +8 -3
- package/dist/components/foundations/SearchField.js +129 -28
- package/dist/components/foundations/Select.js +648 -145
- package/dist/components/foundations/Separator.js +61 -12
- package/dist/components/foundations/Slider.js +260 -57
- package/dist/components/foundations/Stepper.d.ts +1 -1
- package/dist/components/foundations/Stepper.js +561 -127
- package/dist/components/foundations/Switch.js +82 -18
- package/dist/components/foundations/Tabs.d.ts +2 -2
- package/dist/components/foundations/Tabs.js +282 -53
- package/dist/components/foundations/Textarea.js +43 -9
- package/dist/components/foundations/ThemeProvider.js +138 -52
- package/dist/components/foundations/Toast.d.ts +10 -2
- package/dist/components/foundations/Toast.js +322 -75
- package/dist/components/foundations/Toggle.d.ts +5 -2
- package/dist/components/foundations/Toggle.js +51 -10
- package/dist/components/foundations/ToggleGroup.d.ts +3 -3
- package/dist/components/foundations/ToggleGroup.js +215 -59
- package/dist/components/foundations/Toolbar.js +249 -61
- package/dist/components/foundations/Tooltip.d.ts +3 -3
- package/dist/components/foundations/Tooltip.js +311 -55
- package/dist/components/foundations/TransitionSurface.js +43 -9
- package/dist/components/foundations/icons.d.ts +2 -2
- package/dist/components/foundations/icons.js +2 -2
- package/dist/components/general-purpose/AccountSignInDialog.js +99 -17
- package/dist/components/general-purpose/ActionGuide.js +290 -64
- package/dist/components/general-purpose/AppFrame.js +72 -14
- package/dist/components/general-purpose/AppTopBar.d.ts +1 -1
- package/dist/components/general-purpose/AppTopBar.js +349 -60
- package/dist/components/general-purpose/BrandLoading.js +37 -9
- package/dist/components/general-purpose/CommandPalette.d.ts +47 -0
- package/dist/components/general-purpose/CommandPalette.js +271 -0
- package/dist/components/general-purpose/Commit.d.ts +1 -1
- package/dist/components/general-purpose/Commit.js +937 -167
- package/dist/components/general-purpose/EnvironmentVariables.d.ts +1 -1
- package/dist/components/general-purpose/EnvironmentVariables.js +600 -114
- package/dist/components/general-purpose/FileTree.d.ts +20 -7
- package/dist/components/general-purpose/FileTree.js +1 -1
- package/dist/components/general-purpose/ListDetail.d.ts +84 -0
- package/dist/components/general-purpose/ListDetail.js +423 -0
- package/dist/components/general-purpose/NotificationPrompt.js +20 -11
- package/dist/components/general-purpose/PricingBillingToggle.js +33 -6
- package/dist/components/general-purpose/PricingConfirmationDialog.js +126 -42
- package/dist/components/general-purpose/PricingFAQ.js +53 -12
- package/dist/components/general-purpose/PricingPage.js +376 -139
- package/dist/components/general-purpose/PricingPlanCard.js +209 -84
- package/dist/components/general-purpose/PricingUsageCalculator.js +231 -81
- package/dist/components/general-purpose/ResizableSidePanel.js +316 -117
- package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +1 -1
- package/dist/components/general-purpose/ResponsiveSidebarShell.js +840 -342
- package/dist/components/general-purpose/ScreenStack.d.ts +54 -0
- package/dist/components/general-purpose/ScreenStack.js +427 -0
- package/dist/components/general-purpose/SettingsFormDialog.js +235 -77
- package/dist/components/general-purpose/SetupChecklist.js +1 -1
- package/dist/components/general-purpose/StatusScreen.js +82 -24
- package/dist/components/general-purpose/SwipeActions.d.ts +54 -0
- package/dist/components/general-purpose/SwipeActions.js +357 -0
- package/dist/components/general-purpose/Terminal.d.ts +22 -48
- package/dist/components/general-purpose/Terminal.js +320 -174
- package/dist/components/general-purpose/TestResults.js +975 -196
- package/dist/components/general-purpose/ThemeModeControl.d.ts +3 -1
- package/dist/components/general-purpose/ThemeModeControl.js +66 -23
- package/dist/components/general-purpose/WallpaperPicker.d.ts +33 -0
- package/dist/components/general-purpose/WallpaperPicker.js +180 -0
- package/dist/components/general-purpose/WebPreview.d.ts +5 -7
- package/dist/components/general-purpose/WebPreview.js +770 -203
- package/dist/components/nanites/AgentConnection.js +323 -84
- package/dist/components/nanites/AgentToolDetail.js +233 -53
- package/dist/components/nanites/GithubMotionMark.js +37 -9
- package/dist/components/nanites/NaniteScene.js +535 -323
- package/dist/connected-app-drafts-Bocdg3Z-.js +637 -0
- package/dist/container-width-C43ccJ84.js +17 -0
- package/dist/context-Ddsp8HgD.js +43 -0
- package/dist/{copy-button-B09hHWd1.d.ts → copy-button-C2HRdomn.d.ts} +1 -1
- package/dist/copy-button-DWBVJR6D.js +118 -0
- package/dist/{format-CWaZEp5o.js → format-DL7f2rqp.js} +5 -1
- package/dist/{icons-CReP3qYl.d.ts → icons-B3n7zvU7.d.ts} +10 -2
- package/dist/icons-nLTnB9kd.js +470 -0
- package/dist/{merge-refs-DAh6reu8.js → merge-refs-DTX97mLp.js} +17 -1
- package/dist/motion-CGM3i6lX.js +319 -0
- package/dist/motion-preferences-6qsDIDvH.js +13 -0
- package/dist/{navigation-link-kqMa81v5.js → navigation-link-DMmtdqsM.js} +32 -8
- package/dist/progress-ring-BO649JA9.js +79 -0
- package/dist/provider-logos-Ceu7iYFx.js +362 -0
- package/dist/scheduled-table-source-gGpVJ1TN.js +92 -0
- package/dist/styles/accessibility.css +26 -0
- package/dist/styles/accordion.css +0 -2
- package/dist/styles/activity.css +20 -12
- package/dist/styles/agent-attention.css +31 -10
- package/dist/styles/agent-chat.css +7 -6
- package/dist/styles/agent-computer-motion-reduction.css +118 -0
- package/dist/styles/agent-computer-motion.css +127 -0
- package/dist/styles/agent-computer-phone.css +942 -0
- package/dist/styles/agent-computer.css +1764 -0
- package/dist/styles/agent-connection.css +5 -5
- package/dist/styles/agent-screen-switcher.css +313 -0
- package/dist/styles/app-icon.css +34 -30
- package/dist/styles/app-top-bar.css +33 -18
- package/dist/styles/approval.css +3 -3
- package/dist/styles/artifact.css +1 -1
- package/dist/styles/attachment-preview.css +2 -4
- package/dist/styles/avatar.css +12 -14
- package/dist/styles/base-ui-motion.css +84 -18
- package/dist/styles/base-ui-motion.test.tsx +305 -0
- package/dist/styles/base.css +16 -12
- package/dist/styles/brand.test.ts +7 -20
- package/dist/styles/browser-control-overlay.css +1 -1
- package/dist/styles/browser-live-screen.css +2 -2
- package/dist/styles/browser-live-view.css +1 -1
- package/dist/styles/browser-replay.css +0 -8
- package/dist/styles/browser-run-panel.css +275 -37
- package/dist/styles/button.css +52 -9
- package/dist/styles/card.css +6 -5
- package/dist/styles/chain-of-thought.css +0 -10
- package/dist/styles/checkpoint.css +2 -2
- package/dist/styles/codex-model-selector.css +2 -2
- package/dist/styles/color-contrast.test.ts +18 -1
- package/dist/styles/command-palette.css +110 -0
- package/dist/styles/composer-link.css +11 -7
- package/dist/styles/composition-motion.css +3 -14
- package/dist/styles/context.css +2 -2
- package/dist/styles/conversation-tab-picker.css +7 -0
- package/dist/styles/conversation.css +8 -2
- package/dist/styles/dialog.css +2 -2
- package/dist/styles/employee-app.css +8 -2
- package/dist/styles/employee-chrome.css +4 -4
- package/dist/styles/execution-board.css +206 -114
- package/dist/styles/execution-result.css +2 -2
- package/dist/styles/field.css +187 -4
- package/dist/styles/file-tree.css +218 -40
- package/dist/styles/first-run-setup.css +914 -187
- package/dist/styles/github-motion-mark.css +0 -8
- package/dist/styles/index.css +145 -133
- package/dist/styles/inline-citation.css +5 -4
- package/dist/styles/list-detail.css +57 -0
- package/dist/styles/manager-office.css +6 -8
- package/dist/styles/manager-work.css +4 -2
- package/dist/styles/mcp-plugin-catalog.css +2 -2
- package/dist/styles/mcp-server-picker.css +3 -6
- package/dist/styles/media-preview-card.css +2 -2
- package/dist/styles/menu.css +0 -9
- package/dist/styles/menubar.css +18 -6
- package/dist/styles/message-scroller.css +47 -9
- package/dist/styles/message.css +3 -3
- package/dist/styles/model-selector.css +1 -1
- package/dist/styles/motion-reduction.css +39 -6
- package/dist/styles/pricing-page.css +1 -1
- package/dist/styles/prompt-input.css +29 -29
- package/dist/styles/queue.css +1 -1
- package/dist/styles/recipes.css +212 -28
- package/dist/styles/responsive-sidebar-shell-motion.test.ts +81 -1
- package/dist/styles/responsive-sidebar-shell.css +40 -43
- package/dist/styles/screen-stack.css +123 -0
- package/dist/styles/search-field.css +80 -3
- package/dist/styles/stepper.css +0 -10
- package/dist/styles/streamdown.css +2 -2
- package/dist/styles/subagent-run.css +9 -5
- package/dist/styles/swipe-actions.css +158 -0
- package/dist/styles/tabs.css +80 -23
- package/dist/styles/task.css +7 -1
- package/dist/styles/terminal.css +66 -78
- package/dist/styles/test-results.css +1 -19
- package/dist/styles/textarea.css +2 -1
- package/dist/styles/theme-mode-control.css +154 -26
- package/dist/styles/think-chat-tool-panels.css +1 -1
- package/dist/styles/think-execution-workbench.css +0 -9
- package/dist/styles/think-full-app.css +7 -1
- package/dist/styles/think-schedule.css +81 -54
- package/dist/styles/think-thread-picker.css +28 -37
- package/dist/styles/toast.css +11 -0
- package/dist/styles/toggle-group.css +0 -10
- package/dist/styles/toggle.css +13 -0
- package/dist/styles/tooltip.css +12 -0
- package/dist/styles/transition-surface.css +1 -0
- package/dist/styles/wallpaper-picker.css +224 -0
- package/dist/styles/web-preview.css +47 -18
- package/dist/styles/workspace-automation.css +116 -17
- package/dist/styles/workspace-concepts.css +1 -1
- package/dist/styles/workspace-desktop.css +124 -0
- package/dist/styles/workspace-entity-card.css +3 -1
- package/dist/styles/workspace-explorer.css +499 -5
- package/dist/utils/brand-marks.d.ts +13 -0
- package/dist/utils/brand-marks.js +14 -0
- package/dist/utils/desktop-artwork.d.ts +17 -0
- package/dist/utils/desktop-artwork.js +18 -0
- package/dist/utils/favicon.d.ts +6 -2
- package/dist/utils/favicon.js +16 -4
- package/dist/utils/structured-code.d.ts +1 -1
- package/dist/workspace-assets-DdtnBDU3.js +213 -0
- package/dist/{workspace-concept-panel-C_oYhPSx.d.ts → workspace-concept-panel-BDTBISNO.d.ts} +2 -2
- package/dist/workspace-concept-panel-VkjvFCY_.js +140 -0
- package/dist/workspace-delete-BOY6CMBf.js +183 -0
- package/dist/workspace-drag-B6hMXUNt.js +304 -0
- package/dist/workspace-entity-card-9YcsNiqU.js +178 -0
- package/dist/workspace-media-preview-B4iB5Tvi.js +1295 -0
- package/dist/{workspace-path-L_KmjRjq.js → workspace-path-TZggP-u4.js} +14 -1
- package/dist/{workspace-person-BVkYb3dv.js → workspace-person-ZwPqu5TX.js} +67 -21
- package/dist/workspace-quick-look-9V-UFpjj.js +1562 -0
- package/package.json +9 -3
- package/dist/Avatar-t1YRzdwB.d.ts +0 -101
- package/dist/CodeBlock-DYQdZUH6.js +0 -318
- package/dist/ExecutionResult-2fBkpIGN.js +0 -279
- package/dist/FileTree-CDLOD643.js +0 -323
- package/dist/ManagerOffice-CvVSHnOM.js +0 -1129
- package/dist/SetupChecklist-B-iEta9v.js +0 -78
- package/dist/ThinkSchedule-DPoOYWTQ.d.ts +0 -34
- package/dist/WorkspaceFileView-DwIkehSM.js +0 -783
- package/dist/WorkspaceLink-BeFAXpbI.js +0 -225
- package/dist/app-bar-outlet-CNfNzY4Y.js +0 -6
- package/dist/attachment-preview-1CXJvrmb.js +0 -25
- package/dist/chatgpt-sign-in-button-D8AT6x4c.js +0 -32
- package/dist/connected-app-drafts-DtA2fBK5.js +0 -283
- package/dist/copy-button-DbR932tF.js +0 -45
- package/dist/icons-GoybMAB2.js +0 -141
- package/dist/progress-ring-L2bbF0ji.js +0 -40
- package/dist/provider-logos-DWYY8wNz.js +0 -99
- package/dist/scheduled-table-source-NZR1vFc_.js +0 -38
- package/dist/workspace-assets-F3r6XltC.js +0 -107
- package/dist/workspace-concept-panel-D8oEvR0n.js +0 -66
- package/dist/workspace-delete-CQvv1eDE.js +0 -81
- package/dist/workspace-entity-card-B1aV-jBj.js +0 -61
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import {
|
|
2
|
+
import { M as InfoIcon, it as SpinnerIcon, m as ChevronDownIcon, mt as WarningIcon, p as CheckIcon, r as ArrowLeftIcon } from "../../icons-nLTnB9kd.js";
|
|
3
3
|
import { Checkbox } from "../foundations/Checkbox.js";
|
|
4
4
|
import { Select } from "../foundations/Select.js";
|
|
5
5
|
import { Field } from "../foundations/Field.js";
|
|
6
|
-
import {
|
|
6
|
+
import { t as attempt } from "../../attempt-CySQHJsF.js";
|
|
7
|
+
import { a as formatErrorMessage } from "../../format-DL7f2rqp.js";
|
|
7
8
|
import { Button } from "../foundations/Button.js";
|
|
8
9
|
import { Form } from "../foundations/Form.js";
|
|
9
10
|
import { IconButton } from "../foundations/IconButton.js";
|
|
10
11
|
import { Textarea } from "../foundations/Textarea.js";
|
|
12
|
+
import { Favicon } from "../foundations/Favicon.js";
|
|
11
13
|
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
12
14
|
import { Fieldset } from "../foundations/Fieldset.js";
|
|
13
15
|
import { n as executionErrorSummary } from "../../execution-result-DAuW4VWv.js";
|
|
14
|
-
import {
|
|
15
|
-
import { t as ExecutionResult } from "../../ExecutionResult-
|
|
16
|
+
import { i as httpUrl } from "../../workspace-assets-DdtnBDU3.js";
|
|
17
|
+
import { t as ExecutionResult } from "../../ExecutionResult-CXnGcmM4.js";
|
|
16
18
|
import { CheckboxGroup } from "../foundations/CheckboxGroup.js";
|
|
17
19
|
import { Combobox } from "../foundations/Combobox.js";
|
|
18
20
|
import { NumberField } from "../foundations/NumberField.js";
|
|
19
|
-
import { n as OptionSelect, t as scheduledTableSourceNote } from "../../scheduled-table-source-
|
|
21
|
+
import { n as OptionSelect, t as scheduledTableSourceNote } from "../../scheduled-table-source-gGpVJ1TN.js";
|
|
22
|
+
import { c } from "react/compiler-runtime";
|
|
20
23
|
import * as React from "react";
|
|
21
24
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
22
25
|
//#region src/components/agents-sdk/ThinkScheduleForm.tsx
|
|
@@ -134,394 +137,894 @@ function serializeSchedule({ kind, intervalEvery, intervalUnit, time, timezone,
|
|
|
134
137
|
if (kind === "weekdays") return `every weekday at ${time} in ${timezone}`;
|
|
135
138
|
return `every day at ${time} in ${timezone}`;
|
|
136
139
|
}
|
|
137
|
-
function ScheduleSelect(
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
140
|
+
function ScheduleSelect(t0) {
|
|
141
|
+
const $ = c(15);
|
|
142
|
+
const { description, disabled, label, name, onValueChange, options, value } = t0;
|
|
143
|
+
let t1;
|
|
144
|
+
if ($[0] !== label) {
|
|
145
|
+
t1 = /* @__PURE__ */ jsx(Select.Label, { children: label });
|
|
146
|
+
$[0] = label;
|
|
147
|
+
$[1] = t1;
|
|
148
|
+
} else t1 = $[1];
|
|
149
|
+
let t2;
|
|
150
|
+
if ($[2] !== description || $[3] !== label) {
|
|
151
|
+
t2 = description ? /* @__PURE__ */ jsx(IconButton, {
|
|
152
|
+
label: `About ${label}`,
|
|
153
|
+
tooltip: description,
|
|
154
|
+
variant: "ghost",
|
|
155
|
+
color: "neutral",
|
|
156
|
+
children: /* @__PURE__ */ jsx(InfoIcon, {})
|
|
157
|
+
}) : null;
|
|
158
|
+
$[2] = description;
|
|
159
|
+
$[3] = label;
|
|
160
|
+
$[4] = t2;
|
|
161
|
+
} else t2 = $[4];
|
|
162
|
+
let t3;
|
|
163
|
+
if ($[5] !== t1 || $[6] !== t2) {
|
|
164
|
+
t3 = /* @__PURE__ */ jsxs("div", {
|
|
165
|
+
className: "think-schedule__input-label",
|
|
166
|
+
children: [t1, t2]
|
|
167
|
+
});
|
|
168
|
+
$[5] = t1;
|
|
169
|
+
$[6] = t2;
|
|
170
|
+
$[7] = t3;
|
|
171
|
+
} else t3 = $[7];
|
|
172
|
+
let t4;
|
|
173
|
+
if ($[8] !== disabled || $[9] !== name || $[10] !== onValueChange || $[11] !== options || $[12] !== t3 || $[13] !== value) {
|
|
174
|
+
t4 = /* @__PURE__ */ jsx("div", {
|
|
175
|
+
className: "think-schedule__select-field",
|
|
176
|
+
children: /* @__PURE__ */ jsx(OptionSelect, {
|
|
177
|
+
disabled,
|
|
178
|
+
name,
|
|
179
|
+
options,
|
|
180
|
+
value,
|
|
181
|
+
onValueChange,
|
|
182
|
+
children: t3
|
|
155
183
|
})
|
|
156
|
-
})
|
|
157
|
-
|
|
184
|
+
});
|
|
185
|
+
$[8] = disabled;
|
|
186
|
+
$[9] = name;
|
|
187
|
+
$[10] = onValueChange;
|
|
188
|
+
$[11] = options;
|
|
189
|
+
$[12] = t3;
|
|
190
|
+
$[13] = value;
|
|
191
|
+
$[14] = t4;
|
|
192
|
+
} else t4 = $[14];
|
|
193
|
+
return t4;
|
|
158
194
|
}
|
|
159
|
-
function ScheduleTableSource(
|
|
195
|
+
function ScheduleTableSource(t0) {
|
|
196
|
+
const $ = c(11);
|
|
197
|
+
const { table, automations } = t0;
|
|
160
198
|
if (!table) return null;
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
children:
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
]
|
|
174
|
-
|
|
199
|
+
let t1;
|
|
200
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
201
|
+
t1 = /* @__PURE__ */ jsx("p", { children: "Run once for each table row" });
|
|
202
|
+
$[0] = t1;
|
|
203
|
+
} else t1 = $[0];
|
|
204
|
+
let t2;
|
|
205
|
+
if ($[1] !== automations || $[2] !== table) {
|
|
206
|
+
t2 = /* @__PURE__ */ jsx(ScheduleTableOrigin, {
|
|
207
|
+
table,
|
|
208
|
+
automations
|
|
209
|
+
});
|
|
210
|
+
$[1] = automations;
|
|
211
|
+
$[2] = table;
|
|
212
|
+
$[3] = t2;
|
|
213
|
+
} else t2 = $[3];
|
|
214
|
+
let t3;
|
|
215
|
+
if ($[4] !== table.source) {
|
|
216
|
+
t3 = scheduledTableSourceNote(table.source);
|
|
217
|
+
$[4] = table.source;
|
|
218
|
+
$[5] = t3;
|
|
219
|
+
} else t3 = $[5];
|
|
220
|
+
let t4;
|
|
221
|
+
if ($[6] !== t3) {
|
|
222
|
+
t4 = /* @__PURE__ */ jsx("p", {
|
|
223
|
+
className: "think-schedule__input-help",
|
|
224
|
+
children: t3
|
|
225
|
+
});
|
|
226
|
+
$[6] = t3;
|
|
227
|
+
$[7] = t4;
|
|
228
|
+
} else t4 = $[7];
|
|
229
|
+
let t5;
|
|
230
|
+
if ($[8] !== t2 || $[9] !== t4) {
|
|
231
|
+
t5 = /* @__PURE__ */ jsxs("div", {
|
|
232
|
+
className: "think-schedule__table-source",
|
|
233
|
+
children: [
|
|
234
|
+
t1,
|
|
235
|
+
t2,
|
|
236
|
+
t4
|
|
237
|
+
]
|
|
238
|
+
});
|
|
239
|
+
$[8] = t2;
|
|
240
|
+
$[9] = t4;
|
|
241
|
+
$[10] = t5;
|
|
242
|
+
} else t5 = $[10];
|
|
243
|
+
return t5;
|
|
175
244
|
}
|
|
176
|
-
function ScheduleTableOrigin(
|
|
245
|
+
function ScheduleTableOrigin(t0) {
|
|
246
|
+
const $ = c(23);
|
|
247
|
+
const { table, automations } = t0;
|
|
177
248
|
if ("data" in table.source && table.source.data.source) {
|
|
178
249
|
const source = table.source.data.source;
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
250
|
+
let t1;
|
|
251
|
+
if ($[0] !== source.href) {
|
|
252
|
+
t1 = source.href ? httpUrl(source.href) : void 0;
|
|
253
|
+
$[0] = source.href;
|
|
254
|
+
$[1] = t1;
|
|
255
|
+
} else t1 = $[1];
|
|
256
|
+
const href = t1;
|
|
257
|
+
let t2;
|
|
258
|
+
if ($[2] !== href) {
|
|
259
|
+
t2 = /* @__PURE__ */ jsx(Favicon, { href });
|
|
260
|
+
$[2] = href;
|
|
261
|
+
$[3] = t2;
|
|
262
|
+
} else t2 = $[3];
|
|
263
|
+
let t3;
|
|
264
|
+
if ($[4] !== href || $[5] !== source.label) {
|
|
265
|
+
t3 = href ? /* @__PURE__ */ jsx("a", {
|
|
183
266
|
href,
|
|
184
267
|
target: "_blank",
|
|
185
268
|
rel: "noreferrer",
|
|
186
269
|
children: source.label
|
|
187
|
-
}) : source.label
|
|
188
|
-
|
|
270
|
+
}) : source.label;
|
|
271
|
+
$[4] = href;
|
|
272
|
+
$[5] = source.label;
|
|
273
|
+
$[6] = t3;
|
|
274
|
+
} else t3 = $[6];
|
|
275
|
+
let t4;
|
|
276
|
+
if ($[7] !== t2 || $[8] !== t3) {
|
|
277
|
+
t4 = /* @__PURE__ */ jsxs("div", {
|
|
278
|
+
className: "sigvelo-cluster",
|
|
279
|
+
children: [t2, t3]
|
|
280
|
+
});
|
|
281
|
+
$[7] = t2;
|
|
282
|
+
$[8] = t3;
|
|
283
|
+
$[9] = t4;
|
|
284
|
+
} else t4 = $[9];
|
|
285
|
+
return t4;
|
|
286
|
+
}
|
|
287
|
+
if ("path" in table.source) {
|
|
288
|
+
let t1;
|
|
289
|
+
if ($[10] !== table.source.path) {
|
|
290
|
+
t1 = /\.json$/iu.test(table.source.path) ? "Saved table" : table.source.path.split("/").at(-1);
|
|
291
|
+
$[10] = table.source.path;
|
|
292
|
+
$[11] = t1;
|
|
293
|
+
} else t1 = $[11];
|
|
294
|
+
let t2;
|
|
295
|
+
if ($[12] !== t1 || $[13] !== table.source.sheet) {
|
|
296
|
+
t2 = [t1, table.source.sheet].filter(Boolean);
|
|
297
|
+
$[12] = t1;
|
|
298
|
+
$[13] = table.source.sheet;
|
|
299
|
+
$[14] = t2;
|
|
300
|
+
} else t2 = $[14];
|
|
301
|
+
const t3 = t2.join(" · ");
|
|
302
|
+
let t4;
|
|
303
|
+
if ($[15] !== t3) {
|
|
304
|
+
t4 = /* @__PURE__ */ jsx("p", { children: t3 });
|
|
305
|
+
$[15] = t3;
|
|
306
|
+
$[16] = t4;
|
|
307
|
+
} else t4 = $[16];
|
|
308
|
+
return t4;
|
|
189
309
|
}
|
|
190
|
-
if ("path" in table.source) return /* @__PURE__ */ jsx("p", { children: [/\.json$/iu.test(table.source.path) ? "Saved table" : table.source.path.split("/").at(-1), table.source.sheet].filter(Boolean).join(" · ") });
|
|
191
310
|
if ("script" in table.source) {
|
|
192
311
|
const path = table.source.script.path;
|
|
193
|
-
|
|
312
|
+
let t1;
|
|
313
|
+
if ($[17] !== automations || $[18] !== path) {
|
|
314
|
+
t1 = automations.find((automation) => automation.path === path)?.name ?? "Connected table";
|
|
315
|
+
$[17] = automations;
|
|
316
|
+
$[18] = path;
|
|
317
|
+
$[19] = t1;
|
|
318
|
+
} else t1 = $[19];
|
|
319
|
+
let t2;
|
|
320
|
+
if ($[20] !== t1) {
|
|
321
|
+
t2 = /* @__PURE__ */ jsx("p", { children: t1 });
|
|
322
|
+
$[20] = t1;
|
|
323
|
+
$[21] = t2;
|
|
324
|
+
} else t2 = $[21];
|
|
325
|
+
return t2;
|
|
194
326
|
}
|
|
195
|
-
|
|
327
|
+
let t1;
|
|
328
|
+
if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
|
|
329
|
+
t1 = /* @__PURE__ */ jsx("p", { children: "Saved table" });
|
|
330
|
+
$[22] = t1;
|
|
331
|
+
} else t1 = $[22];
|
|
332
|
+
return t1;
|
|
196
333
|
}
|
|
197
|
-
function ScheduleAutomationParameter(
|
|
334
|
+
function ScheduleAutomationParameter(t0) {
|
|
335
|
+
const $ = c(45);
|
|
336
|
+
const { parameter, value, setArgument } = t0;
|
|
198
337
|
if (value !== void 0 && (typeof value === "object" || typeof value !== parameter.type)) return null;
|
|
199
|
-
const
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
338
|
+
const t1 = parameter.required ? "Required by the automation." : void 0;
|
|
339
|
+
let t2;
|
|
340
|
+
if ($[0] !== parameter.description || $[1] !== t1) {
|
|
341
|
+
t2 = [parameter.description, t1].filter(Boolean);
|
|
342
|
+
$[0] = parameter.description;
|
|
343
|
+
$[1] = t1;
|
|
344
|
+
$[2] = t2;
|
|
345
|
+
} else t2 = $[2];
|
|
346
|
+
const help = t2.join(" ");
|
|
347
|
+
if (parameter.type === "boolean") {
|
|
348
|
+
const t3 = help || void 0;
|
|
349
|
+
const t4 = value === void 0 ? "" : String(value);
|
|
350
|
+
const t5 = parameter.required ? "Choose an option" : "Use automation default";
|
|
351
|
+
let t6;
|
|
352
|
+
if ($[3] !== t5) {
|
|
353
|
+
t6 = {
|
|
354
|
+
label: t5,
|
|
355
|
+
value: ""
|
|
356
|
+
};
|
|
357
|
+
$[3] = t5;
|
|
358
|
+
$[4] = t6;
|
|
359
|
+
} else t6 = $[4];
|
|
360
|
+
let t7;
|
|
361
|
+
let t8;
|
|
362
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
363
|
+
t7 = {
|
|
364
|
+
label: "Yes",
|
|
365
|
+
value: "true"
|
|
366
|
+
};
|
|
367
|
+
t8 = {
|
|
368
|
+
label: "No",
|
|
369
|
+
value: "false"
|
|
370
|
+
};
|
|
371
|
+
$[5] = t7;
|
|
372
|
+
$[6] = t8;
|
|
373
|
+
} else {
|
|
374
|
+
t7 = $[5];
|
|
375
|
+
t8 = $[6];
|
|
376
|
+
}
|
|
377
|
+
let t9;
|
|
378
|
+
if ($[7] !== t6) {
|
|
379
|
+
t9 = [
|
|
380
|
+
t6,
|
|
381
|
+
t7,
|
|
382
|
+
t8
|
|
383
|
+
];
|
|
384
|
+
$[7] = t6;
|
|
385
|
+
$[8] = t9;
|
|
386
|
+
} else t9 = $[8];
|
|
387
|
+
let t10;
|
|
388
|
+
if ($[9] !== parameter.name || $[10] !== setArgument) {
|
|
389
|
+
t10 = (nextValue) => setArgument(parameter.name, nextValue === "" ? void 0 : nextValue === "true");
|
|
390
|
+
$[9] = parameter.name;
|
|
391
|
+
$[10] = setArgument;
|
|
392
|
+
$[11] = t10;
|
|
393
|
+
} else t10 = $[11];
|
|
394
|
+
let t11;
|
|
395
|
+
if ($[12] !== parameter.label || $[13] !== parameter.name || $[14] !== t10 || $[15] !== t3 || $[16] !== t4 || $[17] !== t9) {
|
|
396
|
+
t11 = /* @__PURE__ */ jsx(ScheduleSelect, {
|
|
397
|
+
label: parameter.label,
|
|
398
|
+
description: t3,
|
|
399
|
+
name: parameter.name,
|
|
400
|
+
value: t4,
|
|
401
|
+
options: t9,
|
|
402
|
+
onValueChange: t10
|
|
403
|
+
});
|
|
404
|
+
$[12] = parameter.label;
|
|
405
|
+
$[13] = parameter.name;
|
|
406
|
+
$[14] = t10;
|
|
407
|
+
$[15] = t3;
|
|
408
|
+
$[16] = t4;
|
|
409
|
+
$[17] = t9;
|
|
410
|
+
$[18] = t11;
|
|
411
|
+
} else t11 = $[18];
|
|
412
|
+
let t12;
|
|
413
|
+
if ($[19] !== parameter.name || $[20] !== t11) {
|
|
414
|
+
t12 = /* @__PURE__ */ jsx(Field.Root, {
|
|
415
|
+
name: parameter.name,
|
|
416
|
+
children: t11
|
|
417
|
+
});
|
|
418
|
+
$[19] = parameter.name;
|
|
419
|
+
$[20] = t11;
|
|
420
|
+
$[21] = t12;
|
|
421
|
+
} else t12 = $[21];
|
|
422
|
+
return t12;
|
|
423
|
+
}
|
|
424
|
+
let t3;
|
|
425
|
+
if ($[22] !== parameter.label) {
|
|
426
|
+
t3 = /* @__PURE__ */ jsx(Field.Label, { children: parameter.label });
|
|
427
|
+
$[22] = parameter.label;
|
|
428
|
+
$[23] = t3;
|
|
429
|
+
} else t3 = $[23];
|
|
430
|
+
let t4;
|
|
431
|
+
if ($[24] !== help || $[25] !== parameter.label) {
|
|
432
|
+
t4 = help ? /* @__PURE__ */ jsx(IconButton, {
|
|
433
|
+
label: `About ${parameter.label}`,
|
|
434
|
+
tooltip: help,
|
|
435
|
+
variant: "ghost",
|
|
436
|
+
color: "neutral",
|
|
437
|
+
children: /* @__PURE__ */ jsx(InfoIcon, {})
|
|
438
|
+
}) : null;
|
|
439
|
+
$[24] = help;
|
|
440
|
+
$[25] = parameter.label;
|
|
441
|
+
$[26] = t4;
|
|
442
|
+
} else t4 = $[26];
|
|
443
|
+
let t5;
|
|
444
|
+
if ($[27] !== t3 || $[28] !== t4) {
|
|
445
|
+
t5 = /* @__PURE__ */ jsxs("div", {
|
|
227
446
|
className: "think-schedule__input-label",
|
|
228
|
-
children: [
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
447
|
+
children: [t3, t4]
|
|
448
|
+
});
|
|
449
|
+
$[27] = t3;
|
|
450
|
+
$[28] = t4;
|
|
451
|
+
$[29] = t5;
|
|
452
|
+
} else t5 = $[29];
|
|
453
|
+
const t6 = parameter.type === "number" ? "number" : "text";
|
|
454
|
+
const t7 = parameter.type === "number" ? "any" : void 0;
|
|
455
|
+
const t8 = value === void 0 ? "" : String(value);
|
|
456
|
+
const t9 = parameter.required ? void 0 : "Use automation default";
|
|
457
|
+
let t10;
|
|
458
|
+
if ($[30] !== parameter.name || $[31] !== parameter.type || $[32] !== setArgument) {
|
|
459
|
+
t10 = (event) => {
|
|
460
|
+
const nextValue_0 = event.currentTarget.value;
|
|
461
|
+
setArgument(parameter.name, nextValue_0 === "" ? void 0 : parameter.type === "number" ? Number(nextValue_0) : nextValue_0);
|
|
462
|
+
};
|
|
463
|
+
$[30] = parameter.name;
|
|
464
|
+
$[31] = parameter.type;
|
|
465
|
+
$[32] = setArgument;
|
|
466
|
+
$[33] = t10;
|
|
467
|
+
} else t10 = $[33];
|
|
468
|
+
let t11;
|
|
469
|
+
if ($[34] !== parameter.name || $[35] !== t10 || $[36] !== t6 || $[37] !== t7 || $[38] !== t8 || $[39] !== t9) {
|
|
470
|
+
t11 = /* @__PURE__ */ jsx(Field.Control, {
|
|
236
471
|
name: parameter.name,
|
|
237
|
-
type:
|
|
238
|
-
step:
|
|
239
|
-
value:
|
|
472
|
+
type: t6,
|
|
473
|
+
step: t7,
|
|
474
|
+
value: t8,
|
|
240
475
|
autoComplete: "off",
|
|
241
|
-
placeholder:
|
|
242
|
-
onChange:
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
476
|
+
placeholder: t9,
|
|
477
|
+
onChange: t10
|
|
478
|
+
});
|
|
479
|
+
$[34] = parameter.name;
|
|
480
|
+
$[35] = t10;
|
|
481
|
+
$[36] = t6;
|
|
482
|
+
$[37] = t7;
|
|
483
|
+
$[38] = t8;
|
|
484
|
+
$[39] = t9;
|
|
485
|
+
$[40] = t11;
|
|
486
|
+
} else t11 = $[40];
|
|
487
|
+
let t12;
|
|
488
|
+
if ($[41] !== parameter.name || $[42] !== t11 || $[43] !== t5) {
|
|
489
|
+
t12 = /* @__PURE__ */ jsxs(Field.Root, {
|
|
490
|
+
name: parameter.name,
|
|
491
|
+
children: [t5, t11]
|
|
492
|
+
});
|
|
493
|
+
$[41] = parameter.name;
|
|
494
|
+
$[42] = t11;
|
|
495
|
+
$[43] = t5;
|
|
496
|
+
$[44] = t12;
|
|
497
|
+
} else t12 = $[44];
|
|
498
|
+
return t12;
|
|
248
499
|
}
|
|
249
500
|
function useScheduleTiming(initialTiming) {
|
|
250
|
-
const
|
|
501
|
+
const $ = c(25);
|
|
502
|
+
let t0;
|
|
503
|
+
if ($[0] !== initialTiming) {
|
|
504
|
+
t0 = () => timingDraft(initialTiming);
|
|
505
|
+
$[0] = initialTiming;
|
|
506
|
+
$[1] = t0;
|
|
507
|
+
} else t0 = $[1];
|
|
508
|
+
const [draft, setDraft] = React.useState(t0);
|
|
251
509
|
const [timezoneInput, setTimezoneInput] = React.useState(draft.timezone);
|
|
252
510
|
const [timezoneError, setTimezoneError] = React.useState(false);
|
|
253
511
|
const [daysError, setDaysError] = React.useState(false);
|
|
254
512
|
const firstDayRef = React.useRef(null);
|
|
255
513
|
const timezoneInputRef = React.useRef(null);
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
value
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
514
|
+
let t1;
|
|
515
|
+
if ($[2] !== draft.timezone) {
|
|
516
|
+
t1 = TIMEZONE_OPTIONS.some((option) => option.value === draft.timezone) ? TIMEZONE_OPTIONS : [...TIMEZONE_OPTIONS, {
|
|
517
|
+
label: draft.timezone,
|
|
518
|
+
value: draft.timezone
|
|
519
|
+
}].sort(_temp);
|
|
520
|
+
$[2] = draft.timezone;
|
|
521
|
+
$[3] = t1;
|
|
522
|
+
} else t1 = $[3];
|
|
523
|
+
const timezoneOptions = t1;
|
|
524
|
+
let t2;
|
|
525
|
+
if ($[4] !== draft.timezone || $[5] !== timezoneOptions) {
|
|
526
|
+
t2 = timezoneOptions.find((option_0) => option_0.value === draft.timezone) ?? {
|
|
527
|
+
label: draft.timezone,
|
|
528
|
+
value: draft.timezone
|
|
529
|
+
};
|
|
530
|
+
$[4] = draft.timezone;
|
|
531
|
+
$[5] = timezoneOptions;
|
|
532
|
+
$[6] = t2;
|
|
533
|
+
} else t2 = $[6];
|
|
534
|
+
const selectedTimezone = t2;
|
|
535
|
+
let t3;
|
|
536
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
537
|
+
t3 = function change(fields) {
|
|
538
|
+
setDraft((current) => ({
|
|
539
|
+
...current,
|
|
540
|
+
...fields
|
|
541
|
+
}));
|
|
542
|
+
};
|
|
543
|
+
$[7] = t3;
|
|
544
|
+
} else t3 = $[7];
|
|
545
|
+
const change = t3;
|
|
546
|
+
let t4;
|
|
547
|
+
if ($[8] !== selectedTimezone) {
|
|
548
|
+
t4 = function typeTimezone(input) {
|
|
549
|
+
setTimezoneInput(input);
|
|
550
|
+
if (input === selectedTimezone.label) setTimezoneError(false);
|
|
551
|
+
};
|
|
552
|
+
$[8] = selectedTimezone;
|
|
553
|
+
$[9] = t4;
|
|
554
|
+
} else t4 = $[9];
|
|
555
|
+
const typeTimezone = t4;
|
|
556
|
+
let t5;
|
|
557
|
+
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
558
|
+
t5 = function selectTimezone(option_1) {
|
|
559
|
+
change({ timezone: option_1.value });
|
|
560
|
+
setTimezoneInput(option_1.label);
|
|
561
|
+
setTimezoneError(false);
|
|
562
|
+
};
|
|
563
|
+
$[10] = t5;
|
|
564
|
+
} else t5 = $[10];
|
|
565
|
+
const selectTimezone = t5;
|
|
566
|
+
let t6;
|
|
567
|
+
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
568
|
+
t6 = function chooseDays(days) {
|
|
569
|
+
change({ days });
|
|
570
|
+
if (days.length > 0) setDaysError(false);
|
|
571
|
+
};
|
|
572
|
+
$[11] = t6;
|
|
573
|
+
} else t6 = $[11];
|
|
574
|
+
const chooseDays = t6;
|
|
575
|
+
let t7;
|
|
576
|
+
if ($[12] !== draft || $[13] !== selectedTimezone || $[14] !== timezoneInput) {
|
|
577
|
+
t7 = function value() {
|
|
578
|
+
if (draft.kind !== "interval" && timezoneInput !== selectedTimezone.label) {
|
|
579
|
+
setTimezoneError(true);
|
|
580
|
+
queueMicrotask(() => timezoneInputRef.current?.focus());
|
|
581
|
+
return null;
|
|
582
|
+
}
|
|
583
|
+
if (draft.kind === "weekly" && draft.days.length === 0) {
|
|
584
|
+
setDaysError(true);
|
|
585
|
+
queueMicrotask(() => firstDayRef.current?.focus());
|
|
586
|
+
return null;
|
|
587
|
+
}
|
|
588
|
+
return serializeSchedule(draft);
|
|
589
|
+
};
|
|
590
|
+
$[12] = draft;
|
|
591
|
+
$[13] = selectedTimezone;
|
|
592
|
+
$[14] = timezoneInput;
|
|
593
|
+
$[15] = t7;
|
|
594
|
+
} else t7 = $[15];
|
|
595
|
+
const value = t7;
|
|
596
|
+
let t8;
|
|
597
|
+
if ($[16] !== daysError || $[17] !== draft || $[18] !== selectedTimezone || $[19] !== timezoneError || $[20] !== timezoneInput || $[21] !== timezoneOptions || $[22] !== typeTimezone || $[23] !== value) {
|
|
598
|
+
t8 = {
|
|
599
|
+
draft,
|
|
600
|
+
change,
|
|
601
|
+
timezoneInput,
|
|
602
|
+
typeTimezone,
|
|
603
|
+
selectTimezone,
|
|
604
|
+
timezoneError,
|
|
605
|
+
timezoneInputRef,
|
|
606
|
+
timezoneOptions,
|
|
607
|
+
selectedTimezone,
|
|
608
|
+
chooseDays,
|
|
609
|
+
daysError,
|
|
610
|
+
firstDayRef,
|
|
611
|
+
value
|
|
612
|
+
};
|
|
613
|
+
$[16] = daysError;
|
|
614
|
+
$[17] = draft;
|
|
615
|
+
$[18] = selectedTimezone;
|
|
616
|
+
$[19] = timezoneError;
|
|
617
|
+
$[20] = timezoneInput;
|
|
618
|
+
$[21] = timezoneOptions;
|
|
619
|
+
$[22] = typeTimezone;
|
|
620
|
+
$[23] = value;
|
|
621
|
+
$[24] = t8;
|
|
622
|
+
} else t8 = $[24];
|
|
623
|
+
return t8;
|
|
624
|
+
}
|
|
625
|
+
function _temp(left, right) {
|
|
626
|
+
return left.value.localeCompare(right.value);
|
|
311
627
|
}
|
|
312
|
-
function ScheduleWeeklyDays(
|
|
628
|
+
function ScheduleWeeklyDays(t0) {
|
|
629
|
+
const $ = c(20);
|
|
630
|
+
const { timing } = t0;
|
|
313
631
|
const descriptionId = React.useId();
|
|
314
632
|
const errorId = React.useId();
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
children:
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
633
|
+
let t1;
|
|
634
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
635
|
+
t1 = /* @__PURE__ */ jsx(Fieldset.Legend, { children: "Days" });
|
|
636
|
+
$[0] = t1;
|
|
637
|
+
} else t1 = $[0];
|
|
638
|
+
let t2;
|
|
639
|
+
if ($[1] !== descriptionId) {
|
|
640
|
+
t2 = /* @__PURE__ */ jsx(Fieldset.Description, {
|
|
641
|
+
id: descriptionId,
|
|
642
|
+
children: "Select at least one day."
|
|
643
|
+
});
|
|
644
|
+
$[1] = descriptionId;
|
|
645
|
+
$[2] = t2;
|
|
646
|
+
} else t2 = $[2];
|
|
647
|
+
const t3 = timing.draft.days;
|
|
648
|
+
const t4 = `${descriptionId}${timing.daysError ? ` ${errorId}` : ""}`;
|
|
649
|
+
const t5 = timing.daysError || void 0;
|
|
650
|
+
let t6;
|
|
651
|
+
if ($[3] !== timing) {
|
|
652
|
+
t6 = (values) => timing.chooseDays(WEEKDAYS.filter((day) => values.includes(day.token)).map(_temp2));
|
|
653
|
+
$[3] = timing;
|
|
654
|
+
$[4] = t6;
|
|
655
|
+
} else t6 = $[4];
|
|
656
|
+
let t7;
|
|
657
|
+
if ($[5] !== timing.firstDayRef) {
|
|
658
|
+
t7 = WEEKDAYS.map((day_1) => /* @__PURE__ */ jsxs(CheckboxGroup.Item, { children: [/* @__PURE__ */ jsx(CheckboxGroup.Icon, { children: /* @__PURE__ */ jsx(Checkbox.Root, {
|
|
659
|
+
ref: day_1.token === "mon" ? timing.firstDayRef : void 0,
|
|
660
|
+
value: day_1.token,
|
|
661
|
+
children: /* @__PURE__ */ jsx(Checkbox.Indicator, {})
|
|
662
|
+
}) }), /* @__PURE__ */ jsx(CheckboxGroup.Content, { children: /* @__PURE__ */ jsx(CheckboxGroup.Title, { children: day_1.label }) })] }, day_1.token));
|
|
663
|
+
$[5] = timing.firstDayRef;
|
|
664
|
+
$[6] = t7;
|
|
665
|
+
} else t7 = $[6];
|
|
666
|
+
let t8;
|
|
667
|
+
if ($[7] !== t4 || $[8] !== t5 || $[9] !== t6 || $[10] !== t7 || $[11] !== timing.draft.days) {
|
|
668
|
+
t8 = /* @__PURE__ */ jsx(CheckboxGroup, {
|
|
669
|
+
layout: "grid",
|
|
670
|
+
value: t3,
|
|
671
|
+
"aria-describedby": t4,
|
|
672
|
+
"aria-invalid": t5,
|
|
673
|
+
onValueChange: t6,
|
|
674
|
+
children: t7
|
|
675
|
+
});
|
|
676
|
+
$[7] = t4;
|
|
677
|
+
$[8] = t5;
|
|
678
|
+
$[9] = t6;
|
|
679
|
+
$[10] = t7;
|
|
680
|
+
$[11] = timing.draft.days;
|
|
681
|
+
$[12] = t8;
|
|
682
|
+
} else t8 = $[12];
|
|
683
|
+
let t9;
|
|
684
|
+
if ($[13] !== errorId || $[14] !== timing.daysError) {
|
|
685
|
+
t9 = timing.daysError ? /* @__PURE__ */ jsx(Field.Errors, {
|
|
686
|
+
id: errorId,
|
|
687
|
+
errors: ["Select at least one day."]
|
|
688
|
+
}) : null;
|
|
689
|
+
$[13] = errorId;
|
|
690
|
+
$[14] = timing.daysError;
|
|
691
|
+
$[15] = t9;
|
|
692
|
+
} else t9 = $[15];
|
|
693
|
+
let t10;
|
|
694
|
+
if ($[16] !== t2 || $[17] !== t8 || $[18] !== t9) {
|
|
695
|
+
t10 = /* @__PURE__ */ jsxs(Fieldset.Root, {
|
|
696
|
+
variant: "plain",
|
|
697
|
+
children: [
|
|
698
|
+
t1,
|
|
699
|
+
t2,
|
|
700
|
+
t8,
|
|
701
|
+
t9
|
|
702
|
+
]
|
|
703
|
+
});
|
|
704
|
+
$[16] = t2;
|
|
705
|
+
$[17] = t8;
|
|
706
|
+
$[18] = t9;
|
|
707
|
+
$[19] = t10;
|
|
708
|
+
} else t10 = $[19];
|
|
709
|
+
return t10;
|
|
710
|
+
}
|
|
711
|
+
function _temp2(day_0) {
|
|
712
|
+
return day_0.token;
|
|
341
713
|
}
|
|
342
|
-
function ScheduleTimingFields(
|
|
714
|
+
function ScheduleTimingFields(t0) {
|
|
715
|
+
const $ = c(24);
|
|
716
|
+
const { timing } = t0;
|
|
343
717
|
const intervalLabelId = React.useId();
|
|
344
718
|
const timezoneLabelId = React.useId();
|
|
345
719
|
const timezoneErrorId = React.useId();
|
|
346
|
-
const { draft } = timing;
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
720
|
+
const { draft, timezoneError, timezoneOptions, selectedTimezone, timezoneInput, typeTimezone, timezoneInputRef, selectTimezone } = timing;
|
|
721
|
+
let t1;
|
|
722
|
+
if ($[0] !== timing) {
|
|
723
|
+
t1 = (kind) => timing.change({ kind });
|
|
724
|
+
$[0] = timing;
|
|
725
|
+
$[1] = t1;
|
|
726
|
+
} else t1 = $[1];
|
|
727
|
+
let t2;
|
|
728
|
+
if ($[2] !== draft.kind || $[3] !== t1) {
|
|
729
|
+
t2 = /* @__PURE__ */ jsx(ScheduleSelect, {
|
|
730
|
+
label: "Repeats",
|
|
731
|
+
value: draft.kind,
|
|
732
|
+
options: REPEAT_KIND_OPTIONS,
|
|
733
|
+
onValueChange: t1
|
|
734
|
+
});
|
|
735
|
+
$[2] = draft.kind;
|
|
736
|
+
$[3] = t1;
|
|
737
|
+
$[4] = t2;
|
|
738
|
+
} else t2 = $[4];
|
|
739
|
+
let t3;
|
|
740
|
+
if ($[5] !== draft.intervalEvery || $[6] !== draft.intervalUnit || $[7] !== draft.kind || $[8] !== draft.time || $[9] !== intervalLabelId || $[10] !== selectTimezone || $[11] !== selectedTimezone || $[12] !== timezoneError || $[13] !== timezoneErrorId || $[14] !== timezoneInput || $[15] !== timezoneInputRef || $[16] !== timezoneLabelId || $[17] !== timezoneOptions || $[18] !== timing || $[19] !== typeTimezone) {
|
|
741
|
+
t3 = draft.kind === "interval" ? /* @__PURE__ */ jsxs(Field.Group, {
|
|
742
|
+
className: "think-schedule__form-row",
|
|
743
|
+
children: [/* @__PURE__ */ jsxs(Field.Root, {
|
|
744
|
+
name: "interval",
|
|
745
|
+
children: [/* @__PURE__ */ jsx(Field.Label, {
|
|
746
|
+
id: intervalLabelId,
|
|
747
|
+
children: "Every"
|
|
748
|
+
}), /* @__PURE__ */ jsx(NumberField.Root, {
|
|
749
|
+
value: draft.intervalEvery,
|
|
750
|
+
min: 1,
|
|
751
|
+
step: 1,
|
|
752
|
+
onValueChange: (intervalEvery) => timing.change({ intervalEvery }),
|
|
753
|
+
children: /* @__PURE__ */ jsxs(NumberField.Group, { children: [
|
|
754
|
+
/* @__PURE__ */ jsx(NumberField.Decrement, {
|
|
755
|
+
"aria-label": "Decrease interval",
|
|
756
|
+
children: "−"
|
|
757
|
+
}),
|
|
758
|
+
/* @__PURE__ */ jsx(NumberField.Input, {
|
|
759
|
+
name: "interval",
|
|
760
|
+
required: true,
|
|
761
|
+
"aria-labelledby": intervalLabelId
|
|
762
|
+
}),
|
|
763
|
+
/* @__PURE__ */ jsx(NumberField.Increment, {
|
|
764
|
+
"aria-label": "Increase interval",
|
|
765
|
+
children: "+"
|
|
766
|
+
})
|
|
767
|
+
] })
|
|
768
|
+
})]
|
|
769
|
+
}), /* @__PURE__ */ jsx(ScheduleSelect, {
|
|
770
|
+
label: "Unit",
|
|
771
|
+
value: draft.intervalUnit,
|
|
772
|
+
options: INTERVAL_UNIT_OPTIONS,
|
|
773
|
+
onValueChange: (intervalUnit) => timing.change({ intervalUnit })
|
|
774
|
+
})]
|
|
775
|
+
}) : /* @__PURE__ */ jsxs(Fragment, { children: [draft.kind === "weekly" ? /* @__PURE__ */ jsx(ScheduleWeeklyDays, { timing }) : null, /* @__PURE__ */ jsxs(Field.Group, {
|
|
776
|
+
className: "think-schedule__form-row",
|
|
777
|
+
children: [/* @__PURE__ */ jsxs(Field.Root, {
|
|
778
|
+
name: "time",
|
|
779
|
+
children: [
|
|
780
|
+
/* @__PURE__ */ jsx(Field.Label, { children: "Time" }),
|
|
781
|
+
/* @__PURE__ */ jsx(Field.Control, {
|
|
782
|
+
name: "time",
|
|
783
|
+
type: "time",
|
|
784
|
+
value: draft.time,
|
|
371
785
|
required: true,
|
|
372
|
-
|
|
786
|
+
onChange: (event) => timing.change({ time: event.currentTarget.value })
|
|
373
787
|
}),
|
|
374
|
-
/* @__PURE__ */ jsx(
|
|
375
|
-
|
|
376
|
-
children: "
|
|
788
|
+
/* @__PURE__ */ jsx(Field.Error, {
|
|
789
|
+
match: "valueMissing",
|
|
790
|
+
children: "Time is required"
|
|
377
791
|
})
|
|
378
|
-
]
|
|
792
|
+
]
|
|
793
|
+
}), /* @__PURE__ */ jsxs(Field.Root, {
|
|
794
|
+
name: "timezone",
|
|
795
|
+
invalid: timezoneError,
|
|
796
|
+
children: [
|
|
797
|
+
/* @__PURE__ */ jsx(Field.Label, {
|
|
798
|
+
id: timezoneLabelId,
|
|
799
|
+
children: "Time zone"
|
|
800
|
+
}),
|
|
801
|
+
/* @__PURE__ */ jsxs(Combobox.Root, {
|
|
802
|
+
items: timezoneOptions,
|
|
803
|
+
value: selectedTimezone,
|
|
804
|
+
inputValue: timezoneInput,
|
|
805
|
+
onInputValueChange: typeTimezone,
|
|
806
|
+
onValueChange: (option) => {
|
|
807
|
+
if (option) selectTimezone(option);
|
|
808
|
+
},
|
|
809
|
+
children: [/* @__PURE__ */ jsxs(Combobox.InputGroup, { children: [/* @__PURE__ */ jsx(Combobox.Input, {
|
|
810
|
+
ref: timezoneInputRef,
|
|
811
|
+
name: "timezone",
|
|
812
|
+
required: true,
|
|
813
|
+
"aria-invalid": timezoneError || void 0,
|
|
814
|
+
"aria-labelledby": timezoneLabelId,
|
|
815
|
+
"aria-describedby": timezoneError ? timezoneErrorId : void 0
|
|
816
|
+
}), /* @__PURE__ */ jsx(Combobox.Trigger, {
|
|
817
|
+
"aria-label": "Open time zone list",
|
|
818
|
+
children: /* @__PURE__ */ jsx(ChevronDownIcon, {})
|
|
819
|
+
})] }), /* @__PURE__ */ jsx(Combobox.Portal, { children: /* @__PURE__ */ jsx(Combobox.Positioner, {
|
|
820
|
+
sideOffset: 4,
|
|
821
|
+
children: /* @__PURE__ */ jsxs(Combobox.Popup, { children: [/* @__PURE__ */ jsx(Combobox.List, { children: _temp3 }), /* @__PURE__ */ jsx(Combobox.Empty, { children: "No matching time zones." })] })
|
|
822
|
+
}) })]
|
|
823
|
+
}),
|
|
824
|
+
timezoneError ? /* @__PURE__ */ jsx(Field.Errors, {
|
|
825
|
+
id: timezoneErrorId,
|
|
826
|
+
errors: ["Select a valid time zone from the list."]
|
|
827
|
+
}) : null
|
|
828
|
+
]
|
|
379
829
|
})]
|
|
380
|
-
})
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
/* @__PURE__ */ jsxs(Combobox.Root, {
|
|
413
|
-
items: timing.timezoneOptions,
|
|
414
|
-
value: timing.selectedTimezone,
|
|
415
|
-
inputValue: timing.timezoneInput,
|
|
416
|
-
onInputValueChange: timing.typeTimezone,
|
|
417
|
-
onValueChange: (option) => {
|
|
418
|
-
if (option) timing.selectTimezone(option);
|
|
419
|
-
},
|
|
420
|
-
children: [/* @__PURE__ */ jsxs(Combobox.InputGroup, { children: [/* @__PURE__ */ jsx(Combobox.Input, {
|
|
421
|
-
ref: timing.timezoneInputRef,
|
|
422
|
-
name: "timezone",
|
|
423
|
-
required: true,
|
|
424
|
-
"aria-invalid": timing.timezoneError || void 0,
|
|
425
|
-
"aria-labelledby": timezoneLabelId,
|
|
426
|
-
"aria-describedby": timing.timezoneError ? timezoneErrorId : void 0
|
|
427
|
-
}), /* @__PURE__ */ jsx(Combobox.Trigger, {
|
|
428
|
-
"aria-label": "Open time zone list",
|
|
429
|
-
children: /* @__PURE__ */ jsx(ChevronDownIcon, {})
|
|
430
|
-
})] }), /* @__PURE__ */ jsx(Combobox.Portal, { children: /* @__PURE__ */ jsx(Combobox.Positioner, {
|
|
431
|
-
sideOffset: 4,
|
|
432
|
-
children: /* @__PURE__ */ jsxs(Combobox.Popup, { children: [/* @__PURE__ */ jsx(Combobox.List, { children: (option) => /* @__PURE__ */ jsxs(Combobox.Item, {
|
|
433
|
-
value: option,
|
|
434
|
-
children: [/* @__PURE__ */ jsx(Combobox.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) }), option.label]
|
|
435
|
-
}, option.value) }), /* @__PURE__ */ jsx(Combobox.Empty, { children: "No matching time zones." })] })
|
|
436
|
-
}) })]
|
|
437
|
-
}),
|
|
438
|
-
timing.timezoneError ? /* @__PURE__ */ jsx(Field.Errors, {
|
|
439
|
-
id: timezoneErrorId,
|
|
440
|
-
errors: ["Select a valid time zone from the list."]
|
|
441
|
-
}) : null
|
|
442
|
-
]
|
|
443
|
-
})]
|
|
444
|
-
})] })] });
|
|
830
|
+
})] });
|
|
831
|
+
$[5] = draft.intervalEvery;
|
|
832
|
+
$[6] = draft.intervalUnit;
|
|
833
|
+
$[7] = draft.kind;
|
|
834
|
+
$[8] = draft.time;
|
|
835
|
+
$[9] = intervalLabelId;
|
|
836
|
+
$[10] = selectTimezone;
|
|
837
|
+
$[11] = selectedTimezone;
|
|
838
|
+
$[12] = timezoneError;
|
|
839
|
+
$[13] = timezoneErrorId;
|
|
840
|
+
$[14] = timezoneInput;
|
|
841
|
+
$[15] = timezoneInputRef;
|
|
842
|
+
$[16] = timezoneLabelId;
|
|
843
|
+
$[17] = timezoneOptions;
|
|
844
|
+
$[18] = timing;
|
|
845
|
+
$[19] = typeTimezone;
|
|
846
|
+
$[20] = t3;
|
|
847
|
+
} else t3 = $[20];
|
|
848
|
+
let t4;
|
|
849
|
+
if ($[21] !== t2 || $[22] !== t3) {
|
|
850
|
+
t4 = /* @__PURE__ */ jsxs(Fragment, { children: [t2, t3] });
|
|
851
|
+
$[21] = t2;
|
|
852
|
+
$[22] = t3;
|
|
853
|
+
$[23] = t4;
|
|
854
|
+
} else t4 = $[23];
|
|
855
|
+
return t4;
|
|
856
|
+
}
|
|
857
|
+
function _temp3(option_0) {
|
|
858
|
+
return /* @__PURE__ */ jsxs(Combobox.Item, {
|
|
859
|
+
value: option_0,
|
|
860
|
+
children: [/* @__PURE__ */ jsx(Combobox.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) }), option_0.label]
|
|
861
|
+
}, option_0.value);
|
|
445
862
|
}
|
|
446
863
|
function useScheduleTask(schedule, initialAutomation) {
|
|
864
|
+
const $ = c(21);
|
|
447
865
|
const initialInvocation = schedule ? "automation" in schedule.task ? schedule.task.automation : void 0 : initialAutomation;
|
|
448
866
|
const initialPath = initialInvocation?.path ?? "";
|
|
449
867
|
const [mode, setMode] = React.useState(initialPath ? "automation" : "prompt");
|
|
450
868
|
const [prompt, setPrompt] = React.useState(schedule && "prompt" in schedule.task ? schedule.task.prompt : "");
|
|
451
869
|
const [automationPath, setAutomationPath] = React.useState(initialPath);
|
|
452
|
-
|
|
870
|
+
let t0;
|
|
871
|
+
if ($[0] !== initialInvocation) {
|
|
872
|
+
t0 = () => initialInvocation ? { [initialInvocation.path]: initialInvocation.args ?? {} } : {};
|
|
873
|
+
$[0] = initialInvocation;
|
|
874
|
+
$[1] = t0;
|
|
875
|
+
} else t0 = $[1];
|
|
876
|
+
const [argumentsByPath, setArgumentsByPath] = React.useState(t0);
|
|
453
877
|
const table = automationPath === initialInvocation?.path ? initialInvocation.table : void 0;
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
878
|
+
let t1;
|
|
879
|
+
if ($[2] !== argumentsByPath || $[3] !== automationPath) {
|
|
880
|
+
t1 = argumentsByPath[automationPath] ?? {};
|
|
881
|
+
$[2] = argumentsByPath;
|
|
882
|
+
$[3] = automationPath;
|
|
883
|
+
$[4] = t1;
|
|
884
|
+
} else t1 = $[4];
|
|
885
|
+
const automationArgs = t1;
|
|
886
|
+
let t2;
|
|
887
|
+
if ($[5] !== automationPath) {
|
|
888
|
+
t2 = function setArgument(name, value) {
|
|
889
|
+
setArgumentsByPath((current) => {
|
|
890
|
+
const args = { ...current[automationPath] };
|
|
891
|
+
if (value === void 0) delete args[name];
|
|
892
|
+
else args[name] = value;
|
|
893
|
+
return {
|
|
894
|
+
...current,
|
|
895
|
+
[automationPath]: args
|
|
896
|
+
};
|
|
897
|
+
});
|
|
898
|
+
};
|
|
899
|
+
$[5] = automationPath;
|
|
900
|
+
$[6] = t2;
|
|
901
|
+
} else t2 = $[6];
|
|
902
|
+
const setArgument = t2;
|
|
903
|
+
let t3;
|
|
904
|
+
if ($[7] !== automationArgs || $[8] !== automationPath || $[9] !== mode || $[10] !== prompt || $[11] !== table) {
|
|
905
|
+
t3 = function value() {
|
|
906
|
+
if (mode === "prompt") return prompt.trim() ? { prompt: prompt.trim() } : null;
|
|
907
|
+
if (!automationPath.trim()) return null;
|
|
908
|
+
return { automation: {
|
|
909
|
+
path: automationPath,
|
|
910
|
+
args: automationArgs,
|
|
911
|
+
...table ? { table } : {}
|
|
912
|
+
} };
|
|
913
|
+
};
|
|
914
|
+
$[7] = automationArgs;
|
|
915
|
+
$[8] = automationPath;
|
|
916
|
+
$[9] = mode;
|
|
917
|
+
$[10] = prompt;
|
|
918
|
+
$[11] = table;
|
|
919
|
+
$[12] = t3;
|
|
920
|
+
} else t3 = $[12];
|
|
921
|
+
const value_0 = t3;
|
|
922
|
+
let t4;
|
|
923
|
+
if ($[13] !== automationArgs || $[14] !== automationPath || $[15] !== mode || $[16] !== prompt || $[17] !== setArgument || $[18] !== table || $[19] !== value_0) {
|
|
924
|
+
t4 = {
|
|
925
|
+
mode,
|
|
926
|
+
setMode,
|
|
927
|
+
prompt,
|
|
928
|
+
setPrompt,
|
|
929
|
+
automationPath,
|
|
930
|
+
setAutomationPath,
|
|
931
|
+
table,
|
|
932
|
+
automationArgs,
|
|
933
|
+
setArgument,
|
|
934
|
+
value: value_0
|
|
935
|
+
};
|
|
936
|
+
$[13] = automationArgs;
|
|
937
|
+
$[14] = automationPath;
|
|
938
|
+
$[15] = mode;
|
|
939
|
+
$[16] = prompt;
|
|
940
|
+
$[17] = setArgument;
|
|
941
|
+
$[18] = table;
|
|
942
|
+
$[19] = value_0;
|
|
943
|
+
$[20] = t4;
|
|
944
|
+
} else t4 = $[20];
|
|
945
|
+
return t4;
|
|
487
946
|
}
|
|
488
|
-
function ScheduleAutomationFields(
|
|
489
|
-
const
|
|
490
|
-
const
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
947
|
+
function ScheduleAutomationFields(t0) {
|
|
948
|
+
const $ = c(39);
|
|
949
|
+
const { task, automations, automationsLoading, automationsError } = t0;
|
|
950
|
+
let t1;
|
|
951
|
+
let t2;
|
|
952
|
+
let t3;
|
|
953
|
+
let t4;
|
|
954
|
+
let t5;
|
|
955
|
+
let t6;
|
|
956
|
+
if ($[0] !== automations || $[1] !== automationsError || $[2] !== automationsLoading || $[3] !== task.automationArgs || $[4] !== task.automationPath || $[5] !== task.setArgument || $[6] !== task.setAutomationPath || $[7] !== task.table) {
|
|
957
|
+
let t7;
|
|
958
|
+
if ($[14] !== task.automationPath) {
|
|
959
|
+
t7 = (automation) => automation.path === task.automationPath;
|
|
960
|
+
$[14] = task.automationPath;
|
|
961
|
+
$[15] = t7;
|
|
962
|
+
} else t7 = $[15];
|
|
963
|
+
const selectedAutomation = automations.find(t7);
|
|
964
|
+
const automationOptions = automations.map(_temp4);
|
|
965
|
+
if (task.automationPath && !selectedAutomation) automationOptions.unshift({
|
|
966
|
+
label: "Automation (unavailable)",
|
|
967
|
+
value: task.automationPath
|
|
968
|
+
});
|
|
969
|
+
const retainedArgs = Object.fromEntries(Object.entries(task.automationArgs).filter((t8) => {
|
|
970
|
+
const [name, value] = t8;
|
|
971
|
+
return !selectedAutomation?.parameters.some((parameter) => parameter.name === name && typeof value === parameter.type);
|
|
972
|
+
}));
|
|
973
|
+
const t9 = automationsLoading ? "Loading automations…" : "Choose an automation";
|
|
974
|
+
let t10;
|
|
975
|
+
if ($[16] !== t9) {
|
|
976
|
+
t10 = {
|
|
977
|
+
label: t9,
|
|
506
978
|
value: ""
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
979
|
+
};
|
|
980
|
+
$[16] = t9;
|
|
981
|
+
$[17] = t10;
|
|
982
|
+
} else t10 = $[17];
|
|
983
|
+
const t11 = [t10, ...automationOptions];
|
|
984
|
+
if ($[18] !== automationsLoading || $[19] !== t11 || $[20] !== task.automationPath || $[21] !== task.setAutomationPath) {
|
|
985
|
+
t1 = /* @__PURE__ */ jsx(ScheduleSelect, {
|
|
986
|
+
label: "Automation",
|
|
987
|
+
value: task.automationPath,
|
|
988
|
+
disabled: automationsLoading,
|
|
989
|
+
options: t11,
|
|
990
|
+
onValueChange: task.setAutomationPath
|
|
991
|
+
});
|
|
992
|
+
$[18] = automationsLoading;
|
|
993
|
+
$[19] = t11;
|
|
994
|
+
$[20] = task.automationPath;
|
|
995
|
+
$[21] = task.setAutomationPath;
|
|
996
|
+
$[22] = t1;
|
|
997
|
+
} else t1 = $[22];
|
|
998
|
+
if ($[23] !== automationsError) {
|
|
999
|
+
t2 = automationsError ? /* @__PURE__ */ jsx(Field.Errors, { errors: [executionErrorSummary(automationsError)] }) : null;
|
|
1000
|
+
$[23] = automationsError;
|
|
1001
|
+
$[24] = t2;
|
|
1002
|
+
} else t2 = $[24];
|
|
1003
|
+
if ($[25] !== automations.length || $[26] !== automationsError || $[27] !== automationsLoading) {
|
|
1004
|
+
t3 = !automationsLoading && !automationsError && automations.length === 0 ? /* @__PURE__ */ jsx("p", {
|
|
1005
|
+
className: "think-schedule__input-help",
|
|
1006
|
+
children: "Ask Rook to create an automation first."
|
|
1007
|
+
}) : null;
|
|
1008
|
+
$[25] = automations.length;
|
|
1009
|
+
$[26] = automationsError;
|
|
1010
|
+
$[27] = automationsLoading;
|
|
1011
|
+
$[28] = t3;
|
|
1012
|
+
} else t3 = $[28];
|
|
1013
|
+
if ($[29] !== automations || $[30] !== task.table) {
|
|
1014
|
+
t4 = /* @__PURE__ */ jsx(ScheduleTableSource, {
|
|
1015
|
+
table: task.table,
|
|
1016
|
+
automations
|
|
1017
|
+
});
|
|
1018
|
+
$[29] = automations;
|
|
1019
|
+
$[30] = task.table;
|
|
1020
|
+
$[31] = t4;
|
|
1021
|
+
} else t4 = $[31];
|
|
1022
|
+
t5 = selectedAutomation?.parameters.filter((parameter_0) => !task.table?.columns[parameter_0.name]).map((parameter_1) => /* @__PURE__ */ jsx(ScheduleAutomationParameter, {
|
|
1023
|
+
parameter: parameter_1,
|
|
1024
|
+
value: task.automationArgs[parameter_1.name],
|
|
522
1025
|
setArgument: task.setArgument
|
|
523
|
-
},
|
|
524
|
-
Object.keys(retainedArgs).length > 0 ? /* @__PURE__ */ jsxs("details", {
|
|
1026
|
+
}, parameter_1.name));
|
|
1027
|
+
t6 = Object.keys(retainedArgs).length > 0 ? /* @__PURE__ */ jsxs("details", {
|
|
525
1028
|
className: "think-schedule__saved-inputs",
|
|
526
1029
|
children: [
|
|
527
1030
|
/* @__PURE__ */ jsx("summary", { children: "Saved inputs" }),
|
|
@@ -534,153 +1037,493 @@ function ScheduleAutomationFields({ task, automations, automationsLoading, autom
|
|
|
534
1037
|
children: "These inputs are preserved. Ask Rook to change them."
|
|
535
1038
|
})
|
|
536
1039
|
]
|
|
537
|
-
}) : null
|
|
538
|
-
|
|
1040
|
+
}) : null;
|
|
1041
|
+
$[0] = automations;
|
|
1042
|
+
$[1] = automationsError;
|
|
1043
|
+
$[2] = automationsLoading;
|
|
1044
|
+
$[3] = task.automationArgs;
|
|
1045
|
+
$[4] = task.automationPath;
|
|
1046
|
+
$[5] = task.setArgument;
|
|
1047
|
+
$[6] = task.setAutomationPath;
|
|
1048
|
+
$[7] = task.table;
|
|
1049
|
+
$[8] = t1;
|
|
1050
|
+
$[9] = t2;
|
|
1051
|
+
$[10] = t3;
|
|
1052
|
+
$[11] = t4;
|
|
1053
|
+
$[12] = t5;
|
|
1054
|
+
$[13] = t6;
|
|
1055
|
+
} else {
|
|
1056
|
+
t1 = $[8];
|
|
1057
|
+
t2 = $[9];
|
|
1058
|
+
t3 = $[10];
|
|
1059
|
+
t4 = $[11];
|
|
1060
|
+
t5 = $[12];
|
|
1061
|
+
t6 = $[13];
|
|
1062
|
+
}
|
|
1063
|
+
let t7;
|
|
1064
|
+
if ($[32] !== t1 || $[33] !== t2 || $[34] !== t3 || $[35] !== t4 || $[36] !== t5 || $[37] !== t6) {
|
|
1065
|
+
t7 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1066
|
+
t1,
|
|
1067
|
+
t2,
|
|
1068
|
+
t3,
|
|
1069
|
+
t4,
|
|
1070
|
+
t5,
|
|
1071
|
+
t6
|
|
1072
|
+
] });
|
|
1073
|
+
$[32] = t1;
|
|
1074
|
+
$[33] = t2;
|
|
1075
|
+
$[34] = t3;
|
|
1076
|
+
$[35] = t4;
|
|
1077
|
+
$[36] = t5;
|
|
1078
|
+
$[37] = t6;
|
|
1079
|
+
$[38] = t7;
|
|
1080
|
+
} else t7 = $[38];
|
|
1081
|
+
return t7;
|
|
539
1082
|
}
|
|
540
|
-
function
|
|
541
|
-
return
|
|
542
|
-
label:
|
|
543
|
-
value:
|
|
544
|
-
|
|
545
|
-
|
|
1083
|
+
function _temp4(automation_0) {
|
|
1084
|
+
return {
|
|
1085
|
+
label: automation_0.name,
|
|
1086
|
+
value: automation_0.path
|
|
1087
|
+
};
|
|
1088
|
+
}
|
|
1089
|
+
function ScheduleTaskFields(t0) {
|
|
1090
|
+
const $ = c(12);
|
|
1091
|
+
const { task, automations, automationsLoading, automationsError } = t0;
|
|
1092
|
+
let t1;
|
|
1093
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1094
|
+
t1 = [{
|
|
546
1095
|
label: "Agent instructions",
|
|
547
1096
|
value: "prompt"
|
|
548
1097
|
}, {
|
|
549
1098
|
label: "Automation",
|
|
550
1099
|
value: "automation"
|
|
551
|
-
}]
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
1100
|
+
}];
|
|
1101
|
+
$[0] = t1;
|
|
1102
|
+
} else t1 = $[0];
|
|
1103
|
+
let t2;
|
|
1104
|
+
if ($[1] !== task.mode || $[2] !== task.setMode) {
|
|
1105
|
+
t2 = /* @__PURE__ */ jsx(ScheduleSelect, {
|
|
1106
|
+
label: "Run",
|
|
1107
|
+
value: task.mode,
|
|
1108
|
+
onValueChange: task.setMode,
|
|
1109
|
+
options: t1
|
|
1110
|
+
});
|
|
1111
|
+
$[1] = task.mode;
|
|
1112
|
+
$[2] = task.setMode;
|
|
1113
|
+
$[3] = t2;
|
|
1114
|
+
} else t2 = $[3];
|
|
1115
|
+
let t3;
|
|
1116
|
+
if ($[4] !== automations || $[5] !== automationsError || $[6] !== automationsLoading || $[7] !== task) {
|
|
1117
|
+
t3 = task.mode === "automation" ? /* @__PURE__ */ jsx(ScheduleAutomationFields, {
|
|
1118
|
+
task,
|
|
1119
|
+
automations,
|
|
1120
|
+
automationsLoading,
|
|
1121
|
+
automationsError
|
|
1122
|
+
}) : /* @__PURE__ */ jsxs(Field.Root, {
|
|
1123
|
+
name: "prompt",
|
|
1124
|
+
children: [
|
|
1125
|
+
/* @__PURE__ */ jsx(Field.Label, { children: "Instructions" }),
|
|
1126
|
+
/* @__PURE__ */ jsx(Field.Control, {
|
|
1127
|
+
render: /* @__PURE__ */ jsx(Textarea, { rows: 8 }),
|
|
1128
|
+
name: "prompt",
|
|
1129
|
+
value: task.prompt,
|
|
1130
|
+
required: true,
|
|
1131
|
+
placeholder: "Review open pull requests, summarize blockers, and draft a concise project update.",
|
|
1132
|
+
onChange: (event) => task.setPrompt(event.currentTarget.value)
|
|
1133
|
+
}),
|
|
1134
|
+
/* @__PURE__ */ jsx(Field.Error, {
|
|
1135
|
+
match: "valueMissing",
|
|
1136
|
+
children: "Instructions are required"
|
|
1137
|
+
})
|
|
1138
|
+
]
|
|
1139
|
+
});
|
|
1140
|
+
$[4] = automations;
|
|
1141
|
+
$[5] = automationsError;
|
|
1142
|
+
$[6] = automationsLoading;
|
|
1143
|
+
$[7] = task;
|
|
1144
|
+
$[8] = t3;
|
|
1145
|
+
} else t3 = $[8];
|
|
1146
|
+
let t4;
|
|
1147
|
+
if ($[9] !== t2 || $[10] !== t3) {
|
|
1148
|
+
t4 = /* @__PURE__ */ jsxs(Fragment, { children: [t2, t3] });
|
|
1149
|
+
$[9] = t2;
|
|
1150
|
+
$[10] = t3;
|
|
1151
|
+
$[11] = t4;
|
|
1152
|
+
} else t4 = $[11];
|
|
1153
|
+
return t4;
|
|
575
1154
|
}
|
|
576
1155
|
/** Create/edit surface for scheduled instructions or an automation. */
|
|
577
|
-
function ThinkScheduleForm(
|
|
1156
|
+
function ThinkScheduleForm(t0) {
|
|
1157
|
+
const $ = c(93);
|
|
1158
|
+
let automationsError;
|
|
1159
|
+
let cancelLink;
|
|
1160
|
+
let className;
|
|
1161
|
+
let initialAutomation;
|
|
1162
|
+
let onDirtyChange;
|
|
1163
|
+
let onSubmit;
|
|
1164
|
+
let props;
|
|
1165
|
+
let ref;
|
|
1166
|
+
let schedule;
|
|
1167
|
+
let t1;
|
|
1168
|
+
let t2;
|
|
1169
|
+
let t3;
|
|
1170
|
+
let t4;
|
|
1171
|
+
if ($[0] !== t0) {
|
|
1172
|
+
({header: t1, cancelLink, cancelLabel: t2, className, schedule, initialAutomation, automations: t3, automationsLoading: t4, automationsError, onDirtyChange, onSubmit, ref, ...props} = t0);
|
|
1173
|
+
$[0] = t0;
|
|
1174
|
+
$[1] = automationsError;
|
|
1175
|
+
$[2] = cancelLink;
|
|
1176
|
+
$[3] = className;
|
|
1177
|
+
$[4] = initialAutomation;
|
|
1178
|
+
$[5] = onDirtyChange;
|
|
1179
|
+
$[6] = onSubmit;
|
|
1180
|
+
$[7] = props;
|
|
1181
|
+
$[8] = ref;
|
|
1182
|
+
$[9] = schedule;
|
|
1183
|
+
$[10] = t1;
|
|
1184
|
+
$[11] = t2;
|
|
1185
|
+
$[12] = t3;
|
|
1186
|
+
$[13] = t4;
|
|
1187
|
+
} else {
|
|
1188
|
+
automationsError = $[1];
|
|
1189
|
+
cancelLink = $[2];
|
|
1190
|
+
className = $[3];
|
|
1191
|
+
initialAutomation = $[4];
|
|
1192
|
+
onDirtyChange = $[5];
|
|
1193
|
+
onSubmit = $[6];
|
|
1194
|
+
props = $[7];
|
|
1195
|
+
ref = $[8];
|
|
1196
|
+
schedule = $[9];
|
|
1197
|
+
t1 = $[10];
|
|
1198
|
+
t2 = $[11];
|
|
1199
|
+
t3 = $[12];
|
|
1200
|
+
t4 = $[13];
|
|
1201
|
+
}
|
|
1202
|
+
const header = t1 === void 0 ? "bar" : t1;
|
|
1203
|
+
const cancelLabel = t2 === void 0 ? "Back to schedules" : t2;
|
|
1204
|
+
let t5;
|
|
1205
|
+
if ($[14] !== t3) {
|
|
1206
|
+
t5 = t3 === void 0 ? [] : t3;
|
|
1207
|
+
$[14] = t3;
|
|
1208
|
+
$[15] = t5;
|
|
1209
|
+
} else t5 = $[15];
|
|
1210
|
+
const automations = t5;
|
|
1211
|
+
const automationsLoading = t4 === void 0 ? false : t4;
|
|
578
1212
|
const editing = schedule !== void 0;
|
|
579
1213
|
const [name, setName] = React.useState(schedule?.name ?? "");
|
|
580
1214
|
const task = useScheduleTask(schedule, initialAutomation);
|
|
581
1215
|
const timing = useScheduleTiming(schedule?.parsedSchedule);
|
|
582
1216
|
const [busy, setBusy] = React.useState(false);
|
|
583
1217
|
const [error, setError] = React.useState(null);
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
1218
|
+
let t6;
|
|
1219
|
+
if ($[16] !== name || $[17] !== task.automationArgs || $[18] !== task.automationPath || $[19] !== task.mode || $[20] !== task.prompt || $[21] !== timing.draft || $[22] !== timing.timezoneInput) {
|
|
1220
|
+
t6 = JSON.stringify({
|
|
1221
|
+
name,
|
|
1222
|
+
task: {
|
|
1223
|
+
mode: task.mode,
|
|
1224
|
+
prompt: task.prompt,
|
|
1225
|
+
path: task.automationPath,
|
|
1226
|
+
args: Object.entries(task.automationArgs).sort(_temp5)
|
|
1227
|
+
},
|
|
1228
|
+
timing: {
|
|
1229
|
+
...timing.draft,
|
|
1230
|
+
timezone: timing.timezoneInput,
|
|
1231
|
+
days: [...timing.draft.days].sort()
|
|
1232
|
+
}
|
|
1233
|
+
});
|
|
1234
|
+
$[16] = name;
|
|
1235
|
+
$[17] = task.automationArgs;
|
|
1236
|
+
$[18] = task.automationPath;
|
|
1237
|
+
$[19] = task.mode;
|
|
1238
|
+
$[20] = task.prompt;
|
|
1239
|
+
$[21] = timing.draft;
|
|
1240
|
+
$[22] = timing.timezoneInput;
|
|
1241
|
+
$[23] = t6;
|
|
1242
|
+
} else t6 = $[23];
|
|
1243
|
+
const draft = t6;
|
|
1244
|
+
const [savedDraft, setSavedDraft] = React.useState(draft);
|
|
1245
|
+
const dirty = draft !== savedDraft;
|
|
1246
|
+
let t7;
|
|
1247
|
+
let t8;
|
|
1248
|
+
if ($[24] !== dirty || $[25] !== onDirtyChange) {
|
|
1249
|
+
t7 = () => {
|
|
1250
|
+
onDirtyChange?.(dirty);
|
|
594
1251
|
};
|
|
1252
|
+
t8 = [dirty, onDirtyChange];
|
|
1253
|
+
$[24] = dirty;
|
|
1254
|
+
$[25] = onDirtyChange;
|
|
1255
|
+
$[26] = t7;
|
|
1256
|
+
$[27] = t8;
|
|
1257
|
+
} else {
|
|
1258
|
+
t7 = $[26];
|
|
1259
|
+
t8 = $[27];
|
|
595
1260
|
}
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
1261
|
+
React.useEffect(t7, t8);
|
|
1262
|
+
let t9;
|
|
1263
|
+
if ($[28] !== name || $[29] !== task || $[30] !== timing) {
|
|
1264
|
+
t9 = function value() {
|
|
1265
|
+
if (!name.trim()) return null;
|
|
1266
|
+
const taskValue = task.value();
|
|
1267
|
+
if (!taskValue) return null;
|
|
1268
|
+
const repeats = timing.value();
|
|
1269
|
+
if (!repeats) return null;
|
|
1270
|
+
return {
|
|
1271
|
+
name: name.trim(),
|
|
1272
|
+
...taskValue,
|
|
1273
|
+
schedule: repeats
|
|
1274
|
+
};
|
|
1275
|
+
};
|
|
1276
|
+
$[28] = name;
|
|
1277
|
+
$[29] = task;
|
|
1278
|
+
$[30] = timing;
|
|
1279
|
+
$[31] = t9;
|
|
1280
|
+
} else t9 = $[31];
|
|
1281
|
+
const value = t9;
|
|
1282
|
+
let t10;
|
|
1283
|
+
if ($[32] !== busy || $[33] !== draft || $[34] !== onSubmit || $[35] !== value) {
|
|
1284
|
+
t10 = async function submit(event) {
|
|
1285
|
+
event.preventDefault();
|
|
1286
|
+
if (busy) return;
|
|
1287
|
+
const nextValue = value();
|
|
1288
|
+
if (!nextValue) return;
|
|
1289
|
+
setBusy(true);
|
|
1290
|
+
setError(null);
|
|
1291
|
+
const saved = await attempt(() => onSubmit(nextValue));
|
|
1292
|
+
if (saved.ok) setSavedDraft(draft);
|
|
1293
|
+
else setError(executionErrorSummary(formatErrorMessage(saved.error)));
|
|
607
1294
|
setBusy(false);
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
1295
|
+
};
|
|
1296
|
+
$[32] = busy;
|
|
1297
|
+
$[33] = draft;
|
|
1298
|
+
$[34] = onSubmit;
|
|
1299
|
+
$[35] = value;
|
|
1300
|
+
$[36] = t10;
|
|
1301
|
+
} else t10 = $[36];
|
|
1302
|
+
const submit = t10;
|
|
1303
|
+
let t11;
|
|
1304
|
+
if ($[37] !== className) {
|
|
1305
|
+
t11 = cx("think-schedule__editor", className);
|
|
1306
|
+
$[37] = className;
|
|
1307
|
+
$[38] = t11;
|
|
1308
|
+
} else t11 = $[38];
|
|
1309
|
+
let t12;
|
|
1310
|
+
if ($[39] !== cancelLabel || $[40] !== cancelLink || $[41] !== editing || $[42] !== header) {
|
|
1311
|
+
t12 = header === "bar" ? /* @__PURE__ */ jsxs(AppTopBar.Root, {
|
|
1312
|
+
"aria-label": "Schedule editor controls",
|
|
1313
|
+
children: [cancelLink ? /* @__PURE__ */ jsx(AppTopBar.Leading, { children: /* @__PURE__ */ jsx(AppTopBar.Link, {
|
|
1314
|
+
label: cancelLabel,
|
|
1315
|
+
render: cancelLink,
|
|
1316
|
+
children: /* @__PURE__ */ jsx(ArrowLeftIcon, {})
|
|
1317
|
+
}) }) : null, /* @__PURE__ */ jsx(AppTopBar.Title, { children: editing ? "Edit schedule" : "New schedule" })]
|
|
1318
|
+
}) : null;
|
|
1319
|
+
$[39] = cancelLabel;
|
|
1320
|
+
$[40] = cancelLink;
|
|
1321
|
+
$[41] = editing;
|
|
1322
|
+
$[42] = header;
|
|
1323
|
+
$[43] = t12;
|
|
1324
|
+
} else t12 = $[43];
|
|
1325
|
+
let t13;
|
|
1326
|
+
if ($[44] !== error) {
|
|
1327
|
+
t13 = error ? /* @__PURE__ */ jsxs("div", {
|
|
1328
|
+
className: "think-schedule__editor-error",
|
|
1329
|
+
role: "alert",
|
|
1330
|
+
children: [/* @__PURE__ */ jsx(WarningIcon, { "aria-hidden": "true" }), /* @__PURE__ */ jsx("span", { children: error })]
|
|
1331
|
+
}) : null;
|
|
1332
|
+
$[44] = error;
|
|
1333
|
+
$[45] = t13;
|
|
1334
|
+
} else t13 = $[45];
|
|
1335
|
+
const t14 = editing ? "Edit schedule" : "New schedule";
|
|
1336
|
+
let t15;
|
|
1337
|
+
if ($[46] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1338
|
+
t15 = /* @__PURE__ */ jsx(Field.Label, { children: "Name" });
|
|
1339
|
+
$[46] = t15;
|
|
1340
|
+
} else t15 = $[46];
|
|
1341
|
+
let t16;
|
|
1342
|
+
if ($[47] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1343
|
+
t16 = (event_0) => setName(event_0.currentTarget.value);
|
|
1344
|
+
$[47] = t16;
|
|
1345
|
+
} else t16 = $[47];
|
|
1346
|
+
let t17;
|
|
1347
|
+
if ($[48] !== name) {
|
|
1348
|
+
t17 = /* @__PURE__ */ jsx(Field.Control, {
|
|
1349
|
+
name: "name",
|
|
1350
|
+
value: name,
|
|
1351
|
+
required: true,
|
|
1352
|
+
autoComplete: "off",
|
|
1353
|
+
placeholder: "Weekly project review",
|
|
1354
|
+
onChange: t16
|
|
1355
|
+
});
|
|
1356
|
+
$[48] = name;
|
|
1357
|
+
$[49] = t17;
|
|
1358
|
+
} else t17 = $[49];
|
|
1359
|
+
let t18;
|
|
1360
|
+
if ($[50] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1361
|
+
t18 = /* @__PURE__ */ jsx(Field.Error, {
|
|
1362
|
+
match: "valueMissing",
|
|
1363
|
+
children: "Name is required"
|
|
1364
|
+
});
|
|
1365
|
+
$[50] = t18;
|
|
1366
|
+
} else t18 = $[50];
|
|
1367
|
+
let t19;
|
|
1368
|
+
if ($[51] !== t17) {
|
|
1369
|
+
t19 = /* @__PURE__ */ jsxs(Field.Root, {
|
|
1370
|
+
name: "name",
|
|
1371
|
+
children: [
|
|
1372
|
+
t15,
|
|
1373
|
+
t17,
|
|
1374
|
+
t18
|
|
1375
|
+
]
|
|
1376
|
+
});
|
|
1377
|
+
$[51] = t17;
|
|
1378
|
+
$[52] = t19;
|
|
1379
|
+
} else t19 = $[52];
|
|
1380
|
+
let t20;
|
|
1381
|
+
if ($[53] !== automations || $[54] !== automationsError || $[55] !== automationsLoading || $[56] !== task) {
|
|
1382
|
+
t20 = /* @__PURE__ */ jsx(ScheduleTaskFields, {
|
|
1383
|
+
task,
|
|
1384
|
+
automations,
|
|
1385
|
+
automationsLoading,
|
|
1386
|
+
automationsError
|
|
1387
|
+
});
|
|
1388
|
+
$[53] = automations;
|
|
1389
|
+
$[54] = automationsError;
|
|
1390
|
+
$[55] = automationsLoading;
|
|
1391
|
+
$[56] = task;
|
|
1392
|
+
$[57] = t20;
|
|
1393
|
+
} else t20 = $[57];
|
|
1394
|
+
let t21;
|
|
1395
|
+
if ($[58] !== timing) {
|
|
1396
|
+
t21 = /* @__PURE__ */ jsx(ScheduleTimingFields, { timing });
|
|
1397
|
+
$[58] = timing;
|
|
1398
|
+
$[59] = t21;
|
|
1399
|
+
} else t21 = $[59];
|
|
1400
|
+
let t22;
|
|
1401
|
+
if ($[60] !== t19 || $[61] !== t20 || $[62] !== t21) {
|
|
1402
|
+
t22 = /* @__PURE__ */ jsxs(Field.Group, { children: [
|
|
1403
|
+
t19,
|
|
1404
|
+
t20,
|
|
1405
|
+
t21
|
|
1406
|
+
] });
|
|
1407
|
+
$[60] = t19;
|
|
1408
|
+
$[61] = t20;
|
|
1409
|
+
$[62] = t21;
|
|
1410
|
+
$[63] = t22;
|
|
1411
|
+
} else t22 = $[63];
|
|
1412
|
+
const t23 = busy ? "Saving…" : dirty ? "Unsaved changes" : "";
|
|
1413
|
+
let t24;
|
|
1414
|
+
if ($[64] !== t23) {
|
|
1415
|
+
t24 = /* @__PURE__ */ jsx("span", {
|
|
1416
|
+
className: "think-schedule__input-help",
|
|
1417
|
+
role: "status",
|
|
1418
|
+
children: t23
|
|
1419
|
+
});
|
|
1420
|
+
$[64] = t23;
|
|
1421
|
+
$[65] = t24;
|
|
1422
|
+
} else t24 = $[65];
|
|
1423
|
+
let t25;
|
|
1424
|
+
if ($[66] !== busy || $[67] !== cancelLink) {
|
|
1425
|
+
t25 = cancelLink ? /* @__PURE__ */ jsx(Button, {
|
|
1426
|
+
variant: "ghost",
|
|
1427
|
+
color: "neutral",
|
|
1428
|
+
disabled: busy,
|
|
1429
|
+
nativeButton: false,
|
|
1430
|
+
render: cancelLink,
|
|
1431
|
+
children: "Cancel"
|
|
1432
|
+
}) : null;
|
|
1433
|
+
$[66] = busy;
|
|
1434
|
+
$[67] = cancelLink;
|
|
1435
|
+
$[68] = t25;
|
|
1436
|
+
} else t25 = $[68];
|
|
1437
|
+
const t26 = busy || task.mode === "automation" && !task.automationPath;
|
|
1438
|
+
let t27;
|
|
1439
|
+
if ($[69] !== busy) {
|
|
1440
|
+
t27 = busy ? /* @__PURE__ */ jsx(SpinnerIcon, {}) : null;
|
|
1441
|
+
$[69] = busy;
|
|
1442
|
+
$[70] = t27;
|
|
1443
|
+
} else t27 = $[70];
|
|
1444
|
+
const t28 = editing ? "Save changes" : "Create schedule";
|
|
1445
|
+
let t29;
|
|
1446
|
+
if ($[71] !== t26 || $[72] !== t27 || $[73] !== t28) {
|
|
1447
|
+
t29 = /* @__PURE__ */ jsxs(Button, {
|
|
1448
|
+
type: "submit",
|
|
1449
|
+
className: "think-schedule__submit",
|
|
1450
|
+
disabled: t26,
|
|
1451
|
+
children: [
|
|
1452
|
+
t27,
|
|
1453
|
+
" ",
|
|
1454
|
+
t28
|
|
1455
|
+
]
|
|
1456
|
+
});
|
|
1457
|
+
$[71] = t26;
|
|
1458
|
+
$[72] = t27;
|
|
1459
|
+
$[73] = t28;
|
|
1460
|
+
$[74] = t29;
|
|
1461
|
+
} else t29 = $[74];
|
|
1462
|
+
let t30;
|
|
1463
|
+
if ($[75] !== t24 || $[76] !== t25 || $[77] !== t29) {
|
|
1464
|
+
t30 = /* @__PURE__ */ jsxs("footer", {
|
|
1465
|
+
className: "think-schedule__form-actions",
|
|
1466
|
+
children: [
|
|
1467
|
+
t24,
|
|
1468
|
+
t25,
|
|
1469
|
+
t29
|
|
1470
|
+
]
|
|
1471
|
+
});
|
|
1472
|
+
$[75] = t24;
|
|
1473
|
+
$[76] = t25;
|
|
1474
|
+
$[77] = t29;
|
|
1475
|
+
$[78] = t30;
|
|
1476
|
+
} else t30 = $[78];
|
|
1477
|
+
let t31;
|
|
1478
|
+
if ($[79] !== submit || $[80] !== t22 || $[81] !== t30) {
|
|
1479
|
+
t31 = /* @__PURE__ */ jsxs(Form, {
|
|
1480
|
+
className: "think-schedule__form",
|
|
1481
|
+
validationMode: "onBlur",
|
|
1482
|
+
onSubmit: submit,
|
|
1483
|
+
children: [t22, t30]
|
|
1484
|
+
});
|
|
1485
|
+
$[79] = submit;
|
|
1486
|
+
$[80] = t22;
|
|
1487
|
+
$[81] = t30;
|
|
1488
|
+
$[82] = t31;
|
|
1489
|
+
} else t31 = $[82];
|
|
1490
|
+
let t32;
|
|
1491
|
+
if ($[83] !== t14 || $[84] !== t31) {
|
|
1492
|
+
t32 = /* @__PURE__ */ jsx("section", {
|
|
1493
|
+
className: "think-schedule__create",
|
|
1494
|
+
"aria-label": t14,
|
|
1495
|
+
children: t31
|
|
1496
|
+
});
|
|
1497
|
+
$[83] = t14;
|
|
1498
|
+
$[84] = t31;
|
|
1499
|
+
$[85] = t32;
|
|
1500
|
+
} else t32 = $[85];
|
|
1501
|
+
let t33;
|
|
1502
|
+
if ($[86] !== props || $[87] !== ref || $[88] !== t11 || $[89] !== t12 || $[90] !== t13 || $[91] !== t32) {
|
|
1503
|
+
t33 = /* @__PURE__ */ jsxs("div", {
|
|
1504
|
+
ref,
|
|
1505
|
+
className: t11,
|
|
1506
|
+
...props,
|
|
1507
|
+
children: [
|
|
1508
|
+
t12,
|
|
1509
|
+
t13,
|
|
1510
|
+
t32
|
|
1511
|
+
]
|
|
1512
|
+
});
|
|
1513
|
+
$[86] = props;
|
|
1514
|
+
$[87] = ref;
|
|
1515
|
+
$[88] = t11;
|
|
1516
|
+
$[89] = t12;
|
|
1517
|
+
$[90] = t13;
|
|
1518
|
+
$[91] = t32;
|
|
1519
|
+
$[92] = t33;
|
|
1520
|
+
} else t33 = $[92];
|
|
1521
|
+
return t33;
|
|
1522
|
+
}
|
|
1523
|
+
function _temp5(t0, t1) {
|
|
1524
|
+
const [left] = t0;
|
|
1525
|
+
const [right] = t1;
|
|
1526
|
+
return left.localeCompare(right);
|
|
684
1527
|
}
|
|
685
1528
|
//#endregion
|
|
686
1529
|
export { ThinkScheduleForm };
|