@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,65 +1,65 @@
|
|
|
1
1
|
import "../../assets/InfoColourbar.css";
|
|
2
|
-
import {
|
|
3
|
-
import { Link as
|
|
4
|
-
function
|
|
5
|
-
message:
|
|
6
|
-
classname:
|
|
7
|
-
Icon:
|
|
8
|
-
iconClass:
|
|
9
|
-
iconSize:
|
|
10
|
-
renderActionButton:
|
|
11
|
-
linkText:
|
|
12
|
-
redirectLink:
|
|
13
|
-
linkOnClick:
|
|
14
|
-
linkClass:
|
|
2
|
+
import { j as r } from "../../jsx-runtime-0dcb030c.js";
|
|
3
|
+
import { Link as u } from "react-router-dom";
|
|
4
|
+
function j({
|
|
5
|
+
message: i,
|
|
6
|
+
classname: c,
|
|
7
|
+
Icon: l,
|
|
8
|
+
iconClass: d,
|
|
9
|
+
iconSize: o,
|
|
10
|
+
renderActionButton: n,
|
|
11
|
+
linkText: s,
|
|
12
|
+
redirectLink: e,
|
|
13
|
+
linkOnClick: a,
|
|
14
|
+
linkClass: t,
|
|
15
15
|
internalLink: m,
|
|
16
|
-
styles:
|
|
16
|
+
styles: f
|
|
17
17
|
}) {
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
20
|
-
if (
|
|
21
|
-
return m ? /* @__PURE__ */ r(
|
|
22
|
-
|
|
18
|
+
const p = () => {
|
|
19
|
+
if (s) {
|
|
20
|
+
if (e)
|
|
21
|
+
return m ? /* @__PURE__ */ r.jsx(
|
|
22
|
+
u,
|
|
23
23
|
{
|
|
24
|
-
to:
|
|
25
|
-
onClick:
|
|
24
|
+
to: e,
|
|
25
|
+
onClick: a,
|
|
26
26
|
"data-testid": "info-bar-internal-link",
|
|
27
27
|
className: "cursor dc__link dc__underline-onhover mr-5",
|
|
28
|
-
children:
|
|
28
|
+
children: s
|
|
29
29
|
}
|
|
30
|
-
) : /* @__PURE__ */ r(
|
|
30
|
+
) : /* @__PURE__ */ r.jsx(
|
|
31
31
|
"a",
|
|
32
32
|
{
|
|
33
|
-
href:
|
|
33
|
+
href: e,
|
|
34
34
|
target: "_blank",
|
|
35
|
-
onClick:
|
|
35
|
+
onClick: a,
|
|
36
36
|
"data-testid": "info-bar-redirectLink",
|
|
37
37
|
className: "cursor dc__link dc__underline-onhover mr-5",
|
|
38
|
-
children:
|
|
38
|
+
children: s
|
|
39
39
|
}
|
|
40
40
|
);
|
|
41
41
|
} else
|
|
42
42
|
return null;
|
|
43
|
-
return
|
|
43
|
+
return a && /* @__PURE__ */ r.jsx("div", { onClick: a, className: "cursor dc__link dc__underline-onhover", "data-testid": "info-bar-linkText", children: s });
|
|
44
44
|
};
|
|
45
|
-
return /* @__PURE__ */ r("div", { className: "info-bar-container", children: /* @__PURE__ */
|
|
45
|
+
return /* @__PURE__ */ r.jsx("div", { className: "info-bar-container", children: /* @__PURE__ */ r.jsxs(
|
|
46
46
|
"div",
|
|
47
47
|
{
|
|
48
|
-
className: `${
|
|
49
|
-
style:
|
|
48
|
+
className: `${c} info_text flex dc__content-space pt-8 pb-8 pl-12 pr-12 br-4 top fs-13 fw-4`,
|
|
49
|
+
style: f,
|
|
50
50
|
children: [
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
/* @__PURE__ */ r("div", { className: `icon-dim-${
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
/* @__PURE__ */ r("span", { className:
|
|
55
|
-
|
|
51
|
+
/* @__PURE__ */ r.jsxs("div", { className: `flex top ${typeof n == "function" ? "mr-5" : ""}`, children: [
|
|
52
|
+
/* @__PURE__ */ r.jsx("div", { className: `icon-dim-${o ?? "20"} mr-10`, children: /* @__PURE__ */ r.jsx(l, { className: `icon-dim-${o ?? "20"} ${d || ""} mr-8` }) }),
|
|
53
|
+
/* @__PURE__ */ r.jsxs("div", { className: `info-bar-message-wrapper ${t || ""}`, children: [
|
|
54
|
+
/* @__PURE__ */ r.jsx("span", { className: s && e ? "mr-5" : "", children: i }),
|
|
55
|
+
p()
|
|
56
56
|
] })
|
|
57
57
|
] }),
|
|
58
|
-
typeof
|
|
58
|
+
typeof n == "function" && n()
|
|
59
59
|
]
|
|
60
60
|
}
|
|
61
61
|
) });
|
|
62
62
|
}
|
|
63
63
|
export {
|
|
64
|
-
|
|
64
|
+
j as default
|
|
65
65
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { j as u } from "../../jsx-runtime-0dcb030c.js";
|
|
2
2
|
import m, { useEffect as p } from "react";
|
|
3
|
-
import
|
|
3
|
+
import v from "react-dom";
|
|
4
4
|
const g = ({
|
|
5
5
|
style: d = {},
|
|
6
6
|
children: l,
|
|
@@ -9,23 +9,23 @@ const g = ({
|
|
|
9
9
|
onClick: n = null,
|
|
10
10
|
callbackRef: i = null,
|
|
11
11
|
preventWheelDisable: o = !1,
|
|
12
|
-
noBackDrop:
|
|
12
|
+
noBackDrop: s
|
|
13
13
|
}) => {
|
|
14
14
|
const t = m.useRef(null);
|
|
15
|
-
function
|
|
15
|
+
function r(e) {
|
|
16
16
|
typeof n == "function" && (t && t.current?.contains(e.target) ? n(e, "in") : n(e, "out"));
|
|
17
17
|
}
|
|
18
18
|
function a(e) {
|
|
19
19
|
o || (t?.current.contains(e.target) ? t.current.clientHeight === t.current.scrollHeight && e.preventDefault() : e.preventDefault());
|
|
20
20
|
}
|
|
21
21
|
return p(() => {
|
|
22
|
-
document.addEventListener("click",
|
|
22
|
+
document.addEventListener("click", r);
|
|
23
23
|
let e = document.getElementById("visible-modal");
|
|
24
|
-
return e && e.classList.add("show"),
|
|
25
|
-
o || document.body.removeEventListener("wheel", a), document.removeEventListener("click",
|
|
24
|
+
return e && e.classList.add("show"), s && e.classList.add("no-back-drop"), o || document.body.addEventListener("wheel", a, { passive: !1 }), () => {
|
|
25
|
+
o || document.body.removeEventListener("wheel", a), document.removeEventListener("click", r), e && e.classList.remove("show"), s && e.classList.remove("no-back-drop");
|
|
26
26
|
};
|
|
27
27
|
}, []), v.createPortal(
|
|
28
|
-
/* @__PURE__ */ u(
|
|
28
|
+
/* @__PURE__ */ u.jsx(
|
|
29
29
|
"div",
|
|
30
30
|
{
|
|
31
31
|
tabIndex: 0,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
var c = Object.defineProperty;
|
|
2
|
-
var i = (
|
|
3
|
-
var
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { c as
|
|
8
|
-
class
|
|
2
|
+
var i = (o, e, s) => e in o ? c(o, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : o[e] = s;
|
|
3
|
+
var a = (o, e, s) => (i(o, typeof e != "symbol" ? e + "" : e, s), s);
|
|
4
|
+
import { j as t } from "../../jsx-runtime-0dcb030c.js";
|
|
5
|
+
import m from "react";
|
|
6
|
+
import n from "react-dom";
|
|
7
|
+
import { c as d } from "../../ic-cross-0e71861d.js";
|
|
8
|
+
class g extends m.Component {
|
|
9
9
|
constructor() {
|
|
10
10
|
super(...arguments);
|
|
11
|
-
|
|
11
|
+
a(this, "modalRef", document.getElementById("full-screen-modal"));
|
|
12
12
|
}
|
|
13
13
|
componentDidMount() {
|
|
14
14
|
this.props.noBackground ? this.modalRef.classList.add("show") : this.modalRef.classList.add("show-with-bg");
|
|
@@ -17,16 +17,16 @@ class w extends n.Component {
|
|
|
17
17
|
this.modalRef.classList.remove("show"), this.modalRef.classList.remove("show-with-bg");
|
|
18
18
|
}
|
|
19
19
|
render() {
|
|
20
|
-
const { className:
|
|
21
|
-
return
|
|
22
|
-
/* @__PURE__ */
|
|
20
|
+
const { className: s = "", onHide: l = null } = { ...this.props };
|
|
21
|
+
return n.createPortal(
|
|
22
|
+
/* @__PURE__ */ t.jsxs("div", { className: `full-screen-modal__body-container ${s}`, children: [
|
|
23
23
|
this.props.children,
|
|
24
|
-
typeof l == "function" && /* @__PURE__ */
|
|
24
|
+
typeof l == "function" && /* @__PURE__ */ t.jsx("div", { className: "close-btn icon-dim-24", onClick: (r) => l(!1), "data-testid": "opaque-modal-close", children: /* @__PURE__ */ t.jsx("img", { className: "close-img", src: d, alt: "close" }) })
|
|
25
25
|
] }),
|
|
26
26
|
document.getElementById("full-screen-modal")
|
|
27
27
|
);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
export {
|
|
31
|
-
|
|
31
|
+
g as OpaqueModal
|
|
32
32
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var i = Object.defineProperty;
|
|
2
2
|
var a = (o, e, s) => e in o ? i(o, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : o[e] = s;
|
|
3
3
|
var t = (o, e, s) => (a(o, typeof e != "symbol" ? e + "" : e, s), s);
|
|
4
|
-
import {
|
|
4
|
+
import { j as n } from "../../jsx-runtime-0dcb030c.js";
|
|
5
5
|
import l from "react";
|
|
6
|
-
import
|
|
6
|
+
import r from "react-dom";
|
|
7
7
|
class h extends l.Component {
|
|
8
8
|
constructor(s) {
|
|
9
9
|
super(s);
|
|
@@ -21,7 +21,7 @@ class h extends l.Component {
|
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
23
|
return r.createPortal(
|
|
24
|
-
/* @__PURE__ */ n("div", { className: `visible-modal__body ${this.props.className}`, onClick: this.props?.close, "data-testid": "visible-modal-close", children: this.props.children }),
|
|
24
|
+
/* @__PURE__ */ n.jsx("div", { className: `visible-modal__body ${this.props.className}`, onClick: this.props?.close, "data-testid": "visible-modal-close", children: this.props.children }),
|
|
25
25
|
document.getElementById("visible-modal")
|
|
26
26
|
);
|
|
27
27
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
var i = Object.defineProperty;
|
|
2
|
-
var n = (
|
|
3
|
-
var
|
|
4
|
-
import {
|
|
2
|
+
var n = (t, s, e) => s in t ? i(t, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[s] = e;
|
|
3
|
+
var o = (t, s, e) => (n(t, typeof s != "symbol" ? s + "" : s, e), e);
|
|
4
|
+
import { j as c } from "../../jsx-runtime-0dcb030c.js";
|
|
5
5
|
import d from "react";
|
|
6
|
-
import
|
|
7
|
-
class
|
|
6
|
+
import l from "react-dom";
|
|
7
|
+
class h extends d.Component {
|
|
8
8
|
constructor(e) {
|
|
9
9
|
super(e);
|
|
10
|
-
|
|
10
|
+
o(this, "modalRef", document.getElementById("visible-modal-2"));
|
|
11
11
|
this.escFunction = this.escFunction.bind(this);
|
|
12
12
|
}
|
|
13
13
|
escFunction(e) {
|
|
@@ -21,11 +21,11 @@ class p extends d.Component {
|
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
23
|
return l.createPortal(
|
|
24
|
-
/* @__PURE__ */ c("div", { className: `visible-modal__body ${this.props.className}`, onClick: this.props?.close, "data-testid": "visible-modal2-close", children: this.props.children }),
|
|
24
|
+
/* @__PURE__ */ c.jsx("div", { className: `visible-modal__body ${this.props.className}`, onClick: this.props?.close, "data-testid": "visible-modal2-close", children: this.props.children }),
|
|
25
25
|
document.getElementById("visible-modal-2")
|
|
26
26
|
);
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
export {
|
|
30
|
-
|
|
30
|
+
h as VisibleModal2
|
|
31
31
|
};
|
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c
|
|
3
|
-
import * as
|
|
4
|
-
const
|
|
1
|
+
import { j as l } from "../jsx-runtime-0dcb030c.js";
|
|
2
|
+
import { c, R as x } from "../react-select.esm-97f26847.js";
|
|
3
|
+
import * as i from "react";
|
|
4
|
+
const h = (e) => /* @__PURE__ */ i.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 28 28", width: 24, height: 24, ...e }, /* @__PURE__ */ i.createElement("g", { fill: "none", fillRule: "evenodd", transform: "translate(2 2)" }, /* @__PURE__ */ i.createElement("rect", { width: 20, height: 20, fill: "#B1B7BC", rx: 10 }), /* @__PURE__ */ i.createElement("path", { fill: "#FFF", fillRule: "nonzero", d: "M6.464 6.464a1 1 0 0 1 1.415 0l2.12 2.12 2.122-2.12a1 1 0 0 1 1.32-.083l.095.083a1 1 0 0 1 0 1.415l-2.122 2.12 2.122 2.122a1 1 0 0 1 .083 1.32l-.083.095a1 1 0 0 1-1.415 0L10 11.414l-2.121 2.122a1 1 0 0 1-1.32.083l-.095-.083a1 1 0 0 1 0-1.415L8.584 10l-2.12-2.121a1 1 0 0 1-.083-1.32z" }))), p = (e) => /* @__PURE__ */ i.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, viewBox: "0 0 24 24", ...e }, /* @__PURE__ */ i.createElement("g", { fill: "none", fillRule: "evenodd" }, /* @__PURE__ */ i.createElement("path", { stroke: "#06C", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M3.898 12.564l4.95 4.95L19.455 6.906" }))), f = (e) => /* @__PURE__ */ i.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 20, height: 21, viewBox: "0 0 20 21", ...e }, /* @__PURE__ */ i.createElement("g", { fill: "none", fillRule: "evenodd" }, /* @__PURE__ */ i.createElement("path", { fill: "#FDE7E7", stroke: "#F33E3E", strokeLinejoin: "round", strokeWidth: 2, d: "M10 1.667C5.4 1.667 1.667 5.4 1.667 10S5.4 18.333 10 18.333 18.333 14.6 18.333 10 14.6 1.667 10 1.667z" }), /* @__PURE__ */ i.createElement("path", { fill: "#F33E3E", d: "M10 10.833c.46 0 .833-.373.833-.833V6.667c0-.46-.373-.834-.833-.834-.46 0-.833.373-.833.834V10c0 .46.373.833.833.833zm0 3.334c.46 0 .833-.373.833-.834 0-.46-.373-.833-.833-.833-.46 0-.833.373-.833.833 0 .46.373.834.833.834z" }))), w = (e) => {
|
|
5
5
|
const { selectOption: t, data: n } = e;
|
|
6
|
-
return /* @__PURE__ */
|
|
7
|
-
/* @__PURE__ */ l(
|
|
6
|
+
return /* @__PURE__ */ l.jsxs("div", { className: "flex left pl-12", style: { background: e.isFocused ? "var(--N100)" : "transparent" }, children: [
|
|
7
|
+
/* @__PURE__ */ l.jsx(
|
|
8
8
|
"input",
|
|
9
9
|
{
|
|
10
10
|
checked: e.isSelected,
|
|
11
11
|
disabled: e.isDisabled,
|
|
12
|
-
onChange: (
|
|
12
|
+
onChange: (s) => t(n),
|
|
13
13
|
type: "checkbox",
|
|
14
14
|
style: { height: "16px", width: "16px", flex: "0 0 16px" },
|
|
15
15
|
className: "mr-8"
|
|
16
16
|
}
|
|
17
17
|
),
|
|
18
|
-
/* @__PURE__ */ l(
|
|
18
|
+
/* @__PURE__ */ l.jsx(c.Option, { ...e })
|
|
19
19
|
] });
|
|
20
|
-
},
|
|
21
|
-
const { selectOption: t, data: n } = e,
|
|
22
|
-
return /* @__PURE__ */
|
|
23
|
-
e.isSelected ? /* @__PURE__ */ l(
|
|
24
|
-
/* @__PURE__ */ l(
|
|
20
|
+
}, j = (e) => {
|
|
21
|
+
const { selectOption: t, data: n } = e, s = { height: "16px", width: "16px", flex: "0 0 16px" }, r = (o) => t(n);
|
|
22
|
+
return /* @__PURE__ */ l.jsxs("div", { className: "flex left pl-12", style: { background: e.isFocused ? "var(--N100)" : "transparent" }, children: [
|
|
23
|
+
e.isSelected ? /* @__PURE__ */ l.jsx(p, { onClick: r, className: "mr-8 icon-dim-16", style: s }) : /* @__PURE__ */ l.jsx("span", { onClick: r, className: "mr-8", style: s }),
|
|
24
|
+
/* @__PURE__ */ l.jsx(c.Option, { ...e })
|
|
25
25
|
] });
|
|
26
|
-
},
|
|
27
|
-
const { children: t, data: n, innerProps:
|
|
28
|
-
return /* @__PURE__ */ c
|
|
29
|
-
/* @__PURE__ */ l("div", { className: "flex fs-12 ml-4 cn-9", children:
|
|
26
|
+
}, E = (e) => {
|
|
27
|
+
const { children: t, data: n, innerProps: s, selectProps: r } = e, { label: o, value: a } = n;
|
|
28
|
+
return /* @__PURE__ */ l.jsxs(c.MultiValueContainer, { data: n, innerProps: s, selectProps: r, children: [
|
|
29
|
+
/* @__PURE__ */ l.jsx("div", { className: "flex fs-12 ml-4 cn-9", children: o }),
|
|
30
30
|
t[1]
|
|
31
31
|
] });
|
|
32
|
-
},
|
|
32
|
+
}, C = (e) => {
|
|
33
33
|
const {
|
|
34
|
-
children: t = /* @__PURE__ */ l(
|
|
34
|
+
children: t = /* @__PURE__ */ l.jsx(h, { className: "icon-dim-24" }),
|
|
35
35
|
getStyles: n,
|
|
36
|
-
innerProps: { ref:
|
|
36
|
+
innerProps: { ref: s, ...r }
|
|
37
37
|
} = e;
|
|
38
|
-
return /* @__PURE__ */ l("div", { ...
|
|
39
|
-
},
|
|
38
|
+
return /* @__PURE__ */ l.jsx("div", { ...r, ref: s, style: n("clearIndicator", e), children: /* @__PURE__ */ l.jsx("div", { className: "flex pointer", children: t }) });
|
|
39
|
+
}, k = (e) => {
|
|
40
40
|
const {
|
|
41
41
|
data: t,
|
|
42
|
-
innerProps: { onClick: n, onMouseDown:
|
|
43
|
-
selectProps:
|
|
42
|
+
innerProps: { onClick: n, onMouseDown: s },
|
|
43
|
+
selectProps: r
|
|
44
44
|
} = e;
|
|
45
|
-
return /* @__PURE__ */ l(
|
|
46
|
-
|
|
45
|
+
return /* @__PURE__ */ l.jsx(c.MultiValueRemove, { ...e, children: /* @__PURE__ */ l.jsx(
|
|
46
|
+
h,
|
|
47
47
|
{
|
|
48
48
|
onClick: n,
|
|
49
|
-
onMouseDown:
|
|
50
|
-
onClick: (
|
|
49
|
+
onMouseDown: s,
|
|
50
|
+
onClick: (o) => n(t),
|
|
51
51
|
style: { height: "18px", width: "18px" }
|
|
52
52
|
}
|
|
53
53
|
) });
|
|
54
|
-
},
|
|
55
|
-
const { children:
|
|
56
|
-
return t &&
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
!m && /* @__PURE__ */ l(
|
|
59
|
-
/* @__PURE__ */ l("div", { className: `dc__ellipsis-right ${m ? "cn-9" : "cr-5"}`, children:
|
|
54
|
+
}, N = ({ validator: e, isAllSelected: t = !1, ...n }) => {
|
|
55
|
+
const { children: s, data: r, innerProps: o, selectProps: a } = n, { label: u, value: d } = r, m = e ? e(d) : !0;
|
|
56
|
+
return t && d !== "*" ? null : /* @__PURE__ */ l.jsxs(c.MultiValueContainer, { data: r, innerProps: o, selectProps: a, children: [
|
|
57
|
+
/* @__PURE__ */ l.jsxs("div", { className: "flex left fs-12 pl-4 pr-4 dc__ellipsis-right", children: [
|
|
58
|
+
!m && /* @__PURE__ */ l.jsx(f, { className: "mr-4 icon-dim-16" }),
|
|
59
|
+
/* @__PURE__ */ l.jsx("div", { className: `dc__ellipsis-right ${m ? "cn-9" : "cr-5"}`, children: u })
|
|
60
60
|
] }),
|
|
61
|
-
|
|
61
|
+
s[1]
|
|
62
62
|
] });
|
|
63
|
-
},
|
|
63
|
+
}, S = {
|
|
64
64
|
control: (e, t) => ({
|
|
65
65
|
...e,
|
|
66
66
|
cursor: t.isDisabled ? "not-allowed" : "normal",
|
|
@@ -84,14 +84,14 @@ const u = (e) => /* @__PURE__ */ r.createElement("svg", { xmlns: "http://www.w3.
|
|
|
84
84
|
...e,
|
|
85
85
|
color: t.selectProps.menuIsOpen ? "var(--N500)" : e.color
|
|
86
86
|
})
|
|
87
|
-
},
|
|
87
|
+
}, b = (e) => /* @__PURE__ */ l.jsx(x, { ...e });
|
|
88
88
|
export {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
89
|
+
C as ClearIndicator,
|
|
90
|
+
b as CustomSelect,
|
|
91
|
+
N as MultiValueChipContainer,
|
|
92
|
+
E as MultiValueContainer,
|
|
93
|
+
k as MultiValueRemove,
|
|
94
|
+
w as Option,
|
|
95
|
+
j as SingleSelectOption,
|
|
96
|
+
S as multiSelectStyles
|
|
97
97
|
};
|
|
@@ -1,49 +1,52 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useState as
|
|
3
|
-
import "../../Helper-
|
|
1
|
+
import { j as e } from "../../jsx-runtime-0dcb030c.js";
|
|
2
|
+
import { useState as m, useRef as x } from "react";
|
|
3
|
+
import "../../Helper-a0caa238.js";
|
|
4
4
|
import "../Constants.js";
|
|
5
|
-
import { useClickOutside as
|
|
6
|
-
import { getDefaultPageValueOptions as
|
|
7
|
-
const
|
|
8
|
-
optionValue:
|
|
9
|
-
options:
|
|
10
|
-
setOptions:
|
|
11
|
-
handleCloseDropdown:
|
|
5
|
+
import { useClickOutside as j } from "../Hooks/UseClickOutside/UseClickOutside.js";
|
|
6
|
+
import { getDefaultPageValueOptions as h } from "./utils.js";
|
|
7
|
+
const g = ({
|
|
8
|
+
optionValue: s,
|
|
9
|
+
options: c,
|
|
10
|
+
setOptions: i,
|
|
11
|
+
handleCloseDropdown: r,
|
|
12
12
|
changePageSize: n
|
|
13
|
-
}) =>
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
}) => {
|
|
14
|
+
const o = () => {
|
|
15
|
+
const a = c.map((l) => ({
|
|
16
|
+
value: l.value,
|
|
17
|
+
selected: l.value === s
|
|
18
|
+
}));
|
|
19
|
+
i([...a]), r(), n(s);
|
|
20
|
+
};
|
|
21
|
+
return /* @__PURE__ */ e.jsx("div", { className: "select__item", onClick: o, children: s }, s);
|
|
22
|
+
}, C = ({ pageSizeOptions: s, pageSize: c, changePageSize: i }) => {
|
|
23
|
+
const r = h(s).map((t) => ({
|
|
21
24
|
value: t.value,
|
|
22
|
-
selected: t.value ===
|
|
23
|
-
})), [n,
|
|
24
|
-
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
}, p =
|
|
28
|
-
|
|
29
|
-
const u = a.find((t) => t.selected),
|
|
30
|
-
return /* @__PURE__ */
|
|
31
|
-
n && /* @__PURE__ */
|
|
32
|
-
|
|
25
|
+
selected: t.value === c
|
|
26
|
+
})), [n, o] = m(!1), [a, l] = m(r), d = () => {
|
|
27
|
+
o(!1);
|
|
28
|
+
}, f = () => {
|
|
29
|
+
o(!n);
|
|
30
|
+
}, p = x(null);
|
|
31
|
+
j(p, d);
|
|
32
|
+
const u = a.find((t) => t.selected), v = n ? "fa fa-caret-up" : "fa fa-caret-down";
|
|
33
|
+
return /* @__PURE__ */ e.jsxs("div", { ref: p, children: [
|
|
34
|
+
n && /* @__PURE__ */ e.jsx("div", { className: "pagination__select-menu", children: a.map((t) => /* @__PURE__ */ e.jsx(
|
|
35
|
+
g,
|
|
33
36
|
{
|
|
34
37
|
optionValue: t.value,
|
|
35
38
|
options: a,
|
|
36
39
|
setOptions: l,
|
|
37
40
|
handleCloseDropdown: d,
|
|
38
|
-
changePageSize:
|
|
41
|
+
changePageSize: i
|
|
39
42
|
}
|
|
40
43
|
)) }),
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
+
/* @__PURE__ */ e.jsxs("button", { type: "button", className: "select__button", onClick: f, children: [
|
|
45
|
+
/* @__PURE__ */ e.jsx("span", { children: u ? u.value : "" }),
|
|
46
|
+
/* @__PURE__ */ e.jsx("span", { className: "select__icon", children: /* @__PURE__ */ e.jsx("i", { className: v }) })
|
|
44
47
|
] })
|
|
45
48
|
] });
|
|
46
49
|
};
|
|
47
50
|
export {
|
|
48
|
-
|
|
51
|
+
C as default
|
|
49
52
|
};
|
|
@@ -1,89 +1,92 @@
|
|
|
1
1
|
import "../../assets/Pagination.css";
|
|
2
|
-
import {
|
|
3
|
-
import { useState as
|
|
4
|
-
import
|
|
5
|
-
import { createPageArr as
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
import { j as e } from "../../jsx-runtime-0dcb030c.js";
|
|
3
|
+
import { useState as f, useEffect as p } from "react";
|
|
4
|
+
import v from "./PageSizeSelector.js";
|
|
5
|
+
import { createPageArr as u } from "./utils.js";
|
|
6
|
+
const k = ({ value: a, isSelected: t, selectPage: c }) => {
|
|
7
|
+
const o = t ? "page__button page__button--selected" : "page__button", r = () => {
|
|
8
|
+
c(a);
|
|
9
|
+
};
|
|
10
|
+
return /* @__PURE__ */ e.jsx("li", { className: "page", children: /* @__PURE__ */ e.jsx("button", { className: o, onClick: r, type: "button", children: a }) });
|
|
11
|
+
}, V = ({
|
|
12
|
+
size: a,
|
|
13
|
+
pageSize: t,
|
|
11
14
|
offset: c,
|
|
12
|
-
changePage:
|
|
13
|
-
changePageSize:
|
|
14
|
-
isPageSizeFix:
|
|
15
|
-
pageSizeOptions:
|
|
15
|
+
changePage: o,
|
|
16
|
+
changePageSize: r,
|
|
17
|
+
isPageSizeFix: x,
|
|
18
|
+
pageSizeOptions: N,
|
|
16
19
|
rootClassName: b
|
|
17
20
|
}) => {
|
|
18
|
-
const [n,
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
}, [
|
|
23
|
-
const
|
|
24
|
-
r(l);
|
|
25
|
-
}, [c]);
|
|
26
|
-
const i = (e) => {
|
|
27
|
-
const l = g({ size: t, pageSize: s, selectedPageNo: e });
|
|
28
|
-
r(l), u(e);
|
|
29
|
-
}, _ = () => {
|
|
30
|
-
const l = n.find((d) => d.selected).value - 1;
|
|
31
|
-
i(l);
|
|
32
|
-
}, f = () => {
|
|
33
|
-
const l = n.find((d) => d.selected).value + 1;
|
|
21
|
+
const [n, i] = f([]);
|
|
22
|
+
p(() => {
|
|
23
|
+
const s = u({ size: a, pageSize: t, selectedPageNo: 1 });
|
|
24
|
+
i(s);
|
|
25
|
+
}, [a, t]), p(() => {
|
|
26
|
+
const s = 1 + Math.floor(c / t), l = u({ size: a, pageSize: t, selectedPageNo: s });
|
|
34
27
|
i(l);
|
|
35
|
-
},
|
|
28
|
+
}, [c]);
|
|
29
|
+
const d = (s) => {
|
|
30
|
+
const l = u({ size: a, pageSize: t, selectedPageNo: s });
|
|
31
|
+
i(l), o(s);
|
|
32
|
+
}, h = () => {
|
|
33
|
+
const l = n.find((g) => g.selected).value - 1;
|
|
34
|
+
d(l);
|
|
35
|
+
}, P = () => {
|
|
36
|
+
const l = n.find((g) => g.selected).value + 1;
|
|
37
|
+
d(l);
|
|
38
|
+
}, j = c + t < a ? c + t : a, m = n.findIndex((s) => s.selected), _ = n.filter((s) => s.isVisible);
|
|
36
39
|
return (
|
|
37
40
|
// TODO: Remove pagination-wrapper from dashboard
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ e.jsxs("div", { className: b || "", children: [
|
|
42
|
+
/* @__PURE__ */ e.jsxs("div", { className: "page-number", children: [
|
|
40
43
|
c + 1,
|
|
41
44
|
" - ",
|
|
42
|
-
|
|
45
|
+
j,
|
|
43
46
|
" of ",
|
|
44
|
-
|
|
47
|
+
a
|
|
45
48
|
] }),
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ e.jsxs("ul", { className: "pagination", children: [
|
|
50
|
+
/* @__PURE__ */ e.jsx("li", { className: "page", children: /* @__PURE__ */ e.jsx(
|
|
48
51
|
"button",
|
|
49
52
|
{
|
|
50
53
|
className: "page__button page__button--icon",
|
|
51
|
-
disabled: !
|
|
52
|
-
onClick:
|
|
54
|
+
disabled: !m,
|
|
55
|
+
onClick: h,
|
|
53
56
|
type: "button",
|
|
54
57
|
"aria-label": "Previous page",
|
|
55
|
-
children: /* @__PURE__ */
|
|
58
|
+
children: /* @__PURE__ */ e.jsx("span", { className: "left-icon", children: /* @__PURE__ */ e.jsx("i", { className: "fa fa-chevron-left" }) })
|
|
56
59
|
}
|
|
57
60
|
) }),
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
_.map((s) => /* @__PURE__ */ e.jsx(
|
|
62
|
+
k,
|
|
60
63
|
{
|
|
61
|
-
value:
|
|
62
|
-
isSelected:
|
|
63
|
-
selectPage:
|
|
64
|
+
value: s.value,
|
|
65
|
+
isSelected: s.selected,
|
|
66
|
+
selectPage: d
|
|
64
67
|
},
|
|
65
|
-
|
|
68
|
+
s.value
|
|
66
69
|
)),
|
|
67
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ e.jsx("li", { className: "page", children: /* @__PURE__ */ e.jsx(
|
|
68
71
|
"button",
|
|
69
72
|
{
|
|
70
73
|
className: "page__button page__button--icon",
|
|
71
|
-
disabled:
|
|
72
|
-
onClick:
|
|
74
|
+
disabled: m === n.length - 1,
|
|
75
|
+
onClick: P,
|
|
73
76
|
type: "button",
|
|
74
77
|
"aria-label": "Next page",
|
|
75
|
-
children: /* @__PURE__ */
|
|
78
|
+
children: /* @__PURE__ */ e.jsx("span", { className: "left-icon", children: /* @__PURE__ */ e.jsx("i", { className: "fa fa-chevron-right" }) })
|
|
76
79
|
}
|
|
77
80
|
) })
|
|
78
81
|
] }),
|
|
79
|
-
!
|
|
80
|
-
/* @__PURE__ */
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
-
|
|
82
|
+
!x && /* @__PURE__ */ e.jsxs("div", { className: "select", children: [
|
|
83
|
+
/* @__PURE__ */ e.jsx("span", { className: "select__placeholder", children: "Rows per page" }),
|
|
84
|
+
/* @__PURE__ */ e.jsx(
|
|
85
|
+
v,
|
|
83
86
|
{
|
|
84
|
-
pageSizeOptions:
|
|
85
|
-
pageSize:
|
|
86
|
-
changePageSize:
|
|
87
|
+
pageSizeOptions: N,
|
|
88
|
+
pageSize: t,
|
|
89
|
+
changePageSize: r
|
|
87
90
|
}
|
|
88
91
|
)
|
|
89
92
|
] })
|
|
@@ -91,5 +94,5 @@ const C = ({ value: t, isSelected: s, selectPage: c }) => /* @__PURE__ */ a("li"
|
|
|
91
94
|
);
|
|
92
95
|
};
|
|
93
96
|
export {
|
|
94
|
-
|
|
97
|
+
V as default
|
|
95
98
|
};
|