@chaoswise/ui 3.0.12 → 3.0.14

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 (214) hide show
  1. package/lib/AbreastLayout/index.js +2 -2
  2. package/lib/AdaptiveLayout/index.js +2 -2
  3. package/lib/Antd5/_util/transButton.js +2 -2
  4. package/lib/Antd5/alert/Alert.js +2 -2
  5. package/lib/Antd5/app/style/index.js +2 -1
  6. package/lib/Antd5/avatar/avatar.js +2 -2
  7. package/lib/Antd5/badge/ScrollNumber.js +2 -2
  8. package/lib/Antd5/badge/index.js +2 -2
  9. package/lib/Antd5/breadcrumb/Breadcrumb.js +2 -2
  10. package/lib/Antd5/breadcrumb/BreadcrumbItem.js +2 -2
  11. package/lib/Antd5/breadcrumb/useItemRender.js +2 -2
  12. package/lib/Antd5/breadcrumb/useItems.js +2 -2
  13. package/lib/Antd5/button/button-group.js +2 -2
  14. package/lib/Antd5/button/button.js +2 -2
  15. package/lib/Antd5/card/Card.js +2 -2
  16. package/lib/Antd5/card/Grid.js +2 -2
  17. package/lib/Antd5/card/Meta.js +2 -2
  18. package/lib/Antd5/carousel/index.js +2 -2
  19. package/lib/Antd5/cascader/index.js +2 -2
  20. package/lib/Antd5/checkbox/Checkbox.js +2 -2
  21. package/lib/Antd5/checkbox/Group.js +2 -2
  22. package/lib/Antd5/color-picker/ColorPicker.js +2 -2
  23. package/lib/Antd5/color-picker/ColorPickerPanel.js +2 -2
  24. package/lib/Antd5/color-picker/components/ColorTrigger.js +2 -2
  25. package/lib/Antd5/color-picker/components/PanelPicker.js +2 -2
  26. package/lib/Antd5/config-provider/index.js +2 -2
  27. package/lib/Antd5/date-picker/generatePicker/generateRangePicker.js +2 -2
  28. package/lib/Antd5/date-picker/generatePicker/generateSinglePicker.js +2 -2
  29. package/lib/Antd5/descriptions/hooks/useItems.js +2 -2
  30. package/lib/Antd5/descriptions/index.js +2 -2
  31. package/lib/Antd5/divider/index.js +2 -2
  32. package/lib/Antd5/drawer/index.js +2 -2
  33. package/lib/Antd5/dropdown/dropdown-button.js +2 -2
  34. package/lib/Antd5/empty/index.js +2 -2
  35. package/lib/Antd5/flex/index.js +2 -2
  36. package/lib/Antd5/float-button/BackTop.js +2 -2
  37. package/lib/Antd5/float-button/FloatButton.js +2 -2
  38. package/lib/Antd5/float-button/FloatButtonGroup.js +2 -2
  39. package/lib/Antd5/float-button/PurePanel.js +2 -2
  40. package/lib/Antd5/form/Form.js +2 -2
  41. package/lib/Antd5/form/FormItem/ItemHolder.js +2 -2
  42. package/lib/Antd5/form/FormItemLabel.js +2 -2
  43. package/lib/Antd5/form/FormList.js +2 -2
  44. package/lib/Antd5/grid/col.js +2 -2
  45. package/lib/Antd5/grid/row.js +2 -2
  46. package/lib/Antd5/image/PreviewGroup.js +2 -2
  47. package/lib/Antd5/image/index.js +2 -2
  48. package/lib/Antd5/input/Input.js +2 -2
  49. package/lib/Antd5/input/OTP/OTPInput.js +2 -2
  50. package/lib/Antd5/input/OTP/index.js +2 -2
  51. package/lib/Antd5/input/Password.js +2 -2
  52. package/lib/Antd5/input/Search.js +2 -2
  53. package/lib/Antd5/input/TextArea.js +2 -2
  54. package/lib/Antd5/input-number/index.js +2 -2
  55. package/lib/Antd5/layout/Sider.js +2 -2
  56. package/lib/Antd5/layout/layout.js +2 -2
  57. package/lib/Antd5/list/Item.js +2 -2
  58. package/lib/Antd5/list/index.js +2 -2
  59. package/lib/Antd5/mentions/index.js +2 -2
  60. package/lib/Antd5/menu/MenuDivider.js +2 -2
  61. package/lib/Antd5/menu/OverrideContext.js +2 -2
  62. package/lib/Antd5/menu/menu.js +2 -2
  63. package/lib/Antd5/message/PurePanel.js +2 -2
  64. package/lib/Antd5/message/useMessage.js +2 -2
  65. package/lib/Antd5/modal/ConfirmDialog.js +2 -2
  66. package/lib/Antd5/modal/Modal.js +2 -2
  67. package/lib/Antd5/modal/PurePanel.js +2 -2
  68. package/lib/Antd5/modal/useModal/HookModal.js +2 -2
  69. package/lib/Antd5/notification/PurePanel.js +2 -2
  70. package/lib/Antd5/notification/useNotification.js +2 -2
  71. package/lib/Antd5/pagination/Pagination.js +2 -2
  72. package/lib/Antd5/popconfirm/PurePanel.js +2 -2
  73. package/lib/Antd5/popconfirm/index.js +2 -2
  74. package/lib/Antd5/popover/PurePanel.js +2 -2
  75. package/lib/Antd5/popover/index.js +2 -2
  76. package/lib/Antd5/progress/Line.js +2 -2
  77. package/lib/Antd5/progress/progress.js +2 -2
  78. package/lib/Antd5/radio/radio.js +2 -2
  79. package/lib/Antd5/radio/radioButton.js +2 -2
  80. package/lib/Antd5/rate/index.js +2 -2
  81. package/lib/Antd5/segmented/index.js +2 -2
  82. package/lib/Antd5/select/index.js +2 -2
  83. package/lib/Antd5/slider/index.js +2 -2
  84. package/lib/Antd5/space/Compact.js +2 -2
  85. package/lib/Antd5/space/index.js +2 -2
  86. package/lib/Antd5/spin/index.js +2 -2
  87. package/lib/Antd5/statistic/Countdown.js +2 -2
  88. package/lib/Antd5/statistic/Statistic.js +2 -2
  89. package/lib/Antd5/steps/index.js +2 -2
  90. package/lib/Antd5/switch/index.js +2 -2
  91. package/lib/Antd5/table/hooks/usePagination.js +2 -2
  92. package/lib/Antd5/tabs/hooks/useLegacyItems.js +2 -2
  93. package/lib/Antd5/tabs/index.js +2 -2
  94. package/lib/Antd5/tag/CheckableTag.js +2 -2
  95. package/lib/Antd5/tag/index.js +2 -2
  96. package/lib/Antd5/theme/useToken.js +2 -2
  97. package/lib/Antd5/theme/util/alias.js +2 -2
  98. package/lib/Antd5/time-picker/index.js +2 -2
  99. package/lib/Antd5/timeline/Timeline.js +2 -2
  100. package/lib/Antd5/timeline/TimelineItem.js +2 -2
  101. package/lib/Antd5/timeline/TimelineItemList.js +2 -2
  102. package/lib/Antd5/tooltip/index.js +2 -2
  103. package/lib/Antd5/tour/PurePanel.js +2 -2
  104. package/lib/Antd5/tour/index.js +2 -2
  105. package/lib/Antd5/tree/DirectoryTree.js +2 -2
  106. package/lib/Antd5/tree-select/index.js +2 -2
  107. package/lib/Antd5/typography/Base/index.js +2 -2
  108. package/lib/Antd5/typography/Link.js +2 -2
  109. package/lib/Antd5/typography/Text.js +2 -2
  110. package/lib/Antd5/typography/Title.js +2 -2
  111. package/lib/Antd5/typography/Typography.js +2 -2
  112. package/lib/Antd5/upload/Dragger.js +2 -2
  113. package/lib/Antd5/upload/Upload.js +1 -1
  114. package/lib/AppHolder/index.js +19 -0
  115. package/lib/Badge/index.style.js +42 -10
  116. package/lib/BasicLayout/Breadcrumb.js +2 -2
  117. package/lib/BasicLayout/Footer.js +2 -2
  118. package/lib/BasicLayout/Sider.js +8 -4
  119. package/lib/BasicLayout/style/sider.js +53 -49
  120. package/lib/Button/index.js +2 -2
  121. package/lib/CWCascader/Cascader/index.js +2 -2
  122. package/lib/CWCascader/rc-cascader/Cascader.js +2 -2
  123. package/lib/CWMessage/MessageContent/TabList/index.js +2 -2
  124. package/lib/CWMessage/MessageContent/index.js +6 -6
  125. package/lib/CWMessage/index.js +82 -92
  126. package/lib/CWMessage/index.style.js +2 -4
  127. package/lib/CWRadioTabs/index.js +2 -2
  128. package/lib/CWRangePicker/DropdownMenu/index.js +41 -37
  129. package/lib/CWRangePicker/DropdownMenu/index.style.js +129 -130
  130. package/lib/CWRangePicker/Refresh/index.js +8 -4
  131. package/lib/CWRangePicker/Refresh/index.style.js +16 -19
  132. package/lib/CWRangePicker/TimeSpan/index.js +7 -2
  133. package/lib/CWRangePicker/TimeSpan/index.style.js +9 -12
  134. package/lib/CWRangePicker/index.js +8 -4
  135. package/lib/CWRangePicker/index.style.js +47 -52
  136. package/lib/CWTable/CWTable.js +3 -3
  137. package/lib/CWTable/header.js +2 -2
  138. package/lib/CWTree/index.js +8 -4
  139. package/lib/CWTree/index.style.js +97 -99
  140. package/lib/CardSelect/index.js +2 -2
  141. package/lib/ChangeIcon/index.js +1 -1
  142. package/lib/Collapse/index.js +2 -2
  143. package/lib/ConfigProvider/ConfigProvider.js +17 -5
  144. package/lib/CustomScrollBar/index.js +2 -2
  145. package/lib/Drawer/index.js +2 -2
  146. package/lib/Dropdown/DropdownButton.js +2 -2
  147. package/lib/Dropdown/index.js +2 -2
  148. package/lib/EchartsArea/index.js +2 -2
  149. package/lib/EchartsBar/index.js +2 -2
  150. package/lib/EchartsBarRow/index.js +2 -2
  151. package/lib/EchartsBase/index.js +2 -2
  152. package/lib/EchartsLine/index.js +2 -2
  153. package/lib/EchartsPie/index.js +2 -2
  154. package/lib/EchartsRing/index.js +2 -2
  155. package/lib/Empty/index.js +2 -2
  156. package/lib/Exception/index.js +1 -1
  157. package/lib/FilterDropDown/index.js +1 -1
  158. package/lib/Flow/BasicLayout/Chain.js +2 -2
  159. package/lib/Flow/Flow.js +2 -2
  160. package/lib/Form/FormItem.js +2 -2
  161. package/lib/Form/index.js +2 -2
  162. package/lib/FormItemWrapper/index.js +2 -2
  163. package/lib/GlobalTabs/index.js +2 -2
  164. package/lib/Header/CommonDropMenu.js +2 -2
  165. package/lib/Header/LocaleSwitcher.js +2 -2
  166. package/lib/Header/Message/index.js +2 -2
  167. package/lib/Header/TopNavigationMenu/index.js +1 -1
  168. package/lib/Header/UserSetting/index.js +1 -1
  169. package/lib/Header/index.js +1 -1
  170. package/lib/Icon/index.js +2 -2
  171. package/lib/IconSelect/index.js +1 -1
  172. package/lib/Input/InputComponent.js +2 -2
  173. package/lib/InputNumber/index.js +2 -2
  174. package/lib/Joyride/index.js +2 -2
  175. package/lib/LayoutBreadcrumb/index.js +2 -2
  176. package/lib/LayoutWrapper/Footer.js +7 -3
  177. package/lib/LayoutWrapper/Header.js +7 -3
  178. package/lib/LayoutWrapper/index.js +5 -2
  179. package/lib/LeftNavigation/index.js +1 -1
  180. package/lib/Modal/Modal.js +2 -2
  181. package/lib/Modal/index.js +2 -2
  182. package/lib/ModuleFederation/react-dynamic-remote-component/RemoteComponent.js +2 -2
  183. package/lib/ModuleTitle/index.js +2 -2
  184. package/lib/Pagination/index.js +2 -2
  185. package/lib/QuickRangePicker/index.js +2 -2
  186. package/lib/QuickTransfer/index.js +7 -3
  187. package/lib/ScrollLoad/index.js +2 -2
  188. package/lib/SearchBar/index.js +3 -3
  189. package/lib/SiderMenu/index.js +2 -2
  190. package/lib/SimpleCard/index.js +2 -2
  191. package/lib/SimplePagination/index.js +1 -1
  192. package/lib/SingleSpa/index.js +2 -2
  193. package/lib/Slider/index.js +2 -2
  194. package/lib/Tabs/index.js +2 -2
  195. package/lib/Tag/CheckableTag.js +2 -2
  196. package/lib/Tag/index.js +2 -2
  197. package/lib/Tag/index.style.js +41 -9
  198. package/lib/ThemeProvider/main.js +2 -2
  199. package/lib/Tooltip/index.js +4 -4
  200. package/lib/TooltipText/index.js +3 -3
  201. package/lib/UniversalLayout/index.js +5 -1
  202. package/lib/WangEditor/editor4.js +2 -2
  203. package/lib/WangEditor/index.js +2 -2
  204. package/lib/antd-style/factories/createStyleProvider/index.js +2 -2
  205. package/lib/antd-style/factories/createStyles/index.js +2 -2
  206. package/lib/antd-style/factories/createThemeProvider/AntdProvider.js +2 -2
  207. package/lib/antd-style/factories/createThemeProvider/TokenContainer.js +2 -2
  208. package/lib/antd-style/factories/createThemeProvider/index.js +2 -2
  209. package/lib/antd-style/functions/index.js +6 -5
  210. package/lib/configHoc/index.js +2 -2
  211. package/lib/locales/en_US.json +1 -0
  212. package/lib/locales/zh_CN.json +1 -0
  213. package/lib/locales/zh_TW.json +1 -0
  214. package/package.json +1 -1
