@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,12 +1,12 @@
1
- import { jsx as R } from "react/jsx-runtime";
2
- import { useState as T, useRef as _, useEffect as $ } from "react";
3
- import { u as b } from "../Helper-e1262739.js";
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: f = null,
9
- onBlur: s = null,
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] = T(""), t = _(null);
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 f == "function" && f(e);
24
+ e.persist(), a(e.target.value), typeof s == "function" && s(e);
25
25
  }
26
26
  function m(e) {
27
- typeof s == "function" && s(e);
27
+ typeof f == "function" && f(e);
28
28
  }
29
29
  function E(e) {
30
30
  typeof u == "function" && u(e);
31
31
  }
32
- return b(
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 { jsx as a, jsxs as g } from "react/jsx-runtime";
3
- import * as o from "react";
4
- import { useState as B, useRef as S, useCallback as x } from "react";
5
- import { S as y } from "../../ic-error-cross-2760059a.js";
6
- import { B as C } from "../../Helper-e1262739.js";
7
- const E = (r) => /* @__PURE__ */ o.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...r }, /* @__PURE__ */ o.createElement("g", { fill: "none", fillRule: "evenodd" }, /* @__PURE__ */ o.createElement("path", { d: "M0 0h24v24H0z" }), /* @__PURE__ */ o.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 D = ({
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: c = () => {
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: n = 300
17
+ debounceTimeout: o = 300
18
18
  }) => {
19
- const [s, _] = B(!!r), l = S(), h = x(C(c, n), [
20
- c,
21
- n
22
- ]), u = (e) => {
23
- const { value: t } = e.target;
24
- _(!!t), b ? h(t) : c(t);
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
- c(e), p(e);
26
+ s(e), p(e);
27
27
  }, f = (e) => {
28
- const { key: t } = e;
29
- if (t === "Enter") {
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__ */ a("div", { className: d, children: /* @__PURE__ */ g("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__ */ a(E, { className: "search-bar__icon dc__position-abs icon-color-n6 icon-dim-18" }),
38
- /* @__PURE__ */ a(
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 ${s ? "pr-30" : "pr-10"}`,
47
- onChange: u,
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
- s && /* @__PURE__ */ a(
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__ */ a(y, { className: "icon-dim-18 icon-n4 dc__vertical-align-middle" })
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
- D as default
65
+ A as default
66
66
  };
@@ -1,15 +1,15 @@
1
1
  import "../../assets/ScanVulnerabilitiesTable.css";
2
- import { jsx as e, jsxs as r } from "react/jsx-runtime";
3
- function n({ vulnerabilities: a }) {
4
- const t = (c) => /* @__PURE__ */ r(
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: (l) => {
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__ */ r("tbody", { children: [
36
- /* @__PURE__ */ r("tr", { className: "security-tab__table-header", children: [
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
- a.map((c) => t(c))
44
+ s.map((c) => r(c))
45
45
  ] }) });
46
46
  }
47
47
  export {
48
- n as default
48
+ i as default
49
49
  };
@@ -1,126 +1,126 @@
1
1
  import "../../assets/Select.css";
2
- import { jsx as n, jsxs as m, Fragment as G } from "react/jsx-runtime";
3
- import u, { useEffect as I } from "react";
4
- import { a as R } from "../../ic-chevron-down-eb7fd953.js";
5
- import b from "../PopupMenu.js";
6
- import { s as q } from "../../Helper-e1262739.js";
7
- const N = u.createContext(null);
8
- function y() {
9
- const t = u.useContext(N);
10
- if (!t)
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 t;
12
+ return s;
13
13
  }
14
14
  const d = ({
15
- children: t = null,
16
- onChange: o,
15
+ children: s = null,
16
+ onChange: n,
17
17
  value: e = null,
18
- valueComparator: s,
18
+ valueComparator: o,
19
19
  rootClassName: r = "",
20
20
  disabled: l = !1,
21
21
  tabIndex: i = 0,
22
22
  name: f = "select",
23
- autoWidth: g = !0,
24
- isKebab: C = !1,
25
- dataTestId: S = ""
23
+ autoWidth: x = !0,
24
+ isKebab: y = !1,
25
+ dataTestId: g = ""
26
26
  }) => {
27
- const [h, p] = u.useState(e), [_, A] = u.useState(!1), [w, B] = u.useState(""), [x, E] = u.useState(!1);
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 && A(!1);
29
+ h !== e && S(!1);
30
30
  }, [h]), useEffectAfterMount(() => {
31
31
  p(e);
32
32
  }, [e]);
33
- function L(c, a) {
34
- p(a), c.target.name = f, c.target.value = a, o(c);
33
+ function w(c, a) {
34
+ p(a), c.target.name = f, c.target.value = a, n(c);
35
35
  }
36
- if (!t)
36
+ if (!s)
37
37
  return null;
38
- const { button: j, body: M, optionLength: T, AsyncComponent: F } = u.Children.toArray(t).reduce(
39
- (c, a) => (a.type === O ? c.button = a : a.type === P ? c.AsyncComponent = a : ((a.type === $ || a.type === k) && (c.optionLength += 1), c.body.push(a)), c),
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__ */ n(
43
- N.Provider,
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: s,
50
- searchString: w,
51
- search: B,
52
- handleClick: L,
48
+ popupOpen: j,
49
+ valueComparator: o,
50
+ searchString: E,
51
+ search: O,
52
+ handleClick: w,
53
53
  disabled: l,
54
- loading: x,
55
- setLoading: E
54
+ loading: _,
55
+ setLoading: P
56
56
  },
57
- children: /* @__PURE__ */ m(b, { onToggleCallback: (c) => A(c), autoClose: _, children: [
58
- /* @__PURE__ */ n(
59
- b.Button,
57
+ children: /* @__PURE__ */ t.jsxs(C, { onToggleCallback: (c) => S(c), autoClose: j, children: [
58
+ /* @__PURE__ */ t.jsx(
59
+ C.Button,
60
60
  {
61
- isKebab: C,
61
+ isKebab: y,
62
62
  disabled: l,
63
63
  tabIndex: i,
64
64
  rootClassName: r,
65
- dataTestId: S,
66
- children: j
65
+ dataTestId: g,
66
+ children: B
67
67
  }
68
68
  ),
69
- _ && F,
70
- /* @__PURE__ */ n(b.Body, { rootClassName: `select-popup ${r || ""}`, autoWidth: g, children: x ? null : /* @__PURE__ */ m(G, { children: [
71
- T === 0 && /* @__PURE__ */ n("div", { className: `${r} no-option-found flex`, children: "No results found" }),
72
- M
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: t,
79
- children: o,
77
+ }, A = ({
78
+ dataTestIdMenuList: s,
79
+ children: n,
80
80
  value: e,
81
- disabled: s = !1,
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: g, searchString: C, valueComparator: S, handleClick: h } = y();
88
- return l = l || g === e, typeof e == "object" && (l = l || S(e)), i.includes(C) ? /* @__PURE__ */ n(
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-${t}`,
91
+ "data-testid": `list-${s}`,
92
92
  className: `select__option ${f} ${l ? "selected" : ""}`,
93
93
  style: { ...r },
94
94
  onClick: (p) => {
95
- s || (p.persist(), h(p, e));
95
+ o || (p.persist(), h(p, e));
96
96
  },
97
- children: o
97
+ children: n
98
98
  }
99
99
  ) : null;
100
- }, k = ({ children: t, label: o, rootClassName: e = "" }) => /* @__PURE__ */ m("div", { className: `select__option-group ${e}`, children: [
101
- /* @__PURE__ */ n("span", { className: "option-group__label", children: o }),
102
- t
103
- ] }), O = ({
104
- dataTestIdDropdown: t,
105
- children: o,
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: s = "",
107
+ rootClassName: o = "",
108
108
  arrowAsset: r = "",
109
109
  hideArrow: l = !1
110
110
  }) => {
111
- const { popupOpen: i, loading: f } = y();
112
- return /* @__PURE__ */ m(
111
+ const { popupOpen: i, loading: f } = m();
112
+ return /* @__PURE__ */ t.jsxs(
113
113
  "div",
114
114
  {
115
- "data-testid": t,
116
- className: `select-button flex ${s} ${i ? "focused" : ""}`,
115
+ "data-testid": s,
116
+ className: `select-button flex ${o} ${i ? "focused" : ""}`,
117
117
  style: { ...e },
118
118
  children: [
119
- o,
120
- !l && (f ? /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(Progressing, {}) }) : /* @__PURE__ */ n(
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 || 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
- }, v = ({ placeholder: t = "search", style: o = {}, inputStyle: e = {}, rootClassName: s = "" }) => {
132
- const { searchString: r, search: l } = y();
133
- return /* @__PURE__ */ m(
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: `${s} search search--select-menu`,
136
+ className: `${o} search search--select-menu`,
137
137
  onClickCapture: (i) => i.stopPropagation(),
138
- style: { ...o },
138
+ style: { ...n },
139
139
  children: [
140
- /* @__PURE__ */ n("span", { className: "search__icon", children: /* @__PURE__ */ n("i", { className: "fa fa-search" }) }),
141
- /* @__PURE__ */ n(
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: t,
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
- }, P = ({ api: t }) => {
157
- const { loading: o, setLoading: e } = y();
158
- return I(() => {
159
- async function s() {
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 t();
162
+ await s();
163
163
  } catch (r) {
164
- q(r);
164
+ R(r);
165
165
  } finally {
166
166
  e(!1);
167
167
  }
168
168
  }
169
- s();
169
+ o();
170
170
  }, []), null;
171
- }, z = ({ rootClassName: t = "", style: o = {} }) => {
172
- const { handleClick: e } = y();
173
- return /* @__PURE__ */ n(
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 ${t}`,
177
- style: { ...o },
178
- onClick: (s) => {
179
- s.persist(), e(s, "all");
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 = O;
186
- d.OptGroup = k;
187
- d.Option = $;
188
- d.Search = v;
189
- d.All = z;
190
- d.Async = P;
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 "react/jsx-runtime";
1
+ import "../jsx-runtime-0dcb030c.js";
2
2
  import "react";
3
- import "../tippy-react.esm-d5c56a0a.js";
3
+ import "../tippy-react.esm-8dc66a75.js";
4
4
  import "../ic-cross-0e71861d.js";
5
- import { T } from "../TippyCustomized-c58fd46a.js";
5
+ import { T } from "../TippyCustomized-7b9b46b9.js";
6
6
  import "./Types.js";
7
- import "../Helper-e1262739.js";
7
+ import "../Helper-a0caa238.js";
8
8
  export {
9
9
  T as TippyCustomized
10
10
  };
@@ -1,41 +1,41 @@
1
- import { jsxs as e, jsx as t } from "react/jsx-runtime";
2
- import o from "react";
3
- import { t as a } from "../react-toastify.esm-e28f7200.js";
4
- import { TOAST_ACCESS_DENIED as i } from "./Constants.js";
5
- class n extends o.Component {
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__ */ e("div", { className: "toast", children: [
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 h extends o.Component {
13
+ class c extends e.Component {
14
14
  render() {
15
- return /* @__PURE__ */ e("div", { className: "flex left column dc__app-update-toast", children: [
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 o.Component {
21
+ class u extends e.Component {
22
22
  render() {
23
- return /* @__PURE__ */ e("div", { className: "toast dc__app-update-toast", children: [
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 m = (s, r) => a.info(
31
- /* @__PURE__ */ t(n, { title: s || i.TITLE, subtitle: r || i.SUBTITLE }),
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
- n as ToastBody,
38
- h as ToastBody3,
37
+ a as ToastBody,
38
+ c as ToastBody3,
39
39
  u as ToastBodyWithButton,
40
- m as toastAccessDenied
40
+ h as toastAccessDenied
41
41
  };
@@ -1,40 +1,40 @@
1
1
  import "../../assets/Toggle.css";
2
- import { jsxs as p, jsx as a } from "react/jsx-runtime";
3
- import _ from "react";
4
- import { f as n } from "../../Helper-e1262739.js";
5
- const k = ({
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: l = null,
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: o = null,
12
+ Icon: s = null,
13
13
  iconClass: u = "",
14
14
  ...g
15
15
  }) => {
16
- const [e, s] = _.useState(t);
16
+ const [e, l] = d.useState(t);
17
17
  n(() => {
18
- typeof l == "function" && e !== t && l(e);
18
+ typeof a == "function" && e !== t && a(e);
19
19
  }, [e]), n(() => {
20
- s(t);
20
+ l(t);
21
21
  }, [t]);
22
- function m(h) {
23
- i || s((d) => !d);
22
+ function m(_) {
23
+ i || l((p) => !p);
24
24
  }
25
- return /* @__PURE__ */ p(
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__ */ a("input", { type: "checkbox", checked: !!e, onChange: m, className: "toggle__input" }),
33
- /* @__PURE__ */ a("span", { className: `toggle__slider ${o ? "with-icon br-4 dc__border" : "round"}`, "data-testid": f, children: o && /* @__PURE__ */ a(o, { className: `icon-dim-20 br-4 p-2 ${u}` }) })
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
- k as default
39
+ $ as default
40
40
  };