@loopstack/loopstack-studio 0.23.1 → 0.25.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/api/config.js +3 -3
- package/dist/api/index.js +10 -12
- package/dist/api/processor.js +1 -1
- package/dist/api/secrets.js +16 -0
- package/dist/api/workflows.js +7 -1
- package/dist/components/dynamic-form/ArrayController.js +68 -64
- package/dist/components/dynamic-form/CodeContent.js +3 -3
- package/dist/components/dynamic-form/Form.js +46 -40
- package/dist/components/dynamic-form/FormElement.js +1 -1
- package/dist/components/dynamic-form/FormElementHeader.js +2 -2
- package/dist/components/dynamic-form/ObjectController.js +24 -21
- package/dist/components/dynamic-form/fields/BaseFieldWrapper.js +1 -1
- package/dist/components/dynamic-form/fields/CodeViewField.js +36 -36
- package/dist/components/dynamic-form/fields/InputField.js +20 -19
- package/dist/components/dynamic-form/fields/RadioField.js +18 -18
- package/dist/components/dynamic-form/fields/SelectField.js +19 -19
- package/dist/components/dynamic-form/fields/TextareaField.js +17 -17
- package/dist/components/feedback/LoadingCentered.js +1 -1
- package/dist/components/layout/MainLayout.js +18 -31
- package/dist/components/layout/StudioSidebar.js +169 -109
- package/dist/components/loopstack-elements/link.js +77 -76
- package/dist/components/loopstack-elements/tool.js +171 -0
- package/dist/components/page/PageBreadcrumbs.js +79 -32
- package/dist/components/ui-widgets/UiActions.js +10 -4
- package/dist/components/ui-widgets/widgets/ButtonFullWidth.js +8 -6
- package/dist/components/ui-widgets/widgets/SubmitButton.js +8 -6
- package/dist/features/code-explorer/components/FileContentViewer.js +92 -100
- package/dist/features/dashboard/RunItem.js +1 -1
- package/dist/features/debug/components/ConfigFlowViewer.js +2 -2
- package/dist/features/debug/components/{PipelineDebugHeader.js → WorkflowDebugHeader.js} +5 -5
- package/dist/features/debug/components/{PipelineDebugLegend.js → WorkflowDebugLegend.js} +2 -2
- package/dist/features/debug/components/{PipelineFlowViewer.js → WorkflowFlowViewer.js} +9 -9
- package/dist/features/debug/components/workflow-flow/WorkflowGraph.js +46 -0
- package/dist/features/debug/index.js +2 -2
- package/dist/features/debug/lib/flow-utils.js +142 -150
- package/dist/features/documents/DocumentRenderer.js +66 -30
- package/dist/features/documents/components/DocumentItem.js +2 -2
- package/dist/features/documents/components/DocumentList.js +18 -11
- package/dist/features/documents/document-details/DocumentDetails.js +4 -4
- package/dist/features/documents/renderers/AiMessage.js +12 -12
- package/dist/features/documents/renderers/ChoicesRenderer.js +92 -0
- package/dist/features/documents/renderers/ClaudeMessage.js +1 -1
- package/dist/features/documents/renderers/ConfirmPromptRenderer.js +56 -0
- package/dist/features/documents/renderers/DocumentFormRenderer.js +95 -65
- package/dist/features/documents/renderers/LinkMessageRenderer.js +8 -10
- package/dist/features/documents/renderers/SecretInputRenderer.js +87 -0
- package/dist/features/documents/renderers/TextPromptRenderer.js +57 -0
- package/dist/features/documents/renderers/useDocumentTransition.js +30 -0
- package/dist/features/oauth/OAuthPromptRenderer.js +20 -20
- package/dist/features/runs/Runs.js +8 -8
- package/dist/features/workbench/Workbench.js +35 -35
- package/dist/features/workbench/WorkflowItem.js +10 -9
- package/dist/features/workbench/WorkflowList.js +56 -73
- package/dist/features/workbench/components/NewRunDialog.js +18 -18
- package/dist/features/workbench/components/WorkbenchFilesPanel.js +33 -26
- package/dist/features/workbench/components/WorkbenchFloatingPanel.js +13 -44
- package/dist/features/workbench/components/WorkbenchFlowPanel.js +27 -29
- package/dist/features/workbench/components/WorkbenchIconSidebar.js +17 -17
- package/dist/features/workbench/components/WorkbenchPreviewPanel.js +2 -2
- package/dist/features/workbench/components/WorkbenchSecretsPanel.js +182 -0
- package/dist/features/workbench/components/WorkbenchSettingsModal.js +16 -41
- package/dist/features/workbench/components/WorkflowForms.js +14 -13
- package/dist/features/workbench/components/WorkflowHistoryItem.js +60 -81
- package/dist/features/workbench/components/{PipelineHistoryList.js → WorkflowHistoryList.js} +5 -5
- package/dist/features/workbench/components/buttons/WorkflowButtons.js +56 -54
- package/dist/features/workbench/hooks/useWorkflowData.js +10 -10
- package/dist/features/workbench/hooks/useWorkflowListState.js +8 -45
- package/dist/features/workbench/index.js +2 -3
- package/dist/features/workbench/providers/RemoteFileExplorerProvider.js +132 -117
- package/dist/features/workbench/providers/ScrollProvider.js +2 -2
- package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +4 -4
- package/dist/features/workspaces/Workspaces.js +1 -1
- package/dist/features/workspaces/components/CreateWorkspace.js +12 -12
- package/dist/features/workspaces/components/ExecutionTimeline.js +22 -21
- package/dist/features/workspaces/components/{NewPipelineRunDialog.js → NewWorkflowRunDialog.js} +6 -6
- package/dist/features/workspaces/components/{PipelineForm.js → WorkflowRunForm.js} +31 -31
- package/dist/features/workspaces/components/WorkspaceHomePage.js +11 -11
- package/dist/features/workspaces/components/{pipeline-form → workflow-form}/ArgumentsView.js +1 -1
- package/dist/features/workspaces/components/{pipeline-form → workflow-form}/SelectionView.js +16 -16
- package/dist/hooks/index.js +3 -3
- package/dist/hooks/query-keys.js +34 -68
- package/dist/hooks/useConfig.js +5 -5
- package/dist/hooks/useProcessor.js +5 -5
- package/dist/hooks/useSecrets.js +69 -0
- package/dist/hooks/useWorkflows.js +155 -68
- package/dist/index.d.ts +158 -116
- package/dist/index.js +5 -5
- package/dist/packages/contracts/dist/enums/index.js +11 -12
- package/dist/packages/contracts/dist/enums/workflow-state.enum.js +1 -1
- package/dist/pages/DashboardPage.js +87 -35
- package/dist/pages/DebugWorkflowDetailsPage.js +8 -8
- package/dist/pages/DebugWorkflowsPage.js +10 -10
- package/dist/pages/EmbedWorkbenchPage.js +39 -45
- package/dist/pages/PreviewWorkbenchPage.js +130 -255
- package/dist/pages/RunsListPage.js +1 -1
- package/dist/pages/StudioLandingPage.js +13 -13
- package/dist/pages/WorkbenchPage.js +6 -6
- package/dist/pages/WorkflowDebugPage.js +114 -0
- package/dist/pages/WorkspacePage.js +4 -2
- package/dist/providers/InvalidationEventsProvider.js +19 -19
- package/dist/providers/SseProvider.js +0 -1
- package/dist/routing/LocalRouter.js +14 -17
- package/dist/types/ai.types.js +13 -0
- package/package.json +2 -3
- package/dist/api/namespaces.js +0 -7
- package/dist/api/pipelines.js +0 -13
- package/dist/components/ai-elements/tool.js +0 -158
- package/dist/features/debug/components/pipeline-flow/WorkflowGraph.js +0 -41
- package/dist/features/workbench/NavigationItems.js +0 -52
- package/dist/features/workbench/WorkbenchNavigation.js +0 -38
- package/dist/features/workbench/components/NavigationItem.js +0 -68
- package/dist/features/workbench/hooks/useIntersectionObserver.js +0 -44
- package/dist/hooks/useNamespaceTree.js +0 -27
- package/dist/hooks/useNamespaces.js +0 -25
- package/dist/hooks/usePipelines.js +0 -161
- package/dist/node_modules/@ai-sdk/provider/dist/index.js +0 -65
- package/dist/node_modules/@ai-sdk/provider-utils/dist/index.js +0 -1008
- package/dist/node_modules/ai/dist/index.js +0 -1083
- package/dist/node_modules/zod/v3/ZodError.js +0 -79
- package/dist/node_modules/zod/v3/errors.js +0 -6
- package/dist/node_modules/zod/v3/helpers/errorUtil.js +0 -5
- package/dist/node_modules/zod/v3/helpers/parseUtil.js +0 -90
- package/dist/node_modules/zod/v3/helpers/util.js +0 -72
- package/dist/node_modules/zod/v3/locales/en.js +0 -58
- package/dist/node_modules/zod/v3/types.js +0 -2425
- package/dist/node_modules/zod/v4/classic/errors.js +0 -21
- package/dist/node_modules/zod/v4/classic/iso.js +0 -29
- package/dist/node_modules/zod/v4/classic/parse.js +0 -4
- package/dist/node_modules/zod/v4/classic/schemas.js +0 -392
- package/dist/node_modules/zod/v4/core/api.js +0 -532
- package/dist/node_modules/zod/v4/core/checks.js +0 -283
- package/dist/node_modules/zod/v4/core/core.js +0 -44
- package/dist/node_modules/zod/v4/core/doc.js +0 -21
- package/dist/node_modules/zod/v4/core/errors.js +0 -40
- package/dist/node_modules/zod/v4/core/json-schema-processors.js +0 -305
- package/dist/node_modules/zod/v4/core/parse.js +0 -66
- package/dist/node_modules/zod/v4/core/regexes.js +0 -28
- package/dist/node_modules/zod/v4/core/registries.js +0 -38
- package/dist/node_modules/zod/v4/core/schemas.js +0 -863
- package/dist/node_modules/zod/v4/core/to-json-schema.js +0 -220
- package/dist/node_modules/zod/v4/core/util.js +0 -267
- package/dist/node_modules/zod/v4/core/versions.js +0 -6
- package/dist/packages/contracts/dist/enums/pipeline-state.js +0 -10
- package/dist/pages/PipelineDebugPage.js +0 -115
- /package/dist/features/debug/components/{pipeline-flow → workflow-flow}/StateNode.js +0 -0
- /package/dist/features/debug/components/{pipeline-flow → workflow-flow}/WorkflowTransitionEdge.js +0 -0
- /package/dist/features/workspaces/components/{pipeline-form → workflow-form}/HeaderSection.js +0 -0
|
@@ -2,7 +2,9 @@ import CompletionMessagePaper_default from "../../components/messages/Completion
|
|
|
2
2
|
import OAuthPromptRenderer_default from "../oauth/OAuthPromptRenderer.js";
|
|
3
3
|
import "../oauth/index.js";
|
|
4
4
|
import AiMessage_default from "./renderers/AiMessage.js";
|
|
5
|
+
import ChoicesRenderer_default from "./renderers/ChoicesRenderer.js";
|
|
5
6
|
import ClaudeMessage_default from "./renderers/ClaudeMessage.js";
|
|
7
|
+
import ConfirmPromptRenderer_default from "./renderers/ConfirmPromptRenderer.js";
|
|
6
8
|
import DocumentDebugRenderer_default from "./renderers/DocumentDebugRenderer.js";
|
|
7
9
|
import DocumentFormRenderer_default from "./renderers/DocumentFormRenderer.js";
|
|
8
10
|
import DocumentMessageRenderer_default from "./renderers/DocumentMessageRenderer.js";
|
|
@@ -10,49 +12,83 @@ import ErrorMessageRenderer_default from "./renderers/ErrorMessageRenderer.js";
|
|
|
10
12
|
import LinkMessageRenderer_default from "./renderers/LinkMessageRenderer.js";
|
|
11
13
|
import MarkdownMessageRenderer_default from "./renderers/MarkdownMessageRenderer.js";
|
|
12
14
|
import PlainMessageRenderer_default from "./renderers/PlainMessageRenderer.js";
|
|
15
|
+
import SecretInputRenderer_default from "./renderers/SecretInputRenderer.js";
|
|
16
|
+
import TextPromptRenderer_default from "./renderers/TextPromptRenderer.js";
|
|
13
17
|
import { c } from "react/compiler-runtime";
|
|
14
18
|
import React from "react";
|
|
15
19
|
import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
|
|
16
20
|
var rendererRegistry = new Map([
|
|
17
|
-
["ai-message", ({ document:
|
|
18
|
-
document:
|
|
19
|
-
isLastItem:
|
|
21
|
+
["ai-message", ({ document: t, isLastItem: v }) => /* @__PURE__ */ jsx(AiMessage_default, {
|
|
22
|
+
document: t,
|
|
23
|
+
isLastItem: v
|
|
20
24
|
})],
|
|
21
|
-
["claude-message", ({ document:
|
|
22
|
-
document:
|
|
23
|
-
isLastItem:
|
|
25
|
+
["claude-message", ({ document: t, isLastItem: v }) => /* @__PURE__ */ jsx(ClaudeMessage_default, {
|
|
26
|
+
document: t,
|
|
27
|
+
isLastItem: v
|
|
24
28
|
})],
|
|
25
|
-
["debug", ({ document:
|
|
29
|
+
["debug", ({ document: t }) => /* @__PURE__ */ jsx("div", {
|
|
26
30
|
className: "mb-4 flex",
|
|
27
|
-
children: /* @__PURE__ */ jsx(DocumentDebugRenderer_default, { document:
|
|
31
|
+
children: /* @__PURE__ */ jsx(DocumentDebugRenderer_default, { document: t })
|
|
28
32
|
})],
|
|
29
|
-
["
|
|
33
|
+
["form", ({ parentWorkflow: v, workflow: y, document: b, isActive: x }) => /* @__PURE__ */ jsx(CompletionMessagePaper_default, {
|
|
30
34
|
role: "document",
|
|
31
35
|
fullWidth: !0,
|
|
32
|
-
timestamp: new Date(
|
|
36
|
+
timestamp: new Date(b.createdAt),
|
|
33
37
|
children: /* @__PURE__ */ jsx(DocumentFormRenderer_default, {
|
|
34
|
-
|
|
35
|
-
workflow:
|
|
36
|
-
document:
|
|
37
|
-
enabled:
|
|
38
|
-
viewOnly: !
|
|
38
|
+
parentWorkflow: v,
|
|
39
|
+
workflow: y,
|
|
40
|
+
document: b,
|
|
41
|
+
enabled: x,
|
|
42
|
+
viewOnly: !x
|
|
39
43
|
})
|
|
40
44
|
})],
|
|
41
|
-
["message", ({ document:
|
|
42
|
-
["error", ({ document:
|
|
43
|
-
["plain", ({ document:
|
|
44
|
-
["markdown", ({ document:
|
|
45
|
-
["link", ({ document:
|
|
46
|
-
["oauth-prompt", ({
|
|
47
|
-
|
|
48
|
-
workflow:
|
|
49
|
-
document:
|
|
50
|
-
isActive:
|
|
45
|
+
["message", ({ document: t }) => /* @__PURE__ */ jsx(DocumentMessageRenderer_default, { document: t })],
|
|
46
|
+
["error", ({ document: t }) => /* @__PURE__ */ jsx(ErrorMessageRenderer_default, { document: t })],
|
|
47
|
+
["plain", ({ document: t }) => /* @__PURE__ */ jsx(PlainMessageRenderer_default, { document: t })],
|
|
48
|
+
["markdown", ({ document: t }) => /* @__PURE__ */ jsx(MarkdownMessageRenderer_default, { document: t })],
|
|
49
|
+
["link", ({ document: t }) => /* @__PURE__ */ jsx(LinkMessageRenderer_default, { document: t })],
|
|
50
|
+
["oauth-prompt", ({ parentWorkflow: t, workflow: y, document: b, isActive: x }) => /* @__PURE__ */ jsx(OAuthPromptRenderer_default, {
|
|
51
|
+
parentWorkflow: t,
|
|
52
|
+
workflow: y,
|
|
53
|
+
document: b,
|
|
54
|
+
isActive: x
|
|
55
|
+
})],
|
|
56
|
+
["text-prompt", ({ parentWorkflow: t, workflow: v, document: y, isActive: b }) => /* @__PURE__ */ jsx(TextPromptRenderer_default, {
|
|
57
|
+
parentWorkflow: t,
|
|
58
|
+
workflow: v,
|
|
59
|
+
document: y,
|
|
60
|
+
isActive: b
|
|
61
|
+
})],
|
|
62
|
+
["choices", ({ parentWorkflow: t, workflow: v, document: y, isActive: x }) => /* @__PURE__ */ jsx(ChoicesRenderer_default, {
|
|
63
|
+
parentWorkflow: t,
|
|
64
|
+
workflow: v,
|
|
65
|
+
document: y,
|
|
66
|
+
isActive: x
|
|
67
|
+
})],
|
|
68
|
+
["confirm-prompt", ({ parentWorkflow: t, workflow: v, document: y, isActive: b }) => /* @__PURE__ */ jsx(ConfirmPromptRenderer_default, {
|
|
69
|
+
parentWorkflow: t,
|
|
70
|
+
workflow: v,
|
|
71
|
+
document: y,
|
|
72
|
+
isActive: b
|
|
73
|
+
})],
|
|
74
|
+
["secret-input", ({ parentWorkflow: t, workflow: v, document: y, isActive: b }) => /* @__PURE__ */ jsx(SecretInputRenderer_default, {
|
|
75
|
+
parentWorkflow: t,
|
|
76
|
+
workflow: v,
|
|
77
|
+
document: y,
|
|
78
|
+
isActive: b
|
|
51
79
|
})]
|
|
52
|
-
])
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
80
|
+
]);
|
|
81
|
+
function resolveDocumentWidget(t) {
|
|
82
|
+
let v = t;
|
|
83
|
+
return v?.widgets?.[0]?.widget ? v.widgets[0].widget : v?.form?.widget ? v.form.widget : "form";
|
|
84
|
+
}
|
|
85
|
+
var DocumentRenderer_default = (t) => {
|
|
86
|
+
let v = c(5), y = t.document, b;
|
|
87
|
+
if (v[0] !== y.ui) {
|
|
88
|
+
let t = resolveDocumentWidget(y.ui);
|
|
89
|
+
b = rendererRegistry.get(t), v[0] = y.ui, v[1] = b;
|
|
90
|
+
} else b = v[1];
|
|
91
|
+
let x = b, S;
|
|
92
|
+
return v[2] !== x || v[3] !== t ? (S = /* @__PURE__ */ jsx("div", { children: x ? /* @__PURE__ */ jsx(x, { ...t }) : /* @__PURE__ */ jsx(Fragment$1, { children: "unknown document type" }) }), v[2] = x, v[3] = t, v[4] = S) : S = v[4], S;
|
|
57
93
|
};
|
|
58
94
|
export { DocumentRenderer_default as default };
|
|
@@ -5,11 +5,11 @@ import React from "react";
|
|
|
5
5
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { omit } from "lodash";
|
|
7
7
|
var DocumentItem_default = (s) => {
|
|
8
|
-
let l = c(13), { document: u, workflow: d,
|
|
8
|
+
let l = c(13), { document: u, workflow: d, parentWorkflow: f, isActive: p, isLastItem: m, settings: h } = s, g = u.meta, _;
|
|
9
9
|
l[0] !== u || l[1] !== p || l[2] !== m || l[3] !== f || l[4] !== d ? (_ = /* @__PURE__ */ jsx(DocumentRenderer_default, {
|
|
10
10
|
document: u,
|
|
11
11
|
workflow: d,
|
|
12
|
-
|
|
12
|
+
parentWorkflow: f,
|
|
13
13
|
isActive: p,
|
|
14
14
|
isLastItem: m
|
|
15
15
|
}), l[0] = u, l[1] = p, l[2] = m, l[3] = f, l[4] = d, l[5] = _) : _ = l[5];
|
|
@@ -5,35 +5,42 @@ import React, { useEffect } from "react";
|
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import { useParams } from "react-router-dom";
|
|
7
7
|
var import_enums = require_enums(), DocumentList_default = (e) => {
|
|
8
|
-
let o = c(23), {
|
|
9
|
-
o[0] !==
|
|
8
|
+
let o = c(23), { workflow: l, childWorkflow: u, documents: d, scrollTo: f, settings: p } = e, { workflowId: m, clickId: h } = useParams(), g;
|
|
9
|
+
o[0] !== u.id || o[1] !== m || o[2] !== f ? (g = () => {
|
|
10
10
|
m === u.id && f(u.id);
|
|
11
|
-
}, o[0] =
|
|
11
|
+
}, o[0] = u.id, o[1] = m, o[2] = f, o[3] = g) : g = o[3];
|
|
12
12
|
let _;
|
|
13
|
-
o[4] !==
|
|
13
|
+
o[4] !== u.id || o[5] !== h || o[6] !== m || o[7] !== f ? (_ = [
|
|
14
14
|
u.id,
|
|
15
15
|
m,
|
|
16
16
|
h,
|
|
17
17
|
f
|
|
18
|
-
], o[4] =
|
|
18
|
+
], o[4] = u.id, o[5] = h, o[6] = m, o[7] = f, o[8] = _) : _ = o[8], useEffect(g, _);
|
|
19
19
|
let v = u.status === import_enums.WorkflowState.Waiting, y;
|
|
20
|
-
if (o[9] !==
|
|
20
|
+
if (o[9] !== u || o[10] !== d || o[11] !== v || o[12] !== p || o[13] !== l) {
|
|
21
21
|
let e;
|
|
22
|
-
o[15] !==
|
|
22
|
+
o[15] !== u || o[16] !== d.length || o[17] !== v || o[18] !== p || o[19] !== l ? (e = (e, a) => {
|
|
23
23
|
let o = e, s = e.place === u.place || !!o.meta?.enableAtPlaces?.includes(u.place);
|
|
24
|
-
return
|
|
24
|
+
return console.log({
|
|
25
|
+
isDocumentActive: s,
|
|
26
|
+
isWorkflowActive: v,
|
|
27
|
+
status: u.status,
|
|
28
|
+
place: u.place,
|
|
29
|
+
documentPlace: e.place,
|
|
30
|
+
availableTransitions: u.availableTransitions
|
|
31
|
+
}), /* @__PURE__ */ jsx(DocumentItem_default, {
|
|
25
32
|
document: e,
|
|
26
33
|
workflow: u,
|
|
27
|
-
|
|
34
|
+
parentWorkflow: l,
|
|
28
35
|
isActive: v && s,
|
|
29
36
|
isLastItem: a === d.length - 1,
|
|
30
37
|
settings: p
|
|
31
38
|
}, e.id);
|
|
32
|
-
}, o[15] =
|
|
39
|
+
}, o[15] = u, o[16] = d.length, o[17] = v, o[18] = p, o[19] = l, o[20] = e) : e = o[20], y = d.map(e), o[9] = u, o[10] = d, o[11] = v, o[12] = p, o[13] = l, o[14] = y;
|
|
33
40
|
} else y = o[14];
|
|
34
41
|
let b;
|
|
35
42
|
return o[21] === y ? b = o[22] : (b = /* @__PURE__ */ jsx("div", {
|
|
36
|
-
className: "flex flex-col gap-
|
|
43
|
+
className: "flex flex-col gap-3",
|
|
37
44
|
children: y
|
|
38
45
|
}), o[21] = y, o[22] = b), b;
|
|
39
46
|
};
|
|
@@ -178,17 +178,17 @@ var formatDate = (e) => {
|
|
|
178
178
|
let M;
|
|
179
179
|
n[44] === Symbol.for("react.memo_cache_sentinel") ? (M = /* @__PURE__ */ jsx("span", {
|
|
180
180
|
className: "font-medium",
|
|
181
|
-
children: "
|
|
181
|
+
children: "Workflow ID:"
|
|
182
182
|
}), n[44] = M) : M = n[44];
|
|
183
183
|
let N;
|
|
184
|
-
n[45] === r.
|
|
184
|
+
n[45] === r.workflowId ? N = n[46] : (N = /* @__PURE__ */ jsxs("div", {
|
|
185
185
|
className: "text-sm",
|
|
186
186
|
children: [
|
|
187
187
|
M,
|
|
188
188
|
" ",
|
|
189
|
-
r.
|
|
189
|
+
r.workflowId
|
|
190
190
|
]
|
|
191
|
-
}), n[45] = r.
|
|
191
|
+
}), n[45] = r.workflowId, n[46] = N);
|
|
192
192
|
let P;
|
|
193
193
|
n[47] === Symbol.for("react.memo_cache_sentinel") ? (P = /* @__PURE__ */ jsx("span", {
|
|
194
194
|
className: "font-medium",
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { getToolOrDynamicToolName, isReasoningUIPart, isTextUIPart, isToolOrDynamicToolUIPart } from "../../../node_modules/ai/dist/index.js";
|
|
2
1
|
import { Message, MessageAction, MessageActions, MessageContent, MessageResponse } from "../../../components/ai-elements/message.js";
|
|
3
2
|
import { Reasoning, ReasoningContent, ReasoningTrigger } from "../../../components/ai-elements/reasoning.js";
|
|
4
3
|
import { Source, Sources, SourcesContent, SourcesTrigger } from "../../../components/ai-elements/sources.js";
|
|
5
|
-
import { Tool, ToolContent, ToolHeader, ToolInput, ToolOutput } from "../../../components/
|
|
4
|
+
import { Tool, ToolContent, ToolHeader, ToolInput, ToolOutput } from "../../../components/loopstack-elements/tool.js";
|
|
5
|
+
import { getToolOrDynamicToolName, isReasoningUIPart, isTextUIPart, isToolOrDynamicToolUIPart } from "../../../types/ai.types.js";
|
|
6
6
|
import { c } from "react/compiler-runtime";
|
|
7
7
|
import { Fragment } from "react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { CopyIcon } from "lucide-react";
|
|
10
10
|
var AiMessage_default = (O) => {
|
|
11
|
-
let k = c(13), { document: A } = O, j = A.content, M, N;
|
|
11
|
+
let k = c(13), { document: A } = O, j = A.content, M = _temp, N, P;
|
|
12
12
|
if (k[0] !== j.id || k[1] !== j.parts || k[2] !== j.role) {
|
|
13
|
-
let n = j.parts?.filter(
|
|
14
|
-
|
|
13
|
+
let n = j.parts?.filter(M) ?? [];
|
|
14
|
+
N = Fragment, P = j.role === "assistant" && n.length > 0 && /* @__PURE__ */ jsxs(Sources, { children: [/* @__PURE__ */ jsx(SourcesTrigger, { count: n.length }), n.map((n, T) => /* @__PURE__ */ jsx(SourcesContent, { children: /* @__PURE__ */ jsx(Source, {
|
|
15
15
|
href: n.url,
|
|
16
16
|
title: n.url
|
|
17
|
-
}) }, `${j.id}-source-${T}`))] }), k[0] = j.id, k[1] = j.parts, k[2] = j.role, k[3] =
|
|
18
|
-
} else
|
|
19
|
-
let
|
|
20
|
-
k[5] !== j.id || k[6] !== j.parts || k[7] !== j.role ? (
|
|
17
|
+
}) }, `${j.id}-source-${T}`))] }), k[0] = j.id, k[1] = j.parts, k[2] = j.role, k[3] = N, k[4] = P;
|
|
18
|
+
} else N = k[3], P = k[4];
|
|
19
|
+
let F;
|
|
20
|
+
k[5] !== j.id || k[6] !== j.parts || k[7] !== j.role ? (F = j.parts?.map((E, D) => {
|
|
21
21
|
if (isTextUIPart(E)) return /* @__PURE__ */ jsxs(Message, {
|
|
22
22
|
from: j.role,
|
|
23
23
|
children: [/* @__PURE__ */ jsx(MessageContent, { children: /* @__PURE__ */ jsx(MessageResponse, { children: E.text }) }), j.role === "assistant" && /* @__PURE__ */ jsx(MessageActions, { children: /* @__PURE__ */ jsx(MessageAction, {
|
|
@@ -46,9 +46,9 @@ var AiMessage_default = (O) => {
|
|
|
46
46
|
}, `${j.id}-${D}`);
|
|
47
47
|
}
|
|
48
48
|
return null;
|
|
49
|
-
}), k[5] = j.id, k[6] = j.parts, k[7] = j.role, k[8] =
|
|
50
|
-
let
|
|
51
|
-
return k[9] !==
|
|
49
|
+
}), k[5] = j.id, k[6] = j.parts, k[7] = j.role, k[8] = F) : F = k[8];
|
|
50
|
+
let I;
|
|
51
|
+
return k[9] !== N || k[10] !== P || k[11] !== F ? (I = /* @__PURE__ */ jsxs(N, { children: [P, F] }), k[9] = N, k[10] = P, k[11] = F, k[12] = I) : I = k[12], I;
|
|
52
52
|
};
|
|
53
53
|
function _temp(n) {
|
|
54
54
|
return n.type === "source-url";
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { Button } from "../../../components/ui/button.js";
|
|
2
|
+
import { Label } from "../../../components/ui/label.js";
|
|
3
|
+
import { RadioGroup, RadioGroupItem } from "../../../components/ui/radio-group.js";
|
|
4
|
+
import { Textarea } from "../../../components/ui/textarea.js";
|
|
5
|
+
import CompletionMessagePaper_default from "../../../components/messages/CompletionMessagePaper.js";
|
|
6
|
+
import MarkdownContent_default from "../../../components/dynamic-form/MarkdownContent.js";
|
|
7
|
+
import { useDocumentTransition } from "./useDocumentTransition.js";
|
|
8
|
+
import { c } from "react/compiler-runtime";
|
|
9
|
+
import React, { useState } from "react";
|
|
10
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { Loader2 } from "lucide-react";
|
|
12
|
+
var ChoicesRenderer_default = (g) => {
|
|
13
|
+
let _ = c(26), { parentWorkflow: v, workflow: y, document: b, isActive: x } = g, S = b.content, { submit: C, canSubmit: w, isLoading: T } = useDocumentTransition(v, y, b.ui), [E, D] = useState(S.answer ?? ""), [O, k] = useState(""), A = E === "__custom__", j = !!S.answer, M;
|
|
14
|
+
_[0] !== O || _[1] !== A || _[2] !== E || _[3] !== C ? (M = () => {
|
|
15
|
+
let t = A ? O.trim() : E;
|
|
16
|
+
t && C({ answer: t });
|
|
17
|
+
}, _[0] = O, _[1] = A, _[2] = E, _[3] = C, _[4] = M) : M = _[4];
|
|
18
|
+
let N = M, P = !x || !w || j, F;
|
|
19
|
+
_[5] === b.createdAt ? F = _[6] : (F = new Date(b.createdAt), _[5] = b.createdAt, _[6] = F);
|
|
20
|
+
let I;
|
|
21
|
+
_[7] === S.question ? I = _[8] : (I = /* @__PURE__ */ jsx(MarkdownContent_default, { content: S.question }), _[7] = S.question, _[8] = I);
|
|
22
|
+
let L;
|
|
23
|
+
_[9] !== S.allowCustomAnswer || _[10] !== S.answer || _[11] !== S.options || _[12] !== O || _[13] !== P || _[14] !== N || _[15] !== j || _[16] !== A || _[17] !== T || _[18] !== E ? (L = j ? /* @__PURE__ */ jsxs("div", {
|
|
24
|
+
className: "text-muted-foreground text-sm",
|
|
25
|
+
children: ["Answered: ", /* @__PURE__ */ jsx("span", {
|
|
26
|
+
className: "text-foreground font-medium",
|
|
27
|
+
children: S.answer
|
|
28
|
+
})]
|
|
29
|
+
}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
30
|
+
/* @__PURE__ */ jsxs(RadioGroup, {
|
|
31
|
+
value: E,
|
|
32
|
+
onValueChange: D,
|
|
33
|
+
disabled: P,
|
|
34
|
+
children: [S.options.map(_temp), S.allowCustomAnswer && /* @__PURE__ */ jsxs("div", {
|
|
35
|
+
className: "flex items-center gap-3",
|
|
36
|
+
children: [/* @__PURE__ */ jsx(RadioGroupItem, {
|
|
37
|
+
value: "__custom__",
|
|
38
|
+
id: "option-custom"
|
|
39
|
+
}), /* @__PURE__ */ jsx(Label, {
|
|
40
|
+
htmlFor: "option-custom",
|
|
41
|
+
className: "cursor-pointer text-sm font-normal",
|
|
42
|
+
children: "Other"
|
|
43
|
+
})]
|
|
44
|
+
})]
|
|
45
|
+
}),
|
|
46
|
+
A && /* @__PURE__ */ jsx(Textarea, {
|
|
47
|
+
placeholder: "Type your answer...",
|
|
48
|
+
value: O,
|
|
49
|
+
onChange: (t) => k(t.target.value),
|
|
50
|
+
disabled: P,
|
|
51
|
+
className: "min-h-10",
|
|
52
|
+
rows: 2
|
|
53
|
+
}),
|
|
54
|
+
/* @__PURE__ */ jsx("div", {
|
|
55
|
+
className: "flex justify-end",
|
|
56
|
+
children: /* @__PURE__ */ jsxs(Button, {
|
|
57
|
+
type: "button",
|
|
58
|
+
variant: "default",
|
|
59
|
+
disabled: P || T || !E || A && !O.trim(),
|
|
60
|
+
onClick: N,
|
|
61
|
+
className: "w-48",
|
|
62
|
+
children: [T && /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }), "Submit"]
|
|
63
|
+
})
|
|
64
|
+
})
|
|
65
|
+
] }), _[9] = S.allowCustomAnswer, _[10] = S.answer, _[11] = S.options, _[12] = O, _[13] = P, _[14] = N, _[15] = j, _[16] = A, _[17] = T, _[18] = E, _[19] = L) : L = _[19];
|
|
66
|
+
let R;
|
|
67
|
+
_[20] !== I || _[21] !== L ? (R = /* @__PURE__ */ jsxs("div", {
|
|
68
|
+
className: "flex flex-col gap-4 p-1",
|
|
69
|
+
children: [I, L]
|
|
70
|
+
}), _[20] = I, _[21] = L, _[22] = R) : R = _[22];
|
|
71
|
+
let z;
|
|
72
|
+
return _[23] !== F || _[24] !== R ? (z = /* @__PURE__ */ jsx(CompletionMessagePaper_default, {
|
|
73
|
+
role: "document",
|
|
74
|
+
fullWidth: !0,
|
|
75
|
+
timestamp: F,
|
|
76
|
+
children: R
|
|
77
|
+
}), _[23] = F, _[24] = R, _[25] = z) : z = _[25], z;
|
|
78
|
+
};
|
|
79
|
+
function _temp(t, h) {
|
|
80
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
81
|
+
className: "flex items-center gap-3",
|
|
82
|
+
children: [/* @__PURE__ */ jsx(RadioGroupItem, {
|
|
83
|
+
value: t,
|
|
84
|
+
id: `option-${h}`
|
|
85
|
+
}), /* @__PURE__ */ jsx(Label, {
|
|
86
|
+
htmlFor: `option-${h}`,
|
|
87
|
+
className: "cursor-pointer text-sm font-normal",
|
|
88
|
+
children: t
|
|
89
|
+
})]
|
|
90
|
+
}, h);
|
|
91
|
+
}
|
|
92
|
+
export { ChoicesRenderer_default as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Message, MessageAction, MessageActions, MessageContent, MessageResponse } from "../../../components/ai-elements/message.js";
|
|
2
2
|
import { Reasoning, ReasoningContent, ReasoningTrigger } from "../../../components/ai-elements/reasoning.js";
|
|
3
|
-
import { Tool, ToolContent, ToolHeader, ToolInput, ToolOutput } from "../../../components/
|
|
3
|
+
import { Tool, ToolContent, ToolHeader, ToolInput, ToolOutput } from "../../../components/loopstack-elements/tool.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
5
5
|
import { Fragment } from "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Button } from "../../../components/ui/button.js";
|
|
2
|
+
import CompletionMessagePaper_default from "../../../components/messages/CompletionMessagePaper.js";
|
|
3
|
+
import MarkdownContent_default from "../../../components/dynamic-form/MarkdownContent.js";
|
|
4
|
+
import { useDocumentTransition } from "./useDocumentTransition.js";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
6
|
+
import React from "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { Loader2 } from "lucide-react";
|
|
9
|
+
var ConfirmPromptRenderer_default = (l) => {
|
|
10
|
+
let u = c(18), { parentWorkflow: d, workflow: f, document: p, isActive: m } = l, h = p.content, { submit: g, canSubmit: _, isLoading: v } = useDocumentTransition(d, f, p.ui), y = !!h.answer, b = !m || !_ || y, x;
|
|
11
|
+
u[0] === g ? x = u[1] : (x = (t) => {
|
|
12
|
+
g({ answer: t });
|
|
13
|
+
}, u[0] = g, u[1] = x);
|
|
14
|
+
let S = x, C;
|
|
15
|
+
u[2] === p.createdAt ? C = u[3] : (C = new Date(p.createdAt), u[2] = p.createdAt, u[3] = C);
|
|
16
|
+
let w;
|
|
17
|
+
u[4] === h.question ? w = u[5] : (w = /* @__PURE__ */ jsx(MarkdownContent_default, { content: h.question }), u[4] = h.question, u[5] = w);
|
|
18
|
+
let T;
|
|
19
|
+
u[6] !== h.answer || u[7] !== b || u[8] !== S || u[9] !== y || u[10] !== v ? (T = y ? /* @__PURE__ */ jsxs("div", {
|
|
20
|
+
className: "text-muted-foreground text-sm",
|
|
21
|
+
children: ["Answered: ", /* @__PURE__ */ jsx("span", {
|
|
22
|
+
className: "text-foreground font-medium",
|
|
23
|
+
children: h.answer === "yes" ? "Yes" : "No"
|
|
24
|
+
})]
|
|
25
|
+
}) : /* @__PURE__ */ jsxs("div", {
|
|
26
|
+
className: "flex justify-end gap-3",
|
|
27
|
+
children: [/* @__PURE__ */ jsxs(Button, {
|
|
28
|
+
type: "button",
|
|
29
|
+
variant: "outline",
|
|
30
|
+
disabled: b || v,
|
|
31
|
+
onClick: () => S("no"),
|
|
32
|
+
className: "w-32",
|
|
33
|
+
children: [v && /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }), "No"]
|
|
34
|
+
}), /* @__PURE__ */ jsxs(Button, {
|
|
35
|
+
type: "button",
|
|
36
|
+
variant: "default",
|
|
37
|
+
disabled: b || v,
|
|
38
|
+
onClick: () => S("yes"),
|
|
39
|
+
className: "w-32",
|
|
40
|
+
children: [v && /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }), "Yes"]
|
|
41
|
+
})]
|
|
42
|
+
}), u[6] = h.answer, u[7] = b, u[8] = S, u[9] = y, u[10] = v, u[11] = T) : T = u[11];
|
|
43
|
+
let E;
|
|
44
|
+
u[12] !== w || u[13] !== T ? (E = /* @__PURE__ */ jsxs("div", {
|
|
45
|
+
className: "flex flex-col gap-4 p-1",
|
|
46
|
+
children: [w, T]
|
|
47
|
+
}), u[12] = w, u[13] = T, u[14] = E) : E = u[14];
|
|
48
|
+
let D;
|
|
49
|
+
return u[15] !== C || u[16] !== E ? (D = /* @__PURE__ */ jsx(CompletionMessagePaper_default, {
|
|
50
|
+
role: "document",
|
|
51
|
+
fullWidth: !0,
|
|
52
|
+
timestamp: C,
|
|
53
|
+
children: E
|
|
54
|
+
}), u[15] = C, u[16] = E, u[17] = D) : D = u[17], D;
|
|
55
|
+
};
|
|
56
|
+
export { ConfirmPromptRenderer_default as default };
|
|
@@ -1,80 +1,110 @@
|
|
|
1
|
+
import { Button } from "../../../components/ui/button.js";
|
|
1
2
|
import Form_default from "../../../components/dynamic-form/Form.js";
|
|
2
|
-
import {
|
|
3
|
-
import UiActions_default from "../../../components/ui-widgets/UiActions.js";
|
|
3
|
+
import { useRunWorkflow } from "../../../hooks/useProcessor.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
5
5
|
import React, { useEffect } from "react";
|
|
6
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { Loader2 } from "lucide-react";
|
|
7
8
|
import { useForm } from "react-hook-form";
|
|
8
9
|
import "zod";
|
|
9
|
-
|
|
10
|
-
let
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
function resolveFormConfig(e) {
|
|
11
|
+
let s = e, l = (s?.widgets)?.find((e) => e.widget === "form");
|
|
12
|
+
if (l?.options) {
|
|
13
|
+
let e = l.options;
|
|
14
|
+
return {
|
|
15
|
+
formUi: { form: {
|
|
16
|
+
properties: e.properties,
|
|
17
|
+
order: e.order,
|
|
18
|
+
title: e.title,
|
|
19
|
+
description: e.description,
|
|
20
|
+
disabled: e.disabled
|
|
21
|
+
} },
|
|
22
|
+
actions: e.actions ?? []
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
formUi: e,
|
|
27
|
+
actions: (s?.actions ?? []).map((e) => ({
|
|
28
|
+
type: "button",
|
|
29
|
+
transition: e.options?.transition,
|
|
30
|
+
label: e.options?.label
|
|
31
|
+
}))
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
var DocumentFormRenderer_default = (d) => {
|
|
35
|
+
let m = c(40), { parentWorkflow: h, workflow: g, document: _, enabled: v, viewOnly: y } = d, b = useRunWorkflow(), x;
|
|
36
|
+
m[0] !== _.content || m[1] !== _.schema.type ? (x = _.schema.type === "object" ? _.content : { raw: _.content }, m[0] = _.content, m[1] = _.schema.type, m[2] = x) : x = m[2];
|
|
37
|
+
let S;
|
|
38
|
+
m[3] === x ? S = m[4] : (S = {
|
|
39
|
+
defaultValues: x,
|
|
15
40
|
mode: "onChange"
|
|
16
|
-
},
|
|
17
|
-
let
|
|
18
|
-
|
|
19
|
-
|
|
41
|
+
}, m[3] = x, m[4] = S);
|
|
42
|
+
let C = useForm(S), w, T;
|
|
43
|
+
m[5] !== _.validationError || m[6] !== C ? (w = () => {
|
|
44
|
+
_.validationError ? _.validationError.issues.forEach((e) => {
|
|
20
45
|
let s = e.path.join(".");
|
|
21
|
-
|
|
46
|
+
C.setError(s, {
|
|
22
47
|
type: e.code,
|
|
23
48
|
message: e.message
|
|
24
49
|
});
|
|
25
|
-
}) :
|
|
26
|
-
},
|
|
27
|
-
let
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
})
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
p
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
let
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
50
|
+
}) : C.clearErrors();
|
|
51
|
+
}, T = [_.validationError, C], m[5] = _.validationError, m[6] = C, m[7] = w, m[8] = T) : (w = m[7], T = m[8]), useEffect(w, T);
|
|
52
|
+
let E, D, O, k, A, j, M, N, P;
|
|
53
|
+
if (m[9] !== _.meta || m[10] !== _.schema || m[11] !== _.ui || m[12] !== v || m[13] !== C || m[14] !== h || m[15] !== b || m[16] !== y || m[17] !== g.availableTransitions || m[18] !== g.id) {
|
|
54
|
+
let l = g.availableTransitions?.map(_temp) ?? [], u = (e, s) => {
|
|
55
|
+
if (!l.includes(e)) {
|
|
56
|
+
console.error(`Transition ${e} not available.`);
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
b.mutate({
|
|
60
|
+
workflowId: h.id,
|
|
61
|
+
runWorkflowPayloadDto: { transition: {
|
|
62
|
+
id: e,
|
|
63
|
+
workflowId: g.id,
|
|
64
|
+
payload: s
|
|
65
|
+
} }
|
|
66
|
+
});
|
|
67
|
+
}, d = (e) => (s) => {
|
|
68
|
+
_.schema.type === "object" ? u(e, s) : u(e, s.raw);
|
|
69
|
+
}, f = (e) => {
|
|
70
|
+
e.transition && C.handleSubmit((s) => d(e.transition)(s), _temp2)();
|
|
71
|
+
}, { formUi: p, actions: x } = resolveFormConfig(_.ui), S = _.schema, w = !!p?.form?.disabled, T = !v || w || !1;
|
|
72
|
+
k = "flex", E = Form_default, A = C, j = S, M = p ?? void 0, N = _.meta?.mimeType, P = T, D = y, O = !y && x.length > 0 ? /* @__PURE__ */ jsx("div", {
|
|
73
|
+
className: "flex w-full flex-col items-end gap-4",
|
|
74
|
+
children: x.map((s, u) => {
|
|
75
|
+
let d = T || s.transition !== void 0 && !l.includes(s.transition);
|
|
76
|
+
return /* @__PURE__ */ jsxs(Button, {
|
|
77
|
+
type: "button",
|
|
78
|
+
variant: s.variant ?? "default",
|
|
79
|
+
disabled: d || b.isPending,
|
|
80
|
+
onClick: () => f(s),
|
|
81
|
+
className: s.type === "button-full-w" ? "w-full" : "w-48",
|
|
82
|
+
...s.props ?? {},
|
|
83
|
+
children: [b.isPending && /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }), s.label ?? "Submit"]
|
|
84
|
+
}, u);
|
|
85
|
+
})
|
|
86
|
+
}) : void 0, m[9] = _.meta, m[10] = _.schema, m[11] = _.ui, m[12] = v, m[13] = C, m[14] = h, m[15] = b, m[16] = y, m[17] = g.availableTransitions, m[18] = g.id, m[19] = E, m[20] = D, m[21] = O, m[22] = k, m[23] = A, m[24] = j, m[25] = M, m[26] = N, m[27] = P;
|
|
87
|
+
} else E = m[19], D = m[20], O = m[21], k = m[22], A = m[23], j = m[24], M = m[25], N = m[26], P = m[27];
|
|
88
|
+
let F;
|
|
89
|
+
m[28] !== E || m[29] !== D || m[30] !== O || m[31] !== A || m[32] !== j || m[33] !== M || m[34] !== N || m[35] !== P ? (F = /* @__PURE__ */ jsx(E, {
|
|
90
|
+
form: A,
|
|
91
|
+
schema: j,
|
|
92
|
+
ui: M,
|
|
93
|
+
mimeType: N,
|
|
94
|
+
disabled: P,
|
|
95
|
+
viewOnly: D,
|
|
96
|
+
actions: O
|
|
97
|
+
}), m[28] = E, m[29] = D, m[30] = O, m[31] = A, m[32] = j, m[33] = M, m[34] = N, m[35] = P, m[36] = F) : F = m[36];
|
|
98
|
+
let I;
|
|
99
|
+
return m[37] !== k || m[38] !== F ? (I = /* @__PURE__ */ jsx("div", {
|
|
100
|
+
className: k,
|
|
101
|
+
children: F
|
|
102
|
+
}), m[37] = k, m[38] = F, m[39] = I) : I = m[39], I;
|
|
76
103
|
};
|
|
77
104
|
function _temp(e) {
|
|
78
105
|
return e.id;
|
|
79
106
|
}
|
|
107
|
+
function _temp2(e) {
|
|
108
|
+
return console.error("[DocumentFormRenderer] validation failed", e);
|
|
109
|
+
}
|
|
80
110
|
export { DocumentFormRenderer_default as default };
|
|
@@ -3,15 +3,13 @@ import { c } from "react/compiler-runtime";
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
var LinkMessageRenderer_default = (r) => {
|
|
6
|
-
let i = c(
|
|
7
|
-
return i[0] !== u || i[1] !==
|
|
8
|
-
href:
|
|
9
|
-
label:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
defaultExpanded: p
|
|
15
|
-
}), i[0] = u, i[1] = f, i[2] = p, i[3] = d, i[4] = l, i[5] = m, i[6] = s, i[7] = h) : h = i[7], h;
|
|
6
|
+
let i = c(6), { document: a } = r, { status: o, label: s, workflowId: l, embed: u, expanded: d } = a.content, f = l ? `/workflows/${l}` : void 0, p;
|
|
7
|
+
return i[0] !== u || i[1] !== d || i[2] !== f || i[3] !== s || i[4] !== o ? (p = /* @__PURE__ */ jsx(link_default, {
|
|
8
|
+
href: f,
|
|
9
|
+
label: s,
|
|
10
|
+
status: o,
|
|
11
|
+
embed: u,
|
|
12
|
+
defaultExpanded: d
|
|
13
|
+
}), i[0] = u, i[1] = d, i[2] = f, i[3] = s, i[4] = o, i[5] = p) : p = i[5], p;
|
|
16
14
|
};
|
|
17
15
|
export { LinkMessageRenderer_default as default };
|