@@ -0,0 +1,19 @@
1
+ import _App from "@chaoswise/ui/lib/App";
2
+ var message;
3
+ var notification;
4
+ var modal;
5
+ var AppHolder = function AppHolder() {
6
+ var staticFunction = _App.useApp();
7
+ message = staticFunction.message;
8
+ modal = staticFunction.modal;
9
+ notification = staticFunction.notification;
10
+ return null;
11
+ };
12
+ export default AppHolder;
13
+ // 这里的问题是 AppHolder 组件在首次定义的时候,message、modal 和 notification 还没有被赋值。当你在其他地方尝试访问 AppHolder.message 时,这些属性是 undefined 的。
14
+ // AppHolder.message = message;
15
+ // AppHolder.modal = modal;
16
+ // AppHolder.notification = notification;
17
+
18
+ // 具名导出的方式可以保证AppHolder组件在渲染时正确赋值这些变量,并且在其他模块中可以正确导入和使用这些变量
19
+ export { message, notification, modal };
@@ -1,15 +1,43 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _templateObject, _templateObject2, _templateObject3, _templateObject4;
3
2
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
4
3
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
5
4
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
6
- function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
7
5
  import { genStyleHooks } from "../Antd5/theme/internal";
8
- import { keyframes } from "../antd-style";
9
- var k_loadingK = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n left: 0;\n transform: scale(1.1)\n }\n\n 50% {\n left: 100%;\n transform: scale(1)\n }\n\n 100% {\n left: 0;\n transform: scale(1.1)\n }\n"])));
10
- var k_loadingM = keyframes(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n 0% {\n z-index: 0\n }\n\n 50% {\n z-index: 1\n }\n\n 100% {\n z-index: 0\n }\n"])));
11
- var k_loadingL = keyframes(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n 0% {\n left: 100%;\n transform: scale(1.1)\n }\n\n 50% {\n left: 0;\n transform: scale(1)\n }\n\n 100% {\n left: 100%;\n transform: scale(1.1)\n }\n"])));
12
- var k_loadingN = keyframes(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n 0% {\n z-index: 1\n }\n\n 50% {\n z-index: 0\n }\n\n 100% {\n z-index: 1\n }\n"])));
6
+ import { Keyframes } from "@ant-design/cssinjs";
7
+ var k_loadingK = new Keyframes("k_loadingK", {
8
+ "0%": {
9
+ left: 0,
10
+ transform: "scale(1.1)",
11
+ zIndex: 0
12
+ },
13
+ "50%": {
14
+ left: "100%",
15
+ transform: "scale(1)",
16
+ zIndex: 1
17
+ },
18
+ "100%": {
19
+ left: 0,
20
+ transform: 'scale(1.1)',
21
+ zIndex: 0
22
+ }
23
+ });
24
+ var k_loadingL = new Keyframes("k_loadingL", {
25
+ "0%": {
26
+ left: "100%",
27
+ transform: 'scale(1.1)',
28
+ zIndex: 1
29
+ },
30
+ "50%": {
31
+ left: 0,
32
+ transform: "scale(1)",
33
+ zIndex: 1
34
+ },
35
+ "100%": {
36
+ left: "100%",
37
+ transform: 'scale(1.1)',
38
+ zIndex: 0
39
+ }
40
+ });
13
41
  var genCustomBadgeStyle = function genCustomBadgeStyle(token) {
14
42
  var prefixCls = token.antCls;
15
43
  var badgePrefix = "".concat(prefixCls, "-badge");
@@ -35,11 +63,15 @@ var genCustomBadgeStyle = function genCustomBadgeStyle(token) {
35
63
  },
36
64
  "&::before": {
37
65
  background: token.colorPrimary,
38
- animation: "".concat(k_loadingK, " 1s ease-in-out infinite, ").concat(k_loadingM, " 0.33s ease-in-out infinite")
66
+ animationName: k_loadingK,
67
+ animationDuration: '1s',
68
+ animationIterationCount: 'infinite'
39
69
  },
40
70
  "&:after": {
41
71
  background: token.colorSuccess,
42
- animation: "".concat(k_loadingL, " 1s ease-in-out infinite, ").concat(k_loadingN, " 0.33s ease-in-out infinite")
72
+ animationName: k_loadingL,
73
+ animationDuration: '1s',
74
+ animationIterationCount: 'infinite'
43
75
  }
44
76
  }), "".concat(badgePrefix, "-processing-text"), {
45
77
  display: "inline-block",
@@ -62,6 +94,6 @@ var genCustomBadgeStyle = function genCustomBadgeStyle(token) {
62
94
  // ============================== Export ==============================
63
95
  export default genStyleHooks("CWBadge", function (token) {
64
96
  return [
65
- //
97
+ //
66
98
  genCustomBadgeStyle(token)];
67
99
  });
@@ -7,8 +7,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
8
8
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
9
9
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
10
- function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
11
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
10
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
11
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
12
12
  import React, { useMemo } from 'react';
13
13
  import { useHistory } from 'react-router-dom';
14
14
  import { Link } from 'react-router-dom';
@@ -6,8 +6,8 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
6
6
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
7
7
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
8
8
  function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
9
- function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
10
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
9
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
10
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
11
11
  import React, { useLayoutEffect, useRef, useEffect } from "react";
12
12
  import useConfigContext from "../useConfigContext";
13
13
  import { eventManager } from "../utils";
@@ -10,8 +10,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
10
10
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
11
11
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
12
12
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
13
- function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
14
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
13
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
14
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
15
15
  function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
16
16
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
17
17
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); 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; } }
@@ -23,6 +23,7 @@ import { Resizable } from "re-resizable";
23
23
  import { MenuFoldOutlined, MenuUnfoldOutlined } from "@ant-design/icons";
24
24
  import { useTheme } from '../antd-style';
25
25
  import classnames from 'classnames';
26
+ import useConfigContext from "../useConfigContext";
26
27
  import useStyle from "./style/sider";
27
28
  var AntSider = _Layout.Sider;
28
29
  function Sider(_ref) {
@@ -37,7 +38,10 @@ function Sider(_ref) {
37
38
  _setSiderDragWidth = _ref._setSiderDragWidth,
38
39
  menuOptions = _ref.menuOptions,
39
40
  onCollapse = _ref.onCollapse;
40
- var _useStyle = useStyle("cw-side"),
41
+ var _useConfigContext = useConfigContext(),
42
+ getPrefixCls = _useConfigContext.getPrefixCls;
43
+ var prefixCls = getPrefixCls("basic-layout");
44
+ var _useStyle = useStyle("".concat(prefixCls, "-cw-side")),
41
45
  _useStyle2 = _slicedToArray(_useStyle, 3),
42
46
  wrapCSSVar = _useStyle2[0],
43
47
  hashId = _useStyle2[1],
@@ -116,7 +120,7 @@ function Sider(_ref) {
116
120
  width: selfCollapsed ? siderCollapsedWidth : _siderDragWidth
117
121
  }
118
122
  }), /*#__PURE__*/React.createElement(AntSider, {
119
- className: classnames(hashId, cssVarCls, "cw-side"),
123
+ className: classnames(hashId, cssVarCls, "".concat(prefixCls, "-cw-side")),
120
124
  width: canDrag ? "100%" : _siderDragWidth,
121
125
  collapsed: selfCollapsed,
122
126
  collapsedWidth: siderCollapsedWidth,
@@ -1,3 +1,7 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
3
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
4
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
1
5
  import { genStyleHooks } from "../../Antd5/theme/internal";
2
6
  var prepareComponentToken = function prepareComponentToken(token) {
3
7
  return {
@@ -8,62 +12,62 @@ var prepareComponentToken = function prepareComponentToken(token) {
8
12
  };
9
13
  };
10
14
  var genCustomSiderStyle = function genCustomSiderStyle(token) {
11
- return {
12
- ".cw-side": {
13
- fontSize: "14px",
15
+ var prefixCls = token.antCls;
16
+ var basicLayoutPrefixCls = "".concat(prefixCls, "-basic-layout");
17
+ return _defineProperty({}, "".concat(basicLayoutPrefixCls, "-cw-side"), {
18
+ fontSize: "14px",
19
+ height: "100%",
20
+ boxShadow: "none",
21
+ overflow: "auto",
22
+ overflowX: "hidden",
23
+ ".cw-side-menu-box": {
14
24
  height: "100%",
15
- boxShadow: "none",
16
- overflow: "auto",
17
- overflowX: "hidden",
18
- ".cw-side-menu-box": {
19
- height: "100%",
25
+ width: "100%",
26
+ ".cw-side-menu": {
27
+ height: "calc(100% - 40px)",
28
+ width: "100%",
29
+ overflow: "auto"
30
+ },
31
+ ".cw-sider-bottom-box": {
32
+ position: "relative",
33
+ borderTop: "1px solid transparent",
34
+ height: "40px",
20
35
  width: "100%",
21
- ".cw-side-menu": {
22
- height: "calc(100% - 40px)",
23
- width: "100%",
24
- overflow: "auto"
36
+ backgroundColor: "#fff",
37
+ display: "flex",
38
+ justifyContent: "space-between",
39
+ alignItems: "center",
40
+ padding: "0 12px",
41
+ ".cw-sider-setting": {
42
+ color: token.siderBtnColor,
43
+ "&:hover": {
44
+ color: token.siderBtnHoverColor
45
+ }
25
46
  },
26
- ".cw-sider-bottom-box": {
27
- position: "relative",
28
- borderTop: "1px solid transparent",
29
- height: "40px",
30
- width: "100%",
31
- backgroundColor: "#fff",
32
- display: "flex",
33
- justifyContent: "space-between",
34
- alignItems: "center",
35
- padding: "0 12px",
36
- ".cw-sider-setting": {
37
- color: token.siderBtnColor,
38
- "&:hover": {
39
- color: token.siderBtnHoverColor
40
- }
41
- },
42
- ".cw-sider-collapsed-btn": {
43
- background: token.collapsedBtnBg,
44
- display: "inline-block",
45
- width: "24px",
46
- height: "24px",
47
- cursor: "pointer",
48
- lineHeight: "24px",
49
- fontSize: "16px",
50
- textAlign: "center",
51
- color: token.siderBtnColor,
52
- "&:hover": {
53
- color: token.siderBtnHoverColor
54
- }
55
- },
56
- ".cw-sider-version": {
57
- fontSize: "12px",
58
- color: token.versionColor,
59
- "&:hover": {
60
- color: token.siderBtnHoverColor
61
- }
47
+ ".cw-sider-collapsed-btn": {
48
+ background: token.collapsedBtnBg,
49
+ display: "inline-block",
50
+ width: "24px",
51
+ height: "24px",
52
+ cursor: "pointer",
53
+ lineHeight: "24px",
54
+ fontSize: "16px",
55
+ textAlign: "center",
56
+ color: token.siderBtnColor,
57
+ "&:hover": {
58
+ color: token.siderBtnHoverColor
59
+ }
60
+ },
61
+ ".cw-sider-version": {
62
+ fontSize: "12px",
63
+ color: token.versionColor,
64
+ "&:hover": {
65
+ color: token.siderBtnHoverColor
62
66
  }
63
67
  }
64
68
  }
65
69
  }
66
- };
70
+ });
67
71
  };
68
72
  // ============================== Export ==============================
69
73
  export default genStyleHooks(["BasicLayout", "Sider"], function (token) {
@@ -10,8 +10,8 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
10
10
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
11
11
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
12
12
  function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
13
- function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
14
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
13
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
14
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
15
15
  import React, { forwardRef } from "react";
16
16
  import Button from "../Antd5/button";
17
17
  import PropTypes from "prop-types";
@@ -9,8 +9,8 @@ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLim
9
9
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
10
10
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
11
11
  function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
12
- function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
13
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
12
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
13
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
14
14
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
15
15
  function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
16
16
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -10,8 +10,8 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
10
10
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
11
11
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
12
12
  function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
13
- function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
14
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
13
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
14
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
15
15
  import { BaseSelect } from "rc-select-cascader";
16
16
  import useId from "rc-select-cascader/lib/hooks/useId";
17
17
  import { conductCheck } from "rc-tree-cascader/lib/utils/conductUtil";
@@ -64,9 +64,9 @@ var TabList = function TabList(props) {
64
64
  return _regeneratorRuntime().wrap(function _callee$(_context) {
65
65
  while (1) switch (_context.prev = _context.next) {
66
66
  case 0:
67
- resRequestApi = _readInnerMessageApi ? _readInnerMessageApi(params) : readInnerMessageApi(params, gatewayPrefix);
67
+ resRequestApi = _readInnerMessageApi || readInnerMessageApi;
68
68
  _context.next = 3;
69
- return resRequestApi;
69
+ return resRequestApi(params, gatewayPrefix);
70
70
  case 3:
71
71
  res = _context.sent;
72
72
  if (res.status == 'success') {
@@ -82,9 +82,9 @@ var MessageContent = function MessageContent(props) {
82
82
  return _regeneratorRuntime().wrap(function _callee$(_context) {
83
83
  while (1) switch (_context.prev = _context.next) {
84
84
  case 0:
85
- resRequestApi = _getMessageTypeApi ? _getMessageTypeApi() : getMessageTypeApi(gatewayPrefix);
85
+ resRequestApi = _getMessageTypeApi || getMessageTypeApi;
86
86
  _context.next = 3;
87
- return resRequestApi;
87
+ return resRequestApi(gatewayPrefix);
88
88
  case 3:
89
89
  res = _context.sent;
90
90
  if (res && res.status == "success") {
@@ -115,9 +115,9 @@ var MessageContent = function MessageContent(props) {
115
115
  case 0:
116
116
  setLoading(true);
117
117
  conditionsRef.current = _objectSpread(_objectSpread({}, conditionsRef.current), params);
118
- resRequestApi = _getMessageListApi ? _getMessageListApi(conditionsRef.current) : getMessageListApi(conditionsRef.current, gatewayPrefix);
118
+ resRequestApi = _getMessageListApi || getMessageListApi;
119
119
  _context2.next = 5;
120
- return resRequestApi;
120
+ return resRequestApi(conditionsRef.current, gatewayPrefix);
121
121
  case 5:
122
122
  res = _context2.sent;
123
123
  if (res && res.status == "success") {
@@ -143,9 +143,9 @@ var MessageContent = function MessageContent(props) {
143
143
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
144
144
  while (1) switch (_context3.prev = _context3.next) {
145
145
  case 0:
146
- resRequestApi = _getMessageUnreadCountApi ? _getMessageUnreadCountApi() : getMessageUnreadCountApi(gatewayPrefix);
146
+ resRequestApi = _getMessageUnreadCountApi || getMessageUnreadCountApi;
147
147
  _context3.next = 3;
148
- return resRequestApi;
148
+ return resRequestApi(gatewayPrefix);
149
149
  case 3:
150
150
  res = _context3.sent;
151
151
  if (res && res.status == "success") {