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

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 (76) hide show
  1. package/dist/{@code-editor-AS248Z8Q.js → @code-editor-DRvAFRa4.js} +7792 -7975
  2. package/dist/{@common-rjsf-LqYGieJ9.js → @common-rjsf-BSQQ3wGe.js} +230 -222
  3. package/dist/{@framer-motion-Bw9QEkUf.js → @framer-motion-Dchiw-Rb.js} +619 -637
  4. package/dist/Common/Constants.d.ts +0 -3
  5. package/dist/Common/Dialogs/ConfirmationDialog.d.ts +11 -0
  6. package/dist/Common/Dialogs/Types.d.ts +17 -0
  7. package/dist/Common/Dialogs/index.d.ts +1 -0
  8. package/dist/Common/InfoColorBar/InfoColourbar.d.ts +6 -0
  9. package/dist/Common/RJSF/widgets/Checkbox.d.ts +1 -1
  10. package/dist/Common/Toggle/Toggle.d.ts +18 -0
  11. package/dist/Common/Types.d.ts +44 -9
  12. package/dist/Common/index.d.ts +2 -0
  13. package/dist/Shared/Analytics/analytics.d.ts +0 -2
  14. package/dist/Shared/Components/AppStatusModal/service.d.ts +1 -1
  15. package/dist/Shared/Components/AppStatusModal/types.d.ts +2 -1
  16. package/dist/Shared/Components/Button/Button.component.d.ts +1 -1
  17. package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/utils.d.ts +1 -2
  18. package/dist/Shared/Components/CICDHistory/service.d.ts +7 -1
  19. package/dist/Shared/Components/CICDHistory/types.d.ts +18 -2
  20. package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.types.d.ts +1 -18
  21. package/dist/Shared/Components/DeploymentConfigDiff/index.d.ts +0 -1
  22. package/dist/Shared/Components/DeploymentStatusBreakdown/constants.d.ts +2 -1
  23. package/dist/Shared/Components/DeploymentStatusBreakdown/utils.d.ts +2 -1
  24. package/dist/Shared/Components/DocLink/types.d.ts +0 -1
  25. package/dist/Shared/Components/DocLink/utils.d.ts +1 -1
  26. package/dist/Shared/Components/Header/types.d.ts +1 -2
  27. package/dist/Shared/Components/Icon/Icon.d.ts +0 -15
  28. package/dist/Shared/Components/Popover/types.d.ts +0 -5
  29. package/dist/Shared/Components/Popover/usePopover.hook.d.ts +1 -1
  30. package/dist/Shared/Components/Switch/Switch.component.d.ts +1 -1
  31. package/dist/Shared/Components/Switch/types.d.ts +2 -11
  32. package/dist/Shared/Components/Switch/utils.d.ts +2 -2
  33. package/dist/Shared/Components/Textarea/Textarea.component.d.ts +1 -1
  34. package/dist/Shared/Components/Textarea/types.d.ts +1 -17
  35. package/dist/Shared/Components/ToggleResolveScopedVariables/ToggleResolveScopedVariables.component.d.ts +1 -1
  36. package/dist/Shared/Components/ToggleResolveScopedVariables/types.d.ts +1 -1
  37. package/dist/Shared/Components/index.d.ts +0 -3
  38. package/dist/Shared/Providers/index.d.ts +0 -1
  39. package/dist/Shared/Providers/types.d.ts +12 -40
  40. package/dist/Shared/Services/app.types.d.ts +2 -7
  41. package/dist/Shared/constants.d.ts +1 -2
  42. package/dist/Shared/types.d.ts +3 -7
  43. package/dist/assets/@code-editor.css +1 -1
  44. package/dist/assets/ic-add.18a93616.svg +19 -0
  45. package/dist/assets/{ic-cluster.f1c3fad1.svg → ic-cluster.71ba9e26.svg} +1 -1
  46. package/dist/assets/ic-sparkle-color.01c0be88.svg +1 -0
  47. package/dist/index.d.ts +3 -5
  48. package/dist/index.js +753 -752
  49. package/package.json +3 -3
  50. package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffRadioSelect.d.ts +0 -7
  51. package/dist/Shared/Components/ProgressBar/ProgressBar.component.d.ts +0 -2
  52. package/dist/Shared/Components/ProgressBar/index.d.ts +0 -1
  53. package/dist/Shared/Components/ProgressBar/types.d.ts +0 -9
  54. package/dist/Shared/Components/SwitchThemeDialog/SwitchThemeDialog.component.d.ts +0 -3
  55. package/dist/Shared/Components/SwitchThemeDialog/index.d.ts +0 -2
  56. package/dist/Shared/Components/SwitchThemeDialog/types.d.ts +0 -35
  57. package/dist/Shared/Components/Textarea/utils.d.ts +0 -5
  58. package/dist/Shared/Components/Typewriter/BlinkingCursor.d.ts +0 -1
  59. package/dist/Shared/Components/Typewriter/index.d.ts +0 -2
  60. package/dist/Shared/Components/Typewriter/useTypewriter.d.ts +0 -1
  61. package/dist/assets/ic-add.2d785695.svg +0 -3
  62. package/dist/assets/ic-asterisk.ab224e72.svg +0 -3
  63. package/dist/assets/ic-brain.838491eb.svg +0 -3
  64. package/dist/assets/ic-cluster-isolated.93f843b9.svg +0 -3
  65. package/dist/assets/ic-devtron-ai.535b45ec.svg +0 -287
  66. package/dist/assets/ic-environment-isolated.b772ae9d.svg +0 -3
  67. package/dist/assets/ic-environment.e639b8f3.svg +0 -4
  68. package/dist/assets/ic-folder-color.7cf84356.svg +0 -6
  69. package/dist/assets/ic-minus.416da21b.svg +0 -3
  70. package/dist/assets/ic-openai.6e4c9a37.svg +0 -10
  71. package/dist/assets/ic-paper-plane.ad7e6d2f.svg +0 -3
  72. package/dist/assets/ic-shapes.b7b5c28f.svg +0 -3
  73. package/dist/assets/ic-sparkle-ai-color.34768219.svg +0 -11
  74. package/dist/assets/ic-sparkle-color.a9722593.svg +0 -18
  75. package/dist/assets/ic-stop-fill.32ea653f.svg +0 -8
  76. package/dist/assets/ic-world-globe.877fa6a0.svg +0 -3
