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
|
@@ -34,21 +34,17 @@ class RowExpandPCNumberEditor extends _react.default.Component {
|
|
|
34
34
|
isShowEditor: false
|
|
35
35
|
});
|
|
36
36
|
};
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
isEditorFocus
|
|
41
|
-
} = props;
|
|
37
|
+
const column = props.column,
|
|
38
|
+
row = props.row,
|
|
39
|
+
isEditorFocus = props.isEditorFocus;
|
|
42
40
|
this.state = {
|
|
43
41
|
isShowEditor: isEditorFocus || false,
|
|
44
42
|
value: row[column.key]
|
|
45
43
|
};
|
|
46
44
|
}
|
|
47
45
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
row
|
|
51
|
-
} = nextProps;
|
|
46
|
+
const column = nextProps.column,
|
|
47
|
+
row = nextProps.row;
|
|
52
48
|
if (row._id !== this.props.row._id) {
|
|
53
49
|
this.setState({
|
|
54
50
|
value: row[column.key],
|
|
@@ -66,14 +62,12 @@ class RowExpandPCNumberEditor extends _react.default.Component {
|
|
|
66
62
|
}
|
|
67
63
|
}
|
|
68
64
|
render() {
|
|
69
|
-
let
|
|
70
|
-
column,
|
|
71
|
-
isInModal
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
isShowEditor
|
|
76
|
-
} = this.state;
|
|
65
|
+
let _this$props = this.props,
|
|
66
|
+
column = _this$props.column,
|
|
67
|
+
isInModal = _this$props.isInModal;
|
|
68
|
+
let _this$state = this.state,
|
|
69
|
+
value = _this$state.value,
|
|
70
|
+
isShowEditor = _this$state.isShowEditor;
|
|
77
71
|
if (isShowEditor) {
|
|
78
72
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_NumberEditor.default, {
|
|
79
73
|
isInModal: isInModal,
|
|
@@ -85,9 +79,8 @@ class RowExpandPCNumberEditor extends _react.default.Component {
|
|
|
85
79
|
}
|
|
86
80
|
let formatValue = '';
|
|
87
81
|
if ((0, _dtableUtils.isNumber)(value)) {
|
|
88
|
-
let
|
|
89
|
-
data = {}
|
|
90
|
-
} = column;
|
|
82
|
+
let _column$data = column.data,
|
|
83
|
+
data = _column$data === void 0 ? {} : _column$data;
|
|
91
84
|
formatValue = (0, _dtableUtils.getNumberDisplayString)(value, data);
|
|
92
85
|
}
|
|
93
86
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -13,9 +13,7 @@ class RowExpandMBRateEditor extends _react.default.Component {
|
|
|
13
13
|
super(props);
|
|
14
14
|
this.onChangeRateNumber = index => {
|
|
15
15
|
if (!this.canEdit) return;
|
|
16
|
-
const
|
|
17
|
-
value
|
|
18
|
-
} = this.state;
|
|
16
|
+
const value = this.state.value;
|
|
19
17
|
const newValue = value === index ? '' : index;
|
|
20
18
|
this.setState({
|
|
21
19
|
value: newValue
|
|
@@ -23,17 +21,12 @@ class RowExpandMBRateEditor extends _react.default.Component {
|
|
|
23
21
|
this.props.onCommit(newValue);
|
|
24
22
|
};
|
|
25
23
|
this.getRateMaxStar = () => {
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const {
|
|
33
|
-
rate_max_number,
|
|
34
|
-
rate_style_color,
|
|
35
|
-
rate_style_type
|
|
36
|
-
} = column.data || {};
|
|
24
|
+
const value = this.state.value;
|
|
25
|
+
const column = this.props.column;
|
|
26
|
+
const _ref = column.data || {},
|
|
27
|
+
rate_max_number = _ref.rate_max_number,
|
|
28
|
+
rate_style_color = _ref.rate_style_color,
|
|
29
|
+
rate_style_type = _ref.rate_style_type;
|
|
37
30
|
const rateShowType = rate_style_type ? rate_style_type : 'dtable-icon-rate';
|
|
38
31
|
let rateList = [];
|
|
39
32
|
for (let i = 0; i < rate_max_number; i++) {
|
|
@@ -59,20 +52,14 @@ class RowExpandMBRateEditor extends _react.default.Component {
|
|
|
59
52
|
this.state = {
|
|
60
53
|
value: props.value || ''
|
|
61
54
|
};
|
|
62
|
-
let
|
|
63
|
-
|
|
64
|
-
} = this.props;
|
|
65
|
-
const {
|
|
66
|
-
editable
|
|
67
|
-
} = _column;
|
|
55
|
+
let _column = this.props.column;
|
|
56
|
+
const editable = _column.editable;
|
|
68
57
|
this.canEdit = editable;
|
|
69
58
|
}
|
|
70
59
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
valueKey
|
|
75
|
-
} = nextProps;
|
|
60
|
+
const column = nextProps.column,
|
|
61
|
+
row = nextProps.row,
|
|
62
|
+
valueKey = nextProps.valueKey;
|
|
76
63
|
if (row._id !== this.props.row._id) {
|
|
77
64
|
this.setState({
|
|
78
65
|
value: row[column[valueKey]] || ''
|
|
@@ -15,14 +15,12 @@ class RowExpandPCRateEditor extends _react.default.Component {
|
|
|
15
15
|
super(props);
|
|
16
16
|
this.onKeyDown = event => {
|
|
17
17
|
event.stopPropagation();
|
|
18
|
-
const
|
|
19
|
-
isEditorFocus,
|
|
20
|
-
column
|
|
21
|
-
} = this.props;
|
|
18
|
+
const _this$props = this.props,
|
|
19
|
+
isEditorFocus = _this$props.isEditorFocus,
|
|
20
|
+
column = _this$props.column;
|
|
22
21
|
if (!isEditorFocus || !this.canEdit) return;
|
|
23
|
-
const {
|
|
24
|
-
rate_max_number
|
|
25
|
-
} = column.data || {};
|
|
22
|
+
const _ref = column.data || {},
|
|
23
|
+
rate_max_number = _ref.rate_max_number;
|
|
26
24
|
const currentInputNum = Number(event.key);
|
|
27
25
|
const isValidNumber = currentInputNum <= rate_max_number;
|
|
28
26
|
if (isValidNumber) {
|
|
@@ -32,9 +30,7 @@ class RowExpandPCRateEditor extends _react.default.Component {
|
|
|
32
30
|
this.onChangeRateNumber = index => {
|
|
33
31
|
this.props.updateTabIndex(this.props.columnIndex);
|
|
34
32
|
if (!this.canEdit) return;
|
|
35
|
-
const
|
|
36
|
-
value
|
|
37
|
-
} = this.state;
|
|
33
|
+
const value = this.state.value;
|
|
38
34
|
let newValue = value === index ? '' : index;
|
|
39
35
|
this.setState({
|
|
40
36
|
value: newValue
|
|
@@ -56,22 +52,16 @@ class RowExpandPCRateEditor extends _react.default.Component {
|
|
|
56
52
|
}
|
|
57
53
|
};
|
|
58
54
|
this.getRateMaxStar = () => {
|
|
59
|
-
const
|
|
60
|
-
enterRateItemIndex,
|
|
61
|
-
value
|
|
62
|
-
|
|
63
|
-
const {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
rate_max_number,
|
|
68
|
-
rate_style_color,
|
|
69
|
-
rate_style_type
|
|
70
|
-
} = column.data || {};
|
|
55
|
+
const _this$state = this.state,
|
|
56
|
+
enterRateItemIndex = _this$state.enterRateItemIndex,
|
|
57
|
+
value = _this$state.value;
|
|
58
|
+
const column = this.props.column;
|
|
59
|
+
const _ref2 = column.data || {},
|
|
60
|
+
rate_max_number = _ref2.rate_max_number,
|
|
61
|
+
rate_style_color = _ref2.rate_style_color,
|
|
62
|
+
rate_style_type = _ref2.rate_style_type;
|
|
71
63
|
const rateShowType = rate_style_type ? rate_style_type : 'dtable-icon-rate';
|
|
72
|
-
const
|
|
73
|
-
editable
|
|
74
|
-
} = column;
|
|
64
|
+
const editable = column.editable;
|
|
75
65
|
let rateList = [];
|
|
76
66
|
for (let i = 0; i < rate_max_number; i++) {
|
|
77
67
|
const rateItemIndex = i + 1;
|
|
@@ -104,20 +94,14 @@ class RowExpandPCRateEditor extends _react.default.Component {
|
|
|
104
94
|
value: props.value || '',
|
|
105
95
|
enterRateItemIndex: -1
|
|
106
96
|
};
|
|
107
|
-
let
|
|
108
|
-
|
|
109
|
-
} = this.props;
|
|
110
|
-
const {
|
|
111
|
-
editable: _editable
|
|
112
|
-
} = _column;
|
|
97
|
+
let _column = this.props.column;
|
|
98
|
+
const _editable = _column.editable;
|
|
113
99
|
this.canEdit = _editable;
|
|
114
100
|
}
|
|
115
101
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
116
|
-
const
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
valueKey
|
|
120
|
-
} = nextProps;
|
|
102
|
+
const column = nextProps.column,
|
|
103
|
+
row = nextProps.row,
|
|
104
|
+
valueKey = nextProps.valueKey;
|
|
121
105
|
if (row._id !== this.props.row._id) {
|
|
122
106
|
this.setState({
|
|
123
107
|
value: row[column[valueKey]] || ''
|
|
@@ -21,19 +21,14 @@ class RowExpandMBSingleSelectEditor extends _react.default.Component {
|
|
|
21
21
|
constructor(_props) {
|
|
22
22
|
super(_props);
|
|
23
23
|
this.getOptions = props => {
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
columns
|
|
28
|
-
} = props;
|
|
24
|
+
const column = props.column,
|
|
25
|
+
row = props.row,
|
|
26
|
+
columns = props.columns;
|
|
29
27
|
const options = (0, _dtableUtils.getColumnOptions)(column);
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
cascade_column_key,
|
|
35
|
-
cascade_settings
|
|
36
|
-
} = data || {};
|
|
28
|
+
const data = column.data;
|
|
29
|
+
const _ref = data || {},
|
|
30
|
+
cascade_column_key = _ref.cascade_column_key,
|
|
31
|
+
cascade_settings = _ref.cascade_settings;
|
|
37
32
|
if (cascade_column_key && Array.isArray(columns)) {
|
|
38
33
|
const cascadeColumn = columns.find(c => c.key === cascade_column_key);
|
|
39
34
|
if (cascadeColumn) {
|
|
@@ -70,9 +65,7 @@ class RowExpandMBSingleSelectEditor extends _react.default.Component {
|
|
|
70
65
|
this.toggleEditor(false);
|
|
71
66
|
};
|
|
72
67
|
this.renderOption = () => {
|
|
73
|
-
const
|
|
74
|
-
value
|
|
75
|
-
} = this.state;
|
|
68
|
+
const value = this.state.value;
|
|
76
69
|
let option = this.options.find(o => o[this.key] === value);
|
|
77
70
|
option = (0, _objectSpread2.default)({
|
|
78
71
|
name: (0, _lang.getLocale)(_constants.DELETED_OPTION_TIPS),
|
|
@@ -100,10 +93,8 @@ class RowExpandMBSingleSelectEditor extends _react.default.Component {
|
|
|
100
93
|
this.options = this.getOptions(_props);
|
|
101
94
|
}
|
|
102
95
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
column
|
|
106
|
-
} = nextProps;
|
|
96
|
+
const value = nextProps.value,
|
|
97
|
+
column = nextProps.column;
|
|
107
98
|
if (value !== this.props.value || !_objectUtils.default.isSameObject(column, this.props.column)) {
|
|
108
99
|
this.options = this.getOptions(nextProps);
|
|
109
100
|
this.setState({
|
|
@@ -113,15 +104,13 @@ class RowExpandMBSingleSelectEditor extends _react.default.Component {
|
|
|
113
104
|
}
|
|
114
105
|
}
|
|
115
106
|
render() {
|
|
116
|
-
const
|
|
117
|
-
column,
|
|
118
|
-
isSupportNewOption,
|
|
119
|
-
onAddNewOption
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
value
|
|
124
|
-
} = this.state;
|
|
107
|
+
const _this$props = this.props,
|
|
108
|
+
column = _this$props.column,
|
|
109
|
+
isSupportNewOption = _this$props.isSupportNewOption,
|
|
110
|
+
onAddNewOption = _this$props.onAddNewOption;
|
|
111
|
+
const _this$state = this.state,
|
|
112
|
+
showEditor = _this$state.showEditor,
|
|
113
|
+
value = _this$state.value;
|
|
125
114
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
126
115
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
127
116
|
className: "dtable-ui dtable-ui-mobile-row-expand-options-editor position-relative",
|
|
@@ -18,19 +18,14 @@ class RowExpandPCSingleSelectEditor extends _react.default.Component {
|
|
|
18
18
|
constructor(_props) {
|
|
19
19
|
super(_props);
|
|
20
20
|
this.getOptions = props => {
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
columns
|
|
25
|
-
} = props;
|
|
21
|
+
const column = props.column,
|
|
22
|
+
row = props.row,
|
|
23
|
+
columns = props.columns;
|
|
26
24
|
const options = (0, _dtableUtils.getColumnOptions)(column);
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
cascade_column_key,
|
|
32
|
-
cascade_settings
|
|
33
|
-
} = data || {};
|
|
25
|
+
const data = column.data;
|
|
26
|
+
const _ref = data || {},
|
|
27
|
+
cascade_column_key = _ref.cascade_column_key,
|
|
28
|
+
cascade_settings = _ref.cascade_settings;
|
|
34
29
|
if (cascade_column_key && Array.isArray(columns)) {
|
|
35
30
|
const cascadeColumn = columns.find(c => c.key === cascade_column_key);
|
|
36
31
|
if (cascadeColumn) {
|
|
@@ -91,14 +86,11 @@ class RowExpandPCSingleSelectEditor extends _react.default.Component {
|
|
|
91
86
|
this.toggleSingleSelect(false);
|
|
92
87
|
};
|
|
93
88
|
this.renderOption = () => {
|
|
94
|
-
const
|
|
95
|
-
isEditorFocus,
|
|
96
|
-
classNamePrefix,
|
|
97
|
-
placeholder
|
|
98
|
-
|
|
99
|
-
const {
|
|
100
|
-
value
|
|
101
|
-
} = this.state;
|
|
89
|
+
const _this$props = this.props,
|
|
90
|
+
isEditorFocus = _this$props.isEditorFocus,
|
|
91
|
+
classNamePrefix = _this$props.classNamePrefix,
|
|
92
|
+
placeholder = _this$props.placeholder;
|
|
93
|
+
const value = this.state.value;
|
|
102
94
|
const option = this.options.find(o => o[this.key] === value);
|
|
103
95
|
const optionStyle = option ? {
|
|
104
96
|
backgroundColor: option.color,
|
|
@@ -153,10 +145,8 @@ class RowExpandPCSingleSelectEditor extends _react.default.Component {
|
|
|
153
145
|
document.addEventListener('keydown', this.onKeyDown);
|
|
154
146
|
}
|
|
155
147
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
156
|
-
const
|
|
157
|
-
|
|
158
|
-
column
|
|
159
|
-
} = nextProps;
|
|
148
|
+
const value = nextProps.value,
|
|
149
|
+
column = nextProps.column;
|
|
160
150
|
if (value !== this.props.value || !_objectUtils.default.isSameObject(column, this.props.column)) {
|
|
161
151
|
this.options = this.getOptions(nextProps);
|
|
162
152
|
this.setState({
|
|
@@ -180,16 +170,14 @@ class RowExpandPCSingleSelectEditor extends _react.default.Component {
|
|
|
180
170
|
document.removeEventListener('keydown', this.onKeyDown);
|
|
181
171
|
}
|
|
182
172
|
render() {
|
|
183
|
-
const
|
|
184
|
-
isSupportNewOption,
|
|
185
|
-
onAddNewOption,
|
|
186
|
-
column,
|
|
187
|
-
classNamePrefix
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
value
|
|
192
|
-
} = this.state;
|
|
173
|
+
const _this$props2 = this.props,
|
|
174
|
+
isSupportNewOption = _this$props2.isSupportNewOption,
|
|
175
|
+
onAddNewOption = _this$props2.onAddNewOption,
|
|
176
|
+
column = _this$props2.column,
|
|
177
|
+
classNamePrefix = _this$props2.classNamePrefix;
|
|
178
|
+
const _this$state = this.state,
|
|
179
|
+
isShowEditor = _this$state.isShowEditor,
|
|
180
|
+
value = _this$state.value;
|
|
193
181
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
194
182
|
className: "position-relative w-100",
|
|
195
183
|
ref: ref => this.ref = ref,
|
|
@@ -19,11 +19,10 @@ class RowExpandMBTextEditor extends _react.default.Component {
|
|
|
19
19
|
this.editor = null;
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
|
-
const
|
|
23
|
-
readOnly,
|
|
24
|
-
column,
|
|
25
|
-
value
|
|
26
|
-
} = this.props;
|
|
22
|
+
const _this$props = this.props,
|
|
23
|
+
readOnly = _this$props.readOnly,
|
|
24
|
+
column = _this$props.column,
|
|
25
|
+
value = _this$props.value;
|
|
27
26
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
28
27
|
className: "dtable-ui-mobile-row-expand-input-editor-container",
|
|
29
28
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextEditor.default, {
|
|
@@ -35,10 +35,9 @@ class RowExpandPCTextEditor extends _react.default.Component {
|
|
|
35
35
|
}, 1);
|
|
36
36
|
};
|
|
37
37
|
this.onCommit = () => {
|
|
38
|
-
const
|
|
39
|
-
isRequired,
|
|
40
|
-
column
|
|
41
|
-
} = this.props;
|
|
38
|
+
const _this$props = this.props,
|
|
39
|
+
isRequired = _this$props.isRequired,
|
|
40
|
+
column = _this$props.column;
|
|
42
41
|
const value = this.editor.getValue();
|
|
43
42
|
if (isRequired && (0, _columnUtils.isEnableCheckFormat)(column)) {
|
|
44
43
|
this.checked = true;
|
|
@@ -47,9 +46,7 @@ class RowExpandPCTextEditor extends _react.default.Component {
|
|
|
47
46
|
this.props.onCommit(value);
|
|
48
47
|
};
|
|
49
48
|
this.checkField = () => {
|
|
50
|
-
const
|
|
51
|
-
column
|
|
52
|
-
} = this.props;
|
|
49
|
+
const column = this.props.column;
|
|
53
50
|
const text = this.editor.getValue();
|
|
54
51
|
this.validValue = (0, _cell.checkValueConformityFormat)(column.data, text);
|
|
55
52
|
this.setState({
|
|
@@ -63,11 +60,10 @@ class RowExpandPCTextEditor extends _react.default.Component {
|
|
|
63
60
|
this.blurInput();
|
|
64
61
|
return;
|
|
65
62
|
}
|
|
66
|
-
const
|
|
67
|
-
selectionStart,
|
|
68
|
-
selectionEnd,
|
|
69
|
-
value
|
|
70
|
-
} = event.currentTarget;
|
|
63
|
+
const _event$currentTarget = event.currentTarget,
|
|
64
|
+
selectionStart = _event$currentTarget.selectionStart,
|
|
65
|
+
selectionEnd = _event$currentTarget.selectionEnd,
|
|
66
|
+
value = _event$currentTarget.value;
|
|
71
67
|
if (event.keyCode === _constants.KeyCodes.ChineseInputMethod || event.keyCode === _constants.KeyCodes.LeftArrow && selectionStart === 0 || event.keyCode === _constants.KeyCodes.RightArrow && selectionEnd === value.length) {
|
|
72
68
|
event.stopPropagation();
|
|
73
69
|
}
|
|
@@ -93,17 +89,13 @@ class RowExpandPCTextEditor extends _react.default.Component {
|
|
|
93
89
|
this.checkingField = null;
|
|
94
90
|
}
|
|
95
91
|
componentDidMount() {
|
|
96
|
-
const
|
|
97
|
-
isEditorFocus
|
|
98
|
-
} = this.props;
|
|
92
|
+
const isEditorFocus = this.props.isEditorFocus;
|
|
99
93
|
if (isEditorFocus) {
|
|
100
94
|
this.focusInput();
|
|
101
95
|
}
|
|
102
96
|
}
|
|
103
97
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
104
|
-
const
|
|
105
|
-
isEditorFocus
|
|
106
|
-
} = nextProps;
|
|
98
|
+
const isEditorFocus = nextProps.isEditorFocus;
|
|
107
99
|
if (isEditorFocus && !this.props.isEditorFocus) {
|
|
108
100
|
this.focusInput();
|
|
109
101
|
} else if (!isEditorFocus && this.props.isEditorFocus) {
|
|
@@ -111,14 +103,11 @@ class RowExpandPCTextEditor extends _react.default.Component {
|
|
|
111
103
|
}
|
|
112
104
|
}
|
|
113
105
|
render() {
|
|
114
|
-
const
|
|
115
|
-
readOnly,
|
|
116
|
-
column,
|
|
117
|
-
value
|
|
118
|
-
|
|
119
|
-
const {
|
|
120
|
-
inconformityFormat
|
|
121
|
-
} = this.state;
|
|
106
|
+
const _this$props2 = this.props,
|
|
107
|
+
readOnly = _this$props2.readOnly,
|
|
108
|
+
column = _this$props2.column,
|
|
109
|
+
value = _this$props2.value;
|
|
110
|
+
const inconformityFormat = this.state.inconformityFormat;
|
|
122
111
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
123
112
|
className: "dtable-ui-row-expand-simple-text-editor-container",
|
|
124
113
|
ref: this.setEditorRef,
|
|
@@ -15,9 +15,7 @@ class RowExpandMBUrlEditor extends _react.default.Component {
|
|
|
15
15
|
constructor(props) {
|
|
16
16
|
super(props);
|
|
17
17
|
this.onBlur = () => {
|
|
18
|
-
const
|
|
19
|
-
onCommit
|
|
20
|
-
} = this.props;
|
|
18
|
+
const onCommit = this.props.onCommit;
|
|
21
19
|
onCommit(this.state.value.trim());
|
|
22
20
|
};
|
|
23
21
|
this.onChange = e => {
|
|
@@ -34,9 +32,7 @@ class RowExpandMBUrlEditor extends _react.default.Component {
|
|
|
34
32
|
e.stopPropagation();
|
|
35
33
|
};
|
|
36
34
|
this.onOpenUrlLink = () => {
|
|
37
|
-
const
|
|
38
|
-
value
|
|
39
|
-
} = this.state;
|
|
35
|
+
const value = this.state.value;
|
|
40
36
|
let newValue = value.trim();
|
|
41
37
|
if (!(0, _utils.isValidUrl)(newValue)) {
|
|
42
38
|
newValue = "http://".concat(newValue);
|
|
@@ -52,10 +48,8 @@ class RowExpandMBUrlEditor extends _react.default.Component {
|
|
|
52
48
|
};
|
|
53
49
|
}
|
|
54
50
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
row
|
|
58
|
-
} = nextProps;
|
|
51
|
+
const column = nextProps.column,
|
|
52
|
+
row = nextProps.row;
|
|
59
53
|
if (row._id !== this.props.row._id) {
|
|
60
54
|
this.setState({
|
|
61
55
|
value: row[column[this.props.valueKey]] || ''
|
|
@@ -63,9 +57,7 @@ class RowExpandMBUrlEditor extends _react.default.Component {
|
|
|
63
57
|
}
|
|
64
58
|
}
|
|
65
59
|
render() {
|
|
66
|
-
const
|
|
67
|
-
value
|
|
68
|
-
} = this.state;
|
|
60
|
+
const value = this.state.value;
|
|
69
61
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
70
62
|
className: "dtable-ui-mobile-row-expand-input-editor-container position-relative dtable-ui-mobile-row-expand-url-editor-container",
|
|
71
63
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
@@ -27,9 +27,7 @@ class RowExpandPCUrlEditor extends _react.default.Component {
|
|
|
27
27
|
}, 1);
|
|
28
28
|
};
|
|
29
29
|
this.onBlur = () => {
|
|
30
|
-
const
|
|
31
|
-
onCommit
|
|
32
|
-
} = this.props;
|
|
30
|
+
const onCommit = this.props.onCommit;
|
|
33
31
|
onCommit(this.state.value.trim());
|
|
34
32
|
};
|
|
35
33
|
this.onFocus = e => {
|
|
@@ -54,19 +52,16 @@ class RowExpandPCUrlEditor extends _react.default.Component {
|
|
|
54
52
|
this.blurInput();
|
|
55
53
|
return;
|
|
56
54
|
}
|
|
57
|
-
const
|
|
58
|
-
selectionStart,
|
|
59
|
-
selectionEnd,
|
|
60
|
-
value
|
|
61
|
-
} = event.currentTarget;
|
|
55
|
+
const _event$currentTarget = event.currentTarget,
|
|
56
|
+
selectionStart = _event$currentTarget.selectionStart,
|
|
57
|
+
selectionEnd = _event$currentTarget.selectionEnd,
|
|
58
|
+
value = _event$currentTarget.value;
|
|
62
59
|
if (event.keyCode === _constants.KeyCodes.ChineseInputMethod || event.keyCode === _constants.KeyCodes.LeftArrow && selectionStart === 0 || event.keyCode === _constants.KeyCodes.RightArrow && selectionEnd === value.length) {
|
|
63
60
|
event.stopPropagation();
|
|
64
61
|
}
|
|
65
62
|
};
|
|
66
63
|
this.onOpenUrlLink = () => {
|
|
67
|
-
const
|
|
68
|
-
value
|
|
69
|
-
} = this.state;
|
|
64
|
+
const value = this.state.value;
|
|
70
65
|
let newValue = value.trim();
|
|
71
66
|
if (!(0, _utils.isValidUrl)(newValue)) {
|
|
72
67
|
newValue = "http://".concat(newValue);
|
|
@@ -88,10 +83,8 @@ class RowExpandPCUrlEditor extends _react.default.Component {
|
|
|
88
83
|
}
|
|
89
84
|
}
|
|
90
85
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
row
|
|
94
|
-
} = nextProps;
|
|
86
|
+
const column = nextProps.column,
|
|
87
|
+
row = nextProps.row;
|
|
95
88
|
if (row._id !== this.props.row._id) {
|
|
96
89
|
this.setState({
|
|
97
90
|
value: row[column[this.props.valueKey]] || ''
|
|
@@ -105,9 +98,7 @@ class RowExpandPCUrlEditor extends _react.default.Component {
|
|
|
105
98
|
}
|
|
106
99
|
}
|
|
107
100
|
render() {
|
|
108
|
-
let
|
|
109
|
-
value
|
|
110
|
-
} = this.state;
|
|
101
|
+
let value = this.state.value;
|
|
111
102
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
112
103
|
className: "dtable-ui-row-expand-url-editor",
|
|
113
104
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
@@ -9,10 +9,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _DepartmentSingleSelectFormatter = _interopRequireDefault(require("../../DepartmentSingleSelectFormatter"));
|
|
10
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
11
|
function RowExpandMBDepartmentFormatter(_ref) {
|
|
12
|
-
let
|
|
13
|
-
|
|
14
|
-
departments
|
|
15
|
-
} = _ref;
|
|
12
|
+
let value = _ref.value,
|
|
13
|
+
departments = _ref.departments;
|
|
16
14
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DepartmentSingleSelectFormatter.default, {
|
|
17
15
|
value: value,
|
|
18
16
|
departments: departments
|
|
@@ -9,10 +9,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _DepartmentSingleSelectFormatter = _interopRequireDefault(require("../../DepartmentSingleSelectFormatter"));
|
|
10
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
11
|
function RowExpandPCDepartmentFormatter(_ref) {
|
|
12
|
-
let
|
|
13
|
-
|
|
14
|
-
departments
|
|
15
|
-
} = _ref;
|
|
12
|
+
let value = _ref.value,
|
|
13
|
+
departments = _ref.departments;
|
|
16
14
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
17
15
|
className: "position-relative w-100",
|
|
18
16
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -14,18 +14,15 @@ class RowExpandEmailFormatter extends _react.default.Component {
|
|
|
14
14
|
constructor() {
|
|
15
15
|
super(...arguments);
|
|
16
16
|
this.onOpenEmailLink = () => {
|
|
17
|
-
const
|
|
18
|
-
value
|
|
19
|
-
} = this.props;
|
|
17
|
+
const value = this.props.value;
|
|
20
18
|
let newValue = value.trim();
|
|
21
19
|
window.location.href = "mailto:".concat(newValue);
|
|
22
20
|
};
|
|
23
21
|
}
|
|
24
22
|
render() {
|
|
25
|
-
const
|
|
26
|
-
containerClassName,
|
|
27
|
-
value
|
|
28
|
-
} = this.props;
|
|
23
|
+
const _this$props = this.props,
|
|
24
|
+
containerClassName = _this$props.containerClassName,
|
|
25
|
+
value = _this$props.value;
|
|
29
26
|
let classname = (0, _classnames.default)('dtable-ui cell-formatter-container email-formatter row-expand-jump-link-container', containerClassName);
|
|
30
27
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
31
28
|
className: classname,
|
|
@@ -12,15 +12,14 @@ require("./index.css");
|
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
class RowExpandFileFormatter extends _react.default.PureComponent {
|
|
14
14
|
render() {
|
|
15
|
-
let
|
|
16
|
-
value,
|
|
17
|
-
containerClassName,
|
|
18
|
-
column,
|
|
19
|
-
downloadFile,
|
|
20
|
-
deleteFile,
|
|
21
|
-
readOnly,
|
|
22
|
-
config
|
|
23
|
-
} = this.props;
|
|
15
|
+
let _this$props = this.props,
|
|
16
|
+
value = _this$props.value,
|
|
17
|
+
containerClassName = _this$props.containerClassName,
|
|
18
|
+
column = _this$props.column,
|
|
19
|
+
downloadFile = _this$props.downloadFile,
|
|
20
|
+
deleteFile = _this$props.deleteFile,
|
|
21
|
+
readOnly = _this$props.readOnly,
|
|
22
|
+
config = _this$props.config;
|
|
24
23
|
if (!Array.isArray(value) || value.length === 0) {
|
|
25
24
|
return null;
|
|
26
25
|
}
|