@oceanbase/ui 0.4.19 → 0.4.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.
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +1 -1
- package/es/Action/Group.js +121 -15
- package/es/Action/style/index.js +8 -4
- package/es/BasicLayout/locale/ja-JP.d.ts +13 -0
- package/es/BasicLayout/locale/ja-JP.js +12 -0
- package/es/BatchOperationBar/locale/ja-JP.d.ts +7 -0
- package/es/BatchOperationBar/locale/ja-JP.js +6 -0
- package/es/Boundary/locale/ja-JP.d.ts +11 -0
- package/es/Boundary/locale/ja-JP.js +10 -0
- package/es/DateRanger/Ranger.d.ts +4 -0
- package/es/DateRanger/Ranger.js +158 -14
- package/es/DateRanger/constant/index.js +1 -1
- package/es/DateRanger/index.less +23 -0
- package/es/DateRanger/locale/ja-JP.d.ts +56 -0
- package/es/DateRanger/locale/ja-JP.js +20 -0
- package/es/Dialog/locale/ja-JP.d.ts +5 -0
- package/es/Dialog/locale/ja-JP.js +4 -0
- package/es/DocDialog/locale/ja-JP.d.ts +2 -0
- package/es/DocDialog/locale/ja-JP.js +1 -0
- package/es/FullscreenBox/locale/ja-JP.d.ts +2 -0
- package/es/FullscreenBox/locale/ja-JP.js +1 -0
- package/es/GraphToolbar/locale/ja-JP.d.ts +9 -0
- package/es/GraphToolbar/locale/ja-JP.js +8 -0
- package/es/Highlight/locale/ja-JP.d.ts +4 -0
- package/es/Highlight/locale/ja-JP.js +3 -0
- package/es/Login/locale/ja-JP.d.ts +28 -0
- package/es/Login/locale/ja-JP.js +27 -0
- package/es/PageContainer/locale/ja-JP.d.ts +4 -0
- package/es/PageContainer/locale/ja-JP.js +3 -0
- package/es/Password/locale/ja-JP.d.ts +13 -0
- package/es/Password/locale/ja-JP.js +12 -0
- package/es/ProTable/index.js +4 -1
- package/es/Ranger/locale/ja-JP.d.ts +28 -0
- package/es/Ranger/locale/ja-JP.js +29 -0
- package/es/SideTip/locale/ja-JP.d.ts +2 -0
- package/es/SideTip/locale/ja-JP.js +1 -0
- package/es/TaskGraph/locale/ja-JP.d.ts +13 -0
- package/es/TaskGraph/locale/ja-JP.js +12 -0
- package/es/Welcome/locale/ja-JP.d.ts +5 -0
- package/es/Welcome/locale/ja-JP.js +4 -0
- package/es/locale/ja-JP.d.ts +3 -0
- package/es/locale/ja-JP.js +42 -0
- package/lib/Action/Group.js +122 -46
- package/lib/Action/Item.js +14 -9
- package/lib/Action/style/index.js +16 -1
- package/lib/BackgroundTaskManager/RefreshMan.js +3 -12
- package/lib/BackgroundTaskManager/index.js +3 -12
- package/lib/BasicLayout/Header.js +120 -62
- package/lib/BasicLayout/index.js +166 -143
- package/lib/BasicLayout/locale/ja-JP.d.ts +13 -0
- package/lib/BasicLayout/locale/ja-JP.js +36 -0
- package/lib/BatchOperationBar/index.js +59 -44
- package/lib/BatchOperationBar/locale/ja-JP.d.ts +7 -0
- package/lib/BatchOperationBar/locale/ja-JP.js +30 -0
- package/lib/Boundary/Components/Code.js +11 -5
- package/lib/Boundary/Components/Exception.js +33 -23
- package/lib/Boundary/Components/Function.js +11 -5
- package/lib/Boundary/locale/ja-JP.d.ts +11 -0
- package/lib/Boundary/locale/ja-JP.js +34 -0
- package/lib/ContentWithIcon/index.js +30 -22
- package/lib/ContentWithQuestion/index.js +8 -3
- package/lib/DateRanger/PickerPanel.js +235 -217
- package/lib/DateRanger/Ranger.d.ts +4 -0
- package/lib/DateRanger/Ranger.js +396 -227
- package/lib/DateRanger/constant/index.js +1 -1
- package/lib/DateRanger/index.less +23 -0
- package/lib/DateRanger/locale/ja-JP.d.ts +56 -0
- package/lib/DateRanger/locale/ja-JP.js +49 -0
- package/lib/Dialog/Anchor.js +8 -5
- package/lib/Dialog/EventProxy.js +3 -12
- package/lib/Dialog/index.js +132 -108
- package/lib/Dialog/locale/ja-JP.d.ts +5 -0
- package/lib/Dialog/locale/ja-JP.js +28 -0
- package/lib/DocDialog/index.js +3 -2
- package/lib/DocDialog/locale/ja-JP.d.ts +2 -0
- package/lib/DocDialog/locale/ja-JP.js +25 -0
- package/lib/FooterToolbar/index.js +3 -2
- package/lib/FullscreenBox/index.js +16 -7
- package/lib/FullscreenBox/locale/ja-JP.d.ts +2 -0
- package/lib/FullscreenBox/locale/ja-JP.js +25 -0
- package/lib/GraphToolbar/index.js +70 -58
- package/lib/GraphToolbar/locale/ja-JP.d.ts +9 -0
- package/lib/GraphToolbar/locale/ja-JP.js +32 -0
- package/lib/Highlight/DiffView/DiffCells.js +17 -10
- package/lib/Highlight/DiffView/index.js +35 -31
- package/lib/Highlight/HighlightCell.js +13 -10
- package/lib/Highlight/JsonView.js +15 -14
- package/lib/Highlight/index.js +50 -45
- package/lib/Highlight/locale/ja-JP.d.ts +4 -0
- package/lib/Highlight/locale/ja-JP.js +27 -0
- package/lib/IconFont/index.js +2 -12
- package/lib/LightFilter/index.js +3 -2
- package/lib/LocaleDropdown/index.js +13 -20
- package/lib/Login/ActivateForm.js +53 -60
- package/lib/Login/LoginForm.js +118 -109
- package/lib/Login/RegisterForm.js +79 -86
- package/lib/Login/index.js +92 -64
- package/lib/Login/locale/ja-JP.d.ts +28 -0
- package/lib/Login/locale/ja-JP.js +51 -0
- package/lib/NavMenu/index.js +9 -8
- package/lib/PageContainer/ItemRender.js +5 -5
- package/lib/PageContainer/index.js +8 -4
- package/lib/PageContainer/locale/ja-JP.d.ts +4 -0
- package/lib/PageContainer/locale/ja-JP.js +27 -0
- package/lib/PageLoading/index.js +6 -16
- package/lib/Password/Content.js +38 -42
- package/lib/Password/index.js +83 -68
- package/lib/Password/locale/ja-JP.d.ts +13 -0
- package/lib/Password/locale/ja-JP.js +36 -0
- package/lib/ProCard/index.js +4 -3
- package/lib/ProTable/index.js +10 -5
- package/lib/Ranger/QuickPicker.js +24 -15
- package/lib/Ranger/Ranger.js +37 -34
- package/lib/Ranger/locale/ja-JP.d.ts +28 -0
- package/lib/Ranger/locale/ja-JP.js +53 -0
- package/lib/SideTip/Dragger.js +5 -4
- package/lib/SideTip/IconLoading.js +25 -25
- package/lib/SideTip/index.js +19 -10
- package/lib/SideTip/locale/ja-JP.d.ts +2 -0
- package/lib/SideTip/locale/ja-JP.js +25 -0
- package/lib/TagSelect/Group.js +9 -5
- package/lib/TagSelect/Item.js +22 -18
- package/lib/TaskGraph/Graph.js +29 -24
- package/lib/TaskGraph/index.js +56 -50
- package/lib/TaskGraph/locale/ja-JP.d.ts +13 -0
- package/lib/TaskGraph/locale/ja-JP.js +36 -0
- package/lib/TreeSearch/index.js +30 -35
- package/lib/Welcome/index.js +64 -37
- package/lib/Welcome/locale/ja-JP.d.ts +5 -0
- package/lib/Welcome/locale/ja-JP.js +28 -0
- package/lib/Welcome/step.js +11 -4
- package/lib/locale/LocaleWrapper.js +15 -14
- package/lib/locale/ja-JP.d.ts +3 -0
- package/lib/locale/ja-JP.js +71 -0
- package/package.json +5 -5
package/es/Action/Group.js
CHANGED
|
@@ -10,8 +10,8 @@ import { EllipsisOutlined, LoadingOutlined } from '@oceanbase/icons';
|
|
|
10
10
|
import { isBoolean, max, omit } from 'lodash';
|
|
11
11
|
import useStyle from "./style";
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
13
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
14
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
15
|
var getOrder = function getOrder(_ref) {
|
|
16
16
|
var type = _ref.type,
|
|
17
17
|
fixed = _ref.fixed;
|
|
@@ -29,6 +29,97 @@ var getOrder = function getOrder(_ref) {
|
|
|
29
29
|
}
|
|
30
30
|
return order;
|
|
31
31
|
};
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* 递归查找 Action 组件(可能被 Popconfirm/Tooltip 等组件包裹)
|
|
35
|
+
* 返回实际的 Action 组件和其 props
|
|
36
|
+
*/
|
|
37
|
+
var findActionComponent = function findActionComponent(element) {
|
|
38
|
+
var _element$type, _element$type2, _element$props;
|
|
39
|
+
var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
40
|
+
if (! /*#__PURE__*/React.isValidElement(element)) {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// 检查是否是 Action.Button 或 Action.Link
|
|
45
|
+
// @ts-ignore
|
|
46
|
+
if (((_element$type = element.type) === null || _element$type === void 0 ? void 0 : _element$type.__DISPLAY_NAME) === 'button' || ((_element$type2 = element.type) === null || _element$type2 === void 0 ? void 0 : _element$type2.__DISPLAY_NAME) === 'link') {
|
|
47
|
+
return {
|
|
48
|
+
action: element,
|
|
49
|
+
wrapper: null
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// 如果深度太深,避免无限递归
|
|
54
|
+
if (depth > 10) {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// 如果有 children,递归查找
|
|
59
|
+
var elementChildren = (_element$props = element.props) === null || _element$props === void 0 ? void 0 : _element$props.children;
|
|
60
|
+
if (elementChildren) {
|
|
61
|
+
var child = React.Children.only(elementChildren);
|
|
62
|
+
if ( /*#__PURE__*/React.isValidElement(child)) {
|
|
63
|
+
var result = findActionComponent(child, depth + 1);
|
|
64
|
+
if (result) {
|
|
65
|
+
// 如果找到了 Action 组件,当前元素就是 wrapper
|
|
66
|
+
return {
|
|
67
|
+
action: result.action,
|
|
68
|
+
wrapper: element
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return null;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* 渲染菜单项内容,保持嵌套的 Popconfirm/Tooltip 结构
|
|
78
|
+
*/
|
|
79
|
+
var renderMenuItemContent = function renderMenuItemContent(action, actionProps, enableLoading) {
|
|
80
|
+
var loading = actionProps.loading,
|
|
81
|
+
children = actionProps.children,
|
|
82
|
+
tooltip = actionProps.tooltip;
|
|
83
|
+
var result = findActionComponent(action);
|
|
84
|
+
if (!result) {
|
|
85
|
+
// 如果没有找到嵌套结构,使用默认渲染
|
|
86
|
+
var _content = /*#__PURE__*/_jsxs(_Fragment, {
|
|
87
|
+
children: [loading && enableLoading && /*#__PURE__*/_jsx(LoadingOutlined, {}), " ", children || action]
|
|
88
|
+
});
|
|
89
|
+
// 如果有 tooltip,用 Tooltip 包裹
|
|
90
|
+
return tooltip ? /*#__PURE__*/_jsx(Tooltip, {
|
|
91
|
+
title: tooltip,
|
|
92
|
+
children: _content
|
|
93
|
+
}) : _content;
|
|
94
|
+
}
|
|
95
|
+
var actualAction = result.action,
|
|
96
|
+
wrapper = result.wrapper;
|
|
97
|
+
|
|
98
|
+
// 创建新的 action 元素,保留所有 props 并添加 loading 状态
|
|
99
|
+
var newAction = /*#__PURE__*/React.cloneElement(actualAction, _objectSpread(_objectSpread(_objectSpread({}, actualAction.props), actionProps), {}, {
|
|
100
|
+
children: /*#__PURE__*/_jsxs(_Fragment, {
|
|
101
|
+
children: [loading && enableLoading && /*#__PURE__*/_jsx(LoadingOutlined, {}), " ", children || actualAction.props.children]
|
|
102
|
+
})
|
|
103
|
+
}));
|
|
104
|
+
|
|
105
|
+
// 如果 action 被包裹,需要重新构建包裹结构
|
|
106
|
+
if (wrapper) {
|
|
107
|
+
var wrapperProps = wrapper.props;
|
|
108
|
+
// 保持原有的 wrapper 结构,只更新 children
|
|
109
|
+
return /*#__PURE__*/React.cloneElement(wrapper, _objectSpread(_objectSpread({}, wrapperProps), {}, {
|
|
110
|
+
children: newAction
|
|
111
|
+
}));
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// 如果没有包裹,直接渲染,如果有 tooltip 则用 Tooltip 包裹
|
|
115
|
+
var content = /*#__PURE__*/_jsxs(_Fragment, {
|
|
116
|
+
children: [loading && enableLoading && /*#__PURE__*/_jsx(LoadingOutlined, {}), " ", children || actualAction.props.children]
|
|
117
|
+
});
|
|
118
|
+
return tooltip ? /*#__PURE__*/_jsx(Tooltip, {
|
|
119
|
+
title: tooltip,
|
|
120
|
+
children: content
|
|
121
|
+
}) : content;
|
|
122
|
+
};
|
|
32
123
|
export default (function (_ref2) {
|
|
33
124
|
var customizePrefixCls = _ref2.prefixCls,
|
|
34
125
|
_ref2$size = _ref2.size,
|
|
@@ -121,25 +212,40 @@ export default (function (_ref2) {
|
|
|
121
212
|
children: ellipsisActions.map(function (action, index) {
|
|
122
213
|
var _ref3;
|
|
123
214
|
var actionKey = action.key;
|
|
124
|
-
|
|
125
|
-
|
|
215
|
+
// 查找实际的 Action 组件以获取 props
|
|
216
|
+
var actionResult = findActionComponent(action);
|
|
217
|
+
var actualAction = (actionResult === null || actionResult === void 0 ? void 0 : actionResult.action) || action;
|
|
218
|
+
var actionProps = actualAction.props;
|
|
219
|
+
|
|
126
220
|
// 当用户传入loading 或者 传入 disabled 的情况都要禁用按钮
|
|
127
|
-
var actionDisabled =
|
|
221
|
+
var actionDisabled = actionProps.loading || (isBoolean(actionProps.disabled) ? actionProps.disabled : getDefaultDisabled(action.key));
|
|
222
|
+
|
|
223
|
+
// 提取需要传递给 Menu.Item 的 props(排除 danger,单独处理)
|
|
224
|
+
var menuItemProps = omit(actionProps, ['disabled', 'loading', 'tooltip', 'visible', 'fixed', 'enableLoading', 'onClick', 'children', 'danger']);
|
|
225
|
+
|
|
226
|
+
// 处理 onClick:如果 action 被 Popconfirm 包裹,Menu.Item 的 onClick 不应该直接触发 action 的 onClick
|
|
227
|
+
// 而是让 Popconfirm 来处理。如果没有 Popconfirm,则正常触发。
|
|
228
|
+
var handleMenuItemClick = function handleMenuItemClick(info) {
|
|
229
|
+
var _actionProps$onClick;
|
|
230
|
+
// 如果 action 被包裹(可能是 Popconfirm 或其他组件),不直接触发 onClick
|
|
231
|
+
// 让包裹组件来处理交互
|
|
232
|
+
if (actionResult !== null && actionResult !== void 0 && actionResult.wrapper) {
|
|
233
|
+
// 包裹组件会处理点击,这里不需要做任何事
|
|
234
|
+
// 注意:Menu.Item 的点击会关闭下拉菜单,但 Popconfirm 应该能够正常显示
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
// 如果没有包裹,正常触发 onClick
|
|
238
|
+
(_actionProps$onClick = actionProps.onClick) === null || _actionProps$onClick === void 0 || _actionProps$onClick.call(actionProps, info.domEvent);
|
|
239
|
+
};
|
|
128
240
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
129
241
|
children: [/*#__PURE__*/_jsx(Menu.Item, _objectSpread(_objectSpread({
|
|
130
242
|
// @ts-ignore
|
|
131
|
-
onClick:
|
|
132
|
-
var _action$props$onClick, _action$props;
|
|
133
|
-
var domEvent = _ref4.domEvent;
|
|
134
|
-
(_action$props$onClick = (_action$props = action.props).onClick) === null || _action$props$onClick === void 0 || _action$props$onClick.call(_action$props, domEvent);
|
|
135
|
-
}
|
|
136
|
-
}, omit(action.props, ['disabled'])), {}, {
|
|
243
|
+
onClick: handleMenuItemClick,
|
|
137
244
|
disabled: actionDisabled,
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}), (_ref3 = actionKey) !== null && _ref3 !== void 0 ? _ref3 : index.toString()), action.props.divider && /*#__PURE__*/_jsx(Menu.Divider, {})]
|
|
245
|
+
danger: !!actionProps.danger
|
|
246
|
+
}, menuItemProps), {}, {
|
|
247
|
+
children: renderMenuItemContent(action, actionProps, enableLoading)
|
|
248
|
+
}), (_ref3 = actionKey) !== null && _ref3 !== void 0 ? _ref3 : index.toString()), actionProps.divider && /*#__PURE__*/_jsx(Menu.Divider, {})]
|
|
143
249
|
});
|
|
144
250
|
})
|
|
145
251
|
}),
|
package/es/Action/style/index.js
CHANGED
|
@@ -10,9 +10,7 @@ export var genActionStyle = function genActionStyle(token) {
|
|
|
10
10
|
var paddingHorizontal = token.paddingSM;
|
|
11
11
|
var padding = "".concat(paddingVertical, "px ").concat(paddingHorizontal, "px");
|
|
12
12
|
var margin = "-".concat(paddingVertical, "px -").concat(paddingHorizontal, "px");
|
|
13
|
-
return _defineProperty({}, "".concat(componentCls, "-more-menu"), _defineProperty({
|
|
14
|
-
background: 'red'
|
|
15
|
-
}, "".concat(antCls, "-dropdown-menu-item"), _defineProperty(_defineProperty({}, "".concat(antCls, "-typography"), _defineProperty({
|
|
13
|
+
return _defineProperty({}, "".concat(componentCls, "-more-menu"), _defineProperty({}, "".concat(antCls, "-dropdown-menu-item"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(antCls, "-typography"), _defineProperty({
|
|
16
14
|
display: 'block',
|
|
17
15
|
margin: margin,
|
|
18
16
|
padding: "".concat(padding, " !important")
|
|
@@ -33,7 +31,13 @@ export var genActionStyle = function genActionStyle(token) {
|
|
|
33
31
|
background: 'transparent'
|
|
34
32
|
})), "".concat(antCls, "-wave"), {
|
|
35
33
|
display: 'none'
|
|
36
|
-
}))))
|
|
34
|
+
})), "&".concat(antCls, "-dropdown-menu-item-danger"), _defineProperty(_defineProperty({}, "".concat(antCls, "-typography"), _defineProperty({}, "&:not(".concat(antCls, "-typography-disabled)"), {
|
|
35
|
+
color: 'unset'
|
|
36
|
+
})), "".concat(antCls, "-btn"), _defineProperty({}, "&:not(:disabled):not(".concat(antCls, "-btn-disabled)"), _defineProperty({
|
|
37
|
+
color: 'unset'
|
|
38
|
+
}, "&:hover", {
|
|
39
|
+
color: 'unset'
|
|
40
|
+
}))))));
|
|
37
41
|
};
|
|
38
42
|
export default (function (prefixCls) {
|
|
39
43
|
var useStyle = genComponentStyleHook('Action', function (token) {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
help: string;
|
|
3
|
+
welcome: string;
|
|
4
|
+
versionNotice: string;
|
|
5
|
+
viewDocs: string;
|
|
6
|
+
downloadDocs: string;
|
|
7
|
+
about: string;
|
|
8
|
+
version: string;
|
|
9
|
+
releaseTime: string;
|
|
10
|
+
company: string;
|
|
11
|
+
right: string;
|
|
12
|
+
};
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
help: 'ヘルプ',
|
|
3
|
+
welcome: 'ウェルカムページ',
|
|
4
|
+
versionNotice: 'バージョン通知',
|
|
5
|
+
viewDocs: 'ユーザーマニュアルを表示',
|
|
6
|
+
downloadDocs: 'ユーザーマニュアルをダウンロード',
|
|
7
|
+
about: 'について',
|
|
8
|
+
version: 'バージョン',
|
|
9
|
+
releaseTime: 'リリース日',
|
|
10
|
+
company: '北京奥星贝斯科技有限公司',
|
|
11
|
+
right: '著作権所有'
|
|
12
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
goHome: 'ホームに戻る',
|
|
3
|
+
noPermission: 'このページへのアクセス権限がありません',
|
|
4
|
+
noPage: 'このページが見つかりません',
|
|
5
|
+
normal: '正常動作',
|
|
6
|
+
test: 'クリックしてクラッシュ効果をテスト',
|
|
7
|
+
collapse: 'ページがクラッシュしました~',
|
|
8
|
+
incompatible: 'ブラウザバージョンが互換性がありません',
|
|
9
|
+
proposal: 'ブラウザバージョンが低すぎます。セキュリティリスクを避けるため、Chrome ブラウザのバージョン 80 以上を使用することをお勧めします'
|
|
10
|
+
};
|
|
@@ -8,6 +8,7 @@ import type { Rule } from './PickerPanel';
|
|
|
8
8
|
import './index.less';
|
|
9
9
|
export type RangeName = 'customize' | string;
|
|
10
10
|
export type RangeValue = [Moment, Moment] | [Dayjs, Dayjs] | [] | null;
|
|
11
|
+
export type RangeValueFormat = [string, string] | [] | null;
|
|
11
12
|
export type RangeDateValue = {
|
|
12
13
|
name: RangeName;
|
|
13
14
|
range: RangeValue;
|
|
@@ -20,6 +21,9 @@ export interface DateRangerProps extends Omit<RangePickerProps, 'mode' | 'picker
|
|
|
20
21
|
hasSync?: boolean;
|
|
21
22
|
hasForward?: boolean;
|
|
22
23
|
hasZoomOut?: boolean;
|
|
24
|
+
history?: boolean | {
|
|
25
|
+
capacity: number;
|
|
26
|
+
};
|
|
23
27
|
hasTagInPicker?: boolean;
|
|
24
28
|
tip?: string;
|
|
25
29
|
rules?: Rule[];
|
package/es/DateRanger/Ranger.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
var _excluded = ["selects", "value", "defaultValue", "defaultQuickValue", "hasRewind", "hasPlay", "hasSync", "hasForward", "hasZoomOut", "hasTagInPicker", "pastOnly", "simpleMode", "hideYear", "hideSecond", "autoCalcRange", "onChange", "disabledDate", "locale", "size", "stickRangeName", "tooltipProps", "isMoment", "rules", "tip", "autoAdjustOverflow", "overlayClassName", "overlayStyle", "getPopupContainer"];
|
|
1
|
+
var _excluded = ["selects", "value", "defaultValue", "defaultQuickValue", "hasRewind", "hasPlay", "hasSync", "hasForward", "hasZoomOut", "hasTagInPicker", "pastOnly", "simpleMode", "hideYear", "hideSecond", "autoCalcRange", "history", "onChange", "disabledDate", "locale", "size", "stickRangeName", "tooltipProps", "isMoment", "rules", "tip", "autoAdjustOverflow", "overlayClassName", "overlayStyle", "getPopupContainer"];
|
|
3
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
4
|
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; }
|
|
@@ -9,6 +8,7 @@ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableTo
|
|
|
9
8
|
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
9
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
11
10
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
11
|
+
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); }
|
|
12
12
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
13
13
|
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."); }
|
|
14
14
|
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,11 +17,11 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
17
17
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
18
|
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; }
|
|
19
19
|
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; }
|
|
20
|
-
import React, { useEffect, useState, useImperativeHandle,
|
|
21
|
-
import { Button, DatePicker, Divider, Dropdown, Radio, Space, Tooltip, theme } from '@oceanbase/design';
|
|
22
|
-
import { LeftOutlined, RightOutlined, ZoomOutOutlined, SyncOutlined } from '@oceanbase/icons';
|
|
20
|
+
import React, { useEffect, useRef, useState, useImperativeHandle, useMemo } from 'react';
|
|
21
|
+
import { Button, DatePicker, Divider, Dropdown, Flex, Menu, Radio, Space, Tooltip, message, theme } from '@oceanbase/design';
|
|
22
|
+
import { LeftOutlined, RightOutlined, ZoomOutOutlined, SyncOutlined, ArrowLeftOutlined, CopyOutlined, DeleteOutlined } from '@oceanbase/icons';
|
|
23
23
|
import dayjs from 'dayjs';
|
|
24
|
-
import { findIndex, isNil, noop, omit } from 'lodash';
|
|
24
|
+
import { findIndex, isEqual as _isEqual, isNil, noop, omit } from 'lodash';
|
|
25
25
|
import moment from 'moment';
|
|
26
26
|
import classNames from 'classnames';
|
|
27
27
|
import LocaleWrapper from "../locale/LocaleWrapper";
|
|
@@ -31,8 +31,10 @@ import InternalPickerPanel from "./PickerPanel";
|
|
|
31
31
|
import zhCN from "./locale/zh-CN";
|
|
32
32
|
import "./index.less";
|
|
33
33
|
import { useClickAway } from 'ahooks';
|
|
34
|
+
import { useLocalStorageState } from '@oceanbase/util';
|
|
34
35
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
35
36
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
37
|
+
var DefaultMaxHistoryCapacity = 20;
|
|
36
38
|
var prefix = getPrefix('date-ranger');
|
|
37
39
|
var Ranger = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
38
40
|
var _selects$;
|
|
@@ -63,6 +65,8 @@ var Ranger = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
63
65
|
hideSecond = _props$hideSecond === void 0 ? false : _props$hideSecond,
|
|
64
66
|
_props$autoCalcRange = props.autoCalcRange,
|
|
65
67
|
autoCalcRange = _props$autoCalcRange === void 0 ? false : _props$autoCalcRange,
|
|
68
|
+
_props$history = props.history,
|
|
69
|
+
historyProp = _props$history === void 0 ? false : _props$history,
|
|
66
70
|
_props$onChange = props.onChange,
|
|
67
71
|
onChange = _props$onChange === void 0 ? noop : _props$onChange,
|
|
68
72
|
disabledDate = props.disabledDate,
|
|
@@ -116,15 +120,59 @@ var Ranger = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
116
120
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
117
121
|
backRadioFocused = _useState10[0],
|
|
118
122
|
setBackRadioFocused = _useState10[1];
|
|
123
|
+
var _useState11 = useState(false),
|
|
124
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
125
|
+
historyMenuVisible = _useState12[0],
|
|
126
|
+
setHistoryMenuVisible = _useState12[1];
|
|
119
127
|
var rangeRef = useRef(null);
|
|
120
128
|
var popRef = useRef(null);
|
|
121
129
|
var labelRef = useRef(null);
|
|
122
130
|
|
|
123
131
|
// 没有 selects 时,回退到普通 RangePicker, 当前时间选项为自定义时,应该显示 RangePicker
|
|
124
|
-
var
|
|
125
|
-
|
|
126
|
-
isPlay =
|
|
127
|
-
setIsPlay =
|
|
132
|
+
var _useState13 = useState(rangeName !== CUSTOMIZE),
|
|
133
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
134
|
+
isPlay = _useState14[0],
|
|
135
|
+
setIsPlay = _useState14[1];
|
|
136
|
+
var history = useMemo(function () {
|
|
137
|
+
if (historyProp) {
|
|
138
|
+
return {
|
|
139
|
+
capacity: _typeof(historyProp) === 'object' ? historyProp.capacity : DefaultMaxHistoryCapacity
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
return false;
|
|
143
|
+
}, [historyProp]);
|
|
144
|
+
var _useLocalStorageState = useLocalStorageState('ob-design-date-ranger-local-storage-range-history-state', {
|
|
145
|
+
defaultValue: [],
|
|
146
|
+
listenStorageChange: true
|
|
147
|
+
}),
|
|
148
|
+
_useLocalStorageState2 = _slicedToArray(_useLocalStorageState, 2),
|
|
149
|
+
rangeHistory = _useLocalStorageState2[0],
|
|
150
|
+
setRangeHistory = _useLocalStorageState2[1];
|
|
151
|
+
var updateRangeHistory = function updateRangeHistory(range) {
|
|
152
|
+
if (!range) {
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
if (range.length < 2 || !history) {
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
var formattedValue = [range[0].format(YEAR_DATE_TIME_SECOND_FORMAT_CN), range[1].format(YEAR_DATE_TIME_SECOND_FORMAT_CN)];
|
|
159
|
+
if (rangeHistory.find(function (item) {
|
|
160
|
+
return _isEqual(item, formattedValue);
|
|
161
|
+
})) {
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
var updatedValue = [formattedValue].concat(_toConsumableArray(rangeHistory));
|
|
165
|
+
if (updatedValue.length > history.capacity) {
|
|
166
|
+
updatedValue.splice(0, history.capacity);
|
|
167
|
+
}
|
|
168
|
+
setRangeHistory(updatedValue);
|
|
169
|
+
};
|
|
170
|
+
var delRangeHistory = function delRangeHistory(range) {
|
|
171
|
+
var updatedValue = rangeHistory.filter(function (item) {
|
|
172
|
+
return !_isEqual(item, range);
|
|
173
|
+
});
|
|
174
|
+
setRangeHistory(updatedValue);
|
|
175
|
+
};
|
|
128
176
|
var compare = function compare(m1, m2) {
|
|
129
177
|
if (Array.isArray(m1) && !Array.isArray(m2)) return false;
|
|
130
178
|
if (Array.isArray(m2) && !Array.isArray(m1)) return false;
|
|
@@ -159,6 +207,7 @@ var Ranger = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
159
207
|
var rangeChange = function rangeChange(range) {
|
|
160
208
|
setInnerValue(range);
|
|
161
209
|
onChange(range);
|
|
210
|
+
updateRangeHistory(range);
|
|
162
211
|
};
|
|
163
212
|
var datePickerChange = function datePickerChange(range) {
|
|
164
213
|
rangeChange(range);
|
|
@@ -221,6 +270,9 @@ var Ranger = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
221
270
|
}
|
|
222
271
|
return isEN ? "Nearly ".concat(differenceSeconds, " seconds") : "\u8FD1 ".concat(differenceSeconds, " \u79D2");
|
|
223
272
|
};
|
|
273
|
+
var getHistoryTitle = function getHistoryTitle() {
|
|
274
|
+
return isEN ? 'History records' : '历史记录';
|
|
275
|
+
};
|
|
224
276
|
var setNow = function setNow() {
|
|
225
277
|
var selected = selects.find(function (item) {
|
|
226
278
|
return item.name === rangeName;
|
|
@@ -284,7 +336,99 @@ var Ranger = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
284
336
|
ref: popRef,
|
|
285
337
|
className: classNames("".concat(prefix, "-dropdown-picker"), overlayClassName),
|
|
286
338
|
style: overlayStyle,
|
|
287
|
-
children: [
|
|
339
|
+
children: [/*#__PURE__*/_jsxs(Flex, {
|
|
340
|
+
vertical: true,
|
|
341
|
+
justify: "space-between",
|
|
342
|
+
children: [!historyMenuVisible && /*#__PURE__*/_jsx("div", {
|
|
343
|
+
className: "options",
|
|
344
|
+
children: originNode
|
|
345
|
+
}), history && historyMenuVisible && /*#__PURE__*/_jsxs("div", {
|
|
346
|
+
className: "history",
|
|
347
|
+
children: [/*#__PURE__*/_jsxs(Button, {
|
|
348
|
+
type: "link",
|
|
349
|
+
style: {
|
|
350
|
+
paddingLeft: 8,
|
|
351
|
+
color: token.colorTextBase
|
|
352
|
+
},
|
|
353
|
+
onClick: function onClick(e) {
|
|
354
|
+
setHistoryMenuVisible(false);
|
|
355
|
+
e.stopPropagation();
|
|
356
|
+
},
|
|
357
|
+
children: [/*#__PURE__*/_jsx(ArrowLeftOutlined, {
|
|
358
|
+
color: token.colorTextLabel
|
|
359
|
+
}), getHistoryTitle()]
|
|
360
|
+
}), /*#__PURE__*/_jsx(Menu, {
|
|
361
|
+
onClick: function onClick(_ref4) {
|
|
362
|
+
var rangeString = _ref4.key;
|
|
363
|
+
var vList = rangeString.split(',').map(function (v) {
|
|
364
|
+
return v.trim();
|
|
365
|
+
});
|
|
366
|
+
rangeChange(vList.map(function (v) {
|
|
367
|
+
return isMoment ? moment(v) : dayjs(v);
|
|
368
|
+
}));
|
|
369
|
+
handleNameChange(CUSTOMIZE);
|
|
370
|
+
},
|
|
371
|
+
style: {
|
|
372
|
+
maxHeight: 480,
|
|
373
|
+
overflowY: 'auto'
|
|
374
|
+
},
|
|
375
|
+
items: rangeHistory.map(function (range) {
|
|
376
|
+
return {
|
|
377
|
+
key: String(range),
|
|
378
|
+
label: /*#__PURE__*/_jsxs(Flex, {
|
|
379
|
+
className: "".concat(prefix, "-history-menu-item"),
|
|
380
|
+
vertical: true,
|
|
381
|
+
children: [/*#__PURE__*/_jsxs("span", {
|
|
382
|
+
children: [(isMoment ? moment(range[0]) : dayjs(range[0])).format(YEAR_DATE_TIME_SECOND_FORMAT_CN), "~"]
|
|
383
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
384
|
+
children: (isMoment ? moment(range[1]) : dayjs(range[1])).format(YEAR_DATE_TIME_SECOND_FORMAT_CN)
|
|
385
|
+
}), /*#__PURE__*/_jsxs(Space, {
|
|
386
|
+
className: "".concat(prefix, "-menu-text-btn-wrapper"),
|
|
387
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
388
|
+
className: "".concat(prefix, "-menu-text-btn"),
|
|
389
|
+
type: "text",
|
|
390
|
+
color: "default",
|
|
391
|
+
variant: "filled",
|
|
392
|
+
size: "small",
|
|
393
|
+
onClick: function onClick(e) {
|
|
394
|
+
e.stopPropagation();
|
|
395
|
+
var vList = range.map(function (v) {
|
|
396
|
+
return v;
|
|
397
|
+
});
|
|
398
|
+
var text = "".concat(vList.join('~'));
|
|
399
|
+
navigator.clipboard.writeText(text);
|
|
400
|
+
message.success(text);
|
|
401
|
+
},
|
|
402
|
+
children: /*#__PURE__*/_jsx(CopyOutlined, {})
|
|
403
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
404
|
+
className: "".concat(prefix, "-menu-text-btn"),
|
|
405
|
+
type: "text",
|
|
406
|
+
color: "default",
|
|
407
|
+
variant: "filled",
|
|
408
|
+
size: "small",
|
|
409
|
+
onClick: function onClick(e) {
|
|
410
|
+
e.stopPropagation();
|
|
411
|
+
delRangeHistory(range);
|
|
412
|
+
},
|
|
413
|
+
children: /*#__PURE__*/_jsx(DeleteOutlined, {})
|
|
414
|
+
})]
|
|
415
|
+
})]
|
|
416
|
+
}, String(range))
|
|
417
|
+
};
|
|
418
|
+
})
|
|
419
|
+
})]
|
|
420
|
+
}), history && !historyMenuVisible && /*#__PURE__*/_jsxs(Button, {
|
|
421
|
+
type: "link",
|
|
422
|
+
style: {
|
|
423
|
+
width: 'max-content'
|
|
424
|
+
},
|
|
425
|
+
onClick: function onClick(e) {
|
|
426
|
+
setHistoryMenuVisible(true);
|
|
427
|
+
e.stopPropagation();
|
|
428
|
+
},
|
|
429
|
+
children: [getHistoryTitle(), /*#__PURE__*/_jsx(RightOutlined, {})]
|
|
430
|
+
})]
|
|
431
|
+
}), /*#__PURE__*/_jsx(Divider, {
|
|
288
432
|
type: "vertical",
|
|
289
433
|
style: {
|
|
290
434
|
height: 'auto',
|
|
@@ -317,9 +461,9 @@ var Ranger = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
317
461
|
menu: {
|
|
318
462
|
selectable: true,
|
|
319
463
|
defaultSelectedKeys: [rangeName],
|
|
320
|
-
onClick: function onClick(
|
|
321
|
-
var key =
|
|
322
|
-
domEvent =
|
|
464
|
+
onClick: function onClick(_ref5) {
|
|
465
|
+
var key = _ref5.key,
|
|
466
|
+
domEvent = _ref5.domEvent;
|
|
323
467
|
var selected = selects.find(function (_item) {
|
|
324
468
|
return _item.name === key;
|
|
325
469
|
});
|
|
@@ -192,7 +192,7 @@ export var THIS_WEEK = {
|
|
|
192
192
|
export var LAST_WEEK = {
|
|
193
193
|
label: '上周',
|
|
194
194
|
enLabel: 'Last week',
|
|
195
|
-
rangeLabel: '
|
|
195
|
+
rangeLabel: '1w',
|
|
196
196
|
name: 'LAST_WEEK',
|
|
197
197
|
range: function range() {
|
|
198
198
|
var current = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : moment();
|
package/es/DateRanger/index.less
CHANGED
|
@@ -155,3 +155,26 @@
|
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
|
+
|
|
159
|
+
.@{prefix}-history-menu-item {
|
|
160
|
+
.@{prefix}-menu-text-btn-wrapper {
|
|
161
|
+
justify-content: space-between;
|
|
162
|
+
height: 0;
|
|
163
|
+
transition: height 0.2s;
|
|
164
|
+
overflow: hidden;
|
|
165
|
+
}
|
|
166
|
+
&:hover {
|
|
167
|
+
.@{prefix}-menu-text-btn-wrapper {
|
|
168
|
+
height: 22px;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.@{prefix}-menu-text-btn {
|
|
174
|
+
width: 72px;
|
|
175
|
+
|
|
176
|
+
background-color: @colorFillSecondary !important;
|
|
177
|
+
&:hover {
|
|
178
|
+
background-color: @colorFill !important;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
locale: string;
|
|
3
|
+
dateFormat?: string;
|
|
4
|
+
dateTimeFormat?: string;
|
|
5
|
+
fieldDateTimeFormat?: string;
|
|
6
|
+
fieldDateFormat?: string;
|
|
7
|
+
fieldTimeFormat?: string;
|
|
8
|
+
fieldMonthFormat?: string;
|
|
9
|
+
fieldYearFormat?: string;
|
|
10
|
+
fieldWeekFormat?: string;
|
|
11
|
+
fieldQuarterFormat?: string;
|
|
12
|
+
monthBeforeYear?: boolean;
|
|
13
|
+
yearFormat?: string;
|
|
14
|
+
monthFormat?: string;
|
|
15
|
+
cellYearFormat?: string;
|
|
16
|
+
cellQuarterFormat?: string;
|
|
17
|
+
dayFormat?: string;
|
|
18
|
+
cellDateFormat?: string;
|
|
19
|
+
cellMeridiemFormat?: string;
|
|
20
|
+
today: string;
|
|
21
|
+
now: string;
|
|
22
|
+
backToToday: string;
|
|
23
|
+
ok: string;
|
|
24
|
+
timeSelect: string;
|
|
25
|
+
dateSelect: string;
|
|
26
|
+
weekSelect?: string;
|
|
27
|
+
clear: string;
|
|
28
|
+
week: string;
|
|
29
|
+
month: string;
|
|
30
|
+
year: string;
|
|
31
|
+
previousMonth: string;
|
|
32
|
+
nextMonth: string;
|
|
33
|
+
monthSelect: string;
|
|
34
|
+
yearSelect: string;
|
|
35
|
+
decadeSelect: string;
|
|
36
|
+
previousYear: string;
|
|
37
|
+
nextYear: string;
|
|
38
|
+
previousDecade: string;
|
|
39
|
+
nextDecade: string;
|
|
40
|
+
previousCentury: string;
|
|
41
|
+
nextCentury: string;
|
|
42
|
+
shortWeekDays?: string[];
|
|
43
|
+
shortMonths?: string[];
|
|
44
|
+
customize: string;
|
|
45
|
+
customTime: string;
|
|
46
|
+
startDate: string;
|
|
47
|
+
startTime: string;
|
|
48
|
+
endDate: string;
|
|
49
|
+
endTime: string;
|
|
50
|
+
cancel: string;
|
|
51
|
+
confirm: string;
|
|
52
|
+
current: string;
|
|
53
|
+
jumpBack: string;
|
|
54
|
+
jumpForward: string;
|
|
55
|
+
};
|
|
56
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
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 ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
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
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
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); }
|
|
7
|
+
import ja_JP from 'rc-picker/es/locale/ja_JP';
|
|
8
|
+
export default _objectSpread({
|
|
9
|
+
customize: 'カスタム',
|
|
10
|
+
customTime: 'カスタム時間',
|
|
11
|
+
startDate: '開始日',
|
|
12
|
+
startTime: '開始時刻',
|
|
13
|
+
endDate: '終了日',
|
|
14
|
+
endTime: '終了時刻',
|
|
15
|
+
cancel: 'キャンセル',
|
|
16
|
+
confirm: '確定',
|
|
17
|
+
current: '現在',
|
|
18
|
+
jumpBack: '前の時間間隔にジャンプ',
|
|
19
|
+
jumpForward: '次の時間間隔にジャンプ'
|
|
20
|
+
}, ja_JP);
|