dtable-ui-component 7.0.0-xia.1 → 7.0.0-xia.2
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 +14 -16
- package/lib/ActivityIndicator/index.js +7 -8
- package/lib/AsyncUserSelect/index.js +40 -19
- package/lib/AsyncUserSelect/user-item.js +5 -6
- package/lib/AutoNumberFormatter/index.js +3 -4
- package/lib/Badge/index.js +9 -11
- package/lib/ButtonFormatter/index.js +6 -8
- package/lib/CTimeFormatter/index.js +3 -4
- package/lib/CheckboxEditor/index.js +1 -3
- package/lib/CheckboxEditor/mb-editor.js +9 -20
- package/lib/CheckboxEditor/pc-editor.js +12 -24
- package/lib/CheckboxFormatter/index.js +4 -5
- package/lib/CollaboratorEditor/index.js +2 -4
- package/lib/CollaboratorEditor/mb-editor/index.js +11 -19
- package/lib/CollaboratorEditor/pc-editor/index.js +25 -34
- package/lib/CollaboratorFormatter/index.js +8 -10
- package/lib/CollaboratorItem/index.js +4 -5
- package/lib/CollapsibleSettingLayout/index.js +9 -7
- package/lib/Comment/body/comment.js +10 -18
- package/lib/Comment/body/index.js +2 -4
- package/lib/Comment/footer/btns/index.js +4 -7
- package/lib/Comment/footer/index.js +9 -20
- package/lib/Comment/footer/input/index.js +29 -50
- package/lib/Comment/footer/input/participant/index.js +4 -5
- package/lib/Comment/footer/participants/index.js +4 -5
- package/lib/Comment/footer/participants/participant/index.js +1 -3
- package/lib/Comment/footer/participants/participant-select/index.js +8 -24
- package/lib/Comment/index.js +39 -57
- package/lib/Comment/utils/utilities.js +15 -21
- package/lib/CreatorFormatter/index.js +6 -8
- package/lib/DTableColorPicker/ColorPickerPortal/index.js +22 -18
- package/lib/DTableColorPicker/index.js +55 -40
- package/lib/DTableColorPicker/utils.js +4 -6
- package/lib/DTableColumnIcon/index.js +6 -7
- package/lib/DTableCommonAddTool/index.js +6 -8
- package/lib/DTableCustomFooter/index.js +1 -3
- package/lib/DTableCustomizeCollaboratorSelect/index.js +17 -20
- package/lib/DTableCustomizeSelect/index.js +19 -24
- package/lib/DTableDropdownItem/index.js +16 -18
- package/lib/DTableDropdownMenu/index.js +8 -10
- package/lib/DTableEmptyTip/index.js +4 -5
- package/lib/DTableFiltersPopover/index.js +26 -41
- package/lib/DTableFiltersPopover/utils/filter-item-utils.js +1 -3
- package/lib/DTableFiltersPopover/utils/index.js +63 -113
- package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +8 -9
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +16 -13
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +18 -15
- package/lib/DTableFiltersPopover/widgets/filter-calendar.js +8 -14
- package/lib/DTableFiltersPopover/widgets/filter-group.js +34 -55
- package/lib/DTableFiltersPopover/widgets/filter-item.js +107 -170
- package/lib/DTableFiltersPopover/widgets/filter-list/index.js +136 -161
- package/lib/DTableFiltersPopover/widgets/rate-item.js +15 -20
- package/lib/DTableGroupSelect/index.js +11 -15
- package/lib/DTableGroupSelect/select-option-group.js +23 -32
- package/lib/DTableIcon/index.js +6 -7
- package/lib/DTableIcon/svg-icon.js +5 -7
- package/lib/DTableModalHeader/index.js +4 -13
- package/lib/DTablePopover/index.js +11 -15
- package/lib/DTableRadio/index.js +10 -9
- package/lib/DTableRadioGroup/index.js +8 -17
- package/lib/DTableSearchInput/index.js +19 -29
- package/lib/DTableSelect/dtable-select-label.js +6 -5
- package/lib/DTableSelect/index.js +21 -22
- package/lib/DTableSelect/utils.js +7 -15
- package/lib/DTableSubDropdownMenu/index.js +8 -10
- package/lib/DTableSubDropdownToggle/index.js +12 -12
- package/lib/DTableSwitch/index.js +12 -11
- package/lib/DTableToolTip/index.js +7 -8
- package/lib/DateEditor/index.js +20 -15
- package/lib/DateEditor/mb-editor/index.js +18 -31
- package/lib/DateEditor/pc-editor.js +26 -45
- package/lib/DateFormatter/index.js +4 -5
- package/lib/DatePicker/index.js +9 -15
- package/lib/DatePicker/utils.js +1 -3
- package/lib/DeleteTip/index.js +5 -6
- package/lib/DepartmentMultipleSelectEditor/index.js +25 -23
- package/lib/DepartmentSelectFilter/index.js +6 -8
- package/lib/DepartmentSingleSelectEditor/index.js +1 -3
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +48 -47
- package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +36 -58
- package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +13 -19
- package/lib/DepartmentSingleSelectFormatter/index.js +4 -6
- package/lib/DigitalSignEditor/index.js +1 -3
- package/lib/DigitalSignEditor/mb-editor/index.js +12 -20
- package/lib/DigitalSignEditor/pc-editor/index.js +17 -24
- package/lib/DigitalSignEditor/service.js +2 -4
- package/lib/DigitalSignEditor/signature-board/index.js +5 -8
- package/lib/DigitalSignEditor/utils.js +2 -4
- package/lib/DigitalSignFormatter/index.js +12 -15
- package/lib/DigitalSignFormatter/utils.js +4 -5
- package/lib/DurationEditor/index.js +21 -31
- package/lib/DurationFormatter/index.js +4 -5
- package/lib/EditEditorButton/index.js +1 -3
- package/lib/EmailFormatter/index.js +3 -4
- package/lib/FieldDisplaySetting/field-item.js +12 -12
- package/lib/FieldDisplaySetting/index.js +11 -9
- package/lib/FileEditor/files-previewer/index.js +1 -3
- package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +10 -18
- package/lib/FileEditor/files-previewer/mb-previewer/index.js +7 -8
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/dropdown-menu.js +3 -4
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/file-name-editor/index.js +5 -6
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +14 -21
- package/lib/FileEditor/files-previewer/pc-previewer/index.js +29 -57
- package/lib/FileEditor/index.js +1 -3
- package/lib/FileEditor/mb-editor/index.js +28 -20
- package/lib/FileEditor/pc-editor/addition-previewer/index.js +1 -3
- package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +11 -25
- package/lib/FileEditor/pc-editor/index.js +19 -27
- package/lib/FileFormatter/index.js +26 -19
- package/lib/FileItemFormatter/index.js +6 -9
- package/lib/FileUploader/index.js +28 -45
- package/lib/FormulaFormatter/index.js +15 -29
- package/lib/GeolocationEditor/index.js +11 -12
- package/lib/GeolocationEditor/map-editor-utils.js +17 -15
- package/lib/GeolocationEditor/mb-editor/country-editor.js +17 -14
- package/lib/GeolocationEditor/mb-editor/index.js +4 -6
- package/lib/GeolocationEditor/mb-editor/location-editor.js +18 -15
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +41 -68
- package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +50 -89
- package/lib/GeolocationEditor/mb-editor/province-city-editor.js +17 -14
- package/lib/GeolocationEditor/mb-editor/province-editor.js +17 -14
- package/lib/GeolocationEditor/pc-editor/country-editor.js +10 -23
- package/lib/GeolocationEditor/pc-editor/index.js +12 -20
- package/lib/GeolocationEditor/pc-editor/location-editor.js +26 -31
- package/lib/GeolocationEditor/pc-editor/map-editor/index.js +34 -54
- package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +36 -60
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +35 -62
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +36 -65
- package/lib/GeolocationEditor/pc-editor/province-city-editor.js +19 -25
- package/lib/GeolocationEditor/pc-editor/province-editor.js +6 -13
- package/lib/GeolocationEditor/pc-editor/selector-header-item.js +5 -6
- package/lib/GeolocationEditor/pc-editor/selector-list.js +6 -7
- package/lib/GeolocationFormatter/index.js +4 -5
- package/lib/HtmlLongTextFormatter/index.js +4 -12
- package/lib/Icon/index.js +3 -5
- package/lib/IconButton/index.js +4 -6
- package/lib/ImageEditor/images-previewer/image-preview/index.js +12 -21
- package/lib/ImageEditor/images-previewer/index.js +3 -9
- package/lib/ImageEditor/index.js +1 -3
- package/lib/ImageEditor/mb-editor/index.js +28 -20
- package/lib/ImageEditor/pc-editor/addition-previewer/image-link/index.js +2 -6
- package/lib/ImageEditor/pc-editor/addition-previewer/index.js +1 -3
- package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +7 -21
- package/lib/ImageEditor/pc-editor/images-previewer/index.js +3 -9
- package/lib/ImageEditor/pc-editor/index.js +11 -16
- package/lib/ImageFormatter/images-lazy-load.js +19 -11
- package/lib/ImageFormatter/index.js +11 -13
- package/lib/ImagePreviewerLightbox/index.js +15 -13
- package/lib/ImageThumbnail/index.js +10 -13
- package/lib/InputItem/custom-input.js +26 -46
- package/lib/InputItem/custom-keyboard.js +15 -18
- package/lib/InputItem/index.js +34 -50
- package/lib/InputItem/input.js +2 -4
- package/lib/LastModifierFormatter/index.js +6 -8
- package/lib/LinkEditor/index.js +33 -53
- package/lib/LinkEditor/link-editor-option.js +3 -4
- package/lib/LinkEditor/mb-popover/index.js +9 -22
- package/lib/LinkEditor/pc-popover/index.js +5 -10
- package/lib/LinkFormatter/index.js +21 -37
- package/lib/List/index.js +6 -8
- package/lib/List/list-item.js +22 -28
- package/lib/LongTextFormatter/index.js +4 -5
- package/lib/MBEditorHeader/index.js +7 -8
- package/lib/MTimeFormatter/index.js +3 -4
- package/lib/MobileFullScreenPage/body/index.js +3 -5
- package/lib/MobileFullScreenPage/header/index.js +4 -6
- package/lib/MobileFullScreenPage/index.js +13 -11
- package/lib/MobileModal/index.js +1 -3
- package/lib/MobileOperationSheet/index.js +7 -8
- package/lib/MobileSelector/empty/index.js +1 -3
- package/lib/MobileSelector/index.js +5 -7
- package/lib/MobileSelector/option/index.js +3 -5
- package/lib/MobileSelector/options/index.js +1 -3
- package/lib/MobileSelector/search/index.js +3 -5
- package/lib/MobileUpload/index.js +4 -5
- package/lib/Modal/modal.js +14 -15
- package/lib/Modal/prompt.js +4 -4
- package/lib/MultipleSelectEditor/index.js +1 -3
- package/lib/MultipleSelectFormatter/index.js +6 -8
- package/lib/NotificationPopover/index.js +4 -5
- package/lib/NumberEditor/index.js +12 -21
- package/lib/NumberFormatter/index.js +4 -5
- package/lib/PhoneNumberLink/index.js +2 -4
- package/lib/Picker/AbstractPicker.js +23 -27
- package/lib/Popover/index.js +3 -4
- package/lib/Popover/item.js +7 -9
- package/lib/Progress/index.js +9 -8
- package/lib/Radio/Radio.js +4 -8
- package/lib/Radio/RadioItem.js +8 -12
- package/lib/RateFormatter/index.js +13 -13
- package/lib/RoleStatusEditor/index.js +18 -17
- package/lib/RowExpandDialog/body/index.js +32 -49
- package/lib/RowExpandDialog/column-content/index.js +5 -9
- package/lib/RowExpandDialog/header/index.js +6 -8
- package/lib/RowExpandDialog/index.js +49 -34
- package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +4 -5
- package/lib/RowExpandEditor/checkbox-editor/pc-editor.js +8 -10
- package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +22 -33
- package/lib/RowExpandEditor/collaborator-editor/pc-editor/index.js +26 -40
- package/lib/RowExpandEditor/date-editor/mb-editor.js +12 -18
- package/lib/RowExpandEditor/date-editor/pc-editor.js +15 -20
- package/lib/RowExpandEditor/department-editor/mb-editor.js +16 -11
- package/lib/RowExpandEditor/department-editor/pc-editor.js +19 -14
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +20 -34
- package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +21 -35
- package/lib/RowExpandEditor/duration-editor/mb-editor.js +10 -17
- package/lib/RowExpandEditor/duration-editor/pc-editor.js +13 -19
- package/lib/RowExpandEditor/email-editor/mb-editor/index.js +9 -19
- package/lib/RowExpandEditor/email-editor/pc-editor/index.js +13 -24
- package/lib/RowExpandEditor/file-editor/mb-editor/index.js +18 -31
- package/lib/RowExpandEditor/file-editor/pc-editor/index.js +16 -23
- package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +17 -29
- package/lib/RowExpandEditor/geolocation-editor/pc-editor/index.js +13 -26
- package/lib/RowExpandEditor/image-editor/mb-editor/index.js +15 -25
- package/lib/RowExpandEditor/image-editor/pc-editor/index.js +13 -23
- package/lib/RowExpandEditor/index.js +4 -8
- package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +17 -18
- package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +10 -16
- package/lib/RowExpandEditor/long-text-editor/pc-editor/index.js +16 -23
- package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +11 -19
- package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +22 -33
- package/lib/RowExpandEditor/number-editor/mb-editor/index.js +8 -14
- package/lib/RowExpandEditor/number-editor/pc-editor.js +13 -20
- package/lib/RowExpandEditor/rate-editor/mb-editor.js +12 -25
- package/lib/RowExpandEditor/rate-editor/pc-editor.js +20 -36
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +17 -28
- package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +22 -34
- package/lib/RowExpandEditor/text-editor/mb-editor/index.js +4 -5
- package/lib/RowExpandEditor/text-editor/pc-editor/index.js +15 -26
- package/lib/RowExpandEditor/url-editor/mb-editor/index.js +5 -13
- package/lib/RowExpandEditor/url-editor/pc-editor/index.js +9 -18
- package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +2 -4
- package/lib/RowExpandFormatter/department-formatter/pc-formatter.js +2 -4
- package/lib/RowExpandFormatter/email-formatter/index.js +4 -7
- package/lib/RowExpandFormatter/file-formatter/index.js +8 -9
- package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +10 -12
- package/lib/RowExpandFormatter/formula-formatter/index.js +19 -34
- package/lib/RowExpandFormatter/image-formatter/index.js +9 -11
- package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +7 -8
- package/lib/RowExpandFormatter/index.js +27 -41
- package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +8 -14
- package/lib/RowExpandFormatter/link-formatter/index.js +11 -19
- package/lib/RowExpandFormatter/link-formatter/value-display-utils.js +3 -5
- package/lib/RowExpandFormatter/rate-formatter/index.js +11 -12
- package/lib/RowExpandFormatter/text/index.js +4 -5
- package/lib/RowExpandFormatter/url-formatter/index.js +4 -7
- package/lib/RowExpandView/body/index.js +22 -35
- package/lib/RowExpandView/column-content/index.js +3 -7
- package/lib/RowExpandView/index.js +42 -30
- package/lib/SelectItem/index.js +5 -7
- package/lib/SelectOptionGroup/index.js +30 -40
- package/lib/SelectedDepartments/index.js +7 -9
- package/lib/SimpleLongTextFormatter/index.js +10 -16
- package/lib/SimpleLongTextFormatter/normalize-long-text-value.js +3 -4
- package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +12 -21
- package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +3 -4
- package/lib/SingleSelectEditor/index.js +1 -3
- package/lib/SingleSelectFormatter/index.js +8 -9
- package/lib/TabBar/Tab.js +14 -16
- package/lib/TabBar/index.js +18 -21
- package/lib/Tabs/index.js +1 -3
- package/lib/TextEditor/index.js +14 -23
- package/lib/TextFormatter/index.js +3 -4
- package/lib/TextareaItem/index.js +19 -26
- package/lib/Toast/index.js +3 -4
- package/lib/UrlFormatter/index.js +3 -4
- package/lib/common/editor-base.js +7 -12
- package/lib/hooks/common-hooks.js +2 -4
- package/lib/select-editor/index.js +1 -3
- package/lib/select-editor/mb-editor/index.js +17 -28
- package/lib/select-editor/pc-editor/index.js +27 -42
- package/lib/toaster/alert.js +6 -7
- package/lib/toaster/toast.js +2 -3
- package/lib/toaster/toastManager.js +2 -4
- package/lib/utils/cell.js +8 -11
- package/lib/utils/column-utils.js +8 -14
- package/lib/utils/departments.js +1 -3
- package/lib/utils/url.js +24 -31
- package/lib/utils/utils.js +2 -6
- package/package.json +1 -1
- package/lib/DTableModalHeader/index.css +0 -5
|
@@ -27,17 +27,12 @@ class LargeMapSelectionEditorDialog extends _react.default.Component {
|
|
|
27
27
|
this.map = new window.BMap.Map('geolocation-map-selection-container-large', {
|
|
28
28
|
enableMapClick: false
|
|
29
29
|
});
|
|
30
|
-
let
|
|
31
|
-
lng,
|
|
32
|
-
lat,
|
|
33
|
-
zoom
|
|
34
|
-
|
|
35
|
-
const
|
|
36
|
-
value
|
|
37
|
-
} = this.state;
|
|
38
|
-
const {
|
|
39
|
-
lngLat
|
|
40
|
-
} = value;
|
|
30
|
+
let _getInitCenter = (0, _mapEditorUtils.getInitCenter)(true),
|
|
31
|
+
lng = _getInitCenter.lng,
|
|
32
|
+
lat = _getInitCenter.lat,
|
|
33
|
+
zoom = _getInitCenter.zoom;
|
|
34
|
+
const value = this.state.value;
|
|
35
|
+
const lngLat = value.lngLat;
|
|
41
36
|
if ((0, _cell.isValidPosition)(lngLat === null || lngLat === void 0 ? void 0 : lngLat.lng, lngLat === null || lngLat === void 0 ? void 0 : lngLat.lat)) {
|
|
42
37
|
lng = lngLat.lng;
|
|
43
38
|
lat = lngLat.lat;
|
|
@@ -58,11 +53,9 @@ class LargeMapSelectionEditorDialog extends _react.default.Component {
|
|
|
58
53
|
const point = event.point;
|
|
59
54
|
const geoCoder = new window.BMap.Geocoder();
|
|
60
55
|
geoCoder.getLocation(point, result => {
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
point
|
|
65
|
-
} = result;
|
|
56
|
+
const surroundingPois = result.surroundingPois,
|
|
57
|
+
address = result.address,
|
|
58
|
+
point = result.point;
|
|
66
59
|
if (surroundingPois.length === 0) {
|
|
67
60
|
value.address = address;
|
|
68
61
|
value.lngLat = {
|
|
@@ -73,12 +66,10 @@ class LargeMapSelectionEditorDialog extends _react.default.Component {
|
|
|
73
66
|
value.title = '';
|
|
74
67
|
} else {
|
|
75
68
|
const position = surroundingPois[0];
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
point
|
|
81
|
-
} = position;
|
|
69
|
+
const address = position.address,
|
|
70
|
+
title = position.title,
|
|
71
|
+
tags = position.tags,
|
|
72
|
+
point = position.point;
|
|
82
73
|
value.address = address || '';
|
|
83
74
|
value.title = title || '';
|
|
84
75
|
value.tag = tags || [];
|
|
@@ -93,9 +84,7 @@ class LargeMapSelectionEditorDialog extends _react.default.Component {
|
|
|
93
84
|
});
|
|
94
85
|
};
|
|
95
86
|
this.addMarkerByPosition = value => {
|
|
96
|
-
const
|
|
97
|
-
lngLat
|
|
98
|
-
} = value;
|
|
87
|
+
const lngLat = value.lngLat;
|
|
99
88
|
let point = new window.BMap.Point(lngLat.lng, lngLat.lat);
|
|
100
89
|
const marker = new window.BMap.Marker(point, {
|
|
101
90
|
offset: new window.BMap.Size(-2, -5)
|
|
@@ -148,11 +137,9 @@ class LargeMapSelectionEditorDialog extends _react.default.Component {
|
|
|
148
137
|
}
|
|
149
138
|
};
|
|
150
139
|
this.getLabelContent = value => {
|
|
151
|
-
const
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
tag
|
|
155
|
-
} = value;
|
|
140
|
+
const address = value.address,
|
|
141
|
+
title = value.title,
|
|
142
|
+
tag = value.tag;
|
|
156
143
|
const tagContent = Array.isArray(tag) && tag.length > 0 ? tag[0] : '';
|
|
157
144
|
if (title) {
|
|
158
145
|
return "\n <div class='dtable-ui-selection-label-content' id='dtable-ui-selection-label-content'>\n <i class='dtable-font dtable-icon-down3'></i>\n <span class='label-title text-truncate' title=".concat(title, ">").concat(title, "</span>\n ").concat(tagContent && "<span class='label-tag'>".concat(tagContent, "</span>"), "\n <span class='dtable-font dtable-icon-x' id='selection-label-close'></span>\n <span class='label-address-tip'>").concat((0, _lang.getLocale)('Address'), "</span>\n <span class='label-address text-truncate' title=").concat(address, ">").concat(address, "</span>\n <div class='label-submit btn btn-primary' id='selection-label-submit'>").concat((0, _lang.getLocale)('Fill_in'), "</div>\n </div>\n ");
|
|
@@ -161,9 +148,7 @@ class LargeMapSelectionEditorDialog extends _react.default.Component {
|
|
|
161
148
|
}
|
|
162
149
|
};
|
|
163
150
|
this.getInitValue = () => {
|
|
164
|
-
const
|
|
165
|
-
value
|
|
166
|
-
} = this.props;
|
|
151
|
+
const value = this.props.value;
|
|
167
152
|
if (!value || (0, _dtableUtils.isEmptyObject)(value)) {
|
|
168
153
|
return {
|
|
169
154
|
address: '',
|
|
@@ -175,9 +160,7 @@ class LargeMapSelectionEditorDialog extends _react.default.Component {
|
|
|
175
160
|
return value;
|
|
176
161
|
};
|
|
177
162
|
this.onSearch = () => {
|
|
178
|
-
const
|
|
179
|
-
inputValue
|
|
180
|
-
} = this.state;
|
|
163
|
+
const inputValue = this.state.inputValue;
|
|
181
164
|
let options = {
|
|
182
165
|
onSearchComplete: results => {
|
|
183
166
|
const status = local.getStatus();
|
|
@@ -240,16 +223,12 @@ class LargeMapSelectionEditorDialog extends _react.default.Component {
|
|
|
240
223
|
event.preventDefault();
|
|
241
224
|
event.stopPropagation();
|
|
242
225
|
event.nativeEvent.stopImmediatePropagation();
|
|
243
|
-
const
|
|
244
|
-
value
|
|
245
|
-
} = this.state;
|
|
226
|
+
const value = this.state.value;
|
|
246
227
|
this.props.setValue(value);
|
|
247
228
|
this.props.toggleFullScreen(event);
|
|
248
229
|
};
|
|
249
230
|
this.renderSearchResults = () => {
|
|
250
|
-
const
|
|
251
|
-
searchResults
|
|
252
|
-
} = this.state;
|
|
231
|
+
const searchResults = this.state.searchResults;
|
|
253
232
|
if (searchResults.length === 0) return null;
|
|
254
233
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
255
234
|
className: "search-results-container",
|
|
@@ -290,11 +269,9 @@ class LargeMapSelectionEditorDialog extends _react.default.Component {
|
|
|
290
269
|
const geoCoder = new window.BMap.Geocoder();
|
|
291
270
|
geoCoder.getLocation(point, result => {
|
|
292
271
|
let value = {};
|
|
293
|
-
const
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
point
|
|
297
|
-
} = result;
|
|
272
|
+
const surroundingPois = result.surroundingPois,
|
|
273
|
+
address = result.address,
|
|
274
|
+
point = result.point;
|
|
298
275
|
if (surroundingPois.length === 0) {
|
|
299
276
|
value.address = address;
|
|
300
277
|
value.lngLat = {
|
|
@@ -305,12 +282,10 @@ class LargeMapSelectionEditorDialog extends _react.default.Component {
|
|
|
305
282
|
value.title = '';
|
|
306
283
|
} else {
|
|
307
284
|
const position = surroundingPois[0];
|
|
308
|
-
const
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
point
|
|
313
|
-
} = position;
|
|
285
|
+
const address = position.address,
|
|
286
|
+
title = position.title,
|
|
287
|
+
tags = position.tags,
|
|
288
|
+
point = position.point;
|
|
314
289
|
value.address = address || '';
|
|
315
290
|
value.title = title || '';
|
|
316
291
|
value.tag = tags || [];
|
|
@@ -325,16 +300,13 @@ class LargeMapSelectionEditorDialog extends _react.default.Component {
|
|
|
325
300
|
_toaster.default.danger((0, _lang.getLocale)('Positioning_failed'));
|
|
326
301
|
}
|
|
327
302
|
};
|
|
328
|
-
const
|
|
329
|
-
|
|
330
|
-
config
|
|
331
|
-
} = props;
|
|
303
|
+
const readOnly = props.readOnly,
|
|
304
|
+
config = props.config;
|
|
332
305
|
const _value = this.getInitValue();
|
|
333
306
|
const _inputValue = _value.title || _value.address || '';
|
|
334
|
-
const
|
|
335
|
-
mapType,
|
|
336
|
-
mapKey
|
|
337
|
-
} = (0, _mapEditorUtils.getMapInfo)(config);
|
|
307
|
+
const _getMapInfo = (0, _mapEditorUtils.getMapInfo)(config),
|
|
308
|
+
mapType = _getMapInfo.mapType,
|
|
309
|
+
mapKey = _getMapInfo.mapKey;
|
|
338
310
|
this.readOnly = readOnly;
|
|
339
311
|
this.state = {
|
|
340
312
|
isLoading: true,
|
|
@@ -370,10 +342,9 @@ class LargeMapSelectionEditorDialog extends _react.default.Component {
|
|
|
370
342
|
}
|
|
371
343
|
}
|
|
372
344
|
render() {
|
|
373
|
-
const
|
|
374
|
-
isLoading,
|
|
375
|
-
inputValue
|
|
376
|
-
} = this.state;
|
|
345
|
+
const _this$state = this.state,
|
|
346
|
+
isLoading = _this$state.isLoading,
|
|
347
|
+
inputValue = _this$state.inputValue;
|
|
377
348
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactstrap.Modal, {
|
|
378
349
|
size: "lg",
|
|
379
350
|
isOpen: true,
|
|
@@ -12,7 +12,7 @@ var _DTableCustomFooter = _interopRequireDefault(require("../../DTableCustomFoot
|
|
|
12
12
|
var _selectorList = _interopRequireDefault(require("./selector-list"));
|
|
13
13
|
var _selectorHeaderItem = _interopRequireDefault(require("./selector-header-item"));
|
|
14
14
|
var _Loading = _interopRequireDefault(require("../../Loading"));
|
|
15
|
-
var
|
|
15
|
+
var _parseGeolocation2 = _interopRequireDefault(require("./parse-geolocation"));
|
|
16
16
|
var _constants = require("../../constants");
|
|
17
17
|
var _lang = require("../../lang");
|
|
18
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -84,9 +84,7 @@ class ProvinceCityEditor extends _react.Component {
|
|
|
84
84
|
this.props.setValue(this.value);
|
|
85
85
|
};
|
|
86
86
|
this.selectSelectorType = type => {
|
|
87
|
-
const
|
|
88
|
-
selectedProvince
|
|
89
|
-
} = this.state;
|
|
87
|
+
const selectedProvince = this.state.selectedProvince;
|
|
90
88
|
if (!selectedProvince) return;
|
|
91
89
|
this.setState({
|
|
92
90
|
selectedItem: type
|
|
@@ -106,10 +104,9 @@ class ProvinceCityEditor extends _react.Component {
|
|
|
106
104
|
this.timer = null;
|
|
107
105
|
const value = this.parseRef.value;
|
|
108
106
|
if (this.isComposing) return;
|
|
109
|
-
const
|
|
110
|
-
province,
|
|
111
|
-
city
|
|
112
|
-
} = (0, _parseGeolocation.default)(this.locations, value);
|
|
107
|
+
const _parseGeolocation = (0, _parseGeolocation2.default)(this.locations, value),
|
|
108
|
+
province = _parseGeolocation.province,
|
|
109
|
+
city = _parseGeolocation.city;
|
|
113
110
|
this.value = Object.assign({}, this.value);
|
|
114
111
|
this.props.setValue(this.value);
|
|
115
112
|
if (!province) return;
|
|
@@ -132,10 +129,9 @@ class ProvinceCityEditor extends _react.Component {
|
|
|
132
129
|
}
|
|
133
130
|
};
|
|
134
131
|
this.onSubmit = () => {
|
|
135
|
-
const
|
|
136
|
-
province,
|
|
137
|
-
city
|
|
138
|
-
} = this.value;
|
|
132
|
+
const _this$value = this.value,
|
|
133
|
+
province = _this$value.province,
|
|
134
|
+
city = _this$value.city;
|
|
139
135
|
if (!province || !city) {
|
|
140
136
|
const errMessage = (0, _lang.getLocale)('Province/City_must_be_filled_in');
|
|
141
137
|
this.setState({
|
|
@@ -162,11 +158,10 @@ class ProvinceCityEditor extends _react.Component {
|
|
|
162
158
|
componentDidMount() {
|
|
163
159
|
this.props.getData().then(data => {
|
|
164
160
|
this.locations = data;
|
|
165
|
-
const
|
|
166
|
-
selectedProvince,
|
|
167
|
-
selectedCity,
|
|
168
|
-
selectedItem
|
|
169
|
-
} = this.initLocationSelecting(this.value);
|
|
161
|
+
const _this$initLocationSel = this.initLocationSelecting(this.value),
|
|
162
|
+
selectedProvince = _this$initLocationSel.selectedProvince,
|
|
163
|
+
selectedCity = _this$initLocationSel.selectedCity,
|
|
164
|
+
selectedItem = _this$initLocationSel.selectedItem;
|
|
170
165
|
this.setState({
|
|
171
166
|
isLoadingData: false,
|
|
172
167
|
selectedProvince,
|
|
@@ -176,14 +171,13 @@ class ProvinceCityEditor extends _react.Component {
|
|
|
176
171
|
});
|
|
177
172
|
}
|
|
178
173
|
render() {
|
|
179
|
-
const
|
|
180
|
-
selectedItem,
|
|
181
|
-
selectedCity,
|
|
182
|
-
selectedProvince,
|
|
183
|
-
isShowSelector,
|
|
184
|
-
isLoadingData,
|
|
185
|
-
location
|
|
186
|
-
} = this.state;
|
|
174
|
+
const _this$state = this.state,
|
|
175
|
+
selectedItem = _this$state.selectedItem,
|
|
176
|
+
selectedCity = _this$state.selectedCity,
|
|
177
|
+
selectedProvince = _this$state.selectedProvince,
|
|
178
|
+
isShowSelector = _this$state.isShowSelector,
|
|
179
|
+
isLoadingData = _this$state.isLoadingData,
|
|
180
|
+
location = _this$state.location;
|
|
187
181
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
188
182
|
children: [!isLoadingData ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
189
183
|
onClick: this.onClick,
|
|
@@ -46,9 +46,7 @@ class ProvinceEditor extends _react.Component {
|
|
|
46
46
|
this.onUpArrow = e => {
|
|
47
47
|
e.preventDefault();
|
|
48
48
|
e.stopPropagation();
|
|
49
|
-
let
|
|
50
|
-
highlightIndex
|
|
51
|
-
} = this.state;
|
|
49
|
+
let highlightIndex = this.state.highlightIndex;
|
|
52
50
|
if (highlightIndex > 0) {
|
|
53
51
|
this.setState({
|
|
54
52
|
highlightIndex: highlightIndex - 1
|
|
@@ -62,9 +60,7 @@ class ProvinceEditor extends _react.Component {
|
|
|
62
60
|
this.onDownArrow = e => {
|
|
63
61
|
e.preventDefault();
|
|
64
62
|
e.stopPropagation();
|
|
65
|
-
let
|
|
66
|
-
highlightIndex
|
|
67
|
-
} = this.state;
|
|
63
|
+
let highlightIndex = this.state.highlightIndex;
|
|
68
64
|
if (highlightIndex < this.filteredProvince.length - 1) {
|
|
69
65
|
this.setState({
|
|
70
66
|
highlightIndex: highlightIndex + 1
|
|
@@ -124,10 +120,9 @@ class ProvinceEditor extends _react.Component {
|
|
|
124
120
|
}, 300);
|
|
125
121
|
};
|
|
126
122
|
this.createProvinceList = () => {
|
|
127
|
-
const
|
|
128
|
-
value,
|
|
129
|
-
highlightIndex
|
|
130
|
-
} = this.state;
|
|
123
|
+
const _this$state = this.state,
|
|
124
|
+
value = _this$state.value,
|
|
125
|
+
highlightIndex = _this$state.highlightIndex;
|
|
131
126
|
let provinceList = this.filteredProvince.map((item, index) => {
|
|
132
127
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
133
128
|
className: "geolocation-region-editor-province ".concat(highlightIndex === index ? 'geolocation-region-editor-province-highlight' : ''),
|
|
@@ -183,9 +178,7 @@ class ProvinceEditor extends _react.Component {
|
|
|
183
178
|
}
|
|
184
179
|
}
|
|
185
180
|
render() {
|
|
186
|
-
const
|
|
187
|
-
isLoadingData
|
|
188
|
-
} = this.state;
|
|
181
|
+
const isLoadingData = this.state.isLoadingData;
|
|
189
182
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
190
183
|
className: "dtable-ui-geolocation-province-editor",
|
|
191
184
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -10,12 +10,11 @@ var _lang = require("../../lang");
|
|
|
10
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
11
|
class SelectorHeaderItem extends _react.default.Component {
|
|
12
12
|
render() {
|
|
13
|
-
const
|
|
14
|
-
type,
|
|
15
|
-
clickHandler,
|
|
16
|
-
selectedType,
|
|
17
|
-
selectedItem
|
|
18
|
-
} = this.props;
|
|
13
|
+
const _this$props = this.props,
|
|
14
|
+
type = _this$props.type,
|
|
15
|
+
clickHandler = _this$props.clickHandler,
|
|
16
|
+
selectedType = _this$props.selectedType,
|
|
17
|
+
selectedItem = _this$props.selectedItem;
|
|
19
18
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
20
19
|
className: 'dtable-ui-geolocation-selector-header-item ' + (selectedType === type ? 'selected-dtable-ui-geolocation-selector-header-item' : ''),
|
|
21
20
|
onClick: () => {
|
|
@@ -9,13 +9,12 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
10
|
class SelectorList extends _react.default.Component {
|
|
11
11
|
render() {
|
|
12
|
-
const
|
|
13
|
-
clickHandler,
|
|
14
|
-
type,
|
|
15
|
-
selectedItem,
|
|
16
|
-
parent,
|
|
17
|
-
doubleClickHandler
|
|
18
|
-
} = this.props;
|
|
12
|
+
const _this$props = this.props,
|
|
13
|
+
clickHandler = _this$props.clickHandler,
|
|
14
|
+
type = _this$props.type,
|
|
15
|
+
selectedItem = _this$props.selectedItem,
|
|
16
|
+
parent = _this$props.parent,
|
|
17
|
+
doubleClickHandler = _this$props.doubleClickHandler;
|
|
19
18
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("ul", {
|
|
20
19
|
className: "dtable-ui-geolocation-selector-list",
|
|
21
20
|
children: parent.children.map((item, index) => {
|
|
@@ -12,11 +12,10 @@ require("./index.css");
|
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
class GeolocationFormatter extends _react.default.Component {
|
|
14
14
|
render() {
|
|
15
|
-
let
|
|
16
|
-
value,
|
|
17
|
-
data,
|
|
18
|
-
containerClassName
|
|
19
|
-
} = this.props;
|
|
15
|
+
let _this$props = this.props,
|
|
16
|
+
value = _this$props.value,
|
|
17
|
+
data = _this$props.data,
|
|
18
|
+
containerClassName = _this$props.containerClassName;
|
|
20
19
|
let className = (0, _classnames.default)('dtable-ui cell-formatter-container geolocation-formatter', containerClassName);
|
|
21
20
|
if (typeof value !== 'object') {
|
|
22
21
|
return null;
|
|
@@ -15,9 +15,7 @@ class HtmlLongTextFormatter extends _react.Component {
|
|
|
15
15
|
constructor(_props) {
|
|
16
16
|
super(_props);
|
|
17
17
|
this.translateValue = props => {
|
|
18
|
-
const
|
|
19
|
-
value
|
|
20
|
-
} = props;
|
|
18
|
+
const value = props.value;
|
|
21
19
|
if (!value) {
|
|
22
20
|
this.setState({
|
|
23
21
|
innerHtml: null
|
|
@@ -51,20 +49,14 @@ class HtmlLongTextFormatter extends _react.Component {
|
|
|
51
49
|
this.translateValue(this.props);
|
|
52
50
|
}
|
|
53
51
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
54
|
-
const
|
|
55
|
-
value
|
|
56
|
-
} = this.props;
|
|
52
|
+
const value = this.props.value;
|
|
57
53
|
if (nextProps.value !== value) {
|
|
58
54
|
this.translateValue(nextProps);
|
|
59
55
|
}
|
|
60
56
|
}
|
|
61
57
|
render() {
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
} = this.state;
|
|
65
|
-
const {
|
|
66
|
-
containerClassName
|
|
67
|
-
} = this.props;
|
|
58
|
+
const innerHtml = this.state.innerHtml;
|
|
59
|
+
const containerClassName = this.props.containerClassName;
|
|
68
60
|
const className = (0, _classnames.default)('dtable-ui cell-formatter-container long-text-formatter', containerClassName);
|
|
69
61
|
if (!innerHtml) return null;
|
|
70
62
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
package/lib/Icon/index.js
CHANGED
|
@@ -20,11 +20,9 @@ class Icon extends React.Component {
|
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
22
|
const _this$props = this.props,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
size
|
|
27
|
-
} = _this$props,
|
|
23
|
+
type = _this$props.type,
|
|
24
|
+
className = _this$props.className,
|
|
25
|
+
size = _this$props.size,
|
|
28
26
|
restProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
29
27
|
const cls = (0, _classnames.default)(className, 'am-icon', "am-icon-".concat(type), "am-icon-".concat(size));
|
|
30
28
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
package/lib/IconButton/index.js
CHANGED
|
@@ -12,12 +12,10 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
const _excluded = ["disabled", "className", "icon", "children"];
|
|
14
14
|
const IconButton = _ref => {
|
|
15
|
-
let
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
children
|
|
20
|
-
} = _ref,
|
|
15
|
+
let disabled = _ref.disabled,
|
|
16
|
+
className = _ref.className,
|
|
17
|
+
icon = _ref.icon,
|
|
18
|
+
children = _ref.children,
|
|
21
19
|
otherProperties = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
22
20
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
23
21
|
className: (0, _classnames.default)('seatable-icon-btn', className, {
|
|
@@ -18,15 +18,11 @@ class ImagePreviewer extends _react.default.Component {
|
|
|
18
18
|
constructor(props) {
|
|
19
19
|
super(props);
|
|
20
20
|
this.showLargeImage = () => {
|
|
21
|
-
let
|
|
22
|
-
imageItemUrl
|
|
23
|
-
} = this.props;
|
|
21
|
+
let imageItemUrl = this.props.imageItemUrl;
|
|
24
22
|
this.props.showLargeImage(imageItemUrl);
|
|
25
23
|
};
|
|
26
24
|
this.showImageToolbar = () => {
|
|
27
|
-
let
|
|
28
|
-
itemIndex
|
|
29
|
-
} = this.props;
|
|
25
|
+
let itemIndex = this.props.itemIndex;
|
|
30
26
|
this.props.setImageItemIndex(itemIndex);
|
|
31
27
|
};
|
|
32
28
|
this.hideImageToolbar = () => {
|
|
@@ -38,9 +34,7 @@ class ImagePreviewer extends _react.default.Component {
|
|
|
38
34
|
};
|
|
39
35
|
this.deleteImage = e => {
|
|
40
36
|
e.stopPropagation();
|
|
41
|
-
let
|
|
42
|
-
itemIndex
|
|
43
|
-
} = this.props;
|
|
37
|
+
let itemIndex = this.props.itemIndex;
|
|
44
38
|
this.props.deleteImage(itemIndex, _constants.FILE_EDITOR_STATUS.PREVIEWER);
|
|
45
39
|
};
|
|
46
40
|
this.onClickDelete = e => {
|
|
@@ -90,17 +84,15 @@ class ImagePreviewer extends _react.default.Component {
|
|
|
90
84
|
const offsetWidth = document.body.offsetWidth;
|
|
91
85
|
this.containerSize = offsetWidth < 768 ? (offsetWidth - 55) / 2 + 'px' : (offsetWidth - 80) / 3 + 'px';
|
|
92
86
|
this.position = {};
|
|
93
|
-
const {
|
|
94
|
-
mediaUrl
|
|
95
|
-
} = props.config || {};
|
|
87
|
+
const _ref = props.config || {},
|
|
88
|
+
mediaUrl = _ref.mediaUrl;
|
|
96
89
|
this.imageLoadingFailedUrl = "".concat(mediaUrl, "img/image-loading-failed.png");
|
|
97
90
|
this.ref = null;
|
|
98
91
|
}
|
|
99
92
|
componentDidMount() {
|
|
100
|
-
let
|
|
101
|
-
imageItemUrl,
|
|
102
|
-
config
|
|
103
|
-
} = this.props;
|
|
93
|
+
let _this$props = this.props,
|
|
94
|
+
imageItemUrl = _this$props.imageItemUrl,
|
|
95
|
+
config = _this$props.config;
|
|
104
96
|
if ((0, _url.checkSVGImage)(imageItemUrl)) {
|
|
105
97
|
this.setState({
|
|
106
98
|
imageThumbnailUrl: imageItemUrl
|
|
@@ -119,11 +111,10 @@ class ImagePreviewer extends _react.default.Component {
|
|
|
119
111
|
});
|
|
120
112
|
}
|
|
121
113
|
render() {
|
|
122
|
-
const
|
|
123
|
-
enterImageItemIndex,
|
|
124
|
-
itemIndex,
|
|
125
|
-
imageItemUrl
|
|
126
|
-
} = this.props;
|
|
114
|
+
const _this$props2 = this.props,
|
|
115
|
+
enterImageItemIndex = _this$props2.enterImageItemIndex,
|
|
116
|
+
itemIndex = _this$props2.itemIndex,
|
|
117
|
+
imageItemUrl = _this$props2.imageItemUrl;
|
|
127
118
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
128
119
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
129
120
|
style: _constants.isMobile ? {
|
|
@@ -26,9 +26,7 @@ class ImagesPreviewer extends _react.default.Component {
|
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
this.showLargeImage = itemUrl => {
|
|
29
|
-
let
|
|
30
|
-
value
|
|
31
|
-
} = this.props;
|
|
29
|
+
let value = this.props.value;
|
|
32
30
|
this.setState({
|
|
33
31
|
isShowLargeImage: true,
|
|
34
32
|
largeImageIndex: value.indexOf(itemUrl)
|
|
@@ -58,9 +56,7 @@ class ImagesPreviewer extends _react.default.Component {
|
|
|
58
56
|
};
|
|
59
57
|
this.deleteImage = (index, type) => {
|
|
60
58
|
this.props.deleteImage(index, type);
|
|
61
|
-
const
|
|
62
|
-
value
|
|
63
|
-
} = this.props;
|
|
59
|
+
const value = this.props.value;
|
|
64
60
|
if (index > value.length - 2) {
|
|
65
61
|
if (value.length - 2 < 0) {
|
|
66
62
|
this.hideLargeImage();
|
|
@@ -103,9 +99,7 @@ class ImagesPreviewer extends _react.default.Component {
|
|
|
103
99
|
}
|
|
104
100
|
}
|
|
105
101
|
render() {
|
|
106
|
-
let
|
|
107
|
-
value
|
|
108
|
-
} = this.props;
|
|
102
|
+
let value = this.props.value;
|
|
109
103
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
110
104
|
className: (0, _classnames.default)('dtable-ui-image-previewer-container', {
|
|
111
105
|
'mt-0': value.length === 0 && _constants.isMobile
|
package/lib/ImageEditor/index.js
CHANGED
|
@@ -16,9 +16,7 @@ require("./index.css");
|
|
|
16
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
17
|
const _excluded = ["isMobile"];
|
|
18
18
|
const ImageEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
19
|
-
let
|
|
20
|
-
isMobile
|
|
21
|
-
} = _ref,
|
|
19
|
+
let isMobile = _ref.isMobile,
|
|
22
20
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
23
21
|
if (isMobile === false) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
24
22
|
ref: ref
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").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"));
|
|
9
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
11
|
var _ActivityIndicator = _interopRequireDefault(require("../../ActivityIndicator"));
|
|
11
12
|
var _MobileFullScreenPage = _interopRequireDefault(require("../../MobileFullScreenPage"));
|
|
@@ -16,28 +17,35 @@ var _utils = require("../../utils/utils");
|
|
|
16
17
|
var _lang = require("../../lang");
|
|
17
18
|
require("./index.css");
|
|
18
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
Body
|
|
22
|
-
} = _MobileFullScreenPage.default;
|
|
20
|
+
const Header = _MobileFullScreenPage.default.Header,
|
|
21
|
+
Body = _MobileFullScreenPage.default.Body;
|
|
23
22
|
const MBImageEditor = _ref => {
|
|
24
|
-
let
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
|
|
23
|
+
let oldValue = _ref.value,
|
|
24
|
+
column = _ref.column,
|
|
25
|
+
config = _ref.config,
|
|
26
|
+
onToggle = _ref.onToggle,
|
|
27
|
+
onCommit = _ref.onCommit,
|
|
28
|
+
uploadFile = _ref.uploadFile;
|
|
29
|
+
const _useState = (0, _react.useState)(oldValue || []),
|
|
30
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
31
|
+
value = _useState2[0],
|
|
32
|
+
setValue = _useState2[1];
|
|
33
|
+
const _useState3 = (0, _react.useState)(false),
|
|
34
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
35
|
+
isShowEditor = _useState4[0],
|
|
36
|
+
setShowEditor = _useState4[1];
|
|
37
|
+
const _useState5 = (0, _react.useState)([]),
|
|
38
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
39
|
+
uploadLocalImages = _useState6[0],
|
|
40
|
+
setUploadLocalImages = _useState6[1];
|
|
41
|
+
const _useState7 = (0, _react.useState)(false),
|
|
42
|
+
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
|
43
|
+
isUploading = _useState8[0],
|
|
44
|
+
setUploading = _useState8[1];
|
|
36
45
|
const uploadingFilesCount = (0, _react.useRef)(0);
|
|
37
46
|
const uploadedFilesCount = (0, _react.useRef)(0);
|
|
38
|
-
const {
|
|
39
|
-
mediaUrl
|
|
40
|
-
} = config || {};
|
|
47
|
+
const _ref2 = config || {},
|
|
48
|
+
mediaUrl = _ref2.mediaUrl;
|
|
41
49
|
const resetAdditionImage = (0, _react.useCallback)(() => {
|
|
42
50
|
setUploadLocalImages([]);
|
|
43
51
|
}, []);
|
|
@@ -14,9 +14,7 @@ class ImageLink extends _react.default.Component {
|
|
|
14
14
|
constructor(props) {
|
|
15
15
|
super(props);
|
|
16
16
|
this.saveImageLink = () => {
|
|
17
|
-
let
|
|
18
|
-
imageLink
|
|
19
|
-
} = this.state;
|
|
17
|
+
let imageLink = this.state.imageLink;
|
|
20
18
|
let _this = this;
|
|
21
19
|
let image = new Image();
|
|
22
20
|
image.onload = function () {
|
|
@@ -50,9 +48,7 @@ class ImageLink extends _react.default.Component {
|
|
|
50
48
|
};
|
|
51
49
|
}
|
|
52
50
|
render() {
|
|
53
|
-
const
|
|
54
|
-
isShowErrorMessage
|
|
55
|
-
} = this.state;
|
|
51
|
+
const isShowErrorMessage = this.state.isShowErrorMessage;
|
|
56
52
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
57
53
|
className: "dtable-ui-image-link",
|
|
58
54
|
onKeyDown: this.onKeyDown,
|
|
@@ -32,9 +32,7 @@ class AdditionPreviewer extends _react.default.Component {
|
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
34
|
render() {
|
|
35
|
-
const
|
|
36
|
-
activeTab
|
|
37
|
-
} = this.state;
|
|
35
|
+
const activeTab = this.state.activeTab;
|
|
38
36
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
39
37
|
className: "dtable-ui-image-addition-container",
|
|
40
38
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|