dtable-ui-component 6.0.91 → 6.0.93
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 +96 -70
- package/lib/ActivityIndicator/index.js +41 -33
- package/lib/AsyncUserSelect/index.css +122 -0
- package/lib/AsyncUserSelect/index.js +260 -0
- package/lib/AsyncUserSelect/user-item.js +55 -0
- package/lib/AutoNumberFormatter/index.js +5 -3
- package/lib/Badge/index.js +22 -18
- package/lib/ButtonFormatter/index.js +15 -10
- package/lib/CTimeFormatter/index.js +5 -3
- package/lib/CheckboxEditor/index.js +22 -13
- package/lib/CheckboxEditor/mb-editor.js +8 -6
- package/lib/CheckboxEditor/pc-editor.js +8 -6
- package/lib/CheckboxFormatter/index.js +8 -6
- package/lib/CollaboratorEditor/index.js +24 -15
- package/lib/CollaboratorEditor/mb-editor/index.js +19 -13
- package/lib/CollaboratorEditor/pc-editor/index.js +51 -43
- package/lib/CollaboratorFormatter/index.js +8 -7
- package/lib/CollaboratorItem/index.js +21 -16
- package/lib/CollapsibleSettingLayout/index.css +0 -5
- package/lib/CollapsibleSettingLayout/index.js +17 -12
- package/lib/Comment/body/comment.js +79 -63
- package/lib/Comment/body/index.js +14 -11
- package/lib/Comment/footer/btns/index.js +68 -53
- package/lib/Comment/footer/index.js +30 -28
- package/lib/Comment/footer/input/index.js +49 -44
- package/lib/Comment/footer/input/participant/index.js +19 -14
- package/lib/Comment/footer/participants/index.js +31 -28
- package/lib/Comment/footer/participants/participant/index.js +18 -15
- package/lib/Comment/footer/participants/participant-select/index.js +68 -57
- package/lib/Comment/index.js +33 -28
- package/lib/Comment/utils/utilities.js +1 -1
- package/lib/CreatorFormatter/index.js +8 -7
- package/lib/DTableColorPicker/ColorPickerPortal/index.js +60 -35
- package/lib/DTableColorPicker/index.js +135 -99
- package/lib/DTableColorPicker/utils.js +1 -1
- package/lib/DTableCommonAddTool/index.js +11 -8
- package/lib/DTableCustomFooter/index.js +5 -3
- package/lib/DTableCustomizeCollaboratorSelect/index.css +1 -39
- package/lib/DTableCustomizeCollaboratorSelect/index.js +38 -32
- package/lib/DTableCustomizeSelect/index.js +51 -44
- package/lib/DTableEmptyTip/index.js +20 -16
- package/lib/DTableFiltersPopover/index.js +71 -61
- package/lib/DTableFiltersPopover/utils/filter-item-utils.js +74 -57
- package/lib/DTableFiltersPopover/utils/index.js +1 -1
- package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +64 -49
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +49 -41
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +57 -47
- package/lib/DTableFiltersPopover/widgets/filter-calendar.js +35 -31
- package/lib/DTableFiltersPopover/widgets/filter-group.js +38 -32
- package/lib/DTableFiltersPopover/widgets/filter-item.js +125 -106
- package/lib/DTableFiltersPopover/widgets/filter-list/index.css +1 -5
- package/lib/DTableFiltersPopover/widgets/filter-list/index.js +18 -17
- package/lib/DTableFiltersPopover/widgets/rate-item.js +12 -9
- package/lib/DTableGroupSelect/index.js +52 -44
- package/lib/DTableGroupSelect/option.js +5 -3
- package/lib/DTableGroupSelect/select-option-group.css +0 -37
- package/lib/DTableGroupSelect/select-option-group.js +31 -25
- package/lib/DTableModalHeader/index.js +13 -9
- package/lib/DTablePopover/index.js +9 -6
- package/lib/DTableRadio/index.js +20 -17
- package/lib/DTableRadioGroup/index.js +22 -19
- package/lib/DTableSearchInput/index.js +23 -19
- package/lib/DTableSelect/dtable-select-label.js +12 -7
- package/lib/DTableSelect/index.js +2 -1
- package/lib/DTableSelect/utils.js +34 -20
- package/lib/DTableSwitch/index.css +1 -2
- package/lib/DTableSwitch/index.js +30 -18
- package/lib/DateEditor/index.js +25 -16
- package/lib/DateEditor/mb-editor/index.js +90 -68
- package/lib/DateEditor/pc-editor.js +39 -35
- package/lib/DateFormatter/index.js +5 -3
- package/lib/DatePicker/utils.js +4 -4
- package/lib/DeleteTip/index.js +29 -20
- package/lib/DepartmentMultipleSelectEditor/index.js +57 -49
- package/lib/DepartmentSelectFilter/index.js +8 -1
- package/lib/DepartmentSingleSelectEditor/index.js +22 -13
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +75 -55
- package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +78 -61
- package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +14 -11
- package/lib/DepartmentSingleSelectFormatter/index.js +13 -10
- package/lib/DigitalSignEditor/index.js +22 -13
- package/lib/DigitalSignEditor/mb-editor/index.js +39 -24
- package/lib/DigitalSignEditor/pc-editor/index.js +44 -30
- package/lib/DigitalSignEditor/service.js +1 -1
- package/lib/DigitalSignEditor/signature-board/index.js +21 -17
- package/lib/DigitalSignFormatter/index.js +23 -19
- package/lib/DigitalSignFormatter/utils.js +1 -1
- package/lib/Drawer/index.js +4 -1
- package/lib/DurationEditor/index.js +2 -1
- package/lib/DurationFormatter/index.js +5 -3
- package/lib/EditEditorButton/index.js +5 -3
- package/lib/EmailEditor/index.js +2 -1
- package/lib/EmailFormatter/index.js +5 -3
- package/lib/FieldDisplaySetting/field-item.js +26 -20
- package/lib/FieldDisplaySetting/index.css +0 -6
- package/lib/FieldDisplaySetting/index.js +50 -41
- package/lib/FileEditor/files-previewer/index.js +22 -13
- package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +43 -28
- package/lib/FileEditor/files-previewer/mb-previewer/index.js +24 -21
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/dropdown-menu.js +30 -24
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/file-name-editor/index.js +13 -11
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +82 -64
- package/lib/FileEditor/files-previewer/pc-previewer/index.js +81 -65
- package/lib/FileEditor/index.js +22 -13
- package/lib/FileEditor/mb-editor/index.js +43 -31
- package/lib/FileEditor/pc-editor/addition-previewer/index.js +27 -20
- package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +108 -82
- package/lib/FileEditor/pc-editor/index.js +46 -36
- package/lib/FileFormatter/index.js +40 -36
- package/lib/FileItemFormatter/index.js +3 -2
- package/lib/FileUploader/index.js +23 -21
- package/lib/FormulaFormatter/index.js +24 -17
- package/lib/GeolocationEditor/index.js +31 -22
- package/lib/GeolocationEditor/map-editor-utils.js +2 -2
- package/lib/GeolocationEditor/mb-editor/country-editor.js +42 -27
- package/lib/GeolocationEditor/mb-editor/index.js +22 -14
- package/lib/GeolocationEditor/mb-editor/location-editor.js +54 -34
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +102 -74
- package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +144 -110
- package/lib/GeolocationEditor/mb-editor/province-city-editor.js +42 -27
- package/lib/GeolocationEditor/mb-editor/province-editor.js +42 -27
- package/lib/GeolocationEditor/pc-editor/country-editor.js +38 -31
- package/lib/GeolocationEditor/pc-editor/index.js +26 -17
- package/lib/GeolocationEditor/pc-editor/location-editor.js +122 -96
- package/lib/GeolocationEditor/pc-editor/map-editor/index.js +99 -74
- package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +99 -76
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +139 -94
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +122 -85
- package/lib/GeolocationEditor/pc-editor/province-city-editor.js +89 -69
- package/lib/GeolocationEditor/pc-editor/province-editor.js +31 -26
- package/lib/GeolocationEditor/pc-editor/selector-header-item.js +9 -5
- package/lib/GeolocationEditor/pc-editor/selector-list.js +15 -13
- package/lib/GeolocationFormatter/index.js +5 -3
- package/lib/HtmlLongTextFormatter/index.js +3 -2
- package/lib/Icon/index.js +9 -6
- package/lib/Icon/load-sprite.js +13 -2
- package/lib/IconButton/index.js +9 -6
- package/lib/ImageEditor/images-previewer/image-preview/index.js +53 -45
- package/lib/ImageEditor/images-previewer/index.js +35 -32
- package/lib/ImageEditor/index.js +22 -13
- package/lib/ImageEditor/mb-editor/index.js +43 -31
- package/lib/ImageEditor/pc-editor/addition-previewer/image-link/index.js +19 -15
- package/lib/ImageEditor/pc-editor/addition-previewer/index.js +32 -24
- package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +102 -77
- package/lib/ImageEditor/pc-editor/images-previewer/index.js +33 -30
- package/lib/ImageEditor/pc-editor/index.js +44 -32
- package/lib/ImageFormatter/images-lazy-load.js +12 -10
- package/lib/ImageFormatter/index.js +40 -34
- package/lib/ImagePreviewerLightbox/index.js +12 -8
- package/lib/ImageThumbnail/index.js +47 -39
- package/lib/InputItem/custom-input.js +32 -27
- package/lib/InputItem/custom-keyboard.js +68 -47
- package/lib/InputItem/index.js +81 -71
- package/lib/InputItem/input.js +5 -3
- package/lib/LastModifierFormatter/index.js +8 -7
- package/lib/LinkEditor/index.js +38 -32
- package/lib/LinkEditor/link-editor-option.js +25 -20
- package/lib/LinkEditor/mb-popover/index.js +53 -41
- package/lib/LinkEditor/pc-popover/index.js +41 -33
- package/lib/LinkFormatter/index.js +13 -10
- package/lib/List/index.js +15 -9
- package/lib/List/list-item.js +51 -42
- package/lib/Loading/index.js +2 -1
- package/lib/LongTextFormatter/index.js +3 -2
- package/lib/MBEditorHeader/index.js +19 -14
- package/lib/MTimeFormatter/index.js +5 -3
- package/lib/MobileFullScreenPage/body/index.js +6 -4
- package/lib/MobileFullScreenPage/header/index.js +22 -17
- package/lib/MobileFullScreenPage/index.js +11 -8
- package/lib/MobileModal/index.js +6 -3
- package/lib/MobileOperationSheet/index.js +28 -18
- package/lib/MobileSelector/empty/index.js +5 -3
- package/lib/MobileSelector/index.js +18 -12
- package/lib/MobileSelector/option/index.js +17 -12
- package/lib/MobileSelector/options/index.js +5 -3
- package/lib/MobileSelector/search/index.js +10 -8
- package/lib/MobileUpload/index.js +87 -67
- package/lib/Modal/alert.js +9 -6
- package/lib/Modal/modal.js +26 -22
- package/lib/Modal/operation.js +2 -1
- package/lib/Modal/prompt.js +76 -56
- package/lib/MultipleSelectEditor/index.js +4 -2
- package/lib/MultipleSelectFormatter/index.js +8 -7
- package/lib/NotificationPopover/index.js +43 -32
- package/lib/NumberEditor/index.js +2 -1
- package/lib/NumberFormatter/index.js +5 -3
- package/lib/Picker/AbstractPicker.js +26 -22
- package/lib/Picker/index.js +2 -1
- package/lib/Popover/index.js +8 -5
- package/lib/Popover/item.js +26 -19
- package/lib/Progress/index.js +17 -15
- package/lib/Radio/Radio.js +12 -8
- package/lib/Radio/RadioItem.js +11 -5
- package/lib/RateFormatter/index.js +8 -7
- package/lib/RoleStatusEditor/index.js +36 -31
- package/lib/RowExpand/index.js +16 -9
- package/lib/RowExpandDialog/body/index.js +53 -42
- package/lib/RowExpandDialog/column-content/index.js +34 -25
- package/lib/RowExpandDialog/header/index.js +29 -22
- package/lib/RowExpandDialog/index.js +43 -30
- package/lib/RowExpandEditor/add-btn/index.js +16 -9
- package/lib/RowExpandEditor/add-btn/mb-add-btn/index.js +5 -3
- package/lib/RowExpandEditor/add-btn/pc-add-btn/index.js +8 -5
- package/lib/RowExpandEditor/checkbox-editor/index.js +16 -9
- package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +10 -8
- package/lib/RowExpandEditor/checkbox-editor/pc-editor.js +2 -1
- package/lib/RowExpandEditor/collaborator-editor/index.js +16 -9
- package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +19 -17
- package/lib/RowExpandEditor/collaborator-editor/pc-editor/index.js +52 -47
- package/lib/RowExpandEditor/date-editor/index.js +16 -9
- package/lib/RowExpandEditor/date-editor/mb-editor.js +20 -15
- package/lib/RowExpandEditor/date-editor/pc-editor.js +24 -21
- package/lib/RowExpandEditor/department-editor/index.js +16 -9
- package/lib/RowExpandEditor/department-editor/mb-editor.js +27 -22
- package/lib/RowExpandEditor/department-editor/pc-editor.js +35 -29
- package/lib/RowExpandEditor/digital-sign-editor/index.js +16 -9
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +19 -16
- package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +34 -32
- package/lib/RowExpandEditor/duration-editor/index.js +16 -9
- package/lib/RowExpandEditor/duration-editor/mb-editor.js +15 -12
- package/lib/RowExpandEditor/duration-editor/pc-editor.js +17 -13
- package/lib/RowExpandEditor/email-editor/index.js +16 -9
- package/lib/RowExpandEditor/email-editor/mb-editor/index.js +20 -18
- package/lib/RowExpandEditor/email-editor/pc-editor/index.js +21 -19
- package/lib/RowExpandEditor/file-editor/index.js +16 -9
- package/lib/RowExpandEditor/file-editor/mb-editor/index.js +21 -16
- package/lib/RowExpandEditor/file-editor/pc-editor/index.js +22 -20
- package/lib/RowExpandEditor/geolocation-editor/index.js +16 -9
- package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +12 -9
- package/lib/RowExpandEditor/geolocation-editor/pc-editor/index.js +20 -17
- package/lib/RowExpandEditor/image-editor/index.js +16 -9
- package/lib/RowExpandEditor/image-editor/mb-editor/index.js +21 -16
- package/lib/RowExpandEditor/image-editor/pc-editor/index.js +29 -25
- package/lib/RowExpandEditor/index.js +4 -2
- package/lib/RowExpandEditor/long-text-editor/index.js +16 -9
- package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +27 -16
- package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +19 -16
- package/lib/RowExpandEditor/long-text-editor/pc-editor/index.js +22 -18
- package/lib/RowExpandEditor/multiple-select-editor/index.js +16 -9
- package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +26 -23
- package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +82 -68
- package/lib/RowExpandEditor/number-editor/index.js +16 -9
- package/lib/RowExpandEditor/number-editor/mb-editor/index.js +10 -7
- package/lib/RowExpandEditor/number-editor/pc-editor.js +6 -4
- package/lib/RowExpandEditor/rate-editor/index.js +16 -9
- package/lib/RowExpandEditor/rate-editor/mb-editor.js +10 -8
- package/lib/RowExpandEditor/rate-editor/pc-editor.js +12 -10
- package/lib/RowExpandEditor/right-angle/index.js +8 -6
- package/lib/RowExpandEditor/single-select-editor/index.js +16 -9
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +30 -23
- package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +43 -35
- package/lib/RowExpandEditor/text-editor/index.js +16 -9
- package/lib/RowExpandEditor/text-editor/mb-editor/index.js +11 -9
- package/lib/RowExpandEditor/text-editor/pc-editor/index.js +16 -12
- package/lib/RowExpandEditor/url-editor/index.js +16 -9
- package/lib/RowExpandEditor/url-editor/mb-editor/index.js +20 -18
- package/lib/RowExpandEditor/url-editor/pc-editor/index.js +21 -19
- package/lib/RowExpandFormatter/department-formatter/index.js +14 -5
- package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +2 -1
- package/lib/RowExpandFormatter/department-formatter/pc-formatter.js +15 -11
- package/lib/RowExpandFormatter/email-formatter/index.js +12 -9
- package/lib/RowExpandFormatter/file-formatter/index.js +15 -14
- package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +43 -36
- package/lib/RowExpandFormatter/formula-formatter/index.js +41 -33
- package/lib/RowExpandFormatter/image-formatter/index.js +30 -27
- package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +47 -39
- package/lib/RowExpandFormatter/index.js +132 -115
- package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +3 -2
- package/lib/RowExpandFormatter/link-formatter/index.js +70 -67
- package/lib/RowExpandFormatter/rate-formatter/index.js +8 -7
- package/lib/RowExpandFormatter/url-formatter/index.js +12 -9
- package/lib/RowExpandView/body/index.js +39 -33
- package/lib/RowExpandView/column-content/index.js +10 -5
- package/lib/RowExpandView/index.js +27 -16
- package/lib/SelectItem/index.js +16 -12
- package/lib/SelectOptionGroup/index.css +4 -2
- package/lib/SelectOptionGroup/index.js +39 -32
- package/lib/SelectOptionGroup/option.js +5 -3
- package/lib/SelectedDepartments/index.js +54 -44
- package/lib/SimpleLongTextFormatter/index.js +39 -30
- package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +11 -8
- package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +3 -2
- package/lib/SingleSelectEditor/index.js +4 -2
- package/lib/SingleSelectFormatter/index.js +6 -4
- package/lib/SvgIcon/index.js +5 -2
- package/lib/TabBar/Tab.js +28 -21
- package/lib/TabBar/index.js +28 -24
- package/lib/Tabs/index.js +8 -5
- package/lib/TextEditor/index.js +21 -18
- package/lib/TextFormatter/index.js +5 -3
- package/lib/TextareaItem/index.js +49 -40
- package/lib/Toast/index.js +20 -14
- package/lib/UploadProgress/index.js +2 -1
- package/lib/UrlEditor/index.js +2 -1
- package/lib/UrlFormatter/index.js +5 -3
- package/lib/formatterConfig/base-formatter-config.js +24 -23
- package/lib/formatterConfig/index.js +3 -2
- package/lib/index.js +7 -0
- package/lib/locales/de.json +5 -1
- package/lib/locales/en.json +5 -1
- package/lib/locales/es.json +6 -2
- package/lib/locales/fr.json +5 -1
- package/lib/locales/pt.json +5 -1
- package/lib/locales/ru.json +5 -1
- package/lib/locales/zh-CN.json +5 -1
- package/lib/select-editor/index.js +22 -13
- package/lib/select-editor/mb-editor/index.js +22 -16
- package/lib/select-editor/pc-editor/index.js +75 -61
- package/lib/toaster/alert.js +25 -16
- package/lib/toaster/toast.js +27 -23
- package/lib/toaster/toastManager.js +17 -14
- package/lib/toaster/toaster.js +4 -1
- 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 +13 -29
package/lib/toaster/toast.js
CHANGED
|
@@ -8,6 +8,7 @@ exports.default = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _Transition = _interopRequireDefault(require("react-transition-group/Transition"));
|
|
10
10
|
var _alert = _interopRequireDefault(require("./alert"));
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
12
|
const ANIMATION_DURATION = 240;
|
|
12
13
|
class Toast extends _react.default.PureComponent {
|
|
13
14
|
constructor() {
|
|
@@ -75,33 +76,36 @@ class Toast extends _react.default.PureComponent {
|
|
|
75
76
|
this.clearCloseTimer();
|
|
76
77
|
}
|
|
77
78
|
render() {
|
|
78
|
-
return /*#__PURE__*/
|
|
79
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Transition.default, {
|
|
79
80
|
appear: true,
|
|
80
81
|
unmountOnExit: true,
|
|
81
82
|
timeout: ANIMATION_DURATION,
|
|
82
83
|
in: this.state.isShown,
|
|
83
|
-
onExited: this.props.onRemove
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
84
|
+
onExited: this.props.onRemove,
|
|
85
|
+
children: state => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
86
|
+
"data-state": state,
|
|
87
|
+
className: `dtable-toast-container ${state}`,
|
|
88
|
+
onMouseEnter: this.handleMouseEnter,
|
|
89
|
+
onMouseLeave: this.handleMouseLeave,
|
|
90
|
+
style: {
|
|
91
|
+
zIndex: this.props.zIndex
|
|
92
|
+
},
|
|
93
|
+
ref: this.containerRef,
|
|
94
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
95
|
+
ref: this.onRef,
|
|
96
|
+
style: {
|
|
97
|
+
padding: 8
|
|
98
|
+
},
|
|
99
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_alert.default, {
|
|
100
|
+
intent: this.props.intent,
|
|
101
|
+
title: this.props.title,
|
|
102
|
+
children: this.props.children || '',
|
|
103
|
+
isRemovable: this.props.hasCloseButton,
|
|
104
|
+
onRemove: event => this.close(event)
|
|
105
|
+
})
|
|
106
|
+
})
|
|
107
|
+
})
|
|
108
|
+
});
|
|
105
109
|
}
|
|
106
110
|
}
|
|
107
111
|
exports.default = Toast;
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _toast = _interopRequireDefault(require("./toast"));
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
11
|
const hasCustomId = settings => Object.hasOwnProperty.call(settings, 'id');
|
|
11
12
|
class ToastManager extends _react.default.PureComponent {
|
|
12
13
|
constructor(props, context) {
|
|
@@ -37,7 +38,7 @@ class ToastManager extends _react.default.PureComponent {
|
|
|
37
38
|
};
|
|
38
39
|
this.createToastInstance = (title, settings) => {
|
|
39
40
|
const uniqueId = ++ToastManager.idCounter;
|
|
40
|
-
const id = hasCustomId(settings) ?
|
|
41
|
+
const id = hasCustomId(settings) ? `${settings.id}-${uniqueId}` : uniqueId;
|
|
41
42
|
let hasCloseButton = settings.hasCloseButton || true;
|
|
42
43
|
let duration = settings.duration || 2;
|
|
43
44
|
if (settings.hasCloseButton !== undefined) {
|
|
@@ -90,19 +91,21 @@ class ToastManager extends _react.default.PureComponent {
|
|
|
90
91
|
};
|
|
91
92
|
}
|
|
92
93
|
render() {
|
|
93
|
-
return /*#__PURE__*/
|
|
94
|
-
className: "dtable-toast-manager"
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
94
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
95
|
+
className: "dtable-toast-manager",
|
|
96
|
+
children: this.state.toasts.map(_ref => {
|
|
97
|
+
let {
|
|
98
|
+
id,
|
|
99
|
+
description,
|
|
100
|
+
...props
|
|
101
|
+
} = _ref;
|
|
102
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_toast.default, {
|
|
103
|
+
onRemove: () => this.removeToast(id),
|
|
104
|
+
...props,
|
|
105
|
+
children: description
|
|
106
|
+
}, id);
|
|
107
|
+
})
|
|
108
|
+
});
|
|
106
109
|
}
|
|
107
110
|
}
|
|
108
111
|
exports.default = ToastManager;
|
package/lib/toaster/toaster.js
CHANGED
|
@@ -9,6 +9,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _client = require("react-dom/client");
|
|
10
10
|
var _toastManager = _interopRequireDefault(require("./toastManager"));
|
|
11
11
|
require("./index.css");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
const isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';
|
|
13
14
|
|
|
14
15
|
/**
|
|
@@ -62,11 +63,13 @@ class Toaster {
|
|
|
62
63
|
});
|
|
63
64
|
};
|
|
64
65
|
if (!isBrowser) return;
|
|
66
|
+
let toastContainer = document.querySelector('.dtable-toast-manager');
|
|
67
|
+
if (toastContainer) return;
|
|
65
68
|
const container = document.createElement('div');
|
|
66
69
|
container.setAttribute('data-evergreen-toaster-container', '');
|
|
67
70
|
document.body.appendChild(container);
|
|
68
71
|
const root = (0, _client.createRoot)(container);
|
|
69
|
-
root.render(
|
|
72
|
+
root.render(/*#__PURE__*/(0, _jsxRuntime.jsx)(_toastManager.default, {
|
|
70
73
|
bindNotify: this._bindNotify,
|
|
71
74
|
bindGetToasts: this._bindGetToasts,
|
|
72
75
|
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,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dtable-ui-component",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.93",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@seafile/react-image-lightbox": "4.0.2",
|
|
7
7
|
"@seafile/seafile-calendar": "0.0.31",
|
|
8
8
|
"@seafile/seafile-editor": "~2.0.14",
|
|
9
|
-
"classnames": "2.
|
|
9
|
+
"classnames": "~2.5.*",
|
|
10
10
|
"dayjs": "1.10.7",
|
|
11
11
|
"dtable-utils": "~5.0.22",
|
|
12
12
|
"is-hotkey": "0.2.0",
|
|
@@ -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",
|