@devtron-labs/devtron-fe-common-lib 1.18.1-pre-7 → 1.18.1-pre-8

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.
@@ -1,20 +1,20 @@
1
- import { j as n, au as y, aw as M, av as W } from "./@vendor-3ORIJA0h.js";
2
- import J, { forwardRef as V, useMemo as C } from "react";
3
- import K, { getDefaultRegistry as q } from "@rjsf/core";
4
- import { T as N, j as w, c as v, b as F, S as Y, i as G, a as z, d as E, e as Q } from "./@code-editor-C8n0SPKs.js";
5
- import { getUiOptions as D, getTemplate as B, getSubmitButtonOptions as X, ADDITIONAL_PROPERTY_FLAG as $, errorId as Z, englishStringTranslator as ee, TranslatableString as te, titleId as ne, canExpand as re, deepEquals as se } from "@rjsf/utils";
6
- import { ReactComponent as ae } from "./assets/ic-add.cfaa779b.svg";
7
- import { ReactComponent as oe } from "./assets/ic-warning.ecf7ff97.svg";
8
- import { ReactComponent as le } from "./assets/ic-cross.01e03666.svg";
9
- import './assets/@common-rjsf.css';const S = {
1
+ import { j as n, au as T, aw as J, av as K } from "./@vendor-3ORIJA0h.js";
2
+ import V, { useState as q, useEffect as Y, forwardRef as G, useMemo as E } from "react";
3
+ import z, { getDefaultRegistry as Q } from "@rjsf/core";
4
+ import { T as O, j as F, c as w, b as N, S as X, i as Z, g as ee, a as te, d as R, e as ne } from "./@code-editor-GtoBp4ff.js";
5
+ import { getUiOptions as B, getTemplate as $, getSubmitButtonOptions as re, ADDITIONAL_PROPERTY_FLAG as L, errorId as se, englishStringTranslator as ae, TranslatableString as oe, titleId as le, canExpand as ie, deepEquals as ce } from "@rjsf/utils";
6
+ import { ReactComponent as de } from "./assets/ic-add.cfaa779b.svg";
7
+ import { ReactComponent as ue } from "./assets/ic-warning.ecf7ff97.svg";
8
+ import { ReactComponent as me } from "./assets/ic-cross.01e03666.svg";
9
+ import './assets/@common-rjsf.css';const P = {
10
10
  SELECT: "Please select an option",
11
11
  INPUT: "Please enter an input",
12
12
  OBJECT_KEY: "Please enter a value for the key"
13
- }, ie = "Key not available", Ue = {
13
+ }, pe = "Key not available", Je = {
14
14
  "ui:submitButtonOptions": {
15
15
  norender: !0
16
16
  }
17
- }, L = "rjsf-form-select-portal-target", ce = ({
17
+ }, U = "rjsf-form-select-portal-target", fe = ({
18
18
  children: e,
19
19
  disabled: t,
20
20
  hasToolbar: s,
@@ -38,7 +38,7 @@ import './assets/@common-rjsf.css';const S = {
38
38
  }
39
39
  ) })
40
40
  ] });
