dtable-ui-component 5.3.1-beta6 → 5.3.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/CheckboxEditor/index.css +20 -3
- package/lib/CheckboxEditor/index.js +35 -98
- package/lib/CheckboxFormatter/index.js +9 -6
- package/lib/CollaboratorEditor/index.css +35 -12
- package/lib/CollaboratorEditor/index.js +212 -18
- package/lib/CollaboratorEditor/{mb-collaborator-editor → mb-collaborator-editor-popover}/index.js +29 -26
- package/lib/CollaboratorEditor/pc-collaborator-editor-popover/index.js +97 -0
- package/lib/CollaboratorItem/index.css +1 -1
- package/lib/CollaboratorItem/index.js +2 -6
- package/lib/DTableFiltersPopover/utils/index.js +7 -1
- package/lib/DTableFiltersPopover/widgets/filter-calendar.js +2 -2
- package/lib/DTableGroupSelect/select-option-group.css +17 -17
- package/lib/DTableGroupSelect/select-option-group.js +1 -1
- package/lib/DTableSelect/index.js +1 -3
- package/lib/DateEditor/index.js +51 -14
- package/lib/DateEditor/pc-date-editor-popover.js +12 -145
- package/lib/Department-editor/department-single-select.js +1 -1
- package/lib/Department-editor/index.js +4 -3
- package/lib/DepartmentSingleSelectFormatter/index.js +1 -2
- package/lib/FileEditor/index.js +11 -258
- package/lib/FileEditor/pc-files-addition/index.js +1 -0
- package/lib/FileEditor/pc-files-addition/pc-file-uploaded-item.js +1 -0
- package/lib/FileEditor/pc-files-preview/index.js +1 -0
- package/lib/FileEditor/pc-files-preview/pc-file-item-preview.js +1 -0
- package/lib/FileItemFormatter/assets/file/192/excel.png +0 -0
- package/lib/FileItemFormatter/assets/file/192/file.png +0 -0
- package/lib/FileItemFormatter/assets/file/192/music.png +0 -0
- package/lib/FileItemFormatter/assets/file/192/pdf.png +0 -0
- package/lib/FileItemFormatter/assets/file/192/pic.png +0 -0
- package/lib/FileItemFormatter/assets/file/192/ppt.png +0 -0
- package/lib/FileItemFormatter/assets/file/192/txt.png +0 -0
- package/lib/FileItemFormatter/assets/file/192/video.png +0 -0
- package/lib/FileItemFormatter/assets/file/192/word.png +0 -0
- package/lib/FileItemFormatter/assets/file/24/excel.png +0 -0
- package/lib/FileItemFormatter/assets/file/24/file.png +0 -0
- package/lib/FileItemFormatter/assets/file/24/music.png +0 -0
- package/lib/FileItemFormatter/assets/file/24/pdf.png +0 -0
- package/lib/FileItemFormatter/assets/file/24/pic.png +0 -0
- package/lib/FileItemFormatter/assets/file/24/ppt.png +0 -0
- package/lib/FileItemFormatter/assets/file/24/txt.png +0 -0
- package/lib/FileItemFormatter/assets/file/24/video.png +0 -0
- package/lib/FileItemFormatter/assets/file/24/word.png +0 -0
- package/lib/FileItemFormatter/assets/folder/folder-192.png +0 -0
- package/lib/FileItemFormatter/assets/folder/folder-24.png +0 -0
- package/lib/FileItemFormatter/index.js +20 -19
- package/lib/FileItemFormatter/utils.js +99 -0
- package/lib/FileUploader/index.js +14 -268
- package/lib/FormulaFormatter/index.js +1 -2
- package/lib/FormulaFormatter/utils.js +31 -0
- package/lib/LinkEditor/pc-link-editor-popover/index.js +1 -1
- package/lib/MultipleSelectEditor/index.css +9 -0
- package/lib/MultipleSelectEditor/index.js +177 -16
- package/lib/NumberEditor/index.js +77 -64
- package/lib/{RowExpandFormatter/RowExpandEmailFormatter → RowExpandEmailFormatter}/index.css +1 -1
- package/lib/{RowExpandFormatter/RowExpandEmailFormatter → RowExpandEmailFormatter}/index.js +1 -1
- package/lib/{RowExpandFormatter/RowExpandFileFormatter → RowExpandFileFormatter}/index.css +6 -6
- package/lib/{RowExpandFormatter/RowExpandFileFormatter → RowExpandFileFormatter}/index.js +1 -3
- package/lib/{RowExpandFormatter/RowExpandFileFormatter → RowExpandFileFormatter}/row-expand-file-item-formatter.js +11 -10
- package/lib/RowExpandFormatter/index.css +1 -27
- package/lib/RowExpandFormatter/index.js +100 -83
- package/lib/{RowExpandFormatter/RowExpandFormulaFormatter → RowExpandFormulaFormatter}/index.js +10 -11
- package/lib/{RowExpandFormatter/RowExpandImageFormatter → RowExpandImageFormatter}/index.css +6 -6
- package/lib/{RowExpandFormatter/RowExpandImageFormatter → RowExpandImageFormatter}/index.js +1 -1
- package/lib/{RowExpandFormatter/RowExpandImageFormatter → RowExpandImageFormatter}/row-expand-image-item-formatter.js +3 -3
- package/lib/{RowExpandFormatter/RowExpandLinkFormatter → RowExpandLinkFormatter}/collaborator-item-formatter.js +1 -1
- package/lib/{RowExpandFormatter/RowExpandLinkFormatter → RowExpandLinkFormatter}/index.js +6 -6
- package/lib/RowExpandLinkFormatter/utils.js +71 -0
- package/lib/{RowExpandFormatter/RowExpandRateFormatter → RowExpandRateFormatter}/index.css +1 -1
- package/lib/RowExpandUrlFormatter/index.css +1 -0
- package/lib/{RowExpandFormatter/RowExpandUrlFormatter → RowExpandUrlFormatter}/index.js +3 -4
- package/lib/SingleSelectEditor/index.css +14 -0
- package/lib/SingleSelectEditor/index.js +156 -16
- package/lib/TextEditor/index.js +42 -113
- package/lib/constants/index.js +2 -34
- package/lib/css/cell-editor.css +2 -18
- package/lib/index.js +46 -74
- package/lib/lang/index.js +16 -19
- package/lib/locals/de.js +103 -0
- package/lib/locals/en.js +104 -0
- package/lib/locals/es.js +103 -0
- package/lib/locals/fr.js +103 -0
- package/lib/locals/pt.js +103 -0
- package/lib/locals/ru.js +103 -0
- package/lib/locals/zh-CN.js +104 -0
- package/lib/select-editor/index.js +6 -6
- package/lib/select-editor/{mb-select-editor → mb-select-editor-popover}/index.js +3 -3
- package/lib/select-editor/pc-select-editor-popover/index.css +71 -0
- package/lib/select-editor/pc-select-editor-popover/index.js +122 -0
- package/lib/utils/editor-utils.js +6 -1
- package/lib/utils/url.js +8 -121
- package/lib/utils/utils.js +2 -145
- package/package.json +2 -3
- package/lib/CollaboratorEditor/pc-collaborator-editor/index.js +0 -257
- package/lib/Comment/body/comment.js +0 -190
- package/lib/Comment/body/index.css +0 -95
- package/lib/Comment/body/index.js +0 -32
- package/lib/Comment/footer/btns/index.css +0 -40
- package/lib/Comment/footer/btns/index.js +0 -113
- package/lib/Comment/footer/index.css +0 -157
- package/lib/Comment/footer/index.js +0 -170
- package/lib/Comment/footer/input/index.css +0 -52
- package/lib/Comment/footer/input/index.js +0 -448
- package/lib/Comment/footer/input/participant/index.css +0 -0
- package/lib/Comment/footer/input/participant/index.js +0 -53
- package/lib/Comment/footer/participants/index.css +0 -22
- package/lib/Comment/footer/participants/index.js +0 -68
- package/lib/Comment/footer/participants/participant/index.css +0 -5
- package/lib/Comment/footer/participants/participant/index.js +0 -32
- package/lib/Comment/footer/participants/participant-select/index.css +0 -104
- package/lib/Comment/footer/participants/participant-select/index.js +0 -182
- package/lib/Comment/index.css +0 -19
- package/lib/Comment/index.js +0 -305
- package/lib/Comment/model.js +0 -25
- package/lib/Comment/utils/common.js +0 -62
- package/lib/Comment/utils/index.js +0 -27
- package/lib/Comment/utils/utilities.js +0 -176
- package/lib/DeleteTip/index.js +0 -50
- package/lib/DigitalSignEditor/constants.js +0 -7
- package/lib/DigitalSignEditor/index.css +0 -69
- package/lib/DigitalSignEditor/index.js +0 -182
- package/lib/DigitalSignEditor/service.js +0 -38
- package/lib/DigitalSignEditor/signature-board/index.css +0 -35
- package/lib/DigitalSignEditor/signature-board/index.js +0 -135
- package/lib/DigitalSignEditor/signature-board/signature-tool.js +0 -396
- package/lib/DigitalSignEditor/utils.js +0 -29
- package/lib/DurationEditor/index.js +0 -111
- package/lib/EmailEditor/index.js +0 -59
- package/lib/FileEditor/addition-previewer/index.css +0 -1
- package/lib/FileEditor/addition-previewer/index.js +0 -52
- package/lib/FileEditor/addition-previewer/local-file-addition/index.css +0 -1
- package/lib/FileEditor/addition-previewer/local-file-addition/index.js +0 -252
- package/lib/FileEditor/constants.js +0 -7
- package/lib/FileEditor/files-previewer/file-previewer/dropdown-menu.js +0 -74
- package/lib/FileEditor/files-previewer/file-previewer/file-name-editor/index.css +0 -5
- package/lib/FileEditor/files-previewer/file-previewer/file-name-editor/index.js +0 -77
- package/lib/FileEditor/files-previewer/file-previewer/index.css +0 -88
- package/lib/FileEditor/files-previewer/file-previewer/index.js +0 -167
- package/lib/FileEditor/files-previewer/index.css +0 -56
- package/lib/FileEditor/files-previewer/index.js +0 -277
- package/lib/FileEditor/index.css +0 -6
- package/lib/FileEditor/utils.js +0 -22
- package/lib/FileUploader/index.css +0 -9
- package/lib/GeolocationEditor/country-editor.js +0 -319
- package/lib/GeolocationEditor/index.css +0 -641
- package/lib/GeolocationEditor/index.js +0 -241
- package/lib/GeolocationEditor/location-editor.js +0 -368
- package/lib/GeolocationEditor/map-editor/index.js +0 -456
- package/lib/GeolocationEditor/map-editor/large-editor/index.css +0 -137
- package/lib/GeolocationEditor/map-editor/large-editor/index.js +0 -461
- package/lib/GeolocationEditor/map-editor-utils.js +0 -153
- package/lib/GeolocationEditor/map-selection-editor/index.js +0 -455
- package/lib/GeolocationEditor/map-selection-editor/large-editor/index.css +0 -1
- package/lib/GeolocationEditor/map-selection-editor/large-editor/index.js +0 -447
- package/lib/GeolocationEditor/parse-geolocation.js +0 -282
- package/lib/GeolocationEditor/province-city-editor.js +0 -292
- package/lib/GeolocationEditor/province-editor.js +0 -226
- package/lib/GeolocationEditor/selector-header-item.js +0 -28
- package/lib/GeolocationEditor/selector-list.js +0 -33
- package/lib/GeolocationEditor/with-ref.js +0 -27
- package/lib/ImageEditor/addition-previewer/image-link/index.css +0 -45
- package/lib/ImageEditor/addition-previewer/image-link/index.js +0 -73
- package/lib/ImageEditor/addition-previewer/index.css +0 -106
- package/lib/ImageEditor/addition-previewer/index.js +0 -63
- package/lib/ImageEditor/addition-previewer/local-image-addition/index.css +0 -125
- package/lib/ImageEditor/addition-previewer/local-image-addition/index.js +0 -254
- package/lib/ImageEditor/constants.js +0 -7
- package/lib/ImageEditor/images-previewer/image-preview/index.css +0 -59
- package/lib/ImageEditor/images-previewer/image-preview/index.js +0 -155
- package/lib/ImageEditor/images-previewer/index.css +0 -18
- package/lib/ImageEditor/images-previewer/index.js +0 -140
- package/lib/ImageEditor/index.css +0 -24
- package/lib/ImageEditor/index.js +0 -194
- package/lib/ImageThumbnail/index.css +0 -20
- package/lib/ImageThumbnail/index.js +0 -136
- package/lib/RowExpandDialog/body/index.css +0 -21
- package/lib/RowExpandDialog/body/index.js +0 -262
- package/lib/RowExpandDialog/column-content/index.css +0 -44
- package/lib/RowExpandDialog/column-content/index.js +0 -50
- package/lib/RowExpandDialog/header/index.css +0 -31
- package/lib/RowExpandDialog/header/index.js +0 -55
- package/lib/RowExpandDialog/index.css +0 -24
- package/lib/RowExpandDialog/index.js +0 -252
- package/lib/RowExpandEditor/RowExpandAddBtn/index.css +0 -22
- package/lib/RowExpandEditor/RowExpandAddBtn/index.js +0 -24
- package/lib/RowExpandEditor/RowExpandCheckboxEditor/index.css +0 -18
- package/lib/RowExpandEditor/RowExpandCheckboxEditor/index.js +0 -43
- package/lib/RowExpandEditor/RowExpandCollaboratorEditor/index.css +0 -5
- package/lib/RowExpandEditor/RowExpandCollaboratorEditor/index.js +0 -232
- package/lib/RowExpandEditor/RowExpandDateEditor/index.js +0 -130
- package/lib/RowExpandEditor/RowExpandDepartmentEditor/index.js +0 -129
- package/lib/RowExpandEditor/RowExpandDigitalSignEditor/index.css +0 -13
- package/lib/RowExpandEditor/RowExpandDigitalSignEditor/index.js +0 -208
- package/lib/RowExpandEditor/RowExpandDurationEditor/index.js +0 -105
- package/lib/RowExpandEditor/RowExpandEmailEditor/index.css +0 -2
- package/lib/RowExpandEditor/RowExpandEmailEditor/index.js +0 -125
- package/lib/RowExpandEditor/RowExpandFileEditor/index.css +0 -1
- package/lib/RowExpandEditor/RowExpandFileEditor/index.js +0 -146
- package/lib/RowExpandEditor/RowExpandGeolocationEditor/index.css +0 -17
- package/lib/RowExpandEditor/RowExpandGeolocationEditor/index.js +0 -165
- package/lib/RowExpandEditor/RowExpandImageEditor/index.css +0 -6
- package/lib/RowExpandEditor/RowExpandImageEditor/index.js +0 -170
- package/lib/RowExpandEditor/RowExpandLongTextEditor/index.css +0 -6
- package/lib/RowExpandEditor/RowExpandLongTextEditor/index.js +0 -123
- package/lib/RowExpandEditor/RowExpandMultipleSelectEditor/index.css +0 -44
- package/lib/RowExpandEditor/RowExpandMultipleSelectEditor/index.js +0 -224
- package/lib/RowExpandEditor/RowExpandNumberEditor/index.js +0 -105
- package/lib/RowExpandEditor/RowExpandRateEditor/index.css +0 -13
- package/lib/RowExpandEditor/RowExpandRateEditor/index.js +0 -152
- package/lib/RowExpandEditor/RowExpandSingleSelectorEditor/index.css +0 -58
- package/lib/RowExpandEditor/RowExpandSingleSelectorEditor/index.js +0 -192
- package/lib/RowExpandEditor/RowExpandTextEditor/index.css +0 -4
- package/lib/RowExpandEditor/RowExpandTextEditor/index.js +0 -127
- package/lib/RowExpandEditor/RowExpandUrlEditor/index.css +0 -31
- package/lib/RowExpandEditor/RowExpandUrlEditor/index.js +0 -130
- package/lib/RowExpandEditor/constants.js +0 -44
- package/lib/RowExpandEditor/index.css +0 -0
- package/lib/RowExpandEditor/index.js +0 -32
- package/lib/RowExpandFormatter/RowExpandDepartmentFormatter/index.js +0 -27
- package/lib/RowExpandFormatter/RowExpandUrlFormatter/index.css +0 -1
- package/lib/RowExpandFormatter/constants.js +0 -60
- package/lib/UploadProgress/index.js +0 -38
- package/lib/UrlEditor/index.js +0 -62
- package/lib/common/editor-base.js +0 -53
- package/lib/constants/file.js +0 -96
- package/lib/constants/key-codes.js +0 -109
- package/lib/hooks/index.js +0 -16
- package/lib/locales/de.json +0 -167
- package/lib/locales/en.json +0 -167
- package/lib/locales/es.json +0 -167
- package/lib/locales/fr.json +0 -167
- package/lib/locales/pt.json +0 -167
- package/lib/locales/ru.json +0 -167
- package/lib/locales/zh-CN.json +0 -167
- package/lib/select-editor/pc-select-editor/index.css +0 -85
- package/lib/select-editor/pc-select-editor/index.js +0 -290
- package/lib/utils/cell-comparer.js +0 -35
- package/lib/utils/cell.js +0 -55
- package/lib/utils/column-utils.js +0 -25
- package/lib/utils/get-event-transfer.js +0 -75
- package/lib/utils/hotkey.js +0 -37
- package/lib/utils/object-utils.js +0 -61
- /package/lib/CollaboratorEditor/{mb-collaborator-editor → mb-collaborator-editor-popover}/index.css +0 -0
- /package/lib/CollaboratorEditor/{pc-collaborator-editor → pc-collaborator-editor-popover}/index.css +0 -0
- /package/lib/{RowExpandFormatter/RowExpandLinkFormatter → RowExpandLinkFormatter}/index.css +0 -0
- /package/lib/{RowExpandFormatter/RowExpandLinkFormatter → RowExpandLinkFormatter}/value-display-utils.js +0 -0
- /package/lib/{RowExpandFormatter/RowExpandRateFormatter → RowExpandRateFormatter}/index.js +0 -0
- /package/lib/select-editor/{mb-select-editor → mb-select-editor-popover}/index.css +0 -0
|
@@ -1,125 +0,0 @@
|
|
|
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 _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _constants = require("../../constants");
|
|
10
|
-
require("./index.css");
|
|
11
|
-
class RowExpandEmailEditor extends _react.default.Component {
|
|
12
|
-
constructor(props) {
|
|
13
|
-
super(props);
|
|
14
|
-
this.focusInput = () => {
|
|
15
|
-
// use setTimeout to make sure real DOM is rendered
|
|
16
|
-
setTimeout(() => {
|
|
17
|
-
this.urlInputRef.focus();
|
|
18
|
-
}, 1);
|
|
19
|
-
};
|
|
20
|
-
this.blurInput = () => {
|
|
21
|
-
setTimeout(() => {
|
|
22
|
-
this.urlInputRef.blur();
|
|
23
|
-
}, 1);
|
|
24
|
-
};
|
|
25
|
-
this.onBlur = () => {
|
|
26
|
-
const {
|
|
27
|
-
onCommit
|
|
28
|
-
} = this.props;
|
|
29
|
-
const updated = this.state.value.trim();
|
|
30
|
-
onCommit(updated);
|
|
31
|
-
};
|
|
32
|
-
this.onFocus = e => {
|
|
33
|
-
this.props.updateTabIndex(this.props.columnIndex);
|
|
34
|
-
};
|
|
35
|
-
this.onChange = e => {
|
|
36
|
-
const value = e.target.value;
|
|
37
|
-
if (value === this.state.value) return;
|
|
38
|
-
this.setState({
|
|
39
|
-
value
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
this.onCut = e => {
|
|
43
|
-
e.stopPropagation();
|
|
44
|
-
};
|
|
45
|
-
this.onPaste = e => {
|
|
46
|
-
e.stopPropagation();
|
|
47
|
-
};
|
|
48
|
-
this.onKeyDown = e => {
|
|
49
|
-
if (e.keyCode === _constants.KeyCodes.Esc) {
|
|
50
|
-
e.stopPropagation();
|
|
51
|
-
this.blurInput();
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
let {
|
|
55
|
-
selectionStart,
|
|
56
|
-
selectionEnd,
|
|
57
|
-
value
|
|
58
|
-
} = e.currentTarget;
|
|
59
|
-
if (e.keyCode === _constants.KeyCodes.ChineseInputMethod || e.keyCode === _constants.KeyCodes.LeftArrow && selectionStart === 0 || e.keyCode === _constants.KeyCodes.RightArrow && selectionEnd === value.length) {
|
|
60
|
-
e.stopPropagation();
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
this.onOpenEmailLink = () => {
|
|
64
|
-
const {
|
|
65
|
-
value
|
|
66
|
-
} = this.state;
|
|
67
|
-
let newValue = value.trim();
|
|
68
|
-
window.location.href = "mailto:".concat(newValue);
|
|
69
|
-
};
|
|
70
|
-
const {
|
|
71
|
-
row,
|
|
72
|
-
column,
|
|
73
|
-
valueKey
|
|
74
|
-
} = props;
|
|
75
|
-
this.state = {
|
|
76
|
-
value: row[column[valueKey]] || ''
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
componentDidMount() {
|
|
80
|
-
if (this.props.isEditorFocus) {
|
|
81
|
-
this.focusInput();
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
85
|
-
const {
|
|
86
|
-
column,
|
|
87
|
-
row,
|
|
88
|
-
valueKey
|
|
89
|
-
} = nextProps;
|
|
90
|
-
if (row._id !== this.props.row._id) {
|
|
91
|
-
this.setState({
|
|
92
|
-
value: row[column[valueKey]] || ''
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
if (nextProps.isEditorFocus === true && this.props.isEditorFocus === false) {
|
|
96
|
-
this.focusInput();
|
|
97
|
-
} else if (nextProps.isEditorFocus === false && this.props.isEditorFocus === true) {
|
|
98
|
-
this.blurInput();
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
render() {
|
|
102
|
-
let {
|
|
103
|
-
value
|
|
104
|
-
} = this.state;
|
|
105
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
106
|
-
className: "dtable-ui-row-expand-url-editor"
|
|
107
|
-
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
108
|
-
ref: ref => this.urlInputRef = ref,
|
|
109
|
-
type: "text",
|
|
110
|
-
onFocus: this.onFocus,
|
|
111
|
-
onBlur: this.onBlur,
|
|
112
|
-
onCut: this.onCut,
|
|
113
|
-
onPaste: this.onPaste,
|
|
114
|
-
onChange: this.onChange,
|
|
115
|
-
className: "form-control dtable-ui-row-expand-url-input",
|
|
116
|
-
value: value,
|
|
117
|
-
onKeyDown: this.onKeyDown
|
|
118
|
-
}), value && value.trim() && /*#__PURE__*/_react.default.createElement("span", {
|
|
119
|
-
"aria-hidden": "true",
|
|
120
|
-
className: "dtable-font dtable-icon-email dtable-ui-row-expand-jump-link",
|
|
121
|
-
onClick: this.onOpenEmailLink
|
|
122
|
-
}));
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
var _default = exports.default = RowExpandEmailEditor;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@import url('../RowExpandImageEditor/index.css');
|
|
@@ -1,146 +0,0 @@
|
|
|
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 _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _constants = require("../../constants");
|
|
10
|
-
var _RowExpandAddBtn = _interopRequireDefault(require("../RowExpandAddBtn"));
|
|
11
|
-
var _lang = require("../../lang");
|
|
12
|
-
var _ImageThumbnail = _interopRequireDefault(require("../../ImageThumbnail"));
|
|
13
|
-
var _url = require("../../utils/url");
|
|
14
|
-
var _FileEditor = _interopRequireDefault(require("../../FileEditor"));
|
|
15
|
-
require("./index.css");
|
|
16
|
-
class RowExpandFileEditor extends _react.default.Component {
|
|
17
|
-
constructor(props) {
|
|
18
|
-
super(props);
|
|
19
|
-
this.onKeyDown = e => {
|
|
20
|
-
if (e.keyCode === _constants.KeyCodes.Enter && this.props.isEditorFocus && !this.state.isShowFileEditor) {
|
|
21
|
-
this.setState({
|
|
22
|
-
isShowFileEditor: true
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
this.onFocus = () => {
|
|
27
|
-
if (this.props.updateTabIndex) {
|
|
28
|
-
this.props.updateTabIndex(this.props.columnIndex);
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
this.onToggle = () => {
|
|
32
|
-
if (this.props.updateTabIndex) {
|
|
33
|
-
this.props.updateTabIndex(this.props.columnIndex);
|
|
34
|
-
}
|
|
35
|
-
this.setState({
|
|
36
|
-
isShowFileEditor: !this.state.isShowFileEditor
|
|
37
|
-
});
|
|
38
|
-
};
|
|
39
|
-
this.onCommit = value => {
|
|
40
|
-
this.setState({
|
|
41
|
-
fileContainer: value,
|
|
42
|
-
isShowFileEditor: !this.state.isShowFileEditor
|
|
43
|
-
});
|
|
44
|
-
this.props.onCommit(value);
|
|
45
|
-
};
|
|
46
|
-
this.deleteFile = index => {
|
|
47
|
-
const {
|
|
48
|
-
column,
|
|
49
|
-
expandedRow,
|
|
50
|
-
onCommit
|
|
51
|
-
} = this.props;
|
|
52
|
-
let {
|
|
53
|
-
fileContainer
|
|
54
|
-
} = this.state;
|
|
55
|
-
let value = fileContainer || expandedRow[column.key];
|
|
56
|
-
let updatedValue = value.slice(0);
|
|
57
|
-
updatedValue.splice(index, 1);
|
|
58
|
-
this.setState({
|
|
59
|
-
fileContainer: updatedValue
|
|
60
|
-
});
|
|
61
|
-
onCommit(updatedValue);
|
|
62
|
-
};
|
|
63
|
-
this.onClickFile = () => {
|
|
64
|
-
this.openEditorMode = null;
|
|
65
|
-
this.onToggle();
|
|
66
|
-
};
|
|
67
|
-
this.state = {
|
|
68
|
-
isShowFileEditor: false,
|
|
69
|
-
fileContainer: null
|
|
70
|
-
};
|
|
71
|
-
this.openEditorMode = null;
|
|
72
|
-
}
|
|
73
|
-
componentDidMount() {
|
|
74
|
-
document.addEventListener('keydown', this.onKeyDown);
|
|
75
|
-
}
|
|
76
|
-
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
77
|
-
const {
|
|
78
|
-
column,
|
|
79
|
-
row,
|
|
80
|
-
valueKey
|
|
81
|
-
} = nextProps;
|
|
82
|
-
if (row._id !== this.props.row._id) {
|
|
83
|
-
this.setState({
|
|
84
|
-
fileContainer: row[column[valueKey]] || [],
|
|
85
|
-
isShowFileEditor: false
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
componentDidUpdate(prevProps, prevState) {
|
|
90
|
-
if (this.state.isShowFileEditor !== prevState.isShowFileEditor) {
|
|
91
|
-
if (this.state.isShowFileEditor === true && this.props.onEditorOpen) {
|
|
92
|
-
this.props.onEditorOpen();
|
|
93
|
-
}
|
|
94
|
-
if (this.state.isShowFileEditor === false && this.props.onEditorClose) {
|
|
95
|
-
this.props.onEditorClose();
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
componentWillUnmount() {
|
|
100
|
-
document.removeEventListener('keydown', this.onKeyDown);
|
|
101
|
-
}
|
|
102
|
-
render() {
|
|
103
|
-
let fileArr = [];
|
|
104
|
-
const {
|
|
105
|
-
column,
|
|
106
|
-
row,
|
|
107
|
-
config,
|
|
108
|
-
valueKey,
|
|
109
|
-
isEditorFocus
|
|
110
|
-
} = this.props;
|
|
111
|
-
let value = this.state.fileContainer !== null ? this.state.fileContainer : row[column[valueKey]];
|
|
112
|
-
if (value && value.length > 0) {
|
|
113
|
-
fileArr = value.map((file, index) => {
|
|
114
|
-
const {
|
|
115
|
-
fileIconUrl
|
|
116
|
-
} = (0, _url.getFileThumbnailInfo)(file, config);
|
|
117
|
-
return /*#__PURE__*/_react.default.createElement(_ImageThumbnail.default, {
|
|
118
|
-
key: 'file-' + index,
|
|
119
|
-
src: fileIconUrl,
|
|
120
|
-
index: index,
|
|
121
|
-
config: config,
|
|
122
|
-
deleteImage: this.deleteFile,
|
|
123
|
-
onClick: this.onClickFile
|
|
124
|
-
});
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
128
|
-
className: "dtable-ui-row-expand-image-editor mt-2"
|
|
129
|
-
}, /*#__PURE__*/_react.default.createElement(_RowExpandAddBtn.default, {
|
|
130
|
-
isFocus: isEditorFocus,
|
|
131
|
-
text: (0, _lang.getLocale)('Add_files'),
|
|
132
|
-
onFocus: this.onFocus,
|
|
133
|
-
onClick: this.onToggle
|
|
134
|
-
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
135
|
-
className: "dtable-ui-row-expand-image-container"
|
|
136
|
-
}, fileArr), this.state.isShowFileEditor && /*#__PURE__*/_react.default.createElement(_FileEditor.default, {
|
|
137
|
-
value: value,
|
|
138
|
-
isInModal: true,
|
|
139
|
-
onToggle: this.onToggle,
|
|
140
|
-
onCommit: this.onCommit,
|
|
141
|
-
config: this.props.config,
|
|
142
|
-
uploadFile: this.props.uploadFile
|
|
143
|
-
}));
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
var _default = exports.default = RowExpandFileEditor;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
.dtable-ui-row-expand-geolocation-value {
|
|
2
|
-
min-width: 80px;
|
|
3
|
-
max-width: 100%;
|
|
4
|
-
height: 28px;
|
|
5
|
-
line-height: 24px;
|
|
6
|
-
border: 2px solid transparent;
|
|
7
|
-
padding: 0 10px;
|
|
8
|
-
background-color: #f0f0f0;
|
|
9
|
-
border-radius: 3px;
|
|
10
|
-
font-size: 14px;
|
|
11
|
-
text-align: center;
|
|
12
|
-
display: inline-flex;
|
|
13
|
-
cursor: pointer;
|
|
14
|
-
width: fit-content;
|
|
15
|
-
justify-content: center;
|
|
16
|
-
color: #212529;
|
|
17
|
-
}
|
|
@@ -1,165 +0,0 @@
|
|
|
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 _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _dtableUtils = require("dtable-utils");
|
|
10
|
-
var _constants = require("../../constants");
|
|
11
|
-
var _RowExpandAddBtn = _interopRequireDefault(require("../RowExpandAddBtn"));
|
|
12
|
-
var _lang = require("../../lang");
|
|
13
|
-
var _GeolocationEditor = _interopRequireDefault(require("../../GeolocationEditor"));
|
|
14
|
-
require("./index.css");
|
|
15
|
-
class RowExpandGeolocationEditor extends _react.default.Component {
|
|
16
|
-
constructor(props) {
|
|
17
|
-
super(props);
|
|
18
|
-
this.onKeyDown = e => {
|
|
19
|
-
if (e.keyCode === _constants.KeyCodes.Enter && this.props.isEditorFocus && !this.state.isShowEditor) {
|
|
20
|
-
this.setState({
|
|
21
|
-
isShowEditor: true
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
this.hideEditor = event => {
|
|
26
|
-
if (!this.state.isShowEditor || !event.target || event.target.tagName.toUpperCase() === 'INPUT' || this.editorContainer.contains(event.target)) return;
|
|
27
|
-
if (this.state.isShowEditor && this.editor.getLargeEditorState()) return;
|
|
28
|
-
this.setState({
|
|
29
|
-
isShowEditor: false
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
this.toggleEditor = () => {
|
|
33
|
-
this.props.updateTabIndex(this.props.columnIndex);
|
|
34
|
-
this.setState({
|
|
35
|
-
isShowEditor: !this.state.isShowEditor
|
|
36
|
-
}, () => {
|
|
37
|
-
if (!this.state.isShowEditor) {
|
|
38
|
-
if ((0, _dtableUtils.isEmptyObject)(this.state.value)) {
|
|
39
|
-
var _this$addBtnRef$curre;
|
|
40
|
-
// eslint-disable-next-line no-unused-expressions
|
|
41
|
-
(_this$addBtnRef$curre = this.addBtnRef.current) === null || _this$addBtnRef$curre === void 0 ? void 0 : _this$addBtnRef$curre.focus();
|
|
42
|
-
} else {
|
|
43
|
-
this.geoLocationRef.focus();
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
this.onFocus = () => {
|
|
49
|
-
this.props.updateTabIndex(this.props.columnIndex);
|
|
50
|
-
};
|
|
51
|
-
this.onCommit = value => {
|
|
52
|
-
this.props.onCommit(value);
|
|
53
|
-
this.setState({
|
|
54
|
-
value
|
|
55
|
-
});
|
|
56
|
-
this.toggleEditor();
|
|
57
|
-
};
|
|
58
|
-
this.renderGeoLocation = () => {
|
|
59
|
-
let {
|
|
60
|
-
isEditorFocus
|
|
61
|
-
} = this.props;
|
|
62
|
-
let {
|
|
63
|
-
value
|
|
64
|
-
} = this.state;
|
|
65
|
-
if (!(0, _dtableUtils.isEmptyObject)(value)) {
|
|
66
|
-
const displayContent = this.getLocationInfo(value);
|
|
67
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
68
|
-
tabIndex: 0,
|
|
69
|
-
style: isEditorFocus ? _constants.ROW_EXPAND_BTN_FOCUS_STYLE : {},
|
|
70
|
-
onFocus: this.onFocus,
|
|
71
|
-
role: "button",
|
|
72
|
-
ref: ref => this.geoLocationRef = ref,
|
|
73
|
-
className: "dtable-ui-row-expand-geolocation-value",
|
|
74
|
-
onClick: this.toggleEditor
|
|
75
|
-
}, displayContent);
|
|
76
|
-
}
|
|
77
|
-
return /*#__PURE__*/_react.default.createElement(_RowExpandAddBtn.default, {
|
|
78
|
-
ref: this.addBtnRef,
|
|
79
|
-
onFocus: this.onFocus,
|
|
80
|
-
onClick: this.toggleEditor,
|
|
81
|
-
isFocus: isEditorFocus,
|
|
82
|
-
text: (0, _lang.getLocale)('Edit_Location')
|
|
83
|
-
});
|
|
84
|
-
};
|
|
85
|
-
this.getLocationInfo = value => {
|
|
86
|
-
const {
|
|
87
|
-
column
|
|
88
|
-
} = this.props;
|
|
89
|
-
const {
|
|
90
|
-
dtableBaiduMapKey,
|
|
91
|
-
dtableMineMapKey
|
|
92
|
-
} = window.dtable;
|
|
93
|
-
const isBaiduMap = !!(dtableBaiduMapKey || dtableMineMapKey);
|
|
94
|
-
return (0, _dtableUtils.getGeolocationDisplayString)(value, column.data, {
|
|
95
|
-
isBaiduMap,
|
|
96
|
-
hyphen: ' '
|
|
97
|
-
});
|
|
98
|
-
};
|
|
99
|
-
const {
|
|
100
|
-
row,
|
|
101
|
-
column: _column,
|
|
102
|
-
valueKey
|
|
103
|
-
} = props;
|
|
104
|
-
this.state = {
|
|
105
|
-
isShowEditor: false,
|
|
106
|
-
value: row[_column[valueKey]] || {}
|
|
107
|
-
};
|
|
108
|
-
this.addBtnRef = /*#__PURE__*/_react.default.createRef();
|
|
109
|
-
this.isGeolocationLargeMapOpen = false;
|
|
110
|
-
}
|
|
111
|
-
componentDidMount() {
|
|
112
|
-
document.addEventListener('mousedown', this.hideEditor);
|
|
113
|
-
document.addEventListener('keydown', this.onKeyDown);
|
|
114
|
-
}
|
|
115
|
-
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
116
|
-
const {
|
|
117
|
-
column,
|
|
118
|
-
row,
|
|
119
|
-
valueKey
|
|
120
|
-
} = nextProps;
|
|
121
|
-
if (row._id !== this.props.row._id) {
|
|
122
|
-
this.setState({
|
|
123
|
-
value: row[column[valueKey]] || {},
|
|
124
|
-
isShowEditor: false
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
componentDidUpdate(prevProps, prevState) {
|
|
129
|
-
if (this.state.isShowEditor !== prevState.isShowEditor) {
|
|
130
|
-
if (this.state.isShowEditor === true && this.props.onEditorOpen) {
|
|
131
|
-
this.props.onEditorOpen();
|
|
132
|
-
}
|
|
133
|
-
if (this.state.isShowEditor === false && this.props.onEditorClose) {
|
|
134
|
-
this.props.onEditorClose();
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
componentWillUnmount() {
|
|
139
|
-
document.removeEventListener('mousedown', this.hideEditor);
|
|
140
|
-
document.removeEventListener('keydown', this.onKeyDown);
|
|
141
|
-
}
|
|
142
|
-
render() {
|
|
143
|
-
const {
|
|
144
|
-
column,
|
|
145
|
-
row
|
|
146
|
-
} = this.props;
|
|
147
|
-
const {
|
|
148
|
-
value
|
|
149
|
-
} = this.state;
|
|
150
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
151
|
-
ref: ref => this.editorContainer = ref,
|
|
152
|
-
className: "mt-2"
|
|
153
|
-
}, this.renderGeoLocation(), this.state.isShowEditor && /*#__PURE__*/_react.default.createElement(_GeolocationEditor.default, {
|
|
154
|
-
getInstance: ref => this.editor = ref,
|
|
155
|
-
isInModal: true,
|
|
156
|
-
column: column,
|
|
157
|
-
row: row,
|
|
158
|
-
value: value,
|
|
159
|
-
onCommit: this.onCommit,
|
|
160
|
-
onCommitCancel: this.toggleEditor,
|
|
161
|
-
onPressTab: this.props.onPressTab
|
|
162
|
-
}));
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
var _default = exports.default = RowExpandGeolocationEditor;
|
|
@@ -1,170 +0,0 @@
|
|
|
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 _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _constants = require("../../constants");
|
|
10
|
-
var _RowExpandAddBtn = _interopRequireDefault(require("../RowExpandAddBtn"));
|
|
11
|
-
var _lang = require("../../lang");
|
|
12
|
-
var _ImagePreviewerLightbox = _interopRequireDefault(require("../../ImagePreviewerLightbox"));
|
|
13
|
-
var _ImageThumbnail = _interopRequireDefault(require("../../ImageThumbnail"));
|
|
14
|
-
var _ImageEditor = _interopRequireDefault(require("../../ImageEditor"));
|
|
15
|
-
require("./index.css");
|
|
16
|
-
class RowExpandImageEditor extends _react.default.Component {
|
|
17
|
-
constructor(props) {
|
|
18
|
-
super(props);
|
|
19
|
-
this.onKeyDown = e => {
|
|
20
|
-
if (e.keyCode === _constants.KeyCodes.Enter && this.props.isEditorFocus && !this.state.isShowImageEditor) {
|
|
21
|
-
this.setState({
|
|
22
|
-
isShowImageEditor: true
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
this.onFocus = () => {
|
|
27
|
-
if (this.props.updateTabIndex) {
|
|
28
|
-
this.props.updateTabIndex(this.props.columnIndex);
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
this.onToggle = () => {
|
|
32
|
-
if (this.props.updateTabIndex) {
|
|
33
|
-
this.props.updateTabIndex(this.props.columnIndex);
|
|
34
|
-
}
|
|
35
|
-
this.setState({
|
|
36
|
-
isShowImageEditor: !this.state.isShowImageEditor
|
|
37
|
-
});
|
|
38
|
-
};
|
|
39
|
-
this.onCommit = value => {
|
|
40
|
-
this.setState({
|
|
41
|
-
imageContainer: value,
|
|
42
|
-
isShowImageEditor: !this.state.isShowImageEditor
|
|
43
|
-
});
|
|
44
|
-
this.props.onCommit(value);
|
|
45
|
-
};
|
|
46
|
-
this.setLargeImageIndex = index => {
|
|
47
|
-
this.setState({
|
|
48
|
-
largeImageIndex: index
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
this.moveToNextImage = () => {
|
|
52
|
-
let value = this.getValue();
|
|
53
|
-
this.setState(prevState => ({
|
|
54
|
-
largeImageIndex: (prevState.largeImageIndex + 1) % value.length
|
|
55
|
-
}));
|
|
56
|
-
};
|
|
57
|
-
this.moveToPrevImage = () => {
|
|
58
|
-
let value = this.getValue();
|
|
59
|
-
this.setState(prevState => ({
|
|
60
|
-
largeImageIndex: (prevState.largeImageIndex + value.length - 1) % value.length
|
|
61
|
-
}));
|
|
62
|
-
};
|
|
63
|
-
this.hideLargeImage = () => {
|
|
64
|
-
this.setLargeImageIndex(-1);
|
|
65
|
-
};
|
|
66
|
-
this.getValue = () => {
|
|
67
|
-
let {
|
|
68
|
-
column,
|
|
69
|
-
row,
|
|
70
|
-
valueKey
|
|
71
|
-
} = this.props;
|
|
72
|
-
let {
|
|
73
|
-
imageContainer
|
|
74
|
-
} = this.state;
|
|
75
|
-
return imageContainer ? imageContainer : row[column[valueKey]];
|
|
76
|
-
};
|
|
77
|
-
this.deleteImage = index => {
|
|
78
|
-
let value = this.getValue();
|
|
79
|
-
let updatedValue = value.slice(0);
|
|
80
|
-
updatedValue.splice(index, 1);
|
|
81
|
-
this.setState({
|
|
82
|
-
imageContainer: updatedValue
|
|
83
|
-
});
|
|
84
|
-
this.props.onCommit(updatedValue);
|
|
85
|
-
};
|
|
86
|
-
this.getImageArray = value => {
|
|
87
|
-
const {
|
|
88
|
-
config
|
|
89
|
-
} = this.props;
|
|
90
|
-
return value.map((imageSrc, index) => {
|
|
91
|
-
return /*#__PURE__*/_react.default.createElement(_ImageThumbnail.default, {
|
|
92
|
-
key: "image-".concat(index),
|
|
93
|
-
index: index,
|
|
94
|
-
src: imageSrc,
|
|
95
|
-
onClick: this.setLargeImageIndex,
|
|
96
|
-
deleteImage: this.deleteImage,
|
|
97
|
-
config: config
|
|
98
|
-
});
|
|
99
|
-
});
|
|
100
|
-
};
|
|
101
|
-
this.state = {
|
|
102
|
-
isShowImageEditor: false,
|
|
103
|
-
imageContainer: null,
|
|
104
|
-
largeImageIndex: -1
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
componentDidMount() {
|
|
108
|
-
document.addEventListener('keydown', this.onKeyDown);
|
|
109
|
-
}
|
|
110
|
-
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
111
|
-
const {
|
|
112
|
-
column,
|
|
113
|
-
row,
|
|
114
|
-
valueKey
|
|
115
|
-
} = nextProps;
|
|
116
|
-
if (row._id !== this.props.row._id) {
|
|
117
|
-
this.setState({
|
|
118
|
-
imageContainer: row[column[valueKey]] || [],
|
|
119
|
-
isShowImageEditor: false,
|
|
120
|
-
largeImageIndex: -1
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
componentDidUpdate(prevProps, prevState) {
|
|
125
|
-
if (this.state.isShowImageEditor !== prevState.isShowImageEditor) {
|
|
126
|
-
if (this.state.isShowImageEditor === true && this.props.onEditorOpen) {
|
|
127
|
-
this.props.onEditorOpen();
|
|
128
|
-
}
|
|
129
|
-
if (this.state.isShowImageEditor === false && this.props.onEditorClose) {
|
|
130
|
-
this.props.onEditorClose();
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
componentWillUnmount() {
|
|
135
|
-
document.removeEventListener('keydown', this.onKeyDown);
|
|
136
|
-
}
|
|
137
|
-
render() {
|
|
138
|
-
const {
|
|
139
|
-
isEditorFocus
|
|
140
|
-
} = this.props;
|
|
141
|
-
let {
|
|
142
|
-
isShowImageEditor,
|
|
143
|
-
largeImageIndex
|
|
144
|
-
} = this.state;
|
|
145
|
-
let value = this.getValue();
|
|
146
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
147
|
-
className: "dtable-ui-row-expand-image-editor mt-2"
|
|
148
|
-
}, /*#__PURE__*/_react.default.createElement(_RowExpandAddBtn.default, {
|
|
149
|
-
isFocus: isEditorFocus,
|
|
150
|
-
text: (0, _lang.getLocale)('Add_images'),
|
|
151
|
-
onFocus: this.onFocus,
|
|
152
|
-
onClick: this.onToggle
|
|
153
|
-
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
154
|
-
className: "dtable-ui-row-expand-image-container"
|
|
155
|
-
}, Array.isArray(value) && value.length > 0 && this.getImageArray(value))), isShowImageEditor && /*#__PURE__*/_react.default.createElement(_ImageEditor.default, {
|
|
156
|
-
value: value,
|
|
157
|
-
isInModal: true,
|
|
158
|
-
onToggle: this.onToggle,
|
|
159
|
-
onCommit: this.onCommit,
|
|
160
|
-
uploadFile: this.props.uploadFile
|
|
161
|
-
}), largeImageIndex > -1 && /*#__PURE__*/_react.default.createElement(_ImagePreviewerLightbox.default, {
|
|
162
|
-
imageItems: value,
|
|
163
|
-
imageIndex: largeImageIndex,
|
|
164
|
-
closeImagePopup: this.hideLargeImage,
|
|
165
|
-
moveToPrevImage: this.moveToPrevImage,
|
|
166
|
-
moveToNextImage: this.moveToNextImage
|
|
167
|
-
}));
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
var _default = exports.default = RowExpandImageEditor;
|