@fluidgrids/fe-sdk 0.0.0-stage → 2026.1203.8
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 +564 -2
- package/dist/ActivityOptionsFields-C2u-hY2U.js +142 -0
- package/dist/AiStudioPage-B_hNTj-_.js +1137 -0
- package/dist/ApprovalInboxPage-ClITra3n.js +1312 -0
- package/dist/ChoiceSelect-LkK-uS9J.js +65 -0
- package/dist/ConfirmActionDialog-DHWTDRbp.js +31 -0
- package/dist/ConnectionFormDialog-C0kDgcrZ.js +153 -0
- package/dist/CreateFluidgridsTagDocument-Dtp9KPLJ.js +1055 -0
- package/dist/DataSinkDashboardPage-b4ezeqa6.js +278 -0
- package/dist/DataTablesPage-C1d9YGHz.js +5575 -0
- package/dist/DateTimeField-B1qR4ruo.js +51 -0
- package/dist/Disclosure-BNKij7-v.js +45 -0
- package/dist/ElementLibraryPage-8jNO6YmE.js +2256 -0
- package/dist/ElementLibrarySequenceDocument-B-W8SPzn.js +3979 -0
- package/dist/EnsureThemeProvider-BvlNjAd0.js +24 -0
- package/dist/EntityTagBadge-1OlP6p0c.js +25 -0
- package/dist/EntityTagPicker-BBrU5cE0.js +137 -0
- package/dist/ExecuteStepDocument-B4j1mdRT.js +189 -0
- package/dist/ExecutionDetailDocument-D6QuM-kp.js +875 -0
- package/dist/ExecutionDetailPage-D4CBtFdo.js +12217 -0
- package/dist/ExecutionDetailPage-DvQ667OE.d.ts +10 -0
- package/dist/ExecutionStatusBadge-BsDVor9t.js +221 -0
- package/dist/ExecutionsListDocument-Dan7ZiqB.js +459 -0
- package/dist/ExecutionsListPage-B3XT8ITL.js +4307 -0
- package/dist/FailureTriagePanel-DOJMaJ0n.js +1285 -0
- package/dist/FileDownloadUrlDocument-CVOYKcL5.js +92 -0
- package/dist/FluidGridsDocsLink-bX0Hnhxr.js +66 -0
- package/dist/FluidGridsMark-CE2blT7K.js +74 -0
- package/dist/HeldLoadRegion-BtTxbvOW.js +34 -0
- package/dist/HistoryPage-BLoRpJ1R.d.ts +6 -0
- package/dist/HistoryPage-BSBISXoj.js +2835 -0
- package/dist/Icon-BtQ0HXLh.js +160 -0
- package/dist/InsightsPage-D7ybj8N9.js +11245 -0
- package/dist/IsolationSetting-vy911E8b.js +1153 -0
- package/dist/LibraryParts-DOeNgR8A.js +413 -0
- package/dist/ManagedAiPolicyAuthority-BxwJ3ptd.js +40 -0
- package/dist/ManagedAiPolicyAuthority-DM3t3wNr.d.ts +18 -0
- package/dist/ManagedAiPolicyAuthorityContext-CNkxIOZ1.js +10 -0
- package/dist/McpTriggerServers-BCPCAOWB.js +459 -0
- package/dist/MissingNodesInstallModal-rO_SEDrC.js +224 -0
- package/dist/NavigationV2Provider-DCDt35eG.js +17 -0
- package/dist/NodeSchemaIntrospectionDocument-C1vAIcHd.js +95 -0
- package/dist/NodesPage-DEbnz9iU.d.ts +6 -0
- package/dist/NodesPage-O7KeeKtd.js +653 -0
- package/dist/OfflineIcon-TwMKYWjA.js +207 -0
- package/dist/OpenTemplateAsCodeButton-BhWJWIF3.js +94 -0
- package/dist/PaidTemplateConfirm-_G3ag6S4.js +28 -0
- package/dist/PublishCustomNodeAction-CIySbK4c.js +134 -0
- package/dist/RecordTaskDialog-BkpCDvhR.js +2078 -0
- package/dist/RunActionsMenu-DodOgIQm.js +59 -0
- package/dist/RunnerStatusPill-C1v967iq.js +24 -0
- package/dist/RunnersPage-dB0RSdY_.js +1929 -0
- package/dist/SandboxRuntimeExhaustedNotice-BFOIF93C.js +120 -0
- package/dist/SchedulesPage-DPWr1yvf.js +1607 -0
- package/dist/SearchBox-BGtYjvfs.js +49 -0
- package/dist/SequenceEditor-CFiHeHkR.js +497 -0
- package/dist/SettingsPage-0CQBNPZV.js +8695 -0
- package/dist/StewardPages-DAJhepen.js +47 -0
- package/dist/StewardRunImportPanel-Kva2DO0u.js +2844 -0
- package/dist/StoreTemplateCardCompact-CHn5kP7A.js +2166 -0
- package/dist/TagFilterSelect-CyA8QrS7.js +42 -0
- package/dist/TaskQueuesPage-DdnDCyat.js +3571 -0
- package/dist/TechnicalDetails-B0Oi4aZw.js +19 -0
- package/dist/TemplateConfigurationModal-CdvCYJLM.js +332 -0
- package/dist/TemplateDetailPanel-CbiKciuB.js +222 -0
- package/dist/TemplatePreview-cx7-NOeG.js +868 -0
- package/dist/TemplatesPage-BG3H-6v6.d.ts +10 -0
- package/dist/TemplatesPage-BVQpGYIV.js +3251 -0
- package/dist/TerminateExecutionDocument-B_HKNVrN.js +581 -0
- package/dist/TranslationBridge-Bd4aJKMs.d.ts +11 -0
- package/dist/TranslationBridge-Da-TPgQm.js +68 -0
- package/dist/TriggerWorkflowDocument-D9Km2Vv2.js +460 -0
- package/dist/UiSequencePickerSequenceDocument-BSYnSDV7.js +607 -0
- package/dist/UiStepScreenshot-Qh4QMyUp.js +146 -0
- package/dist/UsageTimeSeriesDocument-DcInx9-z.js +177 -0
- package/dist/VariablesPage-ChfGuW22.js +2243 -0
- package/dist/VersionDiffDialog-Bd2AeUwf.js +1702 -0
- package/dist/VersionLifecycleBar-BBeWVtz-.js +143 -0
- package/dist/WebhookDeliveriesPage-D66bua0j.js +1563 -0
- package/dist/WorkflowBuilder-B6wQD1TK.js +539 -0
- package/dist/WorkflowBuilder-DR4ku8Tr.js +1611 -0
- package/dist/WorkflowDefinitionDocument-DZLbTPUZ.js +321 -0
- package/dist/WorkflowEmbed-BXfFGy0i.js +708 -0
- package/dist/WorkflowEmbed-Cbqe1s1z.d.ts +6 -0
- package/dist/WorkflowPinnedDataDocument-BODT5omd.js +782 -0
- package/dist/WorkflowProposalCard-BruukdeF.js +96 -0
- package/dist/WorkflowProposalDocument-BdUbsrd0.js +620 -0
- package/dist/WorkflowSearchRedirect-C7zJ2MKH.js +40 -0
- package/dist/WorkflowSettingsDrawer-MVU1BKfY.d.ts +18 -0
- package/dist/WorkflowSettingsDrawer-gazs97WR.js +196 -0
- package/dist/WorkflowShareDialog-e8jJtLjU.js +469 -0
- package/dist/WorkflowVersionsDocument-DRVOp8Uj.js +3213 -0
- package/dist/WorkflowsList--hR2_8gf.js +4593 -0
- package/dist/WorkflowsList-CcNDQge5.d.ts +6 -0
- package/dist/WorkflowsListPageDocument-CnzcQm_o.js +934 -0
- package/dist/addonCatalog-CbZS4deh.js +58 -0
- package/dist/addonCatalog-sjlonAmR.d.ts +15 -0
- package/dist/addons.d.ts +3 -0
- package/dist/addons.js +4 -0
- package/dist/agent-form-Bfvm32j1.js +83 -0
- package/dist/agent-tools.d.ts +3 -0
- package/dist/agent-tools.js +5 -0
- package/dist/agentTools-CyL7DLOF.js +320 -0
- package/dist/ai-usage-BrxDgvdR.js +240 -0
- package/dist/aiCreditsBridge-BuE92tKo.js +49 -0
- package/dist/api-BKq-nIOZ.js +2286 -0
- package/dist/api-Ol7I8NxE.js +8289 -0
- package/dist/apollo-type-policies.d.ts +11 -0
- package/dist/apollo-type-policies.js +64 -0
- package/dist/askAboutBridge-ByYsQams.js +106 -0
- package/dist/askQuestions-Cmx7VnMm.js +742 -0
- package/dist/assert-rules-lfYEMc99.js +318 -0
- package/dist/assistant.d.ts +94 -0
- package/dist/assistant.js +99 -0
- package/dist/attach-node-helpers-HDKQOtrD.js +32 -0
- package/dist/badge-CXfPhoMH.js +26 -0
- package/dist/basil.generated-BK-EHbwN.js +10 -0
- package/dist/browser-steps-DMpS5TyB.js +533 -0
- package/dist/builderTimings-pvGnK1m-.js +510 -0
- package/dist/button-DG7y_FVJ.js +48 -0
- package/dist/canvasNoteTools-BxuP_AYO.js +137 -0
- package/dist/card-Bomy_1UG.js +44 -0
- package/dist/catalogGrid-BOrfMgi-.js +41 -0
- package/dist/channel-CPyQ1NR1.js +212 -0
- package/dist/chips-CvNrYJZa.js +27 -0
- package/dist/client-holder-C0M5Cfwl.js +68 -0
- package/dist/cn-QqidFIgr.js +10 -0
- package/dist/code-editor-diagnostics-Zr0cIcx1.js +46 -0
- package/dist/code-editor-field-x_JrY8KR.js +113 -0
- package/dist/codec-client-DPuD6mw7.js +515 -0
- package/dist/conditionBuilder-DwfEF0Q-.js +1144 -0
- package/dist/config-DO68jw5k.js +322 -0
- package/dist/constants-DgbVc24O.d.ts +296 -0
- package/dist/constants-DlRnHBfQ.js +217 -0
- package/dist/convert-browser-action-pfecelF7.js +347 -0
- package/dist/convert-dialog-B_o22NiJ.js +382 -0
- package/dist/create-workflow-first-Azg3JUdX.js +120 -0
- package/dist/definition-canvas-Bsda-rDT.js +31 -0
- package/dist/dialog-BVd152GS.js +94 -0
- package/dist/durable-nodes-BXyYCLxT.js +91 -0
- package/dist/duration-CDb7-mT_.js +33 -0
- package/dist/edge-mapper-wEAdGVU2.js +4477 -0
- package/dist/element-library-DkSlg_VE.js +727 -0
- package/dist/entities-I_0kio3q.js +38 -0
- package/dist/error-advice-QLr5NCm7.js +65 -0
- package/dist/errors-ClKb5sEt.js +188 -0
- package/dist/executions.d.ts +3 -0
- package/dist/executions.js +5 -0
- package/dist/feature-flags-B2qetXKd.js +385 -0
- package/dist/field-label-DPZRmE_B.js +153 -0
- package/dist/firstWorkflow-C_h0KMB2.js +133 -0
- package/dist/flags.d.ts +3 -0
- package/dist/flags.js +4 -0
- package/dist/flow-builder-DIvLOhz0.js +28038 -0
- package/dist/flow-store-holder-CUN7Terz.js +52 -0
- package/dist/fluent.generated-CA_e6-4l.js +14 -0
- package/dist/fluidgridsEvents-bbEQbwU6.js +175 -0
- package/dist/fluidgridsTheme-DUhvOgoy.js +297 -0
- package/dist/global-client-BQPuFrFa.js +433 -0
- package/dist/global-operations-BG6YgxrM.js +136 -0
- package/dist/graphql-types-UTYtujY9.js +21358 -0
- package/dist/history.d.ts +3 -0
- package/dist/history.js +4 -0
- package/dist/index-AoJAa5vU.d.ts +164958 -0
- package/dist/index-DEMT3iAM.d.ts +120 -0
- package/dist/index-ROZzNGyY.d.ts +76 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +8123 -0
- package/dist/ion.generated-mbajjcAg.js +10 -0
- package/dist/label-Lzb8ZXf_.js +29 -0
- package/dist/labels-rXd9gYQz.js +1236 -0
- package/dist/liveCanvas-D5ytXDp8.js +103 -0
- package/dist/logos.generated-X6_0kjVR.js +21 -0
- package/dist/logs-panel-Cw0DkG0l.js +468 -0
- package/dist/lucide.generated-B6NVd3GT.js +29 -0
- package/dist/marksStore-a9oIMMot.js +175 -0
- package/dist/mcp-trigger-D0nRdvq5.js +307 -0
- package/dist/mdi.generated-D1BV74d6.js +292 -0
- package/dist/menus-CU3hDGYl.js +160 -0
- package/dist/mynaui.generated-DMWr5cXz.js +66 -0
- package/dist/navigation-v2.d.ts +3 -0
- package/dist/navigation-v2.js +5 -0
- package/dist/node-detail-view-Cgm5H1P-.js +1372 -0
- package/dist/node-editor-tab-body-CZ0fVuVP.js +187 -0
- package/dist/node-operation-selection-CdV3KI_V.js +3534 -0
- package/dist/node-registry-refresh-s3okf83X.js +27 -0
- package/dist/node-role-TMbnkmeP.js +132 -0
- package/dist/node-type-icon-BZa8n4iG.js +33 -0
- package/dist/nodes.d.ts +3 -0
- package/dist/nodes.js +4 -0
- package/dist/notesKey-5EaREBGA.js +12 -0
- package/dist/observability.d.ts +3 -0
- package/dist/observability.js +5 -0
- package/dist/offset-pages-zghoClB3.js +55 -0
- package/dist/operations-BBmT9ToP.js +663 -0
- package/dist/operations-WxRJWeqO.js +3133 -0
- package/dist/output-files-Ba8bu5lv.js +196 -0
- package/dist/page-operation-DrWuhd6Y.js +129 -0
- package/dist/page-twins.d.ts +13 -0
- package/dist/page-twins.js +186 -0
- package/dist/pageControlSpecs-DZJ9K37m.js +134 -0
- package/dist/pageControlsBridge-0pX9s-3k.js +54 -0
- package/dist/pageControlsBridge-DAuT3w7L.d.ts +36 -0
- package/dist/panels-PfBBAToE.js +346 -0
- package/dist/parts-B7fBcw-B.js +346 -0
- package/dist/popover-Dms9Vz3j.js +3389 -0
- package/dist/preloadable-lazy-Pp47mqQ9.js +65 -0
- package/dist/proactive.d.ts +66 -0
- package/dist/proactive.js +237 -0
- package/dist/quick-config-panel-DFd77xho.js +451 -0
- package/dist/quota-DeA_CJ2e.js +175 -0
- package/dist/quota.d.ts +3 -0
- package/dist/quota.js +4 -0
- package/dist/read-only-context-Dt9N9SIG.js +18 -0
- package/dist/relative-time-Dxt8ZIIu.js +55 -0
- package/dist/results-CwK_yDxK.js +325 -0
- package/dist/rolldown-runtime-hDbaFkMy.js +18 -0
- package/dist/route-data.d.ts +12 -0
- package/dist/route-data.js +69 -0
- package/dist/route-match-C-0_EnAt.d.ts +5 -0
- package/dist/route-match-DMkUICYV.js +41 -0
- package/dist/route-preload-C4DlGoCd.js +120 -0
- package/dist/run-display-UjLAoYqQ.js +81 -0
- package/dist/run-history-arGiHzGU.js +285 -0
- package/dist/run-list-links-DJn4Mf1T.js +98 -0
- package/dist/run-mode-USmM0-Uo.js +82 -0
- package/dist/run-parity-CWXqEJqM.js +144 -0
- package/dist/runsQuota-B6SyTbne.js +100 -0
- package/dist/runsQuota-DsniKiSg.d.ts +20 -0
- package/dist/safe-expression-Cw7-SCsm.js +1251 -0
- package/dist/save-status-store-C7nEYpfb.js +631 -0
- package/dist/schedule-panel-B4GYXzXQ.js +13774 -0
- package/dist/schedule-rules-ggVKRkBH.js +358 -0
- package/dist/secrets-Re_wSiE3.js +153 -0
- package/dist/settings.d.ts +4 -0
- package/dist/settings.js +6 -0
- package/dist/shared-DAWGGMSM.js +177 -0
- package/dist/sidebar-node-editor-6eSSgCzc.js +178 -0
- package/dist/solar.generated-CGYuUQAC.js +10 -0
- package/dist/stableTabbedDialog-BBhrfXGe.js +20 -0
- package/dist/start-url-CT6Yz96K.js +24 -0
- package/dist/status-CessxGpm.js +55 -0
- package/dist/store-icon-OctYp5zP.js +155 -0
- package/dist/styles-WGmTnZ2n.js +26 -0
- package/dist/styles.css +139 -0
- package/dist/svg-spinners.generated-CIPT7IhM.js +10 -0
- package/dist/template-code-CzN6JWNV.js +191 -0
- package/dist/template-graph-DLF9dygU.js +20 -0
- package/dist/template-preview-DcIIKOOL.js +32 -0
- package/dist/template-price-CdUHZRMF.js +40 -0
- package/dist/templates.d.ts +3 -0
- package/dist/templates.js +5 -0
- package/dist/theme-provider-CntfC4_i.js +23 -0
- package/dist/transient-DgZfhDfN.js +57 -0
- package/dist/typed-calls-C5tO03wq.js +26 -0
- package/dist/ui-script-By74Guk3.js +1094 -0
- package/dist/ui-script-editor-CqPu2bCN.js +2447 -0
- package/dist/ui-step-fix-8uM2_Hft.js +67 -0
- package/dist/ui-step-fix-store-CcO1FdRx.js +19 -0
- package/dist/ui-step-run-context-o7bLE6KP.js +46 -0
- package/dist/ui-target-editor-D2JhB_lD.js +673 -0
- package/dist/uiMarkTools-CSznnO1i.js +1054 -0
- package/dist/upgradePrompt-BAFBKKW5.js +72 -0
- package/dist/use-bare-node-registry-O6mKJO_n.js +11498 -0
- package/dist/use-browser-available-hj8wc3Kb.js +241 -0
- package/dist/use-edge-mapper-schemas-Bonofxow.js +496 -0
- package/dist/use-extension-bridge-B9ZreOkQ.js +608 -0
- package/dist/use-mobile-BTqCUjzS.js +27 -0
- package/dist/use-sdk-query-C697xZVv.js +116 -0
- package/dist/use-workflow-code-editor-CFoRFrZ5.js +753 -0
- package/dist/useActionParam-B2tU2BlY.js +85 -0
- package/dist/useAgentTokenStream-Bko_J0d0.js +4217 -0
- package/dist/useBrowserClients-3v95-gSh.js +103 -0
- package/dist/useCodeWorkflowInsights-w0tz9Ap_.js +600 -0
- package/dist/useConnections-DsgEJs05.js +439 -0
- package/dist/useDebouncedValue-BFekcv6n.js +18 -0
- package/dist/useDurableParity-8fnMZmBc.js +1787 -0
- package/dist/useEntityTags-D0spL6Ut.js +460 -0
- package/dist/useExecutions-2u5nGJJk.js +681 -0
- package/dist/useFluidGridsAnalytics-VM8lAi2x.js +238 -0
- package/dist/useGlobalStoreClient-BTdhkA2I.js +24 -0
- package/dist/useHumanRequests-zlYDp3l1.js +221 -0
- package/dist/useNavigationV2-C2WeqN7d.js +29 -0
- package/dist/useNavigationV2-DANUmg12.d.ts +9 -0
- package/dist/useObservability-BRlQ0tOA.js +285 -0
- package/dist/useRequestedProposal-B7uPXfZB.js +51 -0
- package/dist/useRunHistory-CXCMUPyf.js +2759 -0
- package/dist/useRunLive-D0JvVZT2.js +1060 -0
- package/dist/useRunnerList-Dbi59i1K.js +446 -0
- package/dist/useRunners-URUc5quU.js +173 -0
- package/dist/useRunsPage-DG656UCK.js +2709 -0
- package/dist/useVariables-BIelxcWr.js +463 -0
- package/dist/useVersionHistoryData-CTjqVw7l.js +292 -0
- package/dist/useWorkflowCodeExport-pqxyLHD1.js +522 -0
- package/dist/useWorkflowListExport-hcZNvTaB.js +232 -0
- package/dist/useWorkflowOrganization-CpBbOrs7.js +1772 -0
- package/dist/useWorkflowProposal-BH0VdNMA.js +3280 -0
- package/dist/useWorkflows-Cvg-Z_IE.js +1606 -0
- package/dist/utils-fvBb5qOD.js +89 -0
- package/dist/webhook-deliveries-AvQujaZy.js +99 -0
- package/dist/workflow-builder-CJygVkVv.d.ts +2 -0
- package/dist/workflow-builder.d.ts +3 -0
- package/dist/workflow-builder.js +8 -0
- package/dist/workflow-code-transfer-Bsy0JKAZ.js +323 -0
- package/dist/workflow-embed.d.ts +3 -0
- package/dist/workflow-embed.js +4 -0
- package/dist/workflow-git-sync--K9ZsPDC.js +263 -0
- package/dist/workflow-host.d.ts +6 -0
- package/dist/workflow-host.js +11 -0
- package/dist/workflow-pages-D-7ByLTB.d.ts +68 -0
- package/dist/workflow-pages.d.ts +3 -0
- package/dist/workflow-pages.js +115 -0
- package/dist/workflow-preview-canvas-CO8yzdE3.js +848 -0
- package/dist/workflow-preview.d.ts +65 -0
- package/dist/workflow-preview.js +4 -0
- package/dist/workflow-route.d.ts +33 -0
- package/dist/workflow-route.js +4 -0
- package/dist/workflow-save-state-D0l-DkLf.js +767 -0
- package/dist/workflow-transfer-CQnQC-ke.js +104 -0
- package/dist/workflowRouteData-BkfVOc-O.js +169 -0
- package/dist/workflows-list.d.ts +10 -0
- package/dist/workflows-list.js +5 -0
- package/package.json +320 -4
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as describeOperationError } from "./errors-ClKb5sEt.js";
|
|
3
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Label, Textarea, ThemedSelect } from "@burdenoff/fe-libs/ui";
|
|
6
|
+
|
|
7
|
+
// src/modules/run-control/hooks/useResource.ts
|
|
8
|
+
/**
|
|
9
|
+
* A read keyed by its arguments that sends nothing while `enabled` is false,
|
|
10
|
+
* keeps the last good answer, ignores answers to superseded requests, and
|
|
11
|
+
* re-reads every `intervalMs` while `live`. The Phase C views use it so that
|
|
12
|
+
* a gateway or service without the Phase C release only leaves a view empty.
|
|
13
|
+
*/
|
|
14
|
+
function useResource(key, enabled, load, { live = false, intervalMs = 0 } = {}) {
|
|
15
|
+
const [data, setData] = useState(null);
|
|
16
|
+
const [loading, setLoading] = useState(false);
|
|
17
|
+
const [error, setError] = useState(null);
|
|
18
|
+
const request = useRef(0);
|
|
19
|
+
const loadRef = useRef(load);
|
|
20
|
+
loadRef.current = load;
|
|
21
|
+
const active = enabled && key !== null;
|
|
22
|
+
const refetch = useCallback(async () => {
|
|
23
|
+
if (!enabled || key === null) return;
|
|
24
|
+
const id = ++request.current;
|
|
25
|
+
setLoading(true);
|
|
26
|
+
try {
|
|
27
|
+
const next = await loadRef.current();
|
|
28
|
+
if (id !== request.current) return;
|
|
29
|
+
setData(next);
|
|
30
|
+
setError(null);
|
|
31
|
+
} catch (err) {
|
|
32
|
+
if (id !== request.current) return;
|
|
33
|
+
setError(describeOperationError(err));
|
|
34
|
+
} finally {
|
|
35
|
+
if (id === request.current) setLoading(false);
|
|
36
|
+
}
|
|
37
|
+
}, [enabled, key]);
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
request.current += 1;
|
|
40
|
+
setData(null);
|
|
41
|
+
setError(null);
|
|
42
|
+
setLoading(false);
|
|
43
|
+
refetch();
|
|
44
|
+
}, [refetch]);
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
if (!live || !active || intervalMs <= 0) return;
|
|
47
|
+
const timer = setInterval(() => void refetch(), intervalMs);
|
|
48
|
+
return () => clearInterval(timer);
|
|
49
|
+
}, [
|
|
50
|
+
live,
|
|
51
|
+
active,
|
|
52
|
+
intervalMs,
|
|
53
|
+
refetch
|
|
54
|
+
]);
|
|
55
|
+
const set = useCallback((value) => {
|
|
56
|
+
request.current += 1;
|
|
57
|
+
setData(value);
|
|
58
|
+
setError(null);
|
|
59
|
+
setLoading(false);
|
|
60
|
+
}, []);
|
|
61
|
+
return {
|
|
62
|
+
data: active ? data : null,
|
|
63
|
+
loading,
|
|
64
|
+
error,
|
|
65
|
+
refetch,
|
|
66
|
+
set
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// src/modules/run-control/utils/json-input.ts
|
|
71
|
+
function parseJsonInput(text) {
|
|
72
|
+
const trimmed = text.trim();
|
|
73
|
+
if (!trimmed) return {
|
|
74
|
+
ok: true,
|
|
75
|
+
value: void 0
|
|
76
|
+
};
|
|
77
|
+
try {
|
|
78
|
+
return {
|
|
79
|
+
ok: true,
|
|
80
|
+
value: JSON.parse(trimmed)
|
|
81
|
+
};
|
|
82
|
+
} catch (error) {
|
|
83
|
+
return {
|
|
84
|
+
ok: false,
|
|
85
|
+
error: error instanceof Error ? error.message : String(error)
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
/** Like {@link parseJsonInput}, but the value must be a JSON object. */
|
|
90
|
+
function parseJsonObjectInput(text) {
|
|
91
|
+
const parsed = parseJsonInput(text);
|
|
92
|
+
if (!parsed.ok) return parsed;
|
|
93
|
+
const value = parsed.value;
|
|
94
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) return {
|
|
95
|
+
ok: false,
|
|
96
|
+
error: "Enter a JSON object, for example {\"key\": 1}"
|
|
97
|
+
};
|
|
98
|
+
return {
|
|
99
|
+
ok: true,
|
|
100
|
+
value: Object.fromEntries(Object.entries(value))
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
/** Pretty JSON for display; `undefined` and `null` show as an em dash. */
|
|
104
|
+
function formatJson(value) {
|
|
105
|
+
if (value === void 0 || value === null) return "—";
|
|
106
|
+
if (typeof value === "string") return JSON.stringify(value);
|
|
107
|
+
return JSON.stringify(value, null, 2);
|
|
108
|
+
}
|
|
109
|
+
/** A fresh idempotency id for an update (kept while its dialog stays open). */
|
|
110
|
+
function newRunControlId(prefix) {
|
|
111
|
+
return `${prefix}-${typeof crypto !== "undefined" && typeof crypto.randomUUID === "function" ? crypto.randomUUID() : `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`}`;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// src/modules/run-control/components/shared.tsx
|
|
115
|
+
/** Dialog layers sit above the builder's canvas and the NDV (1100). */
|
|
116
|
+
const RUN_CONTROL_DIALOG_STYLE = { zIndex: 1100 };
|
|
117
|
+
function FieldError({ message, testId }) {
|
|
118
|
+
if (!message) return null;
|
|
119
|
+
return /* @__PURE__ */ jsx("p", {
|
|
120
|
+
role: "alert",
|
|
121
|
+
className: "text-sm text-[var(--color-status-error-text)]",
|
|
122
|
+
"data-testid": testId,
|
|
123
|
+
children: message
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
function JsonField({ id, label, value, onChange, placeholder, error, rows = 4, testId }) {
|
|
127
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
128
|
+
className: "space-y-1.5",
|
|
129
|
+
children: [
|
|
130
|
+
/* @__PURE__ */ jsx(Label, {
|
|
131
|
+
htmlFor: id,
|
|
132
|
+
children: label
|
|
133
|
+
}),
|
|
134
|
+
/* @__PURE__ */ jsx(Textarea, {
|
|
135
|
+
id,
|
|
136
|
+
value,
|
|
137
|
+
onChange: (event) => onChange(event.target.value),
|
|
138
|
+
placeholder,
|
|
139
|
+
rows,
|
|
140
|
+
className: "font-mono text-xs",
|
|
141
|
+
"data-testid": testId
|
|
142
|
+
}),
|
|
143
|
+
/* @__PURE__ */ jsx(FieldError, { message: error })
|
|
144
|
+
]
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
function JsonBlock({ value, testId }) {
|
|
148
|
+
return /* @__PURE__ */ jsx("pre", {
|
|
149
|
+
className: "max-h-64 overflow-auto whitespace-pre-wrap break-words rounded-md bg-surface-canvas p-3 font-mono text-xs text-text-primary",
|
|
150
|
+
"data-testid": testId,
|
|
151
|
+
children: formatJson(value)
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
/** The native select's look, shared with the drop-downs that replace it under Navigation v2. */
|
|
155
|
+
const NATIVE_SELECT_CLASS = "h-9 w-full rounded-md border border-border-strong bg-surface-canvas px-2 text-sm text-text-primary";
|
|
156
|
+
function NativeSelect({ id, value, onChange, children, testId, disabled, ariaLabel }) {
|
|
157
|
+
return /* @__PURE__ */ jsx(ThemedSelect, {
|
|
158
|
+
id,
|
|
159
|
+
value,
|
|
160
|
+
disabled,
|
|
161
|
+
"aria-label": ariaLabel,
|
|
162
|
+
onChange: (event) => onChange(event.target.value),
|
|
163
|
+
className: NATIVE_SELECT_CLASS,
|
|
164
|
+
"data-testid": testId,
|
|
165
|
+
children
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
function StatusPill({ tone, children, testId }) {
|
|
169
|
+
const classes = tone === "neutral" ? "border-border-default bg-surface-sunken text-text-secondary" : `border-[var(--color-status-${tone}-border)] bg-[var(--color-status-${tone}-bg-subtle)] text-[var(--color-status-${tone}-text)]`;
|
|
170
|
+
return /* @__PURE__ */ jsx("span", {
|
|
171
|
+
className: `inline-flex items-center rounded-full border px-2 py-0.5 text-xs font-medium ${classes}`,
|
|
172
|
+
"data-testid": testId,
|
|
173
|
+
children
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export { NativeSelect as a, newRunControlId as c, useResource as d, NATIVE_SELECT_CLASS as i, parseJsonInput as l, JsonBlock as n, RUN_CONTROL_DIALOG_STYLE as o, JsonField as r, StatusPill as s, FieldError as t, parseJsonObjectInput as u };
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as Icon } from "./Icon-BtQ0HXLh.js";
|
|
3
|
+
import { M as nodeAccent, U as useFlowStore } from "./node-operation-selection-CdV3KI_V.js";
|
|
4
|
+
import { R as nodeSubtitle, U as useNodeConfig, cn as useNodeExecution, er as getNodeDetail, z as nodeTitle } from "./use-bare-node-registry-O6mKJO_n.js";
|
|
5
|
+
import { t as NodeTypeIcon } from "./node-type-icon-BZa8n4iG.js";
|
|
6
|
+
import { i as NodeInputFields, n as useNodeEditorTab, r as NodeEditorTabs, t as NodeEditorTabBody } from "./node-editor-tab-body-CZ0fVuVP.js";
|
|
7
|
+
import { r as NodeExecutionActions } from "./schedule-panel-B4GYXzXQ.js";
|
|
8
|
+
import { r as useTr } from "./TranslationBridge-Da-TPgQm.js";
|
|
9
|
+
import { useEffect, useState } from "react";
|
|
10
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { cn } from "@burdenoff/fe-libs/utils";
|
|
12
|
+
|
|
13
|
+
// src/builder/components/sidebar-node-editor/sidebar-node-editor.tsx
|
|
14
|
+
/**
|
|
15
|
+
* The node editor in the builder's right sidebar (BOFF-11325).
|
|
16
|
+
*
|
|
17
|
+
* It is the NDV's middle column in sidebar form: the same `useNodeConfig`
|
|
18
|
+
* model and the same `NodeParamsForm` / `NodeSettingsPanel` (and the Schedule
|
|
19
|
+
* tab for a Schedule Trigger), so a node is configured identically from the
|
|
20
|
+
* NDV, the single-click quick panel and here. Writes go straight to the flow
|
|
21
|
+
* store, as in the other two editors. It replaces the legacy property panels,
|
|
22
|
+
* which rendered the manifest's adaptive card instead.
|
|
23
|
+
*/
|
|
24
|
+
function SidebarNodeEditor({ nodeId, type }) {
|
|
25
|
+
return /* @__PURE__ */ jsx(SidebarNodeEditorInner, {
|
|
26
|
+
nodeId,
|
|
27
|
+
type
|
|
28
|
+
}, nodeId);
|
|
29
|
+
}
|
|
30
|
+
function SidebarNodeEditorInner({ nodeId, type }) {
|
|
31
|
+
const config = useNodeConfig({
|
|
32
|
+
nodeId,
|
|
33
|
+
type
|
|
34
|
+
}, { webhookEnabled: true });
|
|
35
|
+
const { node, nodes } = config;
|
|
36
|
+
const setSelectedNode = useFlowStore((s) => s.actions.sidebar.panels.nodeProperties.setSelectedNode);
|
|
37
|
+
const { tab, setTab, hasSchedule } = useNodeEditorTab(node?.type);
|
|
38
|
+
const [showInput, setShowInput] = useState(false);
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
if (!nodes.some((n) => n.id === nodeId)) setSelectedNode(null);
|
|
41
|
+
}, [
|
|
42
|
+
nodes,
|
|
43
|
+
nodeId,
|
|
44
|
+
setSelectedNode
|
|
45
|
+
]);
|
|
46
|
+
if (!node) return null;
|
|
47
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
48
|
+
className: "flex min-h-0 flex-1 flex-col",
|
|
49
|
+
"data-testid": "sidebar-node-editor",
|
|
50
|
+
children: [
|
|
51
|
+
/* @__PURE__ */ jsx(EditorHeader, {
|
|
52
|
+
config,
|
|
53
|
+
nodeId,
|
|
54
|
+
type,
|
|
55
|
+
showInput,
|
|
56
|
+
onToggleInput: () => setShowInput((v) => !v)
|
|
57
|
+
}),
|
|
58
|
+
/* @__PURE__ */ jsx(NodeEditorTabs, {
|
|
59
|
+
active: tab,
|
|
60
|
+
onChange: setTab,
|
|
61
|
+
hasSchedule,
|
|
62
|
+
testIdPrefix: "sp"
|
|
63
|
+
}),
|
|
64
|
+
/* @__PURE__ */ jsxs("div", {
|
|
65
|
+
className: "min-h-0 flex-1 overflow-auto",
|
|
66
|
+
children: [showInput && /* @__PURE__ */ jsx("div", {
|
|
67
|
+
className: "m-3 flex max-h-64 flex-col overflow-hidden rounded-lg border border-border bg-card",
|
|
68
|
+
"data-testid": "sp-input-fields",
|
|
69
|
+
children: /* @__PURE__ */ jsx(NodeInputFields, {
|
|
70
|
+
config,
|
|
71
|
+
testIdPrefix: "sp"
|
|
72
|
+
})
|
|
73
|
+
}), /* @__PURE__ */ jsx(NodeEditorTabBody, {
|
|
74
|
+
tab,
|
|
75
|
+
config,
|
|
76
|
+
nodeId,
|
|
77
|
+
testIdPrefix: "sp"
|
|
78
|
+
})]
|
|
79
|
+
}),
|
|
80
|
+
/* @__PURE__ */ jsx(EditorRunActions, { nodeId })
|
|
81
|
+
]
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
/** The node, plus the input-mapper toggle and the switch to the full NDV. */
|
|
85
|
+
function EditorHeader({ config, nodeId, type, showInput, onToggleInput }) {
|
|
86
|
+
const tr = useTr();
|
|
87
|
+
const openNdv = useFlowStore((s) => s.actions.ndv.open);
|
|
88
|
+
const meta = getNodeDetail(config.node?.type);
|
|
89
|
+
const accent = nodeAccent(config.node?.type || meta.title);
|
|
90
|
+
const subtitle = nodeSubtitle(config.node);
|
|
91
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
92
|
+
className: "flex shrink-0 items-center gap-2.5 border-b border-border px-3 py-2.5",
|
|
93
|
+
style: { borderTop: `3px solid ${accent}` },
|
|
94
|
+
children: [
|
|
95
|
+
/* @__PURE__ */ jsx("div", {
|
|
96
|
+
className: "flex size-7 shrink-0 items-center justify-center rounded-lg",
|
|
97
|
+
style: {
|
|
98
|
+
backgroundColor: `color-mix(in srgb, ${accent} 13%, transparent)`,
|
|
99
|
+
color: accent,
|
|
100
|
+
border: `1px solid color-mix(in srgb, ${accent} 26%, transparent)`
|
|
101
|
+
},
|
|
102
|
+
children: /* @__PURE__ */ jsx(NodeTypeIcon, {
|
|
103
|
+
icon: meta.icon,
|
|
104
|
+
className: "size-4"
|
|
105
|
+
})
|
|
106
|
+
}),
|
|
107
|
+
/* @__PURE__ */ jsxs("div", {
|
|
108
|
+
className: "min-w-0 flex-1",
|
|
109
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
110
|
+
className: "truncate text-sm font-semibold leading-tight text-foreground",
|
|
111
|
+
children: nodeTitle(config.node)
|
|
112
|
+
}), subtitle && /* @__PURE__ */ jsx("p", {
|
|
113
|
+
className: "truncate font-mono text-[11px] leading-tight text-muted-foreground",
|
|
114
|
+
children: subtitle
|
|
115
|
+
})]
|
|
116
|
+
}),
|
|
117
|
+
/* @__PURE__ */ jsx("button", {
|
|
118
|
+
type: "button",
|
|
119
|
+
title: showInput ? tr("fluidgrids.builder.quickConfigPanel.hideInputDataTooltip", "Hide input data") : tr("fluidgrids.builder.quickConfigPanel.mapInputDataTooltip", "Map data from input"),
|
|
120
|
+
"aria-label": tr("fluidgrids.builder.quickConfigPanel.toggleMapperAriaLabel", "Toggle input mapper"),
|
|
121
|
+
"aria-pressed": showInput,
|
|
122
|
+
onClick: onToggleInput,
|
|
123
|
+
className: cn("rounded-md p-1.5 transition-colors hover:bg-muted hover:text-foreground", showInput ? "text-primary" : "text-muted-foreground"),
|
|
124
|
+
"data-testid": "sp-toggle-mapper",
|
|
125
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
126
|
+
icon: "mdi:tray-arrow-down",
|
|
127
|
+
className: "size-4"
|
|
128
|
+
})
|
|
129
|
+
}),
|
|
130
|
+
/* @__PURE__ */ jsx("button", {
|
|
131
|
+
type: "button",
|
|
132
|
+
title: tr("fluidgrids.builder.quickConfigPanel.openFullEditorTooltip", "Open full editor"),
|
|
133
|
+
"aria-label": tr("fluidgrids.builder.quickConfigPanel.openFullEditorAriaLabel", "Open full editor"),
|
|
134
|
+
onClick: () => openNdv({
|
|
135
|
+
nodeId,
|
|
136
|
+
type
|
|
137
|
+
}),
|
|
138
|
+
className: "rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",
|
|
139
|
+
"data-testid": "sp-expand",
|
|
140
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
141
|
+
icon: "mdi:arrow-expand",
|
|
142
|
+
className: "size-4"
|
|
143
|
+
})
|
|
144
|
+
})
|
|
145
|
+
]
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
/** Run this step / continue from this node, as in the NDV and the quick panel. */
|
|
149
|
+
function EditorRunActions({ nodeId }) {
|
|
150
|
+
const nodes = useFlowStore((s) => s.workflow.nodes);
|
|
151
|
+
const edges = useFlowStore((s) => s.workflow.edges);
|
|
152
|
+
const workflowKey = useFlowStore((s) => s.workflow.workflowKey);
|
|
153
|
+
const workflowId = useFlowStore((s) => s.workflow.id);
|
|
154
|
+
const workflowVersion = useFlowStore((s) => s.workflow.version);
|
|
155
|
+
const logs = useFlowStore((s) => s.execution.logs);
|
|
156
|
+
const sourceRun = useFlowStore((s) => s.execution.sourceRun);
|
|
157
|
+
const isExecuting = useFlowStore((s) => s.execution.isExecuting);
|
|
158
|
+
const { executeStep, executeFromNode } = useNodeExecution();
|
|
159
|
+
return /* @__PURE__ */ jsx(NodeExecutionActions, {
|
|
160
|
+
targetNodeId: nodeId,
|
|
161
|
+
nodes,
|
|
162
|
+
edges,
|
|
163
|
+
logs,
|
|
164
|
+
workflowKey: workflowKey || workflowId,
|
|
165
|
+
workflowVersion: workflowVersion || "1.0.0",
|
|
166
|
+
sourceRun,
|
|
167
|
+
isExecuting,
|
|
168
|
+
onExecuteStep: async (targetId) => {
|
|
169
|
+
await executeStep(targetId);
|
|
170
|
+
},
|
|
171
|
+
onContinueFromNode: async (sourceRunId, targetId) => {
|
|
172
|
+
await executeFromNode(sourceRunId, targetId);
|
|
173
|
+
},
|
|
174
|
+
testIdPrefix: "sp"
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export { SidebarNodeEditor };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
// src/icons/bundled/solar.generated.ts
|
|
3
|
+
const SOLAR_ICONS = {
|
|
4
|
+
"prefix": "solar",
|
|
5
|
+
"width": 24,
|
|
6
|
+
"height": 24,
|
|
7
|
+
"icons": { "play-bold": { "body": "<path fill=\"currentColor\" d=\"M20.4086 9.35258C22.5305 10.5065 22.5305 13.4935 20.4086 14.6474L7.59662 21.6145C5.53435 22.736 3 21.2763 3 18.9671L3 5.0329C3 2.72368 5.53435 1.26402 7.59661 2.38548L20.4086 9.35258Z\"/>" } }
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export { SOLAR_ICONS };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
// src/components/stableTabbedDialog.ts
|
|
3
|
+
/**
|
|
4
|
+
* Shared bits of the SDK's dialogs on fe-libs' stable tabbed-dialog layout
|
|
5
|
+
* (BOFF-15607): Compare versions, Version diff and Field mapping. Each reads
|
|
6
|
+
* `useStableTabbedDialogs()` (FluidGrids sets `AppShellConfig.stableTabbedDialogs`)
|
|
7
|
+
* and renders today's dialog without it.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Radix's `onOpenAutoFocus` for these dialogs: the dialog itself takes focus.
|
|
11
|
+
* The layout puts the close button first in its header, and Radix's default
|
|
12
|
+
* would focus it, so Enter would close the dialog it just opened (the shared
|
|
13
|
+
* connection dialog does the same).
|
|
14
|
+
*/
|
|
15
|
+
function focusDialogOnOpen(event) {
|
|
16
|
+
event.preventDefault();
|
|
17
|
+
if (event.target instanceof HTMLElement) event.target.focus({ preventScroll: true });
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { focusDialogOnOpen as t };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
// src/rpa/start-url.ts
|
|
3
|
+
/**
|
|
4
|
+
* The page a recording or the element picker starts on (RPA plan P1-12): an
|
|
5
|
+
* http or https address without user info, as the extension's bridge accepts
|
|
6
|
+
* it (`parseTargetUrl` in fluidgrids-browser-extension). A bare host gets
|
|
7
|
+
* `https://`. Nothing here loads the RPA engine.
|
|
8
|
+
*/
|
|
9
|
+
function startUrlOf(text) {
|
|
10
|
+
const trimmed = text.trim();
|
|
11
|
+
if (!trimmed) return null;
|
|
12
|
+
const withScheme = /^[a-z][a-z0-9+.-]*:/i.test(trimmed) ? trimmed : `https://${trimmed}`;
|
|
13
|
+
try {
|
|
14
|
+
const url = new URL(withScheme);
|
|
15
|
+
if (url.protocol !== "http:" && url.protocol !== "https:") return null;
|
|
16
|
+
if (url.username || url.password) return null;
|
|
17
|
+
if (url.toString().length > 2048) return null;
|
|
18
|
+
return url.toString();
|
|
19
|
+
} catch {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { startUrlOf as t };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as cn } from "./cn-QqidFIgr.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
// src/components/moreTools/status.tsx
|
|
6
|
+
const PILL = "inline-flex items-center gap-1.5 whitespace-nowrap rounded-full border px-2 py-0.5 text-xs font-semibold";
|
|
7
|
+
/** A pill in each loud tone. */
|
|
8
|
+
const TONE_PILL = {
|
|
9
|
+
danger: "border-status-error-border bg-status-error-bg-subtle text-status-error-text",
|
|
10
|
+
warning: "border-status-warning-border bg-status-warning-bg-subtle text-status-warning-text",
|
|
11
|
+
neutral: "border-border-subtle bg-bg-sunken text-text-secondary",
|
|
12
|
+
info: "border-status-info-border bg-status-info-bg-subtle text-status-info-text"
|
|
13
|
+
};
|
|
14
|
+
/** Text in each tone, for a reason or a count under a status. */
|
|
15
|
+
const TONE_TEXT = {
|
|
16
|
+
danger: "text-status-error-text",
|
|
17
|
+
warning: "text-status-warning-text",
|
|
18
|
+
quiet: "text-status-success-text",
|
|
19
|
+
neutral: "text-text-muted",
|
|
20
|
+
info: "text-status-info-text"
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* One status. `quiet` (success) is green text with a dot and no pill; the
|
|
24
|
+
* other tones are pills. `neutral` and `info` have no dot unless asked.
|
|
25
|
+
*/
|
|
26
|
+
function Status({ tone, children, dot, className, "data-testid": testId }) {
|
|
27
|
+
const showDot = dot ?? (tone !== "neutral" && tone !== "info");
|
|
28
|
+
if (tone === "quiet") return /* @__PURE__ */ jsxs("span", {
|
|
29
|
+
className: cn("inline-flex items-center gap-1.5 whitespace-nowrap text-[12.5px] font-medium text-status-success-text", className),
|
|
30
|
+
"data-tone": tone,
|
|
31
|
+
"data-testid": testId,
|
|
32
|
+
children: [showDot && /* @__PURE__ */ jsx("span", {
|
|
33
|
+
className: "size-1.5 rounded-full bg-current",
|
|
34
|
+
"aria-hidden": "true"
|
|
35
|
+
}), children]
|
|
36
|
+
});
|
|
37
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
38
|
+
className: cn(PILL, TONE_PILL[tone], className),
|
|
39
|
+
"data-tone": tone,
|
|
40
|
+
"data-testid": testId,
|
|
41
|
+
children: [showDot && /* @__PURE__ */ jsx("span", {
|
|
42
|
+
className: "size-1.5 rounded-full bg-current",
|
|
43
|
+
"aria-hidden": "true"
|
|
44
|
+
}), children]
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
/** One line under a status saying why, in its tone's colour. */
|
|
48
|
+
function ReasonLine({ tone, children }) {
|
|
49
|
+
return /* @__PURE__ */ jsx("span", {
|
|
50
|
+
className: cn("mt-0.5 block truncate text-xs", TONE_TEXT[tone]),
|
|
51
|
+
children
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { Status as n, ReasonLine as t };
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as Icon } from "./Icon-BtQ0HXLh.js";
|
|
3
|
+
import { n as offlineCandidates, r as onlineCandidates, t as OfflineIcon } from "./OfflineIcon-TwMKYWjA.js";
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
|
|
6
|
+
import { cn } from "@burdenoff/fe-libs/utils";
|
|
7
|
+
|
|
8
|
+
// src/utils/store-icon.ts
|
|
9
|
+
const ICONIFY_NAME = /^[a-z0-9]+(?:-[a-z0-9]+)*:[a-z0-9]+(?:[-_][a-z0-9]+)*$/i;
|
|
10
|
+
/** True when the value is an Iconify `prefix:name` icon, not a URL. */
|
|
11
|
+
function isIconifyName(value) {
|
|
12
|
+
return ICONIFY_NAME.test(value) && !/^(https?|data|blob):/i.test(value);
|
|
13
|
+
}
|
|
14
|
+
const IMAGE_URL = /^https?:\/\/[^\s/]/i;
|
|
15
|
+
/**
|
|
16
|
+
* Hosts of the public Iconify API and its mirrors. The API rate-limits per
|
|
17
|
+
* viewer IP, so a link to it is never used as an `<img src>`.
|
|
18
|
+
*/
|
|
19
|
+
const ICONIFY_API_HOSTS = /* @__PURE__ */ new Set([
|
|
20
|
+
"api.iconify.design",
|
|
21
|
+
"api.simplesvg.com",
|
|
22
|
+
"api.unisvg.com"
|
|
23
|
+
]);
|
|
24
|
+
/** Path of an Iconify API SVG link: `/<set>/<name>.svg` or `/<set>:<name>.svg`. */
|
|
25
|
+
const ICONIFY_API_PATH = /^\/([a-z0-9]+(?:-[a-z0-9]+)*)[/:]([a-z0-9]+(?:-[a-z0-9]+)*)\.svg$/i;
|
|
26
|
+
/**
|
|
27
|
+
* Reads a link to the public Iconify API. Returns the icon it names as an
|
|
28
|
+
* Iconify `set:name` (`https://api.iconify.design/logos/slack-icon.svg` is
|
|
29
|
+
* `logos:slack-icon`), `"unrenderable"` for any other link to the API, or
|
|
30
|
+
* null when the value is not an Iconify API link at all.
|
|
31
|
+
*
|
|
32
|
+
* Listings were published with these links as their icon. The store renders
|
|
33
|
+
* them into `iconUrl` offline; when it cannot (the icon is in no Iconify set),
|
|
34
|
+
* the link would only fetch a 404 from the API, so surfaces treat it as the
|
|
35
|
+
* icon name it is and draw it only from the bundled set.
|
|
36
|
+
*/
|
|
37
|
+
function iconifyApiIcon(value) {
|
|
38
|
+
let url;
|
|
39
|
+
try {
|
|
40
|
+
url = new URL(value);
|
|
41
|
+
} catch {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
if (!ICONIFY_API_HOSTS.has(url.hostname.toLowerCase())) return null;
|
|
45
|
+
const match = ICONIFY_API_PATH.exec(url.pathname);
|
|
46
|
+
if (!match) return "unrenderable";
|
|
47
|
+
return `${match[1]}:${match[2]}`.toLowerCase();
|
|
48
|
+
}
|
|
49
|
+
const DATA_IMAGE = /^data:image\/[a-z0-9.+-]+[;,]/i;
|
|
50
|
+
const BLOB_URL = /^blob:\S/i;
|
|
51
|
+
/**
|
|
52
|
+
* Classifies one icon value. Returns null for values that can never render:
|
|
53
|
+
* empty strings, bare words, relative paths and non-image schemes. A link to
|
|
54
|
+
* the public Iconify API is read as the icon name it carries (see
|
|
55
|
+
* `iconifyApiIcon`) and keeps the link in `apiLink`; only an online surface
|
|
56
|
+
* may turn it back into an image (see `onlineCandidates`).
|
|
57
|
+
*/
|
|
58
|
+
function classifyStoreIcon(value) {
|
|
59
|
+
const trimmed = value?.trim();
|
|
60
|
+
if (!trimmed) return null;
|
|
61
|
+
const apiIcon = iconifyApiIcon(trimmed);
|
|
62
|
+
if (apiIcon === "unrenderable") return null;
|
|
63
|
+
if (apiIcon) return {
|
|
64
|
+
kind: "icon",
|
|
65
|
+
name: apiIcon,
|
|
66
|
+
apiLink: trimmed
|
|
67
|
+
};
|
|
68
|
+
if (IMAGE_URL.test(trimmed) || DATA_IMAGE.test(trimmed) || BLOB_URL.test(trimmed)) return {
|
|
69
|
+
kind: "image",
|
|
70
|
+
src: trimmed
|
|
71
|
+
};
|
|
72
|
+
if (isIconifyName(trimmed)) return {
|
|
73
|
+
kind: "icon",
|
|
74
|
+
name: trimmed
|
|
75
|
+
};
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
/** Stable identity for a candidate, used to remember failed images. */
|
|
79
|
+
function storeIconKey(source) {
|
|
80
|
+
return source.kind === "image" ? source.src : `icon:${source.name}`;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* The renderable candidates for a list of icon values, in priority order,
|
|
84
|
+
* with unrenderable values and duplicates removed.
|
|
85
|
+
*/
|
|
86
|
+
function storeIconCandidates(values) {
|
|
87
|
+
const seen = /* @__PURE__ */ new Set();
|
|
88
|
+
const candidates = [];
|
|
89
|
+
for (const value of values) {
|
|
90
|
+
const source = classifyStoreIcon(value);
|
|
91
|
+
if (!source) continue;
|
|
92
|
+
const key = storeIconKey(source);
|
|
93
|
+
if (seen.has(key)) continue;
|
|
94
|
+
seen.add(key);
|
|
95
|
+
candidates.push(source);
|
|
96
|
+
}
|
|
97
|
+
return candidates;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* The first candidate whose image has not failed to load. Iconify names never
|
|
101
|
+
* fail here: the icon component draws nothing when it cannot resolve one.
|
|
102
|
+
*/
|
|
103
|
+
function pickStoreIcon(candidates, failed) {
|
|
104
|
+
return candidates.find((candidate) => !failed.has(storeIconKey(candidate))) ?? null;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// src/builder/components/flow-builder/components/ui/store-icon.tsx
|
|
108
|
+
/**
|
|
109
|
+
* Draws a store icon from an ordered candidate list. An image that fails to
|
|
110
|
+
* load (expired presigned link, dead third-party host, rate-limited hotlink)
|
|
111
|
+
* is remembered as failed and the next candidate is drawn instead, ending at
|
|
112
|
+
* `fallback`, so a store surface never shows a broken-image glyph.
|
|
113
|
+
*
|
|
114
|
+
* Failures are remembered by source, so a re-render with new candidates (a
|
|
115
|
+
* different product, or a refetch that added `iconUrl`) starts clean for the
|
|
116
|
+
* sources it has not tried yet.
|
|
117
|
+
*/
|
|
118
|
+
function StoreIcon({ candidates, alt, imageClassName, iconClassName, iconSize, fallback, offline = false }) {
|
|
119
|
+
const [failed, setFailed] = useState(() => /* @__PURE__ */ new Set());
|
|
120
|
+
const source = pickStoreIcon(offline ? offlineCandidates(candidates) : onlineCandidates(candidates), failed);
|
|
121
|
+
if (!source) return /* @__PURE__ */ jsx(Fragment$1, { children: fallback });
|
|
122
|
+
if (source.kind === "icon") {
|
|
123
|
+
if (offline) return /* @__PURE__ */ jsx(OfflineIcon, {
|
|
124
|
+
icon: source.name,
|
|
125
|
+
width: iconSize,
|
|
126
|
+
height: iconSize,
|
|
127
|
+
className: iconClassName,
|
|
128
|
+
"aria-hidden": "true",
|
|
129
|
+
fallback
|
|
130
|
+
});
|
|
131
|
+
return /* @__PURE__ */ jsx(Icon, {
|
|
132
|
+
icon: source.name,
|
|
133
|
+
width: iconSize,
|
|
134
|
+
height: iconSize,
|
|
135
|
+
className: iconClassName,
|
|
136
|
+
"aria-hidden": "true"
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
const key = storeIconKey(source);
|
|
140
|
+
return /* @__PURE__ */ jsx("img", {
|
|
141
|
+
src: source.src,
|
|
142
|
+
alt,
|
|
143
|
+
loading: "lazy",
|
|
144
|
+
decoding: "async",
|
|
145
|
+
onError: () => setFailed((previous) => {
|
|
146
|
+
if (previous.has(key)) return previous;
|
|
147
|
+
const next = new Set(previous);
|
|
148
|
+
next.add(key);
|
|
149
|
+
return next;
|
|
150
|
+
}),
|
|
151
|
+
className: cn("object-cover", imageClassName)
|
|
152
|
+
}, key);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export { storeIconCandidates as n, StoreIcon as t };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
// src/components/moreTools/styles.ts
|
|
3
|
+
/**
|
|
4
|
+
* Class strings the redesigned More tools pages share (BOFF-15502), the same
|
|
5
|
+
* ones FluidGrids' Templates page and the Connected apps redesign use.
|
|
6
|
+
* Semantic tokens only, the ones the fe-libs app shell registers.
|
|
7
|
+
*/
|
|
8
|
+
/** The focus ring every control uses, as on the Templates page. */
|
|
9
|
+
const CONTROL_RING = "outline-none focus-visible:ring-2 focus-visible:ring-accent-glow";
|
|
10
|
+
/**
|
|
11
|
+
* The selected row of every menu: tinted, with a check in the action colour
|
|
12
|
+
* (the assistant's menus, fe-libs #509, and fe-libs ThemedSelect). Used by
|
|
13
|
+
* the styled selects and by every radio or checkbox menu item on these pages,
|
|
14
|
+
* so a chosen option looks the same in every menu.
|
|
15
|
+
*/
|
|
16
|
+
const MENU_ROW_CHECKED = "data-[state=checked]:bg-action-primary-bg/10 data-[state=checked]:text-text-primary";
|
|
17
|
+
/** A row of a menu: 44 px tall on touch screens, compact with a mouse. */
|
|
18
|
+
const MENU_ROW = "relative flex min-h-11 w-full cursor-default select-none items-center gap-2 rounded-lg py-1.5 ps-8 pe-2 text-sm text-text-primary outline-none focus:bg-[var(--color-accent-soft)] data-[disabled]:pointer-events-none data-[disabled]:opacity-50 sm:min-h-0";
|
|
19
|
+
/** The bordered box a compact list sits in. */
|
|
20
|
+
const LIST_BOX = "overflow-hidden rounded-xl border border-border-default bg-surface";
|
|
21
|
+
/** A compact list row's hover and focus look. */
|
|
22
|
+
const LIST_ROW = "border-t border-border-subtle first:border-t-0 hover:bg-surface-hover/60";
|
|
23
|
+
/** Small secondary text under a row's main value. */
|
|
24
|
+
const SUB_TEXT = "text-xs text-text-muted";
|
|
25
|
+
|
|
26
|
+
export { MENU_ROW_CHECKED as a, MENU_ROW as i, LIST_BOX as n, SUB_TEXT as o, LIST_ROW as r, CONTROL_RING as t };
|