@prom-ui/core 1.3.1 → 1.4.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 +99 -67
- package/Avatar/cjs/index.development.v2.js +99 -67
- package/Avatar/cjs/index.production.js +1 -1
- package/Avatar/cjs/index.production.v2.js +1 -1
- package/Avatar/index.d.ts +14 -14
- package/Avatar/package.json +1 -1
- package/Avatar/utils.d.ts +2 -2
- package/Backdrop/cjs/index.development.js +131 -77
- package/Backdrop/cjs/index.development.v2.js +131 -77
- package/Backdrop/cjs/index.production.js +1 -1
- package/Backdrop/cjs/index.production.v2.js +1 -1
- package/Backdrop/index.d.ts +25 -25
- package/Backdrop/package.json +1 -1
- package/Body/cjs/index.development.js +2 -0
- package/Body/cjs/index.development.v2.js +2 -0
- package/Body/index.d.ts +36 -36
- package/Body/package.json +1 -1
- package/BodyContext/cjs/index.development.js +6 -7
- package/BodyContext/cjs/index.development.v2.js +6 -7
- package/BodyContext/cjs/index.production.js +1 -1
- package/BodyContext/cjs/index.production.v2.js +1 -1
- package/BodyContext/index.d.ts +12 -12
- package/BodyContext/package.json +1 -1
- package/BodyProvider/cjs/index.development.js +7 -6
- package/BodyProvider/cjs/index.development.v2.js +7 -6
- package/BodyProvider/index.d.ts +10 -10
- package/BodyProvider/package.json +1 -1
- package/Box/cjs/index.development.js +4 -4
- package/Box/cjs/index.development.v2.js +4 -4
- package/Box/index.d.ts +106 -106
- package/Box/package.json +1 -1
- package/Button/cjs/index.development.js +67 -62
- package/Button/cjs/index.development.v2.js +67 -62
- package/Button/cjs/index.production.js +1 -1
- package/Button/cjs/index.production.v2.js +1 -1
- package/Button/index.d.ts +45 -45
- package/Button/package.json +1 -1
- package/ButtonPageUp/cjs/index.development.js +195 -85
- package/ButtonPageUp/cjs/index.development.v2.js +195 -85
- package/ButtonPageUp/cjs/index.production.js +1 -1
- package/ButtonPageUp/cjs/index.production.v2.js +1 -1
- package/ButtonPageUp/index.d.ts +18 -18
- package/ButtonPageUp/package.json +1 -1
- package/Checkbox/cjs/index.development.js +99 -67
- package/Checkbox/cjs/index.development.v2.js +99 -67
- package/Checkbox/cjs/index.production.js +1 -1
- package/Checkbox/cjs/index.production.v2.js +1 -1
- package/Checkbox/index.d.ts +8 -8
- package/Checkbox/package.json +1 -1
- package/Flex/index.d.ts +34 -34
- package/Flex/package.json +1 -1
- package/Grid/index.d.ts +46 -46
- package/Grid/package.json +1 -1
- package/Icon/index.d.ts +9 -9
- package/Icon/package.json +1 -1
- package/Image/index.d.ts +42 -42
- package/Image/package.json +1 -1
- package/ImageEmoji/cjs/index.development.js +70 -63
- package/ImageEmoji/cjs/index.development.v2.js +70 -63
- package/ImageEmoji/cjs/index.production.js +1 -1
- package/ImageEmoji/cjs/index.production.v2.js +1 -1
- package/ImageEmoji/index.d.ts +9 -9
- package/ImageEmoji/package.json +1 -1
- package/Input/index.d.ts +18 -18
- package/Input/package.json +1 -1
- package/InputField/addons/AfterClearValue.d.ts +3 -3
- package/InputField/addons/AfterCorrectValue.d.ts +2 -2
- package/InputField/addons/AfterLoading.d.ts +2 -2
- package/InputField/addons/AfterTogglePassword.d.ts +6 -6
- package/InputField/addons/ErrorText.d.ts +6 -6
- package/InputField/cjs/index.development.js +237 -173
- package/InputField/cjs/index.development.v2.js +237 -173
- package/InputField/cjs/index.production.js +1 -1
- package/InputField/cjs/index.production.v2.js +1 -1
- package/InputField/index.d.ts +18 -18
- package/InputField/package.json +1 -1
- package/InputField/utils.d.ts +10 -10
- package/KeyPress/cjs/index.development.js +13 -13
- package/KeyPress/cjs/index.development.v2.js +13 -13
- package/KeyPress/index.d.ts +14 -14
- package/KeyPress/package.json +1 -1
- package/Line/index.d.ts +13 -13
- package/Line/package.json +1 -1
- package/Link/cjs/index.development.js +5 -5
- package/Link/cjs/index.development.v2.js +5 -5
- package/Link/index.d.ts +28 -28
- package/Link/package.json +1 -1
- package/List/index.d.ts +23 -23
- package/List/package.json +1 -1
- package/Media/MediaProvider.d.ts +8 -8
- package/Media/cjs/index.development.js +70 -19
- package/Media/cjs/index.development.v2.js +70 -19
- package/Media/cjs/index.production.js +1 -1
- package/Media/cjs/index.production.v2.js +1 -1
- package/Media/index.d.ts +20 -20
- package/Media/package.json +1 -1
- package/OutsideClick/cjs/index.development.js +117 -61
- package/OutsideClick/cjs/index.development.v2.js +117 -61
- package/OutsideClick/cjs/index.production.js +1 -1
- package/OutsideClick/cjs/index.production.v2.js +1 -1
- package/OutsideClick/index.d.ts +12 -12
- package/OutsideClick/package.json +1 -1
- package/Overlay/cjs/index.development.js +197 -183
- package/Overlay/cjs/index.development.v2.js +197 -183
- package/Overlay/cjs/index.production.js +1 -1
- package/Overlay/cjs/index.production.v2.js +1 -1
- package/Overlay/components/OverlayHeader.d.ts +11 -11
- package/Overlay/components/SwipeClose.d.ts +11 -11
- package/Overlay/components/TouchScrollable.d.ts +8 -8
- package/Overlay/index.d.ts +76 -76
- package/Overlay/package.json +1 -1
- package/Overlay/utils.d.ts +10 -10
- package/Picture/index.d.ts +70 -70
- package/Picture/package.json +1 -1
- package/Portal/cjs/index.development.js +11 -11
- package/Portal/cjs/index.development.v2.js +11 -11
- package/Portal/index.d.ts +10 -10
- package/Portal/package.json +1 -1
- package/QRCode/cjs/index.development.js +11 -11
- package/QRCode/cjs/index.development.v2.js +11 -11
- package/QRCode/index.d.ts +17 -17
- package/QRCode/package.json +1 -1
- package/Rating/cjs/index.development.js +75 -69
- package/Rating/cjs/index.development.v2.js +75 -69
- package/Rating/cjs/index.production.js +1 -1
- package/Rating/cjs/index.production.v2.js +1 -1
- package/Rating/index.d.ts +17 -17
- package/Rating/package.json +1 -1
- package/RatingSelect/cjs/index.development.js +148 -68
- package/RatingSelect/cjs/index.development.v2.js +148 -68
- package/RatingSelect/cjs/index.production.js +1 -1
- package/RatingSelect/cjs/index.production.v2.js +1 -1
- package/RatingSelect/index.d.ts +22 -18
- package/RatingSelect/package.json +1 -1
- package/SafeQuery/cjs/index.development.js +158 -110
- package/SafeQuery/cjs/index.development.v2.js +158 -110
- package/SafeQuery/cjs/index.production.js +1 -1
- package/SafeQuery/cjs/index.production.v2.js +1 -1
- package/SafeQuery/components/Error.d.ts +7 -7
- package/SafeQuery/index.d.ts +10 -10
- package/SafeQuery/package.json +1 -1
- package/Scroll/index.d.ts +25 -25
- package/Scroll/package.json +1 -1
- package/ScrollControls/ScrollControlsButton.d.ts +11 -11
- package/ScrollControls/cjs/index.development.js +201 -113
- package/ScrollControls/cjs/index.development.v2.js +201 -113
- package/ScrollControls/cjs/index.production.js +1 -1
- package/ScrollControls/cjs/index.production.v2.js +1 -1
- package/ScrollControls/index.d.ts +16 -16
- package/ScrollControls/package.json +1 -1
- package/SimpleSlider/cjs/index.development.js +270 -158
- package/SimpleSlider/cjs/index.development.v2.js +270 -158
- package/SimpleSlider/cjs/index.production.js +1 -1
- package/SimpleSlider/cjs/index.production.v2.js +1 -1
- package/SimpleSlider/index.d.ts +41 -41
- package/SimpleSlider/package.json +1 -1
- package/SimpleSlider/useAutoPlay.d.ts +3 -3
- package/SimpleSlider/utils.d.ts +19 -19
- package/Skeleton/cjs/index.development.js +118 -64
- package/Skeleton/cjs/index.development.v2.js +118 -64
- package/Skeleton/cjs/index.production.js +1 -1
- package/Skeleton/cjs/index.production.v2.js +1 -1
- package/Skeleton/index.d.ts +37 -37
- package/Skeleton/package.json +1 -1
- package/Spinner/cjs/index.development.js +66 -61
- package/Spinner/cjs/index.development.v2.js +66 -61
- package/Spinner/cjs/index.production.js +1 -1
- package/Spinner/cjs/index.production.v2.js +1 -1
- package/Spinner/index.d.ts +29 -29
- package/Spinner/package.json +1 -1
- package/Text/index.d.ts +25 -25
- package/Text/package.json +1 -1
- package/TextEmoji/cjs/index.development.js +65 -60
- package/TextEmoji/cjs/index.development.v2.js +65 -60
- package/TextEmoji/cjs/index.production.js +1 -1
- package/TextEmoji/cjs/index.production.v2.js +1 -1
- package/TextEmoji/index.d.ts +9 -9
- package/TextEmoji/package.json +1 -1
- package/Tooltip/cjs/index.development.js +80 -91
- package/Tooltip/cjs/index.development.v2.js +80 -91
- package/Tooltip/cjs/index.production.js +1 -1
- package/Tooltip/cjs/index.production.v2.js +1 -1
- package/Tooltip/index.d.ts +87 -87
- package/Tooltip/package.json +1 -1
- package/Tumbler/cjs/index.development.js +98 -66
- package/Tumbler/cjs/index.development.v2.js +98 -66
- package/Tumbler/cjs/index.production.js +1 -1
- package/Tumbler/cjs/index.production.v2.js +1 -1
- package/Tumbler/index.d.ts +8 -8
- package/Tumbler/package.json +1 -1
- package/package.json +7 -5
- package/useBodyTTag/cjs/index.development.js +1 -1
- package/useBodyTTag/cjs/index.development.v2.js +1 -1
- package/useBodyTTag/index.d.ts +2 -2
- package/useBodyTTag/package.json +1 -1
- package/useDebounce/cjs/index.development.js +58 -6
- package/useDebounce/cjs/index.development.v2.js +58 -6
- package/useDebounce/cjs/index.production.js +1 -1
- package/useDebounce/cjs/index.production.v2.js +1 -1
- package/useDebounce/index.d.ts +4 -4
- package/useDebounce/package.json +1 -1
- package/useId/cjs/index.development.js +6 -7
- package/useId/cjs/index.development.v2.js +6 -7
- package/useId/cjs/index.production.js +1 -1
- package/useId/cjs/index.production.v2.js +1 -1
- package/useId/index.d.ts +4 -4
- package/useId/package.json +1 -1
- package/useIsMounted/cjs/index.development.js +3 -3
- package/useIsMounted/cjs/index.development.v2.js +3 -3
- package/useIsMounted/index.d.ts +4 -4
- package/useIsMounted/package.json +1 -1
- package/useKeyPress/cjs/index.development.js +76 -22
- package/useKeyPress/cjs/index.development.v2.js +76 -22
- package/useKeyPress/cjs/index.production.js +1 -1
- package/useKeyPress/cjs/index.production.v2.js +1 -1
- package/useKeyPress/index.d.ts +6 -6
- package/useKeyPress/package.json +1 -1
- package/useMedia/cjs/index.development.js +5 -5
- package/useMedia/cjs/index.development.v2.js +5 -5
- package/useMedia/index.d.ts +21 -21
- package/useMedia/package.json +1 -1
- package/useOutsideClick/cjs/index.development.js +2 -2
- package/useOutsideClick/cjs/index.development.v2.js +2 -2
- package/useOutsideClick/index.d.ts +5 -5
- package/useOutsideClick/package.json +1 -1
- package/usePortal/cjs/index.development.js +32 -27
- package/usePortal/cjs/index.development.v2.js +32 -27
- package/usePortal/index.d.ts +12 -12
- package/usePortal/package.json +1 -1
- package/useScrollPosition/cjs/index.development.js +2 -2
- package/useScrollPosition/cjs/index.development.v2.js +2 -2
- package/useScrollPosition/index.d.ts +5 -5
- package/useScrollPosition/package.json +1 -1
package/RatingSelect/index.d.ts
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
declare const ITEMS_LIST: readonly [1, 2, 3, 4, 5];
|
|
3
|
-
export type RatingSelectProps = {
|
|
4
|
-
/** Значение рейтинга, от 1 до 5 */
|
|
5
|
-
value?: (typeof ITEMS_LIST)[number];
|
|
6
|
-
/** Имя элемента ввода для использования в форме при отправке данных */
|
|
7
|
-
name?: string;
|
|
8
|
-
/** Функция обратного вызова, которая вызывается при изменении значения рейтинга */
|
|
9
|
-
onChange?: (value?: RatingSelectProps['value']) => void;
|
|
10
|
-
/** Функция обратного вызова, которая вызывается при наведении курсора на элементы рейтинга */
|
|
11
|
-
onHover?: (value?: RatingSelectProps['value']) => void;
|
|
12
|
-
/** Свойство определяет, должен ли быть компонент рейтинга отключен (неактивным) */
|
|
13
|
-
disabled?: boolean;
|
|
14
|
-
/** Hазмер компонента рейтинга */
|
|
15
|
-
size?: string | number;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const ITEMS_LIST: readonly [1, 2, 3, 4, 5];
|
|
3
|
+
export type RatingSelectProps = {
|
|
4
|
+
/** Значение рейтинга, от 1 до 5 */
|
|
5
|
+
value?: (typeof ITEMS_LIST)[number];
|
|
6
|
+
/** Имя элемента ввода для использования в форме при отправке данных */
|
|
7
|
+
name?: string;
|
|
8
|
+
/** Функция обратного вызова, которая вызывается при изменении значения рейтинга */
|
|
9
|
+
onChange?: (value?: RatingSelectProps['value']) => void;
|
|
10
|
+
/** Функция обратного вызова, которая вызывается при наведении курсора на элементы рейтинга */
|
|
11
|
+
onHover?: (value?: RatingSelectProps['value']) => void;
|
|
12
|
+
/** Свойство определяет, должен ли быть компонент рейтинга отключен (неактивным) */
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
/** Hазмер компонента рейтинга */
|
|
15
|
+
size?: string | number;
|
|
16
|
+
/** @ignore */
|
|
17
|
+
'data-qaid'?: string;
|
|
18
|
+
/** @ignore */
|
|
19
|
+
'data-testid'?: string;
|
|
20
|
+
};
|
|
21
|
+
export declare const RatingSelect: React.FC<RatingSelectProps>;
|
|
22
|
+
export {};
|
|
@@ -11,144 +11,192 @@ var Text = require('@prom-ui/core/Text');
|
|
|
11
11
|
var useBodyTTag = require('@prom-ui/core/useBodyTTag');
|
|
12
12
|
|
|
13
13
|
function _interopNamespaceCompat(e) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
});
|
|
24
|
-
}
|
|
14
|
+
if (e && typeof e === 'object' && 'default' in e) return e;
|
|
15
|
+
var n = Object.create(null);
|
|
16
|
+
if (e) {
|
|
17
|
+
Object.keys(e).forEach(function (k) {
|
|
18
|
+
if (k !== 'default') {
|
|
19
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
20
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () { return e[k]; }
|
|
25
23
|
});
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
n.default = e;
|
|
28
|
+
return Object.freeze(n);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
33
|
+
function _iterableToArrayLimit(arr, i) {
|
|
34
|
+
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
35
|
+
if (null != _i) {
|
|
36
|
+
var _s,
|
|
37
|
+
_e,
|
|
38
|
+
_x,
|
|
39
|
+
_r,
|
|
40
|
+
_arr = [],
|
|
41
|
+
_n = !0,
|
|
42
|
+
_d = !1;
|
|
43
|
+
try {
|
|
44
|
+
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
45
|
+
if (Object(_i) !== _i) return;
|
|
46
|
+
_n = !1;
|
|
47
|
+
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
48
|
+
} catch (err) {
|
|
49
|
+
_d = !0, _e = err;
|
|
50
|
+
} finally {
|
|
51
|
+
try {
|
|
52
|
+
if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
|
|
53
|
+
} finally {
|
|
54
|
+
if (_d) throw _e;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return _arr;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
61
|
+
if (source == null) return {};
|
|
62
|
+
var target = {};
|
|
63
|
+
var sourceKeys = Object.keys(source);
|
|
64
|
+
var key, i;
|
|
65
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
66
|
+
key = sourceKeys[i];
|
|
67
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
68
|
+
target[key] = source[key];
|
|
69
|
+
}
|
|
70
|
+
return target;
|
|
71
|
+
}
|
|
72
|
+
function _objectWithoutProperties(source, excluded) {
|
|
73
|
+
if (source == null) return {};
|
|
74
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
75
|
+
var key, i;
|
|
76
|
+
if (Object.getOwnPropertySymbols) {
|
|
77
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
78
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
79
|
+
key = sourceSymbolKeys[i];
|
|
80
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
81
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
82
|
+
target[key] = source[key];
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return target;
|
|
86
|
+
}
|
|
87
|
+
function _taggedTemplateLiteral(strings, raw) {
|
|
88
|
+
if (!raw) {
|
|
89
|
+
raw = strings.slice(0);
|
|
90
|
+
}
|
|
91
|
+
return Object.freeze(Object.defineProperties(strings, {
|
|
92
|
+
raw: {
|
|
93
|
+
value: Object.freeze(raw)
|
|
94
|
+
}
|
|
95
|
+
}));
|
|
96
|
+
}
|
|
97
|
+
function _slicedToArray(arr, i) {
|
|
98
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
99
|
+
}
|
|
100
|
+
function _arrayWithHoles(arr) {
|
|
101
|
+
if (Array.isArray(arr)) return arr;
|
|
102
|
+
}
|
|
103
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
104
|
+
if (!o) return;
|
|
105
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
106
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
107
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
108
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
109
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
110
|
+
}
|
|
111
|
+
function _arrayLikeToArray(arr, len) {
|
|
112
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
113
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
114
|
+
return arr2;
|
|
115
|
+
}
|
|
116
|
+
function _nonIterableRest() {
|
|
117
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
74
118
|
}
|
|
75
119
|
|
|
76
120
|
var css = {"root":"SafeQuery__root___RWb3q"};
|
|
77
121
|
|
|
78
|
-
var
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
var
|
|
83
|
-
|
|
84
|
-
|
|
122
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
123
|
+
var SafeQueryError = function SafeQueryError(_ref) {
|
|
124
|
+
var componentErrorName = _ref.componentErrorName,
|
|
125
|
+
onReload = _ref.onReload;
|
|
126
|
+
var _useBodyTTag = useBodyTTag.useBodyTTag(),
|
|
127
|
+
t = _useBodyTTag.t;
|
|
128
|
+
var _useState = React.useState(false),
|
|
129
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
130
|
+
isHidden = _useState2[0],
|
|
131
|
+
setHidden = _useState2[1];
|
|
85
132
|
if (isHidden) {
|
|
86
133
|
return null;
|
|
87
134
|
}
|
|
88
135
|
if (process.env.NODE_ENV !== 'production') {
|
|
89
136
|
if (typeof window === 'undefined') return null;
|
|
90
|
-
return React__namespace.default.createElement(Box.Box, {
|
|
137
|
+
return /*#__PURE__*/React__namespace.default.createElement(Box.Box, {
|
|
91
138
|
className: css.root,
|
|
92
|
-
"box-background":
|
|
139
|
+
"box-background": "red-500",
|
|
93
140
|
"box-padding": ['s m', 'm@large l@large'],
|
|
94
|
-
"box-position":
|
|
95
|
-
"box-round":
|
|
96
|
-
"data-qaid":
|
|
97
|
-
}, React__namespace.default.createElement(Box.Box, {
|
|
98
|
-
"box-margin-right":
|
|
99
|
-
}, React__namespace.default.createElement(Text.Text, {
|
|
100
|
-
"text-color":
|
|
101
|
-
}, t(
|
|
102
|
-
"text-weight":
|
|
141
|
+
"box-position": "relative",
|
|
142
|
+
"box-round": "m",
|
|
143
|
+
"data-qaid": "err_catch_trace"
|
|
144
|
+
}, /*#__PURE__*/React__namespace.default.createElement(Box.Box, {
|
|
145
|
+
"box-margin-right": "5xl"
|
|
146
|
+
}, /*#__PURE__*/React__namespace.default.createElement(Text.Text, {
|
|
147
|
+
"text-color": "white"
|
|
148
|
+
}, t(_templateObject || (_templateObject = _taggedTemplateLiteral(["\u0412\u043E\u0437\u043D\u0438\u043A\u043B\u0430 \u043E\u0448\u0438\u0431\u043A\u0430:"]))), ' ', /*#__PURE__*/React__namespace.default.createElement(Text.Text, {
|
|
149
|
+
"text-weight": "bold",
|
|
103
150
|
style: {
|
|
104
151
|
fontFamily: 'Consolas, "Liberation Mono", Menlo, monospace',
|
|
105
152
|
userSelect: 'all'
|
|
106
153
|
}
|
|
107
|
-
}, componentErrorName))), React__namespace.default.createElement(Box.Box, {
|
|
108
|
-
"box-position":
|
|
109
|
-
"box-margin-right":
|
|
110
|
-
}, React__namespace.default.createElement(Button.Button, {
|
|
111
|
-
"button-padding":
|
|
112
|
-
"button-theme":
|
|
154
|
+
}, componentErrorName))), /*#__PURE__*/React__namespace.default.createElement(Box.Box, {
|
|
155
|
+
"box-position": "absolute center-right",
|
|
156
|
+
"box-margin-right": "s"
|
|
157
|
+
}, /*#__PURE__*/React__namespace.default.createElement(Button.Button, {
|
|
158
|
+
"button-padding": "xxs",
|
|
159
|
+
"button-theme": "white-inherit",
|
|
113
160
|
onClick: onReload,
|
|
114
|
-
title: t(
|
|
115
|
-
}, React__namespace.default.createElement("svg", {
|
|
116
|
-
xmlns:
|
|
117
|
-
viewBox:
|
|
161
|
+
title: t(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C"])))
|
|
162
|
+
}, /*#__PURE__*/React__namespace.default.createElement("svg", {
|
|
163
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
164
|
+
viewBox: "0 0 18 18",
|
|
118
165
|
width: 18,
|
|
119
166
|
height: 18
|
|
120
|
-
}, React__namespace.default.createElement("path", {
|
|
121
|
-
fill:
|
|
122
|
-
d:
|
|
123
|
-
}))), React__namespace.default.createElement(Button.Button, {
|
|
124
|
-
"button-padding":
|
|
125
|
-
"button-theme":
|
|
126
|
-
onClick: function () {
|
|
167
|
+
}, /*#__PURE__*/React__namespace.default.createElement("path", {
|
|
168
|
+
fill: "#fff",
|
|
169
|
+
d: "M9 13.5c-2.49 0-4.5-2.01-4.5-4.5S6.51 4.5 9 4.5c1.24 0 2.36.52 3.17 1.33L10 8h5V3l-1.76 1.76C12.15 3.68 10.66 3 9 3 5.69 3 3.01 5.69 3.01 9S5.69 15 9 15c2.97 0 5.43-2.16 5.9-5h-1.52c-.46 2-2.24 3.5-4.38 3.5z"
|
|
170
|
+
}))), /*#__PURE__*/React__namespace.default.createElement(Button.Button, {
|
|
171
|
+
"button-padding": "xxs",
|
|
172
|
+
"button-theme": "white-inherit",
|
|
173
|
+
onClick: function onClick() {
|
|
127
174
|
return setHidden(true);
|
|
128
175
|
},
|
|
129
|
-
title: t(
|
|
130
|
-
}, React__namespace.default.createElement("svg", {
|
|
131
|
-
xmlns:
|
|
132
|
-
viewBox:
|
|
176
|
+
title: t(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\u0421\u043A\u0440\u044B\u0442\u044C"])))
|
|
177
|
+
}, /*#__PURE__*/React__namespace.default.createElement("svg", {
|
|
178
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
179
|
+
viewBox: "0 0 24 24",
|
|
133
180
|
width: 18,
|
|
134
181
|
height: 18
|
|
135
|
-
}, React__namespace.default.createElement("path", {
|
|
136
|
-
fill:
|
|
137
|
-
d:
|
|
182
|
+
}, /*#__PURE__*/React__namespace.default.createElement("path", {
|
|
183
|
+
fill: "#fff",
|
|
184
|
+
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
|
|
138
185
|
})))));
|
|
139
186
|
}
|
|
140
187
|
return null;
|
|
141
188
|
};
|
|
142
|
-
var templateObject_1, templateObject_2, templateObject_3;
|
|
143
189
|
|
|
144
|
-
var
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
190
|
+
var _excluded = ["componentErrorName", "children"];
|
|
191
|
+
var SafeQuery = function SafeQuery(_ref) {
|
|
192
|
+
var _ref$componentErrorNa = _ref.componentErrorName,
|
|
193
|
+
componentErrorName = _ref$componentErrorNa === void 0 ? 'SafeQuery' : _ref$componentErrorNa,
|
|
194
|
+
children = _ref.children,
|
|
195
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
196
|
+
var _React$useState = React__namespace.useState(false),
|
|
197
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
198
|
+
isReload = _React$useState2[0],
|
|
199
|
+
setReload = _React$useState2[1];
|
|
152
200
|
React__namespace.useEffect(function () {
|
|
153
201
|
if (isReload) {
|
|
154
202
|
setReload(false);
|
|
@@ -157,16 +205,16 @@ var SafeQuery = function (_a) {
|
|
|
157
205
|
if (isReload) {
|
|
158
206
|
return null;
|
|
159
207
|
}
|
|
160
|
-
var errorComponent = React__namespace.createElement(SafeQueryError, {
|
|
208
|
+
var errorComponent = /*#__PURE__*/React__namespace.createElement(SafeQueryError, {
|
|
161
209
|
componentErrorName: componentErrorName,
|
|
162
|
-
onReload: function () {
|
|
210
|
+
onReload: function onReload() {
|
|
163
211
|
return setReload(true);
|
|
164
212
|
}
|
|
165
213
|
});
|
|
166
|
-
return React__namespace.createElement(errcatch.ErrCatch, {
|
|
214
|
+
return /*#__PURE__*/React__namespace.createElement(errcatch.ErrCatch, {
|
|
167
215
|
name: componentErrorName,
|
|
168
216
|
errorComponent: errorComponent
|
|
169
|
-
}, React__namespace.createElement(components.Query,
|
|
217
|
+
}, /*#__PURE__*/React__namespace.createElement(components.Query, props, function (queryResult) {
|
|
170
218
|
var error = queryResult.error;
|
|
171
219
|
if (error) throw error;
|
|
172
220
|
return children(queryResult);
|