dtable-ui-component 6.0.103 → 6.0.105
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 +35 -42
- package/lib/ActivityIndicator/index.js +9 -9
- package/lib/AsyncUserSelect/index.js +3 -3
- package/lib/Badge/index.js +31 -27
- package/lib/CheckboxEditor/index.js +14 -15
- package/lib/CollaboratorEditor/index.js +15 -16
- 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 +9 -7
- 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 +6 -8
- package/lib/DTableColorPicker/index.js +12 -13
- 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/select-option-group.js +1 -1
- package/lib/DTableIcon/index.js +4 -4
- package/lib/DTableIcon/svg-icon.js +4 -4
- package/lib/DTableModalHeader/index.js +8 -6
- package/lib/DTableRadioGroup/index.js +3 -3
- package/lib/DTableSelect/dtable-select-label.js +1 -1
- package/lib/DTableSelect/utils.js +36 -55
- package/lib/DateEditor/index.js +10 -13
- 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 +2 -5
- package/lib/DepartmentSingleSelectEditor/index.js +14 -15
- 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 +14 -15
- package/lib/DigitalSignEditor/mb-editor/index.js +4 -4
- package/lib/DigitalSignEditor/pc-editor/index.js +6 -7
- 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 +2 -3
- package/lib/FieldDisplaySetting/field-item.js +1 -1
- package/lib/FieldDisplaySetting/index.js +9 -11
- package/lib/FileEditor/files-previewer/index.js +14 -15
- 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 +14 -15
- 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 +2 -1
- package/lib/FileItemFormatter/index.js +1 -1
- package/lib/FileUploader/index.js +1 -1
- package/lib/FormulaFormatter/index.js +9 -15
- package/lib/GeolocationEditor/index.js +19 -23
- package/lib/GeolocationEditor/map-editor-utils.js +6 -10
- package/lib/GeolocationEditor/mb-editor/index.js +24 -27
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +6 -9
- package/lib/GeolocationEditor/pc-editor/country-editor.js +2 -2
- package/lib/GeolocationEditor/pc-editor/index.js +15 -21
- package/lib/GeolocationEditor/pc-editor/location-editor.js +2 -2
- package/lib/GeolocationEditor/pc-editor/map-editor/index.js +9 -13
- package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +6 -9
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +7 -24
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +3 -20
- 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 +17 -13
- package/lib/Icon/load-sprite.js +2 -13
- package/lib/IconButton/index.js +14 -11
- package/lib/ImageEditor/images-previewer/image-preview/index.js +1 -1
- package/lib/ImageEditor/index.js +14 -15
- 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/ImageThumbnail/index.js +2 -2
- package/lib/InputItem/custom-input.js +9 -9
- package/lib/InputItem/custom-keyboard.js +37 -34
- package/lib/InputItem/index.js +49 -52
- package/lib/InputItem/input.js +13 -9
- package/lib/LinkEditor/pc-popover/index.js +2 -3
- package/lib/List/index.js +21 -17
- package/lib/List/list-item.js +52 -50
- 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 +10 -7
- package/lib/Modal/alert.js +2 -2
- package/lib/Modal/modal.js +31 -28
- package/lib/Modal/prompt.js +10 -10
- package/lib/MultipleSelectEditor/index.js +8 -6
- package/lib/MultipleSelectFormatter/index.js +1 -1
- package/lib/PhoneNumberLink/index.js +1 -1
- package/lib/Picker/AbstractPicker.js +28 -26
- package/lib/Popover/index.js +12 -9
- package/lib/Popover/item.js +26 -22
- package/lib/Progress/index.js +8 -10
- package/lib/Radio/Radio.js +15 -13
- 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 +6 -7
- package/lib/RowExpandDialog/body/index.js +14 -14
- package/lib/RowExpandDialog/column-content/index.js +1 -1
- package/lib/RowExpandDialog/header/index.js +3 -4
- package/lib/RowExpandDialog/index.js +32 -43
- package/lib/RowExpandEditor/add-btn/index.js +6 -7
- package/lib/RowExpandEditor/checkbox-editor/index.js +6 -7
- package/lib/RowExpandEditor/collaborator-editor/index.js +6 -7
- package/lib/RowExpandEditor/date-editor/index.js +6 -7
- package/lib/RowExpandEditor/department-editor/index.js +6 -7
- package/lib/RowExpandEditor/digital-sign-editor/index.js +6 -7
- 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 +6 -7
- package/lib/RowExpandEditor/email-editor/index.js +6 -7
- 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 +6 -7
- package/lib/RowExpandEditor/geolocation-editor/index.js +6 -7
- package/lib/RowExpandEditor/image-editor/index.js +6 -7
- 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 +10 -11
- package/lib/RowExpandEditor/long-text-editor/index.js +6 -7
- package/lib/RowExpandEditor/multiple-select-editor/index.js +6 -7
- 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 +6 -7
- package/lib/RowExpandEditor/rate-editor/index.js +6 -7
- 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 +6 -7
- 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 +6 -7
- package/lib/RowExpandEditor/url-editor/index.js +6 -7
- 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 +3 -6
- 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 +11 -17
- package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +2 -2
- package/lib/RowExpandFormatter/index.js +7 -11
- 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 +15 -13
- package/lib/RowExpandView/index.js +28 -39
- 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 +8 -6
- package/lib/TabBar/Tab.js +10 -10
- package/lib/TabBar/index.js +6 -7
- package/lib/Tabs/index.js +9 -10
- package/lib/TextareaItem/index.js +45 -43
- package/lib/Toast/index.js +5 -5
- package/lib/formatterConfig/index.js +3 -3
- package/lib/select-editor/index.js +14 -15
- 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 +15 -12
- package/lib/toaster/toaster.js +9 -12
- package/lib/utils/class.js +3 -3
- package/lib/utils/departments.js +4 -3
- package/lib/utils/getLocale.js +5 -11
- package/lib/utils/object-utils.js +5 -5
- package/lib/utils/url.js +4 -4
- package/package.json +3 -4
package/lib/utils/departments.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.searchDepartments = exports.getNormalizedDepartments = void 0;
|
|
8
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
7
9
|
const searchDepartments = (departments, searchValue) => {
|
|
8
10
|
const validSearchValue = searchValue ? searchValue.trim().toLowerCase() : '';
|
|
9
11
|
const validDepartments = Array.isArray(departments) ? departments : [];
|
|
@@ -27,11 +29,10 @@ const getNormalizedDepartments = function (departments) {
|
|
|
27
29
|
return departments.map(depart => {
|
|
28
30
|
const hasChild = canExpand && !!parentIdMap[depart.id];
|
|
29
31
|
const isExpanded = depart.parent_id === -1 ? true : false;
|
|
30
|
-
return {
|
|
31
|
-
...depart,
|
|
32
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, depart), {}, {
|
|
32
33
|
hasChild,
|
|
33
34
|
isExpanded
|
|
34
|
-
};
|
|
35
|
+
});
|
|
35
36
|
});
|
|
36
37
|
};
|
|
37
38
|
exports.getNormalizedDepartments = getNormalizedDepartments;
|
package/lib/utils/getLocale.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.getComponentLocale = getComponentLocale;
|
|
7
8
|
exports.getLocaleCode = getLocaleCode;
|
|
9
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
8
10
|
function getComponentLocale(props, context, componentName, getDefaultLocale) {
|
|
9
11
|
let locale = {};
|
|
10
12
|
if (context && context.antLocale && context.antLocale[componentName]) {
|
|
@@ -15,19 +17,11 @@ function getComponentLocale(props, context, componentName, getDefaultLocale) {
|
|
|
15
17
|
// https://github.com/ant-design/ant-design/issues/6334
|
|
16
18
|
locale = defaultLocale.default || defaultLocale;
|
|
17
19
|
}
|
|
18
|
-
let result = {
|
|
19
|
-
...locale
|
|
20
|
-
};
|
|
20
|
+
let result = (0, _objectSpread2.default)({}, locale);
|
|
21
21
|
if (props.locale) {
|
|
22
|
-
result = {
|
|
23
|
-
...result,
|
|
24
|
-
...props.locale
|
|
25
|
-
};
|
|
22
|
+
result = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, result), props.locale);
|
|
26
23
|
if (props.locale.lang) {
|
|
27
|
-
result.lang = {
|
|
28
|
-
...locale.lang,
|
|
29
|
-
...props.locale.lang
|
|
30
|
-
};
|
|
24
|
+
result.lang = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, locale.lang), props.locale.lang);
|
|
31
25
|
}
|
|
32
26
|
}
|
|
33
27
|
return result;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.shallowCloneObject = exports.hasOwnProperty = exports.default = void 0;
|
|
8
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
7
9
|
class ObjectUtils {
|
|
8
10
|
static getDataType(data) {
|
|
9
11
|
let type = typeof data;
|
|
@@ -17,16 +19,13 @@ class ObjectUtils {
|
|
|
17
19
|
}
|
|
18
20
|
static isObjectChanged(source, comparison) {
|
|
19
21
|
if (!this.iterable(source)) {
|
|
20
|
-
throw new Error(
|
|
22
|
+
throw new Error("source should be a Object or Array , but got ".concat(this.getDataType(source)));
|
|
21
23
|
}
|
|
22
24
|
if (this.getDataType(source) !== this.getDataType(comparison)) {
|
|
23
25
|
return true;
|
|
24
26
|
}
|
|
25
27
|
const sourceKeys = Object.keys(source);
|
|
26
|
-
const comparisonKeys = Object.keys({
|
|
27
|
-
...source,
|
|
28
|
-
...comparison
|
|
29
|
-
});
|
|
28
|
+
const comparisonKeys = Object.keys((0, _objectSpread2.default)((0, _objectSpread2.default)({}, source), comparison));
|
|
30
29
|
if (sourceKeys.length !== comparisonKeys.length) {
|
|
31
30
|
return true;
|
|
32
31
|
}
|
|
@@ -50,6 +49,7 @@ const hasOwnProperty = (obj, propertyKey) => {
|
|
|
50
49
|
exports.hasOwnProperty = hasOwnProperty;
|
|
51
50
|
const shallowCloneObject = obj => {
|
|
52
51
|
const result = {};
|
|
52
|
+
// eslint-disable-next-line
|
|
53
53
|
for (const k in obj) {
|
|
54
54
|
if (Object.prototype.hasOwnProperty.call(obj, k)) {
|
|
55
55
|
result[k] = obj[k];
|
package/lib/utils/url.js
CHANGED
|
@@ -80,9 +80,9 @@ const generateCurrentBaseImageThumbnailUrl = _ref => {
|
|
|
80
80
|
} = _ref;
|
|
81
81
|
const validServer = server || ((_window2 = window) === null || _window2 === void 0 ? void 0 : _window2.dtable) && window.dtable.server || '';
|
|
82
82
|
if (!partUrl || typeof partUrl !== 'string') return '';
|
|
83
|
-
let url =
|
|
84
|
-
if (url.indexOf('?') > -1) return
|
|
85
|
-
return
|
|
83
|
+
let url = "".concat(validServer, "/thumbnail/workspace/").concat(workspaceID, "/asset/").concat(dtableUuid).concat(partUrl);
|
|
84
|
+
if (url.indexOf('?') > -1) return "".concat(url, "&size=").concat(size);
|
|
85
|
+
return "".concat(url, "?size=").concat(size);
|
|
86
86
|
};
|
|
87
87
|
exports.generateCurrentBaseImageThumbnailUrl = generateCurrentBaseImageThumbnailUrl;
|
|
88
88
|
const generateCurrentBaseImageUrl = _ref2 => {
|
|
@@ -96,7 +96,7 @@ const generateCurrentBaseImageUrl = _ref2 => {
|
|
|
96
96
|
if (!partUrl || typeof partUrl !== 'string') return '';
|
|
97
97
|
if (partUrl.startsWith('http')) return partUrl;
|
|
98
98
|
const validServer = server || ((_window3 = window) === null || _window3 === void 0 ? void 0 : _window3.dtable) && window.dtable.server || '';
|
|
99
|
-
return
|
|
99
|
+
return "".concat(validServer, "/workspace/").concat(workspaceID, "/asset/").concat(dtableUuid).concat(partUrl);
|
|
100
100
|
};
|
|
101
101
|
exports.generateCurrentBaseImageUrl = generateCurrentBaseImageUrl;
|
|
102
102
|
const getImageThumbnailUrl = function (url) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dtable-ui-component",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.105",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@seafile/react-image-lightbox": "4.0.2",
|
|
@@ -87,7 +87,6 @@
|
|
|
87
87
|
"babel-plugin-import": "^1.13.6",
|
|
88
88
|
"babel-plugin-named-asset-import": "^0.3.6",
|
|
89
89
|
"babel-preset-react-app": "^10.0.1",
|
|
90
|
-
"bfj": "^7.0.2",
|
|
91
90
|
"browserslist": "^4.18.1",
|
|
92
91
|
"camelcase": "^6.2.1",
|
|
93
92
|
"case-sensitive-paths-webpack-plugin": "^2.4.0",
|
|
@@ -130,12 +129,12 @@
|
|
|
130
129
|
"sass-loader": "^12.3.0",
|
|
131
130
|
"semver": "^7.3.5",
|
|
132
131
|
"source-map-loader": "^3.0.0",
|
|
133
|
-
"storybook": "^9.1.
|
|
132
|
+
"storybook": "^9.1.19",
|
|
134
133
|
"style-loader": "^3.3.1",
|
|
135
134
|
"terser-webpack-plugin": "^5.2.5",
|
|
136
135
|
"url-loader": "^4.1.1",
|
|
137
136
|
"web-vitals": "2.1.4",
|
|
138
|
-
"webpack": "^5.
|
|
137
|
+
"webpack": "^5.105.0",
|
|
139
138
|
"webpack-dev-server": "^5.2.2",
|
|
140
139
|
"webpack-manifest-plugin": "^4.0.2",
|
|
141
140
|
"workbox-webpack-plugin": "^6.4.1",
|