@devtron-labs/devtron-fe-common-lib 1.1.6-beta-2 → 1.1.6-beta-4
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/CustomTagSelector/Types.d.ts +12 -0
- package/dist/Common/Types.d.ts +2 -1
- package/dist/Shared/Components/DynamicDataTable/DynamicDataTable.d.ts +2 -0
- package/dist/Shared/Components/DynamicDataTable/DynamicDataTableHeader.d.ts +2 -0
- package/dist/Shared/Components/DynamicDataTable/DynamicDataTableRow.d.ts +2 -0
- package/dist/Shared/Components/DynamicDataTable/index.d.ts +2 -0
- package/dist/Shared/Components/DynamicDataTable/types.d.ts +161 -0
- package/dist/Shared/Components/DynamicDataTable/utils.d.ts +5 -0
- package/dist/Shared/Components/MultipleResizableTextArea/MultipleResizableTextArea.d.ts +2 -0
- package/dist/Shared/Components/MultipleResizableTextArea/index.d.ts +2 -0
- package/dist/Shared/Components/MultipleResizableTextArea/types.d.ts +9 -0
- package/dist/Shared/Components/SelectPicker/type.d.ts +5 -4
- package/dist/Shared/Components/SelectTextArea/SelectTextArea.d.ts +2 -0
- package/dist/Shared/Components/SelectTextArea/index.d.ts +2 -0
- package/dist/Shared/Components/SelectTextArea/types.d.ts +12 -0
- package/dist/Shared/Components/index.d.ts +2 -0
- package/dist/abap-DttVK1gE.js +1314 -0
- package/dist/apex-BjfHvyb2.js +315 -0
- package/dist/assets/index.css +1 -0
- package/dist/azcli-Ws-Trf8e.js +74 -0
- package/dist/bat-CeCHpU9_.js +95 -0
- package/dist/bicep-C7a7aEmi.js +108 -0
- package/dist/cameligo-CJeEIvX4.js +168 -0
- package/dist/clojure-CEKXhLdU.js +754 -0
- package/dist/coffee-CKu3e6V1.js +228 -0
- package/dist/cpp-CvUiT5Ec.js +390 -0
- package/dist/csharp-PmU9HJkB.js +320 -0
- package/dist/csp-DULvRLPF.js +57 -0
- package/dist/css-CNWXQPpt.js +186 -0
- package/dist/cssMode--71rLUMi.js +1446 -0
- package/dist/cypher-CYHOQS2R.js +262 -0
- package/dist/dart-BjGx-9Jk.js +270 -0
- package/dist/dockerfile-D0WaVIZ2.js +132 -0
- package/dist/ecl-CijaJu-p.js +454 -0
- package/dist/elixir-BI5Tc37S.js +489 -0
- package/dist/flow9-BApGtQOO.js +141 -0
- package/dist/freemarker2-Cx3qG0cs.js +643 -0
- package/dist/fsharp-VeKgt2eG.js +210 -0
- package/dist/go-Cl8cKDlN.js +208 -0
- package/dist/graphql-PfgPBmj4.js +141 -0
- package/dist/handlebars-Bt2uqG8b.js +391 -0
- package/dist/hcl-CG4VZSkm.js +177 -0
- package/dist/html-DU7HWII4.js +281 -0
- package/dist/htmlMode-C_jemX66.js +1456 -0
- package/dist/index-DFjnZKpc.js +163879 -0
- package/dist/index.js +508 -505
- package/dist/ini-EhiBNPZF.js +68 -0
- package/dist/java-DPbnXhoY.js +221 -0
- package/dist/javascript-tR3wsqWc.js +75 -0
- package/dist/jsonMode-CPHJoMDt.js +1866 -0
- package/dist/julia-Bw7EYexg.js +496 -0
- package/dist/kotlin-BNXLDoV0.js +245 -0
- package/dist/less-DtuF_id_.js +168 -0
- package/dist/lexon-DpB0-37O.js +151 -0
- package/dist/liquid-Cp4TQ7hL.js +238 -0
- package/dist/lua-CzRNOk9S.js +157 -0
- package/dist/m3-pXPmDwal.js +210 -0
- package/dist/markdown-CeQ3rxjn.js +202 -0
- package/dist/mdx-DP3ktqo6.js +171 -0
- package/dist/mips-DyE0VSNz.js +194 -0
- package/dist/msdax-CbdkoqRa.js +377 -0
- package/dist/mysql-B86-uHNu.js +876 -0
- package/dist/objective-c-1xvkKPId.js +188 -0
- package/dist/pascal-DcyFhj80.js +245 -0
- package/dist/pascaligo-QnM0hvMG.js +158 -0
- package/dist/perl-Bqp3FbU4.js +599 -0
- package/dist/pgsql-HdG7BG_Z.js +847 -0
- package/dist/php-zf7L2p7t.js +471 -0
- package/dist/pla-3Ykqsyzl.js +131 -0
- package/dist/postiats-D1v08O4B.js +544 -0
- package/dist/powerquery-CiQ9b1-b.js +890 -0
- package/dist/powershell-DFNK6VaX.js +233 -0
- package/dist/protobuf-D5P2Z6tc.js +422 -0
- package/dist/pug-BeyMX5am.js +393 -0
- package/dist/python-7adrB-AP.js +259 -0
- package/dist/qsharp-DcFOTjuP.js +282 -0
- package/dist/r-B3aJPcWp.js +245 -0
- package/dist/razor-DgqIzp1R.js +512 -0
- package/dist/redis-CyC__Tub.js +298 -0
- package/dist/redshift-NqbcQPcY.js +806 -0
- package/dist/restructuredtext-CZMxBkap.js +162 -0
- package/dist/ruby-C_jEtDv5.js +444 -0
- package/dist/rust-WAeitMCC.js +337 -0
- package/dist/sb-CSBm2pED.js +110 -0
- package/dist/scala-D76PhKmh.js +353 -0
- package/dist/scheme-CBSAjRuO.js +114 -0
- package/dist/scss-BHY8wFFg.js +244 -0
- package/dist/shell-Cwju9_l8.js +224 -0
- package/dist/solidity-BV1-nze3.js +1351 -0
- package/dist/sophia-DfoUlGAs.js +190 -0
- package/dist/sparql-4kfArTtK.js +193 -0
- package/dist/sql-DIpn0HSX.js +818 -0
- package/dist/st-BgJ_KDZh.js +415 -0
- package/dist/swift-D-ucEgIi.js +315 -0
- package/dist/systemverilog-DjkH5zuo.js +556 -0
- package/dist/tcl-gd8XLKJA.js +232 -0
- package/dist/tsMode-DEn7IgUV.js +810 -0
- package/dist/twig-D5XtTFGM.js +323 -0
- package/dist/typescript-BIIti-S_.js +328 -0
- package/dist/vb-DYqqYAf3.js +364 -0
- package/dist/wgsl-CkZE0qf3.js +420 -0
- package/dist/xml-BTCrcRFQ.js +95 -0
- package/dist/yaml-7Qg03Fvh.js +184 -0
- package/package.json +5 -4
- package/dist/@code-editor-Vbkor1r4.js +0 -18991
- package/dist/@common-rjsf-6UM_zh8b.js +0 -567
- package/dist/@framer-motion-DHY98qq3.js +0 -3437
- package/dist/@moment-C_WeV3Af.js +0 -2609
- package/dist/@monaco-editor-34kqzg3G.js +0 -70451
- package/dist/@react-dates-WNnwjI5S.js +0 -7708
- package/dist/@react-select-BbR996pa.js +0 -2636
- package/dist/@src-assets-images-DamVa6cS.js +0 -14
- package/dist/@vendor-RU8AW1bK.js +0 -20473
- package/dist/assets/@code-editor.css +0 -1
- package/dist/assets/@common-rjsf.css +0 -1
- package/dist/assets/@monaco-editor.css +0 -1
- package/dist/assets/@react-dates.css +0 -1
- package/dist/assets/@vendor.css +0 -1
|
@@ -1,567 +0,0 @@
|
|
|
1
|
-
import { j as n, J as E } from "./@vendor-RU8AW1bK.js";
|
|
2
|
-
import R, { forwardRef as $ } from "react";
|
|
3
|
-
import L, { getDefaultRegistry as k } from "@rjsf/core";
|
|
4
|
-
import D from "@rjsf/validator-ajv8";
|
|
5
|
-
import { T as y, S as H, a as J, b as M, c as U, d as W, e as V, f as w } from "./@code-editor-Vbkor1r4.js";
|
|
6
|
-
import q, { components as O } from "react-select";
|
|
7
|
-
import { getUiOptions as B, getTemplate as P, getSubmitButtonOptions as K, ADDITIONAL_PROPERTY_FLAG as C, errorId as Y, englishStringTranslator as z, TranslatableString as G, titleId as Q, canExpand as X, deepEquals as Z } from "@rjsf/utils";
|
|
8
|
-
import './assets/@common-rjsf.css';const N = {
|
|
9
|
-
SELECT: "Please select an option",
|
|
10
|
-
INPUT: "Please enter an input",
|
|
11
|
-
OBJECT_KEY: "Please enter a value for the key"
|
|
12
|
-
}, ee = "Key not available", Pe = {
|
|
13
|
-
"ui:submitButtonOptions": {
|
|
14
|
-
norender: !0
|
|
15
|
-
}
|
|
16
|
-
}, b = ({
|
|
17
|
-
showLabel: t,
|
|
18
|
-
label: e,
|
|
19
|
-
required: s,
|
|
20
|
-
children: o,
|
|
21
|
-
id: r,
|
|
22
|
-
rawDescription: a,
|
|
23
|
-
shouldAlignCenter: i = !0
|
|
24
|
-
}) => /* @__PURE__ */ n.jsxs(
|
|
25
|
-
"div",
|
|
26
|
-
{
|
|
27
|
-
className: t ? `display-grid dc__gap-12 rjsf-form-template__field ${i ? "flex-align-center" : ""}` : "",
|
|
28
|
-
children: [
|
|
29
|
-
t && /* @__PURE__ */ n.jsxs("label", { className: "cn-7 fs-13 lh-20 fw-4 flexbox mb-0", htmlFor: r, children: [
|
|
30
|
-
/* @__PURE__ */ n.jsx(y, { alwaysShowTippyOnHover: !!a, content: a, children: /* @__PURE__ */ n.jsx("span", { className: `dc__ellipsis-right ${a ? "text-underline-dashed-300" : ""}`, children: e || ee }) }),
|
|
31
|
-
s && /* @__PURE__ */ n.jsx("span", { className: "cr-5", children: " *" })
|
|
32
|
-
] }),
|
|
33
|
-
o
|
|
34
|
-
]
|
|
35
|
-
}
|
|
36
|
-
), S = ({ label: t, canAdd: e, onAddClick: s, disabled: o, readonly: r, uiSchema: a, registry: i }) => {
|
|
37
|
-
const {
|
|
38
|
-
ButtonTemplates: { AddButton: c }
|
|
39
|
-
} = i.templates;
|
|
40
|
-
return e && /* @__PURE__ */ n.jsx(
|
|
41
|
-
c,
|
|
42
|
-
{
|
|
43
|
-
label: t,
|
|
44
|
-
onClick: s,
|
|
45
|
-
disabled: o || r,
|
|
46
|
-
uiSchema: a,
|
|
47
|
-
registry: i
|
|
48
|
-
}
|
|
49
|
-
);
|
|
50
|
-
}, te = ({
|
|
51
|
-
canAdd: t,
|
|
52
|
-
className: e,
|
|
53
|
-
disabled: s,
|
|
54
|
-
idSchema: o,
|
|
55
|
-
uiSchema: r,
|
|
56
|
-
items: a,
|
|
57
|
-
onAddClick: i,
|
|
58
|
-
readonly: c,
|
|
59
|
-
registry: l,
|
|
60
|
-
required: d,
|
|
61
|
-
title: f
|
|
62
|
-
}) => {
|
|
63
|
-
const p = B(r), m = P("ArrayFieldItemTemplate", l, p), u = p.title || f;
|
|
64
|
-
return /* @__PURE__ */ n.jsx("fieldset", { className: e, id: o.$id, children: a.length ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
65
|
-
a.map(({ key: j, ...x }, g) => {
|
|
66
|
-
const h = {
|
|
67
|
-
...x.children,
|
|
68
|
-
props: {
|
|
69
|
-
...x.children.props
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
return /* @__PURE__ */ n.jsx(m, { ...x, children: h }, j);
|
|
73
|
-
}),
|
|
74
|
-
/* @__PURE__ */ n.jsx(
|
|
75
|
-
S,
|
|
76
|
-
{
|
|
77
|
-
label: u,
|
|
78
|
-
canAdd: t,
|
|
79
|
-
onAddClick: i,
|
|
80
|
-
disabled: s,
|
|
81
|
-
readonly: c,
|
|
82
|
-
uiSchema: r,
|
|
83
|
-
registry: l
|
|
84
|
-
}
|
|
85
|
-
)
|
|
86
|
-
] }) : /* @__PURE__ */ n.jsx(b, { label: u, required: d, showLabel: !0, id: o.$id, children: /* @__PURE__ */ n.jsx(
|
|
87
|
-
S,
|
|
88
|
-
{
|
|
89
|
-
label: u,
|
|
90
|
-
canAdd: t,
|
|
91
|
-
onAddClick: i,
|
|
92
|
-
disabled: s,
|
|
93
|
-
readonly: c,
|
|
94
|
-
uiSchema: r,
|
|
95
|
-
registry: l
|
|
96
|
-
}
|
|
97
|
-
) }) });
|
|
98
|
-
}, ne = ({
|
|
99
|
-
children: t,
|
|
100
|
-
disabled: e,
|
|
101
|
-
hasToolbar: s,
|
|
102
|
-
hasRemove: o,
|
|
103
|
-
index: r,
|
|
104
|
-
onDropIndexClick: a,
|
|
105
|
-
readonly: i,
|
|
106
|
-
registry: c,
|
|
107
|
-
uiSchema: l
|
|
108
|
-
}) => {
|
|
109
|
-
const { RemoveButton: d } = c.templates.ButtonTemplates;
|
|
110
|
-
return /* @__PURE__ */ n.jsxs("div", { className: "dc__position-rel display-grid rjsf-form-template__array-field-item flex-align-center", children: [
|
|
111
|
-
t,
|
|
112
|
-
/* @__PURE__ */ n.jsx("div", { className: "dc__position-abs remove-btn__container", style: { right: "-28px", top: "9px" }, children: s && o && /* @__PURE__ */ n.jsx(
|
|
113
|
-
d,
|
|
114
|
-
{
|
|
115
|
-
disabled: e || i,
|
|
116
|
-
onClick: a(r),
|
|
117
|
-
uiSchema: l,
|
|
118
|
-
registry: c
|
|
119
|
-
}
|
|
120
|
-
) })
|
|
121
|
-
] });
|
|
122
|
-
}, {
|
|
123
|
-
templates: { BaseInputTemplate: se }
|
|
124
|
-
} = k(), oe = ({ placeholder: t, ...e }) => /* @__PURE__ */ n.jsx(
|
|
125
|
-
se,
|
|
126
|
-
{
|
|
127
|
-
placeholder: t || N.INPUT,
|
|
128
|
-
...e,
|
|
129
|
-
className: "form__input cn-9 fs-13 lh-20 fw-4"
|
|
130
|
-
}
|
|
131
|
-
), A = ({
|
|
132
|
-
label: t,
|
|
133
|
-
icon: e,
|
|
134
|
-
iconType: s,
|
|
135
|
-
registry: o,
|
|
136
|
-
uiSchema: r,
|
|
137
|
-
...a
|
|
138
|
-
}) => {
|
|
139
|
-
const i = `Add ${t}`;
|
|
140
|
-
return /* @__PURE__ */ n.jsx("div", { className: "flexbox flex-justify-start", children: /* @__PURE__ */ n.jsxs(
|
|
141
|
-
"button",
|
|
142
|
-
{
|
|
143
|
-
...a,
|
|
144
|
-
type: "button",
|
|
145
|
-
className: "dc__outline-none-imp p-0 dc__transparent flex dc__gap-4 cursor dc__mxw-250",
|
|
146
|
-
title: "Add",
|
|
147
|
-
children: [
|
|
148
|
-
/* @__PURE__ */ n.jsx(H, { className: "icon-dim-16 fcb-5" }),
|
|
149
|
-
/* @__PURE__ */ n.jsx(y, { placement: "right", content: i, children: /* @__PURE__ */ n.jsx("span", { className: "cb-5 fs-13 lh-34 dc__truncate", children: i }) })
|
|
150
|
-
]
|
|
151
|
-
}
|
|
152
|
-
) });
|
|
153
|
-
}, re = ({ icon: t, iconType: e, registry: s, uiSchema: o, ...r }) => /* @__PURE__ */ n.jsx("button", { ...r, type: "button", className: "dc__outline-none-imp p-0 dc__transparent flex cursor", title: "Remove", children: /* @__PURE__ */ n.jsx(J, { className: "icon-dim-16 fcn-6" }) }), ae = ({ uiSchema: t }) => {
|
|
154
|
-
const { submitText: e, norender: s, props: o = {} } = K(t);
|
|
155
|
-
return s ? null : /* @__PURE__ */ n.jsx("div", { className: "flexbox flex-justify-end", children: /* @__PURE__ */ n.jsx("button", { type: "submit", ...o, className: `cta ${o.className || ""}`, children: e }) });
|
|
156
|
-
}, T = ({
|
|
157
|
-
id: t,
|
|
158
|
-
title: e,
|
|
159
|
-
required: s,
|
|
160
|
-
description: o
|
|
161
|
-
}) => /* @__PURE__ */ n.jsxs("legend", { className: "fs-13 fw-6 cn-9 lh-20 dc__no-border py-9 mb-0", id: t, children: [
|
|
162
|
-
/* @__PURE__ */ n.jsx(y, { alwaysShowTippyOnHover: !!o, content: o, children: /* @__PURE__ */ n.jsx("span", { className: `${o ? "text-underline-dashed-300" : ""}`, children: e }) }),
|
|
163
|
-
s && /* @__PURE__ */ n.jsx("span", { className: "cr-5", children: " *" })
|
|
164
|
-
] }), ie = (t) => {
|
|
165
|
-
const {
|
|
166
|
-
id: e,
|
|
167
|
-
label: s,
|
|
168
|
-
children: o,
|
|
169
|
-
errors: r,
|
|
170
|
-
hidden: a,
|
|
171
|
-
required: i,
|
|
172
|
-
displayLabel: c,
|
|
173
|
-
registry: l,
|
|
174
|
-
uiSchema: d,
|
|
175
|
-
classNames: f,
|
|
176
|
-
schema: p,
|
|
177
|
-
rawDescription: m
|
|
178
|
-
} = t, u = B(d), j = P(
|
|
179
|
-
"WrapIfAdditionalTemplate",
|
|
180
|
-
l,
|
|
181
|
-
u
|
|
182
|
-
), x = C in p, g = (c || p.type === "boolean") && !x, h = p.type === "array";
|
|
183
|
-
return a ? /* @__PURE__ */ n.jsx("div", { className: "hidden", children: o }) : (
|
|
184
|
-
// NOTE: need to override the margins of default rjsf css
|
|
185
|
-
/* @__PURE__ */ n.jsxs("div", { className: `${f} mb-0`, children: [
|
|
186
|
-
h && /* @__PURE__ */ n.jsx(
|
|
187
|
-
T,
|
|
188
|
-
{
|
|
189
|
-
id: e,
|
|
190
|
-
title: s,
|
|
191
|
-
required: i,
|
|
192
|
-
registry: l,
|
|
193
|
-
uiSchema: d,
|
|
194
|
-
schema: p,
|
|
195
|
-
description: m
|
|
196
|
-
}
|
|
197
|
-
),
|
|
198
|
-
/* @__PURE__ */ n.jsx(
|
|
199
|
-
b,
|
|
200
|
-
{
|
|
201
|
-
label: s,
|
|
202
|
-
showLabel: g,
|
|
203
|
-
id: e,
|
|
204
|
-
required: i,
|
|
205
|
-
rawDescription: m,
|
|
206
|
-
children: /* @__PURE__ */ n.jsx(j, { ...t, children: o })
|
|
207
|
-
}
|
|
208
|
-
),
|
|
209
|
-
r
|
|
210
|
-
] })
|
|
211
|
-
);
|
|
212
|
-
}, le = ({ errors: t = [], idSchema: e }) => {
|
|
213
|
-
const s = Y(e);
|
|
214
|
-
return t.length > 0 && /* @__PURE__ */ n.jsx("span", { className: "display-grid rjsf-form-template__field--error dc__gap-12", id: s, children: t.filter((o) => !!o).map((o, r) => /* @__PURE__ */ n.jsxs(R.Fragment, { children: [
|
|
215
|
-
/* @__PURE__ */ n.jsx("span", {}),
|
|
216
|
-
/* @__PURE__ */ n.jsxs("span", { className: "form__error", children: [
|
|
217
|
-
/* @__PURE__ */ n.jsx(M, { className: "form__icon form__icon--error" }),
|
|
218
|
-
o
|
|
219
|
-
] })
|
|
220
|
-
] }, r)) });
|
|
221
|
-
}, ce = (t, e) => {
|
|
222
|
-
switch (t) {
|
|
223
|
-
case G.NewStringDefault:
|
|
224
|
-
return "";
|
|
225
|
-
default:
|
|
226
|
-
return z(t, e);
|
|
227
|
-
}
|
|
228
|
-
}, de = (t = {}) => ({
|
|
229
|
-
menuList: (e) => ({
|
|
230
|
-
...e,
|
|
231
|
-
paddingTop: 0,
|
|
232
|
-
paddingBottom: 0,
|
|
233
|
-
cursor: "pointer"
|
|
234
|
-
}),
|
|
235
|
-
control: (e, s) => ({
|
|
236
|
-
...e,
|
|
237
|
-
minHeight: "32px",
|
|
238
|
-
boxShadow: "none",
|
|
239
|
-
backgroundColor: "var(--N50)",
|
|
240
|
-
border: s.isFocused ? "1px solid var(--B500)" : "1px solid var(--N200)",
|
|
241
|
-
cursor: "pointer"
|
|
242
|
-
}),
|
|
243
|
-
option: (e, s) => ({
|
|
244
|
-
...e,
|
|
245
|
-
color: "var(--N900)",
|
|
246
|
-
backgroundColor: s.isFocused ? "var(--N100)" : "white",
|
|
247
|
-
padding: "10px 12px",
|
|
248
|
-
cursor: "pointer"
|
|
249
|
-
}),
|
|
250
|
-
dropdownIndicator: (e, s) => ({
|
|
251
|
-
...e,
|
|
252
|
-
color: "var(--N400)",
|
|
253
|
-
padding: "0 8px",
|
|
254
|
-
transition: "all .2s ease",
|
|
255
|
-
transform: s.selectProps.menuIsOpen ? "rotate(180deg)" : "rotate(0deg)"
|
|
256
|
-
}),
|
|
257
|
-
valueContainer: (e, s) => ({
|
|
258
|
-
...e,
|
|
259
|
-
padding: "0 8px",
|
|
260
|
-
fontWeight: "400",
|
|
261
|
-
color: s.selectProps.menuIsOpen ? "var(--N500)" : e.color
|
|
262
|
-
}),
|
|
263
|
-
loadingMessage: (e) => ({
|
|
264
|
-
...e,
|
|
265
|
-
color: "var(--N600)"
|
|
266
|
-
}),
|
|
267
|
-
noOptionsMessage: (e) => ({
|
|
268
|
-
...e,
|
|
269
|
-
color: "var(--N600)"
|
|
270
|
-
}),
|
|
271
|
-
multiValue: (e) => ({
|
|
272
|
-
...e,
|
|
273
|
-
border: "1px solid var(--N200)",
|
|
274
|
-
borderRadius: "4px",
|
|
275
|
-
background: "white",
|
|
276
|
-
height: "28px",
|
|
277
|
-
marginRight: "8px",
|
|
278
|
-
padding: "2px",
|
|
279
|
-
fontSize: "12px"
|
|
280
|
-
}),
|
|
281
|
-
...t
|
|
282
|
-
}), Ce = (t) => {
|
|
283
|
-
try {
|
|
284
|
-
const e = new URL(t).origin === window.location.origin;
|
|
285
|
-
return {
|
|
286
|
-
href: t,
|
|
287
|
-
target: e ? "_self" : "_blank",
|
|
288
|
-
rel: e ? void 0 : "external noreferrer",
|
|
289
|
-
url: t
|
|
290
|
-
};
|
|
291
|
-
} catch {
|
|
292
|
-
return {
|
|
293
|
-
href: t,
|
|
294
|
-
target: "_blank",
|
|
295
|
-
url: `${t} (Invalid URL)`
|
|
296
|
-
};
|
|
297
|
-
}
|
|
298
|
-
}, Ae = (t) => {
|
|
299
|
-
const e = typeof t;
|
|
300
|
-
switch (e) {
|
|
301
|
-
case "boolean":
|
|
302
|
-
case "string":
|
|
303
|
-
case "number":
|
|
304
|
-
return e;
|
|
305
|
-
case "object":
|
|
306
|
-
return Array.isArray(t) ? "array" : t === null ? "null" : e;
|
|
307
|
-
default:
|
|
308
|
-
return "null";
|
|
309
|
-
}
|
|
310
|
-
}, v = (t) => {
|
|
311
|
-
if (!t)
|
|
312
|
-
return "";
|
|
313
|
-
const e = t.trim();
|
|
314
|
-
return e.match(/^\w+(\/\w+)*$/g) ? `/${e}` : e.match(/^\w+(\.\w+)*$/g) ? `/${e.replaceAll(/\./g, "/")}` : e;
|
|
315
|
-
}, F = {
|
|
316
|
-
value: !1,
|
|
317
|
-
path: ""
|
|
318
|
-
}, pe = (t) => {
|
|
319
|
-
if (!t)
|
|
320
|
-
return null;
|
|
321
|
-
const e = structuredClone(t);
|
|
322
|
-
return typeof e == "string" ? {
|
|
323
|
-
value: !0,
|
|
324
|
-
path: v(e)
|
|
325
|
-
} : typeof e != "object" ? structuredClone(F) : Object.hasOwn(e, "condition") && "condition" in e && Object.hasOwn(e, "value") && "value" in e ? {
|
|
326
|
-
value: e.condition,
|
|
327
|
-
path: v(e.value)
|
|
328
|
-
} : Object.hasOwn(e, "value") && "value" in e && Object.hasOwn(e, "path") && "path" in e ? {
|
|
329
|
-
value: e.value,
|
|
330
|
-
path: v(e.path)
|
|
331
|
-
} : structuredClone(F);
|
|
332
|
-
}, ue = ({
|
|
333
|
-
disabled: t,
|
|
334
|
-
formData: e,
|
|
335
|
-
idSchema: s,
|
|
336
|
-
onAddClick: o,
|
|
337
|
-
properties: r,
|
|
338
|
-
readonly: a,
|
|
339
|
-
registry: i,
|
|
340
|
-
required: c,
|
|
341
|
-
schema: l,
|
|
342
|
-
title: d,
|
|
343
|
-
uiSchema: f,
|
|
344
|
-
formContext: p
|
|
345
|
-
}) => {
|
|
346
|
-
const m = !!l.additionalProperties, u = X(l, f, e) && /* @__PURE__ */ n.jsx(
|
|
347
|
-
A,
|
|
348
|
-
{
|
|
349
|
-
label: d,
|
|
350
|
-
className: "object-property-expand",
|
|
351
|
-
onClick: o(l),
|
|
352
|
-
disabled: t || a,
|
|
353
|
-
uiSchema: f,
|
|
354
|
-
registry: i
|
|
355
|
-
}
|
|
356
|
-
), j = r.filter((x) => {
|
|
357
|
-
const g = l.properties?.[x.name]?.hidden;
|
|
358
|
-
if (!g)
|
|
359
|
-
return !0;
|
|
360
|
-
try {
|
|
361
|
-
const h = pe(g);
|
|
362
|
-
if (!h.path)
|
|
363
|
-
throw new Error("Empty path property of hidden descriptor field");
|
|
364
|
-
if (!h.path.match(/^\/\w+(\/\w+)*$/g))
|
|
365
|
-
throw new Error("Provided path is not a valid JSON pointer");
|
|
366
|
-
const _ = E({
|
|
367
|
-
path: U(h.path),
|
|
368
|
-
json: p
|
|
369
|
-
})?.[0];
|
|
370
|
-
return !(_ === void 0 || Z(h.value, _));
|
|
371
|
-
} catch {
|
|
372
|
-
return !0;
|
|
373
|
-
}
|
|
374
|
-
}).sort((x) => l.properties?.[x.name]?.type === "boolean" ? -1 : 1).map((x) => x.content);
|
|
375
|
-
return m ? r.length ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
376
|
-
/* @__PURE__ */ n.jsx(
|
|
377
|
-
b,
|
|
378
|
-
{
|
|
379
|
-
label: d,
|
|
380
|
-
required: c,
|
|
381
|
-
showLabel: !0,
|
|
382
|
-
id: s.$id,
|
|
383
|
-
shouldAlignCenter: !1,
|
|
384
|
-
children: /* @__PURE__ */ n.jsx("div", { children: j })
|
|
385
|
-
}
|
|
386
|
-
),
|
|
387
|
-
u
|
|
388
|
-
] }) : /* @__PURE__ */ n.jsx(b, { label: d, required: c, showLabel: !0, id: s.$id, children: u }) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
389
|
-
j,
|
|
390
|
-
u
|
|
391
|
-
] });
|
|
392
|
-
}, me = (t) => {
|
|
393
|
-
const { idSchema: e, registry: s, required: o, schema: r, title: a, uiSchema: i, description: c } = t, l = !!r.additionalProperties, d = a && !l;
|
|
394
|
-
return /* @__PURE__ */ n.jsxs("fieldset", { id: e.$id, children: [
|
|
395
|
-
d && /* @__PURE__ */ n.jsx(
|
|
396
|
-
T,
|
|
397
|
-
{
|
|
398
|
-
id: Q(e),
|
|
399
|
-
title: a,
|
|
400
|
-
required: o,
|
|
401
|
-
schema: r,
|
|
402
|
-
uiSchema: i,
|
|
403
|
-
registry: s,
|
|
404
|
-
description: c
|
|
405
|
-
}
|
|
406
|
-
),
|
|
407
|
-
/* @__PURE__ */ n.jsx(
|
|
408
|
-
"div",
|
|
409
|
-
{
|
|
410
|
-
className: `${r.properties && !l && e.$id !== "root" ? "dc__border-left pl-12" : ""} flexbox-col dc__gap-8`,
|
|
411
|
-
children: /* @__PURE__ */ n.jsx(ue, { ...t })
|
|
412
|
-
}
|
|
413
|
-
)
|
|
414
|
-
] });
|
|
415
|
-
}, he = ({
|
|
416
|
-
id: t,
|
|
417
|
-
disabled: e,
|
|
418
|
-
label: s,
|
|
419
|
-
onKeyChange: o,
|
|
420
|
-
onDropPropertyClick: r,
|
|
421
|
-
readonly: a,
|
|
422
|
-
schema: i,
|
|
423
|
-
children: c,
|
|
424
|
-
uiSchema: l,
|
|
425
|
-
registry: d
|
|
426
|
-
}) => {
|
|
427
|
-
const { templates: f } = d, { RemoveButton: p } = f.ButtonTemplates, m = C in i;
|
|
428
|
-
return /* @__PURE__ */ n.jsx(n.Fragment, { children: m ? /* @__PURE__ */ n.jsxs("div", { className: "dc__position-rel rjsf-form-template__additional-fields display-grid dc__gap-8 flex-align-center", children: [
|
|
429
|
-
/* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx(
|
|
430
|
-
"input",
|
|
431
|
-
{
|
|
432
|
-
type: "text",
|
|
433
|
-
className: "form__input cn-9 fs-13 lh-20 fw-4",
|
|
434
|
-
id: `${t}-key`,
|
|
435
|
-
onBlur: (u) => o(u.target.value),
|
|
436
|
-
placeholder: N.OBJECT_KEY,
|
|
437
|
-
defaultValue: s
|
|
438
|
-
}
|
|
439
|
-
) }),
|
|
440
|
-
/* @__PURE__ */ n.jsx("div", { children: c }),
|
|
441
|
-
/* @__PURE__ */ n.jsx("div", { className: "dc__position-abs remove-btn__container", style: { right: "-28px", top: "9px" }, children: /* @__PURE__ */ n.jsx(
|
|
442
|
-
p,
|
|
443
|
-
{
|
|
444
|
-
disabled: e || a,
|
|
445
|
-
onClick: r(s),
|
|
446
|
-
uiSchema: l,
|
|
447
|
-
registry: d
|
|
448
|
-
}
|
|
449
|
-
) })
|
|
450
|
-
] }) : c });
|
|
451
|
-
}, fe = ({
|
|
452
|
-
id: t,
|
|
453
|
-
onChange: e,
|
|
454
|
-
value: s,
|
|
455
|
-
required: o,
|
|
456
|
-
disabled: r,
|
|
457
|
-
readonly: a,
|
|
458
|
-
autofocus: i,
|
|
459
|
-
onBlur: c,
|
|
460
|
-
onFocus: l
|
|
461
|
-
}) => {
|
|
462
|
-
const d = (p, m) => {
|
|
463
|
-
const { id: u, checked: j } = p.target;
|
|
464
|
-
m === "blur" ? c(u, j) : m === "focus" && l(u, j);
|
|
465
|
-
}, f = typeof s > "u" ? !1 : s;
|
|
466
|
-
return /* @__PURE__ */ n.jsxs("div", { children: [
|
|
467
|
-
/* @__PURE__ */ n.jsx(
|
|
468
|
-
W,
|
|
469
|
-
{
|
|
470
|
-
selected: f,
|
|
471
|
-
onSelect: e,
|
|
472
|
-
id: t,
|
|
473
|
-
name: t,
|
|
474
|
-
required: o,
|
|
475
|
-
disabled: r || a,
|
|
476
|
-
autoFocus: i,
|
|
477
|
-
rootClassName: "w-32 mb-0 dc__height-inherit",
|
|
478
|
-
onBlur: (p) => d(p, "blur"),
|
|
479
|
-
onFocus: (p) => d(p, "focus")
|
|
480
|
-
}
|
|
481
|
-
),
|
|
482
|
-
/* @__PURE__ */ n.jsx("span", { className: "dc__capitalize ml-8", children: f.toString() })
|
|
483
|
-
] });
|
|
484
|
-
}, I = de(), xe = ({ children: t, ...e }) => /* @__PURE__ */ n.jsx(O.MenuList, { ...e, children: Array.isArray(t) ? t.slice(0, 20) : t }), ge = (t) => /* @__PURE__ */ n.jsx(O.DropdownIndicator, { ...t, children: /* @__PURE__ */ n.jsx(V, { className: "icon-dim-20 icon-n5", "data-testid": "overview-project-edit-dropdown" }) }), je = (t) => {
|
|
485
|
-
const {
|
|
486
|
-
id: e,
|
|
487
|
-
multiple: s = !1,
|
|
488
|
-
options: o,
|
|
489
|
-
value: r,
|
|
490
|
-
disabled: a,
|
|
491
|
-
readonly: i,
|
|
492
|
-
autofocus: c = !1,
|
|
493
|
-
onChange: l,
|
|
494
|
-
onBlur: d,
|
|
495
|
-
onFocus: f,
|
|
496
|
-
placeholder: p
|
|
497
|
-
} = t, { enumOptions: m = [] } = o, u = s ? [] : "", j = (g) => {
|
|
498
|
-
l(s ? g.map((h) => h.value) : g.value);
|
|
499
|
-
}, x = (g) => s ? m.filter((h) => g.some((_) => w(_, h.value))) : m.find((h) => w(g, h.value));
|
|
500
|
-
return /* @__PURE__ */ n.jsx(
|
|
501
|
-
q,
|
|
502
|
-
{
|
|
503
|
-
id: e,
|
|
504
|
-
name: e,
|
|
505
|
-
isMulti: s,
|
|
506
|
-
value: typeof r > "u" ? u : x(r),
|
|
507
|
-
autoFocus: c,
|
|
508
|
-
onChange: j,
|
|
509
|
-
options: m,
|
|
510
|
-
onBlur: () => d(e, r),
|
|
511
|
-
onFocus: () => f(e, r),
|
|
512
|
-
placeholder: p || N.SELECT,
|
|
513
|
-
isDisabled: a || i,
|
|
514
|
-
styles: {
|
|
515
|
-
...I,
|
|
516
|
-
control: (g) => ({
|
|
517
|
-
...g,
|
|
518
|
-
...I.control,
|
|
519
|
-
backgroundColor: "var(--N50)"
|
|
520
|
-
})
|
|
521
|
-
},
|
|
522
|
-
components: {
|
|
523
|
-
IndicatorSeparator: null,
|
|
524
|
-
DropdownIndicator: ge,
|
|
525
|
-
MenuList: xe
|
|
526
|
-
},
|
|
527
|
-
menuPlacement: "auto"
|
|
528
|
-
}
|
|
529
|
-
);
|
|
530
|
-
}, _e = {
|
|
531
|
-
CheckboxWidget: fe,
|
|
532
|
-
SelectWidget: je
|
|
533
|
-
}, be = {
|
|
534
|
-
ArrayFieldItemTemplate: ne,
|
|
535
|
-
ArrayFieldTemplate: te,
|
|
536
|
-
BaseInputTemplate: oe,
|
|
537
|
-
ButtonTemplates: { AddButton: A, RemoveButton: re, SubmitButton: ae },
|
|
538
|
-
FieldTemplate: ie,
|
|
539
|
-
FieldErrorTemplate: le,
|
|
540
|
-
ObjectFieldTemplate: me,
|
|
541
|
-
TitleFieldTemplate: T,
|
|
542
|
-
WrapIfAdditionalTemplate: he
|
|
543
|
-
}, ve = L, ye = D, Ee = $((t, e) => /* @__PURE__ */ n.jsx(
|
|
544
|
-
ve,
|
|
545
|
-
{
|
|
546
|
-
noHtml5Validate: !0,
|
|
547
|
-
showErrorList: !1,
|
|
548
|
-
autoComplete: "off",
|
|
549
|
-
...t,
|
|
550
|
-
className: `rjsf-form-template__container ${t.className || ""}`,
|
|
551
|
-
validator: ye,
|
|
552
|
-
templates: {
|
|
553
|
-
...be,
|
|
554
|
-
...t.templates
|
|
555
|
-
},
|
|
556
|
-
formContext: t.formData,
|
|
557
|
-
widgets: { ..._e, ...t.widgets },
|
|
558
|
-
translateString: ce,
|
|
559
|
-
ref: e
|
|
560
|
-
}
|
|
561
|
-
));
|
|
562
|
-
export {
|
|
563
|
-
Pe as H,
|
|
564
|
-
Ee as R,
|
|
565
|
-
Ce as a,
|
|
566
|
-
Ae as g
|
|
567
|
-
};
|