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

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 (70) hide show
  1. package/dist/{@code-editor-D3u1HU6g.js → @code-editor-xNsLtfRd.js} +7908 -7788
  2. package/dist/{@common-rjsf-BWZsX9t4.js → @common-rjsf-iH1FvWN3.js} +222 -230
  3. package/dist/Common/Dialogs/Types.d.ts +0 -17
  4. package/dist/Common/Dialogs/index.d.ts +0 -1
  5. package/dist/Common/RJSF/widgets/Checkbox.d.ts +1 -1
  6. package/dist/Common/Types.d.ts +1 -43
  7. package/dist/Common/index.d.ts +0 -2
  8. package/dist/Pages/ResourceBrowser/ResourceBrowser.Types.d.ts +2 -46
  9. package/dist/Pages/ResourceBrowser/constants.d.ts +0 -2
  10. package/dist/Pages/ResourceBrowser/service.d.ts +1 -1
  11. package/dist/Shared/Analytics/analytics.d.ts +2 -0
  12. package/dist/Shared/Components/Button/Button.component.d.ts +1 -1
  13. package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/utils.d.ts +2 -1
  14. package/dist/Shared/Components/CICDHistory/service.d.ts +1 -7
  15. package/dist/Shared/Components/CICDHistory/types.d.ts +2 -18
  16. package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.types.d.ts +18 -1
  17. package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffRadioSelect.d.ts +7 -0
  18. package/dist/Shared/Components/DeploymentConfigDiff/index.d.ts +1 -0
  19. package/dist/Shared/Components/DocLink/types.d.ts +1 -0
  20. package/dist/Shared/Components/DocLink/utils.d.ts +1 -1
  21. package/dist/Shared/Components/Icon/Icon.d.ts +9 -4
  22. package/dist/Shared/Components/Popover/types.d.ts +5 -0
  23. package/dist/Shared/Components/Popover/usePopover.hook.d.ts +1 -1
  24. package/dist/Shared/Components/Switch/Switch.component.d.ts +1 -1
  25. package/dist/Shared/Components/Switch/types.d.ts +11 -2
  26. package/dist/Shared/Components/Switch/utils.d.ts +2 -2
  27. package/dist/Shared/Components/SwitchThemeDialog/SwitchThemeDialog.component.d.ts +3 -0
  28. package/dist/Shared/Components/SwitchThemeDialog/index.d.ts +2 -0
  29. package/dist/Shared/Components/SwitchThemeDialog/types.d.ts +35 -0
  30. package/dist/Shared/Components/Textarea/Textarea.component.d.ts +1 -1
  31. package/dist/Shared/Components/Textarea/types.d.ts +17 -1
  32. package/dist/Shared/Components/Textarea/utils.d.ts +5 -0
  33. package/dist/Shared/Components/ToggleResolveScopedVariables/ToggleResolveScopedVariables.component.d.ts +1 -1
  34. package/dist/Shared/Components/ToggleResolveScopedVariables/types.d.ts +1 -1
  35. package/dist/Shared/Components/Typewriter/BlinkingCursor.d.ts +1 -0
  36. package/dist/Shared/Components/Typewriter/index.d.ts +2 -0
  37. package/dist/Shared/Components/Typewriter/useTypewriter.d.ts +1 -0
  38. package/dist/Shared/Components/index.d.ts +2 -0
  39. package/dist/Shared/Helpers.d.ts +1 -2
  40. package/dist/Shared/Providers/index.d.ts +1 -0
  41. package/dist/Shared/Providers/types.d.ts +39 -12
  42. package/dist/Shared/Services/app.types.d.ts +7 -2
  43. package/dist/Shared/constants.d.ts +2 -1
  44. package/dist/Shared/types.d.ts +8 -4
  45. package/dist/assets/@code-editor.css +1 -1
  46. package/dist/assets/@common-rjsf.css +1 -1
  47. package/dist/assets/ic-add.2d785695.svg +3 -0
  48. package/dist/assets/ic-asterisk.ab224e72.svg +3 -0
  49. package/dist/assets/ic-brain.838491eb.svg +3 -0
  50. package/dist/assets/ic-devtron-ai.535b45ec.svg +287 -0
  51. package/dist/assets/ic-folder-color.7cf84356.svg +6 -0
  52. package/dist/assets/{ic-minus.aac464f7.svg → ic-minus.416da21b.svg} +1 -1
  53. package/dist/assets/ic-paper-plane.ad7e6d2f.svg +3 -0
  54. package/dist/assets/ic-sparkle-ai-color.d123b325.svg +16 -0
  55. package/dist/assets/ic-sparkle-color.a9722593.svg +18 -0
  56. package/dist/assets/ic-stop-fill.32ea653f.svg +8 -0
  57. package/dist/assets/ic-world-globe.877fa6a0.svg +3 -0
  58. package/dist/index.d.ts +7 -0
  59. package/dist/index.js +767 -773
  60. package/package.json +3 -3
  61. package/dist/Common/Dialogs/ConfirmationDialog.d.ts +0 -11
  62. package/dist/Common/InfoColorBar/InfoColourbar.d.ts +0 -6
  63. package/dist/Common/Toggle/Toggle.d.ts +0 -18
  64. package/dist/assets/ic-add.18a93616.svg +0 -19
  65. package/dist/assets/ic-container.92a4c33a.svg +0 -3
  66. package/dist/assets/ic-gavel.a3b064b5.svg +0 -3
  67. package/dist/assets/ic-sparkle-color.01c0be88.svg +0 -1
  68. package/dist/assets/ic-speedometer.3ecaae3b.svg +0 -3
  69. package/dist/assets/ic-two-cubes.056d1333.svg +0 -3
  70. /package/dist/assets/{ic-container-registry.4e1e6455.svg → ic-container.4e1e6455.svg} +0 -0
