@prom-ui/core 1.19.0 → 2.0.0-alpha.0
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/Avatar/cjs/index.development.js +40 -59
- package/Avatar/cjs/index.development.v2.js +40 -59
- package/Avatar/cjs/index.production.js +1 -1
- package/Avatar/cjs/index.production.v2.js +1 -1
- package/Avatar/package.json +1 -1
- package/Backdrop/cjs/index.development.js +62 -77
- package/Backdrop/cjs/index.development.v2.js +62 -77
- package/Backdrop/cjs/index.production.js +1 -1
- package/Backdrop/cjs/index.production.v2.js +1 -1
- package/Backdrop/package.json +1 -1
- package/Badge/cjs/index.development.js +39 -57
- package/Badge/cjs/index.development.v2.js +39 -57
- package/Badge/cjs/index.production.js +1 -1
- package/Badge/cjs/index.production.v2.js +1 -1
- package/Badge/index.d.ts +5 -5
- package/Badge/package.json +1 -1
- package/Body/package.json +1 -1
- package/BodyContext/cjs/index.development.js +0 -21
- package/BodyContext/cjs/index.development.v2.js +0 -21
- package/BodyContext/cjs/index.production.js +1 -1
- package/BodyContext/cjs/index.production.v2.js +1 -1
- package/BodyContext/index.d.ts +0 -7
- package/BodyContext/package.json +1 -1
- package/BodyProvider/cjs/index.development.js +3 -6
- package/BodyProvider/cjs/index.development.v2.js +3 -6
- package/BodyProvider/cjs/index.production.js +1 -1
- package/BodyProvider/cjs/index.production.v2.js +1 -1
- package/BodyProvider/index.d.ts +0 -3
- package/BodyProvider/package.json +1 -1
- package/BodyScrollLock/cjs/index.development.js +1 -0
- package/BodyScrollLock/cjs/index.development.v2.js +1 -0
- package/BodyScrollLock/package.json +1 -1
- package/Box/cjs/index.development.js +1 -1
- package/Box/cjs/index.development.v2.js +1 -1
- package/Box/cjs/index.production.js +1 -1
- package/Box/cjs/index.production.v2.js +1 -1
- package/Box/cjs/style.development.css +1 -1
- package/Box/cjs/style.development.v2.css +1 -1
- package/Box/cjs/style.production.css +1 -1
- package/Box/cjs/style.production.v2.css +1 -1
- package/Box/index.d.ts +2 -2
- package/Box/package.json +1 -1
- package/Button/cjs/index.development.js +23 -34
- package/Button/cjs/index.development.v2.js +23 -34
- package/Button/cjs/index.production.js +1 -1
- package/Button/cjs/index.production.v2.js +1 -1
- package/Button/package.json +1 -1
- package/ButtonPageUp/cjs/index.development.js +100 -122
- package/ButtonPageUp/cjs/index.development.v2.js +100 -122
- package/ButtonPageUp/cjs/index.production.js +1 -1
- package/ButtonPageUp/cjs/index.production.v2.js +1 -1
- package/ButtonPageUp/index.d.ts +1 -1
- package/ButtonPageUp/package.json +1 -1
- package/Checkbox/cjs/index.development.js +43 -59
- package/Checkbox/cjs/index.development.v2.js +43 -59
- package/Checkbox/cjs/index.production.js +1 -1
- package/Checkbox/cjs/index.production.v2.js +1 -1
- package/Checkbox/package.json +1 -1
- package/ContextMenu/cjs/index.development.js +72 -86
- package/ContextMenu/cjs/index.development.v2.js +72 -86
- package/ContextMenu/cjs/index.production.js +1 -1
- package/ContextMenu/cjs/index.production.v2.js +1 -1
- package/ContextMenu/package.json +1 -1
- package/ErrorCatch/cjs/index.development.js +115 -160
- package/ErrorCatch/cjs/index.development.v2.js +115 -160
- package/ErrorCatch/cjs/index.production.js +1 -1
- package/ErrorCatch/cjs/index.production.v2.js +1 -1
- package/ErrorCatch/package.json +1 -1
- package/ErrorCatch/utils.d.ts +0 -2
- package/ErrorCatch/withErrorCatch.d.ts +1 -1
- package/Flex/package.json +1 -1
- package/Grid/package.json +1 -1
- package/Icon/package.json +1 -1
- package/Image/package.json +1 -1
- package/ImageEmoji/cjs/index.development.js +24 -34
- package/ImageEmoji/cjs/index.development.v2.js +24 -34
- package/ImageEmoji/cjs/index.production.js +1 -1
- package/ImageEmoji/cjs/index.production.v2.js +1 -1
- package/ImageEmoji/package.json +1 -1
- package/Input/package.json +1 -1
- package/InputField/cjs/index.development.js +71 -101
- package/InputField/cjs/index.development.v2.js +71 -101
- package/InputField/cjs/index.production.js +1 -1
- package/InputField/cjs/index.production.v2.js +1 -1
- package/InputField/package.json +1 -1
- package/InputField/utils.d.ts +0 -1
- package/KeyPress/package.json +1 -1
- package/Label/cjs/index.development.js +2 -0
- package/Label/cjs/index.development.v2.js +2 -0
- package/Label/package.json +1 -1
- package/Line/package.json +1 -1
- package/Link/package.json +1 -1
- package/List/package.json +1 -1
- package/Media/cjs/index.development.js +37 -38
- package/Media/cjs/index.development.v2.js +37 -38
- package/Media/cjs/index.production.js +1 -1
- package/Media/cjs/index.production.v2.js +1 -1
- package/Media/index.d.ts +1 -1
- package/Media/package.json +1 -1
- package/Modal/cjs/index.development.js +64 -82
- package/Modal/cjs/index.development.v2.js +64 -82
- package/Modal/cjs/index.production.js +1 -1
- package/Modal/cjs/index.production.v2.js +1 -1
- package/Modal/package.json +1 -1
- package/OutsideClick/cjs/index.development.js +62 -75
- package/OutsideClick/cjs/index.development.v2.js +62 -75
- package/OutsideClick/cjs/index.production.js +1 -1
- package/OutsideClick/cjs/index.production.v2.js +1 -1
- package/OutsideClick/package.json +1 -1
- package/Overlay/cjs/index.development.js +94 -110
- package/Overlay/cjs/index.development.v2.js +94 -110
- package/Overlay/cjs/index.production.js +1 -1
- package/Overlay/cjs/index.production.v2.js +1 -1
- package/Overlay/components/OverlayErrCatch.d.ts +1 -1
- package/Overlay/components/SwipeClose.d.ts +3 -3
- package/Overlay/index.d.ts +1 -1
- package/Overlay/package.json +1 -1
- package/PhotoGallery/cjs/index.development.js +82 -76
- package/PhotoGallery/cjs/index.development.v2.js +82 -76
- package/PhotoGallery/cjs/index.production.js +1 -1
- package/PhotoGallery/cjs/index.production.v2.js +1 -1
- package/PhotoGallery/cjs/style.development.css +1 -1
- package/PhotoGallery/cjs/style.development.v2.css +1 -1
- package/PhotoGallery/cjs/style.production.css +1 -1
- package/PhotoGallery/cjs/style.production.v2.css +1 -1
- package/PhotoGallery/index.d.ts +1 -1
- package/PhotoGallery/package.json +1 -1
- package/PhotoGallery/utils.d.ts +1 -1
- package/Picture/package.json +1 -1
- package/Portal/index.d.ts +1 -1
- package/Portal/package.json +1 -1
- package/Progress/cjs/index.development.js +58 -76
- package/Progress/cjs/index.development.v2.js +58 -76
- package/Progress/cjs/index.production.js +1 -1
- package/Progress/cjs/index.production.v2.js +1 -1
- package/Progress/package.json +1 -1
- package/QRCode/package.json +1 -1
- package/Rating/cjs/index.development.js +23 -36
- package/Rating/cjs/index.development.v2.js +23 -36
- package/Rating/cjs/index.production.js +1 -1
- package/Rating/cjs/index.production.v2.js +1 -1
- package/Rating/package.json +1 -1
- package/RatingSelect/cjs/index.development.js +74 -89
- package/RatingSelect/cjs/index.development.v2.js +74 -89
- package/RatingSelect/cjs/index.production.js +1 -1
- package/RatingSelect/cjs/index.production.v2.js +1 -1
- package/RatingSelect/package.json +1 -1
- package/Scroll/package.json +1 -1
- package/ScrollControls/ScrollControlsButton.d.ts +1 -1
- package/ScrollControls/cjs/index.development.js +86 -108
- package/ScrollControls/cjs/index.development.v2.js +86 -108
- package/ScrollControls/cjs/index.production.js +1 -1
- package/ScrollControls/cjs/index.production.v2.js +1 -1
- package/ScrollControls/index.d.ts +1 -1
- package/ScrollControls/package.json +1 -1
- package/SimpleSlider/cjs/index.development.js +112 -133
- package/SimpleSlider/cjs/index.development.v2.js +112 -133
- package/SimpleSlider/cjs/index.production.js +1 -1
- package/SimpleSlider/cjs/index.production.v2.js +1 -1
- package/SimpleSlider/index.d.ts +0 -1
- package/SimpleSlider/package.json +1 -2
- package/SimpleSlider/utils.d.ts +1 -1
- package/Skeleton/cjs/index.development.js +58 -76
- package/Skeleton/cjs/index.development.v2.js +58 -76
- package/Skeleton/cjs/index.production.js +1 -1
- package/Skeleton/cjs/index.production.v2.js +1 -1
- package/Skeleton/index.d.ts +6 -6
- package/Skeleton/package.json +1 -1
- package/SnackBar/cjs/index.development.js +62 -77
- package/SnackBar/cjs/index.development.v2.js +62 -77
- package/SnackBar/cjs/index.production.js +1 -1
- package/SnackBar/cjs/index.production.v2.js +1 -1
- package/SnackBar/index.d.ts +8 -8
- package/SnackBar/package.json +1 -1
- package/SnackBarManager/cjs/index.development.js +81 -93
- package/SnackBarManager/cjs/index.development.v2.js +81 -93
- package/SnackBarManager/cjs/index.production.js +1 -1
- package/SnackBarManager/cjs/index.production.v2.js +1 -1
- package/SnackBarManager/package.json +1 -1
- package/Spinner/cjs/index.development.js +22 -34
- package/Spinner/cjs/index.development.v2.js +22 -34
- package/Spinner/cjs/index.production.js +1 -1
- package/Spinner/cjs/index.production.v2.js +1 -1
- package/Spinner/index.d.ts +3 -3
- package/Spinner/package.json +1 -1
- package/Text/package.json +1 -1
- package/TextEmoji/cjs/index.development.js +22 -34
- package/TextEmoji/cjs/index.development.v2.js +22 -34
- package/TextEmoji/cjs/index.production.js +1 -1
- package/TextEmoji/cjs/index.production.v2.js +1 -1
- package/TextEmoji/package.json +1 -1
- package/Tooltip/cjs/index.development.js +12 -12
- package/Tooltip/cjs/index.development.v2.js +12 -12
- package/Tooltip/cjs/index.production.js +1 -1
- package/Tooltip/cjs/index.production.v2.js +1 -1
- package/Tooltip/package.json +1 -1
- package/Tumbler/cjs/index.development.js +42 -57
- package/Tumbler/cjs/index.development.v2.js +42 -57
- package/Tumbler/cjs/index.production.js +1 -1
- package/Tumbler/cjs/index.production.v2.js +1 -1
- package/Tumbler/package.json +1 -1
- package/Viewport/cjs/index.development.js +22 -34
- package/Viewport/cjs/index.development.v2.js +22 -34
- package/Viewport/cjs/index.production.js +1 -1
- package/Viewport/cjs/index.production.v2.js +1 -1
- package/Viewport/package.json +1 -1
- package/base/types.d.ts +1 -1
- package/package.json +6 -15
- package/useBodyTTag/package.json +1 -1
- package/useBrowserLayoutEffect/package.json +1 -1
- package/useDebounce/cjs/index.development.js +37 -39
- package/useDebounce/cjs/index.development.v2.js +37 -39
- package/useDebounce/cjs/index.production.js +1 -1
- package/useDebounce/cjs/index.production.v2.js +1 -1
- package/useDebounce/index.d.ts +1 -1
- package/useDebounce/package.json +1 -1
- package/useForwardRef/index.d.ts +1 -1
- package/useForwardRef/package.json +1 -1
- package/useInView/cjs/index.development.js +0 -1
- package/useInView/cjs/index.development.v2.js +0 -1
- package/useInView/cjs/index.production.js +1 -1
- package/useInView/cjs/index.production.v2.js +1 -1
- package/useInView/index.d.ts +0 -1
- package/useInView/package.json +1 -2
- package/useIsMounted/package.json +1 -1
- package/useKeyPress/cjs/index.development.js +47 -40
- package/useKeyPress/cjs/index.development.v2.js +47 -40
- package/useKeyPress/cjs/index.production.js +1 -1
- package/useKeyPress/cjs/index.production.v2.js +1 -1
- package/useKeyPress/package.json +1 -1
- package/useMedia/package.json +1 -1
- package/useOutsideClick/package.json +1 -1
- package/usePortal/cjs/index.development.js +1 -1
- package/usePortal/cjs/index.development.v2.js +1 -1
- package/usePortal/cjs/index.production.js +1 -1
- package/usePortal/cjs/index.production.v2.js +1 -1
- package/usePortal/package.json +1 -1
- package/useScrollPosition/package.json +1 -1
- package/useSnackBar/package.json +1 -1
- package/SafeQuery/cjs/index.development.js +0 -73
- package/SafeQuery/cjs/index.development.v2.js +0 -73
- package/SafeQuery/cjs/index.production.js +0 -1
- package/SafeQuery/cjs/index.production.v2.js +0 -1
- package/SafeQuery/index.d.ts +0 -10
- package/SafeQuery/index.js +0 -7
- package/SafeQuery/index.v2.js +0 -7
- package/SafeQuery/package.json +0 -9
- package/useId/cjs/index.development.js +0 -43
- package/useId/cjs/index.development.v2.js +0 -43
- package/useId/cjs/index.production.js +0 -1
- package/useId/cjs/index.production.v2.js +0 -1
- package/useId/index.d.ts +0 -4
- package/useId/index.js +0 -7
- package/useId/index.v2.js +0 -7
- package/useId/package.json +0 -9
|
@@ -33,109 +33,95 @@ function _interopNamespaceCompat(e) {
|
|
|
33
33
|
var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
34
34
|
var classNames__default = /*#__PURE__*/_interopDefaultCompat(classNames);
|
|
35
35
|
|
|
36
|
-
function
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
36
|
+
function _arrayLikeToArray(r, a) {
|
|
37
|
+
(null == a || a > r.length) && (a = r.length);
|
|
38
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
39
|
+
return n;
|
|
40
|
+
}
|
|
41
|
+
function _arrayWithHoles(r) {
|
|
42
|
+
if (Array.isArray(r)) return r;
|
|
43
|
+
}
|
|
44
|
+
function _defineProperty(e, r, t) {
|
|
45
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
46
|
+
value: t,
|
|
47
|
+
enumerable: !0,
|
|
48
|
+
configurable: !0,
|
|
49
|
+
writable: !0
|
|
50
|
+
}) : e[r] = t, e;
|
|
51
|
+
}
|
|
52
|
+
function _iterableToArrayLimit(r, l) {
|
|
53
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
54
|
+
if (null != t) {
|
|
55
|
+
var e,
|
|
56
|
+
n,
|
|
57
|
+
i,
|
|
58
|
+
u,
|
|
59
|
+
a = [],
|
|
60
|
+
f = !0,
|
|
61
|
+
o = !1;
|
|
46
62
|
try {
|
|
47
|
-
if (
|
|
48
|
-
if (Object(
|
|
49
|
-
|
|
50
|
-
} else for (; !(
|
|
51
|
-
} catch (
|
|
52
|
-
|
|
63
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
64
|
+
if (Object(t) !== t) return;
|
|
65
|
+
f = !1;
|
|
66
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
67
|
+
} catch (r) {
|
|
68
|
+
o = !0, n = r;
|
|
53
69
|
} finally {
|
|
54
70
|
try {
|
|
55
|
-
if (!
|
|
71
|
+
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
56
72
|
} finally {
|
|
57
|
-
if (
|
|
73
|
+
if (o) throw n;
|
|
58
74
|
}
|
|
59
75
|
}
|
|
60
|
-
return
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
function _defineProperty(obj, key, value) {
|
|
64
|
-
key = _toPropertyKey(key);
|
|
65
|
-
if (key in obj) {
|
|
66
|
-
Object.defineProperty(obj, key, {
|
|
67
|
-
value: value,
|
|
68
|
-
enumerable: true,
|
|
69
|
-
configurable: true,
|
|
70
|
-
writable: true
|
|
71
|
-
});
|
|
72
|
-
} else {
|
|
73
|
-
obj[key] = value;
|
|
76
|
+
return a;
|
|
74
77
|
}
|
|
75
|
-
return obj;
|
|
76
78
|
}
|
|
77
|
-
function
|
|
78
|
-
|
|
79
|
-
var target = {};
|
|
80
|
-
var sourceKeys = Object.keys(source);
|
|
81
|
-
var key, i;
|
|
82
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
83
|
-
key = sourceKeys[i];
|
|
84
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
85
|
-
target[key] = source[key];
|
|
86
|
-
}
|
|
87
|
-
return target;
|
|
79
|
+
function _nonIterableRest() {
|
|
80
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
88
81
|
}
|
|
89
|
-
function _objectWithoutProperties(
|
|
90
|
-
if (
|
|
91
|
-
var
|
|
92
|
-
|
|
82
|
+
function _objectWithoutProperties(e, t) {
|
|
83
|
+
if (null == e) return {};
|
|
84
|
+
var o,
|
|
85
|
+
r,
|
|
86
|
+
i = _objectWithoutPropertiesLoose(e, t);
|
|
93
87
|
if (Object.getOwnPropertySymbols) {
|
|
94
|
-
var
|
|
95
|
-
for (
|
|
96
|
-
key = sourceSymbolKeys[i];
|
|
97
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
98
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
99
|
-
target[key] = source[key];
|
|
100
|
-
}
|
|
88
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
89
|
+
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
101
90
|
}
|
|
102
|
-
return
|
|
103
|
-
}
|
|
104
|
-
function _slicedToArray(arr, i) {
|
|
105
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
106
|
-
}
|
|
107
|
-
function _arrayWithHoles(arr) {
|
|
108
|
-
if (Array.isArray(arr)) return arr;
|
|
91
|
+
return i;
|
|
109
92
|
}
|
|
110
|
-
function
|
|
111
|
-
if (
|
|
112
|
-
|
|
113
|
-
var n
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
93
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
94
|
+
if (null == r) return {};
|
|
95
|
+
var t = {};
|
|
96
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
97
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
98
|
+
t[n] = r[n];
|
|
99
|
+
}
|
|
100
|
+
return t;
|
|
117
101
|
}
|
|
118
|
-
function
|
|
119
|
-
|
|
120
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
121
|
-
return arr2;
|
|
102
|
+
function _slicedToArray(r, e) {
|
|
103
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
122
104
|
}
|
|
123
|
-
function
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
if (prim !== undefined) {
|
|
130
|
-
var res = prim.call(input, hint || "default");
|
|
131
|
-
if (typeof res !== "object") return res;
|
|
105
|
+
function _toPrimitive(t, r) {
|
|
106
|
+
if ("object" != typeof t || !t) return t;
|
|
107
|
+
var e = t[Symbol.toPrimitive];
|
|
108
|
+
if (void 0 !== e) {
|
|
109
|
+
var i = e.call(t, r || "default");
|
|
110
|
+
if ("object" != typeof i) return i;
|
|
132
111
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
133
112
|
}
|
|
134
|
-
return (
|
|
113
|
+
return ("string" === r ? String : Number)(t);
|
|
135
114
|
}
|
|
136
|
-
function _toPropertyKey(
|
|
137
|
-
var
|
|
138
|
-
return
|
|
115
|
+
function _toPropertyKey(t) {
|
|
116
|
+
var i = _toPrimitive(t, "string");
|
|
117
|
+
return "symbol" == typeof i ? i : i + "";
|
|
118
|
+
}
|
|
119
|
+
function _unsupportedIterableToArray(r, a) {
|
|
120
|
+
if (r) {
|
|
121
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
122
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
123
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
124
|
+
}
|
|
139
125
|
}
|
|
140
126
|
|
|
141
127
|
var css = {"buttonContent":"ContextMenu__buttonContent___5zen8","buttonIcon":"ContextMenu__buttonIcon___X6HfE","buttonText":"ContextMenu__buttonText___-FPMX","list":"ContextMenu__list___0Zx8o","listItem":"ContextMenu__listItem___bLGxL","buttonContentColor_red-900":"ContextMenu__buttonContentColor_red-900___gQpHo"};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),e=require("clsx"),n=require("@prom-ui/core/Button"),r=require("@prom-ui/core/Icon"),o=require("@prom-ui/core/Overlay"),i=require("@prom-ui/core/Tooltip"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),e=require("clsx"),n=require("@prom-ui/core/Button"),r=require("@prom-ui/core/Icon"),o=require("@prom-ui/core/Overlay"),i=require("@prom-ui/core/Tooltip"),a=require("@prom-ui/core/useMedia");function u(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}function l(t){if(t&&"object"==typeof t&&"default"in t)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var c=l(t),d=u(e);function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function m(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,u=[],l=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return s(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var b={buttonContent:"k6I7C",buttonIcon:"AMl7D",buttonText:"_1HzQ4",list:"O4D4q",listItem:"LNQ-G","buttonContentColor_red-900":"A2TgC"},p=["children","items","onOpen","onClose","isRenderPortal","placement"],y=function(t){var e=t.children,u=t.items,l=t.onOpen,s=t.onClose,y=t.isRenderPortal,v=void 0===y||y,h=t.placement,_=void 0===h?"bottom-end":h,g=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,p),O=f(c.useState(!1),2),x=O[0],C=O[1],j=a.useMedia({minWidth:"medium"}),w=function(){l&&l(),C(!0)},q=function(){s&&s(),C(!1)},E=c.createElement("ul",{className:b.list,"data-qaid":g["data-qaid"]||"context_menu","data-testid":g["data-testid"]||"context_menu"},u.map((function(t,e){var o=t.icon,i=t.onClick,a=t.isCloseOnClick,u=void 0===a||a,l=t.color,s=t.children;return c.createElement("li",{key:e,className:b.listItem,"data-qaid":"context_menu_item","data-testid":"context_menu_item"},c.createElement(n.Button,{type:"button","button-theme":"white","button-width":"1-1","button-round":"none","button-padding":"xs m","button-blackhole":["border-none","awesome-content"],"button-weight":"normal","data-qaid":"context_menu_button","data-testid":"context_menu_button",onClick:function(t){u&&q(),i&&i(t)}},c.createElement("div",{className:d.default(b.buttonContent,m({},b["buttonContentColor_".concat(l)],Boolean(l)))},!!o&&c.createElement(r.Icon,{className:b.buttonIcon,"icon-as":o,style:{width:24,height:24},"data-qaid":"context_menu_button_icon","data-testid":"context_menu_button_icon"}),c.createElement("div",{className:b.buttonText,"data-qaid":"context_menu_button_text","data-testid":"context_menu_button_text"},s))))})));return j?c.createElement(i.Tooltip,{isRenderPortal:v,trigger:"click",placement:_,isShowArrow:!1,content:E,isVisible:x,padding:"0",onVisibleChange:function(t){x?t||q():t&&w()}},e):c.createElement(c.Fragment,null,c.cloneElement(e,{onClick:w}),c.createElement(o.Overlay,{isRenderPortal:v,isOpen:x,onClose:q,header:null,padding:"0"},E))};y.displayName="ContextMenu",exports.ContextMenu=y,require("./style.production.css");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),e=require("clsx"),n=require("@prom-ui/core/Button"),r=require("@prom-ui/core/Icon"),o=require("@prom-ui/core/Overlay"),i=require("@prom-ui/core/Tooltip"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),e=require("clsx"),n=require("@prom-ui/core/Button"),r=require("@prom-ui/core/Icon"),o=require("@prom-ui/core/Overlay"),i=require("@prom-ui/core/Tooltip"),a=require("@prom-ui/core/useMedia");function u(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}function l(t){if(t&&"object"==typeof t&&"default"in t)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var c=l(t),d=u(e);function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function m(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,u=[],l=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return s(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var b={buttonContent:"_5zen8",buttonIcon:"X6HfE",buttonText:"-FPMX",list:"_0Zx8o",listItem:"bLGxL","buttonContentColor_red-900":"gQpHo"},p=["children","items","onOpen","onClose","isRenderPortal","placement"],y=function(t){var e=t.children,u=t.items,l=t.onOpen,s=t.onClose,y=t.isRenderPortal,v=void 0===y||y,h=t.placement,_=void 0===h?"bottom-end":h,g=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,p),x=f(c.useState(!1),2),O=x[0],C=x[1],j=a.useMedia({minWidth:"medium"}),w=function(){l&&l(),C(!0)},E=function(){s&&s(),C(!1)},q=c.createElement("ul",{className:b.list,"data-qaid":g["data-qaid"]||"context_menu","data-testid":g["data-testid"]||"context_menu"},u.map((function(t,e){var o=t.icon,i=t.onClick,a=t.isCloseOnClick,u=void 0===a||a,l=t.color,s=t.children;return c.createElement("li",{key:e,className:b.listItem,"data-qaid":"context_menu_item","data-testid":"context_menu_item"},c.createElement(n.Button,{type:"button","button-theme":"white","button-width":"1-1","button-round":"none","button-padding":"xs m","button-blackhole":["border-none","awesome-content"],"button-weight":"normal","data-qaid":"context_menu_button","data-testid":"context_menu_button",onClick:function(t){u&&E(),i&&i(t)}},c.createElement("div",{className:d.default(b.buttonContent,m({},b["buttonContentColor_".concat(l)],Boolean(l)))},!!o&&c.createElement(r.Icon,{className:b.buttonIcon,"icon-as":o,style:{width:24,height:24},"data-qaid":"context_menu_button_icon","data-testid":"context_menu_button_icon"}),c.createElement("div",{className:b.buttonText,"data-qaid":"context_menu_button_text","data-testid":"context_menu_button_text"},s))))})));return j?c.createElement(i.Tooltip,{isRenderPortal:v,trigger:"click",placement:_,isShowArrow:!1,content:q,isVisible:O,padding:"0",onVisibleChange:function(t){O?t||E():t&&w()}},e):c.createElement(c.Fragment,null,c.cloneElement(e,{onClick:w}),c.createElement(o.Overlay,{isRenderPortal:v,isOpen:O,onClose:E,header:null,padding:"0"},q))};y.displayName="ContextMenu",exports.ContextMenu=y,require("./style.production.v2.css");
|
package/ContextMenu/package.json
CHANGED
|
@@ -35,182 +35,138 @@ var setErrorCatchLog = function setErrorCatchLog(fn) {
|
|
|
35
35
|
logError = fn;
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
-
function
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
_e,
|
|
43
|
-
_x,
|
|
44
|
-
_r,
|
|
45
|
-
_arr = [],
|
|
46
|
-
_n = !0,
|
|
47
|
-
_d = !1;
|
|
48
|
-
try {
|
|
49
|
-
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
50
|
-
if (Object(_i) !== _i) return;
|
|
51
|
-
_n = !1;
|
|
52
|
-
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
53
|
-
} catch (err) {
|
|
54
|
-
_d = !0, _e = err;
|
|
55
|
-
} finally {
|
|
56
|
-
try {
|
|
57
|
-
if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
|
|
58
|
-
} finally {
|
|
59
|
-
if (_d) throw _e;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
return _arr;
|
|
63
|
-
}
|
|
38
|
+
function _arrayLikeToArray(r, a) {
|
|
39
|
+
(null == a || a > r.length) && (a = r.length);
|
|
40
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
41
|
+
return n;
|
|
64
42
|
}
|
|
65
|
-
function
|
|
66
|
-
if (
|
|
67
|
-
throw new TypeError("Cannot call a class as a function");
|
|
68
|
-
}
|
|
43
|
+
function _arrayWithHoles(r) {
|
|
44
|
+
if (Array.isArray(r)) return r;
|
|
69
45
|
}
|
|
70
|
-
function
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
74
|
-
descriptor.configurable = true;
|
|
75
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
76
|
-
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
77
|
-
}
|
|
46
|
+
function _assertThisInitialized(e) {
|
|
47
|
+
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
48
|
+
return e;
|
|
78
49
|
}
|
|
79
|
-
function
|
|
80
|
-
|
|
81
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
82
|
-
Object.defineProperty(Constructor, "prototype", {
|
|
83
|
-
writable: false
|
|
84
|
-
});
|
|
85
|
-
return Constructor;
|
|
50
|
+
function _callSuper(t, o, e) {
|
|
51
|
+
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
86
52
|
}
|
|
87
|
-
function
|
|
88
|
-
|
|
89
|
-
if (key in obj) {
|
|
90
|
-
Object.defineProperty(obj, key, {
|
|
91
|
-
value: value,
|
|
92
|
-
enumerable: true,
|
|
93
|
-
configurable: true,
|
|
94
|
-
writable: true
|
|
95
|
-
});
|
|
96
|
-
} else {
|
|
97
|
-
obj[key] = value;
|
|
98
|
-
}
|
|
99
|
-
return obj;
|
|
53
|
+
function _classCallCheck(a, n) {
|
|
54
|
+
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
100
55
|
}
|
|
101
|
-
function
|
|
102
|
-
|
|
103
|
-
|
|
56
|
+
function _defineProperties(e, r) {
|
|
57
|
+
for (var t = 0; t < r.length; t++) {
|
|
58
|
+
var o = r[t];
|
|
59
|
+
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
|
|
104
60
|
}
|
|
105
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
106
|
-
constructor: {
|
|
107
|
-
value: subClass,
|
|
108
|
-
writable: true,
|
|
109
|
-
configurable: true
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
Object.defineProperty(subClass, "prototype", {
|
|
113
|
-
writable: false
|
|
114
|
-
});
|
|
115
|
-
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
116
61
|
}
|
|
117
|
-
function
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
};
|
|
121
|
-
return _getPrototypeOf(o);
|
|
62
|
+
function _createClass(e, r, t) {
|
|
63
|
+
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
|
64
|
+
writable: !1
|
|
65
|
+
}), e;
|
|
122
66
|
}
|
|
123
|
-
function
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
67
|
+
function _defineProperty(e, r, t) {
|
|
68
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
69
|
+
value: t,
|
|
70
|
+
enumerable: !0,
|
|
71
|
+
configurable: !0,
|
|
72
|
+
writable: !0
|
|
73
|
+
}) : e[r] = t, e;
|
|
129
74
|
}
|
|
130
|
-
function
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
try {
|
|
135
|
-
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
136
|
-
return true;
|
|
137
|
-
} catch (e) {
|
|
138
|
-
return false;
|
|
139
|
-
}
|
|
75
|
+
function _getPrototypeOf(t) {
|
|
76
|
+
return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
|
|
77
|
+
return t.__proto__ || Object.getPrototypeOf(t);
|
|
78
|
+
}, _getPrototypeOf(t);
|
|
140
79
|
}
|
|
141
|
-
function
|
|
142
|
-
if (
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
80
|
+
function _inherits(t, e) {
|
|
81
|
+
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
|
|
82
|
+
t.prototype = Object.create(e && e.prototype, {
|
|
83
|
+
constructor: {
|
|
84
|
+
value: t,
|
|
85
|
+
writable: !0,
|
|
86
|
+
configurable: !0
|
|
87
|
+
}
|
|
88
|
+
}), Object.defineProperty(t, "prototype", {
|
|
89
|
+
writable: !1
|
|
90
|
+
}), e && _setPrototypeOf(t, e);
|
|
146
91
|
}
|
|
147
|
-
function
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
92
|
+
function _isNativeReflectConstruct() {
|
|
93
|
+
try {
|
|
94
|
+
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
95
|
+
} catch (t) {}
|
|
96
|
+
return (_isNativeReflectConstruct = function () {
|
|
97
|
+
return !!t;
|
|
98
|
+
})();
|
|
154
99
|
}
|
|
155
|
-
function
|
|
156
|
-
var
|
|
157
|
-
|
|
158
|
-
var
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
100
|
+
function _iterableToArrayLimit(r, l) {
|
|
101
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
102
|
+
if (null != t) {
|
|
103
|
+
var e,
|
|
104
|
+
n,
|
|
105
|
+
i,
|
|
106
|
+
u,
|
|
107
|
+
a = [],
|
|
108
|
+
f = !0,
|
|
109
|
+
o = !1;
|
|
110
|
+
try {
|
|
111
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
112
|
+
if (Object(t) !== t) return;
|
|
113
|
+
f = !1;
|
|
114
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
115
|
+
} catch (r) {
|
|
116
|
+
o = !0, n = r;
|
|
117
|
+
} finally {
|
|
118
|
+
try {
|
|
119
|
+
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
120
|
+
} finally {
|
|
121
|
+
if (o) throw n;
|
|
122
|
+
}
|
|
165
123
|
}
|
|
166
|
-
return
|
|
167
|
-
};
|
|
168
|
-
}
|
|
169
|
-
function _taggedTemplateLiteral(strings, raw) {
|
|
170
|
-
if (!raw) {
|
|
171
|
-
raw = strings.slice(0);
|
|
124
|
+
return a;
|
|
172
125
|
}
|
|
173
|
-
return Object.freeze(Object.defineProperties(strings, {
|
|
174
|
-
raw: {
|
|
175
|
-
value: Object.freeze(raw)
|
|
176
|
-
}
|
|
177
|
-
}));
|
|
178
126
|
}
|
|
179
|
-
function
|
|
180
|
-
|
|
127
|
+
function _nonIterableRest() {
|
|
128
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
181
129
|
}
|
|
182
|
-
function
|
|
183
|
-
if (
|
|
130
|
+
function _possibleConstructorReturn(t, e) {
|
|
131
|
+
if (e && ("object" == typeof e || "function" == typeof e)) return e;
|
|
132
|
+
if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
|
|
133
|
+
return _assertThisInitialized(t);
|
|
184
134
|
}
|
|
185
|
-
function
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
190
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
191
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
135
|
+
function _setPrototypeOf(t, e) {
|
|
136
|
+
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
|
|
137
|
+
return t.__proto__ = e, t;
|
|
138
|
+
}, _setPrototypeOf(t, e);
|
|
192
139
|
}
|
|
193
|
-
function
|
|
194
|
-
|
|
195
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
196
|
-
return arr2;
|
|
140
|
+
function _slicedToArray(r, e) {
|
|
141
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
197
142
|
}
|
|
198
|
-
function
|
|
199
|
-
|
|
143
|
+
function _taggedTemplateLiteral(e, t) {
|
|
144
|
+
return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, {
|
|
145
|
+
raw: {
|
|
146
|
+
value: Object.freeze(t)
|
|
147
|
+
}
|
|
148
|
+
}));
|
|
200
149
|
}
|
|
201
|
-
function _toPrimitive(
|
|
202
|
-
if (
|
|
203
|
-
var
|
|
204
|
-
if (
|
|
205
|
-
var
|
|
206
|
-
if (
|
|
150
|
+
function _toPrimitive(t, r) {
|
|
151
|
+
if ("object" != typeof t || !t) return t;
|
|
152
|
+
var e = t[Symbol.toPrimitive];
|
|
153
|
+
if (void 0 !== e) {
|
|
154
|
+
var i = e.call(t, r || "default");
|
|
155
|
+
if ("object" != typeof i) return i;
|
|
207
156
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
208
157
|
}
|
|
209
|
-
return (
|
|
158
|
+
return ("string" === r ? String : Number)(t);
|
|
159
|
+
}
|
|
160
|
+
function _toPropertyKey(t) {
|
|
161
|
+
var i = _toPrimitive(t, "string");
|
|
162
|
+
return "symbol" == typeof i ? i : i + "";
|
|
210
163
|
}
|
|
211
|
-
function
|
|
212
|
-
|
|
213
|
-
|
|
164
|
+
function _unsupportedIterableToArray(r, a) {
|
|
165
|
+
if (r) {
|
|
166
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
167
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
168
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
169
|
+
}
|
|
214
170
|
}
|
|
215
171
|
|
|
216
172
|
var css = {"root":"ErrorCatch__root___MgWkO","text":"ErrorCatch__text___mFI5O","name":"ErrorCatch__name___-bzUk","button":"ErrorCatch__button___9tlvu"};
|
|
@@ -284,18 +240,16 @@ ErrorView.displayName = 'ErrorView';
|
|
|
284
240
|
* React-компонент, що перехоплює помилки JavaScript у будь-якому місці свого дочірнього дерева компонентів, реєструє ці помилки та відображає резервний користувацький інтерфейс.
|
|
285
241
|
*/
|
|
286
242
|
var ErrorCatch = /*#__PURE__*/function (_React$Component) {
|
|
287
|
-
_inherits(ErrorCatch, _React$Component);
|
|
288
|
-
var _super = _createSuper(ErrorCatch);
|
|
289
243
|
function ErrorCatch(props) {
|
|
290
244
|
var _this;
|
|
291
245
|
_classCallCheck(this, ErrorCatch);
|
|
292
|
-
_this =
|
|
293
|
-
_defineProperty(
|
|
246
|
+
_this = _callSuper(this, ErrorCatch, [props]);
|
|
247
|
+
_defineProperty(_this, "onClose", function () {
|
|
294
248
|
_this.setState({
|
|
295
249
|
isHidden: true
|
|
296
250
|
});
|
|
297
251
|
});
|
|
298
|
-
_defineProperty(
|
|
252
|
+
_defineProperty(_this, "onReload", function () {
|
|
299
253
|
_this.setState({
|
|
300
254
|
isError: false
|
|
301
255
|
});
|
|
@@ -306,7 +260,8 @@ var ErrorCatch = /*#__PURE__*/function (_React$Component) {
|
|
|
306
260
|
};
|
|
307
261
|
return _this;
|
|
308
262
|
}
|
|
309
|
-
|
|
263
|
+
_inherits(ErrorCatch, _React$Component);
|
|
264
|
+
return _createClass(ErrorCatch, [{
|
|
310
265
|
key: "componentDidCatch",
|
|
311
266
|
value: function componentDidCatch(error, info) {
|
|
312
267
|
var name = this.props.name;
|
|
@@ -346,12 +301,12 @@ var ErrorCatch = /*#__PURE__*/function (_React$Component) {
|
|
|
346
301
|
};
|
|
347
302
|
}
|
|
348
303
|
}]);
|
|
349
|
-
return ErrorCatch;
|
|
350
304
|
}(React__namespace.Component);
|
|
351
305
|
_defineProperty(ErrorCatch, "defaultProps", {
|
|
352
306
|
errorView: /*#__PURE__*/React__namespace.createElement(ErrorView, null)
|
|
353
307
|
});
|
|
354
308
|
|
|
309
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
355
310
|
var withErrorCatch = function withErrorCatch(Component, errorCatchProps) {
|
|
356
311
|
var WithErrorCatch = function WithErrorCatch(props) {
|
|
357
312
|
return /*#__PURE__*/React__namespace.createElement(ErrorCatch, errorCatchProps, /*#__PURE__*/React__namespace.createElement(Component, props));
|