dtable-ui-component 6.0.108 → 6.0.110-aik.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 +42 -35
- package/lib/ActivityIndicator/index.js +9 -9
- package/lib/AsyncUserSelect/index.css +54 -12
- package/lib/AsyncUserSelect/index.js +27 -16
- package/lib/Badge/index.js +27 -31
- package/lib/CheckboxEditor/index.js +15 -14
- package/lib/CollaboratorEditor/index.js +16 -15
- package/lib/CollaboratorEditor/pc-editor/index.js +1 -1
- package/lib/CollapsibleSettingLayout/index.js +1 -1
- package/lib/Comment/body/comment.js +1 -1
- package/lib/Comment/body/index.js +7 -9
- package/lib/Comment/footer/index.js +1 -1
- package/lib/Comment/footer/input/index.js +5 -5
- package/lib/Comment/footer/input/participant/index.js +1 -1
- package/lib/Comment/footer/participants/participant-select/index.js +2 -2
- package/lib/Comment/utils/utilities.js +1 -1
- package/lib/DTableColorPicker/ColorPickerPortal/index.js +8 -6
- package/lib/DTableColorPicker/index.js +13 -12
- package/lib/DTableColorPicker/utils.js +1 -1
- package/lib/DTableCommonAddTool/index.js +2 -2
- package/lib/DTableFiltersPopover/index.js +1 -1
- package/lib/DTableFiltersPopover/utils/index.js +1 -1
- package/lib/DTableFiltersPopover/widgets/filter-group.js +2 -2
- package/lib/DTableFiltersPopover/widgets/filter-item.js +1 -1
- package/lib/DTableFiltersPopover/widgets/filter-list/index.js +1 -1
- package/lib/DTableFiltersPopover/widgets/rate-item.js +5 -5
- package/lib/DTableGroupSelect/index.css +42 -5
- package/lib/DTableGroupSelect/select-option-group.css +3 -3
- package/lib/DTableGroupSelect/select-option-group.js +23 -5
- package/lib/DTableIcon/index.js +4 -4
- package/lib/DTableIcon/svg-icon.js +4 -4
- package/lib/DTableModalHeader/index.js +6 -8
- package/lib/DTableRadioGroup/index.js +3 -3
- package/lib/DTableSelect/dtable-select-label.js +1 -1
- package/lib/DTableSelect/utils.js +55 -36
- package/lib/DateEditor/index.js +13 -10
- package/lib/DateEditor/pc-editor.js +1 -1
- package/lib/DatePicker/utils.js +4 -4
- package/lib/DepartmentMultipleSelectEditor/index.js +3 -3
- package/lib/DepartmentSelectFilter/index.js +5 -2
- package/lib/DepartmentSingleSelectEditor/index.js +15 -14
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +2 -2
- package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +6 -6
- package/lib/DigitalSignEditor/index.js +15 -14
- package/lib/DigitalSignEditor/mb-editor/index.js +4 -4
- package/lib/DigitalSignEditor/pc-editor/index.js +7 -6
- package/lib/DigitalSignEditor/service.js +1 -1
- package/lib/DigitalSignEditor/signature-board/index.js +2 -2
- package/lib/DigitalSignFormatter/utils.js +1 -1
- package/lib/Drawer/index.js +3 -2
- package/lib/FieldDisplaySetting/field-item.js +1 -1
- package/lib/FieldDisplaySetting/index.js +11 -9
- package/lib/FileEditor/files-previewer/index.js +15 -14
- package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +2 -2
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +3 -3
- package/lib/FileEditor/index.js +15 -14
- package/lib/FileEditor/pc-editor/addition-previewer/index.js +1 -1
- package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +6 -6
- package/lib/FileEditor/pc-editor/index.js +3 -3
- package/lib/FileFormatter/index.js +1 -1
- package/lib/FileItemFormatter/index.js +1 -1
- package/lib/FileUploader/index.js +1 -1
- package/lib/FormulaFormatter/index.js +15 -9
- package/lib/GeolocationEditor/index.js +23 -19
- package/lib/GeolocationEditor/map-editor-utils.js +10 -6
- package/lib/GeolocationEditor/mb-editor/index.js +27 -23
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +9 -6
- package/lib/GeolocationEditor/pc-editor/country-editor.js +2 -2
- package/lib/GeolocationEditor/pc-editor/index.js +21 -15
- package/lib/GeolocationEditor/pc-editor/location-editor.js +2 -2
- package/lib/GeolocationEditor/pc-editor/map-editor/index.js +13 -9
- package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +9 -6
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +24 -7
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +20 -3
- package/lib/GeolocationEditor/pc-editor/province-city-editor.js +1 -1
- package/lib/GeolocationEditor/pc-editor/province-editor.js +2 -2
- package/lib/GeolocationEditor/pc-editor/selector-list.js +1 -1
- package/lib/HtmlLongTextFormatter/index.js +1 -1
- package/lib/Icon/index.js +13 -17
- package/lib/Icon/load-sprite.js +13 -2
- package/lib/IconButton/index.js +11 -14
- package/lib/ImageEditor/images-previewer/image-preview/index.js +1 -1
- package/lib/ImageEditor/index.js +15 -14
- package/lib/ImageEditor/pc-editor/addition-previewer/index.js +2 -2
- package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +5 -5
- package/lib/ImageEditor/pc-editor/images-previewer/index.js +1 -1
- package/lib/ImageFormatter/index.js +1 -1
- package/lib/ImagePreviewerLightbox/index.js +30 -21
- package/lib/ImageThumbnail/index.js +2 -2
- package/lib/InputItem/custom-input.js +9 -9
- package/lib/InputItem/custom-keyboard.js +34 -37
- package/lib/InputItem/index.js +52 -49
- package/lib/InputItem/input.js +9 -13
- package/lib/LinkEditor/pc-popover/index.js +3 -2
- package/lib/List/index.js +17 -21
- package/lib/List/list-item.js +50 -52
- package/lib/MBEditorHeader/index.js +1 -1
- package/lib/MobileFullScreenPage/body/index.js +1 -1
- package/lib/MobileFullScreenPage/header/index.js +4 -4
- package/lib/MobileFullScreenPage/index.js +1 -1
- package/lib/MobileModal/index.js +7 -10
- package/lib/Modal/alert.js +2 -2
- package/lib/Modal/modal.js +28 -31
- package/lib/Modal/prompt.js +10 -10
- package/lib/MultipleSelectEditor/index.js +6 -8
- package/lib/MultipleSelectFormatter/index.js +1 -1
- package/lib/PhoneNumberLink/index.js +1 -1
- package/lib/Picker/AbstractPicker.js +26 -28
- package/lib/Popover/index.js +9 -12
- package/lib/Popover/item.js +22 -26
- package/lib/Progress/index.js +10 -8
- package/lib/Radio/Radio.js +13 -15
- package/lib/Radio/RadioItem.js +18 -18
- package/lib/RateFormatter/index.js +2 -2
- package/lib/RoleStatusEditor/index.js +1 -1
- package/lib/RowExpand/index.js +7 -6
- package/lib/RowExpandDialog/body/index.js +14 -14
- package/lib/RowExpandDialog/column-content/index.js +1 -1
- package/lib/RowExpandDialog/header/index.js +4 -3
- package/lib/RowExpandDialog/index.js +43 -32
- package/lib/RowExpandEditor/add-btn/index.js +7 -6
- package/lib/RowExpandEditor/checkbox-editor/index.js +7 -6
- package/lib/RowExpandEditor/collaborator-editor/index.js +7 -6
- package/lib/RowExpandEditor/date-editor/index.js +7 -6
- package/lib/RowExpandEditor/department-editor/index.js +7 -6
- package/lib/RowExpandEditor/digital-sign-editor/index.js +7 -6
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +4 -4
- package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +4 -4
- package/lib/RowExpandEditor/duration-editor/index.js +7 -6
- package/lib/RowExpandEditor/email-editor/index.js +7 -6
- package/lib/RowExpandEditor/email-editor/mb-editor/index.js +1 -1
- package/lib/RowExpandEditor/email-editor/pc-editor/index.js +1 -1
- package/lib/RowExpandEditor/file-editor/index.js +7 -6
- package/lib/RowExpandEditor/geolocation-editor/index.js +7 -6
- package/lib/RowExpandEditor/image-editor/index.js +7 -6
- package/lib/RowExpandEditor/image-editor/mb-editor/index.js +1 -1
- package/lib/RowExpandEditor/image-editor/pc-editor/index.js +1 -1
- package/lib/RowExpandEditor/index.js +11 -10
- package/lib/RowExpandEditor/long-text-editor/index.js +7 -6
- package/lib/RowExpandEditor/multiple-select-editor/index.js +7 -6
- package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +1 -1
- package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +5 -5
- package/lib/RowExpandEditor/number-editor/index.js +7 -6
- package/lib/RowExpandEditor/rate-editor/index.js +7 -6
- package/lib/RowExpandEditor/rate-editor/mb-editor.js +1 -1
- package/lib/RowExpandEditor/rate-editor/pc-editor.js +5 -5
- package/lib/RowExpandEditor/single-select-editor/index.js +7 -6
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +4 -4
- package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +3 -3
- package/lib/RowExpandEditor/text-editor/index.js +7 -6
- package/lib/RowExpandEditor/url-editor/index.js +7 -6
- package/lib/RowExpandEditor/url-editor/mb-editor/index.js +2 -2
- package/lib/RowExpandEditor/url-editor/pc-editor/index.js +2 -2
- package/lib/RowExpandFormatter/department-formatter/index.js +6 -3
- package/lib/RowExpandFormatter/email-formatter/index.js +1 -1
- package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +2 -2
- package/lib/RowExpandFormatter/formula-formatter/index.js +17 -11
- package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +2 -2
- package/lib/RowExpandFormatter/index.js +11 -7
- package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +1 -1
- package/lib/RowExpandFormatter/link-formatter/index.js +6 -6
- package/lib/RowExpandFormatter/rate-formatter/index.js +2 -2
- package/lib/RowExpandFormatter/url-formatter/index.js +2 -2
- package/lib/RowExpandView/body/index.js +13 -15
- package/lib/RowExpandView/index.js +39 -28
- package/lib/SelectOptionGroup/index.js +1 -1
- package/lib/SelectedDepartments/index.js +3 -3
- package/lib/SimpleLongTextFormatter/index.js +2 -2
- package/lib/SingleSelectEditor/index.js +6 -8
- package/lib/TabBar/Tab.js +10 -10
- package/lib/TabBar/index.js +7 -6
- package/lib/Tabs/index.js +10 -9
- package/lib/TextareaItem/index.js +43 -45
- package/lib/Toast/index.js +5 -5
- package/lib/formatterConfig/index.js +3 -3
- package/lib/locales/de.json +5 -5
- package/lib/locales/en.json +5 -6
- package/lib/locales/es.json +5 -5
- package/lib/locales/fr.json +5 -5
- package/lib/locales/pt.json +5 -5
- package/lib/locales/ru.json +5 -5
- package/lib/locales/zh-CN.json +5 -5
- package/lib/select-editor/index.js +15 -14
- package/lib/select-editor/pc-editor/index.js +5 -5
- package/lib/toaster/alert.js +1 -1
- package/lib/toaster/toast.js +1 -1
- package/lib/toaster/toastManager.js +12 -14
- package/lib/toaster/toaster.js +12 -9
- package/lib/utils/class.js +3 -3
- package/lib/utils/departments.js +3 -4
- package/lib/utils/getLocale.js +11 -5
- package/lib/utils/object-utils.js +5 -4
- package/lib/utils/url.js +4 -4
- package/package.json +14 -15
|
@@ -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 _reactstrap = require("reactstrap");
|
|
12
11
|
var _reactTransitionGroup = require("react-transition-group");
|
|
@@ -31,17 +30,17 @@ function FieldDisplaySetting(_ref) {
|
|
|
31
30
|
setCollapsed(!isCollapsed);
|
|
32
31
|
};
|
|
33
32
|
const defaultStyle = {
|
|
34
|
-
transition:
|
|
33
|
+
transition: `all ${DURATION}ms cubic-bezier(.645,.045,.355,1)`,
|
|
35
34
|
opacity: 0
|
|
36
35
|
};
|
|
37
36
|
const transitionStyles = {
|
|
38
37
|
entering: {
|
|
39
38
|
opacity: 1,
|
|
40
|
-
height:
|
|
39
|
+
height: `${fields.length * FIELD_ITEM_HEIGHT + BANNER_HEIGHT}px`
|
|
41
40
|
},
|
|
42
41
|
entered: {
|
|
43
42
|
opacity: 1,
|
|
44
|
-
height:
|
|
43
|
+
height: `${fields.length * FIELD_ITEM_HEIGHT + BANNER_HEIGHT}px`
|
|
45
44
|
},
|
|
46
45
|
exiting: {
|
|
47
46
|
opacity: 0,
|
|
@@ -61,7 +60,7 @@ function FieldDisplaySetting(_ref) {
|
|
|
61
60
|
className: "mb-0",
|
|
62
61
|
children: textProperties.titleValue
|
|
63
62
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
64
|
-
className:
|
|
63
|
+
className: `dtable-font dtable-icon-right expand-button ${isCollapsed ? '' : 'revolving'}`
|
|
65
64
|
})]
|
|
66
65
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactTransitionGroup.Transition, {
|
|
67
66
|
nodeRef: nodeRef,
|
|
@@ -70,9 +69,12 @@ function FieldDisplaySetting(_ref) {
|
|
|
70
69
|
children: state => /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
71
70
|
className: "field-setting-wrapper",
|
|
72
71
|
ref: nodeRef,
|
|
73
|
-
style:
|
|
72
|
+
style: {
|
|
73
|
+
...defaultStyle,
|
|
74
|
+
...transitionStyles[state]
|
|
75
|
+
},
|
|
74
76
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
75
|
-
className:
|
|
77
|
+
className: `field-setting-banner ${isCollapsed ? 'd-none' : 'd-flex'} align-items-center justify-content-between h-5 mt-2 mb-2`,
|
|
76
78
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.Label, {
|
|
77
79
|
className: "mb-0",
|
|
78
80
|
children: textProperties.bannerValue
|
|
@@ -89,7 +91,7 @@ function FieldDisplaySetting(_ref) {
|
|
|
89
91
|
isCollapsed: isCollapsed,
|
|
90
92
|
onClickField: onClickField,
|
|
91
93
|
onMoveField: onMoveField
|
|
92
|
-
},
|
|
94
|
+
}, `${field.key}-${index}`);
|
|
93
95
|
})
|
|
94
96
|
})]
|
|
95
97
|
})
|
|
@@ -6,37 +6,38 @@ 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
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
11
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
10
|
var _reactResponsive = _interopRequireDefault(require("react-responsive"));
|
|
13
11
|
var _pcPreviewer = _interopRequireDefault(require("./pc-previewer"));
|
|
14
12
|
var _mbPreviewer = _interopRequireDefault(require("./mb-previewer"));
|
|
15
13
|
require("./index.css");
|
|
16
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
-
const _excluded = ["isMobile"];
|
|
18
15
|
const FilesPreviewer = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
19
16
|
let {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
if (isMobile === false) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcPreviewer.default,
|
|
17
|
+
isMobile,
|
|
18
|
+
...props
|
|
19
|
+
} = _ref;
|
|
20
|
+
if (isMobile === false) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcPreviewer.default, {
|
|
21
|
+
...props,
|
|
24
22
|
ref: ref
|
|
25
|
-
})
|
|
26
|
-
if (isMobile === true) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbPreviewer.default,
|
|
23
|
+
});
|
|
24
|
+
if (isMobile === true) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbPreviewer.default, {
|
|
25
|
+
...props,
|
|
27
26
|
ref: ref
|
|
28
|
-
})
|
|
27
|
+
});
|
|
29
28
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
30
29
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
|
|
31
30
|
query: "(min-width: 768px)",
|
|
32
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcPreviewer.default,
|
|
31
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcPreviewer.default, {
|
|
32
|
+
...props,
|
|
33
33
|
ref: ref
|
|
34
|
-
})
|
|
34
|
+
})
|
|
35
35
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
|
|
36
36
|
query: "(max-width: 768px)",
|
|
37
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbPreviewer.default,
|
|
37
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbPreviewer.default, {
|
|
38
|
+
...props,
|
|
38
39
|
ref: ref
|
|
39
|
-
})
|
|
40
|
+
})
|
|
40
41
|
})]
|
|
41
42
|
});
|
|
42
43
|
});
|
|
@@ -104,7 +104,7 @@ class FilePreviewer extends _react.default.Component {
|
|
|
104
104
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
105
105
|
className: "dtable-ui-file-editor-previewer-info",
|
|
106
106
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
107
|
-
className:
|
|
107
|
+
className: `dtable-ui-file-editor-previewer-item-name ${fileItem.type === 'dir' ? 'dtable-ui-file-editor-previewer-item-name-height' : ''}`,
|
|
108
108
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
109
109
|
children: fileItem.name
|
|
110
110
|
})
|
|
@@ -112,7 +112,7 @@ class FilePreviewer extends _react.default.Component {
|
|
|
112
112
|
className: "dtable-ui-file-editor-preview-item-detail d-flex",
|
|
113
113
|
children: [uploadTime && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
114
114
|
className: "file-upload-time",
|
|
115
|
-
children:
|
|
115
|
+
children: `${uploadTime}, `
|
|
116
116
|
}), fileItem.size > -1 && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
117
117
|
children: (0, _utils.bytesToSize)(fileItem.size)
|
|
118
118
|
})]
|
|
@@ -99,7 +99,7 @@ class FilePreviewer extends _react.default.Component {
|
|
|
99
99
|
const errorMessage = '';
|
|
100
100
|
const uploadTime = (0, _utils.getFileUploadTime)(fileItem);
|
|
101
101
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
102
|
-
className:
|
|
102
|
+
className: `dtable-ui-file-editor-previewer-box ${highlight ? 'dtable-ui-file-editor-previewer-box-highlight' : ''}`,
|
|
103
103
|
onMouseEnter: this.fileItemMouseEnter,
|
|
104
104
|
onMouseLeave: this.fileItemMouseLeave,
|
|
105
105
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
@@ -123,7 +123,7 @@ class FilePreviewer extends _react.default.Component {
|
|
|
123
123
|
renameFile: this.props.renameFile,
|
|
124
124
|
closeRenameFile: this.closeRenameFile
|
|
125
125
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
126
|
-
className:
|
|
126
|
+
className: `dtable-ui-file-editor-previewer-item-name ${fileItem.type === 'dir' ? 'dtable-ui-file-editor-previewer-item-name-height' : ''}`,
|
|
127
127
|
ref: ref => this.renameRef = ref,
|
|
128
128
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
129
129
|
onClick: this.props.renameFile ? this.handleFileClick : () => {},
|
|
@@ -133,7 +133,7 @@ class FilePreviewer extends _react.default.Component {
|
|
|
133
133
|
className: "dtable-ui-file-editor-preview-item-detail d-flex",
|
|
134
134
|
children: [uploadTime && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
135
135
|
className: "file-upload-time",
|
|
136
|
-
children:
|
|
136
|
+
children: `${uploadTime}, `
|
|
137
137
|
}), fileItem.size > -1 && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
138
138
|
children: (0, _utils.bytesToSize)(fileItem.size)
|
|
139
139
|
})]
|
package/lib/FileEditor/index.js
CHANGED
|
@@ -6,37 +6,38 @@ 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
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
11
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
10
|
var _reactResponsive = _interopRequireDefault(require("react-responsive"));
|
|
13
11
|
var _pcEditor = _interopRequireDefault(require("./pc-editor"));
|
|
14
12
|
var _mbEditor = _interopRequireDefault(require("./mb-editor"));
|
|
15
13
|
require("./index.css");
|
|
16
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
-
const _excluded = ["isMobile"];
|
|
18
15
|
const FileEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
19
16
|
let {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
if (isMobile === false) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default,
|
|
17
|
+
isMobile,
|
|
18
|
+
...props
|
|
19
|
+
} = _ref;
|
|
20
|
+
if (isMobile === false) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, {
|
|
21
|
+
...props,
|
|
24
22
|
ref: ref
|
|
25
|
-
})
|
|
26
|
-
if (isMobile === true) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default,
|
|
23
|
+
});
|
|
24
|
+
if (isMobile === true) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, {
|
|
25
|
+
...props,
|
|
27
26
|
ref: ref
|
|
28
|
-
})
|
|
27
|
+
});
|
|
29
28
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
30
29
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
|
|
31
30
|
query: "(min-width: 768px)",
|
|
32
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default,
|
|
31
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, {
|
|
32
|
+
...props,
|
|
33
33
|
ref: ref
|
|
34
|
-
})
|
|
34
|
+
})
|
|
35
35
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
|
|
36
36
|
query: "(max-width: 768px)",
|
|
37
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default,
|
|
37
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, {
|
|
38
|
+
...props,
|
|
38
39
|
ref: ref
|
|
39
|
-
})
|
|
40
|
+
})
|
|
40
41
|
})]
|
|
41
42
|
});
|
|
42
43
|
});
|
|
@@ -35,7 +35,7 @@ class AdditionPreviewer extends _react.default.Component {
|
|
|
35
35
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
36
36
|
className: "dtable-ui-image-addition-nav",
|
|
37
37
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
38
|
-
className:
|
|
38
|
+
className: `dtable-ui-addition-item ${activeTab === 'localFiles' ? 'dtable-ui-addition-item-selected' : ''}`,
|
|
39
39
|
onClick: this.toggle.bind(this, 'localFiles'),
|
|
40
40
|
children: (0, _lang.getLocale)('Local_Files')
|
|
41
41
|
})
|
|
@@ -126,7 +126,7 @@ class LocalFileAddition extends _react.default.Component {
|
|
|
126
126
|
src: fileThumbnailItem.fileIconUrl,
|
|
127
127
|
style: {
|
|
128
128
|
position: 'absolute',
|
|
129
|
-
zIndex:
|
|
129
|
+
zIndex: `${uploadFile ? 3 : 1}`,
|
|
130
130
|
maxHeight: '100%'
|
|
131
131
|
},
|
|
132
132
|
alt: ""
|
|
@@ -155,7 +155,7 @@ class LocalFileAddition extends _react.default.Component {
|
|
|
155
155
|
})]
|
|
156
156
|
})
|
|
157
157
|
})
|
|
158
|
-
},
|
|
158
|
+
}, `dtable-ui-image-wrapper-circle${index}`);
|
|
159
159
|
});
|
|
160
160
|
fileArr.push(...thumbnailList);
|
|
161
161
|
}
|
|
@@ -174,7 +174,7 @@ class LocalFileAddition extends _react.default.Component {
|
|
|
174
174
|
} = (0, _url.getFileThumbnailInfo)(fileItem, config);
|
|
175
175
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
176
176
|
className: "dtable-ui-image-wrapper",
|
|
177
|
-
id:
|
|
177
|
+
id: `file-content-tip-${index}`,
|
|
178
178
|
onMouseEnter: event => this.showDeleteIcon(event, index),
|
|
179
179
|
onMouseLeave: this.hideDeleteIcon,
|
|
180
180
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -199,7 +199,7 @@ class LocalFileAddition extends _react.default.Component {
|
|
|
199
199
|
show: 0,
|
|
200
200
|
hide: 0
|
|
201
201
|
},
|
|
202
|
-
target:
|
|
202
|
+
target: `file-content-tip-${index}`,
|
|
203
203
|
placement: "bottom",
|
|
204
204
|
isOpen: this.state.tooltipOpen,
|
|
205
205
|
children: fileItem.name
|
|
@@ -214,7 +214,7 @@ class LocalFileAddition extends _react.default.Component {
|
|
|
214
214
|
} = this.state;
|
|
215
215
|
let editorContent = fileArr.length === 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_react.Fragment, {
|
|
216
216
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
217
|
-
className:
|
|
217
|
+
className: `dtable-ui-image-tip-addition ${isFileTipShow ? 'dtable-ui-image-drop-active' : ''}`,
|
|
218
218
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
219
219
|
className: "dtable-ui-dtable-ui-image-add-icon",
|
|
220
220
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
@@ -232,7 +232,7 @@ class LocalFileAddition extends _react.default.Component {
|
|
|
232
232
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
233
233
|
className: "dtable-ui-image-add-box",
|
|
234
234
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
235
|
-
className:
|
|
235
|
+
className: `dtable-ui-image-add-button ${isFileTipShow ? 'dtable-ui-image-wrapper-drop-active' : ''}`,
|
|
236
236
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
237
237
|
"aria-hidden": "true",
|
|
238
238
|
className: "dtable-font dtable-icon-add-table"
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
9
8
|
var _react = _interopRequireDefault(require("react"));
|
|
10
9
|
var _reactstrap = require("reactstrap");
|
|
11
10
|
var _filesPreviewer = _interopRequireDefault(require("../files-previewer"));
|
|
@@ -207,10 +206,11 @@ class PCFileEditor extends _react.default.Component {
|
|
|
207
206
|
name,
|
|
208
207
|
url
|
|
209
208
|
} = res.data;
|
|
210
|
-
fileItem =
|
|
209
|
+
fileItem = {
|
|
210
|
+
...fileItem,
|
|
211
211
|
name,
|
|
212
212
|
url
|
|
213
|
-
}
|
|
213
|
+
};
|
|
214
214
|
newValue[index] = fileItem;
|
|
215
215
|
this.setState({
|
|
216
216
|
value: newValue
|
|
@@ -20,7 +20,7 @@ const FileItemFormatter = _ref => {
|
|
|
20
20
|
} = (0, _url.getFileThumbnailInfo)(file, config);
|
|
21
21
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
22
22
|
onClick: () => openFile && openFile(file),
|
|
23
|
-
className:
|
|
23
|
+
className: `file-item-icon ${isImage ? 'img' : ''}`,
|
|
24
24
|
src: fileIconUrl,
|
|
25
25
|
alt: (file === null || file === void 0 ? void 0 : file.name) || ''
|
|
26
26
|
});
|
|
@@ -137,7 +137,7 @@ class FileUploader extends _react.default.Component {
|
|
|
137
137
|
for (let i = 0; i < allFileLen; i++) {
|
|
138
138
|
let uploadFile = files[i];
|
|
139
139
|
if (isPasteUpload && uploadFile.name === 'image.png') {
|
|
140
|
-
let newName =
|
|
140
|
+
let newName = `image-${(0, _dayjs.default)().format('YYYY-MM-DD-HH-mm')}.png`;
|
|
141
141
|
uploadFile = new File([uploadFile], newName, {
|
|
142
142
|
type: uploadFile.type
|
|
143
143
|
});
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
9
8
|
var _react = _interopRequireDefault(require("react"));
|
|
10
9
|
var _dtableUtils = require("dtable-utils");
|
|
11
10
|
var _baseFormatterConfig = _interopRequireDefault(require("../formatterConfig/base-formatter-config"));
|
|
@@ -37,7 +36,7 @@ class FormulaFormatter extends _react.default.Component {
|
|
|
37
36
|
} = this.props;
|
|
38
37
|
const gridCellClassName = this.getGridCellClassName(resultType);
|
|
39
38
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
40
|
-
className:
|
|
39
|
+
className: `dtable-ui cell-formatter-container formula-formatter ${containerClassName} ${gridCellClassName}`,
|
|
41
40
|
title: cellValue,
|
|
42
41
|
"aria-label": cellValue,
|
|
43
42
|
children: cellValue
|
|
@@ -73,7 +72,7 @@ class FormulaFormatter extends _react.default.Component {
|
|
|
73
72
|
if (!Array.isArray(value)) {
|
|
74
73
|
cellValue = (0, _cellValueValidator.default)(value, array_type) ? [value] : [];
|
|
75
74
|
}
|
|
76
|
-
const contentItemClassName =
|
|
75
|
+
const contentItemClassName = `formula-formatter-content-item ${_isSimpleCellFormatterColumn ? 'simple-cell-formatter' : ''}`;
|
|
77
76
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
78
77
|
className: "dtable-ui formula-formatter multiple",
|
|
79
78
|
children: cellValue.map((v, index) => {
|
|
@@ -81,7 +80,7 @@ class FormulaFormatter extends _react.default.Component {
|
|
|
81
80
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
82
81
|
className: contentItemClassName,
|
|
83
82
|
children: this.createColumnFormatter(Formatter, formatterProps)
|
|
84
|
-
},
|
|
83
|
+
}, `formula-formatter-content-item-${index}`);
|
|
85
84
|
})
|
|
86
85
|
});
|
|
87
86
|
};
|
|
@@ -106,20 +105,27 @@ class FormulaFormatter extends _react.default.Component {
|
|
|
106
105
|
}
|
|
107
106
|
default:
|
|
108
107
|
{
|
|
109
|
-
return
|
|
108
|
+
return {
|
|
109
|
+
...array_data,
|
|
110
110
|
collaborators
|
|
111
|
-
}
|
|
111
|
+
};
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
};
|
|
115
115
|
}
|
|
116
116
|
createColumnFormatter(Formatter, formatterProps) {
|
|
117
117
|
if (/*#__PURE__*/_react.default.isValidElement(Formatter)) {
|
|
118
|
-
return /*#__PURE__*/_react.default.cloneElement(Formatter,
|
|
118
|
+
return /*#__PURE__*/_react.default.cloneElement(Formatter, {
|
|
119
|
+
...formatterProps
|
|
120
|
+
});
|
|
119
121
|
} else if ((0, _utils2.isFunction)(Formatter)) {
|
|
120
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Formatter,
|
|
122
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Formatter, {
|
|
123
|
+
...formatterProps
|
|
124
|
+
});
|
|
121
125
|
}
|
|
122
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextFormatter.default,
|
|
126
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextFormatter.default, {
|
|
127
|
+
...formatterProps
|
|
128
|
+
});
|
|
123
129
|
}
|
|
124
130
|
render() {
|
|
125
131
|
const {
|
|
@@ -6,23 +6,23 @@ 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
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
11
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
10
|
var _reactResponsive = _interopRequireDefault(require("react-responsive"));
|
|
13
11
|
var _pcEditor = _interopRequireDefault(require("./pc-editor"));
|
|
14
12
|
var _mbEditor = _interopRequireDefault(require("./mb-editor"));
|
|
15
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
-
const _excluded = ["isMobile", "config"];
|
|
17
14
|
const GeolocationEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
18
15
|
let {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
isMobile,
|
|
17
|
+
config: propsConfig,
|
|
18
|
+
...props
|
|
19
|
+
} = _ref;
|
|
23
20
|
const config = (0, _react.useMemo)(() => {
|
|
24
21
|
var _window;
|
|
25
|
-
return
|
|
22
|
+
return {
|
|
23
|
+
...((_window = window) === null || _window === void 0 ? void 0 : _window.dtable),
|
|
24
|
+
...propsConfig
|
|
25
|
+
};
|
|
26
26
|
}, [propsConfig]);
|
|
27
27
|
const getLocationData = (0, _react.useCallback)(() => {
|
|
28
28
|
var _window2, _window2$app;
|
|
@@ -33,7 +33,7 @@ const GeolocationEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
33
33
|
server = '',
|
|
34
34
|
mediaUrl = ''
|
|
35
35
|
} = config || {};
|
|
36
|
-
return fetch(
|
|
36
|
+
return fetch(`${server}${mediaUrl}geo-data/cn-location.json`.replaceAll('//', '/')).then(res => {
|
|
37
37
|
// get locations from server
|
|
38
38
|
return res.json();
|
|
39
39
|
}).catch(() => {
|
|
@@ -55,11 +55,11 @@ const GeolocationEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
55
55
|
server = ''
|
|
56
56
|
} = config;
|
|
57
57
|
const geoFileName = lang === 'cn' ? 'cn-region-location' : 'en-region-location';
|
|
58
|
-
return fetch(
|
|
58
|
+
return fetch(`${server}${mediaUrl}geo-data/${geoFileName}.json`.replaceAll('//', '/')).then(res => {
|
|
59
59
|
return res.json();
|
|
60
60
|
}).catch(() => {
|
|
61
61
|
// get locations from local
|
|
62
|
-
return fetch(
|
|
62
|
+
return fetch(`./geo-data/${geoFileName}.json`).then(res => {
|
|
63
63
|
return res.json();
|
|
64
64
|
});
|
|
65
65
|
}).then(res => {
|
|
@@ -72,35 +72,39 @@ const GeolocationEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
72
72
|
return data;
|
|
73
73
|
});
|
|
74
74
|
}, [config]);
|
|
75
|
-
if (isMobile === false) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default,
|
|
75
|
+
if (isMobile === false) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, {
|
|
76
|
+
...props,
|
|
76
77
|
config: config,
|
|
77
78
|
getLocationData: getLocationData,
|
|
78
79
|
getCountryData: getCountryData,
|
|
79
80
|
ref: ref
|
|
80
|
-
})
|
|
81
|
-
if (isMobile === true) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default,
|
|
81
|
+
});
|
|
82
|
+
if (isMobile === true) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, {
|
|
83
|
+
...props,
|
|
82
84
|
config: config,
|
|
83
85
|
getLocationData: getLocationData,
|
|
84
86
|
getCountryData: getCountryData,
|
|
85
87
|
ref: ref
|
|
86
|
-
})
|
|
88
|
+
});
|
|
87
89
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
88
90
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
|
|
89
91
|
query: "(min-width: 768px)",
|
|
90
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default,
|
|
92
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, {
|
|
93
|
+
...props,
|
|
91
94
|
config: config,
|
|
92
95
|
getLocationData: getLocationData,
|
|
93
96
|
getCountryData: getCountryData,
|
|
94
97
|
ref: ref
|
|
95
|
-
})
|
|
98
|
+
})
|
|
96
99
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
|
|
97
100
|
query: "(max-width: 768px)",
|
|
98
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default,
|
|
101
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, {
|
|
102
|
+
...props,
|
|
99
103
|
config: config,
|
|
100
104
|
getLocationData: getLocationData,
|
|
101
105
|
getCountryData: getCountryData,
|
|
102
106
|
ref: ref
|
|
103
|
-
})
|
|
107
|
+
})
|
|
104
108
|
})]
|
|
105
109
|
});
|
|
106
110
|
});
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.locateCurrentPosition = exports.loadMapSource = exports.getMineMapUrl = exports.getMapInfo = exports.getInitCenter = exports.MAP_TYPES = exports.INPUT_MODE_MAP = exports.DOMESTIC_MAP_TYPE = void 0;
|
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
9
7
|
const INPUT_MODE_MAP = exports.INPUT_MODE_MAP = {
|
|
10
8
|
ANY_LOCATION: 'any_location',
|
|
11
9
|
ONLY_MOBILE_POSITIONING: 'only_mobile_positioning'
|
|
@@ -32,7 +30,10 @@ const getMineMapUrl = function () {
|
|
|
32
30
|
let config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
33
31
|
const {
|
|
34
32
|
dtableMineMapCustomConfig = {}
|
|
35
|
-
} =
|
|
33
|
+
} = {
|
|
34
|
+
...((_window = window) === null || _window === void 0 ? void 0 : _window.dtable),
|
|
35
|
+
...config
|
|
36
|
+
};
|
|
36
37
|
const {
|
|
37
38
|
domain_url = '',
|
|
38
39
|
data_domain_url = '',
|
|
@@ -76,7 +77,10 @@ const getMapInfo = function () {
|
|
|
76
77
|
dtableBaiduMapKey: baiduMapKey,
|
|
77
78
|
dtableGoogleMapKey: googleMapKey,
|
|
78
79
|
dtableMineMapKey: mineMapKey
|
|
79
|
-
} =
|
|
80
|
+
} = {
|
|
81
|
+
...((_window2 = window) === null || _window2 === void 0 ? void 0 : _window2.dtable),
|
|
82
|
+
...config
|
|
83
|
+
};
|
|
80
84
|
let mapType;
|
|
81
85
|
let mapKey;
|
|
82
86
|
if (baiduMapKey) {
|
|
@@ -101,9 +105,9 @@ const loadMapSource = (mapType, mapKey, callback) => {
|
|
|
101
105
|
let script = document.createElement('script');
|
|
102
106
|
script.type = 'text/javascript';
|
|
103
107
|
if (mapType === MAP_TYPES.B_MAP) {
|
|
104
|
-
scriptUrl =
|
|
108
|
+
scriptUrl = `https://api.map.baidu.com/api?v=3.0&ak=${mapKey}&callback=renderBaiduMap`;
|
|
105
109
|
} else if (mapType === MAP_TYPES.G_MAP) {
|
|
106
|
-
scriptUrl =
|
|
110
|
+
scriptUrl = `https://maps.googleapis.com/maps/api/js?key=${mapKey}&callback=renderGoogleMap&libraries=&v=weekly`;
|
|
107
111
|
} else {
|
|
108
112
|
scriptUrl = 'https://minemap.minedata.cn/minemapapi/v2.1.1/minemap.js';
|
|
109
113
|
let link = document.createElement('link');
|