@@ -1,14 +1,14 @@
1
- import { j as n, as as y, au as k, at as W } from "./@vendor-STJ9h0oI.js";
1
+ import { j as n, as as b, au as k, at as W } from "./@vendor-STJ9h0oI.js";
2
2
  import V, { forwardRef as J, useMemo as P } from "react";
3
3
  import K, { getDefaultRegistry as q } from "@rjsf/core";
4
- import { T as F, j as N, c as v, b as S, a as Y, i as z, d as w, e as E, S as G } from "./@code-editor-D3u1HU6g.js";
4
+ import { T as F, j as N, c as v, b as S, S as Y, i as z, a as w, d as A, e as G } from "./@code-editor-xNsLtfRd.js";
5
5
  import Q, { components as D } from "react-select";
6
6
  import { ReactComponent as X } from "./assets/ic-chevron-down.fc70d7a7.svg";
7
- import { getUiOptions as B, getTemplate as $, getSubmitButtonOptions as Z, ADDITIONAL_PROPERTY_FLAG as L, errorId as ee, englishStringTranslator as te, TranslatableString as ne, titleId as re, canExpand as se, deepEquals as ae } from "@rjsf/utils";
7
+ import { getUiOptions as $, getTemplate as B, getSubmitButtonOptions as Z, ADDITIONAL_PROPERTY_FLAG as L, errorId as ee, englishStringTranslator as te, TranslatableString as ne, titleId as re, canExpand as ae, deepEquals as se } from "@rjsf/utils";
8
8
  import { ReactComponent as oe } from "./assets/ic-add.cfaa779b.svg";
9
9
  import { ReactComponent as ie } from "./assets/ic-cross.01e03666.svg";
10
10
  import { ReactComponent as le } from "./assets/ic-warning.ecf7ff97.svg";
