@prom-ui/core 2.0.0 → 2.0.1
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 +23 -69
- package/Avatar/cjs/index.development.v2.js +23 -69
- package/Avatar/cjs/index.production.js +1 -1
- package/Avatar/cjs/index.production.v2.js +1 -1
- package/Avatar/package.json +2 -1
- package/Backdrop/cjs/index.development.js +25 -90
- package/Backdrop/cjs/index.development.v2.js +25 -90
- package/Backdrop/cjs/index.production.js +1 -1
- package/Backdrop/cjs/index.production.v2.js +1 -1
- package/Backdrop/package.json +2 -1
- package/Badge/cjs/index.development.js +23 -69
- package/Badge/cjs/index.development.v2.js +23 -69
- package/Badge/cjs/index.production.js +1 -1
- package/Badge/cjs/index.production.v2.js +1 -1
- package/Badge/package.json +2 -1
- package/Body/package.json +1 -1
- package/BodyContext/package.json +1 -1
- package/BodyProvider/package.json +1 -1
- package/BodyScrollLock/package.json +1 -1
- package/Box/package.json +1 -1
- package/Button/cjs/index.development.js +22 -46
- package/Button/cjs/index.development.v2.js +22 -46
- package/Button/cjs/index.production.js +1 -1
- package/Button/cjs/index.production.v2.js +1 -1
- package/Button/package.json +2 -1
- package/ButtonPageUp/cjs/index.development.js +32 -148
- package/ButtonPageUp/cjs/index.development.v2.js +32 -148
- package/ButtonPageUp/cjs/index.production.js +1 -1
- package/ButtonPageUp/cjs/index.production.v2.js +1 -1
- package/ButtonPageUp/package.json +2 -1
- package/Checkbox/cjs/index.development.js +23 -69
- package/Checkbox/cjs/index.development.v2.js +23 -69
- package/Checkbox/cjs/index.production.js +1 -1
- package/Checkbox/cjs/index.production.v2.js +1 -1
- package/Checkbox/package.json +2 -1
- package/ContextMenu/cjs/index.development.js +23 -108
- package/ContextMenu/cjs/index.development.v2.js +23 -108
- package/ContextMenu/cjs/index.production.js +1 -1
- package/ContextMenu/cjs/index.production.v2.js +1 -1
- package/ContextMenu/package.json +2 -1
- package/ErrorCatch/cjs/index.development.js +30 -144
- package/ErrorCatch/cjs/index.development.v2.js +30 -144
- package/ErrorCatch/cjs/index.production.js +1 -1
- package/ErrorCatch/cjs/index.production.v2.js +1 -1
- package/ErrorCatch/package.json +5 -2
- 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 +22 -46
- package/ImageEmoji/cjs/index.development.v2.js +22 -46
- package/ImageEmoji/cjs/index.production.js +1 -1
- package/ImageEmoji/cjs/index.production.v2.js +1 -1
- package/ImageEmoji/package.json +2 -1
- package/Input/package.json +1 -1
- package/InputField/cjs/index.development.js +32 -107
- package/InputField/cjs/index.development.v2.js +32 -107
- package/InputField/cjs/index.production.js +1 -1
- package/InputField/cjs/index.production.v2.js +1 -1
- package/InputField/package.json +5 -2
- package/KeyPress/package.json +1 -1
- 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 +7 -54
- package/Media/cjs/index.development.v2.js +7 -54
- package/Media/cjs/index.production.js +1 -1
- package/Media/cjs/index.production.v2.js +1 -1
- package/Media/package.json +2 -1
- package/Modal/cjs/index.development.js +28 -98
- package/Modal/cjs/index.development.v2.js +28 -98
- package/Modal/cjs/index.production.js +1 -1
- package/Modal/cjs/index.production.v2.js +1 -1
- package/Modal/package.json +2 -1
- package/OutsideClick/cjs/index.development.js +27 -97
- package/OutsideClick/cjs/index.development.v2.js +27 -97
- package/OutsideClick/cjs/index.production.js +1 -1
- package/OutsideClick/cjs/index.production.v2.js +1 -1
- package/OutsideClick/package.json +5 -2
- package/Overlay/cjs/index.development.js +37 -134
- package/Overlay/cjs/index.development.v2.js +37 -134
- package/Overlay/cjs/index.production.js +1 -1
- package/Overlay/cjs/index.production.v2.js +1 -1
- package/Overlay/package.json +2 -1
- package/PhotoGallery/cjs/index.development.js +23 -82
- package/PhotoGallery/cjs/index.development.v2.js +23 -82
- package/PhotoGallery/cjs/index.production.js +1 -1
- package/PhotoGallery/cjs/index.production.v2.js +1 -1
- package/PhotoGallery/package.json +2 -1
- package/Picture/package.json +1 -1
- package/Portal/package.json +1 -1
- package/Progress/cjs/index.development.js +25 -90
- package/Progress/cjs/index.development.v2.js +25 -90
- package/Progress/cjs/index.production.js +1 -1
- package/Progress/cjs/index.production.v2.js +1 -1
- package/Progress/package.json +2 -1
- package/QRCode/package.json +1 -1
- package/Rating/cjs/index.development.js +20 -46
- package/Rating/cjs/index.development.v2.js +20 -46
- package/Rating/cjs/index.production.js +1 -1
- package/Rating/cjs/index.production.v2.js +1 -1
- package/Rating/package.json +2 -1
- package/RatingSelect/cjs/index.development.js +24 -109
- package/RatingSelect/cjs/index.development.v2.js +24 -109
- package/RatingSelect/cjs/index.production.js +1 -1
- package/RatingSelect/cjs/index.production.v2.js +1 -1
- package/RatingSelect/package.json +2 -1
- package/Scroll/package.json +1 -1
- package/ScrollControls/cjs/index.development.js +32 -129
- package/ScrollControls/cjs/index.development.v2.js +32 -129
- package/ScrollControls/cjs/index.production.js +1 -1
- package/ScrollControls/cjs/index.production.v2.js +1 -1
- package/ScrollControls/package.json +2 -1
- package/SimpleSlider/cjs/index.development.js +37 -153
- package/SimpleSlider/cjs/index.development.v2.js +37 -153
- package/SimpleSlider/cjs/index.production.js +1 -1
- package/SimpleSlider/cjs/index.production.v2.js +1 -1
- package/SimpleSlider/package.json +2 -1
- package/Skeleton/cjs/index.development.js +27 -90
- package/Skeleton/cjs/index.development.v2.js +27 -90
- package/Skeleton/cjs/index.production.js +1 -1
- package/Skeleton/cjs/index.production.v2.js +1 -1
- package/Skeleton/package.json +2 -1
- package/SnackBar/cjs/index.development.js +25 -90
- package/SnackBar/cjs/index.development.v2.js +25 -90
- package/SnackBar/cjs/index.production.js +1 -1
- package/SnackBar/cjs/index.production.v2.js +1 -1
- package/SnackBar/package.json +2 -1
- package/SnackBarManager/cjs/index.development.js +29 -120
- package/SnackBarManager/cjs/index.development.v2.js +29 -120
- package/SnackBarManager/cjs/index.production.js +1 -1
- package/SnackBarManager/cjs/index.production.v2.js +1 -1
- package/SnackBarManager/package.json +5 -2
- package/Spinner/cjs/index.development.js +22 -46
- package/Spinner/cjs/index.development.v2.js +22 -46
- package/Spinner/cjs/index.production.js +1 -1
- package/Spinner/cjs/index.production.v2.js +1 -1
- package/Spinner/package.json +2 -1
- package/Text/package.json +1 -1
- package/TextEmoji/cjs/index.development.js +22 -46
- package/TextEmoji/cjs/index.development.v2.js +22 -46
- package/TextEmoji/cjs/index.production.js +1 -1
- package/TextEmoji/cjs/index.production.v2.js +1 -1
- package/TextEmoji/package.json +2 -1
- package/Tooltip/cjs/index.development.js +17 -25
- package/Tooltip/cjs/index.development.v2.js +17 -25
- package/Tooltip/cjs/index.production.js +1 -1
- package/Tooltip/cjs/index.production.v2.js +1 -1
- package/Tooltip/package.json +2 -1
- package/Tumbler/cjs/index.development.js +23 -69
- package/Tumbler/cjs/index.development.v2.js +23 -69
- package/Tumbler/cjs/index.production.js +1 -1
- package/Tumbler/cjs/index.production.v2.js +1 -1
- package/Tumbler/package.json +2 -1
- package/Viewport/cjs/index.development.js +23 -47
- package/Viewport/cjs/index.development.v2.js +23 -47
- package/Viewport/cjs/index.production.js +1 -1
- package/Viewport/cjs/index.production.v2.js +1 -1
- package/Viewport/package.json +5 -2
- package/package.json +3 -2
- package/useBodyTTag/package.json +1 -1
- package/useBrowserLayoutEffect/package.json +1 -1
- package/useDebounce/cjs/index.development.js +5 -49
- package/useDebounce/cjs/index.development.v2.js +5 -49
- package/useDebounce/cjs/index.production.js +1 -1
- package/useDebounce/cjs/index.production.v2.js +1 -1
- package/useDebounce/package.json +5 -2
- package/useForwardRef/package.json +1 -1
- package/useInView/package.json +1 -1
- package/useIsMounted/package.json +1 -1
- package/useKeyPress/cjs/index.development.js +19 -64
- package/useKeyPress/cjs/index.development.v2.js +19 -64
- package/useKeyPress/cjs/index.production.js +1 -1
- package/useKeyPress/cjs/index.production.v2.js +1 -1
- package/useKeyPress/package.json +5 -2
- package/useMedia/package.json +1 -1
- package/useOutsideClick/package.json +1 -1
- package/usePortal/package.json +1 -1
- package/useScrollPosition/package.json +1 -1
- package/useSnackBar/package.json +1 -1
|
@@ -2,12 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
|
|
6
|
+
var _createClass = require('@babel/runtime/helpers/createClass');
|
|
7
|
+
var _possibleConstructorReturn = require('@babel/runtime/helpers/possibleConstructorReturn');
|
|
8
|
+
var _getPrototypeOf = require('@babel/runtime/helpers/getPrototypeOf');
|
|
9
|
+
var _inherits = require('@babel/runtime/helpers/inherits');
|
|
10
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
5
11
|
var React = require('react');
|
|
12
|
+
var _taggedTemplateLiteral = require('@babel/runtime/helpers/taggedTemplateLiteral');
|
|
13
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
6
14
|
var Button = require('@prom-ui/core/Button');
|
|
7
15
|
var useBodyTTag = require('@prom-ui/core/useBodyTTag');
|
|
8
16
|
var Reload = require('@prom-ui/icons/Reload');
|
|
9
17
|
var Close = require('@prom-ui/icons/Close');
|
|
10
18
|
|
|
19
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
20
|
+
|
|
11
21
|
function _interopNamespaceCompat(e) {
|
|
12
22
|
if (e && typeof e === 'object' && 'default' in e) return e;
|
|
13
23
|
var n = Object.create(null);
|
|
@@ -26,7 +36,15 @@ function _interopNamespaceCompat(e) {
|
|
|
26
36
|
return Object.freeze(n);
|
|
27
37
|
}
|
|
28
38
|
|
|
39
|
+
var _classCallCheck__default = /*#__PURE__*/_interopDefaultCompat(_classCallCheck);
|
|
40
|
+
var _createClass__default = /*#__PURE__*/_interopDefaultCompat(_createClass);
|
|
41
|
+
var _possibleConstructorReturn__default = /*#__PURE__*/_interopDefaultCompat(_possibleConstructorReturn);
|
|
42
|
+
var _getPrototypeOf__default = /*#__PURE__*/_interopDefaultCompat(_getPrototypeOf);
|
|
43
|
+
var _inherits__default = /*#__PURE__*/_interopDefaultCompat(_inherits);
|
|
44
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultCompat(_defineProperty);
|
|
29
45
|
var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
46
|
+
var _taggedTemplateLiteral__default = /*#__PURE__*/_interopDefaultCompat(_taggedTemplateLiteral);
|
|
47
|
+
var _slicedToArray__default = /*#__PURE__*/_interopDefaultCompat(_slicedToArray);
|
|
30
48
|
|
|
31
49
|
var logError = function logError(msg, error, info) {
|
|
32
50
|
console.error(msg, error, info);
|
|
@@ -35,140 +53,6 @@ var setErrorCatchLog = function setErrorCatchLog(fn) {
|
|
|
35
53
|
logError = fn;
|
|
36
54
|
};
|
|
37
55
|
|
|
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;
|
|
42
|
-
}
|
|
43
|
-
function _arrayWithHoles(r) {
|
|
44
|
-
if (Array.isArray(r)) return r;
|
|
45
|
-
}
|
|
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;
|
|
49
|
-
}
|
|
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));
|
|
52
|
-
}
|
|
53
|
-
function _classCallCheck(a, n) {
|
|
54
|
-
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
55
|
-
}
|
|
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);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
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;
|
|
66
|
-
}
|
|
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;
|
|
74
|
-
}
|
|
75
|
-
function _getPrototypeOf(t) {
|
|
76
|
-
return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
|
|
77
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
78
|
-
}, _getPrototypeOf(t);
|
|
79
|
-
}
|
|
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);
|
|
91
|
-
}
|
|
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
|
-
})();
|
|
99
|
-
}
|
|
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
|
-
}
|
|
123
|
-
}
|
|
124
|
-
return a;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
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.");
|
|
129
|
-
}
|
|
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);
|
|
134
|
-
}
|
|
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);
|
|
139
|
-
}
|
|
140
|
-
function _slicedToArray(r, e) {
|
|
141
|
-
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
142
|
-
}
|
|
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
|
-
}));
|
|
149
|
-
}
|
|
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;
|
|
156
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
157
|
-
}
|
|
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 + "";
|
|
163
|
-
}
|
|
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
|
-
}
|
|
170
|
-
}
|
|
171
|
-
|
|
172
56
|
var css = {"root":"ErrorCatch__root___MgWkO","text":"ErrorCatch__text___mFI5O","name":"ErrorCatch__name___-bzUk","button":"ErrorCatch__button___9tlvu"};
|
|
173
57
|
|
|
174
58
|
var _templateObject, _templateObject2, _templateObject3;
|
|
@@ -177,7 +61,7 @@ var ErrorView = function ErrorView(_ref) {
|
|
|
177
61
|
onClose = _ref.onClose,
|
|
178
62
|
onReload = _ref.onReload;
|
|
179
63
|
var _React$useState = React__namespace.useState(false),
|
|
180
|
-
_React$useState2 =
|
|
64
|
+
_React$useState2 = _slicedToArray__default.default(_React$useState, 2),
|
|
181
65
|
isLoading = _React$useState2[0],
|
|
182
66
|
setLoading = _React$useState2[1];
|
|
183
67
|
var _useBodyTTag = useBodyTTag.useBodyTTag(),
|
|
@@ -200,7 +84,7 @@ var ErrorView = function ErrorView(_ref) {
|
|
|
200
84
|
className: css.text,
|
|
201
85
|
"data-qaid": "error_catch_text",
|
|
202
86
|
"data-testid": "error_catch_text"
|
|
203
|
-
}, t(_templateObject || (_templateObject =
|
|
87
|
+
}, t(_templateObject || (_templateObject = _taggedTemplateLiteral__default.default(["\u041E\u0448\u0438\u0431\u043A\u0430:"]))), !!name && /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, ' ', /*#__PURE__*/React__namespace.createElement("span", {
|
|
204
88
|
className: css.name,
|
|
205
89
|
"data-qaid": "error_catch_component_name",
|
|
206
90
|
"data-testid": "error_catch_component_name"
|
|
@@ -210,7 +94,7 @@ var ErrorView = function ErrorView(_ref) {
|
|
|
210
94
|
type: "button",
|
|
211
95
|
className: css.button,
|
|
212
96
|
onClick: handleOnReload,
|
|
213
|
-
title: t(_templateObject2 || (_templateObject2 =
|
|
97
|
+
title: t(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral__default.default(["\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C"]))),
|
|
214
98
|
loading: isLoading,
|
|
215
99
|
"data-qaid": "error_catch_button_reload",
|
|
216
100
|
"data-testid": "error_catch_button_reload"
|
|
@@ -224,7 +108,7 @@ var ErrorView = function ErrorView(_ref) {
|
|
|
224
108
|
disabled: isLoading,
|
|
225
109
|
className: css.button,
|
|
226
110
|
onClick: onClose,
|
|
227
|
-
title: t(_templateObject3 || (_templateObject3 =
|
|
111
|
+
title: t(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral__default.default(["\u0421\u043A\u0440\u044B\u0442\u044C"]))),
|
|
228
112
|
"data-qaid": "error_catch_button_close",
|
|
229
113
|
"data-testid": "error_catch_button_close"
|
|
230
114
|
}, /*#__PURE__*/React__namespace.createElement(Close.SvgClose, {
|
|
@@ -236,20 +120,22 @@ var ErrorView = function ErrorView(_ref) {
|
|
|
236
120
|
};
|
|
237
121
|
ErrorView.displayName = 'ErrorView';
|
|
238
122
|
|
|
123
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf__default.default(o), _possibleConstructorReturn__default.default(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf__default.default(t).constructor) : o.apply(t, e)); }
|
|
124
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
239
125
|
/**
|
|
240
126
|
* React-компонент, що перехоплює помилки JavaScript у будь-якому місці свого дочірнього дерева компонентів, реєструє ці помилки та відображає резервний користувацький інтерфейс.
|
|
241
127
|
*/
|
|
242
128
|
var ErrorCatch = /*#__PURE__*/function (_React$Component) {
|
|
243
129
|
function ErrorCatch(props) {
|
|
244
130
|
var _this;
|
|
245
|
-
|
|
131
|
+
_classCallCheck__default.default(this, ErrorCatch);
|
|
246
132
|
_this = _callSuper(this, ErrorCatch, [props]);
|
|
247
|
-
|
|
133
|
+
_defineProperty__default.default(_this, "onClose", function () {
|
|
248
134
|
_this.setState({
|
|
249
135
|
isHidden: true
|
|
250
136
|
});
|
|
251
137
|
});
|
|
252
|
-
|
|
138
|
+
_defineProperty__default.default(_this, "onReload", function () {
|
|
253
139
|
_this.setState({
|
|
254
140
|
isError: false
|
|
255
141
|
});
|
|
@@ -260,8 +146,8 @@ var ErrorCatch = /*#__PURE__*/function (_React$Component) {
|
|
|
260
146
|
};
|
|
261
147
|
return _this;
|
|
262
148
|
}
|
|
263
|
-
|
|
264
|
-
return
|
|
149
|
+
_inherits__default.default(ErrorCatch, _React$Component);
|
|
150
|
+
return _createClass__default.default(ErrorCatch, [{
|
|
265
151
|
key: "componentDidCatch",
|
|
266
152
|
value: function componentDidCatch(error, info) {
|
|
267
153
|
var name = this.props.name;
|
|
@@ -302,7 +188,7 @@ var ErrorCatch = /*#__PURE__*/function (_React$Component) {
|
|
|
302
188
|
}
|
|
303
189
|
}]);
|
|
304
190
|
}(React__namespace.Component);
|
|
305
|
-
|
|
191
|
+
_defineProperty__default.default(ErrorCatch, "defaultProps", {
|
|
306
192
|
errorView: /*#__PURE__*/React__namespace.createElement(ErrorView, null)
|
|
307
193
|
});
|
|
308
194
|
|
|
@@ -2,12 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
|
|
6
|
+
var _createClass = require('@babel/runtime/helpers/createClass');
|
|
7
|
+
var _possibleConstructorReturn = require('@babel/runtime/helpers/possibleConstructorReturn');
|
|
8
|
+
var _getPrototypeOf = require('@babel/runtime/helpers/getPrototypeOf');
|
|
9
|
+
var _inherits = require('@babel/runtime/helpers/inherits');
|
|
10
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
5
11
|
var React = require('react');
|
|
12
|
+
var _taggedTemplateLiteral = require('@babel/runtime/helpers/taggedTemplateLiteral');
|
|
13
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
6
14
|
var Button = require('@prom-ui/core/Button');
|
|
7
15
|
var useBodyTTag = require('@prom-ui/core/useBodyTTag');
|
|
8
16
|
var Reload = require('@prom-ui/icons/Reload');
|
|
9
17
|
var Close = require('@prom-ui/icons/Close');
|
|
10
18
|
|
|
19
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
20
|
+
|
|
11
21
|
function _interopNamespaceCompat(e) {
|
|
12
22
|
if (e && typeof e === 'object' && 'default' in e) return e;
|
|
13
23
|
var n = Object.create(null);
|
|
@@ -26,7 +36,15 @@ function _interopNamespaceCompat(e) {
|
|
|
26
36
|
return Object.freeze(n);
|
|
27
37
|
}
|
|
28
38
|
|
|
39
|
+
var _classCallCheck__default = /*#__PURE__*/_interopDefaultCompat(_classCallCheck);
|
|
40
|
+
var _createClass__default = /*#__PURE__*/_interopDefaultCompat(_createClass);
|
|
41
|
+
var _possibleConstructorReturn__default = /*#__PURE__*/_interopDefaultCompat(_possibleConstructorReturn);
|
|
42
|
+
var _getPrototypeOf__default = /*#__PURE__*/_interopDefaultCompat(_getPrototypeOf);
|
|
43
|
+
var _inherits__default = /*#__PURE__*/_interopDefaultCompat(_inherits);
|
|
44
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultCompat(_defineProperty);
|
|
29
45
|
var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
46
|
+
var _taggedTemplateLiteral__default = /*#__PURE__*/_interopDefaultCompat(_taggedTemplateLiteral);
|
|
47
|
+
var _slicedToArray__default = /*#__PURE__*/_interopDefaultCompat(_slicedToArray);
|
|
30
48
|
|
|
31
49
|
var logError = function logError(msg, error, info) {
|
|
32
50
|
console.error(msg, error, info);
|
|
@@ -35,140 +53,6 @@ var setErrorCatchLog = function setErrorCatchLog(fn) {
|
|
|
35
53
|
logError = fn;
|
|
36
54
|
};
|
|
37
55
|
|
|
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;
|
|
42
|
-
}
|
|
43
|
-
function _arrayWithHoles(r) {
|
|
44
|
-
if (Array.isArray(r)) return r;
|
|
45
|
-
}
|
|
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;
|
|
49
|
-
}
|
|
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));
|
|
52
|
-
}
|
|
53
|
-
function _classCallCheck(a, n) {
|
|
54
|
-
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
55
|
-
}
|
|
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);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
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;
|
|
66
|
-
}
|
|
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;
|
|
74
|
-
}
|
|
75
|
-
function _getPrototypeOf(t) {
|
|
76
|
-
return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
|
|
77
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
78
|
-
}, _getPrototypeOf(t);
|
|
79
|
-
}
|
|
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);
|
|
91
|
-
}
|
|
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
|
-
})();
|
|
99
|
-
}
|
|
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
|
-
}
|
|
123
|
-
}
|
|
124
|
-
return a;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
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.");
|
|
129
|
-
}
|
|
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);
|
|
134
|
-
}
|
|
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);
|
|
139
|
-
}
|
|
140
|
-
function _slicedToArray(r, e) {
|
|
141
|
-
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
142
|
-
}
|
|
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
|
-
}));
|
|
149
|
-
}
|
|
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;
|
|
156
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
157
|
-
}
|
|
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 + "";
|
|
163
|
-
}
|
|
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
|
-
}
|
|
170
|
-
}
|
|
171
|
-
|
|
172
56
|
var css = {"root":"ErrorCatch__root___EI1z9","text":"ErrorCatch__text___E5oQs","name":"ErrorCatch__name___RhcQc","button":"ErrorCatch__button___mrpfL"};
|
|
173
57
|
|
|
174
58
|
var _templateObject, _templateObject2, _templateObject3;
|
|
@@ -177,7 +61,7 @@ var ErrorView = function ErrorView(_ref) {
|
|
|
177
61
|
onClose = _ref.onClose,
|
|
178
62
|
onReload = _ref.onReload;
|
|
179
63
|
var _React$useState = React__namespace.useState(false),
|
|
180
|
-
_React$useState2 =
|
|
64
|
+
_React$useState2 = _slicedToArray__default.default(_React$useState, 2),
|
|
181
65
|
isLoading = _React$useState2[0],
|
|
182
66
|
setLoading = _React$useState2[1];
|
|
183
67
|
var _useBodyTTag = useBodyTTag.useBodyTTag(),
|
|
@@ -200,7 +84,7 @@ var ErrorView = function ErrorView(_ref) {
|
|
|
200
84
|
className: css.text,
|
|
201
85
|
"data-qaid": "error_catch_text",
|
|
202
86
|
"data-testid": "error_catch_text"
|
|
203
|
-
}, t(_templateObject || (_templateObject =
|
|
87
|
+
}, t(_templateObject || (_templateObject = _taggedTemplateLiteral__default.default(["\u041E\u0448\u0438\u0431\u043A\u0430:"]))), !!name && /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, ' ', /*#__PURE__*/React__namespace.createElement("span", {
|
|
204
88
|
className: css.name,
|
|
205
89
|
"data-qaid": "error_catch_component_name",
|
|
206
90
|
"data-testid": "error_catch_component_name"
|
|
@@ -210,7 +94,7 @@ var ErrorView = function ErrorView(_ref) {
|
|
|
210
94
|
type: "button",
|
|
211
95
|
className: css.button,
|
|
212
96
|
onClick: handleOnReload,
|
|
213
|
-
title: t(_templateObject2 || (_templateObject2 =
|
|
97
|
+
title: t(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral__default.default(["\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C"]))),
|
|
214
98
|
loading: isLoading,
|
|
215
99
|
"data-qaid": "error_catch_button_reload",
|
|
216
100
|
"data-testid": "error_catch_button_reload"
|
|
@@ -224,7 +108,7 @@ var ErrorView = function ErrorView(_ref) {
|
|
|
224
108
|
disabled: isLoading,
|
|
225
109
|
className: css.button,
|
|
226
110
|
onClick: onClose,
|
|
227
|
-
title: t(_templateObject3 || (_templateObject3 =
|
|
111
|
+
title: t(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral__default.default(["\u0421\u043A\u0440\u044B\u0442\u044C"]))),
|
|
228
112
|
"data-qaid": "error_catch_button_close",
|
|
229
113
|
"data-testid": "error_catch_button_close"
|
|
230
114
|
}, /*#__PURE__*/React__namespace.createElement(Close.SvgClose, {
|
|
@@ -236,20 +120,22 @@ var ErrorView = function ErrorView(_ref) {
|
|
|
236
120
|
};
|
|
237
121
|
ErrorView.displayName = 'ErrorView';
|
|
238
122
|
|
|
123
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf__default.default(o), _possibleConstructorReturn__default.default(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf__default.default(t).constructor) : o.apply(t, e)); }
|
|
124
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
239
125
|
/**
|
|
240
126
|
* React-компонент, що перехоплює помилки JavaScript у будь-якому місці свого дочірнього дерева компонентів, реєструє ці помилки та відображає резервний користувацький інтерфейс.
|
|
241
127
|
*/
|
|
242
128
|
var ErrorCatch = /*#__PURE__*/function (_React$Component) {
|
|
243
129
|
function ErrorCatch(props) {
|
|
244
130
|
var _this;
|
|
245
|
-
|
|
131
|
+
_classCallCheck__default.default(this, ErrorCatch);
|
|
246
132
|
_this = _callSuper(this, ErrorCatch, [props]);
|
|
247
|
-
|
|
133
|
+
_defineProperty__default.default(_this, "onClose", function () {
|
|
248
134
|
_this.setState({
|
|
249
135
|
isHidden: true
|
|
250
136
|
});
|
|
251
137
|
});
|
|
252
|
-
|
|
138
|
+
_defineProperty__default.default(_this, "onReload", function () {
|
|
253
139
|
_this.setState({
|
|
254
140
|
isError: false
|
|
255
141
|
});
|
|
@@ -260,8 +146,8 @@ var ErrorCatch = /*#__PURE__*/function (_React$Component) {
|
|
|
260
146
|
};
|
|
261
147
|
return _this;
|
|
262
148
|
}
|
|
263
|
-
|
|
264
|
-
return
|
|
149
|
+
_inherits__default.default(ErrorCatch, _React$Component);
|
|
150
|
+
return _createClass__default.default(ErrorCatch, [{
|
|
265
151
|
key: "componentDidCatch",
|
|
266
152
|
value: function componentDidCatch(error, info) {
|
|
267
153
|
var name = this.props.name;
|
|
@@ -302,7 +188,7 @@ var ErrorCatch = /*#__PURE__*/function (_React$Component) {
|
|
|
302
188
|
}
|
|
303
189
|
}]);
|
|
304
190
|
}(React__namespace.Component);
|
|
305
|
-
|
|
191
|
+
_defineProperty__default.default(ErrorCatch, "defaultProps", {
|
|
306
192
|
errorView: /*#__PURE__*/React__namespace.createElement(ErrorView, null)
|
|
307
193
|
});
|
|
308
194
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),n=require("@babel/runtime/helpers/getPrototypeOf"),a=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/defineProperty"),i=require("react"),u=require("@babel/runtime/helpers/taggedTemplateLiteral"),l=require("@babel/runtime/helpers/slicedToArray"),c=require("@prom-ui/core/Button"),s=require("@prom-ui/core/useBodyTTag"),d=require("@prom-ui/icons/Reload"),f=require("@prom-ui/icons/Close");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function p(e){if(e&&"object"==typeof e&&"default"in e)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var h,b,_,E=m(e),v=m(t),y=m(r),g=m(n),q=m(a),C=m(o),O=p(i),w=m(u),x=m(l),k=function(e,t,r){console.error(e,t,r)},N="MgWkO",R="mFI5O",j="-bzUk",B="_9tlvu",T=function(e){var t=e.name,r=e.onClose,n=e.onReload,a=O.useState(!1),o=x.default(a,2),i=o[0],u=o[1],l=s.useBodyTTag().t;return"production"!==process.env.NODE_ENV?O.createElement("div",{className:N,"data-qaid":"error_catch","data-testid":"error_catch"},O.createElement("div",{className:R,"data-qaid":"error_catch_text","data-testid":"error_catch_text"},l(h||(h=w.default(["Ошибка:"]))),!!t&&O.createElement(O.Fragment,null," ",O.createElement("span",{className:j,"data-qaid":"error_catch_component_name","data-testid":"error_catch_component_name"},t))),n&&O.createElement(c.Button,{"button-theme":"white-inherit","button-padding":"xxs",type:"button",className:B,onClick:function(){u(!0),setTimeout((function(){u(!1),n&&n()}),500)},title:l(b||(b=w.default(["Обновить"]))),loading:i,"data-qaid":"error_catch_button_reload","data-testid":"error_catch_button_reload"},O.createElement(d.SvgReload,{width:18,height:18})),r&&O.createElement(c.Button,{"button-theme":"white-inherit","button-padding":"xxs",type:"button",disabled:i,className:B,onClick:r,title:l(_||(_=w.default(["Скрыть"]))),"data-qaid":"error_catch_button_close","data-testid":"error_catch_button_close"},O.createElement(f.SvgClose,{width:18,height:18}))):null};function P(e,t,r){return t=g.default(t),y.default(e,S()?Reflect.construct(t,r||[],g.default(e).constructor):t.apply(e,r))}function S(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(S=function(){return!!e})()}T.displayName="ErrorView";var V=function(e){function t(e){var r;return E.default(this,t),r=P(this,t,[e]),C.default(r,"onClose",(function(){r.setState({isHidden:!0})})),C.default(r,"onReload",(function(){r.setState({isError:!1})})),r.state={isError:!1,isHidden:!1},r}return q.default(t,e),v.default(t,[{key:"componentDidCatch",value:function(e,t){var r=this.props.name;k("".concat(r,": Failed to render component"),e,t)}},{key:"render",value:function(){var e=this.props,t=e.name,r=e.errorView,n=e.children,a=this.state,o=a.isError;return a.isHidden?null:o?"undefined"==typeof window?null:r&&O.isValidElement(r)?O.cloneElement(r,{name:t,onReload:this.onReload,onClose:this.onClose}):null:n}}],[{key:"getDerivedStateFromError",value:function(){return{isError:!0}}}])}(O.Component);C.default(V,"defaultProps",{errorView:O.createElement(T,null)});exports.ErrorCatch=V,exports.setErrorCatchLog=function(e){k=e},exports.withErrorCatch=function(e,t){var r=function(r){return O.createElement(V,t,O.createElement(e,r))};return r.displayName="WithErrorCatch",r},require("./style.production.css");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),n=require("@babel/runtime/helpers/getPrototypeOf"),a=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/defineProperty"),i=require("react"),u=require("@babel/runtime/helpers/taggedTemplateLiteral"),l=require("@babel/runtime/helpers/slicedToArray"),c=require("@prom-ui/core/Button"),s=require("@prom-ui/core/useBodyTTag"),d=require("@prom-ui/icons/Reload"),f=require("@prom-ui/icons/Close");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function m(e){if(e&&"object"==typeof e&&"default"in e)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var h,b,E,_=p(e),v=p(t),y=p(r),q=p(n),g=p(a),C=p(o),w=m(i),x=p(u),O=p(l),R=function(e,t,r){console.error(e,t,r)},N="EI1z9",j="E5oQs",k="RhcQc",B="mrpfL",T=function(e){var t=e.name,r=e.onClose,n=e.onReload,a=w.useState(!1),o=O.default(a,2),i=o[0],u=o[1],l=s.useBodyTTag().t;return"production"!==process.env.NODE_ENV?w.createElement("div",{className:N,"data-qaid":"error_catch","data-testid":"error_catch"},w.createElement("div",{className:j,"data-qaid":"error_catch_text","data-testid":"error_catch_text"},l(h||(h=x.default(["Ошибка:"]))),!!t&&w.createElement(w.Fragment,null," ",w.createElement("span",{className:k,"data-qaid":"error_catch_component_name","data-testid":"error_catch_component_name"},t))),n&&w.createElement(c.Button,{"button-theme":"white-inherit","button-padding":"xxs",type:"button",className:B,onClick:function(){u(!0),setTimeout((function(){u(!1),n&&n()}),500)},title:l(b||(b=x.default(["Обновить"]))),loading:i,"data-qaid":"error_catch_button_reload","data-testid":"error_catch_button_reload"},w.createElement(d.SvgReload,{width:18,height:18})),r&&w.createElement(c.Button,{"button-theme":"white-inherit","button-padding":"xxs",type:"button",disabled:i,className:B,onClick:r,title:l(E||(E=x.default(["Скрыть"]))),"data-qaid":"error_catch_button_close","data-testid":"error_catch_button_close"},w.createElement(f.SvgClose,{width:18,height:18}))):null};function P(e,t,r){return t=q.default(t),y.default(e,S()?Reflect.construct(t,r||[],q.default(e).constructor):t.apply(e,r))}function S(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(S=function(){return!!e})()}T.displayName="ErrorView";var V=function(e){function t(e){var r;return _.default(this,t),r=P(this,t,[e]),C.default(r,"onClose",(function(){r.setState({isHidden:!0})})),C.default(r,"onReload",(function(){r.setState({isError:!1})})),r.state={isError:!1,isHidden:!1},r}return g.default(t,e),v.default(t,[{key:"componentDidCatch",value:function(e,t){var r=this.props.name;R("".concat(r,": Failed to render component"),e,t)}},{key:"render",value:function(){var e=this.props,t=e.name,r=e.errorView,n=e.children,a=this.state,o=a.isError;return a.isHidden?null:o?"undefined"==typeof window?null:r&&w.isValidElement(r)?w.cloneElement(r,{name:t,onReload:this.onReload,onClose:this.onClose}):null:n}}],[{key:"getDerivedStateFromError",value:function(){return{isError:!0}}}])}(w.Component);C.default(V,"defaultProps",{errorView:w.createElement(T,null)});exports.ErrorCatch=V,exports.setErrorCatchLog=function(e){R=e},exports.withErrorCatch=function(e,t){var r=function(r){return w.createElement(V,t,w.createElement(e,r))};return r.displayName="WithErrorCatch",r},require("./style.production.v2.css");
|
package/ErrorCatch/package.json
CHANGED
package/Flex/package.json
CHANGED
package/Grid/package.json
CHANGED
package/Icon/package.json
CHANGED