dtable-ui-component 6.0.104 → 6.0.106
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/lib/ActionSheet/index.js +35 -42
- package/lib/ActivityIndicator/index.js +9 -9
- package/lib/AsyncUserSelect/index.js +3 -3
- package/lib/Badge/index.js +31 -27
- package/lib/CheckboxEditor/index.js +14 -15
- package/lib/CollaboratorEditor/index.js +15 -16
- package/lib/CollaboratorEditor/pc-editor/index.js +1 -1
- package/lib/CollapsibleSettingLayout/index.js +1 -1
- package/lib/Comment/body/comment.js +1 -1
- package/lib/Comment/body/index.js +9 -7
- package/lib/Comment/footer/index.js +1 -1
- package/lib/Comment/footer/input/index.js +5 -5
- package/lib/Comment/footer/input/participant/index.js +1 -1
- package/lib/Comment/footer/participants/participant-select/index.js +2 -2
- package/lib/Comment/utils/utilities.js +1 -1
- package/lib/DTableColorPicker/ColorPickerPortal/index.js +6 -8
- package/lib/DTableColorPicker/index.js +12 -13
- package/lib/DTableColorPicker/utils.js +1 -1
- package/lib/DTableCommonAddTool/index.js +2 -2
- package/lib/DTableFiltersPopover/index.js +1 -1
- package/lib/DTableFiltersPopover/utils/index.js +1 -1
- package/lib/DTableFiltersPopover/widgets/filter-group.js +2 -2
- package/lib/DTableFiltersPopover/widgets/filter-item.js +1 -1
- package/lib/DTableFiltersPopover/widgets/filter-list/index.js +1 -1
- package/lib/DTableFiltersPopover/widgets/rate-item.js +5 -5
- package/lib/DTableGroupSelect/select-option-group.js +1 -1
- package/lib/DTableIcon/index.js +4 -4
- package/lib/DTableIcon/svg-icon.js +4 -4
- package/lib/DTableModalHeader/index.js +8 -6
- package/lib/DTableRadioGroup/index.js +3 -3
- package/lib/DTableSelect/dtable-select-label.js +1 -1
- package/lib/DTableSelect/utils.js +36 -55
- package/lib/DateEditor/index.js +10 -13
- package/lib/DateEditor/pc-editor.js +1 -1
- package/lib/DatePicker/utils.js +4 -4
- package/lib/DepartmentMultipleSelectEditor/index.js +3 -3
- package/lib/DepartmentSelectFilter/index.js +2 -5
- package/lib/DepartmentSingleSelectEditor/index.js +14 -15
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +2 -2
- package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +6 -6
- package/lib/DigitalSignEditor/index.js +14 -15
- package/lib/DigitalSignEditor/mb-editor/index.js +4 -4
- package/lib/DigitalSignEditor/pc-editor/index.js +6 -7
- package/lib/DigitalSignEditor/service.js +1 -1
- package/lib/DigitalSignEditor/signature-board/index.js +2 -2
- package/lib/DigitalSignFormatter/utils.js +1 -1
- package/lib/Drawer/index.js +2 -3
- package/lib/FieldDisplaySetting/field-item.js +1 -1
- package/lib/FieldDisplaySetting/index.js +9 -11
- package/lib/FileEditor/files-previewer/index.js +14 -15
- package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +2 -2
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +3 -3
- package/lib/FileEditor/index.js +14 -15
- package/lib/FileEditor/pc-editor/addition-previewer/index.js +1 -1
- package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +6 -6
- package/lib/FileEditor/pc-editor/index.js +3 -3
- package/lib/FileFormatter/index.js +2 -1
- package/lib/FileItemFormatter/index.js +1 -1
- package/lib/FileUploader/index.js +1 -1
- package/lib/FormulaFormatter/index.js +9 -15
- package/lib/GeolocationEditor/index.js +19 -23
- package/lib/GeolocationEditor/map-editor-utils.js +6 -10
- package/lib/GeolocationEditor/mb-editor/index.js +24 -27
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +6 -9
- package/lib/GeolocationEditor/pc-editor/country-editor.js +2 -2
- package/lib/GeolocationEditor/pc-editor/index.js +15 -21
- package/lib/GeolocationEditor/pc-editor/location-editor.js +2 -2
- package/lib/GeolocationEditor/pc-editor/map-editor/index.js +9 -13
- package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +6 -9
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +7 -24
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +3 -20
- package/lib/GeolocationEditor/pc-editor/province-city-editor.js +1 -1
- package/lib/GeolocationEditor/pc-editor/province-editor.js +2 -2
- package/lib/GeolocationEditor/pc-editor/selector-list.js +1 -1
- package/lib/HtmlLongTextFormatter/index.js +1 -1
- package/lib/Icon/index.js +17 -13
- package/lib/Icon/load-sprite.js +2 -13
- package/lib/IconButton/index.js +14 -11
- package/lib/ImageEditor/images-previewer/image-preview/index.js +1 -1
- package/lib/ImageEditor/index.js +14 -15
- package/lib/ImageEditor/pc-editor/addition-previewer/index.js +2 -2
- package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +5 -5
- package/lib/ImageEditor/pc-editor/images-previewer/index.js +1 -1
- package/lib/ImageFormatter/index.js +1 -1
- package/lib/ImageThumbnail/index.js +2 -2
- package/lib/InputItem/custom-input.js +9 -9
- package/lib/InputItem/custom-keyboard.js +37 -34
- package/lib/InputItem/index.js +49 -52
- package/lib/InputItem/input.js +13 -9
- package/lib/LinkEditor/pc-popover/index.js +2 -3
- package/lib/List/index.js +21 -17
- package/lib/List/list-item.js +52 -50
- package/lib/MBEditorHeader/index.js +1 -1
- package/lib/MobileFullScreenPage/body/index.js +1 -1
- package/lib/MobileFullScreenPage/header/index.js +4 -4
- package/lib/MobileFullScreenPage/index.js +1 -1
- package/lib/MobileModal/index.js +10 -7
- package/lib/Modal/alert.js +2 -2
- package/lib/Modal/modal.js +31 -28
- package/lib/Modal/prompt.js +10 -10
- package/lib/MultipleSelectEditor/index.js +8 -6
- package/lib/MultipleSelectFormatter/index.js +1 -1
- package/lib/PhoneNumberLink/index.js +1 -1
- package/lib/Picker/AbstractPicker.js +28 -26
- package/lib/Popover/index.js +12 -9
- package/lib/Popover/item.js +26 -22
- package/lib/Progress/index.js +8 -10
- package/lib/Radio/Radio.js +15 -13
- package/lib/Radio/RadioItem.js +18 -18
- package/lib/RateFormatter/index.js +2 -2
- package/lib/RoleStatusEditor/index.js +1 -1
- package/lib/RowExpand/index.js +6 -7
- package/lib/RowExpandDialog/body/index.js +14 -14
- package/lib/RowExpandDialog/column-content/index.js +1 -1
- package/lib/RowExpandDialog/header/index.js +3 -4
- package/lib/RowExpandDialog/index.js +32 -43
- package/lib/RowExpandEditor/add-btn/index.js +6 -7
- package/lib/RowExpandEditor/checkbox-editor/index.js +6 -7
- package/lib/RowExpandEditor/collaborator-editor/index.js +6 -7
- package/lib/RowExpandEditor/date-editor/index.js +6 -7
- package/lib/RowExpandEditor/department-editor/index.js +6 -7
- package/lib/RowExpandEditor/digital-sign-editor/index.js +6 -7
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +4 -4
- package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +4 -4
- package/lib/RowExpandEditor/duration-editor/index.js +6 -7
- package/lib/RowExpandEditor/email-editor/index.js +6 -7
- package/lib/RowExpandEditor/email-editor/mb-editor/index.js +1 -1
- package/lib/RowExpandEditor/email-editor/pc-editor/index.js +1 -1
- package/lib/RowExpandEditor/file-editor/index.js +6 -7
- package/lib/RowExpandEditor/geolocation-editor/index.js +6 -7
- package/lib/RowExpandEditor/image-editor/index.js +6 -7
- package/lib/RowExpandEditor/image-editor/mb-editor/index.js +1 -1
- package/lib/RowExpandEditor/image-editor/pc-editor/index.js +1 -1
- package/lib/RowExpandEditor/index.js +10 -11
- package/lib/RowExpandEditor/long-text-editor/index.js +6 -7
- package/lib/RowExpandEditor/multiple-select-editor/index.js +6 -7
- package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +1 -1
- package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +5 -5
- package/lib/RowExpandEditor/number-editor/index.js +6 -7
- package/lib/RowExpandEditor/rate-editor/index.js +6 -7
- package/lib/RowExpandEditor/rate-editor/mb-editor.js +1 -1
- package/lib/RowExpandEditor/rate-editor/pc-editor.js +5 -5
- package/lib/RowExpandEditor/single-select-editor/index.js +6 -7
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +4 -4
- package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +3 -3
- package/lib/RowExpandEditor/text-editor/index.js +6 -7
- package/lib/RowExpandEditor/url-editor/index.js +6 -7
- package/lib/RowExpandEditor/url-editor/mb-editor/index.js +2 -2
- package/lib/RowExpandEditor/url-editor/pc-editor/index.js +2 -2
- package/lib/RowExpandFormatter/department-formatter/index.js +3 -6
- package/lib/RowExpandFormatter/email-formatter/index.js +1 -1
- package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +2 -2
- package/lib/RowExpandFormatter/formula-formatter/index.js +11 -17
- package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +2 -2
- package/lib/RowExpandFormatter/index.js +7 -11
- package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +1 -1
- package/lib/RowExpandFormatter/link-formatter/index.js +6 -6
- package/lib/RowExpandFormatter/rate-formatter/index.js +2 -2
- package/lib/RowExpandFormatter/url-formatter/index.js +2 -2
- package/lib/RowExpandView/body/index.js +15 -13
- package/lib/RowExpandView/index.js +28 -39
- package/lib/SelectOptionGroup/index.js +1 -1
- package/lib/SelectedDepartments/index.js +3 -3
- package/lib/SimpleLongTextFormatter/index.js +2 -2
- package/lib/SingleSelectEditor/index.js +8 -6
- package/lib/TabBar/Tab.js +10 -10
- package/lib/TabBar/index.js +6 -7
- package/lib/Tabs/index.js +9 -10
- package/lib/TextareaItem/index.js +45 -43
- package/lib/Toast/index.js +5 -5
- package/lib/formatterConfig/index.js +3 -3
- package/lib/select-editor/index.js +14 -15
- package/lib/select-editor/pc-editor/index.js +5 -5
- package/lib/toaster/alert.js +1 -1
- package/lib/toaster/toast.js +1 -1
- package/lib/toaster/toastManager.js +15 -12
- package/lib/toaster/toaster.js +9 -12
- package/lib/utils/class.js +3 -3
- package/lib/utils/departments.js +4 -3
- package/lib/utils/getLocale.js +5 -11
- package/lib/utils/object-utils.js +5 -5
- package/lib/utils/url.js +4 -4
- package/package.json +4 -5
|
@@ -18,22 +18,22 @@ const Header = _ref => {
|
|
|
18
18
|
} = _ref;
|
|
19
19
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
20
20
|
className: (0, _classnames.default)('dtable-ui-mobile-full-screen-page-header p-0', {
|
|
21
|
-
[
|
|
21
|
+
["".concat(classNamePrefix, "-mobile-full-screen-page-header")]: classNamePrefix
|
|
22
22
|
}),
|
|
23
23
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
24
24
|
className: (0, _classnames.default)('dtable-ui-mobile-full-screen-page-header-btn', {
|
|
25
|
-
[
|
|
25
|
+
["".concat(classNamePrefix, "-mobile-full-screen-page-header-btn")]: classNamePrefix
|
|
26
26
|
}),
|
|
27
27
|
onClick: onLeftClick,
|
|
28
28
|
children: children[0]
|
|
29
29
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("h4", {
|
|
30
30
|
className: (0, _classnames.default)('dtable-ui-mobile-full-screen-page-header-title', {
|
|
31
|
-
[
|
|
31
|
+
["".concat(classNamePrefix, "-mobile-full-screen-page-header-title")]: classNamePrefix
|
|
32
32
|
}),
|
|
33
33
|
children: children[1]
|
|
34
34
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
35
35
|
className: (0, _classnames.default)('dtable-ui-mobile-full-screen-page-header-btn', {
|
|
36
|
-
[
|
|
36
|
+
["".concat(classNamePrefix, "-mobile-full-screen-page-header-btn")]: classNamePrefix
|
|
37
37
|
}),
|
|
38
38
|
onClick: onRightClick,
|
|
39
39
|
children: children[2]
|
|
@@ -64,7 +64,7 @@ const MobileFullScreenPage = _ref => {
|
|
|
64
64
|
node: element,
|
|
65
65
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
66
66
|
className: (0, _classnames.default)('dtable-ui-mobile-full-screen-page', className, {
|
|
67
|
-
[
|
|
67
|
+
["".concat(classNamePrefix, "-mobile-full-screen-page")]: classNamePrefix
|
|
68
68
|
}),
|
|
69
69
|
style: style,
|
|
70
70
|
children: isMount && children
|
package/lib/MobileModal/index.js
CHANGED
|
@@ -5,9 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
9
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
8
10
|
var _react = _interopRequireDefault(require("react"));
|
|
9
11
|
var _Modal = _interopRequireDefault(require("../Modal"));
|
|
10
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
const _excluded = ["children"];
|
|
11
14
|
class MobileModal extends _react.default.PureComponent {
|
|
12
15
|
constructor() {
|
|
13
16
|
super(...arguments);
|
|
@@ -24,15 +27,15 @@ class MobileModal extends _react.default.PureComponent {
|
|
|
24
27
|
window.removeEventListener('popstate', this.handleHistoryBack, false);
|
|
25
28
|
}
|
|
26
29
|
render() {
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
const _this$props = this.props,
|
|
31
|
+
{
|
|
32
|
+
children
|
|
33
|
+
} = _this$props,
|
|
34
|
+
props = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
35
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Modal.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
33
36
|
popup: true,
|
|
34
37
|
children: children
|
|
35
|
-
});
|
|
38
|
+
}));
|
|
36
39
|
}
|
|
37
40
|
}
|
|
38
41
|
MobileModal.defaultProps = {
|
package/lib/Modal/alert.js
CHANGED
|
@@ -59,7 +59,7 @@ function alert(title, message) {
|
|
|
59
59
|
if (!/iPhone|iPod|iPad/i.test(navigator.userAgent)) {
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
|
-
const pNode = (0, _closest.default)(e.target,
|
|
62
|
+
const pNode = (0, _closest.default)(e.target, ".".concat(prefixCls, "-footer"));
|
|
63
63
|
if (!pNode) {
|
|
64
64
|
e.preventDefault();
|
|
65
65
|
}
|
|
@@ -78,7 +78,7 @@ function alert(title, message) {
|
|
|
78
78
|
onTouchStart: onWrapTouchStart
|
|
79
79
|
},
|
|
80
80
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
81
|
-
className:
|
|
81
|
+
className: "".concat(prefixCls, "-alert-content"),
|
|
82
82
|
children: message
|
|
83
83
|
})
|
|
84
84
|
}));
|
package/lib/Modal/modal.js
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = exports.ModalComponent = void 0;
|
|
9
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
9
11
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
12
|
var React = _interopRequireWildcard(require("react"));
|
|
11
13
|
var _rmcDialog = _interopRequireDefault(require("rmc-dialog"));
|
|
12
14
|
var _rmcFeedback = _interopRequireDefault(require("rmc-feedback"));
|
|
13
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
+
const _excluded = ["prefixCls", "className", "wrapClassName", "transitionName", "maskTransitionName", "style", "platform", "footer", "operation", "animated", "transparent", "popup", "animationType"];
|
|
14
17
|
class ModalComponent extends React.Component {}
|
|
15
18
|
exports.ModalComponent = ModalComponent;
|
|
16
19
|
class Modal extends ModalComponent {
|
|
@@ -36,9 +39,9 @@ class Modal extends ModalComponent {
|
|
|
36
39
|
}
|
|
37
40
|
};
|
|
38
41
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcFeedback.default, {
|
|
39
|
-
activeClassName:
|
|
42
|
+
activeClassName: "".concat(prefixCls, "-button-active"),
|
|
40
43
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
41
|
-
className:
|
|
44
|
+
className: "".concat(prefixCls, "-button"),
|
|
42
45
|
role: "button",
|
|
43
46
|
style: buttonStyle,
|
|
44
47
|
onClick: onClickFn,
|
|
@@ -47,23 +50,24 @@ class Modal extends ModalComponent {
|
|
|
47
50
|
}, i);
|
|
48
51
|
}
|
|
49
52
|
render() {
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
53
|
+
const _this$props = this.props,
|
|
54
|
+
{
|
|
55
|
+
prefixCls,
|
|
56
|
+
className,
|
|
57
|
+
wrapClassName,
|
|
58
|
+
transitionName,
|
|
59
|
+
maskTransitionName,
|
|
60
|
+
style,
|
|
61
|
+
platform,
|
|
62
|
+
footer = [],
|
|
63
|
+
operation,
|
|
64
|
+
animated,
|
|
65
|
+
transparent,
|
|
66
|
+
popup,
|
|
67
|
+
animationType
|
|
68
|
+
} = _this$props,
|
|
69
|
+
restProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
70
|
+
const btnGroupClass = (0, _classnames.default)("".concat(prefixCls, "-button-group-").concat(footer.length === 2 && !operation ? 'h' : 'v'), "".concat(prefixCls, "-button-group-").concat(operation ? 'operation' : 'normal'));
|
|
67
71
|
const footerDom = footer.length ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
68
72
|
className: btnGroupClass,
|
|
69
73
|
role: "group",
|
|
@@ -86,16 +90,15 @@ class Modal extends ModalComponent {
|
|
|
86
90
|
}
|
|
87
91
|
}
|
|
88
92
|
const wrapCls = (0, _classnames.default)(wrapClassName, {
|
|
89
|
-
[
|
|
93
|
+
["".concat(prefixCls, "-wrap-popup")]: popup
|
|
90
94
|
});
|
|
91
95
|
const cls = (0, _classnames.default)(className, {
|
|
92
|
-
[
|
|
93
|
-
[
|
|
94
|
-
[
|
|
95
|
-
[
|
|
96
|
+
["".concat(prefixCls, "-transparent")]: transparent,
|
|
97
|
+
["".concat(prefixCls, "-popup")]: popup,
|
|
98
|
+
["".concat(prefixCls, "-popup-").concat(animationType)]: popup && animationType,
|
|
99
|
+
["".concat(prefixCls, "-android")]: platform === 'android'
|
|
96
100
|
});
|
|
97
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcDialog.default, {
|
|
98
|
-
...restProps,
|
|
101
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcDialog.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, restProps), {}, {
|
|
99
102
|
prefixCls: prefixCls,
|
|
100
103
|
className: cls,
|
|
101
104
|
wrapClassName: wrapCls,
|
|
@@ -103,7 +106,7 @@ class Modal extends ModalComponent {
|
|
|
103
106
|
maskTransitionName: maskTransitionName || maskTransName,
|
|
104
107
|
style: style,
|
|
105
108
|
footer: footerDom
|
|
106
|
-
});
|
|
109
|
+
}));
|
|
107
110
|
}
|
|
108
111
|
}
|
|
109
112
|
exports.default = Modal;
|
package/lib/Modal/prompt.js
CHANGED
|
@@ -17,7 +17,7 @@ function prompt(title, message, callbackOrActions) {
|
|
|
17
17
|
let placeholders = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : ['', ''];
|
|
18
18
|
let platform = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : 'ios';
|
|
19
19
|
let closed = false;
|
|
20
|
-
defaultValue = typeof defaultValue === 'string' ? defaultValue : typeof defaultValue === 'number' ?
|
|
20
|
+
defaultValue = typeof defaultValue === 'string' ? defaultValue : typeof defaultValue === 'number' ? "".concat(defaultValue) : '';
|
|
21
21
|
if (!callbackOrActions) {
|
|
22
22
|
// console.log('Must specify callbackOrActions');
|
|
23
23
|
return {
|
|
@@ -61,9 +61,9 @@ function prompt(title, message, callbackOrActions) {
|
|
|
61
61
|
switch (type) {
|
|
62
62
|
case 'login-password':
|
|
63
63
|
inputDom = /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
64
|
-
className:
|
|
64
|
+
className: "".concat(prefixCls, "-input-container"),
|
|
65
65
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
66
|
-
className:
|
|
66
|
+
className: "".concat(prefixCls, "-input"),
|
|
67
67
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
68
68
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
69
69
|
type: "text",
|
|
@@ -76,7 +76,7 @@ function prompt(title, message, callbackOrActions) {
|
|
|
76
76
|
})
|
|
77
77
|
})
|
|
78
78
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
79
|
-
className:
|
|
79
|
+
className: "".concat(prefixCls, "-input"),
|
|
80
80
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
81
81
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
82
82
|
type: "password",
|
|
@@ -92,9 +92,9 @@ function prompt(title, message, callbackOrActions) {
|
|
|
92
92
|
break;
|
|
93
93
|
case 'secure-text':
|
|
94
94
|
inputDom = /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
95
|
-
className:
|
|
95
|
+
className: "".concat(prefixCls, "-input-container"),
|
|
96
96
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
97
|
-
className:
|
|
97
|
+
className: "".concat(prefixCls, "-input"),
|
|
98
98
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
99
99
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
100
100
|
type: "password",
|
|
@@ -112,9 +112,9 @@ function prompt(title, message, callbackOrActions) {
|
|
|
112
112
|
case 'default':
|
|
113
113
|
default:
|
|
114
114
|
inputDom = /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
115
|
-
className:
|
|
115
|
+
className: "".concat(prefixCls, "-input-container"),
|
|
116
116
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
117
|
-
className:
|
|
117
|
+
className: "".concat(prefixCls, "-input"),
|
|
118
118
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
119
119
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
120
120
|
type: "text",
|
|
@@ -200,7 +200,7 @@ function prompt(title, message, callbackOrActions) {
|
|
|
200
200
|
if (!/iPhone|iPod|iPad/i.test(navigator.userAgent)) {
|
|
201
201
|
return;
|
|
202
202
|
}
|
|
203
|
-
const pNode = (0, _closest.default)(e.target,
|
|
203
|
+
const pNode = (0, _closest.default)(e.target, ".".concat(prefixCls, "-content"));
|
|
204
204
|
if (!pNode) {
|
|
205
205
|
e.preventDefault();
|
|
206
206
|
}
|
|
@@ -220,7 +220,7 @@ function prompt(title, message, callbackOrActions) {
|
|
|
220
220
|
onTouchStart: onWrapTouchStart
|
|
221
221
|
},
|
|
222
222
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
223
|
-
className:
|
|
223
|
+
className: "".concat(prefixCls, "-propmt-content"),
|
|
224
224
|
children: content
|
|
225
225
|
})
|
|
226
226
|
}));
|
|
@@ -6,19 +6,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
9
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
12
|
var _selectEditor = _interopRequireDefault(require("../select-editor"));
|
|
11
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
const _excluded = ["value"];
|
|
12
15
|
const MultipleSelectEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
13
16
|
let {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
value: oldValue
|
|
18
|
+
} = _ref,
|
|
19
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
17
20
|
const value = oldValue ? Array.isArray(oldValue) ? oldValue : [oldValue] : [];
|
|
18
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_selectEditor.default, {
|
|
19
|
-
...props,
|
|
21
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_selectEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
20
22
|
value: value,
|
|
21
23
|
ref: ref
|
|
22
|
-
});
|
|
24
|
+
}));
|
|
23
25
|
});
|
|
24
26
|
var _default = exports.default = MultipleSelectEditor;
|
|
@@ -24,7 +24,7 @@ class MultipleSelectFormatter extends _react.default.PureComponent {
|
|
|
24
24
|
return selectedOptions.map(option => {
|
|
25
25
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SelectItem.default, {
|
|
26
26
|
option: option
|
|
27
|
-
},
|
|
27
|
+
}, "multiple-".concat(option.id));
|
|
28
28
|
});
|
|
29
29
|
};
|
|
30
30
|
}
|
|
@@ -15,7 +15,7 @@ const PhoneNumberLink = _ref => {
|
|
|
15
15
|
} = _ref;
|
|
16
16
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
|
|
17
17
|
className: (0, _classnames.default)(className),
|
|
18
|
-
href:
|
|
18
|
+
href: "tel:".concat(typeof phoneNumber === 'string' ? phoneNumber.trim() : ''),
|
|
19
19
|
tabIndex: 0,
|
|
20
20
|
"aria-label": "",
|
|
21
21
|
target: "_blank",
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
exports.getDefaultProps = getDefaultProps;
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
11
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
10
12
|
var _arrayTreeFilter = _interopRequireDefault(require("array-tree-filter"));
|
|
11
13
|
var React = _interopRequireWildcard(require("react"));
|
|
12
14
|
var _Cascader = _interopRequireDefault(require("rmc-cascader/lib/Cascader"));
|
|
@@ -15,8 +17,8 @@ var _MultiPicker = _interopRequireDefault(require("rmc-picker/lib/MultiPicker"))
|
|
|
15
17
|
var _Picker = _interopRequireDefault(require("rmc-picker/lib/Picker"));
|
|
16
18
|
var _getLocale = require("../utils/getLocale");
|
|
17
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
+
const _excluded = ["children", "value", "popupPrefixCls", "itemStyle", "indicatorStyle", "okText", "dismissText", "extra", "cascade", "prefixCls", "pickerPrefixCls", "data", "cols", "onOk"];
|
|
18
21
|
/* tslint:disable:jsx-no-multiline-js */
|
|
19
|
-
|
|
20
22
|
function getDefaultProps() {
|
|
21
23
|
const defaultFormat = values => {
|
|
22
24
|
// label is JSX.Element or other
|
|
@@ -126,23 +128,24 @@ class AbstractPicker extends React.Component {
|
|
|
126
128
|
};
|
|
127
129
|
}
|
|
128
130
|
render() {
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
131
|
+
const _this$props = this.props,
|
|
132
|
+
{
|
|
133
|
+
children,
|
|
134
|
+
value = [],
|
|
135
|
+
popupPrefixCls,
|
|
136
|
+
itemStyle,
|
|
137
|
+
indicatorStyle,
|
|
138
|
+
okText,
|
|
139
|
+
dismissText,
|
|
140
|
+
extra,
|
|
141
|
+
cascade,
|
|
142
|
+
prefixCls,
|
|
143
|
+
pickerPrefixCls,
|
|
144
|
+
data,
|
|
145
|
+
cols,
|
|
146
|
+
onOk
|
|
147
|
+
} = _this$props,
|
|
148
|
+
restProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
146
149
|
|
|
147
150
|
// tslint:disable-next-line:variable-name
|
|
148
151
|
const _locale = (0, _getLocale.getComponentLocale)(this.props, this.context, 'Picker', () => require('./locale/zh_CN'));
|
|
@@ -174,21 +177,20 @@ class AbstractPicker extends React.Component {
|
|
|
174
177
|
pickerValueChangeProp: 'onValueChange'
|
|
175
178
|
};
|
|
176
179
|
}
|
|
177
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Popup.default, {
|
|
178
|
-
cascader: cascader
|
|
179
|
-
|
|
180
|
-
...restProps,
|
|
180
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Popup.default, (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
181
|
+
cascader: cascader
|
|
182
|
+
}, this.popupProps), restProps), {}, {
|
|
181
183
|
prefixCls: popupPrefixCls,
|
|
182
184
|
value: value,
|
|
183
185
|
dismissText: dismissText || _locale.dismissText,
|
|
184
|
-
okText: okText || _locale.okText
|
|
185
|
-
|
|
186
|
+
okText: okText || _locale.okText
|
|
187
|
+
}, popupMoreProps), {}, {
|
|
186
188
|
ref: this.fixOnOk,
|
|
187
189
|
onVisibleChange: this.onVisibleChange,
|
|
188
190
|
children: children && typeof children !== 'string' && /*#__PURE__*/React.isValidElement(children) && /*#__PURE__*/React.cloneElement(children, {
|
|
189
191
|
extra: this.getSel() || extra || _locale.extra
|
|
190
192
|
})
|
|
191
|
-
});
|
|
193
|
+
}));
|
|
192
194
|
}
|
|
193
195
|
}
|
|
194
196
|
exports.default = AbstractPicker;
|
package/lib/Popover/index.js
CHANGED
|
@@ -6,11 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
9
11
|
var React = _interopRequireWildcard(require("react"));
|
|
10
12
|
var _rmcTooltip = _interopRequireDefault(require("rmc-tooltip"));
|
|
11
13
|
var _item = _interopRequireDefault(require("./item"));
|
|
12
14
|
require("./style/index.css");
|
|
13
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
+
const _excluded = ["overlay", "onSelect"];
|
|
14
17
|
function recursiveCloneChildren(children) {
|
|
15
18
|
let cb = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (ch, _) => ch;
|
|
16
19
|
return React.Children.map(children, (child, index) => {
|
|
@@ -23,11 +26,12 @@ function recursiveCloneChildren(children) {
|
|
|
23
26
|
}
|
|
24
27
|
class Popover extends React.Component {
|
|
25
28
|
render() {
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
const _this$props = this.props,
|
|
30
|
+
{
|
|
31
|
+
overlay,
|
|
32
|
+
onSelect = () => {}
|
|
33
|
+
} = _this$props,
|
|
34
|
+
restProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
31
35
|
const overlayNode = recursiveCloneChildren(overlay, (child, index) => {
|
|
32
36
|
const extraProps = {
|
|
33
37
|
firstItem: false
|
|
@@ -42,13 +46,12 @@ class Popover extends React.Component {
|
|
|
42
46
|
return child;
|
|
43
47
|
});
|
|
44
48
|
const wrapperNode = /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
45
|
-
className:
|
|
49
|
+
className: "".concat(this.props.prefixCls, "-inner-wrapper"),
|
|
46
50
|
children: overlayNode
|
|
47
51
|
});
|
|
48
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcTooltip.default, {
|
|
49
|
-
...restProps,
|
|
52
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcTooltip.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, restProps), {}, {
|
|
50
53
|
overlay: wrapperNode
|
|
51
|
-
});
|
|
54
|
+
}));
|
|
52
55
|
}
|
|
53
56
|
}
|
|
54
57
|
exports.default = Popover;
|
package/lib/Popover/item.js
CHANGED
|
@@ -1,56 +1,60 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
9
11
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
12
|
var React = _interopRequireWildcard(require("react"));
|
|
11
13
|
var _rmcFeedback = _interopRequireDefault(require("rmc-feedback"));
|
|
12
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
const _excluded = ["children", "className", "prefixCls", "icon", "disabled", "firstItem", "activeStyle"];
|
|
13
16
|
class Item extends React.Component {
|
|
14
17
|
render() {
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
const _this$props = this.props,
|
|
19
|
+
{
|
|
20
|
+
children,
|
|
21
|
+
className,
|
|
22
|
+
prefixCls,
|
|
23
|
+
icon,
|
|
24
|
+
disabled,
|
|
25
|
+
firstItem,
|
|
26
|
+
activeStyle
|
|
27
|
+
} = _this$props,
|
|
28
|
+
restProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
29
|
+
const cls = (0, _classnames.default)("".concat(prefixCls, "-item"), className, {
|
|
30
|
+
["".concat(prefixCls, "-item-disabled")]: disabled
|
|
27
31
|
});
|
|
28
|
-
let activeClass =
|
|
32
|
+
let activeClass = "".concat(prefixCls, "-item-active ");
|
|
29
33
|
if (firstItem) {
|
|
30
|
-
activeClass +=
|
|
34
|
+
activeClass += "".concat(prefixCls, "-item-fix-active-arrow");
|
|
31
35
|
}
|
|
32
36
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcFeedback.default, {
|
|
33
37
|
disabled: disabled,
|
|
34
38
|
activeClassName: activeClass,
|
|
35
39
|
activeStyle: activeStyle,
|
|
36
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
37
|
-
className: cls
|
|
38
|
-
|
|
40
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
41
|
+
className: cls
|
|
42
|
+
}, restProps), {}, {
|
|
39
43
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
40
|
-
className:
|
|
44
|
+
className: "".concat(prefixCls, "-item-container"),
|
|
41
45
|
children: [icon ?
|
|
42
46
|
/*#__PURE__*/
|
|
43
47
|
// tslint:disable-next-line:jsx-no-multiline-js
|
|
44
48
|
(0, _jsxRuntime.jsx)("span", {
|
|
45
|
-
className:
|
|
49
|
+
className: "".concat(prefixCls, "-item-icon"),
|
|
46
50
|
"aria-hidden": "true",
|
|
47
51
|
children: icon
|
|
48
52
|
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
49
|
-
className:
|
|
53
|
+
className: "".concat(prefixCls, "-item-content"),
|
|
50
54
|
children: children
|
|
51
55
|
})]
|
|
52
56
|
})
|
|
53
|
-
})
|
|
57
|
+
}))
|
|
54
58
|
});
|
|
55
59
|
}
|
|
56
60
|
}
|
package/lib/Progress/index.js
CHANGED
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
9
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
11
|
var React = _interopRequireWildcard(require("react"));
|
|
11
12
|
require("./index.css");
|
|
@@ -18,7 +19,7 @@ class Progress extends React.Component {
|
|
|
18
19
|
if (this.props.appearTransition) {
|
|
19
20
|
setTimeout(() => {
|
|
20
21
|
if (this.barRef) {
|
|
21
|
-
this.barRef.style.width =
|
|
22
|
+
this.barRef.style.width = "".concat(this.props.percent, "%");
|
|
22
23
|
}
|
|
23
24
|
}, 10);
|
|
24
25
|
}
|
|
@@ -33,12 +34,12 @@ class Progress extends React.Component {
|
|
|
33
34
|
barStyle = {}
|
|
34
35
|
} = this.props;
|
|
35
36
|
const percentStyle = {
|
|
36
|
-
width: this.noAppearTransition || !this.props.appearTransition ?
|
|
37
|
+
width: this.noAppearTransition || !this.props.appearTransition ? "".concat(this.props.percent, "%") : 0,
|
|
37
38
|
height: 0
|
|
38
39
|
};
|
|
39
|
-
const wrapCls = (0, _classnames.default)(
|
|
40
|
-
[
|
|
41
|
-
[
|
|
40
|
+
const wrapCls = (0, _classnames.default)("".concat(prefixCls, "-outer"), className, {
|
|
41
|
+
["".concat(prefixCls, "-fixed-outer")]: position === 'fixed',
|
|
42
|
+
["".concat(prefixCls, "-hide-outer")]: !unfilled
|
|
42
43
|
});
|
|
43
44
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
44
45
|
style: style,
|
|
@@ -49,11 +50,8 @@ class Progress extends React.Component {
|
|
|
49
50
|
"aria-valuemax": 100,
|
|
50
51
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
51
52
|
ref: el => this.barRef = el,
|
|
52
|
-
className:
|
|
53
|
-
style: {
|
|
54
|
-
...barStyle,
|
|
55
|
-
...percentStyle
|
|
56
|
-
}
|
|
53
|
+
className: "".concat(prefixCls, "-bar"),
|
|
54
|
+
style: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, barStyle), percentStyle)
|
|
57
55
|
})
|
|
58
56
|
});
|
|
59
57
|
}
|