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
|
@@ -27,12 +27,17 @@ 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
|
|
30
|
+
let {
|
|
31
|
+
lng,
|
|
32
|
+
lat,
|
|
33
|
+
zoom
|
|
34
|
+
} = (0, _mapEditorUtils.getInitCenter)(true);
|
|
35
|
+
const {
|
|
36
|
+
value
|
|
37
|
+
} = this.state;
|
|
38
|
+
const {
|
|
39
|
+
lngLat
|
|
40
|
+
} = value;
|
|
36
41
|
if ((0, _cell.isValidPosition)(lngLat === null || lngLat === void 0 ? void 0 : lngLat.lng, lngLat === null || lngLat === void 0 ? void 0 : lngLat.lat)) {
|
|
37
42
|
lng = lngLat.lng;
|
|
38
43
|
lat = lngLat.lat;
|
|
@@ -53,9 +58,11 @@ class LargeMapSelectionEditorDialog extends _react.default.Component {
|
|
|
53
58
|
const point = event.point;
|
|
54
59
|
const geoCoder = new window.BMap.Geocoder();
|
|
55
60
|
geoCoder.getLocation(point, result => {
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
61
|
+
const {
|
|
62
|
+
surroundingPois,
|
|
63
|
+
address,
|
|
64
|
+
point
|
|
65
|
+
} = result;
|
|
59
66
|
if (surroundingPois.length === 0) {
|
|
60
67
|
value.address = address;
|
|
61
68
|
value.lngLat = {
|
|
@@ -66,10 +73,12 @@ class LargeMapSelectionEditorDialog extends _react.default.Component {
|
|
|
66
73
|
value.title = '';
|
|
67
74
|
} else {
|
|
68
75
|
const position = surroundingPois[0];
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
76
|
+
const {
|
|
77
|
+
address,
|
|
78
|
+
title,
|
|
79
|
+
tags,
|
|
80
|
+
point
|
|
81
|
+
} = position;
|
|
73
82
|
value.address = address || '';
|
|
74
83
|
value.title = title || '';
|
|
75
84
|
value.tag = tags || [];
|
|
@@ -84,7 +93,9 @@ class LargeMapSelectionEditorDialog extends _react.default.Component {
|
|
|
84
93
|
});
|
|
85
94
|
};
|
|
86
95
|
this.addMarkerByPosition = value => {
|
|
87
|
-
const
|
|
96
|
+
const {
|
|
97
|
+
lngLat
|
|
98
|
+
} = value;
|
|
88
99
|
let point = new window.BMap.Point(lngLat.lng, lngLat.lat);
|
|
89
100
|
const marker = new window.BMap.Marker(point, {
|
|
90
101
|
offset: new window.BMap.Size(-2, -5)
|
|
@@ -137,9 +148,11 @@ class LargeMapSelectionEditorDialog extends _react.default.Component {
|
|
|
137
148
|
}
|
|
138
149
|
};
|
|
139
150
|
this.getLabelContent = value => {
|
|
140
|
-
const
|
|
141
|
-
|
|
142
|
-
|
|
151
|
+
const {
|
|
152
|
+
address,
|
|
153
|
+
title,
|
|
154
|
+
tag
|
|
155
|
+
} = value;
|
|
143
156
|
const tagContent = Array.isArray(tag) && tag.length > 0 ? tag[0] : '';
|
|
144
157
|
if (title) {
|
|
145
158
|
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 ");
|
|
@@ -148,7 +161,9 @@ class LargeMapSelectionEditorDialog extends _react.default.Component {
|
|
|
148
161
|
}
|
|
149
162
|
};
|
|
150
163
|
this.getInitValue = () => {
|
|
151
|
-
const
|
|
164
|
+
const {
|
|
165
|
+
value
|
|
166
|
+
} = this.props;
|
|
152
167
|
if (!value || (0, _dtableUtils.isEmptyObject)(value)) {
|
|
153
168
|
return {
|
|
154
169
|
address: '',
|
|
@@ -160,7 +175,9 @@ class LargeMapSelectionEditorDialog extends _react.default.Component {
|
|
|
160
175
|
return value;
|
|
161
176
|
};
|
|
162
177
|
this.onSearch = () => {
|
|
163
|
-
const
|
|
178
|
+
const {
|
|
179
|
+
inputValue
|
|
180
|
+
} = this.state;
|
|
164
181
|
let options = {
|
|
165
182
|
onSearchComplete: results => {
|
|
166
183
|
const status = local.getStatus();
|
|
@@ -223,12 +240,16 @@ class LargeMapSelectionEditorDialog extends _react.default.Component {
|
|
|
223
240
|
event.preventDefault();
|
|
224
241
|
event.stopPropagation();
|
|
225
242
|
event.nativeEvent.stopImmediatePropagation();
|
|
226
|
-
const
|
|
243
|
+
const {
|
|
244
|
+
value
|
|
245
|
+
} = this.state;
|
|
227
246
|
this.props.setValue(value);
|
|
228
247
|
this.props.toggleFullScreen(event);
|
|
229
248
|
};
|
|
230
249
|
this.renderSearchResults = () => {
|
|
231
|
-
const
|
|
250
|
+
const {
|
|
251
|
+
searchResults
|
|
252
|
+
} = this.state;
|
|
232
253
|
if (searchResults.length === 0) return null;
|
|
233
254
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
234
255
|
className: "search-results-container",
|
|
@@ -269,9 +290,11 @@ class LargeMapSelectionEditorDialog extends _react.default.Component {
|
|
|
269
290
|
const geoCoder = new window.BMap.Geocoder();
|
|
270
291
|
geoCoder.getLocation(point, result => {
|
|
271
292
|
let value = {};
|
|
272
|
-
const
|
|
273
|
-
|
|
274
|
-
|
|
293
|
+
const {
|
|
294
|
+
surroundingPois,
|
|
295
|
+
address,
|
|
296
|
+
point
|
|
297
|
+
} = result;
|
|
275
298
|
if (surroundingPois.length === 0) {
|
|
276
299
|
value.address = address;
|
|
277
300
|
value.lngLat = {
|
|
@@ -282,10 +305,12 @@ class LargeMapSelectionEditorDialog extends _react.default.Component {
|
|
|
282
305
|
value.title = '';
|
|
283
306
|
} else {
|
|
284
307
|
const position = surroundingPois[0];
|
|
285
|
-
const
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
308
|
+
const {
|
|
309
|
+
address,
|
|
310
|
+
title,
|
|
311
|
+
tags,
|
|
312
|
+
point
|
|
313
|
+
} = position;
|
|
289
314
|
value.address = address || '';
|
|
290
315
|
value.title = title || '';
|
|
291
316
|
value.tag = tags || [];
|
|
@@ -300,13 +325,16 @@ class LargeMapSelectionEditorDialog extends _react.default.Component {
|
|
|
300
325
|
_toaster.default.danger((0, _lang.getLocale)('Positioning_failed'));
|
|
301
326
|
}
|
|
302
327
|
};
|
|
303
|
-
const
|
|
304
|
-
|
|
328
|
+
const {
|
|
329
|
+
readOnly,
|
|
330
|
+
config
|
|
331
|
+
} = props;
|
|
305
332
|
const _value = this.getInitValue();
|
|
306
333
|
const _inputValue = _value.title || _value.address || '';
|
|
307
|
-
const
|
|
308
|
-
mapType
|
|
309
|
-
mapKey
|
|
334
|
+
const {
|
|
335
|
+
mapType,
|
|
336
|
+
mapKey
|
|
337
|
+
} = (0, _mapEditorUtils.getMapInfo)(config);
|
|
310
338
|
this.readOnly = readOnly;
|
|
311
339
|
this.state = {
|
|
312
340
|
isLoading: true,
|
|
@@ -342,9 +370,10 @@ class LargeMapSelectionEditorDialog extends _react.default.Component {
|
|
|
342
370
|
}
|
|
343
371
|
}
|
|
344
372
|
render() {
|
|
345
|
-
const
|
|
346
|
-
isLoading
|
|
347
|
-
inputValue
|
|
373
|
+
const {
|
|
374
|
+
isLoading,
|
|
375
|
+
inputValue
|
|
376
|
+
} = this.state;
|
|
348
377
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactstrap.Modal, {
|
|
349
378
|
size: "lg",
|
|
350
379
|
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 _parseGeolocation = _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,7 +84,9 @@ class ProvinceCityEditor extends _react.Component {
|
|
|
84
84
|
this.props.setValue(this.value);
|
|
85
85
|
};
|
|
86
86
|
this.selectSelectorType = type => {
|
|
87
|
-
const
|
|
87
|
+
const {
|
|
88
|
+
selectedProvince
|
|
89
|
+
} = this.state;
|
|
88
90
|
if (!selectedProvince) return;
|
|
89
91
|
this.setState({
|
|
90
92
|
selectedItem: type
|
|
@@ -104,9 +106,10 @@ class ProvinceCityEditor extends _react.Component {
|
|
|
104
106
|
this.timer = null;
|
|
105
107
|
const value = this.parseRef.value;
|
|
106
108
|
if (this.isComposing) return;
|
|
107
|
-
const
|
|
108
|
-
province
|
|
109
|
-
city
|
|
109
|
+
const {
|
|
110
|
+
province,
|
|
111
|
+
city
|
|
112
|
+
} = (0, _parseGeolocation.default)(this.locations, value);
|
|
110
113
|
this.value = Object.assign({}, this.value);
|
|
111
114
|
this.props.setValue(this.value);
|
|
112
115
|
if (!province) return;
|
|
@@ -129,9 +132,10 @@ class ProvinceCityEditor extends _react.Component {
|
|
|
129
132
|
}
|
|
130
133
|
};
|
|
131
134
|
this.onSubmit = () => {
|
|
132
|
-
const
|
|
133
|
-
province
|
|
134
|
-
city
|
|
135
|
+
const {
|
|
136
|
+
province,
|
|
137
|
+
city
|
|
138
|
+
} = this.value;
|
|
135
139
|
if (!province || !city) {
|
|
136
140
|
const errMessage = (0, _lang.getLocale)('Province/City_must_be_filled_in');
|
|
137
141
|
this.setState({
|
|
@@ -158,10 +162,11 @@ class ProvinceCityEditor extends _react.Component {
|
|
|
158
162
|
componentDidMount() {
|
|
159
163
|
this.props.getData().then(data => {
|
|
160
164
|
this.locations = data;
|
|
161
|
-
const
|
|
162
|
-
selectedProvince
|
|
163
|
-
selectedCity
|
|
164
|
-
selectedItem
|
|
165
|
+
const {
|
|
166
|
+
selectedProvince,
|
|
167
|
+
selectedCity,
|
|
168
|
+
selectedItem
|
|
169
|
+
} = this.initLocationSelecting(this.value);
|
|
165
170
|
this.setState({
|
|
166
171
|
isLoadingData: false,
|
|
167
172
|
selectedProvince,
|
|
@@ -171,13 +176,14 @@ class ProvinceCityEditor extends _react.Component {
|
|
|
171
176
|
});
|
|
172
177
|
}
|
|
173
178
|
render() {
|
|
174
|
-
const
|
|
175
|
-
selectedItem
|
|
176
|
-
selectedCity
|
|
177
|
-
selectedProvince
|
|
178
|
-
isShowSelector
|
|
179
|
-
isLoadingData
|
|
180
|
-
location
|
|
179
|
+
const {
|
|
180
|
+
selectedItem,
|
|
181
|
+
selectedCity,
|
|
182
|
+
selectedProvince,
|
|
183
|
+
isShowSelector,
|
|
184
|
+
isLoadingData,
|
|
185
|
+
location
|
|
186
|
+
} = this.state;
|
|
181
187
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
182
188
|
children: [!isLoadingData ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
183
189
|
onClick: this.onClick,
|
|
@@ -46,7 +46,9 @@ class ProvinceEditor extends _react.Component {
|
|
|
46
46
|
this.onUpArrow = e => {
|
|
47
47
|
e.preventDefault();
|
|
48
48
|
e.stopPropagation();
|
|
49
|
-
let
|
|
49
|
+
let {
|
|
50
|
+
highlightIndex
|
|
51
|
+
} = this.state;
|
|
50
52
|
if (highlightIndex > 0) {
|
|
51
53
|
this.setState({
|
|
52
54
|
highlightIndex: highlightIndex - 1
|
|
@@ -60,7 +62,9 @@ class ProvinceEditor extends _react.Component {
|
|
|
60
62
|
this.onDownArrow = e => {
|
|
61
63
|
e.preventDefault();
|
|
62
64
|
e.stopPropagation();
|
|
63
|
-
let
|
|
65
|
+
let {
|
|
66
|
+
highlightIndex
|
|
67
|
+
} = this.state;
|
|
64
68
|
if (highlightIndex < this.filteredProvince.length - 1) {
|
|
65
69
|
this.setState({
|
|
66
70
|
highlightIndex: highlightIndex + 1
|
|
@@ -120,9 +124,10 @@ class ProvinceEditor extends _react.Component {
|
|
|
120
124
|
}, 300);
|
|
121
125
|
};
|
|
122
126
|
this.createProvinceList = () => {
|
|
123
|
-
const
|
|
124
|
-
value
|
|
125
|
-
highlightIndex
|
|
127
|
+
const {
|
|
128
|
+
value,
|
|
129
|
+
highlightIndex
|
|
130
|
+
} = this.state;
|
|
126
131
|
let provinceList = this.filteredProvince.map((item, index) => {
|
|
127
132
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
128
133
|
className: "geolocation-region-editor-province ".concat(highlightIndex === index ? 'geolocation-region-editor-province-highlight' : ''),
|
|
@@ -178,7 +183,9 @@ class ProvinceEditor extends _react.Component {
|
|
|
178
183
|
}
|
|
179
184
|
}
|
|
180
185
|
render() {
|
|
181
|
-
const
|
|
186
|
+
const {
|
|
187
|
+
isLoadingData
|
|
188
|
+
} = this.state;
|
|
182
189
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
183
190
|
className: "dtable-ui-geolocation-province-editor",
|
|
184
191
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -10,11 +10,12 @@ 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
|
|
13
|
+
const {
|
|
14
|
+
type,
|
|
15
|
+
clickHandler,
|
|
16
|
+
selectedType,
|
|
17
|
+
selectedItem
|
|
18
|
+
} = this.props;
|
|
18
19
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
19
20
|
className: 'dtable-ui-geolocation-selector-header-item ' + (selectedType === type ? 'selected-dtable-ui-geolocation-selector-header-item' : ''),
|
|
20
21
|
onClick: () => {
|
|
@@ -9,12 +9,13 @@ 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
|
|
12
|
+
const {
|
|
13
|
+
clickHandler,
|
|
14
|
+
type,
|
|
15
|
+
selectedItem,
|
|
16
|
+
parent,
|
|
17
|
+
doubleClickHandler
|
|
18
|
+
} = this.props;
|
|
18
19
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("ul", {
|
|
19
20
|
className: "dtable-ui-geolocation-selector-list",
|
|
20
21
|
children: parent.children.map((item, index) => {
|
|
@@ -12,10 +12,11 @@ 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
|
|
15
|
+
let {
|
|
16
|
+
value,
|
|
17
|
+
data,
|
|
18
|
+
containerClassName
|
|
19
|
+
} = this.props;
|
|
19
20
|
let className = (0, _classnames.default)('dtable-ui cell-formatter-container geolocation-formatter', containerClassName);
|
|
20
21
|
if (typeof value !== 'object') {
|
|
21
22
|
return null;
|
|
@@ -15,7 +15,9 @@ class HtmlLongTextFormatter extends _react.Component {
|
|
|
15
15
|
constructor(_props) {
|
|
16
16
|
super(_props);
|
|
17
17
|
this.translateValue = props => {
|
|
18
|
-
const
|
|
18
|
+
const {
|
|
19
|
+
value
|
|
20
|
+
} = props;
|
|
19
21
|
if (!value) {
|
|
20
22
|
this.setState({
|
|
21
23
|
innerHtml: null
|
|
@@ -49,14 +51,20 @@ class HtmlLongTextFormatter extends _react.Component {
|
|
|
49
51
|
this.translateValue(this.props);
|
|
50
52
|
}
|
|
51
53
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
52
|
-
const
|
|
54
|
+
const {
|
|
55
|
+
value
|
|
56
|
+
} = this.props;
|
|
53
57
|
if (nextProps.value !== value) {
|
|
54
58
|
this.translateValue(nextProps);
|
|
55
59
|
}
|
|
56
60
|
}
|
|
57
61
|
render() {
|
|
58
|
-
const
|
|
59
|
-
|
|
62
|
+
const {
|
|
63
|
+
innerHtml
|
|
64
|
+
} = this.state;
|
|
65
|
+
const {
|
|
66
|
+
containerClassName
|
|
67
|
+
} = this.props;
|
|
60
68
|
const className = (0, _classnames.default)('dtable-ui cell-formatter-container long-text-formatter', containerClassName);
|
|
61
69
|
if (!innerHtml) return null;
|
|
62
70
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
package/lib/Icon/index.js
CHANGED
|
@@ -20,9 +20,11 @@ class Icon extends React.Component {
|
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
22
|
const _this$props = this.props,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
{
|
|
24
|
+
type,
|
|
25
|
+
className,
|
|
26
|
+
size
|
|
27
|
+
} = _this$props,
|
|
26
28
|
restProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
27
29
|
const cls = (0, _classnames.default)(className, 'am-icon', "am-icon-".concat(type), "am-icon-".concat(size));
|
|
28
30
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
package/lib/IconButton/index.js
CHANGED
|
@@ -12,10 +12,12 @@ 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
|
-
|
|
15
|
+
let {
|
|
16
|
+
disabled,
|
|
17
|
+
className,
|
|
18
|
+
icon,
|
|
19
|
+
children
|
|
20
|
+
} = _ref,
|
|
19
21
|
otherProperties = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
20
22
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
21
23
|
className: (0, _classnames.default)('seatable-icon-btn', className, {
|
|
@@ -18,11 +18,15 @@ class ImagePreviewer extends _react.default.Component {
|
|
|
18
18
|
constructor(props) {
|
|
19
19
|
super(props);
|
|
20
20
|
this.showLargeImage = () => {
|
|
21
|
-
let
|
|
21
|
+
let {
|
|
22
|
+
imageItemUrl
|
|
23
|
+
} = this.props;
|
|
22
24
|
this.props.showLargeImage(imageItemUrl);
|
|
23
25
|
};
|
|
24
26
|
this.showImageToolbar = () => {
|
|
25
|
-
let
|
|
27
|
+
let {
|
|
28
|
+
itemIndex
|
|
29
|
+
} = this.props;
|
|
26
30
|
this.props.setImageItemIndex(itemIndex);
|
|
27
31
|
};
|
|
28
32
|
this.hideImageToolbar = () => {
|
|
@@ -34,7 +38,9 @@ class ImagePreviewer extends _react.default.Component {
|
|
|
34
38
|
};
|
|
35
39
|
this.deleteImage = e => {
|
|
36
40
|
e.stopPropagation();
|
|
37
|
-
let
|
|
41
|
+
let {
|
|
42
|
+
itemIndex
|
|
43
|
+
} = this.props;
|
|
38
44
|
this.props.deleteImage(itemIndex, _constants.FILE_EDITOR_STATUS.PREVIEWER);
|
|
39
45
|
};
|
|
40
46
|
this.onClickDelete = e => {
|
|
@@ -84,15 +90,17 @@ class ImagePreviewer extends _react.default.Component {
|
|
|
84
90
|
const offsetWidth = document.body.offsetWidth;
|
|
85
91
|
this.containerSize = offsetWidth < 768 ? (offsetWidth - 55) / 2 + 'px' : (offsetWidth - 80) / 3 + 'px';
|
|
86
92
|
this.position = {};
|
|
87
|
-
const
|
|
88
|
-
mediaUrl
|
|
93
|
+
const {
|
|
94
|
+
mediaUrl
|
|
95
|
+
} = props.config || {};
|
|
89
96
|
this.imageLoadingFailedUrl = "".concat(mediaUrl, "img/image-loading-failed.png");
|
|
90
97
|
this.ref = null;
|
|
91
98
|
}
|
|
92
99
|
componentDidMount() {
|
|
93
|
-
let
|
|
94
|
-
imageItemUrl
|
|
95
|
-
config
|
|
100
|
+
let {
|
|
101
|
+
imageItemUrl,
|
|
102
|
+
config
|
|
103
|
+
} = this.props;
|
|
96
104
|
if ((0, _url.checkSVGImage)(imageItemUrl)) {
|
|
97
105
|
this.setState({
|
|
98
106
|
imageThumbnailUrl: imageItemUrl
|
|
@@ -111,10 +119,11 @@ class ImagePreviewer extends _react.default.Component {
|
|
|
111
119
|
});
|
|
112
120
|
}
|
|
113
121
|
render() {
|
|
114
|
-
const
|
|
115
|
-
enterImageItemIndex
|
|
116
|
-
itemIndex
|
|
117
|
-
imageItemUrl
|
|
122
|
+
const {
|
|
123
|
+
enterImageItemIndex,
|
|
124
|
+
itemIndex,
|
|
125
|
+
imageItemUrl
|
|
126
|
+
} = this.props;
|
|
118
127
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
119
128
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
120
129
|
style: _constants.isMobile ? {
|
|
@@ -26,7 +26,9 @@ class ImagesPreviewer extends _react.default.Component {
|
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
this.showLargeImage = itemUrl => {
|
|
29
|
-
let
|
|
29
|
+
let {
|
|
30
|
+
value
|
|
31
|
+
} = this.props;
|
|
30
32
|
this.setState({
|
|
31
33
|
isShowLargeImage: true,
|
|
32
34
|
largeImageIndex: value.indexOf(itemUrl)
|
|
@@ -56,7 +58,9 @@ class ImagesPreviewer extends _react.default.Component {
|
|
|
56
58
|
};
|
|
57
59
|
this.deleteImage = (index, type) => {
|
|
58
60
|
this.props.deleteImage(index, type);
|
|
59
|
-
const
|
|
61
|
+
const {
|
|
62
|
+
value
|
|
63
|
+
} = this.props;
|
|
60
64
|
if (index > value.length - 2) {
|
|
61
65
|
if (value.length - 2 < 0) {
|
|
62
66
|
this.hideLargeImage();
|
|
@@ -99,7 +103,9 @@ class ImagesPreviewer extends _react.default.Component {
|
|
|
99
103
|
}
|
|
100
104
|
}
|
|
101
105
|
render() {
|
|
102
|
-
let
|
|
106
|
+
let {
|
|
107
|
+
value
|
|
108
|
+
} = this.props;
|
|
103
109
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
104
110
|
className: (0, _classnames.default)('dtable-ui-image-previewer-container', {
|
|
105
111
|
'mt-0': value.length === 0 && _constants.isMobile
|
package/lib/ImageEditor/index.js
CHANGED
|
@@ -16,7 +16,9 @@ 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
|
|
19
|
+
let {
|
|
20
|
+
isMobile
|
|
21
|
+
} = _ref,
|
|
20
22
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
21
23
|
if (isMobile === false) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
22
24
|
ref: ref
|
|
@@ -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 _ActivityIndicator = _interopRequireDefault(require("../../ActivityIndicator"));
|
|
12
11
|
var _MobileFullScreenPage = _interopRequireDefault(require("../../MobileFullScreenPage"));
|
|
@@ -17,35 +16,28 @@ var _utils = require("../../utils/utils");
|
|
|
17
16
|
var _lang = require("../../lang");
|
|
18
17
|
require("./index.css");
|
|
19
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
-
const
|
|
21
|
-
|
|
19
|
+
const {
|
|
20
|
+
Header,
|
|
21
|
+
Body
|
|
22
|
+
} = _MobileFullScreenPage.default;
|
|
22
23
|
const MBImageEditor = _ref => {
|
|
23
|
-
let
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
const
|
|
34
|
-
|
|
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];
|
|
24
|
+
let {
|
|
25
|
+
value: oldValue,
|
|
26
|
+
column,
|
|
27
|
+
config,
|
|
28
|
+
onToggle,
|
|
29
|
+
onCommit,
|
|
30
|
+
uploadFile
|
|
31
|
+
} = _ref;
|
|
32
|
+
const [value, setValue] = (0, _react.useState)(oldValue || []);
|
|
33
|
+
const [isShowEditor, setShowEditor] = (0, _react.useState)(false);
|
|
34
|
+
const [uploadLocalImages, setUploadLocalImages] = (0, _react.useState)([]);
|
|
35
|
+
const [isUploading, setUploading] = (0, _react.useState)(false);
|
|
45
36
|
const uploadingFilesCount = (0, _react.useRef)(0);
|
|
46
37
|
const uploadedFilesCount = (0, _react.useRef)(0);
|
|
47
|
-
const
|
|
48
|
-
mediaUrl
|
|
38
|
+
const {
|
|
39
|
+
mediaUrl
|
|
40
|
+
} = config || {};
|
|
49
41
|
const resetAdditionImage = (0, _react.useCallback)(() => {
|
|
50
42
|
setUploadLocalImages([]);
|
|
51
43
|
}, []);
|
|
@@ -14,7 +14,9 @@ class ImageLink extends _react.default.Component {
|
|
|
14
14
|
constructor(props) {
|
|
15
15
|
super(props);
|
|
16
16
|
this.saveImageLink = () => {
|
|
17
|
-
let
|
|
17
|
+
let {
|
|
18
|
+
imageLink
|
|
19
|
+
} = this.state;
|
|
18
20
|
let _this = this;
|
|
19
21
|
let image = new Image();
|
|
20
22
|
image.onload = function () {
|
|
@@ -48,7 +50,9 @@ class ImageLink extends _react.default.Component {
|
|
|
48
50
|
};
|
|
49
51
|
}
|
|
50
52
|
render() {
|
|
51
|
-
const
|
|
53
|
+
const {
|
|
54
|
+
isShowErrorMessage
|
|
55
|
+
} = this.state;
|
|
52
56
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
53
57
|
className: "dtable-ui-image-link",
|
|
54
58
|
onKeyDown: this.onKeyDown,
|
|
@@ -32,7 +32,9 @@ class AdditionPreviewer extends _react.default.Component {
|
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
34
|
render() {
|
|
35
|
-
const
|
|
35
|
+
const {
|
|
36
|
+
activeTab
|
|
37
|
+
} = this.state;
|
|
36
38
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
37
39
|
className: "dtable-ui-image-addition-container",
|
|
38
40
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|