ovirt-ui-toolkit 0.0.10 → 0.0.11
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/index.d.ts +1 -0
- package/dist/ovirt-ui-toolkit.es.js +90 -78
- package/dist/ovirt-ui-toolkit.umd.js +8 -8
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -14,4 +14,5 @@ export { default as Dropdown } from './components/dropdown/Dropdown';
|
|
|
14
14
|
export { default as Pagination } from './components/pagination/Pagination';
|
|
15
15
|
export { default as ReloadButton } from './components/reloadButton/ReloadButtton';
|
|
16
16
|
export { default as TableToolbar } from './components/tableToolbar/TableToolbar';
|
|
17
|
+
export { default as useIntervalLoader } from './hooks/useIntervalLoader';
|
|
17
18
|
export { default as SampleComp } from './Test';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Oe, { useState as vr } from "react";
|
|
1
|
+
import Oe, { useState as vr, useEffect as pr } from "react";
|
|
2
2
|
var U = { exports: {} }, A = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
@@ -10,16 +10,16 @@ var U = { exports: {} }, A = {};
|
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
11
|
*/
|
|
12
12
|
var _e;
|
|
13
|
-
function
|
|
13
|
+
function br() {
|
|
14
14
|
if (_e) return A;
|
|
15
15
|
_e = 1;
|
|
16
|
-
var
|
|
16
|
+
var a = Oe, i = Symbol.for("react.element"), f = Symbol.for("react.fragment"), c = Object.prototype.hasOwnProperty, v = a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, h = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
17
17
|
function E(T, x, C) {
|
|
18
18
|
var p, R = {}, O = null, W = null;
|
|
19
19
|
C !== void 0 && (O = "" + C), x.key !== void 0 && (O = "" + x.key), x.ref !== void 0 && (W = x.ref);
|
|
20
20
|
for (p in x) c.call(x, p) && !h.hasOwnProperty(p) && (R[p] = x[p]);
|
|
21
21
|
if (T && T.defaultProps) for (p in x = T.defaultProps, x) R[p] === void 0 && (R[p] = x[p]);
|
|
22
|
-
return { $$typeof:
|
|
22
|
+
return { $$typeof: i, type: T, key: O, ref: W, props: R, _owner: v.current };
|
|
23
23
|
}
|
|
24
24
|
return A.Fragment = f, A.jsx = E, A.jsxs = E, A;
|
|
25
25
|
}
|
|
@@ -34,16 +34,16 @@ var I = {};
|
|
|
34
34
|
* LICENSE file in the root directory of this source tree.
|
|
35
35
|
*/
|
|
36
36
|
var Te;
|
|
37
|
-
function
|
|
37
|
+
function hr() {
|
|
38
38
|
return Te || (Te = 1, process.env.NODE_ENV !== "production" && function() {
|
|
39
|
-
var
|
|
39
|
+
var a = Oe, i = Symbol.for("react.element"), f = Symbol.for("react.portal"), c = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), h = Symbol.for("react.profiler"), E = Symbol.for("react.provider"), T = Symbol.for("react.context"), x = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), R = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), W = Symbol.for("react.offscreen"), Q = Symbol.iterator, ke = "@@iterator";
|
|
40
40
|
function Ne(e) {
|
|
41
41
|
if (e === null || typeof e != "object")
|
|
42
42
|
return null;
|
|
43
43
|
var r = Q && e[Q] || e[ke];
|
|
44
44
|
return typeof r == "function" ? r : null;
|
|
45
45
|
}
|
|
46
|
-
var N =
|
|
46
|
+
var N = a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
47
47
|
function g(e) {
|
|
48
48
|
{
|
|
49
49
|
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), s = 1; s < r; s++)
|
|
@@ -414,7 +414,7 @@ function br() {
|
|
|
414
414
|
var rr = function(e, r, t, s, u, d, l) {
|
|
415
415
|
var o = {
|
|
416
416
|
// This tag allows us to uniquely identify this as a React Element
|
|
417
|
-
$$typeof:
|
|
417
|
+
$$typeof: i,
|
|
418
418
|
// Built-in properties that belong on the element
|
|
419
419
|
type: e,
|
|
420
420
|
key: r,
|
|
@@ -469,7 +469,7 @@ function br() {
|
|
|
469
469
|
var H;
|
|
470
470
|
H = !1;
|
|
471
471
|
function X(e) {
|
|
472
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
472
|
+
return typeof e == "object" && e !== null && e.$$typeof === i;
|
|
473
473
|
}
|
|
474
474
|
function xe() {
|
|
475
475
|
{
|
|
@@ -578,7 +578,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
578
578
|
var y = nr();
|
|
579
579
|
y ? o += y : o += xe();
|
|
580
580
|
var b;
|
|
581
|
-
e === null ? b = "null" : G(e) ? b = "array" : e !== void 0 && e.$$typeof ===
|
|
581
|
+
e === null ? b = "null" : G(e) ? b = "array" : e !== void 0 && e.$$typeof === i ? (b = "<" + (w(e.type) || "Unknown") + " />", o = " Did you accidentally export a JSX literal instead of a component?") : b = typeof e, g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", b, o);
|
|
582
582
|
}
|
|
583
583
|
var m = tr(e, r, t, u, d);
|
|
584
584
|
if (m == null)
|
|
@@ -624,13 +624,13 @@ React keys must be passed directly to JSX without using spread:
|
|
|
624
624
|
}()), I;
|
|
625
625
|
}
|
|
626
626
|
var Ce;
|
|
627
|
-
function
|
|
628
|
-
return Ce || (Ce = 1, process.env.NODE_ENV === "production" ? U.exports =
|
|
627
|
+
function mr() {
|
|
628
|
+
return Ce || (Ce = 1, process.env.NODE_ENV === "production" ? U.exports = br() : U.exports = hr()), U.exports;
|
|
629
629
|
}
|
|
630
|
-
var n =
|
|
630
|
+
var n = mr();
|
|
631
631
|
const Se = ({
|
|
632
|
-
type:
|
|
633
|
-
title:
|
|
632
|
+
type: a = "default",
|
|
633
|
+
title: i,
|
|
634
634
|
size: f,
|
|
635
635
|
label: c,
|
|
636
636
|
onClick: v,
|
|
@@ -638,7 +638,7 @@ const Se = ({
|
|
|
638
638
|
children: E,
|
|
639
639
|
className: T = ""
|
|
640
640
|
}) => {
|
|
641
|
-
const x = `btn-${
|
|
641
|
+
const x = `btn-${a}`, C = f ? `btn-${f}` : "", R = `${`btn ${x} ${C}`.trim()} ${T}`.trim();
|
|
642
642
|
return /* @__PURE__ */ n.jsx(
|
|
643
643
|
"button",
|
|
644
644
|
{
|
|
@@ -649,27 +649,27 @@ const Se = ({
|
|
|
649
649
|
children: /* @__PURE__ */ n.jsxs("div", { className: "flex items-center", children: [
|
|
650
650
|
E || c,
|
|
651
651
|
" ",
|
|
652
|
-
|
|
652
|
+
i
|
|
653
653
|
] })
|
|
654
654
|
}
|
|
655
655
|
);
|
|
656
|
-
},
|
|
656
|
+
}, Rr = ({ children: a, eventKey: i, active: f }) => /* @__PURE__ */ n.jsx(
|
|
657
657
|
"div",
|
|
658
658
|
{
|
|
659
659
|
className: `tab-pane ${f ? "active" : ""}`,
|
|
660
|
-
id: `${
|
|
660
|
+
id: `${i}-panel`,
|
|
661
661
|
role: "tabpanel",
|
|
662
|
-
"aria-labelledby": `${
|
|
663
|
-
children:
|
|
662
|
+
"aria-labelledby": `${i}-tab`,
|
|
663
|
+
children: a
|
|
664
664
|
},
|
|
665
|
-
|
|
666
|
-
),
|
|
667
|
-
/* @__PURE__ */ n.jsx("ul", { className: "nav nav-tabs", role: "tablist", children: f.map(({ props: { eventKey: c, title: v } }) => /* @__PURE__ */ n.jsx("li", { className:
|
|
665
|
+
i
|
|
666
|
+
), _r = ({ activeKey: a, onSelect: i, children: f }) => /* @__PURE__ */ n.jsxs("div", { className: "tabs-container", children: [
|
|
667
|
+
/* @__PURE__ */ n.jsx("ul", { className: "nav nav-tabs", role: "tablist", children: f.map(({ props: { eventKey: c, title: v } }) => /* @__PURE__ */ n.jsx("li", { className: a === c ? "active" : "", children: /* @__PURE__ */ n.jsx(
|
|
668
668
|
"a",
|
|
669
669
|
{
|
|
670
670
|
href: `#${c}`,
|
|
671
671
|
onClick: (h) => {
|
|
672
|
-
h.preventDefault(),
|
|
672
|
+
h.preventDefault(), i(c);
|
|
673
673
|
},
|
|
674
674
|
children: v
|
|
675
675
|
}
|
|
@@ -677,7 +677,7 @@ const Se = ({
|
|
|
677
677
|
/* @__PURE__ */ n.jsx("div", { className: "tabs-container", children: /* @__PURE__ */ n.jsx("div", { className: "tab-content pf-c-tab-content", children: f.map(({ props: { eventKey: c, children: v } }) => /* @__PURE__ */ n.jsx(
|
|
678
678
|
"div",
|
|
679
679
|
{
|
|
680
|
-
className: `tab-pane ${
|
|
680
|
+
className: `tab-pane ${a === c ? "active" : ""}`,
|
|
681
681
|
id: `${c}-panel`,
|
|
682
682
|
role: "tabpanel",
|
|
683
683
|
"aria-labelledby": `${c}-tab`,
|
|
@@ -685,9 +685,9 @@ const Se = ({
|
|
|
685
685
|
},
|
|
686
686
|
c
|
|
687
687
|
)) }) })
|
|
688
|
-
] }),
|
|
689
|
-
id:
|
|
690
|
-
type:
|
|
688
|
+
] }), Tr = ({
|
|
689
|
+
id: a,
|
|
690
|
+
type: i,
|
|
691
691
|
placeholder: f = "",
|
|
692
692
|
value: c,
|
|
693
693
|
onChange: v,
|
|
@@ -695,37 +695,37 @@ const Se = ({
|
|
|
695
695
|
}) => /* @__PURE__ */ n.jsx(
|
|
696
696
|
"input",
|
|
697
697
|
{
|
|
698
|
-
type:
|
|
699
|
-
id:
|
|
698
|
+
type: i,
|
|
699
|
+
id: a,
|
|
700
700
|
className: h,
|
|
701
701
|
placeholder: f,
|
|
702
702
|
value: c,
|
|
703
703
|
onChange: v
|
|
704
704
|
}
|
|
705
|
-
),
|
|
706
|
-
if (!
|
|
705
|
+
), Cr = ({ title: a, isOpen: i, onClose: f, children: c, size: v }) => {
|
|
706
|
+
if (!i) return null;
|
|
707
707
|
const h = v ? `modal-${v}` : "";
|
|
708
708
|
return /* @__PURE__ */ n.jsx("div", { className: "modal fade in", style: { display: "block" }, tabIndex: -1, role: "dialog", children: /* @__PURE__ */ n.jsx("div", { className: `modal-dialog ${h}`, role: "document", children: /* @__PURE__ */ n.jsxs("div", { className: "modal-content", children: [
|
|
709
709
|
/* @__PURE__ */ n.jsxs("div", { className: "modal-header", children: [
|
|
710
710
|
/* @__PURE__ */ n.jsx("button", { type: "button", className: "close", onClick: f, "aria-hidden": "true", children: /* @__PURE__ */ n.jsx("span", { className: "pficon pficon-close" }) }),
|
|
711
|
-
/* @__PURE__ */ n.jsx("h4", { className: "modal-title", children:
|
|
711
|
+
/* @__PURE__ */ n.jsx("h4", { className: "modal-title", children: a })
|
|
712
712
|
] }),
|
|
713
713
|
/* @__PURE__ */ n.jsx("div", { className: "modal-body", children: c })
|
|
714
714
|
] }) }) });
|
|
715
|
-
},
|
|
715
|
+
}, wr = ({ variant: a, children: i }) => {
|
|
716
716
|
const c = {
|
|
717
717
|
warning: "text-yellow-600",
|
|
718
718
|
success: "text-green-600",
|
|
719
719
|
error: "text-red-600"
|
|
720
|
-
}[
|
|
721
|
-
return /* @__PURE__ */ n.jsx("p", { className: c, children:
|
|
722
|
-
},
|
|
720
|
+
}[a] || "";
|
|
721
|
+
return /* @__PURE__ */ n.jsx("p", { className: c, children: i });
|
|
722
|
+
}, Or = ({ children: a, ...i }) => /* @__PURE__ */ n.jsx("table", { ...i, children: a }), Sr = ({ children: a, ...i }) => /* @__PURE__ */ n.jsx("tbody", { ...i, children: a }), kr = ({ children: a, ...i }) => /* @__PURE__ */ n.jsx("td", { ...i, children: a }), Nr = ({ children: a, ...i }) => /* @__PURE__ */ n.jsx("th", { ...i, children: a }), Pr = ({ children: a, ...i }) => /* @__PURE__ */ n.jsx("thead", { ...i, children: a }), $r = ({ children: a, ...i }) => /* @__PURE__ */ n.jsx("tr", { ...i, children: a }), xr = ({ items: a, selected: i, title: f, onChange: c }) => {
|
|
723
723
|
const [v, h] = vr(!1), E = () => {
|
|
724
724
|
h((p) => !p);
|
|
725
725
|
}, T = (p) => {
|
|
726
726
|
h(!1), c(p);
|
|
727
727
|
}, x = (p) => {
|
|
728
|
-
const R = p.id ===
|
|
728
|
+
const R = p.id === i;
|
|
729
729
|
return /* @__PURE__ */ n.jsx(
|
|
730
730
|
"li",
|
|
731
731
|
{
|
|
@@ -748,27 +748,27 @@ const Se = ({
|
|
|
748
748
|
]
|
|
749
749
|
}
|
|
750
750
|
),
|
|
751
|
-
v && /* @__PURE__ */ n.jsx("ul", { className: "dropdown-menu", children:
|
|
751
|
+
v && /* @__PURE__ */ n.jsx("ul", { className: "dropdown-menu", children: a.map(x) })
|
|
752
752
|
] });
|
|
753
|
-
},
|
|
753
|
+
}, gr = ({ currentPage: a, totalPages: i, onPageChange: f }) => {
|
|
754
754
|
const c = () => {
|
|
755
|
-
|
|
755
|
+
a > 1 && f(a - 1);
|
|
756
756
|
}, v = () => {
|
|
757
|
-
|
|
757
|
+
a < i && f(a + 1);
|
|
758
758
|
};
|
|
759
759
|
return /* @__PURE__ */ n.jsxs("div", { children: [
|
|
760
760
|
/* @__PURE__ */ n.jsx("span", { children: /* @__PURE__ */ n.jsxs("span", { className: "pagination-pf-items-current", children: [
|
|
761
|
-
|
|
761
|
+
a,
|
|
762
762
|
" - ",
|
|
763
|
-
|
|
763
|
+
i
|
|
764
764
|
] }) }),
|
|
765
765
|
/* @__PURE__ */ n.jsxs("div", { className: "btn-group ml-2", children: [
|
|
766
766
|
/* @__PURE__ */ n.jsx(
|
|
767
767
|
"button",
|
|
768
768
|
{
|
|
769
769
|
type: "button",
|
|
770
|
-
className: `btn btn-default ${
|
|
771
|
-
disabled:
|
|
770
|
+
className: `btn btn-default ${a === 1 ? "disabled" : ""}`,
|
|
771
|
+
disabled: a === 1,
|
|
772
772
|
onClick: c,
|
|
773
773
|
children: /* @__PURE__ */ n.jsx("i", { className: "fa fa-angle-left" })
|
|
774
774
|
}
|
|
@@ -777,8 +777,8 @@ const Se = ({
|
|
|
777
777
|
"button",
|
|
778
778
|
{
|
|
779
779
|
type: "button",
|
|
780
|
-
className: `btn btn-default ${
|
|
781
|
-
disabled:
|
|
780
|
+
className: `btn btn-default ${a === i ? "disabled" : ""}`,
|
|
781
|
+
disabled: a === i,
|
|
782
782
|
onClick: v,
|
|
783
783
|
children: /* @__PURE__ */ n.jsx("i", { className: "fa fa-angle-right" })
|
|
784
784
|
}
|
|
@@ -791,42 +791,53 @@ const Se = ({
|
|
|
791
791
|
{ id: 3, title: "20 сек", data: 2e4 },
|
|
792
792
|
{ id: 4, title: "30 сек", data: 3e4 },
|
|
793
793
|
{ id: 5, title: "60 сек", data: 6e4 }
|
|
794
|
-
],
|
|
794
|
+
], yr = ({ onChange: a, value: i, onRefresh: f }) => {
|
|
795
795
|
var h;
|
|
796
796
|
const c = (E) => {
|
|
797
|
-
|
|
798
|
-
}, v = (h = we.find((E) => E.data ===
|
|
797
|
+
a(E.data);
|
|
798
|
+
}, v = (h = we.find((E) => E.data === i)) == null ? void 0 : h.id;
|
|
799
799
|
return /* @__PURE__ */ n.jsxs("div", { className: "flex", children: [
|
|
800
800
|
/* @__PURE__ */ n.jsx(Se, { type: "default", onClick: f, children: /* @__PURE__ */ n.jsx("i", { className: "fa fa-refresh" }) }),
|
|
801
|
-
/* @__PURE__ */ n.jsx(
|
|
801
|
+
/* @__PURE__ */ n.jsx(xr, { onChange: c, items: we, selected: v })
|
|
802
802
|
] });
|
|
803
|
-
},
|
|
804
|
-
interval:
|
|
805
|
-
page:
|
|
803
|
+
}, Dr = ({
|
|
804
|
+
interval: a,
|
|
805
|
+
page: i,
|
|
806
806
|
totalPages: f,
|
|
807
807
|
onRefresh: c,
|
|
808
808
|
onChangeInterval: v,
|
|
809
809
|
onPageChange: h
|
|
810
810
|
}) => /* @__PURE__ */ n.jsxs("div", { className: "flex justify-between bg-[#f5f5f5] border border-[#d1d1d1]", children: [
|
|
811
811
|
/* @__PURE__ */ n.jsx("div", { className: "m-[5px]", children: /* @__PURE__ */ n.jsx(
|
|
812
|
-
|
|
812
|
+
yr,
|
|
813
813
|
{
|
|
814
|
-
value:
|
|
814
|
+
value: a,
|
|
815
815
|
onChange: v,
|
|
816
816
|
onRefresh: c
|
|
817
817
|
}
|
|
818
818
|
) }),
|
|
819
819
|
/* @__PURE__ */ n.jsx("div", { className: "m-[5px]", children: /* @__PURE__ */ n.jsx(
|
|
820
|
-
|
|
820
|
+
gr,
|
|
821
821
|
{
|
|
822
|
-
currentPage:
|
|
822
|
+
currentPage: i,
|
|
823
823
|
totalPages: f,
|
|
824
824
|
onPageChange: h
|
|
825
825
|
}
|
|
826
826
|
) })
|
|
827
|
-
] })
|
|
827
|
+
] });
|
|
828
|
+
function Fr(a, i) {
|
|
829
|
+
pr(() => {
|
|
830
|
+
if (!a)
|
|
831
|
+
return;
|
|
832
|
+
const f = setInterval(() => {
|
|
833
|
+
i();
|
|
834
|
+
}, a);
|
|
835
|
+
return () => clearInterval(f);
|
|
836
|
+
}, [a]);
|
|
837
|
+
}
|
|
838
|
+
const jr = ({ items: a }) => /* @__PURE__ */ n.jsx("ol", { className: "breadcrumb", children: a.map((i, f) => /* @__PURE__ */ n.jsx("li", { className: i.active ? "active" : "", children: i.active ? i.title : /* @__PURE__ */ n.jsx("a", { href: i.href, children: i.title }) }, f)) }), Ar = () => /* @__PURE__ */ n.jsxs("div", { children: [
|
|
828
839
|
/* @__PURE__ */ n.jsx(
|
|
829
|
-
|
|
840
|
+
jr,
|
|
830
841
|
{
|
|
831
842
|
items: [
|
|
832
843
|
{ title: "Дополнения", active: !0 },
|
|
@@ -838,20 +849,21 @@ const Se = ({
|
|
|
838
849
|
] });
|
|
839
850
|
export {
|
|
840
851
|
Se as Button,
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
852
|
+
xr as Dropdown,
|
|
853
|
+
wr as HelpText,
|
|
854
|
+
Tr as Input,
|
|
855
|
+
Cr as Modal,
|
|
856
|
+
gr as Pagination,
|
|
857
|
+
yr as ReloadButton,
|
|
858
|
+
Ar as SampleComp,
|
|
859
|
+
Rr as Tab,
|
|
860
|
+
Or as Table,
|
|
861
|
+
Dr as TableToolbar,
|
|
862
|
+
_r as Tabs,
|
|
863
|
+
Sr as Tbody,
|
|
864
|
+
kr as Td,
|
|
865
|
+
Nr as Th,
|
|
866
|
+
Pr as Thead,
|
|
867
|
+
$r as Tr,
|
|
868
|
+
Fr as useIntervalLoader
|
|
857
869
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(v,O){typeof exports=="object"&&typeof module<"u"?O(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],O):(v=typeof globalThis<"u"?globalThis:v||self,O(v["ovirt-ui-toolkit"]={},v.React))})(this,function(v,O){"use strict";var L={exports:{}},A={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var re;function
|
|
9
|
+
*/var re;function Ie(){if(re)return A;re=1;var a=O,i=Symbol.for("react.element"),f=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,p=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,m={key:!0,ref:!0,__self:!0,__source:!0};function _(C,g,w){var b,x={},k=null,M=null;w!==void 0&&(k=""+w),g.key!==void 0&&(k=""+g.key),g.ref!==void 0&&(M=g.ref);for(b in g)c.call(g,b)&&!m.hasOwnProperty(b)&&(x[b]=g[b]);if(C&&C.defaultProps)for(b in g=C.defaultProps,g)x[b]===void 0&&(x[b]=g[b]);return{$$typeof:i,type:C,key:k,ref:M,props:x,_owner:p.current}}return A.Fragment=f,A.jsx=_,A.jsxs=_,A}var $={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var te;function
|
|
18
|
-
`+H+e}}var z=!1,U;{var
|
|
17
|
+
*/var te;function Fe(){return te||(te=1,process.env.NODE_ENV!=="production"&&function(){var a=O,i=Symbol.for("react.element"),f=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),_=Symbol.for("react.provider"),C=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),M=Symbol.for("react.offscreen"),le=Symbol.iterator,Qe="@@iterator";function Ke(e){if(e===null||typeof e!="object")return null;var r=le&&e[le]||e[Qe];return typeof r=="function"?r:null}var D=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function j(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),o=1;o<r;o++)t[o-1]=arguments[o];er("error",e,t)}}function er(e,r,t){{var o=D.ReactDebugCurrentFrame,u=o.getStackAddendum();u!==""&&(r+="%s",t=t.concat([u]));var d=t.map(function(l){return String(l)});d.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,d)}}var rr=!1,tr=!1,nr=!1,ar=!1,ir=!1,ce;ce=Symbol.for("react.module.reference");function or(e){return!!(typeof e=="string"||typeof e=="function"||e===c||e===m||ir||e===p||e===w||e===b||ar||e===M||rr||tr||nr||typeof e=="object"&&e!==null&&(e.$$typeof===k||e.$$typeof===x||e.$$typeof===_||e.$$typeof===C||e.$$typeof===g||e.$$typeof===ce||e.getModuleId!==void 0))}function sr(e,r,t){var o=e.displayName;if(o)return o;var u=r.displayName||r.name||"";return u!==""?t+"("+u+")":t}function ue(e){return e.displayName||"Context"}function S(e){if(e==null)return null;if(typeof e.tag=="number"&&j("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case c:return"Fragment";case f:return"Portal";case m:return"Profiler";case p:return"StrictMode";case w:return"Suspense";case b:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case C:var r=e;return ue(r)+".Consumer";case _:var t=e;return ue(t._context)+".Provider";case g:return sr(e,e.render,"ForwardRef");case x:var o=e.displayName||null;return o!==null?o:S(e.type)||"Memo";case k:{var u=e,d=u._payload,l=u._init;try{return S(l(d))}catch{return null}}}return null}var P=Object.assign,W=0,fe,de,ve,pe,be,he,me;function ye(){}ye.__reactDisabledLog=!0;function lr(){{if(W===0){fe=console.log,de=console.info,ve=console.warn,pe=console.error,be=console.group,he=console.groupCollapsed,me=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ye,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}W++}}function cr(){{if(W--,W===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:P({},e,{value:fe}),info:P({},e,{value:de}),warn:P({},e,{value:ve}),error:P({},e,{value:pe}),group:P({},e,{value:be}),groupCollapsed:P({},e,{value:he}),groupEnd:P({},e,{value:me})})}W<0&&j("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var G=D.ReactCurrentDispatcher,H;function V(e,r,t){{if(H===void 0)try{throw Error()}catch(u){var o=u.stack.trim().match(/\n( *(at )?)/);H=o&&o[1]||""}return`
|
|
18
|
+
`+H+e}}var z=!1,U;{var ur=typeof WeakMap=="function"?WeakMap:Map;U=new ur}function ge(e,r){if(!e||z)return"";{var t=U.get(e);if(t!==void 0)return t}var o;z=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var d;d=G.current,G.current=null,lr();try{if(r){var l=function(){throw Error()};if(Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(l,[])}catch(E){o=E}Reflect.construct(e,[],l)}else{try{l.call()}catch(E){o=E}e.call(l.prototype)}}else{try{throw Error()}catch(E){o=E}e()}}catch(E){if(E&&o&&typeof E.stack=="string"){for(var s=E.stack.split(`
|
|
19
19
|
`),R=o.stack.split(`
|
|
20
20
|
`),h=s.length-1,y=R.length-1;h>=1&&y>=0&&s[h]!==R[y];)y--;for(;h>=1&&y>=0;h--,y--)if(s[h]!==R[y]){if(h!==1||y!==1)do if(h--,y--,y<0||s[h]!==R[y]){var T=`
|
|
21
|
-
`+s[h].replace(" at new "," at ");return e.displayName&&T.includes("<anonymous>")&&(T=T.replace("<anonymous>",e.displayName)),typeof e=="function"&&U.set(e,T),T}while(h>=1&&y>=0);break}}}finally{z=!1,G.current=d,
|
|
21
|
+
`+s[h].replace(" at new "," at ");return e.displayName&&T.includes("<anonymous>")&&(T=T.replace("<anonymous>",e.displayName)),typeof e=="function"&&U.set(e,T),T}while(h>=1&&y>=0);break}}}finally{z=!1,G.current=d,cr(),Error.prepareStackTrace=u}var F=e?e.displayName||e.name:"",N=F?V(F):"";return typeof e=="function"&&U.set(e,N),N}function fr(e,r,t){return ge(e,!1)}function dr(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function B(e,r,t){if(e==null)return"";if(typeof e=="function")return ge(e,dr(e));if(typeof e=="string")return V(e);switch(e){case w:return V("Suspense");case b:return V("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case g:return fr(e.render);case x:return B(e.type,r,t);case k:{var o=e,u=o._payload,d=o._init;try{return B(d(u),r,t)}catch{}}}return""}var Y=Object.prototype.hasOwnProperty,je={},Re=D.ReactDebugCurrentFrame;function J(e){if(e){var r=e._owner,t=B(e.type,e._source,r?r.type:null);Re.setExtraStackFrame(t)}else Re.setExtraStackFrame(null)}function vr(e,r,t,o,u){{var d=Function.call.bind(Y);for(var l in e)if(d(e,l)){var s=void 0;try{if(typeof e[l]!="function"){var R=Error((o||"React class")+": "+t+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw R.name="Invariant Violation",R}s=e[l](r,l,o,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(h){s=h}s&&!(s instanceof Error)&&(J(u),j("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",o||"React class",t,l,typeof s),J(null)),s instanceof Error&&!(s.message in je)&&(je[s.message]=!0,J(u),j("Failed %s type: %s",t,s.message),J(null))}}}var pr=Array.isArray;function X(e){return pr(e)}function br(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function hr(e){try{return Ee(e),!1}catch{return!0}}function Ee(e){return""+e}function _e(e){if(hr(e))return j("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",br(e)),Ee(e)}var xe=D.ReactCurrentOwner,mr={key:!0,ref:!0,__self:!0,__source:!0},Te,Ce;function yr(e){if(Y.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function gr(e){if(Y.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function jr(e,r){typeof e.ref=="string"&&xe.current}function Rr(e,r){{var t=function(){Te||(Te=!0,j("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function Er(e,r){{var t=function(){Ce||(Ce=!0,j("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var _r=function(e,r,t,o,u,d,l){var s={$$typeof:i,type:e,key:r,ref:t,props:l,_owner:d};return s._store={},Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:u}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s};function xr(e,r,t,o,u){{var d,l={},s=null,R=null;t!==void 0&&(_e(t),s=""+t),gr(r)&&(_e(r.key),s=""+r.key),yr(r)&&(R=r.ref,jr(r,u));for(d in r)Y.call(r,d)&&!mr.hasOwnProperty(d)&&(l[d]=r[d]);if(e&&e.defaultProps){var h=e.defaultProps;for(d in h)l[d]===void 0&&(l[d]=h[d])}if(s||R){var y=typeof e=="function"?e.displayName||e.name||"Unknown":e;s&&Rr(l,y),R&&Er(l,y)}return _r(e,s,R,u,o,xe.current,l)}}var Z=D.ReactCurrentOwner,we=D.ReactDebugCurrentFrame;function I(e){if(e){var r=e._owner,t=B(e.type,e._source,r?r.type:null);we.setExtraStackFrame(t)}else we.setExtraStackFrame(null)}var Q;Q=!1;function K(e){return typeof e=="object"&&e!==null&&e.$$typeof===i}function Oe(){{if(Z.current){var e=S(Z.current.type);if(e)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+e+"`."}return""}}function
|
|
23
|
+
Check the render method of \``+e+"`."}return""}}function Tr(e){return""}var Se={};function Cr(e){{var r=Oe();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+t+">.")}return r}}function ke(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=
|
|
25
|
+
Check the top-level render call using <`+t+">.")}return r}}function ke(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=Cr(r);if(Se[t])return;Se[t]=!0;var o="";e&&e._owner&&e._owner!==Z.current&&(o=" It was passed a child from "+S(e._owner.type)+"."),I(e),j('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,o),I(null)}}function Pe(e,r){{if(typeof e!="object")return;if(X(e))for(var t=0;t<e.length;t++){var o=e[t];K(o)&&ke(o,r)}else if(K(e))e._store&&(e._store.validated=!0);else if(e){var u=Ke(e);if(typeof u=="function"&&u!==e.entries)for(var d=u.call(e),l;!(l=d.next()).done;)K(l.value)&&ke(l.value,r)}}}function wr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===g||r.$$typeof===x))t=r.propTypes;else return;if(t){var o=S(r);vr(t,e.props,"prop",o,e)}else if(r.PropTypes!==void 0&&!Q){Q=!0;var u=S(r);j("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",u||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&j("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Or(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var o=r[t];if(o!=="children"&&o!=="key"){I(e),j("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",o),I(null);break}}e.ref!==null&&(I(e),j("Invalid attribute `ref` supplied to `React.Fragment`."),I(null))}}var Ne={};function De(e,r,t,o,u,d){{var l=or(e);if(!l){var s="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(s+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var R=Tr();R?s+=R:s+=Oe();var h;e===null?h="null":X(e)?h="array":e!==void 0&&e.$$typeof===i?(h="<"+(S(e.type)||"Unknown")+" />",s=" Did you accidentally export a JSX literal instead of a component?"):h=typeof e,j("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",h,s)}var y=xr(e,r,t,u,d);if(y==null)return y;if(l){var T=r.children;if(T!==void 0)if(o)if(X(T)){for(var F=0;F<T.length;F++)Pe(T[F],e);Object.freeze&&Object.freeze(T)}else j("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Pe(T,e)}if(Y.call(r,"key")){var N=S(e),E=Object.keys(r).filter(function(Ir){return Ir!=="key"}),ee=E.length>0?"{key: someKey, "+E.join(": ..., ")+": ...}":"{key: someKey}";if(!Ne[N+ee]){var Dr=E.length>0?"{"+E.join(": ..., ")+": ...}":"{}";j(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,ee,N,
|
|
30
|
+
<%s key={someKey} {...props} />`,ee,N,Dr,N),Ne[N+ee]=!0}}return e===c?Or(y):wr(y),y}}function Sr(e,r,t){return De(e,r,t,!0)}function kr(e,r,t){return De(e,r,t,!1)}var Pr=kr,Nr=Sr;$.Fragment=c,$.jsx=Pr,$.jsxs=Nr}()),$}var ne;function Ae(){return ne||(ne=1,process.env.NODE_ENV==="production"?L.exports=Ie():L.exports=Fe()),L.exports}var n=Ae();const q=({type:a="default",title:i,size:f,label:c,onClick:p,isDisabled:m=!1,children:_,className:C=""})=>{const g=`btn-${a}`,w=f?`btn-${f}`:"",x=`${`btn ${g} ${w}`.trim()} ${C}`.trim();return n.jsx("button",{className:x,type:"button",onClick:p,disabled:m,children:n.jsxs("div",{className:"flex items-center",children:[_||c," ",i]})})},$e=({children:a,eventKey:i,active:f})=>n.jsx("div",{className:`tab-pane ${f?"active":""}`,id:`${i}-panel`,role:"tabpanel","aria-labelledby":`${i}-tab`,children:a},i),We=({activeKey:a,onSelect:i,children:f})=>n.jsxs("div",{className:"tabs-container",children:[n.jsx("ul",{className:"nav nav-tabs",role:"tablist",children:f.map(({props:{eventKey:c,title:p}})=>n.jsx("li",{className:a===c?"active":"",children:n.jsx("a",{href:`#${c}`,onClick:m=>{m.preventDefault(),i(c)},children:p})},c))}),n.jsx("div",{className:"tabs-container",children:n.jsx("div",{className:"tab-content pf-c-tab-content",children:f.map(({props:{eventKey:c,children:p}})=>n.jsx("div",{className:`tab-pane ${a===c?"active":""}`,id:`${c}-panel`,role:"tabpanel","aria-labelledby":`${c}-tab`,children:p},c))})})]}),Ye=({id:a,type:i,placeholder:f="",value:c,onChange:p,className:m="form-control"})=>n.jsx("input",{type:i,id:a,className:m,placeholder:f,value:c,onChange:p}),Le=({title:a,isOpen:i,onClose:f,children:c,size:p})=>{if(!i)return null;const m=p?`modal-${p}`:"";return n.jsx("div",{className:"modal fade in",style:{display:"block"},tabIndex:-1,role:"dialog",children:n.jsx("div",{className:`modal-dialog ${m}`,role:"document",children:n.jsxs("div",{className:"modal-content",children:[n.jsxs("div",{className:"modal-header",children:[n.jsx("button",{type:"button",className:"close",onClick:f,"aria-hidden":"true",children:n.jsx("span",{className:"pficon pficon-close"})}),n.jsx("h4",{className:"modal-title",children:a})]}),n.jsx("div",{className:"modal-body",children:c})]})})})},Me=({variant:a,children:i})=>{const c={warning:"text-yellow-600",success:"text-green-600",error:"text-red-600"}[a]||"";return n.jsx("p",{className:c,children:i})},Ve=({children:a,...i})=>n.jsx("table",{...i,children:a}),Ue=({children:a,...i})=>n.jsx("tbody",{...i,children:a}),Be=({children:a,...i})=>n.jsx("td",{...i,children:a}),Je=({children:a,...i})=>n.jsx("th",{...i,children:a}),qe=({children:a,...i})=>n.jsx("thead",{...i,children:a}),Ge=({children:a,...i})=>n.jsx("tr",{...i,children:a}),ae=({items:a,selected:i,title:f,onChange:c})=>{const[p,m]=O.useState(!1),_=()=>{m(b=>!b)},C=b=>{m(!1),c(b)},g=b=>{const x=b.id===i;return n.jsx("li",{onClick:()=>C(b),className:x?"active":"",children:n.jsx("a",{href:"#",children:b.title})},b.id)},w=p?"dropdown open":"dropdown";return n.jsxs("div",{className:w,style:{display:"inline-block"},children:[n.jsxs("button",{className:"btn btn-default dropdown-toggle",onClick:_,children:[f,n.jsx("span",{className:"caret"})]}),p&&n.jsx("ul",{className:"dropdown-menu",children:a.map(g)})]})},ie=({currentPage:a,totalPages:i,onPageChange:f})=>{const c=()=>{a>1&&f(a-1)},p=()=>{a<i&&f(a+1)};return n.jsxs("div",{children:[n.jsx("span",{children:n.jsxs("span",{className:"pagination-pf-items-current",children:[a," - ",i]})}),n.jsxs("div",{className:"btn-group ml-2",children:[n.jsx("button",{type:"button",className:`btn btn-default ${a===1?"disabled":""}`,disabled:a===1,onClick:c,children:n.jsx("i",{className:"fa fa-angle-left"})}),n.jsx("button",{type:"button",className:`btn btn-default ${a===i?"disabled":""}`,disabled:a===i,onClick:p,children:n.jsx("i",{className:"fa fa-angle-right"})})]})]})},oe=[{id:1,title:"5 сек",data:5e3},{id:2,title:"10 сек",data:1e4},{id:3,title:"20 сек",data:2e4},{id:4,title:"30 сек",data:3e4},{id:5,title:"60 сек",data:6e4}],se=({onChange:a,value:i,onRefresh:f})=>{var m;const c=_=>{a(_.data)},p=(m=oe.find(_=>_.data===i))==null?void 0:m.id;return n.jsxs("div",{className:"flex",children:[n.jsx(q,{type:"default",onClick:f,children:n.jsx("i",{className:"fa fa-refresh"})}),n.jsx(ae,{onChange:c,items:oe,selected:p})]})},He=({interval:a,page:i,totalPages:f,onRefresh:c,onChangeInterval:p,onPageChange:m})=>n.jsxs("div",{className:"flex justify-between bg-[#f5f5f5] border border-[#d1d1d1]",children:[n.jsx("div",{className:"m-[5px]",children:n.jsx(se,{value:a,onChange:p,onRefresh:c})}),n.jsx("div",{className:"m-[5px]",children:n.jsx(ie,{currentPage:i,totalPages:f,onPageChange:m})})]});function ze(a,i){O.useEffect(()=>{if(!a)return;const f=setInterval(()=>{i()},a);return()=>clearInterval(f)},[a])}const Xe=({items:a})=>n.jsx("ol",{className:"breadcrumb",children:a.map((i,f)=>n.jsx("li",{className:i.active?"active":"",children:i.active?i.title:n.jsx("a",{href:i.href,children:i.title})},f))}),Ze=()=>n.jsxs("div",{children:[n.jsx(Xe,{items:[{title:"Дополнения",active:!0},{title:"Название плагина",href:"#Название плагина"}]}),n.jsx(q,{children:"Hello"})]});v.Button=q,v.Dropdown=ae,v.HelpText=Me,v.Input=Ye,v.Modal=Le,v.Pagination=ie,v.ReloadButton=se,v.SampleComp=Ze,v.Tab=$e,v.Table=Ve,v.TableToolbar=He,v.Tabs=We,v.Tbody=Ue,v.Td=Be,v.Th=Je,v.Thead=qe,v.Tr=Ge,v.useIntervalLoader=ze,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
|