@devtron-labs/devtron-fe-common-lib 1.15.0-pre-4-beta-1 → 1.15.1-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.
- package/dist/{@code-editor-Czag4IbD.js → @code-editor-C_u3nWGd.js} +6082 -6015
- package/dist/{@common-rjsf-C8Io8Ugi.js → @common-rjsf-7Qd6WdWi.js} +230 -222
- package/dist/Common/Dialogs/ConfirmationDialog.d.ts +11 -0
- package/dist/Common/Dialogs/Types.d.ts +17 -0
- package/dist/Common/Dialogs/index.d.ts +1 -0
- package/dist/Common/InfoColorBar/InfoColourbar.d.ts +6 -0
- package/dist/Common/RJSF/widgets/Checkbox.d.ts +1 -1
- package/dist/Common/Toggle/Toggle.d.ts +18 -0
- package/dist/Common/Types.d.ts +43 -1
- package/dist/Common/index.d.ts +2 -0
- package/dist/Pages/ResourceBrowser/ResourceBrowser.Types.d.ts +46 -2
- package/dist/Pages/ResourceBrowser/constants.d.ts +5 -0
- package/dist/Shared/Components/DocLink/types.d.ts +0 -1
- package/dist/Shared/Components/DocLink/utils.d.ts +1 -1
- package/dist/Shared/Components/Icon/Icon.d.ts +3 -4
- package/dist/Shared/Components/Switch/Switch.component.d.ts +1 -1
- package/dist/Shared/Components/Switch/types.d.ts +2 -11
- package/dist/Shared/Components/Switch/utils.d.ts +2 -2
- package/dist/Shared/Components/ToggleResolveScopedVariables/ToggleResolveScopedVariables.component.d.ts +1 -1
- package/dist/Shared/Components/ToggleResolveScopedVariables/types.d.ts +1 -1
- package/dist/Shared/Components/index.d.ts +0 -1
- package/dist/Shared/Helpers.d.ts +2 -1
- package/dist/Shared/Providers/types.d.ts +10 -28
- package/dist/Shared/types.d.ts +2 -1
- package/dist/assets/@code-editor.css +1 -1
- package/dist/assets/ic-add.18a93616.svg +19 -0
- package/dist/assets/ic-container.92a4c33a.svg +3 -0
- package/dist/assets/ic-gavel.a3b064b5.svg +3 -0
- package/dist/assets/ic-minus.aac464f7.svg +3 -0
- package/dist/assets/ic-speedometer.3ecaae3b.svg +3 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +781 -773
- package/package.json +3 -3
- package/dist/Shared/Components/SwitchThemeDialog/SwitchThemeDialog.component.d.ts +0 -3
- package/dist/Shared/Components/SwitchThemeDialog/index.d.ts +0 -2
- package/dist/Shared/Components/SwitchThemeDialog/types.d.ts +0 -35
- package/dist/assets/ic-add.31531526.svg +0 -3
- package/dist/assets/ic-asterisk.ab224e72.svg +0 -3
- package/dist/assets/ic-folder-color.7cf84356.svg +0 -6
- package/dist/assets/ic-minus.27e3c9bc.svg +0 -5
- package/dist/assets/ic-world-globe.877fa6a0.svg +0 -3
- /package/dist/assets/{ic-container.4e1e6455.svg → ic-container-registry.4e1e6455.svg} +0 -0
@@ -1,14 +1,14 @@
|
|
1
|
-
import { j as n, as as
|
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,
|
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-C_u3nWGd.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
|
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
|
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:
|
22
|
+
hasToolbar: s,
|
23
23
|
hasRemove: r,
|
24
|
-
index:
|
25
|
-
onDropIndexClick:
|
26
|
-
readonly:
|
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:
|
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 ||
|
37
|
-
onClick:
|
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:
|
46
|
+
required: s,
|
47
47
|
children: r,
|
48
|
-
id:
|
49
|
-
rawDescription:
|
50
|
-
shouldAlignCenter:
|
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 ${
|
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:
|
57
|
-
/* @__PURE__ */ n.jsx(F, { alwaysShowTippyOnHover: !!
|
58
|
-
|
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
|
-
),
|
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
|
-
} =
|
66
|
+
} = l.templates;
|
67
67
|
return t && /* @__PURE__ */ n.jsx(
|
68
68
|
o,
|
69
69
|
{
|
70
70
|
label: e,
|
71
|
-
onClick:
|
72
|
-
disabled: r ||
|
73
|
-
uiSchema:
|
74
|
-
registry:
|
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:
|
80
|
+
disabled: s,
|
81
81
|
idSchema: r,
|
82
|
-
uiSchema:
|
83
|
-
items:
|
84
|
-
onAddClick:
|
82
|
+
uiSchema: a,
|
83
|
+
items: i,
|
84
|
+
onAddClick: l,
|
85
85
|
readonly: o,
|
86
86
|
registry: c,
|
87
87
|
required: d,
|
88
|
-
title:
|
88
|
+
title: x
|
89
89
|
}) => {
|
90
|
-
const
|
91
|
-
return /* @__PURE__ */ n.jsx("fieldset", { className: t, id: r.$id, children:
|
92
|
-
|
93
|
-
const
|
94
|
-
...
|
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
|
-
...
|
96
|
+
..._.children.props
|
97
97
|
}
|
98
98
|
};
|
99
|
-
return /* @__PURE__ */ n.jsx(
|
99
|
+
return /* @__PURE__ */ n.jsx(f, { ..._, children: m }, j);
|
100
100
|
}),
|
101
101
|
/* @__PURE__ */ n.jsx(
|
102
|
-
|
102
|
+
A,
|
103
103
|
{
|
104
|
-
label:
|
104
|
+
label: p,
|
105
105
|
canAdd: e,
|
106
|
-
onAddClick:
|
107
|
-
disabled:
|
106
|
+
onAddClick: l,
|
107
|
+
disabled: s,
|
108
108
|
readonly: o,
|
109
|
-
uiSchema:
|
109
|
+
uiSchema: a,
|
110
110
|
registry: c
|
111
111
|
}
|
112
112
|
)
|
113
|
-
] }) : /* @__PURE__ */ n.jsx(T, { label:
|
114
|
-
|
113
|
+
] }) : /* @__PURE__ */ n.jsx(T, { label: p, required: d, showLabel: !0, id: r.$id, children: /* @__PURE__ */ n.jsx(
|
114
|
+
A,
|
115
115
|
{
|
116
|
-
label:
|
116
|
+
label: p,
|
117
117
|
canAdd: e,
|
118
|
-
onAddClick:
|
119
|
-
disabled:
|
118
|
+
onAddClick: l,
|
119
|
+
disabled: s,
|
120
120
|
readonly: o,
|
121
|
-
uiSchema:
|
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 ||
|
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:
|
137
|
+
iconType: s,
|
138
138
|
registry: r,
|
139
|
-
uiSchema:
|
140
|
-
...
|
139
|
+
uiSchema: a,
|
140
|
+
...i
|
141
141
|
}) => {
|
142
|
-
const
|
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
|
-
...
|
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:
|
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:
|
157
|
-
const { submitText: t, norender:
|
158
|
-
return
|
159
|
-
},
|
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:
|
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
|
-
|
166
|
+
s && /* @__PURE__ */ n.jsx("span", { className: "cr-5", children: " *" })
|
167
167
|
] }), xe = (e) => {
|
168
168
|
const {
|
169
169
|
id: t,
|
170
|
-
label:
|
170
|
+
label: s,
|
171
171
|
children: r,
|
172
|
-
errors:
|
173
|
-
hidden:
|
174
|
-
required:
|
172
|
+
errors: a,
|
173
|
+
hidden: i,
|
174
|
+
required: l,
|
175
175
|
displayLabel: o,
|
176
176
|
registry: c,
|
177
177
|
uiSchema: d,
|
178
|
-
classNames:
|
179
|
-
schema:
|
180
|
-
rawDescription:
|
181
|
-
} = e,
|
178
|
+
classNames: x,
|
179
|
+
schema: u,
|
180
|
+
rawDescription: f
|
181
|
+
} = e, p = B(d), j = $(
|
182
182
|
"WrapIfAdditionalTemplate",
|
183
183
|
c,
|
184
|
-
|
185
|
-
),
|
186
|
-
return
|
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: `${
|
189
|
-
|
190
|
-
|
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:
|
194
|
-
required:
|
193
|
+
title: s,
|
194
|
+
required: l,
|
195
195
|
registry: c,
|
196
196
|
uiSchema: d,
|
197
|
-
schema:
|
198
|
-
description:
|
197
|
+
schema: u,
|
198
|
+
description: f
|
199
199
|
}
|
200
200
|
),
|
201
201
|
/* @__PURE__ */ n.jsx(
|
202
202
|
T,
|
203
203
|
{
|
204
|
-
label:
|
205
|
-
showLabel:
|
204
|
+
label: s,
|
205
|
+
showLabel: h,
|
206
206
|
id: t,
|
207
|
-
required:
|
208
|
-
rawDescription:
|
209
|
-
children: /* @__PURE__ */ n.jsx(
|
207
|
+
required: l,
|
208
|
+
rawDescription: f,
|
209
|
+
children: /* @__PURE__ */ n.jsx(j, { ...e, children: r })
|
210
210
|
}
|
211
211
|
),
|
212
|
-
|
212
|
+
a
|
213
213
|
] })
|
214
214
|
);
|
215
215
|
}, je = ({ errors: e = [], idSchema: t }) => {
|
216
|
-
const
|
217
|
-
return e.length > 0 && /* @__PURE__ */ n.jsx("span", { className: "display-grid rjsf-form-template__field--error dc__gap-12", id:
|
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
|
-
] },
|
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
|
-
},
|
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:
|
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:
|
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:
|
279
|
+
path: b(t.path)
|
280
280
|
} : structuredClone(R);
|
281
|
-
}, H = (e, t,
|
282
|
-
e && (e.type === "object" && e.properties && typeof e.properties == "object" && Object.entries(e.properties).forEach(([r,
|
283
|
-
H(
|
284
|
-
}), (e.type === "boolean" || e.type === "string" || e.type === "number" || e.type === "integer") && (
|
285
|
-
},
|
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,
|
289
|
-
if (t >=
|
288
|
+
}, M = (e, t, s) => {
|
289
|
+
if (t >= s.length)
|
290
290
|
return e;
|
291
|
-
const r =
|
292
|
-
if (t ===
|
293
|
-
const
|
294
|
-
return delete
|
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,
|
297
|
-
const
|
298
|
-
return delete
|
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
|
-
},
|
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
|
307
|
-
return M(e, 0,
|
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:
|
311
|
+
schemaPathToUpdatePathMap: s
|
312
312
|
}) => {
|
313
313
|
let r = structuredClone(e);
|
314
|
-
return r && (Object.entries(
|
315
|
-
if (
|
314
|
+
return r && (Object.entries(s).forEach(([a, i]) => {
|
315
|
+
if (a === i || !i)
|
316
316
|
return;
|
317
|
-
const
|
317
|
+
const l = y({
|
318
318
|
json: t,
|
319
|
-
path: v(
|
319
|
+
path: v(a),
|
320
320
|
resultType: "value",
|
321
321
|
wrap: !1
|
322
322
|
});
|
323
|
-
|
324
|
-
const o =
|
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(
|
326
|
+
path: v(a),
|
327
327
|
resultType: "value",
|
328
328
|
wrap: !1
|
329
329
|
});
|
330
|
-
o !== void 0 && (r = N([S(
|
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(([
|
334
|
-
if (
|
333
|
+
...Object.entries(t).map(([s, r]) => {
|
334
|
+
if (s === r || !r)
|
335
335
|
return {};
|
336
|
-
const
|
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
|
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:
|
348
|
+
idSchema: s,
|
349
349
|
onAddClick: r,
|
350
|
-
properties:
|
351
|
-
readonly:
|
352
|
-
registry:
|
350
|
+
properties: a,
|
351
|
+
readonly: i,
|
352
|
+
registry: l,
|
353
353
|
required: o,
|
354
354
|
schema: c,
|
355
355
|
title: d,
|
356
|
-
uiSchema:
|
357
|
-
formContext:
|
356
|
+
uiSchema: x,
|
357
|
+
formContext: u
|
358
358
|
}) => {
|
359
|
-
const
|
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 ||
|
366
|
-
uiSchema:
|
367
|
-
registry:
|
365
|
+
disabled: e || i,
|
366
|
+
uiSchema: x,
|
367
|
+
registry: l
|
368
368
|
}
|
369
|
-
),
|
370
|
-
const
|
371
|
-
if (!
|
369
|
+
), j = a.filter((_) => {
|
370
|
+
const h = c.properties?.[_.name]?.hidden;
|
371
|
+
if (!h)
|
372
372
|
return !0;
|
373
373
|
try {
|
374
|
-
const
|
375
|
-
if (!
|
374
|
+
const m = ge(h);
|
375
|
+
if (!m.path)
|
376
376
|
throw new Error("Empty path property of hidden descriptor field");
|
377
|
-
const g =
|
378
|
-
path: v(
|
379
|
-
json:
|
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 ||
|
383
|
+
return !(g === void 0 || ae(m.value, g));
|
384
384
|
} catch {
|
385
385
|
return !0;
|
386
386
|
}
|
387
|
-
}).map((
|
388
|
-
return
|
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:
|
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
|
-
|
401
|
-
] }) : /* @__PURE__ */ n.jsx(T, { label: d, required: o, showLabel: !0, id:
|
402
|
-
|
403
|
-
|
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:
|
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
|
-
|
409
|
+
C,
|
410
410
|
{
|
411
411
|
id: re(t),
|
412
|
-
title:
|
412
|
+
title: i,
|
413
413
|
required: r,
|
414
|
-
schema:
|
415
|
-
uiSchema:
|
416
|
-
registry:
|
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: `${
|
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:
|
431
|
+
label: s,
|
432
432
|
onKeyChange: r,
|
433
|
-
onDropPropertyClick:
|
434
|
-
readonly:
|
435
|
-
schema:
|
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:
|
441
|
-
return /* @__PURE__ */ n.jsx(n.Fragment, { 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: (
|
449
|
-
placeholder:
|
450
|
-
defaultValue:
|
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
|
-
|
455
|
+
u,
|
456
456
|
{
|
457
|
-
disabled: t ||
|
458
|
-
onClick: s
|
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:
|
468
|
-
|
469
|
-
|
470
|
-
|
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
|
473
|
-
|
474
|
-
|
475
|
-
|
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
|
-
|
481
|
-
|
482
|
-
isChecked: i,
|
487
|
+
required: r,
|
488
|
+
disabled: a || i,
|
483
489
|
autoFocus: l,
|
484
|
-
|
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:
|
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 }),
|
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:
|
500
|
+
multiple: s = !1,
|
493
501
|
options: r,
|
494
|
-
value:
|
495
|
-
disabled:
|
496
|
-
readonly:
|
502
|
+
value: a,
|
503
|
+
disabled: i,
|
504
|
+
readonly: l,
|
497
505
|
autofocus: o = !1,
|
498
506
|
onChange: c,
|
499
507
|
onBlur: d,
|
500
|
-
onFocus:
|
501
|
-
placeholder:
|
502
|
-
} = e, { enumOptions:
|
503
|
-
c(
|
504
|
-
},
|
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:
|
511
|
-
value: typeof
|
518
|
+
isMulti: s,
|
519
|
+
value: typeof a > "u" ? p : _(a),
|
512
520
|
autoFocus: o,
|
513
|
-
onChange:
|
514
|
-
options:
|
515
|
-
onBlur: () => d(t,
|
516
|
-
onFocus: () =>
|
517
|
-
placeholder:
|
518
|
-
isDisabled:
|
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: (
|
522
|
-
...w.control(
|
529
|
+
control: (h, m) => ({
|
530
|
+
...w.control(h, m),
|
523
531
|
minHeight: "36px"
|
524
532
|
}),
|
525
|
-
multiValue: (
|
526
|
-
...w.multiValue(
|
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:
|
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:
|
541
|
-
},
|
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:
|
557
|
+
TitleFieldTemplate: C,
|
550
558
|
WrapIfAdditionalTemplate: Ne
|
551
|
-
},
|
552
|
-
const { schemaPathToUpdatePathMap:
|
553
|
-
const o =
|
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]),
|
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:
|
572
|
+
schemaPathToUpdatePathMap: s
|
565
573
|
});
|
566
574
|
e.onChange({ ...o, formData: c });
|
567
|
-
},
|
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:
|
581
|
+
schemaPathToUpdatePathMap: s
|
574
582
|
});
|
575
583
|
e.onSubmit?.({ ...o, formData: d }, c);
|
576
584
|
};
|
577
585
|
return /* @__PURE__ */ n.jsx(
|
578
|
-
|
586
|
+
Ae,
|
579
587
|
{
|
580
588
|
noHtml5Validate: !0,
|
581
589
|
showErrorList: !1,
|
582
590
|
autoComplete: "off",
|
583
591
|
...e,
|
584
|
-
formData:
|
592
|
+
formData: a,
|
585
593
|
...r ? {
|
586
|
-
onChange:
|
587
|
-
onSubmit:
|
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
|
-
...
|
600
|
+
...Ee,
|
593
601
|
...e.templates
|
594
602
|
},
|
595
|
-
formContext:
|
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
|
-
|
607
|
-
|
614
|
+
be as b,
|
615
|
+
b as c,
|
608
616
|
qe as g
|
609
617
|
};
|