@@ -1,14 +1,14 @@
1
- import { j as n, as as b, au as k, at as W } from "./@vendor-STJ9h0oI.js";
1
+ import { j as n, as as y, 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, S as Y, i as z, a as w, d as A, e as G } from "./@code-editor-AS248Z8Q.js";
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-DRvAFRa4.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 $, 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";
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";
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 C = {
11
+ import './assets/@common-rjsf.css';const O = {
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 C = {
19
19
  }, de = ({
20
20
  children: e,
21
21
  disabled: t,
22
- hasToolbar: a,
22
+ hasToolbar: s,
23
23
  hasRemove: r,
24
- index: s,
25
- onDropIndexClick: l,
26
- readonly: i,
24
+ index: a,
25
+ onDropIndexClick: i,
26
+ readonly: l,
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: a && r && /* @__PURE__ */ n.jsx(
33
+ /* @__PURE__ */ n.jsx("div", { className: "dc__position-abs remove-btn__container", style: { right: "-28px", top: "9px" }, children: s && r && /* @__PURE__ */ n.jsx(
34
34
  d,
35
35
  {
36
- disabled: t || i,
37
- onClick: l(s),
36
+ disabled: t || l,
37
+ onClick: i(a),
38
38
  uiSchema: c,
39
39
  registry: o
40
40
  }
@@ -43,82 +43,82 @@ import './assets/@common-rjsf.css';const C = {
43
43
  }, T = ({
44
44
  showLabel: e,
45
45
  label: t,
46
- required: a,
46
+ required: s,
47
47
  children: r,
48
- id: s,
49
- rawDescription: l,
50
- shouldAlignCenter: i = !0
48
+ id: a,
49
+ rawDescription: i,
50
+ shouldAlignCenter: l = !0
51
51
  }) => /* @__PURE__ */ n.jsxs(
52
52
  "div",
53
53
  {
54
- className: e ? `display-grid dc__gap-12 rjsf-form-template__field ${i ? "flex-align-center" : ""}` : "",
54
+ className: e ? `display-grid dc__gap-12 rjsf-form-template__field ${l ? "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: 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: " *" })
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: " *" })
59
59
  ] }),
60
60
  r
61
61
  ]
62
62
  }
63
- ), E = ({ label: e, canAdd: t, onAddClick: a, disabled: r, readonly: s, uiSchema: l, registry: i }) => {
63
+ ), A = ({ label: e, canAdd: t, onAddClick: s, disabled: r, readonly: a, uiSchema: i, registry: l }) => {
64
64
  const {
65
65
  ButtonTemplates: { AddButton: o }
66
- } = i.templates;
66
+ } = l.templates;
67
67
  return t && /* @__PURE__ */ n.jsx(
68
68
  o,
69
69
  {
70
70
  label: e,
71
- onClick: a,
72
- disabled: r || s,
73
- uiSchema: l,
74
- registry: i
71
+ onClick: s,
72
+ disabled: r || a,
73
+ uiSchema: i,
74
+ registry: l
75
75
  }
76
76
  );
77
77
  }, ue = ({
78
78
  canAdd: e,
79
79
  className: t,
80
- disabled: a,
80
+ disabled: s,
81
81
  idSchema: r,
82
- uiSchema: s,
83
- items: l,
84
- onAddClick: i,
82
+ uiSchema: a,
83
+ items: i,
84
+ onAddClick: l,
85
85
  readonly: o,
86
86
  registry: c,
87
87
  required: d,
88
- title: j
88
+ title: x
89
89
  }) => {
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,
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,
95
95
  props: {
96
- ...x.children.props
96
+ ..._.children.props
97
97
  }
98
98
  };
99
- return /* @__PURE__ */ n.jsx(h, { ...x, children: u }, _);
99
+ return /* @__PURE__ */ n.jsx(f, { ..._, children: m }, j);
100
100
  }),
101
101
  /* @__PURE__ */ n.jsx(
102
- E,
102
+ A,
103
103
  {
104
- label: f,
104
+ label: p,
105
105
  canAdd: e,
106
- onAddClick: i,
107
- disabled: a,
106
+ onAddClick: l,
107
+ disabled: s,
108
108
  readonly: o,
109
- uiSchema: s,
109
+ uiSchema: a,
110
110
  registry: c
111
111
  }
112
112
  )
113
- ] }) : /* @__PURE__ */ n.jsx(T, { label: f, required: d, showLabel: !0, id: r.$id, children: /* @__PURE__ */ n.jsx(
114
- E,
113
+ ] }) : /* @__PURE__ */ n.jsx(T, { label: p, required: d, showLabel: !0, id: r.$id, children: /* @__PURE__ */ n.jsx(
114
+ A,
115
115
  {
116
- label: f,
116
+ label: p,
117
117
  canAdd: e,
118
- onAddClick: i,
119
- disabled: a,
118
+ onAddClick: l,
119
+ disabled: s,
120
120
  readonly: o,
121
- uiSchema: s,
121
+ uiSchema: a,
122
122
  registry: c
123
123
  }
124
124
  ) }) });
@@ -127,100 +127,100 @@ import './assets/@common-rjsf.css';const C = {
127
127
  } = q(), pe = ({ placeholder: e, ...t }) => /* @__PURE__ */ n.jsx(
128
128
  me,
129
129
  {
130
- placeholder: e || C.INPUT,
130
+ placeholder: e || O.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: a,
137
+ iconType: s,
138
138
  registry: r,
139
- uiSchema: s,
140
- ...l
139
+ uiSchema: a,
140
+ ...i
141
141
  }) => {
142
- const i = `Add ${e}`;
142
+ const l = `Add ${e}`;
143
143
  return /* @__PURE__ */ n.jsx("div", { className: "flexbox flex-justify-start", children: /* @__PURE__ */ n.jsxs(
144
144
  "button",
145
145
  {
146
- ...l,
146
+ ...i,
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: i, children: /* @__PURE__ */ n.jsx("span", { className: "cb-5 fs-13 lh-34 dc__truncate", children: i }) })
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 }) })
153
153
  ]
154
154
  }
155
155
  ) });
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 = ({
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 = ({
160
160
  id: e,
161
161
  title: t,
162
- required: a,
162
+ required: s,
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
- a && /* @__PURE__ */ n.jsx("span", { className: "cr-5", children: " *" })
166
+ s && /* @__PURE__ */ n.jsx("span", { className: "cr-5", children: " *" })
167
167
  ] }), xe = (e) => {
168
168
  const {
169
169
  id: t,
170
- label: a,
170
+ label: s,
171
171
  children: r,
172
- errors: s,
173
- hidden: l,
174
- required: i,
172
+ errors: a,
173
+ hidden: i,
174
+ required: l,
175
175
  displayLabel: o,
176
176
  registry: c,
177
177
  uiSchema: d,
178
- classNames: j,
179
- schema: p,
180
- rawDescription: h
181
- } = e, f = $(d), _ = B(
178
+ classNames: x,
179
+ schema: u,
180
+ rawDescription: f
181
+ } = e, p = B(d), j = $(
182
182
  "WrapIfAdditionalTemplate",
183
183
  c,
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 }) : (
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 }) : (
187
187
  // NOTE: need to override the margins of default rjsf css
188
- /* @__PURE__ */ n.jsxs("div", { className: `${j} mb-0`, children: [
189
- u && /* @__PURE__ */ n.jsx(
190
- O,
188
+ /* @__PURE__ */ n.jsxs("div", { className: `${x} mb-0`, children: [
189
+ m && /* @__PURE__ */ n.jsx(
190
+ C,
191
191
  {
192
192
  id: t,
193
- title: a,
194
- required: i,
193
+ title: s,
194
+ required: l,
195
195
  registry: c,
196
196
  uiSchema: d,
197
- schema: p,
198
- description: h
197
+ schema: u,
198
+ description: f
199
199
  }
200
200
  ),
201
201
  /* @__PURE__ */ n.jsx(
202
202
  T,
203
203
  {
204
- label: a,
205
- showLabel: m,
204
+ label: s,
205
+ showLabel: h,
206
206
  id: t,
207
- required: i,
208
- rawDescription: h,
209
- children: /* @__PURE__ */ n.jsx(_, { ...e, children: r })
207
+ required: l,
208
+ rawDescription: f,
209
+ children: /* @__PURE__ */ n.jsx(j, { ...e, children: r })
210
210
  }
211
211
  ),
212
- s
212
+ a
213
213
  ] })
214
214
  );
215
215
  }, je = ({ errors: e = [], idSchema: t }) => {
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: [
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: [
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
- ] }, s)) });
223
+ ] }, a)) });
224
224
  }, _e = (e, t) => {
225
225
  switch (e) {
226
226
  case ne.NewStringDefault:
@@ -256,7 +256,7 @@ import './assets/@common-rjsf.css';const C = {
256
256
  default:
257
257
  return "null";
258
258
  }
259
- }, y = (e) => {
259
+ }, b = (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 C = {
270
270
  const t = structuredClone(e);
271
271
  return typeof t == "string" ? {
272
272
  value: !0,
273
- path: y(t)
273
+ path: b(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: y(t.value)
276
+ path: b(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: y(t.path)
279
+ path: b(t.path)
280
280
  } : structuredClone(R);
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) => {
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) => {
286
286
  const t = {};
287
287
  return H(e, "", t), t;
288
- }, M = (e, t, a) => {
289
- if (t >= a.length)
288
+ }, M = (e, t, s) => {
289
+ if (t >= s.length)
290
290
  return e;
291
- const r = a[t];
292
- if (t === a.length - 1) {
293
- const s = structuredClone(e);
294
- return delete s[r], s;
291
+ const r = s[t];
292
+ if (t === s.length - 1) {
293
+ const a = structuredClone(e);
294
+ return delete a[r], a;
295
295
  }
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;
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;
299
299
  }
300
300
  return e;
301
- }, be = (e, t) => {
301
+ }, ye = (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 a = t.split("/").slice(1);
307
- return M(e, 0, a);
306
+ const s = t.split("/").slice(1);
307
+ return M(e, 0, s);
308
308
  }, I = ({
309
309
  formState: e,
310
310
  formData: t,
311
- schemaPathToUpdatePathMap: a
311
+ schemaPathToUpdatePathMap: s
312
312
  }) => {
313
313
  let r = structuredClone(e);
314
- return r && (Object.entries(a).forEach(([s, l]) => {
315
- if (s === l || !l)
314
+ return r && (Object.entries(s).forEach(([a, i]) => {
315
+ if (a === i || !i)
316
316
  return;
317
- const i = b({
317
+ const l = y({
318
318
  json: t,
319
- path: v(s),
319
+ path: v(a),
320
320
  resultType: "value",
321
321
  wrap: !1
322
322
  });
323
- i === void 0 ? r = be(r, s) : r = N([S(s, i), r]);
324
- const o = b({
323
+ l === void 0 ? r = ye(r, a) : r = N([S(a, l), r]);
324
+ const o = y({
325
325
  json: e,
326
- path: v(s),
326
+ path: v(a),
327
327
  resultType: "value",
328
328
  wrap: !1
329
329
  });
330
- o !== void 0 && (r = N([S(l, o), r]));
330
+ o !== void 0 && (r = N([S(i, 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(([a, r]) => {
334
- if (a === r || !r)
333
+ ...Object.entries(t).map(([s, r]) => {
334
+ if (s === r || !r)
335
335
  return {};
336
- const s = b({
336
+ const a = y({
337
337
  json: e,
338
338
  path: v(r),
339
339
  resultType: "value",
340
340
  wrap: !1
341
341
  });
342
- return s === void 0 ? {} : S(a, s);
342
+ return a === void 0 ? {} : S(s, a);
343
343
  }),
344
344
  structuredClone(e)
345
345
  ]), Te = ({
346
346
  disabled: e,
347
347
  formData: t,
348
- idSchema: a,
348
+ idSchema: s,
349
349
  onAddClick: r,
350
- properties: s,
351
- readonly: l,
352
- registry: i,
350
+ properties: a,
351
+ readonly: i,
352
+ registry: l,
353
353
  required: o,
354
354
  schema: c,
355
355
  title: d,
356
- uiSchema: j,
357
- formContext: p
356
+ uiSchema: x,
357
+ formContext: u
358
358
  }) => {
359
- const h = !!c.additionalProperties, f = ae(c, j, t) && /* @__PURE__ */ n.jsx(
359
+ const f = !!c.additionalProperties, p = se(c, x, 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 || l,
366
- uiSchema: j,
367
- registry: i
365
+ disabled: e || i,
366
+ uiSchema: x,
367
+ registry: l
368
368
  }
369
- ), _ = s.filter((x) => {
370
- const m = c.properties?.[x.name]?.hidden;
371
- if (!m)
369
+ ), j = a.filter((_) => {
370
+ const h = c.properties?.[_.name]?.hidden;
371
+ if (!h)
372
372
  return !0;
373
373
  try {
374
- const u = ge(m);
375
- if (!u.path)
374
+ const m = ge(h);
375
+ if (!m.path)
376
376
  throw new Error("Empty path property of hidden descriptor field");
377
- const g = b({
378
- path: v(u.path),
379
- json: p,
377
+ const g = y({
378
+ path: v(m.path),
379
+ json: u,
380
380
  resultType: "value",
381
381
  wrap: !1
382
382
  });
383
- return !(g === void 0 || se(u.value, g));
383
+ return !(g === void 0 || ae(m.value, g));
384
384
  } catch {
385
385
  return !0;
386
386
  }
387
- }).map((x) => x.content);
388
- return h ? s.length ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
387
+ }).map((_) => _.content);
388
+ return f ? a.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: a.$id,
395
+ id: s.$id,
396
396
  shouldAlignCenter: !1,
397
- children: /* @__PURE__ */ n.jsx("div", { children: _ })
397
+ children: /* @__PURE__ */ n.jsx("div", { children: j })
398
398
  }
399
399
  ),
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
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
404
404
  ] });
405
405
  }, we = (e) => {
406
- const { idSchema: t, registry: a, required: r, schema: s, title: l, uiSchema: i, description: o } = e, c = !!s.additionalProperties, d = l && !c;
406
+ const { idSchema: t, registry: s, required: r, schema: a, title: i, uiSchema: l, description: o } = e, c = !!a.additionalProperties, d = i && !c;
407
407
  return /* @__PURE__ */ n.jsxs("fieldset", { id: t.$id, children: [
408
408
  d && /* @__PURE__ */ n.jsx(
409
- O,
409
+ C,
410
410
  {
411
411
  id: re(t),
412
- title: l,
412
+ title: i,
413
413
  required: r,
414
- schema: s,
415
- uiSchema: i,
416
- registry: a,
414
+ schema: a,
415
+ uiSchema: l,
416
+ registry: s,
417
417
  description: o
418
418
  }
419
419
  ),
420
420
  /* @__PURE__ */ n.jsx(
421
421
  "div",
422
422
  {
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"}`,
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"}`,
424
424
  children: /* @__PURE__ */ n.jsx(Te, { ...e })
425
425
  }
426
426
  )
@@ -428,34 +428,34 @@ import './assets/@common-rjsf.css';const C = {
428
428
  }, Ne = ({
429
429
  id: e,
430
430
  disabled: t,
431
- label: a,
431
+ label: s,
432
432
  onKeyChange: r,
433
- onDropPropertyClick: s,
434
- readonly: l,
435
- schema: i,
433
+ onDropPropertyClick: a,
434
+ readonly: i,
435
+ schema: l,
436
436
  children: o,
437
437
  uiSchema: c,
438
438
  registry: d
439
439
  }) => {
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: [
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: [
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: (f) => r(f.target.value),
449
- placeholder: C.OBJECT_KEY,
450
- defaultValue: a
448
+ onBlur: (p) => r(p.target.value),
449
+ placeholder: O.OBJECT_KEY,
450
+ defaultValue: s
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
- p,
455
+ u,
456
456
  {
457
- disabled: t || l,
458
- onClick: s(a),
457
+ disabled: t || i,
458
+ onClick: a(s),
459
459
  uiSchema: c,
460
460
  registry: d
461
461
  }
@@ -464,72 +464,80 @@ import './assets/@common-rjsf.css';const C = {
464
464
  }, Se = ({
465
465
  id: e,
466
466
  onChange: t,
467
- value: a,
468
- disabled: r,
469
- readonly: s,
470
- autofocus: l
467
+ value: s,
468
+ required: r,
469
+ disabled: a,
470
+ readonly: i,
471
+ autofocus: l,
472
+ onBlur: o,
473
+ onFocus: c
471
474
  }) => {
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: [
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: [
476
480
  /* @__PURE__ */ n.jsx(
477
481
  Y,
478
482
  {
483
+ selected: x,
484
+ onSelect: t,
485
+ id: e,
479
486
  name: e,
480
- ariaLabel: e,
481
- onChange: o,
482
- isChecked: i,
487
+ required: r,
488
+ disabled: a || i,
483
489
  autoFocus: l,
484
- isDisabled: r || s
490
+ rootClassName: "w-32 mb-0 dc__height-inherit",
491
+ onBlur: (u) => d(u, "blur"),
492
+ onFocus: (u) => d(u, "focus")
485
493
  }
486
494
  ),
487
- /* @__PURE__ */ n.jsx("span", { className: "dc__capitalize", children: i.toString() })
495
+ /* @__PURE__ */ n.jsx("span", { className: "dc__capitalize ml-8", children: x.toString() })
488
496
  ] });
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) => {
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) => {
490
498
  const {
491
499
  id: t,
492
- multiple: a = !1,
500
+ multiple: s = !1,
493
501
  options: r,
494
- value: s,
495
- disabled: l,
496
- readonly: i,
502
+ value: a,
503
+ disabled: i,
504
+ readonly: l,
497
505
  autofocus: o = !1,
498
506
  onChange: c,
499
507
  onBlur: d,
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));
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));
505
513
  return /* @__PURE__ */ n.jsx(
506
514
  Q,
507
515
  {
508
516
  id: t,
509
517
  name: t,
510
- isMulti: a,
511
- value: typeof s > "u" ? f : x(s),
518
+ isMulti: s,
519
+ value: typeof a > "u" ? p : _(a),
512
520
  autoFocus: o,
513
- onChange: _,
514
- options: h,
515
- onBlur: () => d(t, s),
516
- onFocus: () => j(t, s),
517
- placeholder: p || C.SELECT,
518
- isDisabled: l || i,
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,
519
527
  styles: {
520
528
  ...w,
521
- control: (m, u) => ({
522
- ...w.control(m, u),
529
+ control: (h, m) => ({
530
+ ...w.control(h, m),
523
531
  minHeight: "36px"
524
532
  }),
525
- multiValue: (m, u) => ({
526
- ...w.multiValue(m, u),
533
+ multiValue: (h, m) => ({
534
+ ...w.multiValue(h, m),
527
535
  margin: "2px 8px 2px 2px"
528
536
  })
529
537
  },
530
538
  components: {
531
539
  IndicatorSeparator: null,
532
- DropdownIndicator: Ce,
540
+ DropdownIndicator: Oe,
533
541
  MenuList: Fe
534
542
  },
535
543
  menuPlacement: "auto"
@@ -537,8 +545,8 @@ import './assets/@common-rjsf.css';const C = {
537
545
  );
538
546
  }, Pe = {
539
547
  CheckboxWidget: Se,
540
- SelectWidget: Oe
541
- }, Ae = {
548
+ SelectWidget: Ce
549
+ }, Ee = {
542
550
  ArrayFieldItemTemplate: de,
543
551
  ArrayFieldTemplate: ue,
544
552
  BaseInputTemplate: pe,
@@ -546,53 +554,53 @@ import './assets/@common-rjsf.css';const C = {
546
554
  FieldTemplate: xe,
547
555
  FieldErrorTemplate: je,
548
556
  ObjectFieldTemplate: we,
549
- TitleFieldTemplate: O,
557
+ TitleFieldTemplate: C,
550
558
  WrapIfAdditionalTemplate: Ne
551
- }, Ee = K, Re = G, Ye = J((e, t) => {
552
- const { schemaPathToUpdatePathMap: a, isUpdatePathKeywordPresent: r } = P(() => {
553
- const o = ye(e.schema);
559
+ }, Ae = K, Re = G, Ye = J((e, t) => {
560
+ const { schemaPathToUpdatePathMap: s, isUpdatePathKeywordPresent: r } = P(() => {
561
+ const o = be(e.schema);
554
562
  return {
555
563
  schemaPathToUpdatePathMap: o,
556
564
  isUpdatePathKeywordPresent: Object.entries(o).some(([c, d]) => c !== d)
557
565
  };
558
- }, [e.schema]), s = P(() => r ? ve({ formData: e.formData ?? {}, schemaPathToUpdatePathMap: a }) : e.formData, [e.formData, a, r]), l = (o) => {
566
+ }, [e.schema]), a = P(() => r ? ve({ formData: e.formData ?? {}, schemaPathToUpdatePathMap: s }) : e.formData, [e.formData, s, r]), i = (o) => {
559
567
  if (!e.onChange)
560
568
  return;
561
569
  const c = I({
562
570
  formState: o.formData,
563
571
  formData: e.formData,
564
- schemaPathToUpdatePathMap: a
572
+ schemaPathToUpdatePathMap: s
565
573
  });
566
574
  e.onChange({ ...o, formData: c });
567
- }, i = (o, c) => {
575
+ }, l = (o, c) => {
568
576
  if (!e.onSubmit)
569
577
  return;
570
578
  const d = I({
571
579
  formState: o.formData,
572
580
  formData: e.formData,
573
- schemaPathToUpdatePathMap: a
581
+ schemaPathToUpdatePathMap: s
574
582
  });
575
583
  e.onSubmit?.({ ...o, formData: d }, c);
576
584
  };
577
585
  return /* @__PURE__ */ n.jsx(
578
- Ee,
586
+ Ae,
579
587
  {
580
588
  noHtml5Validate: !0,
581
589
  showErrorList: !1,
582
590
  autoComplete: "off",
583
591
  ...e,
584
- formData: s,
592
+ formData: a,
585
593
  ...r ? {
586
- onChange: l,
587
- onSubmit: i
594
+ onChange: i,
595
+ onSubmit: l
588
596
  } : {},
589
597
  className: `rjsf-form-template__container ${e.className || ""}`,
590
598
  validator: Re,
591
599
  templates: {
592
- ...Ae,
600
+ ...Ee,
593
601
  ...e.templates
594
602
  },
595
- formContext: s,
603
+ formContext: a,
596
604
  widgets: { ...Pe, ...e.widgets },
597
605
  translateString: _e,
598
606
  ref: t
@@ -603,7 +611,7 @@ export {
603
611
  Je as H,
604
612
  Ye as R,
605
613
  Ke as a,
606
- ye as b,
607
- y as c,
614
+ be as b,
615
+ b as c,
608
616
  qe as g
609
617
  };