@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.
Files changed (113) hide show
  1. package/dist/{CodeEditor-0a5bfd53.js → CodeEditor-3c2aaef5.js} +11082 -11082
  2. package/dist/Common/AddCDButton/AddCDButton.js +24 -24
  3. package/dist/Common/AppStatus/AppStatus.js +16 -16
  4. package/dist/Common/BreadCrumb/BreadCrumb.js +43 -43
  5. package/dist/Common/BreadCrumb/BreadcrumbStore.js +9 -9
  6. package/dist/Common/ChartVersionAndTypeSelector.js +42 -42
  7. package/dist/Common/Checkbox.js +8 -8
  8. package/dist/Common/ClipboardButton/ClipboardButton.js +17 -17
  9. package/dist/Common/ClipboardButton/__tests__/ClipboardButton.test.js +10 -10
  10. package/dist/Common/CodeEditor/CodeEditor.js +4 -4
  11. package/dist/Common/Common.service.js +1 -1
  12. package/dist/Common/CustomInput/CustomInput.js +56 -56
  13. package/dist/Common/CustomTagSelector/PropagateTagInfo.js +22 -22
  14. package/dist/Common/CustomTagSelector/ResizableTagTextArea.js +22 -22
  15. package/dist/Common/CustomTagSelector/TagDetails.js +33 -33
  16. package/dist/Common/CustomTagSelector/TagLabelSelect.js +33 -33
  17. package/dist/Common/CustomTagSelector/TagLabelValueSelector.js +83 -83
  18. package/dist/Common/DebouncedSearch/DebouncedSearch.js +24 -24
  19. package/dist/Common/DebouncedSearch/__tests__/DebouncedSearch.test.js +16 -16
  20. package/dist/Common/DeleteComponentModal/DeleteComponent.js +49 -49
  21. package/dist/Common/DevtronProgressing/DevtronProgressing.js +2 -2
  22. package/dist/Common/Dialogs/ConfirmationDialog.js +14 -14
  23. package/dist/Common/Dialogs/DeleteDialog.js +24 -24
  24. package/dist/Common/Dialogs/DialogForm.js +21 -21
  25. package/dist/Common/Dialogs/ForceDeleteDialog.js +12 -12
  26. package/dist/Common/DraggableWrapper/DraggableButton.js +6 -6
  27. package/dist/Common/DraggableWrapper/DraggableWrapper.js +42 -1468
  28. package/dist/Common/Drawer/Drawer.js +6 -6
  29. package/dist/Common/EmptyState/EmptyState.js +19 -19
  30. package/dist/Common/EmptyState/GenericEmptyState.js +25 -25
  31. package/dist/Common/Error.js +6 -6
  32. package/dist/Common/ErrorScreenNotFound.js +3 -3
  33. package/dist/Common/Grid/Grid.js +11 -11
  34. package/dist/Common/Helper.js +3 -3
  35. package/dist/Common/Hooks/UseSuperAdmin/UseSuperAdmin.js +1 -1
  36. package/dist/Common/ImageTags.js +224 -221
  37. package/dist/Common/InfoColorBar/InfoColourbar.js +37 -37
  38. package/dist/Common/Modals/Modal.js +8 -8
  39. package/dist/Common/Modals/OpaqueModal.js +13 -13
  40. package/dist/Common/Modals/VisibleModal.js +3 -3
  41. package/dist/Common/Modals/VisibleModal2.js +8 -8
  42. package/dist/Common/MultiSelectCustomization.js +45 -45
  43. package/dist/Common/Pagination/PageSizeSelector.js +37 -34
  44. package/dist/Common/Pagination/Pagination.js +60 -57
  45. package/dist/Common/PopupMenu.js +32 -32
  46. package/dist/Common/Progressing.js +20 -20
  47. package/dist/Common/RJSF/Form.js +14 -9877
  48. package/dist/Common/RJSF/common/FieldRow.js +16 -16
  49. package/dist/Common/RJSF/config.js +3 -3
  50. package/dist/Common/RJSF/templates/ArrayFieldItemTemplate.js +13 -13
  51. package/dist/Common/RJSF/templates/ArrayFieldTemplate.js +37 -40
  52. package/dist/Common/RJSF/templates/BaseInput.js +14 -6
  53. package/dist/Common/RJSF/templates/ButtonTemplates/AddButton.js +6 -6
  54. package/dist/Common/RJSF/templates/ButtonTemplates/RemoveButton.js +3 -3
  55. package/dist/Common/RJSF/templates/ButtonTemplates/SubmitButton.js +6 -8
  56. package/dist/Common/RJSF/templates/Description.js +6 -6
  57. package/dist/Common/RJSF/templates/Field.js +12 -15
  58. package/dist/Common/RJSF/templates/FieldErrorTemplate.js +8 -10
  59. package/dist/Common/RJSF/templates/ObjectFieldTemplate.js +35 -40
  60. package/dist/Common/RJSF/templates/TitleField.js +5 -5
  61. package/dist/Common/RJSF/templates/WrapIfAdditionalTemplate.js +23 -24
  62. package/dist/Common/RJSF/templates/index.js +3 -3
  63. package/dist/Common/RJSF/utils.js +9 -12
  64. package/dist/Common/RJSF/widgets/Checkbox.js +20 -20
  65. package/dist/Common/RJSF/widgets/Select.js +609 -40
  66. package/dist/Common/RadioGroup/RadioGroup.js +32 -32
  67. package/dist/Common/RadioGroup.js +17 -17
  68. package/dist/Common/Reload.js +10 -10
  69. package/dist/Common/ResizableTextarea.js +11 -11
  70. package/dist/Common/SearchBar/SearchBar.component.js +26 -26
  71. package/dist/Common/Security/ScanVulnerabilitiesTable.js +20 -20
  72. package/dist/Common/Select/Select.js +93 -93
  73. package/dist/Common/TippyCustomized.js +4 -4
  74. package/dist/Common/ToastBody.js +22 -22
  75. package/dist/Common/Toggle/Toggle.js +15 -15
  76. package/dist/Common/index.js +3 -3
  77. package/dist/{Helper-e1262739.js → Helper-a0caa238.js} +916 -916
  78. package/dist/TippyCustomized-7b9b46b9.js +124 -0
  79. package/dist/{_commonjsHelpers-c5d32002.js → _commonjsHelpers-aeeeeb92.js} +2 -2
  80. package/dist/{cssMode-c259da7f.js → cssMode-c5cae484.js} +1 -1
  81. package/dist/{freemarker2-d852fa33.js → freemarker2-b9a8615c.js} +1 -1
  82. package/dist/{handlebars-7e868cd0.js → handlebars-3803af36.js} +1 -1
  83. package/dist/{html-1faea799.js → html-498f0150.js} +1 -1
  84. package/dist/{htmlMode-175871d9.js → htmlMode-a8ae8cc5.js} +1 -1
  85. package/dist/index.js +3 -3
  86. package/dist/{javascript-46245cbe.js → javascript-4363ced3.js} +1 -1
  87. package/dist/{jsonMode-bbe5176f.js → jsonMode-80290b9e.js} +1 -1
  88. package/dist/jsx-runtime-0dcb030c.js +667 -0
  89. package/dist/{liquid-e6b820e1.js → liquid-1398df0a.js} +1 -1
  90. package/dist/{python-7d292338.js → python-dd2d43e8.js} +1 -1
  91. package/dist/{razor-c6ab49dd.js → razor-20a66096.js} +1 -1
  92. package/dist/{react-select.esm-27b8d563.js → react-select.esm-97f26847.js} +1280 -1112
  93. package/dist/{react-toastify.esm-e28f7200.js → react-toastify.esm-1042de65.js} +149 -155
  94. package/dist/{react.esm-5465a283.js → react.esm-2c92920f.js} +4929 -4393
  95. package/dist/{tippy-react.esm-d5c56a0a.js → tippy-react.esm-8dc66a75.js} +89 -89
  96. package/dist/{tsMode-4d1329d1.js → tsMode-3fa4eb6a.js} +1 -1
  97. package/dist/{typescript-402306e6.js → typescript-1bbaf605.js} +1 -1
  98. package/dist/{xml-8975e1f9.js → xml-a2693dbd.js} +1 -1
  99. package/dist/{yaml-680c02bf.js → yaml-01ce4fdd.js} +1 -1
  100. package/package.json +3 -12
  101. package/dist/BaseInput-8101e714.js +0 -1686
  102. package/dist/Common/UseWindowSize.d.ts +0 -4
  103. package/dist/Common/UseWindowSize.js +0 -20
  104. package/dist/TippyCustomized-c58fd46a.js +0 -124
  105. package/dist/canExpand-ab1f6741.js +0 -10
  106. package/dist/englishStringTranslator-2c9a30fc.js +0 -17
  107. package/dist/enums-d0bd3f97.js +0 -6618
  108. package/dist/getSubmitButtonOptions-a1be9bb0.js +0 -20
  109. package/dist/getTemplate-91d3260d.js +0 -11
  110. package/dist/getUiOptions-844b45a7.js +0 -10
  111. package/dist/idGenerators-0b33693c.js +0 -35
  112. package/dist/index-5a231705.js +0 -17417
  113. package/dist/index-c855d89c.js +0 -173
