dtable-ui-component 7.0.0-xia.1 → 7.0.0-xia.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 +14 -16
- package/lib/ActivityIndicator/index.js +7 -8
- package/lib/AsyncUserSelect/index.js +40 -19
- package/lib/AsyncUserSelect/user-item.js +5 -6
- package/lib/AutoNumberFormatter/index.js +3 -4
- package/lib/Badge/index.js +9 -11
- package/lib/ButtonFormatter/index.js +6 -8
- package/lib/CTimeFormatter/index.js +3 -4
- package/lib/CheckboxEditor/index.js +1 -3
- package/lib/CheckboxEditor/mb-editor.js +9 -20
- package/lib/CheckboxEditor/pc-editor.js +12 -24
- package/lib/CheckboxFormatter/index.js +4 -5
- package/lib/CollaboratorEditor/index.js +2 -4
- package/lib/CollaboratorEditor/mb-editor/index.js +11 -19
- package/lib/CollaboratorEditor/pc-editor/index.js +25 -34
- package/lib/CollaboratorFormatter/index.js +8 -10
- package/lib/CollaboratorItem/index.js +4 -5
- package/lib/CollapsibleSettingLayout/index.js +9 -7
- package/lib/Comment/body/comment.js +10 -18
- package/lib/Comment/body/index.js +2 -4
- package/lib/Comment/footer/btns/index.js +4 -7
- package/lib/Comment/footer/index.js +9 -20
- package/lib/Comment/footer/input/index.js +29 -50
- package/lib/Comment/footer/input/participant/index.js +4 -5
- package/lib/Comment/footer/participants/index.js +4 -5
- package/lib/Comment/footer/participants/participant/index.js +1 -3
- package/lib/Comment/footer/participants/participant-select/index.js +8 -24
- package/lib/Comment/index.js +39 -57
- package/lib/Comment/utils/utilities.js +15 -21
- package/lib/CreatorFormatter/index.js +6 -8
- package/lib/DTableColorPicker/ColorPickerPortal/index.js +22 -18
- package/lib/DTableColorPicker/index.js +55 -40
- package/lib/DTableColorPicker/utils.js +4 -6
- package/lib/DTableColumnIcon/index.js +6 -7
- package/lib/DTableCommonAddTool/index.js +6 -8
- package/lib/DTableCustomFooter/index.js +1 -3
- package/lib/DTableCustomizeCollaboratorSelect/index.js +17 -20
- package/lib/DTableCustomizeSelect/index.js +19 -24
- package/lib/DTableDropdownItem/index.js +16 -18
- package/lib/DTableDropdownMenu/index.js +8 -10
- package/lib/DTableEmptyTip/index.js +4 -5
- package/lib/DTableFiltersPopover/index.js +26 -41
- package/lib/DTableFiltersPopover/utils/filter-item-utils.js +1 -3
- package/lib/DTableFiltersPopover/utils/index.js +63 -113
- package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +8 -9
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +16 -13
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +18 -15
- package/lib/DTableFiltersPopover/widgets/filter-calendar.js +8 -14
- package/lib/DTableFiltersPopover/widgets/filter-group.js +34 -55
- package/lib/DTableFiltersPopover/widgets/filter-item.js +107 -170
- package/lib/DTableFiltersPopover/widgets/filter-list/index.js +136 -161
- package/lib/DTableFiltersPopover/widgets/rate-item.js +15 -20
- package/lib/DTableGroupSelect/index.js +11 -15
- package/lib/DTableGroupSelect/select-option-group.js +23 -32
- package/lib/DTableIcon/index.js +6 -7
- package/lib/DTableIcon/svg-icon.js +5 -7
- package/lib/DTableModalHeader/index.js +4 -13
- package/lib/DTablePopover/index.js +11 -15
- package/lib/DTableRadio/index.js +10 -9
- package/lib/DTableRadioGroup/index.js +8 -17
- package/lib/DTableSearchInput/index.js +19 -29
- package/lib/DTableSelect/dtable-select-label.js +6 -5
- package/lib/DTableSelect/index.js +21 -22
- package/lib/DTableSelect/utils.js +7 -15
- package/lib/DTableSubDropdownMenu/index.js +8 -10
- package/lib/DTableSubDropdownToggle/index.js +12 -12
- package/lib/DTableSwitch/index.js +12 -11
- package/lib/DTableToolTip/index.js +7 -8
- package/lib/DateEditor/index.js +20 -15
- package/lib/DateEditor/mb-editor/index.js +18 -31
- package/lib/DateEditor/pc-editor.js +26 -45
- package/lib/DateFormatter/index.js +4 -5
- package/lib/DatePicker/index.js +9 -15
- package/lib/DatePicker/utils.js +1 -3
- package/lib/DeleteTip/index.js +5 -6
- package/lib/DepartmentMultipleSelectEditor/index.js +25 -23
- package/lib/DepartmentSelectFilter/index.js +6 -8
- package/lib/DepartmentSingleSelectEditor/index.js +1 -3
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +48 -47
- package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +36 -58
- package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +13 -19
- package/lib/DepartmentSingleSelectFormatter/index.js +4 -6
- package/lib/DigitalSignEditor/index.js +1 -3
- package/lib/DigitalSignEditor/mb-editor/index.js +12 -20
- package/lib/DigitalSignEditor/pc-editor/index.js +17 -24
- package/lib/DigitalSignEditor/service.js +2 -4
- package/lib/DigitalSignEditor/signature-board/index.js +5 -8
- package/lib/DigitalSignEditor/utils.js +2 -4
- package/lib/DigitalSignFormatter/index.js +12 -15
- package/lib/DigitalSignFormatter/utils.js +4 -5
- package/lib/DurationEditor/index.js +21 -31
- package/lib/DurationFormatter/index.js +4 -5
- package/lib/EditEditorButton/index.js +1 -3
- package/lib/EmailFormatter/index.js +3 -4
- package/lib/FieldDisplaySetting/field-item.js +12 -12
- package/lib/FieldDisplaySetting/index.js +11 -9
- package/lib/FileEditor/files-previewer/index.js +1 -3
- package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +10 -18
- package/lib/FileEditor/files-previewer/mb-previewer/index.js +7 -8
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/dropdown-menu.js +3 -4
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/file-name-editor/index.js +5 -6
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +14 -21
- package/lib/FileEditor/files-previewer/pc-previewer/index.js +29 -57
- package/lib/FileEditor/index.js +1 -3
- package/lib/FileEditor/mb-editor/index.js +28 -20
- package/lib/FileEditor/pc-editor/addition-previewer/index.js +1 -3
- package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +11 -25
- package/lib/FileEditor/pc-editor/index.js +19 -27
- package/lib/FileFormatter/index.js +26 -19
- package/lib/FileItemFormatter/index.js +6 -9
- package/lib/FileUploader/index.js +28 -45
- package/lib/FormulaFormatter/index.js +15 -29
- package/lib/GeolocationEditor/index.js +11 -12
- package/lib/GeolocationEditor/map-editor-utils.js +17 -15
- package/lib/GeolocationEditor/mb-editor/country-editor.js +17 -14
- package/lib/GeolocationEditor/mb-editor/index.js +4 -6
- package/lib/GeolocationEditor/mb-editor/location-editor.js +18 -15
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +41 -68
- package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +50 -89
- package/lib/GeolocationEditor/mb-editor/province-city-editor.js +17 -14
- package/lib/GeolocationEditor/mb-editor/province-editor.js +17 -14
- package/lib/GeolocationEditor/pc-editor/country-editor.js +10 -23
- package/lib/GeolocationEditor/pc-editor/index.js +12 -20
- package/lib/GeolocationEditor/pc-editor/location-editor.js +26 -31
- package/lib/GeolocationEditor/pc-editor/map-editor/index.js +34 -54
- package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +36 -60
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +35 -62
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +36 -65
- package/lib/GeolocationEditor/pc-editor/province-city-editor.js +19 -25
- package/lib/GeolocationEditor/pc-editor/province-editor.js +6 -13
- package/lib/GeolocationEditor/pc-editor/selector-header-item.js +5 -6
- package/lib/GeolocationEditor/pc-editor/selector-list.js +6 -7
- package/lib/GeolocationFormatter/index.js +4 -5
- package/lib/HtmlLongTextFormatter/index.js +4 -12
- package/lib/Icon/index.js +3 -5
- package/lib/IconButton/index.js +4 -6
- package/lib/ImageEditor/images-previewer/image-preview/index.js +12 -21
- package/lib/ImageEditor/images-previewer/index.js +3 -9
- package/lib/ImageEditor/index.js +1 -3
- package/lib/ImageEditor/mb-editor/index.js +28 -20
- package/lib/ImageEditor/pc-editor/addition-previewer/image-link/index.js +2 -6
- package/lib/ImageEditor/pc-editor/addition-previewer/index.js +1 -3
- package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +7 -21
- package/lib/ImageEditor/pc-editor/images-previewer/index.js +3 -9
- package/lib/ImageEditor/pc-editor/index.js +11 -16
- package/lib/ImageFormatter/images-lazy-load.js +19 -11
- package/lib/ImageFormatter/index.js +11 -13
- package/lib/ImagePreviewerLightbox/index.js +15 -13
- package/lib/ImageThumbnail/index.js +10 -13
- package/lib/InputItem/custom-input.js +26 -46
- package/lib/InputItem/custom-keyboard.js +15 -18
- package/lib/InputItem/index.js +34 -50
- package/lib/InputItem/input.js +2 -4
- package/lib/LastModifierFormatter/index.js +6 -8
- package/lib/LinkEditor/index.js +33 -53
- package/lib/LinkEditor/link-editor-option.js +3 -4
- package/lib/LinkEditor/mb-popover/index.js +9 -22
- package/lib/LinkEditor/pc-popover/index.js +5 -10
- package/lib/LinkFormatter/index.js +21 -37
- package/lib/List/index.js +6 -8
- package/lib/List/list-item.js +22 -28
- package/lib/LongTextFormatter/index.js +4 -5
- package/lib/MBEditorHeader/index.js +7 -8
- package/lib/MTimeFormatter/index.js +3 -4
- package/lib/MobileFullScreenPage/body/index.js +3 -5
- package/lib/MobileFullScreenPage/header/index.js +4 -6
- package/lib/MobileFullScreenPage/index.js +13 -11
- package/lib/MobileModal/index.js +1 -3
- package/lib/MobileOperationSheet/index.js +7 -8
- package/lib/MobileSelector/empty/index.js +1 -3
- package/lib/MobileSelector/index.js +5 -7
- package/lib/MobileSelector/option/index.js +3 -5
- package/lib/MobileSelector/options/index.js +1 -3
- package/lib/MobileSelector/search/index.js +3 -5
- package/lib/MobileUpload/index.js +4 -5
- package/lib/Modal/modal.js +14 -15
- package/lib/Modal/prompt.js +4 -4
- package/lib/MultipleSelectEditor/index.js +1 -3
- package/lib/MultipleSelectFormatter/index.js +6 -8
- package/lib/NotificationPopover/index.js +4 -5
- package/lib/NumberEditor/index.js +12 -21
- package/lib/NumberFormatter/index.js +4 -5
- package/lib/PhoneNumberLink/index.js +2 -4
- package/lib/Picker/AbstractPicker.js +23 -27
- package/lib/Popover/index.js +3 -4
- package/lib/Popover/item.js +7 -9
- package/lib/Progress/index.js +9 -8
- package/lib/Radio/Radio.js +4 -8
- package/lib/Radio/RadioItem.js +8 -12
- package/lib/RateFormatter/index.js +13 -13
- package/lib/RoleStatusEditor/index.js +18 -17
- package/lib/RowExpandDialog/body/index.js +32 -49
- package/lib/RowExpandDialog/column-content/index.js +5 -9
- package/lib/RowExpandDialog/header/index.js +6 -8
- package/lib/RowExpandDialog/index.js +49 -34
- package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +4 -5
- package/lib/RowExpandEditor/checkbox-editor/pc-editor.js +8 -10
- package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +22 -33
- package/lib/RowExpandEditor/collaborator-editor/pc-editor/index.js +26 -40
- package/lib/RowExpandEditor/date-editor/mb-editor.js +12 -18
- package/lib/RowExpandEditor/date-editor/pc-editor.js +15 -20
- package/lib/RowExpandEditor/department-editor/mb-editor.js +16 -11
- package/lib/RowExpandEditor/department-editor/pc-editor.js +19 -14
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +20 -34
- package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +21 -35
- package/lib/RowExpandEditor/duration-editor/mb-editor.js +10 -17
- package/lib/RowExpandEditor/duration-editor/pc-editor.js +13 -19
- package/lib/RowExpandEditor/email-editor/mb-editor/index.js +9 -19
- package/lib/RowExpandEditor/email-editor/pc-editor/index.js +13 -24
- package/lib/RowExpandEditor/file-editor/mb-editor/index.js +18 -31
- package/lib/RowExpandEditor/file-editor/pc-editor/index.js +16 -23
- package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +17 -29
- package/lib/RowExpandEditor/geolocation-editor/pc-editor/index.js +13 -26
- package/lib/RowExpandEditor/image-editor/mb-editor/index.js +15 -25
- package/lib/RowExpandEditor/image-editor/pc-editor/index.js +13 -23
- package/lib/RowExpandEditor/index.js +4 -8
- package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +17 -18
- package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +10 -16
- package/lib/RowExpandEditor/long-text-editor/pc-editor/index.js +16 -23
- package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +11 -19
- package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +22 -33
- package/lib/RowExpandEditor/number-editor/mb-editor/index.js +8 -14
- package/lib/RowExpandEditor/number-editor/pc-editor.js +13 -20
- package/lib/RowExpandEditor/rate-editor/mb-editor.js +12 -25
- package/lib/RowExpandEditor/rate-editor/pc-editor.js +20 -36
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +17 -28
- package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +22 -34
- package/lib/RowExpandEditor/text-editor/mb-editor/index.js +4 -5
- package/lib/RowExpandEditor/text-editor/pc-editor/index.js +15 -26
- package/lib/RowExpandEditor/url-editor/mb-editor/index.js +5 -13
- package/lib/RowExpandEditor/url-editor/pc-editor/index.js +9 -18
- package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +2 -4
- package/lib/RowExpandFormatter/department-formatter/pc-formatter.js +2 -4
- package/lib/RowExpandFormatter/email-formatter/index.js +4 -7
- package/lib/RowExpandFormatter/file-formatter/index.js +8 -9
- package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +10 -12
- package/lib/RowExpandFormatter/formula-formatter/index.js +19 -34
- package/lib/RowExpandFormatter/image-formatter/index.js +9 -11
- package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +7 -8
- package/lib/RowExpandFormatter/index.js +27 -41
- package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +8 -14
- package/lib/RowExpandFormatter/link-formatter/index.js +11 -19
- package/lib/RowExpandFormatter/link-formatter/value-display-utils.js +3 -5
- package/lib/RowExpandFormatter/rate-formatter/index.js +11 -12
- package/lib/RowExpandFormatter/text/index.js +4 -5
- package/lib/RowExpandFormatter/url-formatter/index.js +4 -7
- package/lib/RowExpandView/body/index.js +22 -35
- package/lib/RowExpandView/column-content/index.js +3 -7
- package/lib/RowExpandView/index.js +42 -30
- package/lib/SelectItem/index.js +5 -7
- package/lib/SelectOptionGroup/index.js +30 -40
- package/lib/SelectedDepartments/index.js +7 -9
- package/lib/SimpleLongTextFormatter/index.js +10 -16
- package/lib/SimpleLongTextFormatter/normalize-long-text-value.js +3 -4
- package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +12 -21
- package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +3 -4
- package/lib/SingleSelectEditor/index.js +1 -3
- package/lib/SingleSelectFormatter/index.js +8 -9
- package/lib/TabBar/Tab.js +14 -16
- package/lib/TabBar/index.js +18 -21
- package/lib/Tabs/index.js +1 -3
- package/lib/TextEditor/index.js +14 -23
- package/lib/TextFormatter/index.js +3 -4
- package/lib/TextareaItem/index.js +19 -26
- package/lib/Toast/index.js +3 -4
- package/lib/UrlFormatter/index.js +3 -4
- package/lib/common/editor-base.js +7 -12
- package/lib/hooks/common-hooks.js +2 -4
- package/lib/select-editor/index.js +1 -3
- package/lib/select-editor/mb-editor/index.js +17 -28
- package/lib/select-editor/pc-editor/index.js +27 -42
- package/lib/toaster/alert.js +6 -7
- package/lib/toaster/toast.js +2 -3
- package/lib/toaster/toastManager.js +2 -4
- package/lib/utils/cell.js +8 -11
- package/lib/utils/column-utils.js +8 -14
- package/lib/utils/departments.js +1 -3
- package/lib/utils/url.js +24 -31
- package/lib/utils/utils.js +2 -6
- package/package.json +1 -1
- package/lib/DTableModalHeader/index.css +0 -5
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
9
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
10
11
|
var _react = _interopRequireDefault(require("react"));
|
|
11
12
|
var _reactstrap = require("reactstrap");
|
|
12
13
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
@@ -64,11 +65,10 @@ class Body extends _react.default.Component {
|
|
|
64
65
|
this.fieldEditorOpen = false;
|
|
65
66
|
};
|
|
66
67
|
this.onHotKey = event => {
|
|
67
|
-
const
|
|
68
|
-
columns,
|
|
69
|
-
onKeyDown,
|
|
70
|
-
onToggle
|
|
71
|
-
} = this.props;
|
|
68
|
+
const _this$props = this.props,
|
|
69
|
+
columns = _this$props.columns,
|
|
70
|
+
onKeyDown = _this$props.onKeyDown,
|
|
71
|
+
onToggle = _this$props.onToggle;
|
|
72
72
|
const readonly = Array.isArray(columns) && columns.length > 0 ? !columns.some(c => c.editable) : true;
|
|
73
73
|
const keyCode = event.keyCode;
|
|
74
74
|
// When opening field editor, all shortcuts in row expand dialog do not work
|
|
@@ -96,9 +96,7 @@ class Body extends _react.default.Component {
|
|
|
96
96
|
this.onPressTab = event => {
|
|
97
97
|
event.stopPropagation();
|
|
98
98
|
event.preventDefault();
|
|
99
|
-
const
|
|
100
|
-
columns
|
|
101
|
-
} = this.props;
|
|
99
|
+
const columns = this.props.columns;
|
|
102
100
|
let tabIndex = this.state.tabIndex;
|
|
103
101
|
// Press tab, highlight next column;
|
|
104
102
|
if (event.shiftKey) {
|
|
@@ -129,40 +127,30 @@ class Body extends _react.default.Component {
|
|
|
129
127
|
this.props.getDownLoadFiles([{
|
|
130
128
|
url: imageItemUrl
|
|
131
129
|
}]).then(res => {
|
|
132
|
-
const
|
|
130
|
+
const _res$data$urls = (0, _slicedToArray2.default)(res.data.urls, 1),
|
|
131
|
+
downloadUrl = _res$data$urls[0];
|
|
133
132
|
(0, _utils.downloadFile)(downloadUrl);
|
|
134
133
|
}).catch(error => {
|
|
135
134
|
// todo
|
|
136
135
|
});
|
|
137
136
|
};
|
|
138
137
|
this.getCellValue = _ref => {
|
|
139
|
-
let
|
|
140
|
-
|
|
141
|
-
column
|
|
142
|
-
} = _ref;
|
|
138
|
+
let row = _ref.row,
|
|
139
|
+
column = _ref.column;
|
|
143
140
|
if (!row || !column) return null;
|
|
144
|
-
const
|
|
145
|
-
valueKey
|
|
146
|
-
} = this.props;
|
|
141
|
+
const valueKey = this.props.valueKey;
|
|
147
142
|
return row[column[valueKey]];
|
|
148
143
|
};
|
|
149
144
|
this.renderColumnValue = (row, column, columnIndex, isEditorFocus) => {
|
|
150
|
-
const _this$
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
const {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
const {
|
|
160
|
-
editable
|
|
161
|
-
} = column;
|
|
162
|
-
const {
|
|
163
|
-
editor,
|
|
164
|
-
formatter
|
|
165
|
-
} = component || {};
|
|
145
|
+
const _this$props2 = this.props,
|
|
146
|
+
component = _this$props2.component,
|
|
147
|
+
onChange = _this$props2.onChange,
|
|
148
|
+
props = (0, _objectWithoutProperties2.default)(_this$props2, _excluded);
|
|
149
|
+
const getDownLoadFiles = props.getDownLoadFiles;
|
|
150
|
+
const editable = column.editable;
|
|
151
|
+
const _ref2 = component || {},
|
|
152
|
+
editor = _ref2.editor,
|
|
153
|
+
formatter = _ref2.formatter;
|
|
166
154
|
if (editable) {
|
|
167
155
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_RowExpandEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
168
156
|
column: column,
|
|
@@ -195,11 +183,10 @@ class Body extends _react.default.Component {
|
|
|
195
183
|
});
|
|
196
184
|
};
|
|
197
185
|
this.renderChildren = () => {
|
|
198
|
-
const
|
|
199
|
-
columns,
|
|
200
|
-
row,
|
|
201
|
-
children
|
|
202
|
-
} = this.props;
|
|
186
|
+
const _this$props3 = this.props,
|
|
187
|
+
columns = _this$props3.columns,
|
|
188
|
+
row = _this$props3.row,
|
|
189
|
+
children = _this$props3.children;
|
|
203
190
|
const props = {
|
|
204
191
|
columns,
|
|
205
192
|
row
|
|
@@ -229,11 +216,10 @@ class Body extends _react.default.Component {
|
|
|
229
216
|
window.removeEventListener('keydown', this.onHotKey);
|
|
230
217
|
}
|
|
231
218
|
render() {
|
|
232
|
-
const
|
|
233
|
-
columns,
|
|
234
|
-
row,
|
|
235
|
-
placeholder
|
|
236
|
-
} = this.props;
|
|
219
|
+
const _this$props4 = this.props,
|
|
220
|
+
columns = _this$props4.columns,
|
|
221
|
+
row = _this$props4.row,
|
|
222
|
+
placeholder = _this$props4.placeholder;
|
|
237
223
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactstrap.ModalBody, {
|
|
238
224
|
className: "dtable-ui-row-expand-body",
|
|
239
225
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
@@ -242,15 +228,12 @@ class Body extends _react.default.Component {
|
|
|
242
228
|
children: [columns.length === 0 && placeholder && /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
243
229
|
children: placeholder
|
|
244
230
|
}), columns.map((column, index) => {
|
|
245
|
-
const
|
|
246
|
-
|
|
247
|
-
data
|
|
248
|
-
} = column;
|
|
231
|
+
const type = column.type,
|
|
232
|
+
data = column.data;
|
|
249
233
|
let isHasMore = false;
|
|
250
234
|
if (type === _dtableUtils.CellType.LINK_FORMULA) {
|
|
251
|
-
let {
|
|
252
|
-
array_type
|
|
253
|
-
} = data || {};
|
|
235
|
+
let _ref3 = data || {},
|
|
236
|
+
array_type = _ref3.array_type;
|
|
254
237
|
const value = this.getCellValue({
|
|
255
238
|
row,
|
|
256
239
|
column
|
|
@@ -13,16 +13,12 @@ var _DTableColumnIcon = _interopRequireDefault(require("../../DTableColumnIcon")
|
|
|
13
13
|
require("./index.css");
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
15
|
const ColumnContent = _ref => {
|
|
16
|
-
let
|
|
17
|
-
|
|
18
|
-
children
|
|
19
|
-
} = _ref;
|
|
16
|
+
let column = _ref.column,
|
|
17
|
+
children = _ref.children;
|
|
20
18
|
const descriptionRef = (0, _react.useRef)(null);
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
description
|
|
25
|
-
} = column;
|
|
19
|
+
const name = column.name,
|
|
20
|
+
key = column.key,
|
|
21
|
+
description = column.description;
|
|
26
22
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactstrap.Row, {
|
|
27
23
|
className: "dtable-ui-row-expand-column-content pb-4",
|
|
28
24
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactstrap.Col, {
|
|
@@ -15,14 +15,12 @@ var _IconButton = _interopRequireDefault(require("../../IconButton"));
|
|
|
15
15
|
require("./index.css");
|
|
16
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
17
|
const Header = _ref => {
|
|
18
|
-
let
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
children
|
|
25
|
-
} = _ref;
|
|
18
|
+
let title = _ref.title,
|
|
19
|
+
columns = _ref.columns,
|
|
20
|
+
row = _ref.row,
|
|
21
|
+
onToggle = _ref.onToggle,
|
|
22
|
+
copyURL = _ref.copyURL,
|
|
23
|
+
children = _ref.children;
|
|
26
24
|
const renderTitle = (0, _react.useCallback)(() => {
|
|
27
25
|
const props = {
|
|
28
26
|
columns,
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
10
11
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
11
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
13
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
@@ -22,31 +23,48 @@ require("./index.css");
|
|
|
22
23
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
24
|
const _excluded = ["saveImmediately", "readonly", "isInsertingRow", "zIndex", "title", "className", "valueKey", "layout", "row", "columns", "commit", "onToggle", "uploadFile", "copyURL", "children"];
|
|
24
25
|
const RowExpandDialog = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
25
|
-
let
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
26
|
+
let _ref$saveImmediately = _ref.saveImmediately,
|
|
27
|
+
saveImmediately = _ref$saveImmediately === void 0 ? true : _ref$saveImmediately,
|
|
28
|
+
_ref$readonly = _ref.readonly,
|
|
29
|
+
readonly = _ref$readonly === void 0 ? false : _ref$readonly,
|
|
30
|
+
_ref$isInsertingRow = _ref.isInsertingRow,
|
|
31
|
+
isInsertingRow = _ref$isInsertingRow === void 0 ? false : _ref$isInsertingRow,
|
|
32
|
+
zIndex = _ref.zIndex,
|
|
33
|
+
title = _ref.title,
|
|
34
|
+
className = _ref.className,
|
|
35
|
+
_ref$valueKey = _ref.valueKey,
|
|
36
|
+
valueKey = _ref$valueKey === void 0 ? 'name' : _ref$valueKey,
|
|
37
|
+
_ref$layout = _ref.layout,
|
|
38
|
+
layout = _ref$layout === void 0 ? 'horizontal' : _ref$layout,
|
|
39
|
+
defaultRow = _ref.row,
|
|
40
|
+
defaultColumns = _ref.columns,
|
|
41
|
+
commit = _ref.commit,
|
|
42
|
+
onToggle = _ref.onToggle,
|
|
43
|
+
uploadFile = _ref.uploadFile,
|
|
44
|
+
copyURL = _ref.copyURL,
|
|
45
|
+
_ref$children = _ref.children,
|
|
46
|
+
children = _ref$children === void 0 ? [] : _ref$children,
|
|
44
47
|
otherProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
const
|
|
48
|
+
const _useState = (0, _react.useState)(false),
|
|
49
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
50
|
+
isAnimationEnd = _useState2[0],
|
|
51
|
+
setAnimationEnd = _useState2[1];
|
|
52
|
+
const _useState3 = (0, _react.useState)(true),
|
|
53
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
54
|
+
isLoading = _useState4[0],
|
|
55
|
+
setLoading = _useState4[1];
|
|
56
|
+
const _useState5 = (0, _react.useState)(false),
|
|
57
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
58
|
+
isSaving = _useState6[0],
|
|
59
|
+
setSaving = _useState6[1];
|
|
60
|
+
const _useState7 = (0, _react.useState)({}),
|
|
61
|
+
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
|
62
|
+
row = _useState8[0],
|
|
63
|
+
setRow = _useState8[1];
|
|
64
|
+
const _useState9 = (0, _react.useState)([]),
|
|
65
|
+
_useState0 = (0, _slicedToArray2.default)(_useState9, 2),
|
|
66
|
+
columns = _useState0[0],
|
|
67
|
+
setColumns = _useState0[1];
|
|
50
68
|
const modalRef = (0, _react.useRef)(null);
|
|
51
69
|
const isChangedRef = (0, _react.useRef)(false);
|
|
52
70
|
const update = (0, _react.useRef)({});
|
|
@@ -97,10 +115,9 @@ const RowExpandDialog = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
97
115
|
onToggle();
|
|
98
116
|
}, [isSaving, onToggle]);
|
|
99
117
|
const onSave = (0, _react.useCallback)(function (updated) {
|
|
100
|
-
let {
|
|
101
|
-
successCallback,
|
|
102
|
-
failCallback
|
|
103
|
-
} = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
118
|
+
let _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
119
|
+
successCallback = _ref2.successCallback,
|
|
120
|
+
failCallback = _ref2.failCallback;
|
|
104
121
|
commit(updated, columns, {
|
|
105
122
|
successCallback,
|
|
106
123
|
failCallback
|
|
@@ -151,12 +168,10 @@ const RowExpandDialog = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
151
168
|
// use setTimeout to make sure real dom rendered
|
|
152
169
|
setTimeout(() => {
|
|
153
170
|
let dom = modalRef.current.firstChild;
|
|
154
|
-
const
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
height
|
|
159
|
-
} = style;
|
|
171
|
+
const width = style.width,
|
|
172
|
+
maxWidth = style.maxWidth,
|
|
173
|
+
marginLeft = style.marginLeft,
|
|
174
|
+
height = style.height;
|
|
160
175
|
dom.style.width = "".concat(width, "px");
|
|
161
176
|
dom.style.maxWidth = "".concat(maxWidth, "px");
|
|
162
177
|
dom.style.marginLeft = "".concat(marginLeft, "px");
|
|
@@ -19,11 +19,10 @@ class RowExpandMBCheckboxEditor extends _react.default.Component {
|
|
|
19
19
|
this.editor = null;
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
|
-
const
|
|
23
|
-
column,
|
|
24
|
-
value,
|
|
25
|
-
className
|
|
26
|
-
} = this.props;
|
|
22
|
+
const _this$props = this.props,
|
|
23
|
+
column = _this$props.column,
|
|
24
|
+
value = _this$props.value,
|
|
25
|
+
className = _this$props.className;
|
|
27
26
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
28
27
|
className: (0, _classnames.default)('dtable-ui-mobile-row-expand-checkbox-editor-container', className),
|
|
29
28
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CheckboxEditor.default, {
|
|
@@ -13,21 +13,19 @@ class RowExpandPCCheckboxEditor extends _react.default.Component {
|
|
|
13
13
|
constructor() {
|
|
14
14
|
super(...arguments);
|
|
15
15
|
this.onCommit = newValue => {
|
|
16
|
-
const
|
|
17
|
-
columnIndex,
|
|
18
|
-
updateTabIndex,
|
|
19
|
-
onCommit
|
|
20
|
-
} = this.props;
|
|
16
|
+
const _this$props = this.props,
|
|
17
|
+
columnIndex = _this$props.columnIndex,
|
|
18
|
+
updateTabIndex = _this$props.updateTabIndex,
|
|
19
|
+
onCommit = _this$props.onCommit;
|
|
21
20
|
updateTabIndex && updateTabIndex(columnIndex);
|
|
22
21
|
onCommit && onCommit(newValue);
|
|
23
22
|
};
|
|
24
23
|
}
|
|
25
24
|
render() {
|
|
26
|
-
const
|
|
27
|
-
isEditorFocus,
|
|
28
|
-
column,
|
|
29
|
-
value
|
|
30
|
-
} = this.props;
|
|
25
|
+
const _this$props2 = this.props,
|
|
26
|
+
isEditorFocus = _this$props2.isEditorFocus,
|
|
27
|
+
column = _this$props2.column,
|
|
28
|
+
value = _this$props2.value;
|
|
31
29
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CheckboxEditor.default, {
|
|
32
30
|
className: "dtable-ui-row-expand-checkbox-editor mt-2",
|
|
33
31
|
column: column,
|
|
@@ -17,19 +17,16 @@ class RowExpandMBCollaboratorEditor extends _react.default.Component {
|
|
|
17
17
|
constructor(_props) {
|
|
18
18
|
super(_props);
|
|
19
19
|
this.initCollaborators = props => {
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
valueKey
|
|
24
|
-
} = props;
|
|
20
|
+
const row = props.row,
|
|
21
|
+
column = props.column,
|
|
22
|
+
valueKey = props.valueKey;
|
|
25
23
|
const emails = row[column[valueKey]] || [];
|
|
26
24
|
props.queryCollaborators && props.queryCollaborators(emails);
|
|
27
25
|
};
|
|
28
26
|
this.getCollaborators = () => {
|
|
29
|
-
const
|
|
30
|
-
getCollaborators,
|
|
31
|
-
collaborators
|
|
32
|
-
} = this.props;
|
|
27
|
+
const _this$props = this.props,
|
|
28
|
+
getCollaborators = _this$props.getCollaborators,
|
|
29
|
+
collaborators = _this$props.collaborators;
|
|
33
30
|
if (getCollaborators) return getCollaborators();
|
|
34
31
|
return collaborators || [];
|
|
35
32
|
};
|
|
@@ -69,16 +66,13 @@ class RowExpandMBCollaboratorEditor extends _react.default.Component {
|
|
|
69
66
|
this.props.onCommit(newValue);
|
|
70
67
|
};
|
|
71
68
|
this.renderCollaborators = value => {
|
|
72
|
-
const
|
|
73
|
-
emailCollaboratorMap
|
|
74
|
-
} = this.state;
|
|
69
|
+
const emailCollaboratorMap = this.state.emailCollaboratorMap;
|
|
75
70
|
if (Array.isArray(value) && value.length > 0) {
|
|
76
71
|
return value.map((email, index) => {
|
|
77
72
|
let collaborator = emailCollaboratorMap[email];
|
|
78
73
|
if (collaborator) {
|
|
79
|
-
const
|
|
80
|
-
email
|
|
81
|
-
} = collaborator;
|
|
74
|
+
const _collaborator = collaborator,
|
|
75
|
+
email = _collaborator.email;
|
|
82
76
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CollaboratorItem.default, {
|
|
83
77
|
collaborator: collaborator
|
|
84
78
|
}, email);
|
|
@@ -98,11 +92,10 @@ class RowExpandMBCollaboratorEditor extends _react.default.Component {
|
|
|
98
92
|
text: (0, _lang.getLocale)('Add_collaborator')
|
|
99
93
|
});
|
|
100
94
|
};
|
|
101
|
-
const
|
|
102
|
-
row
|
|
103
|
-
column
|
|
104
|
-
valueKey
|
|
105
|
-
} = this.props;
|
|
95
|
+
const _this$props2 = this.props,
|
|
96
|
+
_row = _this$props2.row,
|
|
97
|
+
_column = _this$props2.column,
|
|
98
|
+
_valueKey = _this$props2.valueKey;
|
|
106
99
|
this.state = {
|
|
107
100
|
menuPosition: null,
|
|
108
101
|
value: _row[_column[_valueKey]] || [],
|
|
@@ -120,11 +113,9 @@ class RowExpandMBCollaboratorEditor extends _react.default.Component {
|
|
|
120
113
|
}
|
|
121
114
|
}
|
|
122
115
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
123
|
-
const
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
valueKey
|
|
127
|
-
} = nextProps;
|
|
116
|
+
const column = nextProps.column,
|
|
117
|
+
row = nextProps.row,
|
|
118
|
+
valueKey = nextProps.valueKey;
|
|
128
119
|
if (row._id !== this.props.row._id) {
|
|
129
120
|
this.initCollaborators(nextProps);
|
|
130
121
|
this.setState({
|
|
@@ -139,14 +130,12 @@ class RowExpandMBCollaboratorEditor extends _react.default.Component {
|
|
|
139
130
|
}
|
|
140
131
|
}
|
|
141
132
|
render() {
|
|
142
|
-
const
|
|
143
|
-
collaborators,
|
|
144
|
-
column
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
value
|
|
149
|
-
} = this.state;
|
|
133
|
+
const _this$props3 = this.props,
|
|
134
|
+
collaborators = _this$props3.collaborators,
|
|
135
|
+
column = _this$props3.column;
|
|
136
|
+
const _this$state = this.state,
|
|
137
|
+
showEditor = _this$state.showEditor,
|
|
138
|
+
value = _this$state.value;
|
|
150
139
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
151
140
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
152
141
|
className: "dtable-ui dtable-ui-mobile-row-expand-collaborators position-relative",
|
|
@@ -17,19 +17,16 @@ class RowExpandPCCollaboratorEditor extends _react.default.Component {
|
|
|
17
17
|
constructor(_props) {
|
|
18
18
|
super(_props);
|
|
19
19
|
this.initCollaborators = props => {
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
valueKey
|
|
24
|
-
} = props;
|
|
20
|
+
const row = props.row,
|
|
21
|
+
column = props.column,
|
|
22
|
+
valueKey = props.valueKey;
|
|
25
23
|
const emails = row[column[valueKey]] || [];
|
|
26
24
|
props.queryCollaborators && props.queryCollaborators(emails);
|
|
27
25
|
};
|
|
28
26
|
this.getCollaborators = () => {
|
|
29
|
-
const
|
|
30
|
-
getCollaborators,
|
|
31
|
-
collaborators
|
|
32
|
-
} = this.props;
|
|
27
|
+
const _this$props = this.props,
|
|
28
|
+
getCollaborators = _this$props.getCollaborators,
|
|
29
|
+
collaborators = _this$props.collaborators;
|
|
33
30
|
if (getCollaborators) return getCollaborators();
|
|
34
31
|
return collaborators || [];
|
|
35
32
|
};
|
|
@@ -90,9 +87,7 @@ class RowExpandPCCollaboratorEditor extends _react.default.Component {
|
|
|
90
87
|
this.props.onCommit(newValue);
|
|
91
88
|
};
|
|
92
89
|
this.removeCollaborator = index => {
|
|
93
|
-
let
|
|
94
|
-
value
|
|
95
|
-
} = this.state;
|
|
90
|
+
let value = this.state.value;
|
|
96
91
|
let newValue = value.slice(0);
|
|
97
92
|
newValue.splice(index, 1);
|
|
98
93
|
this.setState({
|
|
@@ -101,13 +96,10 @@ class RowExpandPCCollaboratorEditor extends _react.default.Component {
|
|
|
101
96
|
this.props.onCommit(newValue);
|
|
102
97
|
};
|
|
103
98
|
this.renderSelectedCollaborators = () => {
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
value,
|
|
109
|
-
emailCollaboratorMap
|
|
110
|
-
} = this.state;
|
|
99
|
+
const isEditorFocus = this.props.isEditorFocus;
|
|
100
|
+
const _this$state = this.state,
|
|
101
|
+
value = _this$state.value,
|
|
102
|
+
emailCollaboratorMap = _this$state.emailCollaboratorMap;
|
|
111
103
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
112
104
|
tabIndex: 0,
|
|
113
105
|
onFocus: this.onFocus,
|
|
@@ -124,9 +116,8 @@ class RowExpandPCCollaboratorEditor extends _react.default.Component {
|
|
|
124
116
|
children: value.map((email, index) => {
|
|
125
117
|
let collaborator = emailCollaboratorMap[email];
|
|
126
118
|
if (collaborator) {
|
|
127
|
-
const
|
|
128
|
-
email
|
|
129
|
-
} = collaborator;
|
|
119
|
+
const _collaborator = collaborator,
|
|
120
|
+
email = _collaborator.email;
|
|
130
121
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CollaboratorItem.default, {
|
|
131
122
|
collaborator: collaborator,
|
|
132
123
|
enableDeleteCollaborator: true,
|
|
@@ -153,11 +144,10 @@ class RowExpandPCCollaboratorEditor extends _react.default.Component {
|
|
|
153
144
|
})
|
|
154
145
|
});
|
|
155
146
|
};
|
|
156
|
-
const
|
|
157
|
-
row
|
|
158
|
-
column
|
|
159
|
-
valueKey
|
|
160
|
-
} = this.props;
|
|
147
|
+
const _this$props2 = this.props,
|
|
148
|
+
_row = _this$props2.row,
|
|
149
|
+
_column = _this$props2.column,
|
|
150
|
+
_valueKey = _this$props2.valueKey;
|
|
161
151
|
this.state = {
|
|
162
152
|
menuPosition: null,
|
|
163
153
|
value: _row[_column[_valueKey]] || [],
|
|
@@ -177,11 +167,9 @@ class RowExpandPCCollaboratorEditor extends _react.default.Component {
|
|
|
177
167
|
}
|
|
178
168
|
}
|
|
179
169
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
180
|
-
const
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
valueKey
|
|
184
|
-
} = nextProps;
|
|
170
|
+
const column = nextProps.column,
|
|
171
|
+
row = nextProps.row,
|
|
172
|
+
valueKey = nextProps.valueKey;
|
|
185
173
|
if (row._id !== this.props.row._id) {
|
|
186
174
|
this.initCollaborators(nextProps);
|
|
187
175
|
this.setState({
|
|
@@ -208,14 +196,12 @@ class RowExpandPCCollaboratorEditor extends _react.default.Component {
|
|
|
208
196
|
document.removeEventListener('keydown', this.onKeyDown);
|
|
209
197
|
}
|
|
210
198
|
render() {
|
|
211
|
-
const
|
|
212
|
-
collaborators,
|
|
213
|
-
column
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
value
|
|
218
|
-
} = this.state;
|
|
199
|
+
const _this$props3 = this.props,
|
|
200
|
+
collaborators = _this$props3.collaborators,
|
|
201
|
+
column = _this$props3.column;
|
|
202
|
+
const _this$state2 = this.state,
|
|
203
|
+
showCollaboratorSelect = _this$state2.showCollaboratorSelect,
|
|
204
|
+
value = _this$state2.value;
|
|
219
205
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
220
206
|
className: "position-relative mt-1 w-100",
|
|
221
207
|
ref: ref => this.collaboratorSelectRef = ref,
|
|
@@ -30,22 +30,18 @@ class RowExpandMBDateEditor extends _react.default.Component {
|
|
|
30
30
|
value
|
|
31
31
|
});
|
|
32
32
|
};
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
valueKey
|
|
37
|
-
} = props;
|
|
33
|
+
const column = props.column,
|
|
34
|
+
row = props.row,
|
|
35
|
+
valueKey = props.valueKey;
|
|
38
36
|
this.state = {
|
|
39
37
|
isShowEditor: false,
|
|
40
38
|
value: row[column[valueKey]]
|
|
41
39
|
};
|
|
42
40
|
}
|
|
43
41
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
valueKey
|
|
48
|
-
} = nextProps;
|
|
42
|
+
const column = nextProps.column,
|
|
43
|
+
row = nextProps.row,
|
|
44
|
+
valueKey = nextProps.valueKey;
|
|
49
45
|
if (row._id !== this.props.row._id) {
|
|
50
46
|
this.setState({
|
|
51
47
|
value: row[column[valueKey]],
|
|
@@ -54,14 +50,12 @@ class RowExpandMBDateEditor extends _react.default.Component {
|
|
|
54
50
|
}
|
|
55
51
|
}
|
|
56
52
|
render() {
|
|
57
|
-
let
|
|
58
|
-
column,
|
|
59
|
-
lang
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
isShowEditor
|
|
64
|
-
} = this.state;
|
|
53
|
+
let _this$props = this.props,
|
|
54
|
+
column = _this$props.column,
|
|
55
|
+
lang = _this$props.lang;
|
|
56
|
+
let _this$state = this.state,
|
|
57
|
+
value = _this$state.value,
|
|
58
|
+
isShowEditor = _this$state.isShowEditor;
|
|
65
59
|
const format = (0, _columnUtils.getDateColumnFormat)(column);
|
|
66
60
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
67
61
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
@@ -57,22 +57,19 @@ class RowExpandPCDateEditor extends _react.default.Component {
|
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
59
|
componentDidMount() {
|
|
60
|
-
const
|
|
61
|
-
column,
|
|
62
|
-
row,
|
|
63
|
-
valueKey
|
|
64
|
-
} = this.props;
|
|
60
|
+
const _this$props = this.props,
|
|
61
|
+
column = _this$props.column,
|
|
62
|
+
row = _this$props.row,
|
|
63
|
+
valueKey = _this$props.valueKey;
|
|
65
64
|
this.setState({
|
|
66
65
|
value: row[column[valueKey]]
|
|
67
66
|
});
|
|
68
67
|
document.addEventListener('keydown', this.onKeyDown);
|
|
69
68
|
}
|
|
70
69
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
valueKey
|
|
75
|
-
} = nextProps;
|
|
70
|
+
const column = nextProps.column,
|
|
71
|
+
row = nextProps.row,
|
|
72
|
+
valueKey = nextProps.valueKey;
|
|
76
73
|
if (row._id !== this.props.row._id) {
|
|
77
74
|
this.setState({
|
|
78
75
|
value: row[column[valueKey]],
|
|
@@ -94,16 +91,14 @@ class RowExpandPCDateEditor extends _react.default.Component {
|
|
|
94
91
|
document.removeEventListener('keydown', this.onKeyDown);
|
|
95
92
|
}
|
|
96
93
|
render() {
|
|
97
|
-
let
|
|
98
|
-
column,
|
|
99
|
-
isInModal,
|
|
100
|
-
isEditorFocus,
|
|
101
|
-
lang
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
isShowEditor
|
|
106
|
-
} = this.state;
|
|
94
|
+
let _this$props2 = this.props,
|
|
95
|
+
column = _this$props2.column,
|
|
96
|
+
isInModal = _this$props2.isInModal,
|
|
97
|
+
isEditorFocus = _this$props2.isEditorFocus,
|
|
98
|
+
lang = _this$props2.lang;
|
|
99
|
+
let _this$state = this.state,
|
|
100
|
+
value = _this$state.value,
|
|
101
|
+
isShowEditor = _this$state.isShowEditor;
|
|
107
102
|
const format = (0, _columnUtils.getDateColumnFormat)(column);
|
|
108
103
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
109
104
|
ref: ref => this.dateSelectRef = ref,
|