dtable-ui-component 6.0.104 → 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/ActionSheet/index.js
CHANGED
|
@@ -6,6 +6,7 @@ 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"));
|
|
9
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
11
|
var React = _interopRequireWildcard(require("react"));
|
|
11
12
|
var _client = require("react-dom/client");
|
|
@@ -23,11 +24,10 @@ const SHARE = 'SHARE';
|
|
|
23
24
|
function noop() {}
|
|
24
25
|
const queue = [];
|
|
25
26
|
function createActionSheet(flag, config, callback) {
|
|
26
|
-
const props = {
|
|
27
|
+
const props = (0, _objectSpread2.default)({
|
|
27
28
|
prefixCls: 'am-action-sheet',
|
|
28
|
-
cancelButtonText: '取消'
|
|
29
|
-
|
|
30
|
-
};
|
|
29
|
+
cancelButtonText: '取消'
|
|
30
|
+
}, config);
|
|
31
31
|
const {
|
|
32
32
|
prefixCls,
|
|
33
33
|
className,
|
|
@@ -72,10 +72,10 @@ function createActionSheet(flag, config, callback) {
|
|
|
72
72
|
badges = []
|
|
73
73
|
} = props;
|
|
74
74
|
const titleMsg = [title ? /*#__PURE__*/(0, _jsxRuntime.jsx)("h3", {
|
|
75
|
-
className:
|
|
75
|
+
className: "".concat(prefixCls, "-title"),
|
|
76
76
|
children: title
|
|
77
77
|
}, "0") : null, message ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
78
|
-
className:
|
|
78
|
+
className: "".concat(prefixCls, "-message"),
|
|
79
79
|
children: message
|
|
80
80
|
}, "1") : null];
|
|
81
81
|
let children = null;
|
|
@@ -88,60 +88,54 @@ function createActionSheet(flag, config, callback) {
|
|
|
88
88
|
if (badges && badges.length > 0) {
|
|
89
89
|
badges.forEach(element => {
|
|
90
90
|
if (element.index >= 0) {
|
|
91
|
-
badgesMap[element.index] = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Badge.default, {
|
|
92
|
-
...element
|
|
93
|
-
});
|
|
91
|
+
badgesMap[element.index] = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Badge.default, (0, _objectSpread2.default)({}, element));
|
|
94
92
|
}
|
|
95
93
|
});
|
|
96
94
|
}
|
|
97
|
-
children = /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
98
|
-
...(0, _getDataAttr.default)(props),
|
|
95
|
+
children = /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _getDataAttr.default)(props)), {}, {
|
|
99
96
|
children: [titleMsg, /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
100
|
-
className:
|
|
97
|
+
className: "".concat(prefixCls, "-button-list"),
|
|
101
98
|
role: "group",
|
|
102
99
|
children: normalOptions.map((item, index) => {
|
|
103
100
|
const itemProps = {
|
|
104
|
-
className: (0, _classnames.default)(
|
|
105
|
-
[
|
|
106
|
-
[
|
|
101
|
+
className: (0, _classnames.default)("".concat(prefixCls, "-button-list-item"), {
|
|
102
|
+
["".concat(prefixCls, "-destructive-button")]: destructiveButtonIndex === index,
|
|
103
|
+
["".concat(prefixCls, "-cancel-button")]: cancelButtonIndex === index
|
|
107
104
|
}),
|
|
108
105
|
onClick: () => cb(index),
|
|
109
106
|
role: 'button'
|
|
110
107
|
};
|
|
111
|
-
let bContent = /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
112
|
-
...itemProps,
|
|
108
|
+
let bContent = /*#__PURE__*/(0, _jsxRuntime.jsx)("div", (0, _objectSpread2.default)((0, _objectSpread2.default)({}, itemProps), {}, {
|
|
113
109
|
children: item
|
|
114
|
-
});
|
|
110
|
+
}));
|
|
115
111
|
// 仅在设置徽标的情况下修改dom结构
|
|
116
112
|
if (badgesMap[index]) {
|
|
117
|
-
bContent = /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
118
|
-
|
|
119
|
-
className: `${itemProps.className} ${prefixCls}-button-list-badge`,
|
|
113
|
+
bContent = /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", (0, _objectSpread2.default)((0, _objectSpread2.default)({}, itemProps), {}, {
|
|
114
|
+
className: "".concat(itemProps.className, " ").concat(prefixCls, "-button-list-badge"),
|
|
120
115
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
121
|
-
className:
|
|
116
|
+
className: "".concat(prefixCls, "-button-list-item-content"),
|
|
122
117
|
children: item
|
|
123
118
|
}), badgesMap[index]]
|
|
124
|
-
});
|
|
119
|
+
}));
|
|
125
120
|
}
|
|
126
121
|
let bItem = /*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcFeedback.default, {
|
|
127
|
-
activeClassName:
|
|
122
|
+
activeClassName: "".concat(prefixCls, "-button-list-item-active"),
|
|
128
123
|
children: bContent
|
|
129
124
|
}, index);
|
|
130
125
|
if (cancelButtonIndex === index || destructiveButtonIndex === index) {
|
|
131
126
|
bItem = /*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcFeedback.default, {
|
|
132
|
-
activeClassName:
|
|
133
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
134
|
-
...itemProps,
|
|
127
|
+
activeClassName: "".concat(prefixCls, "-button-list-item-active"),
|
|
128
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", (0, _objectSpread2.default)((0, _objectSpread2.default)({}, itemProps), {}, {
|
|
135
129
|
children: [item, cancelButtonIndex === index ? /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
136
|
-
className:
|
|
130
|
+
className: "".concat(prefixCls, "-cancel-button-mask")
|
|
137
131
|
}) : null]
|
|
138
|
-
})
|
|
132
|
+
}))
|
|
139
133
|
}, index);
|
|
140
134
|
}
|
|
141
135
|
return bItem;
|
|
142
136
|
})
|
|
143
137
|
})]
|
|
144
|
-
});
|
|
138
|
+
}));
|
|
145
139
|
break;
|
|
146
140
|
case SHARE:
|
|
147
141
|
mode = 'share';
|
|
@@ -149,44 +143,43 @@ function createActionSheet(flag, config, callback) {
|
|
|
149
143
|
const createList = function (item, index) {
|
|
150
144
|
let rowIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
151
145
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
152
|
-
className:
|
|
146
|
+
className: "".concat(prefixCls, "-share-list-item"),
|
|
153
147
|
role: "button",
|
|
154
148
|
onClick: () => cb(index, rowIndex),
|
|
155
149
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
156
|
-
className:
|
|
150
|
+
className: "".concat(prefixCls, "-share-list-item-icon"),
|
|
157
151
|
children: item.icon
|
|
158
152
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
159
|
-
className:
|
|
153
|
+
className: "".concat(prefixCls, "-share-list-item-title"),
|
|
160
154
|
children: item.title
|
|
161
155
|
})]
|
|
162
156
|
}, index);
|
|
163
157
|
};
|
|
164
|
-
children = /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
165
|
-
...(0, _getDataAttr.default)(props),
|
|
158
|
+
children = /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _getDataAttr.default)(props)), {}, {
|
|
166
159
|
children: [titleMsg, /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
167
|
-
className:
|
|
160
|
+
className: "".concat(prefixCls, "-share"),
|
|
168
161
|
children: [multipleLine ? options.map((item, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
169
|
-
className:
|
|
162
|
+
className: "".concat(prefixCls, "-share-list"),
|
|
170
163
|
children: item.map((ii, ind) => createList(ii, ind, index))
|
|
171
164
|
}, index)) : /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
172
|
-
className:
|
|
165
|
+
className: "".concat(prefixCls, "-share-list"),
|
|
173
166
|
children: options.map((item, index) => createList(item, index))
|
|
174
167
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcFeedback.default, {
|
|
175
|
-
activeClassName:
|
|
168
|
+
activeClassName: "".concat(prefixCls, "-share-cancel-button-active"),
|
|
176
169
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
177
|
-
className:
|
|
170
|
+
className: "".concat(prefixCls, "-share-cancel-button"),
|
|
178
171
|
role: "button",
|
|
179
172
|
onClick: () => cb(-1),
|
|
180
173
|
children: cancelButtonText
|
|
181
174
|
})
|
|
182
175
|
})]
|
|
183
176
|
})]
|
|
184
|
-
});
|
|
177
|
+
}));
|
|
185
178
|
break;
|
|
186
179
|
default:
|
|
187
180
|
break;
|
|
188
181
|
}
|
|
189
|
-
const rootCls = (0, _classnames.default)(
|
|
182
|
+
const rootCls = (0, _classnames.default)("".concat(prefixCls, "-").concat(mode), className);
|
|
190
183
|
root.render(/*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcDialog.default, {
|
|
191
184
|
visible: true,
|
|
192
185
|
title: "",
|
|
@@ -23,28 +23,28 @@ class ActivityIndicator extends React.Component {
|
|
|
23
23
|
text
|
|
24
24
|
} = this.props;
|
|
25
25
|
const wrapClass = (0, _classnames.default)(prefixCls, className, {
|
|
26
|
-
[
|
|
27
|
-
[
|
|
28
|
-
[
|
|
26
|
+
["".concat(prefixCls, "-lg")]: size === 'large',
|
|
27
|
+
["".concat(prefixCls, "-sm")]: size === 'small',
|
|
28
|
+
["".concat(prefixCls, "-toast")]: !!toast
|
|
29
29
|
});
|
|
30
|
-
const spinnerClass = (0, _classnames.default)(
|
|
31
|
-
[
|
|
30
|
+
const spinnerClass = (0, _classnames.default)("".concat(prefixCls, "-spinner"), {
|
|
31
|
+
["".concat(prefixCls, "-spinner-lg")]: !!toast || size === 'large'
|
|
32
32
|
});
|
|
33
33
|
if (animating) {
|
|
34
34
|
if (toast) {
|
|
35
35
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
36
36
|
className: wrapClass,
|
|
37
37
|
children: text ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
38
|
-
className:
|
|
38
|
+
className: "".concat(prefixCls, "-content"),
|
|
39
39
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
40
40
|
className: spinnerClass,
|
|
41
41
|
"aria-hidden": "true"
|
|
42
42
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
43
|
-
className:
|
|
43
|
+
className: "".concat(prefixCls, "-toast"),
|
|
44
44
|
children: text
|
|
45
45
|
})]
|
|
46
46
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
47
|
-
className:
|
|
47
|
+
className: "".concat(prefixCls, "-content"),
|
|
48
48
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
49
49
|
className: spinnerClass,
|
|
50
50
|
"aria-label": "Loading"
|
|
@@ -58,7 +58,7 @@ class ActivityIndicator extends React.Component {
|
|
|
58
58
|
className: spinnerClass,
|
|
59
59
|
"aria-hidden": "true"
|
|
60
60
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
61
|
-
className:
|
|
61
|
+
className: "".concat(prefixCls, "-tip"),
|
|
62
62
|
children: text
|
|
63
63
|
})]
|
|
64
64
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -169,7 +169,7 @@ const AsyncUserSelect = _ref => {
|
|
|
169
169
|
bottom
|
|
170
170
|
} = userSelectContainerRef.current.getBoundingClientRect();
|
|
171
171
|
if (bottom > window.innerHeight) {
|
|
172
|
-
userSelectContainerRef.current.style.top =
|
|
172
|
+
userSelectContainerRef.current.style.top = "".concat(window.innerHeight - bottom, "px");
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
if (userListContainerRef.current && userItemContainerRef.current) {
|
|
@@ -200,7 +200,7 @@ const AsyncUserSelect = _ref => {
|
|
|
200
200
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_userItem.default, {
|
|
201
201
|
user: user,
|
|
202
202
|
deleteUser: deselectUser
|
|
203
|
-
},
|
|
203
|
+
}, "dtable-ui-user-selector-selected-user-".concat(index));
|
|
204
204
|
}), selectedUsers.length === 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
205
205
|
className: "dtable-ui-user-select-placeholder",
|
|
206
206
|
children: emptyPlaceholder || (0, _lang.getLocale)('Search_users')
|
|
@@ -239,7 +239,7 @@ const AsyncUserSelect = _ref => {
|
|
|
239
239
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_userItem.default, {
|
|
240
240
|
user: user,
|
|
241
241
|
enableShowIDInOrgWhenSearchUser: enableShowIDInOrgWhenSearchUser
|
|
242
|
-
},
|
|
242
|
+
}, "dtable-ui-user-selector-searched-user-".concat(index)), selectedUsers.find(u => u.email === user.email) && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
243
243
|
className: "dtable-ui-collaborator-check-icon",
|
|
244
244
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
245
245
|
className: "dtable-font dtable-icon-check-mark",
|
package/lib/Badge/index.js
CHANGED
|
@@ -1,61 +1,65 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
9
11
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
12
|
var React = _interopRequireWildcard(require("react"));
|
|
11
13
|
require("./index.css");
|
|
12
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
const _excluded = ["className", "prefixCls", "children", "text", "size", "overflowCount", "dot", "corner", "hot"];
|
|
13
16
|
class Badge extends React.Component {
|
|
14
17
|
render() {
|
|
15
18
|
// tslint:disable:prefer-const
|
|
16
|
-
let
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
let _this$props = this.props,
|
|
20
|
+
{
|
|
21
|
+
className,
|
|
22
|
+
prefixCls,
|
|
23
|
+
children,
|
|
24
|
+
text,
|
|
25
|
+
size,
|
|
26
|
+
overflowCount,
|
|
27
|
+
dot,
|
|
28
|
+
corner,
|
|
29
|
+
hot
|
|
30
|
+
} = _this$props,
|
|
31
|
+
restProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
28
32
|
// eslint-disable-next-line no-self-assign
|
|
29
33
|
overflowCount = overflowCount;
|
|
30
|
-
text = typeof text === 'number' && text > overflowCount ?
|
|
34
|
+
text = typeof text === 'number' && text > overflowCount ? "".concat(overflowCount, "+") : text;
|
|
31
35
|
|
|
32
36
|
// dot mode don't need text
|
|
33
37
|
if (dot) {
|
|
34
38
|
text = '';
|
|
35
39
|
}
|
|
36
40
|
const scrollNumberCls = (0, _classnames.default)({
|
|
37
|
-
[
|
|
38
|
-
[
|
|
39
|
-
[
|
|
40
|
-
[
|
|
41
|
-
[
|
|
41
|
+
["".concat(prefixCls, "-dot")]: dot,
|
|
42
|
+
["".concat(prefixCls, "-dot-large")]: dot && size === 'large',
|
|
43
|
+
["".concat(prefixCls, "-text")]: !dot && !corner,
|
|
44
|
+
["".concat(prefixCls, "-corner")]: corner,
|
|
45
|
+
["".concat(prefixCls, "-corner-large")]: corner && size === 'large'
|
|
42
46
|
});
|
|
43
47
|
const badgeCls = (0, _classnames.default)(prefixCls, className, {
|
|
44
|
-
[
|
|
45
|
-
[
|
|
46
|
-
[
|
|
47
|
-
[
|
|
48
|
+
["".concat(prefixCls, "-not-a-wrapper")]: !children,
|
|
49
|
+
["".concat(prefixCls, "-corner-wrapper")]: corner,
|
|
50
|
+
["".concat(prefixCls, "-hot")]: !!hot,
|
|
51
|
+
["".concat(prefixCls, "-corner-wrapper-large")]: corner && size === 'large'
|
|
48
52
|
});
|
|
49
53
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
50
54
|
className: badgeCls,
|
|
51
55
|
children: [children, (text || dot) &&
|
|
52
56
|
/*#__PURE__*/
|
|
53
57
|
// tslint:disable-next-line:jsx-no-multiline-js
|
|
54
|
-
(0, _jsxRuntime.jsx)("sup", {
|
|
55
|
-
className: scrollNumberCls
|
|
56
|
-
|
|
58
|
+
(0, _jsxRuntime.jsx)("sup", (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
59
|
+
className: scrollNumberCls
|
|
60
|
+
}, restProps), {}, {
|
|
57
61
|
children: text
|
|
58
|
-
})]
|
|
62
|
+
}))]
|
|
59
63
|
});
|
|
60
64
|
}
|
|
61
65
|
}
|
|
@@ -6,38 +6,37 @@ 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"));
|
|
9
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
12
|
var _reactResponsive = _interopRequireDefault(require("react-responsive"));
|
|
11
13
|
var _pcEditor = _interopRequireDefault(require("./pc-editor"));
|
|
12
14
|
var _mbEditor = _interopRequireDefault(require("./mb-editor"));
|
|
13
15
|
require("./index.css");
|
|
14
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
+
const _excluded = ["isMobile"];
|
|
15
18
|
const CheckboxEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
16
19
|
let {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (isMobile === false) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, {
|
|
21
|
-
...props,
|
|
20
|
+
isMobile
|
|
21
|
+
} = _ref,
|
|
22
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
23
|
+
if (isMobile === false) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
22
24
|
ref: ref
|
|
23
|
-
});
|
|
24
|
-
if (isMobile === true) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, {
|
|
25
|
-
...props,
|
|
25
|
+
}));
|
|
26
|
+
if (isMobile === true) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
26
27
|
ref: ref
|
|
27
|
-
});
|
|
28
|
+
}));
|
|
28
29
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
29
30
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
|
|
30
31
|
query: "(min-width: 768px)",
|
|
31
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, {
|
|
32
|
-
...props,
|
|
32
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, 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, {
|
|
38
|
-
...props,
|
|
37
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
39
38
|
ref: ref
|
|
40
|
-
})
|
|
39
|
+
}))
|
|
41
40
|
})]
|
|
42
41
|
});
|
|
43
42
|
});
|
|
@@ -6,44 +6,43 @@ 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"));
|
|
9
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
12
|
var _reactResponsive = _interopRequireDefault(require("react-responsive"));
|
|
11
13
|
var _pcEditor = _interopRequireDefault(require("./pc-editor"));
|
|
12
14
|
var _mbEditor = _interopRequireDefault(require("./mb-editor"));
|
|
13
15
|
require("./index.css");
|
|
14
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
+
const _excluded = ["isMobile", "value"];
|
|
15
18
|
const CollaboratorEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
16
19
|
let {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
isMobile,
|
|
21
|
+
value: oldValue
|
|
22
|
+
} = _ref,
|
|
23
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
21
24
|
const value = Array.isArray(oldValue) ? oldValue : [];
|
|
22
|
-
if (isMobile === false) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, {
|
|
23
|
-
...props,
|
|
25
|
+
if (isMobile === false) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
24
26
|
value: value,
|
|
25
27
|
ref: ref
|
|
26
|
-
});
|
|
27
|
-
if (isMobile === true) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, {
|
|
28
|
-
...props,
|
|
28
|
+
}));
|
|
29
|
+
if (isMobile === true) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
29
30
|
value: value,
|
|
30
31
|
ref: ref
|
|
31
|
-
});
|
|
32
|
+
}));
|
|
32
33
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
33
34
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
|
|
34
35
|
query: "(min-width: 768px)",
|
|
35
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, {
|
|
36
|
-
...props,
|
|
36
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
37
37
|
value: value,
|
|
38
38
|
ref: ref
|
|
39
|
-
})
|
|
39
|
+
}))
|
|
40
40
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
|
|
41
41
|
query: "(max-width: 768px)",
|
|
42
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, {
|
|
43
|
-
...props,
|
|
42
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
44
43
|
value: value,
|
|
45
44
|
ref: ref
|
|
46
|
-
})
|
|
45
|
+
}))
|
|
47
46
|
})]
|
|
48
47
|
});
|
|
49
48
|
});
|
|
@@ -176,7 +176,7 @@ class PCCollaboratorEditor extends _react.default.Component {
|
|
|
176
176
|
bottom
|
|
177
177
|
} = this.ref.getBoundingClientRect();
|
|
178
178
|
if (bottom > window.innerHeight) {
|
|
179
|
-
this.ref.style.top =
|
|
179
|
+
this.ref.style.top = "".concat(window.innerHeight - bottom, "px");
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
182
|
if (this.container && this.collaboratorItem) {
|
|
@@ -26,7 +26,7 @@ const CollapsibleSettingLayout = props => {
|
|
|
26
26
|
className: "collapsible-setting-layout-title",
|
|
27
27
|
children: title
|
|
28
28
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
29
|
-
className:
|
|
29
|
+
className: "dtable-font dtable-icon-right".concat(isShowSettings ? ' dtable-icon-spin' : '')
|
|
30
30
|
})]
|
|
31
31
|
}), isShowSettings && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
32
32
|
className: "collapsible-setting-layout-body mt-3 pl-2",
|
|
@@ -140,7 +140,7 @@ class Comment extends _react.PureComponent {
|
|
|
140
140
|
if (!this.isCommentUserExist(comment)) return null;
|
|
141
141
|
const isShowDropdownMenu = comment.author === username || !comment.resolved;
|
|
142
142
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
143
|
-
className:
|
|
143
|
+
className: "dtable-ui-comment-container ".concat(comment.resolved ? 'dtable-ui-comment-container-resolved' : ''),
|
|
144
144
|
id: comment.id,
|
|
145
145
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
146
146
|
className: "dtable-ui-comment-info",
|
|
@@ -5,17 +5,20 @@ 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"));
|
|
8
10
|
var _react = _interopRequireDefault(require("react"));
|
|
9
11
|
var _lang = require("../../lang");
|
|
10
12
|
var _comment = _interopRequireDefault(require("./comment"));
|
|
11
13
|
require("./index.css");
|
|
12
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
const _excluded = ["comments", "isFirstLoading"];
|
|
13
16
|
const Body = _ref => {
|
|
14
17
|
let {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
comments,
|
|
19
|
+
isFirstLoading
|
|
20
|
+
} = _ref,
|
|
21
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
19
22
|
if (comments.length === 0) {
|
|
20
23
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
21
24
|
className: "dtable-ui-comments-empty",
|
|
@@ -24,11 +27,10 @@ const Body = _ref => {
|
|
|
24
27
|
}
|
|
25
28
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
26
29
|
children: comments.map((comment, index) => {
|
|
27
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_comment.default, {
|
|
28
|
-
...props,
|
|
30
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_comment.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
29
31
|
comment: comment,
|
|
30
32
|
isScrollBottom: index === comments.length - 1 && isFirstLoading
|
|
31
|
-
}, comment.id);
|
|
33
|
+
}), comment.id);
|
|
32
34
|
})
|
|
33
35
|
});
|
|
34
36
|
};
|
|
@@ -64,7 +64,7 @@ class Footer extends _react.default.Component {
|
|
|
64
64
|
let start = 0;
|
|
65
65
|
let newValue = '';
|
|
66
66
|
while ((match = regex.exec(value)) !== null) {
|
|
67
|
-
let notificationName =
|
|
67
|
+
let notificationName = "".concat(match[1]);
|
|
68
68
|
let substr = value.substring(start, match.index);
|
|
69
69
|
start = regex.lastIndex;
|
|
70
70
|
newValue += substr + notificationName;
|
|
@@ -49,12 +49,12 @@ class Input extends _react.default.Component {
|
|
|
49
49
|
right,
|
|
50
50
|
left
|
|
51
51
|
} = this.commentRef.getBoundingClientRect();
|
|
52
|
-
this.commentPopoverRef.style.left =
|
|
53
|
-
this.commentPopoverRef.style.top =
|
|
52
|
+
this.commentPopoverRef.style.left = "".concat(caretPosition.x + FONT_SIZE_WIDTH, "px");
|
|
53
|
+
this.commentPopoverRef.style.top = "".concat(caretPosition.y - this.commentPopoverRef.offsetHeight, "px");
|
|
54
54
|
if (caretPosition.x + FONT_SIZE_WIDTH > right - PADDING_WIDTH) {
|
|
55
55
|
// is last code
|
|
56
|
-
this.commentPopoverRef.style.left =
|
|
57
|
-
this.commentPopoverRef.style.top =
|
|
56
|
+
this.commentPopoverRef.style.left = "".concat(left + PADDING_WIDTH + FONT_SIZE_WIDTH, "px");
|
|
57
|
+
this.commentPopoverRef.style.top = "".concat(caretPosition.y - this.commentPopoverRef.offsetHeight + LINE_HEIGHT, "px");
|
|
58
58
|
}
|
|
59
59
|
if (caretPosition.x + FONT_SIZE_WIDTH + this.commentPopoverRef.offsetWidth > document.body.clientWidth) {
|
|
60
60
|
this.commentPopoverRef.style.right = 0;
|
|
@@ -166,7 +166,7 @@ class Input extends _react.default.Component {
|
|
|
166
166
|
spanNode2 = document.createElement('span');
|
|
167
167
|
spanNode1.className = 'at-text';
|
|
168
168
|
spanNode1.contentEditable = 'false';
|
|
169
|
-
spanNode1.innerHTML =
|
|
169
|
+
spanNode1.innerHTML = "@".concat(content.name);
|
|
170
170
|
spanNode2.innerHTML = ' ';
|
|
171
171
|
}
|
|
172
172
|
let frag = document.createDocumentFragment();
|
|
@@ -35,7 +35,7 @@ class Participant extends _react.default.Component {
|
|
|
35
35
|
} = this.props;
|
|
36
36
|
const active = index === activeIndex;
|
|
37
37
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
38
|
-
className:
|
|
38
|
+
className: "comment-participant-item ".concat(active ? 'active' : ''),
|
|
39
39
|
ref: ref => this.participantItem = ref,
|
|
40
40
|
onClick: this.onSelect,
|
|
41
41
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -127,12 +127,12 @@ class ParticipantSelect extends _react.Component {
|
|
|
127
127
|
}
|
|
128
128
|
componentDidMount() {
|
|
129
129
|
let collaboratorListHeight = this.participantsRef.offsetHeight;
|
|
130
|
-
this.participantsRef.style.top =
|
|
130
|
+
this.participantsRef.style.top = "".concat(-collaboratorListHeight + 10, "px");
|
|
131
131
|
this.registerHandlers();
|
|
132
132
|
}
|
|
133
133
|
componentDidUpdate() {
|
|
134
134
|
let collaboratorListHeight = this.participantsRef.offsetHeight;
|
|
135
|
-
this.participantsRef.style.top =
|
|
135
|
+
this.participantsRef.style.top = "".concat(-collaboratorListHeight + 10, "px");
|
|
136
136
|
}
|
|
137
137
|
componentWillUnmount() {
|
|
138
138
|
this.unregisterHandlers();
|
|
@@ -74,7 +74,7 @@ class Utilities {
|
|
|
74
74
|
spanNode2 = document.createElement('span');
|
|
75
75
|
spanNode1.className = 'at-text';
|
|
76
76
|
spanNode1.contentEditable = 'true';
|
|
77
|
-
spanNode1.innerHTML =
|
|
77
|
+
spanNode1.innerHTML = "@".concat(content.name);
|
|
78
78
|
spanNode2.innerHTML = ' ';
|
|
79
79
|
}
|
|
80
80
|
let frag = document.createDocumentFragment();
|
|
@@ -1,11 +1,12 @@
|
|
|
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 = ColorPickerPortal;
|
|
9
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
9
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
11
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
11
12
|
var _utils = require("../../utils/utils");
|
|
@@ -35,18 +36,15 @@ function ColorPickerPortal(_ref) {
|
|
|
35
36
|
} = targetRect;
|
|
36
37
|
const portalRectHeight = containerRef.current.clientHeight;
|
|
37
38
|
const newPosition = {
|
|
38
|
-
left:
|
|
39
|
+
left: "".concat(left + 1, "px"),
|
|
39
40
|
visibility: 'visible'
|
|
40
41
|
};
|
|
41
42
|
if (spaceAbove < portalRectHeight) {
|
|
42
|
-
newPosition.top =
|
|
43
|
+
newPosition.top = "calc(".concat(spaceAbove, "px + 2.375rem)");
|
|
43
44
|
} else {
|
|
44
|
-
newPosition.top =
|
|
45
|
+
newPosition.top = "calc(".concat(spaceAbove - portalRectHeight, "px)");
|
|
45
46
|
}
|
|
46
|
-
setPosition(prev => ({
|
|
47
|
-
...prev,
|
|
48
|
-
...newPosition
|
|
49
|
-
}));
|
|
47
|
+
setPosition(prev => (0, _objectSpread2.default)((0, _objectSpread2.default)({}, prev), newPosition));
|
|
50
48
|
if (!isPositioned) {
|
|
51
49
|
setIsPositioned(true);
|
|
52
50
|
}
|