dtable-ui-component 6.0.126 → 7.0.0-xia.1
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 +16 -14
- package/lib/ActivityIndicator/index.js +8 -7
- package/lib/AsyncUserSelect/index.js +19 -40
- package/lib/AsyncUserSelect/user-item.js +6 -5
- package/lib/AutoNumberFormatter/index.js +4 -3
- package/lib/Badge/index.js +11 -9
- package/lib/ButtonFormatter/index.js +8 -6
- package/lib/CTimeFormatter/index.js +4 -3
- package/lib/CheckboxEditor/index.js +3 -1
- 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 +4 -2
- package/lib/CollaboratorEditor/mb-editor/index.js +19 -11
- package/lib/CollaboratorEditor/pc-editor/index.js +34 -25
- package/lib/CollaboratorFormatter/index.js +10 -8
- package/lib/CollaboratorItem/index.js +5 -4
- package/lib/CollapsibleSettingLayout/index.js +7 -9
- package/lib/Comment/body/comment.js +18 -10
- package/lib/Comment/body/index.js +4 -2
- package/lib/Comment/footer/btns/index.js +7 -4
- package/lib/Comment/footer/index.js +20 -9
- package/lib/Comment/footer/input/index.js +50 -29
- package/lib/Comment/footer/input/participant/index.js +5 -4
- 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 +24 -8
- package/lib/Comment/index.js +57 -39
- package/lib/Comment/utils/utilities.js +21 -15
- package/lib/CreatorFormatter/index.js +8 -6
- package/lib/DTableColorPicker/ColorPickerPortal/index.js +18 -22
- package/lib/DTableColorPicker/index.js +40 -55
- package/lib/DTableColorPicker/utils.js +6 -4
- package/lib/DTableColumnIcon/index.js +7 -6
- package/lib/DTableCommonAddTool/index.js +8 -6
- package/lib/DTableCustomFooter/index.js +3 -1
- package/lib/DTableCustomizeCollaboratorSelect/index.js +20 -17
- package/lib/DTableCustomizeSelect/index.js +24 -19
- package/lib/DTableDropdownItem/index.js +18 -16
- package/lib/DTableDropdownMenu/index.js +10 -8
- package/lib/DTableEmptyTip/index.js +5 -4
- package/lib/DTableFiltersPopover/index.js +50 -34
- package/lib/DTableFiltersPopover/utils/filter-item-utils.js +3 -1
- package/lib/DTableFiltersPopover/utils/index.js +113 -63
- 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 +56 -35
- package/lib/DTableFiltersPopover/widgets/filter-item.js +171 -108
- package/lib/DTableFiltersPopover/widgets/filter-list/index.css +5 -5
- package/lib/DTableFiltersPopover/widgets/filter-list/index.js +161 -136
- package/lib/DTableFiltersPopover/widgets/rate-item.js +20 -15
- package/lib/DTableGroupSelect/index.js +15 -11
- package/lib/DTableGroupSelect/select-option-group.js +32 -23
- package/lib/DTableIcon/index.js +7 -6
- package/lib/DTableIcon/svg-icon.js +7 -5
- package/lib/DTableModalHeader/index.css +3 -20
- package/lib/DTableModalHeader/index.js +3 -1
- package/lib/DTablePopover/index.js +15 -11
- package/lib/DTableRadio/index.js +9 -10
- package/lib/DTableRadioGroup/index.js +17 -8
- package/lib/DTableSearchInput/index.js +29 -19
- package/lib/DTableSelect/dtable-select-label.js +5 -6
- package/lib/DTableSelect/index.js +22 -21
- package/lib/DTableSelect/utils.js +15 -7
- package/lib/DTableSubDropdownMenu/index.js +10 -8
- package/lib/DTableSubDropdownToggle/index.js +12 -12
- package/lib/DTableSwitch/index.js +11 -12
- package/lib/DTableToolTip/index.js +8 -7
- package/lib/DateEditor/index.js +15 -20
- package/lib/DateEditor/mb-editor/index.js +31 -18
- package/lib/DateEditor/pc-editor.js +45 -26
- package/lib/DateFormatter/index.js +5 -4
- package/lib/DatePicker/index.js +15 -9
- package/lib/DatePicker/utils.js +3 -1
- package/lib/DeleteTip/index.js +6 -5
- package/lib/DepartmentMultipleSelectEditor/index.js +23 -25
- package/lib/DepartmentSelectFilter/index.js +8 -6
- package/lib/DepartmentSingleSelectEditor/index.js +3 -1
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +47 -48
- package/lib/DepartmentSingleSelectEditor/pc-editor/department-single-select.js +58 -36
- package/lib/DepartmentSingleSelectEditor/pc-editor/index.js +19 -13
- package/lib/DepartmentSingleSelectFormatter/index.js +6 -4
- package/lib/DigitalSignEditor/index.js +3 -1
- package/lib/DigitalSignEditor/mb-editor/index.js +20 -12
- package/lib/DigitalSignEditor/pc-editor/index.js +24 -17
- package/lib/DigitalSignEditor/service.js +4 -2
- package/lib/DigitalSignEditor/signature-board/index.js +8 -5
- package/lib/DigitalSignEditor/utils.js +4 -2
- package/lib/DigitalSignFormatter/index.js +15 -12
- package/lib/DigitalSignFormatter/utils.js +5 -4
- 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 +12 -12
- package/lib/FieldDisplaySetting/index.js +10 -12
- package/lib/FileEditor/files-previewer/index.js +3 -1
- package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +18 -10
- 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 +21 -14
- package/lib/FileEditor/files-previewer/pc-previewer/index.js +57 -29
- package/lib/FileEditor/index.js +3 -1
- package/lib/FileEditor/mb-editor/index.js +20 -28
- package/lib/FileEditor/pc-editor/addition-previewer/index.js +3 -1
- package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.js +25 -11
- package/lib/FileEditor/pc-editor/index.js +27 -19
- package/lib/FileFormatter/index.js +19 -26
- package/lib/FileItemFormatter/index.js +9 -6
- package/lib/FileUploader/index.js +45 -28
- package/lib/FormulaFormatter/index.js +29 -15
- package/lib/GeolocationEditor/index.js +12 -11
- package/lib/GeolocationEditor/map-editor-utils.js +15 -17
- package/lib/GeolocationEditor/mb-editor/country-editor.js +14 -17
- package/lib/GeolocationEditor/mb-editor/index.js +6 -4
- package/lib/GeolocationEditor/mb-editor/location-editor.js +15 -18
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +68 -41
- 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 +23 -10
- package/lib/GeolocationEditor/pc-editor/index.js +20 -12
- package/lib/GeolocationEditor/pc-editor/location-editor.js +31 -26
- package/lib/GeolocationEditor/pc-editor/map-editor/index.js +54 -34
- package/lib/GeolocationEditor/pc-editor/map-editor/large-editor/index.js +60 -36
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/index.js +62 -35
- package/lib/GeolocationEditor/pc-editor/map-selection-editor/large-editor/index.js +65 -36
- package/lib/GeolocationEditor/pc-editor/province-city-editor.js +25 -19
- package/lib/GeolocationEditor/pc-editor/province-editor.js +13 -6
- package/lib/GeolocationEditor/pc-editor/selector-header-item.js +6 -5
- package/lib/GeolocationEditor/pc-editor/selector-list.js +7 -6
- package/lib/GeolocationFormatter/index.js +5 -4
- package/lib/HtmlLongTextFormatter/index.js +12 -4
- package/lib/Icon/index.js +5 -3
- package/lib/IconButton/index.js +6 -4
- package/lib/ImageEditor/images-previewer/image-preview/index.js +21 -12
- package/lib/ImageEditor/images-previewer/index.js +9 -3
- package/lib/ImageEditor/index.js +3 -1
- 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 +3 -1
- package/lib/ImageEditor/pc-editor/addition-previewer/local-image-addition/index.js +21 -7
- package/lib/ImageEditor/pc-editor/images-previewer/index.js +9 -3
- package/lib/ImageEditor/pc-editor/index.js +16 -11
- package/lib/ImageFormatter/images-lazy-load.js +11 -19
- package/lib/ImageFormatter/index.js +13 -11
- package/lib/ImagePreviewerLightbox/index.js +13 -15
- package/lib/ImageThumbnail/index.js +13 -10
- package/lib/InputItem/custom-input.js +46 -26
- package/lib/InputItem/custom-keyboard.js +18 -15
- package/lib/InputItem/index.js +50 -34
- package/lib/InputItem/input.js +4 -2
- 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 +10 -5
- package/lib/LinkFormatter/index.js +37 -21
- package/lib/List/index.js +8 -6
- package/lib/List/list-item.js +28 -22
- package/lib/LongTextFormatter/index.js +5 -4
- package/lib/MBEditorHeader/index.js +8 -7
- package/lib/MTimeFormatter/index.js +4 -3
- package/lib/MobileFullScreenPage/body/index.js +5 -3
- package/lib/MobileFullScreenPage/header/index.js +6 -4
- package/lib/MobileFullScreenPage/index.js +11 -13
- package/lib/MobileModal/index.js +3 -1
- 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.js +3 -1
- package/lib/MobileSelector/search/index.js +5 -3
- package/lib/MobileUpload/index.js +5 -4
- package/lib/Modal/modal.js +15 -14
- package/lib/Modal/prompt.js +4 -4
- package/lib/MultipleSelectEditor/index.js +3 -1
- package/lib/MultipleSelectFormatter/index.js +8 -6
- 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 +4 -2
- package/lib/Picker/AbstractPicker.js +27 -23
- package/lib/Popover/index.js +4 -3
- package/lib/Popover/item.js +9 -7
- package/lib/Progress/index.js +8 -9
- package/lib/Radio/Radio.js +8 -4
- package/lib/Radio/RadioItem.js +12 -8
- package/lib/RateFormatter/index.js +13 -13
- package/lib/RoleStatusEditor/index.js +17 -18
- package/lib/RowExpandDialog/body/index.js +49 -32
- package/lib/RowExpandDialog/column-content/index.js +9 -5
- package/lib/RowExpandDialog/header/index.js +8 -6
- package/lib/RowExpandDialog/index.js +34 -49
- 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/mb-editor/index.js +33 -22
- package/lib/RowExpandEditor/collaborator-editor/pc-editor/index.js +40 -26
- 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/mb-editor.js +11 -16
- package/lib/RowExpandEditor/department-editor/pc-editor.js +14 -19
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +34 -20
- package/lib/RowExpandEditor/digital-sign-editor/pc-editor/index.js +35 -21
- 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/mb-editor/index.js +19 -9
- package/lib/RowExpandEditor/email-editor/pc-editor/index.js +24 -13
- 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/mb-editor/index.js +29 -17
- package/lib/RowExpandEditor/geolocation-editor/pc-editor/index.js +26 -13
- package/lib/RowExpandEditor/image-editor/mb-editor/index.js +25 -15
- package/lib/RowExpandEditor/image-editor/pc-editor/index.js +23 -13
- package/lib/RowExpandEditor/index.js +8 -4
- 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/mb-editor/index.js +19 -11
- package/lib/RowExpandEditor/multiple-select-editor/pc-editor/index.js +33 -22
- 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/mb-editor.js +25 -12
- package/lib/RowExpandEditor/rate-editor/pc-editor.js +36 -20
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +28 -17
- package/lib/RowExpandEditor/single-select-editor/pc-editor/index.js +34 -22
- 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/mb-editor/index.js +13 -5
- package/lib/RowExpandEditor/url-editor/pc-editor/index.js +18 -9
- 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 +7 -4
- package/lib/RowExpandFormatter/file-formatter/index.js +9 -8
- package/lib/RowExpandFormatter/file-formatter/row-expand-file-item-formatter.js +12 -10
- package/lib/RowExpandFormatter/formula-formatter/index.js +34 -19
- package/lib/RowExpandFormatter/image-formatter/index.js +11 -9
- package/lib/RowExpandFormatter/image-formatter/row-expand-image-item-formatter.js +8 -7
- package/lib/RowExpandFormatter/index.js +41 -27
- package/lib/RowExpandFormatter/link-formatter/collaborator-item-formatter.js +14 -8
- package/lib/RowExpandFormatter/link-formatter/index.js +19 -11
- package/lib/RowExpandFormatter/link-formatter/value-display-utils.js +5 -3
- package/lib/RowExpandFormatter/rate-formatter/index.js +12 -11
- package/lib/RowExpandFormatter/text/index.js +5 -4
- package/lib/RowExpandFormatter/url-formatter/index.js +7 -4
- package/lib/RowExpandView/body/index.js +35 -22
- package/lib/RowExpandView/column-content/index.js +7 -3
- package/lib/RowExpandView/index.js +30 -42
- package/lib/SelectItem/index.js +8 -6
- package/lib/SelectOptionGroup/index.js +40 -30
- package/lib/SelectedDepartments/index.js +9 -7
- package/lib/SimpleLongTextFormatter/index.js +16 -10
- 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 +3 -1
- package/lib/SingleSelectFormatter/index.js +9 -8
- package/lib/TabBar/Tab.js +16 -14
- package/lib/TabBar/index.js +21 -18
- package/lib/Tabs/index.js +3 -1
- package/lib/TextEditor/index.js +23 -14
- package/lib/TextFormatter/index.js +4 -3
- package/lib/TextareaItem/index.js +26 -19
- package/lib/Toast/index.js +4 -3
- package/lib/UrlFormatter/index.js +4 -3
- package/lib/common/editor-base.js +12 -7
- package/lib/hooks/common-hooks.js +4 -2
- package/lib/select-editor/index.js +3 -1
- package/lib/select-editor/mb-editor/index.js +28 -17
- package/lib/select-editor/pc-editor/index.js +42 -27
- package/lib/toaster/alert.js +7 -6
- package/lib/toaster/toast.js +3 -2
- package/lib/toaster/toastManager.js +4 -2
- package/lib/utils/cell.js +11 -8
- package/lib/utils/column-utils.js +14 -8
- package/lib/utils/departments.js +3 -1
- package/lib/utils/url.js +31 -24
- package/lib/utils/utils.js +6 -2
- package/package.json +1 -1
|
@@ -15,7 +15,9 @@ class PCDepartmentSingleSelectEditor extends _react.Component {
|
|
|
15
15
|
constructor(props) {
|
|
16
16
|
super(props);
|
|
17
17
|
this.onCommit = value => {
|
|
18
|
-
const
|
|
18
|
+
const {
|
|
19
|
+
onCommit
|
|
20
|
+
} = this.props;
|
|
19
21
|
this.setState({
|
|
20
22
|
value
|
|
21
23
|
}, () => {
|
|
@@ -27,10 +29,12 @@ class PCDepartmentSingleSelectEditor extends _react.Component {
|
|
|
27
29
|
updated[this.props.column.key] = this.state.value;
|
|
28
30
|
return updated;
|
|
29
31
|
};
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
const {
|
|
33
|
+
column,
|
|
34
|
+
isInModal,
|
|
35
|
+
value: _value,
|
|
36
|
+
height
|
|
37
|
+
} = props;
|
|
34
38
|
const editorWidth = column.width > 300 ? column.width : 300;
|
|
35
39
|
const data = column.data || {};
|
|
36
40
|
this.state = {
|
|
@@ -46,9 +50,10 @@ class PCDepartmentSingleSelectEditor extends _react.Component {
|
|
|
46
50
|
componentDidMount() {
|
|
47
51
|
if (this.isRowExpand) {
|
|
48
52
|
let menuStyle = {};
|
|
49
|
-
const
|
|
50
|
-
top
|
|
51
|
-
left
|
|
53
|
+
const {
|
|
54
|
+
top,
|
|
55
|
+
left
|
|
56
|
+
} = this.outerRef.getBoundingClientRect();
|
|
52
57
|
if (top > 330) {
|
|
53
58
|
menuStyle.top = -200;
|
|
54
59
|
}
|
|
@@ -61,11 +66,12 @@ class PCDepartmentSingleSelectEditor extends _react.Component {
|
|
|
61
66
|
}
|
|
62
67
|
}
|
|
63
68
|
render() {
|
|
64
|
-
const
|
|
65
|
-
target
|
|
66
|
-
column
|
|
67
|
-
userDepartmentIdsMap
|
|
68
|
-
departments
|
|
69
|
+
const {
|
|
70
|
+
target,
|
|
71
|
+
column,
|
|
72
|
+
userDepartmentIdsMap,
|
|
73
|
+
departments
|
|
74
|
+
} = this.props;
|
|
69
75
|
const dom = /*#__PURE__*/(0, _jsxRuntime.jsx)(_departmentSingleSelect.default, {
|
|
70
76
|
column: column,
|
|
71
77
|
value: this.state.value,
|
|
@@ -11,10 +11,12 @@ var _lang = require("../lang");
|
|
|
11
11
|
require("./index.css");
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
function DepartmentSingleSelectFormatter(props) {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
const {
|
|
15
|
+
value,
|
|
16
|
+
departments,
|
|
17
|
+
containerClassName,
|
|
18
|
+
tip
|
|
19
|
+
} = props;
|
|
18
20
|
if (!value || !Array.isArray(departments)) return null;
|
|
19
21
|
const deletedTip = tip || (0, _lang.getLocale)('Deleted_department');
|
|
20
22
|
const department = departments.find(department => department.id === value);
|
|
@@ -15,7 +15,9 @@ var _mbEditor = _interopRequireDefault(require("./mb-editor"));
|
|
|
15
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
16
|
const _excluded = ["isMobile"];
|
|
17
17
|
const DigitalSignEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
18
|
-
let
|
|
18
|
+
let {
|
|
19
|
+
isMobile
|
|
20
|
+
} = _ref,
|
|
19
21
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
20
22
|
if (isMobile === false) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcEditor.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
21
23
|
ref: ref
|
|
@@ -18,8 +18,10 @@ var _lang = require("../../lang");
|
|
|
18
18
|
var _utils2 = require("../../utils/utils");
|
|
19
19
|
require("./index.css");
|
|
20
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
-
const
|
|
22
|
-
|
|
21
|
+
const {
|
|
22
|
+
Header,
|
|
23
|
+
Body
|
|
24
|
+
} = _MobileFullScreenPage.default;
|
|
23
25
|
class MBDigitalSignEditor extends _react.Component {
|
|
24
26
|
constructor(props) {
|
|
25
27
|
super(props);
|
|
@@ -85,11 +87,14 @@ class MBDigitalSignEditor extends _react.Component {
|
|
|
85
87
|
this.state = {
|
|
86
88
|
saving: false
|
|
87
89
|
};
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
const {
|
|
91
|
+
uploadFile,
|
|
92
|
+
config,
|
|
93
|
+
value
|
|
94
|
+
} = props;
|
|
95
|
+
const {
|
|
96
|
+
username
|
|
97
|
+
} = config || {};
|
|
93
98
|
this.value = value || {};
|
|
94
99
|
this.digitalService = new _service.default({
|
|
95
100
|
uploadFile,
|
|
@@ -98,11 +103,14 @@ class MBDigitalSignEditor extends _react.Component {
|
|
|
98
103
|
this.signatureBoard = null;
|
|
99
104
|
}
|
|
100
105
|
render() {
|
|
101
|
-
const
|
|
102
|
-
value
|
|
103
|
-
config
|
|
104
|
-
column
|
|
105
|
-
|
|
106
|
+
const {
|
|
107
|
+
value,
|
|
108
|
+
config,
|
|
109
|
+
column
|
|
110
|
+
} = this.props;
|
|
111
|
+
const {
|
|
112
|
+
saving
|
|
113
|
+
} = this.state;
|
|
106
114
|
const signImageUrl = (0, _url.generateCurrentBaseImageUrl)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, config), {}, {
|
|
107
115
|
partUrl: _utils.default.getSignImageUrl(value)
|
|
108
116
|
}));
|
|
@@ -24,12 +24,14 @@ class PCDigitalSignEditor extends _react.Component {
|
|
|
24
24
|
super(props);
|
|
25
25
|
this.setPosition = () => {
|
|
26
26
|
if (!this.editor) return;
|
|
27
|
-
const
|
|
28
|
-
offsetLeft
|
|
29
|
-
offsetTop
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
const {
|
|
28
|
+
offsetLeft,
|
|
29
|
+
offsetTop
|
|
30
|
+
} = this.editor.parentNode;
|
|
31
|
+
const {
|
|
32
|
+
offsetWidth: editorWidth,
|
|
33
|
+
offsetHeight: editorHeight
|
|
34
|
+
} = this.editor;
|
|
33
35
|
let editorLeft = offsetLeft - editorWidth;
|
|
34
36
|
let editorTop = offsetTop;
|
|
35
37
|
if (this.props.isInModal) {
|
|
@@ -111,11 +113,14 @@ class PCDigitalSignEditor extends _react.Component {
|
|
|
111
113
|
editorPosition: {},
|
|
112
114
|
saving: false
|
|
113
115
|
};
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
const {
|
|
117
|
+
uploadFile,
|
|
118
|
+
config,
|
|
119
|
+
value
|
|
120
|
+
} = props;
|
|
121
|
+
const {
|
|
122
|
+
username
|
|
123
|
+
} = config || {};
|
|
119
124
|
this.value = value || {};
|
|
120
125
|
this.digitalService = new _service.default({
|
|
121
126
|
uploadFile,
|
|
@@ -126,12 +131,14 @@ class PCDigitalSignEditor extends _react.Component {
|
|
|
126
131
|
this.setPosition();
|
|
127
132
|
}
|
|
128
133
|
render() {
|
|
129
|
-
const
|
|
130
|
-
value
|
|
131
|
-
config
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
134
|
+
const {
|
|
135
|
+
value,
|
|
136
|
+
config
|
|
137
|
+
} = this.props;
|
|
138
|
+
const {
|
|
139
|
+
editorPosition,
|
|
140
|
+
saving
|
|
141
|
+
} = this.state;
|
|
135
142
|
const signImageUrl = (0, _url.generateCurrentBaseImageUrl)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, config), {}, {
|
|
136
143
|
partUrl: _utils.default.getSignImageUrl(value)
|
|
137
144
|
}));
|
|
@@ -16,8 +16,10 @@ class DigitalService {
|
|
|
16
16
|
this.username = props.username;
|
|
17
17
|
}
|
|
18
18
|
uploadSignImage(signBlob, _ref) {
|
|
19
|
-
let
|
|
20
|
-
|
|
19
|
+
let {
|
|
20
|
+
successCallback,
|
|
21
|
+
failedCallback
|
|
22
|
+
} = _ref;
|
|
21
23
|
if (!this.uploadFile) return;
|
|
22
24
|
const name = "".concat(this.username, "-").concat(Date.now().toString(), ".png");
|
|
23
25
|
const file = new File([signBlob], name, {
|
|
@@ -72,7 +72,9 @@ class SignatureBoard extends _react.Component {
|
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
74
|
this.renderTips = () => {
|
|
75
|
-
const
|
|
75
|
+
const {
|
|
76
|
+
isEmpty
|
|
77
|
+
} = this.state;
|
|
76
78
|
if (!isEmpty) return null;
|
|
77
79
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
78
80
|
className: "signature-board-tips",
|
|
@@ -80,10 +82,11 @@ class SignatureBoard extends _react.Component {
|
|
|
80
82
|
});
|
|
81
83
|
};
|
|
82
84
|
this.renderSignImage = () => {
|
|
83
|
-
const
|
|
84
|
-
isEmpty
|
|
85
|
-
signImageUrl
|
|
86
|
-
loadingSignImage
|
|
85
|
+
const {
|
|
86
|
+
isEmpty,
|
|
87
|
+
signImageUrl,
|
|
88
|
+
loadingSignImage
|
|
89
|
+
} = this.state;
|
|
87
90
|
if (isEmpty || !signImageUrl) return null;
|
|
88
91
|
let img = new Image();
|
|
89
92
|
img.src = signImageUrl;
|
|
@@ -14,8 +14,10 @@ class DigitalSignUtils {
|
|
|
14
14
|
return (0, _dtableUtils.getDigitalSignImageUrl)(sign);
|
|
15
15
|
}
|
|
16
16
|
static getUpdatedSign(_ref) {
|
|
17
|
-
let
|
|
18
|
-
|
|
17
|
+
let {
|
|
18
|
+
username,
|
|
19
|
+
sign_image_url
|
|
20
|
+
} = _ref;
|
|
19
21
|
const time = (0, _dayjs.default)().utc().format('YYYY-MM-DDTHH:mm:ss.SSSZ');
|
|
20
22
|
return {
|
|
21
23
|
username,
|
|
@@ -18,9 +18,10 @@ class DigitalSignFormatter extends _react.Component {
|
|
|
18
18
|
constructor(props) {
|
|
19
19
|
super(props);
|
|
20
20
|
this.getSignImages = () => {
|
|
21
|
-
const
|
|
22
|
-
value
|
|
23
|
-
config
|
|
21
|
+
const {
|
|
22
|
+
value,
|
|
23
|
+
config
|
|
24
|
+
} = this.props;
|
|
24
25
|
return [(0, _utils.getDigitalSignImageUrl)(value, config)].filter(Boolean);
|
|
25
26
|
};
|
|
26
27
|
this.onClickSignImage = index => {
|
|
@@ -56,18 +57,20 @@ class DigitalSignFormatter extends _react.Component {
|
|
|
56
57
|
};
|
|
57
58
|
}
|
|
58
59
|
render() {
|
|
59
|
-
const
|
|
60
|
-
containerClassName
|
|
61
|
-
readOnly
|
|
62
|
-
config
|
|
63
|
-
isSample
|
|
64
|
-
renderItem
|
|
60
|
+
const {
|
|
61
|
+
containerClassName,
|
|
62
|
+
readOnly,
|
|
63
|
+
config,
|
|
64
|
+
isSample,
|
|
65
|
+
renderItem
|
|
66
|
+
} = this.props;
|
|
65
67
|
const className = (0, _classnames.default)('dtable-ui cell-formatter-container digital-sign-formatter', containerClassName);
|
|
66
68
|
const signImages = this.getSignImages();
|
|
67
69
|
if (signImages.length === 0) return null;
|
|
68
|
-
const
|
|
69
|
-
isPreviewSignImage
|
|
70
|
-
largeSignImageIndex
|
|
70
|
+
const {
|
|
71
|
+
isPreviewSignImage,
|
|
72
|
+
largeSignImageIndex
|
|
73
|
+
} = this.state;
|
|
71
74
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
72
75
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
73
76
|
className: className,
|
|
@@ -9,10 +9,11 @@ const getDigitalSignImageUrl = (cellValue, config) => {
|
|
|
9
9
|
const url = cellValue && cellValue.sign_image_url || '';
|
|
10
10
|
if (!url) return '';
|
|
11
11
|
if (!config) return url;
|
|
12
|
-
const
|
|
13
|
-
server
|
|
14
|
-
workspaceID
|
|
15
|
-
dtableUuid
|
|
12
|
+
const {
|
|
13
|
+
server,
|
|
14
|
+
workspaceID,
|
|
15
|
+
dtableUuid
|
|
16
|
+
} = config || {};
|
|
16
17
|
if (server && (workspaceID || workspaceID === 0) && dtableUuid) {
|
|
17
18
|
return "".concat(server, "/workspace/").concat(workspaceID, "/asset/").concat(dtableUuid).concat(url);
|
|
18
19
|
}
|
|
@@ -23,10 +23,11 @@ class DurationEditor extends _react.default.Component {
|
|
|
23
23
|
});
|
|
24
24
|
};
|
|
25
25
|
this.onKeyDown = event => {
|
|
26
|
-
let
|
|
27
|
-
selectionStart
|
|
28
|
-
selectionEnd
|
|
29
|
-
value
|
|
26
|
+
let {
|
|
27
|
+
selectionStart,
|
|
28
|
+
selectionEnd,
|
|
29
|
+
value
|
|
30
|
+
} = event.currentTarget;
|
|
30
31
|
if (event.keyCode === _constants.KeyCodes.Enter) {
|
|
31
32
|
event.preventDefault();
|
|
32
33
|
this.onBlur();
|
|
@@ -36,7 +37,9 @@ class DurationEditor extends _react.default.Component {
|
|
|
36
37
|
}
|
|
37
38
|
};
|
|
38
39
|
this.getValue = () => {
|
|
39
|
-
const
|
|
40
|
+
const {
|
|
41
|
+
column
|
|
42
|
+
} = this.props;
|
|
40
43
|
const newDuration = (0, _dtableUtils.formatDurationToNumber)(this.getInputNode().value, column.data);
|
|
41
44
|
return newDuration;
|
|
42
45
|
};
|
|
@@ -48,10 +51,11 @@ class DurationEditor extends _react.default.Component {
|
|
|
48
51
|
return this.input.querySelector('input:not([type=hidden])');
|
|
49
52
|
};
|
|
50
53
|
this.onBlur = () => {
|
|
51
|
-
const
|
|
52
|
-
isInModal
|
|
53
|
-
onBlur
|
|
54
|
-
onCommit
|
|
54
|
+
const {
|
|
55
|
+
isInModal,
|
|
56
|
+
onBlur,
|
|
57
|
+
onCommit
|
|
58
|
+
} = this.props;
|
|
55
59
|
isInModal ? onCommit(this.getValue()) : onBlur();
|
|
56
60
|
};
|
|
57
61
|
this.setInputRef = input => {
|
|
@@ -64,30 +68,36 @@ class DurationEditor extends _react.default.Component {
|
|
|
64
68
|
this.onCut = e => {
|
|
65
69
|
e.stopPropagation();
|
|
66
70
|
};
|
|
67
|
-
let
|
|
68
|
-
|
|
71
|
+
let {
|
|
72
|
+
value: _value,
|
|
73
|
+
column: _column
|
|
74
|
+
} = props;
|
|
69
75
|
this.initValue = _value || _value === 0 ? (0, _dtableUtils.getDurationDisplayString)(_value, _column.data) : '';
|
|
70
76
|
this.state = {
|
|
71
77
|
value: this.initValue
|
|
72
78
|
};
|
|
73
79
|
}
|
|
74
80
|
componentDidMount() {
|
|
75
|
-
const
|
|
76
|
-
isInModal
|
|
77
|
-
autoFocus
|
|
78
|
-
readOnly
|
|
81
|
+
const {
|
|
82
|
+
isInModal,
|
|
83
|
+
autoFocus,
|
|
84
|
+
readOnly
|
|
85
|
+
} = this.props;
|
|
79
86
|
if (isInModal && autoFocus && !readOnly) {
|
|
80
87
|
this.input.focus();
|
|
81
88
|
}
|
|
82
89
|
}
|
|
83
90
|
render() {
|
|
84
|
-
const
|
|
85
|
-
column
|
|
86
|
-
isInModal
|
|
87
|
-
className
|
|
88
|
-
readOnly
|
|
91
|
+
const {
|
|
92
|
+
column,
|
|
93
|
+
isInModal,
|
|
94
|
+
className,
|
|
95
|
+
readOnly
|
|
96
|
+
} = this.props;
|
|
89
97
|
const data = column.data || {};
|
|
90
|
-
const
|
|
98
|
+
const {
|
|
99
|
+
duration_format
|
|
100
|
+
} = data;
|
|
91
101
|
const style = isInModal ? {
|
|
92
102
|
textAlign: 'left',
|
|
93
103
|
width: '320px'
|
|
@@ -12,10 +12,11 @@ require("./index.css");
|
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
class DurationFormatter extends _react.default.Component {
|
|
14
14
|
render() {
|
|
15
|
-
let
|
|
16
|
-
value
|
|
17
|
-
containerClassName
|
|
18
|
-
format
|
|
15
|
+
let {
|
|
16
|
+
value,
|
|
17
|
+
containerClassName,
|
|
18
|
+
format
|
|
19
|
+
} = this.props;
|
|
19
20
|
let classname = (0, _classnames.default)('dtable-ui cell-formatter-container duration-formatter', containerClassName);
|
|
20
21
|
const durationDisplayString = (0, _dtableUtils.getDurationDisplayString)(value, {
|
|
21
22
|
duration_format: format
|
|
@@ -10,7 +10,9 @@ require("./index.css");
|
|
|
10
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
11
|
class EditEditorButton extends _react.default.Component {
|
|
12
12
|
render() {
|
|
13
|
-
const
|
|
13
|
+
const {
|
|
14
|
+
text
|
|
15
|
+
} = this.props;
|
|
14
16
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
15
17
|
className: "dtable-ui-editor-button",
|
|
16
18
|
onClick: this.props.onClick,
|
|
@@ -11,9 +11,10 @@ require("./index.css");
|
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
class EmailFormatter extends _react.default.Component {
|
|
13
13
|
render() {
|
|
14
|
-
const
|
|
15
|
-
containerClassName
|
|
16
|
-
value
|
|
14
|
+
const {
|
|
15
|
+
containerClassName,
|
|
16
|
+
value
|
|
17
|
+
} = this.props;
|
|
17
18
|
let classname = (0, _classnames.default)('dtable-ui cell-formatter-container email-formatter', containerClassName);
|
|
18
19
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
19
20
|
title: value,
|
|
@@ -1,27 +1,25 @@
|
|
|
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 _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
10
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
10
|
var _DTableSwitch = _interopRequireDefault(require("../DTableSwitch"));
|
|
12
11
|
var _DTableColumnIcon = _interopRequireDefault(require("../DTableColumnIcon"));
|
|
13
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
13
|
function FieldItem(_ref) {
|
|
15
|
-
let
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
let {
|
|
15
|
+
field,
|
|
16
|
+
isCollapsed,
|
|
17
|
+
onClickField,
|
|
18
|
+
onMoveField
|
|
19
|
+
} = _ref;
|
|
19
20
|
let enteredCounter = 0;
|
|
20
21
|
const fieldItemRef = (0, _react.useRef)(null);
|
|
21
|
-
const
|
|
22
|
-
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
23
|
-
isItemDropTipShow = _useState2[0],
|
|
24
|
-
setDropTipShow = _useState2[1];
|
|
22
|
+
const [isItemDropTipShow, setDropTipShow] = (0, _react.useState)(false);
|
|
25
23
|
const handleClickField = e => {
|
|
26
24
|
e.nativeEvent.stopImmediatePropagation();
|
|
27
25
|
const value = e.target.checked;
|
|
@@ -65,8 +63,10 @@ function FieldItem(_ref) {
|
|
|
65
63
|
onMoveField(droppedColumnKey, field.key);
|
|
66
64
|
};
|
|
67
65
|
const placeholder = () => {
|
|
68
|
-
const
|
|
69
|
-
|
|
66
|
+
const {
|
|
67
|
+
type,
|
|
68
|
+
data
|
|
69
|
+
} = field;
|
|
70
70
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
71
71
|
className: "field-switch",
|
|
72
72
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableColumnIcon.default, {
|
|
@@ -7,7 +7,6 @@ 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"));
|
|
11
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
11
|
var _reactstrap = require("reactstrap");
|
|
13
12
|
var _reactTransitionGroup = require("react-transition-group");
|
|
@@ -18,17 +17,16 @@ const FIELD_ITEM_HEIGHT = 30;
|
|
|
18
17
|
const BANNER_HEIGHT = 24;
|
|
19
18
|
const DURATION = 300;
|
|
20
19
|
function FieldDisplaySetting(_ref) {
|
|
21
|
-
let
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
let {
|
|
21
|
+
fields,
|
|
22
|
+
textProperties,
|
|
23
|
+
fieldAllShown,
|
|
24
|
+
onClickField,
|
|
25
|
+
onMoveField,
|
|
26
|
+
onToggleFieldsVisibility
|
|
27
|
+
} = _ref;
|
|
27
28
|
const nodeRef = (0, _react.useRef)(null);
|
|
28
|
-
const
|
|
29
|
-
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
30
|
-
isCollapsed = _useState2[0],
|
|
31
|
-
setCollapsed = _useState2[1];
|
|
29
|
+
const [isCollapsed, setCollapsed] = (0, _react.useState)(true);
|
|
32
30
|
const expandAllFields = () => {
|
|
33
31
|
setCollapsed(!isCollapsed);
|
|
34
32
|
};
|
|
@@ -63,7 +61,7 @@ function FieldDisplaySetting(_ref) {
|
|
|
63
61
|
className: "mb-0",
|
|
64
62
|
children: textProperties.titleValue
|
|
65
63
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
66
|
-
className: "dtable-font dtable-icon-right expand-button ".concat(isCollapsed ? '' : 'revolving')
|
|
64
|
+
className: "seatable-icon-btn sm dtable-font dtable-icon-right expand-button ".concat(isCollapsed ? '' : 'revolving')
|
|
67
65
|
})]
|
|
68
66
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactTransitionGroup.Transition, {
|
|
69
67
|
nodeRef: nodeRef,
|
|
@@ -16,7 +16,9 @@ require("./index.css");
|
|
|
16
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
17
|
const _excluded = ["isMobile"];
|
|
18
18
|
const FilesPreviewer = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
19
|
-
let
|
|
19
|
+
let {
|
|
20
|
+
isMobile
|
|
21
|
+
} = _ref,
|
|
20
22
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
21
23
|
if (isMobile === false) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_pcPreviewer.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
22
24
|
ref: ref
|
|
@@ -19,7 +19,9 @@ class FilePreviewer extends _react.default.Component {
|
|
|
19
19
|
this.props.downloadFile(downloadUrl);
|
|
20
20
|
};
|
|
21
21
|
this.deleteFile = () => {
|
|
22
|
-
const
|
|
22
|
+
const {
|
|
23
|
+
fileItem
|
|
24
|
+
} = this.props;
|
|
23
25
|
this.props.deleteFile(fileItem);
|
|
24
26
|
};
|
|
25
27
|
this.closeRenameFile = () => {
|
|
@@ -61,9 +63,11 @@ class FilePreviewer extends _react.default.Component {
|
|
|
61
63
|
showOperationSheet: false
|
|
62
64
|
};
|
|
63
65
|
this.operations = [];
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
const {
|
|
67
|
+
renameFile,
|
|
68
|
+
downloadFile,
|
|
69
|
+
deleteFile
|
|
70
|
+
} = props;
|
|
67
71
|
if (renameFile) {
|
|
68
72
|
this.operations.push(_MobileOperationSheet.OPERATION_TYPE.RENAME);
|
|
69
73
|
}
|
|
@@ -75,12 +79,16 @@ class FilePreviewer extends _react.default.Component {
|
|
|
75
79
|
}
|
|
76
80
|
}
|
|
77
81
|
render() {
|
|
78
|
-
const
|
|
79
|
-
fileItem
|
|
80
|
-
config
|
|
81
|
-
|
|
82
|
-
const
|
|
83
|
-
|
|
82
|
+
const {
|
|
83
|
+
fileItem,
|
|
84
|
+
config
|
|
85
|
+
} = this.props;
|
|
86
|
+
const {
|
|
87
|
+
showOperationSheet
|
|
88
|
+
} = this.state;
|
|
89
|
+
const {
|
|
90
|
+
fileIconUrl
|
|
91
|
+
} = (0, _url.getFileThumbnailInfo)(fileItem, config);
|
|
84
92
|
const uploadTime = (0, _utils.getFileUploadTime)(fileItem);
|
|
85
93
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
86
94
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
9
8
|
var _react = _interopRequireDefault(require("react"));
|
|
10
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
10
|
var _utils = require("../../../utils/utils");
|
|
@@ -18,12 +17,13 @@ class MBFilesPreviewer extends _react.default.Component {
|
|
|
18
17
|
constructor() {
|
|
19
18
|
super(...arguments);
|
|
20
19
|
this.downloadImage = imageItemUrl => {
|
|
21
|
-
const
|
|
20
|
+
const {
|
|
21
|
+
value
|
|
22
|
+
} = this.props;
|
|
22
23
|
const file = value.find(v => v.url === imageItemUrl);
|
|
23
24
|
if (!file) return;
|
|
24
25
|
this.props.getDownLoadFiles([file], _ref => {
|
|
25
|
-
let
|
|
26
|
-
dFile = _ref2[0];
|
|
26
|
+
let [dFile] = _ref;
|
|
27
27
|
dFile && (0, _utils.downloadFile)(dFile);
|
|
28
28
|
});
|
|
29
29
|
};
|
|
@@ -33,9 +33,10 @@ class MBFilesPreviewer extends _react.default.Component {
|
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
render() {
|
|
36
|
-
const
|
|
37
|
-
value
|
|
38
|
-
getDownLoadFiles
|
|
36
|
+
const {
|
|
37
|
+
value,
|
|
38
|
+
getDownLoadFiles
|
|
39
|
+
} = this.props;
|
|
39
40
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
40
41
|
className: (0, _classnames.default)('dtable-ui-file-editor-previewer dtable-ui-mobile-file-editor-previewer', {
|
|
41
42
|
'mt-0': value.length === 0
|
|
@@ -42,9 +42,10 @@ class FileDropdownMenu extends _react.default.Component {
|
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
render() {
|
|
45
|
-
const
|
|
46
|
-
onRenameFile
|
|
47
|
-
onDeleteFile
|
|
45
|
+
const {
|
|
46
|
+
onRenameFile,
|
|
47
|
+
onDeleteFile
|
|
48
|
+
} = this.props;
|
|
48
49
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactstrap.Dropdown, {
|
|
49
50
|
isOpen: this.state.isItemMenuShow,
|
|
50
51
|
toggle: this.onDropdownToggleClick,
|