@devtron-labs/devtron-fe-common-lib 0.0.55-beta-1 → 0.0.55-beta-3
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/{CodeEditor-0a5bfd53.js → CodeEditor-3c2aaef5.js} +11082 -11082
- package/dist/Common/AddCDButton/AddCDButton.js +24 -24
- package/dist/Common/AppStatus/AppStatus.js +16 -16
- package/dist/Common/BreadCrumb/BreadCrumb.js +43 -43
- package/dist/Common/BreadCrumb/BreadcrumbStore.js +9 -9
- package/dist/Common/ChartVersionAndTypeSelector.js +42 -42
- package/dist/Common/Checkbox.js +8 -8
- package/dist/Common/ClipboardButton/ClipboardButton.js +17 -17
- package/dist/Common/ClipboardButton/__tests__/ClipboardButton.test.js +10 -10
- package/dist/Common/CodeEditor/CodeEditor.js +4 -4
- package/dist/Common/Common.service.js +1 -1
- package/dist/Common/CustomInput/CustomInput.js +56 -56
- package/dist/Common/CustomTagSelector/PropagateTagInfo.js +22 -22
- package/dist/Common/CustomTagSelector/ResizableTagTextArea.js +22 -22
- package/dist/Common/CustomTagSelector/TagDetails.js +33 -33
- package/dist/Common/CustomTagSelector/TagLabelSelect.js +33 -33
- package/dist/Common/CustomTagSelector/TagLabelValueSelector.js +83 -83
- package/dist/Common/DebouncedSearch/DebouncedSearch.js +24 -24
- package/dist/Common/DebouncedSearch/__tests__/DebouncedSearch.test.js +16 -16
- package/dist/Common/DeleteComponentModal/DeleteComponent.js +49 -49
- package/dist/Common/DevtronProgressing/DevtronProgressing.js +2 -2
- package/dist/Common/Dialogs/ConfirmationDialog.js +14 -14
- package/dist/Common/Dialogs/DeleteDialog.js +24 -24
- package/dist/Common/Dialogs/DialogForm.js +21 -21
- package/dist/Common/Dialogs/ForceDeleteDialog.js +12 -12
- package/dist/Common/DraggableWrapper/DraggableButton.js +6 -6
- package/dist/Common/DraggableWrapper/DraggableWrapper.js +42 -1468
- package/dist/Common/Drawer/Drawer.js +6 -6
- package/dist/Common/EmptyState/EmptyState.js +19 -19
- package/dist/Common/EmptyState/GenericEmptyState.js +25 -25
- package/dist/Common/Error.js +6 -6
- package/dist/Common/ErrorScreenNotFound.js +3 -3
- package/dist/Common/Grid/Grid.js +11 -11
- package/dist/Common/Helper.js +3 -3
- package/dist/Common/Hooks/UseSuperAdmin/UseSuperAdmin.js +1 -1
- package/dist/Common/ImageTags.js +224 -221
- package/dist/Common/InfoColorBar/InfoColourbar.js +37 -37
- package/dist/Common/Modals/Modal.js +8 -8
- package/dist/Common/Modals/OpaqueModal.js +13 -13
- package/dist/Common/Modals/VisibleModal.js +3 -3
- package/dist/Common/Modals/VisibleModal2.js +8 -8
- package/dist/Common/MultiSelectCustomization.js +45 -45
- package/dist/Common/Pagination/PageSizeSelector.js +37 -34
- package/dist/Common/Pagination/Pagination.js +60 -57
- package/dist/Common/PopupMenu.js +32 -32
- package/dist/Common/Progressing.js +20 -20
- package/dist/Common/RJSF/Form.js +14 -9877
- package/dist/Common/RJSF/common/FieldRow.js +16 -16
- package/dist/Common/RJSF/config.js +3 -3
- package/dist/Common/RJSF/templates/ArrayFieldItemTemplate.js +13 -13
- package/dist/Common/RJSF/templates/ArrayFieldTemplate.js +37 -40
- package/dist/Common/RJSF/templates/BaseInput.js +14 -6
- package/dist/Common/RJSF/templates/ButtonTemplates/AddButton.js +6 -6
- package/dist/Common/RJSF/templates/ButtonTemplates/RemoveButton.js +3 -3
- package/dist/Common/RJSF/templates/ButtonTemplates/SubmitButton.js +6 -8
- package/dist/Common/RJSF/templates/Description.js +6 -6
- package/dist/Common/RJSF/templates/Field.js +12 -15
- package/dist/Common/RJSF/templates/FieldErrorTemplate.js +8 -10
- package/dist/Common/RJSF/templates/ObjectFieldTemplate.js +35 -40
- package/dist/Common/RJSF/templates/TitleField.js +5 -5
- package/dist/Common/RJSF/templates/WrapIfAdditionalTemplate.js +23 -24
- package/dist/Common/RJSF/templates/index.js +3 -3
- package/dist/Common/RJSF/utils.js +9 -12
- package/dist/Common/RJSF/widgets/Checkbox.js +20 -20
- package/dist/Common/RJSF/widgets/Select.js +609 -40
- package/dist/Common/RadioGroup/RadioGroup.js +32 -32
- package/dist/Common/RadioGroup.js +17 -17
- package/dist/Common/Reload.js +10 -10
- package/dist/Common/ResizableTextarea.js +11 -11
- package/dist/Common/SearchBar/SearchBar.component.js +26 -26
- package/dist/Common/Security/ScanVulnerabilitiesTable.js +20 -20
- package/dist/Common/Select/Select.js +93 -93
- package/dist/Common/TippyCustomized.js +4 -4
- package/dist/Common/ToastBody.js +22 -22
- package/dist/Common/Toggle/Toggle.js +15 -15
- package/dist/Common/index.js +3 -3
- package/dist/{Helper-e1262739.js → Helper-a0caa238.js} +916 -916
- package/dist/TippyCustomized-7b9b46b9.js +124 -0
- package/dist/{_commonjsHelpers-c5d32002.js → _commonjsHelpers-aeeeeb92.js} +2 -2
- package/dist/{cssMode-c259da7f.js → cssMode-c5cae484.js} +1 -1
- package/dist/{freemarker2-d852fa33.js → freemarker2-b9a8615c.js} +1 -1
- package/dist/{handlebars-7e868cd0.js → handlebars-3803af36.js} +1 -1
- package/dist/{html-1faea799.js → html-498f0150.js} +1 -1
- package/dist/{htmlMode-175871d9.js → htmlMode-a8ae8cc5.js} +1 -1
- package/dist/index.js +3 -3
- package/dist/{javascript-46245cbe.js → javascript-4363ced3.js} +1 -1
- package/dist/{jsonMode-bbe5176f.js → jsonMode-80290b9e.js} +1 -1
- package/dist/jsx-runtime-0dcb030c.js +667 -0
- package/dist/{liquid-e6b820e1.js → liquid-1398df0a.js} +1 -1
- package/dist/{python-7d292338.js → python-dd2d43e8.js} +1 -1
- package/dist/{razor-c6ab49dd.js → razor-20a66096.js} +1 -1
- package/dist/{react-select.esm-27b8d563.js → react-select.esm-97f26847.js} +1280 -1112
- package/dist/{react-toastify.esm-e28f7200.js → react-toastify.esm-1042de65.js} +149 -155
- package/dist/{react.esm-5465a283.js → react.esm-2c92920f.js} +4929 -4393
- package/dist/{tippy-react.esm-d5c56a0a.js → tippy-react.esm-8dc66a75.js} +89 -89
- package/dist/{tsMode-4d1329d1.js → tsMode-3fa4eb6a.js} +1 -1
- package/dist/{typescript-402306e6.js → typescript-1bbaf605.js} +1 -1
- package/dist/{xml-8975e1f9.js → xml-a2693dbd.js} +1 -1
- package/dist/{yaml-680c02bf.js → yaml-01ce4fdd.js} +1 -1
- package/package.json +3 -12
- package/dist/BaseInput-8101e714.js +0 -1686
- package/dist/Common/UseWindowSize.d.ts +0 -4
- package/dist/Common/UseWindowSize.js +0 -20
- package/dist/TippyCustomized-c58fd46a.js +0 -124
- package/dist/canExpand-ab1f6741.js +0 -10
- package/dist/englishStringTranslator-2c9a30fc.js +0 -17
- package/dist/enums-d0bd3f97.js +0 -6618
- package/dist/getSubmitButtonOptions-a1be9bb0.js +0 -20
- package/dist/getTemplate-91d3260d.js +0 -11
- package/dist/getUiOptions-844b45a7.js +0 -10
- package/dist/idGenerators-0b33693c.js +0 -35
- package/dist/index-5a231705.js +0 -17417
- package/dist/index-c855d89c.js +0 -173
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { T as
|
|
3
|
-
import { AddCDPositions as
|
|
4
|
-
function
|
|
5
|
-
return e ? /* @__PURE__ */
|
|
6
|
-
/* @__PURE__ */ t("p", { className: "m-0 cn-0 fs-12 fw-6 lh-18", children: "Click to add" }),
|
|
1
|
+
import { j as t } from "../../jsx-runtime-0dcb030c.js";
|
|
2
|
+
import { T as o } from "../../tippy-react.esm-8dc66a75.js";
|
|
3
|
+
import { AddCDPositions as s } from "../Types.js";
|
|
4
|
+
function h({ tooltipContent: e }) {
|
|
5
|
+
return e ? /* @__PURE__ */ t.jsxs("div", { className: "dc__white-space-pre-wrap", children: [
|
|
6
|
+
/* @__PURE__ */ t.jsx("p", { className: "m-0 cn-0 fs-12 fw-6 lh-18", children: "Click to add" }),
|
|
7
7
|
e
|
|
8
|
-
] }) : /* @__PURE__ */ t("div", { className: "dc__white-space-pre-wrap", children: "Click to add here" });
|
|
8
|
+
] }) : /* @__PURE__ */ t.jsx("div", { className: "dc__white-space-pre-wrap", children: "Click to add here" });
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function f({
|
|
11
11
|
position: e,
|
|
12
|
-
addCDButtons:
|
|
13
|
-
endNode:
|
|
14
|
-
startNode:
|
|
15
|
-
handleAddCD:
|
|
16
|
-
tooltipContent:
|
|
12
|
+
addCDButtons: r,
|
|
13
|
+
endNode: n,
|
|
14
|
+
startNode: i,
|
|
15
|
+
handleAddCD: a,
|
|
16
|
+
tooltipContent: c
|
|
17
17
|
}) {
|
|
18
|
-
const d = e ===
|
|
19
|
-
|
|
18
|
+
const d = e === s.RIGHT ? n : i, l = () => {
|
|
19
|
+
a(e);
|
|
20
20
|
};
|
|
21
|
-
return
|
|
22
|
-
|
|
21
|
+
return r?.includes(e) ? /* @__PURE__ */ t.jsx(
|
|
22
|
+
o,
|
|
23
23
|
{
|
|
24
24
|
placement: "top",
|
|
25
|
-
content: /* @__PURE__ */ t(
|
|
25
|
+
content: /* @__PURE__ */ t.jsx(h, { tooltipContent: c }),
|
|
26
26
|
className: "default-tt",
|
|
27
27
|
arrow: !1,
|
|
28
|
-
children: /* @__PURE__ */
|
|
28
|
+
children: /* @__PURE__ */ t.jsxs(
|
|
29
29
|
"svg",
|
|
30
30
|
{
|
|
31
|
-
x: d.x + (e ===
|
|
31
|
+
x: d.x + (e === s.RIGHT ? -20 - 5 : d.width + 5),
|
|
32
32
|
y: d.y + d.height / 2 - 10,
|
|
33
33
|
width: "20",
|
|
34
34
|
height: "20",
|
|
@@ -36,11 +36,11 @@ function u({
|
|
|
36
36
|
fill: "none",
|
|
37
37
|
xmlns: "http://www.w3.org/2000/svg",
|
|
38
38
|
"data-testid": `add-cd-to-${e}`,
|
|
39
|
-
onClick:
|
|
39
|
+
onClick: l,
|
|
40
40
|
className: "dc__outline-none-imp",
|
|
41
41
|
children: [
|
|
42
|
-
/* @__PURE__ */ t("rect", { width: "20", height: "20", rx: "10", fill: "#664BEE", className: "add-cd-edge-btn" }),
|
|
43
|
-
/* @__PURE__ */ t(
|
|
42
|
+
/* @__PURE__ */ t.jsx("rect", { width: "20", height: "20", rx: "10", fill: "#664BEE", className: "add-cd-edge-btn" }),
|
|
43
|
+
/* @__PURE__ */ t.jsx(
|
|
44
44
|
"path",
|
|
45
45
|
{
|
|
46
46
|
d: "M6.5 10H13.5M10 6.5V13.5",
|
|
@@ -57,5 +57,5 @@ function u({
|
|
|
57
57
|
) : null;
|
|
58
58
|
}
|
|
59
59
|
export {
|
|
60
|
-
|
|
60
|
+
f as default
|
|
61
61
|
};
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { T as i } from "../../tippy-react.esm-
|
|
3
|
-
import { S as
|
|
4
|
-
import { StatusConstants as
|
|
5
|
-
import { triggerStatus as
|
|
6
|
-
function
|
|
1
|
+
import { j as e } from "../../jsx-runtime-0dcb030c.js";
|
|
2
|
+
import { T as i } from "../../tippy-react.esm-8dc66a75.js";
|
|
3
|
+
import { S as x } from "../../ic-info-outlined-8fa45e87.js";
|
|
4
|
+
import { StatusConstants as s, YET_TO_RUN as N } from "./constants.js";
|
|
5
|
+
import { triggerStatus as O } from "./utils.js";
|
|
6
|
+
function L({
|
|
7
7
|
appStatus: r,
|
|
8
8
|
isDeploymentStatus: m = !1,
|
|
9
9
|
isJobView: d = !1,
|
|
10
10
|
isVirtualEnv: o,
|
|
11
11
|
hideStatusMessage: f = !1
|
|
12
12
|
}) {
|
|
13
|
-
let
|
|
14
|
-
m && (
|
|
15
|
-
const c =
|
|
13
|
+
let t = r;
|
|
14
|
+
m && (t = O(r));
|
|
15
|
+
const c = t?.toLowerCase(), l = c === s.NOT_DEPLOYED.noSpaceLower, a = l ? s.NOT_DEPLOYED.lowerCase : c, _ = t || (o ? s.NOT_AVILABLE.normalCase : "-"), u = d ? N : s.NOT_DEPLOYED.normalCase, p = l ? u : _, n = () => a ? /* @__PURE__ */ e.jsx("span", { className: `dc__app-summary__icon icon-dim-16 ${a} ${a}--node` }) : o ? /* @__PURE__ */ e.jsx(
|
|
16
16
|
"span",
|
|
17
17
|
{
|
|
18
|
-
className: `dc__app-summary__icon icon-dim-16 ${
|
|
18
|
+
className: `dc__app-summary__icon icon-dim-16 ${s.NOT_DEPLOYED.lowerCase} ${s.NOT_DEPLOYED.lowerCase}--node`
|
|
19
19
|
}
|
|
20
|
-
) : /* @__PURE__ */ e(
|
|
20
|
+
) : /* @__PURE__ */ e.jsx(
|
|
21
21
|
i,
|
|
22
22
|
{
|
|
23
23
|
className: "default-tt w-200",
|
|
24
24
|
arrow: !1,
|
|
25
25
|
placement: "top",
|
|
26
26
|
content: "To fetch app status for GitOps based deployments open the app detail page",
|
|
27
|
-
children: /* @__PURE__ */ e(
|
|
27
|
+
children: /* @__PURE__ */ e.jsx(x, { className: "icon-dim-16 fcn-6" })
|
|
28
28
|
}
|
|
29
29
|
);
|
|
30
|
-
return f ? a || o ? /* @__PURE__ */ e(i, { className: "default-tt", arrow: !1, placement: "top", content: p, children: /* @__PURE__ */ e("div", { className: "flex", children: n() }) }) : n() : /* @__PURE__ */
|
|
31
|
-
/* @__PURE__ */ e("div", { className: "flex mr-6", children: n() }),
|
|
32
|
-
/* @__PURE__ */ e("p", { "data-testid": `${
|
|
30
|
+
return f ? a || o ? /* @__PURE__ */ e.jsx(i, { className: "default-tt", arrow: !1, placement: "top", content: p, children: /* @__PURE__ */ e.jsx("div", { className: "flex", children: n() }) }) : n() : /* @__PURE__ */ e.jsxs("div", { className: "flex left", children: [
|
|
31
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex mr-6", children: n() }),
|
|
32
|
+
/* @__PURE__ */ e.jsx("p", { "data-testid": `${t}-app-status`, className: "dc__truncate-text dc__first-letter-capitalize cn-6 m-0", children: p })
|
|
33
33
|
] });
|
|
34
34
|
}
|
|
35
35
|
export {
|
|
36
|
-
|
|
36
|
+
L as default
|
|
37
37
|
};
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { useRouteMatch as
|
|
4
|
-
import { useBreadcrumbContext as
|
|
5
|
-
import { C as
|
|
6
|
-
const
|
|
7
|
-
function
|
|
8
|
-
let
|
|
1
|
+
import { j as f } from "../../jsx-runtime-0dcb030c.js";
|
|
2
|
+
import d, { useEffect as b, useMemo as $ } from "react";
|
|
3
|
+
import { useRouteMatch as h, useParams as k, Link as v } from "react-router-dom";
|
|
4
|
+
import { useBreadcrumbContext as R } from "./BreadcrumbStore.js";
|
|
5
|
+
import { C as y } from "../../Helper-a0caa238.js";
|
|
6
|
+
const w = d.createContext(null);
|
|
7
|
+
function A(o, c) {
|
|
8
|
+
let p = o?.sep || "/";
|
|
9
9
|
c = c || [];
|
|
10
|
-
const { url:
|
|
11
|
-
|
|
10
|
+
const { url: x, path: m } = h(), t = k(), { state: e, setState: u } = R();
|
|
11
|
+
b(() => {
|
|
12
12
|
if (!(!o || !o.alias))
|
|
13
|
-
return u((a) => ({ ...a, alias: { ...a.alias, ...o.alias } })), () =>
|
|
13
|
+
return u((a) => ({ ...a, alias: { ...a.alias, ...o.alias } })), () => j(Object.keys(o.alias));
|
|
14
14
|
}, c);
|
|
15
|
-
function
|
|
16
|
-
u((
|
|
15
|
+
function _(a) {
|
|
16
|
+
u((s) => ({ ...s, alias: { ...s.alias, ...a } }));
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
const
|
|
20
|
-
u((
|
|
18
|
+
function j(a) {
|
|
19
|
+
const s = a.reduce((n, l, i) => (delete n[l], n), e.alias);
|
|
20
|
+
u((n) => ({ ...n, alias: s }));
|
|
21
21
|
}
|
|
22
|
-
let
|
|
23
|
-
const a = m.split("/").filter(Boolean),
|
|
24
|
-
return a.map((
|
|
25
|
-
const i = { to:
|
|
26
|
-
return
|
|
22
|
+
let C = $(() => {
|
|
23
|
+
const a = m.split("/").filter(Boolean), s = x.split("/").filter(Boolean);
|
|
24
|
+
return a.map((n, l) => {
|
|
25
|
+
const i = { to: s[l], name: n };
|
|
26
|
+
return n.startsWith(":") && t[n.replace(":", "")] && (i.className = "param"), i;
|
|
27
27
|
});
|
|
28
|
-
}, [m,
|
|
29
|
-
const { res:
|
|
30
|
-
(a,
|
|
31
|
-
const { res: l, prefix: i } = a, { to:
|
|
28
|
+
}, [m, x]);
|
|
29
|
+
const { res: B } = $(() => C.reduce(
|
|
30
|
+
(a, s, n) => {
|
|
31
|
+
const { res: l, prefix: i } = a, { to: N, name: r } = s;
|
|
32
32
|
return l.push({
|
|
33
|
-
to: !e.alias[r]?.component || e.alias[r]?.component && e.alias[r]?.linked ? `${i}${
|
|
33
|
+
to: !e.alias[r]?.component || e.alias[r]?.component && e.alias[r]?.linked ? `${i}${N}` : null,
|
|
34
34
|
name: typeof e.alias[r] == "object" ? e.alias[r]?.component ? e.alias[r].component : null : e.alias[r] || r,
|
|
35
|
-
className:
|
|
36
|
-
}), { res: l, prefix: `${i}${
|
|
35
|
+
className: s.className || ""
|
|
36
|
+
}), { res: l, prefix: `${i}${s.to}${p}` };
|
|
37
37
|
},
|
|
38
38
|
{ res: [], prefix: "/" }
|
|
39
|
-
), [
|
|
40
|
-
return { breadcrumbs:
|
|
39
|
+
), [C, e]);
|
|
40
|
+
return { breadcrumbs: B, setCrumb: _, resetCrumb: j };
|
|
41
41
|
}
|
|
42
|
-
const
|
|
42
|
+
const L = ({
|
|
43
43
|
breadcrumbs: o,
|
|
44
44
|
sep: c = "/",
|
|
45
|
-
className:
|
|
45
|
+
className: p = "dc__devtron-breadcrumb__item"
|
|
46
46
|
}) => {
|
|
47
|
-
const { url:
|
|
48
|
-
return /* @__PURE__ */ d
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
-
|
|
47
|
+
const { url: x } = h(), m = o.filter((t) => !!t.name);
|
|
48
|
+
return /* @__PURE__ */ f.jsx(d.Fragment, { children: m.map((t, e) => /* @__PURE__ */ f.jsxs(d.Fragment, { children: [
|
|
49
|
+
/* @__PURE__ */ f.jsx(
|
|
50
|
+
y,
|
|
51
51
|
{
|
|
52
52
|
condition: !!t.to,
|
|
53
|
-
wrap: (u) => /* @__PURE__ */
|
|
54
|
-
|
|
53
|
+
wrap: (u) => /* @__PURE__ */ f.jsx(
|
|
54
|
+
v,
|
|
55
55
|
{
|
|
56
|
-
className: `${
|
|
56
|
+
className: `${x === t.to ? "active" : ""} ${p} ${t.className || ""}`,
|
|
57
57
|
to: t.to,
|
|
58
58
|
children: u
|
|
59
59
|
}
|
|
@@ -61,11 +61,11 @@ const O = ({
|
|
|
61
61
|
children: t.name
|
|
62
62
|
}
|
|
63
63
|
),
|
|
64
|
-
e + 1 !== m.length && t.name && /* @__PURE__ */
|
|
64
|
+
e + 1 !== m.length && t.name && /* @__PURE__ */ f.jsx("span", { className: `${p}__separator cn-5`, children: c })
|
|
65
65
|
] }, e)) });
|
|
66
66
|
};
|
|
67
67
|
export {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
L as BreadCrumb,
|
|
69
|
+
w as BreadcrumbContext,
|
|
70
|
+
A as useBreadcrumb
|
|
71
71
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import n, { createContext as s, useState as
|
|
3
|
-
const
|
|
1
|
+
import { j as a } from "../../jsx-runtime-0dcb030c.js";
|
|
2
|
+
import n, { createContext as s, useState as u } from "react";
|
|
3
|
+
const c = {
|
|
4
4
|
alias: {}
|
|
5
|
-
},
|
|
6
|
-
const [o, r] = c
|
|
7
|
-
return /* @__PURE__ */ a(e.Provider, { value: { state: o, setState: r }, children: t });
|
|
5
|
+
}, x = ({ children: t }) => {
|
|
6
|
+
const [o, r] = u(c);
|
|
7
|
+
return /* @__PURE__ */ a.jsx(e.Provider, { value: { state: o, setState: r }, children: t });
|
|
8
8
|
}, e = s({
|
|
9
9
|
state: { alias: {} },
|
|
10
10
|
setState: null
|
|
11
11
|
});
|
|
12
|
-
function
|
|
12
|
+
function d() {
|
|
13
13
|
const t = n.useContext(e);
|
|
14
14
|
if (!t)
|
|
15
15
|
throw new Error("breadcrumb components cannot be used outside Breadcrumb context");
|
|
@@ -17,6 +17,6 @@ function l() {
|
|
|
17
17
|
}
|
|
18
18
|
export {
|
|
19
19
|
e as BreadcrumbContext,
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
x as default,
|
|
21
|
+
d as useBreadcrumbContext
|
|
22
22
|
};
|
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useState as
|
|
3
|
-
import { fetchChartTemplateVersions as
|
|
4
|
-
import { R as
|
|
5
|
-
import { y as
|
|
6
|
-
const
|
|
7
|
-
const [
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { j as s } from "../jsx-runtime-0dcb030c.js";
|
|
2
|
+
import { useState as a, useEffect as g } from "react";
|
|
3
|
+
import { fetchChartTemplateVersions as N } from "./Common.service.js";
|
|
4
|
+
import { R as p } from "../react-select.esm-97f26847.js";
|
|
5
|
+
import { y as m, s as R, x as d } from "../Helper-a0caa238.js";
|
|
6
|
+
const A = ({ setSelectedChartRefId: o }) => {
|
|
7
|
+
const [C, y] = a([]), [x, f] = a(null), [n, u] = a([]), [c, T] = a([]), [V, h] = a(null);
|
|
8
|
+
g(() => {
|
|
9
|
+
N().then((t) => {
|
|
10
10
|
const e = t?.result || [];
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
value:
|
|
14
|
-
label:
|
|
11
|
+
y(e);
|
|
12
|
+
const l = [...new Set(e.map((r) => r.chartType))].map((r) => ({
|
|
13
|
+
value: r,
|
|
14
|
+
label: r
|
|
15
15
|
}));
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
|
|
16
|
+
T(l);
|
|
17
|
+
const S = m(e, l[0]);
|
|
18
|
+
i(S);
|
|
19
19
|
}).catch((t) => {
|
|
20
20
|
R(t);
|
|
21
21
|
});
|
|
22
22
|
}, []);
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
const e =
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
|
|
23
|
+
const i = (t) => {
|
|
24
|
+
u(t), h(t[0]), o(t[0]?.chartRefId);
|
|
25
|
+
}, j = (t) => {
|
|
26
|
+
f(t);
|
|
27
|
+
const e = m(C, t);
|
|
28
|
+
i(e);
|
|
29
|
+
}, v = (t) => {
|
|
30
|
+
h(t), o(t.chartRefId);
|
|
31
31
|
};
|
|
32
|
-
return /* @__PURE__ */
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
|
|
32
|
+
return /* @__PURE__ */ s.jsxs("div", { className: "flex", children: [
|
|
33
|
+
/* @__PURE__ */ s.jsxs("div", { className: "chart-type-options flex", "data-testid": "chart-type-options", children: [
|
|
34
|
+
/* @__PURE__ */ s.jsx("span", { className: "chart-type-options-label mr-4", children: "Chart Type" }),
|
|
35
|
+
/* @__PURE__ */ s.jsx(
|
|
36
|
+
p,
|
|
37
37
|
{
|
|
38
|
-
value:
|
|
39
|
-
options:
|
|
40
|
-
onChange:
|
|
41
|
-
styles:
|
|
38
|
+
value: x ?? c[0],
|
|
39
|
+
options: c,
|
|
40
|
+
onChange: j,
|
|
41
|
+
styles: d
|
|
42
42
|
}
|
|
43
43
|
)
|
|
44
44
|
] }),
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
|
|
45
|
+
/* @__PURE__ */ s.jsxs("div", { className: "chart-version-options flex", "data-testid": "chart-version-options", children: [
|
|
46
|
+
/* @__PURE__ */ s.jsx("span", { className: "chart-version-options-label mr-4", children: "Chart Version" }),
|
|
47
|
+
/* @__PURE__ */ s.jsx(
|
|
48
|
+
p,
|
|
49
49
|
{
|
|
50
|
-
value:
|
|
51
|
-
options:
|
|
52
|
-
onChange:
|
|
53
|
-
styles:
|
|
50
|
+
value: V ?? n[0],
|
|
51
|
+
options: n,
|
|
52
|
+
onChange: v,
|
|
53
|
+
styles: d
|
|
54
54
|
}
|
|
55
55
|
)
|
|
56
56
|
] })
|
|
57
57
|
] });
|
|
58
58
|
};
|
|
59
59
|
export {
|
|
60
|
-
|
|
60
|
+
A as default
|
|
61
61
|
};
|
package/dist/Common/Checkbox.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Component as
|
|
3
|
-
class
|
|
1
|
+
import { j as s } from "../jsx-runtime-0dcb030c.js";
|
|
2
|
+
import { Component as o } from "react";
|
|
3
|
+
class p extends o {
|
|
4
4
|
render() {
|
|
5
5
|
let e = `${this.props.rootClassName ? this.props.rootClassName : ""}`;
|
|
6
|
-
return /* @__PURE__ */ s(
|
|
7
|
-
/* @__PURE__ */ s(
|
|
6
|
+
return /* @__PURE__ */ s.jsx(s.Fragment, { children: /* @__PURE__ */ s.jsxs("label", { className: `dc__position-rel flex left cursor ${e}`, onClick: this.props?.onClick, children: [
|
|
7
|
+
/* @__PURE__ */ s.jsx(
|
|
8
8
|
"input",
|
|
9
9
|
{
|
|
10
10
|
type: "checkbox",
|
|
@@ -18,11 +18,11 @@ class c extends a {
|
|
|
18
18
|
"data-testid": this.props.dataTestId
|
|
19
19
|
}
|
|
20
20
|
),
|
|
21
|
-
/* @__PURE__ */ s("span", { className: "form__checkbox-container", "data-testid": `${this.props.dataTestId}-chk-span` }),
|
|
22
|
-
/* @__PURE__ */ s("span", { className: "form__checkbox-label", children: this.props.children })
|
|
21
|
+
/* @__PURE__ */ s.jsx("span", { className: "form__checkbox-container", "data-testid": `${this.props.dataTestId}-chk-span` }),
|
|
22
|
+
/* @__PURE__ */ s.jsx("span", { className: "form__checkbox-label", children: this.props.children })
|
|
23
23
|
] }) });
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
export {
|
|
27
|
-
|
|
27
|
+
p as Checkbox
|
|
28
28
|
};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useState as p, useCallback as
|
|
3
|
-
import { T as
|
|
4
|
-
import { q as
|
|
5
|
-
import { S as
|
|
6
|
-
function
|
|
7
|
-
const [e, t] = p(!1), [
|
|
1
|
+
import { j as o } from "../../jsx-runtime-0dcb030c.js";
|
|
2
|
+
import { useState as p, useCallback as y, useEffect as r } from "react";
|
|
3
|
+
import { T as C } from "../../tippy-react.esm-8dc66a75.js";
|
|
4
|
+
import { q as h } from "../../Helper-a0caa238.js";
|
|
5
|
+
import { S as T } from "../../ic-copy-118b83dc.js";
|
|
6
|
+
function S({ content: s, copiedTippyText: m, duration: a, trigger: i, setTrigger: l }) {
|
|
7
|
+
const [e, t] = p(!1), [u, c] = p(!1), d = () => t(!0), f = () => c(!0), b = () => c(!1), n = y(() => h(s, d), [s]);
|
|
8
8
|
return r(() => {
|
|
9
9
|
if (!e)
|
|
10
10
|
return;
|
|
11
|
-
const
|
|
11
|
+
const x = setTimeout(() => {
|
|
12
12
|
t(!1), l(!1);
|
|
13
|
-
},
|
|
14
|
-
return () => clearTimeout(
|
|
15
|
-
}, [e,
|
|
13
|
+
}, a);
|
|
14
|
+
return () => clearTimeout(x);
|
|
15
|
+
}, [e, a, l]), r(() => {
|
|
16
16
|
i && (t(!0), n());
|
|
17
|
-
}, [i, n]), /* @__PURE__ */ o("div", { className: "icon-dim-16 flex center", children: /* @__PURE__ */ o(
|
|
18
|
-
|
|
17
|
+
}, [i, n]), /* @__PURE__ */ o.jsx("div", { className: "icon-dim-16 flex center", children: /* @__PURE__ */ o.jsx(
|
|
18
|
+
C,
|
|
19
19
|
{
|
|
20
20
|
className: "default-tt",
|
|
21
21
|
content: e ? m : "Copy",
|
|
22
22
|
placement: "right",
|
|
23
|
-
visible: e ||
|
|
24
|
-
children: /* @__PURE__ */ o(
|
|
23
|
+
visible: e || u,
|
|
24
|
+
children: /* @__PURE__ */ o.jsx(
|
|
25
25
|
"button",
|
|
26
26
|
{
|
|
27
27
|
type: "button",
|
|
@@ -29,12 +29,12 @@ function k({ content: a, copiedTippyText: m, duration: s, trigger: i, setTrigger
|
|
|
29
29
|
onMouseEnter: f,
|
|
30
30
|
onMouseLeave: b,
|
|
31
31
|
onClick: n,
|
|
32
|
-
children: /* @__PURE__ */ o(
|
|
32
|
+
children: /* @__PURE__ */ o.jsx(T, { className: "icon-dim-16" })
|
|
33
33
|
}
|
|
34
34
|
)
|
|
35
35
|
}
|
|
36
36
|
) });
|
|
37
37
|
}
|
|
38
38
|
export {
|
|
39
|
-
|
|
39
|
+
S as default
|
|
40
40
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as o, s as e, f as
|
|
1
|
+
import { j as t } from "../../../jsx-runtime-0dcb030c.js";
|
|
2
|
+
import { r as o, s as e, f as s } from "../../../react.esm-2c92920f.js";
|
|
3
3
|
import r from "../ClipboardButton.js";
|
|
4
4
|
jest.mock("../../helpers/Helpers", () => ({
|
|
5
|
-
copyToClipboard: jest.fn().mockImplementation((n,
|
|
6
|
-
|
|
5
|
+
copyToClipboard: jest.fn().mockImplementation((n, i) => {
|
|
6
|
+
i();
|
|
7
7
|
})
|
|
8
8
|
}));
|
|
9
9
|
describe("When ClipboardButton mounts", () => {
|
|
@@ -11,17 +11,17 @@ describe("When ClipboardButton mounts", () => {
|
|
|
11
11
|
jest.clearAllMocks();
|
|
12
12
|
}), it("should show the copy icon", () => {
|
|
13
13
|
o(
|
|
14
|
-
/* @__PURE__ */ t(r, { content: "test", copiedTippyText: "test", duration: 1e3, trigger: !1, setTrigger: null })
|
|
14
|
+
/* @__PURE__ */ t.jsx(r, { content: "test", copiedTippyText: "test", duration: 1e3, trigger: !1, setTrigger: null })
|
|
15
15
|
), expect(e.getByRole("button")).toBeTruthy();
|
|
16
16
|
}), it("should show tippy on hover", () => {
|
|
17
17
|
o(
|
|
18
|
-
/* @__PURE__ */ t(r, { content: "test", copiedTippyText: "test", duration: 1e3, trigger: !1, setTrigger: null })
|
|
19
|
-
),
|
|
18
|
+
/* @__PURE__ */ t.jsx(r, { content: "test", copiedTippyText: "test", duration: 1e3, trigger: !1, setTrigger: null })
|
|
19
|
+
), s.mouseEnter(e.getByRole("button")), expect(e.getByText("Copy")).toBeTruthy();
|
|
20
20
|
}), it("should show copiedTippyText when trigger is true", () => {
|
|
21
|
-
o(/* @__PURE__ */ t(r, { content: "test", copiedTippyText: "test", duration: 1e3, trigger: !0, setTrigger: null })), expect(e.getByText("test")).toBeTruthy();
|
|
21
|
+
o(/* @__PURE__ */ t.jsx(r, { content: "test", copiedTippyText: "test", duration: 1e3, trigger: !0, setTrigger: null })), expect(e.getByText("test")).toBeTruthy();
|
|
22
22
|
}), it("should call copyToClipboard when clicked", () => {
|
|
23
23
|
o(
|
|
24
|
-
/* @__PURE__ */ t(r, { content: "test", copiedTippyText: "test", duration: 1e3, trigger: !1, setTrigger: null })
|
|
25
|
-
),
|
|
24
|
+
/* @__PURE__ */ t.jsx(r, { content: "test", copiedTippyText: "test", duration: 1e3, trigger: !1, setTrigger: null })
|
|
25
|
+
), s.click(e.getByRole("button")), expect(e.getByText("test")).toBeTruthy();
|
|
26
26
|
});
|
|
27
27
|
});
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import "
|
|
1
|
+
import "../../jsx-runtime-0dcb030c.js";
|
|
2
2
|
import "react";
|
|
3
|
-
import { C as x } from "../../CodeEditor-
|
|
4
|
-
import "../../Helper-
|
|
3
|
+
import { C as x } from "../../CodeEditor-3c2aaef5.js";
|
|
4
|
+
import "../../Helper-a0caa238.js";
|
|
5
5
|
import "../../ic-copy-118b83dc.js";
|
|
6
6
|
import "../../ic-info-filled-31a15add.js";
|
|
7
7
|
import "../../ic-error-exclamation-5f9af461.js";
|
|
8
8
|
import "../../ic-warning-42534af1.js";
|
|
9
9
|
import "../Progressing.js";
|
|
10
|
-
import "../UseWindowSize.js";
|
|
10
|
+
import "../Hooks/UseWindowSize/UseWindowSize.js";
|
|
11
11
|
import "../Select/Select.js";
|
|
12
12
|
import "../RadioGroup/RadioGroup.js";
|
|
13
13
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as O, D as E } from "../Helper-
|
|
1
|
+
import { a as O, D as E } from "../Helper-a0caa238.js";
|
|
2
2
|
import { get as d, post as y } from "./Api.js";
|
|
3
3
|
import { ROUTES as p } from "./Constants.js";
|
|
4
4
|
import { CDMaterialServiceEnum as _, DeploymentNodeType as T, CDMaterialFilterQuery as S, FilterStates as u, CDModalTab as L } from "./Types.js";
|