dtable-ui-component 6.0.126 → 7.0.0-xia.1
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 +16 -14
- package/lib/ActivityIndicator/index.js +8 -7
- package/lib/AsyncUserSelect/index.js +19 -40
- package/lib/AsyncUserSelect/user-item.js +6 -5
- package/lib/AutoNumberFormatter/index.js +4 -3
- package/lib/Badge/index.js +11 -9
- package/lib/ButtonFormatter/index.js +8 -6
- package/lib/CTimeFormatter/index.js +4 -3
- package/lib/CheckboxEditor/index.js +3 -1
- package/lib/CheckboxEditor/mb-editor.js +20 -9
- package/lib/CheckboxEditor/pc-editor.js +24 -12
- package/lib/CheckboxFormatter/index.js +5 -4
- package/lib/CollaboratorEditor/index.js +4 -2
- package/lib/CollaboratorEditor/mb-editor/index.js +19 -11
- package/lib/CollaboratorEditor/pc-editor/index.js +34 -25
- package/lib/CollaboratorFormatter/index.js +10 -8
- package/lib/CollaboratorItem/index.js +5 -4
- package/lib/CollapsibleSettingLayout/index.js +7 -9
- package/lib/Comment/body/comment.js +18 -10
- package/lib/Comment/body/index.js +4 -2
- package/lib/Comment/footer/btns/index.js +7 -4
- package/lib/Comment/footer/index.js +20 -9
- package/lib/Comment/footer/input/index.js +50 -29
- package/lib/Comment/footer/input/participant/index.js +5 -4
- package/lib/Comment/footer/participants/index.js +5 -4
- package/lib/Comment/footer/participants/participant/index.js +3 -1
- package/lib/Comment/footer/participants/participant-select/index.js +24 -8
- package/lib/Comment/index.js +57 -39
- package/lib/Comment/utils/utilities.js +21 -15
- package/lib/CreatorFormatter/index.js +8 -6
- package/lib/DTableColorPicker/ColorPickerPortal/index.js +18 -22
- package/lib/DTableColorPicker/index.js +40 -55
- package/lib/DTableColorPicker/utils.js +6 -4
- package/lib/DTableColumnIcon/index.js +7 -6
- package/lib/DTableCommonAddTool/index.js +8 -6
- package/lib/DTableCustomFooter/index.js +3 -1
- package/lib/DTableCustomizeCollaboratorSelect/index.js +20 -17
- package/lib/DTableCustomizeSelect/index.js +24 -19
- package/lib/DTableDropdownItem/index.js +18 -16
- package/lib/DTableDropdownMenu/index.js +10 -8
- package/lib/DTableEmptyTip/index.js +5 -4
- package/lib/DTableFiltersPopover/index.js +50 -34
- package/lib/DTableFiltersPopover/utils/filter-item-utils.js +3 -1
- package/lib/DTableFiltersPopover/utils/index.js +113 -63
- package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +9 -8
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +13 -16
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +15 -18
- package/lib/DTableFiltersPopover/widgets/filter-calendar.js +14 -8
- package/lib/DTableFiltersPopover/widgets/filter-group.js +56 -35
- package/lib/DTableFiltersPopover/widgets/filter-item.js +171 -108
- package/lib/DTableFiltersPopover/widgets/filter-list/index.css +5 -5
- package/lib/DTableFiltersPopover/widgets/filter-list/index.js +161 -136
- package/lib/DTableFiltersPopover/widgets/rate-item.js +20 -15
- package/lib/DTableGroupSelect/index.js +15 -11
- package/lib/DTableGroupSelect/select-option-group.js +32 -23
- package/lib/DTableIcon/index.js +7 -6
- package/lib/DTableIcon/svg-icon.js +7 -5
- package/lib/DTableModalHeader/index.css +3 -20
- package/lib/DTableModalHeader/index.js +3 -1
- package/lib/DTablePopover/index.js +15 -11
- package/lib/DTableRadio/index.js +9 -10
- package/lib/DTableRadioGroup/index.js +17 -8
- package/lib/DTableSearchInput/index.js +29 -19
- package/lib/DTableSelect/dtable-select-label.js +5 -6
- package/lib/DTableSelect/index.js +22 -21
- package/lib/DTableSelect/utils.js +15 -7
- package/lib/DTableSubDropdownMenu/index.js +10 -8
- package/lib/DTableSubDropdownToggle/index.js +12 -12
- package/lib/DTableSwitch/index.js +11 -12
- package/lib/DTableToolTip/index.js +8 -7
- package/lib/DateEditor/index.js +15 -20
- package/lib/DateEditor/mb-editor/index.js +31 -18
- package/lib/DateEditor/pc-editor.js +45 -26
- package/lib/DateFormatter/index.js +5 -4
- package/lib/DatePicker/index.js +15 -9
- package/lib/DatePicker/utils.js +3 -1
- package/lib/DeleteTip/index.js +6 -5
- package/lib/DepartmentMultipleSelectEditor/index.js +23 -25
- package/lib/DepartmentSelectFilter/index.js +8 -6
- package/lib/DepartmentSingleSelectEditor/index.js +3 -1
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +47 -48
- package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +58 -36
- package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +19 -13
- package/lib/DepartmentSingleSelectFormatter/index.js +6 -4
- package/lib/DigitalSignEditor/index.js +3 -1
- package/lib/DigitalSignEditor/mb-editor/index.js +20 -12
- package/lib/DigitalSignEditor/pc-editor/index.js +24 -17
- package/lib/DigitalSignEditor/service.js +4 -2
- package/lib/DigitalSignEditor/signature-board/index.js +8 -5
- package/lib/DigitalSignEditor/utils.js +4 -2
- package/lib/DigitalSignFormatter/index.js +15 -12
- package/lib/DigitalSignFormatter/utils.js +5 -4
- package/lib/DurationEditor/index.js +31 -21
- package/lib/DurationFormatter/index.js +5 -4
- package/lib/EditEditorButton/index.js +3 -1
- package/lib/EmailFormatter/index.js +4 -3
- package/lib/FieldDisplaySetting/field-item.js +12 -12
- package/lib/FieldDisplaySetting/index.js +10 -12
- package/lib/FileEditor/files-previewer/index.js +3 -1
- package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +18 -10
- package/lib/FileEditor/files-previewer/mb-previewer/index.js +8 -7
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/dropdown-menu.js +4 -3
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/file-name-editor/index.js +6 -5
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +21 -14
- package/lib/FileEditor/files-previewer/pc-previewer/index.js +57 -29
- package/lib/FileEditor/index.js +3 -1
- package/lib/FileEditor/mb-editor/index.js +20 -28
- package/lib/FileEditor/pc-editor/addition-previewer/index.js +3 -1
- package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +25 -11
- package/lib/FileEditor/pc-editor/index.js +27 -19
- package/lib/FileFormatter/index.js +19 -26
- package/lib/FileItemFormatter/index.js +9 -6
- package/lib/FileUploader/index.js +45 -28
- package/lib/FormulaFormatter/index.js +29 -15
- package/lib/GeolocationEditor/index.js +12 -11
- package/lib/GeolocationEditor/map-editor-utils.js +15 -17
- package/lib/GeolocationEditor/mb-editor/country-editor.js +14 -17
- package/lib/GeolocationEditor/mb-editor/index.js +6 -4
- package/lib/GeolocationEditor/mb-editor/location-editor.js +15 -18
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +68 -41
- package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +89 -50
- package/lib/GeolocationEditor/mb-editor/province-city-editor.js +14 -17
- package/lib/GeolocationEditor/mb-editor/province-editor.js +14 -17
- package/lib/GeolocationEditor/pc-editor/country-editor.js +23 -10
- package/lib/GeolocationEditor/pc-editor/index.js +20 -12
- package/lib/GeolocationEditor/pc-editor/location-editor.js +31 -26
- package/lib/GeolocationEditor/pc-editor/map-editor/index.js +54 -34
- package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +60 -36
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +62 -35
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +65 -36
- package/lib/GeolocationEditor/pc-editor/province-city-editor.js +25 -19
- package/lib/GeolocationEditor/pc-editor/province-editor.js +13 -6
- package/lib/GeolocationEditor/pc-editor/selector-header-item.js +6 -5
- package/lib/GeolocationEditor/pc-editor/selector-list.js +7 -6
- package/lib/GeolocationFormatter/index.js +5 -4
- package/lib/HtmlLongTextFormatter/index.js +12 -4
- package/lib/Icon/index.js +5 -3
- package/lib/IconButton/index.js +6 -4
- package/lib/ImageEditor/images-previewer/image-preview/index.js +21 -12
- package/lib/ImageEditor/images-previewer/index.js +9 -3
- package/lib/ImageEditor/index.js +3 -1
- package/lib/ImageEditor/mb-editor/index.js +20 -28
- package/lib/ImageEditor/pc-editor/addition-previewer/image-link/index.js +6 -2
- package/lib/ImageEditor/pc-editor/addition-previewer/index.js +3 -1
- package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +21 -7
- package/lib/ImageEditor/pc-editor/images-previewer/index.js +9 -3
- package/lib/ImageEditor/pc-editor/index.js +16 -11
- package/lib/ImageFormatter/images-lazy-load.js +11 -19
- package/lib/ImageFormatter/index.js +13 -11
- package/lib/ImagePreviewerLightbox/index.js +13 -15
- package/lib/ImageThumbnail/index.js +13 -10
- package/lib/InputItem/custom-input.js +46 -26
- package/lib/InputItem/custom-keyboard.js +18 -15
- package/lib/InputItem/index.js +50 -34
- package/lib/InputItem/input.js +4 -2
- package/lib/LastModifierFormatter/index.js +8 -6
- package/lib/LinkEditor/index.js +53 -33
- package/lib/LinkEditor/link-editor-option.js +4 -3
- package/lib/LinkEditor/mb-popover/index.js +22 -9
- package/lib/LinkEditor/pc-popover/index.js +10 -5
- package/lib/LinkFormatter/index.js +37 -21
- package/lib/List/index.js +8 -6
- package/lib/List/list-item.js +28 -22
- package/lib/LongTextFormatter/index.js +5 -4
- package/lib/MBEditorHeader/index.js +8 -7
- package/lib/MTimeFormatter/index.js +4 -3
- package/lib/MobileFullScreenPage/body/index.js +5 -3
- package/lib/MobileFullScreenPage/header/index.js +6 -4
- package/lib/MobileFullScreenPage/index.js +11 -13
- package/lib/MobileModal/index.js +3 -1
- package/lib/MobileOperationSheet/index.js +8 -7
- package/lib/MobileSelector/empty/index.js +3 -1
- package/lib/MobileSelector/index.js +7 -5
- package/lib/MobileSelector/option/index.js +5 -3
- package/lib/MobileSelector/options/index.js +3 -1
- package/lib/MobileSelector/search/index.js +5 -3
- package/lib/MobileUpload/index.js +5 -4
- package/lib/Modal/modal.js +15 -14
- package/lib/Modal/prompt.js +4 -4
- package/lib/MultipleSelectEditor/index.js +3 -1
- package/lib/MultipleSelectFormatter/index.js +8 -6
- package/lib/NotificationPopover/index.js +5 -4
- package/lib/NumberEditor/index.js +21 -12
- package/lib/NumberFormatter/index.js +5 -4
- package/lib/PhoneNumberLink/index.js +4 -2
- package/lib/Picker/AbstractPicker.js +27 -23
- package/lib/Popover/index.js +4 -3
- package/lib/Popover/item.js +9 -7
- package/lib/Progress/index.js +8 -9
- package/lib/Radio/Radio.js +8 -4
- package/lib/Radio/RadioItem.js +12 -8
- package/lib/RateFormatter/index.js +13 -13
- package/lib/RoleStatusEditor/index.js +17 -18
- package/lib/RowExpandDialog/body/index.js +49 -32
- package/lib/RowExpandDialog/column-content/index.js +9 -5
- package/lib/RowExpandDialog/header/index.js +8 -6
- package/lib/RowExpandDialog/index.js +34 -49
- package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +5 -4
- package/lib/RowExpandEditor/checkbox-editor/pc-editor.js +10 -8
- package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +33 -22
- package/lib/RowExpandEditor/collaborator-editor/pc-editor/index.js +40 -26
- package/lib/RowExpandEditor/date-editor/mb-editor.js +18 -12
- package/lib/RowExpandEditor/date-editor/pc-editor.js +20 -15
- package/lib/RowExpandEditor/department-editor/mb-editor.js +11 -16
- package/lib/RowExpandEditor/department-editor/pc-editor.js +14 -19
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +34 -20
- package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +35 -21
- package/lib/RowExpandEditor/duration-editor/mb-editor.js +17 -10
- package/lib/RowExpandEditor/duration-editor/pc-editor.js +19 -13
- package/lib/RowExpandEditor/email-editor/mb-editor/index.js +19 -9
- package/lib/RowExpandEditor/email-editor/pc-editor/index.js +24 -13
- package/lib/RowExpandEditor/file-editor/mb-editor/index.js +31 -18
- package/lib/RowExpandEditor/file-editor/pc-editor/index.js +23 -16
- package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +29 -17
- package/lib/RowExpandEditor/geolocation-editor/pc-editor/index.js +26 -13
- package/lib/RowExpandEditor/image-editor/mb-editor/index.js +25 -15
- package/lib/RowExpandEditor/image-editor/pc-editor/index.js +23 -13
- package/lib/RowExpandEditor/index.js +8 -4
- package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +18 -17
- package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +16 -10
- package/lib/RowExpandEditor/long-text-editor/pc-editor/index.js +23 -16
- package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +19 -11
- package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +33 -22
- package/lib/RowExpandEditor/number-editor/mb-editor/index.js +14 -8
- package/lib/RowExpandEditor/number-editor/pc-editor.js +20 -13
- package/lib/RowExpandEditor/rate-editor/mb-editor.js +25 -12
- package/lib/RowExpandEditor/rate-editor/pc-editor.js +36 -20
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +28 -17
- package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +34 -22
- package/lib/RowExpandEditor/text-editor/mb-editor/index.js +5 -4
- package/lib/RowExpandEditor/text-editor/pc-editor/index.js +26 -15
- package/lib/RowExpandEditor/url-editor/mb-editor/index.js +13 -5
- package/lib/RowExpandEditor/url-editor/pc-editor/index.js +18 -9
- package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +4 -2
- package/lib/RowExpandFormatter/department-formatter/pc-formatter.js +4 -2
- package/lib/RowExpandFormatter/email-formatter/index.js +7 -4
- package/lib/RowExpandFormatter/file-formatter/index.js +9 -8
- package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +12 -10
- package/lib/RowExpandFormatter/formula-formatter/index.js +34 -19
- package/lib/RowExpandFormatter/image-formatter/index.js +11 -9
- package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +8 -7
- package/lib/RowExpandFormatter/index.js +41 -27
- package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +14 -8
- package/lib/RowExpandFormatter/link-formatter/index.js +19 -11
- package/lib/RowExpandFormatter/link-formatter/value-display-utils.js +5 -3
- package/lib/RowExpandFormatter/rate-formatter/index.js +12 -11
- package/lib/RowExpandFormatter/text/index.js +5 -4
- package/lib/RowExpandFormatter/url-formatter/index.js +7 -4
- package/lib/RowExpandView/body/index.js +35 -22
- package/lib/RowExpandView/column-content/index.js +7 -3
- package/lib/RowExpandView/index.js +30 -42
- package/lib/SelectItem/index.js +8 -6
- package/lib/SelectOptionGroup/index.js +40 -30
- package/lib/SelectedDepartments/index.js +9 -7
- package/lib/SimpleLongTextFormatter/index.js +16 -10
- package/lib/SimpleLongTextFormatter/normalize-long-text-value.js +4 -3
- package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +21 -12
- package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +4 -3
- package/lib/SingleSelectEditor/index.js +3 -1
- package/lib/SingleSelectFormatter/index.js +9 -8
- package/lib/TabBar/Tab.js +16 -14
- package/lib/TabBar/index.js +21 -18
- package/lib/Tabs/index.js +3 -1
- package/lib/TextEditor/index.js +23 -14
- package/lib/TextFormatter/index.js +4 -3
- package/lib/TextareaItem/index.js +26 -19
- package/lib/Toast/index.js +4 -3
- package/lib/UrlFormatter/index.js +4 -3
- package/lib/common/editor-base.js +12 -7
- package/lib/hooks/common-hooks.js +4 -2
- package/lib/select-editor/index.js +3 -1
- package/lib/select-editor/mb-editor/index.js +28 -17
- package/lib/select-editor/pc-editor/index.js +42 -27
- package/lib/toaster/alert.js +7 -6
- package/lib/toaster/toast.js +3 -2
- package/lib/toaster/toastManager.js +4 -2
- package/lib/utils/cell.js +11 -8
- package/lib/utils/column-utils.js +14 -8
- package/lib/utils/departments.js +3 -1
- package/lib/utils/url.js +31 -24
- package/lib/utils/utils.js +6 -2
- package/package.json +1 -1
|
@@ -11,9 +11,11 @@ var _List = _interopRequireDefault(require("../../List"));
|
|
|
11
11
|
require("./index.css");
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
const Option = _ref => {
|
|
14
|
-
let
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
let {
|
|
15
|
+
isSelected,
|
|
16
|
+
children,
|
|
17
|
+
onChange
|
|
18
|
+
} = _ref;
|
|
17
19
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_List.default.Item, {
|
|
18
20
|
onClick: onChange,
|
|
19
21
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
@@ -9,7 +9,9 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
require("./index.css");
|
|
10
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
11
|
const Options = _ref => {
|
|
12
|
-
let
|
|
12
|
+
let {
|
|
13
|
+
children
|
|
14
|
+
} = _ref;
|
|
13
15
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
14
16
|
className: "dtable-ui-mobile-selector-options",
|
|
15
17
|
children: children
|
|
@@ -10,9 +10,11 @@ var _DTableSearchInput = _interopRequireDefault(require("../../DTableSearchInput
|
|
|
10
10
|
require("./index.css");
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
const Search = _ref => {
|
|
13
|
-
let
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
let {
|
|
14
|
+
value,
|
|
15
|
+
placeholder,
|
|
16
|
+
onChange
|
|
17
|
+
} = _ref;
|
|
16
18
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
17
19
|
className: "dtable-ui-mobile-selector-search",
|
|
18
20
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableSearchInput.default, {
|
|
@@ -12,10 +12,11 @@ var _lang = require("../lang");
|
|
|
12
12
|
require("./index.css");
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
14
|
const MobileUpload = _ref => {
|
|
15
|
-
let
|
|
16
|
-
type =
|
|
17
|
-
onChange
|
|
18
|
-
onClose
|
|
15
|
+
let {
|
|
16
|
+
type = 'file',
|
|
17
|
+
onChange,
|
|
18
|
+
onClose
|
|
19
|
+
} = _ref;
|
|
19
20
|
const actionSheet = (0, _react.useRef)(_ActionSheet.default);
|
|
20
21
|
const imageRef = (0, _react.useRef)(null);
|
|
21
22
|
const fileRef = (0, _react.useRef)(null);
|
package/lib/Modal/modal.js
CHANGED
|
@@ -51,20 +51,21 @@ class Modal extends ModalComponent {
|
|
|
51
51
|
}
|
|
52
52
|
render() {
|
|
53
53
|
const _this$props = this.props,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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,
|
|
68
69
|
restProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
69
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'));
|
|
70
71
|
const footerDom = footer.length ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
package/lib/Modal/prompt.js
CHANGED
|
@@ -147,10 +147,10 @@ function prompt(title, message, callbackOrActions) {
|
|
|
147
147
|
if (typeof callback !== 'function') {
|
|
148
148
|
return;
|
|
149
149
|
}
|
|
150
|
-
const
|
|
151
|
-
text =
|
|
152
|
-
|
|
153
|
-
|
|
150
|
+
const {
|
|
151
|
+
text = '',
|
|
152
|
+
password = ''
|
|
153
|
+
} = data;
|
|
154
154
|
const callbackArgs = type === 'login-password' ? [text, password] : type === 'secure-text' ? [password] : [text];
|
|
155
155
|
return callback(...callbackArgs);
|
|
156
156
|
}
|
|
@@ -13,7 +13,9 @@ var _selectEditor = _interopRequireDefault(require("../select-editor"));
|
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
14
|
const _excluded = ["value"];
|
|
15
15
|
const MultipleSelectEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
16
|
-
let
|
|
16
|
+
let {
|
|
17
|
+
value: oldValue
|
|
18
|
+
} = _ref,
|
|
17
19
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
18
20
|
const value = oldValue ? Array.isArray(oldValue) ? oldValue : [oldValue] : [];
|
|
19
21
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_selectEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
@@ -14,9 +14,10 @@ class MultipleSelectFormatter extends _react.default.PureComponent {
|
|
|
14
14
|
constructor() {
|
|
15
15
|
super(...arguments);
|
|
16
16
|
this.getOptions = () => {
|
|
17
|
-
const
|
|
18
|
-
value
|
|
19
|
-
options
|
|
17
|
+
const {
|
|
18
|
+
value,
|
|
19
|
+
options
|
|
20
|
+
} = this.props;
|
|
20
21
|
if (!Array.isArray(value) || !Array.isArray(options)) return [];
|
|
21
22
|
let selectedOptions = options.filter(option => value.includes(option.id) || value.includes(option.name));
|
|
22
23
|
if (selectedOptions.length === 0) return [];
|
|
@@ -28,9 +29,10 @@ class MultipleSelectFormatter extends _react.default.PureComponent {
|
|
|
28
29
|
};
|
|
29
30
|
}
|
|
30
31
|
render() {
|
|
31
|
-
let
|
|
32
|
-
value
|
|
33
|
-
containerClassName
|
|
32
|
+
let {
|
|
33
|
+
value,
|
|
34
|
+
containerClassName
|
|
35
|
+
} = this.props;
|
|
34
36
|
let classname = (0, _classnames.default)('dtable-ui cell-formatter-container multiple-select-formatter', containerClassName);
|
|
35
37
|
if (!value || Array.isArray(value) && value.length === 0) {
|
|
36
38
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -43,10 +43,11 @@ class NotificationPopover extends _react.default.Component {
|
|
|
43
43
|
document.removeEventListener('mousedown', this.onMouseDown);
|
|
44
44
|
}
|
|
45
45
|
render() {
|
|
46
|
-
const
|
|
47
|
-
headerText
|
|
48
|
-
bodyText
|
|
49
|
-
footerText
|
|
46
|
+
const {
|
|
47
|
+
headerText,
|
|
48
|
+
bodyText,
|
|
49
|
+
footerText
|
|
50
|
+
} = this.props;
|
|
50
51
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.Popover, {
|
|
51
52
|
className: "notification-wrapper",
|
|
52
53
|
target: "notification-popover",
|
|
@@ -14,7 +14,9 @@ class NumberEditor extends _react.default.Component {
|
|
|
14
14
|
constructor(props) {
|
|
15
15
|
super(props);
|
|
16
16
|
this.onChange = event => {
|
|
17
|
-
const
|
|
17
|
+
const {
|
|
18
|
+
data
|
|
19
|
+
} = this.props.column; // data maybe 'null'
|
|
18
20
|
const format = data && data.format ? data.format : _dtableUtils.DEFAULT_NUMBER_FORMAT;
|
|
19
21
|
let currency_symbol = null;
|
|
20
22
|
if (data && data.format === 'custom_currency') {
|
|
@@ -33,10 +35,11 @@ class NumberEditor extends _react.default.Component {
|
|
|
33
35
|
});
|
|
34
36
|
};
|
|
35
37
|
this.onKeyDown = event => {
|
|
36
|
-
let
|
|
37
|
-
selectionStart
|
|
38
|
-
selectionEnd
|
|
39
|
-
value
|
|
38
|
+
let {
|
|
39
|
+
selectionStart,
|
|
40
|
+
selectionEnd,
|
|
41
|
+
value
|
|
42
|
+
} = event.currentTarget;
|
|
40
43
|
if (event.keyCode === _constants.KeyCodes.Enter || event.keyCode === _constants.KeyCodes.Esc) {
|
|
41
44
|
event.preventDefault();
|
|
42
45
|
this.onBlur();
|
|
@@ -47,7 +50,9 @@ class NumberEditor extends _react.default.Component {
|
|
|
47
50
|
};
|
|
48
51
|
this.getValue = () => {
|
|
49
52
|
const value = this.getInputNode().value;
|
|
50
|
-
const
|
|
53
|
+
const {
|
|
54
|
+
column
|
|
55
|
+
} = this.props;
|
|
51
56
|
return (0, _dtableUtils.formatStringToNumber)(value, column.data);
|
|
52
57
|
};
|
|
53
58
|
this.getInputNode = () => {
|
|
@@ -78,18 +83,22 @@ class NumberEditor extends _react.default.Component {
|
|
|
78
83
|
if (this.props.isInModal) {
|
|
79
84
|
this.input.focus();
|
|
80
85
|
}
|
|
81
|
-
const
|
|
82
|
-
data =
|
|
83
|
-
|
|
86
|
+
const {
|
|
87
|
+
data = {}
|
|
88
|
+
} = this.props.column;
|
|
89
|
+
let {
|
|
90
|
+
value
|
|
91
|
+
} = this.state;
|
|
84
92
|
value = (0, _dtableUtils.getNumberDisplayString)(value, data) || '';
|
|
85
93
|
this.setState({
|
|
86
94
|
value
|
|
87
95
|
});
|
|
88
96
|
}
|
|
89
97
|
render() {
|
|
90
|
-
const
|
|
91
|
-
isInModal
|
|
92
|
-
readOnly
|
|
98
|
+
const {
|
|
99
|
+
isInModal,
|
|
100
|
+
readOnly
|
|
101
|
+
} = this.props;
|
|
93
102
|
let style = isInModal ? {
|
|
94
103
|
textAlign: 'left',
|
|
95
104
|
width: '320px'
|
|
@@ -12,10 +12,11 @@ require("./index.css");
|
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
class NumberFormatter extends _react.default.Component {
|
|
14
14
|
render() {
|
|
15
|
-
let
|
|
16
|
-
number
|
|
17
|
-
data
|
|
18
|
-
containerClassName
|
|
15
|
+
let {
|
|
16
|
+
value: number,
|
|
17
|
+
data,
|
|
18
|
+
containerClassName
|
|
19
|
+
} = this.props;
|
|
19
20
|
let classname = (0, _classnames.default)('dtable-ui cell-formatter-container number-formatter', containerClassName);
|
|
20
21
|
if (number || number === 0) {
|
|
21
22
|
number = (0, _dtableUtils.getNumberDisplayString)(number, data);
|
|
@@ -9,8 +9,10 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
9
9
|
var _DTableIcon = _interopRequireDefault(require("../DTableIcon"));
|
|
10
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
11
|
const PhoneNumberLink = _ref => {
|
|
12
|
-
let
|
|
13
|
-
|
|
12
|
+
let {
|
|
13
|
+
phoneNumber,
|
|
14
|
+
className
|
|
15
|
+
} = _ref;
|
|
14
16
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
|
|
15
17
|
className: (0, _classnames.default)(className),
|
|
16
18
|
href: "tel:".concat(typeof phoneNumber === 'string' ? phoneNumber.trim() : ''),
|
|
@@ -44,7 +44,9 @@ class AbstractPicker extends React.Component {
|
|
|
44
44
|
this.getSel = () => {
|
|
45
45
|
const value = this.props.value || [];
|
|
46
46
|
let treeChildren;
|
|
47
|
-
const
|
|
47
|
+
const {
|
|
48
|
+
data
|
|
49
|
+
} = this.props;
|
|
48
50
|
if (this.props.cascade) {
|
|
49
51
|
treeChildren = (0, _arrayTreeFilter.default)(data, (c, level) => {
|
|
50
52
|
return c.value === value[level];
|
|
@@ -59,11 +61,12 @@ class AbstractPicker extends React.Component {
|
|
|
59
61
|
}));
|
|
60
62
|
};
|
|
61
63
|
this.getPickerCol = () => {
|
|
62
|
-
const
|
|
63
|
-
data
|
|
64
|
-
pickerPrefixCls
|
|
65
|
-
itemStyle
|
|
66
|
-
indicatorStyle
|
|
64
|
+
const {
|
|
65
|
+
data,
|
|
66
|
+
pickerPrefixCls,
|
|
67
|
+
itemStyle,
|
|
68
|
+
indicatorStyle
|
|
69
|
+
} = this.props;
|
|
67
70
|
return data.map((col, index) => {
|
|
68
71
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Picker.default, {
|
|
69
72
|
prefixCls: pickerPrefixCls,
|
|
@@ -125,23 +128,24 @@ class AbstractPicker extends React.Component {
|
|
|
125
128
|
};
|
|
126
129
|
}
|
|
127
130
|
render() {
|
|
128
|
-
const _this$
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
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);
|
|
145
149
|
|
|
146
150
|
// tslint:disable-next-line:variable-name
|
|
147
151
|
const _locale = (0, _getLocale.getComponentLocale)(this.props, this.context, 'Picker', () => require('./locale/zh_CN'));
|
package/lib/Popover/index.js
CHANGED
|
@@ -27,9 +27,10 @@ function recursiveCloneChildren(children) {
|
|
|
27
27
|
class Popover extends React.Component {
|
|
28
28
|
render() {
|
|
29
29
|
const _this$props = this.props,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
{
|
|
31
|
+
overlay,
|
|
32
|
+
onSelect = () => {}
|
|
33
|
+
} = _this$props,
|
|
33
34
|
restProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
34
35
|
const overlayNode = recursiveCloneChildren(overlay, (child, index) => {
|
|
35
36
|
const extraProps = {
|
package/lib/Popover/item.js
CHANGED
|
@@ -16,13 +16,15 @@ const _excluded = ["children", "className", "prefixCls", "icon", "disabled", "fi
|
|
|
16
16
|
class Item extends React.Component {
|
|
17
17
|
render() {
|
|
18
18
|
const _this$props = this.props,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
{
|
|
20
|
+
children,
|
|
21
|
+
className,
|
|
22
|
+
prefixCls,
|
|
23
|
+
icon,
|
|
24
|
+
disabled,
|
|
25
|
+
firstItem,
|
|
26
|
+
activeStyle
|
|
27
|
+
} = _this$props,
|
|
26
28
|
restProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
27
29
|
const cls = (0, _classnames.default)("".concat(prefixCls, "-item"), className, {
|
|
28
30
|
["".concat(prefixCls, "-item-disabled")]: disabled
|
package/lib/Progress/index.js
CHANGED
|
@@ -25,15 +25,14 @@ class Progress extends React.Component {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
render() {
|
|
28
|
-
const
|
|
29
|
-
className
|
|
30
|
-
prefixCls
|
|
31
|
-
position
|
|
32
|
-
unfilled
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
barStyle = _this$props$barStyle === void 0 ? {} : _this$props$barStyle;
|
|
28
|
+
const {
|
|
29
|
+
className,
|
|
30
|
+
prefixCls,
|
|
31
|
+
position,
|
|
32
|
+
unfilled,
|
|
33
|
+
style = {},
|
|
34
|
+
barStyle = {}
|
|
35
|
+
} = this.props;
|
|
37
36
|
const percentStyle = {
|
|
38
37
|
width: this.noAppearTransition || !this.props.appearTransition ? "".concat(this.props.percent, "%") : 0,
|
|
39
38
|
height: 0
|
package/lib/Radio/Radio.js
CHANGED
|
@@ -16,11 +16,15 @@ const _excluded = ["className", "style"];
|
|
|
16
16
|
class Radio extends React.Component {
|
|
17
17
|
render() {
|
|
18
18
|
const _this$props = this.props,
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
{
|
|
20
|
+
className,
|
|
21
|
+
style
|
|
22
|
+
} = _this$props,
|
|
21
23
|
restProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
+
const {
|
|
25
|
+
prefixCls,
|
|
26
|
+
children
|
|
27
|
+
} = restProps;
|
|
24
28
|
const wrapCls = (0, _classnames.default)("".concat(prefixCls, "-wrapper"), className);
|
|
25
29
|
if ('class' in restProps) {
|
|
26
30
|
// Todo https://github.com/developit/preact-compat/issues/422
|
package/lib/Radio/RadioItem.js
CHANGED
|
@@ -19,15 +19,19 @@ function noop() {}
|
|
|
19
19
|
class RadioItem extends React.Component {
|
|
20
20
|
render() {
|
|
21
21
|
const _this$props = this.props,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
{
|
|
23
|
+
listPrefixCls,
|
|
24
|
+
onChange,
|
|
25
|
+
disabled,
|
|
26
|
+
radioProps,
|
|
27
|
+
onClick
|
|
28
|
+
} = _this$props,
|
|
27
29
|
otherProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
const {
|
|
31
|
+
prefixCls,
|
|
32
|
+
className,
|
|
33
|
+
children
|
|
34
|
+
} = otherProps;
|
|
31
35
|
const wrapCls = (0, _classnames.default)("".concat(prefixCls, "-item"), className, {
|
|
32
36
|
["".concat(prefixCls, "-item-disabled")]: disabled === true
|
|
33
37
|
});
|
|
@@ -13,16 +13,15 @@ class RateFormatter extends _react.default.Component {
|
|
|
13
13
|
constructor() {
|
|
14
14
|
super(...arguments);
|
|
15
15
|
this.getRateList = () => {
|
|
16
|
-
const
|
|
17
|
-
data
|
|
18
|
-
value
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
rate_max_number =
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
rate_style_type = _ref$rate_style_type === void 0 ? 'dtable-icon-rate' : _ref$rate_style_type;
|
|
16
|
+
const {
|
|
17
|
+
data,
|
|
18
|
+
value
|
|
19
|
+
} = this.props;
|
|
20
|
+
const {
|
|
21
|
+
rate_max_number = 5,
|
|
22
|
+
rate_style_color = '#e5e5e5',
|
|
23
|
+
rate_style_type = 'dtable-icon-rate'
|
|
24
|
+
} = data || {};
|
|
26
25
|
const validValue = Math.min(rate_max_number, value);
|
|
27
26
|
let rateList = [];
|
|
28
27
|
for (let i = 0; i < validValue; i++) {
|
|
@@ -37,9 +36,10 @@ class RateFormatter extends _react.default.Component {
|
|
|
37
36
|
};
|
|
38
37
|
}
|
|
39
38
|
render() {
|
|
40
|
-
const
|
|
41
|
-
number
|
|
42
|
-
containerClassName
|
|
39
|
+
const {
|
|
40
|
+
value: number,
|
|
41
|
+
containerClassName
|
|
42
|
+
} = this.props;
|
|
43
43
|
const className = (0, _classnames.default)('dtable-ui cell-formatter-container rate-formatter', containerClassName);
|
|
44
44
|
if (!number) return null;
|
|
45
45
|
const rateList = this.getRateList();
|
|
@@ -1,12 +1,11 @@
|
|
|
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 _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
10
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
10
|
var _reactstrap = require("reactstrap");
|
|
12
11
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
@@ -15,19 +14,15 @@ var _DTableDropdownItem = _interopRequireDefault(require("../DTableDropdownItem"
|
|
|
15
14
|
require("./index.css");
|
|
16
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
16
|
const RoleStatusEditor = _ref => {
|
|
18
|
-
let
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const _useState3 = (0, _react.useState)(320),
|
|
28
|
-
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
29
|
-
menuMaxHeight = _useState4[0],
|
|
30
|
-
setMenuMaxHeight = _useState4[1];
|
|
17
|
+
let {
|
|
18
|
+
isShowDropdownIcon,
|
|
19
|
+
currentOption,
|
|
20
|
+
menuOptions,
|
|
21
|
+
onChangeOption,
|
|
22
|
+
closeShowDropdownIcon
|
|
23
|
+
} = _ref;
|
|
24
|
+
const [isOpen, setIsOpen] = (0, _react.useState)(false);
|
|
25
|
+
const [menuMaxHeight, setMenuMaxHeight] = (0, _react.useState)(320);
|
|
31
26
|
const toggleRef = (0, _react.useRef)(null);
|
|
32
27
|
(0, _react.useEffect)(() => {
|
|
33
28
|
if (isOpen && toggleRef.current) {
|
|
@@ -39,7 +34,9 @@ const RoleStatusEditor = _ref => {
|
|
|
39
34
|
}
|
|
40
35
|
}, [isOpen]);
|
|
41
36
|
const handleClickMenuOption = menuOption => {
|
|
42
|
-
const
|
|
37
|
+
const {
|
|
38
|
+
value
|
|
39
|
+
} = menuOption;
|
|
43
40
|
closeShowDropdownIcon && closeShowDropdownIcon();
|
|
44
41
|
if (value === currentOption.value) return;
|
|
45
42
|
onChangeOption(value);
|
|
@@ -67,8 +64,10 @@ const RoleStatusEditor = _ref => {
|
|
|
67
64
|
overflowY: 'auto'
|
|
68
65
|
},
|
|
69
66
|
children: menuOptions.map(option => {
|
|
70
|
-
const
|
|
71
|
-
|
|
67
|
+
const {
|
|
68
|
+
value,
|
|
69
|
+
label
|
|
70
|
+
} = option;
|
|
72
71
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableDropdownItem.default, {
|
|
73
72
|
onClick: () => handleClickMenuOption(option),
|
|
74
73
|
showChecked: true,
|