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
package/lib/Modal/prompt.js
CHANGED
|
@@ -10,13 +10,14 @@ 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 prompt(title, message, callbackOrActions) {
|
|
14
15
|
let type = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'default';
|
|
15
16
|
let defaultValue = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : '';
|
|
16
17
|
let placeholders = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : ['', ''];
|
|
17
18
|
let platform = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : 'ios';
|
|
18
19
|
let closed = false;
|
|
19
|
-
defaultValue = typeof defaultValue === 'string' ? defaultValue : typeof defaultValue === 'number' ?
|
|
20
|
+
defaultValue = typeof defaultValue === 'string' ? defaultValue : typeof defaultValue === 'number' ? `${defaultValue}` : '';
|
|
20
21
|
if (!callbackOrActions) {
|
|
21
22
|
// console.log('Must specify callbackOrActions');
|
|
22
23
|
return {
|
|
@@ -59,61 +60,78 @@ function prompt(title, message, callbackOrActions) {
|
|
|
59
60
|
};
|
|
60
61
|
switch (type) {
|
|
61
62
|
case 'login-password':
|
|
62
|
-
inputDom = /*#__PURE__*/
|
|
63
|
-
className:
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
63
|
+
inputDom = /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
64
|
+
className: `${prefixCls}-input-container`,
|
|
65
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
66
|
+
className: `${prefixCls}-input`,
|
|
67
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
68
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
69
|
+
type: "text",
|
|
70
|
+
defaultValue: data.text,
|
|
71
|
+
ref: input => focusFn(input),
|
|
72
|
+
onClick: onClick,
|
|
73
|
+
onChange: onChange,
|
|
74
|
+
placeholder: placeholders[0],
|
|
75
|
+
onBlur: onBlurFixWechat
|
|
76
|
+
})
|
|
77
|
+
})
|
|
78
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
79
|
+
className: `${prefixCls}-input`,
|
|
80
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
81
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
82
|
+
type: "password",
|
|
83
|
+
defaultValue: data.password,
|
|
84
|
+
onClick: onClick,
|
|
85
|
+
onChange: onChange,
|
|
86
|
+
placeholder: placeholders[1],
|
|
87
|
+
onBlur: onBlurFixWechat
|
|
88
|
+
})
|
|
89
|
+
})
|
|
90
|
+
})]
|
|
91
|
+
});
|
|
84
92
|
break;
|
|
85
93
|
case 'secure-text':
|
|
86
|
-
inputDom = /*#__PURE__*/
|
|
87
|
-
className:
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
94
|
+
inputDom = /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
95
|
+
className: `${prefixCls}-input-container`,
|
|
96
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
97
|
+
className: `${prefixCls}-input`,
|
|
98
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
99
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
100
|
+
type: "password",
|
|
101
|
+
defaultValue: data.password,
|
|
102
|
+
ref: input => focusFn(input),
|
|
103
|
+
onClick: onClick,
|
|
104
|
+
onChange: onChange,
|
|
105
|
+
placeholder: placeholders[0],
|
|
106
|
+
onBlur: onBlurFixWechat
|
|
107
|
+
})
|
|
108
|
+
})
|
|
109
|
+
})
|
|
110
|
+
});
|
|
99
111
|
break;
|
|
100
112
|
case 'default':
|
|
101
113
|
default:
|
|
102
|
-
inputDom = /*#__PURE__*/
|
|
103
|
-
className:
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
114
|
+
inputDom = /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
115
|
+
className: `${prefixCls}-input-container`,
|
|
116
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
117
|
+
className: `${prefixCls}-input`,
|
|
118
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
119
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
120
|
+
type: "text",
|
|
121
|
+
defaultValue: data.text,
|
|
122
|
+
ref: input => focusFn(input),
|
|
123
|
+
onClick: onClick,
|
|
124
|
+
onChange: onChange,
|
|
125
|
+
placeholder: placeholders[0],
|
|
126
|
+
onBlur: onBlurFixWechat
|
|
127
|
+
})
|
|
128
|
+
})
|
|
129
|
+
})
|
|
130
|
+
});
|
|
115
131
|
}
|
|
116
|
-
const content = /*#__PURE__*/
|
|
132
|
+
const content = /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
133
|
+
children: [message, inputDom]
|
|
134
|
+
});
|
|
117
135
|
const div = document.createElement('div');
|
|
118
136
|
document.body.appendChild(div);
|
|
119
137
|
const root = (0, _client.createRoot)(div);
|
|
@@ -182,12 +200,12 @@ function prompt(title, message, callbackOrActions) {
|
|
|
182
200
|
if (!/iPhone|iPod|iPad/i.test(navigator.userAgent)) {
|
|
183
201
|
return;
|
|
184
202
|
}
|
|
185
|
-
const pNode = (0, _closest.default)(e.target,
|
|
203
|
+
const pNode = (0, _closest.default)(e.target, `.${prefixCls}-content`);
|
|
186
204
|
if (!pNode) {
|
|
187
205
|
e.preventDefault();
|
|
188
206
|
}
|
|
189
207
|
}
|
|
190
|
-
root.render(
|
|
208
|
+
root.render(/*#__PURE__*/(0, _jsxRuntime.jsx)(_modal.default, {
|
|
191
209
|
visible: true,
|
|
192
210
|
transparent: true,
|
|
193
211
|
prefixCls: prefixCls,
|
|
@@ -200,10 +218,12 @@ function prompt(title, message, callbackOrActions) {
|
|
|
200
218
|
platform: platform,
|
|
201
219
|
wrapProps: {
|
|
202
220
|
onTouchStart: onWrapTouchStart
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
221
|
+
},
|
|
222
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
223
|
+
className: `${prefixCls}-propmt-content`,
|
|
224
|
+
children: content
|
|
225
|
+
})
|
|
226
|
+
}));
|
|
207
227
|
return {
|
|
208
228
|
close
|
|
209
229
|
};
|
|
@@ -8,15 +8,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _selectEditor = _interopRequireDefault(require("../select-editor"));
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
12
|
const MultipleSelectEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
12
13
|
let {
|
|
13
14
|
value: oldValue,
|
|
14
15
|
...props
|
|
15
16
|
} = _ref;
|
|
16
17
|
const value = oldValue ? Array.isArray(oldValue) ? oldValue : [oldValue] : [];
|
|
17
|
-
return /*#__PURE__*/
|
|
18
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_selectEditor.default, {
|
|
19
|
+
...props,
|
|
18
20
|
value: value,
|
|
19
21
|
ref: ref
|
|
20
|
-
})
|
|
22
|
+
});
|
|
21
23
|
});
|
|
22
24
|
var _default = exports.default = MultipleSelectEditor;
|
|
@@ -9,6 +9,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
10
|
var _SelectItem = _interopRequireDefault(require("../SelectItem"));
|
|
11
11
|
require("./index.css");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
class MultipleSelectFormatter extends _react.default.PureComponent {
|
|
13
14
|
constructor() {
|
|
14
15
|
super(...arguments);
|
|
@@ -21,10 +22,9 @@ class MultipleSelectFormatter extends _react.default.PureComponent {
|
|
|
21
22
|
let selectedOptions = options.filter(option => value.includes(option.id) || value.includes(option.name));
|
|
22
23
|
if (selectedOptions.length === 0) return [];
|
|
23
24
|
return selectedOptions.map(option => {
|
|
24
|
-
return /*#__PURE__*/
|
|
25
|
-
key: "multiple-".concat(option.id),
|
|
25
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SelectItem.default, {
|
|
26
26
|
option: option
|
|
27
|
-
});
|
|
27
|
+
}, `multiple-${option.id}`);
|
|
28
28
|
});
|
|
29
29
|
};
|
|
30
30
|
}
|
|
@@ -35,14 +35,15 @@ class MultipleSelectFormatter extends _react.default.PureComponent {
|
|
|
35
35
|
} = this.props;
|
|
36
36
|
let classname = (0, _classnames.default)('dtable-ui cell-formatter-container multiple-select-formatter', containerClassName);
|
|
37
37
|
if (!value || Array.isArray(value) && value.length === 0) {
|
|
38
|
-
return /*#__PURE__*/
|
|
38
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
39
39
|
className: classname
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
let options = this.getOptions();
|
|
43
|
-
return /*#__PURE__*/
|
|
44
|
-
className: classname
|
|
45
|
-
|
|
43
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
44
|
+
className: classname,
|
|
45
|
+
children: options
|
|
46
|
+
});
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
49
|
MultipleSelectFormatter.defaultProps = {
|
|
@@ -9,6 +9,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _reactstrap = require("reactstrap");
|
|
10
10
|
var _IconButton = _interopRequireDefault(require("../IconButton"));
|
|
11
11
|
require("./index.css");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
class NotificationPopover extends _react.default.Component {
|
|
13
14
|
constructor() {
|
|
14
15
|
super(...arguments);
|
|
@@ -47,43 +48,53 @@ class NotificationPopover extends _react.default.Component {
|
|
|
47
48
|
bodyText,
|
|
48
49
|
footerText
|
|
49
50
|
} = this.props;
|
|
50
|
-
return /*#__PURE__*/
|
|
51
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.Popover, {
|
|
51
52
|
className: "notification-wrapper",
|
|
52
53
|
target: "notification-popover",
|
|
53
54
|
isOpen: true,
|
|
54
55
|
fade: false,
|
|
55
56
|
hideArrow: true,
|
|
56
|
-
placement: "bottom"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
57
|
+
placement: "bottom",
|
|
58
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
59
|
+
className: "notification-container",
|
|
60
|
+
ref: ref => this.notificationContainerRef = ref,
|
|
61
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
62
|
+
className: "notification-header",
|
|
63
|
+
children: [headerText, /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.default, {
|
|
64
|
+
icon: "x",
|
|
65
|
+
onClick: this.props.onNotificationListToggle
|
|
66
|
+
})]
|
|
67
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
68
|
+
className: "notification-body",
|
|
69
|
+
children: [this.props.enableWeixin && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
70
|
+
className: "show-weixin-qrcode",
|
|
71
|
+
onClick: this.onWeixinQRCodeDialogToggle,
|
|
72
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
73
|
+
className: "dtable-font dtable-icon-wechat weixin-icon"
|
|
74
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
75
|
+
className: "ml-2",
|
|
76
|
+
children: "\u5173\u6CE8\u516C\u4F17\u53F7\u83B7\u53D6\u5B9E\u65F6\u901A\u77E5"
|
|
77
|
+
})]
|
|
78
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
79
|
+
className: "mark-notifications",
|
|
80
|
+
onClick: this.props.onMarkAllNotifications,
|
|
81
|
+
children: bodyText
|
|
82
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
83
|
+
className: "notification-list-container",
|
|
84
|
+
onScroll: this.onHandleScroll,
|
|
85
|
+
ref: ref => this.notificationListRef = ref,
|
|
86
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
87
|
+
ref: ref => this.notificationsWrapperRef = ref,
|
|
88
|
+
children: this.props.children
|
|
89
|
+
})
|
|
90
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
91
|
+
className: "notification-footer",
|
|
92
|
+
onClick: this.onNotificationDialogToggle,
|
|
93
|
+
children: footerText
|
|
94
|
+
})]
|
|
95
|
+
})]
|
|
96
|
+
})
|
|
97
|
+
});
|
|
87
98
|
}
|
|
88
99
|
}
|
|
89
100
|
exports.default = NotificationPopover;
|
|
@@ -9,6 +9,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _dtableUtils = require("dtable-utils");
|
|
10
10
|
var _constants = require("../constants");
|
|
11
11
|
var _utils = require("../utils/utils");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
class NumberEditor extends _react.default.Component {
|
|
13
14
|
constructor(props) {
|
|
14
15
|
super(props);
|
|
@@ -104,7 +105,7 @@ class NumberEditor extends _react.default.Component {
|
|
|
104
105
|
} : {
|
|
105
106
|
textAlign: 'right'
|
|
106
107
|
};
|
|
107
|
-
return /*#__PURE__*/
|
|
108
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
108
109
|
ref: this.setInputRef,
|
|
109
110
|
type: "text",
|
|
110
111
|
className: "form-control",
|
|
@@ -9,6 +9,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
10
|
var _dtableUtils = require("dtable-utils");
|
|
11
11
|
require("./index.css");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
class NumberFormatter extends _react.default.Component {
|
|
13
14
|
render() {
|
|
14
15
|
let {
|
|
@@ -20,10 +21,11 @@ class NumberFormatter extends _react.default.Component {
|
|
|
20
21
|
if (number || number === 0) {
|
|
21
22
|
number = (0, _dtableUtils.getNumberDisplayString)(number, data);
|
|
22
23
|
}
|
|
23
|
-
return /*#__PURE__*/
|
|
24
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
24
25
|
title: number,
|
|
25
|
-
className: classname
|
|
26
|
-
|
|
26
|
+
className: classname,
|
|
27
|
+
children: number
|
|
28
|
+
});
|
|
27
29
|
}
|
|
28
30
|
}
|
|
29
31
|
NumberFormatter.defaultProps = {
|
|
@@ -14,6 +14,7 @@ var _Popup = _interopRequireDefault(require("rmc-cascader/lib/Popup"));
|
|
|
14
14
|
var _MultiPicker = _interopRequireDefault(require("rmc-picker/lib/MultiPicker"));
|
|
15
15
|
var _Picker = _interopRequireDefault(require("rmc-picker/lib/Picker"));
|
|
16
16
|
var _getLocale = require("../utils/getLocale");
|
|
17
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
18
|
/* tslint:disable:jsx-no-multiline-js */
|
|
18
19
|
|
|
19
20
|
function getDefaultProps() {
|
|
@@ -65,20 +66,20 @@ class AbstractPicker extends React.Component {
|
|
|
65
66
|
indicatorStyle
|
|
66
67
|
} = this.props;
|
|
67
68
|
return data.map((col, index) => {
|
|
68
|
-
return /*#__PURE__*/
|
|
69
|
-
key: index,
|
|
69
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Picker.default, {
|
|
70
70
|
prefixCls: pickerPrefixCls,
|
|
71
71
|
style: {
|
|
72
72
|
flex: 1
|
|
73
73
|
},
|
|
74
74
|
itemStyle: itemStyle,
|
|
75
|
-
indicatorStyle: indicatorStyle
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
75
|
+
indicatorStyle: indicatorStyle,
|
|
76
|
+
children: col.map(item => {
|
|
77
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Picker.default.Item, {
|
|
78
|
+
value: item.value,
|
|
79
|
+
children: item.label
|
|
80
|
+
}, item.value);
|
|
81
|
+
})
|
|
82
|
+
}, index);
|
|
82
83
|
});
|
|
83
84
|
};
|
|
84
85
|
this.onOk = v => {
|
|
@@ -148,7 +149,7 @@ class AbstractPicker extends React.Component {
|
|
|
148
149
|
let cascader;
|
|
149
150
|
let popupMoreProps = {};
|
|
150
151
|
if (cascade) {
|
|
151
|
-
cascader = /*#__PURE__*/
|
|
152
|
+
cascader = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Cascader.default, {
|
|
152
153
|
prefixCls: prefixCls,
|
|
153
154
|
pickerPrefixCls: pickerPrefixCls,
|
|
154
155
|
data: data,
|
|
@@ -159,32 +160,35 @@ class AbstractPicker extends React.Component {
|
|
|
159
160
|
indicatorStyle: indicatorStyle
|
|
160
161
|
});
|
|
161
162
|
} else {
|
|
162
|
-
cascader = /*#__PURE__*/
|
|
163
|
+
cascader = /*#__PURE__*/(0, _jsxRuntime.jsx)(_MultiPicker.default, {
|
|
163
164
|
style: {
|
|
164
165
|
flexDirection: 'row',
|
|
165
166
|
alignItems: 'center'
|
|
166
167
|
},
|
|
167
168
|
prefixCls: prefixCls,
|
|
168
|
-
onScrollChange: this.setScrollValue
|
|
169
|
-
|
|
169
|
+
onScrollChange: this.setScrollValue,
|
|
170
|
+
children: this.getPickerCol()
|
|
171
|
+
});
|
|
170
172
|
popupMoreProps = {
|
|
171
173
|
pickerValueProp: 'selectedValue',
|
|
172
174
|
pickerValueChangeProp: 'onValueChange'
|
|
173
175
|
};
|
|
174
176
|
}
|
|
175
|
-
return /*#__PURE__*/
|
|
176
|
-
cascader: cascader
|
|
177
|
-
|
|
177
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Popup.default, {
|
|
178
|
+
cascader: cascader,
|
|
179
|
+
...this.popupProps,
|
|
180
|
+
...restProps,
|
|
178
181
|
prefixCls: popupPrefixCls,
|
|
179
182
|
value: value,
|
|
180
183
|
dismissText: dismissText || _locale.dismissText,
|
|
181
|
-
okText: okText || _locale.okText
|
|
182
|
-
|
|
184
|
+
okText: okText || _locale.okText,
|
|
185
|
+
...popupMoreProps,
|
|
183
186
|
ref: this.fixOnOk,
|
|
184
|
-
onVisibleChange: this.onVisibleChange
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
187
|
+
onVisibleChange: this.onVisibleChange,
|
|
188
|
+
children: children && typeof children !== 'string' && /*#__PURE__*/React.isValidElement(children) && /*#__PURE__*/React.cloneElement(children, {
|
|
189
|
+
extra: this.getSel() || extra || _locale.extra
|
|
190
|
+
})
|
|
191
|
+
});
|
|
188
192
|
}
|
|
189
193
|
}
|
|
190
194
|
exports.default = AbstractPicker;
|
package/lib/Picker/index.js
CHANGED
|
@@ -11,10 +11,11 @@ var _AbstractPicker = _interopRequireWildcard(require("./AbstractPicker"));
|
|
|
11
11
|
var PropTypes = _interopRequireWildcard(require("prop-types"));
|
|
12
12
|
var _popupProps = _interopRequireDefault(require("./popupProps"));
|
|
13
13
|
require("./style/index.css");
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
15
|
// TODO:
|
|
15
16
|
// fix error TS4026:Public static property 'defaultProps' of exported class has or is using name 'React.ReactElement'
|
|
16
17
|
// fix error TS6133: 'React' is declared but its value is never read.
|
|
17
|
-
const nonsense = exports.nonsense = /*#__PURE__*/
|
|
18
|
+
const nonsense = exports.nonsense = /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {});
|
|
18
19
|
class Picker extends _AbstractPicker.default {
|
|
19
20
|
constructor() {
|
|
20
21
|
super(...arguments);
|
package/lib/Popover/index.js
CHANGED
|
@@ -10,6 +10,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
10
10
|
var _rmcTooltip = _interopRequireDefault(require("rmc-tooltip"));
|
|
11
11
|
var _item = _interopRequireDefault(require("./item"));
|
|
12
12
|
require("./style/index.css");
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
14
|
function recursiveCloneChildren(children) {
|
|
14
15
|
let cb = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (ch, _) => ch;
|
|
15
16
|
return React.Children.map(children, (child, index) => {
|
|
@@ -40,12 +41,14 @@ class Popover extends React.Component {
|
|
|
40
41
|
}
|
|
41
42
|
return child;
|
|
42
43
|
});
|
|
43
|
-
const wrapperNode = /*#__PURE__*/
|
|
44
|
-
className:
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
const wrapperNode = /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
45
|
+
className: `${this.props.prefixCls}-inner-wrapper`,
|
|
46
|
+
children: overlayNode
|
|
47
|
+
});
|
|
48
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcTooltip.default, {
|
|
49
|
+
...restProps,
|
|
47
50
|
overlay: wrapperNode
|
|
48
|
-
})
|
|
51
|
+
});
|
|
49
52
|
}
|
|
50
53
|
}
|
|
51
54
|
exports.default = Popover;
|
package/lib/Popover/item.js
CHANGED
|
@@ -9,6 +9,7 @@ exports.default = void 0;
|
|
|
9
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _rmcFeedback = _interopRequireDefault(require("rmc-feedback"));
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
class Item extends React.Component {
|
|
13
14
|
render() {
|
|
14
15
|
const {
|
|
@@ -21,30 +22,36 @@ class Item extends React.Component {
|
|
|
21
22
|
activeStyle,
|
|
22
23
|
...restProps
|
|
23
24
|
} = this.props;
|
|
24
|
-
const cls = (0, _classnames.default)(
|
|
25
|
-
[
|
|
25
|
+
const cls = (0, _classnames.default)(`${prefixCls}-item`, className, {
|
|
26
|
+
[`${prefixCls}-item-disabled`]: disabled
|
|
26
27
|
});
|
|
27
|
-
let activeClass =
|
|
28
|
+
let activeClass = `${prefixCls}-item-active `;
|
|
28
29
|
if (firstItem) {
|
|
29
|
-
activeClass +=
|
|
30
|
+
activeClass += `${prefixCls}-item-fix-active-arrow`;
|
|
30
31
|
}
|
|
31
|
-
return /*#__PURE__*/
|
|
32
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcFeedback.default, {
|
|
32
33
|
disabled: disabled,
|
|
33
34
|
activeClassName: activeClass,
|
|
34
|
-
activeStyle: activeStyle
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
35
|
+
activeStyle: activeStyle,
|
|
36
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
37
|
+
className: cls,
|
|
38
|
+
...restProps,
|
|
39
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
40
|
+
className: `${prefixCls}-item-container`,
|
|
41
|
+
children: [icon ?
|
|
42
|
+
/*#__PURE__*/
|
|
43
|
+
// tslint:disable-next-line:jsx-no-multiline-js
|
|
44
|
+
(0, _jsxRuntime.jsx)("span", {
|
|
45
|
+
className: `${prefixCls}-item-icon`,
|
|
46
|
+
"aria-hidden": "true",
|
|
47
|
+
children: icon
|
|
48
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
49
|
+
className: `${prefixCls}-item-content`,
|
|
50
|
+
children: children
|
|
51
|
+
})]
|
|
52
|
+
})
|
|
53
|
+
})
|
|
54
|
+
});
|
|
48
55
|
}
|
|
49
56
|
}
|
|
50
57
|
exports.default = Item;
|
package/lib/Progress/index.js
CHANGED
|
@@ -9,6 +9,7 @@ exports.default = void 0;
|
|
|
9
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
require("./index.css");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
class Progress extends React.Component {
|
|
13
14
|
componentWillReceiveProps() {
|
|
14
15
|
this.noAppearTransition = true;
|
|
@@ -17,7 +18,7 @@ class Progress extends React.Component {
|
|
|
17
18
|
if (this.props.appearTransition) {
|
|
18
19
|
setTimeout(() => {
|
|
19
20
|
if (this.barRef) {
|
|
20
|
-
this.barRef.style.width =
|
|
21
|
+
this.barRef.style.width = `${this.props.percent}%`;
|
|
21
22
|
}
|
|
22
23
|
}, 10);
|
|
23
24
|
}
|
|
@@ -32,28 +33,29 @@ class Progress extends React.Component {
|
|
|
32
33
|
barStyle = {}
|
|
33
34
|
} = this.props;
|
|
34
35
|
const percentStyle = {
|
|
35
|
-
width: this.noAppearTransition || !this.props.appearTransition ?
|
|
36
|
+
width: this.noAppearTransition || !this.props.appearTransition ? `${this.props.percent}%` : 0,
|
|
36
37
|
height: 0
|
|
37
38
|
};
|
|
38
|
-
const wrapCls = (0, _classnames.default)(
|
|
39
|
-
[
|
|
40
|
-
[
|
|
39
|
+
const wrapCls = (0, _classnames.default)(`${prefixCls}-outer`, className, {
|
|
40
|
+
[`${prefixCls}-fixed-outer`]: position === 'fixed',
|
|
41
|
+
[`${prefixCls}-hide-outer`]: !unfilled
|
|
41
42
|
});
|
|
42
|
-
return /*#__PURE__*/
|
|
43
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
43
44
|
style: style,
|
|
44
45
|
className: wrapCls,
|
|
45
46
|
role: "progressbar",
|
|
46
47
|
"aria-valuenow": this.props.percent,
|
|
47
48
|
"aria-valuemin": 0,
|
|
48
|
-
"aria-valuemax": 100
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
49
|
+
"aria-valuemax": 100,
|
|
50
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
51
|
+
ref: el => this.barRef = el,
|
|
52
|
+
className: `${prefixCls}-bar`,
|
|
53
|
+
style: {
|
|
54
|
+
...barStyle,
|
|
55
|
+
...percentStyle
|
|
56
|
+
}
|
|
57
|
+
})
|
|
58
|
+
});
|
|
57
59
|
}
|
|
58
60
|
}
|
|
59
61
|
exports.default = Progress;
|