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
package/lib/IconButton/index.js
CHANGED
|
@@ -5,29 +5,26 @@ 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
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
const _excluded = ["disabled", "className", "icon", "children"];
|
|
14
11
|
const IconButton = _ref => {
|
|
15
12
|
let {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div",
|
|
13
|
+
disabled,
|
|
14
|
+
className,
|
|
15
|
+
icon,
|
|
16
|
+
children,
|
|
17
|
+
...otherProperties
|
|
18
|
+
} = _ref;
|
|
19
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
23
20
|
className: (0, _classnames.default)('seatable-icon-btn', className, {
|
|
24
21
|
'disabled': disabled
|
|
25
|
-
})
|
|
26
|
-
|
|
22
|
+
}),
|
|
23
|
+
...otherProperties,
|
|
27
24
|
children: [icon && /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
28
|
-
className: (0, _classnames.default)('seatable-icon dtable-font',
|
|
25
|
+
className: (0, _classnames.default)('seatable-icon dtable-font', `dtable-icon-${icon}`),
|
|
29
26
|
"aria-hidden": "true"
|
|
30
27
|
}), children]
|
|
31
|
-
})
|
|
28
|
+
});
|
|
32
29
|
};
|
|
33
30
|
var _default = exports.default = IconButton;
|
|
@@ -94,7 +94,7 @@ class ImagePreviewer extends _react.default.Component {
|
|
|
94
94
|
const {
|
|
95
95
|
mediaUrl
|
|
96
96
|
} = props.config || {};
|
|
97
|
-
this.imageLoadingFailedUrl =
|
|
97
|
+
this.imageLoadingFailedUrl = `${mediaUrl}img/image-loading-failed.png`;
|
|
98
98
|
this.ref = null;
|
|
99
99
|
}
|
|
100
100
|
componentDidMount() {
|
package/lib/ImageEditor/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 ImageEditor = /*#__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
|
});
|
|
@@ -42,11 +42,11 @@ class AdditionPreviewer extends _react.default.Component {
|
|
|
42
42
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
43
43
|
className: "dtable-ui-image-addition-nav",
|
|
44
44
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
45
|
-
className:
|
|
45
|
+
className: `dtable-ui-addition-item ${activeTab === 'localPicture' ? 'dtable-ui-addition-item-selected' : ''}`,
|
|
46
46
|
onClick: this.toggle.bind(this, 'localPicture'),
|
|
47
47
|
children: (0, _lang.getLocale)('Local_Images')
|
|
48
48
|
}), this.props.saveImageLink && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
49
|
-
className:
|
|
49
|
+
className: `dtable-ui-addition-item ${activeTab === 'imageLink' ? 'dtable-ui-addition-item-selected' : ''}`,
|
|
50
50
|
onClick: this.toggle.bind(this, 'imageLink'),
|
|
51
51
|
children: (0, _lang.getLocale)('Image_Link')
|
|
52
52
|
})]
|
|
@@ -133,7 +133,7 @@ class LocalImageAddition extends _react.default.Component {
|
|
|
133
133
|
src: fileThumbnailItem.fileIconUrl,
|
|
134
134
|
style: {
|
|
135
135
|
position: 'absolute',
|
|
136
|
-
zIndex:
|
|
136
|
+
zIndex: `${fileThumbnailItem.percent === 100 ? 3 : 1}`,
|
|
137
137
|
maxHeight: '100%'
|
|
138
138
|
},
|
|
139
139
|
alt: ""
|
|
@@ -162,7 +162,7 @@ class LocalImageAddition extends _react.default.Component {
|
|
|
162
162
|
})]
|
|
163
163
|
})
|
|
164
164
|
})
|
|
165
|
-
},
|
|
165
|
+
}, `dtable-ui-image-wrapper-circle${index}`);
|
|
166
166
|
});
|
|
167
167
|
imageArr.push(...thumbnailList);
|
|
168
168
|
}
|
|
@@ -206,11 +206,11 @@ class LocalImageAddition extends _react.default.Component {
|
|
|
206
206
|
isImageTipShow
|
|
207
207
|
} = this.state;
|
|
208
208
|
let editorContent;
|
|
209
|
-
let className = imageArr.length === 0 ?
|
|
209
|
+
let className = imageArr.length === 0 ? `dtable-ui-image-upload-container ${isImageTipShow ? 'dtable-ui-image-upload-container-active' : ''}` : 'dtable-ui-image-wrapper';
|
|
210
210
|
if (imageArr.length === 0) {
|
|
211
211
|
editorContent = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
212
212
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
213
|
-
className:
|
|
213
|
+
className: `dtable-ui-image-tip-addition ${isImageTipShow ? 'dtable-ui-image-drop-active' : ''}`,
|
|
214
214
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
215
215
|
className: "dtable-ui-dtable-ui-image-add-icon",
|
|
216
216
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
@@ -233,7 +233,7 @@ class LocalImageAddition extends _react.default.Component {
|
|
|
233
233
|
editorContent = /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
234
234
|
className: "dtable-ui-image-add-box",
|
|
235
235
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
236
|
-
className:
|
|
236
|
+
className: `dtable-ui-image-add-button ${isImageTipShow ? 'dtable-ui-image-wrapper-drop-active' : ''}`,
|
|
237
237
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
238
238
|
"aria-hidden": "true",
|
|
239
239
|
className: "dtable-font dtable-icon-add-table"
|
|
@@ -108,7 +108,7 @@ class ImagesPreviewer extends _react.default.Component {
|
|
|
108
108
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
109
109
|
className: "dtable-ui-image-previewer-container",
|
|
110
110
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
111
|
-
className:
|
|
111
|
+
className: `dtable-ui-image-previewer-wrapper ${value.length === 0 && _constants.isMobile ? 'd-none' : ''}`,
|
|
112
112
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
113
113
|
className: "dtable-ui-image-previewer-content",
|
|
114
114
|
children: value.length > 0 && value.map((imageItemUrl, index) => {
|
|
@@ -91,7 +91,7 @@ class ImageFormatter extends _react.default.Component {
|
|
|
91
91
|
alt: ""
|
|
92
92
|
}), value.length !== 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
93
93
|
className: "image-item-count",
|
|
94
|
-
children:
|
|
94
|
+
children: `+${value.length}`
|
|
95
95
|
})]
|
|
96
96
|
});
|
|
97
97
|
}
|
|
@@ -27,35 +27,44 @@ function ImagePreviewerLightbox(props) {
|
|
|
27
27
|
onRotateImage
|
|
28
28
|
} = props;
|
|
29
29
|
const imageSrcList = imageItems.map(src => {
|
|
30
|
+
let name = '';
|
|
31
|
+
try {
|
|
32
|
+
name = src ? decodeURIComponent(src.slice(src.lastIndexOf('/') + 1)) : '';
|
|
33
|
+
} catch (error) {
|
|
34
|
+
// eslint-disable-next-line no-console
|
|
35
|
+
console.log(error);
|
|
36
|
+
}
|
|
30
37
|
if (server && dtableUuid && (0, _url.isCustomAssetUrl)(src)) {
|
|
31
38
|
const assetUuid = src.slice(src.lastIndexOf('/') + 1, src.lastIndexOf('.'));
|
|
32
|
-
return
|
|
39
|
+
return {
|
|
40
|
+
name,
|
|
41
|
+
thumbnail: server + '/dtable/' + dtableUuid + '/custom-asset/' + assetUuid
|
|
42
|
+
};
|
|
33
43
|
}
|
|
34
44
|
if (server && dtableUuid && workspaceID && (0, _url.isDigitalSignsUrl)(src)) {
|
|
35
|
-
return
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
45
|
+
return {
|
|
46
|
+
name,
|
|
47
|
+
thumbnail: (0, _url.generateCurrentBaseImageUrl)({
|
|
48
|
+
server,
|
|
49
|
+
workspaceID,
|
|
50
|
+
dtableUuid,
|
|
51
|
+
partUrl: src
|
|
52
|
+
})
|
|
53
|
+
};
|
|
41
54
|
}
|
|
42
|
-
return
|
|
55
|
+
return {
|
|
56
|
+
name: name || '',
|
|
57
|
+
thumbnail: src
|
|
58
|
+
};
|
|
43
59
|
});
|
|
44
60
|
const imagesLength = imageSrcList.length;
|
|
45
61
|
const [currentImageIndex, setCurrentImageIndex] = _react.default.useState(imageIndex || 0);
|
|
46
|
-
const
|
|
62
|
+
const imageItem = imageSrcList[currentImageIndex];
|
|
63
|
+
const URL = imageItem ? imageItem.thumbnail : '';
|
|
64
|
+
const imageName = imageItem ? imageItem.name : '';
|
|
47
65
|
_react.default.useEffect(() => {
|
|
48
66
|
setCurrentImageIndex(imageIndex);
|
|
49
67
|
}, [imageIndex]);
|
|
50
|
-
|
|
51
|
-
// Handle URL has special symbol %$
|
|
52
|
-
let imageName = '';
|
|
53
|
-
try {
|
|
54
|
-
imageName = URL ? decodeURI(URL.slice(URL.lastIndexOf('/') + 1)) : '';
|
|
55
|
-
} catch (error) {
|
|
56
|
-
// eslint-disable-next-line no-console
|
|
57
|
-
console.log(error);
|
|
58
|
-
}
|
|
59
68
|
const canRotateImage = onRotateImage && !readOnly && !['gif', 'heic', 'heif'].includes((0, _url.getFileSuffix)(URL)) && (0, _url.isInternalImg)(URL, server);
|
|
60
69
|
let mainSrc = URL;
|
|
61
70
|
if ((0, _url.needUseThumbnailImage)(URL)) {
|
|
@@ -70,7 +79,7 @@ function ImagePreviewerLightbox(props) {
|
|
|
70
79
|
className: "d-flex",
|
|
71
80
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
72
81
|
className: "text-truncate",
|
|
73
|
-
children: imageName
|
|
82
|
+
children: imageName || ''
|
|
74
83
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
75
84
|
className: "flex-shrink-0 pl-1",
|
|
76
85
|
children: ["(", currentImageIndex + 1, "/", imagesLength, ")"]
|
|
@@ -83,8 +92,8 @@ function ImagePreviewerLightbox(props) {
|
|
|
83
92
|
wrapperClassName: (0, _classnames.default)('dtable-ui-component', className),
|
|
84
93
|
imageTitle: imageTitleDOM,
|
|
85
94
|
mainSrc: mainSrc,
|
|
86
|
-
nextSrc: imageSrcList[(currentImageIndex + 1) % imagesLength],
|
|
87
|
-
prevSrc: imageSrcList[(currentImageIndex + imagesLength - 1) % imagesLength],
|
|
95
|
+
nextSrc: imageSrcList[(currentImageIndex + 1) % imagesLength] ? imageSrcList[(currentImageIndex + 1) % imagesLength].thumbnail : '',
|
|
96
|
+
prevSrc: imageSrcList[(currentImageIndex + imagesLength - 1) % imagesLength] ? imageSrcList[(currentImageIndex + imagesLength - 1) % imagesLength].thumbnail : '',
|
|
88
97
|
imagePadding: 70,
|
|
89
98
|
viewOriginalImageLabel: (0, _lang.getLocale)('View_original_image'),
|
|
90
99
|
enableRotate: canRotateImage,
|
|
@@ -75,7 +75,7 @@ class ImageThumbnail extends _react.default.Component {
|
|
|
75
75
|
const {
|
|
76
76
|
mediaUrl = ''
|
|
77
77
|
} = props.config || {};
|
|
78
|
-
this.imageLoadingFailedUrl =
|
|
78
|
+
this.imageLoadingFailedUrl = `${mediaUrl}img/image-loading-failed.png`;
|
|
79
79
|
}
|
|
80
80
|
componentDidMount() {
|
|
81
81
|
this.getUrl(this.props.src);
|
|
@@ -103,7 +103,7 @@ class ImageThumbnail extends _react.default.Component {
|
|
|
103
103
|
ref: ref => this.ref = ref,
|
|
104
104
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
105
105
|
src: imageThumbnailUrl,
|
|
106
|
-
id:
|
|
106
|
+
id: `item-image-${index}`,
|
|
107
107
|
alt: ""
|
|
108
108
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
109
109
|
className: "dtable-ui-image-icons-choice",
|
|
@@ -63,7 +63,7 @@ class NumberInput extends React.Component {
|
|
|
63
63
|
if (this.props.autoAdjustHeight) {
|
|
64
64
|
this.getContainer().style.height = '0';
|
|
65
65
|
}
|
|
66
|
-
(0, _class.addClass)(customNumberKeyboard.antmKeyboard,
|
|
66
|
+
(0, _class.addClass)(customNumberKeyboard.antmKeyboard, `${this.props.keyboardPrefixCls}-wrapper-hide`);
|
|
67
67
|
}
|
|
68
68
|
// for unmount
|
|
69
69
|
this.removeBlurListener();
|
|
@@ -98,7 +98,7 @@ class NumberInput extends React.Component {
|
|
|
98
98
|
if (customNumberKeyboard.antmKeyboard) {
|
|
99
99
|
if (this.props.autoAdjustHeight) {
|
|
100
100
|
const keyBoardHeight = customNumberKeyboard.antmKeyboard.offsetHeight;
|
|
101
|
-
this.getContainer().style.height =
|
|
101
|
+
this.getContainer().style.height = `${keyBoardHeight}px`;
|
|
102
102
|
if (this.inputRef) {
|
|
103
103
|
const {
|
|
104
104
|
bottom
|
|
@@ -111,14 +111,14 @@ class NumberInput extends React.Component {
|
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
(0, _class.removeClass)(customNumberKeyboard.antmKeyboard,
|
|
114
|
+
(0, _class.removeClass)(customNumberKeyboard.antmKeyboard, `${this.props.keyboardPrefixCls}-wrapper-hide`);
|
|
115
115
|
}
|
|
116
116
|
customNumberKeyboard.confirmDisabled = value === '';
|
|
117
117
|
if (customNumberKeyboard.confirmKeyboardItem) {
|
|
118
118
|
if (value === '') {
|
|
119
|
-
(0, _class.addClass)(customNumberKeyboard.confirmKeyboardItem,
|
|
119
|
+
(0, _class.addClass)(customNumberKeyboard.confirmKeyboardItem, `${this.props.keyboardPrefixCls}-item-disabled`);
|
|
120
120
|
} else {
|
|
121
|
-
(0, _class.removeClass)(customNumberKeyboard.confirmKeyboardItem,
|
|
121
|
+
(0, _class.removeClass)(customNumberKeyboard.confirmKeyboardItem, `${this.props.keyboardPrefixCls}-item-disabled`);
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
}
|
|
@@ -179,9 +179,9 @@ class NumberInput extends React.Component {
|
|
|
179
179
|
customNumberKeyboard.confirmDisabled = valueAfterChange === '';
|
|
180
180
|
if (customNumberKeyboard.confirmKeyboardItem) {
|
|
181
181
|
if (valueAfterChange === '') {
|
|
182
|
-
(0, _class.addClass)(customNumberKeyboard.confirmKeyboardItem,
|
|
182
|
+
(0, _class.addClass)(customNumberKeyboard.confirmKeyboardItem, `${this.props.keyboardPrefixCls}-item-disabled`);
|
|
183
183
|
} else {
|
|
184
|
-
(0, _class.removeClass)(customNumberKeyboard.confirmKeyboardItem,
|
|
184
|
+
(0, _class.removeClass)(customNumberKeyboard.confirmKeyboardItem, `${this.props.keyboardPrefixCls}-item-disabled`);
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
}
|
|
@@ -248,10 +248,10 @@ class NumberInput extends React.Component {
|
|
|
248
248
|
const {
|
|
249
249
|
keyboardPrefixCls
|
|
250
250
|
} = this.props;
|
|
251
|
-
let container = document.querySelector(
|
|
251
|
+
let container = document.querySelector(`#${keyboardPrefixCls}-container`);
|
|
252
252
|
if (!container) {
|
|
253
253
|
container = document.createElement('div');
|
|
254
|
-
container.setAttribute('id',
|
|
254
|
+
container.setAttribute('id', `${keyboardPrefixCls}-container`);
|
|
255
255
|
document.body.appendChild(container);
|
|
256
256
|
}
|
|
257
257
|
this.container = container;
|
|
@@ -1,25 +1,21 @@
|
|
|
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 = exports.KeyboardItem = 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 _classnames = _interopRequireDefault(require("classnames"));
|
|
12
10
|
var React = _interopRequireWildcard(require("react"));
|
|
13
11
|
var _rmcFeedback = _interopRequireDefault(require("rmc-feedback"));
|
|
14
12
|
var _exenv = require("../utils/exenv");
|
|
15
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
-
const _excluded = ["prefixCls", "onClick", "className", "disabled", "children", "tdRef", "label", "iconOnly"];
|
|
17
14
|
/**
|
|
18
15
|
* determines whether an array includes a certain value among its entries, returning true or false as appropriate.
|
|
19
16
|
* @param {array} arr The array to search in
|
|
20
17
|
* @param {any} item The value to search for
|
|
21
|
-
*/
|
|
22
|
-
function includes(arr, item) {
|
|
18
|
+
*/function includes(arr, item) {
|
|
23
19
|
if (!arr || !arr.length || !item) {
|
|
24
20
|
return false;
|
|
25
21
|
}
|
|
@@ -32,18 +28,17 @@ function includes(arr, item) {
|
|
|
32
28
|
}
|
|
33
29
|
class KeyboardItem extends React.Component {
|
|
34
30
|
render() {
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
restProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
31
|
+
const {
|
|
32
|
+
prefixCls,
|
|
33
|
+
onClick,
|
|
34
|
+
className,
|
|
35
|
+
disabled,
|
|
36
|
+
children,
|
|
37
|
+
tdRef,
|
|
38
|
+
label,
|
|
39
|
+
iconOnly,
|
|
40
|
+
...restProps
|
|
41
|
+
} = this.props;
|
|
47
42
|
let value = children;
|
|
48
43
|
if (className === 'keyboard-delete') {
|
|
49
44
|
value = 'delete';
|
|
@@ -53,26 +48,26 @@ class KeyboardItem extends React.Component {
|
|
|
53
48
|
value = 'confirm';
|
|
54
49
|
}
|
|
55
50
|
const extraCls = {
|
|
56
|
-
[
|
|
51
|
+
[`${prefixCls}-item-disabled`]: disabled
|
|
57
52
|
};
|
|
58
|
-
const wrapCls = (0, _classnames.default)(
|
|
53
|
+
const wrapCls = (0, _classnames.default)(`${prefixCls}-item`, className, extraCls);
|
|
59
54
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcFeedback.default, {
|
|
60
55
|
disabled: disabled,
|
|
61
|
-
activeClassName:
|
|
62
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("td",
|
|
56
|
+
activeClassName: `${prefixCls}-item-active`,
|
|
57
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("td", {
|
|
63
58
|
ref: tdRef
|
|
64
59
|
// tslint:disable-next-line:jsx-no-multiline-js
|
|
65
60
|
,
|
|
66
61
|
onTouchEnd: e => {
|
|
67
62
|
onClick(e, value);
|
|
68
63
|
},
|
|
69
|
-
className: wrapCls
|
|
70
|
-
|
|
64
|
+
className: wrapCls,
|
|
65
|
+
...restProps,
|
|
71
66
|
children: [children, iconOnly && /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
72
67
|
className: "sr-only",
|
|
73
68
|
children: label
|
|
74
69
|
})]
|
|
75
|
-
})
|
|
70
|
+
})
|
|
76
71
|
});
|
|
77
72
|
}
|
|
78
73
|
}
|
|
@@ -110,7 +105,7 @@ class CustomKeyboard extends React.Component {
|
|
|
110
105
|
onClick: this.onKeyboardClick,
|
|
111
106
|
disabled: disabled,
|
|
112
107
|
children: item
|
|
113
|
-
},
|
|
108
|
+
}, `item-${item}-${index}`);
|
|
114
109
|
};
|
|
115
110
|
}
|
|
116
111
|
render() {
|
|
@@ -122,11 +117,11 @@ class CustomKeyboard extends React.Component {
|
|
|
122
117
|
wrapProps,
|
|
123
118
|
header
|
|
124
119
|
} = this.props;
|
|
125
|
-
const wrapperCls = (0, _classnames.default)(
|
|
126
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div",
|
|
120
|
+
const wrapperCls = (0, _classnames.default)(`${prefixCls}-wrapper`, `${prefixCls}-wrapper-hide`);
|
|
121
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
127
122
|
className: wrapperCls,
|
|
128
|
-
ref: el => this.antmKeyboard = el
|
|
129
|
-
|
|
123
|
+
ref: el => this.antmKeyboard = el,
|
|
124
|
+
...wrapProps,
|
|
130
125
|
children: [header && /*#__PURE__*/React.cloneElement(header, {
|
|
131
126
|
onClick: this.onKeyboardClick
|
|
132
127
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("table", {
|
|
@@ -134,11 +129,12 @@ class CustomKeyboard extends React.Component {
|
|
|
134
129
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("tr", {
|
|
135
130
|
children: [['1', '2', '3'].map((item, index) =>
|
|
136
131
|
// tslint:disable-next-line:jsx-no-multiline-js
|
|
137
|
-
this.renderKeyboardItem(item, index)), /*#__PURE__*/(0, _jsxRuntime.jsx)(KeyboardItem,
|
|
132
|
+
this.renderKeyboardItem(item, index)), /*#__PURE__*/(0, _jsxRuntime.jsx)(KeyboardItem, {
|
|
138
133
|
className: "keyboard-delete",
|
|
139
134
|
rowSpan: 2,
|
|
140
|
-
onClick: this.onKeyboardClick
|
|
141
|
-
|
|
135
|
+
onClick: this.onKeyboardClick,
|
|
136
|
+
...this.getAriaAttr(backspaceLabel)
|
|
137
|
+
})]
|
|
142
138
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("tr", {
|
|
143
139
|
children: ['4', '5', '6'].map((item, index) =>
|
|
144
140
|
// tslint:disable-next-line:jsx-no-multiline-js
|
|
@@ -156,14 +152,15 @@ class CustomKeyboard extends React.Component {
|
|
|
156
152
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("tr", {
|
|
157
153
|
children: [['.', '0'].map((item, index) =>
|
|
158
154
|
// tslint:disable-next-line:jsx-no-multiline-js
|
|
159
|
-
this.renderKeyboardItem(item, index)), /*#__PURE__*/(0, _jsxRuntime.jsx)(KeyboardItem,
|
|
155
|
+
this.renderKeyboardItem(item, index)), /*#__PURE__*/(0, _jsxRuntime.jsx)(KeyboardItem, {
|
|
160
156
|
className: "keyboard-hide",
|
|
161
|
-
onClick: this.onKeyboardClick
|
|
162
|
-
|
|
157
|
+
onClick: this.onKeyboardClick,
|
|
158
|
+
...this.getAriaAttr(cancelKeyboardLabel)
|
|
159
|
+
})]
|
|
163
160
|
})]
|
|
164
161
|
})
|
|
165
162
|
})]
|
|
166
|
-
})
|
|
163
|
+
});
|
|
167
164
|
}
|
|
168
165
|
getAriaAttr(label) {
|
|
169
166
|
if (_exenv.IS_IOS) {
|