@prom-ui/core 1.19.0 → 2.0.0-alpha.0

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