@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,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useState as
|
|
3
|
-
import { u as
|
|
1
|
+
import { j as R } from "../jsx-runtime-0dcb030c.js";
|
|
2
|
+
import { useState as j, useRef as T, useEffect as _ } from "react";
|
|
3
|
+
import { u as $ } from "../Helper-a0caa238.js";
|
|
4
4
|
const k = ({
|
|
5
5
|
minHeight: n,
|
|
6
6
|
maxHeight: r,
|
|
7
7
|
value: l,
|
|
8
|
-
onChange:
|
|
9
|
-
onBlur:
|
|
8
|
+
onChange: s = null,
|
|
9
|
+
onBlur: f = null,
|
|
10
10
|
onFocus: u = null,
|
|
11
11
|
className: c = "",
|
|
12
12
|
placeholder: i = "Enter your text here..",
|
|
@@ -16,20 +16,20 @@ const k = ({
|
|
|
16
16
|
dataTestId: d,
|
|
17
17
|
...y
|
|
18
18
|
}) => {
|
|
19
|
-
const [o, a] =
|
|
20
|
-
|
|
19
|
+
const [o, a] = j(""), t = T(null);
|
|
20
|
+
_(() => {
|
|
21
21
|
a(l);
|
|
22
22
|
}, [l]);
|
|
23
23
|
function g(e) {
|
|
24
|
-
e.persist(), a(e.target.value), typeof
|
|
24
|
+
e.persist(), a(e.target.value), typeof s == "function" && s(e);
|
|
25
25
|
}
|
|
26
26
|
function m(e) {
|
|
27
|
-
typeof
|
|
27
|
+
typeof f == "function" && f(e);
|
|
28
28
|
}
|
|
29
29
|
function E(e) {
|
|
30
30
|
typeof u == "function" && u(e);
|
|
31
31
|
}
|
|
32
|
-
return
|
|
32
|
+
return $(
|
|
33
33
|
() => {
|
|
34
34
|
t.current.style.height = "auto";
|
|
35
35
|
let e = t.current.scrollHeight;
|
|
@@ -37,7 +37,7 @@ const k = ({
|
|
|
37
37
|
},
|
|
38
38
|
500,
|
|
39
39
|
[o]
|
|
40
|
-
), /* @__PURE__ */ R(
|
|
40
|
+
), /* @__PURE__ */ R.jsx(
|
|
41
41
|
"textarea",
|
|
42
42
|
{
|
|
43
43
|
"data-testid": d,
|
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
import "../../assets/SearchBar.component.css";
|
|
2
|
-
import {
|
|
3
|
-
import * as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { S as
|
|
6
|
-
import { B as
|
|
7
|
-
const
|
|
8
|
-
const
|
|
2
|
+
import { j as t } from "../../jsx-runtime-0dcb030c.js";
|
|
3
|
+
import * as c from "react";
|
|
4
|
+
import { useState as x, useRef as g, useCallback as j } from "react";
|
|
5
|
+
import { S as B } from "../../ic-error-cross-2760059a.js";
|
|
6
|
+
import { B as E } from "../../Helper-a0caa238.js";
|
|
7
|
+
const S = (r) => /* @__PURE__ */ c.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...r }, /* @__PURE__ */ c.createElement("g", { fill: "none", fillRule: "evenodd" }, /* @__PURE__ */ c.createElement("path", { d: "M0 0h24v24H0z" }), /* @__PURE__ */ c.createElement("path", { fill: "#959BA1", d: "M10 2a8 8 0 0 1 6.32 12.905l5.044 5.045a1 1 0 1 1-1.414 1.414l-5.045-5.043A8 8 0 1 1 10 2zm0 2a6 6 0 1 0 0 12 6 6 0 0 0 0-12z" })));
|
|
8
|
+
const A = ({
|
|
9
9
|
initialSearchText: r = "",
|
|
10
|
-
handleSearchChange:
|
|
10
|
+
handleSearchChange: s = () => {
|
|
11
11
|
},
|
|
12
12
|
handleEnter: p = () => {
|
|
13
13
|
},
|
|
14
14
|
inputProps: m = {},
|
|
15
15
|
containerClassName: d,
|
|
16
16
|
shouldDebounce: b = !1,
|
|
17
|
-
debounceTimeout:
|
|
17
|
+
debounceTimeout: o = 300
|
|
18
18
|
}) => {
|
|
19
|
-
const [
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
]),
|
|
23
|
-
const { value:
|
|
24
|
-
|
|
19
|
+
const [n, u] = x(!!r), l = g(), _ = j(E(s, o), [
|
|
20
|
+
s,
|
|
21
|
+
o
|
|
22
|
+
]), h = (e) => {
|
|
23
|
+
const { value: a } = e.target;
|
|
24
|
+
u(!!a), b ? _(a) : s(a);
|
|
25
25
|
}, i = (e) => {
|
|
26
|
-
|
|
26
|
+
s(e), p(e);
|
|
27
27
|
}, f = (e) => {
|
|
28
|
-
const { key:
|
|
29
|
-
if (
|
|
28
|
+
const { key: a } = e;
|
|
29
|
+
if (a === "Enter") {
|
|
30
30
|
const v = e.target.value.trim();
|
|
31
31
|
i(v);
|
|
32
32
|
}
|
|
33
33
|
}, w = () => {
|
|
34
34
|
l.current.value = "", i("");
|
|
35
35
|
};
|
|
36
|
-
return /* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
/* @__PURE__ */
|
|
36
|
+
return /* @__PURE__ */ t.jsx("div", { className: d, children: /* @__PURE__ */ t.jsxs("div", { className: "search-bar bcn-0 dc__block w-100 min-w-200 dc__position-rel en-2 bw-1 br-4 h-32", children: [
|
|
37
|
+
/* @__PURE__ */ t.jsx(S, { className: "search-bar__icon dc__position-abs icon-color-n6 icon-dim-18" }),
|
|
38
|
+
/* @__PURE__ */ t.jsx(
|
|
39
39
|
"input",
|
|
40
40
|
{
|
|
41
41
|
placeholder: "Search",
|
|
@@ -43,24 +43,24 @@ const D = ({
|
|
|
43
43
|
type: "text",
|
|
44
44
|
...m,
|
|
45
45
|
defaultValue: r,
|
|
46
|
-
className: `search-bar__input bcn-0 dc__position-abs w-100 h-100 br-4 dc__no-border pt-6 pr-10 pb-6 pl-30 fs-13 lh-20 fw-4 cn-9 placeholder-cn5 ${
|
|
47
|
-
onChange:
|
|
46
|
+
className: `search-bar__input bcn-0 dc__position-abs w-100 h-100 br-4 dc__no-border pt-6 pr-10 pb-6 pl-30 fs-13 lh-20 fw-4 cn-9 placeholder-cn5 ${n ? "pr-30" : "pr-10"}`,
|
|
47
|
+
onChange: h,
|
|
48
48
|
onKeyDown: f,
|
|
49
49
|
ref: l
|
|
50
50
|
}
|
|
51
51
|
),
|
|
52
|
-
|
|
52
|
+
n && /* @__PURE__ */ t.jsx(
|
|
53
53
|
"button",
|
|
54
54
|
{
|
|
55
55
|
className: "flex search-bar__clear-button dc__position-abs dc__transparent mt-0 mb-0 mr-5 ml-5",
|
|
56
56
|
type: "button",
|
|
57
57
|
onClick: w,
|
|
58
58
|
"aria-label": "Clear search",
|
|
59
|
-
children: /* @__PURE__ */
|
|
59
|
+
children: /* @__PURE__ */ t.jsx(B, { className: "icon-dim-18 icon-n4 dc__vertical-align-middle" })
|
|
60
60
|
}
|
|
61
61
|
)
|
|
62
62
|
] }) });
|
|
63
63
|
};
|
|
64
64
|
export {
|
|
65
|
-
|
|
65
|
+
A as default
|
|
66
66
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import "../../assets/ScanVulnerabilitiesTable.css";
|
|
2
|
-
import {
|
|
3
|
-
function
|
|
4
|
-
const
|
|
2
|
+
import { j as e } from "../../jsx-runtime-0dcb030c.js";
|
|
3
|
+
function i({ vulnerabilities: s }) {
|
|
4
|
+
const r = (c) => /* @__PURE__ */ e.jsxs(
|
|
5
5
|
"tr",
|
|
6
6
|
{
|
|
7
7
|
className: "dc__security-tab__table-row cursor",
|
|
8
|
-
onClick: (
|
|
8
|
+
onClick: (a) => {
|
|
9
9
|
window.open(`https://cve.mitre.org/cgi-bin/cvename.cgi?name=${c.name}`, "_blank");
|
|
10
10
|
},
|
|
11
11
|
children: [
|
|
12
|
-
/* @__PURE__ */ e("td", { className: "security-tab__cell-cve dc__cve-cell", children: /* @__PURE__ */ e(
|
|
12
|
+
/* @__PURE__ */ e.jsx("td", { className: "security-tab__cell-cve dc__cve-cell", children: /* @__PURE__ */ e.jsx(
|
|
13
13
|
"a",
|
|
14
14
|
{
|
|
15
15
|
href: `https://cve.mitre.org/cgi-bin/cvename.cgi?name=${c.name}`,
|
|
@@ -18,11 +18,11 @@ function n({ vulnerabilities: a }) {
|
|
|
18
18
|
children: c.name
|
|
19
19
|
}
|
|
20
20
|
) }),
|
|
21
|
-
/* @__PURE__ */ e("td", { className: "security-tab__cell-severity", children: /* @__PURE__ */ e("span", { className: `fill-${c.severity?.toLowerCase()}`, children: c.severity }) }),
|
|
22
|
-
/* @__PURE__ */ e("td", { className: "security-tab__cell-package", children: c.package }),
|
|
23
|
-
/* @__PURE__ */ e("td", { className: "security-tab__cell-current-ver", children: c.version }),
|
|
24
|
-
/* @__PURE__ */ e("td", { className: "security-tab__cell-fixed-ver", children: c.fixedVersion }),
|
|
25
|
-
/* @__PURE__ */ e(
|
|
21
|
+
/* @__PURE__ */ e.jsx("td", { className: "security-tab__cell-severity", children: /* @__PURE__ */ e.jsx("span", { className: `fill-${c.severity?.toLowerCase()}`, children: c.severity }) }),
|
|
22
|
+
/* @__PURE__ */ e.jsx("td", { className: "security-tab__cell-package", children: c.package }),
|
|
23
|
+
/* @__PURE__ */ e.jsx("td", { className: "security-tab__cell-current-ver", children: c.version }),
|
|
24
|
+
/* @__PURE__ */ e.jsx("td", { className: "security-tab__cell-fixed-ver", children: c.fixedVersion }),
|
|
25
|
+
/* @__PURE__ */ e.jsx(
|
|
26
26
|
"td",
|
|
27
27
|
{
|
|
28
28
|
className: `security-tab__cell-policy security-tab__cell-policy--${c.policy?.toLowerCase()}`,
|
|
@@ -32,18 +32,18 @@ function n({ vulnerabilities: a }) {
|
|
|
32
32
|
]
|
|
33
33
|
}
|
|
34
34
|
);
|
|
35
|
-
return /* @__PURE__ */ e("table", { className: "security-tab__table", children: /* @__PURE__ */
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */ e("th", { className: "security-cell-header security-tab__cell-cve", children: "CVE" }),
|
|
38
|
-
/* @__PURE__ */ e("th", { className: "security-cell-header security-tab__cell-severity", children: "Severity" }),
|
|
39
|
-
/* @__PURE__ */ e("th", { className: "security-cell-header security-tab__cell-package", children: "Package" }),
|
|
40
|
-
/* @__PURE__ */ e("th", { className: "security-cell-header security-tab__cell-current-ver", children: "Current Version" }),
|
|
41
|
-
/* @__PURE__ */ e("th", { className: "security-cell-header security-tab__cell-fixed-ver", children: "Fixed In Version" }),
|
|
42
|
-
/* @__PURE__ */ e("th", { className: "security-cell-header security-tab__cell-policy", children: "Policy" })
|
|
35
|
+
return /* @__PURE__ */ e.jsx("table", { className: "security-tab__table", children: /* @__PURE__ */ e.jsxs("tbody", { children: [
|
|
36
|
+
/* @__PURE__ */ e.jsxs("tr", { className: "security-tab__table-header", children: [
|
|
37
|
+
/* @__PURE__ */ e.jsx("th", { className: "security-cell-header security-tab__cell-cve", children: "CVE" }),
|
|
38
|
+
/* @__PURE__ */ e.jsx("th", { className: "security-cell-header security-tab__cell-severity", children: "Severity" }),
|
|
39
|
+
/* @__PURE__ */ e.jsx("th", { className: "security-cell-header security-tab__cell-package", children: "Package" }),
|
|
40
|
+
/* @__PURE__ */ e.jsx("th", { className: "security-cell-header security-tab__cell-current-ver", children: "Current Version" }),
|
|
41
|
+
/* @__PURE__ */ e.jsx("th", { className: "security-cell-header security-tab__cell-fixed-ver", children: "Fixed In Version" }),
|
|
42
|
+
/* @__PURE__ */ e.jsx("th", { className: "security-cell-header security-tab__cell-policy", children: "Policy" })
|
|
43
43
|
] }),
|
|
44
|
-
|
|
44
|
+
s.map((c) => r(c))
|
|
45
45
|
] }) });
|
|
46
46
|
}
|
|
47
47
|
export {
|
|
48
|
-
|
|
48
|
+
i as default
|
|
49
49
|
};
|
|
@@ -1,126 +1,126 @@
|
|
|
1
1
|
import "../../assets/Select.css";
|
|
2
|
-
import {
|
|
3
|
-
import u, { useEffect as
|
|
4
|
-
import { a as
|
|
5
|
-
import
|
|
6
|
-
import { s as
|
|
7
|
-
const
|
|
8
|
-
function
|
|
9
|
-
const
|
|
10
|
-
if (!
|
|
2
|
+
import { j as t } from "../../jsx-runtime-0dcb030c.js";
|
|
3
|
+
import u, { useEffect as F } from "react";
|
|
4
|
+
import { a as G } from "../../ic-chevron-down-eb7fd953.js";
|
|
5
|
+
import C from "../PopupMenu.js";
|
|
6
|
+
import { s as R } from "../../Helper-a0caa238.js";
|
|
7
|
+
const b = u.createContext(null);
|
|
8
|
+
function m() {
|
|
9
|
+
const s = u.useContext(b);
|
|
10
|
+
if (!s)
|
|
11
11
|
throw new Error("Select compound components cannot be rendered outside the Toggle component");
|
|
12
|
-
return
|
|
12
|
+
return s;
|
|
13
13
|
}
|
|
14
14
|
const d = ({
|
|
15
|
-
children:
|
|
16
|
-
onChange:
|
|
15
|
+
children: s = null,
|
|
16
|
+
onChange: n,
|
|
17
17
|
value: e = null,
|
|
18
|
-
valueComparator:
|
|
18
|
+
valueComparator: o,
|
|
19
19
|
rootClassName: r = "",
|
|
20
20
|
disabled: l = !1,
|
|
21
21
|
tabIndex: i = 0,
|
|
22
22
|
name: f = "select",
|
|
23
|
-
autoWidth:
|
|
24
|
-
isKebab:
|
|
25
|
-
dataTestId:
|
|
23
|
+
autoWidth: x = !0,
|
|
24
|
+
isKebab: y = !1,
|
|
25
|
+
dataTestId: g = ""
|
|
26
26
|
}) => {
|
|
27
|
-
const [h, p] = u.useState(e), [
|
|
27
|
+
const [h, p] = u.useState(e), [j, S] = u.useState(!1), [E, O] = u.useState(""), [_, P] = u.useState(!1);
|
|
28
28
|
useEffectAfterMount(() => {
|
|
29
|
-
h !== e &&
|
|
29
|
+
h !== e && S(!1);
|
|
30
30
|
}, [h]), useEffectAfterMount(() => {
|
|
31
31
|
p(e);
|
|
32
32
|
}, [e]);
|
|
33
|
-
function
|
|
34
|
-
p(a), c.target.name = f, c.target.value = a,
|
|
33
|
+
function w(c, a) {
|
|
34
|
+
p(a), c.target.name = f, c.target.value = a, n(c);
|
|
35
35
|
}
|
|
36
|
-
if (!
|
|
36
|
+
if (!s)
|
|
37
37
|
return null;
|
|
38
|
-
const { button:
|
|
39
|
-
(c, a) => (a.type ===
|
|
38
|
+
const { button: B, body: L, optionLength: M, AsyncComponent: T } = u.Children.toArray(s).reduce(
|
|
39
|
+
(c, a) => (a.type === $ ? c.button = a : a.type === k ? c.AsyncComponent = a : ((a.type === A || a.type === N) && (c.optionLength += 1), c.body.push(a)), c),
|
|
40
40
|
{ button: null, body: [], optionLength: 0, AsyncComponent: null }
|
|
41
41
|
);
|
|
42
|
-
return /* @__PURE__ */
|
|
43
|
-
|
|
42
|
+
return /* @__PURE__ */ t.jsx(
|
|
43
|
+
b.Provider,
|
|
44
44
|
{
|
|
45
45
|
value: {
|
|
46
46
|
selected: h,
|
|
47
47
|
select: p,
|
|
48
|
-
popupOpen:
|
|
49
|
-
valueComparator:
|
|
50
|
-
searchString:
|
|
51
|
-
search:
|
|
52
|
-
handleClick:
|
|
48
|
+
popupOpen: j,
|
|
49
|
+
valueComparator: o,
|
|
50
|
+
searchString: E,
|
|
51
|
+
search: O,
|
|
52
|
+
handleClick: w,
|
|
53
53
|
disabled: l,
|
|
54
|
-
loading:
|
|
55
|
-
setLoading:
|
|
54
|
+
loading: _,
|
|
55
|
+
setLoading: P
|
|
56
56
|
},
|
|
57
|
-
children: /* @__PURE__ */
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
|
|
57
|
+
children: /* @__PURE__ */ t.jsxs(C, { onToggleCallback: (c) => S(c), autoClose: j, children: [
|
|
58
|
+
/* @__PURE__ */ t.jsx(
|
|
59
|
+
C.Button,
|
|
60
60
|
{
|
|
61
|
-
isKebab:
|
|
61
|
+
isKebab: y,
|
|
62
62
|
disabled: l,
|
|
63
63
|
tabIndex: i,
|
|
64
64
|
rootClassName: r,
|
|
65
|
-
dataTestId:
|
|
66
|
-
children:
|
|
65
|
+
dataTestId: g,
|
|
66
|
+
children: B
|
|
67
67
|
}
|
|
68
68
|
),
|
|
69
|
-
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
-
|
|
72
|
-
|
|
69
|
+
j && T,
|
|
70
|
+
/* @__PURE__ */ t.jsx(C.Body, { rootClassName: `select-popup ${r || ""}`, autoWidth: x, children: _ ? null : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
71
|
+
M === 0 && /* @__PURE__ */ t.jsx("div", { className: `${r} no-option-found flex`, children: "No results found" }),
|
|
72
|
+
L
|
|
73
73
|
] }) })
|
|
74
74
|
] })
|
|
75
75
|
}
|
|
76
76
|
);
|
|
77
|
-
},
|
|
78
|
-
dataTestIdMenuList:
|
|
79
|
-
children:
|
|
77
|
+
}, A = ({
|
|
78
|
+
dataTestIdMenuList: s,
|
|
79
|
+
children: n,
|
|
80
80
|
value: e,
|
|
81
|
-
disabled:
|
|
81
|
+
disabled: o = !1,
|
|
82
82
|
style: r = {},
|
|
83
83
|
active: l = !1,
|
|
84
84
|
name: i = "",
|
|
85
85
|
rootClassName: f = ""
|
|
86
86
|
}) => {
|
|
87
|
-
const { selected:
|
|
88
|
-
return l = l ||
|
|
87
|
+
const { selected: x, searchString: y, valueComparator: g, handleClick: h } = m();
|
|
88
|
+
return l = l || x === e, typeof e == "object" && (l = l || g(e)), i.includes(y) ? /* @__PURE__ */ t.jsx(
|
|
89
89
|
"div",
|
|
90
90
|
{
|
|
91
|
-
"data-testid": `list-${
|
|
91
|
+
"data-testid": `list-${s}`,
|
|
92
92
|
className: `select__option ${f} ${l ? "selected" : ""}`,
|
|
93
93
|
style: { ...r },
|
|
94
94
|
onClick: (p) => {
|
|
95
|
-
|
|
95
|
+
o || (p.persist(), h(p, e));
|
|
96
96
|
},
|
|
97
|
-
children:
|
|
97
|
+
children: n
|
|
98
98
|
}
|
|
99
99
|
) : null;
|
|
100
|
-
},
|
|
101
|
-
/* @__PURE__ */
|
|
102
|
-
|
|
103
|
-
] }),
|
|
104
|
-
dataTestIdDropdown:
|
|
105
|
-
children:
|
|
100
|
+
}, N = ({ children: s, label: n, rootClassName: e = "" }) => /* @__PURE__ */ t.jsxs("div", { className: `select__option-group ${e}`, children: [
|
|
101
|
+
/* @__PURE__ */ t.jsx("span", { className: "option-group__label", children: n }),
|
|
102
|
+
s
|
|
103
|
+
] }), $ = ({
|
|
104
|
+
dataTestIdDropdown: s,
|
|
105
|
+
children: n,
|
|
106
106
|
style: e = {},
|
|
107
|
-
rootClassName:
|
|
107
|
+
rootClassName: o = "",
|
|
108
108
|
arrowAsset: r = "",
|
|
109
109
|
hideArrow: l = !1
|
|
110
110
|
}) => {
|
|
111
|
-
const { popupOpen: i, loading: f } =
|
|
112
|
-
return /* @__PURE__ */
|
|
111
|
+
const { popupOpen: i, loading: f } = m();
|
|
112
|
+
return /* @__PURE__ */ t.jsxs(
|
|
113
113
|
"div",
|
|
114
114
|
{
|
|
115
|
-
"data-testid":
|
|
116
|
-
className: `select-button flex ${
|
|
115
|
+
"data-testid": s,
|
|
116
|
+
className: `select-button flex ${o} ${i ? "focused" : ""}`,
|
|
117
117
|
style: { ...e },
|
|
118
118
|
children: [
|
|
119
|
-
|
|
120
|
-
!l && (f ? /* @__PURE__ */
|
|
119
|
+
n,
|
|
120
|
+
!l && (f ? /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(Progressing, {}) }) : /* @__PURE__ */ t.jsx(
|
|
121
121
|
"img",
|
|
122
122
|
{
|
|
123
|
-
src: r ||
|
|
123
|
+
src: r || G,
|
|
124
124
|
className: "rotate select-button-sort-image",
|
|
125
125
|
style: { "--rotateBy": i ? "180deg" : "0deg" }
|
|
126
126
|
}
|
|
@@ -128,24 +128,24 @@ const d = ({
|
|
|
128
128
|
]
|
|
129
129
|
}
|
|
130
130
|
);
|
|
131
|
-
},
|
|
132
|
-
const { searchString: r, search: l } =
|
|
133
|
-
return /* @__PURE__ */
|
|
131
|
+
}, I = ({ placeholder: s = "search", style: n = {}, inputStyle: e = {}, rootClassName: o = "" }) => {
|
|
132
|
+
const { searchString: r, search: l } = m();
|
|
133
|
+
return /* @__PURE__ */ t.jsxs(
|
|
134
134
|
"div",
|
|
135
135
|
{
|
|
136
|
-
className: `${
|
|
136
|
+
className: `${o} search search--select-menu`,
|
|
137
137
|
onClickCapture: (i) => i.stopPropagation(),
|
|
138
|
-
style: { ...
|
|
138
|
+
style: { ...n },
|
|
139
139
|
children: [
|
|
140
|
-
/* @__PURE__ */
|
|
141
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ t.jsx("span", { className: "search__icon", children: /* @__PURE__ */ t.jsx("i", { className: "fa fa-search" }) }),
|
|
141
|
+
/* @__PURE__ */ t.jsx(
|
|
142
142
|
"input",
|
|
143
143
|
{
|
|
144
144
|
autoFocus: !0,
|
|
145
145
|
className: "search__input",
|
|
146
146
|
style: { ...e },
|
|
147
147
|
type: "text",
|
|
148
|
-
placeholder:
|
|
148
|
+
placeholder: s,
|
|
149
149
|
value: r,
|
|
150
150
|
onChange: (i) => l(i.target.value)
|
|
151
151
|
}
|
|
@@ -153,41 +153,41 @@ const d = ({
|
|
|
153
153
|
]
|
|
154
154
|
}
|
|
155
155
|
);
|
|
156
|
-
},
|
|
157
|
-
const { loading:
|
|
158
|
-
return
|
|
159
|
-
async function
|
|
156
|
+
}, k = ({ api: s }) => {
|
|
157
|
+
const { loading: n, setLoading: e } = m();
|
|
158
|
+
return F(() => {
|
|
159
|
+
async function o() {
|
|
160
160
|
e(!0);
|
|
161
161
|
try {
|
|
162
|
-
await
|
|
162
|
+
await s();
|
|
163
163
|
} catch (r) {
|
|
164
|
-
|
|
164
|
+
R(r);
|
|
165
165
|
} finally {
|
|
166
166
|
e(!1);
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
|
-
|
|
169
|
+
o();
|
|
170
170
|
}, []), null;
|
|
171
|
-
},
|
|
172
|
-
const { handleClick: e } =
|
|
173
|
-
return /* @__PURE__ */
|
|
171
|
+
}, q = ({ rootClassName: s = "", style: n = {} }) => {
|
|
172
|
+
const { handleClick: e } = m();
|
|
173
|
+
return /* @__PURE__ */ t.jsx(
|
|
174
174
|
"div",
|
|
175
175
|
{
|
|
176
|
-
className: `select__all ${
|
|
177
|
-
style: { ...
|
|
178
|
-
onClick: (
|
|
179
|
-
|
|
176
|
+
className: `select__all ${s}`,
|
|
177
|
+
style: { ...n },
|
|
178
|
+
onClick: (o) => {
|
|
179
|
+
o.persist(), e(o, "all");
|
|
180
180
|
},
|
|
181
181
|
children: "Select All"
|
|
182
182
|
}
|
|
183
183
|
);
|
|
184
184
|
};
|
|
185
|
-
d.Button =
|
|
186
|
-
d.OptGroup =
|
|
187
|
-
d.Option =
|
|
188
|
-
d.Search =
|
|
189
|
-
d.All =
|
|
190
|
-
d.Async =
|
|
185
|
+
d.Button = $;
|
|
186
|
+
d.OptGroup = N;
|
|
187
|
+
d.Option = A;
|
|
188
|
+
d.Search = I;
|
|
189
|
+
d.All = q;
|
|
190
|
+
d.Async = k;
|
|
191
191
|
export {
|
|
192
192
|
d as default
|
|
193
193
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "
|
|
1
|
+
import "../jsx-runtime-0dcb030c.js";
|
|
2
2
|
import "react";
|
|
3
|
-
import "../tippy-react.esm-
|
|
3
|
+
import "../tippy-react.esm-8dc66a75.js";
|
|
4
4
|
import "../ic-cross-0e71861d.js";
|
|
5
|
-
import { T } from "../TippyCustomized-
|
|
5
|
+
import { T } from "../TippyCustomized-7b9b46b9.js";
|
|
6
6
|
import "./Types.js";
|
|
7
|
-
import "../Helper-
|
|
7
|
+
import "../Helper-a0caa238.js";
|
|
8
8
|
export {
|
|
9
9
|
T as TippyCustomized
|
|
10
10
|
};
|
package/dist/Common/ToastBody.js
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { t as
|
|
4
|
-
import { TOAST_ACCESS_DENIED as
|
|
5
|
-
class
|
|
1
|
+
import { j as t } from "../jsx-runtime-0dcb030c.js";
|
|
2
|
+
import e from "react";
|
|
3
|
+
import { t as r } from "../react-toastify.esm-1042de65.js";
|
|
4
|
+
import { TOAST_ACCESS_DENIED as o } from "./Constants.js";
|
|
5
|
+
class a extends e.Component {
|
|
6
6
|
render() {
|
|
7
|
-
return /* @__PURE__ */
|
|
8
|
-
/* @__PURE__ */ t("div", { className: "toast__title", children: this.props.title }),
|
|
9
|
-
this.props.subtitle && /* @__PURE__ */ t("div", { className: "toast__subtitle", children: this.props.subtitle })
|
|
7
|
+
return /* @__PURE__ */ t.jsxs("div", { className: "toast", children: [
|
|
8
|
+
/* @__PURE__ */ t.jsx("div", { className: "toast__title", children: this.props.title }),
|
|
9
|
+
this.props.subtitle && /* @__PURE__ */ t.jsx("div", { className: "toast__subtitle", children: this.props.subtitle })
|
|
10
10
|
] });
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
class
|
|
13
|
+
class c extends e.Component {
|
|
14
14
|
render() {
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */ t("span", { className: "info", children: this.props.text }),
|
|
17
|
-
/* @__PURE__ */ t("button", { type: "button", onClick: this.props.onClick, children: this.props.buttonText })
|
|
15
|
+
return /* @__PURE__ */ t.jsxs("div", { className: "flex left column dc__app-update-toast", children: [
|
|
16
|
+
/* @__PURE__ */ t.jsx("span", { className: "info", children: this.props.text }),
|
|
17
|
+
/* @__PURE__ */ t.jsx("button", { type: "button", onClick: this.props.onClick, children: this.props.buttonText })
|
|
18
18
|
] });
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
class u extends
|
|
21
|
+
class u extends e.Component {
|
|
22
22
|
render() {
|
|
23
|
-
return /* @__PURE__ */
|
|
24
|
-
/* @__PURE__ */ t("div", { className: "toast__title", children: this.props.title }),
|
|
25
|
-
this.props.subtitle && /* @__PURE__ */ t("div", { className: "toast__subtitle", children: this.props.subtitle }),
|
|
26
|
-
/* @__PURE__ */ t("button", { type: "button", onClick: this.props.onClick, style: { float: "right" }, children: this.props.buttonText })
|
|
23
|
+
return /* @__PURE__ */ t.jsxs("div", { className: "toast dc__app-update-toast", children: [
|
|
24
|
+
/* @__PURE__ */ t.jsx("div", { className: "toast__title", children: this.props.title }),
|
|
25
|
+
this.props.subtitle && /* @__PURE__ */ t.jsx("div", { className: "toast__subtitle", children: this.props.subtitle }),
|
|
26
|
+
/* @__PURE__ */ t.jsx("button", { type: "button", onClick: this.props.onClick, style: { float: "right" }, children: this.props.buttonText })
|
|
27
27
|
] });
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
const
|
|
31
|
-
/* @__PURE__ */ t(
|
|
30
|
+
const h = (s, i) => r.info(
|
|
31
|
+
/* @__PURE__ */ t.jsx(a, { title: s || o.TITLE, subtitle: i || o.SUBTITLE }),
|
|
32
32
|
{
|
|
33
33
|
className: "devtron-toast unauthorized"
|
|
34
34
|
}
|
|
35
35
|
);
|
|
36
36
|
export {
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
a as ToastBody,
|
|
38
|
+
c as ToastBody3,
|
|
39
39
|
u as ToastBodyWithButton,
|
|
40
|
-
|
|
40
|
+
h as toastAccessDenied
|
|
41
41
|
};
|
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
import "../../assets/Toggle.css";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { f as n } from "../../Helper-
|
|
5
|
-
const
|
|
2
|
+
import { j as o } from "../../jsx-runtime-0dcb030c.js";
|
|
3
|
+
import d from "react";
|
|
4
|
+
import { f as n } from "../../Helper-a0caa238.js";
|
|
5
|
+
const $ = ({
|
|
6
6
|
selected: t = !1,
|
|
7
|
-
onSelect:
|
|
7
|
+
onSelect: a = null,
|
|
8
8
|
color: r = "#36b37e",
|
|
9
9
|
rootClassName: c = "",
|
|
10
10
|
disabled: i = !1,
|
|
11
11
|
dataTestId: f = "handle-toggle-button",
|
|
12
|
-
Icon:
|
|
12
|
+
Icon: s = null,
|
|
13
13
|
iconClass: u = "",
|
|
14
14
|
...g
|
|
15
15
|
}) => {
|
|
16
|
-
const [e,
|
|
16
|
+
const [e, l] = d.useState(t);
|
|
17
17
|
n(() => {
|
|
18
|
-
typeof
|
|
18
|
+
typeof a == "function" && e !== t && a(e);
|
|
19
19
|
}, [e]), n(() => {
|
|
20
|
-
|
|
20
|
+
l(t);
|
|
21
21
|
}, [t]);
|
|
22
|
-
function m(
|
|
23
|
-
i ||
|
|
22
|
+
function m(_) {
|
|
23
|
+
i || l((p) => !p);
|
|
24
24
|
}
|
|
25
|
-
return /* @__PURE__ */
|
|
25
|
+
return /* @__PURE__ */ o.jsxs(
|
|
26
26
|
"label",
|
|
27
27
|
{
|
|
28
28
|
...g,
|
|
29
29
|
className: `${c} toggle__switch ${i ? "disabled" : ""}`,
|
|
30
30
|
style: { "--color": r },
|
|
31
31
|
children: [
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
/* @__PURE__ */
|
|
32
|
+
/* @__PURE__ */ o.jsx("input", { type: "checkbox", checked: !!e, onChange: m, className: "toggle__input" }),
|
|
33
|
+
/* @__PURE__ */ o.jsx("span", { className: `toggle__slider ${s ? "with-icon br-4 dc__border" : "round"}`, "data-testid": f, children: s && /* @__PURE__ */ o.jsx(s, { className: `icon-dim-20 br-4 p-2 ${u}` }) })
|
|
34
34
|
]
|
|
35
35
|
}
|
|
36
36
|
);
|
|
37
37
|
};
|
|
38
38
|
export {
|
|
39
|
-
|
|
39
|
+
$ as default
|
|
40
40
|
};
|