@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.
Files changed (233) hide show
  1. package/Avatar/cjs/index.development.js +99 -67
  2. package/Avatar/cjs/index.development.v2.js +99 -67
  3. package/Avatar/cjs/index.production.js +1 -1
  4. package/Avatar/cjs/index.production.v2.js +1 -1
  5. package/Avatar/index.d.ts +14 -14
  6. package/Avatar/package.json +1 -1
  7. package/Avatar/utils.d.ts +2 -2
  8. package/Backdrop/cjs/index.development.js +131 -77
  9. package/Backdrop/cjs/index.development.v2.js +131 -77
  10. package/Backdrop/cjs/index.production.js +1 -1
  11. package/Backdrop/cjs/index.production.v2.js +1 -1
  12. package/Backdrop/index.d.ts +25 -25
  13. package/Backdrop/package.json +1 -1
  14. package/Body/cjs/index.development.js +2 -0
  15. package/Body/cjs/index.development.v2.js +2 -0
  16. package/Body/index.d.ts +36 -36
  17. package/Body/package.json +1 -1
  18. package/BodyContext/cjs/index.development.js +6 -7
  19. package/BodyContext/cjs/index.development.v2.js +6 -7
  20. package/BodyContext/cjs/index.production.js +1 -1
  21. package/BodyContext/cjs/index.production.v2.js +1 -1
  22. package/BodyContext/index.d.ts +12 -12
  23. package/BodyContext/package.json +1 -1
  24. package/BodyProvider/cjs/index.development.js +7 -6
  25. package/BodyProvider/cjs/index.development.v2.js +7 -6
  26. package/BodyProvider/index.d.ts +10 -10
  27. package/BodyProvider/package.json +1 -1
  28. package/Box/cjs/index.development.js +4 -4
  29. package/Box/cjs/index.development.v2.js +4 -4
  30. package/Box/index.d.ts +106 -106
  31. package/Box/package.json +1 -1
  32. package/Button/cjs/index.development.js +67 -62
  33. package/Button/cjs/index.development.v2.js +67 -62
  34. package/Button/cjs/index.production.js +1 -1
  35. package/Button/cjs/index.production.v2.js +1 -1
  36. package/Button/index.d.ts +45 -45
  37. package/Button/package.json +1 -1
  38. package/ButtonPageUp/cjs/index.development.js +195 -85
  39. package/ButtonPageUp/cjs/index.development.v2.js +195 -85
  40. package/ButtonPageUp/cjs/index.production.js +1 -1
  41. package/ButtonPageUp/cjs/index.production.v2.js +1 -1
  42. package/ButtonPageUp/index.d.ts +18 -18
  43. package/ButtonPageUp/package.json +1 -1
  44. package/Checkbox/cjs/index.development.js +99 -67
  45. package/Checkbox/cjs/index.development.v2.js +99 -67
  46. package/Checkbox/cjs/index.production.js +1 -1
  47. package/Checkbox/cjs/index.production.v2.js +1 -1
  48. package/Checkbox/index.d.ts +8 -8
  49. package/Checkbox/package.json +1 -1
  50. package/Flex/index.d.ts +34 -34
  51. package/Flex/package.json +1 -1
  52. package/Grid/index.d.ts +46 -46
  53. package/Grid/package.json +1 -1
  54. package/Icon/index.d.ts +9 -9
  55. package/Icon/package.json +1 -1
  56. package/Image/index.d.ts +42 -42
  57. package/Image/package.json +1 -1
  58. package/ImageEmoji/cjs/index.development.js +70 -63
  59. package/ImageEmoji/cjs/index.development.v2.js +70 -63
  60. package/ImageEmoji/cjs/index.production.js +1 -1
  61. package/ImageEmoji/cjs/index.production.v2.js +1 -1
  62. package/ImageEmoji/index.d.ts +9 -9
  63. package/ImageEmoji/package.json +1 -1
  64. package/Input/index.d.ts +18 -18
  65. package/Input/package.json +1 -1
  66. package/InputField/addons/AfterClearValue.d.ts +3 -3
  67. package/InputField/addons/AfterCorrectValue.d.ts +2 -2
  68. package/InputField/addons/AfterLoading.d.ts +2 -2
  69. package/InputField/addons/AfterTogglePassword.d.ts +6 -6
  70. package/InputField/addons/ErrorText.d.ts +6 -6
  71. package/InputField/cjs/index.development.js +237 -173
  72. package/InputField/cjs/index.development.v2.js +237 -173
  73. package/InputField/cjs/index.production.js +1 -1
  74. package/InputField/cjs/index.production.v2.js +1 -1
  75. package/InputField/index.d.ts +18 -18
  76. package/InputField/package.json +1 -1
  77. package/InputField/utils.d.ts +10 -10
  78. package/KeyPress/cjs/index.development.js +13 -13
  79. package/KeyPress/cjs/index.development.v2.js +13 -13
  80. package/KeyPress/index.d.ts +14 -14
  81. package/KeyPress/package.json +1 -1
  82. package/Line/index.d.ts +13 -13
  83. package/Line/package.json +1 -1
  84. package/Link/cjs/index.development.js +5 -5
  85. package/Link/cjs/index.development.v2.js +5 -5
  86. package/Link/index.d.ts +28 -28
  87. package/Link/package.json +1 -1
  88. package/List/index.d.ts +23 -23
  89. package/List/package.json +1 -1
  90. package/Media/MediaProvider.d.ts +8 -8
  91. package/Media/cjs/index.development.js +70 -19
  92. package/Media/cjs/index.development.v2.js +70 -19
  93. package/Media/cjs/index.production.js +1 -1
  94. package/Media/cjs/index.production.v2.js +1 -1
  95. package/Media/index.d.ts +20 -20
  96. package/Media/package.json +1 -1
  97. package/OutsideClick/cjs/index.development.js +117 -61
  98. package/OutsideClick/cjs/index.development.v2.js +117 -61
  99. package/OutsideClick/cjs/index.production.js +1 -1
  100. package/OutsideClick/cjs/index.production.v2.js +1 -1
  101. package/OutsideClick/index.d.ts +12 -12
  102. package/OutsideClick/package.json +1 -1
  103. package/Overlay/cjs/index.development.js +197 -183
  104. package/Overlay/cjs/index.development.v2.js +197 -183
  105. package/Overlay/cjs/index.production.js +1 -1
  106. package/Overlay/cjs/index.production.v2.js +1 -1
  107. package/Overlay/components/OverlayHeader.d.ts +11 -11
  108. package/Overlay/components/SwipeClose.d.ts +11 -11
  109. package/Overlay/components/TouchScrollable.d.ts +8 -8
  110. package/Overlay/index.d.ts +76 -76
  111. package/Overlay/package.json +1 -1
  112. package/Overlay/utils.d.ts +10 -10
  113. package/Picture/index.d.ts +70 -70
  114. package/Picture/package.json +1 -1
  115. package/Portal/cjs/index.development.js +11 -11
  116. package/Portal/cjs/index.development.v2.js +11 -11
  117. package/Portal/index.d.ts +10 -10
  118. package/Portal/package.json +1 -1
  119. package/QRCode/cjs/index.development.js +11 -11
  120. package/QRCode/cjs/index.development.v2.js +11 -11
  121. package/QRCode/index.d.ts +17 -17
  122. package/QRCode/package.json +1 -1
  123. package/Rating/cjs/index.development.js +75 -69
  124. package/Rating/cjs/index.development.v2.js +75 -69
  125. package/Rating/cjs/index.production.js +1 -1
  126. package/Rating/cjs/index.production.v2.js +1 -1
  127. package/Rating/index.d.ts +17 -17
  128. package/Rating/package.json +1 -1
  129. package/RatingSelect/cjs/index.development.js +148 -68
  130. package/RatingSelect/cjs/index.development.v2.js +148 -68
  131. package/RatingSelect/cjs/index.production.js +1 -1
  132. package/RatingSelect/cjs/index.production.v2.js +1 -1
  133. package/RatingSelect/index.d.ts +22 -18
  134. package/RatingSelect/package.json +1 -1
  135. package/SafeQuery/cjs/index.development.js +158 -110
  136. package/SafeQuery/cjs/index.development.v2.js +158 -110
  137. package/SafeQuery/cjs/index.production.js +1 -1
  138. package/SafeQuery/cjs/index.production.v2.js +1 -1
  139. package/SafeQuery/components/Error.d.ts +7 -7
  140. package/SafeQuery/index.d.ts +10 -10
  141. package/SafeQuery/package.json +1 -1
  142. package/Scroll/index.d.ts +25 -25
  143. package/Scroll/package.json +1 -1
  144. package/ScrollControls/ScrollControlsButton.d.ts +11 -11
  145. package/ScrollControls/cjs/index.development.js +201 -113
  146. package/ScrollControls/cjs/index.development.v2.js +201 -113
  147. package/ScrollControls/cjs/index.production.js +1 -1
  148. package/ScrollControls/cjs/index.production.v2.js +1 -1
  149. package/ScrollControls/index.d.ts +16 -16
  150. package/ScrollControls/package.json +1 -1
  151. package/SimpleSlider/cjs/index.development.js +270 -158
  152. package/SimpleSlider/cjs/index.development.v2.js +270 -158
  153. package/SimpleSlider/cjs/index.production.js +1 -1
  154. package/SimpleSlider/cjs/index.production.v2.js +1 -1
  155. package/SimpleSlider/index.d.ts +41 -41
  156. package/SimpleSlider/package.json +1 -1
  157. package/SimpleSlider/useAutoPlay.d.ts +3 -3
  158. package/SimpleSlider/utils.d.ts +19 -19
  159. package/Skeleton/cjs/index.development.js +118 -64
  160. package/Skeleton/cjs/index.development.v2.js +118 -64
  161. package/Skeleton/cjs/index.production.js +1 -1
  162. package/Skeleton/cjs/index.production.v2.js +1 -1
  163. package/Skeleton/index.d.ts +37 -37
  164. package/Skeleton/package.json +1 -1
  165. package/Spinner/cjs/index.development.js +66 -61
  166. package/Spinner/cjs/index.development.v2.js +66 -61
  167. package/Spinner/cjs/index.production.js +1 -1
  168. package/Spinner/cjs/index.production.v2.js +1 -1
  169. package/Spinner/index.d.ts +29 -29
  170. package/Spinner/package.json +1 -1
  171. package/Text/index.d.ts +25 -25
  172. package/Text/package.json +1 -1
  173. package/TextEmoji/cjs/index.development.js +65 -60
  174. package/TextEmoji/cjs/index.development.v2.js +65 -60
  175. package/TextEmoji/cjs/index.production.js +1 -1
  176. package/TextEmoji/cjs/index.production.v2.js +1 -1
  177. package/TextEmoji/index.d.ts +9 -9
  178. package/TextEmoji/package.json +1 -1
  179. package/Tooltip/cjs/index.development.js +80 -91
  180. package/Tooltip/cjs/index.development.v2.js +80 -91
  181. package/Tooltip/cjs/index.production.js +1 -1
  182. package/Tooltip/cjs/index.production.v2.js +1 -1
  183. package/Tooltip/index.d.ts +87 -87
  184. package/Tooltip/package.json +1 -1
  185. package/Tumbler/cjs/index.development.js +98 -66
  186. package/Tumbler/cjs/index.development.v2.js +98 -66
  187. package/Tumbler/cjs/index.production.js +1 -1
  188. package/Tumbler/cjs/index.production.v2.js +1 -1
  189. package/Tumbler/index.d.ts +8 -8
  190. package/Tumbler/package.json +1 -1
  191. package/package.json +7 -5
  192. package/useBodyTTag/cjs/index.development.js +1 -1
  193. package/useBodyTTag/cjs/index.development.v2.js +1 -1
  194. package/useBodyTTag/index.d.ts +2 -2
  195. package/useBodyTTag/package.json +1 -1
  196. package/useDebounce/cjs/index.development.js +58 -6
  197. package/useDebounce/cjs/index.development.v2.js +58 -6
  198. package/useDebounce/cjs/index.production.js +1 -1
  199. package/useDebounce/cjs/index.production.v2.js +1 -1
  200. package/useDebounce/index.d.ts +4 -4
  201. package/useDebounce/package.json +1 -1
  202. package/useId/cjs/index.development.js +6 -7
  203. package/useId/cjs/index.development.v2.js +6 -7
  204. package/useId/cjs/index.production.js +1 -1
  205. package/useId/cjs/index.production.v2.js +1 -1
  206. package/useId/index.d.ts +4 -4
  207. package/useId/package.json +1 -1
  208. package/useIsMounted/cjs/index.development.js +3 -3
  209. package/useIsMounted/cjs/index.development.v2.js +3 -3
  210. package/useIsMounted/index.d.ts +4 -4
  211. package/useIsMounted/package.json +1 -1
  212. package/useKeyPress/cjs/index.development.js +76 -22
  213. package/useKeyPress/cjs/index.development.v2.js +76 -22
  214. package/useKeyPress/cjs/index.production.js +1 -1
  215. package/useKeyPress/cjs/index.production.v2.js +1 -1
  216. package/useKeyPress/index.d.ts +6 -6
  217. package/useKeyPress/package.json +1 -1
  218. package/useMedia/cjs/index.development.js +5 -5
  219. package/useMedia/cjs/index.development.v2.js +5 -5
  220. package/useMedia/index.d.ts +21 -21
  221. package/useMedia/package.json +1 -1
  222. package/useOutsideClick/cjs/index.development.js +2 -2
  223. package/useOutsideClick/cjs/index.development.v2.js +2 -2
  224. package/useOutsideClick/index.d.ts +5 -5
  225. package/useOutsideClick/package.json +1 -1
  226. package/usePortal/cjs/index.development.js +32 -27
  227. package/usePortal/cjs/index.development.v2.js +32 -27
  228. package/usePortal/index.d.ts +12 -12
  229. package/usePortal/package.json +1 -1
  230. package/useScrollPosition/cjs/index.development.js +2 -2
  231. package/useScrollPosition/cjs/index.development.v2.js +2 -2
  232. package/useScrollPosition/index.d.ts +5 -5
  233. package/useScrollPosition/package.json +1 -1
