dtable-ui-component 6.0.108 → 6.0.110-aik.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ActionSheet/index.js +42 -35
- package/lib/ActivityIndicator/index.js +9 -9
- package/lib/AsyncUserSelect/index.css +54 -12
- package/lib/AsyncUserSelect/index.js +27 -16
- package/lib/Badge/index.js +27 -31
- package/lib/CheckboxEditor/index.js +15 -14
- package/lib/CollaboratorEditor/index.js +16 -15
- package/lib/CollaboratorEditor/pc-editor/index.js +1 -1
- package/lib/CollapsibleSettingLayout/index.js +1 -1
- package/lib/Comment/body/comment.js +1 -1
- package/lib/Comment/body/index.js +7 -9
- package/lib/Comment/footer/index.js +1 -1
- package/lib/Comment/footer/input/index.js +5 -5
- package/lib/Comment/footer/input/participant/index.js +1 -1
- package/lib/Comment/footer/participants/participant-select/index.js +2 -2
- package/lib/Comment/utils/utilities.js +1 -1
- package/lib/DTableColorPicker/ColorPickerPortal/index.js +8 -6
- package/lib/DTableColorPicker/index.js +13 -12
- package/lib/DTableColorPicker/utils.js +1 -1
- package/lib/DTableCommonAddTool/index.js +2 -2
- package/lib/DTableFiltersPopover/index.js +1 -1
- package/lib/DTableFiltersPopover/utils/index.js +1 -1
- package/lib/DTableFiltersPopover/widgets/filter-group.js +2 -2
- package/lib/DTableFiltersPopover/widgets/filter-item.js +1 -1
- package/lib/DTableFiltersPopover/widgets/filter-list/index.js +1 -1
- package/lib/DTableFiltersPopover/widgets/rate-item.js +5 -5
- package/lib/DTableGroupSelect/index.css +42 -5
- package/lib/DTableGroupSelect/select-option-group.css +3 -3
- package/lib/DTableGroupSelect/select-option-group.js +23 -5
- package/lib/DTableIcon/index.js +4 -4
- package/lib/DTableIcon/svg-icon.js +4 -4
- package/lib/DTableModalHeader/index.js +6 -8
- package/lib/DTableRadioGroup/index.js +3 -3
- package/lib/DTableSelect/dtable-select-label.js +1 -1
- package/lib/DTableSelect/utils.js +55 -36
- package/lib/DateEditor/index.js +13 -10
- package/lib/DateEditor/pc-editor.js +1 -1
- package/lib/DatePicker/utils.js +4 -4
- package/lib/DepartmentMultipleSelectEditor/index.js +3 -3
- package/lib/DepartmentSelectFilter/index.js +5 -2
- package/lib/DepartmentSingleSelectEditor/index.js +15 -14
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +2 -2
- package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +6 -6
- package/lib/DigitalSignEditor/index.js +15 -14
- package/lib/DigitalSignEditor/mb-editor/index.js +4 -4
- package/lib/DigitalSignEditor/pc-editor/index.js +7 -6
- package/lib/DigitalSignEditor/service.js +1 -1
- package/lib/DigitalSignEditor/signature-board/index.js +2 -2
- package/lib/DigitalSignFormatter/utils.js +1 -1
- package/lib/Drawer/index.js +3 -2
- package/lib/FieldDisplaySetting/field-item.js +1 -1
- package/lib/FieldDisplaySetting/index.js +11 -9
- package/lib/FileEditor/files-previewer/index.js +15 -14
- package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +2 -2
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +3 -3
- package/lib/FileEditor/index.js +15 -14
- package/lib/FileEditor/pc-editor/addition-previewer/index.js +1 -1
- package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +6 -6
- package/lib/FileEditor/pc-editor/index.js +3 -3
- package/lib/FileFormatter/index.js +1 -1
- package/lib/FileItemFormatter/index.js +1 -1
- package/lib/FileUploader/index.js +1 -1
- package/lib/FormulaFormatter/index.js +15 -9
- package/lib/GeolocationEditor/index.js +23 -19
- package/lib/GeolocationEditor/map-editor-utils.js +10 -6
- package/lib/GeolocationEditor/mb-editor/index.js +27 -23
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +9 -6
- package/lib/GeolocationEditor/pc-editor/country-editor.js +2 -2
- package/lib/GeolocationEditor/pc-editor/index.js +21 -15
- package/lib/GeolocationEditor/pc-editor/location-editor.js +2 -2
- package/lib/GeolocationEditor/pc-editor/map-editor/index.js +13 -9
- package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +9 -6
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +24 -7
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +20 -3
- package/lib/GeolocationEditor/pc-editor/province-city-editor.js +1 -1
- package/lib/GeolocationEditor/pc-editor/province-editor.js +2 -2
- package/lib/GeolocationEditor/pc-editor/selector-list.js +1 -1
- package/lib/HtmlLongTextFormatter/index.js +1 -1
- package/lib/Icon/index.js +13 -17
- package/lib/Icon/load-sprite.js +13 -2
- package/lib/IconButton/index.js +11 -14
- package/lib/ImageEditor/images-previewer/image-preview/index.js +1 -1
- package/lib/ImageEditor/index.js +15 -14
- package/lib/ImageEditor/pc-editor/addition-previewer/index.js +2 -2
- package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +5 -5
- package/lib/ImageEditor/pc-editor/images-previewer/index.js +1 -1
- package/lib/ImageFormatter/index.js +1 -1
- package/lib/ImagePreviewerLightbox/index.js +30 -21
- package/lib/ImageThumbnail/index.js +2 -2
- package/lib/InputItem/custom-input.js +9 -9
- package/lib/InputItem/custom-keyboard.js +34 -37
- package/lib/InputItem/index.js +52 -49
- package/lib/InputItem/input.js +9 -13
- package/lib/LinkEditor/pc-popover/index.js +3 -2
- package/lib/List/index.js +17 -21
- package/lib/List/list-item.js +50 -52
- package/lib/MBEditorHeader/index.js +1 -1
- package/lib/MobileFullScreenPage/body/index.js +1 -1
- package/lib/MobileFullScreenPage/header/index.js +4 -4
- package/lib/MobileFullScreenPage/index.js +1 -1
- package/lib/MobileModal/index.js +7 -10
- package/lib/Modal/alert.js +2 -2
- package/lib/Modal/modal.js +28 -31
- package/lib/Modal/prompt.js +10 -10
- package/lib/MultipleSelectEditor/index.js +6 -8
- package/lib/MultipleSelectFormatter/index.js +1 -1
- package/lib/PhoneNumberLink/index.js +1 -1
- package/lib/Picker/AbstractPicker.js +26 -28
- package/lib/Popover/index.js +9 -12
- package/lib/Popover/item.js +22 -26
- package/lib/Progress/index.js +10 -8
- package/lib/Radio/Radio.js +13 -15
- package/lib/Radio/RadioItem.js +18 -18
- package/lib/RateFormatter/index.js +2 -2
- package/lib/RoleStatusEditor/index.js +1 -1
- package/lib/RowExpand/index.js +7 -6
- package/lib/RowExpandDialog/body/index.js +14 -14
- package/lib/RowExpandDialog/column-content/index.js +1 -1
- package/lib/RowExpandDialog/header/index.js +4 -3
- package/lib/RowExpandDialog/index.js +43 -32
- package/lib/RowExpandEditor/add-btn/index.js +7 -6
- package/lib/RowExpandEditor/checkbox-editor/index.js +7 -6
- package/lib/RowExpandEditor/collaborator-editor/index.js +7 -6
- package/lib/RowExpandEditor/date-editor/index.js +7 -6
- package/lib/RowExpandEditor/department-editor/index.js +7 -6
- package/lib/RowExpandEditor/digital-sign-editor/index.js +7 -6
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +4 -4
- package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +4 -4
- package/lib/RowExpandEditor/duration-editor/index.js +7 -6
- package/lib/RowExpandEditor/email-editor/index.js +7 -6
- package/lib/RowExpandEditor/email-editor/mb-editor/index.js +1 -1
- package/lib/RowExpandEditor/email-editor/pc-editor/index.js +1 -1
- package/lib/RowExpandEditor/file-editor/index.js +7 -6
- package/lib/RowExpandEditor/geolocation-editor/index.js +7 -6
- package/lib/RowExpandEditor/image-editor/index.js +7 -6
- package/lib/RowExpandEditor/image-editor/mb-editor/index.js +1 -1
- package/lib/RowExpandEditor/image-editor/pc-editor/index.js +1 -1
- package/lib/RowExpandEditor/index.js +11 -10
- package/lib/RowExpandEditor/long-text-editor/index.js +7 -6
- package/lib/RowExpandEditor/multiple-select-editor/index.js +7 -6
- package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +1 -1
- package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +5 -5
- package/lib/RowExpandEditor/number-editor/index.js +7 -6
- package/lib/RowExpandEditor/rate-editor/index.js +7 -6
- package/lib/RowExpandEditor/rate-editor/mb-editor.js +1 -1
- package/lib/RowExpandEditor/rate-editor/pc-editor.js +5 -5
- package/lib/RowExpandEditor/single-select-editor/index.js +7 -6
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +4 -4
- package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +3 -3
- package/lib/RowExpandEditor/text-editor/index.js +7 -6
- package/lib/RowExpandEditor/url-editor/index.js +7 -6
- package/lib/RowExpandEditor/url-editor/mb-editor/index.js +2 -2
- package/lib/RowExpandEditor/url-editor/pc-editor/index.js +2 -2
- package/lib/RowExpandFormatter/department-formatter/index.js +6 -3
- package/lib/RowExpandFormatter/email-formatter/index.js +1 -1
- package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +2 -2
- package/lib/RowExpandFormatter/formula-formatter/index.js +17 -11
- package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +2 -2
- package/lib/RowExpandFormatter/index.js +11 -7
- package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +1 -1
- package/lib/RowExpandFormatter/link-formatter/index.js +6 -6
- package/lib/RowExpandFormatter/rate-formatter/index.js +2 -2
- package/lib/RowExpandFormatter/url-formatter/index.js +2 -2
- package/lib/RowExpandView/body/index.js +13 -15
- package/lib/RowExpandView/index.js +39 -28
- package/lib/SelectOptionGroup/index.js +1 -1
- package/lib/SelectedDepartments/index.js +3 -3
- package/lib/SimpleLongTextFormatter/index.js +2 -2
- package/lib/SingleSelectEditor/index.js +6 -8
- package/lib/TabBar/Tab.js +10 -10
- package/lib/TabBar/index.js +7 -6
- package/lib/Tabs/index.js +10 -9
- package/lib/TextareaItem/index.js +43 -45
- package/lib/Toast/index.js +5 -5
- package/lib/formatterConfig/index.js +3 -3
- package/lib/locales/de.json +5 -5
- package/lib/locales/en.json +5 -6
- package/lib/locales/es.json +5 -5
- package/lib/locales/fr.json +5 -5
- package/lib/locales/pt.json +5 -5
- package/lib/locales/ru.json +5 -5
- package/lib/locales/zh-CN.json +5 -5
- package/lib/select-editor/index.js +15 -14
- package/lib/select-editor/pc-editor/index.js +5 -5
- package/lib/toaster/alert.js +1 -1
- package/lib/toaster/toast.js +1 -1
- package/lib/toaster/toastManager.js +12 -14
- package/lib/toaster/toaster.js +12 -9
- package/lib/utils/class.js +3 -3
- package/lib/utils/departments.js +3 -4
- package/lib/utils/getLocale.js +11 -5
- package/lib/utils/object-utils.js +5 -4
- package/lib/utils/url.js +4 -4
- package/package.json +14 -15
package/lib/InputItem/index.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
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 = void 0;
|
|
9
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
10
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
11
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
10
|
var PropTypes = _interopRequireWildcard(require("prop-types"));
|
|
13
11
|
var React = _interopRequireWildcard(require("react"));
|
|
@@ -17,8 +15,8 @@ var _customInput = _interopRequireDefault(require("./custom-input"));
|
|
|
17
15
|
var _input = _interopRequireDefault(require("./input"));
|
|
18
16
|
require("./style/index.css");
|
|
19
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
-
const _excluded = ["prefixCls", "prefixListCls", "editable", "style", "clear", "children", "error", "className", "extra", "labelNumber", "type", "onExtraClick", "onErrorClick", "moneyKeyboardAlign", "moneyKeyboardWrapProps", "moneyKeyboardHeader", "onVirtualKeyboardConfirm", "autoAdjustHeight", "disabledKeys"];
|
|
21
18
|
/* tslint:disable:jsx-no-multiline-js */
|
|
19
|
+
|
|
22
20
|
function noop() {}
|
|
23
21
|
function normalizeValue(value) {
|
|
24
22
|
if (typeof value === 'undefined' || value === null) {
|
|
@@ -58,9 +56,9 @@ class InputItem extends React.Component {
|
|
|
58
56
|
ctrlValue = rawVal.replace(/\D/g, '').substring(0, 11);
|
|
59
57
|
const valueLen = ctrlValue.length;
|
|
60
58
|
if (valueLen > 3 && valueLen < 8) {
|
|
61
|
-
ctrlValue =
|
|
59
|
+
ctrlValue = `${ctrlValue.substr(0, 3)} ${ctrlValue.substr(3)}`;
|
|
62
60
|
} else if (valueLen >= 8) {
|
|
63
|
-
ctrlValue =
|
|
61
|
+
ctrlValue = `${ctrlValue.substr(0, 3)} ${ctrlValue.substr(3, 4)} ${ctrlValue.substr(7)}`;
|
|
64
62
|
}
|
|
65
63
|
break;
|
|
66
64
|
case 'number':
|
|
@@ -222,30 +220,32 @@ class InputItem extends React.Component {
|
|
|
222
220
|
}
|
|
223
221
|
}
|
|
224
222
|
render() {
|
|
225
|
-
const props =
|
|
223
|
+
const props = {
|
|
224
|
+
...this.props
|
|
225
|
+
};
|
|
226
226
|
delete props.updatePlaceholder;
|
|
227
227
|
const {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
228
|
+
prefixCls,
|
|
229
|
+
prefixListCls,
|
|
230
|
+
editable,
|
|
231
|
+
style,
|
|
232
|
+
clear,
|
|
233
|
+
children,
|
|
234
|
+
error,
|
|
235
|
+
className,
|
|
236
|
+
extra,
|
|
237
|
+
labelNumber,
|
|
238
|
+
type,
|
|
239
|
+
onExtraClick,
|
|
240
|
+
onErrorClick,
|
|
241
|
+
moneyKeyboardAlign,
|
|
242
|
+
moneyKeyboardWrapProps,
|
|
243
|
+
moneyKeyboardHeader,
|
|
244
|
+
onVirtualKeyboardConfirm,
|
|
245
|
+
autoAdjustHeight,
|
|
246
|
+
disabledKeys,
|
|
247
|
+
...restProps
|
|
248
|
+
} = props;
|
|
249
249
|
const {
|
|
250
250
|
name,
|
|
251
251
|
disabled,
|
|
@@ -266,21 +266,21 @@ class InputItem extends React.Component {
|
|
|
266
266
|
focus,
|
|
267
267
|
placeholder
|
|
268
268
|
} = this.state;
|
|
269
|
-
const wrapCls = (0, _classnames.default)(
|
|
270
|
-
[
|
|
271
|
-
[
|
|
272
|
-
[
|
|
273
|
-
[
|
|
269
|
+
const wrapCls = (0, _classnames.default)(`${prefixListCls}-item`, `${prefixCls}-item`, `${prefixListCls}-item-middle`, className, {
|
|
270
|
+
[`${prefixCls}-disabled`]: disabled,
|
|
271
|
+
[`${prefixCls}-error`]: error,
|
|
272
|
+
[`${prefixCls}-focus`]: focus,
|
|
273
|
+
[`${prefixCls}-android`]: focus
|
|
274
274
|
});
|
|
275
|
-
const labelCls = (0, _classnames.default)(
|
|
276
|
-
[
|
|
277
|
-
[
|
|
278
|
-
[
|
|
279
|
-
[
|
|
280
|
-
[
|
|
281
|
-
[
|
|
275
|
+
const labelCls = (0, _classnames.default)(`${prefixCls}-label`, {
|
|
276
|
+
[`${prefixCls}-label-2`]: labelNumber === 2,
|
|
277
|
+
[`${prefixCls}-label-3`]: labelNumber === 3,
|
|
278
|
+
[`${prefixCls}-label-4`]: labelNumber === 4,
|
|
279
|
+
[`${prefixCls}-label-5`]: labelNumber === 5,
|
|
280
|
+
[`${prefixCls}-label-6`]: labelNumber === 6,
|
|
281
|
+
[`${prefixCls}-label-7`]: labelNumber === 7
|
|
282
282
|
});
|
|
283
|
-
const controlCls =
|
|
283
|
+
const controlCls = `${prefixCls}-control`;
|
|
284
284
|
let inputType = 'text';
|
|
285
285
|
if (type === 'bankCard' || type === 'phone') {
|
|
286
286
|
inputType = 'tel';
|
|
@@ -306,7 +306,7 @@ class InputItem extends React.Component {
|
|
|
306
306
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
307
307
|
className: wrapCls,
|
|
308
308
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
309
|
-
className:
|
|
309
|
+
className: `${prefixListCls}-line`,
|
|
310
310
|
children: [children ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
311
311
|
className: labelCls,
|
|
312
312
|
children: children
|
|
@@ -334,7 +334,10 @@ class InputItem extends React.Component {
|
|
|
334
334
|
moneyKeyboardHeader: moneyKeyboardHeader,
|
|
335
335
|
autoAdjustHeight: autoAdjustHeight,
|
|
336
336
|
disabledKeys: disabledKeys
|
|
337
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_input.default,
|
|
337
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_input.default, {
|
|
338
|
+
...patternProps,
|
|
339
|
+
...restProps,
|
|
340
|
+
...classNameProps,
|
|
338
341
|
value: normalizeValue(value),
|
|
339
342
|
defaultValue: undefined,
|
|
340
343
|
ref: el => this.inputRef = el,
|
|
@@ -348,18 +351,18 @@ class InputItem extends React.Component {
|
|
|
348
351
|
onBlur: this.onInputBlur,
|
|
349
352
|
readOnly: !editable,
|
|
350
353
|
disabled: disabled
|
|
351
|
-
})
|
|
352
|
-
}), clear && editable && !disabled && value &&
|
|
353
|
-
activeClassName:
|
|
354
|
+
})
|
|
355
|
+
}), clear && editable && !disabled && value && `${value}`.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcFeedback.default, {
|
|
356
|
+
activeClassName: `${prefixCls}-clear-active`,
|
|
354
357
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
355
|
-
className:
|
|
358
|
+
className: `${prefixCls}-clear`,
|
|
356
359
|
onClick: this.clearInput
|
|
357
360
|
})
|
|
358
361
|
}) : null, error ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
359
|
-
className:
|
|
362
|
+
className: `${prefixCls}-error-extra`,
|
|
360
363
|
onClick: onErrorClick
|
|
361
364
|
}) : null, extra !== '' ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
362
|
-
className:
|
|
365
|
+
className: `${prefixCls}-extra`,
|
|
363
366
|
onClick: onExtraClick,
|
|
364
367
|
children: extra
|
|
365
368
|
}) : null]
|
package/lib/InputItem/input.js
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
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;
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
10
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
11
8
|
var React = _interopRequireWildcard(require("react"));
|
|
12
9
|
require("./style/index.css");
|
|
13
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
-
const _excluded = ["onBlur", "onFocus"];
|
|
15
11
|
class Input extends React.Component {
|
|
16
12
|
constructor() {
|
|
17
13
|
super(...arguments);
|
|
@@ -35,17 +31,17 @@ class Input extends React.Component {
|
|
|
35
31
|
};
|
|
36
32
|
}
|
|
37
33
|
render() {
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("input", (0, _objectSpread2.default)({
|
|
34
|
+
const {
|
|
35
|
+
onBlur,
|
|
36
|
+
onFocus,
|
|
37
|
+
...restProps
|
|
38
|
+
} = this.props;
|
|
39
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
45
40
|
ref: el => this.inputRef = el,
|
|
46
41
|
onBlur: this.onInputBlur,
|
|
47
|
-
onFocus: this.onInputFocus
|
|
48
|
-
|
|
42
|
+
onFocus: this.onInputFocus,
|
|
43
|
+
...restProps
|
|
44
|
+
});
|
|
49
45
|
}
|
|
50
46
|
}
|
|
51
47
|
var _default = exports.default = Input;
|
|
@@ -5,7 +5,6 @@ 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
8
|
var _react = _interopRequireDefault(require("react"));
|
|
10
9
|
var _lang = require("../../lang");
|
|
11
10
|
require("./index.css");
|
|
@@ -51,7 +50,9 @@ class PCLinkEditorPopover extends _react.default.Component {
|
|
|
51
50
|
let {
|
|
52
51
|
searchValue
|
|
53
52
|
} = this.state;
|
|
54
|
-
let popoverStyle = Object.assign({},
|
|
53
|
+
let popoverStyle = Object.assign({}, {
|
|
54
|
+
...popoverPosition
|
|
55
|
+
}, {
|
|
55
56
|
position: 'absolute'
|
|
56
57
|
});
|
|
57
58
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
package/lib/List/index.js
CHANGED
|
@@ -1,47 +1,43 @@
|
|
|
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 = void 0;
|
|
9
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
10
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
11
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
10
|
var React = _interopRequireWildcard(require("react"));
|
|
13
11
|
var _listItem = _interopRequireDefault(require("./list-item"));
|
|
14
12
|
require("./index.css");
|
|
15
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
-
const _excluded = ["prefixCls", "children", "className", "style", "renderHeader", "renderFooter"];
|
|
17
14
|
class List extends React.Component {
|
|
18
15
|
render() {
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
restProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
16
|
+
const {
|
|
17
|
+
prefixCls,
|
|
18
|
+
children,
|
|
19
|
+
className,
|
|
20
|
+
style,
|
|
21
|
+
renderHeader,
|
|
22
|
+
renderFooter,
|
|
23
|
+
...restProps
|
|
24
|
+
} = this.props;
|
|
29
25
|
const wrapCls = (0, _classnames.default)(prefixCls, className);
|
|
30
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div",
|
|
26
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
31
27
|
className: wrapCls,
|
|
32
|
-
style: style
|
|
33
|
-
|
|
28
|
+
style: style,
|
|
29
|
+
...restProps,
|
|
34
30
|
children: [renderHeader ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
35
|
-
className:
|
|
31
|
+
className: `${prefixCls}-header`,
|
|
36
32
|
children: typeof renderHeader === 'function' ? renderHeader() : renderHeader
|
|
37
33
|
}) : null, children ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
38
|
-
className:
|
|
34
|
+
className: `${prefixCls}-body`,
|
|
39
35
|
children: children
|
|
40
36
|
}) : null, renderFooter ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
41
|
-
className:
|
|
37
|
+
className: `${prefixCls}-footer`,
|
|
42
38
|
children: typeof renderFooter === 'function' ? renderFooter() : renderFooter
|
|
43
39
|
}) : null]
|
|
44
|
-
})
|
|
40
|
+
});
|
|
45
41
|
}
|
|
46
42
|
}
|
|
47
43
|
List.defaultProps = {
|
package/lib/List/list-item.js
CHANGED
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = exports.Brief = void 0;
|
|
9
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
10
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
11
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
10
|
var React = _interopRequireWildcard(require("react"));
|
|
13
11
|
var _rmcFeedback = _interopRequireDefault(require("rmc-feedback"));
|
|
14
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
const _excluded = ["prefixCls", "className", "activeStyle", "error", "align", "wrap", "disabled", "children", "multipleLine", "thumb", "extra", "arrow", "onClick"],
|
|
16
|
-
_excluded2 = ["platform"];
|
|
17
13
|
/* tslint:disable:jsx-no-multiline-js */
|
|
14
|
+
|
|
18
15
|
class Brief extends React.Component {
|
|
19
16
|
render() {
|
|
20
17
|
return /*#__PURE__*/React.createElement('div', {
|
|
@@ -44,10 +41,10 @@ class ListItem extends React.Component {
|
|
|
44
41
|
const pointX = ev.clientX - ClientRect.left - Item.offsetWidth / 2;
|
|
45
42
|
const pointY = ev.clientY - ClientRect.top - Item.offsetWidth / 2;
|
|
46
43
|
const coverRippleStyle = {
|
|
47
|
-
width:
|
|
48
|
-
height:
|
|
49
|
-
left:
|
|
50
|
-
top:
|
|
44
|
+
width: `${RippleWidth}px`,
|
|
45
|
+
height: `${RippleWidth}px`,
|
|
46
|
+
left: `${pointX}px`,
|
|
47
|
+
top: `${pointY}px`
|
|
51
48
|
};
|
|
52
49
|
this.setState({
|
|
53
50
|
coverRippleStyle,
|
|
@@ -81,57 +78,57 @@ class ListItem extends React.Component {
|
|
|
81
78
|
}
|
|
82
79
|
}
|
|
83
80
|
render() {
|
|
84
|
-
const _this$props = this.props,
|
|
85
|
-
{
|
|
86
|
-
prefixCls,
|
|
87
|
-
className,
|
|
88
|
-
activeStyle,
|
|
89
|
-
error,
|
|
90
|
-
align,
|
|
91
|
-
wrap,
|
|
92
|
-
disabled,
|
|
93
|
-
children,
|
|
94
|
-
multipleLine,
|
|
95
|
-
thumb,
|
|
96
|
-
extra,
|
|
97
|
-
arrow,
|
|
98
|
-
onClick
|
|
99
|
-
} = _this$props,
|
|
100
|
-
restProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
101
81
|
const {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
82
|
+
prefixCls,
|
|
83
|
+
className,
|
|
84
|
+
activeStyle,
|
|
85
|
+
error,
|
|
86
|
+
align,
|
|
87
|
+
wrap,
|
|
88
|
+
disabled,
|
|
89
|
+
children,
|
|
90
|
+
multipleLine,
|
|
91
|
+
thumb,
|
|
92
|
+
extra,
|
|
93
|
+
arrow,
|
|
94
|
+
onClick,
|
|
95
|
+
...restProps
|
|
96
|
+
} = this.props;
|
|
97
|
+
const {
|
|
98
|
+
platform,
|
|
99
|
+
...otherProps
|
|
100
|
+
} = restProps;
|
|
105
101
|
const {
|
|
106
102
|
coverRippleStyle,
|
|
107
103
|
RippleClicked
|
|
108
104
|
} = this.state;
|
|
109
|
-
const wrapCls = (0, _classnames.default)(
|
|
110
|
-
[
|
|
111
|
-
[
|
|
112
|
-
[
|
|
113
|
-
[
|
|
114
|
-
[
|
|
105
|
+
const wrapCls = (0, _classnames.default)(`${prefixCls}-item`, className, {
|
|
106
|
+
[`${prefixCls}-item-disabled`]: disabled,
|
|
107
|
+
[`${prefixCls}-item-error`]: error,
|
|
108
|
+
[`${prefixCls}-item-top`]: align === 'top',
|
|
109
|
+
[`${prefixCls}-item-middle`]: align === 'middle',
|
|
110
|
+
[`${prefixCls}-item-bottom`]: align === 'bottom'
|
|
115
111
|
});
|
|
116
|
-
const rippleCls = (0, _classnames.default)(
|
|
117
|
-
[
|
|
112
|
+
const rippleCls = (0, _classnames.default)(`${prefixCls}-ripple`, {
|
|
113
|
+
[`${prefixCls}-ripple-animate`]: RippleClicked
|
|
118
114
|
});
|
|
119
|
-
const lineCls = (0, _classnames.default)(
|
|
120
|
-
[
|
|
121
|
-
[
|
|
115
|
+
const lineCls = (0, _classnames.default)(`${prefixCls}-line`, {
|
|
116
|
+
[`${prefixCls}-line-multiple`]: multipleLine,
|
|
117
|
+
[`${prefixCls}-line-wrap`]: wrap
|
|
122
118
|
});
|
|
123
|
-
const arrowCls = (0, _classnames.default)(
|
|
124
|
-
[
|
|
125
|
-
[
|
|
126
|
-
[
|
|
119
|
+
const arrowCls = (0, _classnames.default)(`${prefixCls}-arrow`, {
|
|
120
|
+
[`${prefixCls}-arrow-horizontal`]: arrow === 'horizontal',
|
|
121
|
+
[`${prefixCls}-arrow-vertical`]: arrow === 'down' || arrow === 'up',
|
|
122
|
+
[`${prefixCls}-arrow-vertical-up`]: arrow === 'up'
|
|
127
123
|
});
|
|
128
|
-
const content = /*#__PURE__*/(0, _jsxRuntime.jsxs)("div",
|
|
124
|
+
const content = /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
125
|
+
...otherProps,
|
|
129
126
|
onClick: ev => {
|
|
130
127
|
this.onClick(ev);
|
|
131
128
|
},
|
|
132
129
|
className: wrapCls,
|
|
133
130
|
children: [thumb ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
134
|
-
className:
|
|
131
|
+
className: `${prefixCls}-thumb`,
|
|
135
132
|
children: typeof thumb === 'string' ? /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
136
133
|
src: thumb,
|
|
137
134
|
alt: ""
|
|
@@ -139,10 +136,10 @@ class ListItem extends React.Component {
|
|
|
139
136
|
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
140
137
|
className: lineCls,
|
|
141
138
|
children: [children !== undefined && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
142
|
-
className:
|
|
139
|
+
className: `${prefixCls}-content`,
|
|
143
140
|
children: children
|
|
144
141
|
}), extra !== undefined && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
145
|
-
className:
|
|
142
|
+
className: `${prefixCls}-extra`,
|
|
146
143
|
children: extra
|
|
147
144
|
}), arrow && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
148
145
|
className: arrowCls,
|
|
@@ -152,7 +149,7 @@ class ListItem extends React.Component {
|
|
|
152
149
|
style: coverRippleStyle,
|
|
153
150
|
className: rippleCls
|
|
154
151
|
})]
|
|
155
|
-
})
|
|
152
|
+
});
|
|
156
153
|
let touchProps = {};
|
|
157
154
|
Object.keys(otherProps).forEach(key => {
|
|
158
155
|
if (/onTouch/i.test(key)) {
|
|
@@ -160,12 +157,13 @@ class ListItem extends React.Component {
|
|
|
160
157
|
delete otherProps[key];
|
|
161
158
|
}
|
|
162
159
|
});
|
|
163
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcFeedback.default,
|
|
160
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcFeedback.default, {
|
|
161
|
+
...touchProps,
|
|
164
162
|
disabled: disabled || !onClick,
|
|
165
163
|
activeStyle: activeStyle,
|
|
166
|
-
activeClassName:
|
|
164
|
+
activeClassName: `${prefixCls}-item-active`,
|
|
167
165
|
children: content
|
|
168
|
-
})
|
|
166
|
+
});
|
|
169
167
|
}
|
|
170
168
|
}
|
|
171
169
|
ListItem.defaultProps = {
|
|
@@ -18,7 +18,7 @@ class MBEditorHeader extends _react.default.Component {
|
|
|
18
18
|
onRightClick
|
|
19
19
|
} = this.props;
|
|
20
20
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
21
|
-
className:
|
|
21
|
+
className: `dtable-ui-mb-editor-header ${titleClass ? titleClass : ''}`,
|
|
22
22
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
23
23
|
className: "editor-header-left-content",
|
|
24
24
|
onClick: onLeftClick,
|
|
@@ -17,7 +17,7 @@ const Body = _ref => {
|
|
|
17
17
|
} = _ref;
|
|
18
18
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
19
19
|
className: (0, _classnames.default)('dtable-ui-mobile-full-screen-page-body', className, {
|
|
20
|
-
[
|
|
20
|
+
[`${classNamePrefix}-mobile-full-screen-page-body`]: classNamePrefix
|
|
21
21
|
}),
|
|
22
22
|
children: children
|
|
23
23
|
});
|
|
@@ -18,22 +18,22 @@ const Header = _ref => {
|
|
|
18
18
|
} = _ref;
|
|
19
19
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
20
20
|
className: (0, _classnames.default)('dtable-ui-mobile-full-screen-page-header p-0', {
|
|
21
|
-
[
|
|
21
|
+
[`${classNamePrefix}-mobile-full-screen-page-header`]: classNamePrefix
|
|
22
22
|
}),
|
|
23
23
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
24
24
|
className: (0, _classnames.default)('dtable-ui-mobile-full-screen-page-header-btn', {
|
|
25
|
-
[
|
|
25
|
+
[`${classNamePrefix}-mobile-full-screen-page-header-btn`]: classNamePrefix
|
|
26
26
|
}),
|
|
27
27
|
onClick: onLeftClick,
|
|
28
28
|
children: children[0]
|
|
29
29
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("h4", {
|
|
30
30
|
className: (0, _classnames.default)('dtable-ui-mobile-full-screen-page-header-title', {
|
|
31
|
-
[
|
|
31
|
+
[`${classNamePrefix}-mobile-full-screen-page-header-title`]: classNamePrefix
|
|
32
32
|
}),
|
|
33
33
|
children: children[1]
|
|
34
34
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
35
35
|
className: (0, _classnames.default)('dtable-ui-mobile-full-screen-page-header-btn', {
|
|
36
|
-
[
|
|
36
|
+
[`${classNamePrefix}-mobile-full-screen-page-header-btn`]: classNamePrefix
|
|
37
37
|
}),
|
|
38
38
|
onClick: onRightClick,
|
|
39
39
|
children: children[2]
|
|
@@ -64,7 +64,7 @@ const MobileFullScreenPage = _ref => {
|
|
|
64
64
|
node: element,
|
|
65
65
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
66
66
|
className: (0, _classnames.default)('dtable-ui-mobile-full-screen-page', className, {
|
|
67
|
-
[
|
|
67
|
+
[`${classNamePrefix}-mobile-full-screen-page`]: classNamePrefix
|
|
68
68
|
}),
|
|
69
69
|
style: style,
|
|
70
70
|
children: isMount && children
|
package/lib/MobileModal/index.js
CHANGED
|
@@ -5,12 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
9
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
9
|
var _Modal = _interopRequireDefault(require("../Modal"));
|
|
12
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
const _excluded = ["children"];
|
|
14
11
|
class MobileModal extends _react.default.PureComponent {
|
|
15
12
|
constructor() {
|
|
16
13
|
super(...arguments);
|
|
@@ -27,15 +24,15 @@ class MobileModal extends _react.default.PureComponent {
|
|
|
27
24
|
window.removeEventListener('popstate', this.handleHistoryBack, false);
|
|
28
25
|
}
|
|
29
26
|
render() {
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
27
|
+
const {
|
|
28
|
+
children,
|
|
29
|
+
...props
|
|
30
|
+
} = this.props;
|
|
31
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Modal.default, {
|
|
32
|
+
...props,
|
|
36
33
|
popup: true,
|
|
37
34
|
children: children
|
|
38
|
-
})
|
|
35
|
+
});
|
|
39
36
|
}
|
|
40
37
|
}
|
|
41
38
|
MobileModal.defaultProps = {
|
package/lib/Modal/alert.js
CHANGED
|
@@ -59,7 +59,7 @@ function alert(title, message) {
|
|
|
59
59
|
if (!/iPhone|iPod|iPad/i.test(navigator.userAgent)) {
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
|
-
const pNode = (0, _closest.default)(e.target,
|
|
62
|
+
const pNode = (0, _closest.default)(e.target, `.${prefixCls}-footer`);
|
|
63
63
|
if (!pNode) {
|
|
64
64
|
e.preventDefault();
|
|
65
65
|
}
|
|
@@ -78,7 +78,7 @@ function alert(title, message) {
|
|
|
78
78
|
onTouchStart: onWrapTouchStart
|
|
79
79
|
},
|
|
80
80
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
81
|
-
className:
|
|
81
|
+
className: `${prefixCls}-alert-content`,
|
|
82
82
|
children: message
|
|
83
83
|
})
|
|
84
84
|
}));
|