@fluidgrids/fe-sdk 0.0.0-stage → 2026.1203.7

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.
Files changed (323) hide show
  1. package/README.md +564 -2
  2. package/dist/ActivityOptionsFields-C2u-hY2U.js +142 -0
  3. package/dist/AiStudioPage-B_hNTj-_.js +1137 -0
  4. package/dist/ApprovalInboxPage-ClITra3n.js +1312 -0
  5. package/dist/ChoiceSelect-LkK-uS9J.js +65 -0
  6. package/dist/ConfirmActionDialog-DHWTDRbp.js +31 -0
  7. package/dist/ConnectionFormDialog-C0kDgcrZ.js +153 -0
  8. package/dist/CreateFluidgridsTagDocument-Dtp9KPLJ.js +1055 -0
  9. package/dist/DataSinkDashboardPage-b4ezeqa6.js +278 -0
  10. package/dist/DataTablesPage-C1d9YGHz.js +5575 -0
  11. package/dist/DateTimeField-B1qR4ruo.js +51 -0
  12. package/dist/Disclosure-BNKij7-v.js +45 -0
  13. package/dist/ElementLibraryPage-8jNO6YmE.js +2256 -0
  14. package/dist/ElementLibrarySequenceDocument-B-W8SPzn.js +3979 -0
  15. package/dist/EnsureThemeProvider-BvlNjAd0.js +24 -0
  16. package/dist/EntityTagBadge-1OlP6p0c.js +25 -0
  17. package/dist/EntityTagPicker-BBrU5cE0.js +137 -0
  18. package/dist/ExecuteStepDocument-B4j1mdRT.js +189 -0
  19. package/dist/ExecutionDetailDocument-D6QuM-kp.js +875 -0
  20. package/dist/ExecutionDetailPage-D4CBtFdo.js +12217 -0
  21. package/dist/ExecutionDetailPage-DvQ667OE.d.ts +10 -0
  22. package/dist/ExecutionStatusBadge-BsDVor9t.js +221 -0
  23. package/dist/ExecutionsListDocument-Dan7ZiqB.js +459 -0
  24. package/dist/ExecutionsListPage-B3XT8ITL.js +4307 -0
  25. package/dist/FailureTriagePanel-DOJMaJ0n.js +1285 -0
  26. package/dist/FileDownloadUrlDocument-CVOYKcL5.js +92 -0
  27. package/dist/FluidGridsDocsLink-bX0Hnhxr.js +66 -0
  28. package/dist/FluidGridsMark-CE2blT7K.js +74 -0
  29. package/dist/HeldLoadRegion-BtTxbvOW.js +34 -0
  30. package/dist/HistoryPage-BLoRpJ1R.d.ts +6 -0
  31. package/dist/HistoryPage-BSBISXoj.js +2835 -0
  32. package/dist/Icon-BtQ0HXLh.js +160 -0
  33. package/dist/InsightsPage-D7ybj8N9.js +11245 -0
  34. package/dist/IsolationSetting-vy911E8b.js +1153 -0
  35. package/dist/LibraryParts-DOeNgR8A.js +413 -0
  36. package/dist/ManagedAiPolicyAuthority-BxwJ3ptd.js +40 -0
  37. package/dist/ManagedAiPolicyAuthority-DM3t3wNr.d.ts +18 -0
  38. package/dist/ManagedAiPolicyAuthorityContext-CNkxIOZ1.js +10 -0
  39. package/dist/McpTriggerServers-BCPCAOWB.js +459 -0
  40. package/dist/MissingNodesInstallModal-rO_SEDrC.js +224 -0
  41. package/dist/NavigationV2Provider-DCDt35eG.js +17 -0
  42. package/dist/NodeSchemaIntrospectionDocument-C1vAIcHd.js +95 -0
  43. package/dist/NodesPage-DEbnz9iU.d.ts +6 -0
  44. package/dist/NodesPage-O7KeeKtd.js +653 -0
  45. package/dist/OfflineIcon-TwMKYWjA.js +207 -0
  46. package/dist/OpenTemplateAsCodeButton-BhWJWIF3.js +94 -0
  47. package/dist/PaidTemplateConfirm-_G3ag6S4.js +28 -0
  48. package/dist/PublishCustomNodeAction-CIySbK4c.js +134 -0
  49. package/dist/RecordTaskDialog-BkpCDvhR.js +2078 -0
  50. package/dist/RunActionsMenu-DodOgIQm.js +59 -0
  51. package/dist/RunnerStatusPill-C1v967iq.js +24 -0
  52. package/dist/RunnersPage-dB0RSdY_.js +1929 -0
  53. package/dist/SandboxRuntimeExhaustedNotice-BFOIF93C.js +120 -0
  54. package/dist/SchedulesPage-DPWr1yvf.js +1607 -0
  55. package/dist/SearchBox-BGtYjvfs.js +49 -0
  56. package/dist/SequenceEditor-CFiHeHkR.js +497 -0
  57. package/dist/SettingsPage-0CQBNPZV.js +8695 -0
  58. package/dist/StewardPages-DAJhepen.js +47 -0
  59. package/dist/StewardRunImportPanel-Kva2DO0u.js +2844 -0
  60. package/dist/StoreTemplateCardCompact-CHn5kP7A.js +2166 -0
  61. package/dist/TagFilterSelect-CyA8QrS7.js +42 -0
  62. package/dist/TaskQueuesPage-DdnDCyat.js +3571 -0
  63. package/dist/TechnicalDetails-B0Oi4aZw.js +19 -0
  64. package/dist/TemplateConfigurationModal-CdvCYJLM.js +332 -0
  65. package/dist/TemplateDetailPanel-CbiKciuB.js +222 -0
  66. package/dist/TemplatePreview-cx7-NOeG.js +868 -0
  67. package/dist/TemplatesPage-BG3H-6v6.d.ts +10 -0
  68. package/dist/TemplatesPage-BVQpGYIV.js +3251 -0
  69. package/dist/TerminateExecutionDocument-B_HKNVrN.js +581 -0
  70. package/dist/TranslationBridge-Bd4aJKMs.d.ts +11 -0
  71. package/dist/TranslationBridge-Da-TPgQm.js +68 -0
  72. package/dist/TriggerWorkflowDocument-D9Km2Vv2.js +460 -0
  73. package/dist/UiSequencePickerSequenceDocument-BSYnSDV7.js +607 -0
  74. package/dist/UiStepScreenshot-Qh4QMyUp.js +146 -0
  75. package/dist/UsageTimeSeriesDocument-DcInx9-z.js +177 -0
  76. package/dist/VariablesPage-ChfGuW22.js +2243 -0
  77. package/dist/VersionDiffDialog-Bd2AeUwf.js +1702 -0
  78. package/dist/VersionLifecycleBar-BBeWVtz-.js +143 -0
  79. package/dist/WebhookDeliveriesPage-D66bua0j.js +1563 -0
  80. package/dist/WorkflowBuilder-B6wQD1TK.js +539 -0
  81. package/dist/WorkflowBuilder-DR4ku8Tr.js +1611 -0
  82. package/dist/WorkflowDefinitionDocument-DZLbTPUZ.js +321 -0
  83. package/dist/WorkflowEmbed-BXfFGy0i.js +708 -0
  84. package/dist/WorkflowEmbed-Cbqe1s1z.d.ts +6 -0
  85. package/dist/WorkflowPinnedDataDocument-BODT5omd.js +782 -0
  86. package/dist/WorkflowProposalCard-BruukdeF.js +96 -0
  87. package/dist/WorkflowProposalDocument-BdUbsrd0.js +620 -0
  88. package/dist/WorkflowSearchRedirect-C7zJ2MKH.js +40 -0
  89. package/dist/WorkflowSettingsDrawer-MVU1BKfY.d.ts +18 -0
  90. package/dist/WorkflowSettingsDrawer-gazs97WR.js +196 -0
  91. package/dist/WorkflowShareDialog-e8jJtLjU.js +469 -0
  92. package/dist/WorkflowVersionsDocument-DRVOp8Uj.js +3213 -0
  93. package/dist/WorkflowsList--hR2_8gf.js +4593 -0
  94. package/dist/WorkflowsList-CcNDQge5.d.ts +6 -0
  95. package/dist/WorkflowsListPageDocument-CnzcQm_o.js +934 -0
  96. package/dist/addonCatalog-CbZS4deh.js +58 -0
  97. package/dist/addonCatalog-sjlonAmR.d.ts +15 -0
  98. package/dist/addons.d.ts +3 -0
  99. package/dist/addons.js +4 -0
  100. package/dist/agent-form-Bfvm32j1.js +83 -0
  101. package/dist/agent-tools.d.ts +3 -0
  102. package/dist/agent-tools.js +5 -0
  103. package/dist/agentTools-CyL7DLOF.js +320 -0
  104. package/dist/ai-usage-BrxDgvdR.js +240 -0
  105. package/dist/aiCreditsBridge-BuE92tKo.js +49 -0
  106. package/dist/api-BKq-nIOZ.js +2286 -0
  107. package/dist/api-Ol7I8NxE.js +8289 -0
  108. package/dist/apollo-type-policies.d.ts +11 -0
  109. package/dist/apollo-type-policies.js +64 -0
  110. package/dist/askAboutBridge-ByYsQams.js +106 -0
  111. package/dist/askQuestions-Cmx7VnMm.js +742 -0
  112. package/dist/assert-rules-lfYEMc99.js +318 -0
  113. package/dist/assistant.d.ts +94 -0
  114. package/dist/assistant.js +99 -0
  115. package/dist/attach-node-helpers-HDKQOtrD.js +32 -0
  116. package/dist/badge-CXfPhoMH.js +26 -0
  117. package/dist/basil.generated-BK-EHbwN.js +10 -0
  118. package/dist/browser-steps-DMpS5TyB.js +533 -0
  119. package/dist/builderTimings-pvGnK1m-.js +510 -0
  120. package/dist/button-DG7y_FVJ.js +48 -0
  121. package/dist/canvasNoteTools-BxuP_AYO.js +137 -0
  122. package/dist/card-Bomy_1UG.js +44 -0
  123. package/dist/catalogGrid-BOrfMgi-.js +41 -0
  124. package/dist/channel-CPyQ1NR1.js +212 -0
  125. package/dist/chips-CvNrYJZa.js +27 -0
  126. package/dist/client-holder-C0M5Cfwl.js +68 -0
  127. package/dist/cn-QqidFIgr.js +10 -0
  128. package/dist/code-editor-diagnostics-Zr0cIcx1.js +46 -0
  129. package/dist/code-editor-field-x_JrY8KR.js +113 -0
  130. package/dist/codec-client-DPuD6mw7.js +515 -0
  131. package/dist/conditionBuilder-DwfEF0Q-.js +1144 -0
  132. package/dist/config-DO68jw5k.js +322 -0
  133. package/dist/constants-DgbVc24O.d.ts +296 -0
  134. package/dist/constants-DlRnHBfQ.js +217 -0
  135. package/dist/convert-browser-action-pfecelF7.js +347 -0
  136. package/dist/convert-dialog-B_o22NiJ.js +382 -0
  137. package/dist/create-workflow-first-Azg3JUdX.js +120 -0
  138. package/dist/definition-canvas-Bsda-rDT.js +31 -0
  139. package/dist/dialog-BVd152GS.js +94 -0
  140. package/dist/durable-nodes-BXyYCLxT.js +91 -0
  141. package/dist/duration-CDb7-mT_.js +33 -0
  142. package/dist/edge-mapper-wEAdGVU2.js +4477 -0
  143. package/dist/element-library-DkSlg_VE.js +727 -0
  144. package/dist/entities-I_0kio3q.js +38 -0
  145. package/dist/error-advice-QLr5NCm7.js +65 -0
  146. package/dist/errors-ClKb5sEt.js +188 -0
  147. package/dist/executions.d.ts +3 -0
  148. package/dist/executions.js +5 -0
  149. package/dist/feature-flags-B2qetXKd.js +385 -0
  150. package/dist/field-label-DPZRmE_B.js +153 -0
  151. package/dist/firstWorkflow-C_h0KMB2.js +133 -0
  152. package/dist/flags.d.ts +3 -0
  153. package/dist/flags.js +4 -0
  154. package/dist/flow-builder-DIvLOhz0.js +28038 -0
  155. package/dist/flow-store-holder-CUN7Terz.js +52 -0
  156. package/dist/fluent.generated-CA_e6-4l.js +14 -0
  157. package/dist/fluidgridsEvents-bbEQbwU6.js +175 -0
  158. package/dist/fluidgridsTheme-DUhvOgoy.js +297 -0
  159. package/dist/global-client-BQPuFrFa.js +433 -0
  160. package/dist/global-operations-BG6YgxrM.js +136 -0
  161. package/dist/graphql-types-UTYtujY9.js +21358 -0
  162. package/dist/history.d.ts +3 -0
  163. package/dist/history.js +4 -0
  164. package/dist/index-AoJAa5vU.d.ts +164958 -0
  165. package/dist/index-DEMT3iAM.d.ts +120 -0
  166. package/dist/index-ROZzNGyY.d.ts +76 -0
  167. package/dist/index.d.ts +20 -0
  168. package/dist/index.js +8123 -0
  169. package/dist/ion.generated-mbajjcAg.js +10 -0
  170. package/dist/label-Lzb8ZXf_.js +29 -0
  171. package/dist/labels-rXd9gYQz.js +1236 -0
  172. package/dist/liveCanvas-D5ytXDp8.js +103 -0
  173. package/dist/logos.generated-X6_0kjVR.js +21 -0
  174. package/dist/logs-panel-Cw0DkG0l.js +468 -0
  175. package/dist/lucide.generated-B6NVd3GT.js +29 -0
  176. package/dist/marksStore-a9oIMMot.js +175 -0
  177. package/dist/mcp-trigger-D0nRdvq5.js +307 -0
  178. package/dist/mdi.generated-D1BV74d6.js +292 -0
  179. package/dist/menus-CU3hDGYl.js +160 -0
  180. package/dist/mynaui.generated-DMWr5cXz.js +66 -0
  181. package/dist/navigation-v2.d.ts +3 -0
  182. package/dist/navigation-v2.js +5 -0
  183. package/dist/node-detail-view-Cgm5H1P-.js +1372 -0
  184. package/dist/node-editor-tab-body-CZ0fVuVP.js +187 -0
  185. package/dist/node-operation-selection-CdV3KI_V.js +3534 -0
  186. package/dist/node-registry-refresh-s3okf83X.js +27 -0
  187. package/dist/node-role-TMbnkmeP.js +132 -0
  188. package/dist/node-type-icon-BZa8n4iG.js +33 -0
  189. package/dist/nodes.d.ts +3 -0
  190. package/dist/nodes.js +4 -0
  191. package/dist/notesKey-5EaREBGA.js +12 -0
  192. package/dist/observability.d.ts +3 -0
  193. package/dist/observability.js +5 -0
  194. package/dist/offset-pages-zghoClB3.js +55 -0
  195. package/dist/operations-BBmT9ToP.js +663 -0
  196. package/dist/operations-WxRJWeqO.js +3133 -0
  197. package/dist/output-files-Ba8bu5lv.js +196 -0
  198. package/dist/page-operation-DrWuhd6Y.js +129 -0
  199. package/dist/page-twins.d.ts +13 -0
  200. package/dist/page-twins.js +186 -0
  201. package/dist/pageControlSpecs-DZJ9K37m.js +134 -0
  202. package/dist/pageControlsBridge-0pX9s-3k.js +54 -0
  203. package/dist/pageControlsBridge-DAuT3w7L.d.ts +36 -0
  204. package/dist/panels-PfBBAToE.js +346 -0
  205. package/dist/parts-B7fBcw-B.js +346 -0
  206. package/dist/popover-Dms9Vz3j.js +3389 -0
  207. package/dist/preloadable-lazy-Pp47mqQ9.js +65 -0
  208. package/dist/proactive.d.ts +66 -0
  209. package/dist/proactive.js +237 -0
  210. package/dist/quick-config-panel-DFd77xho.js +451 -0
  211. package/dist/quota-DeA_CJ2e.js +175 -0
  212. package/dist/quota.d.ts +3 -0
  213. package/dist/quota.js +4 -0
  214. package/dist/read-only-context-Dt9N9SIG.js +18 -0
  215. package/dist/relative-time-Dxt8ZIIu.js +55 -0
  216. package/dist/results-CwK_yDxK.js +325 -0
  217. package/dist/rolldown-runtime-hDbaFkMy.js +18 -0
  218. package/dist/route-data.d.ts +12 -0
  219. package/dist/route-data.js +69 -0
  220. package/dist/route-match-C-0_EnAt.d.ts +5 -0
  221. package/dist/route-match-DMkUICYV.js +41 -0
  222. package/dist/route-preload-C4DlGoCd.js +120 -0
  223. package/dist/run-display-UjLAoYqQ.js +81 -0
  224. package/dist/run-history-arGiHzGU.js +285 -0
  225. package/dist/run-list-links-DJn4Mf1T.js +98 -0
  226. package/dist/run-mode-USmM0-Uo.js +82 -0
  227. package/dist/run-parity-CWXqEJqM.js +144 -0
  228. package/dist/runsQuota-B6SyTbne.js +100 -0
  229. package/dist/runsQuota-DsniKiSg.d.ts +20 -0
  230. package/dist/safe-expression-Cw7-SCsm.js +1251 -0
  231. package/dist/save-status-store-C7nEYpfb.js +631 -0
  232. package/dist/schedule-panel-B4GYXzXQ.js +13774 -0
  233. package/dist/schedule-rules-ggVKRkBH.js +358 -0
  234. package/dist/secrets-Re_wSiE3.js +153 -0
  235. package/dist/settings.d.ts +4 -0
  236. package/dist/settings.js +6 -0
  237. package/dist/shared-DAWGGMSM.js +177 -0
  238. package/dist/sidebar-node-editor-6eSSgCzc.js +178 -0
  239. package/dist/solar.generated-CGYuUQAC.js +10 -0
  240. package/dist/stableTabbedDialog-BBhrfXGe.js +20 -0
  241. package/dist/start-url-CT6Yz96K.js +24 -0
  242. package/dist/status-CessxGpm.js +55 -0
  243. package/dist/store-icon-OctYp5zP.js +155 -0
  244. package/dist/styles-WGmTnZ2n.js +26 -0
  245. package/dist/styles.css +139 -0
  246. package/dist/svg-spinners.generated-CIPT7IhM.js +10 -0
  247. package/dist/template-code-CzN6JWNV.js +191 -0
  248. package/dist/template-graph-DLF9dygU.js +20 -0
  249. package/dist/template-preview-DcIIKOOL.js +32 -0
  250. package/dist/template-price-CdUHZRMF.js +40 -0
  251. package/dist/templates.d.ts +3 -0
  252. package/dist/templates.js +5 -0
  253. package/dist/theme-provider-CntfC4_i.js +23 -0
  254. package/dist/transient-DgZfhDfN.js +57 -0
  255. package/dist/typed-calls-C5tO03wq.js +26 -0
  256. package/dist/ui-script-By74Guk3.js +1094 -0
  257. package/dist/ui-script-editor-CqPu2bCN.js +2447 -0
  258. package/dist/ui-step-fix-8uM2_Hft.js +67 -0
  259. package/dist/ui-step-fix-store-CcO1FdRx.js +19 -0
  260. package/dist/ui-step-run-context-o7bLE6KP.js +46 -0
  261. package/dist/ui-target-editor-D2JhB_lD.js +673 -0
  262. package/dist/uiMarkTools-CSznnO1i.js +1054 -0
  263. package/dist/upgradePrompt-BAFBKKW5.js +72 -0
  264. package/dist/use-bare-node-registry-O6mKJO_n.js +11498 -0
  265. package/dist/use-browser-available-hj8wc3Kb.js +241 -0
  266. package/dist/use-edge-mapper-schemas-Bonofxow.js +496 -0
  267. package/dist/use-extension-bridge-B9ZreOkQ.js +608 -0
  268. package/dist/use-mobile-BTqCUjzS.js +27 -0
  269. package/dist/use-sdk-query-C697xZVv.js +116 -0
  270. package/dist/use-workflow-code-editor-CFoRFrZ5.js +753 -0
  271. package/dist/useActionParam-B2tU2BlY.js +85 -0
  272. package/dist/useAgentTokenStream-Bko_J0d0.js +4217 -0
  273. package/dist/useBrowserClients-3v95-gSh.js +103 -0
  274. package/dist/useCodeWorkflowInsights-w0tz9Ap_.js +600 -0
  275. package/dist/useConnections-DsgEJs05.js +439 -0
  276. package/dist/useDebouncedValue-BFekcv6n.js +18 -0
  277. package/dist/useDurableParity-8fnMZmBc.js +1787 -0
  278. package/dist/useEntityTags-D0spL6Ut.js +460 -0
  279. package/dist/useExecutions-2u5nGJJk.js +681 -0
  280. package/dist/useFluidGridsAnalytics-VM8lAi2x.js +238 -0
  281. package/dist/useGlobalStoreClient-BTdhkA2I.js +24 -0
  282. package/dist/useHumanRequests-zlYDp3l1.js +221 -0
  283. package/dist/useNavigationV2-C2WeqN7d.js +29 -0
  284. package/dist/useNavigationV2-DANUmg12.d.ts +9 -0
  285. package/dist/useObservability-BRlQ0tOA.js +285 -0
  286. package/dist/useRequestedProposal-B7uPXfZB.js +51 -0
  287. package/dist/useRunHistory-CXCMUPyf.js +2759 -0
  288. package/dist/useRunLive-D0JvVZT2.js +1060 -0
  289. package/dist/useRunnerList-Dbi59i1K.js +446 -0
  290. package/dist/useRunners-URUc5quU.js +173 -0
  291. package/dist/useRunsPage-DG656UCK.js +2709 -0
  292. package/dist/useVariables-BIelxcWr.js +463 -0
  293. package/dist/useVersionHistoryData-CTjqVw7l.js +292 -0
  294. package/dist/useWorkflowCodeExport-pqxyLHD1.js +522 -0
  295. package/dist/useWorkflowListExport-hcZNvTaB.js +232 -0
  296. package/dist/useWorkflowOrganization-CpBbOrs7.js +1772 -0
  297. package/dist/useWorkflowProposal-BH0VdNMA.js +3280 -0
  298. package/dist/useWorkflows-Cvg-Z_IE.js +1606 -0
  299. package/dist/utils-fvBb5qOD.js +89 -0
  300. package/dist/webhook-deliveries-AvQujaZy.js +99 -0
  301. package/dist/workflow-builder-CJygVkVv.d.ts +2 -0
  302. package/dist/workflow-builder.d.ts +3 -0
  303. package/dist/workflow-builder.js +8 -0
  304. package/dist/workflow-code-transfer-Bsy0JKAZ.js +323 -0
  305. package/dist/workflow-embed.d.ts +3 -0
  306. package/dist/workflow-embed.js +4 -0
  307. package/dist/workflow-git-sync--K9ZsPDC.js +263 -0
  308. package/dist/workflow-host.d.ts +6 -0
  309. package/dist/workflow-host.js +11 -0
  310. package/dist/workflow-pages-D-7ByLTB.d.ts +68 -0
  311. package/dist/workflow-pages.d.ts +3 -0
  312. package/dist/workflow-pages.js +115 -0
  313. package/dist/workflow-preview-canvas-CO8yzdE3.js +848 -0
  314. package/dist/workflow-preview.d.ts +65 -0
  315. package/dist/workflow-preview.js +4 -0
  316. package/dist/workflow-route.d.ts +33 -0
  317. package/dist/workflow-route.js +4 -0
  318. package/dist/workflow-save-state-D0l-DkLf.js +767 -0
  319. package/dist/workflow-transfer-CQnQC-ke.js +104 -0
  320. package/dist/workflowRouteData-BkfVOc-O.js +169 -0
  321. package/dist/workflows-list.d.ts +10 -0
  322. package/dist/workflows-list.js +5 -0
  323. package/package.json +320 -4
