dtable-ui-component 7.0.13 → 7.0.15
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 +58 -49
- package/lib/ActivityIndicator/index.js +17 -16
- package/lib/AsyncUserSelect/index.js +20 -46
- package/lib/AsyncUserSelect/user-item.js +6 -5
- package/lib/AutoNumberFormatter/index.js +4 -3
- package/lib/Badge/index.js +27 -29
- package/lib/ButtonFormatter/index.js +8 -6
- package/lib/CTimeFormatter/index.js +4 -3
- package/lib/CheckboxEditor/index.js +16 -13
- package/lib/CheckboxEditor/mb-editor.js +20 -9
- package/lib/CheckboxEditor/pc-editor.js +24 -12
- package/lib/CheckboxFormatter/index.js +5 -4
- package/lib/CollaboratorEditor/index.js +17 -14
- package/lib/CollaboratorEditor/mb-editor/index.js +19 -11
- package/lib/CollaboratorEditor/pc-editor/index.js +35 -26
- package/lib/CollaboratorFormatter/index.js +10 -8
- package/lib/CollaboratorItem/index.js +5 -4
- package/lib/CollapsibleSettingLayout/index.js +8 -10
- package/lib/Comment/body/comment.js +19 -11
- package/lib/Comment/body/index.js +8 -8
- package/lib/Comment/footer/btns/index.js +7 -4
- package/lib/Comment/footer/index.js +21 -10
- package/lib/Comment/footer/input/index.js +55 -34
- package/lib/Comment/footer/input/participant/index.js +6 -5
- package/lib/Comment/footer/participants/index.js +5 -4
- package/lib/Comment/footer/participants/participant/index.js +3 -1
- package/lib/Comment/footer/participants/participant-select/index.js +26 -10
- package/lib/Comment/index.js +57 -39
- package/lib/Comment/utils/utilities.js +22 -16
- package/lib/CreatorFormatter/index.js +8 -6
- package/lib/DTableColorPicker/ColorPickerPortal/index.js +26 -28
- package/lib/DTableColorPicker/index.js +53 -67
- package/lib/DTableColorPicker/utils.js +7 -5
- package/lib/DTableColumnIcon/index.js +7 -6
- package/lib/DTableCommonAddTool/index.js +10 -8
- package/lib/DTableCustomFooter/index.js +3 -1
- package/lib/DTableCustomizeSearchInput/index.js +41 -26
- package/lib/DTableCustomizeSelect/index.js +24 -19
- package/lib/DTableDropdownItem/index.js +28 -24
- package/lib/DTableDropdownMenu/index.js +17 -14
- package/lib/DTableEmptyTip/index.js +5 -4
- package/lib/DTableFiltersPopover/index.js +42 -27
- package/lib/DTableFiltersPopover/utils/filter-item-utils.js +3 -1
- package/lib/DTableFiltersPopover/utils/index.js +114 -64
- package/lib/DTableFiltersPopover/widgets/collaborator-filter/index.js +9 -8
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +13 -16
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +15 -18
- package/lib/DTableFiltersPopover/widgets/filter-calendar.js +14 -8
- package/lib/DTableFiltersPopover/widgets/filter-group.js +57 -36
- package/lib/DTableFiltersPopover/widgets/filter-item.js +165 -106
- package/lib/DTableFiltersPopover/widgets/filter-list/index.js +162 -137
- package/lib/DTableFiltersPopover/widgets/rate-item.js +25 -20
- package/lib/DTableIcon/index.js +11 -10
- package/lib/DTableIcon/svg-icon.js +11 -9
- package/lib/DTableModalHeader/index.js +7 -7
- package/lib/DTablePopover/index.js +16 -12
- package/lib/DTableRadio/index.js +9 -10
- package/lib/DTableRadioGroup/index.js +20 -11
- package/lib/DTableSearchInput/index.js +29 -19
- package/lib/DTableSelect/dtable-select-label.js +6 -7
- package/lib/DTableSelect/index.js +26 -25
- package/lib/DTableSelect/select-dropdown-indicator/index.js +3 -1
- package/lib/DTableSelect/utils.js +83 -47
- package/lib/DTableSubDropdownMenu/index.js +16 -12
- package/lib/DTableSubDropdownToggle/index.js +16 -17
- package/lib/DTableSwitch/index.js +11 -12
- package/lib/DTableToolTip/index.js +12 -11
- package/lib/DateEditor/index.js +28 -30
- package/lib/DateEditor/mb-editor/index.js +31 -18
- package/lib/DateEditor/pc-editor.js +46 -27
- package/lib/DateFormatter/index.js +5 -4
- package/lib/DatePicker/index.js +15 -9
- package/lib/DatePicker/utils.js +7 -5
- package/lib/DeleteTip/index.js +6 -5
- package/lib/DepartmentMultipleSelectEditor/index.js +26 -28
- package/lib/DepartmentSelectFilter/index.js +13 -8
- package/lib/DepartmentSingleSelectEditor/index.js +16 -13
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +49 -50
- package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +64 -42
- package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +19 -13
- package/lib/DepartmentSingleSelectFormatter/index.js +6 -4
- package/lib/DigitalSignEditor/index.js +16 -13
- package/lib/DigitalSignEditor/mb-editor/index.js +24 -16
- package/lib/DigitalSignEditor/pc-editor/index.js +31 -23
- package/lib/DigitalSignEditor/service.js +5 -3
- package/lib/DigitalSignEditor/signature-board/index.js +10 -7
- package/lib/DigitalSignEditor/utils.js +4 -2
- package/lib/DigitalSignFormatter/index.js +15 -12
- package/lib/DigitalSignFormatter/utils.js +6 -5
- package/lib/Drawer/index.js +3 -2
- package/lib/DurationEditor/index.js +31 -21
- package/lib/DurationFormatter/index.js +5 -4
- package/lib/EditEditorButton/index.js +3 -1
- package/lib/EmailFormatter/index.js +4 -3
- package/lib/FieldDisplaySetting/field-item.js +13 -13
- package/lib/FieldDisplaySetting/index.js +20 -20
- package/lib/FileEditor/files-previewer/index.js +16 -13
- package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +20 -12
- package/lib/FileEditor/files-previewer/mb-previewer/index.js +8 -7
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/dropdown-menu.js +4 -3
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/file-name-editor/index.js +6 -5
- package/lib/FileEditor/files-previewer/pc-previewer/file-previewer/index.js +24 -17
- package/lib/FileEditor/files-previewer/pc-previewer/index.js +57 -29
- package/lib/FileEditor/index.js +16 -13
- package/lib/FileEditor/mb-editor/index.js +20 -28
- package/lib/FileEditor/pc-editor/addition-previewer/index.js +4 -2
- package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +31 -17
- package/lib/FileEditor/pc-editor/index.js +30 -22
- package/lib/FileFormatter/index.js +20 -27
- package/lib/FileItemFormatter/index.js +10 -7
- package/lib/FileUploader/index.js +46 -29
- package/lib/FormulaFormatter/index.js +44 -24
- package/lib/GeolocationEditor/index.js +32 -27
- package/lib/GeolocationEditor/map-editor-utils.js +23 -21
- package/lib/GeolocationEditor/mb-editor/country-editor.js +14 -17
- package/lib/GeolocationEditor/mb-editor/index.js +28 -22
- package/lib/GeolocationEditor/mb-editor/location-editor.js +15 -18
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +77 -47
- package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +89 -50
- package/lib/GeolocationEditor/mb-editor/province-city-editor.js +14 -17
- package/lib/GeolocationEditor/mb-editor/province-editor.js +14 -17
- package/lib/GeolocationEditor/pc-editor/country-editor.js +25 -12
- package/lib/GeolocationEditor/pc-editor/index.js +41 -27
- package/lib/GeolocationEditor/pc-editor/location-editor.js +33 -28
- package/lib/GeolocationEditor/pc-editor/map-editor/index.js +67 -43
- package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +69 -42
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +86 -42
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +85 -39
- package/lib/GeolocationEditor/pc-editor/province-city-editor.js +26 -20
- package/lib/GeolocationEditor/pc-editor/province-editor.js +15 -8
- package/lib/GeolocationEditor/pc-editor/selector-header-item.js +6 -5
- package/lib/GeolocationEditor/pc-editor/selector-list.js +8 -7
- package/lib/GeolocationFormatter/index.js +5 -4
- package/lib/HtmlLongTextFormatter/index.js +13 -5
- package/lib/Icon/index.js +13 -15
- package/lib/Icon/load-sprite.js +13 -2
- package/lib/IconButton/index.js +12 -13
- package/lib/ImageEditor/images-previewer/image-preview/index.js +22 -13
- package/lib/ImageEditor/images-previewer/index.js +9 -3
- package/lib/ImageEditor/index.js +16 -13
- package/lib/ImageEditor/mb-editor/index.js +20 -28
- package/lib/ImageEditor/pc-editor/addition-previewer/image-link/index.js +6 -2
- package/lib/ImageEditor/pc-editor/addition-previewer/index.js +5 -3
- package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +26 -12
- package/lib/ImageEditor/pc-editor/images-previewer/index.js +10 -4
- package/lib/ImageEditor/pc-editor/index.js +16 -11
- package/lib/ImageFormatter/images-lazy-load.js +11 -19
- package/lib/ImageFormatter/index.js +14 -12
- package/lib/ImagePreviewerLightbox/index.js +15 -19
- package/lib/ImageThumbnail/index.js +15 -12
- package/lib/InputItem/custom-input.js +55 -35
- package/lib/InputItem/custom-keyboard.js +42 -42
- package/lib/InputItem/index.js +82 -63
- package/lib/InputItem/input.js +9 -11
- package/lib/LastModifierFormatter/index.js +8 -6
- package/lib/LinkEditor/index.js +53 -33
- package/lib/LinkEditor/link-editor-option.js +4 -3
- package/lib/LinkEditor/mb-popover/index.js +22 -9
- package/lib/LinkEditor/pc-popover/index.js +13 -7
- package/lib/LinkFormatter/index.js +37 -21
- package/lib/List/index.js +17 -19
- package/lib/List/list-item.js +59 -55
- package/lib/LongTextFormatter/index.js +5 -4
- package/lib/MBEditorHeader/index.js +9 -8
- package/lib/MTimeFormatter/index.js +4 -3
- package/lib/MobileFullScreenPage/body/index.js +6 -4
- package/lib/MobileFullScreenPage/header/index.js +10 -8
- package/lib/MobileFullScreenPage/index.js +12 -14
- package/lib/MobileModal/index.js +7 -8
- package/lib/MobileOperationSheet/index.js +8 -7
- package/lib/MobileSelector/empty/index.js +3 -1
- package/lib/MobileSelector/index.js +7 -5
- package/lib/MobileSelector/option/index.js +5 -3
- package/lib/MobileSelector/options/index.css +0 -4
- package/lib/MobileSelector/options/index.js +3 -1
- package/lib/MobileSelector/search/index.js +5 -3
- package/lib/MobileUpload/index.js +5 -4
- package/lib/Modal/alert.js +2 -2
- package/lib/Modal/modal.js +28 -30
- package/lib/Modal/prompt.js +14 -14
- package/lib/MultipleSelectEditor/index.js +7 -7
- package/lib/MultipleSelectFormatter/index.js +9 -7
- package/lib/NotificationPopover/index.js +5 -4
- package/lib/NumberEditor/index.js +21 -12
- package/lib/NumberFormatter/index.js +5 -4
- package/lib/PhoneNumberLink/index.js +5 -3
- package/lib/Picker/AbstractPicker.js +35 -33
- package/lib/Popover/index.js +9 -11
- package/lib/Popover/item.js +22 -24
- package/lib/Progress/index.js +18 -17
- package/lib/Radio/Radio.js +17 -15
- package/lib/Radio/RadioItem.js +23 -19
- package/lib/RateFormatter/index.js +15 -15
- package/lib/RoleStatusEditor/index.js +18 -19
- package/lib/RowExpand/index.js +7 -6
- package/lib/RowExpandDialog/body/index.js +57 -40
- package/lib/RowExpandDialog/column-content/index.js +10 -6
- package/lib/RowExpandDialog/header/index.js +12 -9
- package/lib/RowExpandDialog/index.js +59 -63
- package/lib/RowExpandEditor/add-btn/index.js +7 -6
- package/lib/RowExpandEditor/checkbox-editor/index.js +7 -6
- package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +5 -4
- package/lib/RowExpandEditor/checkbox-editor/pc-editor.js +10 -8
- package/lib/RowExpandEditor/collaborator-editor/index.js +7 -6
- package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +33 -22
- package/lib/RowExpandEditor/collaborator-editor/pc-editor/index.js +40 -26
- package/lib/RowExpandEditor/date-editor/index.js +7 -6
- package/lib/RowExpandEditor/date-editor/mb-editor.js +18 -12
- package/lib/RowExpandEditor/date-editor/pc-editor.js +20 -15
- package/lib/RowExpandEditor/department-editor/index.js +7 -6
- package/lib/RowExpandEditor/department-editor/mb-editor.js +11 -16
- package/lib/RowExpandEditor/department-editor/pc-editor.js +14 -19
- package/lib/RowExpandEditor/digital-sign-editor/index.js +7 -6
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +38 -24
- package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +39 -25
- package/lib/RowExpandEditor/duration-editor/index.js +7 -6
- package/lib/RowExpandEditor/duration-editor/mb-editor.js +17 -10
- package/lib/RowExpandEditor/duration-editor/pc-editor.js +19 -13
- package/lib/RowExpandEditor/email-editor/index.js +7 -6
- package/lib/RowExpandEditor/email-editor/mb-editor/index.js +20 -10
- package/lib/RowExpandEditor/email-editor/pc-editor/index.js +25 -14
- package/lib/RowExpandEditor/file-editor/index.js +7 -6
- package/lib/RowExpandEditor/file-editor/mb-editor/index.js +31 -18
- package/lib/RowExpandEditor/file-editor/pc-editor/index.js +23 -16
- package/lib/RowExpandEditor/geolocation-editor/index.js +7 -6
- package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +29 -17
- package/lib/RowExpandEditor/geolocation-editor/pc-editor/index.js +26 -13
- package/lib/RowExpandEditor/image-editor/index.js +7 -6
- package/lib/RowExpandEditor/image-editor/mb-editor/index.js +26 -16
- package/lib/RowExpandEditor/image-editor/pc-editor/index.js +24 -14
- package/lib/RowExpandEditor/index.js +16 -11
- package/lib/RowExpandEditor/long-text-editor/index.js +7 -6
- package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +18 -17
- package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +16 -10
- package/lib/RowExpandEditor/long-text-editor/pc-editor/index.js +23 -16
- package/lib/RowExpandEditor/multiple-select-editor/index.js +7 -6
- package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +20 -12
- package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +38 -27
- package/lib/RowExpandEditor/number-editor/index.js +7 -6
- package/lib/RowExpandEditor/number-editor/mb-editor/index.js +14 -8
- package/lib/RowExpandEditor/number-editor/pc-editor.js +20 -13
- package/lib/RowExpandEditor/rate-editor/index.js +7 -6
- package/lib/RowExpandEditor/rate-editor/mb-editor.js +26 -13
- package/lib/RowExpandEditor/rate-editor/pc-editor.js +41 -25
- package/lib/RowExpandEditor/single-select-editor/index.js +7 -6
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +32 -21
- package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +37 -25
- package/lib/RowExpandEditor/text-editor/index.js +7 -6
- package/lib/RowExpandEditor/text-editor/mb-editor/index.js +5 -4
- package/lib/RowExpandEditor/text-editor/pc-editor/index.js +26 -15
- package/lib/RowExpandEditor/url-editor/index.js +7 -6
- package/lib/RowExpandEditor/url-editor/mb-editor/index.js +15 -7
- package/lib/RowExpandEditor/url-editor/pc-editor/index.js +20 -11
- package/lib/RowExpandFormatter/department-formatter/index.js +6 -3
- package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +4 -2
- package/lib/RowExpandFormatter/department-formatter/pc-formatter.js +4 -2
- package/lib/RowExpandFormatter/email-formatter/index.js +8 -5
- package/lib/RowExpandFormatter/file-formatter/index.js +9 -8
- package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +14 -12
- package/lib/RowExpandFormatter/formula-formatter/index.js +51 -30
- package/lib/RowExpandFormatter/image-formatter/index.js +11 -9
- package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +10 -9
- package/lib/RowExpandFormatter/index.js +52 -34
- package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +15 -9
- package/lib/RowExpandFormatter/link-formatter/index.js +25 -17
- package/lib/RowExpandFormatter/link-formatter/value-display-utils.js +5 -3
- package/lib/RowExpandFormatter/rate-formatter/index.js +14 -13
- package/lib/RowExpandFormatter/text/index.js +5 -4
- package/lib/RowExpandFormatter/url-formatter/index.js +9 -6
- package/lib/RowExpandView/body/index.js +43 -32
- package/lib/RowExpandView/column-content/index.js +7 -3
- package/lib/RowExpandView/index.js +52 -53
- package/lib/SelectItem/index.js +7 -5
- package/lib/SelectOptionGroup/index.js +40 -30
- package/lib/SelectedDepartments/index.js +12 -10
- package/lib/SimpleLongTextFormatter/index.js +18 -12
- package/lib/SimpleLongTextFormatter/normalize-long-text-value.js +4 -3
- package/lib/SimpleLongTextFormatter/widgets/LongTextPreview.js +21 -12
- package/lib/SimpleLongTextFormatter/widgets/dtable-markdown-viewer.js +4 -3
- package/lib/SingleSelectEditor/index.js +7 -7
- package/lib/SingleSelectFormatter/index.js +9 -8
- package/lib/TabBar/Tab.js +26 -24
- package/lib/TabBar/index.js +28 -24
- package/lib/Tabs/index.js +13 -10
- package/lib/TextEditor/index.js +23 -14
- package/lib/TextFormatter/index.js +4 -3
- package/lib/TextareaItem/index.js +53 -48
- package/lib/Toast/index.js +9 -8
- package/lib/UrlFormatter/index.js +4 -3
- package/lib/common/editor-base.js +12 -7
- package/lib/formatterConfig/index.js +3 -3
- package/lib/hooks/common-hooks.js +4 -2
- package/lib/select-editor/index.js +16 -13
- package/lib/select-editor/mb-editor/index.js +28 -17
- package/lib/select-editor/pc-editor/index.js +47 -32
- package/lib/toaster/alert.js +8 -7
- package/lib/toaster/toast.js +4 -3
- package/lib/toaster/toastManager.js +13 -13
- package/lib/toaster/toaster.js +12 -9
- package/lib/utils/cell.js +11 -8
- package/lib/utils/class.js +3 -3
- package/lib/utils/column-utils.js +14 -8
- package/lib/utils/departments.js +6 -5
- package/lib/utils/getLocale.js +11 -5
- package/lib/utils/object-utils.js +5 -4
- package/lib/utils/url.js +29 -22
- package/lib/utils/utils.js +6 -2
- package/package.json +2 -2
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
10
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
10
|
var _reactResponsive = _interopRequireDefault(require("react-responsive"));
|
|
12
11
|
var _pcEditor = _interopRequireDefault(require("./pc-editor"));
|
|
@@ -16,14 +15,16 @@ const RowExpandUrlEditor = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
|
16
15
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
17
16
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
|
|
18
17
|
query: "(min-width: 768px)",
|
|
19
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default,
|
|
18
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, {
|
|
19
|
+
...props,
|
|
20
20
|
ref: ref
|
|
21
|
-
})
|
|
21
|
+
})
|
|
22
22
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
|
|
23
23
|
query: "(max-width: 768px)",
|
|
24
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default,
|
|
24
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbEditor.default, {
|
|
25
|
+
...props,
|
|
25
26
|
ref: ref
|
|
26
|
-
})
|
|
27
|
+
})
|
|
27
28
|
})]
|
|
28
29
|
});
|
|
29
30
|
});
|
|
@@ -15,7 +15,9 @@ class RowExpandMBUrlEditor extends _react.default.Component {
|
|
|
15
15
|
constructor(props) {
|
|
16
16
|
super(props);
|
|
17
17
|
this.onBlur = () => {
|
|
18
|
-
const
|
|
18
|
+
const {
|
|
19
|
+
onCommit
|
|
20
|
+
} = this.props;
|
|
19
21
|
onCommit(this.state.value.trim());
|
|
20
22
|
};
|
|
21
23
|
this.onChange = e => {
|
|
@@ -32,14 +34,16 @@ class RowExpandMBUrlEditor extends _react.default.Component {
|
|
|
32
34
|
e.stopPropagation();
|
|
33
35
|
};
|
|
34
36
|
this.onOpenUrlLink = () => {
|
|
35
|
-
const
|
|
37
|
+
const {
|
|
38
|
+
value
|
|
39
|
+
} = this.state;
|
|
36
40
|
let newValue = value.trim();
|
|
37
41
|
if (!(0, _utils.isValidUrl)(newValue)) {
|
|
38
|
-
newValue =
|
|
42
|
+
newValue = `http://${newValue}`;
|
|
39
43
|
}
|
|
40
44
|
try {
|
|
41
45
|
(0, _utils.openUrlLink)(newValue);
|
|
42
|
-
} catch
|
|
46
|
+
} catch {
|
|
43
47
|
_toaster.default.danger((0, _lang.getLocale)('URL_is_invalid'));
|
|
44
48
|
}
|
|
45
49
|
};
|
|
@@ -48,8 +52,10 @@ class RowExpandMBUrlEditor extends _react.default.Component {
|
|
|
48
52
|
};
|
|
49
53
|
}
|
|
50
54
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
51
|
-
const
|
|
52
|
-
|
|
55
|
+
const {
|
|
56
|
+
column,
|
|
57
|
+
row
|
|
58
|
+
} = nextProps;
|
|
53
59
|
if (row._id !== this.props.row._id) {
|
|
54
60
|
this.setState({
|
|
55
61
|
value: row[column[this.props.valueKey]] || ''
|
|
@@ -57,7 +63,9 @@ class RowExpandMBUrlEditor extends _react.default.Component {
|
|
|
57
63
|
}
|
|
58
64
|
}
|
|
59
65
|
render() {
|
|
60
|
-
const
|
|
66
|
+
const {
|
|
67
|
+
value
|
|
68
|
+
} = this.state;
|
|
61
69
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
62
70
|
className: "dtable-ui-mobile-row-expand-input-editor-container position-relative dtable-ui-mobile-row-expand-url-editor-container",
|
|
63
71
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
@@ -27,7 +27,9 @@ class RowExpandPCUrlEditor extends _react.default.Component {
|
|
|
27
27
|
}, 1);
|
|
28
28
|
};
|
|
29
29
|
this.onBlur = () => {
|
|
30
|
-
const
|
|
30
|
+
const {
|
|
31
|
+
onCommit
|
|
32
|
+
} = this.props;
|
|
31
33
|
onCommit(this.state.value.trim());
|
|
32
34
|
};
|
|
33
35
|
this.onFocus = e => {
|
|
@@ -52,23 +54,26 @@ class RowExpandPCUrlEditor extends _react.default.Component {
|
|
|
52
54
|
this.blurInput();
|
|
53
55
|
return;
|
|
54
56
|
}
|
|
55
|
-
const
|
|
56
|
-
selectionStart
|
|
57
|
-
selectionEnd
|
|
58
|
-
value
|
|
57
|
+
const {
|
|
58
|
+
selectionStart,
|
|
59
|
+
selectionEnd,
|
|
60
|
+
value
|
|
61
|
+
} = event.currentTarget;
|
|
59
62
|
if (event.keyCode === _constants.KeyCodes.ChineseInputMethod || event.keyCode === _constants.KeyCodes.LeftArrow && selectionStart === 0 || event.keyCode === _constants.KeyCodes.RightArrow && selectionEnd === value.length) {
|
|
60
63
|
event.stopPropagation();
|
|
61
64
|
}
|
|
62
65
|
};
|
|
63
66
|
this.onOpenUrlLink = () => {
|
|
64
|
-
const
|
|
67
|
+
const {
|
|
68
|
+
value
|
|
69
|
+
} = this.state;
|
|
65
70
|
let newValue = value.trim();
|
|
66
71
|
if (!(0, _utils.isValidUrl)(newValue)) {
|
|
67
|
-
newValue =
|
|
72
|
+
newValue = `http://${newValue}`;
|
|
68
73
|
}
|
|
69
74
|
try {
|
|
70
75
|
(0, _utils.openUrlLink)(newValue);
|
|
71
|
-
} catch
|
|
76
|
+
} catch {
|
|
72
77
|
_toaster.default.danger((0, _lang.getLocale)('URL_is_invalid'));
|
|
73
78
|
}
|
|
74
79
|
};
|
|
@@ -83,8 +88,10 @@ class RowExpandPCUrlEditor extends _react.default.Component {
|
|
|
83
88
|
}
|
|
84
89
|
}
|
|
85
90
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
86
|
-
const
|
|
87
|
-
|
|
91
|
+
const {
|
|
92
|
+
column,
|
|
93
|
+
row
|
|
94
|
+
} = nextProps;
|
|
88
95
|
if (row._id !== this.props.row._id) {
|
|
89
96
|
this.setState({
|
|
90
97
|
value: row[column[this.props.valueKey]] || ''
|
|
@@ -98,7 +105,9 @@ class RowExpandPCUrlEditor extends _react.default.Component {
|
|
|
98
105
|
}
|
|
99
106
|
}
|
|
100
107
|
render() {
|
|
101
|
-
let
|
|
108
|
+
let {
|
|
109
|
+
value
|
|
110
|
+
} = this.state;
|
|
102
111
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
103
112
|
className: "dtable-ui-row-expand-url-editor",
|
|
104
113
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
9
8
|
var _react = _interopRequireDefault(require("react"));
|
|
10
9
|
var _reactResponsive = _interopRequireDefault(require("react-responsive"));
|
|
11
10
|
var _pcFormatter = _interopRequireDefault(require("./pc-formatter"));
|
|
@@ -15,10 +14,14 @@ const RowExpandDepartmentFormatter = props => {
|
|
|
15
14
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
16
15
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
|
|
17
16
|
query: '(min-width: 768px)',
|
|
18
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcFormatter.default,
|
|
17
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcFormatter.default, {
|
|
18
|
+
...props
|
|
19
|
+
})
|
|
19
20
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactResponsive.default, {
|
|
20
21
|
query: '(max-width: 768px)',
|
|
21
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbFormatter.default,
|
|
22
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mbFormatter.default, {
|
|
23
|
+
...props
|
|
24
|
+
})
|
|
22
25
|
})]
|
|
23
26
|
});
|
|
24
27
|
};
|
|
@@ -9,8 +9,10 @@ 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
|
-
|
|
12
|
+
let {
|
|
13
|
+
value,
|
|
14
|
+
departments
|
|
15
|
+
} = _ref;
|
|
14
16
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DepartmentSingleSelectFormatter.default, {
|
|
15
17
|
value: value,
|
|
16
18
|
departments: departments
|
|
@@ -9,8 +9,10 @@ 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
|
-
|
|
12
|
+
let {
|
|
13
|
+
value,
|
|
14
|
+
departments
|
|
15
|
+
} = _ref;
|
|
14
16
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
15
17
|
className: "position-relative w-100",
|
|
16
18
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -14,15 +14,18 @@ class RowExpandEmailFormatter extends _react.default.Component {
|
|
|
14
14
|
constructor() {
|
|
15
15
|
super(...arguments);
|
|
16
16
|
this.onOpenEmailLink = () => {
|
|
17
|
-
const
|
|
17
|
+
const {
|
|
18
|
+
value
|
|
19
|
+
} = this.props;
|
|
18
20
|
let newValue = value.trim();
|
|
19
|
-
window.location.href =
|
|
21
|
+
window.location.href = `mailto:${newValue}`;
|
|
20
22
|
};
|
|
21
23
|
}
|
|
22
24
|
render() {
|
|
23
|
-
const
|
|
24
|
-
containerClassName
|
|
25
|
-
value
|
|
25
|
+
const {
|
|
26
|
+
containerClassName,
|
|
27
|
+
value
|
|
28
|
+
} = this.props;
|
|
26
29
|
let classname = (0, _classnames.default)('dtable-ui cell-formatter-container email-formatter row-expand-jump-link-container', containerClassName);
|
|
27
30
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
28
31
|
className: classname,
|
|
@@ -12,14 +12,15 @@ 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
|
|
15
|
+
let {
|
|
16
|
+
value,
|
|
17
|
+
containerClassName,
|
|
18
|
+
column,
|
|
19
|
+
downloadFile,
|
|
20
|
+
deleteFile,
|
|
21
|
+
readOnly,
|
|
22
|
+
config
|
|
23
|
+
} = this.props;
|
|
23
24
|
if (!Array.isArray(value) || value.length === 0) {
|
|
24
25
|
return null;
|
|
25
26
|
}
|
|
@@ -40,24 +40,26 @@ class RowExpandFileItemFormatter extends _react.Component {
|
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
render() {
|
|
43
|
-
const
|
|
44
|
-
file
|
|
45
|
-
column
|
|
46
|
-
index
|
|
47
|
-
readOnly
|
|
48
|
-
downloadFile
|
|
49
|
-
deleteFile
|
|
50
|
-
config
|
|
43
|
+
const {
|
|
44
|
+
file,
|
|
45
|
+
column,
|
|
46
|
+
index,
|
|
47
|
+
readOnly,
|
|
48
|
+
downloadFile,
|
|
49
|
+
deleteFile,
|
|
50
|
+
config
|
|
51
|
+
} = this.props;
|
|
51
52
|
const id = 'file-list-preview-item' + column.key + index;
|
|
52
|
-
const
|
|
53
|
-
fileIconUrl
|
|
53
|
+
const {
|
|
54
|
+
fileIconUrl
|
|
55
|
+
} = (0, _url.getFileThumbnailInfo)(file, config);
|
|
54
56
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
55
57
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
56
58
|
className: "row-expand-item-file",
|
|
57
59
|
id: id,
|
|
58
60
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
59
61
|
src: fileIconUrl,
|
|
60
|
-
id:
|
|
62
|
+
id: `item-file-${index}`,
|
|
61
63
|
alt: file.name
|
|
62
64
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
63
65
|
className: "dtable-ui-file-icons-choice",
|
|
@@ -75,7 +77,7 @@ class RowExpandFileItemFormatter extends _react.Component {
|
|
|
75
77
|
})
|
|
76
78
|
})]
|
|
77
79
|
})]
|
|
78
|
-
},
|
|
80
|
+
}, `file-${index}`), this.state.isDeleteTipOpen && /*#__PURE__*/(0, _jsxRuntime.jsx)(_DeleteTip.default, {
|
|
79
81
|
position: this.position,
|
|
80
82
|
toggle: this.closeDeleteTip,
|
|
81
83
|
handleDelete: this.onDelete,
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
9
8
|
var _react = _interopRequireDefault(require("react"));
|
|
10
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
10
|
var _dtableUtils = require("dtable-utils");
|
|
@@ -38,20 +37,24 @@ class RowExpandFormulaFormatter extends _react.default.Component {
|
|
|
38
37
|
};
|
|
39
38
|
this.onOpenUrlLink = url => {
|
|
40
39
|
if (!(0, _utils2.isValidUrl)(url)) {
|
|
41
|
-
url =
|
|
40
|
+
url = `http://${url}`;
|
|
42
41
|
}
|
|
43
42
|
try {
|
|
44
43
|
(0, _utils2.openUrlLink)(url);
|
|
45
|
-
} catch
|
|
44
|
+
} catch {
|
|
46
45
|
_toaster.default.danger((0, _lang.getLocale)('URL_is_invalid'));
|
|
47
46
|
}
|
|
48
47
|
};
|
|
49
48
|
this.onOpenEmailLink = email => {
|
|
50
|
-
window.location.href =
|
|
49
|
+
window.location.href = `mailto:${email.trim()}`;
|
|
51
50
|
};
|
|
52
51
|
this.renderBorder = dom => {
|
|
53
|
-
const
|
|
54
|
-
|
|
52
|
+
const {
|
|
53
|
+
column
|
|
54
|
+
} = this.props;
|
|
55
|
+
const {
|
|
56
|
+
result_type
|
|
57
|
+
} = column.data;
|
|
55
58
|
let style = {
|
|
56
59
|
minHeight: '38px'
|
|
57
60
|
};
|
|
@@ -67,9 +70,11 @@ class RowExpandFormulaFormatter extends _react.default.Component {
|
|
|
67
70
|
});
|
|
68
71
|
};
|
|
69
72
|
this.renderCellValue = (cellValue, resultType) => {
|
|
70
|
-
const
|
|
73
|
+
const {
|
|
74
|
+
containerClassName
|
|
75
|
+
} = this.props;
|
|
71
76
|
const customClassName = this.getGridCellClassName(resultType);
|
|
72
|
-
const className =
|
|
77
|
+
const className = `dtable-ui cell-formatter-container formula-formatter ${containerClassName} ${customClassName}`;
|
|
73
78
|
return this.renderBorder(/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
74
79
|
className: className,
|
|
75
80
|
title: cellValue,
|
|
@@ -81,14 +86,16 @@ class RowExpandFormulaFormatter extends _react.default.Component {
|
|
|
81
86
|
return this.renderCellValue(errorValue, resultType);
|
|
82
87
|
};
|
|
83
88
|
this.renderOtherColumnFormatter = () => {
|
|
84
|
-
const
|
|
85
|
-
value
|
|
86
|
-
column
|
|
87
|
-
collaborators
|
|
88
|
-
departments
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
const {
|
|
90
|
+
value,
|
|
91
|
+
column,
|
|
92
|
+
collaborators,
|
|
93
|
+
departments
|
|
94
|
+
} = this.props;
|
|
95
|
+
const {
|
|
96
|
+
array_type,
|
|
97
|
+
array_data
|
|
98
|
+
} = column.data;
|
|
92
99
|
if (!array_type || array_type === _dtableUtils.CellType.LINK) {
|
|
93
100
|
return null;
|
|
94
101
|
}
|
|
@@ -140,7 +147,7 @@ class RowExpandFormulaFormatter extends _react.default.Component {
|
|
|
140
147
|
phoneNumber: formulaPhoneNumber,
|
|
141
148
|
className: "row-expand-jump-link-btn"
|
|
142
149
|
}), this.createColumnFormatter(Formatter, formatterProps)]
|
|
143
|
-
},
|
|
150
|
+
}, `formula-formatter-content-item-${index}`);
|
|
144
151
|
})
|
|
145
152
|
}));
|
|
146
153
|
};
|
|
@@ -148,7 +155,9 @@ class RowExpandFormulaFormatter extends _react.default.Component {
|
|
|
148
155
|
switch (array_type) {
|
|
149
156
|
case _dtableUtils.CellType.DURATION:
|
|
150
157
|
{
|
|
151
|
-
const
|
|
158
|
+
const {
|
|
159
|
+
duration_format
|
|
160
|
+
} = array_data;
|
|
152
161
|
return {
|
|
153
162
|
format: duration_format
|
|
154
163
|
};
|
|
@@ -176,30 +185,42 @@ class RowExpandFormulaFormatter extends _react.default.Component {
|
|
|
176
185
|
if (array_type === _dtableUtils.CellType.CHECKBOX) {
|
|
177
186
|
array_data.checkboxStyle = array_data.checkbox_style;
|
|
178
187
|
}
|
|
179
|
-
return
|
|
188
|
+
return {
|
|
189
|
+
...array_data,
|
|
180
190
|
collaborators
|
|
181
|
-
}
|
|
191
|
+
};
|
|
182
192
|
}
|
|
183
193
|
}
|
|
184
194
|
};
|
|
185
195
|
}
|
|
186
196
|
createColumnFormatter(Formatter, formatterProps) {
|
|
187
197
|
if (/*#__PURE__*/_react.default.isValidElement(Formatter)) {
|
|
188
|
-
return /*#__PURE__*/_react.default.cloneElement(Formatter,
|
|
198
|
+
return /*#__PURE__*/_react.default.cloneElement(Formatter, {
|
|
199
|
+
...formatterProps
|
|
200
|
+
});
|
|
189
201
|
} else if ((0, _utils2.isFunction)(Formatter)) {
|
|
190
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Formatter,
|
|
202
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Formatter, {
|
|
203
|
+
...formatterProps
|
|
204
|
+
});
|
|
191
205
|
} else {
|
|
192
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextFormatter.default,
|
|
206
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextFormatter.default, {
|
|
207
|
+
...formatterProps
|
|
208
|
+
});
|
|
193
209
|
}
|
|
194
210
|
}
|
|
195
211
|
render() {
|
|
196
|
-
let
|
|
197
|
-
column
|
|
198
|
-
collaborators
|
|
199
|
-
value
|
|
200
|
-
|
|
201
|
-
const
|
|
202
|
-
|
|
212
|
+
let {
|
|
213
|
+
column,
|
|
214
|
+
collaborators,
|
|
215
|
+
value
|
|
216
|
+
} = this.props;
|
|
217
|
+
const {
|
|
218
|
+
data
|
|
219
|
+
} = column;
|
|
220
|
+
const {
|
|
221
|
+
array_type,
|
|
222
|
+
result_type
|
|
223
|
+
} = data;
|
|
203
224
|
if (_dtableUtils.DISPLAY_INTERNAL_ERRORS.includes(value)) {
|
|
204
225
|
return this.renderInternalErrorValue(value, result_type);
|
|
205
226
|
}
|
|
@@ -48,15 +48,17 @@ class RowExpandImageFormatter extends _react.default.Component {
|
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
50
|
render() {
|
|
51
|
-
const
|
|
52
|
-
value
|
|
53
|
-
server
|
|
54
|
-
containerClassName
|
|
55
|
-
readOnly
|
|
56
|
-
column
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
51
|
+
const {
|
|
52
|
+
value,
|
|
53
|
+
server,
|
|
54
|
+
containerClassName,
|
|
55
|
+
readOnly,
|
|
56
|
+
column
|
|
57
|
+
} = this.props;
|
|
58
|
+
const {
|
|
59
|
+
isPreviewImage,
|
|
60
|
+
previewImageIndex
|
|
61
|
+
} = this.state;
|
|
60
62
|
if (!Array.isArray(value) || value.length === 0) {
|
|
61
63
|
return null;
|
|
62
64
|
}
|
|
@@ -49,13 +49,14 @@ class RowExpandImageItemFormatter extends _react.Component {
|
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
51
|
render() {
|
|
52
|
-
const
|
|
53
|
-
url
|
|
54
|
-
column
|
|
55
|
-
index
|
|
56
|
-
readOnly
|
|
57
|
-
downloadFile
|
|
58
|
-
deleteFile
|
|
52
|
+
const {
|
|
53
|
+
url,
|
|
54
|
+
column,
|
|
55
|
+
index,
|
|
56
|
+
readOnly,
|
|
57
|
+
downloadFile,
|
|
58
|
+
deleteFile
|
|
59
|
+
} = this.props;
|
|
59
60
|
const id = 'image-list-preview-item' + column.key + index;
|
|
60
61
|
const name = decodeURI(url.slice(url.lastIndexOf('/') + 1));
|
|
61
62
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
@@ -65,7 +66,7 @@ class RowExpandImageItemFormatter extends _react.Component {
|
|
|
65
66
|
onClick: this.onClickImage,
|
|
66
67
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
67
68
|
src: url,
|
|
68
|
-
id:
|
|
69
|
+
id: `item-image-${index}`,
|
|
69
70
|
alt: name
|
|
70
71
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
71
72
|
className: "dtable-ui-image-icons-choice",
|
|
@@ -83,7 +84,7 @@ class RowExpandImageItemFormatter extends _react.Component {
|
|
|
83
84
|
})
|
|
84
85
|
})]
|
|
85
86
|
})]
|
|
86
|
-
},
|
|
87
|
+
}, `image-${index}`), this.state.isDeleteTipOpen && /*#__PURE__*/(0, _jsxRuntime.jsx)(_DeleteTip.default, {
|
|
87
88
|
position: this.position,
|
|
88
89
|
toggle: this.closeDeleteTip,
|
|
89
90
|
handleDelete: this.onDelete,
|