@devtron-labs/devtron-fe-common-lib 1.17.0-pre-2 → 1.17.0-pre-5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/{@code-editor-BiT2cP4P.js → @code-editor--Yojyxhj.js} +8658 -8227
  2. package/dist/@common-rjsf-Cg83VgA6.js +609 -0
  3. package/dist/Common/Hooks/UseIsTextTruncated/UseIsTextTruncated.d.ts +5 -0
  4. package/dist/Common/Hooks/UseIsTextTruncated/constants.d.ts +1 -0
  5. package/dist/Common/Hooks/UseIsTextTruncated/index.d.ts +1 -0
  6. package/dist/Common/Hooks/index.d.ts +1 -0
  7. package/dist/Common/RJSF/constants.d.ts +0 -1
  8. package/dist/Common/Tooltip/constants.d.ts +0 -1
  9. package/dist/Pages/ResourceBrowser/ResourceBrowser.Types.d.ts +0 -1
  10. package/dist/Shared/Components/ActionMenu/types.d.ts +2 -33
  11. package/dist/Shared/Components/CollapsibleList/CollapsibleList.component.d.ts +3 -0
  12. package/dist/Shared/Components/Security/SecurityModal/config/Sidebar.d.ts +6 -3
  13. package/dist/Shared/Components/Security/SecurityModal/config/index.d.ts +1 -1
  14. package/dist/Shared/Components/Security/SecurityModal/index.d.ts +2 -2
  15. package/dist/Shared/Components/Security/SecurityModal/types.d.ts +0 -6
  16. package/dist/Shared/Components/Security/types.d.ts +5 -1
  17. package/dist/Shared/Components/SelectPicker/type.d.ts +1 -1
  18. package/dist/Shared/Components/TrailingItem/TrailingItem.component.d.ts +3 -0
  19. package/dist/Shared/Components/TrailingItem/index.d.ts +2 -0
  20. package/dist/Shared/Components/TrailingItem/types.d.ts +39 -0
  21. package/dist/Shared/Components/TreeView/TreeView.component.d.ts +3 -0
  22. package/dist/Shared/Components/TreeView/TreeViewNodeContent.d.ts +3 -0
  23. package/dist/Shared/Components/TreeView/constants.d.ts +4 -0
  24. package/dist/Shared/Components/TreeView/index.d.ts +2 -0
  25. package/dist/Shared/Components/TreeView/types.d.ts +204 -0
  26. package/dist/Shared/Components/TreeView/utils.d.ts +22 -0
  27. package/dist/Shared/Components/index.d.ts +1 -0
  28. package/dist/assets/@code-editor.css +1 -1
  29. package/dist/assets/@common-rjsf.css +1 -1
  30. package/dist/index.js +418 -414
  31. package/package.json +1 -1
  32. package/dist/@common-rjsf-Bwi_Ph8k.js +0 -595
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtron-labs/devtron-fe-common-lib",
3
- "version": "1.17.0-pre-2",
3
+ "version": "1.17.0-pre-5",
4
4
  "description": "Supporting common component library",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,595 +0,0 @@
