@devtron-labs/devtron-fe-common-lib 1.8.1 → 1.8.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-CAqkBpY7.js → @code-editor-CjYMh-FJ.js} +494 -495
- package/dist/@common-rjsf-Bja24NFK.js +617 -0
- package/dist/Common/RJSF/Form.d.ts +1 -1
- package/dist/Common/RJSF/index.d.ts +1 -1
- package/dist/Common/RJSF/types.d.ts +17 -3
- package/dist/Common/RJSF/utils.d.ts +5 -1
- package/dist/Pages/GlobalConfigurations/DeploymentCharts/basicViewSchema.json.d.ts +27 -30
- package/dist/index.js +6 -4
- package/package.json +1 -1
- package/dist/@common-rjsf-C8UaYvsy.js +0 -519
@@ -15,39 +15,36 @@ declare const _default: {
|
|
15
15
|
},
|
16
16
|
"title": "Container Port"
|
17
17
|
},
|
18
|
-
"
|
18
|
+
"Limits": {
|
19
19
|
"type": "object",
|
20
|
-
"
|
21
|
-
"
|
20
|
+
"description": "Maximum RAM and CPU available to the application",
|
21
|
+
"required": ["CPU", "Memory"],
|
22
22
|
"properties": {
|
23
|
-
"
|
24
|
-
"type": "
|
25
|
-
"description": "Maximum
|
26
|
-
"
|
27
|
-
"properties": {
|
28
|
-
"cpu": {
|
29
|
-
"type": "string",
|
30
|
-
"description": "Maximum allowed CPU limit"
|
31
|
-
},
|
32
|
-
"memory": {
|
33
|
-
"type": "string",
|
34
|
-
"description": "Maximum allowed memory limit"
|
35
|
-
}
|
36
|
-
}
|
23
|
+
"CPU": {
|
24
|
+
"type": "string",
|
25
|
+
"description": "Maximum allowed CPU limit",
|
26
|
+
"updatePath": "/resources/limits/cpu"
|
37
27
|
},
|
38
|
-
"
|
39
|
-
"type": "
|
40
|
-
"description": "
|
41
|
-
"
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
28
|
+
"Memory": {
|
29
|
+
"type": "string",
|
30
|
+
"description": "Maximum allowed memory limit",
|
31
|
+
"updatePath": "/resources/limits/memory"
|
32
|
+
}
|
33
|
+
}
|
34
|
+
},
|
35
|
+
"Requests": {
|
36
|
+
"type": "object",
|
37
|
+
"description": "Minimum RAM and CPU available to the application",
|
38
|
+
"properties": {
|
39
|
+
"CPU": {
|
40
|
+
"type": "string",
|
41
|
+
"description": "Minimum CPU value",
|
42
|
+
"updatePath": "/resources/requests/cpu"
|
43
|
+
},
|
44
|
+
"Memory": {
|
45
|
+
"type": "string",
|
46
|
+
"description": "Minimum memory value",
|
47
|
+
"updatePath": "/resources/requests/memory"
|
51
48
|
}
|
52
49
|
}
|
53
50
|
},
|
package/dist/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { k0 as s,
|
2
|
-
import { H as kd, R as vd,
|
1
|
+
import { k0 as s, a0 as t, dR as i, ef as o, kP as r, kE as n, eV as l, ab as T, ko as g, W as S, kA as p, ki as d, fi as E, cQ as _, aJ as c, aK as A, jU as I, i7 as u, fr as C, lv as D, k_ as O, kC as y, iE as f, fF as R, kb as m, jJ as P, cD as N, aw as M, ax as L, fd as h, gP as F, fA as U, kU as b, dE as B, dM as k, dH as v, dP as V, dB as G, dN as j, dQ as H, dG as K, dF as Y, d_ as W, dL as w, dD as x, f6 as X, fa as z, hW as q, B as Z, g as J, h as Q, dA as $, d6 as aa, dp as ea, d4 as sa, d5 as ta, d9 as ia, dr as oa, dq as ra, dw as na, d8 as la, dz as Ta, d7 as ga, ds as Sa, du as pa, dt as da, db as Ea, O as _a, dv as ca, ir as Aa, f1 as Ia, f4 as ua, f7 as Ca, f3 as Da, hM as Oa, hP as ya, hO as fa, hN as Ra, fs as ma, ft as Pa, hC as Na, fD as Ma, aD as La, aC as ha, aB as Fa, jP as Ua, at as ba, kL as Ba, ar as ka, cA as va, jO as Va, k3 as Ga, fb as ja, l5 as Ha, l1 as Ka, dX as Ya, dY as Wa, l6 as wa, l7 as xa, kG as Xa, kI as za, kH as qa, j_ as Za, kN as Ja, eH as Qa, im as $a, ij as ae, eh as ee, dK as se, hZ as te, q as ie, co as oe, gs as re, c0 as ne, C as le, ek as Te, el as ge, c_ as Se, d0 as pe, c$ as de, hs as Ee, hb as _e, gN as ce, f0 as Ae, ey as Ie, kF as ue, cw as Ce, aT as De, eD as Oe, i8 as ye, l2 as fe, eG as Re, jZ as me, bV as Pe, hV as Ne, h$ as Me, h_ as Le, cF as he, iK as Fe, c4 as Ue, gL as be, gK as Be, ah as ke, kn as ve, kZ as Ve, _ as Ge, ag as je, v as He, kO as Ke, h3 as Ye, h1 as We, h2 as we, dC as xe, kY as Xe, kp as ze, z as qe, gC as Ze, dS as Je, dT as Qe, ei as $e, ho as as, kw as es, ky as ss, a1 as ts, i5 as is, kV as os, e9 as rs, t as ns, w as ls, r as Ts, s as gs, eg as Ss, ev as ps, gy as ds, D as Es, jL as _s, hX as cs, jW as As, aF as Is, hc as us, hd as Cs, fG as Ds, gr as Os, gq as ys, au as fs, bU as Rs, kr as ms, iF as Ps, fE as Ns, ks as Ms, bI as Ls, hp as hs, cP as Fs, bW as Us, bX as bs, i0 as Bs, l0 as ks, k$ as vs, cT as Vs, cU as Gs, cS as js, bJ as Hs, bw as Ks, ez as Ys, i1 as Ws, i2 as ws, kv as xs, L as Xs, A as zs, aa as qs, kl as Zs, kx as Js, hr as Qs, fl as $s, hU as at, k1 as et, l4 as st, jH as tt, fu as it, kt as ot, gv as rt, E as nt, f as lt, ff as Tt, F as gt, a4 as St, fy as pt, fx as dt, fK as Et, eU as _t, cy as ct, i6 as At, fh as It, aG as ut, h6 as Ct, ay as Dt, ip as Ot, hY as yt, eb as ft, ew as Rt, eC as mt, cX as Pt, G as Nt, m as Mt, fj as Lt, g9 as ht, gu as Ft, jV as Ut, iJ as bt, al as Bt, o as kt, eZ as vt, fn as Vt, fJ as Gt, H as jt, kk as Ht, dV as Kt, dU as Yt, dW as Wt, eR as wt, eS as xt, ak as Xt, iB as zt, gR as qt, fc as Zt, fe as Jt, gO as Qt, aA as $t, k8 as ai, ka as ei, cH as si, cG as ti, as as ii, fw as oi, lq as ri, iM as ni, I as li, fk as Ti, cC as gi, hS as Si, hQ as pi, kD as di, K as Ei, h4 as _i, af as ci, eY as Ai, g7 as Ii, fH as ui, kB as Ci, ae as Di, X as Oi, cY as yi, iN as fi, $ as Ri, V as mi, gI as Pi, gB as Ni, k7 as Mi, av as Li, cW as hi, az as Fi, gQ as Ui, e_ as bi, bK as Bi, fv as ki, km as vi, jN as Vi, gz as Gi, cv as ji, e$ as Hi, c2 as Ki, b_ as Yi, b$ as Wi, c1 as wi, ej as xi, dI as Xi, ea as zi, fP as qi, dx as Zi, fO as Ji, jI as Qi, hT as $i, kQ as ao, bY as eo, eF as so, et as to, x as io, kJ as oo, ad as ro, dJ as no, fm as lo, cV as To, iL as go, kq as So, gW as po, aH as Eo, gV as _o, gU as co, gS as Ao, cE as Io, gT as uo, ct as Co, jS as Do, P as Oo, bH as yo, jX as fo, bO as Ro, eE as mo, kS as Po, iI as No, y as Mo, k as Lo, l as ho, a8 as Fo, cx as Uo, cs as bo, iH as Bo, jK as ko, eN as vo, R as Vo, Q as Go, bT as jo, jQ as Ho, jR as Ko, j$ as Yo, S as Wo, j0 as wo, ik as xo, Y as Xo, f8 as zo, ai as qo, ac as Zo, kW as Jo, eL as Qo, kj as $o, fQ as ar, fg as er, e6 as sr, cu as tr, g8 as ir, cp as or, hK as rr, hL as nr, hv as lr, cZ as Tr, d3 as gr, d2 as Sr, p as pr, f5 as dr, kK as Er, h5 as _r, h8 as cr, h9 as Ar, ao as Ir, ap as ur, hz as Cr, jM as Dr, ha as Or, fz as yr, gx as fr, bZ as Rr, cq as mr, Z as Pr, c6 as Nr, fR as Mr, iD as Lr, gt as hr, iG as Fr, n as Ur, eT as br, kT as Br, dO as kr, ku as vr, a6 as Vr, gJ as Gr, J as jr, M as Hr, d1 as Kr, kM as Yr, hq as Wr, bR as wr, bS as xr, i3 as Xr, iw as zr, ix as qr, l3 as Zr, iu as Jr, kd as Qr, iv as $r, gA as an, bN as en, aq as sn, lh as tn, li as on, lj as rn, a as nn, iq as ln, dy as Tn, T as gn, aE as Sn, fC as pn, fB as dn, k4 as En, N as _n, an as cn, kX as An, jY as In, U as un, dZ as Cn, iy as Dn, iz as On, cN as yn, kg as fn, e1 as Rn, e4 as mn, e3 as Pn, e2 as Nn, d$ as Mn, kR as Ln, aj as hn, ex as Fn, cz as Un, k5 as bn, it as Bn, bL as kn, bM as vn, ht as Vn, a3 as Gn, cB as jn, jT as Hn, fN as Kn, fL as Yn, aI as Wn, is as wn, fM as xn, k2 as Xn, bq as zn, a9 as qn, aQ as Zn, jm as Jn, bm as Qn, a2 as $n, by as al, gc as el, b as sl, fW as tl, fX as il, bo as ol, jC as rl, ba as nl, b8 as ll, d as Tl, br as gl, il as Sl, io as pl, e7 as dl, c as El, ic as _l, ig as cl, bb as Al, eq as Il, de as ul, ce as Cl, en as Dl, ee as Ol, gH as yl, bg as fl, bn as Rl, jn as ml, e as Pl, ep as Nl, eo as Ml, jG as Ll, hl, hn as Fl, hk as Ul, hm as bl, j1 as Bl, er as kl, j6 as vl, cd as Vl, cf as Gl, bl as jl, cc as Hl, aO as Kl, eK as Yl, ec as Wl, aZ as wl, la as xl, hh as Xl, go as zl, l9 as ql, gZ as Zl, bB as Jl, dn as Ql, dd as $l, dm as aT, dl as eT, dk as sT, l8 as tT, hE as iT, ci as oT, es as rT, eW as nT, lb as lT, hH as TT, kc as gT, id as ST, i9 as pT, ii as dT, ie as ET, b4 as _T, eX as cT, fo as AT, cg as IT, gG as uT, jw as CT, hi as DT, g4 as OT, f$ as yT, f_ as fT, eA as RT, eu as mT, fY as PT, iC as NT, he as MT, di as LT, hf as hT, ih as FT, a_ as UT, i4 as bT, ch as BT, jq as kT, bh as vT, am as VT, gl as GT, b6 as jT, cm as HT, jb as KT, cn as YT, bF as WT, e8 as wT, jv as xT, bG as XT, gi as zT, gh as qT, bD as ZT, f9 as JT, hR as QT, ju as $T, jt as ag, ja as eg, aR as sg, em as tg, ed as ig, jj as og, gf as rg, jz as ng, fZ as lg, g6 as Tg, ck as gg, gm as Sg, jy as pg, a5 as dg, g_ as Eg, lk as _g, gb as cg, dh as Ag, gY as Ig, gX as ug, lp as Cg, lo as Dg, ld as Og, hB as yg, aY as fg, bj as Rg, eB as mg, lc as Pg, cj as Ng, bC as Mg, ib as Lg, hG as hg, hD as Fg, hw as Ug, hJ as bg, h7 as Bg, hA as kg, hu as vg, ge as Vg, bE as Gg, gn as jg, hI as Hg, fV as Kg, c5 as Yg, jp as Wg, a7 as wg, gD as xg, hF as Xg, hx as zg, dj as qg, fU as Zg, g5 as Jg, ga as Qg, gp as $g, jB as aS, h0 as eS, be as sS, e0 as tS, e5 as iS, lf as oS, c7 as rS, jA as nS, jf as lS, cl as TS, gj as gS, gk as SS, ln as pS, ll as dS, jx as ES, cR as _S, ji as cS, fp as AS, bp as IS, b5 as uS, eJ as CS, eI as DS, j7 as OS, iA as yS, jE as fS, eM as RS, i as mS, jo as PS, j as NS, bf as MS, bx as LS, hg as hS, c3 as FS, a$ as US, b0 as bS, jd as BS, hy as kS, dg as vS, g$ as VS, ca as GS, aN as jS, aL as HS, bk as KS, bz as YS, g2 as WS, g0 as wS, g3 as xS, g1 as XS, j8 as zS, aW as qS, j9 as ZS, cb as JS, bd as QS, jl as $S, aM as ap, gM as ep, bi as sp, lm as tp, b1 as ip, hj as op, gw as rp, ia as np, gd as lp, jF as Tp, jk as gp, b2 as Sp, iQ as pp, js as dp, jD as Ep, jr as _p, c9 as cp, gg as Ap, le as Ip, fq as up, c8 as Cp, bs as Dp, aS as Op, aU as yp, fI as fp, kz as Rp, fT as mp, aV as Pp, jc as Np, fS as Mp, bA as Lp, aP as hp, eP as Fp, gF as Up, gE as bp, lg as Bp, eO as kp, eQ as vp, df as Vp, bc as Gp, u as jp, da as Hp, dc as Kp, f2 as Yp, cJ as Wp, lt as wp, b3 as xp, lu as Xp, ls as zp, k9 as qp, jh as Zp, bt as Jp, b9 as Qp, bv as $p, k6 as ad, lr as ed, cM as sd, cr as td, bu as id, b7 as od, cO as rd, cI as nd, ke as ld, aX as Td, cL as gd, kf as Sd, cK as pd, j4 as dd, j2 as Ed, iS as _d, i$ as cd, iY as Ad, j3 as Id, iP as ud, iO as Cd, iR as Dd, iX as Od, iV as yd, iU as fd, i_ as Rd, iT as md, bP as Pd, bQ as Nd, iW as Md, iZ as Ld, j5 as hd, je as Fd, kh as Ud, jg as bd } from "./@code-editor-CjYMh-FJ.js";
|
2
|
+
import { H as kd, R as vd, c as Vd, g as Gd, a as jd, b as Hd } from "./@common-rjsf-Bja24NFK.js";
|
3
3
|
export {
|
4
4
|
s as ACCESS_TYPE_MAP,
|
5
5
|
t as ACTION_STATE,
|
@@ -498,6 +498,7 @@ export {
|
|
498
498
|
gl as compareObjectLength,
|
499
499
|
Sl as configMapDataTypeOptions,
|
500
500
|
pl as configMapSecretMountDataMap,
|
501
|
+
Vd as conformPathToPointers,
|
501
502
|
dl as convertDeploymentChartListToChartType,
|
502
503
|
El as convertJSONPointerToJSONPath,
|
503
504
|
_l as convertKeyValuePairToYAML,
|
@@ -590,7 +591,7 @@ export {
|
|
590
591
|
zT as getHistoryItemStatusIconFromWorkflowStages,
|
591
592
|
qT as getIconFromWorkflowStageStatusType,
|
592
593
|
ZT as getIframeWithDefaultAttributes,
|
593
|
-
|
594
|
+
Gd as getInferredTypeFromValueType,
|
594
595
|
JT as getInvalidActionMessage,
|
595
596
|
QT as getInvalidTippyContent,
|
596
597
|
$T as getIsApprovalPolicyConfigured,
|
@@ -619,12 +620,13 @@ export {
|
|
619
620
|
Og as getPolicyApiUrl,
|
620
621
|
yg as getProgressingStateForStatus,
|
621
622
|
fg as getRandomColor,
|
622
|
-
|
623
|
+
jd as getRedirectionProps,
|
623
624
|
Rg as getRegexMatchPositions,
|
624
625
|
mg as getResolvedDeploymentTemplate,
|
625
626
|
Pg as getResourceApiUrl,
|
626
627
|
Ng as getResourceGroupListRaw,
|
627
628
|
Mg as getSanitizedIframe,
|
629
|
+
Hd as getSchemaPathToUpdatePathMap,
|
628
630
|
Lg as getSecretDataTypeOptions,
|
629
631
|
hg as getSecurityConfig,
|
630
632
|
Fg as getSecurityScan,
|
package/package.json
CHANGED
@@ -1,519 +0,0 @@
|
|
1
|
-
import { j as t, J as P } from "./@vendor-CIA81cZg.js";
|
2
|
-
import R, { forwardRef as $ } from "react";
|
3
|
-
import L, { getDefaultRegistry as D } from "@rjsf/core";
|
4
|
-
import { T as v, c as H, a as U, i as k, b as y, d as S, S as J } from "./@code-editor-CAqkBpY7.js";
|
5
|
-
import M, { components as A } from "react-select";
|
6
|
-
import { ReactComponent as V } from "./assets/ic-chevron-down.fc70d7a7.svg";
|
7
|
-
import { getUiOptions as C, getTemplate as B, getSubmitButtonOptions as W, ADDITIONAL_PROPERTY_FLAG as I, errorId as q, englishStringTranslator as K, TranslatableString as Y, titleId as z, canExpand as G, deepEquals as Q } from "@rjsf/utils";
|
8
|
-
import { ReactComponent as X } from "./assets/ic-add.cfaa779b.svg";
|
9
|
-
import { ReactComponent as Z } from "./assets/ic-cross.01e03666.svg";
|
10
|
-
import { ReactComponent as ee } from "./assets/ic-warning.ecf7ff97.svg";
|
11
|
-
import './assets/@common-rjsf.css';const N = {
|
12
|
-
SELECT: "Please select an option",
|
13
|
-
INPUT: "Please enter an input",
|
14
|
-
OBJECT_KEY: "Please enter a value for the key"
|
15
|
-
}, te = "Key not available", Pe = {
|
16
|
-
"ui:submitButtonOptions": {
|
17
|
-
norender: !0
|
18
|
-
}
|
19
|
-
}, b = ({
|
20
|
-
showLabel: n,
|
21
|
-
label: e,
|
22
|
-
required: s,
|
23
|
-
children: a,
|
24
|
-
id: r,
|
25
|
-
rawDescription: o,
|
26
|
-
shouldAlignCenter: i = !0
|
27
|
-
}) => /* @__PURE__ */ t.jsxs(
|
28
|
-
"div",
|
29
|
-
{
|
30
|
-
className: n ? `display-grid dc__gap-12 rjsf-form-template__field ${i ? "flex-align-center" : ""}` : "",
|
31
|
-
children: [
|
32
|
-
n && /* @__PURE__ */ t.jsxs("label", { className: "cn-7 fs-13 lh-20 fw-4 flexbox mb-0", htmlFor: r, children: [
|
33
|
-
/* @__PURE__ */ t.jsx(v, { alwaysShowTippyOnHover: !!o, content: o, children: /* @__PURE__ */ t.jsx("span", { className: `dc__ellipsis-right ${o ? "text-underline-dashed-300" : ""}`, children: e || te }) }),
|
34
|
-
s && /* @__PURE__ */ t.jsx("span", { className: "cr-5", children: " *" })
|
35
|
-
] }),
|
36
|
-
a
|
37
|
-
]
|
38
|
-
}
|
39
|
-
), F = ({ label: n, canAdd: e, onAddClick: s, disabled: a, readonly: r, uiSchema: o, registry: i }) => {
|
40
|
-
const {
|
41
|
-
ButtonTemplates: { AddButton: c }
|
42
|
-
} = i.templates;
|
43
|
-
return e && /* @__PURE__ */ t.jsx(
|
44
|
-
c,
|
45
|
-
{
|
46
|
-
label: n,
|
47
|
-
onClick: s,
|
48
|
-
disabled: a || r,
|
49
|
-
uiSchema: o,
|
50
|
-
registry: i
|
51
|
-
}
|
52
|
-
);
|
53
|
-
}, ne = ({
|
54
|
-
canAdd: n,
|
55
|
-
className: e,
|
56
|
-
disabled: s,
|
57
|
-
idSchema: a,
|
58
|
-
uiSchema: r,
|
59
|
-
items: o,
|
60
|
-
onAddClick: i,
|
61
|
-
readonly: c,
|
62
|
-
registry: l,
|
63
|
-
required: d,
|
64
|
-
title: x
|
65
|
-
}) => {
|
66
|
-
const p = C(r), h = B("ArrayFieldItemTemplate", l, p), u = p.title || x;
|
67
|
-
return /* @__PURE__ */ t.jsx("fieldset", { className: e, id: a.$id, children: o.length ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
68
|
-
o.map(({ key: j, ..._ }, f) => {
|
69
|
-
const m = {
|
70
|
-
..._.children,
|
71
|
-
props: {
|
72
|
-
..._.children.props
|
73
|
-
}
|
74
|
-
};
|
75
|
-
return /* @__PURE__ */ t.jsx(h, { ..._, children: m }, j);
|
76
|
-
}),
|
77
|
-
/* @__PURE__ */ t.jsx(
|
78
|
-
F,
|
79
|
-
{
|
80
|
-
label: u,
|
81
|
-
canAdd: n,
|
82
|
-
onAddClick: i,
|
83
|
-
disabled: s,
|
84
|
-
readonly: c,
|
85
|
-
uiSchema: r,
|
86
|
-
registry: l
|
87
|
-
}
|
88
|
-
)
|
89
|
-
] }) : /* @__PURE__ */ t.jsx(b, { label: u, required: d, showLabel: !0, id: a.$id, children: /* @__PURE__ */ t.jsx(
|
90
|
-
F,
|
91
|
-
{
|
92
|
-
label: u,
|
93
|
-
canAdd: n,
|
94
|
-
onAddClick: i,
|
95
|
-
disabled: s,
|
96
|
-
readonly: c,
|
97
|
-
uiSchema: r,
|
98
|
-
registry: l
|
99
|
-
}
|
100
|
-
) }) });
|
101
|
-
}, se = ({
|
102
|
-
children: n,
|
103
|
-
disabled: e,
|
104
|
-
hasToolbar: s,
|
105
|
-
hasRemove: a,
|
106
|
-
index: r,
|
107
|
-
onDropIndexClick: o,
|
108
|
-
readonly: i,
|
109
|
-
registry: c,
|
110
|
-
uiSchema: l
|
111
|
-
}) => {
|
112
|
-
const { RemoveButton: d } = c.templates.ButtonTemplates;
|
113
|
-
return /* @__PURE__ */ t.jsxs("div", { className: "dc__position-rel display-grid rjsf-form-template__array-field-item flex-align-center", children: [
|
114
|
-
n,
|
115
|
-
/* @__PURE__ */ t.jsx("div", { className: "dc__position-abs remove-btn__container", style: { right: "-28px", top: "9px" }, children: s && a && /* @__PURE__ */ t.jsx(
|
116
|
-
d,
|
117
|
-
{
|
118
|
-
disabled: e || i,
|
119
|
-
onClick: o(r),
|
120
|
-
uiSchema: l,
|
121
|
-
registry: c
|
122
|
-
}
|
123
|
-
) })
|
124
|
-
] });
|
125
|
-
}, {
|
126
|
-
templates: { BaseInputTemplate: ae }
|
127
|
-
} = D(), re = ({ placeholder: n, ...e }) => /* @__PURE__ */ t.jsx(
|
128
|
-
ae,
|
129
|
-
{
|
130
|
-
placeholder: n || N.INPUT,
|
131
|
-
...e,
|
132
|
-
className: "form__input cn-9 fs-13 lh-20 fw-4"
|
133
|
-
}
|
134
|
-
), E = ({
|
135
|
-
label: n,
|
136
|
-
icon: e,
|
137
|
-
iconType: s,
|
138
|
-
registry: a,
|
139
|
-
uiSchema: r,
|
140
|
-
...o
|
141
|
-
}) => {
|
142
|
-
const i = `Add ${n}`;
|
143
|
-
return /* @__PURE__ */ t.jsx("div", { className: "flexbox flex-justify-start", children: /* @__PURE__ */ t.jsxs(
|
144
|
-
"button",
|
145
|
-
{
|
146
|
-
...o,
|
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__ */ t.jsx(X, { className: "icon-dim-16 fcb-5" }),
|
152
|
-
/* @__PURE__ */ t.jsx(v, { placement: "right", content: i, children: /* @__PURE__ */ t.jsx("span", { className: "cb-5 fs-13 lh-34 dc__truncate", children: i }) })
|
153
|
-
]
|
154
|
-
}
|
155
|
-
) });
|
156
|
-
}, oe = ({ icon: n, iconType: e, registry: s, uiSchema: a, ...r }) => /* @__PURE__ */ t.jsx("button", { ...r, type: "button", className: "dc__outline-none-imp p-0 dc__transparent flex cursor", title: "Remove", children: /* @__PURE__ */ t.jsx(Z, { className: "icon-dim-16 fcn-6" }) }), ie = ({ uiSchema: n }) => {
|
157
|
-
const { submitText: e, norender: s, props: a = {} } = W(n);
|
158
|
-
return s ? null : /* @__PURE__ */ t.jsx("div", { className: "flexbox flex-justify-end", children: /* @__PURE__ */ t.jsx("button", { type: "submit", ...a, className: `cta ${a.className || ""}`, children: e }) });
|
159
|
-
}, w = ({
|
160
|
-
id: n,
|
161
|
-
title: e,
|
162
|
-
required: s,
|
163
|
-
description: a
|
164
|
-
}) => /* @__PURE__ */ t.jsxs("legend", { className: "fs-13 fw-6 cn-9 lh-20 dc__no-border pb-9 mb-0", id: n, children: [
|
165
|
-
/* @__PURE__ */ t.jsx(v, { alwaysShowTippyOnHover: !!a, content: a, children: /* @__PURE__ */ t.jsx("span", { className: `${a ? "text-underline-dashed-300" : ""}`, children: e }) }),
|
166
|
-
s && /* @__PURE__ */ t.jsx("span", { className: "cr-5", children: " *" })
|
167
|
-
] }), le = (n) => {
|
168
|
-
const {
|
169
|
-
id: e,
|
170
|
-
label: s,
|
171
|
-
children: a,
|
172
|
-
errors: r,
|
173
|
-
hidden: o,
|
174
|
-
required: i,
|
175
|
-
displayLabel: c,
|
176
|
-
registry: l,
|
177
|
-
uiSchema: d,
|
178
|
-
classNames: x,
|
179
|
-
schema: p,
|
180
|
-
rawDescription: h
|
181
|
-
} = n, u = C(d), j = B(
|
182
|
-
"WrapIfAdditionalTemplate",
|
183
|
-
l,
|
184
|
-
u
|
185
|
-
), _ = I in p, f = (c || p.type === "boolean") && !_, m = p.type === "array";
|
186
|
-
return o ? /* @__PURE__ */ t.jsx("div", { className: "hidden", children: a }) : (
|
187
|
-
// NOTE: need to override the margins of default rjsf css
|
188
|
-
/* @__PURE__ */ t.jsxs("div", { className: `${x} mb-0`, children: [
|
189
|
-
m && /* @__PURE__ */ t.jsx(
|
190
|
-
w,
|
191
|
-
{
|
192
|
-
id: e,
|
193
|
-
title: s,
|
194
|
-
required: i,
|
195
|
-
registry: l,
|
196
|
-
uiSchema: d,
|
197
|
-
schema: p,
|
198
|
-
description: h
|
199
|
-
}
|
200
|
-
),
|
201
|
-
/* @__PURE__ */ t.jsx(
|
202
|
-
b,
|
203
|
-
{
|
204
|
-
label: s,
|
205
|
-
showLabel: f,
|
206
|
-
id: e,
|
207
|
-
required: i,
|
208
|
-
rawDescription: h,
|
209
|
-
children: /* @__PURE__ */ t.jsx(j, { ...n, children: a })
|
210
|
-
}
|
211
|
-
),
|
212
|
-
r
|
213
|
-
] })
|
214
|
-
);
|
215
|
-
}, ce = ({ errors: n = [], idSchema: e }) => {
|
216
|
-
const s = q(e);
|
217
|
-
return n.length > 0 && /* @__PURE__ */ t.jsx("span", { className: "display-grid rjsf-form-template__field--error dc__gap-12", id: s, children: n.filter((a) => !!a).map((a, r) => /* @__PURE__ */ t.jsxs(R.Fragment, { children: [
|
218
|
-
/* @__PURE__ */ t.jsx("span", {}),
|
219
|
-
/* @__PURE__ */ t.jsxs("span", { className: "form__error", children: [
|
220
|
-
/* @__PURE__ */ t.jsx(ee, { className: "form__icon form__icon--error" }),
|
221
|
-
a
|
222
|
-
] })
|
223
|
-
] }, r)) });
|
224
|
-
}, de = (n, e) => {
|
225
|
-
switch (n) {
|
226
|
-
case Y.NewStringDefault:
|
227
|
-
return "";
|
228
|
-
default:
|
229
|
-
return K(n, e);
|
230
|
-
}
|
231
|
-
}, Re = (n) => {
|
232
|
-
try {
|
233
|
-
const e = new URL(n).origin === window.location.origin;
|
234
|
-
return {
|
235
|
-
href: n,
|
236
|
-
target: e ? "_self" : "_blank",
|
237
|
-
rel: e ? void 0 : "external noreferrer",
|
238
|
-
url: n
|
239
|
-
};
|
240
|
-
} catch {
|
241
|
-
return {
|
242
|
-
href: n,
|
243
|
-
target: "_blank",
|
244
|
-
url: `${n} (Invalid URL)`
|
245
|
-
};
|
246
|
-
}
|
247
|
-
}, $e = (n) => {
|
248
|
-
const e = typeof n;
|
249
|
-
switch (e) {
|
250
|
-
case "boolean":
|
251
|
-
case "string":
|
252
|
-
case "number":
|
253
|
-
return e;
|
254
|
-
case "object":
|
255
|
-
return Array.isArray(n) ? "array" : n === null ? "null" : e;
|
256
|
-
default:
|
257
|
-
return "null";
|
258
|
-
}
|
259
|
-
}, T = (n) => {
|
260
|
-
if (!n)
|
261
|
-
return "";
|
262
|
-
const e = n.trim();
|
263
|
-
return e.match(/^\w+(\/\w+)*$/g) ? `/${e}` : e.match(/^\w+(\.\w+)*$/g) ? `/${e.replaceAll(/\./g, "/")}` : e;
|
264
|
-
}, O = {
|
265
|
-
value: !1,
|
266
|
-
path: ""
|
267
|
-
}, pe = (n) => {
|
268
|
-
if (!n)
|
269
|
-
return null;
|
270
|
-
const e = structuredClone(n);
|
271
|
-
return typeof e == "string" ? {
|
272
|
-
value: !0,
|
273
|
-
path: T(e)
|
274
|
-
} : typeof e != "object" ? structuredClone(O) : Object.hasOwn(e, "condition") && "condition" in e && Object.hasOwn(e, "value") && "value" in e ? {
|
275
|
-
value: e.condition,
|
276
|
-
path: T(e.value)
|
277
|
-
} : Object.hasOwn(e, "value") && "value" in e && Object.hasOwn(e, "path") && "path" in e ? {
|
278
|
-
value: e.value,
|
279
|
-
path: T(e.path)
|
280
|
-
} : structuredClone(O);
|
281
|
-
}, me = ({
|
282
|
-
disabled: n,
|
283
|
-
formData: e,
|
284
|
-
idSchema: s,
|
285
|
-
onAddClick: a,
|
286
|
-
properties: r,
|
287
|
-
readonly: o,
|
288
|
-
registry: i,
|
289
|
-
required: c,
|
290
|
-
schema: l,
|
291
|
-
title: d,
|
292
|
-
uiSchema: x,
|
293
|
-
formContext: p
|
294
|
-
}) => {
|
295
|
-
const h = !!l.additionalProperties, u = G(l, x, e) && /* @__PURE__ */ t.jsx(
|
296
|
-
E,
|
297
|
-
{
|
298
|
-
label: d,
|
299
|
-
className: "object-property-expand",
|
300
|
-
onClick: a(l),
|
301
|
-
disabled: n || o,
|
302
|
-
uiSchema: x,
|
303
|
-
registry: i
|
304
|
-
}
|
305
|
-
), j = r.filter((_) => {
|
306
|
-
const f = l.properties?.[_.name]?.hidden;
|
307
|
-
if (!f)
|
308
|
-
return !0;
|
309
|
-
try {
|
310
|
-
const m = pe(f);
|
311
|
-
if (!m.path)
|
312
|
-
throw new Error("Empty path property of hidden descriptor field");
|
313
|
-
if (!m.path.match(/^\/\w+(\/\w+)*$/g))
|
314
|
-
throw new Error("Provided path is not a valid JSON pointer");
|
315
|
-
const g = P({
|
316
|
-
path: H(m.path),
|
317
|
-
json: p
|
318
|
-
})?.[0];
|
319
|
-
return !(g === void 0 || Q(m.value, g));
|
320
|
-
} catch {
|
321
|
-
return !0;
|
322
|
-
}
|
323
|
-
}).sort((_) => l.properties?.[_.name]?.type === "boolean" ? -1 : 1).map((_) => _.content);
|
324
|
-
return h ? r.length ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
325
|
-
/* @__PURE__ */ t.jsx(
|
326
|
-
b,
|
327
|
-
{
|
328
|
-
label: d,
|
329
|
-
required: c,
|
330
|
-
showLabel: !0,
|
331
|
-
id: s.$id,
|
332
|
-
shouldAlignCenter: !1,
|
333
|
-
children: /* @__PURE__ */ t.jsx("div", { children: j })
|
334
|
-
}
|
335
|
-
),
|
336
|
-
u
|
337
|
-
] }) : /* @__PURE__ */ t.jsx(b, { label: d, required: c, showLabel: !0, id: s.$id, children: u }) : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
338
|
-
j,
|
339
|
-
u
|
340
|
-
] });
|
341
|
-
}, ue = (n) => {
|
342
|
-
const { idSchema: e, registry: s, required: a, schema: r, title: o, uiSchema: i, description: c } = n, l = !!r.additionalProperties, d = o && !l;
|
343
|
-
return /* @__PURE__ */ t.jsxs("fieldset", { id: e.$id, children: [
|
344
|
-
d && /* @__PURE__ */ t.jsx(
|
345
|
-
w,
|
346
|
-
{
|
347
|
-
id: z(e),
|
348
|
-
title: o,
|
349
|
-
required: a,
|
350
|
-
schema: r,
|
351
|
-
uiSchema: i,
|
352
|
-
registry: s,
|
353
|
-
description: c
|
354
|
-
}
|
355
|
-
),
|
356
|
-
/* @__PURE__ */ t.jsx(
|
357
|
-
"div",
|
358
|
-
{
|
359
|
-
className: `${r.properties && !l && e.$id !== "root" ? "dc__border-left pl-12" : ""} ${e.$id === "root" ? "dc__separated-flexbox dc__separated-flexbox--vertical" : "flexbox-col dc__gap-8"}`,
|
360
|
-
children: /* @__PURE__ */ t.jsx(me, { ...n })
|
361
|
-
}
|
362
|
-
)
|
363
|
-
] });
|
364
|
-
}, he = ({
|
365
|
-
id: n,
|
366
|
-
disabled: e,
|
367
|
-
label: s,
|
368
|
-
onKeyChange: a,
|
369
|
-
onDropPropertyClick: r,
|
370
|
-
readonly: o,
|
371
|
-
schema: i,
|
372
|
-
children: c,
|
373
|
-
uiSchema: l,
|
374
|
-
registry: d
|
375
|
-
}) => {
|
376
|
-
const { templates: x } = d, { RemoveButton: p } = x.ButtonTemplates, h = I in i;
|
377
|
-
return /* @__PURE__ */ t.jsx(t.Fragment, { children: h ? /* @__PURE__ */ t.jsxs("div", { className: "dc__position-rel rjsf-form-template__additional-fields display-grid dc__gap-8 flex-align-center", children: [
|
378
|
-
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
379
|
-
"input",
|
380
|
-
{
|
381
|
-
type: "text",
|
382
|
-
className: "form__input cn-9 fs-13 lh-20 fw-4",
|
383
|
-
id: `${n}-key`,
|
384
|
-
onBlur: (u) => a(u.target.value),
|
385
|
-
placeholder: N.OBJECT_KEY,
|
386
|
-
defaultValue: s
|
387
|
-
}
|
388
|
-
) }),
|
389
|
-
/* @__PURE__ */ t.jsx("div", { children: c }),
|
390
|
-
/* @__PURE__ */ t.jsx("div", { className: "dc__position-abs remove-btn__container", style: { right: "-28px", top: "9px" }, children: /* @__PURE__ */ t.jsx(
|
391
|
-
p,
|
392
|
-
{
|
393
|
-
disabled: e || o,
|
394
|
-
onClick: r(s),
|
395
|
-
uiSchema: l,
|
396
|
-
registry: d
|
397
|
-
}
|
398
|
-
) })
|
399
|
-
] }) : c });
|
400
|
-
}, fe = ({
|
401
|
-
id: n,
|
402
|
-
onChange: e,
|
403
|
-
value: s,
|
404
|
-
required: a,
|
405
|
-
disabled: r,
|
406
|
-
readonly: o,
|
407
|
-
autofocus: i,
|
408
|
-
onBlur: c,
|
409
|
-
onFocus: l
|
410
|
-
}) => {
|
411
|
-
const d = (p, h) => {
|
412
|
-
const { id: u, checked: j } = p.target;
|
413
|
-
h === "blur" ? c(u, j) : h === "focus" && l(u, j);
|
414
|
-
}, x = k(s) ? !1 : s;
|
415
|
-
return /* @__PURE__ */ t.jsxs("div", { children: [
|
416
|
-
/* @__PURE__ */ t.jsx(
|
417
|
-
U,
|
418
|
-
{
|
419
|
-
selected: x,
|
420
|
-
onSelect: e,
|
421
|
-
id: n,
|
422
|
-
name: n,
|
423
|
-
required: a,
|
424
|
-
disabled: r || o,
|
425
|
-
autoFocus: i,
|
426
|
-
rootClassName: "w-32 mb-0 dc__height-inherit",
|
427
|
-
onBlur: (p) => d(p, "blur"),
|
428
|
-
onFocus: (p) => d(p, "focus")
|
429
|
-
}
|
430
|
-
),
|
431
|
-
/* @__PURE__ */ t.jsx("span", { className: "dc__capitalize ml-8", children: x.toString() })
|
432
|
-
] });
|
433
|
-
}, xe = ({ children: n, ...e }) => /* @__PURE__ */ t.jsx(A.MenuList, { ...e, children: Array.isArray(n) ? n.slice(0, 20) : n }), _e = (n) => /* @__PURE__ */ t.jsx(A.DropdownIndicator, { ...n, children: /* @__PURE__ */ t.jsx(V, { className: "icon-dim-20 icon-n5", "data-testid": "overview-project-edit-dropdown" }) }), je = (n) => {
|
434
|
-
const {
|
435
|
-
id: e,
|
436
|
-
multiple: s = !1,
|
437
|
-
options: a,
|
438
|
-
value: r,
|
439
|
-
disabled: o,
|
440
|
-
readonly: i,
|
441
|
-
autofocus: c = !1,
|
442
|
-
onChange: l,
|
443
|
-
onBlur: d,
|
444
|
-
onFocus: x,
|
445
|
-
placeholder: p
|
446
|
-
} = n, { enumOptions: h = [] } = a, u = s ? [] : "", j = (f) => {
|
447
|
-
l(s ? f.map((m) => m.value) : f.value);
|
448
|
-
}, _ = (f) => s ? h.filter((m) => f.some((g) => S(g, m.value))) : h.find((m) => S(f, m.value));
|
449
|
-
return /* @__PURE__ */ t.jsx(
|
450
|
-
M,
|
451
|
-
{
|
452
|
-
id: e,
|
453
|
-
name: e,
|
454
|
-
isMulti: s,
|
455
|
-
value: typeof r > "u" ? u : _(r),
|
456
|
-
autoFocus: c,
|
457
|
-
onChange: j,
|
458
|
-
options: h,
|
459
|
-
onBlur: () => d(e, r),
|
460
|
-
onFocus: () => x(e, r),
|
461
|
-
placeholder: p || N.SELECT,
|
462
|
-
isDisabled: o || i,
|
463
|
-
styles: {
|
464
|
-
...y,
|
465
|
-
control: (f, m) => ({
|
466
|
-
...y.control(f, m),
|
467
|
-
minHeight: "36px"
|
468
|
-
}),
|
469
|
-
multiValue: (f, m) => ({
|
470
|
-
...y.multiValue(f, m),
|
471
|
-
margin: "2px 8px 2px 2px"
|
472
|
-
})
|
473
|
-
},
|
474
|
-
components: {
|
475
|
-
IndicatorSeparator: null,
|
476
|
-
DropdownIndicator: _e,
|
477
|
-
MenuList: xe
|
478
|
-
},
|
479
|
-
menuPlacement: "auto"
|
480
|
-
}
|
481
|
-
);
|
482
|
-
}, ge = {
|
483
|
-
CheckboxWidget: fe,
|
484
|
-
SelectWidget: je
|
485
|
-
}, be = {
|
486
|
-
ArrayFieldItemTemplate: se,
|
487
|
-
ArrayFieldTemplate: ne,
|
488
|
-
BaseInputTemplate: re,
|
489
|
-
ButtonTemplates: { AddButton: E, RemoveButton: oe, SubmitButton: ie },
|
490
|
-
FieldTemplate: le,
|
491
|
-
FieldErrorTemplate: ce,
|
492
|
-
ObjectFieldTemplate: ue,
|
493
|
-
TitleFieldTemplate: w,
|
494
|
-
WrapIfAdditionalTemplate: he
|
495
|
-
}, ye = L, Te = J, Le = $((n, e) => /* @__PURE__ */ t.jsx(
|
496
|
-
ye,
|
497
|
-
{
|
498
|
-
noHtml5Validate: !0,
|
499
|
-
showErrorList: !1,
|
500
|
-
autoComplete: "off",
|
501
|
-
...n,
|
502
|
-
className: `rjsf-form-template__container ${n.className || ""}`,
|
503
|
-
validator: Te,
|
504
|
-
templates: {
|
505
|
-
...be,
|
506
|
-
...n.templates
|
507
|
-
},
|
508
|
-
formContext: n.formData,
|
509
|
-
widgets: { ...ge, ...n.widgets },
|
510
|
-
translateString: de,
|
511
|
-
ref: e
|
512
|
-
}
|
513
|
-
));
|
514
|
-
export {
|
515
|
-
Pe as H,
|
516
|
-
Le as R,
|
517
|
-
Re as a,
|
518
|
-
$e as g
|
519
|
-
};
|