@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
|
@@ -15,6 +15,7 @@ const getInputType = (t) => {
|
|
|
15
15
|
case "time": return "time";
|
|
16
16
|
case "datetime": return "datetime-local";
|
|
17
17
|
case "phone": return "tel";
|
|
18
|
+
case "password": return "password";
|
|
18
19
|
}
|
|
19
20
|
switch (t.type) {
|
|
20
21
|
case "integer":
|
|
@@ -27,13 +28,13 @@ var isNumericType = (t) => t.type === "number" || t.type === "integer";
|
|
|
27
28
|
const InputField = (p) => {
|
|
28
29
|
let m = c(36), { name: h, schema: g, ui: _, required: v, form: y, disabled: b, viewOnly: x } = p, S = useFieldConfig(h, g, _, b), C;
|
|
29
30
|
m[0] === g ? C = m[1] : (C = getInputType(g), m[0] = g, m[1] = C);
|
|
30
|
-
let w = C, T;
|
|
31
|
-
m[2] !== g
|
|
32
|
-
let
|
|
33
|
-
m[5] !== v || m[6] !== g ? (
|
|
34
|
-
let
|
|
35
|
-
m[8] === g ?
|
|
36
|
-
let
|
|
31
|
+
let w = C, T = _, E;
|
|
32
|
+
m[2] !== g || m[3] !== T?.placeholder ? (E = T?.placeholder || g.placeholder || g.examples?.[0]?.toString() || "", m[2] = g, m[3] = T?.placeholder, m[4] = E) : E = m[4];
|
|
33
|
+
let D = E, O;
|
|
34
|
+
m[5] !== v || m[6] !== g ? (O = buildTextValidationRules(g, v), m[5] = v, m[6] = g, m[7] = O) : O = m[7];
|
|
35
|
+
let k = O, A;
|
|
36
|
+
m[8] === g ? A = m[9] : (A = isNumericType(g), m[8] = g, m[9] = A);
|
|
37
|
+
let j = A;
|
|
37
38
|
if (x) {
|
|
38
39
|
let t;
|
|
39
40
|
m[10] === S.fieldLabel ? t = m[11] : (t = /* @__PURE__ */ jsx(Label, {
|
|
@@ -49,12 +50,12 @@ const InputField = (p) => {
|
|
|
49
50
|
}), m[12] = y.control, m[13] = h, m[14] = u, m[15] = d) : d = m[15];
|
|
50
51
|
let f;
|
|
51
52
|
return m[16] !== t || m[17] !== d ? (f = /* @__PURE__ */ jsxs("div", {
|
|
52
|
-
className: "
|
|
53
|
+
className: "mb-4 block",
|
|
53
54
|
children: [t, d]
|
|
54
55
|
}), m[16] = t, m[17] = d, m[18] = f) : f = m[18], f;
|
|
55
56
|
}
|
|
56
|
-
let
|
|
57
|
-
m[19] !== S || m[20] !== w || m[21] !==
|
|
57
|
+
let M = S.defaultValue ?? (j ? void 0 : ""), N;
|
|
58
|
+
m[19] !== S || m[20] !== w || m[21] !== j || m[22] !== h || m[23] !== D || m[24] !== v || m[25] !== g.maxLength || m[26] !== g.maximum || m[27] !== g.minimum || m[28] !== g.multipleOf ? (N = (l) => {
|
|
58
59
|
let { field: u } = l;
|
|
59
60
|
return /* @__PURE__ */ jsx(BaseFieldWrapper, {
|
|
60
61
|
name: h,
|
|
@@ -67,14 +68,14 @@ const InputField = (p) => {
|
|
|
67
68
|
...u,
|
|
68
69
|
id: h,
|
|
69
70
|
onChange: (t) => {
|
|
70
|
-
if (!S.isReadOnly) if (
|
|
71
|
+
if (!S.isReadOnly) if (j) {
|
|
71
72
|
let l = t.target.value;
|
|
72
73
|
u.onChange(l === "" ? void 0 : Number(l));
|
|
73
74
|
} else u.onChange(t);
|
|
74
75
|
},
|
|
75
76
|
value: u.value ?? "",
|
|
76
77
|
type: w,
|
|
77
|
-
placeholder:
|
|
78
|
+
placeholder: D,
|
|
78
79
|
disabled: S.isDisabled,
|
|
79
80
|
readOnly: S.isReadOnly,
|
|
80
81
|
min: g.minimum,
|
|
@@ -85,15 +86,15 @@ const InputField = (p) => {
|
|
|
85
86
|
...S.getAriaProps()
|
|
86
87
|
})
|
|
87
88
|
});
|
|
88
|
-
}, m[19] = S, m[20] = w, m[21] =
|
|
89
|
-
let
|
|
90
|
-
return m[30] !== y.control || m[31] !== h || m[32] !==
|
|
89
|
+
}, m[19] = S, m[20] = w, m[21] = j, m[22] = h, m[23] = D, m[24] = v, m[25] = g.maxLength, m[26] = g.maximum, m[27] = g.minimum, m[28] = g.multipleOf, m[29] = N) : N = m[29];
|
|
90
|
+
let P;
|
|
91
|
+
return m[30] !== y.control || m[31] !== h || m[32] !== M || m[33] !== N || m[34] !== k ? (P = /* @__PURE__ */ jsx(Controller, {
|
|
91
92
|
name: h,
|
|
92
93
|
control: y.control,
|
|
93
|
-
defaultValue:
|
|
94
|
-
rules:
|
|
95
|
-
render:
|
|
96
|
-
}), m[30] = y.control, m[31] = h, m[32] =
|
|
94
|
+
defaultValue: M,
|
|
95
|
+
rules: k,
|
|
96
|
+
render: N
|
|
97
|
+
}), m[30] = y.control, m[31] = h, m[32] = M, m[33] = N, m[34] = k, m[35] = P) : P = m[35], P;
|
|
97
98
|
};
|
|
98
99
|
function _temp(t) {
|
|
99
100
|
let { field: l } = t;
|
|
@@ -8,14 +8,14 @@ import React from "react";
|
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { Controller } from "react-hook-form";
|
|
10
10
|
const RadioField = (p) => {
|
|
11
|
-
let m = c(
|
|
12
|
-
m[0] !==
|
|
13
|
-
let
|
|
14
|
-
m[3] !==
|
|
15
|
-
let
|
|
16
|
-
m[6] ===
|
|
17
|
-
let
|
|
18
|
-
m[8] !== x || m[9] !==
|
|
11
|
+
let m = c(22), { name: h, schema: g, ui: _, required: v, form: y, disabled: b } = p, x = useFieldConfig(h, g, _, b), S = _, C = S?.enumOptions ?? g.enumOptions, w;
|
|
12
|
+
m[0] !== C || m[1] !== g ? (w = C ? C.map(_temp) : g.enum, m[0] = C, m[1] = g, m[2] = w) : w = m[2];
|
|
13
|
+
let T = w, E;
|
|
14
|
+
m[3] !== C || m[4] !== g ? (E = C ? C.map(_temp2) : g.enum, m[3] = C, m[4] = g, m[5] = E) : E = m[5];
|
|
15
|
+
let D = E, O = x.defaultValue || "", k = v ? "This field is required" : void 0, A;
|
|
16
|
+
m[6] === k ? A = m[7] : (A = { required: k }, m[6] = k, m[7] = A);
|
|
17
|
+
let j;
|
|
18
|
+
m[8] !== x || m[9] !== T || m[10] !== D || m[11] !== h || m[12] !== v || m[13] !== g || m[14] !== S?.inline ? (j = (d) => {
|
|
19
19
|
let { field: f } = d;
|
|
20
20
|
return /* @__PURE__ */ jsx(BaseFieldWrapper, {
|
|
21
21
|
name: h,
|
|
@@ -31,9 +31,9 @@ const RadioField = (p) => {
|
|
|
31
31
|
disabled: x.isDisabled,
|
|
32
32
|
required: v,
|
|
33
33
|
"aria-label": x.fieldLabel,
|
|
34
|
-
className: cn(g.inline && "flex flex-row space-y-0 space-x-4"),
|
|
34
|
+
className: cn((S?.inline ?? g.inline) && "flex flex-row space-y-0 space-x-4"),
|
|
35
35
|
...x.getAriaProps(),
|
|
36
|
-
children:
|
|
36
|
+
children: D?.map((u, d) => /* @__PURE__ */ jsxs("div", {
|
|
37
37
|
className: "flex items-center space-x-2",
|
|
38
38
|
children: [/* @__PURE__ */ jsx(RadioGroupItem, {
|
|
39
39
|
value: u,
|
|
@@ -43,20 +43,20 @@ const RadioField = (p) => {
|
|
|
43
43
|
}), /* @__PURE__ */ jsx(Label, {
|
|
44
44
|
htmlFor: `${h}-${u}`,
|
|
45
45
|
className: cn("cursor-pointer text-sm font-normal", x.isDisabled && "cursor-not-allowed opacity-70"),
|
|
46
|
-
children:
|
|
46
|
+
children: T?.[d] || u
|
|
47
47
|
})]
|
|
48
48
|
}, u))
|
|
49
49
|
})
|
|
50
50
|
});
|
|
51
|
-
}, m[8] = x, m[9] =
|
|
52
|
-
let
|
|
53
|
-
return m[
|
|
51
|
+
}, m[8] = x, m[9] = T, m[10] = D, m[11] = h, m[12] = v, m[13] = g, m[14] = S?.inline, m[15] = j) : j = m[15];
|
|
52
|
+
let M;
|
|
53
|
+
return m[16] !== y.control || m[17] !== h || m[18] !== O || m[19] !== A || m[20] !== j ? (M = /* @__PURE__ */ jsx(Controller, {
|
|
54
54
|
name: h,
|
|
55
55
|
control: y.control,
|
|
56
|
-
defaultValue:
|
|
57
|
-
rules:
|
|
58
|
-
render:
|
|
59
|
-
}), m[
|
|
56
|
+
defaultValue: O,
|
|
57
|
+
rules: A,
|
|
58
|
+
render: j
|
|
59
|
+
}), m[16] = y.control, m[17] = h, m[18] = O, m[19] = A, m[20] = j, m[21] = M) : M = m[21], M;
|
|
60
60
|
};
|
|
61
61
|
function _temp(n) {
|
|
62
62
|
return n.label;
|
|
@@ -6,16 +6,16 @@ import React from "react";
|
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { Controller } from "react-hook-form";
|
|
8
8
|
const SelectField = (m) => {
|
|
9
|
-
let h = c(22), { name: g, schema: _, ui: v, required: y, form: b, disabled: x } = m, S = useFieldConfig(g, _, v, x), C;
|
|
10
|
-
h[0] !==
|
|
11
|
-
let w = C, T;
|
|
12
|
-
h[3] === w ? T = h[4] : (T = w.map(_temp), h[3] = w, h[4] = T);
|
|
9
|
+
let h = c(22), { name: g, schema: _, ui: v, required: y, form: b, disabled: x } = m, S = useFieldConfig(g, _, v, x), C = v, w = C?.enumOptions ?? _.enumOptions, T;
|
|
10
|
+
h[0] !== w || h[1] !== _ ? (T = w && w.length > 0 ? w : _.enum || [], h[0] = w, h[1] = _, h[2] = T) : T = h[2];
|
|
13
11
|
let E = T, D;
|
|
14
|
-
h[
|
|
15
|
-
let O = D, k
|
|
16
|
-
h[
|
|
17
|
-
let N;
|
|
18
|
-
h[
|
|
12
|
+
h[3] === E ? D = h[4] : (D = E.map(_temp), h[3] = E, h[4] = D);
|
|
13
|
+
let O = D, k;
|
|
14
|
+
h[5] === E ? k = h[6] : (k = E.map(_temp2), h[5] = E, h[6] = k);
|
|
15
|
+
let A = k, j = C?.placeholder || _.placeholder || `Select ${S.fieldLabel}`, M = S.defaultValue || "", N = y ? "This field is required" : void 0, P;
|
|
16
|
+
h[7] === N ? P = h[8] : (P = { required: N }, h[7] = N, h[8] = P);
|
|
17
|
+
let F;
|
|
18
|
+
h[9] !== S || h[10] !== O || h[11] !== A || h[12] !== g || h[13] !== j || h[14] !== y ? (F = (f) => {
|
|
19
19
|
let { field: p } = f;
|
|
20
20
|
return /* @__PURE__ */ jsx(BaseFieldWrapper, {
|
|
21
21
|
name: g,
|
|
@@ -33,23 +33,23 @@ const SelectField = (m) => {
|
|
|
33
33
|
id: g,
|
|
34
34
|
className: S.error ? "border-destructive" : "",
|
|
35
35
|
...S.getAriaProps(),
|
|
36
|
-
children: /* @__PURE__ */ jsx(SelectValue, { placeholder:
|
|
37
|
-
}), /* @__PURE__ */ jsx(SelectContent, { children:
|
|
36
|
+
children: /* @__PURE__ */ jsx(SelectValue, { placeholder: j })
|
|
37
|
+
}), /* @__PURE__ */ jsx(SelectContent, { children: A.map((t, d) => /* @__PURE__ */ jsx(SelectItem, {
|
|
38
38
|
value: t.toString(),
|
|
39
39
|
disabled: S.isDisabled,
|
|
40
|
-
children:
|
|
40
|
+
children: O[d]?.toString() || t.toString()
|
|
41
41
|
}, `${t}-${d}`)) })]
|
|
42
42
|
})
|
|
43
43
|
});
|
|
44
|
-
}, h[9] = S, h[10] =
|
|
45
|
-
let
|
|
46
|
-
return h[16] !== b.control || h[17] !== g || h[18] !==
|
|
44
|
+
}, h[9] = S, h[10] = O, h[11] = A, h[12] = g, h[13] = j, h[14] = y, h[15] = F) : F = h[15];
|
|
45
|
+
let I;
|
|
46
|
+
return h[16] !== b.control || h[17] !== g || h[18] !== M || h[19] !== P || h[20] !== F ? (I = /* @__PURE__ */ jsx(Controller, {
|
|
47
47
|
name: g,
|
|
48
48
|
control: b.control,
|
|
49
|
-
defaultValue:
|
|
50
|
-
rules:
|
|
51
|
-
render:
|
|
52
|
-
}), h[16] = b.control, h[17] = g, h[18] =
|
|
49
|
+
defaultValue: M,
|
|
50
|
+
rules: P,
|
|
51
|
+
render: F
|
|
52
|
+
}), h[16] = b.control, h[17] = g, h[18] = M, h[19] = P, h[20] = F, h[21] = I) : I = h[21], I;
|
|
53
53
|
};
|
|
54
54
|
function _temp(t) {
|
|
55
55
|
return typeof t == "string" || typeof t == "number" ? t : t.label;
|
|
@@ -8,9 +8,9 @@ import React from "react";
|
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { Controller } from "react-hook-form";
|
|
10
10
|
const TextareaField = (d) => {
|
|
11
|
-
let f = c(25), { name: p, schema: m, ui: h, required: g, form: _, disabled: v, viewOnly: y } = d, b = useFieldConfig(p, m, h, v), x = m.placeholder || m.examples?.[0] || "",
|
|
12
|
-
f[0] !== g || f[1] !== m ? (
|
|
13
|
-
let
|
|
11
|
+
let f = c(25), { name: p, schema: m, ui: h, required: g, form: _, disabled: v, viewOnly: y } = d, b = useFieldConfig(p, m, h, v), x = h, S = x?.placeholder || m.placeholder || m.examples?.[0] || "", C = x?.rows || m.rows || 4, w;
|
|
12
|
+
f[0] !== g || f[1] !== m ? (w = buildTextValidationRules(m, g), f[0] = g, f[1] = m, f[2] = w) : w = f[2];
|
|
13
|
+
let T = w;
|
|
14
14
|
if (y) {
|
|
15
15
|
let o;
|
|
16
16
|
f[3] === b.fieldLabel ? o = f[4] : (o = /* @__PURE__ */ jsx(Label, {
|
|
@@ -26,12 +26,12 @@ const TextareaField = (d) => {
|
|
|
26
26
|
}), f[5] = _.control, f[6] = p, f[7] = s, f[8] = l) : l = f[8];
|
|
27
27
|
let u;
|
|
28
28
|
return f[9] !== o || f[10] !== l ? (u = /* @__PURE__ */ jsxs("div", {
|
|
29
|
-
className: "
|
|
29
|
+
className: "mb-4 block",
|
|
30
30
|
children: [o, l]
|
|
31
31
|
}), f[9] = o, f[10] = l, f[11] = u) : u = f[11], u;
|
|
32
32
|
}
|
|
33
|
-
let
|
|
34
|
-
f[12] !== b || f[13] !== p || f[14] !==
|
|
33
|
+
let E = b.defaultValue || "", D;
|
|
34
|
+
f[12] !== b || f[13] !== p || f[14] !== S || f[15] !== g || f[16] !== C || f[17] !== m.maxLength ? (D = (r) => {
|
|
35
35
|
let { field: s } = r;
|
|
36
36
|
return /* @__PURE__ */ jsx(BaseFieldWrapper, {
|
|
37
37
|
name: p,
|
|
@@ -44,28 +44,28 @@ const TextareaField = (d) => {
|
|
|
44
44
|
...s,
|
|
45
45
|
id: p,
|
|
46
46
|
onChange: b.isReadOnly ? void 0 : s.onChange,
|
|
47
|
-
rows:
|
|
48
|
-
placeholder:
|
|
47
|
+
rows: C,
|
|
48
|
+
placeholder: S,
|
|
49
49
|
disabled: b.isDisabled,
|
|
50
50
|
readOnly: b.isReadOnly,
|
|
51
51
|
maxLength: m.maxLength,
|
|
52
52
|
className: b.error ? "border-destructive focus-visible:ring-destructive" : "",
|
|
53
53
|
style: {
|
|
54
|
-
minHeight:
|
|
55
|
-
resize:
|
|
54
|
+
minHeight: C ? `${C * 1.5}em` : void 0,
|
|
55
|
+
resize: C ? "vertical" : "none"
|
|
56
56
|
},
|
|
57
57
|
...b.getAriaProps()
|
|
58
58
|
})
|
|
59
59
|
});
|
|
60
|
-
}, f[12] = b, f[13] = p, f[14] =
|
|
61
|
-
let
|
|
62
|
-
return f[19] !== _.control || f[20] !== p || f[21] !==
|
|
60
|
+
}, f[12] = b, f[13] = p, f[14] = S, f[15] = g, f[16] = C, f[17] = m.maxLength, f[18] = D) : D = f[18];
|
|
61
|
+
let O;
|
|
62
|
+
return f[19] !== _.control || f[20] !== p || f[21] !== E || f[22] !== D || f[23] !== T ? (O = /* @__PURE__ */ jsx(Controller, {
|
|
63
63
|
name: p,
|
|
64
64
|
control: _.control,
|
|
65
|
-
defaultValue:
|
|
66
|
-
rules:
|
|
67
|
-
render:
|
|
68
|
-
}), f[19] = _.control, f[20] = p, f[21] =
|
|
65
|
+
defaultValue: E,
|
|
66
|
+
rules: T,
|
|
67
|
+
render: D
|
|
68
|
+
}), f[19] = _.control, f[20] = p, f[21] = E, f[22] = D, f[23] = T, f[24] = O) : O = f[24], O;
|
|
69
69
|
};
|
|
70
70
|
function _temp(r) {
|
|
71
71
|
let { field: o } = r;
|
|
@@ -9,7 +9,7 @@ var LoadingCentered_default = (i) => {
|
|
|
9
9
|
let p = u === void 0 ? !1 : u, m = d === void 0 ? 24 : d, h = f === void 0 ? null : f;
|
|
10
10
|
if (p) {
|
|
11
11
|
let r;
|
|
12
|
-
o[6] === s ? r = o[7] : (r = cn("flex items-center justify-center", s), o[6] = s, o[7] = r);
|
|
12
|
+
o[6] === s ? r = o[7] : (r = cn("mt-12 flex items-center justify-center", s), o[6] = s, o[7] = r);
|
|
13
13
|
let i;
|
|
14
14
|
o[8] === m ? i = o[9] : (i = /* @__PURE__ */ jsx(Loader2, {
|
|
15
15
|
className: "animate-spin",
|
|
@@ -1,42 +1,29 @@
|
|
|
1
|
-
import { Separator } from "../ui/separator.js";
|
|
2
|
-
import { SidebarTrigger, useSidebar } from "../ui/sidebar.js";
|
|
3
1
|
import PageBreadcrumbs_default from "../page/PageBreadcrumbs.js";
|
|
4
2
|
import { c } from "react/compiler-runtime";
|
|
5
|
-
import {
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
orientation: "vertical",
|
|
10
|
-
className: "mr-2 data-[orientation=vertical]:h-4"
|
|
11
|
-
})] });
|
|
12
|
-
} catch {
|
|
13
|
-
return null;
|
|
14
|
-
}
|
|
15
|
-
}, MainLayout_default = (e) => {
|
|
16
|
-
let o = c(11), { children: s, breadcrumbsData: l, headerMenu: u } = e, d;
|
|
17
|
-
o[0] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ jsx(SidebarTriggerSafe, {}), o[0] = d) : d = o[0];
|
|
18
|
-
let f;
|
|
19
|
-
o[1] === l ? f = o[2] : (f = /* @__PURE__ */ jsxs("div", {
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
var MainLayout_default = (i) => {
|
|
5
|
+
let a = c(10), { children: o, breadcrumbsData: s, headerMenu: l } = i, u;
|
|
6
|
+
a[0] === s ? u = a[1] : (u = /* @__PURE__ */ jsx("div", {
|
|
20
7
|
className: "flex items-center gap-2",
|
|
21
|
-
children:
|
|
22
|
-
}),
|
|
23
|
-
let
|
|
24
|
-
|
|
8
|
+
children: /* @__PURE__ */ jsx(PageBreadcrumbs_default, { breadcrumbData: s })
|
|
9
|
+
}), a[0] = s, a[1] = u);
|
|
10
|
+
let d;
|
|
11
|
+
a[2] !== l || a[3] !== u ? (d = /* @__PURE__ */ jsxs("div", {
|
|
25
12
|
className: "border-b flex h-12 shrink-0 items-center justify-between gap-2 px-4",
|
|
26
|
-
children: [
|
|
27
|
-
}),
|
|
28
|
-
let
|
|
29
|
-
|
|
13
|
+
children: [u, l]
|
|
14
|
+
}), a[2] = l, a[3] = u, a[4] = d) : d = a[4];
|
|
15
|
+
let f;
|
|
16
|
+
a[5] === o ? f = a[6] : (f = /* @__PURE__ */ jsx("div", {
|
|
30
17
|
className: "flex-1 overflow-auto p-4",
|
|
31
18
|
children: /* @__PURE__ */ jsx("div", {
|
|
32
19
|
className: "space-y-6",
|
|
33
|
-
children:
|
|
20
|
+
children: o
|
|
34
21
|
})
|
|
35
|
-
}),
|
|
36
|
-
let
|
|
37
|
-
return
|
|
22
|
+
}), a[5] = o, a[6] = f);
|
|
23
|
+
let p;
|
|
24
|
+
return a[7] !== d || a[8] !== f ? (p = /* @__PURE__ */ jsxs("div", {
|
|
38
25
|
className: "flex h-full flex-col",
|
|
39
|
-
children: [
|
|
40
|
-
}),
|
|
26
|
+
children: [d, f]
|
|
27
|
+
}), a[7] = d, a[8] = f, a[9] = p) : p = a[9], p;
|
|
41
28
|
};
|
|
42
29
|
export { MainLayout_default as default };
|