@devtron-labs/devtron-fe-common-lib 1.13.0-pre-3 → 1.13.0-pre-5
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/{@common-rjsf-D8Qtr4tq.js → @code-editor-Cnnz8WKW.js} +10033 -10219
- package/dist/@common-rjsf-BGYrN0PH.js +617 -0
- package/dist/{@framer-motion-vKlTvuNq.js → @framer-motion-DyOLEeMN.js} +1 -1
- package/dist/{@react-dates-DsYJWeMo.js → @react-dates-B7d8RWU9.js} +1 -1
- package/dist/{@react-select-D3FsD2uq.js → @react-select-Coo19Q6a.js} +1 -1
- package/dist/{@react-virtualized-sticky-tree-DWN3dQyp.js → @react-virtualized-sticky-tree-BPjPJDIR.js} +1 -1
- package/dist/{@vendor-BZ1WgRCl.js → @vendor-D9q4wrnL.js} +1143 -1143
- package/dist/Common/Common.service.d.ts +2 -2
- package/dist/Common/RJSF/Form.d.ts +1 -1
- package/dist/Pages/GlobalConfigurations/ClustersAndEnvironments/index.d.ts +1 -0
- package/dist/Pages/GlobalConfigurations/ClustersAndEnvironments/types.d.ts +8 -0
- package/dist/Pages/GlobalConfigurations/index.d.ts +1 -0
- package/dist/Pages/ResourceBrowser/service.d.ts +1 -1
- package/dist/Pages/ResourceBrowser/types.d.ts +38 -0
- package/dist/Shared/Components/ActionMenu/ActionMenu.component.d.ts +1 -2
- package/dist/Shared/Components/ActionMenu/ActionMenuItem.d.ts +2 -0
- package/dist/Shared/Components/ActionMenu/index.d.ts +2 -2
- package/dist/Shared/Components/ActionMenu/types.d.ts +88 -11
- package/dist/Shared/Components/ActionMenu/useActionMenu.hook.d.ts +275 -0
- package/dist/Shared/Components/ActionMenu/utils.d.ts +7 -0
- package/dist/Shared/Components/Header/HeaderWithCreateButton/HeaderWithCreateButon.d.ts +1 -3
- package/dist/Shared/Components/Header/HeaderWithCreateButton/types.d.ts +10 -0
- package/dist/Shared/Components/Header/HeaderWithCreateButton/utils.d.ts +2 -0
- package/dist/Shared/Components/Header/HelpButton.d.ts +2 -0
- package/dist/Shared/Components/Header/constants.d.ts +5 -4
- package/dist/Shared/Components/Header/types.d.ts +15 -9
- package/dist/Shared/Components/Header/utils.d.ts +5 -1
- package/dist/Shared/Components/Icon/Icon.d.ts +12 -1
- package/dist/Shared/Components/Icon/IconBase.d.ts +1 -1
- package/dist/Shared/Components/Icon/types.d.ts +29 -7
- package/dist/Shared/Components/LoginBanner/Testimonials.components.d.ts +3 -0
- package/dist/Shared/Components/LoginBanner/index.d.ts +2 -0
- package/dist/Shared/Components/Popover/Popover.component.d.ts +8 -0
- package/dist/Shared/Components/Popover/index.d.ts +3 -0
- package/dist/Shared/Components/Popover/types.d.ts +105 -0
- package/dist/Shared/Components/Popover/usePopover.hook.d.ts +2 -0
- package/dist/Shared/Components/Popover/utils.d.ts +92 -0
- package/dist/Shared/Components/SelectPicker/common.d.ts +2 -0
- package/dist/Shared/Components/SelectPicker/index.d.ts +1 -0
- package/dist/Shared/Components/SelectPicker/type.d.ts +4 -0
- package/dist/Shared/Components/StatusComponent/types.d.ts +2 -1
- package/dist/Shared/Components/index.d.ts +0 -1
- package/dist/Shared/types.d.ts +5 -0
- package/dist/assets/@code-editor.css +1 -0
- package/dist/assets/@common-rjsf.css +1 -1
- package/dist/assets/ic-chat-circle-online.51348da5.svg +4 -0
- package/dist/assets/ic-cluster.71ba9e26.svg +3 -0
- package/dist/assets/ic-delete-dots.5380e0d0.svg +62 -0
- package/dist/assets/ic-discord-fill.103b579a.svg +3 -0
- package/dist/assets/ic-edit.3249ed32.svg +3 -0
- package/dist/assets/ic-enterprise-feat.5ee25d5b.svg +3 -0
- package/dist/assets/ic-enterprise-tag.209dd129.svg +43 -0
- package/dist/assets/ic-file-edit.96a172c7.svg +3 -0
- package/dist/assets/ic-file.c3c45e13.svg +3 -0
- package/dist/assets/ic-files.b0ebea46.svg +3 -0
- package/dist/assets/ic-megaphone-right.9d6bcd36.svg +3 -0
- package/dist/assets/ic-path.d4fef3b0.svg +3 -0
- package/dist/index.js +517 -512
- package/package.json +1 -1
- package/dist/Shared/Components/ActionMenu/ActionMenuOption.d.ts +0 -3
- package/dist/Shared/Components/EnterpriseTag/EnterpriseTag.component.d.ts +0 -2
- package/dist/Shared/Components/EnterpriseTag/index.d.ts +0 -1
- package/dist/Shared/Components/Header/HelpNav.d.ts +0 -3
- package/dist/assets/ic-charts.f41e185f.svg +0 -19
- package/dist/assets/ic-chat-circle-dots.e15514f8.svg +0 -23
- package/dist/assets/ic-discord-fill.1a1b291d.svg +0 -19
- package/dist/assets/ic-feedback.d32fa6b0.svg +0 -19
- package/dist/assets/ic-files.fc290dee.svg +0 -19
- package/dist/assets/ic-k8s-job.f4414c10.svg +0 -19
- package/dist/assets/ic-login-devtron-logo.702a1d04.svg +0 -22
- package/dist/assets/ic-medal.a2e911f5.svg +0 -19
- package/dist/assets/ic-onboarding.c98f9ef9.svg +0 -19
@@ -0,0 +1,617 @@
|
|
1
|
+
import { j as n, au as y, aw as k, av as W } from "./@vendor-D9q4wrnL.js";
|
2
|
+
import V, { forwardRef as J, useMemo as P } from "react";
|
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-Cnnz8WKW.js";
|
5
|
+
import Q, { components as D } from "react-select";
|
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";
|
8
|
+
import { ReactComponent as oe } from "./assets/ic-add.cfaa779b.svg";
|
9
|
+
import { ReactComponent as ie } from "./assets/ic-cross.01e03666.svg";
|
10
|
+
import { ReactComponent as le } from "./assets/ic-warning.ecf7ff97.svg";
|
11
|
+
import './assets/@common-rjsf.css';const O = {
|
12
|
+
SELECT: "Please select an option",
|
13
|
+
INPUT: "Please enter an input",
|
14
|
+
OBJECT_KEY: "Please enter a value for the key"
|
15
|
+
}, ce = "Key not available", Je = {
|
16
|
+
"ui:submitButtonOptions": {
|
17
|
+
norender: !0
|
18
|
+
}
|
19
|
+
}, de = ({
|
20
|
+
children: e,
|
21
|
+
disabled: t,
|
22
|
+
hasToolbar: s,
|
23
|
+
hasRemove: r,
|
24
|
+
index: a,
|
25
|
+
onDropIndexClick: i,
|
26
|
+
readonly: l,
|
27
|
+
registry: o,
|
28
|
+
uiSchema: c
|
29
|
+
}) => {
|
30
|
+
const { RemoveButton: d } = o.templates.ButtonTemplates;
|
31
|
+
return /* @__PURE__ */ n.jsxs("div", { className: "dc__position-rel display-grid rjsf-form-template__array-field-item flex-align-center", children: [
|
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(
|
34
|
+
d,
|
35
|
+
{
|
36
|
+
disabled: t || l,
|
37
|
+
onClick: i(a),
|
38
|
+
uiSchema: c,
|
39
|
+
registry: o
|
40
|
+
}
|
41
|
+
) })
|
42
|
+
] });
|
43
|
+
}, T = ({
|
44
|
+
showLabel: e,
|
45
|
+
label: t,
|
46
|
+
required: s,
|
47
|
+
children: r,
|
48
|
+
id: a,
|
49
|
+
rawDescription: i,
|
50
|
+
shouldAlignCenter: l = !0
|
51
|
+
}) => /* @__PURE__ */ n.jsxs(
|
52
|
+
"div",
|
53
|
+
{
|
54
|
+
className: e ? `display-grid dc__gap-12 rjsf-form-template__field ${l ? "flex-align-center" : ""}` : "",
|
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: " *" })
|
59
|
+
] }),
|
60
|
+
r
|
61
|
+
]
|
62
|
+
}
|
63
|
+
), A = ({ label: e, canAdd: t, onAddClick: s, disabled: r, readonly: a, uiSchema: i, registry: l }) => {
|
64
|
+
const {
|
65
|
+
ButtonTemplates: { AddButton: o }
|
66
|
+
} = l.templates;
|
67
|
+
return t && /* @__PURE__ */ n.jsx(
|
68
|
+
o,
|
69
|
+
{
|
70
|
+
label: e,
|
71
|
+
onClick: s,
|
72
|
+
disabled: r || a,
|
73
|
+
uiSchema: i,
|
74
|
+
registry: l
|
75
|
+
}
|
76
|
+
);
|
77
|
+
}, ue = ({
|
78
|
+
canAdd: e,
|
79
|
+
className: t,
|
80
|
+
disabled: s,
|
81
|
+
idSchema: r,
|
82
|
+
uiSchema: a,
|
83
|
+
items: i,
|
84
|
+
onAddClick: l,
|
85
|
+
readonly: o,
|
86
|
+
registry: c,
|
87
|
+
required: d,
|
88
|
+
title: x
|
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,
|
95
|
+
props: {
|
96
|
+
..._.children.props
|
97
|
+
}
|
98
|
+
};
|
99
|
+
return /* @__PURE__ */ n.jsx(f, { ..._, children: m }, j);
|
100
|
+
}),
|
101
|
+
/* @__PURE__ */ n.jsx(
|
102
|
+
A,
|
103
|
+
{
|
104
|
+
label: p,
|
105
|
+
canAdd: e,
|
106
|
+
onAddClick: l,
|
107
|
+
disabled: s,
|
108
|
+
readonly: o,
|
109
|
+
uiSchema: a,
|
110
|
+
registry: c
|
111
|
+
}
|
112
|
+
)
|
113
|
+
] }) : /* @__PURE__ */ n.jsx(T, { label: p, required: d, showLabel: !0, id: r.$id, children: /* @__PURE__ */ n.jsx(
|
114
|
+
A,
|
115
|
+
{
|
116
|
+
label: p,
|
117
|
+
canAdd: e,
|
118
|
+
onAddClick: l,
|
119
|
+
disabled: s,
|
120
|
+
readonly: o,
|
121
|
+
uiSchema: a,
|
122
|
+
registry: c
|
123
|
+
}
|
124
|
+
) }) });
|
125
|
+
}, {
|
126
|
+
templates: { BaseInputTemplate: me }
|
127
|
+
} = q(), pe = ({ placeholder: e, ...t }) => /* @__PURE__ */ n.jsx(
|
128
|
+
me,
|
129
|
+
{
|
130
|
+
placeholder: e || O.INPUT,
|
131
|
+
...t,
|
132
|
+
className: "form__input cn-9 fs-13 lh-20 fw-4"
|
133
|
+
}
|
134
|
+
), U = ({
|
135
|
+
label: e,
|
136
|
+
icon: t,
|
137
|
+
iconType: s,
|
138
|
+
registry: r,
|
139
|
+
uiSchema: a,
|
140
|
+
...i
|
141
|
+
}) => {
|
142
|
+
const l = `Add ${e}`;
|
143
|
+
return /* @__PURE__ */ n.jsx("div", { className: "flexbox flex-justify-start", children: /* @__PURE__ */ n.jsxs(
|
144
|
+
"button",
|
145
|
+
{
|
146
|
+
...i,
|
147
|
+
type: "button",
|
148
|
+
className: "dc__outline-none-imp p-0 dc__transparent flex dc__gap-4 cursor dc__mxw-250",
|
149
|
+
title: "Add",
|
150
|
+
children: [
|
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 }) })
|
153
|
+
]
|
154
|
+
}
|
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 = ({
|
160
|
+
id: e,
|
161
|
+
title: t,
|
162
|
+
required: s,
|
163
|
+
description: r
|
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
|
+
/* @__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: " *" })
|
167
|
+
] }), xe = (e) => {
|
168
|
+
const {
|
169
|
+
id: t,
|
170
|
+
label: s,
|
171
|
+
children: r,
|
172
|
+
errors: a,
|
173
|
+
hidden: i,
|
174
|
+
required: l,
|
175
|
+
displayLabel: o,
|
176
|
+
registry: c,
|
177
|
+
uiSchema: d,
|
178
|
+
classNames: x,
|
179
|
+
schema: u,
|
180
|
+
rawDescription: f
|
181
|
+
} = e, p = B(d), j = $(
|
182
|
+
"WrapIfAdditionalTemplate",
|
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 }) : (
|
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,
|
191
|
+
{
|
192
|
+
id: t,
|
193
|
+
title: s,
|
194
|
+
required: l,
|
195
|
+
registry: c,
|
196
|
+
uiSchema: d,
|
197
|
+
schema: u,
|
198
|
+
description: f
|
199
|
+
}
|
200
|
+
),
|
201
|
+
/* @__PURE__ */ n.jsx(
|
202
|
+
T,
|
203
|
+
{
|
204
|
+
label: s,
|
205
|
+
showLabel: h,
|
206
|
+
id: t,
|
207
|
+
required: l,
|
208
|
+
rawDescription: f,
|
209
|
+
children: /* @__PURE__ */ n.jsx(j, { ...e, children: r })
|
210
|
+
}
|
211
|
+
),
|
212
|
+
a
|
213
|
+
] })
|
214
|
+
);
|
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: [
|
218
|
+
/* @__PURE__ */ n.jsx("span", {}),
|
219
|
+
/* @__PURE__ */ n.jsxs("span", { className: "form__error", children: [
|
220
|
+
/* @__PURE__ */ n.jsx(le, { className: "form__icon form__icon--error" }),
|
221
|
+
r
|
222
|
+
] })
|
223
|
+
] }, a)) });
|
224
|
+
}, _e = (e, t) => {
|
225
|
+
switch (e) {
|
226
|
+
case ne.NewStringDefault:
|
227
|
+
return "";
|
228
|
+
default:
|
229
|
+
return te(e, t);
|
230
|
+
}
|
231
|
+
}, Ke = (e) => {
|
232
|
+
try {
|
233
|
+
const t = new URL(e).origin === window.location.origin;
|
234
|
+
return {
|
235
|
+
href: e,
|
236
|
+
target: t ? "_self" : "_blank",
|
237
|
+
rel: t ? void 0 : "external noreferrer",
|
238
|
+
url: e
|
239
|
+
};
|
240
|
+
} catch {
|
241
|
+
return {
|
242
|
+
href: e,
|
243
|
+
target: "_blank",
|
244
|
+
url: `${e} (Invalid URL)`
|
245
|
+
};
|
246
|
+
}
|
247
|
+
}, qe = (e) => {
|
248
|
+
const t = typeof e;
|
249
|
+
switch (t) {
|
250
|
+
case "boolean":
|
251
|
+
case "string":
|
252
|
+
case "number":
|
253
|
+
return t;
|
254
|
+
case "object":
|
255
|
+
return Array.isArray(e) ? "array" : e === null ? "null" : t;
|
256
|
+
default:
|
257
|
+
return "null";
|
258
|
+
}
|
259
|
+
}, b = (e) => {
|
260
|
+
if (!e)
|
261
|
+
return "";
|
262
|
+
const t = e.trim(), r = (/^\/.+$/g.test(t) ? t : `/${t}`).replaceAll(/\./g, "/");
|
263
|
+
return /(\/(([^/~])|(~[01]))*)/g.test(r) ? r : "";
|
264
|
+
}, R = {
|
265
|
+
value: !1,
|
266
|
+
path: ""
|
267
|
+
}, ge = (e) => {
|
268
|
+
if (!e)
|
269
|
+
return null;
|
270
|
+
const t = structuredClone(e);
|
271
|
+
return typeof t == "string" ? {
|
272
|
+
value: !0,
|
273
|
+
path: b(t)
|
274
|
+
} : typeof t != "object" ? structuredClone(R) : Object.hasOwn(t, "condition") && "condition" in t && Object.hasOwn(t, "value") && "value" in t ? {
|
275
|
+
value: t.condition,
|
276
|
+
path: b(t.value)
|
277
|
+
} : Object.hasOwn(t, "value") && "value" in t && Object.hasOwn(t, "path") && "path" in t ? {
|
278
|
+
value: t.value,
|
279
|
+
path: b(t.path)
|
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) => {
|
286
|
+
const t = {};
|
287
|
+
return H(e, "", t), t;
|
288
|
+
}, M = (e, t, s) => {
|
289
|
+
if (t >= s.length)
|
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;
|
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;
|
299
|
+
}
|
300
|
+
return e;
|
301
|
+
}, ye = (e, t) => {
|
302
|
+
if (!e || typeof e != "object" || Array.isArray(e))
|
303
|
+
throw new Error("Invalid object");
|
304
|
+
if (!t || !t.startsWith("/"))
|
305
|
+
throw new Error("Invalid path");
|
306
|
+
const s = t.split("/").slice(1);
|
307
|
+
return M(e, 0, s);
|
308
|
+
}, I = ({
|
309
|
+
formState: e,
|
310
|
+
formData: t,
|
311
|
+
schemaPathToUpdatePathMap: s
|
312
|
+
}) => {
|
313
|
+
let r = structuredClone(e);
|
314
|
+
return r && (Object.entries(s).forEach(([a, i]) => {
|
315
|
+
if (a === i || !i)
|
316
|
+
return;
|
317
|
+
const l = y({
|
318
|
+
json: t,
|
319
|
+
path: v(a),
|
320
|
+
resultType: "value",
|
321
|
+
wrap: !1
|
322
|
+
});
|
323
|
+
l === void 0 ? r = ye(r, a) : r = N([S(a, l), r]);
|
324
|
+
const o = y({
|
325
|
+
json: e,
|
326
|
+
path: v(a),
|
327
|
+
resultType: "value",
|
328
|
+
wrap: !1
|
329
|
+
});
|
330
|
+
o !== void 0 && (r = N([S(i, o), r]));
|
331
|
+
}), t && r ? k(t, W(t, r), !1, !1).newDocument : r);
|
332
|
+
}, ve = ({ formData: e, schemaPathToUpdatePathMap: t }) => N([
|
333
|
+
...Object.entries(t).map(([s, r]) => {
|
334
|
+
if (s === r || !r)
|
335
|
+
return {};
|
336
|
+
const a = y({
|
337
|
+
json: e,
|
338
|
+
path: v(r),
|
339
|
+
resultType: "value",
|
340
|
+
wrap: !1
|
341
|
+
});
|
342
|
+
return a === void 0 ? {} : S(s, a);
|
343
|
+
}),
|
344
|
+
structuredClone(e)
|
345
|
+
]), Te = ({
|
346
|
+
disabled: e,
|
347
|
+
formData: t,
|
348
|
+
idSchema: s,
|
349
|
+
onAddClick: r,
|
350
|
+
properties: a,
|
351
|
+
readonly: i,
|
352
|
+
registry: l,
|
353
|
+
required: o,
|
354
|
+
schema: c,
|
355
|
+
title: d,
|
356
|
+
uiSchema: x,
|
357
|
+
formContext: u
|
358
|
+
}) => {
|
359
|
+
const f = !!c.additionalProperties, p = se(c, x, t) && /* @__PURE__ */ n.jsx(
|
360
|
+
U,
|
361
|
+
{
|
362
|
+
label: d,
|
363
|
+
className: "object-property-expand",
|
364
|
+
onClick: r(c),
|
365
|
+
disabled: e || i,
|
366
|
+
uiSchema: x,
|
367
|
+
registry: l
|
368
|
+
}
|
369
|
+
), j = a.filter((_) => {
|
370
|
+
const h = c.properties?.[_.name]?.hidden;
|
371
|
+
if (!h)
|
372
|
+
return !0;
|
373
|
+
try {
|
374
|
+
const m = ge(h);
|
375
|
+
if (!m.path)
|
376
|
+
throw new Error("Empty path property of hidden descriptor field");
|
377
|
+
const g = y({
|
378
|
+
path: v(m.path),
|
379
|
+
json: u,
|
380
|
+
resultType: "value",
|
381
|
+
wrap: !1
|
382
|
+
});
|
383
|
+
return !(g === void 0 || ae(m.value, g));
|
384
|
+
} catch {
|
385
|
+
return !0;
|
386
|
+
}
|
387
|
+
}).map((_) => _.content);
|
388
|
+
return f ? a.length ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
389
|
+
/* @__PURE__ */ n.jsx(
|
390
|
+
T,
|
391
|
+
{
|
392
|
+
label: d,
|
393
|
+
required: o,
|
394
|
+
showLabel: !0,
|
395
|
+
id: s.$id,
|
396
|
+
shouldAlignCenter: !1,
|
397
|
+
children: /* @__PURE__ */ n.jsx("div", { children: j })
|
398
|
+
}
|
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
|
404
|
+
] });
|
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;
|
407
|
+
return /* @__PURE__ */ n.jsxs("fieldset", { id: t.$id, children: [
|
408
|
+
d && /* @__PURE__ */ n.jsx(
|
409
|
+
C,
|
410
|
+
{
|
411
|
+
id: re(t),
|
412
|
+
title: i,
|
413
|
+
required: r,
|
414
|
+
schema: a,
|
415
|
+
uiSchema: l,
|
416
|
+
registry: s,
|
417
|
+
description: o
|
418
|
+
}
|
419
|
+
),
|
420
|
+
/* @__PURE__ */ n.jsx(
|
421
|
+
"div",
|
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"}`,
|
424
|
+
children: /* @__PURE__ */ n.jsx(Te, { ...e })
|
425
|
+
}
|
426
|
+
)
|
427
|
+
] });
|
428
|
+
}, Ne = ({
|
429
|
+
id: e,
|
430
|
+
disabled: t,
|
431
|
+
label: s,
|
432
|
+
onKeyChange: r,
|
433
|
+
onDropPropertyClick: a,
|
434
|
+
readonly: i,
|
435
|
+
schema: l,
|
436
|
+
children: o,
|
437
|
+
uiSchema: c,
|
438
|
+
registry: d
|
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: [
|
442
|
+
/* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx(
|
443
|
+
"input",
|
444
|
+
{
|
445
|
+
type: "text",
|
446
|
+
className: "form__input cn-9 fs-13 lh-20 fw-4",
|
447
|
+
id: `${e}-key`,
|
448
|
+
onBlur: (p) => r(p.target.value),
|
449
|
+
placeholder: O.OBJECT_KEY,
|
450
|
+
defaultValue: s
|
451
|
+
}
|
452
|
+
) }),
|
453
|
+
/* @__PURE__ */ n.jsx("div", { children: o }),
|
454
|
+
/* @__PURE__ */ n.jsx("div", { className: "dc__position-abs remove-btn__container", style: { right: "-28px", top: "9px" }, children: /* @__PURE__ */ n.jsx(
|
455
|
+
u,
|
456
|
+
{
|
457
|
+
disabled: t || i,
|
458
|
+
onClick: a(s),
|
459
|
+
uiSchema: c,
|
460
|
+
registry: d
|
461
|
+
}
|
462
|
+
) })
|
463
|
+
] }) : o });
|
464
|
+
}, Se = ({
|
465
|
+
id: e,
|
466
|
+
onChange: t,
|
467
|
+
value: s,
|
468
|
+
required: r,
|
469
|
+
disabled: a,
|
470
|
+
readonly: i,
|
471
|
+
autofocus: l,
|
472
|
+
onBlur: o,
|
473
|
+
onFocus: c
|
474
|
+
}) => {
|
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: [
|
480
|
+
/* @__PURE__ */ n.jsx(
|
481
|
+
Y,
|
482
|
+
{
|
483
|
+
selected: x,
|
484
|
+
onSelect: t,
|
485
|
+
id: e,
|
486
|
+
name: e,
|
487
|
+
required: r,
|
488
|
+
disabled: a || i,
|
489
|
+
autoFocus: l,
|
490
|
+
rootClassName: "w-32 mb-0 dc__height-inherit",
|
491
|
+
onBlur: (u) => d(u, "blur"),
|
492
|
+
onFocus: (u) => d(u, "focus")
|
493
|
+
}
|
494
|
+
),
|
495
|
+
/* @__PURE__ */ n.jsx("span", { className: "dc__capitalize ml-8", children: x.toString() })
|
496
|
+
] });
|
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) => {
|
498
|
+
const {
|
499
|
+
id: t,
|
500
|
+
multiple: s = !1,
|
501
|
+
options: r,
|
502
|
+
value: a,
|
503
|
+
disabled: i,
|
504
|
+
readonly: l,
|
505
|
+
autofocus: o = !1,
|
506
|
+
onChange: c,
|
507
|
+
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));
|
513
|
+
return /* @__PURE__ */ n.jsx(
|
514
|
+
Q,
|
515
|
+
{
|
516
|
+
id: t,
|
517
|
+
name: t,
|
518
|
+
isMulti: s,
|
519
|
+
value: typeof a > "u" ? p : _(a),
|
520
|
+
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,
|
527
|
+
styles: {
|
528
|
+
...w,
|
529
|
+
control: (h, m) => ({
|
530
|
+
...w.control(h, m),
|
531
|
+
minHeight: "36px"
|
532
|
+
}),
|
533
|
+
multiValue: (h, m) => ({
|
534
|
+
...w.multiValue(h, m),
|
535
|
+
margin: "2px 8px 2px 2px"
|
536
|
+
})
|
537
|
+
},
|
538
|
+
components: {
|
539
|
+
IndicatorSeparator: null,
|
540
|
+
DropdownIndicator: Oe,
|
541
|
+
MenuList: Fe
|
542
|
+
},
|
543
|
+
menuPlacement: "auto"
|
544
|
+
}
|
545
|
+
);
|
546
|
+
}, Pe = {
|
547
|
+
CheckboxWidget: Se,
|
548
|
+
SelectWidget: Ce
|
549
|
+
}, Ee = {
|
550
|
+
ArrayFieldItemTemplate: de,
|
551
|
+
ArrayFieldTemplate: ue,
|
552
|
+
BaseInputTemplate: pe,
|
553
|
+
ButtonTemplates: { AddButton: U, RemoveButton: fe, SubmitButton: he },
|
554
|
+
FieldTemplate: xe,
|
555
|
+
FieldErrorTemplate: je,
|
556
|
+
ObjectFieldTemplate: we,
|
557
|
+
TitleFieldTemplate: C,
|
558
|
+
WrapIfAdditionalTemplate: Ne
|
559
|
+
}, Ae = K, Re = G, Ye = J((e, t) => {
|
560
|
+
const { schemaPathToUpdatePathMap: s, isUpdatePathKeywordPresent: r } = P(() => {
|
561
|
+
const o = be(e.schema);
|
562
|
+
return {
|
563
|
+
schemaPathToUpdatePathMap: o,
|
564
|
+
isUpdatePathKeywordPresent: Object.entries(o).some(([c, d]) => c !== d)
|
565
|
+
};
|
566
|
+
}, [e.schema]), a = P(() => r ? ve({ formData: e.formData ?? {}, schemaPathToUpdatePathMap: s }) : e.formData, [e.formData, s, r]), i = (o) => {
|
567
|
+
if (!e.onChange)
|
568
|
+
return;
|
569
|
+
const c = I({
|
570
|
+
formState: o.formData,
|
571
|
+
formData: e.formData,
|
572
|
+
schemaPathToUpdatePathMap: s
|
573
|
+
});
|
574
|
+
e.onChange({ ...o, formData: c });
|
575
|
+
}, l = (o, c) => {
|
576
|
+
if (!e.onSubmit)
|
577
|
+
return;
|
578
|
+
const d = I({
|
579
|
+
formState: o.formData,
|
580
|
+
formData: e.formData,
|
581
|
+
schemaPathToUpdatePathMap: s
|
582
|
+
});
|
583
|
+
e.onSubmit?.({ ...o, formData: d }, c);
|
584
|
+
};
|
585
|
+
return /* @__PURE__ */ n.jsx(
|
586
|
+
Ae,
|
587
|
+
{
|
588
|
+
noHtml5Validate: !0,
|
589
|
+
showErrorList: !1,
|
590
|
+
autoComplete: "off",
|
591
|
+
...e,
|
592
|
+
formData: a,
|
593
|
+
...r ? {
|
594
|
+
onChange: i,
|
595
|
+
onSubmit: l
|
596
|
+
} : {},
|
597
|
+
className: `rjsf-form-template__container ${e.className || ""}`,
|
598
|
+
validator: Re,
|
599
|
+
templates: {
|
600
|
+
...Ee,
|
601
|
+
...e.templates
|
602
|
+
},
|
603
|
+
formContext: a,
|
604
|
+
widgets: { ...Pe, ...e.widgets },
|
605
|
+
translateString: _e,
|
606
|
+
ref: t
|
607
|
+
}
|
608
|
+
);
|
609
|
+
});
|
610
|
+
export {
|
611
|
+
Je as H,
|
612
|
+
Ye as R,
|
613
|
+
Ke as a,
|
614
|
+
be as b,
|
615
|
+
b as c,
|
616
|
+
qe as g
|
617
|
+
};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { az as ct, aA as m, aB as M, aC as Xr, aD as Ee, aE as T, aF as at, aG as Kt, aH as oe, aI as We, aJ as J, aK as Wr, aL as ei, aM as Zr, aN as ri, aO as ni, aP as ii, aQ as ai, aR as oi, aS as $r, aT as si, aU as ui, aV as li, aW as fi, aX as ci, aY as vi, aZ as di, a_ as Pt, a$ as k, b0 as he, b1 as qr, b2 as pi, b3 as hi, b4 as W, b5 as Z, b6 as mi, b7 as me, b8 as Mt, b9 as gi, ba as yi, bb as Jr, bc as It, bd as O, be as ge, bf as bi, bg as se, bh as Pi, bi as Vi } from "./@vendor-
|
1
|
+
import { az as ct, aA as m, aB as M, aC as Xr, aD as Ee, aE as T, aF as at, aG as Kt, aH as oe, aI as We, aJ as J, aK as Wr, aL as ei, aM as Zr, aN as ri, aO as ni, aP as ii, aQ as ai, aR as oi, aS as $r, aT as si, aU as ui, aV as li, aW as fi, aX as ci, aY as vi, aZ as di, a_ as Pt, a$ as k, b0 as he, b1 as qr, b2 as pi, b3 as hi, b4 as W, b5 as Z, b6 as mi, b7 as me, b8 as Mt, b9 as gi, ba as yi, bb as Jr, bc as It, bd as O, be as ge, bf as bi, bg as se, bh as Pi, bi as Vi } from "./@vendor-D9q4wrnL.js";
|
2
2
|
import * as G from "react";
|
3
3
|
import Le, { createContext as Vt, useContext as F, useLayoutEffect as Ti, useEffect as H, useState as Re, useRef as q, useCallback as ye, useMemo as Ot, forwardRef as Si, createElement as xi, cloneElement as Ci, Children as Ai, isValidElement as wi } from "react";
|
4
4
|
var Ze = "production", De = typeof process > "u" || process.env === void 0 ? Ze : process.env.NODE_ENV || Ze, Q = function(t) {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import Te from "react";
|
2
|
-
import { bj as xe, bk as we, bl as ve, bm as lr, bn as Le, bo as Je, bp as tt, bq as at, br as et, bs as lt, bt as rt, bu as Xn, bv as sr, bw as Jn, bx as Dt, by as Go, bz as dr, bA as eo, bB as to, bC as ao, bD as ur, bE as Fe, bF as Rt, bG as $o, bH as cr, bI as Yo, bJ as Cr, bK as Uo, bL as Qo, bM as Zo, bN as Xo, bO as Jo } from "./@vendor-
|
2
|
+
import { bj as xe, bk as we, bl as ve, bm as lr, bn as Le, bo as Je, bp as tt, bq as at, br as et, bs as lt, bt as rt, bu as Xn, bv as sr, bw as Jn, bx as Dt, by as Go, bz as dr, bA as eo, bB as to, bC as ao, bD as ur, bE as Fe, bF as Rt, bG as $o, bH as cr, bI as Yo, bJ as Cr, bK as Uo, bL as Qo, bM as Zo, bN as Xo, bO as Jo } from "./@vendor-D9q4wrnL.js";
|
3
3
|
import { r as Ne, h as ei, g as ti } from "./@moment-C_WeV3Af.js";
|
4
4
|
import './assets/@react-dates.css';var ro = {}, Wt = {}, jt = {}, Mr;
|
5
5
|
function Ve() {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { bP as xt, bQ as Bt, bR as Ft, bS as v, bT as U, bU as xe, bD as re, bV as h, bL as f, bW as Y, bX as Vt, bY as Ue, bZ as Et, b_ as yt, b$ as Wt, c0 as Xt, c1 as Zt, c2 as ne } from "./@vendor-
|
1
|
+
import { bP as xt, bQ as Bt, bR as Ft, bS as v, bT as U, bU as xe, bD as re, bV as h, bL as f, bW as Y, bX as Vt, bY as Ue, bZ as Et, b_ as yt, b$ as Wt, c0 as Xt, c1 as Zt, c2 as ne } from "./@vendor-D9q4wrnL.js";
|
2
2
|
import * as y from "react";
|
3
3
|
import { useContext as Nt, useRef as j, useState as ee, createContext as St, useMemo as q, useCallback as D, Component as Rt, Fragment as Be, useEffect as Qe, forwardRef as Ht } from "react";
|
4
4
|
import { createPortal as Tt } from "react-dom";
|
@@ -2,7 +2,7 @@ var v = Object.defineProperty;
|
|
2
2
|
var E = (a, h, e) => h in a ? v(a, h, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[h] = e;
|
3
3
|
var f = (a, h, e) => E(a, typeof h != "symbol" ? h + "" : h, e);
|
4
4
|
import u, { createRef as k } from "react";
|
5
|
-
import { c3 as x } from "./@vendor-
|
5
|
+
import { c3 as x } from "./@vendor-D9q4wrnL.js";
|
6
6
|
const b = () => typeof navigator < "u" && /Safari/.test(navigator.userAgent) && /Apple Computer/.test(navigator.vendor) ? "-webkit-sticky" : "sticky";
|
7
7
|
var g;
|
8
8
|
(function(a) {
|