@djangocfg/ui-tools 2.1.335 → 2.1.337
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +68 -2
- package/dist/ChatRoot-PNNGQCYF.css +7 -0
- package/dist/ChatRoot-PNNGQCYF.css.map +1 -0
- package/dist/ChatRoot-XV2QXMV4.mjs +5 -0
- package/dist/ChatRoot-XV2QXMV4.mjs.map +1 -0
- package/dist/ChatRoot-YX4RLHQX.cjs +14 -0
- package/dist/ChatRoot-YX4RLHQX.cjs.map +1 -0
- package/dist/{CronScheduler.client-3O3VU4CI.mjs → CronScheduler.client-DLMXCPAJ.mjs} +4 -4
- package/dist/{CronScheduler.client-3O3VU4CI.mjs.map → CronScheduler.client-DLMXCPAJ.mjs.map} +1 -1
- package/dist/{CronScheduler.client-A4GO6YBY.cjs → CronScheduler.client-WEJF4PWQ.cjs} +14 -14
- package/dist/{CronScheduler.client-A4GO6YBY.cjs.map → CronScheduler.client-WEJF4PWQ.cjs.map} +1 -1
- package/dist/{DocsLayout-XLDB6CJ2.cjs → DocsLayout-N5ZJZPBY.cjs} +200 -199
- package/dist/DocsLayout-N5ZJZPBY.cjs.map +1 -0
- package/dist/{DocsLayout-CTJINVBM.mjs → DocsLayout-VFPPNKSQ.mjs} +7 -6
- package/dist/DocsLayout-VFPPNKSQ.mjs.map +1 -0
- package/dist/JsonSchemaForm-DD7CLRIG.cjs +13 -0
- package/dist/{JsonSchemaForm-6WMS4CIY.cjs.map → JsonSchemaForm-DD7CLRIG.cjs.map} +1 -1
- package/dist/JsonSchemaForm-XKUIVELK.mjs +4 -0
- package/dist/{JsonSchemaForm-KX4JT3M4.mjs.map → JsonSchemaForm-XKUIVELK.mjs.map} +1 -1
- package/dist/JsonTree-55625VVH.mjs +5 -0
- package/dist/{JsonTree-F27RMYSI.cjs.map → JsonTree-55625VVH.mjs.map} +1 -1
- package/dist/JsonTree-DCM5QGWF.cjs +11 -0
- package/dist/{JsonTree-QTJYSHCV.mjs.map → JsonTree-DCM5QGWF.cjs.map} +1 -1
- package/dist/{LottiePlayer.client-6WVWDO75.cjs → LottiePlayer.client-2S7ISJ2S.cjs} +6 -6
- package/dist/{LottiePlayer.client-6WVWDO75.cjs.map → LottiePlayer.client-2S7ISJ2S.cjs.map} +1 -1
- package/dist/{LottiePlayer.client-B4I6WNZM.mjs → LottiePlayer.client-5LDSSJWS.mjs} +4 -4
- package/dist/{LottiePlayer.client-B4I6WNZM.mjs.map → LottiePlayer.client-5LDSSJWS.mjs.map} +1 -1
- package/dist/{MapContainer-RYG4HPH4.cjs → MapContainer-76YL2JXL.cjs} +8 -8
- package/dist/{MapContainer-RYG4HPH4.cjs.map → MapContainer-76YL2JXL.cjs.map} +1 -1
- package/dist/{MapContainer-GXQLP5WY.mjs → MapContainer-7HXBI3OH.mjs} +3 -3
- package/dist/{MapContainer-GXQLP5WY.mjs.map → MapContainer-7HXBI3OH.mjs.map} +1 -1
- package/dist/{Mermaid.client-SXRRI2YW.mjs → Mermaid.client-NL4SVR7F.mjs} +4 -4
- package/dist/{Mermaid.client-SXRRI2YW.mjs.map → Mermaid.client-NL4SVR7F.mjs.map} +1 -1
- package/dist/{Mermaid.client-W76R5AKJ.cjs → Mermaid.client-NNTI6DFX.cjs} +26 -26
- package/dist/{Mermaid.client-W76R5AKJ.cjs.map → Mermaid.client-NNTI6DFX.cjs.map} +1 -1
- package/dist/Player-BRV7XTWR.mjs +4 -0
- package/dist/{Player-M3GC3VPE.mjs.map → Player-BRV7XTWR.mjs.map} +1 -1
- package/dist/Player-PM7F7DD7.cjs +13 -0
- package/dist/{Player-ZL2X5LGG.cjs.map → Player-PM7F7DD7.cjs.map} +1 -1
- package/dist/{PrettyCode.client-RPDIE5CH.cjs → PrettyCode.client-KOHDVPPN.cjs} +13 -13
- package/dist/{PrettyCode.client-RPDIE5CH.cjs.map → PrettyCode.client-KOHDVPPN.cjs.map} +1 -1
- package/dist/{PrettyCode.client-SPMTQEG4.mjs → PrettyCode.client-ZGYGKE7G.mjs} +4 -4
- package/dist/{PrettyCode.client-SPMTQEG4.mjs.map → PrettyCode.client-ZGYGKE7G.mjs.map} +1 -1
- package/dist/TreeRoot-N72OYKXU.cjs +19 -0
- package/dist/{TreeRoot-A3J65L6F.mjs.map → TreeRoot-N72OYKXU.cjs.map} +1 -1
- package/dist/TreeRoot-VGAIXCUA.mjs +4 -0
- package/dist/{TreeRoot-DSK5JILT.cjs.map → TreeRoot-VGAIXCUA.mjs.map} +1 -1
- package/dist/chunk-2ZLKZ5VR.mjs +631 -0
- package/dist/chunk-2ZLKZ5VR.mjs.map +1 -0
- package/dist/{chunk-LFWQ36LJ.mjs → chunk-5G5YBFS6.mjs} +4 -4
- package/dist/{chunk-LFWQ36LJ.mjs.map → chunk-5G5YBFS6.mjs.map} +1 -1
- package/dist/{chunk-IHAY6FO6.cjs → chunk-5I5QNGUG.cjs} +17 -17
- package/dist/{chunk-IHAY6FO6.cjs.map → chunk-5I5QNGUG.cjs.map} +1 -1
- package/dist/{chunk-F2CMIIOH.cjs → chunk-76NNDZH6.cjs} +42 -42
- package/dist/{chunk-F2CMIIOH.cjs.map → chunk-76NNDZH6.cjs.map} +1 -1
- package/dist/chunk-B5AWZOHJ.cjs +649 -0
- package/dist/chunk-B5AWZOHJ.cjs.map +1 -0
- package/dist/{chunk-KR6B3LVY.mjs → chunk-B6IR5KSC.mjs} +3 -3
- package/dist/{chunk-KR6B3LVY.mjs.map → chunk-B6IR5KSC.mjs.map} +1 -1
- package/dist/{chunk-5LBDYFWH.mjs → chunk-C6GXVH5J.mjs} +3 -3
- package/dist/{chunk-5LBDYFWH.mjs.map → chunk-C6GXVH5J.mjs.map} +1 -1
- package/dist/{chunk-NRKD4F5X.cjs → chunk-FEN5S772.cjs} +36 -36
- package/dist/{chunk-NRKD4F5X.cjs.map → chunk-FEN5S772.cjs.map} +1 -1
- package/dist/{chunk-2SMCH62O.cjs → chunk-FP2RLYQZ.cjs} +11 -11
- package/dist/{chunk-2SMCH62O.cjs.map → chunk-FP2RLYQZ.cjs.map} +1 -1
- package/dist/{chunk-MOME6KYD.mjs → chunk-G5IEC7SR.mjs} +3 -3
- package/dist/{chunk-MOME6KYD.mjs.map → chunk-G5IEC7SR.mjs.map} +1 -1
- package/dist/{chunk-SE5IERVH.mjs → chunk-GYIO7W7M.mjs} +3 -3
- package/dist/{chunk-SE5IERVH.mjs.map → chunk-GYIO7W7M.mjs.map} +1 -1
- package/dist/{chunk-3Z3A7FHA.cjs → chunk-IEEAENLX.cjs} +48 -48
- package/dist/{chunk-3Z3A7FHA.cjs.map → chunk-IEEAENLX.cjs.map} +1 -1
- package/dist/{chunk-DFTVB66S.cjs → chunk-KNDLV4PI.cjs} +85 -85
- package/dist/{chunk-DFTVB66S.cjs.map → chunk-KNDLV4PI.cjs.map} +1 -1
- package/dist/{chunk-SSUOENAZ.mjs → chunk-KNEQRUBA.mjs} +3 -3
- package/dist/{chunk-SSUOENAZ.mjs.map → chunk-KNEQRUBA.mjs.map} +1 -1
- package/dist/{chunk-CGILA3WO.mjs → chunk-N2XQF2OL.mjs} +5 -3
- package/dist/{chunk-CGILA3WO.mjs.map → chunk-N2XQF2OL.mjs.map} +1 -1
- package/dist/{chunk-EUADAUBQ.mjs → chunk-N4MZYNR4.mjs} +4 -4
- package/dist/{chunk-EUADAUBQ.mjs.map → chunk-N4MZYNR4.mjs.map} +1 -1
- package/dist/{chunk-GGKGH5PM.mjs → chunk-OBRSGM64.mjs} +4 -4
- package/dist/{chunk-GGKGH5PM.mjs.map → chunk-OBRSGM64.mjs.map} +1 -1
- package/dist/{chunk-6JTB2X72.mjs → chunk-ODO4GMW7.mjs} +3 -3
- package/dist/{chunk-6JTB2X72.mjs.map → chunk-ODO4GMW7.mjs.map} +1 -1
- package/dist/{chunk-WGEGR3DF.cjs → chunk-OLISEQHS.cjs} +5 -2
- package/dist/{chunk-WGEGR3DF.cjs.map → chunk-OLISEQHS.cjs.map} +1 -1
- package/dist/{chunk-PZKAH7WQ.mjs → chunk-PVAX67JG.mjs} +3 -3
- package/dist/{chunk-PZKAH7WQ.mjs.map → chunk-PVAX67JG.mjs.map} +1 -1
- package/dist/{chunk-PRPG2T2E.cjs → chunk-QJ6GTUCO.cjs} +6 -6
- package/dist/{chunk-PRPG2T2E.cjs.map → chunk-QJ6GTUCO.cjs.map} +1 -1
- package/dist/chunk-QW4RBGHN.cjs +961 -0
- package/dist/chunk-QW4RBGHN.cjs.map +1 -0
- package/dist/{chunk-33AMWFBZ.cjs → chunk-SGP7V2UW.cjs} +15 -15
- package/dist/{chunk-33AMWFBZ.cjs.map → chunk-SGP7V2UW.cjs.map} +1 -1
- package/dist/{chunk-FX2QFYWF.mjs → chunk-VWQ5WOIL.mjs} +3 -3
- package/dist/{chunk-FX2QFYWF.mjs.map → chunk-VWQ5WOIL.mjs.map} +1 -1
- package/dist/{chunk-ZLQHUZDU.cjs → chunk-YDPDTOSP.cjs} +139 -139
- package/dist/{chunk-ZLQHUZDU.cjs.map → chunk-YDPDTOSP.cjs.map} +1 -1
- package/dist/{chunk-77HQWEQ6.cjs → chunk-YW5IVWHQ.cjs} +33 -33
- package/dist/{chunk-77HQWEQ6.cjs.map → chunk-YW5IVWHQ.cjs.map} +1 -1
- package/dist/chunk-YWSQDBNU.mjs +2339 -0
- package/dist/chunk-YWSQDBNU.mjs.map +1 -0
- package/dist/{chunk-YXBOAGIM.cjs → chunk-YXZ6GU7H.cjs} +7 -7
- package/dist/{chunk-YXBOAGIM.cjs.map → chunk-YXZ6GU7H.cjs.map} +1 -1
- package/dist/{chunk-62Y65TGK.mjs → chunk-ZUFTH5IR.mjs} +8 -631
- package/dist/chunk-ZUFTH5IR.mjs.map +1 -0
- package/dist/chunk-ZWPBBAR2.cjs +2379 -0
- package/dist/chunk-ZWPBBAR2.cjs.map +1 -0
- package/dist/components-EHOGXATG.cjs +22 -0
- package/dist/{components-5UXYNAKR.cjs.map → components-EHOGXATG.cjs.map} +1 -1
- package/dist/components-MQ6DR7TX.cjs +26 -0
- package/dist/{components-CFXOEVPN.mjs.map → components-MQ6DR7TX.cjs.map} +1 -1
- package/dist/components-XRX7QGLB.mjs +5 -0
- package/dist/{components-WYEZL5TE.cjs.map → components-XRX7QGLB.mjs.map} +1 -1
- package/dist/components-YATKRWLH.mjs +5 -0
- package/dist/{components-ZAGG2PBO.mjs.map → components-YATKRWLH.mjs.map} +1 -1
- package/dist/file-icon/index.cjs +6 -6
- package/dist/file-icon/index.mjs +1 -1
- package/dist/index.cjs +739 -215
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1025 -39
- package/dist/index.d.ts +1025 -39
- package/dist/index.mjs +387 -31
- package/dist/index.mjs.map +1 -1
- package/dist/tree/index.cjs +38 -38
- package/dist/tree/index.d.cts +2 -2
- package/dist/tree/index.d.ts +2 -2
- package/dist/tree/index.mjs +3 -3
- package/package.json +6 -6
- package/src/index.ts +5 -0
- package/src/stories/index.ts +3 -1
- package/src/tools/Chat/Chat.story.tsx +1006 -0
- package/src/tools/Chat/README.md +528 -0
- package/src/tools/Chat/components/Attachments.tsx +192 -0
- package/src/tools/Chat/components/ChatRoot.tsx +208 -0
- package/src/tools/Chat/components/Composer.tsx +134 -0
- package/src/tools/Chat/components/EmptyState.tsx +47 -0
- package/src/tools/Chat/components/ErrorBanner.tsx +47 -0
- package/src/tools/Chat/components/JumpToLatest.tsx +30 -0
- package/src/tools/Chat/components/MessageActions.tsx +72 -0
- package/src/tools/Chat/components/MessageBubble.tsx +228 -0
- package/src/tools/Chat/components/MessageList.tsx +82 -0
- package/src/tools/Chat/components/Sources.tsx +55 -0
- package/src/tools/Chat/components/StreamingIndicator.tsx +29 -0
- package/src/tools/Chat/components/ToolCalls.tsx +172 -0
- package/src/tools/Chat/components/index.ts +24 -0
- package/src/tools/Chat/config.ts +55 -0
- package/src/tools/Chat/context/ChatProvider.tsx +126 -0
- package/src/tools/Chat/context/index.ts +9 -0
- package/src/tools/Chat/core/audio/audioBus.ts +172 -0
- package/src/tools/Chat/core/audio/index.ts +8 -0
- package/src/tools/Chat/core/audio/preferences.ts +68 -0
- package/src/tools/Chat/core/audio/types.ts +49 -0
- package/src/tools/Chat/core/ids.ts +16 -0
- package/src/tools/Chat/core/index.ts +5 -0
- package/src/tools/Chat/core/logger.ts +73 -0
- package/src/tools/Chat/core/markdown.ts +56 -0
- package/src/tools/Chat/core/payload-dispatch.ts +54 -0
- package/src/tools/Chat/core/persona.ts +35 -0
- package/src/tools/Chat/core/reducer.ts +335 -0
- package/src/tools/Chat/core/transport/http.ts +167 -0
- package/src/tools/Chat/core/transport/index.ts +13 -0
- package/src/tools/Chat/core/transport/mock.ts +134 -0
- package/src/tools/Chat/core/transport/sse.ts +116 -0
- package/src/tools/Chat/core/transport/types.ts +24 -0
- package/src/tools/Chat/hooks/index.ts +26 -0
- package/src/tools/Chat/hooks/useChat.ts +555 -0
- package/src/tools/Chat/hooks/useChatAudio.ts +191 -0
- package/src/tools/Chat/hooks/useChatComposer.ts +227 -0
- package/src/tools/Chat/hooks/useChatHistory.ts +59 -0
- package/src/tools/Chat/hooks/useChatLayout.ts +111 -0
- package/src/tools/Chat/hooks/useChatLightbox.ts +34 -0
- package/src/tools/Chat/hooks/useChatScroll.ts +132 -0
- package/src/tools/Chat/index.ts +161 -0
- package/src/tools/Chat/lazy.tsx +14 -0
- package/src/tools/Chat/types.ts +237 -0
- package/src/tools/Chat/utils/collectImageAttachments.ts +13 -0
- package/src/tools/Map/README.md +384 -0
- package/dist/DocsLayout-CTJINVBM.mjs.map +0 -1
- package/dist/DocsLayout-XLDB6CJ2.cjs.map +0 -1
- package/dist/JsonSchemaForm-6WMS4CIY.cjs +0 -13
- package/dist/JsonSchemaForm-KX4JT3M4.mjs +0 -4
- package/dist/JsonTree-F27RMYSI.cjs +0 -11
- package/dist/JsonTree-QTJYSHCV.mjs +0 -5
- package/dist/Player-M3GC3VPE.mjs +0 -4
- package/dist/Player-ZL2X5LGG.cjs +0 -13
- package/dist/TreeRoot-A3J65L6F.mjs +0 -4
- package/dist/TreeRoot-DSK5JILT.cjs +0 -19
- package/dist/chunk-62Y65TGK.mjs.map +0 -1
- package/dist/chunk-TKSFZHCG.cjs +0 -1597
- package/dist/chunk-TKSFZHCG.cjs.map +0 -1
- package/dist/components-5UXYNAKR.cjs +0 -22
- package/dist/components-CFXOEVPN.mjs +0 -5
- package/dist/components-WYEZL5TE.cjs +0 -26
- package/dist/components-ZAGG2PBO.mjs +0 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkOLISEQHS_cjs = require('./chunk-OLISEQHS.cjs');
|
|
4
4
|
var consola2 = require('consola');
|
|
5
5
|
var lib = require('@djangocfg/ui-core/lib');
|
|
6
6
|
var lucideReact = require('lucide-react');
|
|
@@ -72,7 +72,7 @@ function FieldTemplate(props) {
|
|
|
72
72
|
}
|
|
73
73
|
);
|
|
74
74
|
}
|
|
75
|
-
|
|
75
|
+
chunkOLISEQHS_cjs.__name(FieldTemplate, "FieldTemplate");
|
|
76
76
|
function ObjectFieldTemplate(props) {
|
|
77
77
|
const {
|
|
78
78
|
title,
|
|
@@ -131,7 +131,7 @@ function ObjectFieldTemplate(props) {
|
|
|
131
131
|
content
|
|
132
132
|
] });
|
|
133
133
|
}
|
|
134
|
-
|
|
134
|
+
chunkOLISEQHS_cjs.__name(ObjectFieldTemplate, "ObjectFieldTemplate");
|
|
135
135
|
function renderUiGroups({
|
|
136
136
|
properties,
|
|
137
137
|
uiGroups,
|
|
@@ -160,7 +160,7 @@ function renderUiGroups({
|
|
|
160
160
|
})
|
|
161
161
|
] });
|
|
162
162
|
}
|
|
163
|
-
|
|
163
|
+
chunkOLISEQHS_cjs.__name(renderUiGroups, "renderUiGroups");
|
|
164
164
|
function UiGroupSection({ group, gridClass, compact, children }) {
|
|
165
165
|
const [open, setOpen] = react.useState(group.defaultOpen ?? true);
|
|
166
166
|
return /* @__PURE__ */ jsxRuntime.jsxs(components.Collapsible, { open, onOpenChange: setOpen, children: [
|
|
@@ -189,7 +189,7 @@ function UiGroupSection({ group, gridClass, compact, children }) {
|
|
|
189
189
|
/* @__PURE__ */ jsxRuntime.jsx(components.CollapsibleContent, { className: "overflow-hidden data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: lib.cn("border-l border-border/40 pl-3 pb-2 pt-1", gridClass), children }) })
|
|
190
190
|
] });
|
|
191
191
|
}
|
|
192
|
-
|
|
192
|
+
chunkOLISEQHS_cjs.__name(UiGroupSection, "UiGroupSection");
|
|
193
193
|
function ArrayFieldTemplate(props) {
|
|
194
194
|
const {
|
|
195
195
|
title,
|
|
@@ -239,7 +239,7 @@ function ArrayFieldTemplate(props) {
|
|
|
239
239
|
] })
|
|
240
240
|
] });
|
|
241
241
|
}
|
|
242
|
-
|
|
242
|
+
chunkOLISEQHS_cjs.__name(ArrayFieldTemplate, "ArrayFieldTemplate");
|
|
243
243
|
function ArrayFieldItemTemplate(props) {
|
|
244
244
|
const {
|
|
245
245
|
children,
|
|
@@ -269,7 +269,7 @@ function ArrayFieldItemTemplate(props) {
|
|
|
269
269
|
}
|
|
270
270
|
);
|
|
271
271
|
}
|
|
272
|
-
|
|
272
|
+
chunkOLISEQHS_cjs.__name(ArrayFieldItemTemplate, "ArrayFieldItemTemplate");
|
|
273
273
|
function ErrorListTemplate(props) {
|
|
274
274
|
const { errors } = props;
|
|
275
275
|
if (!errors || errors.length === 0) {
|
|
@@ -281,7 +281,7 @@ function ErrorListTemplate(props) {
|
|
|
281
281
|
/* @__PURE__ */ jsxRuntime.jsx(components.AlertDescription, { children: /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "list-disc list-inside space-y-1 mt-2", children: errors.map((error, index) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: "text-sm", children: error.stack }, index)) }) })
|
|
282
282
|
] });
|
|
283
283
|
}
|
|
284
|
-
|
|
284
|
+
chunkOLISEQHS_cjs.__name(ErrorListTemplate, "ErrorListTemplate");
|
|
285
285
|
function BaseInputTemplate(props) {
|
|
286
286
|
const {
|
|
287
287
|
id,
|
|
@@ -352,7 +352,7 @@ function BaseInputTemplate(props) {
|
|
|
352
352
|
}
|
|
353
353
|
);
|
|
354
354
|
}
|
|
355
|
-
|
|
355
|
+
chunkOLISEQHS_cjs.__name(BaseInputTemplate, "BaseInputTemplate");
|
|
356
356
|
function validateSchema(schema) {
|
|
357
357
|
if (!schema || typeof schema !== "object") {
|
|
358
358
|
if (lib.isDev) {
|
|
@@ -377,7 +377,7 @@ function validateSchema(schema) {
|
|
|
377
377
|
}
|
|
378
378
|
return schema;
|
|
379
379
|
}
|
|
380
|
-
|
|
380
|
+
chunkOLISEQHS_cjs.__name(validateSchema, "validateSchema");
|
|
381
381
|
function normalizeFormData(formData, schema) {
|
|
382
382
|
if (formData === null || formData === void 0) {
|
|
383
383
|
return schema.type === "object" ? {} : schema.type === "array" ? [] : null;
|
|
@@ -385,7 +385,7 @@ function normalizeFormData(formData, schema) {
|
|
|
385
385
|
const normalized = JSON.parse(JSON.stringify(formData));
|
|
386
386
|
return removeUndefined(normalized);
|
|
387
387
|
}
|
|
388
|
-
|
|
388
|
+
chunkOLISEQHS_cjs.__name(normalizeFormData, "normalizeFormData");
|
|
389
389
|
function removeUndefined(obj) {
|
|
390
390
|
if (obj === null || obj === void 0) {
|
|
391
391
|
return obj;
|
|
@@ -404,7 +404,7 @@ function removeUndefined(obj) {
|
|
|
404
404
|
}
|
|
405
405
|
return obj;
|
|
406
406
|
}
|
|
407
|
-
|
|
407
|
+
chunkOLISEQHS_cjs.__name(removeUndefined, "removeUndefined");
|
|
408
408
|
function mergeDefaults(formData, schema) {
|
|
409
409
|
if (!schema) return formData;
|
|
410
410
|
const result = { ...formData };
|
|
@@ -421,7 +421,7 @@ function mergeDefaults(formData, schema) {
|
|
|
421
421
|
}
|
|
422
422
|
return result;
|
|
423
423
|
}
|
|
424
|
-
|
|
424
|
+
chunkOLISEQHS_cjs.__name(mergeDefaults, "mergeDefaults");
|
|
425
425
|
function safeJsonParse(jsonString, fallback) {
|
|
426
426
|
try {
|
|
427
427
|
return JSON.parse(jsonString);
|
|
@@ -430,7 +430,7 @@ function safeJsonParse(jsonString, fallback) {
|
|
|
430
430
|
return fallback;
|
|
431
431
|
}
|
|
432
432
|
}
|
|
433
|
-
|
|
433
|
+
chunkOLISEQHS_cjs.__name(safeJsonParse, "safeJsonParse");
|
|
434
434
|
function safeJsonStringify(obj, pretty = true) {
|
|
435
435
|
try {
|
|
436
436
|
return JSON.stringify(obj, null, pretty ? 2 : 0);
|
|
@@ -439,11 +439,11 @@ function safeJsonStringify(obj, pretty = true) {
|
|
|
439
439
|
return "{}";
|
|
440
440
|
}
|
|
441
441
|
}
|
|
442
|
-
|
|
442
|
+
chunkOLISEQHS_cjs.__name(safeJsonStringify, "safeJsonStringify");
|
|
443
443
|
function hasRequiredFields(schema) {
|
|
444
444
|
return Array.isArray(schema.required) && schema.required.length > 0;
|
|
445
445
|
}
|
|
446
|
-
|
|
446
|
+
chunkOLISEQHS_cjs.__name(hasRequiredFields, "hasRequiredFields");
|
|
447
447
|
function getRequiredFields(schema, prefix = "") {
|
|
448
448
|
const required = [];
|
|
449
449
|
if (schema.required && Array.isArray(schema.required)) {
|
|
@@ -460,7 +460,7 @@ function getRequiredFields(schema, prefix = "") {
|
|
|
460
460
|
}
|
|
461
461
|
return required;
|
|
462
462
|
}
|
|
463
|
-
|
|
463
|
+
chunkOLISEQHS_cjs.__name(getRequiredFields, "getRequiredFields");
|
|
464
464
|
function validateRequiredFields(formData, schema) {
|
|
465
465
|
const requiredFields = getRequiredFields(schema);
|
|
466
466
|
const missing = [];
|
|
@@ -475,11 +475,11 @@ function validateRequiredFields(formData, schema) {
|
|
|
475
475
|
missing
|
|
476
476
|
};
|
|
477
477
|
}
|
|
478
|
-
|
|
478
|
+
chunkOLISEQHS_cjs.__name(validateRequiredFields, "validateRequiredFields");
|
|
479
479
|
function getNestedValue(obj, path) {
|
|
480
480
|
return path.split(".").reduce((current, key) => current?.[key], obj);
|
|
481
481
|
}
|
|
482
|
-
|
|
482
|
+
chunkOLISEQHS_cjs.__name(getNestedValue, "getNestedValue");
|
|
483
483
|
function evaluateDisabledWhen(rule, formData) {
|
|
484
484
|
if (!rule) return false;
|
|
485
485
|
const value = getNestedValue(formData, rule.path);
|
|
@@ -491,7 +491,7 @@ function evaluateDisabledWhen(rule, formData) {
|
|
|
491
491
|
if ("falsy" in rule) return !value;
|
|
492
492
|
return false;
|
|
493
493
|
}
|
|
494
|
-
|
|
494
|
+
chunkOLISEQHS_cjs.__name(evaluateDisabledWhen, "evaluateDisabledWhen");
|
|
495
495
|
function TextWidget(props) {
|
|
496
496
|
const {
|
|
497
497
|
id,
|
|
@@ -567,7 +567,7 @@ function TextWidget(props) {
|
|
|
567
567
|
}
|
|
568
568
|
);
|
|
569
569
|
}
|
|
570
|
-
|
|
570
|
+
chunkOLISEQHS_cjs.__name(TextWidget, "TextWidget");
|
|
571
571
|
function NumberWidget(props) {
|
|
572
572
|
const {
|
|
573
573
|
id,
|
|
@@ -635,7 +635,7 @@ function NumberWidget(props) {
|
|
|
635
635
|
}
|
|
636
636
|
);
|
|
637
637
|
}
|
|
638
|
-
|
|
638
|
+
chunkOLISEQHS_cjs.__name(NumberWidget, "NumberWidget");
|
|
639
639
|
|
|
640
640
|
// src/tools/JsonForm/widgets/_useWidgetEnv.ts
|
|
641
641
|
function useWidgetEnv(props) {
|
|
@@ -652,11 +652,11 @@ function useWidgetEnv(props) {
|
|
|
652
652
|
tooltipText
|
|
653
653
|
};
|
|
654
654
|
}
|
|
655
|
-
|
|
655
|
+
chunkOLISEQHS_cjs.__name(useWidgetEnv, "useWidgetEnv");
|
|
656
656
|
function CheckboxWidget(props) {
|
|
657
657
|
const { id, value, autofocus, onChange, onBlur, onFocus } = props;
|
|
658
658
|
const { disabled, tooltipText } = useWidgetEnv(props);
|
|
659
|
-
const handleChange = /* @__PURE__ */
|
|
659
|
+
const handleChange = /* @__PURE__ */ chunkOLISEQHS_cjs.__name((checked) => {
|
|
660
660
|
onChange(checked);
|
|
661
661
|
}, "handleChange");
|
|
662
662
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -673,7 +673,7 @@ function CheckboxWidget(props) {
|
|
|
673
673
|
}
|
|
674
674
|
);
|
|
675
675
|
}
|
|
676
|
-
|
|
676
|
+
chunkOLISEQHS_cjs.__name(CheckboxWidget, "CheckboxWidget");
|
|
677
677
|
function SelectWidget(props) {
|
|
678
678
|
const {
|
|
679
679
|
id,
|
|
@@ -749,11 +749,11 @@ function SelectWidget(props) {
|
|
|
749
749
|
}
|
|
750
750
|
);
|
|
751
751
|
}
|
|
752
|
-
|
|
752
|
+
chunkOLISEQHS_cjs.__name(SelectWidget, "SelectWidget");
|
|
753
753
|
function SwitchWidget(props) {
|
|
754
754
|
const { id, value, onChange, onBlur, onFocus } = props;
|
|
755
755
|
const { disabled, tooltipText } = useWidgetEnv(props);
|
|
756
|
-
const handleChange = /* @__PURE__ */
|
|
756
|
+
const handleChange = /* @__PURE__ */ chunkOLISEQHS_cjs.__name((checked) => {
|
|
757
757
|
onChange(checked);
|
|
758
758
|
}, "handleChange");
|
|
759
759
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -769,7 +769,7 @@ function SwitchWidget(props) {
|
|
|
769
769
|
}
|
|
770
770
|
);
|
|
771
771
|
}
|
|
772
|
-
|
|
772
|
+
chunkOLISEQHS_cjs.__name(SwitchWidget, "SwitchWidget");
|
|
773
773
|
function ColorWidget(props) {
|
|
774
774
|
const {
|
|
775
775
|
id,
|
|
@@ -844,7 +844,7 @@ function ColorWidget(props) {
|
|
|
844
844
|
const h = parseInt(parts[0]) / 360;
|
|
845
845
|
const s = parseInt(parts[1].replace("%", "")) / 100;
|
|
846
846
|
const l = parseInt(parts[2].replace("%", "")) / 100;
|
|
847
|
-
const hue2rgb = /* @__PURE__ */
|
|
847
|
+
const hue2rgb = /* @__PURE__ */ chunkOLISEQHS_cjs.__name((p, q, t2) => {
|
|
848
848
|
if (t2 < 0) t2 += 1;
|
|
849
849
|
if (t2 > 1) t2 -= 1;
|
|
850
850
|
if (t2 < 1 / 6) return p + (q - p) * 6 * t2;
|
|
@@ -862,7 +862,7 @@ function ColorWidget(props) {
|
|
|
862
862
|
g = hue2rgb(p, q, h);
|
|
863
863
|
b = hue2rgb(p, q, h - 1 / 3);
|
|
864
864
|
}
|
|
865
|
-
const toHex = /* @__PURE__ */
|
|
865
|
+
const toHex = /* @__PURE__ */ chunkOLISEQHS_cjs.__name((x) => {
|
|
866
866
|
const hex = Math.round(x * 255).toString(16);
|
|
867
867
|
return hex.length === 1 ? "0" + hex : hex;
|
|
868
868
|
}, "toHex");
|
|
@@ -945,7 +945,7 @@ function ColorWidget(props) {
|
|
|
945
945
|
)
|
|
946
946
|
] });
|
|
947
947
|
}
|
|
948
|
-
|
|
948
|
+
chunkOLISEQHS_cjs.__name(ColorWidget, "ColorWidget");
|
|
949
949
|
function SliderWidget(props) {
|
|
950
950
|
const {
|
|
951
951
|
id,
|
|
@@ -1046,7 +1046,7 @@ function SliderWidget(props) {
|
|
|
1046
1046
|
}
|
|
1047
1047
|
);
|
|
1048
1048
|
}
|
|
1049
|
-
|
|
1049
|
+
chunkOLISEQHS_cjs.__name(SliderWidget, "SliderWidget");
|
|
1050
1050
|
function JsonSchemaForm(props) {
|
|
1051
1051
|
const {
|
|
1052
1052
|
schema,
|
|
@@ -1134,7 +1134,7 @@ function JsonSchemaForm(props) {
|
|
|
1134
1134
|
}
|
|
1135
1135
|
return out;
|
|
1136
1136
|
}
|
|
1137
|
-
|
|
1137
|
+
chunkOLISEQHS_cjs.__name(walk, "walk");
|
|
1138
1138
|
const cleaned = walk(uiSchema);
|
|
1139
1139
|
return dirty ? cleaned : uiSchema;
|
|
1140
1140
|
}, [uiSchema, widgets]);
|
|
@@ -1198,7 +1198,7 @@ function JsonSchemaForm(props) {
|
|
|
1198
1198
|
}
|
|
1199
1199
|
) });
|
|
1200
1200
|
}
|
|
1201
|
-
|
|
1201
|
+
chunkOLISEQHS_cjs.__name(JsonSchemaForm, "JsonSchemaForm");
|
|
1202
1202
|
|
|
1203
1203
|
exports.ArrayFieldItemTemplate = ArrayFieldItemTemplate;
|
|
1204
1204
|
exports.ArrayFieldTemplate = ArrayFieldTemplate;
|
|
@@ -1223,5 +1223,5 @@ exports.safeJsonParse = safeJsonParse;
|
|
|
1223
1223
|
exports.safeJsonStringify = safeJsonStringify;
|
|
1224
1224
|
exports.validateRequiredFields = validateRequiredFields;
|
|
1225
1225
|
exports.validateSchema = validateSchema;
|
|
1226
|
-
//# sourceMappingURL=chunk-
|
|
1227
|
-
//# sourceMappingURL=chunk-
|
|
1226
|
+
//# sourceMappingURL=chunk-FEN5S772.cjs.map
|
|
1227
|
+
//# sourceMappingURL=chunk-FEN5S772.cjs.map
|