dtable-ui-component 7.0.13 → 7.0.15
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 +58 -49
- package/lib/ActivityIndicator/index.js +17 -16
- package/lib/AsyncUserSelect/index.js +20 -46
- package/lib/AsyncUserSelect/user-item.js +6 -5
- package/lib/AutoNumberFormatter/index.js +4 -3
- package/lib/Badge/index.js +27 -29
- package/lib/ButtonFormatter/index.js +8 -6
- package/lib/CTimeFormatter/index.js +4 -3
- package/lib/CheckboxEditor/index.js +16 -13
- 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 +17 -14
- package/lib/CollaboratorEditor/mb-editor/index.js +19 -11
- package/lib/CollaboratorEditor/pc-editor/index.js +35 -26
- package/lib/CollaboratorFormatter/index.js +10 -8
- package/lib/CollaboratorItem/index.js +5 -4
- package/lib/CollapsibleSettingLayout/index.js +8 -10
- package/lib/Comment/body/comment.js +19 -11
- package/lib/Comment/body/index.js +8 -8
- package/lib/Comment/footer/btns/index.js +7 -4
- package/lib/Comment/footer/index.js +21 -10
- package/lib/Comment/footer/input/index.js +55 -34
- package/lib/Comment/footer/input/participant/index.js +6 -5
- 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 +26 -10
- package/lib/Comment/index.js +57 -39
- package/lib/Comment/utils/utilities.js +22 -16
- package/lib/CreatorFormatter/index.js +8 -6
- package/lib/DTableColorPicker/ColorPickerPortal/index.js +26 -28
- package/lib/DTableColorPicker/index.js +53 -67
- package/lib/DTableColorPicker/utils.js +7 -5
- package/lib/DTableColumnIcon/index.js +7 -6
- package/lib/DTableCommonAddTool/index.js +10 -8
- package/lib/DTableCustomFooter/index.js +3 -1
- package/lib/DTableCustomizeSearchInput/index.js +41 -26
- package/lib/DTableCustomizeSelect/index.js +24 -19
- package/lib/DTableDropdownItem/index.js +28 -24
- package/lib/DTableDropdownMenu/index.js +17 -14
- package/lib/DTableEmptyTip/index.js +5 -4
- package/lib/DTableFiltersPopover/index.js +42 -27
- package/lib/DTableFiltersPopover/utils/filter-item-utils.js +3 -1
- package/lib/DTableFiltersPopover/utils/index.js +114 -64
- 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 +57 -36
- package/lib/DTableFiltersPopover/widgets/filter-item.js +165 -106
- package/lib/DTableFiltersPopover/widgets/filter-list/index.js +162 -137
- package/lib/DTableFiltersPopover/widgets/rate-item.js +25 -20
- package/lib/DTableIcon/index.js +11 -10
- package/lib/DTableIcon/svg-icon.js +11 -9
- package/lib/DTableModalHeader/index.js +7 -7
- package/lib/DTablePopover/index.js +16 -12
- package/lib/DTableRadio/index.js +9 -10
- package/lib/DTableRadioGroup/index.js +20 -11
- package/lib/DTableSearchInput/index.js +29 -19
- package/lib/DTableSelect/dtable-select-label.js +6 -7
- package/lib/DTableSelect/index.js +26 -25
- package/lib/DTableSelect/select-dropdown-indicator/index.js +3 -1
- package/lib/DTableSelect/utils.js +83 -47
- package/lib/DTableSubDropdownMenu/index.js +16 -12
- package/lib/DTableSubDropdownToggle/index.js +16 -17
- package/lib/DTableSwitch/index.js +11 -12
- package/lib/DTableToolTip/index.js +12 -11
- package/lib/DateEditor/index.js +28 -30
- package/lib/DateEditor/mb-editor/index.js +31 -18
- package/lib/DateEditor/pc-editor.js +46 -27
- package/lib/DateFormatter/index.js +5 -4
- package/lib/DatePicker/index.js +15 -9
- package/lib/DatePicker/utils.js +7 -5
- package/lib/DeleteTip/index.js +6 -5
- package/lib/DepartmentMultipleSelectEditor/index.js +26 -28
- package/lib/DepartmentSelectFilter/index.js +13 -8
- package/lib/DepartmentSingleSelectEditor/index.js +16 -13
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +49 -50
- package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +64 -42
- package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +19 -13
- package/lib/DepartmentSingleSelectFormatter/index.js +6 -4
- package/lib/DigitalSignEditor/index.js +16 -13
- package/lib/DigitalSignEditor/mb-editor/index.js +24 -16
- package/lib/DigitalSignEditor/pc-editor/index.js +31 -23
- package/lib/DigitalSignEditor/service.js +5 -3
- package/lib/DigitalSignEditor/signature-board/index.js +10 -7
- package/lib/DigitalSignEditor/utils.js +4 -2
- package/lib/DigitalSignFormatter/index.js +15 -12
- package/lib/DigitalSignFormatter/utils.js +6 -5
- package/lib/Drawer/index.js +3 -2
- 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 +13 -13
- package/lib/FieldDisplaySetting/index.js +20 -20
- package/lib/FileEditor/files-previewer/index.js +16 -13
- package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +20 -12
- 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 +24 -17
- package/lib/FileEditor/files-previewer/pc-previewer/index.js +57 -29
- package/lib/FileEditor/index.js +16 -13
- package/lib/FileEditor/mb-editor/index.js +20 -28
- package/lib/FileEditor/pc-editor/addition-previewer/index.js +4 -2
- package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +31 -17
- package/lib/FileEditor/pc-editor/index.js +30 -22
- package/lib/FileFormatter/index.js +20 -27
- package/lib/FileItemFormatter/index.js +10 -7
- package/lib/FileUploader/index.js +46 -29
- package/lib/FormulaFormatter/index.js +44 -24
- package/lib/GeolocationEditor/index.js +32 -27
- package/lib/GeolocationEditor/map-editor-utils.js +23 -21
- package/lib/GeolocationEditor/mb-editor/country-editor.js +14 -17
- package/lib/GeolocationEditor/mb-editor/index.js +28 -22
- package/lib/GeolocationEditor/mb-editor/location-editor.js +15 -18
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +77 -47
- 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 +25 -12
- package/lib/GeolocationEditor/pc-editor/index.js +41 -27
- package/lib/GeolocationEditor/pc-editor/location-editor.js +33 -28
- package/lib/GeolocationEditor/pc-editor/map-editor/index.js +67 -43
- package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +69 -42
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +86 -42
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +85 -39
- package/lib/GeolocationEditor/pc-editor/province-city-editor.js +26 -20
- package/lib/GeolocationEditor/pc-editor/province-editor.js +15 -8
- package/lib/GeolocationEditor/pc-editor/selector-header-item.js +6 -5
- package/lib/GeolocationEditor/pc-editor/selector-list.js +8 -7
- package/lib/GeolocationFormatter/index.js +5 -4
- package/lib/HtmlLongTextFormatter/index.js +13 -5
- package/lib/Icon/index.js +13 -15
- package/lib/Icon/load-sprite.js +13 -2
- package/lib/IconButton/index.js +12 -13
- package/lib/ImageEditor/images-previewer/image-preview/index.js +22 -13
- package/lib/ImageEditor/images-previewer/index.js +9 -3
- package/lib/ImageEditor/index.js +16 -13
- 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 +5 -3
- package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +26 -12
- package/lib/ImageEditor/pc-editor/images-previewer/index.js +10 -4
- package/lib/ImageEditor/pc-editor/index.js +16 -11
- package/lib/ImageFormatter/images-lazy-load.js +11 -19
- package/lib/ImageFormatter/index.js +14 -12
- package/lib/ImagePreviewerLightbox/index.js +15 -19
- package/lib/ImageThumbnail/index.js +15 -12
- package/lib/InputItem/custom-input.js +55 -35
- package/lib/InputItem/custom-keyboard.js +42 -42
- package/lib/InputItem/index.js +82 -63
- package/lib/InputItem/input.js +9 -11
- 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 +13 -7
- package/lib/LinkFormatter/index.js +37 -21
- package/lib/List/index.js +17 -19
- package/lib/List/list-item.js +59 -55
- package/lib/LongTextFormatter/index.js +5 -4
- package/lib/MBEditorHeader/index.js +9 -8
- package/lib/MTimeFormatter/index.js +4 -3
- package/lib/MobileFullScreenPage/body/index.js +6 -4
- package/lib/MobileFullScreenPage/header/index.js +10 -8
- package/lib/MobileFullScreenPage/index.js +12 -14
- package/lib/MobileModal/index.js +7 -8
- 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.css +0 -4
- 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/alert.js +2 -2
- package/lib/Modal/modal.js +28 -30
- package/lib/Modal/prompt.js +14 -14
- package/lib/MultipleSelectEditor/index.js +7 -7
- package/lib/MultipleSelectFormatter/index.js +9 -7
- 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 +5 -3
- package/lib/Picker/AbstractPicker.js +35 -33
- package/lib/Popover/index.js +9 -11
- package/lib/Popover/item.js +22 -24
- package/lib/Progress/index.js +18 -17
- package/lib/Radio/Radio.js +17 -15
- package/lib/Radio/RadioItem.js +23 -19
- package/lib/RateFormatter/index.js +15 -15
- package/lib/RoleStatusEditor/index.js +18 -19
- package/lib/RowExpand/index.js +7 -6
- package/lib/RowExpandDialog/body/index.js +57 -40
- package/lib/RowExpandDialog/column-content/index.js +10 -6
- package/lib/RowExpandDialog/header/index.js +12 -9
- package/lib/RowExpandDialog/index.js +59 -63
- package/lib/RowExpandEditor/add-btn/index.js +7 -6
- package/lib/RowExpandEditor/checkbox-editor/index.js +7 -6
- 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/index.js +7 -6
- 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/index.js +7 -6
- 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/index.js +7 -6
- 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/index.js +7 -6
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +38 -24
- package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +39 -25
- package/lib/RowExpandEditor/duration-editor/index.js +7 -6
- 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/index.js +7 -6
- package/lib/RowExpandEditor/email-editor/mb-editor/index.js +20 -10
- package/lib/RowExpandEditor/email-editor/pc-editor/index.js +25 -14
- package/lib/RowExpandEditor/file-editor/index.js +7 -6
- 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/index.js +7 -6
- 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/index.js +7 -6
- package/lib/RowExpandEditor/image-editor/mb-editor/index.js +26 -16
- package/lib/RowExpandEditor/image-editor/pc-editor/index.js +24 -14
- package/lib/RowExpandEditor/index.js +16 -11
- package/lib/RowExpandEditor/long-text-editor/index.js +7 -6
- 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/index.js +7 -6
- package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +20 -12
- package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +38 -27
- package/lib/RowExpandEditor/number-editor/index.js +7 -6
- 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/index.js +7 -6
- package/lib/RowExpandEditor/rate-editor/mb-editor.js +26 -13
- package/lib/RowExpandEditor/rate-editor/pc-editor.js +41 -25
- package/lib/RowExpandEditor/single-select-editor/index.js +7 -6
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +32 -21
- package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +37 -25
- package/lib/RowExpandEditor/text-editor/index.js +7 -6
- 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/index.js +7 -6
- package/lib/RowExpandEditor/url-editor/mb-editor/index.js +15 -7
- package/lib/RowExpandEditor/url-editor/pc-editor/index.js +20 -11
- package/lib/RowExpandFormatter/department-formatter/index.js +6 -3
- 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 +8 -5
- package/lib/RowExpandFormatter/file-formatter/index.js +9 -8
- package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +14 -12
- package/lib/RowExpandFormatter/formula-formatter/index.js +51 -30
- package/lib/RowExpandFormatter/image-formatter/index.js +11 -9
- package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +10 -9
- package/lib/RowExpandFormatter/index.js +52 -34
- package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +15 -9
- package/lib/RowExpandFormatter/link-formatter/index.js +25 -17
- package/lib/RowExpandFormatter/link-formatter/value-display-utils.js +5 -3
- package/lib/RowExpandFormatter/rate-formatter/index.js +14 -13
- package/lib/RowExpandFormatter/text/index.js +5 -4
- package/lib/RowExpandFormatter/url-formatter/index.js +9 -6
- package/lib/RowExpandView/body/index.js +43 -32
- package/lib/RowExpandView/column-content/index.js +7 -3
- package/lib/RowExpandView/index.js +52 -53
- package/lib/SelectItem/index.js +7 -5
- package/lib/SelectOptionGroup/index.js +40 -30
- package/lib/SelectedDepartments/index.js +12 -10
- package/lib/SimpleLongTextFormatter/index.js +18 -12
- 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 +7 -7
- package/lib/SingleSelectFormatter/index.js +9 -8
- package/lib/TabBar/Tab.js +26 -24
- package/lib/TabBar/index.js +28 -24
- package/lib/Tabs/index.js +13 -10
- package/lib/TextEditor/index.js +23 -14
- package/lib/TextFormatter/index.js +4 -3
- package/lib/TextareaItem/index.js +53 -48
- package/lib/Toast/index.js +9 -8
- package/lib/UrlFormatter/index.js +4 -3
- package/lib/common/editor-base.js +12 -7
- package/lib/formatterConfig/index.js +3 -3
- package/lib/hooks/common-hooks.js +4 -2
- package/lib/select-editor/index.js +16 -13
- package/lib/select-editor/mb-editor/index.js +28 -17
- package/lib/select-editor/pc-editor/index.js +47 -32
- package/lib/toaster/alert.js +8 -7
- package/lib/toaster/toast.js +4 -3
- package/lib/toaster/toastManager.js +13 -13
- package/lib/toaster/toaster.js +12 -9
- package/lib/utils/cell.js +11 -8
- package/lib/utils/class.js +3 -3
- package/lib/utils/column-utils.js +14 -8
- package/lib/utils/departments.js +6 -5
- package/lib/utils/getLocale.js +11 -5
- package/lib/utils/object-utils.js +5 -4
- package/lib/utils/url.js +29 -22
- package/lib/utils/utils.js +6 -2
- package/package.json +2 -2
|
@@ -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 _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
10
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
10
|
var _reactResponsive = _interopRequireDefault(require("react-responsive"));
|
|
12
11
|
var _pcEditor = _interopRequireDefault(require("./pc-editor"));
|
|
@@ -16,14 +15,16 @@ const RowExpandEmailEditor = /*#__PURE__*/(0, _react.forwardRef)((props, ref) =>
|
|
|
16
15
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
17
16
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
|
|
18
17
|
query: "(min-width: 768px)",
|
|
19
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default,
|
|
18
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, {
|
|
19
|
+
...props,
|
|
20
20
|
ref: ref
|
|
21
|
-
})
|
|
21
|
+
})
|
|
22
22
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
|
|
23
23
|
query: "(max-width: 768px)",
|
|
24
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default,
|
|
24
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, {
|
|
25
|
+
...props,
|
|
25
26
|
ref: ref
|
|
26
|
-
})
|
|
27
|
+
})
|
|
27
28
|
})]
|
|
28
29
|
});
|
|
29
30
|
});
|
|
@@ -12,7 +12,9 @@ class RowExpandMBEmailEditor extends _react.default.Component {
|
|
|
12
12
|
constructor(props) {
|
|
13
13
|
super(props);
|
|
14
14
|
this.onBlur = () => {
|
|
15
|
-
const
|
|
15
|
+
const {
|
|
16
|
+
onCommit
|
|
17
|
+
} = this.props;
|
|
16
18
|
const updated = this.state.value.trim();
|
|
17
19
|
onCommit(updated);
|
|
18
20
|
};
|
|
@@ -30,21 +32,27 @@ class RowExpandMBEmailEditor extends _react.default.Component {
|
|
|
30
32
|
e.stopPropagation();
|
|
31
33
|
};
|
|
32
34
|
this.onOpenEmailLink = () => {
|
|
33
|
-
const
|
|
35
|
+
const {
|
|
36
|
+
value
|
|
37
|
+
} = this.state;
|
|
34
38
|
let newValue = value.trim();
|
|
35
|
-
window.location.href =
|
|
39
|
+
window.location.href = `mailto:${newValue}`;
|
|
36
40
|
};
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
41
|
+
const {
|
|
42
|
+
row,
|
|
43
|
+
column,
|
|
44
|
+
valueKey
|
|
45
|
+
} = props;
|
|
40
46
|
this.state = {
|
|
41
47
|
value: row[column[valueKey]] || ''
|
|
42
48
|
};
|
|
43
49
|
}
|
|
44
50
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
51
|
+
const {
|
|
52
|
+
column,
|
|
53
|
+
row,
|
|
54
|
+
valueKey
|
|
55
|
+
} = nextProps;
|
|
48
56
|
if (row._id !== this.props.row._id) {
|
|
49
57
|
this.setState({
|
|
50
58
|
value: row[column[valueKey]] || ''
|
|
@@ -52,7 +60,9 @@ class RowExpandMBEmailEditor extends _react.default.Component {
|
|
|
52
60
|
}
|
|
53
61
|
}
|
|
54
62
|
render() {
|
|
55
|
-
const
|
|
63
|
+
const {
|
|
64
|
+
value
|
|
65
|
+
} = this.state;
|
|
56
66
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
57
67
|
className: "dtable-ui-mobile-row-expand-input-editor-container position-relative dtable-ui-mobile-row-expand-url-editor-container",
|
|
58
68
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
@@ -24,7 +24,9 @@ class RowExpandPCEmailEditor extends _react.default.Component {
|
|
|
24
24
|
}, 1);
|
|
25
25
|
};
|
|
26
26
|
this.onBlur = () => {
|
|
27
|
-
const
|
|
27
|
+
const {
|
|
28
|
+
onCommit
|
|
29
|
+
} = this.props;
|
|
28
30
|
const updated = this.state.value.trim();
|
|
29
31
|
onCommit(updated);
|
|
30
32
|
};
|
|
@@ -50,22 +52,27 @@ class RowExpandPCEmailEditor extends _react.default.Component {
|
|
|
50
52
|
this.blurInput();
|
|
51
53
|
return;
|
|
52
54
|
}
|
|
53
|
-
const
|
|
54
|
-
selectionStart
|
|
55
|
-
selectionEnd
|
|
56
|
-
value
|
|
55
|
+
const {
|
|
56
|
+
selectionStart,
|
|
57
|
+
selectionEnd,
|
|
58
|
+
value
|
|
59
|
+
} = event.currentTarget;
|
|
57
60
|
if (event.keyCode === _constants.KeyCodes.ChineseInputMethod || event.keyCode === _constants.KeyCodes.LeftArrow && selectionStart === 0 || event.keyCode === _constants.KeyCodes.RightArrow && selectionEnd === value.length) {
|
|
58
61
|
event.stopPropagation();
|
|
59
62
|
}
|
|
60
63
|
};
|
|
61
64
|
this.onOpenEmailLink = () => {
|
|
62
|
-
const
|
|
65
|
+
const {
|
|
66
|
+
value
|
|
67
|
+
} = this.state;
|
|
63
68
|
let newValue = value.trim();
|
|
64
|
-
window.location.href =
|
|
69
|
+
window.location.href = `mailto:${newValue}`;
|
|
65
70
|
};
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
|
|
71
|
+
const {
|
|
72
|
+
row,
|
|
73
|
+
column,
|
|
74
|
+
valueKey
|
|
75
|
+
} = props;
|
|
69
76
|
this.state = {
|
|
70
77
|
value: row[column[valueKey]] || ''
|
|
71
78
|
};
|
|
@@ -76,9 +83,11 @@ class RowExpandPCEmailEditor extends _react.default.Component {
|
|
|
76
83
|
}
|
|
77
84
|
}
|
|
78
85
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
|
|
86
|
+
const {
|
|
87
|
+
column,
|
|
88
|
+
row,
|
|
89
|
+
valueKey
|
|
90
|
+
} = nextProps;
|
|
82
91
|
if (row._id !== this.props.row._id) {
|
|
83
92
|
this.setState({
|
|
84
93
|
value: row[column[valueKey]] || ''
|
|
@@ -91,7 +100,9 @@ class RowExpandPCEmailEditor extends _react.default.Component {
|
|
|
91
100
|
}
|
|
92
101
|
}
|
|
93
102
|
render() {
|
|
94
|
-
let
|
|
103
|
+
let {
|
|
104
|
+
value
|
|
105
|
+
} = this.state;
|
|
95
106
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
96
107
|
className: "dtable-ui-row-expand-url-editor",
|
|
97
108
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
@@ -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 _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
10
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
10
|
var _reactResponsive = _interopRequireDefault(require("react-responsive"));
|
|
12
11
|
var _pcEditor = _interopRequireDefault(require("./pc-editor"));
|
|
@@ -16,14 +15,16 @@ const RowExpandFileEditor = /*#__PURE__*/(0, _react.forwardRef)((props, ref) =>
|
|
|
16
15
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
17
16
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
|
|
18
17
|
query: "(min-width: 768px)",
|
|
19
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default,
|
|
18
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, {
|
|
19
|
+
...props,
|
|
20
20
|
ref: ref
|
|
21
|
-
})
|
|
21
|
+
})
|
|
22
22
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
|
|
23
23
|
query: "(max-width: 768px)",
|
|
24
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default,
|
|
24
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, {
|
|
25
|
+
...props,
|
|
25
26
|
ref: ref
|
|
26
|
-
})
|
|
27
|
+
})
|
|
27
28
|
})]
|
|
28
29
|
});
|
|
29
30
|
});
|
|
@@ -32,17 +32,24 @@ class RowExpandMBFileEditor extends _react.default.Component {
|
|
|
32
32
|
this.props.onCommit(value);
|
|
33
33
|
};
|
|
34
34
|
this.deleteFile = index => {
|
|
35
|
-
const
|
|
35
|
+
const {
|
|
36
|
+
value
|
|
37
|
+
} = this.state;
|
|
36
38
|
const newValue = value.slice(0);
|
|
37
39
|
newValue.splice(index, 1);
|
|
38
40
|
this.onCommit(newValue);
|
|
39
41
|
};
|
|
40
42
|
this.renderFiles = () => {
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
+
const {
|
|
44
|
+
value
|
|
45
|
+
} = this.state;
|
|
46
|
+
const {
|
|
47
|
+
config
|
|
48
|
+
} = this.props;
|
|
43
49
|
return value.map((file, index) => {
|
|
44
|
-
const
|
|
45
|
-
fileIconUrl
|
|
50
|
+
const {
|
|
51
|
+
fileIconUrl
|
|
52
|
+
} = (0, _url.getFileThumbnailInfo)(file);
|
|
46
53
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ImageThumbnail.default, {
|
|
47
54
|
src: fileIconUrl,
|
|
48
55
|
name: file.name,
|
|
@@ -55,9 +62,11 @@ class RowExpandMBFileEditor extends _react.default.Component {
|
|
|
55
62
|
}, 'file-' + index);
|
|
56
63
|
});
|
|
57
64
|
};
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
|
|
65
|
+
const {
|
|
66
|
+
column,
|
|
67
|
+
row,
|
|
68
|
+
valueKey
|
|
69
|
+
} = props;
|
|
61
70
|
this.state = {
|
|
62
71
|
isShowEditor: false,
|
|
63
72
|
value: row[column[valueKey]] || []
|
|
@@ -65,9 +74,11 @@ class RowExpandMBFileEditor extends _react.default.Component {
|
|
|
65
74
|
this.openEditorMode = null;
|
|
66
75
|
}
|
|
67
76
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
|
|
77
|
+
const {
|
|
78
|
+
column,
|
|
79
|
+
row,
|
|
80
|
+
valueKey
|
|
81
|
+
} = nextProps;
|
|
71
82
|
if (row._id !== this.props.row._id) {
|
|
72
83
|
this.setState({
|
|
73
84
|
value: row[column[valueKey]] || [],
|
|
@@ -76,13 +87,15 @@ class RowExpandMBFileEditor extends _react.default.Component {
|
|
|
76
87
|
}
|
|
77
88
|
}
|
|
78
89
|
render() {
|
|
79
|
-
const
|
|
80
|
-
column
|
|
81
|
-
config
|
|
82
|
-
uploadFile
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
90
|
+
const {
|
|
91
|
+
column,
|
|
92
|
+
config,
|
|
93
|
+
uploadFile
|
|
94
|
+
} = this.props;
|
|
95
|
+
const {
|
|
96
|
+
isShowEditor,
|
|
97
|
+
value
|
|
98
|
+
} = this.state;
|
|
86
99
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
87
100
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
88
101
|
className: "dtable-ui-mobile-row-expand-image position-relative",
|
|
@@ -45,11 +45,14 @@ class RowExpandPCFileEditor extends _react.default.Component {
|
|
|
45
45
|
this.props.onCommit(value);
|
|
46
46
|
};
|
|
47
47
|
this.deleteFile = index => {
|
|
48
|
-
const
|
|
49
|
-
column
|
|
50
|
-
row
|
|
51
|
-
onCommit
|
|
52
|
-
|
|
48
|
+
const {
|
|
49
|
+
column,
|
|
50
|
+
row,
|
|
51
|
+
onCommit
|
|
52
|
+
} = this.props;
|
|
53
|
+
let {
|
|
54
|
+
fileContainer
|
|
55
|
+
} = this.state;
|
|
53
56
|
let value = fileContainer || row[column.key];
|
|
54
57
|
let updatedValue = value.slice(0);
|
|
55
58
|
updatedValue.splice(index, 1);
|
|
@@ -72,9 +75,11 @@ class RowExpandPCFileEditor extends _react.default.Component {
|
|
|
72
75
|
document.addEventListener('keydown', this.onKeyDown);
|
|
73
76
|
}
|
|
74
77
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
|
|
78
|
+
const {
|
|
79
|
+
column,
|
|
80
|
+
row,
|
|
81
|
+
valueKey
|
|
82
|
+
} = nextProps;
|
|
78
83
|
if (row._id !== this.props.row._id) {
|
|
79
84
|
this.setState({
|
|
80
85
|
fileContainer: row[column[valueKey]] || [],
|
|
@@ -97,17 +102,19 @@ class RowExpandPCFileEditor extends _react.default.Component {
|
|
|
97
102
|
}
|
|
98
103
|
render() {
|
|
99
104
|
let fileArr = [];
|
|
100
|
-
const
|
|
101
|
-
column
|
|
102
|
-
row
|
|
103
|
-
config
|
|
104
|
-
valueKey
|
|
105
|
-
isEditorFocus
|
|
105
|
+
const {
|
|
106
|
+
column,
|
|
107
|
+
row,
|
|
108
|
+
config,
|
|
109
|
+
valueKey,
|
|
110
|
+
isEditorFocus
|
|
111
|
+
} = this.props;
|
|
106
112
|
let value = this.state.fileContainer !== null ? this.state.fileContainer : row[column[valueKey]];
|
|
107
113
|
if (value && value.length > 0) {
|
|
108
114
|
fileArr = value.map((file, index) => {
|
|
109
|
-
const
|
|
110
|
-
fileIconUrl
|
|
115
|
+
const {
|
|
116
|
+
fileIconUrl
|
|
117
|
+
} = (0, _url.getFileThumbnailInfo)(file);
|
|
111
118
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ImageThumbnail.default, {
|
|
112
119
|
src: fileIconUrl,
|
|
113
120
|
name: file.name,
|
|
@@ -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 _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
10
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
10
|
var _reactResponsive = _interopRequireDefault(require("react-responsive"));
|
|
12
11
|
var _pcEditor = _interopRequireDefault(require("./pc-editor"));
|
|
@@ -16,14 +15,16 @@ const RowExpandGeolocationEditor = /*#__PURE__*/(0, _react.forwardRef)((props, r
|
|
|
16
15
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
17
16
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
|
|
18
17
|
query: "(min-width: 768px)",
|
|
19
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default,
|
|
18
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, {
|
|
19
|
+
...props,
|
|
20
20
|
ref: ref
|
|
21
|
-
})
|
|
21
|
+
})
|
|
22
22
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
|
|
23
23
|
query: "(max-width: 768px)",
|
|
24
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default,
|
|
24
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, {
|
|
25
|
+
...props,
|
|
25
26
|
ref: ref
|
|
26
|
-
})
|
|
27
|
+
})
|
|
27
28
|
})]
|
|
28
29
|
});
|
|
29
30
|
});
|
|
@@ -31,11 +31,14 @@ class RowExpandMBGeolocationEditor extends _react.default.Component {
|
|
|
31
31
|
this.props.onCommit(value);
|
|
32
32
|
};
|
|
33
33
|
this.getLocationInfo = value => {
|
|
34
|
-
const
|
|
35
|
-
column
|
|
36
|
-
config
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
const {
|
|
35
|
+
column,
|
|
36
|
+
config
|
|
37
|
+
} = this.props;
|
|
38
|
+
const {
|
|
39
|
+
dtableBaiduMapKey,
|
|
40
|
+
dtableMineMapKey
|
|
41
|
+
} = config;
|
|
39
42
|
const isBaiduMap = !!(dtableBaiduMapKey || dtableMineMapKey);
|
|
40
43
|
return (0, _dtableUtils.getGeolocationDisplayString)(value, column.data, {
|
|
41
44
|
isBaiduMap,
|
|
@@ -43,7 +46,9 @@ class RowExpandMBGeolocationEditor extends _react.default.Component {
|
|
|
43
46
|
});
|
|
44
47
|
};
|
|
45
48
|
this.renderGeoLocation = () => {
|
|
46
|
-
const
|
|
49
|
+
const {
|
|
50
|
+
value
|
|
51
|
+
} = this.state;
|
|
47
52
|
const text = (0, _dtableUtils.isEmptyObject)(value) ? (0, _lang.getLocale)('Edit_Location') : this.getLocationInfo(value);
|
|
48
53
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_addBtn.default, {
|
|
49
54
|
onClick: this.openEditor,
|
|
@@ -51,18 +56,22 @@ class RowExpandMBGeolocationEditor extends _react.default.Component {
|
|
|
51
56
|
className: "py-4"
|
|
52
57
|
});
|
|
53
58
|
};
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
59
|
+
const {
|
|
60
|
+
row,
|
|
61
|
+
column: _column,
|
|
62
|
+
valueKey
|
|
63
|
+
} = props;
|
|
57
64
|
this.state = {
|
|
58
65
|
isShowEditor: false,
|
|
59
66
|
value: row[_column[valueKey]] || {}
|
|
60
67
|
};
|
|
61
68
|
}
|
|
62
69
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
|
|
70
|
+
const {
|
|
71
|
+
column,
|
|
72
|
+
row,
|
|
73
|
+
valueKey
|
|
74
|
+
} = nextProps;
|
|
66
75
|
if (row._id !== this.props.row._id) {
|
|
67
76
|
this.setState({
|
|
68
77
|
value: row[column[valueKey]] || {},
|
|
@@ -71,11 +80,14 @@ class RowExpandMBGeolocationEditor extends _react.default.Component {
|
|
|
71
80
|
}
|
|
72
81
|
}
|
|
73
82
|
render() {
|
|
74
|
-
const
|
|
75
|
-
column
|
|
76
|
-
row
|
|
77
|
-
config
|
|
78
|
-
|
|
83
|
+
const {
|
|
84
|
+
column,
|
|
85
|
+
row,
|
|
86
|
+
config
|
|
87
|
+
} = this.props;
|
|
88
|
+
const {
|
|
89
|
+
value
|
|
90
|
+
} = this.state;
|
|
79
91
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
80
92
|
children: [this.renderGeoLocation(), this.state.isShowEditor && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeolocationEditor.default, {
|
|
81
93
|
column: column,
|
|
@@ -69,8 +69,12 @@ class RowExpandPCGeolocationEditor extends _react.default.Component {
|
|
|
69
69
|
});
|
|
70
70
|
};
|
|
71
71
|
this.renderGeoLocation = () => {
|
|
72
|
-
let
|
|
73
|
-
|
|
72
|
+
let {
|
|
73
|
+
isEditorFocus
|
|
74
|
+
} = this.props;
|
|
75
|
+
let {
|
|
76
|
+
value
|
|
77
|
+
} = this.state;
|
|
74
78
|
if (!(0, _dtableUtils.isEmptyObject)(value)) {
|
|
75
79
|
const displayContent = this.getLocationInfo(value);
|
|
76
80
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -93,14 +97,18 @@ class RowExpandPCGeolocationEditor extends _react.default.Component {
|
|
|
93
97
|
});
|
|
94
98
|
};
|
|
95
99
|
this.getLocationInfo = value => {
|
|
96
|
-
const
|
|
100
|
+
const {
|
|
101
|
+
column
|
|
102
|
+
} = this.props;
|
|
97
103
|
return (0, _dtableUtils.getGeolocationDisplayString)(value, column.data, {
|
|
98
104
|
hyphen: ' '
|
|
99
105
|
});
|
|
100
106
|
};
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
|
|
107
|
+
const {
|
|
108
|
+
row,
|
|
109
|
+
column: _column,
|
|
110
|
+
valueKey
|
|
111
|
+
} = props;
|
|
104
112
|
this.state = {
|
|
105
113
|
isShowEditor: false,
|
|
106
114
|
value: row[_column[valueKey]] || {}
|
|
@@ -113,9 +121,11 @@ class RowExpandPCGeolocationEditor extends _react.default.Component {
|
|
|
113
121
|
document.addEventListener('keydown', this.onKeyDown);
|
|
114
122
|
}
|
|
115
123
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
116
|
-
const
|
|
117
|
-
|
|
118
|
-
|
|
124
|
+
const {
|
|
125
|
+
column,
|
|
126
|
+
row,
|
|
127
|
+
valueKey
|
|
128
|
+
} = nextProps;
|
|
119
129
|
if (row._id !== this.props.row._id) {
|
|
120
130
|
this.setState({
|
|
121
131
|
value: row[column[valueKey]] || {},
|
|
@@ -138,10 +148,13 @@ class RowExpandPCGeolocationEditor extends _react.default.Component {
|
|
|
138
148
|
document.removeEventListener('keydown', this.onKeyDown);
|
|
139
149
|
}
|
|
140
150
|
render() {
|
|
141
|
-
const
|
|
142
|
-
column
|
|
143
|
-
config
|
|
144
|
-
|
|
151
|
+
const {
|
|
152
|
+
column,
|
|
153
|
+
config
|
|
154
|
+
} = this.props;
|
|
155
|
+
const {
|
|
156
|
+
value
|
|
157
|
+
} = this.state;
|
|
145
158
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
146
159
|
ref: ref => this.editorContainer = ref,
|
|
147
160
|
className: "mt-2",
|
|
@@ -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 _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
10
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
10
|
var _reactResponsive = _interopRequireDefault(require("react-responsive"));
|
|
12
11
|
var _pcEditor = _interopRequireDefault(require("./pc-editor"));
|
|
@@ -16,14 +15,16 @@ const RowExpandImageEditor = /*#__PURE__*/(0, _react.forwardRef)((props, ref) =>
|
|
|
16
15
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
17
16
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
|
|
18
17
|
query: "(min-width: 768px)",
|
|
19
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default,
|
|
18
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, {
|
|
19
|
+
...props,
|
|
20
20
|
ref: ref
|
|
21
|
-
})
|
|
21
|
+
})
|
|
22
22
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
|
|
23
23
|
query: "(max-width: 768px)",
|
|
24
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default,
|
|
24
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, {
|
|
25
|
+
...props,
|
|
25
26
|
ref: ref
|
|
26
|
-
})
|
|
27
|
+
})
|
|
27
28
|
})]
|
|
28
29
|
});
|
|
29
30
|
});
|
|
@@ -41,8 +41,12 @@ class RowExpandMBImageEditor extends _react.default.Component {
|
|
|
41
41
|
this.props.onCommit(updatedValue);
|
|
42
42
|
};
|
|
43
43
|
this.renderImages = () => {
|
|
44
|
-
const
|
|
45
|
-
|
|
44
|
+
const {
|
|
45
|
+
value
|
|
46
|
+
} = this.state;
|
|
47
|
+
const {
|
|
48
|
+
config
|
|
49
|
+
} = this.props;
|
|
46
50
|
return value.map((src, index) => {
|
|
47
51
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ImageThumbnail.default, {
|
|
48
52
|
index: index,
|
|
@@ -51,21 +55,25 @@ class RowExpandMBImageEditor extends _react.default.Component {
|
|
|
51
55
|
config: config,
|
|
52
56
|
onClick: this.toggleEditor,
|
|
53
57
|
deleteImage: this.deleteImage
|
|
54
|
-
},
|
|
58
|
+
}, `image-${index}`);
|
|
55
59
|
});
|
|
56
60
|
};
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
const {
|
|
62
|
+
column,
|
|
63
|
+
row,
|
|
64
|
+
valueKey
|
|
65
|
+
} = props;
|
|
60
66
|
this.state = {
|
|
61
67
|
isShowEditor: false,
|
|
62
68
|
value: row[column[valueKey]] || []
|
|
63
69
|
};
|
|
64
70
|
}
|
|
65
71
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
|
|
72
|
+
const {
|
|
73
|
+
column,
|
|
74
|
+
row,
|
|
75
|
+
valueKey
|
|
76
|
+
} = nextProps;
|
|
69
77
|
if (row._id !== this.props.row._id) {
|
|
70
78
|
this.setState({
|
|
71
79
|
value: row[column[valueKey]] || [],
|
|
@@ -74,13 +82,15 @@ class RowExpandMBImageEditor extends _react.default.Component {
|
|
|
74
82
|
}
|
|
75
83
|
}
|
|
76
84
|
render() {
|
|
77
|
-
const
|
|
78
|
-
column
|
|
79
|
-
config
|
|
80
|
-
uploadFile
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
85
|
+
const {
|
|
86
|
+
column,
|
|
87
|
+
config,
|
|
88
|
+
uploadFile
|
|
89
|
+
} = this.props;
|
|
90
|
+
const {
|
|
91
|
+
isShowEditor,
|
|
92
|
+
value
|
|
93
|
+
} = this.state;
|
|
84
94
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
85
95
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
86
96
|
className: "dtable-ui-mobile-row-expand-image position-relative",
|