@oceanbase/ui 0.2.19 → 0.2.21

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 (100) hide show
  1. package/dist/ui.min.js +1 -1
  2. package/es/Action/Group.d.ts +1 -1
  3. package/es/Action/Group.js +50 -41
  4. package/es/Action/Item.d.ts +2 -2
  5. package/es/Action/Item.js +32 -26
  6. package/es/Action/index.d.ts +1 -2
  7. package/es/BackgroundTaskManager/RefreshMan.js +8 -3
  8. package/es/BackgroundTaskManager/index.js +8 -4
  9. package/es/BasicLayout/Header.js +193 -140
  10. package/es/BasicLayout/index.js +149 -108
  11. package/es/BatchOperationBar/index.js +46 -29
  12. package/es/Boundary/Components/Code.js +17 -10
  13. package/es/Boundary/Components/Exception.js +46 -31
  14. package/es/Boundary/Components/Function.js +17 -10
  15. package/es/ContentWithIcon/index.js +42 -26
  16. package/es/ContentWithIcon/index.less +0 -1
  17. package/es/Dialog/Anchor.d.ts +1 -1
  18. package/es/Dialog/Anchor.js +9 -6
  19. package/es/Dialog/EventProxy.d.ts +1 -1
  20. package/es/Dialog/EventProxy.js +3 -2
  21. package/es/Dialog/index.js +129 -108
  22. package/es/Dialog/index.less +3 -1
  23. package/es/DocDialog/index.d.ts +1 -1
  24. package/es/DocDialog/index.js +8 -3
  25. package/es/FullscreenBox/index.d.ts +1 -1
  26. package/es/FullscreenBox/index.js +22 -16
  27. package/es/GraphToolbar/index.js +79 -65
  28. package/es/Highlight/DiffView/DiffCells.d.ts +2 -2
  29. package/es/Highlight/DiffView/DiffCells.js +22 -15
  30. package/es/Highlight/DiffView/index.js +49 -40
  31. package/es/Highlight/HighlightCell.d.ts +1 -1
  32. package/es/Highlight/HighlightCell.js +19 -13
  33. package/es/Highlight/JsonView.d.ts +1 -2
  34. package/es/Highlight/JsonView.js +15 -13
  35. package/es/Highlight/index.d.ts +1 -1
  36. package/es/Highlight/index.js +66 -54
  37. package/es/IconFont/index.d.ts +1 -1
  38. package/es/IconFont/index.js +9 -3
  39. package/es/LocaleDropdown/index.js +38 -26
  40. package/es/Login/ActivateForm.js +63 -50
  41. package/es/Login/LoginForm.js +115 -99
  42. package/es/Login/RegisterForm.js +78 -67
  43. package/es/Login/index.js +122 -91
  44. package/es/Lottie/index.js +2 -1
  45. package/es/NavMenu/index.d.ts +2 -2
  46. package/es/NavMenu/index.js +34 -29
  47. package/es/PageContainer/ItemRender.d.ts +1 -2
  48. package/es/PageContainer/ItemRender.js +7 -3
  49. package/es/PageContainer/index.js +13 -10
  50. package/es/Password/Content.js +55 -47
  51. package/es/Password/index.js +62 -45
  52. package/es/Ranger/QuickPicker.d.ts +1 -2
  53. package/es/Ranger/QuickPicker.js +42 -31
  54. package/es/Ranger/Ranger.js +31 -27
  55. package/es/SideTip/Dragger.d.ts +1 -1
  56. package/es/SideTip/Dragger.js +5 -3
  57. package/es/SideTip/IconLoading.d.ts +1 -2
  58. package/es/SideTip/IconLoading.js +28 -20
  59. package/es/SideTip/index.js +43 -30
  60. package/es/SideTip/index.less +4 -1
  61. package/es/TagSelect/Group.d.ts +1 -1
  62. package/es/TagSelect/Group.js +16 -11
  63. package/es/TagSelect/Item.d.ts +1 -1
  64. package/es/TagSelect/Item.js +30 -23
  65. package/es/TagSelect/style/index.d.ts +1 -1
  66. package/es/TaskGraph/Graph.js +39 -31
  67. package/es/TaskGraph/index.js +68 -57
  68. package/es/TreeSearch/index.js +36 -32
  69. package/es/Welcome/index.js +113 -83
  70. package/es/Welcome/step.js +31 -23
  71. package/es/locale/LocaleWrapper.js +3 -3
  72. package/lib/Action/Group.d.ts +1 -1
  73. package/lib/Action/Item.d.ts +2 -2
  74. package/lib/Action/index.d.ts +1 -2
  75. package/lib/ContentWithIcon/index.less +0 -1
  76. package/lib/Dialog/Anchor.d.ts +1 -1
  77. package/lib/Dialog/EventProxy.d.ts +1 -1
  78. package/lib/Dialog/EventProxy.js +12 -2
  79. package/lib/Dialog/index.less +3 -1
  80. package/lib/DocDialog/index.d.ts +1 -1
  81. package/lib/FullscreenBox/index.d.ts +1 -1
  82. package/lib/FullscreenBox/index.js +76 -74
  83. package/lib/Highlight/DiffView/DiffCells.d.ts +2 -2
  84. package/lib/Highlight/DiffView/index.js +1 -1
  85. package/lib/Highlight/HighlightCell.d.ts +1 -1
  86. package/lib/Highlight/JsonView.d.ts +1 -2
  87. package/lib/Highlight/JsonView.js +3 -3
  88. package/lib/Highlight/index.d.ts +1 -1
  89. package/lib/IconFont/index.d.ts +1 -1
  90. package/lib/NavMenu/index.d.ts +2 -2
  91. package/lib/PageContainer/ItemRender.d.ts +1 -2
  92. package/lib/Ranger/QuickPicker.d.ts +1 -2
  93. package/lib/SideTip/Dragger.d.ts +1 -1
  94. package/lib/SideTip/IconLoading.d.ts +1 -2
  95. package/lib/SideTip/index.less +4 -1
  96. package/lib/TagSelect/Group.d.ts +1 -1
  97. package/lib/TagSelect/Group.js +4 -6
  98. package/lib/TagSelect/Item.d.ts +1 -1
  99. package/lib/TagSelect/style/index.d.ts +1 -1
  100. package/package.json +10 -9