1
- import { j as n, at as y, av as k, au as M } from "./@vendor-DbxoIktR.js";
2
- import W, { forwardRef as J, useMemo as P } from "react";
3
- import V, { getDefaultRegistry as K } from "@rjsf/core";
4
- import { T as N, j as w, c as v, b as F, S as q, i as Y, a as G, d as C, e as z } from "./@code-editor-BiT2cP4P.js";
5
- import { getUiOptions as I, getTemplate as D, getSubmitButtonOptions as Q, ADDITIONAL_PROPERTY_FLAG as B, errorId as X, englishStringTranslator as Z, TranslatableString as ee, titleId as te, canExpand as ne, deepEquals as re } from "@rjsf/utils";
6
- import { ReactComponent as se } from "./assets/ic-add.cfaa779b.svg";
7
- import { ReactComponent as ae } from "./assets/ic-warning.ecf7ff97.svg";
8
- import { ReactComponent as oe } from "./assets/ic-cross.01e03666.svg";
9
- import './assets/@common-rjsf.css';const S = {
10
- SELECT: "Please select an option",
11
- INPUT: "Please enter an input",
12
- OBJECT_KEY: "Please enter a value for the key"
13
- }, le = "Key not available", Ue = {
14
- "ui:submitButtonOptions": {
15
- norender: !0
16
- }
17
- }, $ = "rjsf-form-select-portal-target", ie = ({
18
- children: e,
19
- disabled: t,
20
- hasToolbar: s,
21
- hasRemove: r,
22
- index: a,
23
- onDropIndexClick: i,
24
- readonly: l,
25
- registry: o,
26
- uiSchema: c
27
- }) => {
28
- const { RemoveButton: d } = o.templates.ButtonTemplates;
29
- return /* @__PURE__ */ n.jsxs("div", { className: "dc__position-rel display-grid rjsf-form-template__array-field-item flex-align-center", children: [
30
- e,
31
- /* @__PURE__ */ n.jsx("div", { className: "dc__position-abs remove-btn__container", style: { right: "-28px", top: "9px" }, children: s && r && /* @__PURE__ */ n.jsx(
32
- d,
33
- {
34
- disabled: t || l,
35
- onClick: i(a),
36
- uiSchema: c,
37
- registry: o
38
- }
39
- ) })
40
- ] });
41
- }, T = ({
42
- showLabel: e,
43
- label: t,
44
- required: s,
45
- children: r,
46
- id: a,
47
- rawDescription: i,
48
- shouldAlignCenter: l = !0
49
- }) => /* @__PURE__ */ n.jsxs(
50
- "div",
51
- {
52
- className: e ? `display-grid dc__gap-12 rjsf-form-template__field ${l ? "" : "rjsf-form-template__field--align-top"}` : "",
53
- children: [
54
- e && /* @__PURE__ */ n.jsxs("label", { className: "cn-7 fs-13 lh-20 fw-4 flexbox mb-0", htmlFor: a, children: [
55
- /* @__PURE__ */ n.jsx(N, { alwaysShowTippyOnHover: !!i, content: i, children: /* @__PURE__ */ n.jsx("span", { className: `dc__ellipsis-right ${i ? "text-underline-dashed-300" : ""}`, children: t || le }) }),
56
- s && /* @__PURE__ */ n.jsx("span", { className: "cr-5", children: " *" })
57
- ] }),
58
- r
59
- ]
60
- }
61
- ), E = ({ label: e, canAdd: t, onAddClick: s, disabled: r, readonly: a, uiSchema: i, registry: l }) => {
62
- const {
63
- ButtonTemplates: { AddButton: o }
64
- } = l.templates;
65
- return t && /* @__PURE__ */ n.jsx(
66
- o,
67
- {
68
- label: e,
69
- onClick: s,
70
- disabled: r || a,
71
- uiSchema: i,
72
- registry: l
73
- }
74
- );
75
- }, ce = ({
76
- canAdd: e,
77
- className: t,
78
- disabled: s,
79
- idSchema: r,
80
- uiSchema: a,
81
- items: i,
82
- onAddClick: l,
83
- readonly: o,
84
- registry: c,
85
- required: d,
86
- title: _
87
- }) => {
88
- const u = I(a), f = D("ArrayFieldItemTemplate", c, u), m = u.title || _;
89
- return /* @__PURE__ */ n.jsx("fieldset", { className: t, id: r.$id, children: i.length ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
90
- i.map(({ key: j, ...h }, x) => {
91
- const p = {
92
- ...h.children,
93
- props: {
94
- ...h.children.props
95
- }
96
- };
97
- return /* @__PURE__ */ n.jsx(f, { ...h, children: p }, j);
98
- }),
99
- /* @__PURE__ */ n.jsx(
100
- E,
101
- {
102
- label: m,
103
- canAdd: e,
104
- onAddClick: l,
105
- disabled: s,
106
- readonly: o,
107
- uiSchema: a,
108
- registry: c
109
- }
110
- )
111
- ] }) : /* @__PURE__ */ n.jsx(T, { label: m, required: d, showLabel: !0, id: r.$id, children: /* @__PURE__ */ n.jsx(
112
- E,
113
- {
114
- label: m,
115
- canAdd: e,
116
- onAddClick: l,
117
- disabled: s,
118
- readonly: o,
119
- uiSchema: a,
120
- registry: c
121
- }
122
- ) }) });
123
- }, {
124
- templates: { BaseInputTemplate: de }
125
- } = K(), ue = ({ placeholder: e, ...t }) => /* @__PURE__ */ n.jsx(
126
- de,
127
- {
128
- placeholder: e || S.INPUT,
129
- ...t,
130
- className: "form__input cn-9 fs-13 lh-20 fw-4"
131
- }
132
- ), L = ({
133
- label: e,
134
- icon: t,
135
- iconType: s,
136
- registry: r,
137
- uiSchema: a,
138
- ...i
139
- }) => {
140
- const l = `Add ${e}`;
141
- return /* @__PURE__ */ n.jsx("div", { className: "flexbox flex-justify-start", children: /* @__PURE__ */ n.jsxs(
142
- "button",
143
- {
144
- ...i,
145
- type: "button",
146
- className: "dc__outline-none-imp p-0 dc__transparent flex dc__gap-4 cursor dc__mxw-250",
147
- title: "Add",
148
- children: [
149
- /* @__PURE__ */ n.jsx(se, { className: "icon-dim-16 fcb-5" }),
150
- /* @__PURE__ */ n.jsx(N, { placement: "right", content: l, children: /* @__PURE__ */ n.jsx("span", { className: "cb-5 fs-13 lh-34 dc__truncate", children: l }) })
151
- ]
152
- }
153
- ) });
154
- }, me = ({ icon: e, iconType: t, registry: s, uiSchema: r, ...a }) => /* @__PURE__ */ n.jsx("button", { ...a, type: "button", className: "dc__outline-none-imp p-0 dc__transparent flex cursor", title: "Remove", children: /* @__PURE__ */ n.jsx(oe, { className: "icon-dim-16 fcn-6" }) }), pe = ({ uiSchema: e }) => {
155
- const { submitText: t, norender: s, props: r = {} } = Q(e);
156
- return s ? null : /* @__PURE__ */ n.jsx("div", { className: "flexbox flex-justify-end", children: /* @__PURE__ */ n.jsx("button", { type: "submit", ...r, className: `cta ${r.className || ""}`, children: t }) });
157
- }, O = ({
158
- id: e,
159
- title: t,
160
- required: s,
161
- description: r
162
- }) => /* @__PURE__ */ n.jsxs("legend", { className: "fs-13 fw-6 cn-9 lh-20 dc__no-border pb-9 mb-0", id: e, children: [
163
- /* @__PURE__ */ n.jsx(N, { alwaysShowTippyOnHover: !!r, content: r, children: /* @__PURE__ */ n.jsx("span", { className: `${r ? "text-underline-dashed-300" : ""}`, children: t }) }),
164
- s && /* @__PURE__ */ n.jsx("span", { className: "cr-5", children: " *" })
165
- ] }), fe = (e) => {
166
- const {
167
- id: t,
168
- label: s,
169
- children: r,
170
- errors: a,
171
- hidden: i,
172
- required: l,
173
- displayLabel: o,
174
- registry: c,
175
- uiSchema: d,
176
- classNames: _,
177
- schema: u,
178
- rawDescription: f
179
- } = e, m = I(d), j = D(
180
- "WrapIfAdditionalTemplate",
181
- c,
182
- m
183
- ), h = B in u, x = (o || u.type === "boolean") && !h, p = u.type === "array";
184
- return i ? /* @__PURE__ */ n.jsx("div", { className: "hidden", children: r }) : (
185
- // NOTE: need to override the margins of default rjsf css
186
- /* @__PURE__ */ n.jsxs("div", { className: `${_} mb-0`, children: [
187
- p && /* @__PURE__ */ n.jsx(
188
- O,
189
- {
190
- id: t,
191
- title: s,
192
- required: l,
193
- registry: c,
194
- uiSchema: d,
195
- schema: u,
196
- description: f
197
- }
198
- ),
199
- /* @__PURE__ */ n.jsx(
200
- T,
201
- {
202
- label: s,
203
- showLabel: x,
204
- id: t,
205
- required: l,
206
- rawDescription: f,
207
- children: /* @__PURE__ */ n.jsx(j, { ...e, children: r })
208
- }
209
- ),
210
- a
211
- ] })
212
- );
213
- }, he = ({ errors: e = [], idSchema: t }) => {
214
- const s = X(t);
215
- return e.length > 0 && /* @__PURE__ */ n.jsx("span", { className: "display-grid rjsf-form-template__field--error dc__gap-12", id: s, children: e.filter((r) => !!r).map((r, a) => /* @__PURE__ */ n.jsxs(W.Fragment, { children: [
216
- /* @__PURE__ */ n.jsx("span", {}),
217
- /* @__PURE__ */ n.jsxs("span", { className: "form__error", children: [
218
- /* @__PURE__ */ n.jsx(ae, { className: "form__icon form__icon--error" }),
219
- r
220
- ] })
221
- ] }, a)) });
222
- }, xe = (e, t) => {
223
- switch (e) {
224
- case ee.NewStringDefault:
225
- return "";
226
- default:
227
- return Z(e, t);
228
- }
229
- }, He = (e) => {
230
- try {
231
- const t = new URL(e).origin === window.location.origin;
232
- return {
233
- href: e,
234
- target: t ? "_self" : "_blank",
235
- rel: t ? void 0 : "external noreferrer",
236
- url: e
237
- };
238
- } catch {
239
- return {
240
- href: e,
241
- target: "_blank",
242
- url: `${e} (Invalid URL)`
243
- };
244
- }
245
- }, ke = (e) => {
246
- const t = typeof e;
247
- switch (t) {
248
- case "boolean":
249
- case "string":
250
- case "number":
251
- return t;
252
- case "object":
253
- return Array.isArray(e) ? "array" : e === null ? "null" : t;
254
- default:
255
- return "null";
256
- }
257
- }, b = (e) => {
258
- if (!e)
259
- return "";
260
- const t = e.trim(), r = (/^\/.+$/g.test(t) ? t : `/${t}`).replaceAll(/\./g, "/");
261
- return /(\/(([^/~])|(~[01]))*)/g.test(r) ? r : "";
262
- }, R = {
263
- value: !1,
264
- path: ""
265
- }, _e = (e) => {
266
- if (!e)
267
- return null;
268
- const t = structuredClone(e);
269
- return typeof t == "string" ? {
270
- value: !0,
271
- path: b(t)
272
- } : typeof t != "object" ? structuredClone(R) : Object.hasOwn(t, "condition") && "condition" in t && Object.hasOwn(t, "value") && "value" in t ? {
273
- value: t.condition,
274
- path: b(t.value)
275
- } : Object.hasOwn(t, "value") && "value" in t && Object.hasOwn(t, "path") && "path" in t ? {
276
- value: t.value,
277
- path: b(t.path)
278
- } : structuredClone(R);
279
- }, U = (e, t, s) => {
280
- e && (e.type === "object" && e.properties && typeof e.properties == "object" && Object.entries(e.properties).forEach(([r, a]) => {
281
- U(a, `${t}/${r}`, s);
282
- }), (e.type === "boolean" || e.type === "string" || e.type === "number" || e.type === "integer") && (s[t] = b(e.updatePath ?? t)));
283
- }, je = (e) => {
284
- const t = {};
285
- return U(e, "", t), t;
286
- }, H = (e, t, s) => {
287
- if (t >= s.length)
288
- return e;
289
- const r = s[t];
290
- if (t === s.length - 1) {
291
- const a = structuredClone(e);
292
- return delete a[r], a;
293
- }
294
- if (e[r] && (e[r] = H(e[r], t + 1, s)), Object.keys(e[r] ?? {}).length === 0) {
295
- const a = structuredClone(e);
296
- return delete a[r], a;
297
- }
298
- return e;
299
- }, ge = (e, t) => {
300
- if (!e || typeof e != "object" || Array.isArray(e))
301
- throw new Error("Invalid object");
302
- if (!t || !t.startsWith("/"))
303
- throw new Error("Invalid path");
304
- const s = t.split("/").slice(1);
305
- return H(e, 0, s);
306
- }, A = ({
307
- formState: e,
308
- formData: t,
309
- schemaPathToUpdatePathMap: s
310
- }) => {
311
- let r = structuredClone(e);
312
- return r && (Object.entries(s).forEach(([a, i]) => {
313
- if (a === i || !i)
314
- return;
315
- const l = y({
316
- json: t,
317
- path: v(a),
318
- resultType: "value",
319
- wrap: !1
320
- });
321
- l === void 0 ? r = ge(r, a) : r = w([F(a, l), r]);
322
- const o = y({
323
- json: e,
324
- path: v(a),
325
- resultType: "value",
326
- wrap: !1
327
- });
328
- o !== void 0 && (r = w([F(i, o), r]));
329
- }), t && r ? k(t, M(t, r), !1, !1).newDocument : r);
330
- }, be = ({ formData: e, schemaPathToUpdatePathMap: t }) => w([
331
- ...Object.entries(t).map(([s, r]) => {
332
- if (s === r || !r)
333
- return {};
334
- const a = y({
335
- json: e,
336
- path: v(r),
337
- resultType: "value",
338
- wrap: !1
339
- });
340
- return a === void 0 ? {} : F(s, a);
341
- }),
342
- structuredClone(e)
343
- ]), ye = ({
344
- disabled: e,
345
- formData: t,
346
- idSchema: s,
347
- onAddClick: r,
348
- properties: a,
349
- readonly: i,
350
- registry: l,
351
- required: o,
352
- schema: c,
353
- title: d,
354
- uiSchema: _,
355
- formContext: u
356
- }) => {
357
- const f = !!c.additionalProperties, m = ne(c, _, t) && /* @__PURE__ */ n.jsx(
358
- L,
359
- {
360
- label: d,
361
- className: "object-property-expand",
362
- onClick: r(c),
363
- disabled: e || i,
364
- uiSchema: _,
365
- registry: l
366
- }
367
- ), j = a.filter((h) => {
368
- const x = c.properties?.[h.name]?.hidden;
369
- if (!x)
370
- return !0;
371
- try {
372
- const p = _e(x);
373
- if (!p.path)
374
- throw new Error("Empty path property of hidden descriptor field");
375
- const g = y({
376
- path: v(p.path),
377
- json: u,
378
- resultType: "value",
379
- wrap: !1
380
- });
381
- return !(g === void 0 || re(p.value, g));
382
- } catch {
383
- return !0;
384
- }
385
- }).map((h) => h.content);
386
- return f ? a.length ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
387
- /* @__PURE__ */ n.jsx(
388
- T,
389
- {
390
- label: d,
391
- required: o,
392
- showLabel: !0,
393
- id: s.$id,
394
- shouldAlignCenter: !1,
395
- children: /* @__PURE__ */ n.jsx("div", { children: j })
396
- }
397
- ),
398
- m
399
- ] }) : /* @__PURE__ */ n.jsx(T, { label: d, required: o, showLabel: !0, id: s.$id, children: m }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
400
- j,
401
- m
402
- ] });
403
- }, ve = (e) => {
404
- const { idSchema: t, registry: s, required: r, schema: a, title: i, uiSchema: l, description: o } = e, c = !!a.additionalProperties, d = i && !c;
405
- return /* @__PURE__ */ n.jsxs("fieldset", { id: t.$id, children: [
406
- d && /* @__PURE__ */ n.jsx(
407
- O,
408
- {
409
- id: te(t),
410
- title: i,
411
- required: r,
412
- schema: a,
413
- uiSchema: l,
414
- registry: s,
415
- description: o
416
- }
417
- ),
418
- /* @__PURE__ */ n.jsx(
419
- "div",
420
- {
421
- className: `${a.properties && !c && t.$id !== "root" ? "dc__border-left pl-12" : ""} ${t.$id === "root" ? "dc__separated-flexbox dc__separated-flexbox--vertical" : "flexbox-col dc__gap-8"}`,
422
- children: /* @__PURE__ */ n.jsx(ye, { ...e })
423
- }
424
- )
425
- ] });
426
- }, Te = ({
427
- id: e,
428
- disabled: t,
429
- label: s,
430
- onKeyChange: r,
431
- onDropPropertyClick: a,
432
- readonly: i,
433
- schema: l,
434
- children: o,
435
- uiSchema: c,
436
- registry: d
437
- }) => {
438
- const { templates: _ } = d, { RemoveButton: u } = _.ButtonTemplates, f = B in l;
439
- return /* @__PURE__ */ n.jsx(n.Fragment, { children: f ? /* @__PURE__ */ n.jsxs("div", { className: "dc__position-rel rjsf-form-template__additional-fields display-grid dc__gap-8 flex-align-center", children: [
440
- /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx(
441
- "input",
442
- {
443
- type: "text",
444
- className: "form__input cn-9 fs-13 lh-20 fw-4",
445
- id: `${e}-key`,
446
- onBlur: (m) => r(m.target.value),
447
- placeholder: S.OBJECT_KEY,
448
- defaultValue: s
449
- }
450
- ) }),
451
- /* @__PURE__ */ n.jsx("div", { children: o }),
452
- /* @__PURE__ */ n.jsx("div", { className: "dc__position-abs remove-btn__container", style: { right: "-28px", top: "9px" }, children: /* @__PURE__ */ n.jsx(
453
- u,
454
- {
455
- disabled: t || i,
456
- onClick: a(s),
457
- uiSchema: c,
458
- registry: d
459
- }
460
- ) })
461
- ] }) : o });
462
- }, we = ({
463
- id: e,
464
- onChange: t,
465
- value: s,
466
- disabled: r,
467
- readonly: a,
468
- autofocus: i
469
- }) => {
470
- const l = Y(s) ? !1 : s, o = () => {
471
- t(!l);
472
- };
473
- return /* @__PURE__ */ n.jsxs("div", { className: "flexbox dc__align-items-center dc__gap-8", children: [
474
- /* @__PURE__ */ n.jsx(
475
- q,
476
- {
477
- name: e,
478
- ariaLabel: e,
479
- onChange: o,
480
- isChecked: l,
481
- autoFocus: i,
482
- isDisabled: r || a
483
- }
484
- ),
485
- /* @__PURE__ */ n.jsx("span", { className: "dc__capitalize", children: l.toString() })
486
- ] });
487
- }, Fe = (e) => {
488
- const {
489
- id: t,
490
- multiple: s = !1,
491
- options: r,
492
- value: a,
493
- disabled: i,
494
- readonly: l,
495
- autofocus: o = !1,
496
- onChange: c,
497
- onBlur: d,
498
- onFocus: _,
499
- placeholder: u
500
- } = e, { enumOptions: f = [] } = r, m = s ? [] : null, j = (x) => {
501
- c(s ? x.map((p) => p.value) : x.value);
502
- }, h = (x) => s ? f.filter((p) => x.some((g) => C(g, p.value))) : f.find((p) => C(x, p.value));
503
- return /* @__PURE__ */ n.jsx(
504
- G,
505
- {
506
- inputId: `devtron-rjsf-select__${t}`,
507
- name: t,
508
- isMulti: s,
509
- value: typeof a > "u" ? m : h(a),
510
- autoFocus: o,
511
- onChange: j,
512
- options: f,
513
- onBlur: () => d(t, a),
514
- onFocus: () => _(t, a),
515
- placeholder: u || S.SELECT,
516
- isDisabled: i || l,
517
- menuPortalTarget: document.getElementById($),
518
- menuPosition: "fixed"
519
- }
520
- );
521
- }, Ne = {
522
- CheckboxWidget: we,
523
- SelectWidget: Fe
524
- }, Se = {
525
- ArrayFieldItemTemplate: ie,
526
- ArrayFieldTemplate: ce,
527
- BaseInputTemplate: ue,
528
- ButtonTemplates: { AddButton: L, RemoveButton: me, SubmitButton: pe },
529
- FieldTemplate: fe,
530
- FieldErrorTemplate: he,
531
- ObjectFieldTemplate: ve,
532
- TitleFieldTemplate: O,
533
- WrapIfAdditionalTemplate: Te
534
- }, Oe = V, Pe = z, Me = J((e, t) => {
535
- const { schemaPathToUpdatePathMap: s, isUpdatePathKeywordPresent: r } = P(() => {
536
- const o = je(e.schema);
537
- return {
538
- schemaPathToUpdatePathMap: o,
539
- isUpdatePathKeywordPresent: Object.entries(o).some(([c, d]) => c !== d)
540
- };
541
- }, [e.schema]), a = P(() => r ? be({ formData: e.formData ?? {}, schemaPathToUpdatePathMap: s }) : e.formData, [e.formData, s, r]), i = (o) => {
542
- if (!e.onChange)
543
- return;
544
- const c = A({
545
- formState: o.formData,
546
- formData: e.formData,
547
- schemaPathToUpdatePathMap: s
548
- });
549
- e.onChange({ ...o, formData: c });
550
- }, l = (o, c) => {
551
- if (!e.onSubmit)
552
- return;
553
- const d = A({
554
- formState: o.formData,
555
- formData: e.formData,
556
- schemaPathToUpdatePathMap: s
557
- });
558
- e.onSubmit?.({ ...o, formData: d }, c);
559
- };
560
- return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
561
- /* @__PURE__ */ n.jsx(
562
- Oe,
563
- {
564
- noHtml5Validate: !0,
565
- showErrorList: !1,
566
- autoComplete: "off",
567
- ...e,
568
- formData: a,
569
- ...r ? {
570
- onChange: i,
571
- onSubmit: l
572
- } : {},
573
- className: `rjsf-form-template__container ${e.className || ""}`,
574
- validator: Pe,
575
- templates: {
576
- ...Se,
577
- ...e.templates
578
- },
579
- formContext: a,
580
- widgets: { ...Ne, ...e.widgets },
581
- translateString: xe,
582
- ref: t
583
- }
584
- ),
585
- /* @__PURE__ */ n.jsx("div", { id: $ })
586
- ] });
587
- });
588
- export {
589
- Ue as H,
590
- Me as R,
591
- He as a,
592
- je as b,
593
- b as c,
594
- ke as g
595
- };