11
- import './assets/@common-rjsf.css';const O = {
11
+ import './assets/@common-rjsf.css';const C = {
12
12
  SELECT: "Please select an option",
13
13
  INPUT: "Please enter an input",
14
14
  OBJECT_KEY: "Please enter a value for the key"
@@ -19,22 +19,22 @@ import './assets/@common-rjsf.css';const O = {
19
19
  }, de = ({
20
20
  children: e,
21
21
  disabled: t,
22
- hasToolbar: s,
22
+ hasToolbar: a,
23
23
  hasRemove: r,
24
- index: a,
25
- onDropIndexClick: i,
26
- readonly: l,
24
+ index: s,
25
+ onDropIndexClick: l,
26
+ readonly: i,
27
27
  registry: o,
28
28
  uiSchema: c
29
29
  }) => {
30
30
  const { RemoveButton: d } = o.templates.ButtonTemplates;
31
31
  return /* @__PURE__ */ n.jsxs("div", { className: "dc__position-rel display-grid rjsf-form-template__array-field-item flex-align-center", children: [
32
32
  e,
33
- /* @__PURE__ */ n.jsx("div", { className: "dc__position-abs remove-btn__container", style: { right: "-28px", top: "9px" }, children: s && r && /* @__PURE__ */ n.jsx(
33
+ /* @__PURE__ */ n.jsx("div", { className: "dc__position-abs remove-btn__container", style: { right: "-28px", top: "9px" }, children: a && r && /* @__PURE__ */ n.jsx(
34
34
  d,
35
35
  {
36
- disabled: t || l,
37
- onClick: i(a),
36
+ disabled: t || i,
37
+ onClick: l(s),
38
38
  uiSchema: c,
39
39
  registry: o
40
40
  }
@@ -43,82 +43,82 @@ import './assets/@common-rjsf.css';const O = {
43
43
  }, T = ({
44
44
  showLabel: e,
45
45
  label: t,
46
- required: s,
46
+ required: a,
47
47
  children: r,
48
- id: a,
49
- rawDescription: i,
50
- shouldAlignCenter: l = !0
48
+ id: s,
49
+ rawDescription: l,
50
+ shouldAlignCenter: i = !0
51
51
  }) => /* @__PURE__ */ n.jsxs(
52
52
  "div",
53
53
  {
54
- className: e ? `display-grid dc__gap-12 rjsf-form-template__field ${l ? "flex-align-center" : ""}` : "",
54
+ className: e ? `display-grid dc__gap-12 rjsf-form-template__field ${i ? "flex-align-center" : ""}` : "",
55
55
  children: [
56
- e && /* @__PURE__ */ n.jsxs("label", { className: "cn-7 fs-13 lh-20 fw-4 flexbox mb-0", htmlFor: a, children: [
57
- /* @__PURE__ */ n.jsx(F, { alwaysShowTippyOnHover: !!i, content: i, children: /* @__PURE__ */ n.jsx("span", { className: `dc__ellipsis-right ${i ? "text-underline-dashed-300" : ""}`, children: t || ce }) }),
58
- s && /* @__PURE__ */ n.jsx("span", { className: "cr-5", children: " *" })
56
+ e && /* @__PURE__ */ n.jsxs("label", { className: "cn-7 fs-13 lh-20 fw-4 flexbox mb-0", htmlFor: s, children: [
57
+ /* @__PURE__ */ n.jsx(F, { alwaysShowTippyOnHover: !!l, content: l, children: /* @__PURE__ */ n.jsx("span", { className: `dc__ellipsis-right ${l ? "text-underline-dashed-300" : ""}`, children: t || ce }) }),
58
+ a && /* @__PURE__ */ n.jsx("span", { className: "cr-5", children: " *" })
59
59
  ] }),
60
60
  r
61
61
  ]
62
62
  }
63
- ), A = ({ label: e, canAdd: t, onAddClick: s, disabled: r, readonly: a, uiSchema: i, registry: l }) => {
63
+ ), E = ({ label: e, canAdd: t, onAddClick: a, disabled: r, readonly: s, uiSchema: l, registry: i }) => {
64
64
  const {
65
65
  ButtonTemplates: { AddButton: o }
66
- } = l.templates;
66
+ } = i.templates;
67
67
  return t && /* @__PURE__ */ n.jsx(
68
68
  o,
69
69
  {
70
70
  label: e,
71
- onClick: s,
72
- disabled: r || a,
73
- uiSchema: i,
74
- registry: l
71
+ onClick: a,
72
+ disabled: r || s,
73
+ uiSchema: l,
74
+ registry: i
75
75
  }
76
76
  );
77
77
  }, ue = ({
78
78
  canAdd: e,
79
79
  className: t,
80
- disabled: s,
80
+ disabled: a,
81
81
  idSchema: r,
82
- uiSchema: a,
83
- items: i,
84
- onAddClick: l,
82
+ uiSchema: s,
83
+ items: l,
84
+ onAddClick: i,
85
85
  readonly: o,
86
86
  registry: c,
87
87
  required: d,
88
- title: x
88
+ title: j
89
89
  }) => {
90
- const u = B(a), f = $("ArrayFieldItemTemplate", c, u), p = u.title || x;
91
- return /* @__PURE__ */ n.jsx("fieldset", { className: t, id: r.$id, children: i.length ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
92
- i.map(({ key: j, ..._ }, h) => {
93
- const m = {
94
- ..._.children,
90
+ const p = $(s), h = B("ArrayFieldItemTemplate", c, p), f = p.title || j;
91
+ return /* @__PURE__ */ n.jsx("fieldset", { className: t, id: r.$id, children: l.length ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
92
+ l.map(({ key: _, ...x }, m) => {
93
+ const u = {
94
+ ...x.children,
95
95
  props: {
96
- ..._.children.props
96
+ ...x.children.props
97
97
  }
98
98
  };
99
- return /* @__PURE__ */ n.jsx(f, { ..._, children: m }, j);
99
+ return /* @__PURE__ */ n.jsx(h, { ...x, children: u }, _);
100
100
  }),
101
101
  /* @__PURE__ */ n.jsx(
102
- A,
102
+ E,
103
103
  {
104
- label: p,
104
+ label: f,
105
105
  canAdd: e,
106
- onAddClick: l,
107
- disabled: s,
106
+ onAddClick: i,
107
+ disabled: a,
108
108
  readonly: o,
109
- uiSchema: a,
109
+ uiSchema: s,
110
110
  registry: c
111
111
  }
112
112
  )
113
- ] }) : /* @__PURE__ */ n.jsx(T, { label: p, required: d, showLabel: !0, id: r.$id, children: /* @__PURE__ */ n.jsx(
114
- A,
113
+ ] }) : /* @__PURE__ */ n.jsx(T, { label: f, required: d, showLabel: !0, id: r.$id, children: /* @__PURE__ */ n.jsx(
114
+ E,
115
115
  {
116
- label: p,
116
+ label: f,
117
117
  canAdd: e,
118
- onAddClick: l,
119
- disabled: s,
118
+ onAddClick: i,
119
+ disabled: a,
120
120
  readonly: o,
121
- uiSchema: a,
121
+ uiSchema: s,
122
122
  registry: c
123
123
  }
124
124
  ) }) });
@@ -127,100 +127,100 @@ import './assets/@common-rjsf.css';const O = {
127
127
  } = q(), pe = ({ placeholder: e, ...t }) => /* @__PURE__ */ n.jsx(
128
128
  me,
129
129
  {
130
- placeholder: e || O.INPUT,
130
+ placeholder: e || C.INPUT,
131
131
  ...t,
132
132
  className: "form__input cn-9 fs-13 lh-20 fw-4"
133
133
  }
134
134
  ), U = ({
135
135
  label: e,
136
136
  icon: t,
137
- iconType: s,
137
+ iconType: a,
138
138
  registry: r,
139
- uiSchema: a,
140
- ...i
139
+ uiSchema: s,
140
+ ...l
141
141
  }) => {
142
- const l = `Add ${e}`;
142
+ const i = `Add ${e}`;
143
143
  return /* @__PURE__ */ n.jsx("div", { className: "flexbox flex-justify-start", children: /* @__PURE__ */ n.jsxs(
144
144
  "button",
145
145
  {
146
- ...i,
146
+ ...l,
147
147
  type: "button",
148
148
  className: "dc__outline-none-imp p-0 dc__transparent flex dc__gap-4 cursor dc__mxw-250",
149
149
  title: "Add",
150
150
  children: [
151
151
  /* @__PURE__ */ n.jsx(oe, { className: "icon-dim-16 fcb-5" }),
152
- /* @__PURE__ */ n.jsx(F, { placement: "right", content: l, children: /* @__PURE__ */ n.jsx("span", { className: "cb-5 fs-13 lh-34 dc__truncate", children: l }) })
152
+ /* @__PURE__ */ n.jsx(F, { placement: "right", content: i, children: /* @__PURE__ */ n.jsx("span", { className: "cb-5 fs-13 lh-34 dc__truncate", children: i }) })
153
153
  ]
154
154
  }
155
155
  ) });
156
- }, fe = ({ 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(ie, { className: "icon-dim-16 fcn-6" }) }), he = ({ uiSchema: e }) => {
157
- const { submitText: t, norender: s, props: r = {} } = Z(e);
158
- 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 }) });
159
- }, C = ({
156
+ }, fe = ({ icon: e, iconType: t, registry: a, uiSchema: r, ...s }) => /* @__PURE__ */ n.jsx("button", { ...s, type: "button", className: "dc__outline-none-imp p-0 dc__transparent flex cursor", title: "Remove", children: /* @__PURE__ */ n.jsx(ie, { className: "icon-dim-16 fcn-6" }) }), he = ({ uiSchema: e }) => {
157
+ const { submitText: t, norender: a, props: r = {} } = Z(e);
158
+ return a ? null : /* @__PURE__ */ n.jsx("div", { className: "flexbox flex-justify-end", children: /* @__PURE__ */ n.jsx("button", { type: "submit", ...r, className: `cta ${r.className || ""}`, children: t }) });
159
+ }, O = ({
160
160
  id: e,
161
161
  title: t,
162
- required: s,
162
+ required: a,
163
163
  description: r
164
164
  }) => /* @__PURE__ */ n.jsxs("legend", { className: "fs-13 fw-6 cn-9 lh-20 dc__no-border pb-9 mb-0", id: e, children: [
165
165
  /* @__PURE__ */ n.jsx(F, { alwaysShowTippyOnHover: !!r, content: r, children: /* @__PURE__ */ n.jsx("span", { className: `${r ? "text-underline-dashed-300" : ""}`, children: t }) }),
166
- s && /* @__PURE__ */ n.jsx("span", { className: "cr-5", children: " *" })
166
+ a && /* @__PURE__ */ n.jsx("span", { className: "cr-5", children: " *" })
167
167
  ] }), xe = (e) => {
168
168
  const {
169
169
  id: t,
170
- label: s,
170
+ label: a,
171
171
  children: r,
172
- errors: a,
173
- hidden: i,
174
- required: l,
172
+ errors: s,
173
+ hidden: l,
174
+ required: i,
175
175
  displayLabel: o,
176
176
  registry: c,
177
177
  uiSchema: d,
178
- classNames: x,
179
- schema: u,
180
- rawDescription: f
181
- } = e, p = B(d), j = $(
178
+ classNames: j,
179
+ schema: p,
180
+ rawDescription: h
181
+ } = e, f = $(d), _ = B(
182
182
  "WrapIfAdditionalTemplate",
183
183
  c,
184
- p
185
- ), _ = L in u, h = (o || u.type === "boolean") && !_, m = u.type === "array";
186
- return i ? /* @__PURE__ */ n.jsx("div", { className: "hidden", children: r }) : (
184
+ f
185
+ ), x = L in p, m = (o || p.type === "boolean") && !x, u = p.type === "array";
186
+ return l ? /* @__PURE__ */ n.jsx("div", { className: "hidden", children: r }) : (
187
187
  // NOTE: need to override the margins of default rjsf css
188
- /* @__PURE__ */ n.jsxs("div", { className: `${x} mb-0`, children: [
189
- m && /* @__PURE__ */ n.jsx(
190
- C,
188
+ /* @__PURE__ */ n.jsxs("div", { className: `${j} mb-0`, children: [
189
+ u && /* @__PURE__ */ n.jsx(
190
+ O,
191
191
  {
192
192
  id: t,
193
- title: s,
194
- required: l,
193
+ title: a,
194
+ required: i,
195
195
  registry: c,
196
196
  uiSchema: d,
197
- schema: u,
198
- description: f
197
+ schema: p,
198
+ description: h
199
199
  }
200
200
  ),
201
201
  /* @__PURE__ */ n.jsx(
202
202
  T,
203
203
  {
204
- label: s,
205
- showLabel: h,
204
+ label: a,
205
+ showLabel: m,
206
206
  id: t,
207
- required: l,
208
- rawDescription: f,
209
- children: /* @__PURE__ */ n.jsx(j, { ...e, children: r })
207
+ required: i,
208
+ rawDescription: h,
209
+ children: /* @__PURE__ */ n.jsx(_, { ...e, children: r })
210
210
  }
211
211
  ),
212
- a
212
+ s
213
213
  ] })
214
214
  );
215
215
  }, je = ({ errors: e = [], idSchema: t }) => {
216
- const s = ee(t);
217
- 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: [
216
+ const a = ee(t);
217
+ return e.length > 0 && /* @__PURE__ */ n.jsx("span", { className: "display-grid rjsf-form-template__field--error dc__gap-12", id: a, children: e.filter((r) => !!r).map((r, s) => /* @__PURE__ */ n.jsxs(V.Fragment, { children: [
218
218
  /* @__PURE__ */ n.jsx("span", {}),
219
219
  /* @__PURE__ */ n.jsxs("span", { className: "form__error", children: [
220
220
  /* @__PURE__ */ n.jsx(le, { className: "form__icon form__icon--error" }),
221
221
  r
222
222
  ] })
223
- ] }, a)) });
223
+ ] }, s)) });
224
224
  }, _e = (e, t) => {
225
225
  switch (e) {
226
226
  case ne.NewStringDefault:
@@ -256,7 +256,7 @@ import './assets/@common-rjsf.css';const O = {
256
256
  default:
257
257
  return "null";
258
258
  }
259
- }, b = (e) => {
259
+ }, y = (e) => {
260
260
  if (!e)
261
261
  return "";
262
262
  const t = e.trim(), r = (/^\/.+$/g.test(t) ? t : `/${t}`).replaceAll(/\./g, "/");
@@ -270,157 +270,157 @@ import './assets/@common-rjsf.css';const O = {
270
270
  const t = structuredClone(e);
271
271
  return typeof t == "string" ? {
272
272
  value: !0,
273
- path: b(t)
273
+ path: y(t)
274
274
  } : typeof t != "object" ? structuredClone(R) : Object.hasOwn(t, "condition") && "condition" in t && Object.hasOwn(t, "value") && "value" in t ? {
275
275
  value: t.condition,
276
- path: b(t.value)
276
+ path: y(t.value)
277
277
  } : Object.hasOwn(t, "value") && "value" in t && Object.hasOwn(t, "path") && "path" in t ? {
278
278
  value: t.value,
279
- path: b(t.path)
279
+ path: y(t.path)
280
280
  } : structuredClone(R);
281
- }, H = (e, t, s) => {
282
- e && (e.type === "object" && e.properties && typeof e.properties == "object" && Object.entries(e.properties).forEach(([r, a]) => {
283
- H(a, `${t}/${r}`, s);
284
- }), (e.type === "boolean" || e.type === "string" || e.type === "number" || e.type === "integer") && (s[t] = b(e.updatePath ?? t)));
285
- }, be = (e) => {
281
+ }, H = (e, t, a) => {
282
+ e && (e.type === "object" && e.properties && typeof e.properties == "object" && Object.entries(e.properties).forEach(([r, s]) => {
283
+ H(s, `${t}/${r}`, a);
284
+ }), (e.type === "boolean" || e.type === "string" || e.type === "number" || e.type === "integer") && (a[t] = y(e.updatePath ?? t)));
285
+ }, ye = (e) => {
286
286
  const t = {};
287
287
  return H(e, "", t), t;
288
- }, M = (e, t, s) => {
289
- if (t >= s.length)
288
+ }, M = (e, t, a) => {
289
+ if (t >= a.length)
290
290
  return e;
291
- const r = s[t];
292
- if (t === s.length - 1) {
293
- const a = structuredClone(e);
294
- return delete a[r], a;
291
+ const r = a[t];
292
+ if (t === a.length - 1) {
293
+ const s = structuredClone(e);
294
+ return delete s[r], s;
295
295
  }
296
- if (e[r] && (e[r] = M(e[r], t + 1, s)), Object.keys(e[r] ?? {}).length === 0) {
297
- const a = structuredClone(e);
298
- return delete a[r], a;
296
+ if (e[r] && (e[r] = M(e[r], t + 1, a)), Object.keys(e[r] ?? {}).length === 0) {
297
+ const s = structuredClone(e);
298
+ return delete s[r], s;
299
299
  }
300
300
  return e;
301
- }, ye = (e, t) => {
301
+ }, be = (e, t) => {
302
302
  if (!e || typeof e != "object" || Array.isArray(e))
303
303
  throw new Error("Invalid object");
304
304
  if (!t || !t.startsWith("/"))
305
305
  throw new Error("Invalid path");
306
- const s = t.split("/").slice(1);
307
- return M(e, 0, s);
306
+ const a = t.split("/").slice(1);
307
+ return M(e, 0, a);
308
308
  }, I = ({
309
309
  formState: e,
310
310
  formData: t,
311
- schemaPathToUpdatePathMap: s
311
+ schemaPathToUpdatePathMap: a
312
312
  }) => {
313
313
  let r = structuredClone(e);
314
- return r && (Object.entries(s).forEach(([a, i]) => {
315
- if (a === i || !i)
314
+ return r && (Object.entries(a).forEach(([s, l]) => {
315
+ if (s === l || !l)
316
316
  return;
317
- const l = y({
317
+ const i = b({
318
318
  json: t,
319
- path: v(a),
319
+ path: v(s),
320
320
  resultType: "value",
321
321
  wrap: !1
322
322
  });
323
- l === void 0 ? r = ye(r, a) : r = N([S(a, l), r]);
324
- const o = y({
323
+ i === void 0 ? r = be(r, s) : r = N([S(s, i), r]);
324
+ const o = b({
325
325
  json: e,
326
- path: v(a),
326
+ path: v(s),
327
327
  resultType: "value",
328
328
  wrap: !1
329
329
  });
330
- o !== void 0 && (r = N([S(i, o), r]));
330
+ o !== void 0 && (r = N([S(l, o), r]));
331
331
  }), t && r ? k(t, W(t, r), !1, !1).newDocument : r);
332
332
  }, ve = ({ formData: e, schemaPathToUpdatePathMap: t }) => N([
333
- ...Object.entries(t).map(([s, r]) => {
334
- if (s === r || !r)
333
+ ...Object.entries(t).map(([a, r]) => {
334
+ if (a === r || !r)
335
335
  return {};
336
- const a = y({
336
+ const s = b({
337
337
  json: e,
338
338
  path: v(r),
339
339
  resultType: "value",
340
340
  wrap: !1
341
341
  });
342
- return a === void 0 ? {} : S(s, a);
342
+ return s === void 0 ? {} : S(a, s);
343
343
  }),
344
344
  structuredClone(e)
345
345
  ]), Te = ({
346
346
  disabled: e,
347
347
  formData: t,
348
- idSchema: s,
348
+ idSchema: a,
349
349
  onAddClick: r,
350
- properties: a,
351
- readonly: i,
352
- registry: l,
350
+ properties: s,
351
+ readonly: l,
352
+ registry: i,
353
353
  required: o,
354
354
  schema: c,
355
355
  title: d,
356
- uiSchema: x,
357
- formContext: u
356
+ uiSchema: j,
357
+ formContext: p
358
358
  }) => {
359
- const f = !!c.additionalProperties, p = se(c, x, t) && /* @__PURE__ */ n.jsx(
359
+ const h = !!c.additionalProperties, f = ae(c, j, t) && /* @__PURE__ */ n.jsx(
360
360
  U,
361
361
  {
362
362
  label: d,
363
363
  className: "object-property-expand",
364
364
  onClick: r(c),
365
- disabled: e || i,
366
- uiSchema: x,
367
- registry: l
365
+ disabled: e || l,
366
+ uiSchema: j,
367
+ registry: i
368
368
  }
369
- ), j = a.filter((_) => {
370
- const h = c.properties?.[_.name]?.hidden;
371
- if (!h)
369
+ ), _ = s.filter((x) => {
370
+ const m = c.properties?.[x.name]?.hidden;
371
+ if (!m)
372
372
  return !0;
373
373
  try {
374
- const m = ge(h);
375
- if (!m.path)
374
+ const u = ge(m);
375
+ if (!u.path)
376
376
  throw new Error("Empty path property of hidden descriptor field");
377
- const g = y({
378
- path: v(m.path),
379
- json: u,
377
+ const g = b({
378
+ path: v(u.path),
379
+ json: p,
380
380
  resultType: "value",
381
381
  wrap: !1
382
382
  });
383
- return !(g === void 0 || ae(m.value, g));
383
+ return !(g === void 0 || se(u.value, g));
384
384
  } catch {
385
385
  return !0;
386
386
  }
387
- }).map((_) => _.content);
388
- return f ? a.length ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
387
+ }).map((x) => x.content);
388
+ return h ? s.length ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
389
389
  /* @__PURE__ */ n.jsx(
390
390
  T,
391
391
  {
392
392
  label: d,
393
393
  required: o,
394
394
  showLabel: !0,
395
- id: s.$id,
395
+ id: a.$id,
396
396
  shouldAlignCenter: !1,
397
- children: /* @__PURE__ */ n.jsx("div", { children: j })
397
+ children: /* @__PURE__ */ n.jsx("div", { children: _ })
398
398
  }
399
399
  ),
400
- p
401
- ] }) : /* @__PURE__ */ n.jsx(T, { label: d, required: o, showLabel: !0, id: s.$id, children: p }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
402
- j,
403
- p
400
+ f
401
+ ] }) : /* @__PURE__ */ n.jsx(T, { label: d, required: o, showLabel: !0, id: a.$id, children: f }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
402
+ _,
403
+ f
404
404
  ] });
405
405
  }, we = (e) => {
406
- const { idSchema: t, registry: s, required: r, schema: a, title: i, uiSchema: l, description: o } = e, c = !!a.additionalProperties, d = i && !c;
406
+ const { idSchema: t, registry: a, required: r, schema: s, title: l, uiSchema: i, description: o } = e, c = !!s.additionalProperties, d = l && !c;
407
407
  return /* @__PURE__ */ n.jsxs("fieldset", { id: t.$id, children: [
408
408
  d && /* @__PURE__ */ n.jsx(
409
- C,
409
+ O,
410
410
  {
411
411
  id: re(t),
412
- title: i,
412
+ title: l,
413
413
  required: r,
414
- schema: a,
415
- uiSchema: l,
416
- registry: s,
414
+ schema: s,
415
+ uiSchema: i,
416
+ registry: a,
417
417
  description: o
418
418
  }
419
419
  ),
420
420
  /* @__PURE__ */ n.jsx(
421
421
  "div",
422
422
  {
423
- 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"}`,
423
+ className: `${s.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"}`,
424
424
  children: /* @__PURE__ */ n.jsx(Te, { ...e })
425
425
  }
426
426
  )
@@ -428,34 +428,34 @@ import './assets/@common-rjsf.css';const O = {
428
428
  }, Ne = ({
429
429
  id: e,
430
430
  disabled: t,
431
- label: s,
431
+ label: a,
432
432
  onKeyChange: r,
433
- onDropPropertyClick: a,
434
- readonly: i,
435
- schema: l,
433
+ onDropPropertyClick: s,
434
+ readonly: l,
435
+ schema: i,
436
436
  children: o,
437
437
  uiSchema: c,
438
438
  registry: d
439
439
  }) => {
440
- const { templates: x } = d, { RemoveButton: u } = x.ButtonTemplates, f = L in l;
441
- 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
+ const { templates: j } = d, { RemoveButton: p } = j.ButtonTemplates, h = L in i;
441
+ 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: [
442
442
  /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx(
443
443
  "input",
444
444
  {
445
445
  type: "text",
446
446
  className: "form__input cn-9 fs-13 lh-20 fw-4",
447
447
  id: `${e}-key`,
448
- onBlur: (p) => r(p.target.value),
449
- placeholder: O.OBJECT_KEY,
450
- defaultValue: s
448
+ onBlur: (f) => r(f.target.value),
449
+ placeholder: C.OBJECT_KEY,
450
+ defaultValue: a
451
451
  }
452
452
  ) }),
453
453
  /* @__PURE__ */ n.jsx("div", { children: o }),
454
454
  /* @__PURE__ */ n.jsx("div", { className: "dc__position-abs remove-btn__container", style: { right: "-28px", top: "9px" }, children: /* @__PURE__ */ n.jsx(
455
- u,
455
+ p,
456
456
  {
457
- disabled: t || i,
458
- onClick: a(s),
457
+ disabled: t || l,
458
+ onClick: s(a),
459
459
  uiSchema: c,
460
460
  registry: d
461
461
  }
@@ -464,80 +464,72 @@ import './assets/@common-rjsf.css';const O = {
464
464
  }, Se = ({
465
465
  id: e,
466
466
  onChange: t,
467
- value: s,
468
- required: r,
469
- disabled: a,
470
- readonly: i,
471
- autofocus: l,
472
- onBlur: o,
473
- onFocus: c
467
+ value: a,
468
+ disabled: r,
469
+ readonly: s,
470
+ autofocus: l
474
471
  }) => {
475
- const d = (u, f) => {
476
- const { id: p, checked: j } = u.target;
477
- f === "blur" ? o(p, j) : f === "focus" && c(p, j);
478
- }, x = z(s) ? !1 : s;
479
- return /* @__PURE__ */ n.jsxs("div", { children: [
472
+ const i = z(a) ? !1 : a, o = () => {
473
+ t(!i);
474
+ };
475
+ return /* @__PURE__ */ n.jsxs("div", { className: "flexbox dc__align-items-center dc__gap-8", children: [
480
476
  /* @__PURE__ */ n.jsx(
481
477
  Y,
482
478
  {
483
- selected: x,
484
- onSelect: t,
485
- id: e,
486
479
  name: e,
487
- required: r,
488
- disabled: a || i,
480
+ ariaLabel: e,
481
+ onChange: o,
482
+ isChecked: i,
489
483
  autoFocus: l,
490
- rootClassName: "w-32 mb-0 dc__height-inherit",
491
- onBlur: (u) => d(u, "blur"),
492
- onFocus: (u) => d(u, "focus")
484
+ isDisabled: r || s
493
485
  }
494
486
  ),
495
- /* @__PURE__ */ n.jsx("span", { className: "dc__capitalize ml-8", children: x.toString() })
487
+ /* @__PURE__ */ n.jsx("span", { className: "dc__capitalize", children: i.toString() })
496
488
  ] });
497
- }, Fe = ({ children: e, ...t }) => /* @__PURE__ */ n.jsx(D.MenuList, { ...t, children: Array.isArray(e) ? e.slice(0, 20) : e }), Oe = (e) => /* @__PURE__ */ n.jsx(D.DropdownIndicator, { ...e, children: /* @__PURE__ */ n.jsx(X, { className: "icon-dim-20 icon-n5", "data-testid": "overview-project-edit-dropdown" }) }), Ce = (e) => {
489
+ }, Fe = ({ children: e, ...t }) => /* @__PURE__ */ n.jsx(D.MenuList, { ...t, children: Array.isArray(e) ? e.slice(0, 20) : e }), Ce = (e) => /* @__PURE__ */ n.jsx(D.DropdownIndicator, { ...e, children: /* @__PURE__ */ n.jsx(X, { className: "icon-dim-20 icon-n5", "data-testid": "overview-project-edit-dropdown" }) }), Oe = (e) => {
498
490
  const {
499
491
  id: t,
500
- multiple: s = !1,
492
+ multiple: a = !1,
501
493
  options: r,
502
- value: a,
503
- disabled: i,
504
- readonly: l,
494
+ value: s,
495
+ disabled: l,
496
+ readonly: i,
505
497
  autofocus: o = !1,
506
498
  onChange: c,
507
499
  onBlur: d,
508
- onFocus: x,
509
- placeholder: u
510
- } = e, { enumOptions: f = [] } = r, p = s ? [] : "", j = (h) => {
511
- c(s ? h.map((m) => m.value) : h.value);
512
- }, _ = (h) => s ? f.filter((m) => h.some((g) => E(g, m.value))) : f.find((m) => E(h, m.value));
500
+ onFocus: j,
501
+ placeholder: p
502
+ } = e, { enumOptions: h = [] } = r, f = a ? [] : "", _ = (m) => {
503
+ c(a ? m.map((u) => u.value) : m.value);
504
+ }, x = (m) => a ? h.filter((u) => m.some((g) => A(g, u.value))) : h.find((u) => A(m, u.value));
513
505
  return /* @__PURE__ */ n.jsx(
514
506
  Q,
515
507
  {
516
508
  id: t,
517
509
  name: t,
518
- isMulti: s,
519
- value: typeof a > "u" ? p : _(a),
510
+ isMulti: a,
511
+ value: typeof s > "u" ? f : x(s),
520
512
  autoFocus: o,
521
- onChange: j,
522
- options: f,
523
- onBlur: () => d(t, a),
524
- onFocus: () => x(t, a),
525
- placeholder: u || O.SELECT,
526
- isDisabled: i || l,
513
+ onChange: _,
514
+ options: h,
515
+ onBlur: () => d(t, s),
516
+ onFocus: () => j(t, s),
517
+ placeholder: p || C.SELECT,
518
+ isDisabled: l || i,
527
519
  styles: {
528
520
  ...w,
529
- control: (h, m) => ({
530
- ...w.control(h, m),
521
+ control: (m, u) => ({
522
+ ...w.control(m, u),
531
523
  minHeight: "36px"
532
524
  }),
533
- multiValue: (h, m) => ({
534
- ...w.multiValue(h, m),
525
+ multiValue: (m, u) => ({
526
+ ...w.multiValue(m, u),
535
527
  margin: "2px 8px 2px 2px"
536
528
  })
537
529
  },
538
530
  components: {
539
531
  IndicatorSeparator: null,
540
- DropdownIndicator: Oe,
532
+ DropdownIndicator: Ce,
541
533
  MenuList: Fe
542
534
  },
543
535
  menuPlacement: "auto"
@@ -545,8 +537,8 @@ import './assets/@common-rjsf.css';const O = {
545
537
  );
546
538
  }, Pe = {
547
539
  CheckboxWidget: Se,
548
- SelectWidget: Ce
549
- }, Ee = {
540
+ SelectWidget: Oe
541
+ }, Ae = {
550
542
  ArrayFieldItemTemplate: de,
551
543
  ArrayFieldTemplate: ue,
552
544
  BaseInputTemplate: pe,
@@ -554,53 +546,53 @@ import './assets/@common-rjsf.css';const O = {
554
546
  FieldTemplate: xe,
555
547
  FieldErrorTemplate: je,
556
548
  ObjectFieldTemplate: we,
557
- TitleFieldTemplate: C,
549
+ TitleFieldTemplate: O,
558
550
  WrapIfAdditionalTemplate: Ne
559
- }, Ae = K, Re = G, Ye = J((e, t) => {
560
- const { schemaPathToUpdatePathMap: s, isUpdatePathKeywordPresent: r } = P(() => {
561
- const o = be(e.schema);
551
+ }, Ee = K, Re = G, Ye = J((e, t) => {
552
+ const { schemaPathToUpdatePathMap: a, isUpdatePathKeywordPresent: r } = P(() => {
553
+ const o = ye(e.schema);
562
554
  return {
563
555
  schemaPathToUpdatePathMap: o,
564
556
  isUpdatePathKeywordPresent: Object.entries(o).some(([c, d]) => c !== d)
565
557
  };
566
- }, [e.schema]), a = P(() => r ? ve({ formData: e.formData ?? {}, schemaPathToUpdatePathMap: s }) : e.formData, [e.formData, s, r]), i = (o) => {
558
+ }, [e.schema]), s = P(() => r ? ve({ formData: e.formData ?? {}, schemaPathToUpdatePathMap: a }) : e.formData, [e.formData, a, r]), l = (o) => {
567
559
  if (!e.onChange)
568
560
  return;
569
561
  const c = I({
570
562
  formState: o.formData,
571
563
  formData: e.formData,
572
- schemaPathToUpdatePathMap: s
564
+ schemaPathToUpdatePathMap: a
573
565
  });
574
566
  e.onChange({ ...o, formData: c });
575
- }, l = (o, c) => {
567
+ }, i = (o, c) => {
576
568
  if (!e.onSubmit)
577
569
  return;
578
570
  const d = I({
579
571
  formState: o.formData,
580
572
  formData: e.formData,
581
- schemaPathToUpdatePathMap: s
573
+ schemaPathToUpdatePathMap: a
582
574
  });
583
575
  e.onSubmit?.({ ...o, formData: d }, c);
584
576
  };
585
577
  return /* @__PURE__ */ n.jsx(
586
- Ae,
578
+ Ee,
587
579
  {
588
580
  noHtml5Validate: !0,
589
581
  showErrorList: !1,
590
582
  autoComplete: "off",
591
583
  ...e,
592
- formData: a,
584
+ formData: s,
593
585
  ...r ? {
594
- onChange: i,
595
- onSubmit: l
586
+ onChange: l,
587
+ onSubmit: i
596
588
  } : {},
597
589
  className: `rjsf-form-template__container ${e.className || ""}`,
598
590
  validator: Re,
599
591
  templates: {
600
- ...Ee,
592
+ ...Ae,
601
593
  ...e.templates
602
594
  },
603
- formContext: a,
595
+ formContext: s,
604
596
  widgets: { ...Pe, ...e.widgets },
605
597
  translateString: _e,
606
598
  ref: t
@@ -611,7 +603,7 @@ export {
611
603
  Je as H,
612
604
  Ye as R,
613
605
  Ke as a,
614
- be as b,
615
- b as c,
606
+ ye as b,
607
+ y as c,
616
608
  qe as g
617
609
  };