ovirt-ui-toolkit 0.0.11 → 0.0.13
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.
|
@@ -13,11 +13,11 @@ var _e;
|
|
|
13
13
|
function br() {
|
|
14
14
|
if (_e) return A;
|
|
15
15
|
_e = 1;
|
|
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,
|
|
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, m = { 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
|
-
for (p in x) c.call(x, p) && !
|
|
20
|
+
for (p in x) c.call(x, p) && !m.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
22
|
return { $$typeof: i, type: T, key: O, ref: W, props: R, _owner: v.current };
|
|
23
23
|
}
|
|
@@ -34,9 +34,9 @@ var I = {};
|
|
|
34
34
|
* LICENSE file in the root directory of this source tree.
|
|
35
35
|
*/
|
|
36
36
|
var Te;
|
|
37
|
-
function
|
|
37
|
+
function mr() {
|
|
38
38
|
return Te || (Te = 1, process.env.NODE_ENV !== "production" && function() {
|
|
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"),
|
|
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"), m = 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;
|
|
@@ -64,7 +64,7 @@ function hr() {
|
|
|
64
64
|
var $e = !1, De = !1, Fe = !1, Ae = !1, Ie = !1, K;
|
|
65
65
|
K = Symbol.for("react.module.reference");
|
|
66
66
|
function We(e) {
|
|
67
|
-
return !!(typeof e == "string" || typeof e == "function" || e === c || e ===
|
|
67
|
+
return !!(typeof e == "string" || typeof e == "function" || e === c || e === m || Ie || e === v || e === C || e === p || Ae || e === W || $e || De || Fe || typeof e == "object" && e !== null && (e.$$typeof === O || e.$$typeof === R || e.$$typeof === E || e.$$typeof === T || e.$$typeof === x || // This needs to include all possible module reference object
|
|
68
68
|
// types supported by any Flight configuration anywhere since
|
|
69
69
|
// we don't know which Flight build this will end up being used
|
|
70
70
|
// with.
|
|
@@ -92,7 +92,7 @@ function hr() {
|
|
|
92
92
|
return "Fragment";
|
|
93
93
|
case f:
|
|
94
94
|
return "Portal";
|
|
95
|
-
case
|
|
95
|
+
case m:
|
|
96
96
|
return "Profiler";
|
|
97
97
|
case v:
|
|
98
98
|
return "StrictMode";
|
|
@@ -256,18 +256,18 @@ function hr() {
|
|
|
256
256
|
if (j && s && typeof j.stack == "string") {
|
|
257
257
|
for (var o = j.stack.split(`
|
|
258
258
|
`), y = s.stack.split(`
|
|
259
|
-
`), b = o.length - 1,
|
|
260
|
-
|
|
261
|
-
for (; b >= 1 &&
|
|
262
|
-
if (o[b] !== y[
|
|
263
|
-
if (b !== 1 ||
|
|
259
|
+
`), b = o.length - 1, h = y.length - 1; b >= 1 && h >= 0 && o[b] !== y[h]; )
|
|
260
|
+
h--;
|
|
261
|
+
for (; b >= 1 && h >= 0; b--, h--)
|
|
262
|
+
if (o[b] !== y[h]) {
|
|
263
|
+
if (b !== 1 || h !== 1)
|
|
264
264
|
do
|
|
265
|
-
if (b--,
|
|
265
|
+
if (b--, h--, h < 0 || o[b] !== y[h]) {
|
|
266
266
|
var _ = `
|
|
267
267
|
` + o[b].replace(" at new ", " at ");
|
|
268
268
|
return e.displayName && _.includes("<anonymous>") && (_ = _.replace("<anonymous>", e.displayName)), typeof e == "function" && L.set(e, _), _;
|
|
269
269
|
}
|
|
270
|
-
while (b >= 1 &&
|
|
270
|
+
while (b >= 1 && h >= 0);
|
|
271
271
|
break;
|
|
272
272
|
}
|
|
273
273
|
}
|
|
@@ -369,7 +369,7 @@ function hr() {
|
|
|
369
369
|
ref: !0,
|
|
370
370
|
__self: !0,
|
|
371
371
|
__source: !0
|
|
372
|
-
}, be,
|
|
372
|
+
}, be, me;
|
|
373
373
|
function Xe(e) {
|
|
374
374
|
if (F.call(e, "ref")) {
|
|
375
375
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
@@ -403,7 +403,7 @@ function hr() {
|
|
|
403
403
|
function er(e, r) {
|
|
404
404
|
{
|
|
405
405
|
var t = function() {
|
|
406
|
-
|
|
406
|
+
me || (me = !0, g("%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));
|
|
407
407
|
};
|
|
408
408
|
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
409
409
|
get: t,
|
|
@@ -452,19 +452,19 @@ function hr() {
|
|
|
452
452
|
l[d] === void 0 && (l[d] = b[d]);
|
|
453
453
|
}
|
|
454
454
|
if (o || y) {
|
|
455
|
-
var
|
|
456
|
-
o && Ke(l,
|
|
455
|
+
var h = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
456
|
+
o && Ke(l, h), y && er(l, h);
|
|
457
457
|
}
|
|
458
458
|
return rr(e, o, y, u, s, pe.current, l);
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
var z = N.ReactCurrentOwner,
|
|
461
|
+
var z = N.ReactCurrentOwner, he = N.ReactDebugCurrentFrame;
|
|
462
462
|
function P(e) {
|
|
463
463
|
if (e) {
|
|
464
464
|
var r = e._owner, t = M(e.type, e._source, r ? r.type : null);
|
|
465
|
-
|
|
465
|
+
he.setExtraStackFrame(t);
|
|
466
466
|
} else
|
|
467
|
-
|
|
467
|
+
he.setExtraStackFrame(null);
|
|
468
468
|
}
|
|
469
469
|
var H;
|
|
470
470
|
H = !1;
|
|
@@ -580,9 +580,9 @@ Check the top-level render call using <` + t + ">.");
|
|
|
580
580
|
var b;
|
|
581
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
|
-
var
|
|
584
|
-
if (
|
|
585
|
-
return
|
|
583
|
+
var h = tr(e, r, t, u, d);
|
|
584
|
+
if (h == null)
|
|
585
|
+
return h;
|
|
586
586
|
if (l) {
|
|
587
587
|
var _ = r.children;
|
|
588
588
|
if (_ !== void 0)
|
|
@@ -610,7 +610,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
610
610
|
<%s key={someKey} {...props} />`, Z, k, fr, k), Ee[k + Z] = !0;
|
|
611
611
|
}
|
|
612
612
|
}
|
|
613
|
-
return e === c ? sr(
|
|
613
|
+
return e === c ? sr(h) : ir(h), h;
|
|
614
614
|
}
|
|
615
615
|
}
|
|
616
616
|
function or(e, r, t) {
|
|
@@ -624,17 +624,17 @@ 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 = br() : U.exports =
|
|
627
|
+
function hr() {
|
|
628
|
+
return Ce || (Ce = 1, process.env.NODE_ENV === "production" ? U.exports = br() : U.exports = mr()), U.exports;
|
|
629
629
|
}
|
|
630
|
-
var n =
|
|
631
|
-
const Se = ({
|
|
630
|
+
var n = hr();
|
|
631
|
+
const Rr = () => /* @__PURE__ */ n.jsx("div", { className: "toolbar-pf" }), xr = ({ 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)) }), Se = ({
|
|
632
632
|
type: a = "default",
|
|
633
633
|
title: i,
|
|
634
634
|
size: f,
|
|
635
635
|
label: c,
|
|
636
636
|
onClick: v,
|
|
637
|
-
isDisabled:
|
|
637
|
+
isDisabled: m = !1,
|
|
638
638
|
children: E,
|
|
639
639
|
className: T = ""
|
|
640
640
|
}) => {
|
|
@@ -645,7 +645,7 @@ const Se = ({
|
|
|
645
645
|
className: R,
|
|
646
646
|
type: "button",
|
|
647
647
|
onClick: v,
|
|
648
|
-
disabled:
|
|
648
|
+
disabled: m,
|
|
649
649
|
children: /* @__PURE__ */ n.jsxs("div", { className: "flex items-center", children: [
|
|
650
650
|
E || c,
|
|
651
651
|
" ",
|
|
@@ -653,7 +653,7 @@ const Se = ({
|
|
|
653
653
|
] })
|
|
654
654
|
}
|
|
655
655
|
);
|
|
656
|
-
},
|
|
656
|
+
}, _r = ({ children: a, eventKey: i, active: f }) => /* @__PURE__ */ n.jsx(
|
|
657
657
|
"div",
|
|
658
658
|
{
|
|
659
659
|
className: `tab-pane ${f ? "active" : ""}`,
|
|
@@ -663,13 +663,13 @@ const Se = ({
|
|
|
663
663
|
children: a
|
|
664
664
|
},
|
|
665
665
|
i
|
|
666
|
-
),
|
|
666
|
+
), Tr = ({ activeKey: a, onSelect: i, children: f }) => /* @__PURE__ */ n.jsxs("div", { className: "tabs-container", children: [
|
|
667
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
|
-
onClick: (
|
|
672
|
-
|
|
671
|
+
onClick: (m) => {
|
|
672
|
+
m.preventDefault(), i(c);
|
|
673
673
|
},
|
|
674
674
|
children: v
|
|
675
675
|
}
|
|
@@ -685,45 +685,45 @@ const Se = ({
|
|
|
685
685
|
},
|
|
686
686
|
c
|
|
687
687
|
)) }) })
|
|
688
|
-
] }),
|
|
688
|
+
] }), Cr = ({
|
|
689
689
|
id: a,
|
|
690
690
|
type: i,
|
|
691
691
|
placeholder: f = "",
|
|
692
692
|
value: c,
|
|
693
693
|
onChange: v,
|
|
694
|
-
className:
|
|
694
|
+
className: m = "form-control"
|
|
695
695
|
}) => /* @__PURE__ */ n.jsx(
|
|
696
696
|
"input",
|
|
697
697
|
{
|
|
698
698
|
type: i,
|
|
699
699
|
id: a,
|
|
700
|
-
className:
|
|
700
|
+
className: m,
|
|
701
701
|
placeholder: f,
|
|
702
702
|
value: c,
|
|
703
703
|
onChange: v
|
|
704
704
|
}
|
|
705
|
-
),
|
|
705
|
+
), wr = ({ title: a, isOpen: i, onClose: f, children: c, size: v }) => {
|
|
706
706
|
if (!i) return null;
|
|
707
|
-
const
|
|
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 ${
|
|
707
|
+
const m = v ? `modal-${v}` : "";
|
|
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 ${m}`, 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
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
|
+
}, Or = ({ 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
720
|
}[a] || "";
|
|
721
721
|
return /* @__PURE__ */ n.jsx("p", { className: c, children: i });
|
|
722
|
-
},
|
|
723
|
-
const [v,
|
|
724
|
-
|
|
722
|
+
}, Sr = ({ children: a, ...i }) => /* @__PURE__ */ n.jsx("table", { ...i, children: a }), kr = ({ children: a, ...i }) => /* @__PURE__ */ n.jsx("tbody", { ...i, children: a }), Nr = ({ children: a, ...i }) => /* @__PURE__ */ n.jsx("td", { ...i, children: a }), Pr = ({ children: a, ...i }) => /* @__PURE__ */ n.jsx("th", { ...i, children: a }), $r = ({ children: a, ...i }) => /* @__PURE__ */ n.jsx("thead", { ...i, children: a }), Dr = ({ children: a, ...i }) => /* @__PURE__ */ n.jsx("tr", { ...i, children: a }), gr = ({ items: a, selected: i, title: f, onChange: c }) => {
|
|
723
|
+
const [v, m] = vr(!1), E = () => {
|
|
724
|
+
m((p) => !p);
|
|
725
725
|
}, T = (p) => {
|
|
726
|
-
|
|
726
|
+
m(!1), c(p);
|
|
727
727
|
}, x = (p) => {
|
|
728
728
|
const R = p.id === i;
|
|
729
729
|
return /* @__PURE__ */ n.jsx(
|
|
@@ -750,7 +750,7 @@ const Se = ({
|
|
|
750
750
|
),
|
|
751
751
|
v && /* @__PURE__ */ n.jsx("ul", { className: "dropdown-menu", children: a.map(x) })
|
|
752
752
|
] });
|
|
753
|
-
},
|
|
753
|
+
}, yr = ({ currentPage: a, totalPages: i, onPageChange: f }) => {
|
|
754
754
|
const c = () => {
|
|
755
755
|
a > 1 && f(a - 1);
|
|
756
756
|
}, v = () => {
|
|
@@ -791,25 +791,25 @@ 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
|
-
],
|
|
795
|
-
var
|
|
794
|
+
], jr = ({ onChange: a, value: i, onRefresh: f }) => {
|
|
795
|
+
var m;
|
|
796
796
|
const c = (E) => {
|
|
797
797
|
a(E.data);
|
|
798
|
-
}, v = (
|
|
798
|
+
}, v = (m = we.find((E) => E.data === i)) == null ? void 0 : m.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(gr, { onChange: c, items: we, selected: v })
|
|
802
802
|
] });
|
|
803
|
-
},
|
|
803
|
+
}, Fr = ({
|
|
804
804
|
interval: a,
|
|
805
805
|
page: i,
|
|
806
806
|
totalPages: f,
|
|
807
807
|
onRefresh: c,
|
|
808
808
|
onChangeInterval: v,
|
|
809
|
-
onPageChange:
|
|
809
|
+
onPageChange: m
|
|
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
|
+
jr,
|
|
813
813
|
{
|
|
814
814
|
value: a,
|
|
815
815
|
onChange: v,
|
|
@@ -817,15 +817,15 @@ const Se = ({
|
|
|
817
817
|
}
|
|
818
818
|
) }),
|
|
819
819
|
/* @__PURE__ */ n.jsx("div", { className: "m-[5px]", children: /* @__PURE__ */ n.jsx(
|
|
820
|
-
|
|
820
|
+
yr,
|
|
821
821
|
{
|
|
822
822
|
currentPage: i,
|
|
823
823
|
totalPages: f,
|
|
824
|
-
onPageChange:
|
|
824
|
+
onPageChange: m
|
|
825
825
|
}
|
|
826
826
|
) })
|
|
827
827
|
] });
|
|
828
|
-
function
|
|
828
|
+
function Ar(a, i) {
|
|
829
829
|
pr(() => {
|
|
830
830
|
if (!a)
|
|
831
831
|
return;
|
|
@@ -835,9 +835,9 @@ function Fr(a, i) {
|
|
|
835
835
|
return () => clearInterval(f);
|
|
836
836
|
}, [a]);
|
|
837
837
|
}
|
|
838
|
-
const
|
|
838
|
+
const Ir = () => /* @__PURE__ */ n.jsxs("div", { children: [
|
|
839
839
|
/* @__PURE__ */ n.jsx(
|
|
840
|
-
|
|
840
|
+
xr,
|
|
841
841
|
{
|
|
842
842
|
items: [
|
|
843
843
|
{ title: "Дополнения", active: !0 },
|
|
@@ -848,22 +848,24 @@ const jr = ({ items: a }) => /* @__PURE__ */ n.jsx("ol", { className: "breadcrum
|
|
|
848
848
|
/* @__PURE__ */ n.jsx(Se, { children: "Hello" })
|
|
849
849
|
] });
|
|
850
850
|
export {
|
|
851
|
+
xr as Breadcrumb,
|
|
851
852
|
Se as Button,
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
853
|
+
gr as Dropdown,
|
|
854
|
+
Or as HelpText,
|
|
855
|
+
Cr as Input,
|
|
856
|
+
wr as Modal,
|
|
857
|
+
yr as Pagination,
|
|
858
|
+
jr as ReloadButton,
|
|
859
|
+
Ir as SampleComp,
|
|
860
|
+
_r as Tab,
|
|
861
|
+
Sr as Table,
|
|
862
|
+
Fr as TableToolbar,
|
|
863
|
+
Tr as Tabs,
|
|
864
|
+
kr as Tbody,
|
|
865
|
+
Nr as Td,
|
|
866
|
+
Pr as Th,
|
|
867
|
+
$r as Thead,
|
|
868
|
+
Rr as ToolbarContainer,
|
|
869
|
+
Dr as Tr,
|
|
870
|
+
Ar as useIntervalLoader
|
|
869
871
|
};
|
|
@@ -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 Fe(){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,
|
|
17
|
+
*/var te;function Ae(){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"),ce=Symbol.iterator,Ke="@@iterator";function er(e){if(e===null||typeof e!="object")return null;var r=ce&&e[ce]||e[Ke];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];rr("error",e,t)}}function rr(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 tr=!1,nr=!1,ar=!1,ir=!1,or=!1,ue;ue=Symbol.for("react.module.reference");function sr(e){return!!(typeof e=="string"||typeof e=="function"||e===c||e===m||or||e===p||e===w||e===b||ir||e===M||tr||nr||ar||typeof e=="object"&&e!==null&&(e.$$typeof===k||e.$$typeof===x||e.$$typeof===_||e.$$typeof===C||e.$$typeof===g||e.$$typeof===ue||e.getModuleId!==void 0))}function lr(e,r,t){var o=e.displayName;if(o)return o;var u=r.displayName||r.name||"";return u!==""?t+"("+u+")":t}function fe(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 fe(r)+".Consumer";case _:var t=e;return fe(t._context)+".Provider";case g:return lr(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 N=Object.assign,W=0,de,ve,pe,be,he,me,ye;function ge(){}ge.__reactDisabledLog=!0;function cr(){{if(W===0){de=console.log,ve=console.info,pe=console.warn,be=console.error,he=console.group,me=console.groupCollapsed,ye=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ge,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}W++}}function ur(){{if(W--,W===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:N({},e,{value:de}),info:N({},e,{value:ve}),warn:N({},e,{value:pe}),error:N({},e,{value:be}),group:N({},e,{value:he}),groupCollapsed:N({},e,{value:me}),groupEnd:N({},e,{value:ye})})}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,B;{var fr=typeof WeakMap=="function"?WeakMap:Map;B=new fr}function je(e,r){if(!e||z)return"";{var t=B.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,cr();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"&&
|
|
21
|
+
`+s[h].replace(" at new "," at ");return e.displayName&&T.includes("<anonymous>")&&(T=T.replace("<anonymous>",e.displayName)),typeof e=="function"&&B.set(e,T),T}while(h>=1&&y>=0);break}}}finally{z=!1,G.current=d,ur(),Error.prepareStackTrace=u}var F=e?e.displayName||e.name:"",P=F?V(F):"";return typeof e=="function"&&B.set(e,P),P}function dr(e,r,t){return je(e,!1)}function vr(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function U(e,r,t){if(e==null)return"";if(typeof e=="function")return je(e,vr(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 dr(e.render);case x:return U(e.type,r,t);case k:{var o=e,u=o._payload,d=o._init;try{return U(d(u),r,t)}catch{}}}return""}var Y=Object.prototype.hasOwnProperty,Re={},Ee=D.ReactDebugCurrentFrame;function J(e){if(e){var r=e._owner,t=U(e.type,e._source,r?r.type:null);Ee.setExtraStackFrame(t)}else Ee.setExtraStackFrame(null)}function pr(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 Re)&&(Re[s.message]=!0,J(u),j("Failed %s type: %s",t,s.message),J(null))}}}var br=Array.isArray;function X(e){return br(e)}function hr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function mr(e){try{return _e(e),!1}catch{return!0}}function _e(e){return""+e}function xe(e){if(mr(e))return j("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",hr(e)),_e(e)}var Te=D.ReactCurrentOwner,yr={key:!0,ref:!0,__self:!0,__source:!0},Ce,we;function gr(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 jr(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 Rr(e,r){typeof e.ref=="string"&&Te.current}function Er(e,r){{var t=function(){Ce||(Ce=!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 _r(e,r){{var t=function(){we||(we=!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 xr=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 Tr(e,r,t,o,u){{var d,l={},s=null,R=null;t!==void 0&&(xe(t),s=""+t),jr(r)&&(xe(r.key),s=""+r.key),gr(r)&&(R=r.ref,Rr(r,u));for(d in r)Y.call(r,d)&&!yr.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&&Er(l,y),R&&_r(l,y)}return xr(e,s,R,u,o,Te.current,l)}}var Z=D.ReactCurrentOwner,Oe=D.ReactDebugCurrentFrame;function I(e){if(e){var r=e._owner,t=U(e.type,e._source,r?r.type:null);Oe.setExtraStackFrame(t)}else Oe.setExtraStackFrame(null)}var Q;Q=!1;function K(e){return typeof e=="object"&&e!==null&&e.$$typeof===i}function Se(){{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 Cr(e){return""}var ke={};function wr(e){{var r=Se();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
|
|
25
|
+
Check the top-level render call using <`+t+">.")}return r}}function Ne(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=wr(r);if(ke[t])return;ke[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)&&Ne(o,r)}else if(K(e))e._store&&(e._store.validated=!0);else if(e){var u=er(e);if(typeof u=="function"&&u!==e.entries)for(var d=u.call(e),l;!(l=d.next()).done;)K(l.value)&&Ne(l.value,r)}}}function Or(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);pr(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 Sr(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 De={};function Ie(e,r,t,o,u,d){{var l=sr(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=Cr();R?s+=R:s+=Se();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=Tr(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 P=S(e),E=Object.keys(r).filter(function(Fr){return Fr!=="key"}),ee=E.length>0?"{key: someKey, "+E.join(": ..., ")+": ...}":"{key: someKey}";if(!De[P+ee]){var Ir=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,
|
|
30
|
+
<%s key={someKey} {...props} />`,ee,P,Ir,P),De[P+ee]=!0}}return e===c?Sr(y):Or(y),y}}function kr(e,r,t){return Ie(e,r,t,!0)}function Nr(e,r,t){return Ie(e,r,t,!1)}var Pr=Nr,Dr=kr;$.Fragment=c,$.jsx=Pr,$.jsxs=Dr}()),$}var ne;function $e(){return ne||(ne=1,process.env.NODE_ENV==="production"?L.exports=Fe():L.exports=Ae()),L.exports}var n=$e();const We=()=>n.jsx("div",{className:"toolbar-pf"}),ae=({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))}),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]})})},Ye=({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),Le=({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))})})]}),Me=({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}),Ve=({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})]})})})},Be=({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})},Ue=({children:a,...i})=>n.jsx("table",{...i,children:a}),Je=({children:a,...i})=>n.jsx("tbody",{...i,children:a}),qe=({children:a,...i})=>n.jsx("td",{...i,children:a}),Ge=({children:a,...i})=>n.jsx("th",{...i,children:a}),He=({children:a,...i})=>n.jsx("thead",{...i,children:a}),ze=({children:a,...i})=>n.jsx("tr",{...i,children:a}),ie=({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)})]})},oe=({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"})})]})]})},se=[{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}],le=({onChange:a,value:i,onRefresh:f})=>{var m;const c=_=>{a(_.data)},p=(m=se.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(ie,{onChange:c,items:se,selected:p})]})},Xe=({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(le,{value:a,onChange:p,onRefresh:c})}),n.jsx("div",{className:"m-[5px]",children:n.jsx(oe,{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 Qe=()=>n.jsxs("div",{children:[n.jsx(ae,{items:[{title:"Дополнения",active:!0},{title:"Название плагина",href:"#Название плагина"}]}),n.jsx(q,{children:"Hello"})]});v.Breadcrumb=ae,v.Button=q,v.Dropdown=ie,v.HelpText=Be,v.Input=Me,v.Modal=Ve,v.Pagination=oe,v.ReloadButton=le,v.SampleComp=Qe,v.Tab=Ye,v.Table=Ue,v.TableToolbar=Xe,v.Tabs=Le,v.Tbody=Je,v.Td=qe,v.Th=Ge,v.Thead=He,v.ToolbarContainer=We,v.Tr=ze,v.useIntervalLoader=Ze,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ovirt-ui-toolkit",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/ovirt-ui-toolkit.umd.js",
|
|
6
6
|
"module": "./dist/ovirt-ui-toolkit.es.js",
|
|
@@ -16,11 +16,13 @@
|
|
|
16
16
|
"preview": "vite preview"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
+
"@tailwindcss/vite": "^4.1.4",
|
|
19
20
|
"bootstrap": "^3.4.1",
|
|
20
21
|
"jquery": "^3.7.1",
|
|
21
22
|
"patternfly": "^3.59.5",
|
|
22
23
|
"react": "^18.2.0",
|
|
23
24
|
"react-dom": "^18.2.0",
|
|
25
|
+
"tailwindcss": "^4.1.4",
|
|
24
26
|
"vite-plugin-dts": "^4.5.3"
|
|
25
27
|
},
|
|
26
28
|
"devDependencies": {
|