@@ -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
- export declare const RatingSelect: React.FC<RatingSelectProps>;
18
- export {};
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 {};
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prom-ui/core/RatingSelect",
3
- "version": "1.3.1",
3
+ "version": "1.4.0",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -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
- 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]; }
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
- n.default = e;
28
- return Object.freeze(n);
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
- Copyright (c) Microsoft Corporation.
35
-
36
- Permission to use, copy, modify, and/or distribute this software for any
37
- purpose with or without fee is hereby granted.
38
-
39
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
40
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
41
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
42
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
43
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
44
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
45
- PERFORMANCE OF THIS SOFTWARE.
46
- ***************************************************************************** */
47
-
48
- var __assign = function() {
49
- __assign = Object.assign || function __assign(t) {
50
- for (var s, i = 1, n = arguments.length; i < n; i++) {
51
- s = arguments[i];
52
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
53
- }
54
- return t;
55
- };
56
- return __assign.apply(this, arguments);
57
- };
58
-
59
- function __rest(s, e) {
60
- var t = {};
61
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
62
- t[p] = s[p];
63
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
64
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
65
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
66
- t[p[i]] = s[p[i]];
67
- }
68
- return t;
69
- }
70
-
71
- function __makeTemplateObject(cooked, raw) {
72
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
73
- return cooked;
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 SafeQueryError = function (_a) {
79
- var componentErrorName = _a.componentErrorName,
80
- onReload = _a.onReload;
81
- var t = useBodyTTag.useBodyTTag().t;
82
- var _b = React.useState(false),
83
- isHidden = _b[0],
84
- setHidden = _b[1];
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": 'red-500',
139
+ "box-background": "red-500",
93
140
  "box-padding": ['s m', 'm@large l@large'],
94
- "box-position": 'relative',
95
- "box-round": 'm',
96
- "data-qaid": 'err_catch_trace'
97
- }, React__namespace.default.createElement(Box.Box, {
98
- "box-margin-right": '5xl'
99
- }, React__namespace.default.createElement(Text.Text, {
100
- "text-color": 'white'
101
- }, t(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\u0412\u043E\u0437\u043D\u0438\u043A\u043B\u0430 \u043E\u0448\u0438\u0431\u043A\u0430:"], ["\u0412\u043E\u0437\u043D\u0438\u043A\u043B\u0430 \u043E\u0448\u0438\u0431\u043A\u0430:"]))), ' ', React__namespace.default.createElement(Text.Text, {
102
- "text-weight": 'bold',
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": 'absolute center-right',
109
- "box-margin-right": 's'
110
- }, React__namespace.default.createElement(Button.Button, {
111
- "button-padding": 'xxs',
112
- "button-theme": 'white-inherit',
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(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C"], ["\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C"])))
115
- }, React__namespace.default.createElement("svg", {
116
- xmlns: 'http://www.w3.org/2000/svg',
117
- viewBox: '0 0 18 18',
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: '#fff',
122
- d: 'M9 13.5c-2.49 0-4.5-2.01-4.5-4.5S6.51 4.5 9 4.5c1.24\n 0 2.36.52 3.17 1.33L10 8h5V3l-1.76 1.76C12.15 3.68 10.66\n 3 9 3 5.69 3 3.01 5.69 3.01 9S5.69 15 9 15c2.97 0\n 5.43-2.16 5.9-5h-1.52c-.46 2-2.24 3.5-4.38 3.5z'
123
- }))), React__namespace.default.createElement(Button.Button, {
124
- "button-padding": 'xxs',
125
- "button-theme": 'white-inherit',
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(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\u0421\u043A\u0440\u044B\u0442\u044C"], ["\u0421\u043A\u0440\u044B\u0442\u044C"])))
130
- }, React__namespace.default.createElement("svg", {
131
- xmlns: 'http://www.w3.org/2000/svg',
132
- viewBox: '0 0 24 24',
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: '#fff',
137
- d: 'M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5\n 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'
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 SafeQuery = function (_a) {
145
- var _b = _a.componentErrorName,
146
- componentErrorName = _b === void 0 ? 'SafeQuery' : _b,
147
- children = _a.children,
148
- props = __rest(_a, ["componentErrorName", "children"]);
149
- var _c = React__namespace.useState(false),
150
- isReload = _c[0],
151
- setReload = _c[1];
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, __assign({}, props), function (queryResult) {
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);