dtable-ui-component 6.0.91 → 6.0.93
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 +96 -70
- package/lib/ActivityIndicator/index.js +41 -33
- package/lib/AsyncUserSelect/index.css +122 -0
- package/lib/AsyncUserSelect/index.js +260 -0
- package/lib/AsyncUserSelect/user-item.js +55 -0
- package/lib/AutoNumberFormatter/index.js +5 -3
- package/lib/Badge/index.js +22 -18
- package/lib/ButtonFormatter/index.js +15 -10
- package/lib/CTimeFormatter/index.js +5 -3
- package/lib/CheckboxEditor/index.js +22 -13
- package/lib/CheckboxEditor/mb-editor.js +8 -6
- package/lib/CheckboxEditor/pc-editor.js +8 -6
- package/lib/CheckboxFormatter/index.js +8 -6
- package/lib/CollaboratorEditor/index.js +24 -15
- package/lib/CollaboratorEditor/mb-editor/index.js +19 -13
- package/lib/CollaboratorEditor/pc-editor/index.js +51 -43
- package/lib/CollaboratorFormatter/index.js +8 -7
- package/lib/CollaboratorItem/index.js +21 -16
- package/lib/CollapsibleSettingLayout/index.css +0 -5
- package/lib/CollapsibleSettingLayout/index.js +17 -12
- package/lib/Comment/body/comment.js +79 -63
- package/lib/Comment/body/index.js +14 -11
- package/lib/Comment/footer/btns/index.js +68 -53
- package/lib/Comment/footer/index.js +30 -28
- package/lib/Comment/footer/input/index.js +49 -44
- package/lib/Comment/footer/input/participant/index.js +19 -14
- package/lib/Comment/footer/participants/index.js +31 -28
- package/lib/Comment/footer/participants/participant/index.js +18 -15
- package/lib/Comment/footer/participants/participant-select/index.js +68 -57
- package/lib/Comment/index.js +33 -28
- package/lib/Comment/utils/utilities.js +1 -1
- package/lib/CreatorFormatter/index.js +8 -7
- package/lib/DTableColorPicker/ColorPickerPortal/index.js +60 -35
- package/lib/DTableColorPicker/index.js +135 -99
- package/lib/DTableColorPicker/utils.js +1 -1
- package/lib/DTableCommonAddTool/index.js +11 -8
- package/lib/DTableCustomFooter/index.js +5 -3
- package/lib/DTableCustomizeCollaboratorSelect/index.css +1 -39
- package/lib/DTableCustomizeCollaboratorSelect/index.js +38 -32
- package/lib/DTableCustomizeSelect/index.js +51 -44
- package/lib/DTableEmptyTip/index.js +20 -16
- package/lib/DTableFiltersPopover/index.js +71 -61
- package/lib/DTableFiltersPopover/utils/filter-item-utils.js +74 -57
- package/lib/DTableFiltersPopover/utils/index.js +1 -1
- package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +64 -49
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +49 -41
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +57 -47
- package/lib/DTableFiltersPopover/widgets/filter-calendar.js +35 -31
- package/lib/DTableFiltersPopover/widgets/filter-group.js +38 -32
- package/lib/DTableFiltersPopover/widgets/filter-item.js +125 -106
- package/lib/DTableFiltersPopover/widgets/filter-list/index.css +1 -5
- package/lib/DTableFiltersPopover/widgets/filter-list/index.js +18 -17
- package/lib/DTableFiltersPopover/widgets/rate-item.js +12 -9
- package/lib/DTableGroupSelect/index.js +52 -44
- package/lib/DTableGroupSelect/option.js +5 -3
- package/lib/DTableGroupSelect/select-option-group.css +0 -37
- package/lib/DTableGroupSelect/select-option-group.js +31 -25
- package/lib/DTableModalHeader/index.js +13 -9
- package/lib/DTablePopover/index.js +9 -6
- package/lib/DTableRadio/index.js +20 -17
- package/lib/DTableRadioGroup/index.js +22 -19
- package/lib/DTableSearchInput/index.js +23 -19
- package/lib/DTableSelect/dtable-select-label.js +12 -7
- package/lib/DTableSelect/index.js +2 -1
- package/lib/DTableSelect/utils.js +34 -20
- package/lib/DTableSwitch/index.css +1 -2
- package/lib/DTableSwitch/index.js +30 -18
- package/lib/DateEditor/index.js +25 -16
- package/lib/DateEditor/mb-editor/index.js +90 -68
- package/lib/DateEditor/pc-editor.js +39 -35
- package/lib/DateFormatter/index.js +5 -3
- package/lib/DatePicker/utils.js +4 -4
- package/lib/DeleteTip/index.js +29 -20
- package/lib/DepartmentMultipleSelectEditor/index.js +57 -49
- package/lib/DepartmentSelectFilter/index.js +8 -1
- package/lib/DepartmentSingleSelectEditor/index.js +22 -13
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +75 -55
- package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +78 -61
- package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +14 -11
- package/lib/DepartmentSingleSelectFormatter/index.js +13 -10
- package/lib/DigitalSignEditor/index.js +22 -13
- package/lib/DigitalSignEditor/mb-editor/index.js +39 -24
- package/lib/DigitalSignEditor/pc-editor/index.js +44 -30
- package/lib/DigitalSignEditor/service.js +1 -1
- package/lib/DigitalSignEditor/signature-board/index.js +21 -17
- package/lib/DigitalSignFormatter/index.js +23 -19
- package/lib/DigitalSignFormatter/utils.js +1 -1
- package/lib/Drawer/index.js +4 -1
- package/lib/DurationEditor/index.js +2 -1
- package/lib/DurationFormatter/index.js +5 -3
- package/lib/EditEditorButton/index.js +5 -3
- package/lib/EmailEditor/index.js +2 -1
- package/lib/EmailFormatter/index.js +5 -3
- package/lib/FieldDisplaySetting/field-item.js +26 -20
- package/lib/FieldDisplaySetting/index.css +0 -6
- package/lib/FieldDisplaySetting/index.js +50 -41
- package/lib/FileEditor/files-previewer/index.js +22 -13
- package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +43 -28
- package/lib/FileEditor/files-previewer/mb-previewer/index.js +24 -21
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/dropdown-menu.js +30 -24
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/file-name-editor/index.js +13 -11
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +82 -64
- package/lib/FileEditor/files-previewer/pc-previewer/index.js +81 -65
- package/lib/FileEditor/index.js +22 -13
- package/lib/FileEditor/mb-editor/index.js +43 -31
- package/lib/FileEditor/pc-editor/addition-previewer/index.js +27 -20
- package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +108 -82
- package/lib/FileEditor/pc-editor/index.js +46 -36
- package/lib/FileFormatter/index.js +40 -36
- package/lib/FileItemFormatter/index.js +3 -2
- package/lib/FileUploader/index.js +23 -21
- package/lib/FormulaFormatter/index.js +24 -17
- package/lib/GeolocationEditor/index.js +31 -22
- package/lib/GeolocationEditor/map-editor-utils.js +2 -2
- package/lib/GeolocationEditor/mb-editor/country-editor.js +42 -27
- package/lib/GeolocationEditor/mb-editor/index.js +22 -14
- package/lib/GeolocationEditor/mb-editor/location-editor.js +54 -34
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +102 -74
- package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +144 -110
- package/lib/GeolocationEditor/mb-editor/province-city-editor.js +42 -27
- package/lib/GeolocationEditor/mb-editor/province-editor.js +42 -27
- package/lib/GeolocationEditor/pc-editor/country-editor.js +38 -31
- package/lib/GeolocationEditor/pc-editor/index.js +26 -17
- package/lib/GeolocationEditor/pc-editor/location-editor.js +122 -96
- package/lib/GeolocationEditor/pc-editor/map-editor/index.js +99 -74
- package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +99 -76
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +139 -94
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +122 -85
- package/lib/GeolocationEditor/pc-editor/province-city-editor.js +89 -69
- package/lib/GeolocationEditor/pc-editor/province-editor.js +31 -26
- package/lib/GeolocationEditor/pc-editor/selector-header-item.js +9 -5
- package/lib/GeolocationEditor/pc-editor/selector-list.js +15 -13
- package/lib/GeolocationFormatter/index.js +5 -3
- package/lib/HtmlLongTextFormatter/index.js +3 -2
- package/lib/Icon/index.js +9 -6
- package/lib/Icon/load-sprite.js +13 -2
- package/lib/IconButton/index.js +9 -6
- package/lib/ImageEditor/images-previewer/image-preview/index.js +53 -45
- package/lib/ImageEditor/images-previewer/index.js +35 -32
- package/lib/ImageEditor/index.js +22 -13
- package/lib/ImageEditor/mb-editor/index.js +43 -31
- package/lib/ImageEditor/pc-editor/addition-previewer/image-link/index.js +19 -15
- package/lib/ImageEditor/pc-editor/addition-previewer/index.js +32 -24
- package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +102 -77
- package/lib/ImageEditor/pc-editor/images-previewer/index.js +33 -30
- package/lib/ImageEditor/pc-editor/index.js +44 -32
- package/lib/ImageFormatter/images-lazy-load.js +12 -10
- package/lib/ImageFormatter/index.js +40 -34
- package/lib/ImagePreviewerLightbox/index.js +12 -8
- package/lib/ImageThumbnail/index.js +47 -39
- package/lib/InputItem/custom-input.js +32 -27
- package/lib/InputItem/custom-keyboard.js +68 -47
- package/lib/InputItem/index.js +81 -71
- package/lib/InputItem/input.js +5 -3
- package/lib/LastModifierFormatter/index.js +8 -7
- package/lib/LinkEditor/index.js +38 -32
- package/lib/LinkEditor/link-editor-option.js +25 -20
- package/lib/LinkEditor/mb-popover/index.js +53 -41
- package/lib/LinkEditor/pc-popover/index.js +41 -33
- package/lib/LinkFormatter/index.js +13 -10
- package/lib/List/index.js +15 -9
- package/lib/List/list-item.js +51 -42
- package/lib/Loading/index.js +2 -1
- package/lib/LongTextFormatter/index.js +3 -2
- package/lib/MBEditorHeader/index.js +19 -14
- package/lib/MTimeFormatter/index.js +5 -3
- package/lib/MobileFullScreenPage/body/index.js +6 -4
- package/lib/MobileFullScreenPage/header/index.js +22 -17
- package/lib/MobileFullScreenPage/index.js +11 -8
- package/lib/MobileModal/index.js +6 -3
- package/lib/MobileOperationSheet/index.js +28 -18
- package/lib/MobileSelector/empty/index.js +5 -3
- package/lib/MobileSelector/index.js +18 -12
- package/lib/MobileSelector/option/index.js +17 -12
- package/lib/MobileSelector/options/index.js +5 -3
- package/lib/MobileSelector/search/index.js +10 -8
- package/lib/MobileUpload/index.js +87 -67
- package/lib/Modal/alert.js +9 -6
- package/lib/Modal/modal.js +26 -22
- package/lib/Modal/operation.js +2 -1
- package/lib/Modal/prompt.js +76 -56
- package/lib/MultipleSelectEditor/index.js +4 -2
- package/lib/MultipleSelectFormatter/index.js +8 -7
- package/lib/NotificationPopover/index.js +43 -32
- package/lib/NumberEditor/index.js +2 -1
- package/lib/NumberFormatter/index.js +5 -3
- package/lib/Picker/AbstractPicker.js +26 -22
- package/lib/Picker/index.js +2 -1
- package/lib/Popover/index.js +8 -5
- package/lib/Popover/item.js +26 -19
- package/lib/Progress/index.js +17 -15
- package/lib/Radio/Radio.js +12 -8
- package/lib/Radio/RadioItem.js +11 -5
- package/lib/RateFormatter/index.js +8 -7
- package/lib/RoleStatusEditor/index.js +36 -31
- package/lib/RowExpand/index.js +16 -9
- package/lib/RowExpandDialog/body/index.js +53 -42
- package/lib/RowExpandDialog/column-content/index.js +34 -25
- package/lib/RowExpandDialog/header/index.js +29 -22
- package/lib/RowExpandDialog/index.js +43 -30
- package/lib/RowExpandEditor/add-btn/index.js +16 -9
- package/lib/RowExpandEditor/add-btn/mb-add-btn/index.js +5 -3
- package/lib/RowExpandEditor/add-btn/pc-add-btn/index.js +8 -5
- package/lib/RowExpandEditor/checkbox-editor/index.js +16 -9
- package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +10 -8
- package/lib/RowExpandEditor/checkbox-editor/pc-editor.js +2 -1
- package/lib/RowExpandEditor/collaborator-editor/index.js +16 -9
- package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +19 -17
- package/lib/RowExpandEditor/collaborator-editor/pc-editor/index.js +52 -47
- package/lib/RowExpandEditor/date-editor/index.js +16 -9
- package/lib/RowExpandEditor/date-editor/mb-editor.js +20 -15
- package/lib/RowExpandEditor/date-editor/pc-editor.js +24 -21
- package/lib/RowExpandEditor/department-editor/index.js +16 -9
- package/lib/RowExpandEditor/department-editor/mb-editor.js +27 -22
- package/lib/RowExpandEditor/department-editor/pc-editor.js +35 -29
- package/lib/RowExpandEditor/digital-sign-editor/index.js +16 -9
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +19 -16
- package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +34 -32
- package/lib/RowExpandEditor/duration-editor/index.js +16 -9
- package/lib/RowExpandEditor/duration-editor/mb-editor.js +15 -12
- package/lib/RowExpandEditor/duration-editor/pc-editor.js +17 -13
- package/lib/RowExpandEditor/email-editor/index.js +16 -9
- package/lib/RowExpandEditor/email-editor/mb-editor/index.js +20 -18
- package/lib/RowExpandEditor/email-editor/pc-editor/index.js +21 -19
- package/lib/RowExpandEditor/file-editor/index.js +16 -9
- package/lib/RowExpandEditor/file-editor/mb-editor/index.js +21 -16
- package/lib/RowExpandEditor/file-editor/pc-editor/index.js +22 -20
- package/lib/RowExpandEditor/geolocation-editor/index.js +16 -9
- package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +12 -9
- package/lib/RowExpandEditor/geolocation-editor/pc-editor/index.js +20 -17
- package/lib/RowExpandEditor/image-editor/index.js +16 -9
- package/lib/RowExpandEditor/image-editor/mb-editor/index.js +21 -16
- package/lib/RowExpandEditor/image-editor/pc-editor/index.js +29 -25
- package/lib/RowExpandEditor/index.js +4 -2
- package/lib/RowExpandEditor/long-text-editor/index.js +16 -9
- package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +27 -16
- package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +19 -16
- package/lib/RowExpandEditor/long-text-editor/pc-editor/index.js +22 -18
- package/lib/RowExpandEditor/multiple-select-editor/index.js +16 -9
- package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +26 -23
- package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +82 -68
- package/lib/RowExpandEditor/number-editor/index.js +16 -9
- package/lib/RowExpandEditor/number-editor/mb-editor/index.js +10 -7
- package/lib/RowExpandEditor/number-editor/pc-editor.js +6 -4
- package/lib/RowExpandEditor/rate-editor/index.js +16 -9
- package/lib/RowExpandEditor/rate-editor/mb-editor.js +10 -8
- package/lib/RowExpandEditor/rate-editor/pc-editor.js +12 -10
- package/lib/RowExpandEditor/right-angle/index.js +8 -6
- package/lib/RowExpandEditor/single-select-editor/index.js +16 -9
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +30 -23
- package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +43 -35
- package/lib/RowExpandEditor/text-editor/index.js +16 -9
- package/lib/RowExpandEditor/text-editor/mb-editor/index.js +11 -9
- package/lib/RowExpandEditor/text-editor/pc-editor/index.js +16 -12
- package/lib/RowExpandEditor/url-editor/index.js +16 -9
- package/lib/RowExpandEditor/url-editor/mb-editor/index.js +20 -18
- package/lib/RowExpandEditor/url-editor/pc-editor/index.js +21 -19
- package/lib/RowExpandFormatter/department-formatter/index.js +14 -5
- package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +2 -1
- package/lib/RowExpandFormatter/department-formatter/pc-formatter.js +15 -11
- package/lib/RowExpandFormatter/email-formatter/index.js +12 -9
- package/lib/RowExpandFormatter/file-formatter/index.js +15 -14
- package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +43 -36
- package/lib/RowExpandFormatter/formula-formatter/index.js +41 -33
- package/lib/RowExpandFormatter/image-formatter/index.js +30 -27
- package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +47 -39
- package/lib/RowExpandFormatter/index.js +132 -115
- package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +3 -2
- package/lib/RowExpandFormatter/link-formatter/index.js +70 -67
- package/lib/RowExpandFormatter/rate-formatter/index.js +8 -7
- package/lib/RowExpandFormatter/url-formatter/index.js +12 -9
- package/lib/RowExpandView/body/index.js +39 -33
- package/lib/RowExpandView/column-content/index.js +10 -5
- package/lib/RowExpandView/index.js +27 -16
- package/lib/SelectItem/index.js +16 -12
- package/lib/SelectOptionGroup/index.css +4 -2
- package/lib/SelectOptionGroup/index.js +39 -32
- package/lib/SelectOptionGroup/option.js +5 -3
- package/lib/SelectedDepartments/index.js +54 -44
- package/lib/SimpleLongTextFormatter/index.js +39 -30
- package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +11 -8
- package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +3 -2
- package/lib/SingleSelectEditor/index.js +4 -2
- package/lib/SingleSelectFormatter/index.js +6 -4
- package/lib/SvgIcon/index.js +5 -2
- package/lib/TabBar/Tab.js +28 -21
- package/lib/TabBar/index.js +28 -24
- package/lib/Tabs/index.js +8 -5
- package/lib/TextEditor/index.js +21 -18
- package/lib/TextFormatter/index.js +5 -3
- package/lib/TextareaItem/index.js +49 -40
- package/lib/Toast/index.js +20 -14
- package/lib/UploadProgress/index.js +2 -1
- package/lib/UrlEditor/index.js +2 -1
- package/lib/UrlFormatter/index.js +5 -3
- package/lib/formatterConfig/base-formatter-config.js +24 -23
- package/lib/formatterConfig/index.js +3 -2
- package/lib/index.js +7 -0
- package/lib/locales/de.json +5 -1
- package/lib/locales/en.json +5 -1
- package/lib/locales/es.json +6 -2
- package/lib/locales/fr.json +5 -1
- package/lib/locales/pt.json +5 -1
- package/lib/locales/ru.json +5 -1
- package/lib/locales/zh-CN.json +5 -1
- package/lib/select-editor/index.js +22 -13
- package/lib/select-editor/mb-editor/index.js +22 -16
- package/lib/select-editor/pc-editor/index.js +75 -61
- package/lib/toaster/alert.js +25 -16
- package/lib/toaster/toast.js +27 -23
- package/lib/toaster/toastManager.js +17 -14
- package/lib/toaster/toaster.js +4 -1
- package/lib/utils/class.js +3 -3
- package/lib/utils/object-utils.js +1 -1
- package/lib/utils/url.js +4 -4
- package/package.json +13 -29
|
@@ -13,6 +13,7 @@ var _header = _interopRequireDefault(require("./header"));
|
|
|
13
13
|
var _body = _interopRequireDefault(require("./body"));
|
|
14
14
|
var _utils = require("../utils/utils");
|
|
15
15
|
require("./index.css");
|
|
16
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
17
|
const MobileFullScreenPage = _ref => {
|
|
17
18
|
let {
|
|
18
19
|
classNamePrefix,
|
|
@@ -59,14 +60,16 @@ const MobileFullScreenPage = _ref => {
|
|
|
59
60
|
};
|
|
60
61
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
61
62
|
}, []);
|
|
62
|
-
return /*#__PURE__*/
|
|
63
|
-
node: element
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
63
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_BodyPortal.default, {
|
|
64
|
+
node: element,
|
|
65
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
66
|
+
className: (0, _classnames.default)('dtable-ui-mobile-full-screen-page', className, {
|
|
67
|
+
[`${classNamePrefix}-mobile-full-screen-page`]: classNamePrefix
|
|
68
|
+
}),
|
|
69
|
+
style: style,
|
|
70
|
+
children: isMount && children
|
|
71
|
+
})
|
|
72
|
+
});
|
|
70
73
|
};
|
|
71
74
|
MobileFullScreenPage.Header = _header.default;
|
|
72
75
|
MobileFullScreenPage.Body = _body.default;
|
package/lib/MobileModal/index.js
CHANGED
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _Modal = _interopRequireDefault(require("../Modal"));
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
11
|
class MobileModal extends _react.default.PureComponent {
|
|
11
12
|
constructor() {
|
|
12
13
|
super(...arguments);
|
|
@@ -27,9 +28,11 @@ class MobileModal extends _react.default.PureComponent {
|
|
|
27
28
|
children,
|
|
28
29
|
...props
|
|
29
30
|
} = this.props;
|
|
30
|
-
return /*#__PURE__*/
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Modal.default, {
|
|
32
|
+
...props,
|
|
33
|
+
popup: true,
|
|
34
|
+
children: children
|
|
35
|
+
});
|
|
33
36
|
}
|
|
34
37
|
}
|
|
35
38
|
MobileModal.defaultProps = {
|
|
@@ -10,6 +10,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
10
10
|
var _ActionSheet = _interopRequireDefault(require("../ActionSheet"));
|
|
11
11
|
var _lang = require("../lang");
|
|
12
12
|
require("./index.css");
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
14
|
const OPERATION_TYPE = exports.OPERATION_TYPE = {
|
|
14
15
|
RENAME: 'rename',
|
|
15
16
|
DOWNLOAD: 'download',
|
|
@@ -28,34 +29,43 @@ const MobileOperationSheet = _ref => {
|
|
|
28
29
|
let _btns = [];
|
|
29
30
|
if (operations.includes(OPERATION_TYPE.RENAME)) {
|
|
30
31
|
_btns.push({
|
|
31
|
-
dom: /*#__PURE__*/
|
|
32
|
-
className: "my-am-action"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
dom: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
33
|
+
className: "my-am-action",
|
|
34
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
35
|
+
"aria-hidden": "true",
|
|
36
|
+
className: "dtable-font dtable-icon-rename"
|
|
37
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
38
|
+
children: (0, _lang.getLocale)('Rename')
|
|
39
|
+
})]
|
|
40
|
+
}),
|
|
37
41
|
value: OPERATION_TYPE.RENAME
|
|
38
42
|
});
|
|
39
43
|
}
|
|
40
44
|
if (operations.includes(OPERATION_TYPE.DOWNLOAD)) {
|
|
41
45
|
_btns.push({
|
|
42
|
-
dom: /*#__PURE__*/
|
|
43
|
-
className: "my-am-action"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
dom: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
47
|
+
className: "my-am-action",
|
|
48
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
49
|
+
"aria-hidden": "true",
|
|
50
|
+
className: "dtable-font dtable-icon-download"
|
|
51
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
52
|
+
children: (0, _lang.getLocale)('Download')
|
|
53
|
+
})]
|
|
54
|
+
}),
|
|
48
55
|
value: OPERATION_TYPE.DOWNLOAD
|
|
49
56
|
});
|
|
50
57
|
}
|
|
51
58
|
if (operations.includes(OPERATION_TYPE.DELETE)) {
|
|
52
59
|
_btns.push({
|
|
53
|
-
dom: /*#__PURE__*/
|
|
54
|
-
className: "my-am-action"
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
dom: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
61
|
+
className: "my-am-action",
|
|
62
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
63
|
+
"aria-hidden": "true",
|
|
64
|
+
className: "dtable-font dtable-icon-delete"
|
|
65
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
66
|
+
children: (0, _lang.getLocale)('Delete')
|
|
67
|
+
})]
|
|
68
|
+
}),
|
|
59
69
|
value: OPERATION_TYPE.DELETE
|
|
60
70
|
});
|
|
61
71
|
}
|
|
@@ -9,13 +9,15 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
10
|
var _List = _interopRequireDefault(require("../../List"));
|
|
11
11
|
require("./index.css");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
const Empty = _ref => {
|
|
13
14
|
let {
|
|
14
15
|
children
|
|
15
16
|
} = _ref;
|
|
16
|
-
return /*#__PURE__*/
|
|
17
|
-
className: "dtable-ui-mobile-selector-no-options"
|
|
18
|
-
|
|
17
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_List.default.Item, {
|
|
18
|
+
className: "dtable-ui-mobile-selector-no-options",
|
|
19
|
+
children: children
|
|
20
|
+
});
|
|
19
21
|
};
|
|
20
22
|
Empty.propType = {
|
|
21
23
|
children: _propTypes.default.any
|
|
@@ -15,6 +15,7 @@ var _options = _interopRequireDefault(require("./options"));
|
|
|
15
15
|
var _option = _interopRequireDefault(require("./option"));
|
|
16
16
|
var _empty = _interopRequireDefault(require("./empty"));
|
|
17
17
|
require("./index.css");
|
|
18
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
19
|
const MobileSelector = _ref => {
|
|
19
20
|
let {
|
|
20
21
|
className,
|
|
@@ -35,20 +36,25 @@ const MobileSelector = _ref => {
|
|
|
35
36
|
};
|
|
36
37
|
}, [handleHistoryBack]);
|
|
37
38
|
const renderHeader = (0, _react.useCallback)(() => {
|
|
38
|
-
return /*#__PURE__*/
|
|
39
|
-
className: "position-relative"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
40
|
+
className: "position-relative",
|
|
41
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
42
|
+
children: title
|
|
43
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
44
|
+
className: "mobile-selector-editor-close-btn dtable-font dtable-icon-x",
|
|
45
|
+
onClick: onClose
|
|
46
|
+
})]
|
|
47
|
+
});
|
|
44
48
|
}, [title, onClose]);
|
|
45
|
-
return /*#__PURE__*/
|
|
49
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_MobileModal.default, {
|
|
46
50
|
onClose: onClose,
|
|
47
|
-
className: className
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
className: className,
|
|
52
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_List.default, {
|
|
53
|
+
renderHeader: renderHeader,
|
|
54
|
+
className: (0, _classnames.default)('popup-list dtable-ui-mobile-selector', listClassName),
|
|
55
|
+
children: children
|
|
56
|
+
})
|
|
57
|
+
});
|
|
52
58
|
};
|
|
53
59
|
MobileSelector.Search = _search.default;
|
|
54
60
|
MobileSelector.Option = _option.default;
|
|
@@ -9,24 +9,29 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
10
|
var _List = _interopRequireDefault(require("../../List"));
|
|
11
11
|
require("./index.css");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
const Option = _ref => {
|
|
13
14
|
let {
|
|
14
15
|
isSelected,
|
|
15
16
|
children,
|
|
16
17
|
onChange
|
|
17
18
|
} = _ref;
|
|
18
|
-
return /*#__PURE__*/
|
|
19
|
-
onClick: onChange
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_List.default.Item, {
|
|
20
|
+
onClick: onChange,
|
|
21
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
22
|
+
className: "dtable-ui-mobile-selector-option",
|
|
23
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
24
|
+
className: "dtable-ui-mobile-selector-option-name",
|
|
25
|
+
children: children
|
|
26
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
27
|
+
className: "dtable-ui-mobile-selector-option-check-btn",
|
|
28
|
+
children: isSelected && /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
29
|
+
"aria-hidden": "true",
|
|
30
|
+
className: "dtable-font dtable-icon-check-mark"
|
|
31
|
+
})
|
|
32
|
+
})]
|
|
33
|
+
})
|
|
34
|
+
});
|
|
30
35
|
};
|
|
31
36
|
Option.propType = {
|
|
32
37
|
isSelected: _propTypes.default.bool,
|
|
@@ -7,12 +7,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
require("./index.css");
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
11
|
const Options = _ref => {
|
|
11
12
|
let {
|
|
12
13
|
children
|
|
13
14
|
} = _ref;
|
|
14
|
-
return /*#__PURE__*/
|
|
15
|
-
className: "dtable-ui-mobile-selector-options"
|
|
16
|
-
|
|
15
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
16
|
+
className: "dtable-ui-mobile-selector-options",
|
|
17
|
+
children: children
|
|
18
|
+
});
|
|
17
19
|
};
|
|
18
20
|
var _default = exports.default = Options;
|
|
@@ -8,19 +8,21 @@ exports.default = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _DTableSearchInput = _interopRequireDefault(require("../../DTableSearchInput"));
|
|
10
10
|
require("./index.css");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
12
|
const Search = _ref => {
|
|
12
13
|
let {
|
|
13
14
|
value,
|
|
14
15
|
placeholder,
|
|
15
16
|
onChange
|
|
16
17
|
} = _ref;
|
|
17
|
-
return /*#__PURE__*/
|
|
18
|
-
className: "dtable-ui-mobile-selector-search"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
19
|
+
className: "dtable-ui-mobile-selector-search",
|
|
20
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableSearchInput.default, {
|
|
21
|
+
autoFocus: true,
|
|
22
|
+
value: value,
|
|
23
|
+
placeholder: placeholder,
|
|
24
|
+
onChange: onChange
|
|
25
|
+
})
|
|
26
|
+
});
|
|
25
27
|
};
|
|
26
28
|
var _default = exports.default = Search;
|
|
@@ -10,6 +10,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
10
10
|
var _ActionSheet = _interopRequireDefault(require("../ActionSheet"));
|
|
11
11
|
var _lang = require("../lang");
|
|
12
12
|
require("./index.css");
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
14
|
const MobileUpload = _ref => {
|
|
14
15
|
let {
|
|
15
16
|
type = 'file',
|
|
@@ -25,42 +26,59 @@ const MobileUpload = _ref => {
|
|
|
25
26
|
const iconStyle = {
|
|
26
27
|
lineHeight: '56px'
|
|
27
28
|
};
|
|
28
|
-
if (type === 'image') return [/*#__PURE__*/
|
|
29
|
-
className: "my-am-action d-flex justify-content-between"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
className: "
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
className: "
|
|
48
|
-
|
|
49
|
-
})
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
29
|
+
if (type === 'image') return [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
30
|
+
className: "my-am-action d-flex justify-content-between",
|
|
31
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
32
|
+
children: (0, _lang.getLocale)('Take_a_photo')
|
|
33
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
34
|
+
"aria-hidden": "true",
|
|
35
|
+
className: "dtable-font dtable-icon-camera",
|
|
36
|
+
style: iconStyle
|
|
37
|
+
})]
|
|
38
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
39
|
+
className: "my-am-action d-flex justify-content-between",
|
|
40
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
41
|
+
children: (0, _lang.getLocale)('Browse_documents')
|
|
42
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
43
|
+
"aria-hidden": "true",
|
|
44
|
+
className: "dtable-font dtable-icon-more-level",
|
|
45
|
+
style: iconStyle
|
|
46
|
+
})]
|
|
47
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
48
|
+
className: "my-am-action d-flex justify-content-center",
|
|
49
|
+
children: (0, _lang.getLocale)('Cancel')
|
|
50
|
+
})];
|
|
51
|
+
return [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
52
|
+
className: "my-am-action d-flex justify-content-between",
|
|
53
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
54
|
+
children: (0, _lang.getLocale)('Take_a_photo')
|
|
55
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
56
|
+
"aria-hidden": "true",
|
|
57
|
+
className: "dtable-font dtable-icon-camera",
|
|
58
|
+
style: iconStyle
|
|
59
|
+
})]
|
|
60
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
61
|
+
className: "my-am-action d-flex justify-content-between",
|
|
62
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
63
|
+
children: (0, _lang.getLocale)('Take_a_video')
|
|
64
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
65
|
+
"aria-hidden": "true",
|
|
66
|
+
className: "dtable-font dtable-icon-camera",
|
|
67
|
+
style: iconStyle
|
|
68
|
+
})]
|
|
69
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
70
|
+
className: "my-am-action d-flex justify-content-between",
|
|
71
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
72
|
+
children: (0, _lang.getLocale)('Browse_documents')
|
|
73
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
74
|
+
"aria-hidden": "true",
|
|
75
|
+
className: "dtable-font dtable-icon-more-level",
|
|
76
|
+
style: iconStyle
|
|
77
|
+
})]
|
|
78
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
79
|
+
className: "my-am-action d-flex justify-content-center",
|
|
80
|
+
children: (0, _lang.getLocale)('Cancel')
|
|
81
|
+
})];
|
|
64
82
|
}, [type]);
|
|
65
83
|
const showActionSheet = (0, _react.useCallback)(() => {
|
|
66
84
|
if (type === 'image') {
|
|
@@ -115,46 +133,48 @@ const MobileUpload = _ref => {
|
|
|
115
133
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
116
134
|
}, []);
|
|
117
135
|
if (type === 'image') {
|
|
118
|
-
return /*#__PURE__*/
|
|
119
|
-
className: "h-0 o-hidden"
|
|
120
|
-
|
|
136
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
137
|
+
className: "h-0 o-hidden",
|
|
138
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
139
|
+
type: "file",
|
|
140
|
+
accept: "image/*",
|
|
141
|
+
ref: imageRef,
|
|
142
|
+
multiple: true,
|
|
143
|
+
onClick: onInputClick,
|
|
144
|
+
onChange: handleChange
|
|
145
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
146
|
+
type: "file",
|
|
147
|
+
capture: "camera",
|
|
148
|
+
accept: "image/*",
|
|
149
|
+
ref: cameraRef,
|
|
150
|
+
onClick: onInputClick,
|
|
151
|
+
onChange: handleChange
|
|
152
|
+
})]
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
156
|
+
className: "h-0 o-hidden",
|
|
157
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
121
158
|
type: "file",
|
|
122
|
-
|
|
123
|
-
ref: imageRef,
|
|
159
|
+
ref: fileRef,
|
|
124
160
|
multiple: true,
|
|
125
161
|
onClick: onInputClick,
|
|
126
162
|
onChange: handleChange
|
|
127
|
-
}), /*#__PURE__*/
|
|
163
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
128
164
|
type: "file",
|
|
129
165
|
capture: "camera",
|
|
130
166
|
accept: "image/*",
|
|
131
167
|
ref: cameraRef,
|
|
132
168
|
onClick: onInputClick,
|
|
133
169
|
onChange: handleChange
|
|
134
|
-
}))
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
onChange: handleChange
|
|
144
|
-
}), /*#__PURE__*/_react.default.createElement("input", {
|
|
145
|
-
type: "file",
|
|
146
|
-
capture: "camera",
|
|
147
|
-
accept: "image/*",
|
|
148
|
-
ref: cameraRef,
|
|
149
|
-
onClick: onInputClick,
|
|
150
|
-
onChange: handleChange
|
|
151
|
-
}), /*#__PURE__*/_react.default.createElement("input", {
|
|
152
|
-
type: "file",
|
|
153
|
-
capture: "camcorder",
|
|
154
|
-
accept: "video/*",
|
|
155
|
-
ref: camcorderRef,
|
|
156
|
-
onClick: onInputClick,
|
|
157
|
-
onChange: handleChange
|
|
158
|
-
}));
|
|
170
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
171
|
+
type: "file",
|
|
172
|
+
capture: "camcorder",
|
|
173
|
+
accept: "video/*",
|
|
174
|
+
ref: camcorderRef,
|
|
175
|
+
onClick: onInputClick,
|
|
176
|
+
onChange: handleChange
|
|
177
|
+
})]
|
|
178
|
+
});
|
|
159
179
|
};
|
|
160
180
|
var _default = exports.default = MobileUpload;
|
package/lib/Modal/alert.js
CHANGED
|
@@ -10,6 +10,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
10
10
|
var _client = require("react-dom/client");
|
|
11
11
|
var _closest = _interopRequireDefault(require("../utils/closest"));
|
|
12
12
|
var _modal = _interopRequireDefault(require("./modal"));
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
14
|
function alert(title, message) {
|
|
14
15
|
let actions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [{
|
|
15
16
|
text: '确定'
|
|
@@ -58,12 +59,12 @@ function alert(title, message) {
|
|
|
58
59
|
if (!/iPhone|iPod|iPad/i.test(navigator.userAgent)) {
|
|
59
60
|
return;
|
|
60
61
|
}
|
|
61
|
-
const pNode = (0, _closest.default)(e.target,
|
|
62
|
+
const pNode = (0, _closest.default)(e.target, `.${prefixCls}-footer`);
|
|
62
63
|
if (!pNode) {
|
|
63
64
|
e.preventDefault();
|
|
64
65
|
}
|
|
65
66
|
}
|
|
66
|
-
root.render(
|
|
67
|
+
root.render(/*#__PURE__*/(0, _jsxRuntime.jsx)(_modal.default, {
|
|
67
68
|
visible: true,
|
|
68
69
|
transparent: true,
|
|
69
70
|
title: title,
|
|
@@ -75,10 +76,12 @@ function alert(title, message) {
|
|
|
75
76
|
platform: platform,
|
|
76
77
|
wrapProps: {
|
|
77
78
|
onTouchStart: onWrapTouchStart
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
},
|
|
80
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
81
|
+
className: `${prefixCls}-alert-content`,
|
|
82
|
+
children: message
|
|
83
|
+
})
|
|
84
|
+
}));
|
|
82
85
|
return {
|
|
83
86
|
close
|
|
84
87
|
};
|
package/lib/Modal/modal.js
CHANGED
|
@@ -10,6 +10,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _rmcDialog = _interopRequireDefault(require("rmc-dialog"));
|
|
12
12
|
var _rmcFeedback = _interopRequireDefault(require("rmc-feedback"));
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
14
|
class ModalComponent extends React.Component {}
|
|
14
15
|
exports.ModalComponent = ModalComponent;
|
|
15
16
|
class Modal extends ModalComponent {
|
|
@@ -34,15 +35,16 @@ class Modal extends ModalComponent {
|
|
|
34
35
|
button.onPress();
|
|
35
36
|
}
|
|
36
37
|
};
|
|
37
|
-
return /*#__PURE__*/
|
|
38
|
-
activeClassName:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcFeedback.default, {
|
|
39
|
+
activeClassName: `${prefixCls}-button-active`,
|
|
40
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
41
|
+
className: `${prefixCls}-button`,
|
|
42
|
+
role: "button",
|
|
43
|
+
style: buttonStyle,
|
|
44
|
+
onClick: onClickFn,
|
|
45
|
+
children: button.text || 'Button'
|
|
46
|
+
})
|
|
47
|
+
}, i);
|
|
46
48
|
}
|
|
47
49
|
render() {
|
|
48
50
|
const {
|
|
@@ -61,13 +63,14 @@ class Modal extends ModalComponent {
|
|
|
61
63
|
animationType,
|
|
62
64
|
...restProps
|
|
63
65
|
} = this.props;
|
|
64
|
-
const btnGroupClass = (0, _classnames.default)(
|
|
65
|
-
const footerDom = footer.length ? /*#__PURE__*/
|
|
66
|
+
const btnGroupClass = (0, _classnames.default)(`${prefixCls}-button-group-${footer.length === 2 && !operation ? 'h' : 'v'}`, `${prefixCls}-button-group-${operation ? 'operation' : 'normal'}`);
|
|
67
|
+
const footerDom = footer.length ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
66
68
|
className: btnGroupClass,
|
|
67
|
-
role: "group"
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
role: "group",
|
|
70
|
+
children: footer.map((button, i) =>
|
|
71
|
+
// tslint:disable-next-line:jsx-no-multiline-js
|
|
72
|
+
this.renderFooterButton(button, prefixCls, i))
|
|
73
|
+
}) : null;
|
|
71
74
|
let transName;
|
|
72
75
|
let maskTransName;
|
|
73
76
|
if (animated) {
|
|
@@ -83,15 +86,16 @@ class Modal extends ModalComponent {
|
|
|
83
86
|
}
|
|
84
87
|
}
|
|
85
88
|
const wrapCls = (0, _classnames.default)(wrapClassName, {
|
|
86
|
-
[
|
|
89
|
+
[`${prefixCls}-wrap-popup`]: popup
|
|
87
90
|
});
|
|
88
91
|
const cls = (0, _classnames.default)(className, {
|
|
89
|
-
[
|
|
90
|
-
[
|
|
91
|
-
[
|
|
92
|
-
[
|
|
92
|
+
[`${prefixCls}-transparent`]: transparent,
|
|
93
|
+
[`${prefixCls}-popup`]: popup,
|
|
94
|
+
[`${prefixCls}-popup-${animationType}`]: popup && animationType,
|
|
95
|
+
[`${prefixCls}-android`]: platform === 'android'
|
|
93
96
|
});
|
|
94
|
-
return /*#__PURE__*/
|
|
97
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcDialog.default, {
|
|
98
|
+
...restProps,
|
|
95
99
|
prefixCls: prefixCls,
|
|
96
100
|
className: cls,
|
|
97
101
|
wrapClassName: wrapCls,
|
|
@@ -99,7 +103,7 @@ class Modal extends ModalComponent {
|
|
|
99
103
|
maskTransitionName: maskTransitionName || maskTransName,
|
|
100
104
|
style: style,
|
|
101
105
|
footer: footerDom
|
|
102
|
-
})
|
|
106
|
+
});
|
|
103
107
|
}
|
|
104
108
|
}
|
|
105
109
|
exports.default = Modal;
|
package/lib/Modal/operation.js
CHANGED
|
@@ -10,6 +10,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
10
10
|
var _client = require("react-dom/client");
|
|
11
11
|
var _closest = _interopRequireDefault(require("../utils/closest"));
|
|
12
12
|
var _modal = _interopRequireDefault(require("./modal"));
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
14
|
function operation() {
|
|
14
15
|
let actions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [{
|
|
15
16
|
text: '确定'
|
|
@@ -57,7 +58,7 @@ function operation() {
|
|
|
57
58
|
e.preventDefault();
|
|
58
59
|
}
|
|
59
60
|
}
|
|
60
|
-
root.render(
|
|
61
|
+
root.render(/*#__PURE__*/(0, _jsxRuntime.jsx)(_modal.default, {
|
|
61
62
|
visible: true,
|
|
62
63
|
operation: true,
|
|
63
64
|
transparent: true,
|