@@ -1,65 +1,65 @@
1
1
  import "../../assets/InfoColourbar.css";
2
- import { jsx as r, jsxs as s } from "react/jsx-runtime";
3
- import { Link as _ } from "react-router-dom";
4
- function b({
5
- message: c,
6
- classname: l,
7
- Icon: d,
8
- iconClass: t,
9
- iconSize: i,
10
- renderActionButton: o,
11
- linkText: e,
12
- redirectLink: a,
13
- linkOnClick: n,
14
- linkClass: f,
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: p
16
+ styles: f
17
17
  }) {
18
- const u = () => {
19
- if (e) {
20
- if (a)
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: a,
25
- onClick: n,
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: e
28
+ children: s
29
29
  }
30
- ) : /* @__PURE__ */ r(
30
+ ) : /* @__PURE__ */ r.jsx(
31
31
  "a",
32
32
  {
33
- href: a,
33
+ href: e,
34
34
  target: "_blank",
35
- onClick: n,
35
+ onClick: a,
36
36
  "data-testid": "info-bar-redirectLink",
37
37
  className: "cursor dc__link dc__underline-onhover mr-5",
38
- children: e
38
+ children: s
39
39
  }
40
40
  );
41
41
  } else
42
42
  return null;
43
- return n && /* @__PURE__ */ r("div", { onClick: n, className: "cursor dc__link dc__underline-onhover", "data-testid": "info-bar-linkText", children: e });
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__ */ s(
45
+ return /* @__PURE__ */ r.jsx("div", { className: "info-bar-container", children: /* @__PURE__ */ r.jsxs(
46
46
  "div",
47
47
  {
48
- className: `${l} info_text flex dc__content-space pt-8 pb-8 pl-12 pr-12 br-4 top fs-13 fw-4`,
49
- style: p,
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__ */ s("div", { className: `flex top ${typeof o == "function" ? "mr-5" : ""}`, children: [
52
- /* @__PURE__ */ r("div", { className: `icon-dim-${i ?? "20"} mr-10`, children: /* @__PURE__ */ r(d, { className: `icon-dim-${i ?? "20"} ${t || ""} mr-8` }) }),
53
- /* @__PURE__ */ s("div", { className: `info-bar-message-wrapper ${f || ""}`, children: [
54
- /* @__PURE__ */ r("span", { className: e && a ? "mr-5" : "", children: c }),
55
- u()
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 o == "function" && o()
58
+ typeof n == "function" && n()
59
59
  ]
60
60
  }
61
61
  ) });
62
62
  }
63
63
  export {
64
- b as default
64
+ j as default
65
65
  };
@@ -1,6 +1,6 @@
1
- import { jsx as u } from "react/jsx-runtime";
1
+ import { j as u } from "../../jsx-runtime-0dcb030c.js";
2
2
  import m, { useEffect as p } from "react";
3
- import { R as v } from "../../index-5a231705.js";
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: r
12
+ noBackDrop: s
13
13
  }) => {
14
14
  const t = m.useRef(null);
15
- function s(e) {
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", s);
22
+ document.addEventListener("click", r);
23
23
  let e = document.getElementById("visible-modal");
24
- return e && e.classList.add("show"), r && e.classList.add("no-back-drop"), o || document.body.addEventListener("wheel", a, { passive: !1 }), () => {
25
- o || document.body.removeEventListener("wheel", a), document.removeEventListener("click", s), e && e.classList.remove("show"), r && e.classList.remove("no-back-drop");
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 = (s, e, o) => e in s ? c(s, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : s[e] = o;
3
- var t = (s, e, o) => (i(s, typeof e != "symbol" ? e + "" : e, o), o);
4
- import { jsxs as m, jsx as a } from "react/jsx-runtime";
5
- import n from "react";
6
- import { R as d } from "../../index-5a231705.js";
7
- import { c as r } from "../../ic-cross-0e71861d.js";
8
- class w extends n.Component {
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
- t(this, "modalRef", document.getElementById("full-screen-modal"));
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: o = "", onHide: l = null } = { ...this.props };
21
- return d.createPortal(
22
- /* @__PURE__ */ m("div", { className: `full-screen-modal__body-container ${o}`, children: [
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__ */ a("div", { className: "close-btn icon-dim-24", onClick: (f) => l(!1), "data-testid": "opaque-modal-close", children: /* @__PURE__ */ a("img", { className: "close-img", src: r, alt: "close" }) })
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
- w as OpaqueModal
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 { jsx as n } from "react/jsx-runtime";
4
+ import { j as n } from "../../jsx-runtime-0dcb030c.js";
5
5
  import l from "react";
6
- import { R as r } from "../../index-5a231705.js";
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 = (s, o, e) => o in s ? i(s, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[o] = e;
3
- var t = (s, o, e) => (n(s, typeof o != "symbol" ? o + "" : o, e), e);
4
- import { jsx as c } from "react/jsx-runtime";
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 { R as l } from "../../index-5a231705.js";
7
- class p extends d.Component {
6
+ import l from "react-dom";
7
+ class h extends d.Component {
8
8
  constructor(e) {
9
9
  super(e);
10
- t(this, "modalRef", document.getElementById("visible-modal-2"));
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
- p as VisibleModal2
30
+ h as VisibleModal2
31
31
  };
@@ -1,66 +1,66 @@
1
- import { jsxs as c, jsx as l } from "react/jsx-runtime";
2
- import { c as a, R as f } from "../react-select.esm-27b8d563.js";
3
- import * as r from "react";
4
- const u = (e) => /* @__PURE__ */ r.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 28 28", width: 24, height: 24, ...e }, /* @__PURE__ */ r.createElement("g", { fill: "none", fillRule: "evenodd", transform: "translate(2 2)" }, /* @__PURE__ */ r.createElement("rect", { width: 20, height: 20, fill: "#B1B7BC", rx: 10 }), /* @__PURE__ */ r.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" }))), g = (e) => /* @__PURE__ */ r.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, viewBox: "0 0 24 24", ...e }, /* @__PURE__ */ r.createElement("g", { fill: "none", fillRule: "evenodd" }, /* @__PURE__ */ r.createElement("path", { stroke: "#06C", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M3.898 12.564l4.95 4.95L19.455 6.906" }))), v = (e) => /* @__PURE__ */ r.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 20, height: 21, viewBox: "0 0 20 21", ...e }, /* @__PURE__ */ r.createElement("g", { fill: "none", fillRule: "evenodd" }, /* @__PURE__ */ r.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__ */ r.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" }))), E = (e) => {
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__ */ c("div", { className: "flex left pl-12", style: { background: e.isFocused ? "var(--N100)" : "transparent" }, children: [
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: (i) => t(n),
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(a.Option, { ...e })
18
+ /* @__PURE__ */ l.jsx(c.Option, { ...e })
19
19
  ] });
20
- }, C = (e) => {
21
- const { selectOption: t, data: n } = e, i = { height: "16px", width: "16px", flex: "0 0 16px" }, o = (s) => t(n);
22
- return /* @__PURE__ */ c("div", { className: "flex left pl-12", style: { background: e.isFocused ? "var(--N100)" : "transparent" }, children: [
23
- e.isSelected ? /* @__PURE__ */ l(g, { onClick: o, className: "mr-8 icon-dim-16", style: i }) : /* @__PURE__ */ l("span", { onClick: o, className: "mr-8", style: i }),
24
- /* @__PURE__ */ l(a.Option, { ...e })
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
- }, k = (e) => {
27
- const { children: t, data: n, innerProps: i, selectProps: o } = e, { label: s, value: d } = n;
28
- return /* @__PURE__ */ c(a.MultiValueContainer, { data: n, innerProps: i, selectProps: o, children: [
29
- /* @__PURE__ */ l("div", { className: "flex fs-12 ml-4 cn-9", children: s }),
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
- }, N = (e) => {
32
+ }, C = (e) => {
33
33
  const {
34
- children: t = /* @__PURE__ */ l(u, { className: "icon-dim-24" }),
34
+ children: t = /* @__PURE__ */ l.jsx(h, { className: "icon-dim-24" }),
35
35
  getStyles: n,
36
- innerProps: { ref: i, ...o }
36
+ innerProps: { ref: s, ...r }
37
37
  } = e;
38
- return /* @__PURE__ */ l("div", { ...o, ref: i, style: n("clearIndicator", e), children: /* @__PURE__ */ l("div", { className: "flex pointer", children: t }) });
39
- }, S = (e) => {
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: i },
43
- selectProps: o
42
+ innerProps: { onClick: n, onMouseDown: s },
43
+ selectProps: r
44
44
  } = e;
45
- return /* @__PURE__ */ l(a.MultiValueRemove, { ...e, children: /* @__PURE__ */ l(
46
- u,
45
+ return /* @__PURE__ */ l.jsx(c.MultiValueRemove, { ...e, children: /* @__PURE__ */ l.jsx(
46
+ h,
47
47
  {
48
48
  onClick: n,
49
- onMouseDown: i,
50
- onClick: (s) => n(t),
49
+ onMouseDown: s,
50
+ onClick: (o) => n(t),
51
51
  style: { height: "18px", width: "18px" }
52
52
  }
53
53
  ) });
54
- }, b = ({ validator: e, isAllSelected: t = !1, ...n }) => {
55
- const { children: i, data: o, innerProps: s, selectProps: d } = n, { label: p, value: h } = o, m = e ? e(h) : !0;
56
- return t && h !== "*" ? null : /* @__PURE__ */ c(a.MultiValueContainer, { data: o, innerProps: s, selectProps: d, children: [
57
- /* @__PURE__ */ c("div", { className: "flex left fs-12 pl-4 pr-4 dc__ellipsis-right", children: [
58
- !m && /* @__PURE__ */ l(v, { className: "mr-4 icon-dim-16" }),
59
- /* @__PURE__ */ l("div", { className: `dc__ellipsis-right ${m ? "cn-9" : "cr-5"}`, children: p })
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
- i[1]
61
+ s[1]
62
62
  ] });
63
- }, M = {
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
- }, F = (e) => /* @__PURE__ */ l(f, { ...e });
87
+ }, b = (e) => /* @__PURE__ */ l.jsx(x, { ...e });
88
88
  export {
89
- N as ClearIndicator,
90
- F as CustomSelect,
91
- b as MultiValueChipContainer,
92
- k as MultiValueContainer,
93
- S as MultiValueRemove,
94
- E as Option,
95
- C as SingleSelectOption,
96
- M as multiSelectStyles
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 { jsxs as m, jsx as s } from "react/jsx-runtime";
2
- import { useState as f, useRef as g } from "react";
3
- import "../../Helper-e1262739.js";
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 O } from "../Hooks/UseClickOutside/UseClickOutside.js";
6
- import { getDefaultPageValueOptions as S } from "./utils.js";
7
- const w = ({
8
- optionValue: e,
9
- options: o,
10
- setOptions: c,
11
- handleCloseDropdown: i,
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
- }) => /* @__PURE__ */ s("div", { className: "select__item", onClick: () => {
14
- const a = o.map((l) => ({
15
- value: l.value,
16
- selected: l.value === e
17
- }));
18
- c([...a]), i(), n(e);
19
- }, children: e }, e), b = ({ pageSizeOptions: e, pageSize: o, changePageSize: c }) => {
20
- const i = S(e).map((t) => ({
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 === o
23
- })), [n, r] = f(!1), [a, l] = f(i), d = () => {
24
- r(!1);
25
- }, v = () => {
26
- r(!n);
27
- }, p = g(null);
28
- O(p, d);
29
- const u = a.find((t) => t.selected), h = n ? "fa fa-caret-up" : "fa fa-caret-down";
30
- return /* @__PURE__ */ m("div", { ref: p, children: [
31
- n && /* @__PURE__ */ s("div", { className: "pagination__select-menu", children: a.map((t) => /* @__PURE__ */ s(
32
- w,
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: c
41
+ changePageSize: i
39
42
  }
40
43
  )) }),
41
- /* @__PURE__ */ m("button", { type: "button", className: "select__button", onClick: v, children: [
42
- /* @__PURE__ */ s("span", { children: u ? u.value : "" }),
43
- /* @__PURE__ */ s("span", { className: "select__icon", children: /* @__PURE__ */ s("i", { className: h }) })
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
- b as default
51
+ C as default
49
52
  };
@@ -1,89 +1,92 @@
1
1
  import "../../assets/Pagination.css";
2
- import { jsxs as o, jsx as a } from "react/jsx-runtime";
3
- import { useState as k, useEffect as N } from "react";
4
- import y from "./PageSizeSelector.js";
5
- import { createPageArr as g } from "./utils.js";
6
- const C = ({ value: t, isSelected: s, selectPage: c }) => /* @__PURE__ */ a("li", { className: "page", children: /* @__PURE__ */ a("button", { className: s ? "page__button page__button--selected" : "page__button", onClick: () => {
7
- c(t);
8
- }, type: "button", children: t }) }), E = ({
9
- size: t,
10
- pageSize: s,
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: u,
13
- changePageSize: m,
14
- isPageSizeFix: h,
15
- pageSizeOptions: P,
15
+ changePage: o,
16
+ changePageSize: r,
17
+ isPageSizeFix: x,
18
+ pageSizeOptions: N,
16
19
  rootClassName: b
17
20
  }) => {
18
- const [n, r] = k([]);
19
- N(() => {
20
- const e = g({ size: t, pageSize: s, selectedPageNo: 1 });
21
- r(e);
22
- }, [t, s]), N(() => {
23
- const e = 1 + Math.floor(c / s), l = g({ size: t, pageSize: s, selectedPageNo: e });
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
- }, v = c + s < t ? c + s : t, p = n.findIndex((e) => e.selected), x = n.filter((e) => e.isVisible);
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__ */ o("div", { className: b || "", children: [
39
- /* @__PURE__ */ o("div", { className: "page-number", children: [
41
+ /* @__PURE__ */ e.jsxs("div", { className: b || "", children: [
42
+ /* @__PURE__ */ e.jsxs("div", { className: "page-number", children: [
40
43
  c + 1,
41
44
  " - ",
42
- v,
45
+ j,
43
46
  " of ",
44
- t
47
+ a
45
48
  ] }),
46
- /* @__PURE__ */ o("ul", { className: "pagination", children: [
47
- /* @__PURE__ */ a("li", { className: "page", children: /* @__PURE__ */ a(
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: !p,
52
- onClick: _,
54
+ disabled: !m,
55
+ onClick: h,
53
56
  type: "button",
54
57
  "aria-label": "Previous page",
55
- children: /* @__PURE__ */ a("span", { className: "left-icon", children: /* @__PURE__ */ a("i", { className: "fa fa-chevron-left" }) })
58
+ children: /* @__PURE__ */ e.jsx("span", { className: "left-icon", children: /* @__PURE__ */ e.jsx("i", { className: "fa fa-chevron-left" }) })
56
59
  }
57
60
  ) }),
58
- x.map((e) => /* @__PURE__ */ a(
59
- C,
61
+ _.map((s) => /* @__PURE__ */ e.jsx(
62
+ k,
60
63
  {
61
- value: e.value,
62
- isSelected: e.selected,
63
- selectPage: i
64
+ value: s.value,
65
+ isSelected: s.selected,
66
+ selectPage: d
64
67
  },
65
- e.value
68
+ s.value
66
69
  )),
67
- /* @__PURE__ */ a("li", { className: "page", children: /* @__PURE__ */ a(
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: p === n.length - 1,
72
- onClick: f,
74
+ disabled: m === n.length - 1,
75
+ onClick: P,
73
76
  type: "button",
74
77
  "aria-label": "Next page",
75
- children: /* @__PURE__ */ a("span", { className: "left-icon", children: /* @__PURE__ */ a("i", { className: "fa fa-chevron-right" }) })
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
- !h && /* @__PURE__ */ o("div", { className: "select", children: [
80
- /* @__PURE__ */ a("span", { className: "select__placeholder", children: "Rows per page" }),
81
- /* @__PURE__ */ a(
82
- y,
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: P,
85
- pageSize: s,
86
- changePageSize: m
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
- E as default
97
+ V as default
95
98
  };