dtable-ui-component 6.0.53 → 6.0.55-beta.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 +21 -21
- package/lib/ActivityIndicator/index.js +9 -9
- package/lib/AsyncUserSelect/index.js +3 -3
- package/lib/Badge/index.js +10 -10
- package/lib/CheckboxEditor/mb-editor.js +2 -10
- package/lib/CheckboxEditor/pc-editor.js +2 -10
- package/lib/CheckboxFormatter/index.js +4 -13
- 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/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 +4 -4
- package/lib/DTableColorPicker/index.js +6 -6
- package/lib/DTableColorPicker/utils.js +1 -1
- package/lib/DTableColumnIcon/index.js +71 -0
- package/lib/DTableCommonAddTool/index.js +2 -2
- package/lib/DTableFiltersPopover/index.js +1 -1
- package/lib/DTableFiltersPopover/utils/filter-item-utils.js +7 -4
- package/lib/DTableFiltersPopover/utils/index.js +92 -27
- package/lib/DTableFiltersPopover/widgets/filter-group.js +2 -2
- package/lib/DTableFiltersPopover/widgets/filter-item.js +2 -2
- package/lib/DTableFiltersPopover/widgets/filter-list/index.js +1 -1
- package/lib/DTableFiltersPopover/widgets/rate-item.js +2 -2
- package/lib/DTableGroupSelect/select-option-group.js +1 -1
- package/lib/{SvgIcon → DTableIcon}/index.css +2 -2
- package/lib/DTableIcon/index.js +44 -0
- package/lib/DTableIcon/svg-icon.js +56 -0
- package/lib/DTableRadioGroup/index.js +3 -3
- package/lib/DTableSearchInput/index.js +1 -1
- package/lib/DTableSelect/dtable-select-label.js +1 -1
- package/lib/DTableSwitch/index.css +1 -1
- package/lib/DTableSwitch/index.js +4 -1
- package/lib/DateEditor/pc-editor.js +1 -1
- package/lib/DatePicker/utils.js +4 -4
- package/lib/DepartmentMultipleSelectEditor/index.js +3 -3
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +2 -2
- package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +2 -2
- 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/FieldDisplaySetting/field-item.js +9 -4
- package/lib/FieldDisplaySetting/index.js +6 -6
- 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/pc-editor/addition-previewer/index.js +1 -1
- package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +6 -6
- 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 +4 -4
- package/lib/GeolocationEditor/index.js +3 -3
- package/lib/GeolocationEditor/map-editor-utils.js +2 -2
- package/lib/GeolocationEditor/pc-editor/country-editor.js +2 -2
- package/lib/GeolocationEditor/pc-editor/location-editor.js +2 -2
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +20 -3
- 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 +3 -3
- package/lib/GeolocationEditor/pc-editor/selector-list.js +1 -1
- package/lib/HtmlLongTextFormatter/index.js +1 -1
- package/lib/Icon/index.js +2 -2
- package/lib/Icon/load-sprite.js +13 -2
- package/lib/IconButton/index.js +1 -1
- package/lib/ImageEditor/images-previewer/image-preview/index.js +1 -1
- 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 +5 -5
- package/lib/InputItem/index.js +21 -21
- package/lib/List/index.js +3 -3
- package/lib/List/list-item.js +23 -23
- 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/Modal/alert.js +3 -3
- package/lib/Modal/modal.js +8 -8
- package/lib/Modal/operation.js +1 -1
- package/lib/Modal/prompt.js +11 -11
- package/lib/MultipleSelectFormatter/index.js +1 -1
- package/lib/Popover/index.js +1 -1
- package/lib/Popover/item.js +7 -7
- package/lib/Progress/index.js +6 -6
- package/lib/Radio/Radio.js +1 -1
- package/lib/Radio/RadioItem.js +2 -2
- package/lib/RateFormatter/index.js +3 -3
- package/lib/RoleStatusEditor/index.js +1 -1
- package/lib/RowExpandDialog/body/index.js +1 -1
- package/lib/RowExpandDialog/column-content/index.js +7 -4
- package/lib/RowExpandDialog/header/index.js +1 -1
- package/lib/RowExpandDialog/index.js +3 -3
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +1 -1
- package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +1 -1
- 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/image-editor/mb-editor/index.js +1 -1
- package/lib/RowExpandEditor/image-editor/pc-editor/index.js +1 -1
- 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/rate-editor/mb-editor.js +1 -1
- package/lib/RowExpandEditor/rate-editor/pc-editor.js +2 -2
- package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +3 -3
- package/lib/RowExpandEditor/url-editor/mb-editor/index.js +1 -1
- package/lib/RowExpandEditor/url-editor/pc-editor/index.js +1 -1
- 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 +7 -7
- package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +2 -2
- package/lib/RowExpandFormatter/index.js +1 -1
- 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 +3 -3
- package/lib/RowExpandFormatter/url-formatter/index.js +1 -1
- package/lib/RowExpandView/body/index.js +1 -1
- package/lib/SelectOptionGroup/index.js +1 -1
- package/lib/SelectedDepartments/index.js +3 -3
- package/lib/SimpleLongTextFormatter/index.js +2 -2
- package/lib/TabBar/Tab.js +6 -6
- package/lib/TabBar/index.js +3 -3
- package/lib/TextareaItem/index.js +19 -19
- package/lib/Toast/index.js +5 -5
- package/lib/assets/icons/telephone.svg +14 -0
- package/lib/index.js +14 -7
- package/lib/select-editor/pc-editor/index.js +2 -2
- package/lib/toaster/alert.js +1 -1
- package/lib/toaster/toast.js +1 -1
- package/lib/toaster/toastManager.js +1 -1
- package/lib/toaster/toaster.js +7 -4
- package/lib/utils/class.js +3 -3
- package/lib/utils/object-utils.js +1 -1
- package/lib/utils/url.js +4 -4
- package/package.json +14 -30
- package/lib/SvgIcon/index.js +0 -38
|
@@ -35,7 +35,7 @@ class TextareaItem extends React.Component {
|
|
|
35
35
|
this.reAlignHeight = () => {
|
|
36
36
|
const textareaDom = this.textareaRef;
|
|
37
37
|
textareaDom.style.height = ''; // 字数减少时能自动减小高度
|
|
38
|
-
textareaDom.style.height =
|
|
38
|
+
textareaDom.style.height = `${textareaDom.scrollHeight}px`;
|
|
39
39
|
};
|
|
40
40
|
this.onChange = e => {
|
|
41
41
|
const value = e.target.value;
|
|
@@ -158,20 +158,20 @@ class TextareaItem extends React.Component {
|
|
|
158
158
|
focus
|
|
159
159
|
} = this.state;
|
|
160
160
|
const hasCount = count > 0 && this.props.rows > 1;
|
|
161
|
-
const wrapCls = (0, _classnames.default)(className,
|
|
162
|
-
[
|
|
163
|
-
[
|
|
164
|
-
[
|
|
165
|
-
[
|
|
166
|
-
[
|
|
161
|
+
const wrapCls = (0, _classnames.default)(className, `${prefixListCls}-item`, `${prefixCls}-item`, {
|
|
162
|
+
[`${prefixCls}-disabled`]: disabled,
|
|
163
|
+
[`${prefixCls}-item-single-line`]: this.props.rows === 1 && !autoHeight,
|
|
164
|
+
[`${prefixCls}-error`]: error,
|
|
165
|
+
[`${prefixCls}-focus`]: focus,
|
|
166
|
+
[`${prefixCls}-has-count`]: hasCount
|
|
167
167
|
});
|
|
168
|
-
const labelCls = (0, _classnames.default)(
|
|
169
|
-
[
|
|
170
|
-
[
|
|
171
|
-
[
|
|
172
|
-
[
|
|
173
|
-
[
|
|
174
|
-
[
|
|
168
|
+
const labelCls = (0, _classnames.default)(`${prefixCls}-label`, {
|
|
169
|
+
[`${prefixCls}-label-2`]: labelNumber === 2,
|
|
170
|
+
[`${prefixCls}-label-3`]: labelNumber === 3,
|
|
171
|
+
[`${prefixCls}-label-4`]: labelNumber === 4,
|
|
172
|
+
[`${prefixCls}-label-5`]: labelNumber === 5,
|
|
173
|
+
[`${prefixCls}-label-6`]: labelNumber === 6,
|
|
174
|
+
[`${prefixCls}-label-7`]: labelNumber === 7
|
|
175
175
|
});
|
|
176
176
|
const characterLength = countSymbols(value);
|
|
177
177
|
const lengthCtrlProps = {};
|
|
@@ -191,7 +191,7 @@ class TextareaItem extends React.Component {
|
|
|
191
191
|
className: labelCls,
|
|
192
192
|
children: title
|
|
193
193
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
194
|
-
className:
|
|
194
|
+
className: `${prefixCls}-control`,
|
|
195
195
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("textarea", {
|
|
196
196
|
ref: el => this.textareaRef = el,
|
|
197
197
|
...lengthCtrlProps,
|
|
@@ -204,16 +204,16 @@ class TextareaItem extends React.Component {
|
|
|
204
204
|
style: style
|
|
205
205
|
})
|
|
206
206
|
}), clear && editable && value && characterLength > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcFeedback.default, {
|
|
207
|
-
activeClassName:
|
|
207
|
+
activeClassName: `${prefixCls}-clear-active`,
|
|
208
208
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
209
|
-
className:
|
|
209
|
+
className: `${prefixCls}-clear`,
|
|
210
210
|
onClick: this.clearInput
|
|
211
211
|
})
|
|
212
212
|
}), error && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
213
|
-
className:
|
|
213
|
+
className: `${prefixCls}-error-extra`,
|
|
214
214
|
onClick: this.onErrorClick
|
|
215
215
|
}), hasCount && /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
216
|
-
className:
|
|
216
|
+
className: `${prefixCls}-count`,
|
|
217
217
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
218
218
|
children: value ? characterLength : 0
|
|
219
219
|
}), "/", count]
|
package/lib/Toast/index.js
CHANGED
|
@@ -27,8 +27,8 @@ function getMessageInstance(mask, callback) {
|
|
|
27
27
|
// clear rmc-notification default style
|
|
28
28
|
transitionName: 'am-fade',
|
|
29
29
|
className: (0, _classnames.default)({
|
|
30
|
-
[
|
|
31
|
-
[
|
|
30
|
+
[`${prefixCls}-mask`]: mask,
|
|
31
|
+
[`${prefixCls}-nomask`]: !mask
|
|
32
32
|
})
|
|
33
33
|
}, notification => callback && callback(notification));
|
|
34
34
|
}
|
|
@@ -63,18 +63,18 @@ function notice(content, type) {
|
|
|
63
63
|
duration,
|
|
64
64
|
style: {},
|
|
65
65
|
content: iconType ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
66
|
-
className:
|
|
66
|
+
className: `${prefixCls}-text ${prefixCls}-text-icon`,
|
|
67
67
|
role: "alert",
|
|
68
68
|
"aria-live": "assertive",
|
|
69
69
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
|
|
70
70
|
type: iconType,
|
|
71
71
|
size: "lg"
|
|
72
72
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
73
|
-
className:
|
|
73
|
+
className: `${prefixCls}-text-info`,
|
|
74
74
|
children: content
|
|
75
75
|
})]
|
|
76
76
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
77
|
-
className:
|
|
77
|
+
className: `${prefixCls}-text`,
|
|
78
78
|
role: "alert",
|
|
79
79
|
"aria-live": "assertive",
|
|
80
80
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
4
|
+
viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;" xml:space="preserve">
|
|
5
|
+
<style type="text/css">
|
|
6
|
+
.st0{fill:#999999;}
|
|
7
|
+
</style>
|
|
8
|
+
<title>telephone</title>
|
|
9
|
+
<g id="telephone">
|
|
10
|
+
<path id="路径" class="st0" d="M24.2,31C11.4,31,1.1,20.7,1.1,7.9C1.1,4.1,4.2,1,7.9,1c0.7,0,1.7,0.1,2.2,0.4
|
|
11
|
+
c0.4,0.2,0.9,0.6,1,1.1l2.1,9c0.1,0.5,0,1.1-0.3,1.4c-0.2,0.2-0.5,0.3-2.2,1.2c1.5,3.2,4,5.8,7.3,7.3c0.9-1.9,1-1.9,1.2-2.1
|
|
12
|
+
c0.4-0.4,0.8-0.5,1.4-0.4c5.7,1.3,8.7,2,9,2.1c0.5,0.1,0.8,0.5,1,0.9c0.2,0.5,0.4,1.5,0.4,2.2C31,28,27.9,31,24.2,31z"/>
|
|
13
|
+
</g>
|
|
14
|
+
</svg>
|
package/lib/index.js
CHANGED
|
@@ -100,6 +100,12 @@ Object.defineProperty(exports, "DTableColorPicker", {
|
|
|
100
100
|
return _DTableColorPicker.default;
|
|
101
101
|
}
|
|
102
102
|
});
|
|
103
|
+
Object.defineProperty(exports, "DTableColumnIcon", {
|
|
104
|
+
enumerable: true,
|
|
105
|
+
get: function () {
|
|
106
|
+
return _DTableColumnIcon.default;
|
|
107
|
+
}
|
|
108
|
+
});
|
|
103
109
|
Object.defineProperty(exports, "DTableCommonAddTool", {
|
|
104
110
|
enumerable: true,
|
|
105
111
|
get: function () {
|
|
@@ -142,6 +148,12 @@ Object.defineProperty(exports, "DTableGroupSelect", {
|
|
|
142
148
|
return _index.default;
|
|
143
149
|
}
|
|
144
150
|
});
|
|
151
|
+
Object.defineProperty(exports, "DTableIcon", {
|
|
152
|
+
enumerable: true,
|
|
153
|
+
get: function () {
|
|
154
|
+
return _DTableIcon.default;
|
|
155
|
+
}
|
|
156
|
+
});
|
|
145
157
|
Object.defineProperty(exports, "DTableModalHeader", {
|
|
146
158
|
enumerable: true,
|
|
147
159
|
get: function () {
|
|
@@ -550,12 +562,6 @@ Object.defineProperty(exports, "SingleSelectFormatter", {
|
|
|
550
562
|
return _SingleSelectFormatter.default;
|
|
551
563
|
}
|
|
552
564
|
});
|
|
553
|
-
Object.defineProperty(exports, "SvgIcon", {
|
|
554
|
-
enumerable: true,
|
|
555
|
-
get: function () {
|
|
556
|
-
return _SvgIcon.default;
|
|
557
|
-
}
|
|
558
|
-
});
|
|
559
565
|
Object.defineProperty(exports, "TabBar", {
|
|
560
566
|
enumerable: true,
|
|
561
567
|
get: function () {
|
|
@@ -695,7 +701,8 @@ var _DTableRadioGroup = _interopRequireDefault(require("./DTableRadioGroup"));
|
|
|
695
701
|
var _DTableEmptyTip = _interopRequireDefault(require("./DTableEmptyTip"));
|
|
696
702
|
var _IconButton = _interopRequireDefault(require("./IconButton"));
|
|
697
703
|
var _UploadProgress = _interopRequireDefault(require("./UploadProgress"));
|
|
698
|
-
var
|
|
704
|
+
var _DTableIcon = _interopRequireDefault(require("./DTableIcon"));
|
|
705
|
+
var _DTableColumnIcon = _interopRequireDefault(require("./DTableColumnIcon"));
|
|
699
706
|
var _AsyncUserSelect = _interopRequireDefault(require("./AsyncUserSelect"));
|
|
700
707
|
var _ActionSheet = _interopRequireDefault(require("./ActionSheet"));
|
|
701
708
|
var _ActivityIndicator = _interopRequireDefault(require("./ActivityIndicator"));
|
|
@@ -221,7 +221,7 @@ class PCSelectEditor extends _react.default.Component {
|
|
|
221
221
|
let maxWidth = isInModal ? 250 : (column === null || column === void 0 ? void 0 : column.width) > 200 ? column.width - 62 : 138;
|
|
222
222
|
const dom = /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
223
223
|
className: (0, _classnames.default)('dtable-ui-editor-container dtable-ui-select-editor-container', className, {
|
|
224
|
-
[
|
|
224
|
+
[`${classNamePrefix}-select-editor-container`]: classNamePrefix
|
|
225
225
|
}),
|
|
226
226
|
ref: ref => this.ref = ref,
|
|
227
227
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -292,7 +292,7 @@ class PCSelectEditor extends _react.default.Component {
|
|
|
292
292
|
hideArrow: true,
|
|
293
293
|
fade: false,
|
|
294
294
|
className: (0, _classnames.default)('dtable-ui dtable-ui-row-expand-select-editor-popover', {
|
|
295
|
-
[
|
|
295
|
+
[`${classNamePrefix}-select-editor-popover`]: classNamePrefix
|
|
296
296
|
}),
|
|
297
297
|
children: dom
|
|
298
298
|
})
|
package/lib/toaster/alert.js
CHANGED
|
@@ -32,7 +32,7 @@ class Alert extends _react.default.PureComponent {
|
|
|
32
32
|
} = this.props;
|
|
33
33
|
const iconClass = this.getIconClass(intent);
|
|
34
34
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
35
|
-
className:
|
|
35
|
+
className: `dtable-toast-alert-container ${intent || 'success'}`,
|
|
36
36
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
37
37
|
className: "toast-alert-icon",
|
|
38
38
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
package/lib/toaster/toast.js
CHANGED
|
@@ -84,7 +84,7 @@ class Toast extends _react.default.PureComponent {
|
|
|
84
84
|
onExited: this.props.onRemove,
|
|
85
85
|
children: state => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
86
86
|
"data-state": state,
|
|
87
|
-
className:
|
|
87
|
+
className: `dtable-toast-container ${state}`,
|
|
88
88
|
onMouseEnter: this.handleMouseEnter,
|
|
89
89
|
onMouseLeave: this.handleMouseLeave,
|
|
90
90
|
style: {
|
|
@@ -38,7 +38,7 @@ class ToastManager extends _react.default.PureComponent {
|
|
|
38
38
|
};
|
|
39
39
|
this.createToastInstance = (title, settings) => {
|
|
40
40
|
const uniqueId = ++ToastManager.idCounter;
|
|
41
|
-
const id = hasCustomId(settings) ?
|
|
41
|
+
const id = hasCustomId(settings) ? `${settings.id}-${uniqueId}` : uniqueId;
|
|
42
42
|
let hasCloseButton = settings.hasCloseButton || true;
|
|
43
43
|
let duration = settings.duration || 2;
|
|
44
44
|
if (settings.hasCloseButton !== undefined) {
|
package/lib/toaster/toaster.js
CHANGED
|
@@ -63,11 +63,14 @@ class Toaster {
|
|
|
63
63
|
});
|
|
64
64
|
};
|
|
65
65
|
if (!isBrowser) return;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
let container = document.querySelector('[data-evergreen-toaster-container]');
|
|
67
|
+
if (!container) {
|
|
68
|
+
container = document.createElement('div');
|
|
69
|
+
container.setAttribute('data-evergreen-toaster-container', '');
|
|
70
|
+
document.body.appendChild(container);
|
|
71
|
+
}
|
|
69
72
|
const root = (0, _client.createRoot)(container);
|
|
70
|
-
root.render(
|
|
73
|
+
root.render(/*#__PURE__*/(0, _jsxRuntime.jsx)(_toastManager.default, {
|
|
71
74
|
bindNotify: this._bindNotify,
|
|
72
75
|
bindGetToasts: this._bindGetToasts,
|
|
73
76
|
bindCloseAll: this._bindCloseAll
|
package/lib/utils/class.js
CHANGED
|
@@ -11,14 +11,14 @@ function hasClass(node, className) {
|
|
|
11
11
|
return node.classList.contains(className);
|
|
12
12
|
}
|
|
13
13
|
const originClass = node.className;
|
|
14
|
-
return
|
|
14
|
+
return ` ${originClass} `.indexOf(` ${className} `) > -1;
|
|
15
15
|
}
|
|
16
16
|
function addClass(node, className) {
|
|
17
17
|
if (node.classList) {
|
|
18
18
|
node.classList.add(className);
|
|
19
19
|
} else {
|
|
20
20
|
if (!hasClass(node, className)) {
|
|
21
|
-
node.className =
|
|
21
|
+
node.className = `${node.className} ${className}`;
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -28,7 +28,7 @@ function removeClass(node, className) {
|
|
|
28
28
|
} else {
|
|
29
29
|
if (hasClass(node, className)) {
|
|
30
30
|
const originClass = node.className;
|
|
31
|
-
node.className =
|
|
31
|
+
node.className = ` ${originClass} `.replace(` ${className} `, '');
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -17,7 +17,7 @@ class ObjectUtils {
|
|
|
17
17
|
}
|
|
18
18
|
static isObjectChanged(source, comparison) {
|
|
19
19
|
if (!this.iterable(source)) {
|
|
20
|
-
throw new Error(
|
|
20
|
+
throw new Error(`source should be a Object or Array , but got ${this.getDataType(source)}`);
|
|
21
21
|
}
|
|
22
22
|
if (this.getDataType(source) !== this.getDataType(comparison)) {
|
|
23
23
|
return true;
|
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 = `${validServer}/thumbnail/workspace/${workspaceID}/asset/${dtableUuid}${partUrl}`;
|
|
84
|
+
if (url.indexOf('?') > -1) return `${url}&size=${size}`;
|
|
85
|
+
return `${url}?size=${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 `${validServer}/workspace/${workspaceID}/asset/${dtableUuid}${partUrl}`;
|
|
100
100
|
};
|
|
101
101
|
exports.generateCurrentBaseImageUrl = generateCurrentBaseImageUrl;
|
|
102
102
|
const getImageThumbnailUrl = function (url) {
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dtable-ui-component",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.55-beta.1",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@seafile/react-image-lightbox": "4.0.2",
|
|
7
|
-
"@seafile/seafile-calendar": "0.0.
|
|
7
|
+
"@seafile/seafile-calendar": "~0.0.32",
|
|
8
8
|
"@seafile/seafile-editor": "~2.0.14",
|
|
9
9
|
"classnames": "~2.5.*",
|
|
10
10
|
"dayjs": "1.10.7",
|
|
11
|
-
"dtable-utils": "~5.0.
|
|
11
|
+
"dtable-utils": "~5.0.26-beta.1",
|
|
12
12
|
"is-hotkey": "0.2.0",
|
|
13
13
|
"rc-checkbox": "3.5.0",
|
|
14
14
|
"react-color": "2.19.3",
|
|
@@ -67,32 +67,21 @@
|
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@babel/cli": "7.22.15",
|
|
69
69
|
"@babel/core": "^7.16.0",
|
|
70
|
-
"@babel/eslint-parser": "^7.16.3",
|
|
71
70
|
"@babel/plugin-proposal-private-property-in-object": "7.21.11",
|
|
72
71
|
"@babel/plugin-transform-runtime": "7.22.10",
|
|
73
|
-
"@babel/polyfill": "^7.10.1",
|
|
74
|
-
"@babel/preset-env": "^7.9.5",
|
|
75
72
|
"@babel/runtime": "7.27.6",
|
|
76
|
-
"@cfaester/enzyme-adapter-react-18": "0.8.0",
|
|
77
73
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
|
|
78
|
-
"@storybook/addon-
|
|
79
|
-
"@storybook/addon-
|
|
80
|
-
"@storybook/addon-
|
|
81
|
-
"@storybook/
|
|
82
|
-
"@storybook/addon-interactions": "8.6.12",
|
|
83
|
-
"@storybook/addon-links": "8.6.12",
|
|
84
|
-
"@storybook/addon-onboarding": "8.6.12",
|
|
85
|
-
"@storybook/blocks": "8.6.12",
|
|
86
|
-
"@storybook/preset-create-react-app": "8.6.12",
|
|
87
|
-
"@storybook/react": "8.6.12",
|
|
88
|
-
"@storybook/react-webpack5": "8.6.12",
|
|
89
|
-
"@storybook/test": "8.6.12",
|
|
74
|
+
"@storybook/addon-docs": "^9.1.0",
|
|
75
|
+
"@storybook/addon-onboarding": "^9.1.0",
|
|
76
|
+
"@storybook/addon-webpack5-compiler-swc": "^3.0.0",
|
|
77
|
+
"@storybook/react-webpack5": "^9.1.0",
|
|
90
78
|
"@svgr/webpack": "8.1.0",
|
|
91
|
-
"@testing-library/jest-dom": "5.17.0",
|
|
92
|
-
"@testing-library/react": "^
|
|
79
|
+
"@testing-library/jest-dom": "^5.17.0",
|
|
80
|
+
"@testing-library/react": "^14.3.1",
|
|
93
81
|
"@testing-library/user-event": "13.5.0",
|
|
94
82
|
"@types/jest": "^29.5.10",
|
|
95
83
|
"autoprefixer": "10.4.5",
|
|
84
|
+
"babel-eslint": "10.0.1",
|
|
96
85
|
"babel-jest": "^27.4.2",
|
|
97
86
|
"babel-loader": "^8.2.3",
|
|
98
87
|
"babel-plugin-import": "^1.13.6",
|
|
@@ -107,17 +96,13 @@
|
|
|
107
96
|
"css-minimizer-webpack-plugin": "^3.2.0",
|
|
108
97
|
"dotenv": "^10.0.0",
|
|
109
98
|
"dotenv-expand": "^5.1.0",
|
|
110
|
-
"enzyme": "^3.11.0",
|
|
111
99
|
"eslint": "^8.3.0",
|
|
112
100
|
"eslint-config-react-app": "^7.0.1",
|
|
113
|
-
"eslint-plugin-storybook": "
|
|
101
|
+
"eslint-plugin-storybook": "^9.1.0",
|
|
114
102
|
"eslint-webpack-plugin": "^3.1.1",
|
|
115
103
|
"file-loader": "^6.2.0",
|
|
116
104
|
"fs-extra": "^10.0.0",
|
|
117
105
|
"html-webpack-plugin": "^5.5.0",
|
|
118
|
-
"i18next": "22.4.9",
|
|
119
|
-
"i18next-browser-languagedetector": "7.0.1",
|
|
120
|
-
"i18next-xhr-backend": "3.2.2",
|
|
121
106
|
"identity-obj-proxy": "3.0.0",
|
|
122
107
|
"jest": "^27.4.3",
|
|
123
108
|
"jest-resolve": "^27.4.2",
|
|
@@ -127,7 +112,7 @@
|
|
|
127
112
|
"mini-css-extract-plugin": "^2.4.5",
|
|
128
113
|
"node-polyfill-webpack-plugin": "2.0.1",
|
|
129
114
|
"path-browserify": "^1.0.1",
|
|
130
|
-
"postcss": "^8.
|
|
115
|
+
"postcss": "^8.5.3",
|
|
131
116
|
"postcss-flexbugs-fixes": "^5.0.2",
|
|
132
117
|
"postcss-loader": "^6.2.1",
|
|
133
118
|
"postcss-normalize": "^10.0.1",
|
|
@@ -138,15 +123,14 @@
|
|
|
138
123
|
"react-app-polyfill": "^3.0.0",
|
|
139
124
|
"react-dev-utils": "^12.0.1",
|
|
140
125
|
"react-dom": "18.3.1",
|
|
141
|
-
"react-
|
|
142
|
-
"react-i18next": "12.1.4",
|
|
126
|
+
"react-i18next": "^15.5.2",
|
|
143
127
|
"react-refresh": "^0.11.0",
|
|
144
128
|
"resolve": "^1.20.0",
|
|
145
129
|
"resolve-url-loader": "^5.0.0",
|
|
146
130
|
"sass-loader": "^12.3.0",
|
|
147
131
|
"semver": "^7.3.5",
|
|
148
132
|
"source-map-loader": "^3.0.0",
|
|
149
|
-
"storybook": "
|
|
133
|
+
"storybook": "^9.1.0",
|
|
150
134
|
"style-loader": "^3.3.1",
|
|
151
135
|
"tailwindcss": "^3.0.2",
|
|
152
136
|
"terser-webpack-plugin": "^5.2.5",
|
package/lib/SvgIcon/index.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
require("./index.css");
|
|
10
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
const iconComponents = {};
|
|
12
|
-
const requireContext = require.context('../assets/icons', false, /\.svg$/);
|
|
13
|
-
requireContext.keys().forEach(path => {
|
|
14
|
-
const iconName = path.replace(/^\.\/(.*?)\.svg$/, '$1').toLowerCase();
|
|
15
|
-
iconComponents[iconName] = requireContext(path).default;
|
|
16
|
-
});
|
|
17
|
-
const SvgIcon = _ref => {
|
|
18
|
-
let {
|
|
19
|
-
className,
|
|
20
|
-
symbol,
|
|
21
|
-
color
|
|
22
|
-
} = _ref;
|
|
23
|
-
if (!symbol) return null;
|
|
24
|
-
const iconClass = "dtable-ui-multicolor-icon multicolor-icon-".concat(symbol, " ").concat(className || '');
|
|
25
|
-
const props = {
|
|
26
|
-
className: iconClass,
|
|
27
|
-
style: {
|
|
28
|
-
fill: color
|
|
29
|
-
},
|
|
30
|
-
ariaHidden: 'true'
|
|
31
|
-
};
|
|
32
|
-
const IconComponent = iconComponents[symbol];
|
|
33
|
-
if (!IconComponent) return null;
|
|
34
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(IconComponent, {
|
|
35
|
-
...props
|
|
36
|
-
});
|
|
37
|
-
};
|
|
38
|
-
var _default = exports.default = SvgIcon;
|