@devtron-labs/devtron-fe-common-lib 1.22.0-beta-10 → 1.22.0-beta-11

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