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