@@ -5,7 +5,6 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
5
5
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
6
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
7
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
9
8
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
10
9
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
11
10
  import { SyncOutlined } from '@oceanbase/icons';
@@ -18,6 +17,8 @@ import LocaleWrapper from "../locale/LocaleWrapper";
18
17
  import ItemRender from "./ItemRender";
19
18
  import zhCN from "./locale/zh-CN";
20
19
  import useStyle from "./style";
20
+ import { jsx as _jsx } from "react/jsx-runtime";
21
+ import { jsxs as _jsxs } from "react/jsx-runtime";
21
22
  var PageContainer = function PageContainer(_ref) {
22
23
  var customizePrefixCls = _ref.prefixCls,
23
24
  className = _ref.className,
@@ -40,18 +41,20 @@ var PageContainer = function PageContainer(_ref) {
40
41
  breadcrumb = _ref2.breadcrumb;
41
42
  var reloadProps = isObject(reload) && ! /*#__PURE__*/React.isValidElement(reload) ? reload : {};
42
43
  var reloadCls = classNames("".concat(rootPrefixCls, "-page-header-heading-reload"), reloadProps.className);
43
- var newSubTitle = subTitle && /*#__PURE__*/React.createElement(Space, {
44
- size: 12
45
- }, reload && /*#__PURE__*/React.createElement(Tooltip, {
46
- title: locale.reload
47
- }, isObject(reload) && /*#__PURE__*/React.isValidElement(reload) ? reload : /*#__PURE__*/React.createElement(SyncOutlined, _extends({}, reloadProps, {
48
- className: reloadCls
49
- }))), subTitle);
44
+ var newSubTitle = subTitle && /*#__PURE__*/_jsxs(Space, {
45
+ size: 12,
46
+ children: [reload && /*#__PURE__*/_jsx(Tooltip, {
47
+ title: locale.reload,
48
+ children: isObject(reload) && /*#__PURE__*/React.isValidElement(reload) ? reload : /*#__PURE__*/_jsx(SyncOutlined, _objectSpread(_objectSpread({}, reloadProps), {}, {
49
+ className: reloadCls
50
+ }))
51
+ }), subTitle]
52
+ });
50
53
  var newHeader = header && _objectSpread(_objectSpread({}, header), {}, {
51
54
  subTitle: newSubTitle,
52
55
  breadcrumb: breadcrumb && _objectSpread({
53
56
  itemRender: function itemRender(route, params, routes, paths) {
54
- return /*#__PURE__*/React.createElement(ItemRender, {
57
+ return /*#__PURE__*/_jsx(ItemRender, {
55
58
  route: route,
56
59
  params: params,
57
60
  routes: routes,
@@ -64,7 +67,7 @@ var PageContainer = function PageContainer(_ref) {
64
67
  return !(newHeader !== null && newHeader !== void 0 && newHeader[item]);
65
68
  }) && !content && !extraContent && !tabList && !tabBarExtraContent;
66
69
  var pageContainerCls = classNames(_defineProperty({}, "".concat(prefixCls, "-no-page-header"), noHasHeader), className);
67
- return wrapSSR( /*#__PURE__*/React.createElement(AntPageContainer, _extends({
70
+ return wrapSSR( /*#__PURE__*/_jsx(AntPageContainer, _objectSpread({
68
71
  prefixCls: customizePrefixCls,
69
72
  className: pageContainerCls,
70
73
  header: newHeader,
@@ -2,6 +2,8 @@ import { CheckCircleFilled, CloseCircleFilled, LoadingOutlined } from '@oceanbas
2
2
  import { Progress, Space } from '@oceanbase/design';
3
3
  import React from 'react';
4
4
  import { token } from '@oceanbase/design';
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ import { jsxs as _jsxs } from "react/jsx-runtime";
5
7
  var Content = function Content(_ref) {
6
8
  var rules = _ref.rules,
7
9
  fieldError = _ref.fieldError,
@@ -9,32 +11,33 @@ var Content = function Content(_ref) {
9
11
  value = _ref.value,
10
12
  isTouched = _ref.isTouched;
11
13
  var statusIconMap = {
12
- error: /*#__PURE__*/React.createElement(CloseCircleFilled, {
14
+ error: /*#__PURE__*/_jsx(CloseCircleFilled, {
13
15
  style: {
14
16
  color: token.colorError
15
17
  }
16
18
  }),
17
- success: /*#__PURE__*/React.createElement(CheckCircleFilled, {
19
+ success: /*#__PURE__*/_jsx(CheckCircleFilled, {
18
20
  style: {
19
21
  color: token.colorSuccess
20
22
  }
21
23
  }),
22
- wait: /*#__PURE__*/React.createElement("div", {
24
+ wait: /*#__PURE__*/_jsx("div", {
23
25
  style: {
24
26
  display: 'flex',
25
27
  alignItems: 'center',
26
28
  justifyContent: 'center',
27
29
  width: 14,
28
30
  height: 22
29
- }
30
- }, /*#__PURE__*/React.createElement("div", {
31
- style: {
32
- width: 6,
33
- height: 6,
34
- backgroundColor: token.colorTextTertiary,
35
- borderRadius: 4
36
- }
37
- }))
31
+ },
32
+ children: /*#__PURE__*/_jsx("div", {
33
+ style: {
34
+ width: 6,
35
+ height: 6,
36
+ backgroundColor: token.colorTextTertiary,
37
+ borderRadius: 4
38
+ }
39
+ })
40
+ })
38
41
  };
39
42
  var isRequireFail = rules.filter(function (rule) {
40
43
  return !rule.optional;
@@ -52,41 +55,46 @@ var Content = function Content(_ref) {
52
55
  } else {
53
56
  strokeColor = token.colorSuccess;
54
57
  }
55
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Progress, {
56
- percent: value ? percent : 0,
57
- strokeColor: strokeColor,
58
- showInfo: false,
59
- size: "small"
60
- }), /*#__PURE__*/React.createElement("ul", {
61
- style: {
62
- margin: 0,
63
- marginTop: '10px',
64
- listStyle: 'none',
65
- padding: '0'
66
- }
67
- }, rules === null || rules === void 0 ? void 0 : rules.map(function (rule, index) {
68
- var isError = fieldError.includes(rule.message);
69
- var status = 'wait';
70
- if (isError) {
71
- status = rule.optional ? 'wait' : 'error';
72
- } else {
73
- status = 'success';
74
- }
75
- if (!value) {
76
- status = 'error';
77
- }
78
- if (!isTouched) {
79
- status = 'wait';
80
- }
81
- return /*#__PURE__*/React.createElement("li", {
82
- key: index
83
- }, /*#__PURE__*/React.createElement(Space, {
84
- align: "start"
85
- }, isValidating ? /*#__PURE__*/React.createElement(LoadingOutlined, null) : statusIconMap[status], /*#__PURE__*/React.createElement("span", {
58
+ return /*#__PURE__*/_jsxs("div", {
59
+ children: [/*#__PURE__*/_jsx(Progress, {
60
+ percent: value ? percent : 0,
61
+ strokeColor: strokeColor,
62
+ showInfo: false,
63
+ size: "small"
64
+ }), /*#__PURE__*/_jsx("ul", {
86
65
  style: {
87
- color: token.colorTextSecondary
88
- }
89
- }, rule.message)));
90
- })));
66
+ margin: 0,
67
+ marginTop: '10px',
68
+ listStyle: 'none',
69
+ padding: '0'
70
+ },
71
+ children: rules === null || rules === void 0 ? void 0 : rules.map(function (rule, index) {
72
+ var isError = fieldError.includes(rule.message);
73
+ var status = 'wait';
74
+ if (isError) {
75
+ status = rule.optional ? 'wait' : 'error';
76
+ } else {
77
+ status = 'success';
78
+ }
79
+ if (!value) {
80
+ status = 'error';
81
+ }
82
+ if (!isTouched) {
83
+ status = 'wait';
84
+ }
85
+ return /*#__PURE__*/_jsx("li", {
86
+ children: /*#__PURE__*/_jsxs(Space, {
87
+ align: "start",
88
+ children: [isValidating ? /*#__PURE__*/_jsx(LoadingOutlined, {}) : statusIconMap[status], /*#__PURE__*/_jsx("span", {
89
+ style: {
90
+ color: token.colorTextSecondary
91
+ },
92
+ children: rule.message
93
+ })]
94
+ })
95
+ }, index);
96
+ })
97
+ })]
98
+ });
91
99
  };
92
100
  export default Content;
@@ -1,5 +1,10 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
1
2
  var _excluded = ["value", "locale", "rules", "onChange", "onValidate", "generatePasswordRegex"];
2
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
5
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
3
8
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
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."); }
5
10
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
@@ -16,6 +21,9 @@ import CopyToClipboard from 'react-copy-to-clipboard';
16
21
  import LocaleWrapper from "../locale/LocaleWrapper";
17
22
  import Content from "./Content";
18
23
  import zhCN from "./locale/zh-CN";
24
+ import { jsx as _jsx } from "react/jsx-runtime";
25
+ import { jsxs as _jsxs } from "react/jsx-runtime";
26
+ import { Fragment as _Fragment } from "react/jsx-runtime";
19
27
  var Password = function Password(_ref) {
20
28
  var value = _ref.value,
21
29
  locale = _ref.locale,
@@ -86,50 +94,59 @@ var Password = function Password(_ref) {
86
94
  }
87
95
  return getRandomPassword();
88
96
  };
89
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
90
- style: {
91
- display: 'flex'
92
- }
93
- }, /*#__PURE__*/React.createElement(Popover, {
94
- trigger: "click",
95
- placement: "right",
96
- content: /*#__PURE__*/React.createElement(Content, {
97
- isTouched: isTouched,
98
- value: value,
99
- isValidating: isValidating,
100
- rules: newRules,
101
- fieldError: fieldError
102
- }),
103
- overlayStyle: {
104
- maxWidth: 400
105
- }
106
- }, /*#__PURE__*/React.createElement(Input.Password, _extends({
107
- value: value,
108
- autoComplete: "new-password",
109
- onChange: function onChange(e) {
110
- var _e$target;
111
- handleChange(e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value);
112
- },
113
- placeholder: generatePasswordRegex ? locale.generatePlaceholder : locale.placeholder
114
- }, restProps))), generatePasswordRegex && /*#__PURE__*/React.createElement(Button, {
115
- onClick: function onClick() {
116
- handleChange(getRandomPassword());
117
- },
118
- style: {
119
- marginLeft: 8
120
- }
121
- }, locale.randomlyGenerate)), value && (fieldError === null || fieldError === void 0 ? void 0 : fieldError.length) === 0 && /*#__PURE__*/React.createElement("div", {
122
- style: {
123
- fontSize: 14,
124
- color: token.colorTextTertiary,
125
- lineHeight: '22px'
126
- }
127
- }, locale.pleaseKeepYourPasswordIn, /*#__PURE__*/React.createElement(CopyToClipboard, {
128
- text: value,
129
- onCopy: function onCopy() {
130
- message.success(locale.copySuccessfully);
131
- }
132
- }, /*#__PURE__*/React.createElement("a", null, locale.copyPassword)), locale.andKeepItProperly));
97
+ return /*#__PURE__*/_jsxs(_Fragment, {
98
+ children: [/*#__PURE__*/_jsxs("div", {
99
+ style: {
100
+ display: 'flex'
101
+ },
102
+ children: [/*#__PURE__*/_jsx(Popover, {
103
+ trigger: "click",
104
+ placement: "right",
105
+ content: /*#__PURE__*/_jsx(Content, {
106
+ isTouched: isTouched,
107
+ value: value,
108
+ isValidating: isValidating,
109
+ rules: newRules,
110
+ fieldError: fieldError
111
+ }),
112
+ overlayStyle: {
113
+ maxWidth: 400
114
+ },
115
+ children: /*#__PURE__*/_jsx(Input.Password, _objectSpread({
116
+ value: value,
117
+ autoComplete: "new-password",
118
+ onChange: function onChange(e) {
119
+ var _e$target;
120
+ handleChange(e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value);
121
+ },
122
+ placeholder: generatePasswordRegex ? locale.generatePlaceholder : locale.placeholder
123
+ }, restProps))
124
+ }), generatePasswordRegex && /*#__PURE__*/_jsx(Button, {
125
+ onClick: function onClick() {
126
+ handleChange(getRandomPassword());
127
+ },
128
+ style: {
129
+ marginLeft: 8
130
+ },
131
+ children: locale.randomlyGenerate
132
+ })]
133
+ }), value && (fieldError === null || fieldError === void 0 ? void 0 : fieldError.length) === 0 && /*#__PURE__*/_jsxs("div", {
134
+ style: {
135
+ fontSize: 14,
136
+ color: token.colorTextTertiary,
137
+ lineHeight: '22px'
138
+ },
139
+ children: [locale.pleaseKeepYourPasswordIn, /*#__PURE__*/_jsx(CopyToClipboard, {
140
+ text: value,
141
+ onCopy: function onCopy() {
142
+ message.success(locale.copySuccessfully);
143
+ },
144
+ children: /*#__PURE__*/_jsx("a", {
145
+ children: locale.copyPassword
146
+ })
147
+ }), locale.andKeepItProperly]
148
+ })]
149
+ });
133
150
  };
134
151
  export default LocaleWrapper({
135
152
  componentName: 'Password',
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import type { LocaleWrapperProps } from '../locale/LocaleWrapper';
3
2
  import type { RangeValue } from './Ranger';
4
3
  import type { RangeOption } from './typing';
@@ -14,5 +13,5 @@ interface IProps extends LocaleWrapperProps {
14
13
  isMoment?: boolean;
15
14
  size?: 'small' | 'large' | 'middle';
16
15
  }
17
- declare const _default: (props: IProps) => React.JSX.Element;
16
+ declare const _default: (props: IProps) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
18
17
  export default _default;
@@ -1,5 +1,10 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
1
2
  var _excluded = ["type", "name", "defaultName", "selects", "onChange", "onNameChange", "isMoment"];
2
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
5
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
3
8
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
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."); }
5
10
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
@@ -17,6 +22,8 @@ import moment from 'moment';
17
22
  import React, { useEffect, useState } from 'react';
18
23
  import { getPrefix } from "../_util";
19
24
  import { CUSTOMIZE } from "./constant";
25
+ import { jsx as _jsx } from "react/jsx-runtime";
26
+ import { jsxs as _jsxs } from "react/jsx-runtime";
20
27
  var prefix = getPrefix('ranger-quick-picker');
21
28
  var RangeDropdown = function RangeDropdown(_ref) {
22
29
  var selects = _ref.selects,
@@ -25,31 +32,34 @@ var RangeDropdown = function RangeDropdown(_ref) {
25
32
  customable = _ref.customable,
26
33
  _ref$locale = _ref.locale,
27
34
  locale = _ref$locale === void 0 ? {} : _ref$locale;
28
- var menu = /*#__PURE__*/React.createElement(Menu, {
35
+ var menu = /*#__PURE__*/_jsxs(Menu, {
29
36
  onClick: function onClick(e) {
30
37
  onChange(e.key);
31
38
  },
32
39
  style: {
33
40
  minWidth: 120
34
- }
35
- }, selects.map(function (item) {
36
- return /*#__PURE__*/React.createElement(Menu.Item, {
37
- key: item.name
38
- }, locale[item.name] || item.name);
39
- }), customable && /*#__PURE__*/React.createElement(Menu.Item, {
40
- key: CUSTOMIZE
41
- }, locale.customize));
41
+ },
42
+ children: [selects.map(function (item) {
43
+ return /*#__PURE__*/_jsx(Menu.Item, {
44
+ children: locale[item.name] || item.name
45
+ }, item.name);
46
+ }), customable && /*#__PURE__*/_jsx(Menu.Item, {
47
+ children: locale.customize
48
+ }, CUSTOMIZE)]
49
+ });
42
50
  var match = selects.find(function (item) {
43
51
  return item.name === value;
44
52
  });
45
- return /*#__PURE__*/React.createElement(Dropdown, {
46
- overlay: menu
47
- }, /*#__PURE__*/React.createElement(Space, {
48
- style: {
49
- cursor: 'pointer'
50
- },
51
- className: classnames(prefix, "".concat(prefix, "-dropdown"))
52
- }, /*#__PURE__*/React.createElement(ClockCircleOutlined, null), locale[match === null || match === void 0 ? void 0 : match.name] || (match === null || match === void 0 ? void 0 : match.name), /*#__PURE__*/React.createElement(DownOutlined, null)));
53
+ return /*#__PURE__*/_jsx(Dropdown, {
54
+ overlay: menu,
55
+ children: /*#__PURE__*/_jsxs(Space, {
56
+ style: {
57
+ cursor: 'pointer'
58
+ },
59
+ className: classnames(prefix, "".concat(prefix, "-dropdown")),
60
+ children: [/*#__PURE__*/_jsx(ClockCircleOutlined, {}), locale[match === null || match === void 0 ? void 0 : match.name] || (match === null || match === void 0 ? void 0 : match.name), /*#__PURE__*/_jsx(DownOutlined, {})]
61
+ })
62
+ });
53
63
  };
54
64
  var RangeSelect = function RangeSelect(_ref2) {
55
65
  var selects = _ref2.selects,
@@ -62,23 +72,24 @@ var RangeSelect = function RangeSelect(_ref2) {
62
72
  var handleChange = function handleChange(nextValue) {
63
73
  onChange(nextValue);
64
74
  };
65
- return /*#__PURE__*/React.createElement(Select, {
75
+ return /*#__PURE__*/_jsxs(Select, {
66
76
  className: classnames(prefix, "".concat(prefix, "-select")),
67
77
  style: {
68
78
  minWidth: 120
69
79
  },
70
80
  onSelect: handleChange,
71
81
  value: value,
72
- size: size
73
- }, selects.map(function (item) {
74
- return /*#__PURE__*/React.createElement(Select.Option, {
75
- key: item.name,
76
- value: item.name
77
- }, locale[item.name] || item.name);
78
- }), customable && /*#__PURE__*/React.createElement(Select.Option, {
79
- key: CUSTOMIZE,
80
- value: CUSTOMIZE
81
- }, locale.customize));
82
+ size: size,
83
+ children: [selects.map(function (item) {
84
+ return /*#__PURE__*/_jsx(Select.Option, {
85
+ value: item.name,
86
+ children: locale[item.name] || item.name
87
+ }, item.name);
88
+ }), customable && /*#__PURE__*/_jsx(Select.Option, {
89
+ value: CUSTOMIZE,
90
+ children: locale.customize
91
+ }, CUSTOMIZE)]
92
+ });
82
93
  };
83
94
  export default (function (props) {
84
95
  var _ref3, _selects$;
@@ -111,11 +122,11 @@ export default (function (props) {
111
122
  }
112
123
  onNameChange(value);
113
124
  };
114
- return type === 'select' ? /*#__PURE__*/React.createElement(RangeSelect, _extends({
125
+ return type === 'select' ? /*#__PURE__*/_jsx(RangeSelect, _objectSpread({
115
126
  value: innerName,
116
127
  selects: selects,
117
128
  onChange: handleChange
118
- }, rest)) : /*#__PURE__*/React.createElement(RangeDropdown, _extends({
129
+ }, rest)) : /*#__PURE__*/_jsx(RangeDropdown, _objectSpread({
119
130
  value: innerName,
120
131
  selects: selects,
121
132
  onChange: handleChange
@@ -1,6 +1,7 @@
1
1
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
2
  var _excluded = ["selects", "value", "defaultValue", "defaultQuickValue", "mode", "quickType", "pastOnly", "onChange", "disabledDate", "locale", "size", "stickRangeName"];
3
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
5
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
6
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
7
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
@@ -24,6 +25,8 @@ import { CUSTOMIZE, DATE_TIME_FORMAT, NEAR_1_HOURS, NEAR_1_MINUTES, NEAR_30_MINU
24
25
  import "./index.less";
25
26
  import zhCN from "./locale/zh-CN";
26
27
  import QuickPicker from "./QuickPicker";
28
+ import { jsx as _jsx } from "react/jsx-runtime";
29
+ import { jsxs as _jsxs } from "react/jsx-runtime";
27
30
  var prefix = getPrefix('ranger');
28
31
  var Ranger = function Ranger(props) {
29
32
  var _selects$;
@@ -111,34 +114,35 @@ var Ranger = function Ranger(props) {
111
114
  var showRange = mode === 'default' || rangeName === CUSTOMIZE;
112
115
  // 没有 selects 时,回退到普通 RangePicker
113
116
  var showQuickPicker = selects.length !== 0;
114
- return /*#__PURE__*/React.createElement(Space, {
117
+ return /*#__PURE__*/_jsxs(Space, {
115
118
  size: 0,
116
119
  className: classNames(_defineProperty({}, "".concat(prefix, "-show-range"), showRange), prefix),
117
- style: rest.style
118
- }, showQuickPicker && /*#__PURE__*/React.createElement(QuickPicker, {
119
- customable: true,
120
- type: internalQuickType,
121
- onChange: rangeChange,
122
- onNameChange: handleNameChange,
123
- selects: selects,
124
- name: rangeName,
125
- locale: locale,
126
- isMoment: isMoment,
127
- size: size
128
- }), showRange &&
129
- /*#__PURE__*/
130
- // @ts-ignore
131
- React.createElement(DatePicker.RangePicker, _extends({
132
- disabledDate: pastOnly ? disabledFuture : disabledDate,
133
- format: DATE_TIME_FORMAT,
134
- defaultValue: defaultValue,
135
- value: innerValue || defaultInternalValue,
136
- onChange: datePickerChange,
137
- showTime: true,
138
- className: "".concat(prefix, "-range-picker"),
139
- size: size
140
- // 透传 props 到 antd Ranger
141
- }, omit(rest, 'value', 'onChange'))));
120
+ style: rest.style,
121
+ children: [showQuickPicker && /*#__PURE__*/_jsx(QuickPicker, {
122
+ customable: true,
123
+ type: internalQuickType,
124
+ onChange: rangeChange,
125
+ onNameChange: handleNameChange,
126
+ selects: selects,
127
+ name: rangeName,
128
+ locale: locale,
129
+ isMoment: isMoment,
130
+ size: size
131
+ }), showRange &&
132
+ /*#__PURE__*/
133
+ // @ts-ignore
134
+ _jsx(DatePicker.RangePicker, _objectSpread({
135
+ disabledDate: pastOnly ? disabledFuture : disabledDate,
136
+ format: DATE_TIME_FORMAT,
137
+ defaultValue: defaultValue,
138
+ value: innerValue || defaultInternalValue,
139
+ onChange: datePickerChange,
140
+ showTime: true,
141
+ className: "".concat(prefix, "-range-picker"),
142
+ size: size
143
+ // 透传 props 到 antd Ranger
144
+ }, omit(rest, 'value', 'onChange')))]
145
+ });
142
146
  };
143
147
  export default LocaleWrapper({
144
148
  componentName: 'Ranger',
@@ -40,6 +40,6 @@ declare class Draggable extends React.Component<DraggableProps, DraggableState>
40
40
  handleMouseDown: (e: any) => void;
41
41
  handleMouseMove: (e: any) => void;
42
42
  handleMouseUp: (e: any) => void;
43
- render(): React.JSX.Element;
43
+ render(): import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
44
44
  }
45
45
  export default Draggable;
@@ -20,6 +20,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
20
20
  import classnames from 'classnames';
21
21
  import React from 'react';
22
22
  import { getClientHeight, getClientWidth, getScrollBarSize, getScrollOffsets, isFixedElem } from "./utils";
23
+ import { jsx as _jsx } from "react/jsx-runtime";
23
24
  var INIT_RIGHT = 32;
24
25
  var INIT_BOTTOM = 32;
25
26
  var Draggable = /*#__PURE__*/function (_React$Component) {
@@ -275,7 +276,7 @@ var Draggable = /*#__PURE__*/function (_React$Component) {
275
276
  }, style);
276
277
  var containerPrefix = "".concat(prefix, "-container");
277
278
  var containerClassName = classnames(containerPrefix, className, (_classnames = {}, _defineProperty(_classnames, "".concat(containerPrefix, "-dragged"), dragged), _defineProperty(_classnames, "".concat(containerPrefix, "-hide"), hide), _defineProperty(_classnames, "".concat(containerPrefix, "-hide-not-dragged"), hide && !dragged), _classnames));
278
- return /*#__PURE__*/React.createElement("div", {
279
+ return /*#__PURE__*/_jsx("div", {
279
280
  id: id,
280
281
  ref: this.nodeRef,
281
282
  onMouseDown: this.handleMouseDown,
@@ -284,8 +285,9 @@ var Draggable = /*#__PURE__*/function (_React$Component) {
284
285
  style: hide ? _objectSpread(_objectSpread({}, containerStyle), {}, {
285
286
  right: -width / 1.5
286
287
  }) : containerStyle,
287
- className: containerClassName
288
- }, children);
288
+ className: containerClassName,
289
+ children: children
290
+ });
289
291
  }
290
292
  }]);
291
293
  return Draggable;
@@ -1,3 +1,2 @@
1
- import React from 'react';
2
- declare const iconLoading: (props: any) => React.JSX.Element;
1
+ declare const iconLoading: (props: any) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
3
2
  export default iconLoading;