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
package/lib/Progress/index.js
CHANGED
|
@@ -18,7 +18,7 @@ class Progress extends React.Component {
|
|
|
18
18
|
if (this.props.appearTransition) {
|
|
19
19
|
setTimeout(() => {
|
|
20
20
|
if (this.barRef) {
|
|
21
|
-
this.barRef.style.width =
|
|
21
|
+
this.barRef.style.width = `${this.props.percent}%`;
|
|
22
22
|
}
|
|
23
23
|
}, 10);
|
|
24
24
|
}
|
|
@@ -33,12 +33,12 @@ class Progress extends React.Component {
|
|
|
33
33
|
barStyle = {}
|
|
34
34
|
} = this.props;
|
|
35
35
|
const percentStyle = {
|
|
36
|
-
width: this.noAppearTransition || !this.props.appearTransition ?
|
|
36
|
+
width: this.noAppearTransition || !this.props.appearTransition ? `${this.props.percent}%` : 0,
|
|
37
37
|
height: 0
|
|
38
38
|
};
|
|
39
|
-
const wrapCls = (0, _classnames.default)(
|
|
40
|
-
[
|
|
41
|
-
[
|
|
39
|
+
const wrapCls = (0, _classnames.default)(`${prefixCls}-outer`, className, {
|
|
40
|
+
[`${prefixCls}-fixed-outer`]: position === 'fixed',
|
|
41
|
+
[`${prefixCls}-hide-outer`]: !unfilled
|
|
42
42
|
});
|
|
43
43
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
44
44
|
style: style,
|
|
@@ -49,7 +49,7 @@ class Progress extends React.Component {
|
|
|
49
49
|
"aria-valuemax": 100,
|
|
50
50
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
51
51
|
ref: el => this.barRef = el,
|
|
52
|
-
className:
|
|
52
|
+
className: `${prefixCls}-bar`,
|
|
53
53
|
style: {
|
|
54
54
|
...barStyle,
|
|
55
55
|
...percentStyle
|
package/lib/Radio/Radio.js
CHANGED
|
@@ -21,7 +21,7 @@ class Radio extends React.Component {
|
|
|
21
21
|
prefixCls,
|
|
22
22
|
children
|
|
23
23
|
} = restProps;
|
|
24
|
-
const wrapCls = (0, _classnames.default)(
|
|
24
|
+
const wrapCls = (0, _classnames.default)(`${prefixCls}-wrapper`, className);
|
|
25
25
|
if ('class' in restProps) {
|
|
26
26
|
// Todo https://github.com/developit/preact-compat/issues/422
|
|
27
27
|
/* tslint:disable:no-string-literal */
|
package/lib/Radio/RadioItem.js
CHANGED
|
@@ -28,8 +28,8 @@ class RadioItem extends React.Component {
|
|
|
28
28
|
className,
|
|
29
29
|
children
|
|
30
30
|
} = otherProps;
|
|
31
|
-
const wrapCls = (0, _classnames.default)(
|
|
32
|
-
[
|
|
31
|
+
const wrapCls = (0, _classnames.default)(`${prefixCls}-item`, className, {
|
|
32
|
+
[`${prefixCls}-item-disabled`]: disabled === true
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
// Note: if not omit `onChange`, it will trigger twice on check listitem
|
|
@@ -25,12 +25,12 @@ class RateFormatter extends _react.default.Component {
|
|
|
25
25
|
const validValue = Math.min(rate_max_number, value);
|
|
26
26
|
let rateList = [];
|
|
27
27
|
for (let i = 0; i < validValue; i++) {
|
|
28
|
-
rateList.push(
|
|
29
|
-
className:
|
|
28
|
+
rateList.push(/*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
29
|
+
className: `dtable-font ${rate_style_type}`,
|
|
30
30
|
style: {
|
|
31
31
|
color: rate_style_color || '#e5e5e5'
|
|
32
32
|
}
|
|
33
|
-
},
|
|
33
|
+
}, `dtable-ui-component-rate-${i}`));
|
|
34
34
|
}
|
|
35
35
|
return rateList;
|
|
36
36
|
};
|
|
@@ -61,7 +61,7 @@ const RoleStatusEditor = _ref => {
|
|
|
61
61
|
children: [label, value === currentOption.value && /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
62
62
|
className: "dtable-font dtable-icon-check-mark ml-2"
|
|
63
63
|
})]
|
|
64
|
-
},
|
|
64
|
+
}, `item-${value}`);
|
|
65
65
|
})
|
|
66
66
|
})]
|
|
67
67
|
});
|
|
@@ -203,7 +203,7 @@ class Body extends _react.default.Component {
|
|
|
203
203
|
row
|
|
204
204
|
};
|
|
205
205
|
const CustomChildren = children;
|
|
206
|
-
if (
|
|
206
|
+
if (/*#__PURE__*/_react.default.isValidElement(CustomChildren)) return /*#__PURE__*/_react.default.cloneElement(CustomChildren, props);
|
|
207
207
|
if ((0, _utils.isFunction)(CustomChildren)) return /*#__PURE__*/(0, _jsxRuntime.jsx)(CustomChildren, {
|
|
208
208
|
...props
|
|
209
209
|
});
|
|
@@ -10,13 +10,15 @@
|
|
|
10
10
|
width: 24px;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
.dtable-ui-header-icon .dtable-font
|
|
13
|
+
.dtable-ui-header-icon .dtable-font,
|
|
14
|
+
.dtable-ui-header-icon .multicolor-icon {
|
|
14
15
|
font-size: 14px;
|
|
15
16
|
color: #aaa;
|
|
16
17
|
cursor: default;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
|
-
.dtable-ui-row-expand-column-content .dtable-ui-row-expand-column-content-info .dtable-ui-header-icon .dtable-font
|
|
20
|
+
.dtable-ui-row-expand-column-content .dtable-ui-row-expand-column-content-info .dtable-ui-header-icon .dtable-font,
|
|
21
|
+
.dtable-ui-row-expand-column-content .dtable-ui-row-expand-column-content-info .dtable-ui-header-icon .multicolor-icon {
|
|
20
22
|
color: #212529a6;
|
|
21
23
|
}
|
|
22
24
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
3
4
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
@@ -7,7 +8,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
8
|
exports.default = void 0;
|
|
8
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
10
|
var _reactstrap = require("reactstrap");
|
|
10
|
-
var
|
|
11
|
+
var _DTableColumnIcon = _interopRequireDefault(require("../../DTableColumnIcon"));
|
|
11
12
|
require("./index.css");
|
|
12
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
14
|
const ColumnContent = _ref => {
|
|
@@ -20,6 +21,7 @@ const ColumnContent = _ref => {
|
|
|
20
21
|
name,
|
|
21
22
|
type,
|
|
22
23
|
key,
|
|
24
|
+
data,
|
|
23
25
|
description
|
|
24
26
|
} = column;
|
|
25
27
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactstrap.Row, {
|
|
@@ -29,9 +31,10 @@ const ColumnContent = _ref => {
|
|
|
29
31
|
className: "dtable-ui-row-expand-column-content-info d-flex",
|
|
30
32
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
31
33
|
className: "dtable-ui-header-icon",
|
|
32
|
-
id:
|
|
33
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
34
|
-
|
|
34
|
+
id: `header-icon-${key}`,
|
|
35
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableColumnIcon.default, {
|
|
36
|
+
columnType: type,
|
|
37
|
+
columnDisplayType: data === null || data === void 0 ? void 0 : data.display_type
|
|
35
38
|
})
|
|
36
39
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
37
40
|
className: "dtable-ui-row-expand-column-name",
|
|
@@ -28,7 +28,7 @@ const Header = _ref => {
|
|
|
28
28
|
row
|
|
29
29
|
};
|
|
30
30
|
const CustomTitle = title;
|
|
31
|
-
if (
|
|
31
|
+
if (/*#__PURE__*/_react.default.isValidElement(CustomTitle)) return /*#__PURE__*/_react.default.cloneElement(CustomTitle, props);
|
|
32
32
|
if ((0, _utils.isFunction)(CustomTitle)) return /*#__PURE__*/(0, _jsxRuntime.jsx)(CustomTitle, {
|
|
33
33
|
...props
|
|
34
34
|
});
|
|
@@ -167,9 +167,9 @@ const RowExpandDialog = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
167
167
|
marginLeft,
|
|
168
168
|
height
|
|
169
169
|
} = style;
|
|
170
|
-
dom.style.width =
|
|
171
|
-
dom.style.maxWidth =
|
|
172
|
-
dom.style.marginLeft =
|
|
170
|
+
dom.style.width = `${width}px`;
|
|
171
|
+
dom.style.maxWidth = `${maxWidth}px`;
|
|
172
|
+
dom.style.marginLeft = `${marginLeft}px`;
|
|
173
173
|
dom.style.height = height;
|
|
174
174
|
dom.style.marginRight = 'unset';
|
|
175
175
|
dom.style.marginTop = '28px';
|
|
@@ -81,7 +81,7 @@ class RowExpandMBDigitalSignEditor extends _react.default.Component {
|
|
|
81
81
|
onClick: this.toggleEditor,
|
|
82
82
|
deleteImage: this.deleteImage,
|
|
83
83
|
disableImageTooltip: true
|
|
84
|
-
},
|
|
84
|
+
}, `sing-image-${key}-${index}`);
|
|
85
85
|
});
|
|
86
86
|
};
|
|
87
87
|
this.state = {
|
|
@@ -120,7 +120,7 @@ class RowExpandPCDigitalSignEditor extends _react.default.Component {
|
|
|
120
120
|
onClick: this.setLargeImageIndex,
|
|
121
121
|
deleteImage: this.deleteImage,
|
|
122
122
|
disableImageTooltip: true
|
|
123
|
-
},
|
|
123
|
+
}, `sing-image-${key}-${index}`);
|
|
124
124
|
});
|
|
125
125
|
};
|
|
126
126
|
this.state = {
|
|
@@ -90,7 +90,7 @@ class RowExpandMBMultipleSelectEditor extends _react.default.Component {
|
|
|
90
90
|
onRemove: this.removeOption.bind(this, {
|
|
91
91
|
[this.key]: optionId
|
|
92
92
|
})
|
|
93
|
-
},
|
|
93
|
+
}, `deleted-${index}`);
|
|
94
94
|
}));
|
|
95
95
|
}
|
|
96
96
|
if (displayOptions.length === 0) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_addBtn.default, {
|
|
@@ -146,7 +146,7 @@ class RowExpandPCMultipleSelectEditor extends _react.default.Component {
|
|
|
146
146
|
})
|
|
147
147
|
})
|
|
148
148
|
})]
|
|
149
|
-
},
|
|
149
|
+
}, `deleted-multiple-select-${index}`);
|
|
150
150
|
}));
|
|
151
151
|
};
|
|
152
152
|
this.renderOptions = () => {
|
|
@@ -163,19 +163,19 @@ class RowExpandPCMultipleSelectEditor extends _react.default.Component {
|
|
|
163
163
|
ref: ref => this.multipleSelectOptionsRef = ref,
|
|
164
164
|
className: (0, _classnames.default)('dtable-ui dtable-ui-row-expand-select-editor custom-select', {
|
|
165
165
|
'focus': isEditorFocus,
|
|
166
|
-
[
|
|
166
|
+
[`${classNamePrefix}-select-editor`]: classNamePrefix
|
|
167
167
|
}),
|
|
168
168
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
169
169
|
className: (0, _classnames.default)('dtable-ui-row-expand-select-editor-inner', {
|
|
170
|
-
[
|
|
170
|
+
[`${classNamePrefix}-select-editor-inner`]: classNamePrefix
|
|
171
171
|
}),
|
|
172
172
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
173
173
|
className: (0, _classnames.default)('', {
|
|
174
|
-
[
|
|
174
|
+
[`${classNamePrefix}-select-editor-inner-container`]: classNamePrefix
|
|
175
175
|
}),
|
|
176
176
|
children: [options.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
177
177
|
className: (0, _classnames.default)('dtable-ui-row-expand-select-options', {
|
|
178
|
-
[
|
|
178
|
+
[`${classNamePrefix}-select-editor-options`]: classNamePrefix
|
|
179
179
|
}),
|
|
180
180
|
children: options
|
|
181
181
|
}), options.length === 0 && placeholder && /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
@@ -49,7 +49,7 @@ class RowExpandMBRateEditor extends _react.default.Component {
|
|
|
49
49
|
'rate-item-active': value >= rateItemIndex
|
|
50
50
|
}),
|
|
51
51
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
52
|
-
className:
|
|
52
|
+
className: `dtable-font ${rateShowType}`
|
|
53
53
|
})
|
|
54
54
|
}, i);
|
|
55
55
|
rateList.push(rateItem);
|
|
@@ -93,7 +93,7 @@ class RowExpandPCRateEditor extends _react.default.Component {
|
|
|
93
93
|
style: style,
|
|
94
94
|
className: value >= rateItemIndex ? 'rate-item-active' : '',
|
|
95
95
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
96
|
-
className:
|
|
96
|
+
className: `dtable-font ${rateShowType}`
|
|
97
97
|
})
|
|
98
98
|
}, i);
|
|
99
99
|
rateList.push(rateItem);
|
|
@@ -142,7 +142,7 @@ class RowExpandPCRateEditor extends _react.default.Component {
|
|
|
142
142
|
style: style,
|
|
143
143
|
onKeyDown: this.onKeyDown,
|
|
144
144
|
onFocus: this.props.updateTabIndex.bind(this, this.props.columnIndex),
|
|
145
|
-
"aria-label":
|
|
145
|
+
"aria-label": `${this.state.value}, ${(0, _lang.getLocale)('Press_the_number_keys_to_enter_the_corresponding_value')}`,
|
|
146
146
|
className: (0, _classnames.default)('form-control dtable-ui dtable-ui-row-expand-rate-editor', {
|
|
147
147
|
'disabled': !this.canEdit
|
|
148
148
|
}),
|
|
@@ -114,15 +114,15 @@ class RowExpandPCSingleSelectEditor extends _react.default.Component {
|
|
|
114
114
|
ref: ref => this.selectRef = ref,
|
|
115
115
|
className: (0, _classnames.default)('dtable-ui dtable-ui-row-expand-select-editor custom-select', {
|
|
116
116
|
'focus': isEditorFocus,
|
|
117
|
-
[
|
|
117
|
+
[`${classNamePrefix}-select-editor`]: classNamePrefix
|
|
118
118
|
}),
|
|
119
119
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
120
120
|
className: (0, _classnames.default)('dtable-ui-row-expand-select-editor-inner', {
|
|
121
|
-
[
|
|
121
|
+
[`${classNamePrefix}-select-editor-inner`]: classNamePrefix
|
|
122
122
|
}),
|
|
123
123
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
124
124
|
className: (0, _classnames.default)('', {
|
|
125
|
-
[
|
|
125
|
+
[`${classNamePrefix}-select-editor-inner-container`]: classNamePrefix
|
|
126
126
|
}),
|
|
127
127
|
children: [value && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
128
128
|
className: "dtable-ui-select-option",
|
|
@@ -39,7 +39,7 @@ class RowExpandMBUrlEditor extends _react.default.Component {
|
|
|
39
39
|
} = this.state;
|
|
40
40
|
let newValue = value.trim();
|
|
41
41
|
if (!(0, _utils.isValidUrl)(newValue)) {
|
|
42
|
-
newValue =
|
|
42
|
+
newValue = `http://${newValue}`;
|
|
43
43
|
}
|
|
44
44
|
try {
|
|
45
45
|
(0, _utils.openUrlLink)(newValue);
|
|
@@ -69,7 +69,7 @@ class RowExpandPCUrlEditor extends _react.default.Component {
|
|
|
69
69
|
} = this.state;
|
|
70
70
|
let newValue = value.trim();
|
|
71
71
|
if (!(0, _utils.isValidUrl)(newValue)) {
|
|
72
|
-
newValue =
|
|
72
|
+
newValue = `http://${newValue}`;
|
|
73
73
|
}
|
|
74
74
|
try {
|
|
75
75
|
(0, _utils.openUrlLink)(newValue);
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.DEFAULT_FORMATTER = void 0;
|
|
8
8
|
var _dtableUtils = require("dtable-utils");
|
|
9
|
-
var
|
|
9
|
+
var _text = _interopRequireDefault(require("./text"));
|
|
10
10
|
var _NumberFormatter = _interopRequireDefault(require("../NumberFormatter"));
|
|
11
11
|
var _CheckboxFormatter = _interopRequireDefault(require("../CheckboxFormatter"));
|
|
12
12
|
var _DateFormatter = _interopRequireDefault(require("../DateFormatter"));
|
|
@@ -32,7 +32,7 @@ var _linkFormatter = _interopRequireDefault(require("./link-formatter"));
|
|
|
32
32
|
var _formulaFormatter = _interopRequireDefault(require("./formula-formatter"));
|
|
33
33
|
var _departmentFormatter = _interopRequireDefault(require("./department-formatter"));
|
|
34
34
|
const DEFAULT_FORMATTER = exports.DEFAULT_FORMATTER = {
|
|
35
|
-
[_dtableUtils.CellType.TEXT]:
|
|
35
|
+
[_dtableUtils.CellType.TEXT]: _text.default,
|
|
36
36
|
[_dtableUtils.CellType.NUMBER]: _NumberFormatter.default,
|
|
37
37
|
[_dtableUtils.CellType.CHECKBOX]: _CheckboxFormatter.default,
|
|
38
38
|
[_dtableUtils.CellType.DATE]: _DateFormatter.default,
|
|
@@ -1,30 +1,2 @@
|
|
|
1
1
|
@import url('../../css/cell-formatter.css');
|
|
2
|
-
|
|
3
|
-
.dtable-ui-row-expand-formatter .dtable-ui.email-formatter .email-formatter-value,
|
|
4
|
-
.dtable-ui-row-expand-formatter .dtable-ui.url-formatter .url-formatter-value {
|
|
5
|
-
text-decoration: underline;
|
|
6
|
-
width: 95%;
|
|
7
|
-
display: inline-flex;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.dtable-ui-row-expand-formatter .dtable-ui .row-expand-jump-link {
|
|
11
|
-
display: inline-flex;
|
|
12
|
-
align-items: center;
|
|
13
|
-
font-size: 14px;
|
|
14
|
-
height: 22px;
|
|
15
|
-
position: absolute;
|
|
16
|
-
top: 8px;
|
|
17
|
-
right: 22px;
|
|
18
|
-
border: 1px solid #eee;
|
|
19
|
-
padding: 0 4px;
|
|
20
|
-
color: #999;
|
|
21
|
-
border-radius: 2px;
|
|
22
|
-
background: #fff;
|
|
23
|
-
cursor: pointer;
|
|
24
|
-
box-shadow: 0 0 1px;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.dtable-ui-row-expand-formatter .dtable-ui .row-expand-jump-link:hover {
|
|
28
|
-
background: #eee;
|
|
29
|
-
border: 1px solid #c9c9c9;
|
|
30
|
-
}
|
|
2
|
+
@import url('../../css/row-expand.css');
|
|
@@ -18,7 +18,7 @@ class RowExpandEmailFormatter extends _react.default.Component {
|
|
|
18
18
|
value
|
|
19
19
|
} = this.props;
|
|
20
20
|
let newValue = value.trim();
|
|
21
|
-
window.location.href =
|
|
21
|
+
window.location.href = `mailto:${newValue}`;
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
24
|
render() {
|
|
@@ -26,14 +26,14 @@ class RowExpandEmailFormatter extends _react.default.Component {
|
|
|
26
26
|
containerClassName,
|
|
27
27
|
value
|
|
28
28
|
} = this.props;
|
|
29
|
-
let classname = (0, _classnames.default)('dtable-ui cell-formatter-container email-formatter', containerClassName);
|
|
29
|
+
let classname = (0, _classnames.default)('dtable-ui cell-formatter-container email-formatter row-expand-jump-link-container', containerClassName);
|
|
30
30
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
31
31
|
className: classname,
|
|
32
32
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
33
|
-
className: "email-formatter-value text-truncate",
|
|
33
|
+
className: "email-formatter-value row-expand-jump-link-value text-truncate",
|
|
34
34
|
children: value
|
|
35
35
|
}), (0, _editorUtils.getTrimmedString)(value) && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
36
|
-
className: "dtable-font dtable-icon-email row-expand-jump-link",
|
|
36
|
+
className: "dtable-font dtable-icon-email row-expand-jump-link-btn",
|
|
37
37
|
onClick: this.onOpenEmailLink
|
|
38
38
|
})]
|
|
39
39
|
});
|
|
@@ -65,7 +65,7 @@ class RowExpandFileItemFormatter extends _react.Component {
|
|
|
65
65
|
id: id,
|
|
66
66
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
67
67
|
src: fileIconUrl,
|
|
68
|
-
id:
|
|
68
|
+
id: `item-file-${index}`,
|
|
69
69
|
alt: file.name
|
|
70
70
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
71
71
|
className: "dtable-ui-file-icons-choice",
|
|
@@ -83,7 +83,7 @@ class RowExpandFileItemFormatter extends _react.Component {
|
|
|
83
83
|
})
|
|
84
84
|
})]
|
|
85
85
|
})]
|
|
86
|
-
},
|
|
86
|
+
}, `file-${index}`), this.state.isDeleteTipOpen && /*#__PURE__*/(0, _jsxRuntime.jsx)(_DeleteTip.default, {
|
|
87
87
|
position: this.position,
|
|
88
88
|
toggle: this.closeDeleteTip,
|
|
89
89
|
handleDelete: this.onDelete,
|
|
@@ -10,12 +10,14 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
10
10
|
var _dtableUtils = require("dtable-utils");
|
|
11
11
|
var _baseFormatterConfig = _interopRequireDefault(require("../../formatterConfig/base-formatter-config"));
|
|
12
12
|
var _TextFormatter = _interopRequireDefault(require("../../TextFormatter"));
|
|
13
|
+
var _PhoneNumberLink = _interopRequireDefault(require("../../PhoneNumberLink"));
|
|
13
14
|
var _utils = require("../../FormulaFormatter/utils");
|
|
14
15
|
var _utils2 = require("../../utils/utils");
|
|
15
16
|
var _cellValueValidator = _interopRequireDefault(require("../../FormulaFormatter/cell-value-validator"));
|
|
16
17
|
var _toaster = _interopRequireDefault(require("../../toaster"));
|
|
17
18
|
var _lang = require("../../lang");
|
|
18
19
|
require("../../FormulaFormatter/index.css");
|
|
20
|
+
require("./index.css");
|
|
19
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
22
|
class RowExpandFormulaFormatter extends _react.default.Component {
|
|
21
23
|
constructor() {
|
|
@@ -35,7 +37,7 @@ class RowExpandFormulaFormatter extends _react.default.Component {
|
|
|
35
37
|
};
|
|
36
38
|
this.onOpenUrlLink = url => {
|
|
37
39
|
if (!(0, _utils2.isValidUrl)(url)) {
|
|
38
|
-
url =
|
|
40
|
+
url = `http://${url}`;
|
|
39
41
|
}
|
|
40
42
|
try {
|
|
41
43
|
(0, _utils2.openUrlLink)(url);
|
|
@@ -44,7 +46,7 @@ class RowExpandFormulaFormatter extends _react.default.Component {
|
|
|
44
46
|
}
|
|
45
47
|
};
|
|
46
48
|
this.onOpenEmailLink = email => {
|
|
47
|
-
window.location.href =
|
|
49
|
+
window.location.href = `mailto:${email.trim()}`;
|
|
48
50
|
};
|
|
49
51
|
this.renderBorder = dom => {
|
|
50
52
|
const {
|
|
@@ -61,13 +63,6 @@ class RowExpandFormulaFormatter extends _react.default.Component {
|
|
|
61
63
|
width: '320px'
|
|
62
64
|
};
|
|
63
65
|
}
|
|
64
|
-
const columnType = (0, _dtableUtils.getColumnType)(column);
|
|
65
|
-
if ([_dtableUtils.CellType.URL, _dtableUtils.CellType.EMAIL].includes(columnType)) {
|
|
66
|
-
style = {
|
|
67
|
-
...style,
|
|
68
|
-
position: 'relative'
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
66
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
72
67
|
className: "d-flex align-items-center form-control disabled h-auto",
|
|
73
68
|
style: style,
|
|
@@ -79,8 +74,8 @@ class RowExpandFormulaFormatter extends _react.default.Component {
|
|
|
79
74
|
containerClassName
|
|
80
75
|
} = this.props;
|
|
81
76
|
const customClassName = this.getGridCellClassName(resultType);
|
|
82
|
-
const className =
|
|
83
|
-
return this.renderBorder(
|
|
77
|
+
const className = `dtable-ui cell-formatter-container formula-formatter ${containerClassName} ${customClassName}`;
|
|
78
|
+
return this.renderBorder(/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
84
79
|
className: className,
|
|
85
80
|
title: cellValue,
|
|
86
81
|
"aria-label": cellValue,
|
|
@@ -125,7 +120,12 @@ class RowExpandFormulaFormatter extends _react.default.Component {
|
|
|
125
120
|
formulaEmail = cellValue[0];
|
|
126
121
|
formulaEmail = formulaEmail ? formulaEmail.trim() : '';
|
|
127
122
|
}
|
|
128
|
-
|
|
123
|
+
let formulaPhoneNumber = '';
|
|
124
|
+
if ((0, _dtableUtils.checkIsDisplayAsPhoneNumberColumn)(column)) {
|
|
125
|
+
formulaPhoneNumber = cellValue[0];
|
|
126
|
+
formulaPhoneNumber = formulaPhoneNumber ? formulaPhoneNumber.trim() : '';
|
|
127
|
+
}
|
|
128
|
+
return this.renderBorder(/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
129
129
|
className: "dtable-ui formula-formatter multiple",
|
|
130
130
|
children: cellValue.map((v, index) => {
|
|
131
131
|
formatterProps.value = v;
|
|
@@ -133,18 +133,21 @@ class RowExpandFormulaFormatter extends _react.default.Component {
|
|
|
133
133
|
className: (0, _classnames.default)('formula-formatter-content-item', {
|
|
134
134
|
'simple-cell-formatter': (0, _utils.isSimpleCellFormatter)(array_type)
|
|
135
135
|
}, {
|
|
136
|
-
'
|
|
136
|
+
'row-expand-jump-link-container': !!(formulaUrl || formulaEmail || formulaPhoneNumber)
|
|
137
137
|
}),
|
|
138
|
-
children: [formulaUrl && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
138
|
+
children: [!!formulaUrl && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
139
139
|
"aria-hidden": "true",
|
|
140
|
-
className: "dtable-font dtable-icon-url formula-url-link",
|
|
140
|
+
className: "dtable-font dtable-icon-url formula-url-link row-expand-jump-link-btn",
|
|
141
141
|
onClick: this.onOpenUrlLink.bind(this, formulaUrl)
|
|
142
|
-
}), formulaEmail && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
142
|
+
}), !!formulaEmail && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
143
143
|
"aria-hidden": "true",
|
|
144
|
-
className: "dtable-font dtable-icon-email formula-email-link",
|
|
144
|
+
className: "dtable-font dtable-icon-email formula-email-link row-expand-jump-link-btn",
|
|
145
145
|
onClick: this.onOpenEmailLink.bind(this, formulaEmail)
|
|
146
|
+
}), !!formulaPhoneNumber && /*#__PURE__*/(0, _jsxRuntime.jsx)(_PhoneNumberLink.default, {
|
|
147
|
+
phoneNumber: formulaPhoneNumber,
|
|
148
|
+
className: "row-expand-jump-link-btn"
|
|
146
149
|
}), this.createColumnFormatter(Formatter, formatterProps)]
|
|
147
|
-
},
|
|
150
|
+
}, `formula-formatter-content-item-${index}`);
|
|
148
151
|
})
|
|
149
152
|
}));
|
|
150
153
|
};
|
|
@@ -191,7 +194,7 @@ class RowExpandFormulaFormatter extends _react.default.Component {
|
|
|
191
194
|
};
|
|
192
195
|
}
|
|
193
196
|
createColumnFormatter(Formatter, formatterProps) {
|
|
194
|
-
if (
|
|
197
|
+
if (/*#__PURE__*/_react.default.isValidElement(Formatter)) {
|
|
195
198
|
return /*#__PURE__*/_react.default.cloneElement(Formatter, {
|
|
196
199
|
...formatterProps
|
|
197
200
|
});
|
|
@@ -72,7 +72,7 @@ class RowExpandImageItemFormatter extends _react.Component {
|
|
|
72
72
|
onClick: this.onClickImage,
|
|
73
73
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
74
74
|
src: url,
|
|
75
|
-
id:
|
|
75
|
+
id: `item-image-${index}`,
|
|
76
76
|
alt: name
|
|
77
77
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
78
78
|
className: "dtable-ui-image-icons-choice",
|
|
@@ -90,7 +90,7 @@ class RowExpandImageItemFormatter extends _react.Component {
|
|
|
90
90
|
})
|
|
91
91
|
})]
|
|
92
92
|
})]
|
|
93
|
-
},
|
|
93
|
+
}, `image-${index}`), this.state.isDeleteTipOpen && /*#__PURE__*/(0, _jsxRuntime.jsx)(_DeleteTip.default, {
|
|
94
94
|
position: this.position,
|
|
95
95
|
toggle: this.closeDeleteTip,
|
|
96
96
|
handleDelete: this.onDelete,
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
height: 2.375rem;
|
|
26
26
|
line-height: 2.375rem;
|
|
27
27
|
width: 100%;
|
|
28
|
+
text-decoration: none;
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
.dtable-ui.dtable-ui-row-expand-formatter .dtable-ui.multiple-select-formatter .dtable-ui.select-item {
|
|
@@ -46,6 +47,7 @@
|
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
.dtable-ui.dtable-ui-row-expand-formatter .form-control {
|
|
50
|
+
position: relative;
|
|
49
51
|
background-color: #f8f9fa;
|
|
50
52
|
padding: 0 10px;
|
|
51
53
|
height: fit-content;
|
|
@@ -66,7 +66,7 @@ class RowExpandFormatter extends _react.default.Component {
|
|
|
66
66
|
const {
|
|
67
67
|
collaborators
|
|
68
68
|
} = this.state;
|
|
69
|
-
const containerClassName =
|
|
69
|
+
const containerClassName = `dtable-ui-row-expand-${columnType}-formatter`;
|
|
70
70
|
let cellValue = row[column[valueKey]];
|
|
71
71
|
const Formatter = this.component[columnType];
|
|
72
72
|
if (!Formatter) return null;
|
|
@@ -77,6 +77,7 @@ class RowExpandFormatter extends _react.default.Component {
|
|
|
77
77
|
className: "form-control d-flex align-items-center w-100",
|
|
78
78
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Formatter, {
|
|
79
79
|
value: cellValue,
|
|
80
|
+
column: column,
|
|
80
81
|
containerClassName: containerClassName
|
|
81
82
|
})
|
|
82
83
|
});
|
|
@@ -42,7 +42,7 @@ class CollaboratorItemFormatter extends _react.Component {
|
|
|
42
42
|
}
|
|
43
43
|
if (!context) return;
|
|
44
44
|
const mediaUrl = context.getSetting('mediaUrl');
|
|
45
|
-
const defaultAvatarUrl =
|
|
45
|
+
const defaultAvatarUrl = `${mediaUrl}/avatars/default.png`;
|
|
46
46
|
if (cellValue === 'anonymous') {
|
|
47
47
|
collaborator = {
|
|
48
48
|
name: 'anonymous',
|