dtable-ui-component 6.0.54 → 6.0.55-beta.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 +21 -21
- package/lib/ActivityIndicator/index.js +9 -9
- package/lib/AsyncUserSelect/index.js +3 -3
- package/lib/Badge/index.js +10 -10
- package/lib/CheckboxEditor/mb-editor.js +2 -10
- package/lib/CheckboxEditor/pc-editor.js +2 -10
- package/lib/CheckboxFormatter/index.js +4 -13
- package/lib/CollaboratorEditor/pc-editor/index.js +1 -1
- package/lib/CollapsibleSettingLayout/index.js +1 -1
- package/lib/Comment/body/comment.js +1 -1
- package/lib/Comment/footer/index.js +1 -1
- package/lib/Comment/footer/input/index.js +5 -5
- package/lib/Comment/footer/input/participant/index.js +1 -1
- package/lib/Comment/footer/participants/participant-select/index.js +2 -2
- package/lib/Comment/utils/utilities.js +1 -1
- package/lib/DTableColorPicker/ColorPickerPortal/index.js +4 -4
- package/lib/DTableColorPicker/index.js +6 -6
- package/lib/DTableColorPicker/utils.js +1 -1
- package/lib/DTableColumnIcon/index.js +71 -0
- package/lib/DTableCommonAddTool/index.js +2 -2
- package/lib/DTableFiltersPopover/index.js +1 -1
- package/lib/DTableFiltersPopover/utils/filter-item-utils.js +7 -4
- package/lib/DTableFiltersPopover/utils/index.js +92 -27
- package/lib/DTableFiltersPopover/widgets/filter-group.js +2 -2
- package/lib/DTableFiltersPopover/widgets/filter-item.js +2 -2
- package/lib/DTableFiltersPopover/widgets/filter-list/index.css +4 -2
- package/lib/DTableFiltersPopover/widgets/filter-list/index.js +1 -1
- package/lib/DTableFiltersPopover/widgets/rate-item.js +2 -2
- package/lib/DTableGroupSelect/select-option-group.js +1 -1
- package/lib/{SvgIcon → DTableIcon}/index.css +2 -2
- package/lib/DTableIcon/index.js +44 -0
- package/lib/DTableIcon/svg-icon.js +56 -0
- package/lib/DTableRadioGroup/index.js +3 -3
- package/lib/DTableSearchInput/index.js +1 -1
- package/lib/DTableSelect/dtable-select-label.js +1 -1
- package/lib/DTableSelect/utils.js +3 -0
- package/lib/DTableSwitch/index.css +2 -1
- package/lib/DateEditor/pc-editor.js +1 -1
- package/lib/DatePicker/utils.js +4 -4
- package/lib/DepartmentMultipleSelectEditor/index.js +3 -3
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +2 -2
- package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +2 -2
- package/lib/DigitalSignEditor/service.js +1 -1
- package/lib/DigitalSignEditor/signature-board/index.js +2 -2
- package/lib/DigitalSignFormatter/utils.js +1 -1
- package/lib/FieldDisplaySetting/field-item.js +9 -4
- package/lib/FieldDisplaySetting/index.js +6 -6
- package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +2 -2
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +3 -3
- package/lib/FileEditor/pc-editor/addition-previewer/index.js +1 -1
- package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +6 -6
- package/lib/FileFormatter/index.js +1 -1
- package/lib/FileItemFormatter/index.js +1 -1
- package/lib/FileUploader/index.js +1 -1
- package/lib/FormulaFormatter/index.js +4 -4
- package/lib/GeolocationEditor/index.js +3 -3
- package/lib/GeolocationEditor/map-editor-utils.js +2 -2
- package/lib/GeolocationEditor/pc-editor/country-editor.js +2 -2
- package/lib/GeolocationEditor/pc-editor/location-editor.js +2 -2
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +20 -3
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +20 -3
- package/lib/GeolocationEditor/pc-editor/province-city-editor.js +1 -1
- package/lib/GeolocationEditor/pc-editor/province-editor.js +3 -3
- package/lib/GeolocationEditor/pc-editor/selector-list.js +1 -1
- package/lib/HtmlLongTextFormatter/index.js +1 -1
- package/lib/Icon/index.js +2 -2
- package/lib/Icon/load-sprite.js +13 -2
- package/lib/IconButton/index.js +1 -1
- package/lib/ImageEditor/images-previewer/image-preview/index.js +1 -1
- package/lib/ImageEditor/pc-editor/addition-previewer/index.js +2 -2
- package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +5 -5
- package/lib/ImageEditor/pc-editor/images-previewer/index.js +1 -1
- package/lib/ImageFormatter/index.js +1 -1
- package/lib/ImageThumbnail/index.js +2 -2
- package/lib/InputItem/custom-input.js +9 -9
- package/lib/InputItem/custom-keyboard.js +5 -5
- package/lib/InputItem/index.js +21 -21
- package/lib/List/index.js +3 -3
- package/lib/List/list-item.js +23 -23
- package/lib/MBEditorHeader/index.js +1 -1
- package/lib/MobileFullScreenPage/body/index.js +1 -1
- package/lib/MobileFullScreenPage/header/index.js +4 -4
- package/lib/MobileFullScreenPage/index.js +1 -1
- package/lib/Modal/alert.js +3 -3
- package/lib/Modal/modal.js +8 -8
- package/lib/Modal/operation.js +1 -1
- package/lib/Modal/prompt.js +11 -11
- package/lib/MultipleSelectFormatter/index.js +1 -1
- package/lib/PhoneNumberLink/index.js +29 -0
- package/lib/Popover/index.js +1 -1
- package/lib/Popover/item.js +7 -7
- package/lib/Progress/index.js +6 -6
- package/lib/Radio/Radio.js +1 -1
- package/lib/Radio/RadioItem.js +2 -2
- package/lib/RateFormatter/index.js +3 -3
- package/lib/RoleStatusEditor/index.js +1 -1
- package/lib/RowExpandDialog/body/index.js +1 -1
- package/lib/RowExpandDialog/column-content/index.css +4 -2
- package/lib/RowExpandDialog/column-content/index.js +7 -4
- package/lib/RowExpandDialog/header/index.js +1 -1
- package/lib/RowExpandDialog/index.js +3 -3
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +1 -1
- package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +1 -1
- package/lib/RowExpandEditor/email-editor/mb-editor/index.js +1 -1
- package/lib/RowExpandEditor/email-editor/pc-editor/index.js +1 -1
- package/lib/RowExpandEditor/image-editor/mb-editor/index.js +1 -1
- package/lib/RowExpandEditor/image-editor/pc-editor/index.js +1 -1
- package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +1 -1
- package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +5 -5
- package/lib/RowExpandEditor/rate-editor/mb-editor.js +1 -1
- package/lib/RowExpandEditor/rate-editor/pc-editor.js +2 -2
- package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +3 -3
- package/lib/RowExpandEditor/url-editor/mb-editor/index.js +1 -1
- package/lib/RowExpandEditor/url-editor/pc-editor/index.js +1 -1
- package/lib/RowExpandFormatter/constants.js +2 -2
- package/lib/RowExpandFormatter/email-formatter/index.css +1 -29
- package/lib/RowExpandFormatter/email-formatter/index.js +4 -4
- package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +2 -2
- package/lib/RowExpandFormatter/formula-formatter/index.css +2 -0
- package/lib/RowExpandFormatter/formula-formatter/index.js +22 -19
- package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +2 -2
- package/lib/RowExpandFormatter/index.css +2 -0
- package/lib/RowExpandFormatter/index.js +2 -1
- package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +1 -1
- package/lib/RowExpandFormatter/link-formatter/index.js +6 -6
- package/lib/RowExpandFormatter/rate-formatter/index.js +3 -3
- package/lib/RowExpandFormatter/text/index.css +2 -0
- package/lib/RowExpandFormatter/text/index.js +49 -0
- package/lib/RowExpandFormatter/url-formatter/index.css +1 -0
- package/lib/RowExpandFormatter/url-formatter/index.js +4 -4
- package/lib/RowExpandView/body/index.css +4 -0
- package/lib/RowExpandView/body/index.js +1 -1
- package/lib/SelectOptionGroup/index.css +5 -2
- package/lib/SelectOptionGroup/index.js +1 -1
- package/lib/SelectedDepartments/index.js +3 -3
- package/lib/SimpleLongTextFormatter/index.js +2 -2
- package/lib/TabBar/Tab.js +6 -6
- package/lib/TabBar/index.js +3 -3
- package/lib/TextareaItem/index.js +19 -19
- package/lib/Toast/index.js +5 -5
- package/lib/assets/icons/telephone.svg +14 -0
- package/lib/css/row-expand.css +27 -0
- package/lib/index.js +21 -7
- package/lib/select-editor/pc-editor/index.js +2 -2
- package/lib/toaster/alert.js +1 -1
- package/lib/toaster/toast.js +1 -1
- package/lib/toaster/toastManager.js +1 -1
- package/lib/toaster/toaster.js +1 -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 +14 -30
- package/lib/SvgIcon/index.js +0 -38
|
@@ -91,7 +91,7 @@ class ImageFormatter extends _react.default.Component {
|
|
|
91
91
|
alt: ""
|
|
92
92
|
}), value.length !== 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
93
93
|
className: "image-item-count",
|
|
94
|
-
children:
|
|
94
|
+
children: `+${value.length}`
|
|
95
95
|
})]
|
|
96
96
|
});
|
|
97
97
|
}
|
|
@@ -75,7 +75,7 @@ class ImageThumbnail extends _react.default.Component {
|
|
|
75
75
|
const {
|
|
76
76
|
mediaUrl = ''
|
|
77
77
|
} = props.config || {};
|
|
78
|
-
this.imageLoadingFailedUrl =
|
|
78
|
+
this.imageLoadingFailedUrl = `${mediaUrl}img/image-loading-failed.png`;
|
|
79
79
|
}
|
|
80
80
|
componentDidMount() {
|
|
81
81
|
this.getUrl(this.props.src);
|
|
@@ -103,7 +103,7 @@ class ImageThumbnail extends _react.default.Component {
|
|
|
103
103
|
ref: ref => this.ref = ref,
|
|
104
104
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
105
105
|
src: imageThumbnailUrl,
|
|
106
|
-
id:
|
|
106
|
+
id: `item-image-${index}`,
|
|
107
107
|
alt: ""
|
|
108
108
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
109
109
|
className: "dtable-ui-image-icons-choice",
|
|
@@ -63,7 +63,7 @@ class NumberInput extends React.Component {
|
|
|
63
63
|
if (this.props.autoAdjustHeight) {
|
|
64
64
|
this.getContainer().style.height = '0';
|
|
65
65
|
}
|
|
66
|
-
(0, _class.addClass)(customNumberKeyboard.antmKeyboard,
|
|
66
|
+
(0, _class.addClass)(customNumberKeyboard.antmKeyboard, `${this.props.keyboardPrefixCls}-wrapper-hide`);
|
|
67
67
|
}
|
|
68
68
|
// for unmount
|
|
69
69
|
this.removeBlurListener();
|
|
@@ -98,7 +98,7 @@ class NumberInput extends React.Component {
|
|
|
98
98
|
if (customNumberKeyboard.antmKeyboard) {
|
|
99
99
|
if (this.props.autoAdjustHeight) {
|
|
100
100
|
const keyBoardHeight = customNumberKeyboard.antmKeyboard.offsetHeight;
|
|
101
|
-
this.getContainer().style.height =
|
|
101
|
+
this.getContainer().style.height = `${keyBoardHeight}px`;
|
|
102
102
|
if (this.inputRef) {
|
|
103
103
|
const {
|
|
104
104
|
bottom
|
|
@@ -111,14 +111,14 @@ class NumberInput extends React.Component {
|
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
(0, _class.removeClass)(customNumberKeyboard.antmKeyboard,
|
|
114
|
+
(0, _class.removeClass)(customNumberKeyboard.antmKeyboard, `${this.props.keyboardPrefixCls}-wrapper-hide`);
|
|
115
115
|
}
|
|
116
116
|
customNumberKeyboard.confirmDisabled = value === '';
|
|
117
117
|
if (customNumberKeyboard.confirmKeyboardItem) {
|
|
118
118
|
if (value === '') {
|
|
119
|
-
(0, _class.addClass)(customNumberKeyboard.confirmKeyboardItem,
|
|
119
|
+
(0, _class.addClass)(customNumberKeyboard.confirmKeyboardItem, `${this.props.keyboardPrefixCls}-item-disabled`);
|
|
120
120
|
} else {
|
|
121
|
-
(0, _class.removeClass)(customNumberKeyboard.confirmKeyboardItem,
|
|
121
|
+
(0, _class.removeClass)(customNumberKeyboard.confirmKeyboardItem, `${this.props.keyboardPrefixCls}-item-disabled`);
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
}
|
|
@@ -179,9 +179,9 @@ class NumberInput extends React.Component {
|
|
|
179
179
|
customNumberKeyboard.confirmDisabled = valueAfterChange === '';
|
|
180
180
|
if (customNumberKeyboard.confirmKeyboardItem) {
|
|
181
181
|
if (valueAfterChange === '') {
|
|
182
|
-
(0, _class.addClass)(customNumberKeyboard.confirmKeyboardItem,
|
|
182
|
+
(0, _class.addClass)(customNumberKeyboard.confirmKeyboardItem, `${this.props.keyboardPrefixCls}-item-disabled`);
|
|
183
183
|
} else {
|
|
184
|
-
(0, _class.removeClass)(customNumberKeyboard.confirmKeyboardItem,
|
|
184
|
+
(0, _class.removeClass)(customNumberKeyboard.confirmKeyboardItem, `${this.props.keyboardPrefixCls}-item-disabled`);
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
}
|
|
@@ -248,10 +248,10 @@ class NumberInput extends React.Component {
|
|
|
248
248
|
const {
|
|
249
249
|
keyboardPrefixCls
|
|
250
250
|
} = this.props;
|
|
251
|
-
let container = document.querySelector(
|
|
251
|
+
let container = document.querySelector(`#${keyboardPrefixCls}-container`);
|
|
252
252
|
if (!container) {
|
|
253
253
|
container = document.createElement('div');
|
|
254
|
-
container.setAttribute('id',
|
|
254
|
+
container.setAttribute('id', `${keyboardPrefixCls}-container`);
|
|
255
255
|
document.body.appendChild(container);
|
|
256
256
|
}
|
|
257
257
|
this.container = container;
|
|
@@ -48,12 +48,12 @@ class KeyboardItem extends React.Component {
|
|
|
48
48
|
value = 'confirm';
|
|
49
49
|
}
|
|
50
50
|
const extraCls = {
|
|
51
|
-
[
|
|
51
|
+
[`${prefixCls}-item-disabled`]: disabled
|
|
52
52
|
};
|
|
53
|
-
const wrapCls = (0, _classnames.default)(
|
|
53
|
+
const wrapCls = (0, _classnames.default)(`${prefixCls}-item`, className, extraCls);
|
|
54
54
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcFeedback.default, {
|
|
55
55
|
disabled: disabled,
|
|
56
|
-
activeClassName:
|
|
56
|
+
activeClassName: `${prefixCls}-item-active`,
|
|
57
57
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("td", {
|
|
58
58
|
ref: tdRef
|
|
59
59
|
// tslint:disable-next-line:jsx-no-multiline-js
|
|
@@ -105,7 +105,7 @@ class CustomKeyboard extends React.Component {
|
|
|
105
105
|
onClick: this.onKeyboardClick,
|
|
106
106
|
disabled: disabled,
|
|
107
107
|
children: item
|
|
108
|
-
},
|
|
108
|
+
}, `item-${item}-${index}`);
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
111
|
render() {
|
|
@@ -117,7 +117,7 @@ class CustomKeyboard extends React.Component {
|
|
|
117
117
|
wrapProps,
|
|
118
118
|
header
|
|
119
119
|
} = this.props;
|
|
120
|
-
const wrapperCls = (0, _classnames.default)(
|
|
120
|
+
const wrapperCls = (0, _classnames.default)(`${prefixCls}-wrapper`, `${prefixCls}-wrapper-hide`);
|
|
121
121
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
122
122
|
className: wrapperCls,
|
|
123
123
|
ref: el => this.antmKeyboard = el,
|
package/lib/InputItem/index.js
CHANGED
|
@@ -56,9 +56,9 @@ class InputItem extends React.Component {
|
|
|
56
56
|
ctrlValue = rawVal.replace(/\D/g, '').substring(0, 11);
|
|
57
57
|
const valueLen = ctrlValue.length;
|
|
58
58
|
if (valueLen > 3 && valueLen < 8) {
|
|
59
|
-
ctrlValue =
|
|
59
|
+
ctrlValue = `${ctrlValue.substr(0, 3)} ${ctrlValue.substr(3)}`;
|
|
60
60
|
} else if (valueLen >= 8) {
|
|
61
|
-
ctrlValue =
|
|
61
|
+
ctrlValue = `${ctrlValue.substr(0, 3)} ${ctrlValue.substr(3, 4)} ${ctrlValue.substr(7)}`;
|
|
62
62
|
}
|
|
63
63
|
break;
|
|
64
64
|
case 'number':
|
|
@@ -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
|
|
@@ -352,17 +352,17 @@ class InputItem extends React.Component {
|
|
|
352
352
|
readOnly: !editable,
|
|
353
353
|
disabled: disabled
|
|
354
354
|
})
|
|
355
|
-
}), clear && editable && !disabled && value &&
|
|
356
|
-
activeClassName:
|
|
355
|
+
}), clear && editable && !disabled && value && `${value}`.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcFeedback.default, {
|
|
356
|
+
activeClassName: `${prefixCls}-clear-active`,
|
|
357
357
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
358
|
-
className:
|
|
358
|
+
className: `${prefixCls}-clear`,
|
|
359
359
|
onClick: this.clearInput
|
|
360
360
|
})
|
|
361
361
|
}) : null, error ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
362
|
-
className:
|
|
362
|
+
className: `${prefixCls}-error-extra`,
|
|
363
363
|
onClick: onErrorClick
|
|
364
364
|
}) : null, extra !== '' ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
365
|
-
className:
|
|
365
|
+
className: `${prefixCls}-extra`,
|
|
366
366
|
onClick: onExtraClick,
|
|
367
367
|
children: extra
|
|
368
368
|
}) : null]
|
package/lib/List/index.js
CHANGED
|
@@ -28,13 +28,13 @@ class List extends React.Component {
|
|
|
28
28
|
style: style,
|
|
29
29
|
...restProps,
|
|
30
30
|
children: [renderHeader ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
31
|
-
className:
|
|
31
|
+
className: `${prefixCls}-header`,
|
|
32
32
|
children: typeof renderHeader === 'function' ? renderHeader() : renderHeader
|
|
33
33
|
}) : null, children ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
34
|
-
className:
|
|
34
|
+
className: `${prefixCls}-body`,
|
|
35
35
|
children: children
|
|
36
36
|
}) : null, renderFooter ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
37
|
-
className:
|
|
37
|
+
className: `${prefixCls}-footer`,
|
|
38
38
|
children: typeof renderFooter === 'function' ? renderFooter() : renderFooter
|
|
39
39
|
}) : null]
|
|
40
40
|
});
|
package/lib/List/list-item.js
CHANGED
|
@@ -41,10 +41,10 @@ class ListItem extends React.Component {
|
|
|
41
41
|
const pointX = ev.clientX - ClientRect.left - Item.offsetWidth / 2;
|
|
42
42
|
const pointY = ev.clientY - ClientRect.top - Item.offsetWidth / 2;
|
|
43
43
|
const coverRippleStyle = {
|
|
44
|
-
width:
|
|
45
|
-
height:
|
|
46
|
-
left:
|
|
47
|
-
top:
|
|
44
|
+
width: `${RippleWidth}px`,
|
|
45
|
+
height: `${RippleWidth}px`,
|
|
46
|
+
left: `${pointX}px`,
|
|
47
|
+
top: `${pointY}px`
|
|
48
48
|
};
|
|
49
49
|
this.setState({
|
|
50
50
|
coverRippleStyle,
|
|
@@ -102,24 +102,24 @@ class ListItem extends React.Component {
|
|
|
102
102
|
coverRippleStyle,
|
|
103
103
|
RippleClicked
|
|
104
104
|
} = this.state;
|
|
105
|
-
const wrapCls = (0, _classnames.default)(
|
|
106
|
-
[
|
|
107
|
-
[
|
|
108
|
-
[
|
|
109
|
-
[
|
|
110
|
-
[
|
|
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'
|
|
111
111
|
});
|
|
112
|
-
const rippleCls = (0, _classnames.default)(
|
|
113
|
-
[
|
|
112
|
+
const rippleCls = (0, _classnames.default)(`${prefixCls}-ripple`, {
|
|
113
|
+
[`${prefixCls}-ripple-animate`]: RippleClicked
|
|
114
114
|
});
|
|
115
|
-
const lineCls = (0, _classnames.default)(
|
|
116
|
-
[
|
|
117
|
-
[
|
|
115
|
+
const lineCls = (0, _classnames.default)(`${prefixCls}-line`, {
|
|
116
|
+
[`${prefixCls}-line-multiple`]: multipleLine,
|
|
117
|
+
[`${prefixCls}-line-wrap`]: wrap
|
|
118
118
|
});
|
|
119
|
-
const arrowCls = (0, _classnames.default)(
|
|
120
|
-
[
|
|
121
|
-
[
|
|
122
|
-
[
|
|
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'
|
|
123
123
|
});
|
|
124
124
|
const content = /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
125
125
|
...otherProps,
|
|
@@ -128,7 +128,7 @@ class ListItem extends React.Component {
|
|
|
128
128
|
},
|
|
129
129
|
className: wrapCls,
|
|
130
130
|
children: [thumb ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
131
|
-
className:
|
|
131
|
+
className: `${prefixCls}-thumb`,
|
|
132
132
|
children: typeof thumb === 'string' ? /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
133
133
|
src: thumb,
|
|
134
134
|
alt: ""
|
|
@@ -136,10 +136,10 @@ class ListItem extends React.Component {
|
|
|
136
136
|
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
137
137
|
className: lineCls,
|
|
138
138
|
children: [children !== undefined && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
139
|
-
className:
|
|
139
|
+
className: `${prefixCls}-content`,
|
|
140
140
|
children: children
|
|
141
141
|
}), extra !== undefined && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
142
|
-
className:
|
|
142
|
+
className: `${prefixCls}-extra`,
|
|
143
143
|
children: extra
|
|
144
144
|
}), arrow && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
145
145
|
className: arrowCls,
|
|
@@ -161,7 +161,7 @@ class ListItem extends React.Component {
|
|
|
161
161
|
...touchProps,
|
|
162
162
|
disabled: disabled || !onClick,
|
|
163
163
|
activeStyle: activeStyle,
|
|
164
|
-
activeClassName:
|
|
164
|
+
activeClassName: `${prefixCls}-item-active`,
|
|
165
165
|
children: content
|
|
166
166
|
});
|
|
167
167
|
}
|
|
@@ -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/Modal/alert.js
CHANGED
|
@@ -59,12 +59,12 @@ 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
|
}
|
|
66
66
|
}
|
|
67
|
-
root.render(
|
|
67
|
+
root.render(/*#__PURE__*/(0, _jsxRuntime.jsx)(_modal.default, {
|
|
68
68
|
visible: true,
|
|
69
69
|
transparent: true,
|
|
70
70
|
title: title,
|
|
@@ -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
|
}));
|
package/lib/Modal/modal.js
CHANGED
|
@@ -36,9 +36,9 @@ class Modal extends ModalComponent {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcFeedback.default, {
|
|
39
|
-
activeClassName:
|
|
39
|
+
activeClassName: `${prefixCls}-button-active`,
|
|
40
40
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
41
|
-
className:
|
|
41
|
+
className: `${prefixCls}-button`,
|
|
42
42
|
role: "button",
|
|
43
43
|
style: buttonStyle,
|
|
44
44
|
onClick: onClickFn,
|
|
@@ -63,7 +63,7 @@ class Modal extends ModalComponent {
|
|
|
63
63
|
animationType,
|
|
64
64
|
...restProps
|
|
65
65
|
} = this.props;
|
|
66
|
-
const btnGroupClass = (0, _classnames.default)(
|
|
66
|
+
const btnGroupClass = (0, _classnames.default)(`${prefixCls}-button-group-${footer.length === 2 && !operation ? 'h' : 'v'}`, `${prefixCls}-button-group-${operation ? 'operation' : 'normal'}`);
|
|
67
67
|
const footerDom = footer.length ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
68
68
|
className: btnGroupClass,
|
|
69
69
|
role: "group",
|
|
@@ -86,13 +86,13 @@ class Modal extends ModalComponent {
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
const wrapCls = (0, _classnames.default)(wrapClassName, {
|
|
89
|
-
[
|
|
89
|
+
[`${prefixCls}-wrap-popup`]: popup
|
|
90
90
|
});
|
|
91
91
|
const cls = (0, _classnames.default)(className, {
|
|
92
|
-
[
|
|
93
|
-
[
|
|
94
|
-
[
|
|
95
|
-
[
|
|
92
|
+
[`${prefixCls}-transparent`]: transparent,
|
|
93
|
+
[`${prefixCls}-popup`]: popup,
|
|
94
|
+
[`${prefixCls}-popup-${animationType}`]: popup && animationType,
|
|
95
|
+
[`${prefixCls}-android`]: platform === 'android'
|
|
96
96
|
});
|
|
97
97
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcDialog.default, {
|
|
98
98
|
...restProps,
|
package/lib/Modal/operation.js
CHANGED
package/lib/Modal/prompt.js
CHANGED
|
@@ -17,7 +17,7 @@ function prompt(title, message, callbackOrActions) {
|
|
|
17
17
|
let placeholders = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : ['', ''];
|
|
18
18
|
let platform = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : 'ios';
|
|
19
19
|
let closed = false;
|
|
20
|
-
defaultValue = typeof defaultValue === 'string' ? defaultValue : typeof defaultValue === 'number' ?
|
|
20
|
+
defaultValue = typeof defaultValue === 'string' ? defaultValue : typeof defaultValue === 'number' ? `${defaultValue}` : '';
|
|
21
21
|
if (!callbackOrActions) {
|
|
22
22
|
// console.log('Must specify callbackOrActions');
|
|
23
23
|
return {
|
|
@@ -61,9 +61,9 @@ function prompt(title, message, callbackOrActions) {
|
|
|
61
61
|
switch (type) {
|
|
62
62
|
case 'login-password':
|
|
63
63
|
inputDom = /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
64
|
-
className:
|
|
64
|
+
className: `${prefixCls}-input-container`,
|
|
65
65
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
66
|
-
className:
|
|
66
|
+
className: `${prefixCls}-input`,
|
|
67
67
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
68
68
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
69
69
|
type: "text",
|
|
@@ -76,7 +76,7 @@ function prompt(title, message, callbackOrActions) {
|
|
|
76
76
|
})
|
|
77
77
|
})
|
|
78
78
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
79
|
-
className:
|
|
79
|
+
className: `${prefixCls}-input`,
|
|
80
80
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
81
81
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
82
82
|
type: "password",
|
|
@@ -92,9 +92,9 @@ function prompt(title, message, callbackOrActions) {
|
|
|
92
92
|
break;
|
|
93
93
|
case 'secure-text':
|
|
94
94
|
inputDom = /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
95
|
-
className:
|
|
95
|
+
className: `${prefixCls}-input-container`,
|
|
96
96
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
97
|
-
className:
|
|
97
|
+
className: `${prefixCls}-input`,
|
|
98
98
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
99
99
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
100
100
|
type: "password",
|
|
@@ -112,9 +112,9 @@ function prompt(title, message, callbackOrActions) {
|
|
|
112
112
|
case 'default':
|
|
113
113
|
default:
|
|
114
114
|
inputDom = /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
115
|
-
className:
|
|
115
|
+
className: `${prefixCls}-input-container`,
|
|
116
116
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
117
|
-
className:
|
|
117
|
+
className: `${prefixCls}-input`,
|
|
118
118
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
119
119
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
120
120
|
type: "text",
|
|
@@ -200,12 +200,12 @@ function prompt(title, message, callbackOrActions) {
|
|
|
200
200
|
if (!/iPhone|iPod|iPad/i.test(navigator.userAgent)) {
|
|
201
201
|
return;
|
|
202
202
|
}
|
|
203
|
-
const pNode = (0, _closest.default)(e.target,
|
|
203
|
+
const pNode = (0, _closest.default)(e.target, `.${prefixCls}-content`);
|
|
204
204
|
if (!pNode) {
|
|
205
205
|
e.preventDefault();
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
root.render(
|
|
208
|
+
root.render(/*#__PURE__*/(0, _jsxRuntime.jsx)(_modal.default, {
|
|
209
209
|
visible: true,
|
|
210
210
|
transparent: true,
|
|
211
211
|
prefixCls: prefixCls,
|
|
@@ -220,7 +220,7 @@ function prompt(title, message, callbackOrActions) {
|
|
|
220
220
|
onTouchStart: onWrapTouchStart
|
|
221
221
|
},
|
|
222
222
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
223
|
-
className:
|
|
223
|
+
className: `${prefixCls}-propmt-content`,
|
|
224
224
|
children: content
|
|
225
225
|
})
|
|
226
226
|
}));
|
|
@@ -24,7 +24,7 @@ class MultipleSelectFormatter extends _react.default.PureComponent {
|
|
|
24
24
|
return selectedOptions.map(option => {
|
|
25
25
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SelectItem.default, {
|
|
26
26
|
option: option
|
|
27
|
-
},
|
|
27
|
+
}, `multiple-${option.id}`);
|
|
28
28
|
});
|
|
29
29
|
};
|
|
30
30
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
|
+
var _DTableIcon = _interopRequireDefault(require("../DTableIcon"));
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
const PhoneNumberLink = _ref => {
|
|
12
|
+
let {
|
|
13
|
+
phoneNumber,
|
|
14
|
+
className
|
|
15
|
+
} = _ref;
|
|
16
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
|
|
17
|
+
className: (0, _classnames.default)(className),
|
|
18
|
+
href: `tel:${typeof phoneNumber === 'string' ? phoneNumber.trim() : ''}`,
|
|
19
|
+
tabIndex: 0,
|
|
20
|
+
"aria-label": "",
|
|
21
|
+
target: "_blank",
|
|
22
|
+
rel: "noopener noreferrer",
|
|
23
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableIcon.default, {
|
|
24
|
+
className: "jump-link-icon",
|
|
25
|
+
symbol: "telephone"
|
|
26
|
+
})
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
var _default = exports.default = PhoneNumberLink;
|
package/lib/Popover/index.js
CHANGED
|
@@ -42,7 +42,7 @@ class Popover extends React.Component {
|
|
|
42
42
|
return child;
|
|
43
43
|
});
|
|
44
44
|
const wrapperNode = /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
45
|
-
className:
|
|
45
|
+
className: `${this.props.prefixCls}-inner-wrapper`,
|
|
46
46
|
children: overlayNode
|
|
47
47
|
});
|
|
48
48
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcTooltip.default, {
|
package/lib/Popover/item.js
CHANGED
|
@@ -22,12 +22,12 @@ class Item extends React.Component {
|
|
|
22
22
|
activeStyle,
|
|
23
23
|
...restProps
|
|
24
24
|
} = this.props;
|
|
25
|
-
const cls = (0, _classnames.default)(
|
|
26
|
-
[
|
|
25
|
+
const cls = (0, _classnames.default)(`${prefixCls}-item`, className, {
|
|
26
|
+
[`${prefixCls}-item-disabled`]: disabled
|
|
27
27
|
});
|
|
28
|
-
let activeClass =
|
|
28
|
+
let activeClass = `${prefixCls}-item-active `;
|
|
29
29
|
if (firstItem) {
|
|
30
|
-
activeClass +=
|
|
30
|
+
activeClass += `${prefixCls}-item-fix-active-arrow`;
|
|
31
31
|
}
|
|
32
32
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_rmcFeedback.default, {
|
|
33
33
|
disabled: disabled,
|
|
@@ -37,16 +37,16 @@ class Item extends React.Component {
|
|
|
37
37
|
className: cls,
|
|
38
38
|
...restProps,
|
|
39
39
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
40
|
-
className:
|
|
40
|
+
className: `${prefixCls}-item-container`,
|
|
41
41
|
children: [icon ?
|
|
42
42
|
/*#__PURE__*/
|
|
43
43
|
// tslint:disable-next-line:jsx-no-multiline-js
|
|
44
44
|
(0, _jsxRuntime.jsx)("span", {
|
|
45
|
-
className:
|
|
45
|
+
className: `${prefixCls}-item-icon`,
|
|
46
46
|
"aria-hidden": "true",
|
|
47
47
|
children: icon
|
|
48
48
|
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
49
|
-
className:
|
|
49
|
+
className: `${prefixCls}-item-content`,
|
|
50
50
|
children: children
|
|
51
51
|
})]
|
|
52
52
|
})
|