dtable-ui-component 6.0.126-beta.s1 → 6.0.126
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.css +19 -46
- package/lib/AsyncUserSelect/index.js +58 -41
- 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 +23 -19
- package/lib/DTableColorPicker/index.css +0 -2
- package/lib/DTableColorPicker/index.js +56 -41
- package/lib/DTableColorPicker/utils.js +4 -6
- package/lib/DTableColumnIcon/index.js +6 -7
- package/lib/DTableCommonAddTool/index.css +1 -3
- package/lib/DTableCommonAddTool/index.js +6 -8
- package/lib/DTableCustomFooter/index.css +1 -3
- package/lib/DTableCustomFooter/index.js +1 -3
- package/lib/DTableCustomizeCollaboratorSelect/index.js +17 -20
- package/lib/DTableCustomizeSelect/index.css +43 -67
- package/lib/DTableCustomizeSelect/index.js +29 -40
- 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.css +0 -2
- package/lib/DTableFiltersPopover/index.js +26 -41
- package/lib/DTableFiltersPopover/utils/filter-item-utils.js +3 -5
- package/lib/DTableFiltersPopover/utils/index.js +63 -113
- package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +9 -10
- 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.css +5 -5
- package/lib/DTableFiltersPopover/widgets/filter-list/index.js +136 -161
- package/lib/DTableFiltersPopover/widgets/rate-item.js +15 -20
- package/lib/DTableGroupSelect/index.css +5 -31
- package/lib/DTableGroupSelect/index.js +13 -17
- package/lib/DTableGroupSelect/select-option-group.css +15 -11
- package/lib/DTableGroupSelect/select-option-group.js +31 -43
- package/lib/DTableIcon/index.js +6 -7
- package/lib/DTableIcon/svg-icon.js +5 -7
- package/lib/DTableModalHeader/index.js +1 -3
- package/lib/DTablePopover/index.js +13 -16
- 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.css +4 -4
- package/lib/DTableSelect/dtable-select-label.js +7 -6
- package/lib/DTableSelect/index.js +24 -25
- package/lib/DTableSelect/user-select.css +46 -7
- package/lib/DTableSelect/utils.js +82 -179
- package/lib/DTableSubDropdownMenu/index.js +8 -10
- package/lib/DTableSubDropdownToggle/index.js +12 -12
- package/lib/DTableSwitch/index.css +0 -1
- 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.css +1 -6
- package/lib/NotificationPopover/index.js +6 -7
- 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.css +25 -53
- package/lib/SelectOptionGroup/index.js +36 -84
- 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/index.js +0 -7
- 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 +8 -8
- package/lib/DTableCustomizeSearchInput/index.css +0 -81
- package/lib/DTableCustomizeSearchInput/index.js +0 -141
- package/lib/DTableCustomizeSelect/select-option-group/KeyCodes.js +0 -109
- package/lib/DTableCustomizeSelect/select-option-group/index.css +0 -134
- package/lib/DTableCustomizeSelect/select-option-group/index.js +0 -260
- package/lib/DTableCustomizeSelect/select-option-group/option.js +0 -48
- package/lib/DTableCustomizeSelect/util.js +0 -12
- package/lib/DTableSelect/select-dropdown-indicator/index.css +0 -16
- package/lib/DTableSelect/select-dropdown-indicator/index.js +0 -26
- package/lib/DTableSelect/select-style.js +0 -133
- package/lib/assets/icons/close.svg +0 -1
- package/lib/assets/icons/down.svg +0 -3
|
@@ -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"));
|
|
@@ -20,34 +21,46 @@ var _MobileFullScreenPage = _interopRequireDefault(require("../MobileFullScreenP
|
|
|
20
21
|
require("./index.css");
|
|
21
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
23
|
const _excluded = ["saveImmediately", "readonly", "isInsertingRow", "zIndex", "title", "className", "valueKey", "row", "columns", "commit", "onToggle", "uploadFile", "copyURL", "children", "historyCallback"];
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
Body: MobileFullScreenPageBody
|
|
26
|
-
} = _MobileFullScreenPage.default;
|
|
24
|
+
const Header = _MobileFullScreenPage.default.Header,
|
|
25
|
+
MobileFullScreenPageBody = _MobileFullScreenPage.default.Body;
|
|
27
26
|
const RowExpandView = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
28
|
-
let
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
27
|
+
let _ref$saveImmediately = _ref.saveImmediately,
|
|
28
|
+
saveImmediately = _ref$saveImmediately === void 0 ? true : _ref$saveImmediately,
|
|
29
|
+
_ref$readonly = _ref.readonly,
|
|
30
|
+
readonly = _ref$readonly === void 0 ? false : _ref$readonly,
|
|
31
|
+
_ref$isInsertingRow = _ref.isInsertingRow,
|
|
32
|
+
isInsertingRow = _ref$isInsertingRow === void 0 ? false : _ref$isInsertingRow,
|
|
33
|
+
zIndex = _ref.zIndex,
|
|
34
|
+
title = _ref.title,
|
|
35
|
+
className = _ref.className,
|
|
36
|
+
_ref$valueKey = _ref.valueKey,
|
|
37
|
+
valueKey = _ref$valueKey === void 0 ? 'name' : _ref$valueKey,
|
|
38
|
+
defaultRow = _ref.row,
|
|
39
|
+
defaultColumns = _ref.columns,
|
|
40
|
+
commit = _ref.commit,
|
|
41
|
+
onToggle = _ref.onToggle,
|
|
42
|
+
uploadFile = _ref.uploadFile,
|
|
43
|
+
copyURL = _ref.copyURL,
|
|
44
|
+
_ref$children = _ref.children,
|
|
45
|
+
children = _ref$children === void 0 ? [] : _ref$children,
|
|
46
|
+
historyCallback = _ref.historyCallback,
|
|
46
47
|
otherProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
const _useState = (0, _react.useState)(true),
|
|
49
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
50
|
+
isLoading = _useState2[0],
|
|
51
|
+
setLoading = _useState2[1];
|
|
52
|
+
const _useState3 = (0, _react.useState)(false),
|
|
53
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
54
|
+
isSaving = _useState4[0],
|
|
55
|
+
setSaving = _useState4[1];
|
|
56
|
+
const _useState5 = (0, _react.useState)({}),
|
|
57
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
58
|
+
row = _useState6[0],
|
|
59
|
+
setRow = _useState6[1];
|
|
60
|
+
const _useState7 = (0, _react.useState)([]),
|
|
61
|
+
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
|
62
|
+
columns = _useState8[0],
|
|
63
|
+
setColumns = _useState8[1];
|
|
51
64
|
const isChangedRef = (0, _react.useRef)(false);
|
|
52
65
|
const update = (0, _react.useRef)({});
|
|
53
66
|
const checkEditable = (0, _react.useCallback)(column => {
|
|
@@ -75,10 +88,9 @@ const RowExpandView = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
75
88
|
onToggle();
|
|
76
89
|
}, [isSaving, onToggle]);
|
|
77
90
|
const onSave = (0, _react.useCallback)(function (updated) {
|
|
78
|
-
let {
|
|
79
|
-
successCallback,
|
|
80
|
-
failCallback
|
|
81
|
-
} = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
91
|
+
let _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
92
|
+
successCallback = _ref2.successCallback,
|
|
93
|
+
failCallback = _ref2.failCallback;
|
|
82
94
|
commit(updated, columns, {
|
|
83
95
|
successCallback,
|
|
84
96
|
failCallback
|
package/lib/SelectItem/index.js
CHANGED
|
@@ -11,13 +11,11 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
11
11
|
require("./index.css");
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
const SelectItem = _ref => {
|
|
14
|
-
let
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
onRemove
|
|
20
|
-
} = _ref;
|
|
14
|
+
let option = _ref.option,
|
|
15
|
+
fontSize = _ref.fontSize,
|
|
16
|
+
className = _ref.className,
|
|
17
|
+
isShowRemove = _ref.isShowRemove,
|
|
18
|
+
onRemove = _ref.onRemove;
|
|
21
19
|
const selectItemStyle = (0, _react.useMemo)(() => {
|
|
22
20
|
return {
|
|
23
21
|
fontSize: fontSize || 13,
|
|
@@ -6,34 +6,28 @@
|
|
|
6
6
|
min-height: 60px;
|
|
7
7
|
min-width: 100%;
|
|
8
8
|
max-width: 15rem;
|
|
9
|
-
padding
|
|
10
|
-
box-shadow:
|
|
9
|
+
padding: 0.5rem 0;
|
|
10
|
+
box-shadow: var(--bs-border-secondary-shadow);
|
|
11
11
|
background: #fff;
|
|
12
|
-
border: 1px solid
|
|
13
|
-
border-radius:
|
|
12
|
+
border: 1px solid var(--bs-border-secondary-color);
|
|
13
|
+
border-radius: 4px;
|
|
14
14
|
z-index: 10001;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.option-group .option-group-search {
|
|
18
18
|
width: 100%;
|
|
19
19
|
min-width: 170px;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
.option-group .option-group-content .label-space {
|
|
23
|
-
display: flex;
|
|
24
|
-
justify-content: space-between;
|
|
25
|
-
align-items: center;
|
|
26
|
-
width: 100%;
|
|
20
|
+
padding: 0 10px 6px;
|
|
27
21
|
}
|
|
28
22
|
|
|
29
23
|
.option-group-search .form-control {
|
|
30
|
-
height:
|
|
31
|
-
border-radius: 4px;
|
|
24
|
+
height: 31px;
|
|
32
25
|
}
|
|
33
26
|
|
|
34
27
|
.option-group .none-search-result {
|
|
35
28
|
height: 100px;
|
|
36
29
|
width: 100%;
|
|
30
|
+
padding: 10px;
|
|
37
31
|
color: #666666;
|
|
38
32
|
}
|
|
39
33
|
|
|
@@ -41,18 +35,13 @@
|
|
|
41
35
|
flex: 1;
|
|
42
36
|
max-height: 252px;
|
|
43
37
|
overflow-y: auto;
|
|
44
|
-
padding: 8px;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.option-group .option-group-top {
|
|
48
|
-
padding-top: 8px !important;
|
|
49
38
|
}
|
|
50
39
|
|
|
51
40
|
.option {
|
|
52
41
|
display: block;
|
|
53
42
|
width: 100%;
|
|
54
43
|
line-height: 24px;
|
|
55
|
-
padding: 0.25rem
|
|
44
|
+
padding: 0.25rem 10px;
|
|
56
45
|
clear: both;
|
|
57
46
|
font-weight: 400;
|
|
58
47
|
text-align: inherit;
|
|
@@ -61,38 +50,34 @@
|
|
|
61
50
|
overflow: hidden;
|
|
62
51
|
text-overflow: ellipsis;
|
|
63
52
|
white-space: nowrap;
|
|
64
|
-
border-radius: 4px;
|
|
65
53
|
}
|
|
66
54
|
|
|
67
|
-
.option
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
height: 100%;
|
|
55
|
+
.option.option-active {
|
|
56
|
+
background-color: #20a0ff;
|
|
57
|
+
color: #fff;
|
|
58
|
+
cursor: pointer;
|
|
72
59
|
}
|
|
73
60
|
|
|
74
|
-
.option
|
|
75
|
-
|
|
76
|
-
|
|
61
|
+
.option:hover .header-icon .dtable-font,
|
|
62
|
+
.option:hover .header-icon .multicolor-icon,
|
|
63
|
+
.option.option-active .select-option-name {
|
|
64
|
+
color: #fff;
|
|
77
65
|
}
|
|
78
66
|
|
|
79
|
-
|
|
80
|
-
.option-
|
|
81
|
-
|
|
67
|
+
.option.option-active .header-icon .dtable-font,
|
|
68
|
+
.option.option-active .header-icon .multicolor-icon {
|
|
69
|
+
color: #fff;
|
|
82
70
|
}
|
|
83
71
|
|
|
84
|
-
.option-
|
|
85
|
-
|
|
86
|
-
color:
|
|
72
|
+
.option:not(.option-active):hover .header-icon .dtable-font,
|
|
73
|
+
.option:not(.option-active):hover .header-icon .multicolor-icon {
|
|
74
|
+
color: #aaa;
|
|
87
75
|
}
|
|
88
76
|
|
|
89
|
-
.option.option-
|
|
90
|
-
|
|
91
|
-
color: #212529;
|
|
92
|
-
cursor: pointer;
|
|
77
|
+
.option .select-option-name .single-select-option {
|
|
78
|
+
margin: 0 0 0 12px;
|
|
93
79
|
}
|
|
94
80
|
|
|
95
|
-
|
|
96
81
|
.option .select-option-name .multiple-select-option {
|
|
97
82
|
margin: 0;
|
|
98
83
|
}
|
|
@@ -112,7 +97,7 @@
|
|
|
112
97
|
|
|
113
98
|
.option-group-dtable-ui-multiple-select-selector .multiple-check-icon .dtable-icon-check-mark {
|
|
114
99
|
font-size: 12px;
|
|
115
|
-
color:
|
|
100
|
+
color: #798d99;
|
|
116
101
|
}
|
|
117
102
|
|
|
118
103
|
.option-group-dtable-ui-single-select-selector .option:hover,
|
|
@@ -126,16 +111,3 @@
|
|
|
126
111
|
.option-group-selector-multiple-select .option.option-active .select-option-name {
|
|
127
112
|
color: #212529;
|
|
128
113
|
}
|
|
129
|
-
|
|
130
|
-
.option-group-selector-single-select .option .select-option-name .single-select-option {
|
|
131
|
-
margin: 0;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.option-group-selector-single-select .form-control {
|
|
135
|
-
padding: .375rem .5rem !important;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.pre-fill-dialog .single-select-option,
|
|
139
|
-
.pre-fill-dialog .multiple-select-option {
|
|
140
|
-
padding: 0 !important;
|
|
141
|
-
}
|
|
@@ -20,15 +20,13 @@ class SelectOptionGroup extends _react.Component {
|
|
|
20
20
|
super(props);
|
|
21
21
|
this.resetMenuStyle = () => {
|
|
22
22
|
if (!this.optionGroupRef) return;
|
|
23
|
-
const
|
|
24
|
-
isInModal,
|
|
25
|
-
position
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
width
|
|
31
|
-
} = this.optionGroupRef.getBoundingClientRect();
|
|
23
|
+
const _this$props = this.props,
|
|
24
|
+
isInModal = _this$props.isInModal,
|
|
25
|
+
position = _this$props.position;
|
|
26
|
+
const _this$optionGroupRef$ = this.optionGroupRef.getBoundingClientRect(),
|
|
27
|
+
top = _this$optionGroupRef$.top,
|
|
28
|
+
height = _this$optionGroupRef$.height,
|
|
29
|
+
width = _this$optionGroupRef$.width;
|
|
32
30
|
if (isInModal) {
|
|
33
31
|
if (position.y + position.height + height > window.innerHeight) {
|
|
34
32
|
this.optionGroupRef.style.top = position.y - height + 'px';
|
|
@@ -82,9 +80,7 @@ class SelectOptionGroup extends _react.Component {
|
|
|
82
80
|
}
|
|
83
81
|
};
|
|
84
82
|
this.onMouseDown = e => {
|
|
85
|
-
const
|
|
86
|
-
isInModal
|
|
87
|
-
} = this.props;
|
|
83
|
+
const isInModal = this.props.isInModal;
|
|
88
84
|
// prevent event propagation when click option or search input
|
|
89
85
|
if (isInModal) {
|
|
90
86
|
e.stopPropagation();
|
|
@@ -96,10 +92,9 @@ class SelectOptionGroup extends _react.Component {
|
|
|
96
92
|
}
|
|
97
93
|
};
|
|
98
94
|
this.scrollContent = () => {
|
|
99
|
-
const
|
|
100
|
-
offsetHeight,
|
|
101
|
-
scrollTop
|
|
102
|
-
} = this.optionGroupContentRef;
|
|
95
|
+
const _this$optionGroupCont = this.optionGroupContentRef,
|
|
96
|
+
offsetHeight = _this$optionGroupCont.offsetHeight,
|
|
97
|
+
scrollTop = _this$optionGroupCont.scrollTop;
|
|
103
98
|
this.setState({
|
|
104
99
|
disableHover: true
|
|
105
100
|
});
|
|
@@ -132,18 +127,10 @@ class SelectOptionGroup extends _react.Component {
|
|
|
132
127
|
});
|
|
133
128
|
}
|
|
134
129
|
};
|
|
135
|
-
this.isEqual = (obj1, obj2) => {
|
|
136
|
-
if (obj1 === obj2) return true;
|
|
137
|
-
if (!obj1 || !obj2) return false;
|
|
138
|
-
return JSON.stringify(obj1) === JSON.stringify(obj2);
|
|
139
|
-
};
|
|
140
130
|
this.renderOptGroup = searchVal => {
|
|
141
|
-
let
|
|
142
|
-
noOptionsPlaceholder,
|
|
143
|
-
onSelectOption
|
|
144
|
-
value,
|
|
145
|
-
supportMultipleSelect
|
|
146
|
-
} = this.props;
|
|
131
|
+
let _this$props2 = this.props,
|
|
132
|
+
noOptionsPlaceholder = _this$props2.noOptionsPlaceholder,
|
|
133
|
+
onSelectOption = _this$props2.onSelectOption;
|
|
147
134
|
this.filterOptions = this.props.getFilterOptions(searchVal);
|
|
148
135
|
if (this.filterOptions.length === 0) {
|
|
149
136
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -154,7 +141,6 @@ class SelectOptionGroup extends _react.Component {
|
|
|
154
141
|
return this.filterOptions.map((opt, i) => {
|
|
155
142
|
let key = opt.value.column ? opt.value.column.key : i;
|
|
156
143
|
let isActive = this.state.activeIndex === i;
|
|
157
|
-
let isSelected = value && typeof value === 'object' && !supportMultipleSelect ? this.isEqual(value.value, opt.value) : Array.isArray(value.value) ? value.value.includes(opt.value.column_key) : false;
|
|
158
144
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_option.default, {
|
|
159
145
|
index: i,
|
|
160
146
|
isActive: isActive,
|
|
@@ -163,26 +149,10 @@ class SelectOptionGroup extends _react.Component {
|
|
|
163
149
|
changeIndex: this.changeIndex,
|
|
164
150
|
supportMultipleSelect: this.props.supportMultipleSelect,
|
|
165
151
|
disableHover: this.state.disableHover,
|
|
166
|
-
children:
|
|
167
|
-
className: "label-space",
|
|
168
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
169
|
-
children: [" ", opt.label]
|
|
170
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
171
|
-
className: "label-check-icon",
|
|
172
|
-
children: [" ", isSelected && /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
173
|
-
className: "dtable-font dtable-icon-check"
|
|
174
|
-
})]
|
|
175
|
-
})]
|
|
176
|
-
})
|
|
152
|
+
children: opt.label
|
|
177
153
|
}, "".concat(key, "-").concat(i));
|
|
178
154
|
});
|
|
179
155
|
};
|
|
180
|
-
this.clearValue = () => {
|
|
181
|
-
this.setState({
|
|
182
|
-
searchVal: '',
|
|
183
|
-
activeIndex: -1
|
|
184
|
-
});
|
|
185
|
-
};
|
|
186
156
|
this.state = {
|
|
187
157
|
searchVal: '',
|
|
188
158
|
activeIndex: -1,
|
|
@@ -204,27 +174,22 @@ class SelectOptionGroup extends _react.Component {
|
|
|
204
174
|
window.removeEventListener('keydown', this.onHotKey);
|
|
205
175
|
}
|
|
206
176
|
render() {
|
|
207
|
-
const
|
|
208
|
-
searchable,
|
|
209
|
-
searchPlaceholder,
|
|
210
|
-
top,
|
|
211
|
-
left,
|
|
212
|
-
minWidth,
|
|
213
|
-
value,
|
|
214
|
-
isShowSelected,
|
|
215
|
-
isInModal,
|
|
216
|
-
position,
|
|
217
|
-
className,
|
|
218
|
-
addOptionAble,
|
|
219
|
-
component
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
AddOption
|
|
224
|
-
} = component || {};
|
|
225
|
-
let {
|
|
226
|
-
searchVal
|
|
227
|
-
} = this.state;
|
|
177
|
+
const _this$props3 = this.props,
|
|
178
|
+
searchable = _this$props3.searchable,
|
|
179
|
+
searchPlaceholder = _this$props3.searchPlaceholder,
|
|
180
|
+
top = _this$props3.top,
|
|
181
|
+
left = _this$props3.left,
|
|
182
|
+
minWidth = _this$props3.minWidth,
|
|
183
|
+
value = _this$props3.value,
|
|
184
|
+
isShowSelected = _this$props3.isShowSelected,
|
|
185
|
+
isInModal = _this$props3.isInModal,
|
|
186
|
+
position = _this$props3.position,
|
|
187
|
+
className = _this$props3.className,
|
|
188
|
+
addOptionAble = _this$props3.addOptionAble,
|
|
189
|
+
component = _this$props3.component;
|
|
190
|
+
const _ref = component || {},
|
|
191
|
+
AddOption = _ref.AddOption;
|
|
192
|
+
let searchVal = this.state.searchVal;
|
|
228
193
|
let style = {
|
|
229
194
|
top: top || 0,
|
|
230
195
|
left: left || 0
|
|
@@ -245,6 +210,7 @@ class SelectOptionGroup extends _react.Component {
|
|
|
245
210
|
opacity: 0
|
|
246
211
|
};
|
|
247
212
|
}
|
|
213
|
+
style.top = style.top + 4;
|
|
248
214
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ClickOutside.default, {
|
|
249
215
|
ref: ref => this.clickOutsideRef = ref,
|
|
250
216
|
onClickOutside: this.props.onClickOutside,
|
|
@@ -257,34 +223,20 @@ class SelectOptionGroup extends _react.Component {
|
|
|
257
223
|
style: style,
|
|
258
224
|
onMouseDown: this.onMouseDown,
|
|
259
225
|
children: [isShowSelected && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
260
|
-
className: "editor-list-delete",
|
|
226
|
+
className: "editor-list-delete mb-2",
|
|
261
227
|
onClick: e => e.stopPropagation(),
|
|
262
228
|
children: value.label || ''
|
|
263
|
-
}), searchable &&
|
|
229
|
+
}), searchable && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
264
230
|
className: "option-group-search",
|
|
265
231
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableSearchInput.default, {
|
|
266
232
|
className: "option-search-control",
|
|
267
233
|
placeholder: searchPlaceholder,
|
|
268
234
|
onChange: this.onChangeSearch,
|
|
269
235
|
autoFocus: true,
|
|
270
|
-
ref: this.searchInputRef
|
|
271
|
-
clearValue: this.clearValue,
|
|
272
|
-
isClearable: true,
|
|
273
|
-
components: {
|
|
274
|
-
ClearIndicator: props => {
|
|
275
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
276
|
-
className: (0, _classnames.default)('select-search-text-clear input-icon-addon seatable-icon dtable-font dtable-icon-x'),
|
|
277
|
-
onClick: e => {
|
|
278
|
-
e.stopPropagation();
|
|
279
|
-
e.nativeEvent.stopImmediatePropagation();
|
|
280
|
-
props.clearValue();
|
|
281
|
-
}
|
|
282
|
-
});
|
|
283
|
-
}
|
|
284
|
-
}
|
|
236
|
+
ref: this.searchInputRef
|
|
285
237
|
})
|
|
286
238
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
287
|
-
className: "option-group-content
|
|
239
|
+
className: "option-group-content",
|
|
288
240
|
ref: ref => this.optionGroupContentRef = ref,
|
|
289
241
|
children: this.renderOptGroup(searchVal)
|
|
290
242
|
}), addOptionAble && AddOption]
|
|
@@ -12,12 +12,12 @@ var _lang = require("../lang");
|
|
|
12
12
|
require("./index.css");
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
14
|
function SelectedDepartments(_ref) {
|
|
15
|
-
let
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
isShowRemoveIcon = false,
|
|
19
|
-
departments =
|
|
20
|
-
|
|
15
|
+
let value = _ref.value,
|
|
16
|
+
removeDepartment = _ref.removeDepartment,
|
|
17
|
+
_ref$isShowRemoveIcon = _ref.isShowRemoveIcon,
|
|
18
|
+
isShowRemoveIcon = _ref$isShowRemoveIcon === void 0 ? false : _ref$isShowRemoveIcon,
|
|
19
|
+
_ref$departments = _ref.departments,
|
|
20
|
+
departments = _ref$departments === void 0 ? [] : _ref$departments;
|
|
21
21
|
const idDepartmentMap = (0, _react.useMemo)(() => {
|
|
22
22
|
let idDepartmentMap = {};
|
|
23
23
|
departments.forEach(department => {
|
|
@@ -40,9 +40,7 @@ function SelectedDepartments(_ref) {
|
|
|
40
40
|
}
|
|
41
41
|
const department = idDepartmentMap[content];
|
|
42
42
|
if (department) {
|
|
43
|
-
const
|
|
44
|
-
name
|
|
45
|
-
} = department;
|
|
43
|
+
const name = department.name;
|
|
46
44
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
47
45
|
className: "department mr-1",
|
|
48
46
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -56,20 +56,17 @@ class SimpleLongTextFormatter extends _react.default.Component {
|
|
|
56
56
|
});
|
|
57
57
|
};
|
|
58
58
|
this.translateValue = () => {
|
|
59
|
-
const
|
|
60
|
-
value
|
|
61
|
-
} = this.props;
|
|
59
|
+
const value = this.props.value;
|
|
62
60
|
if (!value) return {};
|
|
63
61
|
const valueType = Object.prototype.toString.call(value);
|
|
64
62
|
if (valueType === '[object String]') {
|
|
65
63
|
const isMarkdown = true;
|
|
66
64
|
const previewTextNeedSlice = false;
|
|
67
|
-
const
|
|
68
|
-
previewText,
|
|
69
|
-
images,
|
|
70
|
-
links,
|
|
71
|
-
checklist
|
|
72
|
-
} = (0, _seafileEditor.getPreviewContent)(value, isMarkdown, previewTextNeedSlice);
|
|
65
|
+
const _getPreviewContent = (0, _seafileEditor.getPreviewContent)(value, isMarkdown, previewTextNeedSlice),
|
|
66
|
+
previewText = _getPreviewContent.previewText,
|
|
67
|
+
images = _getPreviewContent.images,
|
|
68
|
+
links = _getPreviewContent.links,
|
|
69
|
+
checklist = _getPreviewContent.checklist;
|
|
73
70
|
const newValue = Object.assign({}, {
|
|
74
71
|
text: value,
|
|
75
72
|
preview: previewText,
|
|
@@ -142,13 +139,10 @@ class SimpleLongTextFormatter extends _react.default.Component {
|
|
|
142
139
|
this.clearClosePreviewTimer();
|
|
143
140
|
}
|
|
144
141
|
render() {
|
|
145
|
-
const
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
containerClassName,
|
|
150
|
-
previewClassName
|
|
151
|
-
} = this.props;
|
|
142
|
+
const isPreview = this.state.isPreview;
|
|
143
|
+
const _this$props = this.props,
|
|
144
|
+
containerClassName = _this$props.containerClassName,
|
|
145
|
+
previewClassName = _this$props.previewClassName;
|
|
152
146
|
const className = (0, _classnames.default)('dtable-ui cell-formatter-container long-text-formatter', containerClassName);
|
|
153
147
|
const value = this.translateValue();
|
|
154
148
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
@@ -46,10 +46,9 @@ const getPreviewContent = markdownContent => {
|
|
|
46
46
|
}
|
|
47
47
|
const hrefList = markdownContent.match(hrefReg);
|
|
48
48
|
if (hrefList) {
|
|
49
|
-
const
|
|
50
|
-
images,
|
|
51
|
-
links
|
|
52
|
-
} = getLinks(hrefList);
|
|
49
|
+
const _getLinks = getLinks(hrefList),
|
|
50
|
+
images = _getLinks.images,
|
|
51
|
+
links = _getLinks.links;
|
|
53
52
|
return {
|
|
54
53
|
preview,
|
|
55
54
|
images,
|
|
@@ -14,17 +14,12 @@ class LongTextPreview extends _react.default.PureComponent {
|
|
|
14
14
|
constructor(props) {
|
|
15
15
|
super(props);
|
|
16
16
|
this.getStyle = () => {
|
|
17
|
-
let
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
} = formatterStyle;
|
|
24
|
-
const {
|
|
25
|
-
height,
|
|
26
|
-
opacity
|
|
27
|
-
} = this.state;
|
|
17
|
+
let formatterStyle = this.props.formatterStyle;
|
|
18
|
+
let left = formatterStyle.left,
|
|
19
|
+
top = formatterStyle.top;
|
|
20
|
+
const _this$state = this.state,
|
|
21
|
+
height = _this$state.height,
|
|
22
|
+
opacity = _this$state.opacity;
|
|
28
23
|
const width = 520;
|
|
29
24
|
const padding = 6;
|
|
30
25
|
left = left - width > 0 ? left - width - 12 : 0;
|
|
@@ -53,15 +48,12 @@ class LongTextPreview extends _react.default.PureComponent {
|
|
|
53
48
|
setTimeout(() => {
|
|
54
49
|
var _value$images;
|
|
55
50
|
if (!this.ref) return;
|
|
56
|
-
const
|
|
57
|
-
value
|
|
58
|
-
} = this.props;
|
|
51
|
+
const value = this.props.value;
|
|
59
52
|
|
|
60
53
|
// If image is included, sets the preview height to the maximum height
|
|
61
54
|
const hasImage = (value === null || value === void 0 ? void 0 : (_value$images = value.images) === null || _value$images === void 0 ? void 0 : _value$images.length) >= 2 ? true : false;
|
|
62
|
-
let
|
|
63
|
-
height
|
|
64
|
-
} = this.ref.getBoundingClientRect();
|
|
55
|
+
let _this$ref$getBounding = this.ref.getBoundingClientRect(),
|
|
56
|
+
domHeight = _this$ref$getBounding.height;
|
|
65
57
|
domHeight = hasImage ? 450 : domHeight;
|
|
66
58
|
this.setState({
|
|
67
59
|
height: Math.min(domHeight, 450),
|
|
@@ -70,10 +62,9 @@ class LongTextPreview extends _react.default.PureComponent {
|
|
|
70
62
|
}, 10);
|
|
71
63
|
}
|
|
72
64
|
render() {
|
|
73
|
-
const
|
|
74
|
-
className,
|
|
75
|
-
value
|
|
76
|
-
} = this.props;
|
|
65
|
+
const _this$props = this.props,
|
|
66
|
+
className = _this$props.className,
|
|
67
|
+
value = _this$props.value;
|
|
77
68
|
const markdownContent = value ? value.text : '';
|
|
78
69
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
79
70
|
className: (0, _classnames.default)('longtext-modal-dialog longtext-preview', className),
|
|
@@ -51,10 +51,9 @@ class DtableMarkdownViewer extends _react.default.PureComponent {
|
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
-
const
|
|
55
|
-
showTOC,
|
|
56
|
-
markdownContent
|
|
57
|
-
} = this.props;
|
|
54
|
+
const _this$props = this.props,
|
|
55
|
+
showTOC = _this$props.showTOC,
|
|
56
|
+
markdownContent = _this$props.markdownContent;
|
|
58
57
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_seafileEditor.MarkdownViewer, {
|
|
59
58
|
value: markdownContent,
|
|
60
59
|
isShowOutline: showTOC
|
|
@@ -13,9 +13,7 @@ var _selectEditor = _interopRequireDefault(require("../select-editor"));
|
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
14
|
const _excluded = ["value"];
|
|
15
15
|
const SingleSelectEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
16
|
-
let
|
|
17
|
-
value: oldValue
|
|
18
|
-
} = _ref,
|
|
16
|
+
let oldValue = _ref.value,
|
|
19
17
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
20
18
|
const value = oldValue ? [oldValue] : [];
|
|
21
19
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_selectEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
@@ -14,11 +14,11 @@ class SingleSelectFormatter extends _react.default.PureComponent {
|
|
|
14
14
|
constructor() {
|
|
15
15
|
super(...arguments);
|
|
16
16
|
this.getOption = () => {
|
|
17
|
-
let
|
|
18
|
-
value,
|
|
19
|
-
options =
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
let _this$props = this.props,
|
|
18
|
+
value = _this$props.value,
|
|
19
|
+
_this$props$options = _this$props.options,
|
|
20
|
+
options = _this$props$options === void 0 ? [] : _this$props$options,
|
|
21
|
+
fontSize = _this$props.fontSize;
|
|
22
22
|
let option = options.find(item => item.id === value || item.name === value);
|
|
23
23
|
if (option) {
|
|
24
24
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SelectItem.default, {
|
|
@@ -29,10 +29,9 @@ class SingleSelectFormatter extends _react.default.PureComponent {
|
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
render() {
|
|
32
|
-
const
|
|
33
|
-
containerClassName,
|
|
34
|
-
value
|
|
35
|
-
} = this.props;
|
|
32
|
+
const _this$props2 = this.props,
|
|
33
|
+
containerClassName = _this$props2.containerClassName,
|
|
34
|
+
value = _this$props2.value;
|
|
36
35
|
let classname = (0, _classnames.default)('dtable-ui cell-formatter-container single-select-formatter', containerClassName);
|
|
37
36
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
38
37
|
className: classname,
|