dtable-ui-component 5.1.15-alpha1 → 5.2.0
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/CollaboratorEditor/index.js +2 -2
- package/lib/CollapsibleSettingLayout/index.js +1 -1
- package/lib/DTableColorPicker/index.js +6 -6
- 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-item.js +2 -2
- package/lib/DTableFiltersPopover/widgets/rate-item.js +2 -2
- 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/DTableSwitch/index.css +56 -0
- package/lib/DTableSwitch/index.js +29 -9
- package/lib/Department-editor/department-multiple-select/index.js +3 -3
- package/lib/Department-editor/department-single-select.js +2 -2
- package/lib/Department-editor/selected-departments/index.js +3 -3
- package/lib/DigitalSignFormatter/index.js +0 -1
- package/lib/DigitalSignFormatter/utils.js +1 -1
- package/lib/FieldDisplaySetting/field-item.js +2 -2
- package/lib/FieldDisplaySetting/index.css +2 -33
- package/lib/FieldDisplaySetting/index.js +6 -6
- package/lib/FileFormatter/index.js +1 -1
- package/lib/FileItemFormatter/index.js +1 -1
- package/lib/FormulaFormatter/index.js +4 -4
- package/lib/HtmlLongTextFormatter/index.js +1 -1
- package/lib/ImageFormatter/index.js +2 -3
- package/lib/ImagePreviewerLightbox/index.js +1 -6
- package/lib/MBEditorHeader/index.js +1 -1
- package/lib/MultipleSelectFormatter/index.js +1 -1
- package/lib/RateFormatter/index.js +3 -3
- package/lib/RoleStatusEditor/index.js +1 -1
- package/lib/RowExpandEmailFormatter/index.js +1 -1
- package/lib/RowExpandFileFormatter/row-expand-file-item-formatter.js +2 -2
- package/lib/RowExpandFormatter/index.js +1 -1
- package/lib/RowExpandFormulaFormatter/index.js +7 -7
- package/lib/RowExpandImageFormatter/index.js +4 -4
- package/lib/RowExpandImageFormatter/row-expand-image-item-formatter.js +2 -2
- package/lib/RowExpandLinkFormatter/collaborator-item-formatter.js +1 -1
- package/lib/RowExpandLinkFormatter/index.js +6 -6
- package/lib/RowExpandRateFormatter/index.js +3 -3
- package/lib/RowExpandUrlFormatter/index.js +1 -1
- package/lib/SelectItem/index.js +1 -1
- package/lib/SelectOptionGroup/index.js +1 -1
- package/lib/SimpleLongTextFormatter/index.js +2 -2
- package/lib/locals/en.js +0 -1
- package/lib/locals/zh-CN.js +0 -1
- package/lib/select-editor/mb-select-editor-popover/index.js +1 -1
- 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/package.json +3 -3
|
@@ -179,13 +179,13 @@ class CollaboratorEditor extends _react.default.Component {
|
|
|
179
179
|
className: "dtable-ui-collaborator-editor"
|
|
180
180
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
181
181
|
ref: this.setEditorRef,
|
|
182
|
-
className:
|
|
182
|
+
className: "dtable-ui-collaborator-editor-container ".concat(isShowEditButton ? '' : 'dtable-ui-collaborator-editor-container-no-btn'),
|
|
183
183
|
onClick: this.onClickContainer
|
|
184
184
|
}, isShowEditButton && /*#__PURE__*/_react.default.createElement(_EditEditorButton.default, {
|
|
185
185
|
text: (0, _lang.getLocale)('Add_a_collaborator'),
|
|
186
186
|
onClick: this.togglePopover
|
|
187
187
|
}), selectedCollaborators.length > 0 && /*#__PURE__*/_react.default.createElement("div", {
|
|
188
|
-
className:
|
|
188
|
+
className: "collaborators-container ".concat(isShowEditButton ? 'mt-2' : '')
|
|
189
189
|
}, selectedCollaborators.map(collaborator => {
|
|
190
190
|
return /*#__PURE__*/_react.default.createElement(_CollaboratorItem.default, {
|
|
191
191
|
key: collaborator.email,
|
|
@@ -24,7 +24,7 @@ const CollapsibleSettingLayout = props => {
|
|
|
24
24
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
25
25
|
className: "collapsible-setting-layout-title"
|
|
26
26
|
}, title), /*#__PURE__*/_react.default.createElement("i", {
|
|
27
|
-
className:
|
|
27
|
+
className: "dtable-font dtable-icon-right".concat(isShowSettings ? ' dtable-icon-spin' : '')
|
|
28
28
|
})), isShowSettings && /*#__PURE__*/_react.default.createElement("div", {
|
|
29
29
|
className: "collapsible-setting-layout-body mt-3 pl-2"
|
|
30
30
|
}, children || ''));
|
|
@@ -237,15 +237,15 @@ const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
|
237
237
|
}, colors.map((color, index) => {
|
|
238
238
|
const isLight = (0, _utils.isLightColor)(color);
|
|
239
239
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
240
|
-
className:
|
|
240
|
+
className: "color-item mr-2 ".concat(isLight ? '' : 'dark'),
|
|
241
241
|
onClick: () => onSelectDefaultColor(color),
|
|
242
|
-
key:
|
|
242
|
+
key: "default-color-".concat(index)
|
|
243
243
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
244
244
|
className: "colorinput-color d-flex align-items-center justify-content-center",
|
|
245
245
|
style: {
|
|
246
246
|
backgroundColor: color
|
|
247
247
|
}
|
|
248
|
-
}, color ===
|
|
248
|
+
}, color === "".concat((0, _utils.rgbaToHex)(value)) && alphaVal === 100 && /*#__PURE__*/_react.default.createElement("i", {
|
|
249
249
|
className: "dtable-icon-color-check dtable-font dtable-icon-check-mark"
|
|
250
250
|
})));
|
|
251
251
|
})));
|
|
@@ -256,7 +256,7 @@ const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
|
256
256
|
color: value,
|
|
257
257
|
onChange: onChangeChromePicker
|
|
258
258
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
259
|
-
className:
|
|
259
|
+
className: "color-setting d-flex align-items-center ".concat(colorMode)
|
|
260
260
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
261
261
|
className: "mode-btn d-flex",
|
|
262
262
|
onClick: onChangeMode
|
|
@@ -314,9 +314,9 @@ const DTableColorPicker = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
|
314
314
|
}, currentUsedColors.length > 0 ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, currentUsedColors.map((color, index) => {
|
|
315
315
|
const isLight = (0, _utils.isLightColor)(color);
|
|
316
316
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
317
|
-
className:
|
|
317
|
+
className: "color-item mr-2 ".concat(isLight ? '' : 'dark'),
|
|
318
318
|
onClick: () => onSelectDefaultColor(color),
|
|
319
|
-
key:
|
|
319
|
+
key: "default-color-".concat(index)
|
|
320
320
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
321
321
|
className: "colorinput-color d-flex align-items-center justify-content-center",
|
|
322
322
|
style: {
|
|
@@ -54,7 +54,7 @@ const rgbaToHex = function (color) {
|
|
|
54
54
|
return hex.length === 1 ? '0' + hex : hex;
|
|
55
55
|
};
|
|
56
56
|
const alpha = a !== undefined && a !== 1 ? toHex(Math.round(a * 255)) : '';
|
|
57
|
-
return
|
|
57
|
+
return "".concat(isNeedPrefix ? '#' : '').concat(toHex(r)).concat(toHex(g)).concat(toHex(b)).concat(isNeedAlpha ? alpha : '');
|
|
58
58
|
};
|
|
59
59
|
exports.rgbaToHex = rgbaToHex;
|
|
60
60
|
const isLightColor = color => {
|
|
@@ -17,13 +17,13 @@ function DTableCommonAddTool(_ref) {
|
|
|
17
17
|
style
|
|
18
18
|
} = _ref;
|
|
19
19
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
20
|
-
className:
|
|
20
|
+
className: "dtable-ui add-item-btn ".concat(className ? className : ''),
|
|
21
21
|
style: style,
|
|
22
22
|
onClick: e => {
|
|
23
23
|
callBack(e);
|
|
24
24
|
}
|
|
25
25
|
}, !hideIcon && /*#__PURE__*/_react.default.createElement("span", {
|
|
26
|
-
className:
|
|
26
|
+
className: "dtable-font dtable-icon-add-table ".concat(addIconClassName || '')
|
|
27
27
|
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
28
28
|
className: "text-truncate"
|
|
29
29
|
}, footerName));
|
|
@@ -197,7 +197,7 @@ class DTableFiltersPopover extends _react.Component {
|
|
|
197
197
|
deleteFilter: this.deleteFilter,
|
|
198
198
|
updateFilterConjunction: this.updateFilterConjunction
|
|
199
199
|
}), /*#__PURE__*/_react.default.createElement(_DTableCommonAddTool.default, {
|
|
200
|
-
className:
|
|
200
|
+
className: "popover-add-tool ".concat(canAddFilter ? '' : 'disabled'),
|
|
201
201
|
callBack: canAddFilter ? () => this.addFilter(scheduleUpdate) : () => {},
|
|
202
202
|
footerName: (0, _lang.getLocale)('Add_filter'),
|
|
203
203
|
addIconClassName: "popover-add-icon"
|
|
@@ -471,7 +471,7 @@ const getMediaUrl = () => {
|
|
|
471
471
|
};
|
|
472
472
|
const generateDefaultUser = name => {
|
|
473
473
|
const mediaUrl = getMediaUrl();
|
|
474
|
-
const defaultAvatarUrl =
|
|
474
|
+
const defaultAvatarUrl = "".concat(mediaUrl, "avatars/default.png");
|
|
475
475
|
return {
|
|
476
476
|
name,
|
|
477
477
|
email: name,
|
|
@@ -290,7 +290,7 @@ class FilterItem extends _react.default.Component {
|
|
|
290
290
|
background: inOption.color,
|
|
291
291
|
color: inOption.textColor || null
|
|
292
292
|
};
|
|
293
|
-
labelArray.push(/*#__PURE__*/_react.default.createElement("span", {
|
|
293
|
+
labelArray.push( /*#__PURE__*/_react.default.createElement("span", {
|
|
294
294
|
className: className,
|
|
295
295
|
style: optionStyle,
|
|
296
296
|
key: 'option_' + item,
|
|
@@ -669,7 +669,7 @@ class FilterItem extends _react.default.Component {
|
|
|
669
669
|
searchPlaceholder: (0, _lang.getLocale)('Search_column'),
|
|
670
670
|
noOptionsPlaceholder: (0, _lang.getLocale)('No_results')
|
|
671
671
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
672
|
-
className:
|
|
672
|
+
className: "filter-predicate ml-2 ".concat(_isCheckboxColumn ? 'filter-checkbox-predicate' : '')
|
|
673
673
|
}, /*#__PURE__*/_react.default.createElement(_DTableCustomizeSelect.default, {
|
|
674
674
|
value: activePredicate,
|
|
675
675
|
options: filterPredicateOptions,
|
|
@@ -66,9 +66,9 @@ class RateItem extends _react.default.Component {
|
|
|
66
66
|
onMouseLeave: this.onMouseLeaveRateItem,
|
|
67
67
|
style: style,
|
|
68
68
|
onClick: this.onChangeRateNumber,
|
|
69
|
-
className:
|
|
69
|
+
className: "rate-item ".concat(value >= rateItemIndex ? 'rate-item-active' : '')
|
|
70
70
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
71
|
-
className:
|
|
71
|
+
className: "dtable-font ".concat(rateShowType),
|
|
72
72
|
ref: this.tooltipRef
|
|
73
73
|
}), editable && /*#__PURE__*/_react.default.createElement(_reactstrap.UncontrolledTooltip, {
|
|
74
74
|
placement: "bottom",
|
|
@@ -48,7 +48,7 @@ class DTableRadioGroup extends _react.default.Component {
|
|
|
48
48
|
options
|
|
49
49
|
} = this.props;
|
|
50
50
|
if (!this.btn || !this.slider || !Array.isArray(options)) return;
|
|
51
|
-
this.slider.style.width =
|
|
51
|
+
this.slider.style.width = "".concat(100 / options.length, "%");
|
|
52
52
|
this.setSliderTransition();
|
|
53
53
|
}
|
|
54
54
|
componentDidUpdate(prevProps) {
|
|
@@ -76,14 +76,14 @@ class DTableRadioGroup extends _react.default.Component {
|
|
|
76
76
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
77
77
|
className: "radio-group-wrapper"
|
|
78
78
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
79
|
-
className:
|
|
79
|
+
className: "radio-group-options ".concat(readOnly ? 'read-only' : '')
|
|
80
80
|
}, options.map(option => {
|
|
81
81
|
const isActive = activeOption === option ? true : false;
|
|
82
82
|
const displayOption = optionsDisplay && optionsDisplay[option] || '';
|
|
83
83
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
84
84
|
key: option,
|
|
85
85
|
ref: ref => this.btn = ref,
|
|
86
|
-
className:
|
|
86
|
+
className: "radio-group-button ".concat(isActive ? 'active' : ''),
|
|
87
87
|
"data-option": option,
|
|
88
88
|
onClick: this.onSelectChanged
|
|
89
89
|
}, displayOption);
|
|
@@ -66,7 +66,7 @@ class DtableSearchInput extends _react.Component {
|
|
|
66
66
|
const {
|
|
67
67
|
ClearIndicator
|
|
68
68
|
} = components;
|
|
69
|
-
if (/*#__PURE__*/_react.default.isValidElement(ClearIndicator)) {
|
|
69
|
+
if ( /*#__PURE__*/_react.default.isValidElement(ClearIndicator)) {
|
|
70
70
|
return /*#__PURE__*/_react.default.cloneElement(ClearIndicator, {
|
|
71
71
|
clearValue: this.clearSearch
|
|
72
72
|
});
|
|
@@ -14,7 +14,7 @@ function DTableSelectLabel(_ref) {
|
|
|
14
14
|
isSelect
|
|
15
15
|
} = _ref;
|
|
16
16
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
17
|
-
className:
|
|
17
|
+
className: "".concat(classname, " w-100 d-flex justify-content-between")
|
|
18
18
|
}, /*#__PURE__*/_react.default.createElement("span", null, name), isSelect && /*#__PURE__*/_react.default.createElement("div", {
|
|
19
19
|
className: "dtable-select-check-icon"
|
|
20
20
|
}, /*#__PURE__*/_react.default.createElement("i", {
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
.dtable-switch {
|
|
2
|
+
display: flex;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.dtable-switch.sm {
|
|
6
|
+
flex: 1;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.dtable-switch .custom-switch {
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
justify-content: space-between;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.dtable-switch.disabled .custom-switch {
|
|
15
|
+
cursor: default;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.dtable-switch.sm .custom-switch {
|
|
19
|
+
width: 100%;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.dtable-switch.sm .custom-switch .custom-switch-description {
|
|
23
|
+
width: 192px;
|
|
24
|
+
margin: 0;
|
|
25
|
+
padding-right: 5px;
|
|
26
|
+
color: #212529;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.dtable-switch.sm .custom-switch .dtable-font {
|
|
30
|
+
-webkit-transform: scale(.8);
|
|
31
|
+
transform: scale(.8);
|
|
32
|
+
display: inline-block;
|
|
33
|
+
line-height: 24px;
|
|
34
|
+
margin-right: 8px;
|
|
35
|
+
color: #666;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.dtable-switch.sm .custom-switch .dtable-font.dtable-icon-use-help {
|
|
39
|
+
transform: none;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.dtable-switch.sm .custom-switch-indicator {
|
|
43
|
+
width: 22px;
|
|
44
|
+
height: 12px;
|
|
45
|
+
border-radius: 6px;
|
|
46
|
+
margin-right: 10px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.dtable-switch.sm .custom-switch-input:checked~.custom-switch-indicator:before {
|
|
50
|
+
left: 12px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.dtable-switch.sm .custom-switch-indicator:before {
|
|
54
|
+
height: 8px;
|
|
55
|
+
width: 8px;
|
|
56
|
+
}
|
|
@@ -6,16 +6,33 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
9
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
+
var _dtableUtils = require("dtable-utils");
|
|
11
|
+
require("./index.css");
|
|
12
|
+
function DTableSwitch(props) {
|
|
10
13
|
const {
|
|
11
14
|
onChange,
|
|
12
15
|
checked,
|
|
13
16
|
placeholder,
|
|
14
17
|
disabled,
|
|
18
|
+
size,
|
|
19
|
+
switchPosition,
|
|
15
20
|
switchClassName
|
|
16
21
|
} = props;
|
|
22
|
+
const switchNode = /*#__PURE__*/_react.default.createElement("span", {
|
|
23
|
+
className: "custom-switch-indicator"
|
|
24
|
+
});
|
|
25
|
+
const textNode = /*#__PURE__*/_react.default.createElement("span", {
|
|
26
|
+
className: "custom-switch-description text-truncate"
|
|
27
|
+
}, placeholder);
|
|
17
28
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
18
|
-
className:
|
|
29
|
+
className: (0, _classnames.default)('dtable-switch position-relative', {
|
|
30
|
+
'disabled': disabled
|
|
31
|
+
}, {
|
|
32
|
+
[size]: size
|
|
33
|
+
}, {
|
|
34
|
+
[switchClassName]: switchClassName
|
|
35
|
+
})
|
|
19
36
|
}, /*#__PURE__*/_react.default.createElement("label", {
|
|
20
37
|
className: "custom-switch"
|
|
21
38
|
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
@@ -24,11 +41,14 @@ function DtableSwitch(props) {
|
|
|
24
41
|
checked: checked,
|
|
25
42
|
onChange: onChange,
|
|
26
43
|
name: "custom-switch-checkbox",
|
|
27
|
-
disabled: disabled
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
className: "custom-switch-indicator"
|
|
32
|
-
})));
|
|
44
|
+
disabled: disabled,
|
|
45
|
+
"aria-label": placeholder,
|
|
46
|
+
id: 'dtable-switch-' + (0, _dtableUtils.generatorBase64Code)(12)
|
|
47
|
+
}), switchPosition === 'left' && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, switchNode, textNode), switchPosition === 'right' && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, textNode, switchNode)));
|
|
33
48
|
}
|
|
34
|
-
|
|
49
|
+
DTableSwitch.defaultProps = {
|
|
50
|
+
checked: false,
|
|
51
|
+
size: 'sm',
|
|
52
|
+
switchPosition: 'right'
|
|
53
|
+
};
|
|
54
|
+
var _default = exports.default = DTableSwitch;
|
|
@@ -83,7 +83,7 @@ function DepartmentMultipleSelect(props) {
|
|
|
83
83
|
} = department;
|
|
84
84
|
const newLevel = level + 1;
|
|
85
85
|
const inputStyle = {
|
|
86
|
-
marginRight:
|
|
86
|
+
marginRight: "".concat(newLevel * 15 + 5, "px")
|
|
87
87
|
};
|
|
88
88
|
const nameStyle = {
|
|
89
89
|
paddingLeft: hasChild ? '' : '16px'
|
|
@@ -101,7 +101,7 @@ function DepartmentMultipleSelect(props) {
|
|
|
101
101
|
style: inputStyle,
|
|
102
102
|
onChange: () => {}
|
|
103
103
|
}), hasChild && !searchVal && /*#__PURE__*/_react.default.createElement("span", {
|
|
104
|
-
className:
|
|
104
|
+
className: "dtable-font expand dtable-icon-".concat(isExpanded ? 'drop-down' : 'right-slide', " pr-1"),
|
|
105
105
|
onClick: event => onExpand(event, id, isExpanded)
|
|
106
106
|
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
107
107
|
style: searchVal ? {} : nameStyle,
|
|
@@ -123,7 +123,7 @@ function DepartmentMultipleSelect(props) {
|
|
|
123
123
|
ref: departmentContainerRef,
|
|
124
124
|
onClick: onStopPropagation,
|
|
125
125
|
onMouseDown: onStopPropagation,
|
|
126
|
-
className:
|
|
126
|
+
className: "dropdown-menu show departments-container dtable-ui ".concat(classNamePrefix)
|
|
127
127
|
}, isShowSelectedDepartments && /*#__PURE__*/_react.default.createElement("div", {
|
|
128
128
|
className: "selected-departments dtable-ui",
|
|
129
129
|
onClick: onClick
|
|
@@ -140,7 +140,7 @@ class DepartmentSingleSelect extends _react.Component {
|
|
|
140
140
|
paddingLeft: hasChild ? '' : noChildStyle
|
|
141
141
|
};
|
|
142
142
|
const itemStyle = {
|
|
143
|
-
paddingLeft:
|
|
143
|
+
paddingLeft: "".concat(newLevel * 15 + 10, "px")
|
|
144
144
|
};
|
|
145
145
|
const isChecked = value === id;
|
|
146
146
|
return /*#__PURE__*/_react.default.createElement(_react.Fragment, {
|
|
@@ -152,7 +152,7 @@ class DepartmentSingleSelect extends _react.Component {
|
|
|
152
152
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
153
153
|
className: "department-item-left-content d-flex align-items-center"
|
|
154
154
|
}, hasChild && /*#__PURE__*/_react.default.createElement("span", {
|
|
155
|
-
className:
|
|
155
|
+
className: "dtable-font expand dtable-icon-".concat(isExpanded ? 'drop-down' : 'right-slide', " pr-1"),
|
|
156
156
|
onClick: event => this.onExpand(event, id, isExpanded)
|
|
157
157
|
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
158
158
|
style: nameStyle,
|
|
@@ -28,7 +28,7 @@ function SelectedDepartments(props) {
|
|
|
28
28
|
if ([_dtableUtils.DEPARTMENT_SELECT_RANGE_MAP.CURRENT_USER_DEPARTMENT, _dtableUtils.DEPARTMENT_SELECT_RANGE_MAP.CURRENT_USER_DEPARTMENT_AND_SUB].includes(content)) {
|
|
29
29
|
const name = (0, _lang.getLocale)(_constants.DEPARTMENT_SELECT_RANGE_OPTIONS.find(option => option.type === content).name);
|
|
30
30
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
31
|
-
key:
|
|
31
|
+
key: "department-".concat(index),
|
|
32
32
|
className: "department mr-1"
|
|
33
33
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
34
34
|
className: "department-name text-truncate",
|
|
@@ -42,7 +42,7 @@ function SelectedDepartments(props) {
|
|
|
42
42
|
name
|
|
43
43
|
} = department;
|
|
44
44
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
45
|
-
key:
|
|
45
|
+
key: "department-".concat(index),
|
|
46
46
|
className: "department mr-1"
|
|
47
47
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
48
48
|
className: "department-avatar-container d-flex align-items-center justify-content-center"
|
|
@@ -62,7 +62,7 @@ function SelectedDepartments(props) {
|
|
|
62
62
|
}))));
|
|
63
63
|
}
|
|
64
64
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
65
|
-
key:
|
|
65
|
+
key: "department-".concat(index),
|
|
66
66
|
className: "department empty-department mr-1"
|
|
67
67
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
68
68
|
className: "department-avatar-container d-flex align-items-center justify-content-center"
|
|
@@ -85,7 +85,6 @@ class DigitalSignFormatter extends _react.Component {
|
|
|
85
85
|
imageIndex: largeSignImageIndex,
|
|
86
86
|
closeImagePopup: this.hideLargeSignImage,
|
|
87
87
|
downloadImage: this.downloadImage,
|
|
88
|
-
onViewOriginal: this.props.onViewOriginal,
|
|
89
88
|
moveToPrevImage: () => {},
|
|
90
89
|
moveToNextImage: () => {}
|
|
91
90
|
}));
|
|
@@ -15,7 +15,7 @@ const getDigitalSignImageUrl = (cellValue, config) => {
|
|
|
15
15
|
dtableUuid
|
|
16
16
|
} = config || {};
|
|
17
17
|
if (server && (workspaceID || workspaceID === 0) && dtableUuid) {
|
|
18
|
-
return
|
|
18
|
+
return "".concat(server, "/workspace/").concat(workspaceID, "/asset/").concat(dtableUuid).concat(url);
|
|
19
19
|
}
|
|
20
20
|
return url;
|
|
21
21
|
};
|
|
@@ -65,12 +65,12 @@ function FieldItem(_ref) {
|
|
|
65
65
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
66
66
|
className: "field-switch"
|
|
67
67
|
}, /*#__PURE__*/_react.default.createElement("i", {
|
|
68
|
-
className:
|
|
68
|
+
className: "dtable-font ".concat(_dtableUtils.COLUMNS_ICON_CONFIG[field.type])
|
|
69
69
|
}), /*#__PURE__*/_react.default.createElement("span", null, field.name));
|
|
70
70
|
};
|
|
71
71
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
72
72
|
ref: fieldItemRef,
|
|
73
|
-
className:
|
|
73
|
+
className: "field-item-container ".concat(isCollapsed ? 'd-none' : ''),
|
|
74
74
|
onDrop: onDrop,
|
|
75
75
|
onDragEnter: onTableDragEnter,
|
|
76
76
|
onDragOver: onDragOver,
|
|
@@ -38,37 +38,6 @@
|
|
|
38
38
|
cursor: grab;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
.field-item-container .dtable-switch .custom-switch {
|
|
42
|
-
|
|
43
|
-
justify-content: space-between;
|
|
41
|
+
.field-setting .field-item-container .dtable-switch .custom-switch .custom-switch-description {
|
|
42
|
+
white-space: nowrap;
|
|
44
43
|
}
|
|
45
|
-
|
|
46
|
-
.field-item-container .dtable-switch .custom-switch .dtable-font {
|
|
47
|
-
-webkit-transform: scale(.8);
|
|
48
|
-
transform: scale(.8);
|
|
49
|
-
display: inline-block;
|
|
50
|
-
line-height: 24px;
|
|
51
|
-
margin-right: 8px;
|
|
52
|
-
color: #666;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.field-item-container .dtable-switch .custom-switch .custom-switch-description {
|
|
56
|
-
width: 192px;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.field-item-container .dtable-switch .custom-switch .custom-switch-indicator {
|
|
60
|
-
width: 22px;
|
|
61
|
-
height: 12px;
|
|
62
|
-
border-radius: 6px;
|
|
63
|
-
margin-right: .25rem;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.field-item-container .dtable-switch .custom-switch .custom-switch-indicator::before {
|
|
67
|
-
height: 8px;
|
|
68
|
-
width: 8px;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.field-item-container .dtable-switch .custom-switch-input:checked~.custom-switch-indicator:before {
|
|
72
|
-
left: 12px;
|
|
73
|
-
}
|
|
74
|
-
|
|
@@ -29,17 +29,17 @@ function FieldDisplaySetting(_ref) {
|
|
|
29
29
|
setCollapsed(!isCollapsed);
|
|
30
30
|
};
|
|
31
31
|
const defaultStyle = {
|
|
32
|
-
transition:
|
|
32
|
+
transition: "all ".concat(DURATION, "ms cubic-bezier(.645,.045,.355,1)"),
|
|
33
33
|
opacity: 0
|
|
34
34
|
};
|
|
35
35
|
const transitionStyles = {
|
|
36
36
|
entering: {
|
|
37
37
|
opacity: 1,
|
|
38
|
-
height:
|
|
38
|
+
height: "".concat(fields.length * FIELD_ITEM_HEIGHT + BANNER_HEIGHT, "px")
|
|
39
39
|
},
|
|
40
40
|
entered: {
|
|
41
41
|
opacity: 1,
|
|
42
|
-
height:
|
|
42
|
+
height: "".concat(fields.length * FIELD_ITEM_HEIGHT + BANNER_HEIGHT, "px")
|
|
43
43
|
},
|
|
44
44
|
exiting: {
|
|
45
45
|
opacity: 0,
|
|
@@ -58,7 +58,7 @@ function FieldDisplaySetting(_ref) {
|
|
|
58
58
|
}, /*#__PURE__*/_react.default.createElement(_reactstrap.Label, {
|
|
59
59
|
className: "mb-0"
|
|
60
60
|
}, textProperties.titleValue), /*#__PURE__*/_react.default.createElement("span", {
|
|
61
|
-
className:
|
|
61
|
+
className: "dtable-font dtable-icon-right expand-button ".concat(isCollapsed ? '' : 'revolving')
|
|
62
62
|
})), /*#__PURE__*/_react.default.createElement(_reactTransitionGroup.Transition, {
|
|
63
63
|
nodeRef: nodeRef,
|
|
64
64
|
in: !isCollapsed,
|
|
@@ -71,7 +71,7 @@ function FieldDisplaySetting(_ref) {
|
|
|
71
71
|
...transitionStyles[state]
|
|
72
72
|
}
|
|
73
73
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
74
|
-
className:
|
|
74
|
+
className: "field-setting-banner ".concat(isCollapsed ? 'd-none' : 'd-flex', " align-items-center justify-content-between h-5 mt-2 mb-2")
|
|
75
75
|
}, /*#__PURE__*/_react.default.createElement(_reactstrap.Label, {
|
|
76
76
|
className: "mb-0"
|
|
77
77
|
}, textProperties.bannerValue), /*#__PURE__*/_react.default.createElement("span", {
|
|
@@ -81,7 +81,7 @@ function FieldDisplaySetting(_ref) {
|
|
|
81
81
|
className: "field-setting-body"
|
|
82
82
|
}, fields.map((field, index) => {
|
|
83
83
|
return /*#__PURE__*/_react.default.createElement(_fieldItem.default, {
|
|
84
|
-
key:
|
|
84
|
+
key: "".concat(field.key, "-").concat(index),
|
|
85
85
|
field: field,
|
|
86
86
|
isCollapsed: isCollapsed,
|
|
87
87
|
onClickField: onClickField,
|
|
@@ -30,7 +30,7 @@ class FileFormatter extends _react.default.PureComponent {
|
|
|
30
30
|
file: item
|
|
31
31
|
}), value.length !== 1 && /*#__PURE__*/_react.default.createElement("span", {
|
|
32
32
|
className: "file-item-count"
|
|
33
|
-
},
|
|
33
|
+
}, "+".concat(value.length)));
|
|
34
34
|
}
|
|
35
35
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
36
36
|
className: className
|
|
@@ -17,7 +17,7 @@ class FileItemFormatter extends _react.Component {
|
|
|
17
17
|
isImage
|
|
18
18
|
} = (0, _utils.getFileThumbnailInfo)(file);
|
|
19
19
|
return /*#__PURE__*/_react.default.createElement("img", {
|
|
20
|
-
className:
|
|
20
|
+
className: "file-item-icon ".concat(isImage ? 'img' : ''),
|
|
21
21
|
src: fileIconUrl,
|
|
22
22
|
alt: (file === null || file === void 0 ? void 0 : file.name) || ''
|
|
23
23
|
});
|
|
@@ -34,7 +34,7 @@ class FormulaFormatter extends _react.default.Component {
|
|
|
34
34
|
} = this.props;
|
|
35
35
|
const gridCellClassName = this.getGridCellClassName(resultType);
|
|
36
36
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
37
|
-
className:
|
|
37
|
+
className: "dtable-ui cell-formatter-container formula-formatter ".concat(containerClassName, " ").concat(gridCellClassName),
|
|
38
38
|
title: cellValue,
|
|
39
39
|
"aria-label": cellValue
|
|
40
40
|
}, cellValue);
|
|
@@ -69,14 +69,14 @@ class FormulaFormatter extends _react.default.Component {
|
|
|
69
69
|
if (!Array.isArray(value)) {
|
|
70
70
|
cellValue = (0, _cellValueValidator.default)(value, array_type) ? [value] : [];
|
|
71
71
|
}
|
|
72
|
-
const contentItemClassName =
|
|
72
|
+
const contentItemClassName = "formula-formatter-content-item ".concat(_isSimpleCellFormatterColumn ? 'simple-cell-formatter' : '');
|
|
73
73
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
74
74
|
className: "dtable-ui formula-formatter multiple"
|
|
75
75
|
}, cellValue.map((v, index) => {
|
|
76
76
|
formatterProps.value = v;
|
|
77
77
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
78
78
|
className: contentItemClassName,
|
|
79
|
-
key:
|
|
79
|
+
key: "formula-formatter-content-item-".concat(index)
|
|
80
80
|
}, this.createColumnFormatter(Formatter, formatterProps));
|
|
81
81
|
}));
|
|
82
82
|
};
|
|
@@ -110,7 +110,7 @@ class FormulaFormatter extends _react.default.Component {
|
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
112
|
createColumnFormatter(Formatter, formatterProps) {
|
|
113
|
-
if (/*#__PURE__*/_react.default.isValidElement(Formatter)) {
|
|
113
|
+
if ( /*#__PURE__*/_react.default.isValidElement(Formatter)) {
|
|
114
114
|
return /*#__PURE__*/_react.default.cloneElement(Formatter, {
|
|
115
115
|
...formatterProps
|
|
116
116
|
});
|
|
@@ -67,7 +67,7 @@ class HtmlLongTextFormatter extends _react.Component {
|
|
|
67
67
|
const className = (0, _classnames.default)('dtable-ui cell-formatter-container long-text-formatter', containerClassName);
|
|
68
68
|
if (!innerHtml) return null;
|
|
69
69
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
70
|
-
className:
|
|
70
|
+
className: "".concat(className, " article"),
|
|
71
71
|
dangerouslySetInnerHTML: {
|
|
72
72
|
__html: innerHtml
|
|
73
73
|
}
|
|
@@ -88,7 +88,7 @@ class ImageFormatter extends _react.default.Component {
|
|
|
88
88
|
alt: ""
|
|
89
89
|
}), value.length !== 1 && /*#__PURE__*/_react.default.createElement("span", {
|
|
90
90
|
className: "image-item-count"
|
|
91
|
-
},
|
|
91
|
+
}, "+".concat(value.length)));
|
|
92
92
|
}
|
|
93
93
|
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
94
94
|
className: className
|
|
@@ -109,8 +109,7 @@ class ImageFormatter extends _react.default.Component {
|
|
|
109
109
|
readOnly: readOnly,
|
|
110
110
|
server: server,
|
|
111
111
|
moveToPrevRowImage: this.props.moveToPrevRowImage,
|
|
112
|
-
moveToNextRowImage: this.props.moveToNextRowImage
|
|
113
|
-
onViewOriginal: this.props.onViewOriginal
|
|
112
|
+
moveToNextRowImage: this.props.moveToNextRowImage
|
|
114
113
|
}));
|
|
115
114
|
}
|
|
116
115
|
}
|
|
@@ -9,7 +9,6 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
10
|
var _reactImageLightbox = _interopRequireDefault(require("@seafile/react-image-lightbox"));
|
|
11
11
|
var _utils = require("./utils");
|
|
12
|
-
var _lang = require("../lang");
|
|
13
12
|
require("@seafile/react-image-lightbox/style.css");
|
|
14
13
|
function ImagePreviewerLightbox(props) {
|
|
15
14
|
const {
|
|
@@ -55,11 +54,7 @@ function ImagePreviewerLightbox(props) {
|
|
|
55
54
|
} : null,
|
|
56
55
|
onClickDownload: downloadImage ? () => {
|
|
57
56
|
downloadImage(URL);
|
|
58
|
-
} : null
|
|
59
|
-
imagePadding: 70,
|
|
60
|
-
onViewOriginal: props.onViewOriginal,
|
|
61
|
-
viewOriginalImageLabel: (0, _lang.getLocale)('View_original_image'),
|
|
62
|
-
enableRotate: true
|
|
57
|
+
} : null
|
|
63
58
|
});
|
|
64
59
|
}
|
|
65
60
|
var _default = exports.default = ImagePreviewerLightbox;
|
|
@@ -17,7 +17,7 @@ class MBEditorHeader extends _react.default.Component {
|
|
|
17
17
|
onRightClick
|
|
18
18
|
} = this.props;
|
|
19
19
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
20
|
-
className:
|
|
20
|
+
className: "dtable-ui-mb-editor-header ".concat(titleClass ? titleClass : '')
|
|
21
21
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
22
22
|
className: "editor-header-left-content",
|
|
23
23
|
onClick: onLeftClick
|
|
@@ -22,7 +22,7 @@ class MultipleSelectFormatter extends _react.default.PureComponent {
|
|
|
22
22
|
if (selectedOptions.length === 0) return [];
|
|
23
23
|
return selectedOptions.map(option => {
|
|
24
24
|
return /*#__PURE__*/_react.default.createElement(_SelectItem.default, {
|
|
25
|
-
key:
|
|
25
|
+
key: "multiple-".concat(option.id),
|
|
26
26
|
option: option
|
|
27
27
|
});
|
|
28
28
|
});
|
|
@@ -24,9 +24,9 @@ class RateFormatter extends _react.default.Component {
|
|
|
24
24
|
const validValue = Math.min(rate_max_number, value);
|
|
25
25
|
let rateList = [];
|
|
26
26
|
for (let i = 0; i < validValue; i++) {
|
|
27
|
-
rateList.push(/*#__PURE__*/_react.default.createElement("i", {
|
|
28
|
-
key:
|
|
29
|
-
className:
|
|
27
|
+
rateList.push( /*#__PURE__*/_react.default.createElement("i", {
|
|
28
|
+
key: "dtable-ui-component-rate-".concat(i),
|
|
29
|
+
className: "dtable-font ".concat(rate_style_type),
|
|
30
30
|
style: {
|
|
31
31
|
color: rate_style_color || '#e5e5e5'
|
|
32
32
|
}
|
|
@@ -53,7 +53,7 @@ const RoleStatusEditor = _ref => {
|
|
|
53
53
|
label
|
|
54
54
|
} = option;
|
|
55
55
|
return /*#__PURE__*/_react.default.createElement(_reactstrap.DropdownItem, {
|
|
56
|
-
key:
|
|
56
|
+
key: "item-".concat(value),
|
|
57
57
|
onClick: () => handleClickMenuOption(option)
|
|
58
58
|
}, label, value === currentOption.value && /*#__PURE__*/_react.default.createElement("i", {
|
|
59
59
|
className: "dtable-font dtable-icon-check-mark ml-2"
|
|
@@ -60,12 +60,12 @@ class RowExpandFileItemFormatter extends _react.Component {
|
|
|
60
60
|
const id = 'file-list-preview-item' + column.key + index;
|
|
61
61
|
const url = this.getFileIconData(file);
|
|
62
62
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
63
|
-
key:
|
|
63
|
+
key: "file-".concat(index),
|
|
64
64
|
className: "row-expand-item-file",
|
|
65
65
|
id: id
|
|
66
66
|
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
67
67
|
src: url,
|
|
68
|
-
id:
|
|
68
|
+
id: "item-file-".concat(index),
|
|
69
69
|
alt: file.name
|
|
70
70
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
71
71
|
className: "dtable-file-icons-choice"
|
|
@@ -94,7 +94,7 @@ class EditorFormatter extends _react.default.Component {
|
|
|
94
94
|
const {
|
|
95
95
|
collaborators
|
|
96
96
|
} = this.state;
|
|
97
|
-
const containerClassName =
|
|
97
|
+
const containerClassName = "dtable-".concat(columnType, "-formatter ").concat(className || '');
|
|
98
98
|
let cellValue = row[column.key] !== null && row[column.key] !== undefined ? row[column.key] : row[column.name];
|
|
99
99
|
switch (columnType) {
|
|
100
100
|
case _constants.CellType.TEXT:
|
|
@@ -33,7 +33,7 @@ class RowExpandFormulaFormatter extends _react.default.Component {
|
|
|
33
33
|
};
|
|
34
34
|
this.onOpenUrlLink = url => {
|
|
35
35
|
if (!(0, _utils.isValidUrl)(url)) {
|
|
36
|
-
url =
|
|
36
|
+
url = "http://".concat(url);
|
|
37
37
|
}
|
|
38
38
|
try {
|
|
39
39
|
(0, _utils.openUrlLink)(url);
|
|
@@ -42,7 +42,7 @@ class RowExpandFormulaFormatter extends _react.default.Component {
|
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
this.onOpenEmailLink = email => {
|
|
45
|
-
window.location.href =
|
|
45
|
+
window.location.href = "mailto:".concat(email.trim());
|
|
46
46
|
};
|
|
47
47
|
this.renderBorder = dom => {
|
|
48
48
|
const {
|
|
@@ -76,8 +76,8 @@ class RowExpandFormulaFormatter extends _react.default.Component {
|
|
|
76
76
|
containerClassName
|
|
77
77
|
} = this.props;
|
|
78
78
|
const customClassName = this.getGridCellClassName(resultType);
|
|
79
|
-
const className =
|
|
80
|
-
return this.renderBorder(/*#__PURE__*/_react.default.createElement("div", {
|
|
79
|
+
const className = "dtable-ui cell-formatter-container formula-formatter ".concat(containerClassName, " ").concat(customClassName);
|
|
80
|
+
return this.renderBorder( /*#__PURE__*/_react.default.createElement("div", {
|
|
81
81
|
className: className,
|
|
82
82
|
title: cellValue,
|
|
83
83
|
"aria-label": cellValue
|
|
@@ -120,7 +120,7 @@ class RowExpandFormulaFormatter extends _react.default.Component {
|
|
|
120
120
|
formulaEmail = cellValue[0];
|
|
121
121
|
formulaEmail = formulaEmail ? formulaEmail.trim() : '';
|
|
122
122
|
}
|
|
123
|
-
return this.renderBorder(/*#__PURE__*/_react.default.createElement("div", {
|
|
123
|
+
return this.renderBorder( /*#__PURE__*/_react.default.createElement("div", {
|
|
124
124
|
className: "dtable-ui formula-formatter multiple"
|
|
125
125
|
}, cellValue.map((v, index) => {
|
|
126
126
|
formatterProps.value = v;
|
|
@@ -130,7 +130,7 @@ class RowExpandFormulaFormatter extends _react.default.Component {
|
|
|
130
130
|
}, {
|
|
131
131
|
'formula-url-formatter-column': formulaUrl || formulaEmail
|
|
132
132
|
}),
|
|
133
|
-
key:
|
|
133
|
+
key: "formula-formatter-content-item-".concat(index)
|
|
134
134
|
}, formulaUrl && /*#__PURE__*/_react.default.createElement("span", {
|
|
135
135
|
"aria-hidden": "true",
|
|
136
136
|
className: "dtable-font dtable-icon-url formula-url-link",
|
|
@@ -172,7 +172,7 @@ class RowExpandFormulaFormatter extends _react.default.Component {
|
|
|
172
172
|
};
|
|
173
173
|
}
|
|
174
174
|
createColumnFormatter(Formatter, formatterProps) {
|
|
175
|
-
if (/*#__PURE__*/_react.default.isValidElement(Formatter)) {
|
|
175
|
+
if ( /*#__PURE__*/_react.default.isValidElement(Formatter)) {
|
|
176
176
|
return /*#__PURE__*/_react.default.cloneElement(Formatter, {
|
|
177
177
|
...formatterProps
|
|
178
178
|
});
|
|
@@ -52,7 +52,8 @@ class RowExpandImageFormatter extends _react.default.Component {
|
|
|
52
52
|
server,
|
|
53
53
|
containerClassName,
|
|
54
54
|
readOnly,
|
|
55
|
-
column
|
|
55
|
+
column,
|
|
56
|
+
downloadImage
|
|
56
57
|
} = this.props;
|
|
57
58
|
const {
|
|
58
59
|
isPreviewImage,
|
|
@@ -69,7 +70,7 @@ class RowExpandImageFormatter extends _react.default.Component {
|
|
|
69
70
|
key: index,
|
|
70
71
|
index: index,
|
|
71
72
|
column: column,
|
|
72
|
-
downloadFile:
|
|
73
|
+
downloadFile: downloadImage,
|
|
73
74
|
deleteFile: this.props.deleteFile,
|
|
74
75
|
readOnly: readOnly,
|
|
75
76
|
onImageClick: this.onImageClick
|
|
@@ -81,9 +82,8 @@ class RowExpandImageFormatter extends _react.default.Component {
|
|
|
81
82
|
moveToPrevImage: this.movePrev,
|
|
82
83
|
moveToNextImage: this.moveNext,
|
|
83
84
|
deleteImage: this.props.deleteFile,
|
|
84
|
-
downloadImage:
|
|
85
|
+
downloadImage: downloadImage,
|
|
85
86
|
onRotateImage: this.props.rotateImage,
|
|
86
|
-
onViewOriginal: this.props.onViewOriginal,
|
|
87
87
|
readOnly: readOnly,
|
|
88
88
|
server: server,
|
|
89
89
|
moveToPrevRowImage: this.props.moveToPrevRowImage,
|
|
@@ -65,13 +65,13 @@ class RowExpandImageItemFormatter extends _react.Component {
|
|
|
65
65
|
const id = 'image-list-preview-item' + column.key + index;
|
|
66
66
|
const name = decodeURI(url.slice(url.lastIndexOf('/') + 1));
|
|
67
67
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
68
|
-
key:
|
|
68
|
+
key: "image-".concat(index),
|
|
69
69
|
className: "row-expand-item-image",
|
|
70
70
|
id: id,
|
|
71
71
|
onClick: this.onClickImage
|
|
72
72
|
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
73
73
|
src: url,
|
|
74
|
-
id:
|
|
74
|
+
id: "item-image-".concat(index),
|
|
75
75
|
alt: name
|
|
76
76
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
77
77
|
className: "dtable-image-icons-choice"
|
|
@@ -41,7 +41,7 @@ class CollaboratorItemFormatter extends _react.Component {
|
|
|
41
41
|
}
|
|
42
42
|
if (!context) return;
|
|
43
43
|
const mediaUrl = context.getSetting('mediaUrl');
|
|
44
|
-
const defaultAvatarUrl =
|
|
44
|
+
const defaultAvatarUrl = "".concat(mediaUrl, "/avatars/default.png");
|
|
45
45
|
if (cellValue === 'anonymous') {
|
|
46
46
|
collaborator = {
|
|
47
47
|
name: 'anonymous',
|
|
@@ -58,7 +58,7 @@ class RowExpandLinkFormatter extends _react.Component {
|
|
|
58
58
|
}, cellValue.map((value, index) => {
|
|
59
59
|
if (!value) return null;
|
|
60
60
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
61
|
-
key:
|
|
61
|
+
key: "link-".concat(displayColumnType, "-").concat(index),
|
|
62
62
|
className: "row-expand-link-item"
|
|
63
63
|
}, value);
|
|
64
64
|
}));
|
|
@@ -73,7 +73,7 @@ class RowExpandLinkFormatter extends _react.Component {
|
|
|
73
73
|
format
|
|
74
74
|
} = displayColumnData || {};
|
|
75
75
|
return /*#__PURE__*/_react.default.createElement(_DateFormatter.default, {
|
|
76
|
-
key:
|
|
76
|
+
key: "link-".concat(displayColumnType, "-").concat(index),
|
|
77
77
|
value: value,
|
|
78
78
|
format: format,
|
|
79
79
|
containerClassName: "row-expand-link-item"
|
|
@@ -87,7 +87,7 @@ class RowExpandLinkFormatter extends _react.Component {
|
|
|
87
87
|
}, cellValue.map((value, index) => {
|
|
88
88
|
if (!value) return null;
|
|
89
89
|
return /*#__PURE__*/_react.default.createElement(_CTimeFormatter.default, {
|
|
90
|
-
key:
|
|
90
|
+
key: "link-".concat(displayColumnType, "-").concat(index),
|
|
91
91
|
value: value,
|
|
92
92
|
containerClassName: "row-expand-link-item"
|
|
93
93
|
});
|
|
@@ -100,7 +100,7 @@ class RowExpandLinkFormatter extends _react.Component {
|
|
|
100
100
|
}, cellValue.map((value, index) => {
|
|
101
101
|
if (!value) return null;
|
|
102
102
|
return /*#__PURE__*/_react.default.createElement(_MTimeFormatter.default, {
|
|
103
|
-
key:
|
|
103
|
+
key: "link-".concat(displayColumnType, "-").concat(index),
|
|
104
104
|
value: value,
|
|
105
105
|
containerClassName: "row-expand-link-item"
|
|
106
106
|
});
|
|
@@ -114,7 +114,7 @@ class RowExpandLinkFormatter extends _react.Component {
|
|
|
114
114
|
}, cellValue.map((value, index) => {
|
|
115
115
|
if (!value) return null;
|
|
116
116
|
return /*#__PURE__*/_react.default.createElement(_collaboratorItemFormatter.default, {
|
|
117
|
-
key:
|
|
117
|
+
key: "link-".concat(displayColumnType, "-").concat(index),
|
|
118
118
|
cellValue: value,
|
|
119
119
|
collaborators: collaborators,
|
|
120
120
|
context: props.context,
|
|
@@ -137,7 +137,7 @@ class RowExpandLinkFormatter extends _react.Component {
|
|
|
137
137
|
}, cellValue.map((value, index) => {
|
|
138
138
|
if (!value) return null;
|
|
139
139
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
140
|
-
key:
|
|
140
|
+
key: "link-".concat(displayColumnType, "-").concat(index),
|
|
141
141
|
className: "row-expand-link-item"
|
|
142
142
|
}, (0, _valueDisplayUtils.getCellDisplayValue)({
|
|
143
143
|
[displayColumn.key]: value
|
|
@@ -26,9 +26,9 @@ class RateExpendRateFormatter extends _react.default.Component {
|
|
|
26
26
|
let style = {
|
|
27
27
|
color: value >= i + 1 ? rate_style_color : '#e5e5e5'
|
|
28
28
|
};
|
|
29
|
-
rateList.push(/*#__PURE__*/_react.default.createElement("i", {
|
|
30
|
-
key:
|
|
31
|
-
className:
|
|
29
|
+
rateList.push( /*#__PURE__*/_react.default.createElement("i", {
|
|
30
|
+
key: "dtable-ui-component-rate-".concat(i),
|
|
31
|
+
className: "dtable-font ".concat(rate_style_type),
|
|
32
32
|
style: style
|
|
33
33
|
}));
|
|
34
34
|
}
|
|
@@ -18,7 +18,7 @@ class UrlFormatter extends _react.default.Component {
|
|
|
18
18
|
value
|
|
19
19
|
} = this.props;
|
|
20
20
|
const url = (0, _editorUtils.getTrimmedString)(value);
|
|
21
|
-
const validUrl = (0, _editorUtils.isValidUrl)(url) ? url :
|
|
21
|
+
const validUrl = (0, _editorUtils.isValidUrl)(url) ? url : "http://".concat(url);
|
|
22
22
|
try {
|
|
23
23
|
let a = document.createElement('a');
|
|
24
24
|
document.body.appendChild(a);
|
package/lib/SelectItem/index.js
CHANGED
|
@@ -19,7 +19,7 @@ class SelectItem extends _react.default.PureComponent {
|
|
|
19
19
|
textAlign: 'center',
|
|
20
20
|
borderRadius: '10px',
|
|
21
21
|
maxWidth: '250px',
|
|
22
|
-
fontSize: fontSize ?
|
|
22
|
+
fontSize: fontSize ? "".concat(fontSize, "px") : '13px',
|
|
23
23
|
backgroundColor: option.color,
|
|
24
24
|
color: option.textColor || null
|
|
25
25
|
};
|
|
@@ -137,7 +137,7 @@ class SelectOptionGroup extends _react.Component {
|
|
|
137
137
|
let key = opt.value.column ? opt.value.column.key : i;
|
|
138
138
|
let isActive = this.state.activeIndex === i;
|
|
139
139
|
return /*#__PURE__*/_react.default.createElement(_option.default, {
|
|
140
|
-
key:
|
|
140
|
+
key: "".concat(key, "-").concat(i),
|
|
141
141
|
index: i,
|
|
142
142
|
isActive: isActive,
|
|
143
143
|
value: opt.value,
|
|
@@ -29,8 +29,8 @@ class SimpleLongTextFormatter extends _react.default.Component {
|
|
|
29
29
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
30
30
|
className: "long-text-check-list"
|
|
31
31
|
}, /*#__PURE__*/_react.default.createElement("i", {
|
|
32
|
-
className:
|
|
33
|
-
}),
|
|
32
|
+
className: "dtable-font dtable-icon-check-square-solid ".concat(checkList.completed === checkList.total ? 'long-text-check-list-completed' : '')
|
|
33
|
+
}), "".concat(checkList.completed, "/").concat(checkList.total));
|
|
34
34
|
};
|
|
35
35
|
this.renderImages = value => {
|
|
36
36
|
const images = value.images;
|
package/lib/locals/en.js
CHANGED
|
@@ -30,7 +30,6 @@ const en = {
|
|
|
30
30
|
"Current_user_department_and_sub": "Current user\"s department and sub-departments",
|
|
31
31
|
"Specific_departments": "Specific departments",
|
|
32
32
|
"Deleted_department": "Deleted department",
|
|
33
|
-
"View_original_image": "View original image",
|
|
34
33
|
"Add_filter": "Add filter",
|
|
35
34
|
"Submit": "Submit",
|
|
36
35
|
"No_filters": "No filters",
|
package/lib/locals/zh-CN.js
CHANGED
|
@@ -185,7 +185,7 @@ class MBSelectEditorPopover extends _react.default.Component {
|
|
|
185
185
|
className: "dtable-font dtable-icon-add-table"
|
|
186
186
|
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
187
187
|
className: "dtable-ui-add-new-option"
|
|
188
|
-
},
|
|
188
|
+
}, "".concat((0, _lang.getLocale)('Add_an_option'), " ").concat(searchVal)))));
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
MBSelectEditorPopover.defaultProps = {
|
package/lib/toaster/alert.js
CHANGED
|
@@ -31,7 +31,7 @@ class Alert extends _react.default.PureComponent {
|
|
|
31
31
|
} = this.props;
|
|
32
32
|
const iconClass = this.getIconClass(intent);
|
|
33
33
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
34
|
-
className:
|
|
34
|
+
className: "dtable-toast-alert-container ".concat(intent || 'success')
|
|
35
35
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
36
36
|
className: "toast-alert-icon"
|
|
37
37
|
}, /*#__PURE__*/_react.default.createElement("i", {
|
package/lib/toaster/toast.js
CHANGED
|
@@ -78,7 +78,7 @@ class Toast extends _react.default.PureComponent {
|
|
|
78
78
|
onExited: this.props.onRemove
|
|
79
79
|
}, state => /*#__PURE__*/_react.default.createElement("div", {
|
|
80
80
|
"data-state": state,
|
|
81
|
-
className:
|
|
81
|
+
className: "dtable-toast-container ".concat(state),
|
|
82
82
|
onMouseEnter: this.handleMouseEnter,
|
|
83
83
|
onMouseLeave: this.handleMouseLeave,
|
|
84
84
|
style: {
|
|
@@ -37,7 +37,7 @@ class ToastManager extends _react.default.PureComponent {
|
|
|
37
37
|
};
|
|
38
38
|
this.createToastInstance = (title, settings) => {
|
|
39
39
|
const uniqueId = ++ToastManager.idCounter;
|
|
40
|
-
const id = hasCustomId(settings) ?
|
|
40
|
+
const id = hasCustomId(settings) ? "".concat(settings.id, "-").concat(uniqueId) : uniqueId;
|
|
41
41
|
let hasCloseButton = settings.hasCloseButton || true;
|
|
42
42
|
let duration = settings.duration || 2;
|
|
43
43
|
if (settings.hasCloseButton !== undefined) {
|
package/lib/toaster/toaster.js
CHANGED
|
@@ -65,7 +65,7 @@ class Toaster {
|
|
|
65
65
|
const container = document.createElement('div');
|
|
66
66
|
container.setAttribute('data-evergreen-toaster-container', '');
|
|
67
67
|
document.body.appendChild(container);
|
|
68
|
-
_reactDom.default.render(/*#__PURE__*/_react.default.createElement(_toastManager.default, {
|
|
68
|
+
_reactDom.default.render( /*#__PURE__*/_react.default.createElement(_toastManager.default, {
|
|
69
69
|
bindNotify: this._bindNotify,
|
|
70
70
|
bindGetToasts: this._bindGetToasts,
|
|
71
71
|
bindCloseAll: this._bindCloseAll
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dtable-ui-component",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@seafile/react-image-lightbox": "
|
|
6
|
+
"@seafile/react-image-lightbox": "2.0.5",
|
|
7
7
|
"@seafile/seafile-calendar": "0.0.24",
|
|
8
|
-
"@seafile/seafile-editor": "~1.0.
|
|
8
|
+
"@seafile/seafile-editor": "~1.0.122",
|
|
9
9
|
"antd-mobile": "2.3.1",
|
|
10
10
|
"classnames": "2.3.2",
|
|
11
11
|
"dayjs": "1.10.7",
|