dtable-ui-component 6.0.49 → 6.0.50
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 +94 -68
- package/lib/ActivityIndicator/index.js +36 -28
- package/lib/AsyncUserSelect/index.css +122 -0
- package/lib/AsyncUserSelect/index.js +260 -0
- package/lib/AsyncUserSelect/user-item.js +55 -0
- package/lib/AutoNumberFormatter/index.js +5 -3
- package/lib/Badge/index.js +12 -8
- package/lib/ButtonFormatter/index.js +15 -10
- package/lib/CTimeFormatter/index.js +5 -3
- package/lib/CheckboxEditor/index.js +22 -13
- package/lib/CheckboxEditor/mb-editor.js +7 -5
- package/lib/CheckboxEditor/pc-editor.js +7 -5
- package/lib/CheckboxFormatter/index.js +7 -5
- package/lib/CollaboratorEditor/index.js +24 -15
- package/lib/CollaboratorEditor/mb-editor/index.js +19 -13
- package/lib/CollaboratorEditor/pc-editor/index.js +50 -42
- package/lib/CollaboratorFormatter/index.js +8 -7
- package/lib/CollaboratorItem/index.js +21 -16
- package/lib/CollapsibleSettingLayout/index.js +17 -12
- package/lib/Comment/body/comment.js +78 -62
- package/lib/Comment/body/index.js +14 -11
- package/lib/Comment/footer/btns/index.js +68 -53
- package/lib/Comment/footer/index.js +29 -27
- package/lib/Comment/footer/input/index.js +44 -39
- package/lib/Comment/footer/input/participant/index.js +18 -13
- package/lib/Comment/footer/participants/index.js +31 -28
- package/lib/Comment/footer/participants/participant/index.js +18 -15
- package/lib/Comment/footer/participants/participant-select/index.js +66 -55
- package/lib/Comment/index.js +33 -28
- package/lib/CreatorFormatter/index.js +8 -7
- package/lib/DTableColorPicker/ColorPickerPortal/index.js +5 -3
- package/lib/DTableColorPicker/index.js +135 -99
- package/lib/DTableCommonAddTool/index.js +10 -7
- package/lib/DTableCustomFooter/index.js +5 -3
- package/lib/DTableCustomizeCollaboratorSelect/index.js +38 -32
- package/lib/DTableCustomizeSelect/index.js +51 -44
- package/lib/DTableEmptyTip/index.js +20 -16
- package/lib/DTableFiltersPopover/index.js +71 -61
- package/lib/DTableFiltersPopover/utils/filter-item-utils.js +74 -57
- package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +64 -49
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +49 -41
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +57 -47
- package/lib/DTableFiltersPopover/widgets/filter-calendar.js +35 -31
- package/lib/DTableFiltersPopover/widgets/filter-group.js +38 -32
- package/lib/DTableFiltersPopover/widgets/filter-item.js +125 -106
- package/lib/DTableFiltersPopover/widgets/filter-list/index.js +18 -17
- package/lib/DTableFiltersPopover/widgets/rate-item.js +12 -9
- package/lib/DTableGroupSelect/index.js +52 -44
- package/lib/DTableGroupSelect/option.js +5 -3
- package/lib/DTableGroupSelect/select-option-group.js +31 -25
- package/lib/DTableModalHeader/index.js +13 -9
- package/lib/DTablePopover/index.js +9 -6
- package/lib/DTableRadio/index.js +20 -17
- package/lib/DTableRadioGroup/index.js +21 -18
- package/lib/DTableSearchInput/index.js +22 -18
- package/lib/DTableSelect/dtable-select-label.js +12 -7
- package/lib/DTableSelect/index.js +2 -1
- package/lib/DTableSelect/utils.js +34 -20
- package/lib/DTableSwitch/index.js +25 -17
- package/lib/DateEditor/index.js +25 -16
- package/lib/DateEditor/mb-editor/index.js +90 -68
- package/lib/DateEditor/pc-editor.js +38 -34
- package/lib/DateFormatter/index.js +5 -3
- package/lib/DeleteTip/index.js +29 -20
- package/lib/DepartmentMultipleSelectEditor/index.js +57 -49
- package/lib/DepartmentSelectFilter/index.js +8 -1
- package/lib/DepartmentSingleSelectEditor/index.js +22 -13
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +75 -55
- package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +78 -61
- package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +14 -11
- package/lib/DepartmentSingleSelectFormatter/index.js +13 -9
- package/lib/DigitalSignEditor/index.js +22 -13
- package/lib/DigitalSignEditor/mb-editor/index.js +39 -24
- package/lib/DigitalSignEditor/pc-editor/index.js +44 -30
- package/lib/DigitalSignEditor/signature-board/index.js +19 -15
- package/lib/DigitalSignFormatter/index.js +23 -19
- package/lib/Drawer/index.js +4 -1
- package/lib/DurationEditor/index.js +2 -1
- package/lib/DurationFormatter/index.js +5 -3
- package/lib/EditEditorButton/index.js +5 -3
- package/lib/EmailEditor/index.js +2 -1
- package/lib/EmailFormatter/index.js +5 -3
- package/lib/FieldDisplaySetting/field-item.js +25 -19
- package/lib/FieldDisplaySetting/index.js +47 -38
- package/lib/FileEditor/files-previewer/index.js +22 -13
- package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +43 -28
- package/lib/FileEditor/files-previewer/mb-previewer/index.js +24 -21
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/dropdown-menu.js +30 -24
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/file-name-editor/index.js +13 -11
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +81 -63
- package/lib/FileEditor/files-previewer/pc-previewer/index.js +81 -65
- package/lib/FileEditor/index.js +22 -13
- package/lib/FileEditor/mb-editor/index.js +43 -31
- package/lib/FileEditor/pc-editor/addition-previewer/index.js +27 -20
- package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +107 -81
- package/lib/FileEditor/pc-editor/index.js +46 -36
- package/lib/FileFormatter/index.js +40 -36
- package/lib/FileItemFormatter/index.js +2 -1
- package/lib/FileUploader/index.js +22 -20
- package/lib/FormulaFormatter/index.js +21 -14
- package/lib/GeolocationEditor/index.js +28 -19
- package/lib/GeolocationEditor/mb-editor/country-editor.js +42 -27
- package/lib/GeolocationEditor/mb-editor/index.js +22 -14
- package/lib/GeolocationEditor/mb-editor/location-editor.js +54 -34
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +102 -74
- package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +144 -110
- package/lib/GeolocationEditor/mb-editor/province-city-editor.js +42 -27
- package/lib/GeolocationEditor/mb-editor/province-editor.js +42 -27
- package/lib/GeolocationEditor/pc-editor/country-editor.js +37 -30
- package/lib/GeolocationEditor/pc-editor/index.js +26 -17
- package/lib/GeolocationEditor/pc-editor/location-editor.js +121 -95
- package/lib/GeolocationEditor/pc-editor/map-editor/index.js +99 -74
- package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +99 -76
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +119 -91
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +102 -82
- package/lib/GeolocationEditor/pc-editor/province-city-editor.js +89 -69
- package/lib/GeolocationEditor/pc-editor/province-editor.js +30 -25
- package/lib/GeolocationEditor/pc-editor/selector-header-item.js +9 -5
- package/lib/GeolocationEditor/pc-editor/selector-list.js +15 -13
- package/lib/GeolocationFormatter/index.js +5 -3
- package/lib/HtmlLongTextFormatter/index.js +2 -1
- package/lib/Icon/index.js +8 -5
- package/lib/IconButton/index.js +9 -6
- package/lib/ImageEditor/images-previewer/image-preview/index.js +52 -44
- package/lib/ImageEditor/images-previewer/index.js +35 -32
- package/lib/ImageEditor/index.js +22 -13
- package/lib/ImageEditor/mb-editor/index.js +43 -31
- package/lib/ImageEditor/pc-editor/addition-previewer/image-link/index.js +19 -15
- package/lib/ImageEditor/pc-editor/addition-previewer/index.js +32 -24
- package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +101 -76
- package/lib/ImageEditor/pc-editor/images-previewer/index.js +33 -30
- package/lib/ImageEditor/pc-editor/index.js +44 -32
- package/lib/ImageFormatter/images-lazy-load.js +12 -10
- package/lib/ImageFormatter/index.js +40 -34
- package/lib/ImagePreviewerLightbox/index.js +12 -8
- package/lib/ImageThumbnail/index.js +46 -38
- package/lib/InputItem/custom-input.js +23 -18
- package/lib/InputItem/custom-keyboard.js +65 -44
- package/lib/InputItem/index.js +66 -56
- package/lib/InputItem/input.js +5 -3
- package/lib/LastModifierFormatter/index.js +8 -7
- package/lib/LinkEditor/index.js +38 -32
- package/lib/LinkEditor/link-editor-option.js +25 -20
- package/lib/LinkEditor/mb-popover/index.js +53 -41
- package/lib/LinkEditor/pc-popover/index.js +41 -33
- package/lib/LinkFormatter/index.js +13 -10
- package/lib/List/index.js +15 -9
- package/lib/List/list-item.js +32 -23
- package/lib/Loading/index.js +2 -1
- package/lib/LongTextFormatter/index.js +3 -2
- package/lib/MBEditorHeader/index.js +19 -14
- package/lib/MTimeFormatter/index.js +5 -3
- package/lib/MobileFullScreenPage/body/index.js +5 -3
- package/lib/MobileFullScreenPage/header/index.js +21 -16
- package/lib/MobileFullScreenPage/index.js +11 -8
- package/lib/MobileModal/index.js +6 -3
- package/lib/MobileOperationSheet/index.js +28 -18
- package/lib/MobileSelector/empty/index.js +5 -3
- package/lib/MobileSelector/index.js +18 -12
- package/lib/MobileSelector/option/index.js +17 -12
- package/lib/MobileSelector/options/index.js +5 -3
- package/lib/MobileSelector/search/index.js +10 -8
- package/lib/MobileUpload/index.js +87 -67
- package/lib/Modal/alert.js +8 -5
- package/lib/Modal/modal.js +19 -15
- package/lib/Modal/operation.js +2 -1
- package/lib/Modal/prompt.js +74 -54
- package/lib/MultipleSelectEditor/index.js +4 -2
- package/lib/MultipleSelectFormatter/index.js +8 -7
- package/lib/NotificationPopover/index.js +43 -32
- package/lib/NumberEditor/index.js +2 -1
- package/lib/NumberFormatter/index.js +5 -3
- package/lib/Picker/AbstractPicker.js +26 -22
- package/lib/Picker/index.js +2 -1
- package/lib/Popover/index.js +8 -5
- package/lib/Popover/item.js +22 -15
- package/lib/Progress/index.js +12 -10
- package/lib/Radio/Radio.js +11 -7
- package/lib/Radio/RadioItem.js +9 -3
- package/lib/RateFormatter/index.js +7 -6
- package/lib/RoleStatusEditor/index.js +36 -31
- package/lib/RowExpand/index.js +16 -9
- package/lib/RowExpandDialog/body/index.js +52 -41
- package/lib/RowExpandDialog/column-content/index.js +34 -25
- package/lib/RowExpandDialog/header/index.js +28 -21
- package/lib/RowExpandDialog/index.js +40 -27
- package/lib/RowExpandEditor/add-btn/index.js +16 -9
- package/lib/RowExpandEditor/add-btn/mb-add-btn/index.js +5 -3
- package/lib/RowExpandEditor/add-btn/pc-add-btn/index.js +8 -5
- package/lib/RowExpandEditor/checkbox-editor/index.js +16 -9
- package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +10 -8
- package/lib/RowExpandEditor/checkbox-editor/pc-editor.js +2 -1
- package/lib/RowExpandEditor/collaborator-editor/index.js +16 -9
- package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +19 -17
- package/lib/RowExpandEditor/collaborator-editor/pc-editor/index.js +52 -47
- package/lib/RowExpandEditor/date-editor/index.js +16 -9
- package/lib/RowExpandEditor/date-editor/mb-editor.js +20 -15
- package/lib/RowExpandEditor/date-editor/pc-editor.js +24 -21
- package/lib/RowExpandEditor/department-editor/index.js +16 -9
- package/lib/RowExpandEditor/department-editor/mb-editor.js +27 -22
- package/lib/RowExpandEditor/department-editor/pc-editor.js +35 -29
- package/lib/RowExpandEditor/digital-sign-editor/index.js +16 -9
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +19 -16
- package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +34 -32
- package/lib/RowExpandEditor/duration-editor/index.js +16 -9
- package/lib/RowExpandEditor/duration-editor/mb-editor.js +15 -12
- package/lib/RowExpandEditor/duration-editor/pc-editor.js +17 -13
- package/lib/RowExpandEditor/email-editor/index.js +16 -9
- package/lib/RowExpandEditor/email-editor/mb-editor/index.js +19 -17
- package/lib/RowExpandEditor/email-editor/pc-editor/index.js +20 -18
- package/lib/RowExpandEditor/file-editor/index.js +16 -9
- package/lib/RowExpandEditor/file-editor/mb-editor/index.js +21 -16
- package/lib/RowExpandEditor/file-editor/pc-editor/index.js +22 -20
- package/lib/RowExpandEditor/geolocation-editor/index.js +16 -9
- package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +12 -9
- package/lib/RowExpandEditor/geolocation-editor/pc-editor/index.js +20 -17
- package/lib/RowExpandEditor/image-editor/index.js +16 -9
- package/lib/RowExpandEditor/image-editor/mb-editor/index.js +21 -16
- package/lib/RowExpandEditor/image-editor/pc-editor/index.js +29 -25
- package/lib/RowExpandEditor/index.js +4 -2
- package/lib/RowExpandEditor/long-text-editor/index.js +16 -9
- package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +27 -16
- package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +19 -16
- package/lib/RowExpandEditor/long-text-editor/pc-editor/index.js +22 -18
- package/lib/RowExpandEditor/multiple-select-editor/index.js +16 -9
- package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +26 -23
- package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +81 -67
- package/lib/RowExpandEditor/number-editor/index.js +16 -9
- package/lib/RowExpandEditor/number-editor/mb-editor/index.js +10 -7
- package/lib/RowExpandEditor/number-editor/pc-editor.js +6 -4
- package/lib/RowExpandEditor/rate-editor/index.js +16 -9
- package/lib/RowExpandEditor/rate-editor/mb-editor.js +10 -8
- package/lib/RowExpandEditor/rate-editor/pc-editor.js +11 -9
- package/lib/RowExpandEditor/right-angle/index.js +8 -6
- package/lib/RowExpandEditor/single-select-editor/index.js +16 -9
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +30 -23
- package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +42 -34
- package/lib/RowExpandEditor/text-editor/index.js +16 -9
- package/lib/RowExpandEditor/text-editor/mb-editor/index.js +11 -9
- package/lib/RowExpandEditor/text-editor/pc-editor/index.js +16 -12
- package/lib/RowExpandEditor/url-editor/index.js +16 -9
- package/lib/RowExpandEditor/url-editor/mb-editor/index.js +19 -17
- package/lib/RowExpandEditor/url-editor/pc-editor/index.js +20 -18
- package/lib/RowExpandFormatter/department-formatter/index.js +14 -5
- package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +2 -1
- package/lib/RowExpandFormatter/department-formatter/pc-formatter.js +15 -11
- package/lib/RowExpandFormatter/email-formatter/index.js +11 -8
- package/lib/RowExpandFormatter/file-formatter/index.js +15 -14
- package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +43 -36
- package/lib/RowExpandFormatter/formula-formatter/index.js +37 -29
- package/lib/RowExpandFormatter/image-formatter/index.js +30 -27
- package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +47 -39
- package/lib/RowExpandFormatter/index.js +131 -114
- package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +2 -1
- package/lib/RowExpandFormatter/link-formatter/index.js +70 -67
- package/lib/RowExpandFormatter/rate-formatter/index.js +7 -6
- package/lib/RowExpandFormatter/url-formatter/index.js +11 -8
- package/lib/RowExpandView/body/index.js +38 -32
- package/lib/RowExpandView/column-content/index.js +10 -5
- package/lib/RowExpandView/index.js +27 -16
- package/lib/SelectItem/index.js +16 -12
- package/lib/SelectOptionGroup/index.js +39 -32
- package/lib/SelectOptionGroup/option.js +5 -3
- package/lib/SelectedDepartments/index.js +54 -44
- package/lib/SimpleLongTextFormatter/index.js +39 -30
- package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +11 -8
- package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +3 -2
- package/lib/SingleSelectEditor/index.js +4 -2
- package/lib/SingleSelectFormatter/index.js +6 -4
- package/lib/SvgIcon/index.js +4 -1
- package/lib/TabBar/Tab.js +27 -20
- package/lib/TabBar/index.js +25 -21
- package/lib/Tabs/index.js +8 -5
- package/lib/TextEditor/index.js +21 -18
- package/lib/TextFormatter/index.js +5 -3
- package/lib/TextareaItem/index.js +35 -26
- package/lib/Toast/index.js +16 -10
- package/lib/UploadProgress/index.js +2 -1
- package/lib/UrlEditor/index.js +2 -1
- package/lib/UrlFormatter/index.js +5 -3
- package/lib/formatterConfig/base-formatter-config.js +24 -23
- package/lib/formatterConfig/index.js +3 -2
- package/lib/index.js +7 -0
- package/lib/locales/de.json +5 -1
- package/lib/locales/en.json +5 -1
- package/lib/locales/es.json +6 -2
- package/lib/locales/fr.json +5 -1
- package/lib/locales/pt.json +5 -1
- package/lib/locales/ru.json +5 -1
- package/lib/locales/zh-CN.json +5 -1
- package/lib/select-editor/index.js +22 -13
- package/lib/select-editor/mb-editor/index.js +22 -16
- package/lib/select-editor/pc-editor/index.js +74 -60
- package/lib/toaster/alert.js +25 -16
- package/lib/toaster/toast.js +27 -23
- package/lib/toaster/toastManager.js +16 -13
- package/lib/toaster/toaster.js +2 -1
- package/package.json +2 -2
|
@@ -11,6 +11,7 @@ var _toaster = _interopRequireDefault(require("../../toaster"));
|
|
|
11
11
|
var _editorUtils = require("../../utils/editor-utils");
|
|
12
12
|
var _utils = require("../../utils/utils");
|
|
13
13
|
require("./index.css");
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
15
|
class UrlFormatter extends _react.default.Component {
|
|
15
16
|
constructor() {
|
|
16
17
|
super(...arguments);
|
|
@@ -39,14 +40,16 @@ class UrlFormatter extends _react.default.Component {
|
|
|
39
40
|
value
|
|
40
41
|
} = this.props;
|
|
41
42
|
let classname = (0, _classnames.default)('dtable-ui cell-formatter-container url-formatter', containerClassName);
|
|
42
|
-
return /*#__PURE__*/
|
|
43
|
-
className: classname
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
43
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
44
|
+
className: classname,
|
|
45
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
46
|
+
className: "url-formatter-value text-truncate",
|
|
47
|
+
children: value
|
|
48
|
+
}), (0, _editorUtils.getTrimmedString)(value) && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
49
|
+
className: "dtable-font dtable-icon-url row-expand-jump-link",
|
|
50
|
+
onClick: this.onOpenUrlLink
|
|
51
|
+
})]
|
|
52
|
+
});
|
|
50
53
|
}
|
|
51
54
|
}
|
|
52
55
|
var _default = exports.default = UrlFormatter;
|
|
@@ -13,6 +13,7 @@ var _RowExpandEditor = _interopRequireDefault(require("../../RowExpandEditor"));
|
|
|
13
13
|
var _RowExpandFormatter = _interopRequireDefault(require("../../RowExpandFormatter"));
|
|
14
14
|
var _utils = require("../../utils/utils");
|
|
15
15
|
require("./index.css");
|
|
16
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
17
|
class Body extends _react.default.Component {
|
|
17
18
|
constructor() {
|
|
18
19
|
super(...arguments);
|
|
@@ -55,20 +56,22 @@ class Body extends _react.default.Component {
|
|
|
55
56
|
formatter
|
|
56
57
|
} = component || {};
|
|
57
58
|
if (editable) {
|
|
58
|
-
return /*#__PURE__*/
|
|
59
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_RowExpandEditor.default, {
|
|
60
|
+
...props,
|
|
59
61
|
column: column,
|
|
60
62
|
row: row,
|
|
61
63
|
component: editor,
|
|
62
64
|
onCommit: value => onChange(column, value)
|
|
63
|
-
})
|
|
65
|
+
});
|
|
64
66
|
}
|
|
65
|
-
return /*#__PURE__*/
|
|
67
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_RowExpandFormatter.default, {
|
|
68
|
+
...props,
|
|
66
69
|
className: (0, _classnames.default)('dtable-ui-mobile-row-expand-formatter', "mobile-dtable-row-expand-".concat(column.type, "-formatter"), className),
|
|
67
70
|
column: column,
|
|
68
71
|
row: row,
|
|
69
72
|
component: formatter,
|
|
70
73
|
downloadImage: getDownLoadFiles ? this.downloadImage : null
|
|
71
|
-
})
|
|
74
|
+
});
|
|
72
75
|
};
|
|
73
76
|
}
|
|
74
77
|
render() {
|
|
@@ -77,35 +80,38 @@ class Body extends _react.default.Component {
|
|
|
77
80
|
row,
|
|
78
81
|
placeholder
|
|
79
82
|
} = this.props;
|
|
80
|
-
return /*#__PURE__*/
|
|
81
|
-
className: "dtable-ui-row-expand-body dtable-ui-mobile-row-expand-body"
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
let
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
83
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
84
|
+
className: "dtable-ui-row-expand-body dtable-ui-mobile-row-expand-body",
|
|
85
|
+
children: [columns.length === 0 && placeholder && /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
86
|
+
children: placeholder
|
|
87
|
+
}), columns.map(column => {
|
|
88
|
+
const {
|
|
89
|
+
type,
|
|
90
|
+
data
|
|
91
|
+
} = column;
|
|
92
|
+
let isHasMore = false;
|
|
93
|
+
if (type === _dtableUtils.CellType.LINK_FORMULA) {
|
|
94
|
+
let {
|
|
95
|
+
array_type
|
|
96
|
+
} = data || {};
|
|
97
|
+
const value = this.getCellValue({
|
|
98
|
+
row,
|
|
99
|
+
column
|
|
100
|
+
});
|
|
101
|
+
const cellValue = (0, _utils.getFormulaArrayValue)(value, !(0, _utils.isArrayFormatColumn)(array_type));
|
|
102
|
+
if (cellValue.length >= 10) {
|
|
103
|
+
isHasMore = true;
|
|
104
|
+
}
|
|
99
105
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
108
|
-
})
|
|
106
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_columnContent.default, {
|
|
107
|
+
column: column,
|
|
108
|
+
className: (0, _classnames.default)('', {
|
|
109
|
+
'is-has-more': isHasMore
|
|
110
|
+
}),
|
|
111
|
+
children: this.renderColumnValue(row, column)
|
|
112
|
+
}, column.key);
|
|
113
|
+
})]
|
|
114
|
+
});
|
|
109
115
|
}
|
|
110
116
|
}
|
|
111
117
|
var _default = exports.default = Body;
|
|
@@ -8,6 +8,7 @@ exports.default = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _reactstrap = require("reactstrap");
|
|
10
10
|
require("./index.css");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
12
|
const ColumnContent = _ref => {
|
|
12
13
|
let {
|
|
13
14
|
column,
|
|
@@ -16,10 +17,14 @@ const ColumnContent = _ref => {
|
|
|
16
17
|
const {
|
|
17
18
|
name
|
|
18
19
|
} = column;
|
|
19
|
-
return /*#__PURE__*/
|
|
20
|
-
className: "dtable-ui-mobile-row-expand-item"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
21
|
+
className: "dtable-ui-mobile-row-expand-item",
|
|
22
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
23
|
+
className: "dtable-ui-mobile-row-expand-item-title",
|
|
24
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.Label, {
|
|
25
|
+
children: name
|
|
26
|
+
})
|
|
27
|
+
}), children]
|
|
28
|
+
});
|
|
24
29
|
};
|
|
25
30
|
var _default = exports.default = ColumnContent;
|
|
@@ -16,6 +16,7 @@ var _lang = require("../lang");
|
|
|
16
16
|
var _cellComparer = require("../utils/cell-comparer");
|
|
17
17
|
var _MobileFullScreenPage = _interopRequireDefault(require("../MobileFullScreenPage"));
|
|
18
18
|
require("./index.css");
|
|
19
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
20
|
const {
|
|
20
21
|
Header,
|
|
21
22
|
Body: MobileFullScreenPageBody
|
|
@@ -155,24 +156,34 @@ const RowExpandView = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
155
156
|
});
|
|
156
157
|
}
|
|
157
158
|
}), [row, columns]);
|
|
158
|
-
return /*#__PURE__*/
|
|
159
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_MobileFullScreenPage.default, {
|
|
159
160
|
className: (0, _classnames.default)('dtable-ui-mobile-row-expand-full-screen-page', className),
|
|
160
161
|
zIndex: zIndex || 100,
|
|
161
|
-
historyCallback: historyCallback
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
162
|
+
historyCallback: historyCallback,
|
|
163
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(Header, {
|
|
164
|
+
onLeftClick: toggle,
|
|
165
|
+
onRightClick: (!saveImmediately || isInsertingRow) && !(isSaving || !isChangedRef.current) ? onSubmit : null,
|
|
166
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
167
|
+
className: "dtable-font dtable-icon-return"
|
|
168
|
+
}), title, /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
169
|
+
children: (!saveImmediately || isInsertingRow) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
170
|
+
children: (0, _lang.getLocale)('Submit')
|
|
171
|
+
})
|
|
172
|
+
})]
|
|
173
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(MobileFullScreenPageBody, {
|
|
174
|
+
children: isLoading ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
175
|
+
className: "w-100 -h-100 d-flex align-items-center justify-content-center",
|
|
176
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Loading.default, {})
|
|
177
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_body.default, {
|
|
178
|
+
...otherProps,
|
|
179
|
+
row: row,
|
|
180
|
+
columns: columns,
|
|
181
|
+
valueKey: valueKey,
|
|
182
|
+
onChange: onChange,
|
|
183
|
+
uploadFile: uploadFile
|
|
184
|
+
})
|
|
185
|
+
})]
|
|
186
|
+
});
|
|
176
187
|
});
|
|
177
188
|
RowExpandView.Body = _body.default;
|
|
178
189
|
var _default = exports.default = RowExpandView;
|
package/lib/SelectItem/index.js
CHANGED
|
@@ -9,6 +9,7 @@ exports.default = void 0;
|
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
11
|
require("./index.css");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
const SelectItem = _ref => {
|
|
13
14
|
let {
|
|
14
15
|
option,
|
|
@@ -30,18 +31,21 @@ const SelectItem = _ref => {
|
|
|
30
31
|
color: textColor === '#FFFFFF' ? '#FFFFFF' : '#909090'
|
|
31
32
|
};
|
|
32
33
|
}, [option]);
|
|
33
|
-
return /*#__PURE__*/
|
|
34
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
34
35
|
className: (0, _classnames.default)('dtable-ui dtable-ui-select-item', className),
|
|
35
|
-
style: selectItemStyle
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
36
|
+
style: selectItemStyle,
|
|
37
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
38
|
+
className: "dtable-ui-select-item-name text-truncate",
|
|
39
|
+
title: option.name,
|
|
40
|
+
children: option.name
|
|
41
|
+
}), isShowRemove && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
42
|
+
className: "dtable-ui-select-item-remove-btn",
|
|
43
|
+
style: removeBtnStyle,
|
|
44
|
+
onClick: onRemove,
|
|
45
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
46
|
+
className: "dtable-font dtable-icon-fork-number"
|
|
47
|
+
})
|
|
48
|
+
})]
|
|
49
|
+
});
|
|
46
50
|
};
|
|
47
51
|
var _default = exports.default = SelectItem;
|
|
@@ -13,6 +13,7 @@ var _DTableSearchInput = _interopRequireDefault(require("../DTableSearchInput"))
|
|
|
13
13
|
var _KeyCodes = _interopRequireDefault(require("./KeyCodes"));
|
|
14
14
|
var _ClickOutside = _interopRequireDefault(require("../ClickOutside"));
|
|
15
15
|
require("./index.css");
|
|
16
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
17
|
const OPTION_HEIGHT = 32;
|
|
17
18
|
class SelectOptionGroup extends _react.Component {
|
|
18
19
|
constructor(props) {
|
|
@@ -130,23 +131,24 @@ class SelectOptionGroup extends _react.Component {
|
|
|
130
131
|
} = this.props;
|
|
131
132
|
this.filterOptions = this.props.getFilterOptions(searchVal);
|
|
132
133
|
if (this.filterOptions.length === 0) {
|
|
133
|
-
return /*#__PURE__*/
|
|
134
|
-
className: "none-search-result"
|
|
135
|
-
|
|
134
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
135
|
+
className: "none-search-result",
|
|
136
|
+
children: noOptionsPlaceholder
|
|
137
|
+
});
|
|
136
138
|
}
|
|
137
139
|
return this.filterOptions.map((opt, i) => {
|
|
138
140
|
let key = opt.value.column ? opt.value.column.key : i;
|
|
139
141
|
let isActive = this.state.activeIndex === i;
|
|
140
|
-
return /*#__PURE__*/
|
|
141
|
-
key: "".concat(key, "-").concat(i),
|
|
142
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_option.default, {
|
|
142
143
|
index: i,
|
|
143
144
|
isActive: isActive,
|
|
144
145
|
value: opt.value,
|
|
145
146
|
onSelectOption: onSelectOption,
|
|
146
147
|
changeIndex: this.changeIndex,
|
|
147
148
|
supportMultipleSelect: this.props.supportMultipleSelect,
|
|
148
|
-
disableHover: this.state.disableHover
|
|
149
|
-
|
|
149
|
+
disableHover: this.state.disableHover,
|
|
150
|
+
children: opt.label
|
|
151
|
+
}, "".concat(key, "-").concat(i));
|
|
150
152
|
});
|
|
151
153
|
};
|
|
152
154
|
this.state = {
|
|
@@ -210,31 +212,36 @@ class SelectOptionGroup extends _react.Component {
|
|
|
210
212
|
opacity: 0
|
|
211
213
|
};
|
|
212
214
|
}
|
|
213
|
-
return /*#__PURE__*/
|
|
214
|
-
onClickOutside: this.props.onClickOutside
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
215
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ClickOutside.default, {
|
|
216
|
+
onClickOutside: this.props.onClickOutside,
|
|
217
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
218
|
+
className: (0, _classnames.default)('option-group', className ? 'option-group-' + className : '', {
|
|
219
|
+
'pt-0': isShowSelected,
|
|
220
|
+
'create-new-option-group': addOptionAble
|
|
221
|
+
}),
|
|
222
|
+
ref: ref => this.optionGroupRef = ref,
|
|
223
|
+
style: style,
|
|
224
|
+
onMouseDown: this.onMouseDown,
|
|
225
|
+
children: [isShowSelected && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
226
|
+
className: "editor-list-delete mb-2",
|
|
227
|
+
onClick: e => e.stopPropagation(),
|
|
228
|
+
children: value.label || ''
|
|
229
|
+
}), searchable && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
230
|
+
className: "option-group-search",
|
|
231
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableSearchInput.default, {
|
|
232
|
+
className: "option-search-control",
|
|
233
|
+
placeholder: searchPlaceholder,
|
|
234
|
+
onChange: this.onChangeSearch,
|
|
235
|
+
autoFocus: true,
|
|
236
|
+
ref: this.searchInputRef
|
|
237
|
+
})
|
|
238
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
239
|
+
className: "option-group-content",
|
|
240
|
+
ref: ref => this.optionGroupContentRef = ref,
|
|
241
|
+
children: this.renderOptGroup(searchVal)
|
|
242
|
+
}), addOptionAble && AddOption]
|
|
243
|
+
})
|
|
244
|
+
});
|
|
238
245
|
}
|
|
239
246
|
}
|
|
240
247
|
var _default = exports.default = SelectOptionGroup;
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
10
|
class Option extends _react.Component {
|
|
10
11
|
constructor() {
|
|
11
12
|
super(...arguments);
|
|
@@ -27,12 +28,13 @@ class Option extends _react.Component {
|
|
|
27
28
|
};
|
|
28
29
|
}
|
|
29
30
|
render() {
|
|
30
|
-
return /*#__PURE__*/
|
|
31
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
31
32
|
className: this.props.isActive ? 'option option-active' : 'option',
|
|
32
33
|
onClick: this.onSelectOption.bind(this, this.props.value),
|
|
33
34
|
onMouseEnter: this.onMouseEnter,
|
|
34
|
-
onMouseLeave: this.onMouseLeave
|
|
35
|
-
|
|
35
|
+
onMouseLeave: this.onMouseLeave,
|
|
36
|
+
children: this.props.children
|
|
37
|
+
});
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
40
|
var _default = exports.default = Option;
|
|
@@ -10,6 +10,7 @@ var _dtableUtils = require("dtable-utils");
|
|
|
10
10
|
var _departments = require("../constants/departments");
|
|
11
11
|
var _lang = require("../lang");
|
|
12
12
|
require("./index.css");
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
14
|
function SelectedDepartments(_ref) {
|
|
14
15
|
let {
|
|
15
16
|
value,
|
|
@@ -27,57 +28,66 @@ function SelectedDepartments(_ref) {
|
|
|
27
28
|
const dom = Array.isArray(value) ? value.map((content, index) => {
|
|
28
29
|
if ([_dtableUtils.DEPARTMENT_SELECT_RANGE_MAP.CURRENT_USER_DEPARTMENT, _dtableUtils.DEPARTMENT_SELECT_RANGE_MAP.CURRENT_USER_DEPARTMENT_AND_SUB].includes(content)) {
|
|
29
30
|
const name = (0, _lang.getLocale)(_departments.DEPARTMENT_SELECT_RANGE_OPTIONS.find(option => option.type === content).name);
|
|
30
|
-
return /*#__PURE__*/
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
32
|
+
className: "department mr-1",
|
|
33
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
34
|
+
className: "department-name text-truncate",
|
|
35
|
+
title: name,
|
|
36
|
+
"aria-label": name,
|
|
37
|
+
children: name
|
|
38
|
+
})
|
|
39
|
+
}, "department-".concat(index));
|
|
38
40
|
}
|
|
39
41
|
const department = idDepartmentMap[content];
|
|
40
42
|
if (department) {
|
|
41
43
|
const {
|
|
42
44
|
name
|
|
43
45
|
} = department;
|
|
44
|
-
return /*#__PURE__*/
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
46
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
47
|
+
className: "department mr-1",
|
|
48
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
49
|
+
className: "department-avatar-container d-flex align-items-center justify-content-center",
|
|
50
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
51
|
+
className: "dtable-font dtable-icon-department-single-selection"
|
|
52
|
+
})
|
|
53
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
54
|
+
className: "department-name text-truncate",
|
|
55
|
+
title: name,
|
|
56
|
+
"aria-label": name,
|
|
57
|
+
children: name
|
|
58
|
+
}), isShowRemoveIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
59
|
+
className: "remove-container",
|
|
60
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
61
|
+
className: "remove-icon",
|
|
62
|
+
onClick: event => removeDepartment(event, content),
|
|
63
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
64
|
+
className: "dtable-font dtable-icon-fork-number department-remove-icon"
|
|
65
|
+
})
|
|
66
|
+
})
|
|
67
|
+
})]
|
|
68
|
+
}, "department-".concat(index));
|
|
63
69
|
}
|
|
64
|
-
return /*#__PURE__*/
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
70
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
71
|
+
className: "department empty-department mr-1",
|
|
72
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
73
|
+
className: "department-avatar-container d-flex align-items-center justify-content-center",
|
|
74
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
75
|
+
className: "dtable-font dtable-icon-department-single-selection"
|
|
76
|
+
})
|
|
77
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
78
|
+
className: "department-name",
|
|
79
|
+
children: (0, _lang.getLocale)('Deleted_department')
|
|
80
|
+
}), isShowRemoveIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
81
|
+
className: "remove-container",
|
|
82
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
83
|
+
className: "remove-icon",
|
|
84
|
+
onClick: event => removeDepartment(event, content),
|
|
85
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
86
|
+
className: "dtable-font dtable-icon-fork-number department-remove-icon"
|
|
87
|
+
})
|
|
88
|
+
})
|
|
89
|
+
})]
|
|
90
|
+
}, "department-".concat(index));
|
|
81
91
|
}) : null;
|
|
82
92
|
return dom;
|
|
83
93
|
}
|
|
@@ -11,43 +11,49 @@ var _seafileEditor = require("@seafile/seafile-editor");
|
|
|
11
11
|
var _LongTextPreview = _interopRequireDefault(require("./widgets/LongTextPreview"));
|
|
12
12
|
var _ModalPortal = _interopRequireDefault(require("../ModalPortal"));
|
|
13
13
|
require("./index.css");
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
15
|
class SimpleLongTextFormatter extends _react.default.Component {
|
|
15
16
|
constructor(props) {
|
|
16
17
|
super(props);
|
|
17
18
|
this.renderLinks = value => {
|
|
18
19
|
const links = value.links;
|
|
19
20
|
if (!Array.isArray(links) || links.length === 0) return null;
|
|
20
|
-
return /*#__PURE__*/
|
|
21
|
-
className: "long-text-links"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
22
|
+
className: "long-text-links",
|
|
23
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
24
|
+
className: "dtable-font dtable-icon-url"
|
|
25
|
+
}), links.length]
|
|
26
|
+
});
|
|
25
27
|
};
|
|
26
28
|
this.renderCheckList = value => {
|
|
27
29
|
const checkList = value.checklist;
|
|
28
30
|
if (!checkList || checkList.total === 0) return null;
|
|
29
|
-
return /*#__PURE__*/
|
|
30
|
-
className: "long-text-check-list"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
32
|
+
className: "long-text-check-list",
|
|
33
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
34
|
+
className: "dtable-font dtable-icon-check-square-solid ".concat(checkList.completed === checkList.total ? 'long-text-check-list-completed' : '')
|
|
35
|
+
}), "".concat(checkList.completed, "/").concat(checkList.total)]
|
|
36
|
+
});
|
|
34
37
|
};
|
|
35
38
|
this.renderImages = value => {
|
|
36
39
|
const images = value.images;
|
|
37
40
|
if (!Array.isArray(images) || images.length === 0) return null;
|
|
38
|
-
return /*#__PURE__*/
|
|
39
|
-
className: "long-text-images"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
42
|
+
className: "long-text-images",
|
|
43
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
44
|
+
src: images[0],
|
|
45
|
+
alt: ""
|
|
46
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
47
|
+
className: "image-number",
|
|
48
|
+
children: images.length > 1 ? '+' + images.length : null
|
|
49
|
+
})]
|
|
50
|
+
});
|
|
46
51
|
};
|
|
47
52
|
this.renderContent = value => {
|
|
48
|
-
return /*#__PURE__*/
|
|
49
|
-
className: "long-text-content"
|
|
50
|
-
|
|
53
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
54
|
+
className: "long-text-content",
|
|
55
|
+
children: value.preview
|
|
56
|
+
});
|
|
51
57
|
};
|
|
52
58
|
this.translateValue = () => {
|
|
53
59
|
const {
|
|
@@ -145,18 +151,21 @@ class SimpleLongTextFormatter extends _react.default.Component {
|
|
|
145
151
|
} = this.props;
|
|
146
152
|
const className = (0, _classnames.default)('dtable-ui cell-formatter-container long-text-formatter', containerClassName);
|
|
147
153
|
const value = this.translateValue();
|
|
148
|
-
return /*#__PURE__*/
|
|
154
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
149
155
|
className: className,
|
|
150
156
|
onMouseEnter: this.onMouseEnter,
|
|
151
157
|
onMouseLeave: this.onMouseLeave,
|
|
152
|
-
ref: ref => this.ref = ref
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
158
|
+
ref: ref => this.ref = ref,
|
|
159
|
+
children: [this.renderLinks(value), this.renderCheckList(value), this.renderImages(value), this.renderContent(value), isPreview && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ModalPortal.default, {
|
|
160
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_LongTextPreview.default, {
|
|
161
|
+
className: previewClassName,
|
|
162
|
+
value: value,
|
|
163
|
+
formatterStyle: this.formatterStyle,
|
|
164
|
+
onMouseEnter: this.onPreviewMouseEnter,
|
|
165
|
+
onMouseLeave: this.onPreviewMouseLeave
|
|
166
|
+
})
|
|
167
|
+
})]
|
|
168
|
+
});
|
|
160
169
|
}
|
|
161
170
|
}
|
|
162
171
|
SimpleLongTextFormatter.defaultProps = {
|