41
- }, T = ({
41
+ }, S = ({
42
42
  showLabel: e,
43
43
  label: t,
44
44
  required: s,
@@ -52,13 +52,13 @@ import './assets/@common-rjsf.css';const S = {
52
52
  className: e ? `display-grid dc__gap-12 rjsf-form-template__field ${l ? "" : "rjsf-form-template__field--align-top"}` : "",
53
53
  children: [
54
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 ? "dc__underline-dotted" : ""}`, children: t || ie }) }),
55
+ /* @__PURE__ */ n.jsx(O, { alwaysShowTippyOnHover: !!i, content: i, children: /* @__PURE__ */ n.jsx("span", { className: `dc__ellipsis-right ${i ? "dc__underline-dotted" : ""}`, children: t || pe }) }),
56
56
  s && /* @__PURE__ */ n.jsx("span", { className: "cr-5", children: " *" })
57
57
  ] }),
58
58
  r
59
59
  ]
60
60
  }
61
- ), R = ({ label: e, canAdd: t, onAddClick: s, disabled: r, readonly: a, uiSchema: i, registry: l }) => {
61
+ ), A = ({ label: e, canAdd: t, onAddClick: s, disabled: r, readonly: a, uiSchema: i, registry: l }) => {
62
62
  const {
63
63
  ButtonTemplates: { AddButton: o }
64
64
  } = l.templates;
@@ -72,7 +72,7 @@ import './assets/@common-rjsf.css';const S = {
72
72
  registry: l
73
73
  }
74
74
  );
75
- }, de = ({
75
+ }, he = ({
76
76
  canAdd: e,
77
77
  className: t,
78
78
  disabled: s,
@@ -83,21 +83,21 @@ import './assets/@common-rjsf.css';const S = {
83
83
  readonly: o,
84
84
  registry: c,
85
85
  required: d,
86
- title: h
86
+ title: f
87
87
  }) => {
88
- const m = D(a), _ = B("ArrayFieldItemTemplate", c, m), u = m.title || h;
88
+ const m = B(a), h = $("ArrayFieldItemTemplate", c, m), u = m.title || f;
89
89
  return /* @__PURE__ */ n.jsx("fieldset", { className: t, id: r.$id, children: i.length ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
90
- i.map(({ key: x, ...f }, g) => {
91
- const p = {
92
- ...f.children,
90
+ i.map(({ key: x, ...p }, j) => {
91
+ const _ = {
92
+ ...p.children,
93
93
  props: {
94
- ...f.children.props
94
+ ...p.children.props
95
95
  }
96
96
  };
97
- return /* @__PURE__ */ n.jsx(_, { ...f, children: p }, x);
97
+ return /* @__PURE__ */ n.jsx(h, { ...p, children: _ }, x);
98
98
  }),
99
99
  /* @__PURE__ */ n.jsx(
100
- R,
100
+ A,
101
101
  {
102
102
  label: u,
103
103
  canAdd: e,
@@ -108,8 +108,8 @@ import './assets/@common-rjsf.css';const S = {
108
108
  registry: c
109
109
  }
110
110
  )
111
- ] }) : /* @__PURE__ */ n.jsx(T, { label: u, required: d, showLabel: !0, id: r.$id, children: /* @__PURE__ */ n.jsx(
112
- R,
111
+ ] }) : /* @__PURE__ */ n.jsx(S, { label: u, required: d, showLabel: !0, id: r.$id, children: /* @__PURE__ */ n.jsx(
112
+ A,
113
113
  {
114
114
  label: u,
115
115
  canAdd: e,
@@ -121,18 +121,18 @@ import './assets/@common-rjsf.css';const S = {
121
121
  }
122
122
  ) }) });
123
123
  }, {
124
- templates: { BaseInputTemplate: ue }
125
- } = q(), me = ({ placeholder: e, ...t }) => {
124
+ templates: { BaseInputTemplate: _e }
125
+ } = Q(), xe = ({ placeholder: e, ...t }) => {
126
126
  const { schema: s } = t;
127
127
  return /* @__PURE__ */ n.jsx(
128
- ue,
128
+ _e,
129
129
  {
130
- placeholder: s.placeholder || e || S.INPUT,
130
+ placeholder: s.placeholder || e || P.INPUT,
131
131
  ...t,
132
132
  className: "form__input cn-9 fs-13 lh-20 fw-4"
133
133
  }
134
134
  );
135
- }, U = ({
135
+ }, k = ({
136
136
  label: e,
137
137
  icon: t,
138
138
  iconType: s,
@@ -149,23 +149,23 @@ import './assets/@common-rjsf.css';const S = {
149
149
  className: "dc__outline-none-imp p-0 dc__transparent flex dc__gap-4 cursor dc__mxw-250",
150
150
  title: "Add",
151
151
  children: [
152
- /* @__PURE__ */ n.jsx(ae, { className: "icon-dim-16 fcb-5" }),
153
- /* @__PURE__ */ n.jsx(N, { placement: "right", content: l, children: /* @__PURE__ */ n.jsx("span", { className: "cb-5 fs-13 lh-34 dc__truncate", children: l }) })
152
+ /* @__PURE__ */ n.jsx(de, { className: "icon-dim-16 fcb-5" }),
153
+ /* @__PURE__ */ n.jsx(O, { placement: "right", content: l, children: /* @__PURE__ */ n.jsx("span", { className: "cb-5 fs-13 lh-34 dc__truncate", children: l }) })
154
154
  ]
155
155
  }
156
156
  ) });
157
- }, pe = ({ 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(le, { className: "icon-dim-16 fcn-6" }) }), fe = ({ uiSchema: e }) => {
158
- const { submitText: t, norender: s, props: r = {} } = X(e);
157
+ }, je = ({ 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(me, { className: "icon-dim-16 fcn-6" }) }), ge = ({ uiSchema: e }) => {
158
+ const { submitText: t, norender: s, props: r = {} } = re(e);
159
159
  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 }) });
160
- }, O = ({
160
+ }, C = ({
161
161
  id: e,
162
162
  title: t,
163
163
  required: s,
164
164
  description: r
165
165
  }) => /* @__PURE__ */ n.jsxs("legend", { className: "fs-13 fw-6 cn-9 lh-20 dc__no-border pb-9 mb-0", id: e, children: [
166
- /* @__PURE__ */ n.jsx(N, { alwaysShowTippyOnHover: !!r, content: r, children: /* @__PURE__ */ n.jsx("span", { className: `${r ? "dc__underline-dotted" : ""}`, children: t }) }),
166
+ /* @__PURE__ */ n.jsx(O, { alwaysShowTippyOnHover: !!r, content: r, children: /* @__PURE__ */ n.jsx("span", { className: `${r ? "dc__underline-dotted" : ""}`, children: t }) }),
167
167
  s && /* @__PURE__ */ n.jsx("span", { className: "cr-5", children: " *" })
168
- ] }), he = (e) => {
168
+ ] }), be = (e) => {
169
169
  const {
170
170
  id: t,
171
171
  label: s,
@@ -176,19 +176,19 @@ import './assets/@common-rjsf.css';const S = {
176
176
  displayLabel: o,
177
177
  registry: c,
178
178
  uiSchema: d,
179
- classNames: h,
179
+ classNames: f,
180
180
  schema: m,
181
- rawDescription: _
182
- } = e, u = D(d), x = B(
181
+ rawDescription: h
182
+ } = e, u = B(d), x = $(
183
183
  "WrapIfAdditionalTemplate",
184
184
  c,
185
185
  u
186
- ), f = $ in m, g = (o || m.type === "boolean") && !f, p = m.type === "array";
186
+ ), p = L in m, j = (o || m.type === "boolean") && !p, _ = m.type === "array";
187
187
  return i ? /* @__PURE__ */ n.jsx("div", { className: "hidden", children: r }) : (
188
188
  // NOTE: need to override the margins of default rjsf css
189
- /* @__PURE__ */ n.jsxs("div", { className: `${h} mb-0`, children: [
190
- p && /* @__PURE__ */ n.jsx(
191
- O,
189
+ /* @__PURE__ */ n.jsxs("div", { className: `${f} mb-0`, children: [
190
+ _ && /* @__PURE__ */ n.jsx(
191
+ C,
192
192
  {
193
193
  id: t,
194
194
  title: s,
@@ -196,40 +196,40 @@ import './assets/@common-rjsf.css';const S = {
196
196
  registry: c,
197
197
  uiSchema: d,
198
198
  schema: m,
199
- description: _
199
+ description: h
200
200
  }
201
201
  ),
202
202
  /* @__PURE__ */ n.jsx(
203
- T,
203
+ S,
204
204
  {
205
205
  label: s,
206
- showLabel: g,
206
+ showLabel: j,
207
207
  id: t,
208
208
  required: l,
209
- rawDescription: _,
209
+ rawDescription: h,
210
210
  children: /* @__PURE__ */ n.jsx(x, { ...e, children: r })
211
211
  }
212
212
  ),
213
213
  a
214
214
  ] })
215
215
  );
216
- }, _e = ({ errors: e = [], idSchema: t }) => {
217
- const s = Z(t);
218
- 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(J.Fragment, { children: [
216
+ }, ye = ({ errors: e = [], idSchema: t }) => {
217
+ const s = se(t);
218
+ 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(V.Fragment, { children: [
219
219
  /* @__PURE__ */ n.jsx("span", {}),
220
220
  /* @__PURE__ */ n.jsxs("span", { className: "form__error", children: [
221
- /* @__PURE__ */ n.jsx(oe, { className: "form__icon form__icon--error" }),
221
+ /* @__PURE__ */ n.jsx(ue, { className: "form__icon form__icon--error" }),
222
222
  r
223
223
  ] })
224
224
  ] }, a)) });
225
- }, xe = (e, t) => {
225
+ }, ve = (e, t) => {
226
226
  switch (e) {
227
- case te.NewStringDefault:
227
+ case oe.NewStringDefault:
228
228
  return "";
229
229
  default:
230
- return ee(e, t);
230
+ return ae(e, t);
231
231
  }
232
- }, He = (e) => {
232
+ }, Ke = (e) => {
233
233
  try {
234
234
  const t = new URL(e).origin === window.location.origin;
235
235
  return {
@@ -245,7 +245,7 @@ import './assets/@common-rjsf.css';const S = {
245
245
  url: `${e} (Invalid URL)`
246
246
  };
247
247
  }
248
- }, ke = (e) => {
248
+ }, Ve = (e) => {
249
249
  const t = typeof e;
250
250
  switch (t) {
251
251
  case "boolean":
@@ -257,36 +257,36 @@ import './assets/@common-rjsf.css';const S = {
257
257
  default:
258
258
  return "null";
259
259
  }
260
- }, b = (e) => {
260
+ }, v = (e) => {
261
261
  if (!e)
262
262
  return "";
263
263
  const t = e.trim(), r = (/^\/.+$/g.test(t) ? t : `/${t}`).replaceAll(/\./g, "/");
264
264
  return /(\/(([^/~])|(~[01]))*)/g.test(r) ? r : "";
265
- }, A = {
265
+ }, I = {
266
266
  value: !1,
267
267
  path: ""
268
- }, je = (e) => {
268
+ }, Te = (e) => {
269
269
  if (!e)
270
270
  return null;
271
271
  const t = structuredClone(e);
272
272
  return typeof t == "string" ? {
273
273
  value: !0,
274
- path: b(t)
275
- } : typeof t != "object" ? structuredClone(A) : Object.hasOwn(t, "condition") && "condition" in t && Object.hasOwn(t, "value") && "value" in t ? {
274
+ path: v(t)
275
+ } : typeof t != "object" ? structuredClone(I) : Object.hasOwn(t, "condition") && "condition" in t && Object.hasOwn(t, "value") && "value" in t ? {
276
276
  value: t.condition,
277
- path: b(t.value)
277
+ path: v(t.value)
278
278
  } : Object.hasOwn(t, "value") && "value" in t && Object.hasOwn(t, "path") && "path" in t ? {
279
279
  value: t.value,
280
- path: b(t.path)
281
- } : structuredClone(A);
280
+ path: v(t.path)
281
+ } : structuredClone(I);
282
282
  }, H = (e, t, s) => {
283
283
  e && (e.type === "object" && e.properties && typeof e.properties == "object" && Object.entries(e.properties).forEach(([r, a]) => {
284
284
  H(a, `${t}/${r}`, s);
285
- }), (e.type === "boolean" || e.type === "string" || e.type === "number" || e.type === "integer") && (s[t] = b(e.updatePath ?? t)));
286
- }, ge = (e) => {
285
+ }), (e.type === "boolean" || e.type === "string" || e.type === "number" || e.type === "integer") && (s[t] = v(e.updatePath ?? t)));
286
+ }, we = (e) => {
287
287
  const t = {};
288
288
  return H(e, "", t), t;
289
- }, k = (e, t, s) => {
289
+ }, M = (e, t, s) => {
290
290
  if (t >= s.length)
291
291
  return e;
292
292
  const r = s[t];
@@ -294,19 +294,19 @@ import './assets/@common-rjsf.css';const S = {
294
294
  const a = structuredClone(e);
295
295
  return delete a[r], a;
296
296
  }
297
- if (e[r] && (e[r] = k(e[r], t + 1, s)), Object.keys(e[r] ?? {}).length === 0) {
297
+ if (e[r] && (e[r] = M(e[r], t + 1, s)), Object.keys(e[r] ?? {}).length === 0) {
298
298
  const a = structuredClone(e);
299
299
  return delete a[r], a;
300
300
  }
301
301
  return e;
302
- }, be = (e, t) => {
302
+ }, Se = (e, t) => {
303
303
  if (!e || typeof e != "object" || Array.isArray(e))
304
304
  throw new Error("Invalid object");
305
305
  if (!t || !t.startsWith("/"))
306
306
  throw new Error("Invalid path");
307
307
  const s = t.split("/").slice(1);
308
- return k(e, 0, s);
309
- }, I = ({
308
+ return M(e, 0, s);
309
+ }, D = ({
310
310
  formState: e,
311
311
  formData: t,
312
312
  schemaPathToUpdatePathMap: s
@@ -315,35 +315,35 @@ import './assets/@common-rjsf.css';const S = {
315
315
  return r && (Object.entries(s).forEach(([a, i]) => {
316
316
  if (a === i || !i)
317
317
  return;
318
- const l = y({
318
+ const l = T({
319
319
  json: t,
320
- path: v(a),
320
+ path: w(a),
321
321
  resultType: "value",
322
322
  wrap: !1
323
323
  });
324
- l === void 0 ? r = be(r, a) : r = w([F(a, l), r]);
325
- const o = y({
324
+ l === void 0 ? r = Se(r, a) : r = F([N(a, l), r]);
325
+ const o = T({
326
326
  json: e,
327
- path: v(a),
327
+ path: w(a),
328
328
  resultType: "value",
329
329
  wrap: !1
330
330
  });
331
- o !== void 0 && (r = w([F(i, o), r]));
332
- }), t && r ? M(t, W(t, r), !1, !1).newDocument : r);
333
- }, ye = ({ formData: e, schemaPathToUpdatePathMap: t }) => w([
331
+ o !== void 0 && (r = F([N(i, o), r]));
332
+ }), t && r ? J(t, K(t, r), !1, !1).newDocument : r);
333
+ }, Fe = ({ formData: e, schemaPathToUpdatePathMap: t }) => F([
334
334
  ...Object.entries(t).map(([s, r]) => {
335
335
  if (s === r || !r)
336
336
  return {};
337
- const a = y({
337
+ const a = T({
338
338
  json: e,
339
- path: v(r),
339
+ path: w(r),
340
340
  resultType: "value",
341
341
  wrap: !1
342
342
  });
343
- return a === void 0 ? {} : F(s, a);
343
+ return a === void 0 ? {} : N(s, a);
344
344
  }),
345
345
  structuredClone(e)
346
- ]), ve = ({
346
+ ]), Ne = ({
347
347
  disabled: e,
348
348
  formData: t,
349
349
  idSchema: s,
@@ -354,41 +354,41 @@ import './assets/@common-rjsf.css';const S = {
354
354
  required: o,
355
355
  schema: c,
356
356
  title: d,
357
- uiSchema: h,
357
+ uiSchema: f,
358
358
  formContext: m
359
359
  }) => {
360
- const _ = !!c.additionalProperties, u = re(c, h, t) && /* @__PURE__ */ n.jsx(
361
- U,
360
+ const h = !!c.additionalProperties, u = ie(c, f, t) && /* @__PURE__ */ n.jsx(
361
+ k,
362
362
  {
363
363
  label: d,
364
364
  className: "object-property-expand",
365
365
  onClick: r(c),
366
366
  disabled: e || i,
367
- uiSchema: h,
367
+ uiSchema: f,
368
368
  registry: l
369
369
  }
370
- ), x = a.filter((f) => {
371
- const g = c.properties?.[f.name]?.hidden;
372
- if (!g)
370
+ ), x = a.filter((p) => {
371
+ const j = c.properties?.[p.name]?.hidden;
372
+ if (!j)
373
373
  return !0;
374
374
  try {
375
- const p = je(g);
376
- if (!p.path)
375
+ const _ = Te(j);
376
+ if (!_.path)
377
377
  throw new Error("Empty path property of hidden descriptor field");
378
- const j = y({
379
- path: v(p.path),
378
+ const y = T({
379
+ path: w(_.path),
380
380
  json: m,
381
381
  resultType: "value",
382
382
  wrap: !1
383
383
  });
384
- return !(j === void 0 || se(p.value, j));
384
+ return !(y === void 0 || ce(_.value, y));
385
385
  } catch {
386
386
  return !0;
387
387
  }
388
- }).map((f) => f.content);
389
- return _ ? a.length ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
388
+ }).map((p) => p.content);
389
+ return h ? a.length ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
390
390
  /* @__PURE__ */ n.jsx(
391
- T,
391
+ S,
392
392
  {
393
393
  label: d,
394
394
  required: o,
@@ -399,17 +399,17 @@ import './assets/@common-rjsf.css';const S = {
399
399
  }
400
400
  ),
401
401
  u
402
- ] }) : /* @__PURE__ */ n.jsx(T, { label: d, required: o, showLabel: !0, id: s.$id, children: u }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
402
+ ] }) : /* @__PURE__ */ n.jsx(S, { label: d, required: o, showLabel: !0, id: s.$id, children: u }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
403
403
  x,
404
404
  u
405
405
  ] });
406
- }, Te = (e) => {
406
+ }, Oe = (e) => {
407
407
  const { idSchema: t, registry: s, required: r, schema: a, title: i, uiSchema: l, description: o } = e, c = !!a.additionalProperties, d = i && !c;
408
408
  return /* @__PURE__ */ n.jsxs("fieldset", { id: t.$id, children: [
409
409
  d && /* @__PURE__ */ n.jsx(
410
- O,
410
+ C,
411
411
  {
412
- id: ne(t),
412
+ id: le(t),
413
413
  title: i,
414
414
  required: r,
415
415
  schema: a,
@@ -422,11 +422,11 @@ import './assets/@common-rjsf.css';const S = {
422
422
  "div",
423
423
  {
424
424
  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"}`,
425
- children: /* @__PURE__ */ n.jsx(ve, { ...e })
425
+ children: /* @__PURE__ */ n.jsx(Ne, { ...e })
426
426
  }
427
427
  )
428
428
  ] });
