dtable-ui-component 6.0.30 → 6.0.31
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/BodyPortal/index.js +29 -0
- package/lib/CheckboxEditor/index.js +24 -116
- package/lib/CheckboxEditor/mb-editor.js +99 -0
- package/lib/CheckboxEditor/pc-editor.js +118 -0
- package/lib/CollaboratorEditor/index.js +23 -11
- package/lib/CollaboratorEditor/mb-editor/index.css +41 -0
- package/lib/CollaboratorEditor/mb-editor/index.js +88 -0
- package/lib/DTableCommonAddTool/index.js +1 -3
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +6 -6
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +6 -6
- package/lib/DateEditor/index.js +69 -95
- package/lib/DateEditor/mb-editor/custom-rc-calendar.css +118 -0
- package/lib/DateEditor/mb-editor/index.css +39 -0
- package/lib/DateEditor/mb-editor/index.js +215 -0
- package/lib/DateEditor/{pc-date-editor-popover.js → pc-editor.js} +9 -9
- package/lib/{Department-editor/department-multiple-select → DepartmentMultipleSelectEditor}/index.js +6 -6
- package/lib/DepartmentSingleSelectEditor/index.js +34 -0
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.css +4 -0
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +227 -0
- package/lib/{Department-editor → DepartmentSingleSelectEditor/pc-editor}/department-single-select.js +7 -7
- package/lib/{Department-editor → DepartmentSingleSelectEditor/pc-editor}/index.css +10 -3
- package/lib/{Department-editor → DepartmentSingleSelectEditor/pc-editor}/index.js +8 -25
- package/lib/DigitalSignEditor/index.js +24 -171
- package/lib/DigitalSignEditor/mb-editor/index.css +35 -0
- package/lib/DigitalSignEditor/mb-editor/index.js +144 -0
- package/lib/DigitalSignEditor/pc-editor/index.js +181 -0
- package/lib/FileEditor/files-previewer/index.js +26 -268
- package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +122 -0
- package/lib/FileEditor/files-previewer/mb-previewer/index.css +39 -0
- package/lib/FileEditor/files-previewer/mb-previewer/index.js +64 -0
- package/lib/FileEditor/files-previewer/{file-previewer → pc-previewer/file-previewer}/dropdown-menu.js +1 -1
- package/lib/FileEditor/files-previewer/{file-previewer → pc-previewer/file-previewer}/file-name-editor/index.js +1 -1
- package/lib/FileEditor/files-previewer/{file-previewer → pc-previewer/file-previewer}/index.css +0 -2
- package/lib/FileEditor/files-previewer/{file-previewer → pc-previewer/file-previewer}/index.js +2 -2
- package/lib/FileEditor/files-previewer/pc-previewer/index.js +276 -0
- package/lib/FileEditor/index.css +0 -5
- package/lib/FileEditor/index.js +26 -265
- package/lib/FileEditor/mb-editor/index.css +10 -0
- package/lib/FileEditor/mb-editor/index.js +136 -0
- package/lib/FileEditor/pc-editor/addition-previewer/index.css +1 -0
- package/lib/FileEditor/{addition-previewer → pc-editor/addition-previewer}/index.js +1 -1
- package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.css +1 -0
- package/lib/FileEditor/{addition-previewer → pc-editor/addition-previewer}/local-file-addition/index.js +4 -4
- package/lib/FileEditor/pc-editor/index.css +5 -0
- package/lib/FileEditor/pc-editor/index.js +274 -0
- package/lib/FormulaFormatter/index.css +5 -5
- package/lib/GeolocationEditor/index.js +92 -230
- package/lib/GeolocationEditor/map-editor-utils.js +10 -4
- package/lib/GeolocationEditor/mb-editor/country-editor.js +79 -0
- package/lib/GeolocationEditor/mb-editor/index.css +11 -0
- package/lib/GeolocationEditor/mb-editor/index.js +125 -0
- package/lib/GeolocationEditor/mb-editor/location-editor.js +101 -0
- package/lib/GeolocationEditor/mb-editor/map-editor/index.css +11 -0
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +474 -0
- package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.css +158 -0
- package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +530 -0
- package/lib/GeolocationEditor/mb-editor/province-city-editor.js +77 -0
- package/lib/GeolocationEditor/mb-editor/province-editor.js +76 -0
- package/lib/GeolocationEditor/{country-editor.js → pc-editor/country-editor.js} +5 -49
- package/lib/GeolocationEditor/{index.css → pc-editor/index.css} +3 -4
- package/lib/GeolocationEditor/pc-editor/index.js +247 -0
- package/lib/GeolocationEditor/{location-editor.js → pc-editor/location-editor.js} +8 -41
- package/lib/GeolocationEditor/{map-editor → pc-editor/map-editor}/index.js +6 -6
- package/lib/GeolocationEditor/{map-editor → pc-editor/map-editor}/large-editor/index.js +7 -7
- package/lib/GeolocationEditor/{map-selection-editor → pc-editor/map-selection-editor}/index.js +7 -7
- package/lib/GeolocationEditor/{map-selection-editor → pc-editor/map-selection-editor}/large-editor/index.js +7 -7
- package/lib/GeolocationEditor/{province-city-editor.js → pc-editor/province-city-editor.js} +7 -38
- package/lib/GeolocationEditor/{province-editor.js → pc-editor/province-editor.js} +7 -31
- package/lib/GeolocationEditor/{selector-header-item.js → pc-editor/selector-header-item.js} +1 -1
- package/lib/ImageEditor/images-previewer/image-preview/index.js +3 -3
- package/lib/ImageEditor/images-previewer/index.js +9 -4
- package/lib/ImageEditor/index.css +17 -16
- package/lib/ImageEditor/index.js +26 -185
- package/lib/ImageEditor/mb-editor/index.css +29 -0
- package/lib/ImageEditor/mb-editor/index.js +136 -0
- package/lib/ImageEditor/{addition-previewer → pc-editor/addition-previewer}/image-link/index.js +1 -1
- package/lib/ImageEditor/{addition-previewer → pc-editor/addition-previewer}/index.js +1 -1
- package/lib/ImageEditor/{addition-previewer → pc-editor/addition-previewer}/local-image-addition/index.js +4 -4
- package/lib/ImageEditor/pc-editor/images-previewer/index.js +140 -0
- package/lib/ImageEditor/pc-editor/index.css +24 -0
- package/lib/ImageEditor/pc-editor/index.js +194 -0
- package/lib/ImageThumbnail/index.js +2 -1
- package/lib/LinkEditor/index.js +5 -5
- package/lib/LinkEditor/{mb-link-editor-popover → mb-popover}/index.css +1 -1
- package/lib/MobileFullScreenPage/body/index.css +9 -0
- package/lib/MobileFullScreenPage/body/index.js +23 -0
- package/lib/MobileFullScreenPage/header/index.css +39 -0
- package/lib/MobileFullScreenPage/header/index.js +38 -0
- package/lib/MobileFullScreenPage/index.css +13 -0
- package/lib/MobileFullScreenPage/index.js +73 -0
- package/lib/MobileModal/index.js +41 -0
- package/lib/MobileOperationSheet/index.css +27 -0
- package/lib/MobileOperationSheet/index.js +92 -0
- package/lib/MobileSelector/empty/index.css +3 -0
- package/lib/MobileSelector/empty/index.js +23 -0
- package/lib/MobileSelector/index.css +32 -0
- package/lib/MobileSelector/index.js +57 -0
- package/lib/MobileSelector/option/index.css +28 -0
- package/lib/MobileSelector/option/index.js +36 -0
- package/lib/MobileSelector/options/index.css +8 -0
- package/lib/MobileSelector/options/index.js +18 -0
- package/lib/MobileSelector/search/index.css +7 -0
- package/lib/MobileSelector/search/index.js +26 -0
- package/lib/MobileUpload/index.css +1 -0
- package/lib/MobileUpload/index.js +160 -0
- package/lib/MultipleSelectEditor/index.js +9 -14
- package/lib/RowExpand/index.js +24 -0
- package/lib/RowExpandDialog/column-content/index.js +2 -2
- package/lib/RowExpandDialog/index.js +2 -0
- package/lib/RowExpandEditor/add-btn/index.js +24 -0
- package/lib/RowExpandEditor/add-btn/mb-add-btn/index.css +3 -0
- package/lib/RowExpandEditor/add-btn/mb-add-btn/index.js +19 -0
- package/lib/RowExpandEditor/{RowExpandAddBtn → add-btn/pc-add-btn}/index.js +6 -4
- package/lib/RowExpandEditor/checkbox-editor/index.js +25 -0
- package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.css +6 -0
- package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +36 -0
- package/lib/RowExpandEditor/{RowExpandCheckboxEditor/index.js → checkbox-editor/pc-editor.js} +9 -13
- package/lib/RowExpandEditor/collaborator-editor/index.js +24 -0
- package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.css +9 -0
- package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +163 -0
- package/lib/RowExpandEditor/{RowExpandCollaboratorEditor → collaborator-editor/pc-editor}/index.css +1 -1
- package/lib/RowExpandEditor/{RowExpandCollaboratorEditor → collaborator-editor/pc-editor}/index.js +6 -7
- package/lib/RowExpandEditor/constants.js +34 -34
- package/lib/RowExpandEditor/date-editor/index.js +24 -0
- package/lib/RowExpandEditor/date-editor/mb-editor.js +82 -0
- package/lib/RowExpandEditor/{RowExpandDateEditor/index.js → date-editor/pc-editor.js} +2 -2
- package/lib/RowExpandEditor/department-editor/index.js +24 -0
- package/lib/RowExpandEditor/department-editor/mb-editor.js +65 -0
- package/lib/RowExpandEditor/{RowExpandDepartmentEditor/index.js → department-editor/pc-editor.js} +44 -49
- package/lib/RowExpandEditor/digital-sign-editor/index.js +24 -0
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.css +1 -0
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +130 -0
- package/lib/RowExpandEditor/{RowExpandDigitalSignEditor → digital-sign-editor/pc-editor}/index.css +1 -1
- package/lib/RowExpandEditor/{RowExpandDigitalSignEditor → digital-sign-editor/pc-editor}/index.js +11 -11
- package/lib/RowExpandEditor/duration-editor/index.js +24 -0
- package/lib/RowExpandEditor/duration-editor/mb-editor.js +71 -0
- package/lib/RowExpandEditor/{RowExpandDurationEditor/index.js → duration-editor/pc-editor.js} +2 -2
- package/lib/RowExpandEditor/email-editor/index.js +24 -0
- package/lib/RowExpandEditor/email-editor/mb-editor/index.css +1 -0
- package/lib/RowExpandEditor/email-editor/mb-editor/index.js +84 -0
- package/lib/RowExpandEditor/email-editor/pc-editor/index.css +1 -0
- package/lib/RowExpandEditor/{RowExpandEmailEditor → email-editor/pc-editor}/index.js +3 -3
- package/lib/RowExpandEditor/file-editor/index.js +24 -0
- package/lib/RowExpandEditor/file-editor/mb-editor/index.js +114 -0
- package/lib/RowExpandEditor/file-editor/pc-editor/index.css +1 -0
- package/lib/RowExpandEditor/{RowExpandFileEditor → file-editor/pc-editor}/index.js +9 -9
- package/lib/RowExpandEditor/geolocation-editor/index.js +24 -0
- package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +100 -0
- package/lib/RowExpandEditor/{RowExpandGeolocationEditor → geolocation-editor/pc-editor}/index.js +17 -13
- package/lib/RowExpandEditor/image-editor/index.js +24 -0
- package/lib/RowExpandEditor/image-editor/mb-editor/index.css +30 -0
- package/lib/RowExpandEditor/image-editor/mb-editor/index.js +109 -0
- package/lib/RowExpandEditor/{RowExpandImageEditor → image-editor/pc-editor}/index.js +9 -9
- package/lib/RowExpandEditor/long-text-editor/index.js +24 -0
- package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.css +10 -0
- package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +80 -0
- package/lib/RowExpandEditor/long-text-editor/mb-editor/index.css +3 -0
- package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +91 -0
- package/lib/RowExpandEditor/{RowExpandLongTextEditor → long-text-editor/pc-editor}/index.js +7 -7
- package/lib/RowExpandEditor/multiple-select-editor/index.js +24 -0
- package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +154 -0
- package/lib/RowExpandEditor/{RowExpandMultipleSelectEditor → multiple-select-editor/pc-editor}/index.css +1 -1
- package/lib/RowExpandEditor/{RowExpandMultipleSelectEditor → multiple-select-editor/pc-editor}/index.js +6 -6
- package/lib/RowExpandEditor/number-editor/index.js +24 -0
- package/lib/RowExpandEditor/number-editor/mb-editor/index.css +3 -0
- package/lib/RowExpandEditor/number-editor/mb-editor/index.js +76 -0
- package/lib/RowExpandEditor/{RowExpandNumberEditor/index.js → number-editor/pc-editor.js} +2 -2
- package/lib/RowExpandEditor/rate-editor/index.css +34 -0
- package/lib/RowExpandEditor/rate-editor/index.js +25 -0
- package/lib/RowExpandEditor/rate-editor/mb-editor.js +92 -0
- package/lib/RowExpandEditor/{RowExpandRateEditor/index.js → rate-editor/pc-editor.js} +2 -3
- package/lib/RowExpandEditor/right-angle/index.css +6 -0
- package/lib/RowExpandEditor/right-angle/index.js +17 -0
- package/lib/RowExpandEditor/single-select-editor/index.js +24 -0
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.css +8 -0
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +134 -0
- package/lib/RowExpandEditor/{RowExpandSingleSelectorEditor → single-select-editor/pc-editor}/index.js +17 -17
- package/lib/RowExpandEditor/text-editor/index.js +24 -0
- package/lib/RowExpandEditor/text-editor/mb-editor/index.css +14 -0
- package/lib/RowExpandEditor/text-editor/mb-editor/index.js +37 -0
- package/lib/RowExpandEditor/{RowExpandTextEditor → text-editor/pc-editor}/index.js +7 -7
- package/lib/RowExpandEditor/url-editor/index.js +24 -0
- package/lib/RowExpandEditor/url-editor/mb-editor/index.css +17 -0
- package/lib/RowExpandEditor/url-editor/mb-editor/index.js +87 -0
- package/lib/RowExpandEditor/{RowExpandUrlEditor → url-editor/pc-editor}/index.js +6 -6
- package/lib/RowExpandFormatter/constants.js +17 -17
- package/lib/RowExpandFormatter/department-formatter/index.js +19 -0
- package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +20 -0
- package/lib/RowExpandFormatter/{RowExpandDepartmentFormatter/index.js → department-formatter/pc-formatter.js} +2 -2
- package/lib/RowExpandFormatter/{RowExpandEmailFormatter → email-formatter}/index.css +4 -4
- package/lib/RowExpandFormatter/index.css +33 -18
- package/lib/RowExpandFormatter/index.js +1 -1
- package/lib/RowExpandFormatter/rate-formatter/index.css +5 -0
- package/lib/RowExpandView/body/index.css +173 -0
- package/lib/RowExpandView/body/index.js +111 -0
- package/lib/RowExpandView/column-content/index.css +27 -0
- package/lib/RowExpandView/column-content/index.js +25 -0
- package/lib/RowExpandView/index.css +3 -0
- package/lib/RowExpandView/index.js +178 -0
- package/lib/SelectItem/index.js +57 -33
- package/lib/{Department-editor/selected-departments → SelectedDepartments}/index.css +0 -1
- package/lib/{Department-editor/selected-departments → SelectedDepartments}/index.js +3 -3
- package/lib/SingleSelectEditor/index.js +9 -14
- package/lib/SvgIcon/index.js +2 -1
- package/lib/constants/index.js +3 -2
- package/lib/css/mb-cell-editor.css +1 -1
- package/lib/index.js +62 -6
- package/lib/locales/de.json +3 -1
- package/lib/locales/en.json +3 -1
- package/lib/locales/es.json +3 -1
- package/lib/locales/fr.json +3 -1
- package/lib/locales/pt.json +3 -1
- package/lib/locales/ru.json +3 -1
- package/lib/locales/zh-CN.json +3 -1
- package/lib/select-editor/index.js +27 -20
- package/lib/select-editor/mb-editor/index.css +1 -0
- package/lib/select-editor/mb-editor/index.js +105 -0
- package/lib/select-editor/{pc-select-editor → pc-editor}/index.css +1 -1
- package/lib/select-editor/{pc-select-editor → pc-editor}/index.js +7 -7
- package/lib/utils/editor-utils.js +6 -2
- package/lib/utils/get-event-transfer.js +2 -1
- package/lib/utils/utils.js +11 -2
- package/package.json +5 -5
- package/lib/CollaboratorEditor/mb-collaborator-editor/index.css +0 -85
- package/lib/CollaboratorEditor/mb-collaborator-editor/index.js +0 -148
- package/lib/DateEditor/mb-date-editor-popover/custom-rc-calendar.css +0 -118
- package/lib/DateEditor/mb-date-editor-popover/index.css +0 -45
- package/lib/DateEditor/mb-date-editor-popover/index.js +0 -226
- package/lib/FileEditor/addition-previewer/index.css +0 -1
- package/lib/FileEditor/addition-previewer/local-file-addition/index.css +0 -1
- package/lib/RowExpandEditor/RowExpandEmailEditor/index.css +0 -2
- package/lib/RowExpandEditor/RowExpandFileEditor/index.css +0 -1
- package/lib/RowExpandEditor/RowExpandRateEditor/index.css +0 -13
- package/lib/RowExpandFormatter/RowExpandRateFormatter/index.css +0 -5
- package/lib/select-editor/mb-select-editor/index.css +0 -127
- package/lib/select-editor/mb-select-editor/index.js +0 -197
- package/lib/select-editor/select-editor-option.js +0 -84
- /package/lib/CollaboratorEditor/{pc-collaborator-editor → pc-editor}/index.css +0 -0
- /package/lib/CollaboratorEditor/{pc-collaborator-editor → pc-editor}/index.js +0 -0
- /package/lib/{Department-editor/department-multiple-select → DepartmentMultipleSelectEditor}/index.css +0 -0
- /package/lib/DigitalSignEditor/{index.css → pc-editor/index.css} +0 -0
- /package/lib/FileEditor/files-previewer/{file-previewer → pc-previewer/file-previewer}/file-name-editor/index.css +0 -0
- /package/lib/GeolocationEditor/{map-editor → pc-editor/map-editor}/large-editor/index.css +0 -0
- /package/lib/GeolocationEditor/{map-selection-editor → pc-editor/map-selection-editor}/large-editor/index.css +0 -0
- /package/lib/GeolocationEditor/{parse-geolocation.js → pc-editor/parse-geolocation.js} +0 -0
- /package/lib/GeolocationEditor/{selector-list.js → pc-editor/selector-list.js} +0 -0
- /package/lib/ImageEditor/{addition-previewer → pc-editor/addition-previewer}/image-link/index.css +0 -0
- /package/lib/ImageEditor/{addition-previewer → pc-editor/addition-previewer}/index.css +0 -0
- /package/lib/ImageEditor/{addition-previewer → pc-editor/addition-previewer}/local-image-addition/index.css +0 -0
- /package/lib/LinkEditor/{mb-link-editor-popover → mb-popover}/index.js +0 -0
- /package/lib/LinkEditor/{pc-link-editor-popover → pc-popover}/index.css +0 -0
- /package/lib/LinkEditor/{pc-link-editor-popover → pc-popover}/index.js +0 -0
- /package/lib/RowExpandEditor/{RowExpandAddBtn → add-btn/pc-add-btn}/index.css +0 -0
- /package/lib/RowExpandEditor/{RowExpandCheckboxEditor → checkbox-editor}/index.css +0 -0
- /package/lib/RowExpandEditor/{RowExpandGeolocationEditor → geolocation-editor/pc-editor}/index.css +0 -0
- /package/lib/RowExpandEditor/{RowExpandImageEditor → image-editor/pc-editor}/index.css +0 -0
- /package/lib/RowExpandEditor/{RowExpandLongTextEditor → long-text-editor/pc-editor}/index.css +0 -0
- /package/lib/RowExpandEditor/{RowExpandSingleSelectorEditor → single-select-editor/pc-editor}/index.css +0 -0
- /package/lib/RowExpandEditor/{RowExpandTextEditor → text-editor/pc-editor}/index.css +0 -0
- /package/lib/RowExpandEditor/{RowExpandUrlEditor → url-editor/pc-editor}/index.css +0 -0
- /package/lib/RowExpandFormatter/{RowExpandEmailFormatter → email-formatter}/index.js +0 -0
- /package/lib/RowExpandFormatter/{RowExpandFileFormatter → file-formatter}/index.css +0 -0
- /package/lib/RowExpandFormatter/{RowExpandFileFormatter → file-formatter}/index.js +0 -0
- /package/lib/RowExpandFormatter/{RowExpandFileFormatter → file-formatter}/row-expand-file-item-formatter.js +0 -0
- /package/lib/RowExpandFormatter/{RowExpandFormulaFormatter → formula-formatter}/index.js +0 -0
- /package/lib/RowExpandFormatter/{RowExpandImageFormatter → image-formatter}/index.css +0 -0
- /package/lib/RowExpandFormatter/{RowExpandImageFormatter → image-formatter}/index.js +0 -0
- /package/lib/RowExpandFormatter/{RowExpandImageFormatter → image-formatter}/row-expand-image-item-formatter.js +0 -0
- /package/lib/RowExpandFormatter/{RowExpandLinkFormatter → link-formatter}/collaborator-item-formatter.js +0 -0
- /package/lib/RowExpandFormatter/{RowExpandLinkFormatter → link-formatter}/index.css +0 -0
- /package/lib/RowExpandFormatter/{RowExpandLinkFormatter → link-formatter}/index.js +0 -0
- /package/lib/RowExpandFormatter/{RowExpandLinkFormatter → link-formatter}/value-display-utils.js +0 -0
- /package/lib/RowExpandFormatter/{RowExpandRateFormatter → rate-formatter}/index.js +0 -0
- /package/lib/RowExpandFormatter/{RowExpandUrlFormatter → url-formatter}/index.css +0 -0
- /package/lib/RowExpandFormatter/{RowExpandUrlFormatter → url-formatter}/index.js +0 -0
- /package/lib/{Department-editor/constants.js → constants/departments.js} +0 -0
- /package/lib/{Department-editor/utils.js → utils/departments.js} +0 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _ImagePreviewerLightbox = _interopRequireDefault(require("../../ImagePreviewerLightbox"));
|
|
10
|
+
var _imagePreview = _interopRequireDefault(require("./image-preview"));
|
|
11
|
+
var _DTableCommonAddTool = _interopRequireDefault(require("../../DTableCommonAddTool"));
|
|
12
|
+
var _utils = require("../../utils/utils");
|
|
13
|
+
var _constants = require("../../constants");
|
|
14
|
+
var _lang = require("../../lang");
|
|
15
|
+
require("./index.css");
|
|
16
|
+
class ImagesPreviewer extends _react.default.Component {
|
|
17
|
+
constructor(props) {
|
|
18
|
+
super(props);
|
|
19
|
+
this.handleHistoryBack = e => {
|
|
20
|
+
if (this.state.isShowLargeImage) {
|
|
21
|
+
this.hideLargeImage();
|
|
22
|
+
} else if (this.props.closeEditor) {
|
|
23
|
+
this.props.closeEditor();
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
this.showLargeImage = itemUrl => {
|
|
27
|
+
let {
|
|
28
|
+
value
|
|
29
|
+
} = this.props;
|
|
30
|
+
this.setState({
|
|
31
|
+
isShowLargeImage: true,
|
|
32
|
+
largeImageIndex: value.indexOf(itemUrl)
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
this.hideLargeImage = () => {
|
|
36
|
+
this.setState({
|
|
37
|
+
isShowLargeImage: false,
|
|
38
|
+
largeImageIndex: ''
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
this.moveNext = () => {
|
|
42
|
+
let images = this.props.value;
|
|
43
|
+
this.setState(prevState => ({
|
|
44
|
+
largeImageIndex: (prevState.largeImageIndex + 1) % images.length
|
|
45
|
+
}));
|
|
46
|
+
};
|
|
47
|
+
this.movePrev = () => {
|
|
48
|
+
let images = this.props.value;
|
|
49
|
+
this.setState(prevState => ({
|
|
50
|
+
largeImageIndex: (prevState.largeImageIndex + images.length - 1) % images.length
|
|
51
|
+
}));
|
|
52
|
+
};
|
|
53
|
+
this.togglePreviewer = () => {
|
|
54
|
+
this.props.togglePreviewer(_constants.FILE_EDITOR_STATUS.ADDITION);
|
|
55
|
+
this.props.resetAdditionImage();
|
|
56
|
+
};
|
|
57
|
+
this.deleteImage = (index, type) => {
|
|
58
|
+
this.props.deleteImage(index, type);
|
|
59
|
+
const {
|
|
60
|
+
value
|
|
61
|
+
} = this.props;
|
|
62
|
+
if (index > value.length - 2) {
|
|
63
|
+
if (value.length - 2 < 0) {
|
|
64
|
+
this.hideLargeImage();
|
|
65
|
+
} else {
|
|
66
|
+
this.setState({
|
|
67
|
+
largeImageIndex: 0
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
this.downloadImage = imageItemUrl => {
|
|
73
|
+
let rotateIndex = imageItemUrl.indexOf('?a=');
|
|
74
|
+
if (rotateIndex > -1) {
|
|
75
|
+
imageItemUrl = imageItemUrl.slice(0, rotateIndex);
|
|
76
|
+
}
|
|
77
|
+
let imageUrlSuffix = imageItemUrl.indexOf('?dl=1');
|
|
78
|
+
let downloadUrl = imageUrlSuffix !== -1 ? imageItemUrl : imageItemUrl + '?dl=1';
|
|
79
|
+
(0, _utils.downloadFile)(downloadUrl);
|
|
80
|
+
};
|
|
81
|
+
this.setImageItemIndex = index => {
|
|
82
|
+
this.setState({
|
|
83
|
+
enterImageItemIndex: index
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
this.state = {
|
|
87
|
+
isShowLargeImage: false,
|
|
88
|
+
largeImageIndex: '',
|
|
89
|
+
enterImageItemIndex: -1
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
componentDidMount() {
|
|
93
|
+
if (_constants.isMobile) {
|
|
94
|
+
window.history.pushState(null, null, '#');
|
|
95
|
+
window.addEventListener('popstate', this.handleHistoryBack, false);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
componentWillUnmount() {
|
|
99
|
+
if (_constants.isMobile) {
|
|
100
|
+
window.removeEventListener('popstate', this.handleHistoryBack, false);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
render() {
|
|
104
|
+
let {
|
|
105
|
+
value
|
|
106
|
+
} = this.props;
|
|
107
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
108
|
+
className: "dtable-ui-image-previewer-container"
|
|
109
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
110
|
+
className: "dtable-ui-image-previewer-wrapper ".concat(value.length === 0 && _constants.isMobile ? 'd-none' : '')
|
|
111
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
112
|
+
className: "dtable-ui-image-previewer-content"
|
|
113
|
+
}, value.length > 0 && value.map((imageItemUrl, index) => {
|
|
114
|
+
return /*#__PURE__*/_react.default.createElement(_imagePreview.default, {
|
|
115
|
+
key: imageItemUrl + index,
|
|
116
|
+
imageItemUrl: imageItemUrl,
|
|
117
|
+
value: value,
|
|
118
|
+
itemIndex: index,
|
|
119
|
+
deleteImage: this.props.deleteImage,
|
|
120
|
+
showLargeImage: this.showLargeImage,
|
|
121
|
+
downloadImage: this.downloadImage,
|
|
122
|
+
enterImageItemIndex: this.state.enterImageItemIndex,
|
|
123
|
+
setImageItemIndex: this.setImageItemIndex
|
|
124
|
+
});
|
|
125
|
+
}))), this.state.isShowLargeImage && /*#__PURE__*/_react.default.createElement(_ImagePreviewerLightbox.default, {
|
|
126
|
+
imageItems: value,
|
|
127
|
+
imageIndex: this.state.largeImageIndex,
|
|
128
|
+
closeImagePopup: this.hideLargeImage,
|
|
129
|
+
moveToPrevImage: this.movePrev,
|
|
130
|
+
moveToNextImage: this.moveNext,
|
|
131
|
+
deleteImage: this.props.deleteImage ? this.deleteImage : null,
|
|
132
|
+
downloadImage: this.downloadImage,
|
|
133
|
+
onRotateImage: this.props.onRotateImage
|
|
134
|
+
}), /*#__PURE__*/_react.default.createElement(_DTableCommonAddTool.default, {
|
|
135
|
+
callBack: this.togglePreviewer,
|
|
136
|
+
footerName: (0, _lang.getLocale)('Add_images')
|
|
137
|
+
}));
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
var _default = exports.default = ImagesPreviewer;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
.dtable-ui-image-editor-dialog {
|
|
2
|
+
max-width: 620px;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.dtable-ui-image-editor-modal {
|
|
6
|
+
width: 620px;
|
|
7
|
+
max-height: 620px;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.dtable-ui-image-editor-container {
|
|
12
|
+
width: 100%;
|
|
13
|
+
background-color: #fff;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.dtable-ui-image-addition-container {
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: row;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.dtable-ui-image-editor-dialog .dtable-icon-return {
|
|
22
|
+
color: #666666;
|
|
23
|
+
font-size: 14px;
|
|
24
|
+
}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _reactstrap = require("reactstrap");
|
|
10
|
+
var _imagesPreviewer = _interopRequireDefault(require("../images-previewer"));
|
|
11
|
+
var _additionPreviewer = _interopRequireDefault(require("./addition-previewer"));
|
|
12
|
+
var _constants = require("../../constants");
|
|
13
|
+
var _DTableModalHeader = _interopRequireDefault(require("../../DTableModalHeader"));
|
|
14
|
+
var _lang = require("../../lang");
|
|
15
|
+
var _constants2 = require("../constants");
|
|
16
|
+
require("./index.css");
|
|
17
|
+
class PCImageEditor extends _react.default.Component {
|
|
18
|
+
constructor(props) {
|
|
19
|
+
var _this;
|
|
20
|
+
super(props);
|
|
21
|
+
_this = this;
|
|
22
|
+
this.getValue = () => {
|
|
23
|
+
return this.state.value;
|
|
24
|
+
};
|
|
25
|
+
this.getEditorView = () => {
|
|
26
|
+
const {
|
|
27
|
+
isInModal,
|
|
28
|
+
value
|
|
29
|
+
} = this.props;
|
|
30
|
+
return !value || value.length === 0 || isInModal ? _constants.FILE_EDITOR_STATUS.ADDITION : _constants.FILE_EDITOR_STATUS.PREVIEWER;
|
|
31
|
+
};
|
|
32
|
+
this.deleteImage = function (index) {
|
|
33
|
+
let type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
34
|
+
let uploadLocalImageValue = _this.state.uploadLocalImageValue.slice(0);
|
|
35
|
+
let value = _this.state.value.slice(0);
|
|
36
|
+
if (_this.state.editorView === _constants.FILE_EDITOR_STATUS.PREVIEWER) {
|
|
37
|
+
value.splice(index, 1);
|
|
38
|
+
} else {
|
|
39
|
+
if (type === 'localPicture') {
|
|
40
|
+
uploadLocalImageValue.splice(index, 1);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
_this.setState({
|
|
44
|
+
uploadLocalImageValue: uploadLocalImageValue,
|
|
45
|
+
isUpdated: true,
|
|
46
|
+
value: value
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
this.resetAdditionImage = () => {
|
|
50
|
+
this.setState({
|
|
51
|
+
uploadLocalImageValue: [],
|
|
52
|
+
imageLinkValue: []
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
this.toggle = e => {
|
|
56
|
+
e.stopPropagation();
|
|
57
|
+
if (this.state.isOpen && this.state.isUpdated) {
|
|
58
|
+
if (this.state.editorView === _constants.FILE_EDITOR_STATUS.ADDITION) {
|
|
59
|
+
let {
|
|
60
|
+
value,
|
|
61
|
+
uploadLocalImageValue
|
|
62
|
+
} = this.state;
|
|
63
|
+
let newValue = value.concat(uploadLocalImageValue);
|
|
64
|
+
this.setState({
|
|
65
|
+
value: newValue
|
|
66
|
+
}, () => {
|
|
67
|
+
this.props.isInModal ? this.props.onCommit(this.getValue()) : this.props.onCommit();
|
|
68
|
+
});
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
this.props.isInModal ? this.props.onCommit(this.getValue()) : this.props.onCommit();
|
|
72
|
+
}
|
|
73
|
+
if (this.props.isInModal) {
|
|
74
|
+
this.props.onToggle();
|
|
75
|
+
}
|
|
76
|
+
const nextIsOpen = !this.state.isOpen;
|
|
77
|
+
this.setState({
|
|
78
|
+
isOpen: nextIsOpen
|
|
79
|
+
}, () => {
|
|
80
|
+
if (!nextIsOpen) {
|
|
81
|
+
this.props.onCommitCancel && this.props.onCommitCancel();
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
this.closeEditor = () => {
|
|
86
|
+
this.setState({
|
|
87
|
+
isOpen: false
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
this.togglePreviewer = type => {
|
|
91
|
+
this.setState({
|
|
92
|
+
editorView: type
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
this.fileUploadCompleted = fileMessage => {
|
|
96
|
+
let uploadLocalImageValue = this.state.uploadLocalImageValue.slice(0);
|
|
97
|
+
const imageUrl = fileMessage.url;
|
|
98
|
+
uploadLocalImageValue.push(imageUrl);
|
|
99
|
+
this.setState({
|
|
100
|
+
uploadLocalImageValue: uploadLocalImageValue,
|
|
101
|
+
isUpdated: true
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
this.addUploadedFile = fileMessageList => {
|
|
105
|
+
let uploadLocalImageValue = this.state.uploadLocalImageValue.slice(0);
|
|
106
|
+
// eslint-disable-next-line no-unused-vars
|
|
107
|
+
for (let fileMessage of fileMessageList) {
|
|
108
|
+
uploadLocalImageValue.push(fileMessage.url);
|
|
109
|
+
}
|
|
110
|
+
this.setState({
|
|
111
|
+
uploadLocalImageValue: uploadLocalImageValue,
|
|
112
|
+
isUpdated: true
|
|
113
|
+
});
|
|
114
|
+
};
|
|
115
|
+
this.renderHeader = () => {
|
|
116
|
+
let {
|
|
117
|
+
editorView
|
|
118
|
+
} = this.state;
|
|
119
|
+
if (this.props.isInModal) {
|
|
120
|
+
return /*#__PURE__*/_react.default.createElement("span", null, (0, _lang.getLocale)('Add_images'));
|
|
121
|
+
}
|
|
122
|
+
if (editorView === _constants.FILE_EDITOR_STATUS.PREVIEWER) {
|
|
123
|
+
return /*#__PURE__*/_react.default.createElement("span", null, (0, _lang.getLocale)('All_images'));
|
|
124
|
+
}
|
|
125
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
126
|
+
onClick: this.showImageListPreviewer
|
|
127
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
128
|
+
"aria-hidden": "true",
|
|
129
|
+
className: "dtable-font dtable-icon-return mr-2"
|
|
130
|
+
}), /*#__PURE__*/_react.default.createElement("span", null, (0, _lang.getLocale)('Add_images')));
|
|
131
|
+
};
|
|
132
|
+
this.showImageListPreviewer = () => {
|
|
133
|
+
let {
|
|
134
|
+
value,
|
|
135
|
+
uploadLocalImageValue,
|
|
136
|
+
imageLinkValue
|
|
137
|
+
} = this.state;
|
|
138
|
+
let newValue = value.concat(uploadLocalImageValue, imageLinkValue);
|
|
139
|
+
this.setState({
|
|
140
|
+
value: newValue
|
|
141
|
+
});
|
|
142
|
+
this.togglePreviewer(_constants.FILE_EDITOR_STATUS.PREVIEWER);
|
|
143
|
+
};
|
|
144
|
+
this.saveImageLink = imageUrl => {
|
|
145
|
+
this.setState({
|
|
146
|
+
imageLinkValue: imageUrl,
|
|
147
|
+
isUpdated: true
|
|
148
|
+
});
|
|
149
|
+
this.showImageListPreviewer();
|
|
150
|
+
};
|
|
151
|
+
this.uploadFile = (file, callback) => {
|
|
152
|
+
return this.props.uploadFile(file, _constants2.IMAGES_FOLDER, callback);
|
|
153
|
+
};
|
|
154
|
+
this.state = {
|
|
155
|
+
value: props.value || [],
|
|
156
|
+
editorView: this.getEditorView(),
|
|
157
|
+
isOpen: true,
|
|
158
|
+
isShowFileChooser: false,
|
|
159
|
+
uploadLocalImageValue: [],
|
|
160
|
+
imageLinkValue: [],
|
|
161
|
+
isUpdated: false
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
render() {
|
|
165
|
+
return /*#__PURE__*/_react.default.createElement(_reactstrap.Modal, {
|
|
166
|
+
className: "dtable-ui-image-editor-dialog",
|
|
167
|
+
contentClassName: "dtable-ui-image-editor-modal",
|
|
168
|
+
isOpen: this.state.isOpen,
|
|
169
|
+
toggle: this.toggle
|
|
170
|
+
}, /*#__PURE__*/_react.default.createElement(_DTableModalHeader.default, {
|
|
171
|
+
toggle: this.toggle
|
|
172
|
+
}, this.renderHeader()), /*#__PURE__*/_react.default.createElement(_reactstrap.ModalBody, {
|
|
173
|
+
className: "p-0"
|
|
174
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
175
|
+
className: "dtable-ui-image-editor-container"
|
|
176
|
+
}, this.state.editorView === _constants.FILE_EDITOR_STATUS.PREVIEWER && /*#__PURE__*/_react.default.createElement(_imagesPreviewer.default, {
|
|
177
|
+
value: this.state.value,
|
|
178
|
+
togglePreviewer: this.togglePreviewer,
|
|
179
|
+
deleteImage: this.deleteImage,
|
|
180
|
+
resetAdditionImage: this.resetAdditionImage
|
|
181
|
+
}), this.state.editorView === _constants.FILE_EDITOR_STATUS.ADDITION && /*#__PURE__*/_react.default.createElement(_additionPreviewer.default, {
|
|
182
|
+
deleteImage: this.deleteImage,
|
|
183
|
+
handleFilesChange: this.handleFilesChange,
|
|
184
|
+
uploadLocalImageValue: this.state.uploadLocalImageValue,
|
|
185
|
+
togglePreviewer: this.togglePreviewer,
|
|
186
|
+
saveImageLink: this.saveImageLink,
|
|
187
|
+
fileUploadCompleted: this.fileUploadCompleted,
|
|
188
|
+
addUploadedFile: this.addUploadedFile,
|
|
189
|
+
showImageListPreviewer: this.showImageListPreviewer,
|
|
190
|
+
uploadFile: this.uploadFile
|
|
191
|
+
}))));
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
var _default = exports.default = PCImageEditor;
|
|
@@ -11,6 +11,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
11
11
|
var _DeleteTip = _interopRequireDefault(require("../DeleteTip"));
|
|
12
12
|
var _url = require("../utils/url");
|
|
13
13
|
var _lang = require("../lang");
|
|
14
|
+
var _constants = require("../constants");
|
|
14
15
|
require("./index.css");
|
|
15
16
|
class ImageThumbnail extends _react.default.Component {
|
|
16
17
|
constructor(props) {
|
|
@@ -121,7 +122,7 @@ class ImageThumbnail extends _react.default.Component {
|
|
|
121
122
|
toggle: this.closeTip,
|
|
122
123
|
handleDelete: this.deleteImage,
|
|
123
124
|
deleteTip: this.props.deleteTip || (0, _lang.getLocale)('Are_you_sure_you_want_to_delete_this_image')
|
|
124
|
-
}), this.ref && /*#__PURE__*/_react.default.createElement(_reactstrap.Tooltip, {
|
|
125
|
+
}), !_constants.isMobile && this.ref && /*#__PURE__*/_react.default.createElement(_reactstrap.Tooltip, {
|
|
125
126
|
placement: "bottom",
|
|
126
127
|
isOpen: this.state.isTooltipOpen,
|
|
127
128
|
toggle: this.toggle,
|
package/lib/LinkEditor/index.js
CHANGED
|
@@ -12,8 +12,8 @@ var _dtableUtils = require("dtable-utils");
|
|
|
12
12
|
var _lang = require("../lang");
|
|
13
13
|
var _EditEditorButton = _interopRequireDefault(require("../EditEditorButton"));
|
|
14
14
|
var _linkEditorOption = _interopRequireDefault(require("./link-editor-option"));
|
|
15
|
-
var
|
|
16
|
-
var
|
|
15
|
+
var _pcPopover = _interopRequireDefault(require("./pc-popover"));
|
|
16
|
+
var _mbPopover = _interopRequireDefault(require("./mb-popover"));
|
|
17
17
|
require("./index.css");
|
|
18
18
|
class LinkEditor extends _react.default.Component {
|
|
19
19
|
constructor(props) {
|
|
@@ -238,14 +238,14 @@ class LinkEditor extends _react.default.Component {
|
|
|
238
238
|
});
|
|
239
239
|
})), isPopoverShow && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
240
240
|
query: "(min-width: 768px)"
|
|
241
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
241
|
+
}, /*#__PURE__*/_react.default.createElement(_pcPopover.default, {
|
|
242
242
|
popoverPosition: popoverPosition,
|
|
243
243
|
options: options,
|
|
244
244
|
selectedOptions: selectedOptions,
|
|
245
245
|
onOptionItemToggle: this.onOptionItemToggle
|
|
246
246
|
})), /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
247
|
-
query: "(max-width:
|
|
248
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
247
|
+
query: "(max-width: 768px)"
|
|
248
|
+
}, /*#__PURE__*/_react.default.createElement(_mbPopover.default, {
|
|
249
249
|
isReadOnly: this.props.isReadOnly,
|
|
250
250
|
value: this.state.newValue,
|
|
251
251
|
column: this.props.column,
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
+
require("./index.css");
|
|
11
|
+
const Body = _ref => {
|
|
12
|
+
let {
|
|
13
|
+
classNamePrefix,
|
|
14
|
+
className,
|
|
15
|
+
children
|
|
16
|
+
} = _ref;
|
|
17
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
18
|
+
className: (0, _classnames.default)('dtable-ui-mobile-full-screen-page-body', className, {
|
|
19
|
+
["".concat(classNamePrefix, "-mobile-full-screen-page-body")]: classNamePrefix
|
|
20
|
+
})
|
|
21
|
+
}, children);
|
|
22
|
+
};
|
|
23
|
+
var _default = exports.default = Body;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
.dtable-ui-mobile-full-screen-page-header {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 51px;
|
|
4
|
+
background-color: #fff;
|
|
5
|
+
border-bottom: 1px solid #e9e9e9;
|
|
6
|
+
padding: 0;
|
|
7
|
+
color: #666;
|
|
8
|
+
font-size: 14px;
|
|
9
|
+
display: flex;
|
|
10
|
+
justify-content: space-between;
|
|
11
|
+
flex-shrink: 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.dtable-ui-mobile-full-screen-page-header .dtable-ui-mobile-full-screen-page-header-btn {
|
|
15
|
+
line-height: 24px;
|
|
16
|
+
min-width: 75px;
|
|
17
|
+
padding: 13px 16px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.dtable-ui-mobile-full-screen-page-header .dtable-ui-mobile-full-screen-page-header-btn:hover {
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.dtable-ui-mobile-full-screen-page-header .dtable-ui-mobile-full-screen-page-header-title {
|
|
25
|
+
color: #212529;
|
|
26
|
+
line-height: 50px;
|
|
27
|
+
margin-bottom: 0;
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
text-overflow: ellipsis;
|
|
30
|
+
white-space: nowrap;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.dtable-ui-mobile-full-screen-page-header .dtable-ui-mobile-full-screen-page-header-btn:first-child {
|
|
34
|
+
text-align: left;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.dtable-ui-mobile-full-screen-page-header .dtable-ui-mobile-full-screen-page-header-btn:last-child {
|
|
38
|
+
text-align: right;
|
|
39
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
+
require("./index.css");
|
|
11
|
+
const Header = _ref => {
|
|
12
|
+
let {
|
|
13
|
+
classNamePrefix,
|
|
14
|
+
children,
|
|
15
|
+
onLeftClick,
|
|
16
|
+
onRightClick
|
|
17
|
+
} = _ref;
|
|
18
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
19
|
+
className: (0, _classnames.default)('dtable-ui-mobile-full-screen-page-header p-0', {
|
|
20
|
+
["".concat(classNamePrefix, "-mobile-full-screen-page-header")]: classNamePrefix
|
|
21
|
+
})
|
|
22
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
23
|
+
className: (0, _classnames.default)('dtable-ui-mobile-full-screen-page-header-btn', {
|
|
24
|
+
["".concat(classNamePrefix, "-mobile-full-screen-page-header-btn")]: classNamePrefix
|
|
25
|
+
}),
|
|
26
|
+
onClick: onLeftClick
|
|
27
|
+
}, children[0]), /*#__PURE__*/_react.default.createElement("h4", {
|
|
28
|
+
className: (0, _classnames.default)('dtable-ui-mobile-full-screen-page-header-title', {
|
|
29
|
+
["".concat(classNamePrefix, "-mobile-full-screen-page-header-title")]: classNamePrefix
|
|
30
|
+
})
|
|
31
|
+
}, children[1]), /*#__PURE__*/_react.default.createElement("div", {
|
|
32
|
+
className: (0, _classnames.default)('dtable-ui-mobile-full-screen-page-header-btn', {
|
|
33
|
+
["".concat(classNamePrefix, "-mobile-full-screen-page-header-btn")]: classNamePrefix
|
|
34
|
+
}),
|
|
35
|
+
onClick: onRightClick
|
|
36
|
+
}, children[2]));
|
|
37
|
+
};
|
|
38
|
+
var _default = exports.default = Header;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
var _BodyPortal = _interopRequireDefault(require("../BodyPortal"));
|
|
12
|
+
var _header = _interopRequireDefault(require("./header"));
|
|
13
|
+
var _body = _interopRequireDefault(require("./body"));
|
|
14
|
+
var _utils = require("../utils/utils");
|
|
15
|
+
require("./index.css");
|
|
16
|
+
const MobileFullScreenPage = _ref => {
|
|
17
|
+
let {
|
|
18
|
+
classNamePrefix,
|
|
19
|
+
className,
|
|
20
|
+
style,
|
|
21
|
+
zIndex,
|
|
22
|
+
children,
|
|
23
|
+
onClose,
|
|
24
|
+
historyCallback
|
|
25
|
+
} = _ref;
|
|
26
|
+
const [isMount, setMount] = (0, _react.useState)(false);
|
|
27
|
+
const element = (0, _react.useMemo)(() => {
|
|
28
|
+
let _element = document.createElement('div');
|
|
29
|
+
_element.setAttribute('tabindex', '-1');
|
|
30
|
+
_element.style.position = 'relative';
|
|
31
|
+
_element.style.zIndex = zIndex || 100;
|
|
32
|
+
return _element;
|
|
33
|
+
}, [zIndex]);
|
|
34
|
+
const handelHistoryCallback = (0, _react.useCallback)(event => {
|
|
35
|
+
event.preventDefault();
|
|
36
|
+
if ((0, _utils.isFunction)(historyCallback)) {
|
|
37
|
+
historyCallback();
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
if ((0, _utils.isFunction)(onClose)) {
|
|
41
|
+
onClose();
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
}, [onClose, historyCallback]);
|
|
45
|
+
(0, _react.useEffect)(() => {
|
|
46
|
+
// eslint-disable-next-line no-restricted-globals
|
|
47
|
+
history.pushState(null, null, '#');
|
|
48
|
+
window.addEventListener('popstate', handelHistoryCallback, false);
|
|
49
|
+
return () => {
|
|
50
|
+
window.removeEventListener('popstate', handelHistoryCallback, false);
|
|
51
|
+
};
|
|
52
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
53
|
+
}, [handelHistoryCallback]);
|
|
54
|
+
(0, _react.useEffect)(() => {
|
|
55
|
+
document.body.appendChild(element);
|
|
56
|
+
setMount(true);
|
|
57
|
+
return () => {
|
|
58
|
+
document.body.removeChild(element);
|
|
59
|
+
};
|
|
60
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
61
|
+
}, []);
|
|
62
|
+
return /*#__PURE__*/_react.default.createElement(_BodyPortal.default, {
|
|
63
|
+
node: element
|
|
64
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
65
|
+
className: (0, _classnames.default)('dtable-ui-mobile-full-screen-page', className, {
|
|
66
|
+
["".concat(classNamePrefix, "-mobile-full-screen-page")]: classNamePrefix
|
|
67
|
+
}),
|
|
68
|
+
style: style
|
|
69
|
+
}, isMount && children));
|
|
70
|
+
};
|
|
71
|
+
MobileFullScreenPage.Header = _header.default;
|
|
72
|
+
MobileFullScreenPage.Body = _body.default;
|
|
73
|
+
var _default = exports.default = MobileFullScreenPage;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _Modal = _interopRequireDefault(require("../Modal"));
|
|
10
|
+
class MobileModal extends _react.default.PureComponent {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.handleHistoryBack = e => {
|
|
14
|
+
e.preventDefault();
|
|
15
|
+
this.props.onClose();
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
componentDidMount() {
|
|
19
|
+
window.history.pushState(null, null, '#');
|
|
20
|
+
window.addEventListener('popstate', this.handleHistoryBack, false);
|
|
21
|
+
}
|
|
22
|
+
componentWillUnmount() {
|
|
23
|
+
window.removeEventListener('popstate', this.handleHistoryBack, false);
|
|
24
|
+
}
|
|
25
|
+
render() {
|
|
26
|
+
const {
|
|
27
|
+
children,
|
|
28
|
+
...props
|
|
29
|
+
} = this.props;
|
|
30
|
+
return /*#__PURE__*/_react.default.createElement(_Modal.default, Object.assign({}, props, {
|
|
31
|
+
popup: true
|
|
32
|
+
}), children);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
MobileModal.defaultProps = {
|
|
36
|
+
visible: true,
|
|
37
|
+
animationType: 'slide-up',
|
|
38
|
+
transitionName: 'transitionName',
|
|
39
|
+
maskTransitionName: 'maskTransitionName'
|
|
40
|
+
};
|
|
41
|
+
var _default = exports.default = MobileModal;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
.dtable-ui-mobile-action-sheet .am-action-sheet-button-list {
|
|
2
|
+
text-align: left;
|
|
3
|
+
color: #212529;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.dtable-ui-mobile-action-sheet .am-action-sheet-button-list .am-action-sheet-button-list-item {
|
|
7
|
+
padding: 0;
|
|
8
|
+
height: 44px;
|
|
9
|
+
line-height: 44px;
|
|
10
|
+
font-size: 16px;
|
|
11
|
+
overflow-y: hidden;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
html:not([data-scale]) .dtable-ui-mobile-action-sheet .am-action-sheet-button-list .am-action-sheet-button-list-item::before {
|
|
15
|
+
background-color: #fff;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.dtable-ui-mobile-action-sheet .my-am-action {
|
|
19
|
+
padding: 0 16px;
|
|
20
|
+
align-items: center;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.dtable-ui-mobile-action-sheet .am-action-sheet-button-list .am-action-sheet-button-list-item .dtable-font {
|
|
24
|
+
color: #888;
|
|
25
|
+
font-size: 20px;
|
|
26
|
+
margin-right: 16px;
|
|
27
|
+
}
|