@@ -0,0 +1,681 @@
1
+ "use client";
2
+ import { n as getFluidGridsClient } from "./client-holder-C0M5Cfwl.js";
3
+ import { t as ExecutionsListDocument } from "./ExecutionsListDocument-Dan7ZiqB.js";
4
+ import { t as ExecutionDetailDocument } from "./ExecutionDetailDocument-D6QuM-kp.js";
5
+ import { a as CancelExecutionDocument, i as PauseExecutionDocument, n as RetryNodeDocument, r as ResumeExecutionDocument, t as TerminateExecutionDocument } from "./TerminateExecutionDocument-B_HKNVrN.js";
6
+ import { l as withWorkflowIdFilter } from "./run-parity-CWXqEJqM.js";
7
+ import { t as TriggerWorkflowDocument } from "./TriggerWorkflowDocument-D9Km2Vv2.js";
8
+ import { f as useExecutionsStore } from "./config-DO68jw5k.js";
9
+ import { l as REPLAY_WORKFLOW_RUN, u as RETRY_WORKFLOW_RUNS } from "./operations-BBmT9ToP.js";
10
+ import { s as throwIfResultError } from "./errors-ClKb5sEt.js";
11
+ import { d as emitOperationErrorEvent, u as emitFluidGridsEvent } from "./global-client-BQPuFrFa.js";
12
+ import { t as openRunQuotaUpgradePrompt } from "./upgradePrompt-BAFBKKW5.js";
13
+ import { t as useFluidGridsAnalytics } from "./useFluidGridsAnalytics-VM8lAi2x.js";
14
+ import { a as emitRunStarted } from "./fluidgridsEvents-bbEQbwU6.js";
15
+ import { r as useTr } from "./TranslationBridge-Da-TPgQm.js";
16
+ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
17
+
18
+ // src/modules/executions/utils/date-range.ts
19
+ function toDate(value) {
20
+ if (value === null || value === void 0 || value === "") return null;
21
+ const date = value instanceof Date ? value : new Date(value);
22
+ return Number.isNaN(date.getTime()) ? null : date;
23
+ }
24
+ /**
25
+ * Validate a filter date range before it is turned into query variables.
26
+ *
27
+ * Rules:
28
+ * - missing/undefined start OR end → valid, both ends pass through as-is
29
+ * (half-open windows are a supported preset shape);
30
+ * - `startDate <= endDate` → valid;
31
+ * - `startDate > endDate` → INVALID (the filter is treated as not applied);
32
+ * - a non-parseable date (invalid input, UI misconfiguration) → normalised to
33
+ * `null` and treated as a missing end, so the bad value is never serialized
34
+ * into the request.
35
+ *
36
+ * Never mutates the inputs; the returned Dates are the same instances when
37
+ * both are already `Date`s.
38
+ */
39
+ function validateDateRange(start, end, preset) {
40
+ const startDate = toDate(start);
41
+ const endDate = toDate(end);
42
+ if (startDate && endDate && startDate.getTime() > endDate.getTime()) return {
43
+ valid: false,
44
+ start: null,
45
+ end: null,
46
+ preset: preset ?? "all"
47
+ };
48
+ return {
49
+ valid: true,
50
+ start: startDate,
51
+ end: endDate,
52
+ preset: preset ?? "all"
53
+ };
54
+ }
55
+ /**
56
+ * Build the `startDate`/`endDate` request fields for `ListExecutionsInput`
57
+ * from a validated range. Returns an empty object when the range is invalid
58
+ * (callers must not send the dates in that case) or when both ends are absent.
59
+ *
60
+ * UI-configured range → request payload always stays consistent because both
61
+ * the filter state and the outgoing variables flow through this one function.
62
+ */
63
+ function dateRangeToInput(start, end) {
64
+ const { valid, start: validatedStart, end: validatedEnd } = validateDateRange(start, end);
65
+ if (!valid) return {};
66
+ const input = {};
67
+ if (validatedStart) input.startDate = validatedStart.toISOString();
68
+ if (validatedEnd) input.endDate = validatedEnd.toISOString();
69
+ return input;
70
+ }
71
+ /**
72
+ * A custom range end as the date-and-time field's text (BOFF-16372):
73
+ * `YYYY-MM-DDTHH:mm` in the viewer's zone, "" for none or an unreadable date.
74
+ * (`toISOString()` would show the UTC time as if it were local.)
75
+ */
76
+ function toLocalInputValue(date) {
77
+ const value = toDate(date);
78
+ if (!value) return "";
79
+ const pad = (n) => String(n).padStart(2, "0");
80
+ return `${value.getFullYear()}-${pad(value.getMonth() + 1)}-${pad(value.getDate())}T${pad(value.getHours())}:${pad(value.getMinutes())}`;
81
+ }
82
+ /** The date a date-and-time field's text names, in the viewer's zone; null for "" or bad text. */
83
+ function fromLocalInputValue(text) {
84
+ return text.trim() === "" ? null : toDate(text);
85
+ }
86
+
87
+ // src/modules/run-control/utils/search-attributes.ts
88
+ /**
89
+ * The operators each attribute type takes. This is an exact copy of the
90
+ * service's `OPERATORS` table (wspace-workflow-svc
91
+ * `src/modules/runs/services/search-attribute-filter.ts`), which refuses every
92
+ * other pair with VALIDATION. The first operator of each list is the one a new
93
+ * row starts with, so it must be one the service accepts for that type.
94
+ */
95
+ const OPERATORS_BY_TYPE = {
96
+ KEYWORD: [
97
+ "EQ",
98
+ "NEQ",
99
+ "IN",
100
+ "STARTS_WITH"
101
+ ],
102
+ TEXT: ["CONTAINS"],
103
+ INT: [
104
+ "EQ",
105
+ "NEQ",
106
+ "IN",
107
+ "GT",
108
+ "GTE",
109
+ "LT",
110
+ "LTE"
111
+ ],
112
+ DOUBLE: [
113
+ "EQ",
114
+ "NEQ",
115
+ "IN",
116
+ "GT",
117
+ "GTE",
118
+ "LT",
119
+ "LTE"
120
+ ],
121
+ BOOL: ["EQ", "NEQ"],
122
+ DATETIME: [
123
+ "EQ",
124
+ "NEQ",
125
+ "GT",
126
+ "GTE",
127
+ "LT",
128
+ "LTE"
129
+ ],
130
+ KEYWORD_LIST: ["CONTAINS", "IN"]
131
+ };
132
+ const EMPTY_SEARCH_FILTER = {
133
+ rows: [],
134
+ combine: "and",
135
+ text: ""
136
+ };
137
+ /** The most conditions the service takes in one filter. */
138
+ const MAX_SEARCH_CONDITIONS = 20;
139
+ function scalar(type, raw) {
140
+ const value = raw.trim();
141
+ switch (type) {
142
+ case "INT":
143
+ if (!/^-?\d+$/.test(value)) return void 0;
144
+ return Number(value);
145
+ case "DOUBLE": {
146
+ const number = Number(value);
147
+ return value !== "" && Number.isFinite(number) ? number : void 0;
148
+ }
149
+ case "BOOL": return value === "true" ? true : value === "false" ? false : void 0;
150
+ case "DATETIME": {
151
+ const date = new Date(value);
152
+ return value && !Number.isNaN(date.getTime()) ? date.toISOString() : void 0;
153
+ }
154
+ default: return value ? value : void 0;
155
+ }
156
+ }
157
+ /**
158
+ * The value a row sends, typed by its attribute: IN takes a comma list, and
159
+ * a value that does not fit the type is `undefined` (the row is incomplete).
160
+ */
161
+ function conditionValue(type, op, raw) {
162
+ if (op === "IN") {
163
+ const items = raw.split(",").map((item) => scalar(type === "KEYWORD_LIST" ? "KEYWORD" : type, item));
164
+ return items.length > 0 && items.every((item) => item !== void 0) ? items : void 0;
165
+ }
166
+ return scalar(type === "KEYWORD_LIST" ? "KEYWORD" : type, raw);
167
+ }
168
+ /**
169
+ * The filter input for the list request, or null when it filters nothing.
170
+ * Rows naming an undefined attribute, or with a value that does not fit,
171
+ * are left out and reported in `incomplete`.
172
+ */
173
+ function buildSearchAttributeFilter(state, types) {
174
+ const conditions = [];
175
+ let incomplete = 0;
176
+ for (const row of state.rows) {
177
+ const type = types.get(row.name);
178
+ const value = type ? conditionValue(type, row.op, row.value) : void 0;
179
+ if (!type || value === void 0 || !OPERATORS_BY_TYPE[type].includes(row.op)) {
180
+ incomplete += 1;
181
+ continue;
182
+ }
183
+ conditions.push({
184
+ name: row.name,
185
+ op: row.op,
186
+ value
187
+ });
188
+ }
189
+ const text = state.text.trim().slice(0, 256);
190
+ const limited = conditions.slice(0, 20);
191
+ if (limited.length === 0 && !text) return {
192
+ filter: null,
193
+ incomplete
194
+ };
195
+ const filter = {};
196
+ if (limited.length > 0) filter[state.combine] = limited;
197
+ if (text) filter.text = text;
198
+ return {
199
+ filter,
200
+ incomplete
201
+ };
202
+ }
203
+ /**
204
+ * List filters the service refuses together with a search-attribute filter
205
+ * (they have no exact SQL form there; D-S4-8).
206
+ */
207
+ const SEARCH_FILTER_CONFLICTS = [
208
+ "search",
209
+ "nodeId",
210
+ "triggerType",
211
+ "rootRunId",
212
+ "memo"
213
+ ];
214
+ /** The conflicting filters the list request carries now. */
215
+ function searchFilterConflicts(input) {
216
+ const record = { ...input };
217
+ return SEARCH_FILTER_CONFLICTS.filter((key) => record[key] !== void 0 && record[key] !== null && record[key] !== "");
218
+ }
219
+ /**
220
+ * Adds the search-attribute filter to the list request. Nothing changes while
221
+ * the flag is off, the filter is empty, or a conflicting filter is set (the
222
+ * builder says why), so the request is exactly what it was before.
223
+ */
224
+ function withSearchAttributeFilter(input, filter, enabled) {
225
+ if (!enabled || !filter) return input;
226
+ if (searchFilterConflicts(input).length > 0) return input;
227
+ return {
228
+ ...input,
229
+ searchAttributes: filter
230
+ };
231
+ }
232
+
233
+ // src/modules/executions/utils/retry.ts
234
+ /**
235
+ * Context keys that describe how the ORIGINAL run was started and must never be
236
+ * replayed:
237
+ *
238
+ * - `isScheduled` makes the backend resolve the ACTIVE version instead of the
239
+ * requested one, so replaying it would silently retry a different version
240
+ * than the one that failed.
241
+ * - `workspaceId` is re-derived from the caller's workspace on every trigger.
242
+ */
243
+ const NON_REPLAYABLE_CONTEXT_KEYS = ["isScheduled", "workspaceId"];
244
+ /**
245
+ * Build the trigger input that re-runs `run`.
246
+ *
247
+ * Returns `null` when the run cannot be retried, which is the case for older
248
+ * rows that carry no trigger node: without it the backend has no entry point
249
+ * and would reject the mutation.
250
+ */
251
+ function buildRetryTriggerInput(run) {
252
+ if (!run.workflowKey || !run.version || !run.triggerNodeId) return null;
253
+ const context = {};
254
+ const original = run.context;
255
+ if (original && typeof original === "object" && !Array.isArray(original)) for (const [key, value] of Object.entries(original)) {
256
+ if (NON_REPLAYABLE_CONTEXT_KEYS.includes(key)) continue;
257
+ context[key] = value;
258
+ }
259
+ context.retryOfRunId = run.id;
260
+ return {
261
+ workflowKey: run.workflowKey,
262
+ version: run.version,
263
+ triggerNodeId: run.triggerNodeId,
264
+ triggerData: run.triggerData ?? void 0,
265
+ context
266
+ };
267
+ }
268
+
269
+ // src/modules/executions/hooks/useExecutions.ts
270
+ function useExecutions(input = {}) {
271
+ const [executions, setExecutions] = useState([]);
272
+ const [total, setTotal] = useState(0);
273
+ const [totalCapped, setTotalCapped] = useState(false);
274
+ const [hasMore, setHasMore] = useState(false);
275
+ const [loading, setLoading] = useState(true);
276
+ const [error, setError] = useState(null);
277
+ const inputKey = JSON.stringify(input);
278
+ const reqIdRef = useRef(0);
279
+ const fetchData = useCallback(async () => {
280
+ const reqId = ++reqIdRef.current;
281
+ setLoading(true);
282
+ setError(null);
283
+ try {
284
+ const result = await getFluidGridsClient().query({
285
+ query: ExecutionsListDocument,
286
+ variables: { input: JSON.parse(inputKey) },
287
+ fetchPolicy: "network-only",
288
+ context: { queryDeduplication: false }
289
+ });
290
+ if (reqId !== reqIdRef.current) return true;
291
+ setExecutions(result.data?.workflowRuns?.items ?? []);
292
+ setTotal(result.data?.workflowRuns?.total ?? 0);
293
+ setTotalCapped(result.data?.workflowRuns?.totalCapped ?? false);
294
+ setHasMore(result.data?.workflowRuns?.hasMore ?? false);
295
+ return true;
296
+ } catch (err) {
297
+ if (reqId !== reqIdRef.current) return true;
298
+ setError(err);
299
+ return false;
300
+ } finally {
301
+ if (reqId === reqIdRef.current) setLoading(false);
302
+ }
303
+ }, [inputKey]);
304
+ useEffect(() => {
305
+ fetchData();
306
+ }, [fetchData]);
307
+ return {
308
+ executions,
309
+ total,
310
+ totalCapped,
311
+ hasMore,
312
+ loading,
313
+ error,
314
+ refetch: fetchData
315
+ };
316
+ }
317
+ function useExecution(id) {
318
+ const [execution, setExecution] = useState(null);
319
+ const [loading, setLoading] = useState(true);
320
+ const [error, setError] = useState(null);
321
+ const reqIdRef = useRef(0);
322
+ const fetchData = useCallback(async () => {
323
+ if (!id) {
324
+ setLoading(false);
325
+ return true;
326
+ }
327
+ const reqId = ++reqIdRef.current;
328
+ setLoading(true);
329
+ setError(null);
330
+ try {
331
+ const result = await getFluidGridsClient().query({
332
+ query: ExecutionDetailDocument,
333
+ variables: { id },
334
+ fetchPolicy: "network-only",
335
+ context: { queryDeduplication: false }
336
+ });
337
+ if (reqId !== reqIdRef.current) return true;
338
+ setExecution(result.data?.workflowRun ?? null);
339
+ return true;
340
+ } catch (err) {
341
+ if (reqId !== reqIdRef.current) return true;
342
+ setError(err);
343
+ return false;
344
+ } finally {
345
+ if (reqId === reqIdRef.current) setLoading(false);
346
+ }
347
+ }, [id]);
348
+ useEffect(() => {
349
+ fetchData();
350
+ }, [fetchData]);
351
+ return {
352
+ execution,
353
+ loading,
354
+ error,
355
+ refetch: fetchData,
356
+ update: useCallback((change) => setExecution((run) => run ? change(run) : run), [])
357
+ };
358
+ }
359
+ function useExecutionActions() {
360
+ const tr = useTr();
361
+ const { bus, workspaceId } = useFluidGridsAnalytics();
362
+ const [loading, setLoading] = useState(false);
363
+ const [error, setError] = useState(null);
364
+ /**
365
+ * Pause, resume or cancel a run, answering with a tagged result so the caller
366
+ * can tell the person when it failed (BOFF-11846). The three named functions
367
+ * below keep their original contract (the run, or `null` on failure) for
368
+ * existing consumers; the Runs pages use this one, because `null` carried no
369
+ * reason and the pages used to do nothing visible on failure.
370
+ */
371
+ const controlExecution = useCallback(async (action, id) => {
372
+ setLoading(true);
373
+ setError(null);
374
+ try {
375
+ const client = getFluidGridsClient();
376
+ switch (action) {
377
+ case "pause": return {
378
+ ok: true,
379
+ run: throwIfResultError(await client.mutate({
380
+ mutation: PauseExecutionDocument,
381
+ variables: { id }
382
+ })).data?.pauseWorkflowRun ?? null
383
+ };
384
+ case "resume": return {
385
+ ok: true,
386
+ run: throwIfResultError(await client.mutate({
387
+ mutation: ResumeExecutionDocument,
388
+ variables: { id }
389
+ })).data?.resumeWorkflowRun ?? null
390
+ };
391
+ case "cancel": return {
392
+ ok: true,
393
+ run: throwIfResultError(await client.mutate({
394
+ mutation: CancelExecutionDocument,
395
+ variables: { id }
396
+ })).data?.cancelWorkflowRun ?? null
397
+ };
398
+ }
399
+ } catch (err) {
400
+ const failure = err;
401
+ setError(failure);
402
+ return {
403
+ ok: false,
404
+ message: failure.message
405
+ };
406
+ } finally {
407
+ setLoading(false);
408
+ }
409
+ }, []);
410
+ return {
411
+ controlExecution,
412
+ pauseExecution: useCallback(async (id) => {
413
+ const result = await controlExecution("pause", id);
414
+ return result.ok ? result.run : null;
415
+ }, [controlExecution]),
416
+ resumeExecution: useCallback(async (id) => {
417
+ const result = await controlExecution("resume", id);
418
+ return result.ok ? result.run : null;
419
+ }, [controlExecution]),
420
+ cancelExecution: useCallback(async (id) => {
421
+ const result = await controlExecution("cancel", id);
422
+ return result.ok ? result.run : null;
423
+ }, [controlExecution]),
424
+ retryNode: useCallback(async (runId, nodeId) => {
425
+ setLoading(true);
426
+ setError(null);
427
+ try {
428
+ const client = getFluidGridsClient();
429
+ return throwIfResultError(await client.mutate({
430
+ mutation: RetryNodeDocument,
431
+ variables: {
432
+ id: runId,
433
+ nodeId
434
+ }
435
+ })).data?.retryNode ?? null;
436
+ } catch (err) {
437
+ setError(err);
438
+ return null;
439
+ } finally {
440
+ setLoading(false);
441
+ }
442
+ }, []),
443
+ retryExecution: useCallback(async (execution) => {
444
+ const input = buildRetryTriggerInput(execution);
445
+ if (!input) {
446
+ const message = "This run has no trigger node, so it cannot be re-run.";
447
+ setError(/* @__PURE__ */ new Error(message));
448
+ return {
449
+ ok: false,
450
+ message
451
+ };
452
+ }
453
+ setLoading(true);
454
+ setError(null);
455
+ try {
456
+ const client = getFluidGridsClient();
457
+ const run = throwIfResultError(await client.mutate({
458
+ mutation: TriggerWorkflowDocument,
459
+ variables: { input }
460
+ })).data?.triggerWorkflow;
461
+ if (!run) {
462
+ const message = "The workflow did not start.";
463
+ setError(/* @__PURE__ */ new Error(message));
464
+ return {
465
+ ok: false,
466
+ message
467
+ };
468
+ }
469
+ emitRunStarted(bus, {
470
+ workspaceId,
471
+ executionId: run.runId,
472
+ trigger: "manual"
473
+ });
474
+ emitFluidGridsEvent("run:started", {
475
+ runId: run.runId,
476
+ workflowKey: run.workflowKey
477
+ });
478
+ return {
479
+ ok: true,
480
+ run
481
+ };
482
+ } catch (err) {
483
+ const error = err;
484
+ setError(error);
485
+ emitOperationErrorEvent("run:start", err);
486
+ openRunQuotaUpgradePrompt(err, tr, {
487
+ bus,
488
+ workspaceId,
489
+ surface: "runs"
490
+ });
491
+ return {
492
+ ok: false,
493
+ message: error.message
494
+ };
495
+ } finally {
496
+ setLoading(false);
497
+ }
498
+ }, [
499
+ tr,
500
+ bus,
501
+ workspaceId
502
+ ]),
503
+ replayExecution: useCallback(async (runId) => {
504
+ setLoading(true);
505
+ setError(null);
506
+ try {
507
+ const client = getFluidGridsClient();
508
+ const replayed = throwIfResultError(await client.mutate({
509
+ mutation: REPLAY_WORKFLOW_RUN,
510
+ variables: { runId }
511
+ })).data?.replayWorkflowRun ?? null;
512
+ if (replayed) {
513
+ emitRunStarted(bus, {
514
+ workspaceId,
515
+ executionId: replayed.runId,
516
+ trigger: "manual"
517
+ });
518
+ emitFluidGridsEvent("run:started", {
519
+ runId: replayed.runId,
520
+ workflowKey: replayed.workflowKey
521
+ });
522
+ }
523
+ return replayed;
524
+ } catch (err) {
525
+ setError(err);
526
+ openRunQuotaUpgradePrompt(err, tr, {
527
+ bus,
528
+ workspaceId,
529
+ surface: "runs"
530
+ });
531
+ return null;
532
+ } finally {
533
+ setLoading(false);
534
+ }
535
+ }, [
536
+ tr,
537
+ bus,
538
+ workspaceId
539
+ ]),
540
+ retryExecutions: useCallback(async (runIds) => {
541
+ setLoading(true);
542
+ setError(null);
543
+ try {
544
+ const client = getFluidGridsClient();
545
+ const retried = throwIfResultError(await client.mutate({
546
+ mutation: RETRY_WORKFLOW_RUNS,
547
+ variables: { runIds }
548
+ })).data?.retryWorkflowRuns ?? [];
549
+ for (const run of retried) {
550
+ emitRunStarted(bus, {
551
+ workspaceId,
552
+ executionId: run.runId,
553
+ trigger: "manual"
554
+ });
555
+ emitFluidGridsEvent("run:started", {
556
+ runId: run.runId,
557
+ workflowKey: run.workflowKey
558
+ });
559
+ }
560
+ return retried;
561
+ } catch (err) {
562
+ setError(err);
563
+ openRunQuotaUpgradePrompt(err, tr, {
564
+ bus,
565
+ workspaceId,
566
+ surface: "runs"
567
+ });
568
+ return [];
569
+ } finally {
570
+ setLoading(false);
571
+ }
572
+ }, [
573
+ tr,
574
+ bus,
575
+ workspaceId
576
+ ]),
577
+ terminateExecution: useCallback(async (runId, reason) => {
578
+ setLoading(true);
579
+ setError(null);
580
+ try {
581
+ const client = getFluidGridsClient();
582
+ return throwIfResultError(await client.mutate({
583
+ mutation: TerminateExecutionDocument,
584
+ variables: {
585
+ runId,
586
+ reason
587
+ }
588
+ })).data?.terminateWorkflow ?? null;
589
+ } catch (err) {
590
+ setError(err);
591
+ return null;
592
+ } finally {
593
+ setLoading(false);
594
+ }
595
+ }, []),
596
+ loading,
597
+ error
598
+ };
599
+ }
600
+ /** How long typing settles before the Runs search hits the server. */
601
+ const EXECUTIONS_SEARCH_DEBOUNCE_MS = 350;
602
+ /**
603
+ * The Runs list's request built from the store's filter and page, with the
604
+ * search box debounced. The Runs page reads it through its page operation
605
+ * (`useRunsPage`, BOFF-16690); `useExecutionsWithStore` reads it alone.
606
+ */
607
+ function useExecutionsStoreInput({ durableParity = false, searchAttributes = null } = {}) {
608
+ const { filter, pagination } = useExecutionsStore();
609
+ const [debouncedSearch, setDebouncedSearch] = useState(filter.search);
610
+ useEffect(() => {
611
+ const timer = setTimeout(() => setDebouncedSearch(filter.search), 350);
612
+ return () => clearTimeout(timer);
613
+ }, [filter.search]);
614
+ return {
615
+ input: useMemo(() => {
616
+ const baseInput = {
617
+ limit: pagination.pageSize,
618
+ offset: (pagination.page - 1) * pagination.pageSize
619
+ };
620
+ if (filter.status !== "all") baseInput.status = filter.status;
621
+ if (filter.workflowKey) baseInput.workflowKey = filter.workflowKey;
622
+ Object.assign(baseInput, dateRangeToInput(filter.dateRange.start, filter.dateRange.end));
623
+ const term = debouncedSearch.trim();
624
+ if (term) baseInput.search = term;
625
+ if (filter.triggerType !== "all") baseInput.triggerType = filter.triggerType;
626
+ if (filter.durationMinSeconds !== null) baseInput.durationMinSeconds = filter.durationMinSeconds;
627
+ if (filter.durationMaxSeconds !== null) baseInput.durationMaxSeconds = filter.durationMaxSeconds;
628
+ if (filter.errorType !== "all") baseInput.errorType = filter.errorType;
629
+ if (filter.nodeId.trim()) baseInput.nodeId = filter.nodeId.trim();
630
+ if (filter.failedNodeType.trim()) baseInput.failedNodeType = filter.failedNodeType.trim();
631
+ if (filter.tagId) baseInput.tagIds = [filter.tagId];
632
+ return withSearchAttributeFilter(withWorkflowIdFilter(baseInput, filter.workflowId, durableParity), searchAttributes, searchAttributes !== null);
633
+ }, [
634
+ filter,
635
+ debouncedSearch,
636
+ pagination.page,
637
+ pagination.pageSize,
638
+ durableParity,
639
+ searchAttributes
640
+ ]),
641
+ searchPending: debouncedSearch !== filter.search
642
+ };
643
+ }
644
+ /** Whether the page is in a tab the person cannot see now. */
645
+ function documentHidden() {
646
+ return typeof document !== "undefined" && document.visibilityState === "hidden";
647
+ }
648
+ /**
649
+ * Call `refetchFn` every `interval` ms while `enabled`, and not while the tab
650
+ * is hidden (BOFF-16690): a background tab sends nothing. When the tab shows
651
+ * again after at least one interval, it refreshes once at once, so what the
652
+ * person comes back to is current; the next tick then waits its turn.
653
+ */
654
+ function useAutoRefresh(refetchFn, enabled = true, interval = 5e3) {
655
+ useEffect(() => {
656
+ if (!enabled) return;
657
+ let last = Date.now();
658
+ const tick = () => {
659
+ last = Date.now();
660
+ refetchFn();
661
+ };
662
+ const timer = setInterval(() => {
663
+ if (documentHidden() || Date.now() - last < interval / 2) return;
664
+ tick();
665
+ }, interval);
666
+ const onVisibilityChange = () => {
667
+ if (!documentHidden() && Date.now() - last >= interval) tick();
668
+ };
669
+ if (typeof document !== "undefined") document.addEventListener("visibilitychange", onVisibilityChange);
670
+ return () => {
671
+ clearInterval(timer);
672
+ if (typeof document !== "undefined") document.removeEventListener("visibilitychange", onVisibilityChange);
673
+ };
674
+ }, [
675
+ enabled,
676
+ interval,
677
+ refetchFn
678
+ ]);
679
+ }
680
+
681
+ export { useExecutionsStoreInput as a, OPERATORS_BY_TYPE as c, fromLocalInputValue as d, toLocalInputValue as f, useExecutions as i, buildSearchAttributeFilter as l, useExecution as n, buildRetryTriggerInput as o, validateDateRange as p, useExecutionActions as r, EMPTY_SEARCH_FILTER as s, useAutoRefresh as t, searchFilterConflicts as u };