429
- }, we = ({
429
+ }, Pe = ({
430
430
  id: e,
431
431
  disabled: t,
432
432
  label: s,
@@ -438,8 +438,8 @@ import './assets/@common-rjsf.css';const S = {
438
438
  uiSchema: c,
439
439
  registry: d
440
440
  }) => {
441
- const { templates: h } = d, { RemoveButton: m } = h.ButtonTemplates, _ = $ in l;
442
- return /* @__PURE__ */ n.jsx(n.Fragment, { children: _ ? /* @__PURE__ */ n.jsxs("div", { className: "dc__position-rel rjsf-form-template__additional-fields display-grid dc__gap-8 flex-align-center", children: [
441
+ const { templates: f } = d, { RemoveButton: m } = f.ButtonTemplates, h = L in l;
442
+ return /* @__PURE__ */ n.jsx(n.Fragment, { children: h ? /* @__PURE__ */ n.jsxs("div", { className: "dc__position-rel rjsf-form-template__additional-fields display-grid dc__gap-8 flex-align-center", children: [
443
443
  /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx(
444
444
  "input",
445
445
  {
@@ -447,7 +447,7 @@ import './assets/@common-rjsf.css';const S = {
447
447
  className: "form__input cn-9 fs-13 lh-20 fw-4",
448
448
  id: `${e}-key`,
449
449
  onBlur: (u) => r(u.target.value),
450
- placeholder: S.OBJECT_KEY,
450
+ placeholder: P.OBJECT_KEY,
451
451
  defaultValue: s
452
452
  }
453
453
  ) }),
@@ -462,7 +462,7 @@ import './assets/@common-rjsf.css';const S = {
462
462
  }
463
463
  ) })
464
464
  ] }) : o });
465
- }, Fe = ({
465
+ }, Ce = ({
466
466
  id: e,
467
467
  onChange: t,
468
468
  value: s,
@@ -470,12 +470,12 @@ import './assets/@common-rjsf.css';const S = {
470
470
  readonly: a,
471
471
  autofocus: i
472
472
  }) => {
473
- const l = G(s) ? !1 : s, o = () => {
473
+ const l = Z(s) ? !1 : s, o = () => {
474
474
  t(!l);
475
475
  };
476
476
  return /* @__PURE__ */ n.jsxs("div", { className: "flexbox dc__align-items-center dc__gap-8", children: [
477
477
  /* @__PURE__ */ n.jsx(
478
- Y,
478
+ X,
479
479
  {
480
480
  name: e,
481
481
  ariaLabel: e,
@@ -487,7 +487,7 @@ import './assets/@common-rjsf.css';const S = {
487
487
  ),
488
488
  /* @__PURE__ */ n.jsx("span", { className: "dc__capitalize", children: l.toString() })
489
489
  ] });
490
- }, Ne = (e) => {
490
+ }, Ee = (e) => {
491
491
  const {
492
492
  id: t,
493
493
  multiple: s = !1,
@@ -498,54 +498,59 @@ import './assets/@common-rjsf.css';const S = {
498
498
  autofocus: o = !1,
499
499
  onChange: c,
500
500
  onBlur: d,
501
- onFocus: h,
501
+ onFocus: f,
502
502
  placeholder: m,
503
- schema: _
504
- } = e, { enumOptions: u = [] } = r, x = s ? [] : null, f = (p) => {
505
- c(s ? p.map((j) => j.value) : p.value);
506
- }, g = (p) => s ? u.filter((j) => p.some((P) => E(P, j.value))) : u.find((j) => E(p, j.value));
503
+ schema: h
504
+ } = e, { enumOptions: u = [] } = r, x = s ? [] : null, p = (g) => {
505
+ c(s ? g.map((b) => b.value) : g.value);
506
+ }, [j, _] = q();
507
+ Y(() => {
508
+ _(ee(8));
509
+ }, []);
510
+ const y = (g) => s ? u.filter((b) => g.some((W) => R(W, b.value))) : u.find((b) => R(g, b.value));
507
511
  return /* @__PURE__ */ n.jsx(
508
- z,
512
+ te,
509
513
  {
510
514
  inputId: `devtron-rjsf-select__${t}`,
511
515
  name: t,
512
516
  isMulti: s,
513
- value: typeof a > "u" ? x : g(a),
517
+ value: typeof a > "u" ? x : y(a),
514
518
  autoFocus: o,
515
- onChange: f,
519
+ onChange: p,
516
520
  options: u,
517
521
  onBlur: () => d(t, a),
518
- onFocus: () => h(t, a),
519
- placeholder: _.placeholder || m || S.SELECT,
522
+ onFocus: () => f(t, a),
523
+ placeholder: h.placeholder || m || P.SELECT,
520
524
  isDisabled: i || l,
521
- menuPortalTarget: document.getElementById(L),
525
+ menuPortalTarget: document.getElementById(U),
522
526
  menuPosition: "fixed"
523
- }
527
+ },
528
+ j
524
529
  );
525
- }, Se = {
526
- CheckboxWidget: Fe,
527
- SelectWidget: Ne
528
- }, Oe = {
529
- ArrayFieldItemTemplate: ce,
530
- ArrayFieldTemplate: de,
531
- BaseInputTemplate: me,
532
- ButtonTemplates: { AddButton: U, RemoveButton: pe, SubmitButton: fe },
533
- FieldTemplate: he,
534
- FieldErrorTemplate: _e,
535
- ObjectFieldTemplate: Te,
536
- TitleFieldTemplate: O,
537
- WrapIfAdditionalTemplate: we
538
- }, Pe = K, Ce = Q, Me = V((e, t) => {
539
- const { schemaPathToUpdatePathMap: s, isUpdatePathKeywordPresent: r } = C(() => {
540
- const o = ge(e.schema);
530
+ }, Re = {
531
+ CheckboxWidget: Ce,
532
+ SelectWidget: Ee
533
+ }, Ae = {
534
+ ArrayFieldItemTemplate: fe,
535
+ ArrayFieldTemplate: he,
536
+ BaseInputTemplate: xe,
537
+ ButtonTemplates: { AddButton: k, RemoveButton: je, SubmitButton: ge },
538
+ FieldTemplate: be,
539
+ FieldErrorTemplate: ye,
540
+ ObjectFieldTemplate: Oe,
541
+ TitleFieldTemplate: C,
542
+ WrapIfAdditionalTemplate: Pe
543
+ }, Ie = z, De = ne, qe = G((e, t) => {
544
+ const { schemaPathToUpdatePathMap: s, isUpdatePathKeywordPresent: r } = E(() => {
545
+ const o = we(e.schema);
541
546
  return {
542
547
  schemaPathToUpdatePathMap: o,
543
548
  isUpdatePathKeywordPresent: Object.entries(o).some(([c, d]) => c !== d)
544
549
  };
545
- }, [e.schema]), a = C(() => r ? ye({ formData: e.formData ?? {}, schemaPathToUpdatePathMap: s }) : e.formData, [e.formData, s, r]), i = (o) => {
550
+ }, [e.schema]), a = E(() => r ? Fe({ formData: e.formData ?? {}, schemaPathToUpdatePathMap: s }) : e.formData, [e.formData, s, r]), i = (o) => {
546
551
  if (!e.onChange)
547
552
  return;
548
- const c = I({
553
+ const c = D({
549
554
  formState: o.formData,
550
555
  formData: e.formData,
551
556
  schemaPathToUpdatePathMap: s
@@ -554,7 +559,7 @@ import './assets/@common-rjsf.css';const S = {
554
559
  }, l = (o, c) => {
555
560
  if (!e.onSubmit)
556
561
  return;
557
- const d = I({
562
+ const d = D({
558
563
  formState: o.formData,
559
564
  formData: e.formData,
560
565
  schemaPathToUpdatePathMap: s
@@ -563,7 +568,7 @@ import './assets/@common-rjsf.css';const S = {
563
568
  };
564
569
  return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
565
570
  /* @__PURE__ */ n.jsx(
566
- Pe,
571
+ Ie,
567
572
  {
568
573
  noHtml5Validate: !0,
569
574
  showErrorList: !1,
@@ -575,25 +580,25 @@ import './assets/@common-rjsf.css';const S = {
575
580
  onSubmit: l
576
581
  } : {},
577
582
  className: `rjsf-form-template__container ${e.className || ""}`,
578
- validator: Ce,
583
+ validator: De,
579
584
  templates: {
580
- ...Oe,
585
+ ...Ae,
581
586
  ...e.templates
582
587
  },
583
588
  formContext: a,
584
- widgets: { ...Se, ...e.widgets },
585
- translateString: xe,
589
+ widgets: { ...Re, ...e.widgets },
590
+ translateString: ve,
586
591
  ref: t
587
592
  }
588
593
  ),
589
- /* @__PURE__ */ n.jsx("div", { id: L })
594
+ /* @__PURE__ */ n.jsx("div", { id: U })
590
595
  ] });
591
596
  });
592
597
  export {
593
- Ue as H,
594
- Me as R,
595
- He as a,
596
- ge as b,
597
- b as c,
598
- ke as g
598
+ Je as H,
599
+ qe as R,
600
+ Ke as a,
601
+ we as b,
602
+ v as c,
603
+ Ve as g
599
604
  };