@uipath/apollo-wind 0.9.0 → 0.10.0-pr257.2a4b17b
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/components/forms/field-renderer.cjs +120 -69
- package/dist/components/forms/field-renderer.js +120 -69
- package/dist/components/forms/form-designer.cjs +2352 -1488
- package/dist/components/forms/form-designer.js +2353 -1489
- package/dist/components/forms/form-examples.cjs +10 -10
- package/dist/components/forms/form-examples.js +10 -10
- package/dist/components/forms/form-state-viewer.cjs +988 -433
- package/dist/components/forms/form-state-viewer.js +988 -433
- package/dist/components/forms/metadata-form.cjs +446 -170
- package/dist/components/forms/metadata-form.js +446 -170
- package/dist/components/forms/schema-viewer.cjs +173 -80
- package/dist/components/forms/schema-viewer.js +173 -80
- package/dist/components/ui/accordion.cjs +131 -27
- package/dist/components/ui/accordion.js +131 -27
- package/dist/components/ui/alert-dialog.cjs +273 -45
- package/dist/components/ui/alert-dialog.js +273 -45
- package/dist/components/ui/alert.cjs +106 -17
- package/dist/components/ui/alert.js +106 -17
- package/dist/components/ui/avatar.cjs +100 -15
- package/dist/components/ui/avatar.js +100 -15
- package/dist/components/ui/badge.cjs +36 -6
- package/dist/components/ui/badge.js +36 -6
- package/dist/components/ui/breadcrumb.cjs +258 -52
- package/dist/components/ui/breadcrumb.js +258 -52
- package/dist/components/ui/button-group.cjs +119 -19
- package/dist/components/ui/button-group.js +119 -19
- package/dist/components/ui/button.cjs +48 -8
- package/dist/components/ui/button.js +48 -8
- package/dist/components/ui/calendar.cjs +88 -30
- package/dist/components/ui/calendar.js +88 -30
- package/dist/components/ui/card.cjs +199 -30
- package/dist/components/ui/card.js +199 -30
- package/dist/components/ui/checkbox.cjs +42 -8
- package/dist/components/ui/checkbox.js +42 -8
- package/dist/components/ui/combobox.cjs +150 -53
- package/dist/components/ui/combobox.js +150 -53
- package/dist/components/ui/command.cjs +291 -53
- package/dist/components/ui/command.js +291 -53
- package/dist/components/ui/context-menu.cjs +370 -72
- package/dist/components/ui/context-menu.js +370 -72
- package/dist/components/ui/data-table.cjs +76 -39
- package/dist/components/ui/data-table.js +76 -39
- package/dist/components/ui/date-picker.cjs +179 -68
- package/dist/components/ui/date-picker.js +179 -68
- package/dist/components/ui/datetime-picker.cjs +225 -104
- package/dist/components/ui/datetime-picker.js +225 -104
- package/dist/components/ui/dialog.cjs +290 -78
- package/dist/components/ui/dialog.js +290 -78
- package/dist/components/ui/drawer.cjs +220 -39
- package/dist/components/ui/drawer.js +220 -39
- package/dist/components/ui/dropdown-menu.cjs +376 -73
- package/dist/components/ui/dropdown-menu.js +376 -73
- package/dist/components/ui/editable-cell.cjs +106 -42
- package/dist/components/ui/editable-cell.js +106 -42
- package/dist/components/ui/empty-state.cjs +106 -33
- package/dist/components/ui/empty-state.js +106 -33
- package/dist/components/ui/file-upload.cjs +405 -187
- package/dist/components/ui/file-upload.d.ts +3 -1
- package/dist/components/ui/file-upload.js +405 -187
- package/dist/components/ui/hover-card.cjs +46 -7
- package/dist/components/ui/hover-card.js +46 -7
- package/dist/components/ui/index.cjs +4 -4
- package/dist/components/ui/input.cjs +39 -6
- package/dist/components/ui/input.js +39 -6
- package/dist/components/ui/label.cjs +34 -5
- package/dist/components/ui/label.js +34 -5
- package/dist/components/ui/layout/column.cjs +209 -41
- package/dist/components/ui/layout/column.js +209 -41
- package/dist/components/ui/layout/grid.cjs +275 -60
- package/dist/components/ui/layout/grid.js +275 -60
- package/dist/components/ui/layout/row.cjs +209 -41
- package/dist/components/ui/layout/row.js +209 -41
- package/dist/components/ui/menubar.cjs +540 -106
- package/dist/components/ui/menubar.js +540 -106
- package/dist/components/ui/multi-select.cjs +289 -135
- package/dist/components/ui/multi-select.js +289 -135
- package/dist/components/ui/navigation-menu.cjs +244 -47
- package/dist/components/ui/navigation-menu.js +244 -47
- package/dist/components/ui/pagination.cjs +301 -65
- package/dist/components/ui/pagination.js +301 -65
- package/dist/components/ui/popover.cjs +48 -9
- package/dist/components/ui/popover.js +48 -9
- package/dist/components/ui/progress.cjs +48 -8
- package/dist/components/ui/progress.js +48 -8
- package/dist/components/ui/radio-group.cjs +74 -12
- package/dist/components/ui/radio-group.js +74 -12
- package/dist/components/ui/resizable.cjs +75 -10
- package/dist/components/ui/resizable.js +75 -10
- package/dist/components/ui/scroll-area.cjs +113 -21
- package/dist/components/ui/scroll-area.js +113 -21
- package/dist/components/ui/search.cjs +280 -98
- package/dist/components/ui/search.js +280 -98
- package/dist/components/ui/select.cjs +334 -68
- package/dist/components/ui/select.js +334 -68
- package/dist/components/ui/separator.cjs +48 -7
- package/dist/components/ui/separator.js +48 -7
- package/dist/components/ui/sheet.cjs +236 -50
- package/dist/components/ui/sheet.js +236 -50
- package/dist/components/ui/skeleton.cjs +31 -5
- package/dist/components/ui/skeleton.js +31 -5
- package/dist/components/ui/slider.cjs +71 -21
- package/dist/components/ui/slider.js +71 -21
- package/dist/components/ui/sonner.cjs +43 -15
- package/dist/components/ui/sonner.js +43 -15
- package/dist/components/ui/spinner.cjs +83 -21
- package/dist/components/ui/spinner.js +83 -21
- package/dist/components/ui/stats-card.cjs +169 -60
- package/dist/components/ui/stats-card.js +169 -60
- package/dist/components/ui/stepper.cjs +126 -57
- package/dist/components/ui/stepper.js +126 -57
- package/dist/components/ui/switch.cjs +42 -8
- package/dist/components/ui/switch.js +42 -8
- package/dist/components/ui/table.cjs +267 -42
- package/dist/components/ui/table.js +267 -42
- package/dist/components/ui/tabs.cjs +100 -15
- package/dist/components/ui/tabs.js +100 -15
- package/dist/components/ui/textarea.cjs +34 -5
- package/dist/components/ui/textarea.js +34 -5
- package/dist/components/ui/toggle-group.cjs +112 -19
- package/dist/components/ui/toggle-group.js +112 -19
- package/dist/components/ui/toggle.cjs +43 -6
- package/dist/components/ui/toggle.js +43 -6
- package/dist/components/ui/tooltip.cjs +40 -6
- package/dist/components/ui/tooltip.js +40 -6
- package/dist/examples/admin-layout-example.cjs +879 -347
- package/dist/examples/admin-layout-example.js +879 -347
- package/dist/examples/app-shell-example.cjs +14 -14
- package/dist/examples/app-shell-example.js +14 -14
- package/dist/examples/dashboard-example.cjs +495 -334
- package/dist/examples/dashboard-example.js +495 -334
- package/dist/examples/data-management-example.cjs +501 -303
- package/dist/examples/data-management-example.js +502 -304
- package/dist/examples/flow-editor-layout-example.cjs +435 -231
- package/dist/examples/flow-editor-layout-example.js +436 -232
- package/dist/examples/flow-start-example.cjs +508 -251
- package/dist/examples/flow-start-example.js +509 -252
- package/dist/examples/form-builder-example.cjs +1006 -602
- package/dist/examples/form-builder-example.js +1007 -603
- package/dist/examples/new-project-example.cjs +806 -474
- package/dist/examples/new-project-example.js +807 -475
- package/dist/examples/settings-example.cjs +792 -704
- package/dist/examples/settings-example.js +792 -704
- package/dist/examples/vscode-example.cjs +731 -236
- package/dist/examples/vscode-example.js +731 -236
- package/package.json +4 -1
|
@@ -29,6 +29,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29
29
|
SchemaViewer: ()=>SchemaViewer
|
|
30
30
|
});
|
|
31
31
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
32
|
+
const compiler_runtime_namespaceObject = require("react/compiler-runtime");
|
|
32
33
|
const external_react_namespaceObject = require("react");
|
|
33
34
|
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
34
35
|
const external_sonner_namespaceObject = require("sonner");
|
|
@@ -36,81 +37,158 @@ const external_schema_serializer_cjs_namespaceObject = require("./schema-seriali
|
|
|
36
37
|
const button_cjs_namespaceObject = require("../ui/button.cjs");
|
|
37
38
|
const sheet_cjs_namespaceObject = require("../ui/sheet.cjs");
|
|
38
39
|
const scroll_area_cjs_namespaceObject = require("../ui/scroll-area.cjs");
|
|
39
|
-
function SchemaViewer(
|
|
40
|
+
function SchemaViewer(t0) {
|
|
41
|
+
const $ = (0, compiler_runtime_namespaceObject.c)(25);
|
|
42
|
+
const { schema, triggerLabel: t1 } = t0;
|
|
43
|
+
const triggerLabel = void 0 === t1 ? "View Schema" : t1;
|
|
40
44
|
const [copied, setCopied] = (0, external_react_namespaceObject.useState)(false);
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
45
|
+
let t2;
|
|
46
|
+
if ($[0] !== schema) {
|
|
47
|
+
t2 = (0, external_schema_serializer_cjs_namespaceObject.schemaToJson)(schema);
|
|
48
|
+
$[0] = schema;
|
|
49
|
+
$[1] = t2;
|
|
50
|
+
} else t2 = $[1];
|
|
51
|
+
const jsonString = t2;
|
|
52
|
+
let t3;
|
|
53
|
+
if ($[2] !== jsonString) {
|
|
54
|
+
t3 = async ()=>{
|
|
55
|
+
try {
|
|
56
|
+
await navigator.clipboard.writeText(jsonString);
|
|
57
|
+
setCopied(true);
|
|
58
|
+
external_sonner_namespaceObject.toast.success("Schema copied to clipboard");
|
|
59
|
+
setTimeout(()=>setCopied(false), 2000);
|
|
60
|
+
} catch {
|
|
61
|
+
external_sonner_namespaceObject.toast.error("Failed to copy schema");
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
$[2] = jsonString;
|
|
65
|
+
$[3] = t3;
|
|
66
|
+
} else t3 = $[3];
|
|
67
|
+
const handleCopy = t3;
|
|
68
|
+
let t4;
|
|
69
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
70
|
+
t4 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Code2, {
|
|
71
|
+
className: "h-4 w-4"
|
|
72
|
+
});
|
|
73
|
+
$[4] = t4;
|
|
74
|
+
} else t4 = $[4];
|
|
75
|
+
let t5;
|
|
76
|
+
if ($[5] !== triggerLabel) {
|
|
77
|
+
t5 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(sheet_cjs_namespaceObject.SheetTrigger, {
|
|
78
|
+
asChild: true,
|
|
79
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(button_cjs_namespaceObject.Button, {
|
|
80
|
+
variant: "outline",
|
|
81
|
+
size: "sm",
|
|
82
|
+
className: "gap-2",
|
|
83
|
+
children: [
|
|
84
|
+
t4,
|
|
85
|
+
triggerLabel
|
|
86
|
+
]
|
|
87
|
+
})
|
|
88
|
+
});
|
|
89
|
+
$[5] = triggerLabel;
|
|
90
|
+
$[6] = t5;
|
|
91
|
+
} else t5 = $[6];
|
|
92
|
+
let t6;
|
|
93
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
94
|
+
t6 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
95
|
+
children: "Schema JSON"
|
|
96
|
+
});
|
|
97
|
+
$[7] = t6;
|
|
98
|
+
} else t6 = $[7];
|
|
99
|
+
let t7;
|
|
100
|
+
if ($[8] !== copied) {
|
|
101
|
+
t7 = copied ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Check, {
|
|
102
|
+
className: "h-4 w-4"
|
|
103
|
+
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Copy, {
|
|
104
|
+
className: "h-4 w-4"
|
|
105
|
+
});
|
|
106
|
+
$[8] = copied;
|
|
107
|
+
$[9] = t7;
|
|
108
|
+
} else t7 = $[9];
|
|
109
|
+
const t8 = copied ? "Copied!" : "Copy";
|
|
110
|
+
let t9;
|
|
111
|
+
if ($[10] !== handleCopy || $[11] !== t7 || $[12] !== t8) {
|
|
112
|
+
t9 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(sheet_cjs_namespaceObject.SheetTitle, {
|
|
113
|
+
className: "flex items-center gap-2",
|
|
114
|
+
children: [
|
|
115
|
+
t6,
|
|
116
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(button_cjs_namespaceObject.Button, {
|
|
57
117
|
variant: "outline",
|
|
58
118
|
size: "sm",
|
|
119
|
+
onClick: handleCopy,
|
|
59
120
|
className: "gap-2",
|
|
60
121
|
children: [
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}),
|
|
64
|
-
triggerLabel
|
|
122
|
+
t7,
|
|
123
|
+
t8
|
|
65
124
|
]
|
|
66
125
|
})
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(scroll_area_cjs_namespaceObject.ScrollArea, {
|
|
102
|
-
className: "mt-4 h-[calc(100vh-10rem)] rounded-md border bg-muted/50",
|
|
103
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("pre", {
|
|
104
|
-
className: "p-2 text-sm font-mono whitespace-pre-wrap break-words",
|
|
105
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("code", {
|
|
106
|
-
children: jsonString
|
|
107
|
-
})
|
|
108
|
-
})
|
|
109
|
-
})
|
|
110
|
-
]
|
|
126
|
+
]
|
|
127
|
+
});
|
|
128
|
+
$[10] = handleCopy;
|
|
129
|
+
$[11] = t7;
|
|
130
|
+
$[12] = t8;
|
|
131
|
+
$[13] = t9;
|
|
132
|
+
} else t9 = $[13];
|
|
133
|
+
let t10;
|
|
134
|
+
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
135
|
+
t10 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(sheet_cjs_namespaceObject.SheetDescription, {
|
|
136
|
+
children: "JSON representation of the form schema."
|
|
137
|
+
});
|
|
138
|
+
$[14] = t10;
|
|
139
|
+
} else t10 = $[14];
|
|
140
|
+
let t11;
|
|
141
|
+
if ($[15] !== t9) {
|
|
142
|
+
t11 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(sheet_cjs_namespaceObject.SheetHeader, {
|
|
143
|
+
children: [
|
|
144
|
+
t9,
|
|
145
|
+
t10
|
|
146
|
+
]
|
|
147
|
+
});
|
|
148
|
+
$[15] = t9;
|
|
149
|
+
$[16] = t11;
|
|
150
|
+
} else t11 = $[16];
|
|
151
|
+
let t12;
|
|
152
|
+
if ($[17] !== jsonString) {
|
|
153
|
+
t12 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(scroll_area_cjs_namespaceObject.ScrollArea, {
|
|
154
|
+
className: "mt-4 h-[calc(100vh-10rem)] rounded-md border bg-muted/50",
|
|
155
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("pre", {
|
|
156
|
+
className: "p-2 text-sm font-mono whitespace-pre-wrap break-words",
|
|
157
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("code", {
|
|
158
|
+
children: jsonString
|
|
159
|
+
})
|
|
111
160
|
})
|
|
112
|
-
|
|
113
|
-
|
|
161
|
+
});
|
|
162
|
+
$[17] = jsonString;
|
|
163
|
+
$[18] = t12;
|
|
164
|
+
} else t12 = $[18];
|
|
165
|
+
let t13;
|
|
166
|
+
if ($[19] !== t11 || $[20] !== t12) {
|
|
167
|
+
t13 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(sheet_cjs_namespaceObject.SheetContent, {
|
|
168
|
+
side: "right",
|
|
169
|
+
className: "w-full sm:max-w-2xl",
|
|
170
|
+
children: [
|
|
171
|
+
t11,
|
|
172
|
+
t12
|
|
173
|
+
]
|
|
174
|
+
});
|
|
175
|
+
$[19] = t11;
|
|
176
|
+
$[20] = t12;
|
|
177
|
+
$[21] = t13;
|
|
178
|
+
} else t13 = $[21];
|
|
179
|
+
let t14;
|
|
180
|
+
if ($[22] !== t13 || $[23] !== t5) {
|
|
181
|
+
t14 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(sheet_cjs_namespaceObject.Sheet, {
|
|
182
|
+
children: [
|
|
183
|
+
t5,
|
|
184
|
+
t13
|
|
185
|
+
]
|
|
186
|
+
});
|
|
187
|
+
$[22] = t13;
|
|
188
|
+
$[23] = t5;
|
|
189
|
+
$[24] = t14;
|
|
190
|
+
} else t14 = $[24];
|
|
191
|
+
return t14;
|
|
114
192
|
}
|
|
115
193
|
function withSchemaViewer(WrappedComponent) {
|
|
116
194
|
return function(props) {
|
|
@@ -130,19 +208,34 @@ function withSchemaViewer(WrappedComponent) {
|
|
|
130
208
|
});
|
|
131
209
|
};
|
|
132
210
|
}
|
|
133
|
-
function FormWithSchemaViewer(
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
})
|
|
143
|
-
|
|
144
|
-
]
|
|
145
|
-
|
|
211
|
+
function FormWithSchemaViewer(t0) {
|
|
212
|
+
const $ = (0, compiler_runtime_namespaceObject.c)(5);
|
|
213
|
+
const { schema, children } = t0;
|
|
214
|
+
let t1;
|
|
215
|
+
if ($[0] !== schema) {
|
|
216
|
+
t1 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
217
|
+
className: "flex justify-end",
|
|
218
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(SchemaViewer, {
|
|
219
|
+
schema: schema
|
|
220
|
+
})
|
|
221
|
+
});
|
|
222
|
+
$[0] = schema;
|
|
223
|
+
$[1] = t1;
|
|
224
|
+
} else t1 = $[1];
|
|
225
|
+
let t2;
|
|
226
|
+
if ($[2] !== children || $[3] !== t1) {
|
|
227
|
+
t2 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
228
|
+
className: "space-y-4",
|
|
229
|
+
children: [
|
|
230
|
+
t1,
|
|
231
|
+
children
|
|
232
|
+
]
|
|
233
|
+
});
|
|
234
|
+
$[2] = children;
|
|
235
|
+
$[3] = t1;
|
|
236
|
+
$[4] = t2;
|
|
237
|
+
} else t2 = $[4];
|
|
238
|
+
return t2;
|
|
146
239
|
}
|
|
147
240
|
exports.FormWithSchemaViewer = __webpack_exports__.FormWithSchemaViewer;
|
|
148
241
|
exports.SchemaViewer = __webpack_exports__.SchemaViewer;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
2
3
|
import { useState } from "react";
|
|
3
4
|
import { Check, Code2, Copy } from "lucide-react";
|
|
4
5
|
import { toast } from "sonner";
|
|
@@ -6,81 +7,158 @@ import { schemaToJson } from "./schema-serializer.js";
|
|
|
6
7
|
import { Button } from "../ui/button.js";
|
|
7
8
|
import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle, SheetTrigger } from "../ui/sheet.js";
|
|
8
9
|
import { ScrollArea } from "../ui/scroll-area.js";
|
|
9
|
-
function SchemaViewer(
|
|
10
|
+
function SchemaViewer(t0) {
|
|
11
|
+
const $ = c(25);
|
|
12
|
+
const { schema, triggerLabel: t1 } = t0;
|
|
13
|
+
const triggerLabel = void 0 === t1 ? "View Schema" : t1;
|
|
10
14
|
const [copied, setCopied] = useState(false);
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
15
|
+
let t2;
|
|
16
|
+
if ($[0] !== schema) {
|
|
17
|
+
t2 = schemaToJson(schema);
|
|
18
|
+
$[0] = schema;
|
|
19
|
+
$[1] = t2;
|
|
20
|
+
} else t2 = $[1];
|
|
21
|
+
const jsonString = t2;
|
|
22
|
+
let t3;
|
|
23
|
+
if ($[2] !== jsonString) {
|
|
24
|
+
t3 = async ()=>{
|
|
25
|
+
try {
|
|
26
|
+
await navigator.clipboard.writeText(jsonString);
|
|
27
|
+
setCopied(true);
|
|
28
|
+
toast.success("Schema copied to clipboard");
|
|
29
|
+
setTimeout(()=>setCopied(false), 2000);
|
|
30
|
+
} catch {
|
|
31
|
+
toast.error("Failed to copy schema");
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
$[2] = jsonString;
|
|
35
|
+
$[3] = t3;
|
|
36
|
+
} else t3 = $[3];
|
|
37
|
+
const handleCopy = t3;
|
|
38
|
+
let t4;
|
|
39
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
40
|
+
t4 = /*#__PURE__*/ jsx(Code2, {
|
|
41
|
+
className: "h-4 w-4"
|
|
42
|
+
});
|
|
43
|
+
$[4] = t4;
|
|
44
|
+
} else t4 = $[4];
|
|
45
|
+
let t5;
|
|
46
|
+
if ($[5] !== triggerLabel) {
|
|
47
|
+
t5 = /*#__PURE__*/ jsx(SheetTrigger, {
|
|
48
|
+
asChild: true,
|
|
49
|
+
children: /*#__PURE__*/ jsxs(Button, {
|
|
50
|
+
variant: "outline",
|
|
51
|
+
size: "sm",
|
|
52
|
+
className: "gap-2",
|
|
53
|
+
children: [
|
|
54
|
+
t4,
|
|
55
|
+
triggerLabel
|
|
56
|
+
]
|
|
57
|
+
})
|
|
58
|
+
});
|
|
59
|
+
$[5] = triggerLabel;
|
|
60
|
+
$[6] = t5;
|
|
61
|
+
} else t5 = $[6];
|
|
62
|
+
let t6;
|
|
63
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
64
|
+
t6 = /*#__PURE__*/ jsx("span", {
|
|
65
|
+
children: "Schema JSON"
|
|
66
|
+
});
|
|
67
|
+
$[7] = t6;
|
|
68
|
+
} else t6 = $[7];
|
|
69
|
+
let t7;
|
|
70
|
+
if ($[8] !== copied) {
|
|
71
|
+
t7 = copied ? /*#__PURE__*/ jsx(Check, {
|
|
72
|
+
className: "h-4 w-4"
|
|
73
|
+
}) : /*#__PURE__*/ jsx(Copy, {
|
|
74
|
+
className: "h-4 w-4"
|
|
75
|
+
});
|
|
76
|
+
$[8] = copied;
|
|
77
|
+
$[9] = t7;
|
|
78
|
+
} else t7 = $[9];
|
|
79
|
+
const t8 = copied ? "Copied!" : "Copy";
|
|
80
|
+
let t9;
|
|
81
|
+
if ($[10] !== handleCopy || $[11] !== t7 || $[12] !== t8) {
|
|
82
|
+
t9 = /*#__PURE__*/ jsxs(SheetTitle, {
|
|
83
|
+
className: "flex items-center gap-2",
|
|
84
|
+
children: [
|
|
85
|
+
t6,
|
|
86
|
+
/*#__PURE__*/ jsxs(Button, {
|
|
27
87
|
variant: "outline",
|
|
28
88
|
size: "sm",
|
|
89
|
+
onClick: handleCopy,
|
|
29
90
|
className: "gap-2",
|
|
30
91
|
children: [
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}),
|
|
34
|
-
triggerLabel
|
|
92
|
+
t7,
|
|
93
|
+
t8
|
|
35
94
|
]
|
|
36
95
|
})
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
/*#__PURE__*/ jsx(ScrollArea, {
|
|
72
|
-
className: "mt-4 h-[calc(100vh-10rem)] rounded-md border bg-muted/50",
|
|
73
|
-
children: /*#__PURE__*/ jsx("pre", {
|
|
74
|
-
className: "p-2 text-sm font-mono whitespace-pre-wrap break-words",
|
|
75
|
-
children: /*#__PURE__*/ jsx("code", {
|
|
76
|
-
children: jsonString
|
|
77
|
-
})
|
|
78
|
-
})
|
|
79
|
-
})
|
|
80
|
-
]
|
|
96
|
+
]
|
|
97
|
+
});
|
|
98
|
+
$[10] = handleCopy;
|
|
99
|
+
$[11] = t7;
|
|
100
|
+
$[12] = t8;
|
|
101
|
+
$[13] = t9;
|
|
102
|
+
} else t9 = $[13];
|
|
103
|
+
let t10;
|
|
104
|
+
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
105
|
+
t10 = /*#__PURE__*/ jsx(SheetDescription, {
|
|
106
|
+
children: "JSON representation of the form schema."
|
|
107
|
+
});
|
|
108
|
+
$[14] = t10;
|
|
109
|
+
} else t10 = $[14];
|
|
110
|
+
let t11;
|
|
111
|
+
if ($[15] !== t9) {
|
|
112
|
+
t11 = /*#__PURE__*/ jsxs(SheetHeader, {
|
|
113
|
+
children: [
|
|
114
|
+
t9,
|
|
115
|
+
t10
|
|
116
|
+
]
|
|
117
|
+
});
|
|
118
|
+
$[15] = t9;
|
|
119
|
+
$[16] = t11;
|
|
120
|
+
} else t11 = $[16];
|
|
121
|
+
let t12;
|
|
122
|
+
if ($[17] !== jsonString) {
|
|
123
|
+
t12 = /*#__PURE__*/ jsx(ScrollArea, {
|
|
124
|
+
className: "mt-4 h-[calc(100vh-10rem)] rounded-md border bg-muted/50",
|
|
125
|
+
children: /*#__PURE__*/ jsx("pre", {
|
|
126
|
+
className: "p-2 text-sm font-mono whitespace-pre-wrap break-words",
|
|
127
|
+
children: /*#__PURE__*/ jsx("code", {
|
|
128
|
+
children: jsonString
|
|
129
|
+
})
|
|
81
130
|
})
|
|
82
|
-
|
|
83
|
-
|
|
131
|
+
});
|
|
132
|
+
$[17] = jsonString;
|
|
133
|
+
$[18] = t12;
|
|
134
|
+
} else t12 = $[18];
|
|
135
|
+
let t13;
|
|
136
|
+
if ($[19] !== t11 || $[20] !== t12) {
|
|
137
|
+
t13 = /*#__PURE__*/ jsxs(SheetContent, {
|
|
138
|
+
side: "right",
|
|
139
|
+
className: "w-full sm:max-w-2xl",
|
|
140
|
+
children: [
|
|
141
|
+
t11,
|
|
142
|
+
t12
|
|
143
|
+
]
|
|
144
|
+
});
|
|
145
|
+
$[19] = t11;
|
|
146
|
+
$[20] = t12;
|
|
147
|
+
$[21] = t13;
|
|
148
|
+
} else t13 = $[21];
|
|
149
|
+
let t14;
|
|
150
|
+
if ($[22] !== t13 || $[23] !== t5) {
|
|
151
|
+
t14 = /*#__PURE__*/ jsxs(Sheet, {
|
|
152
|
+
children: [
|
|
153
|
+
t5,
|
|
154
|
+
t13
|
|
155
|
+
]
|
|
156
|
+
});
|
|
157
|
+
$[22] = t13;
|
|
158
|
+
$[23] = t5;
|
|
159
|
+
$[24] = t14;
|
|
160
|
+
} else t14 = $[24];
|
|
161
|
+
return t14;
|
|
84
162
|
}
|
|
85
163
|
function withSchemaViewer(WrappedComponent) {
|
|
86
164
|
return function(props) {
|
|
@@ -100,18 +178,33 @@ function withSchemaViewer(WrappedComponent) {
|
|
|
100
178
|
});
|
|
101
179
|
};
|
|
102
180
|
}
|
|
103
|
-
function FormWithSchemaViewer(
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
})
|
|
113
|
-
|
|
114
|
-
]
|
|
115
|
-
|
|
181
|
+
function FormWithSchemaViewer(t0) {
|
|
182
|
+
const $ = c(5);
|
|
183
|
+
const { schema, children } = t0;
|
|
184
|
+
let t1;
|
|
185
|
+
if ($[0] !== schema) {
|
|
186
|
+
t1 = /*#__PURE__*/ jsx("div", {
|
|
187
|
+
className: "flex justify-end",
|
|
188
|
+
children: /*#__PURE__*/ jsx(SchemaViewer, {
|
|
189
|
+
schema: schema
|
|
190
|
+
})
|
|
191
|
+
});
|
|
192
|
+
$[0] = schema;
|
|
193
|
+
$[1] = t1;
|
|
194
|
+
} else t1 = $[1];
|
|
195
|
+
let t2;
|
|
196
|
+
if ($[2] !== children || $[3] !== t1) {
|
|
197
|
+
t2 = /*#__PURE__*/ jsxs("div", {
|
|
198
|
+
className: "space-y-4",
|
|
199
|
+
children: [
|
|
200
|
+
t1,
|
|
201
|
+
children
|
|
202
|
+
]
|
|
203
|
+
});
|
|
204
|
+
$[2] = children;
|
|
205
|
+
$[3] = t1;
|
|
206
|
+
$[4] = t2;
|
|
207
|
+
} else t2 = $[4];
|
|
208
|
+
return t2;
|
|
116
209
|
}
|
|
117
210
|
export { FormWithSchemaViewer, SchemaViewer, withSchemaViewer };
|