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
|
@@ -8,9 +8,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _reactstrap = require("reactstrap");
|
|
11
|
-
var _constants = require("
|
|
12
|
-
var _Loading = _interopRequireDefault(require("
|
|
13
|
-
var _lang = require("
|
|
11
|
+
var _constants = require("../../constants");
|
|
12
|
+
var _Loading = _interopRequireDefault(require("../../Loading"));
|
|
13
|
+
var _lang = require("../../lang");
|
|
14
14
|
class CountryEditor extends _react.Component {
|
|
15
15
|
constructor(props) {
|
|
16
16
|
super(props);
|
|
@@ -126,29 +126,6 @@ class CountryEditor extends _react.Component {
|
|
|
126
126
|
}
|
|
127
127
|
}, 300);
|
|
128
128
|
};
|
|
129
|
-
this.getLocationData = () => {
|
|
130
|
-
const {
|
|
131
|
-
config
|
|
132
|
-
} = this.props;
|
|
133
|
-
const {
|
|
134
|
-
mediaUrl
|
|
135
|
-
} = {
|
|
136
|
-
...window.dtable,
|
|
137
|
-
...config
|
|
138
|
-
};
|
|
139
|
-
let geoFileName = 'en-region-location';
|
|
140
|
-
if (this.lang === 'cn') {
|
|
141
|
-
geoFileName = 'cn-region-location';
|
|
142
|
-
}
|
|
143
|
-
return fetch("".concat(mediaUrl, "geo-data/").concat(geoFileName, ".json")).then(res => {
|
|
144
|
-
return res.json();
|
|
145
|
-
}).catch(() => {
|
|
146
|
-
// get locations from local
|
|
147
|
-
return fetch("./geo-data/".concat(geoFileName, ".json")).then(res => {
|
|
148
|
-
return res.json();
|
|
149
|
-
});
|
|
150
|
-
});
|
|
151
|
-
};
|
|
152
129
|
this.createContinentList = () => {
|
|
153
130
|
let isSearchResultEmpty = true;
|
|
154
131
|
const continents = Object.keys(this.filteredCountry);
|
|
@@ -260,33 +237,12 @@ class CountryEditor extends _react.Component {
|
|
|
260
237
|
}
|
|
261
238
|
componentDidMount() {
|
|
262
239
|
document.addEventListener('keydown', this.onHotKey, true);
|
|
263
|
-
|
|
264
|
-
this.geolocationRegions =
|
|
265
|
-
this.filteredCountry = this.geolocationRegions;
|
|
266
|
-
this.setState({
|
|
267
|
-
isLoadingData: false
|
|
268
|
-
});
|
|
269
|
-
return;
|
|
270
|
-
}
|
|
271
|
-
if (this.lang !== 'cn' && window.app.countryListEn) {
|
|
272
|
-
this.geolocationRegions = window.app.countryListEn;
|
|
240
|
+
this.props.getData(this.lang).then(data => {
|
|
241
|
+
this.geolocationRegions = data;
|
|
273
242
|
this.filteredCountry = this.geolocationRegions;
|
|
274
243
|
this.setState({
|
|
275
244
|
isLoadingData: false
|
|
276
245
|
});
|
|
277
|
-
return;
|
|
278
|
-
}
|
|
279
|
-
this.getLocationData().then(data => {
|
|
280
|
-
this.geolocationRegions = data || {};
|
|
281
|
-
this.filteredCountry = this.geolocationRegions;
|
|
282
|
-
if (this.lang === 'cn') {
|
|
283
|
-
window.app.countryListCn = this.geolocationRegions;
|
|
284
|
-
} else {
|
|
285
|
-
window.app.countryListEn = this.geolocationRegions;
|
|
286
|
-
}
|
|
287
|
-
this.setState({
|
|
288
|
-
isLoadingData: false
|
|
289
|
-
});
|
|
290
246
|
});
|
|
291
247
|
}
|
|
292
248
|
componentWillUnmount() {
|
|
@@ -205,7 +205,6 @@
|
|
|
205
205
|
}
|
|
206
206
|
|
|
207
207
|
.dtable-ui-geolocation-map-editor .search-tables-input {
|
|
208
|
-
line-height: 38px;
|
|
209
208
|
padding-right: 30px;
|
|
210
209
|
border-bottom: 0;
|
|
211
210
|
background: #fff;
|
|
@@ -435,7 +434,7 @@
|
|
|
435
434
|
box-shadow: 0 -0 3px rgb(0 0 0 / 30%);
|
|
436
435
|
}
|
|
437
436
|
|
|
438
|
-
.dtable-ui-geolocation-map-editor
|
|
437
|
+
.dtable-ui-geolocation-map-editor-error-message {
|
|
439
438
|
word-break: break-all;
|
|
440
439
|
padding: 10px;
|
|
441
440
|
margin: auto;
|
|
@@ -480,7 +479,7 @@
|
|
|
480
479
|
background-color: #f5f5f5;
|
|
481
480
|
}
|
|
482
481
|
|
|
483
|
-
@media screen and (max-width:
|
|
482
|
+
@media screen and (max-width: 768px) {
|
|
484
483
|
.dtable-ui-geolocation-locate-control,
|
|
485
484
|
.dtable-ui-geolocation-zoom-control .dtable-ui-geolocation-zoom-control-btn {
|
|
486
485
|
margin-bottom: 4px;
|
|
@@ -494,7 +493,7 @@
|
|
|
494
493
|
}
|
|
495
494
|
}
|
|
496
495
|
|
|
497
|
-
@media screen and (min-width:
|
|
496
|
+
@media screen and (min-width: 768px) {
|
|
498
497
|
.dtable-ui-geolocation-locate-control,
|
|
499
498
|
.dtable-ui-geolocation-zoom-control .dtable-ui-geolocation-zoom-control-btn {
|
|
500
499
|
margin-bottom: 4px;
|
|
@@ -0,0 +1,247 @@
|
|
|
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 _dtableUtils = require("dtable-utils");
|
|
10
|
+
var _constants = require("../../constants");
|
|
11
|
+
var _objectUtils = _interopRequireDefault(require("../../utils/object-utils"));
|
|
12
|
+
var _locationEditor = _interopRequireDefault(require("./location-editor"));
|
|
13
|
+
var _mapEditor = _interopRequireDefault(require("./map-editor"));
|
|
14
|
+
var _mapSelectionEditor = _interopRequireDefault(require("./map-selection-editor"));
|
|
15
|
+
var _countryEditor = _interopRequireDefault(require("./country-editor"));
|
|
16
|
+
var _provinceEditor = _interopRequireDefault(require("./province-editor"));
|
|
17
|
+
var _provinceCityEditor = _interopRequireDefault(require("./province-city-editor"));
|
|
18
|
+
require("./index.css");
|
|
19
|
+
class PCGeolocationEditor extends _react.default.Component {
|
|
20
|
+
constructor(_props) {
|
|
21
|
+
super(_props);
|
|
22
|
+
this.onHotKey = e => {
|
|
23
|
+
if (e.keyCode === _constants.KeyCodes.Enter && e.target.tagName !== 'TEXTAREA') {
|
|
24
|
+
this.onSubmit();
|
|
25
|
+
} else if (e.keyCode === _constants.KeyCodes.Escape) {
|
|
26
|
+
if (this.props.isInModal) {
|
|
27
|
+
e.stopPropagation();
|
|
28
|
+
this.onCancel();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
this.getValue = () => {
|
|
33
|
+
return this.value;
|
|
34
|
+
};
|
|
35
|
+
this.setValue = value => {
|
|
36
|
+
this.value = value;
|
|
37
|
+
};
|
|
38
|
+
this.onSubmit = () => {
|
|
39
|
+
if (_objectUtils.default.isSameObject(this.initValue, this.value)) {
|
|
40
|
+
this.onCancel();
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
this.props.onCommit(this.value);
|
|
44
|
+
};
|
|
45
|
+
this.onCancel = () => {
|
|
46
|
+
this.props.onToggle && this.props.onToggle();
|
|
47
|
+
};
|
|
48
|
+
this.setEditorPosition = () => {
|
|
49
|
+
const {
|
|
50
|
+
isInModal
|
|
51
|
+
} = this.props;
|
|
52
|
+
const editorFormat = this.getGeoFormat();
|
|
53
|
+
if (this.ref && (editorFormat === _dtableUtils.GEOLOCATION_FORMAT.COUNTRY_REGION || editorFormat === _dtableUtils.GEOLOCATION_FORMAT.PROVINCE)) {
|
|
54
|
+
let height = 240;
|
|
55
|
+
let width = 200;
|
|
56
|
+
let left = this.ref.parentNode.getBoundingClientRect().x;
|
|
57
|
+
let top = this.ref.parentNode.getBoundingClientRect().y;
|
|
58
|
+
if (isInModal) {
|
|
59
|
+
left = 220;
|
|
60
|
+
}
|
|
61
|
+
if (top + height > window.innerHeight) {
|
|
62
|
+
top = window.innerHeight - height - 35;
|
|
63
|
+
}
|
|
64
|
+
this.setState({
|
|
65
|
+
editorPosition: {
|
|
66
|
+
top,
|
|
67
|
+
left,
|
|
68
|
+
width,
|
|
69
|
+
zIndex: 1000,
|
|
70
|
+
position: 'fixed'
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
if (this.ref && editorFormat === _dtableUtils.GEOLOCATION_FORMAT.PROVINCE_CITY) {
|
|
76
|
+
let height = 215;
|
|
77
|
+
let width = 400;
|
|
78
|
+
let left = this.ref.parentNode.getBoundingClientRect().x;
|
|
79
|
+
let top = this.ref.parentNode.getBoundingClientRect().y;
|
|
80
|
+
if (isInModal) {
|
|
81
|
+
left = 220;
|
|
82
|
+
if (top + height + 35 + 200 > window.innerHeight) {
|
|
83
|
+
top = window.innerHeight - height - 235;
|
|
84
|
+
}
|
|
85
|
+
} else {
|
|
86
|
+
if (top + height + 200 > window.innerHeight) {
|
|
87
|
+
top = window.innerHeight - height - 200 - 5;
|
|
88
|
+
}
|
|
89
|
+
if (left + width > window.innerWidth) {
|
|
90
|
+
left = window.innerWidth - width - 10;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
this.setState({
|
|
94
|
+
editorPosition: {
|
|
95
|
+
top,
|
|
96
|
+
left,
|
|
97
|
+
width,
|
|
98
|
+
zIndex: 1000,
|
|
99
|
+
position: 'fixed'
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
if (this.ref) {
|
|
105
|
+
const isMapTypeEditor = editorFormat === _dtableUtils.GEOLOCATION_FORMAT.LNG_LAT || editorFormat === _dtableUtils.GEOLOCATION_FORMAT.MAP_SELECTION;
|
|
106
|
+
let width = isMapTypeEditor ? 500 : 400;
|
|
107
|
+
let height = isMapTypeEditor ? 454 : 310;
|
|
108
|
+
let geoEditorTop = 0;
|
|
109
|
+
let geoEditorLeft = 0;
|
|
110
|
+
if (isInModal) {
|
|
111
|
+
let innerHeight = window.innerHeight;
|
|
112
|
+
const offsetTop = this.ref.parentNode.getBoundingClientRect().y;
|
|
113
|
+
geoEditorTop = offsetTop;
|
|
114
|
+
geoEditorTop = height + geoEditorTop > innerHeight ? innerHeight - height - 30 : geoEditorTop;
|
|
115
|
+
geoEditorLeft = -30;
|
|
116
|
+
} else {
|
|
117
|
+
let {
|
|
118
|
+
offsetLeft,
|
|
119
|
+
offsetTop
|
|
120
|
+
} = this.ref.parentNode;
|
|
121
|
+
geoEditorLeft = offsetLeft - width;
|
|
122
|
+
geoEditorTop = offsetTop;
|
|
123
|
+
if (offsetLeft < width) {
|
|
124
|
+
geoEditorLeft = offsetLeft + this.props.column.width;
|
|
125
|
+
}
|
|
126
|
+
if (geoEditorLeft + width > window.innerWidth) {
|
|
127
|
+
geoEditorLeft = window.innerWidth - width;
|
|
128
|
+
}
|
|
129
|
+
if (offsetTop + height > window.innerHeight) {
|
|
130
|
+
geoEditorTop = window.innerHeight - height;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
this.setState({
|
|
134
|
+
editorPosition: {
|
|
135
|
+
top: geoEditorTop,
|
|
136
|
+
left: geoEditorLeft,
|
|
137
|
+
zIndex: 1000,
|
|
138
|
+
position: 'fixed'
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
this.getGeoFormat = () => {
|
|
144
|
+
const {
|
|
145
|
+
column
|
|
146
|
+
} = this.props;
|
|
147
|
+
let data = column.data || {};
|
|
148
|
+
return data.geo_format ? data.geo_format : _dtableUtils.DEFAULT_GEOLOCATION_FORMAT;
|
|
149
|
+
};
|
|
150
|
+
this.getLargeEditorState = () => {
|
|
151
|
+
var _this$editor, _this$editor$state;
|
|
152
|
+
return (_this$editor = this.editor) === null || _this$editor === void 0 ? void 0 : (_this$editor$state = _this$editor.state) === null || _this$editor$state === void 0 ? void 0 : _this$editor$state.isShowLargeEditor;
|
|
153
|
+
};
|
|
154
|
+
this.createEditor = () => {
|
|
155
|
+
const geoFormat = this.getGeoFormat();
|
|
156
|
+
const {
|
|
157
|
+
config,
|
|
158
|
+
column,
|
|
159
|
+
getCountryData,
|
|
160
|
+
getLocationData
|
|
161
|
+
} = this.props;
|
|
162
|
+
const props = {
|
|
163
|
+
column,
|
|
164
|
+
config,
|
|
165
|
+
value: this.value,
|
|
166
|
+
setValue: this.setValue,
|
|
167
|
+
onSubmit: this.onSubmit,
|
|
168
|
+
onCancel: this.onCancel
|
|
169
|
+
};
|
|
170
|
+
switch (geoFormat) {
|
|
171
|
+
case _dtableUtils.GEOLOCATION_FORMAT.LNG_LAT:
|
|
172
|
+
{
|
|
173
|
+
return /*#__PURE__*/_react.default.createElement(_mapEditor.default, Object.assign({}, props, {
|
|
174
|
+
ref: ref => this.editor = ref
|
|
175
|
+
}));
|
|
176
|
+
}
|
|
177
|
+
case _dtableUtils.GEOLOCATION_FORMAT.MAP_SELECTION:
|
|
178
|
+
{
|
|
179
|
+
return /*#__PURE__*/_react.default.createElement(_mapSelectionEditor.default, Object.assign({}, props, {
|
|
180
|
+
ref: ref => this.editor = ref
|
|
181
|
+
}));
|
|
182
|
+
}
|
|
183
|
+
case _dtableUtils.GEOLOCATION_FORMAT.COUNTRY_REGION:
|
|
184
|
+
{
|
|
185
|
+
return /*#__PURE__*/_react.default.createElement(_countryEditor.default, Object.assign({}, props, {
|
|
186
|
+
getData: getCountryData,
|
|
187
|
+
ref: ref => this.editor = ref
|
|
188
|
+
}));
|
|
189
|
+
}
|
|
190
|
+
case _dtableUtils.GEOLOCATION_FORMAT.PROVINCE:
|
|
191
|
+
{
|
|
192
|
+
return /*#__PURE__*/_react.default.createElement(_provinceEditor.default, Object.assign({}, props, {
|
|
193
|
+
onPressTab: this.props.onPressTab,
|
|
194
|
+
getData: getLocationData,
|
|
195
|
+
ref: ref => this.editor = ref
|
|
196
|
+
}));
|
|
197
|
+
}
|
|
198
|
+
case _dtableUtils.GEOLOCATION_FORMAT.PROVINCE_CITY:
|
|
199
|
+
{
|
|
200
|
+
return /*#__PURE__*/_react.default.createElement(_provinceCityEditor.default, Object.assign({}, props, {
|
|
201
|
+
getData: getLocationData,
|
|
202
|
+
ref: ref => this.editor = ref
|
|
203
|
+
}));
|
|
204
|
+
}
|
|
205
|
+
case _dtableUtils.GEOLOCATION_FORMAT.PROVINCE_CITY_DISTRICT:
|
|
206
|
+
{
|
|
207
|
+
return /*#__PURE__*/_react.default.createElement(_locationEditor.default, Object.assign({}, props, {
|
|
208
|
+
getData: getLocationData,
|
|
209
|
+
ref: ref => this.editor = ref
|
|
210
|
+
}));
|
|
211
|
+
}
|
|
212
|
+
default:
|
|
213
|
+
{
|
|
214
|
+
return /*#__PURE__*/_react.default.createElement(_locationEditor.default, Object.assign({}, props, {
|
|
215
|
+
isShowDetails: true,
|
|
216
|
+
getData: getLocationData,
|
|
217
|
+
ref: ref => this.editor = ref
|
|
218
|
+
}));
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
this.value = _props.value || {};
|
|
223
|
+
this.initValue = this.value;
|
|
224
|
+
this.state = {
|
|
225
|
+
editorPosition: null
|
|
226
|
+
};
|
|
227
|
+
this.editor = null;
|
|
228
|
+
}
|
|
229
|
+
componentDidMount() {
|
|
230
|
+
this.setEditorPosition();
|
|
231
|
+
document.addEventListener('keydown', this.onHotKey, true);
|
|
232
|
+
}
|
|
233
|
+
componentWillUnmount() {
|
|
234
|
+
document.removeEventListener('keydown', this.onHotKey, true);
|
|
235
|
+
}
|
|
236
|
+
render() {
|
|
237
|
+
const {
|
|
238
|
+
editorPosition
|
|
239
|
+
} = this.state;
|
|
240
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
241
|
+
ref: ref => this.ref = ref,
|
|
242
|
+
style: editorPosition,
|
|
243
|
+
className: "dtable-ui-dtable-ui-geolocation-editor"
|
|
244
|
+
}, this.createEditor());
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
var _default = exports.default = PCGeolocationEditor;
|
|
@@ -8,13 +8,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _reactstrap = require("reactstrap");
|
|
11
|
-
var _DTableCustomFooter = _interopRequireDefault(require("
|
|
11
|
+
var _DTableCustomFooter = _interopRequireDefault(require("../../DTableCustomFooter"));
|
|
12
12
|
var _selectorList = _interopRequireDefault(require("./selector-list"));
|
|
13
13
|
var _selectorHeaderItem = _interopRequireDefault(require("./selector-header-item"));
|
|
14
|
-
var _constants = require("
|
|
15
|
-
var _Loading = _interopRequireDefault(require("
|
|
14
|
+
var _constants = require("../../constants");
|
|
15
|
+
var _Loading = _interopRequireDefault(require("../../Loading"));
|
|
16
16
|
var _parseGeolocation = _interopRequireDefault(require("./parse-geolocation"));
|
|
17
|
-
var _lang = require("
|
|
17
|
+
var _lang = require("../../lang");
|
|
18
18
|
class LocationEditor extends _react.Component {
|
|
19
19
|
constructor(props) {
|
|
20
20
|
super(props);
|
|
@@ -62,21 +62,6 @@ class LocationEditor extends _react.Component {
|
|
|
62
62
|
selectedItem: 'county'
|
|
63
63
|
};
|
|
64
64
|
};
|
|
65
|
-
this.getLocationData = () => {
|
|
66
|
-
const {
|
|
67
|
-
mediaUrl
|
|
68
|
-
} = window.dtable;
|
|
69
|
-
|
|
70
|
-
// get locations from server
|
|
71
|
-
return fetch("".concat(mediaUrl, "geo-data/cn-location.json")).then(res => {
|
|
72
|
-
return res.json();
|
|
73
|
-
}).catch(() => {
|
|
74
|
-
// get locations from local
|
|
75
|
-
return fetch('./geo-data/cn-location.json').then(res => {
|
|
76
|
-
return res.json();
|
|
77
|
-
});
|
|
78
|
-
});
|
|
79
|
-
};
|
|
80
65
|
this.onKeyDown = e => {
|
|
81
66
|
e.stopPropagation();
|
|
82
67
|
e.nativeEvent.stopImmediatePropagation();
|
|
@@ -217,26 +202,8 @@ class LocationEditor extends _react.Component {
|
|
|
217
202
|
this.timer = null;
|
|
218
203
|
}
|
|
219
204
|
UNSAFE_componentWillMount() {
|
|
220
|
-
|
|
221
|
-
this.
|
|
222
|
-
this.locations = data;
|
|
223
|
-
window.app.location = data;
|
|
224
|
-
const {
|
|
225
|
-
selectedProvince,
|
|
226
|
-
selectedCity,
|
|
227
|
-
selectedCounty,
|
|
228
|
-
selectedItem
|
|
229
|
-
} = this.initLocationSelecting(this.value);
|
|
230
|
-
this.setState({
|
|
231
|
-
isLoadingData: false,
|
|
232
|
-
selectedProvince,
|
|
233
|
-
selectedCity,
|
|
234
|
-
selectedCounty,
|
|
235
|
-
selectedItem
|
|
236
|
-
});
|
|
237
|
-
});
|
|
238
|
-
} else {
|
|
239
|
-
this.locations = window.app.location;
|
|
205
|
+
this.props.getData().then(data => {
|
|
206
|
+
this.locations = data;
|
|
240
207
|
const {
|
|
241
208
|
selectedProvince,
|
|
242
209
|
selectedCity,
|
|
@@ -250,7 +217,7 @@ class LocationEditor extends _react.Component {
|
|
|
250
217
|
selectedCounty,
|
|
251
218
|
selectedItem
|
|
252
219
|
});
|
|
253
|
-
}
|
|
220
|
+
});
|
|
254
221
|
}
|
|
255
222
|
render() {
|
|
256
223
|
const {
|
|
@@ -315,7 +282,7 @@ class LocationEditor extends _react.Component {
|
|
|
315
282
|
parent: selectedCity,
|
|
316
283
|
selectedItem: selectedCounty,
|
|
317
284
|
clickHandler: this.selectCounty
|
|
318
|
-
})))), this.props.
|
|
285
|
+
})))), this.props.isShowDetails && /*#__PURE__*/_react.default.createElement("div", {
|
|
319
286
|
className: "dtable-ui-geolocation-editor-item dtable-ui-geolocation-editor-detail"
|
|
320
287
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
321
288
|
className: "dtable-ui-geolocation-editor-item-left"
|
|
@@ -7,13 +7,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _toaster = _interopRequireDefault(require("
|
|
11
|
-
var _Loading = _interopRequireDefault(require("
|
|
12
|
-
var _constants = require("
|
|
13
|
-
var _cell = require("
|
|
14
|
-
var _mapEditorUtils = require("
|
|
10
|
+
var _toaster = _interopRequireDefault(require("../../../toaster"));
|
|
11
|
+
var _Loading = _interopRequireDefault(require("../../../Loading"));
|
|
12
|
+
var _constants = require("../../../constants");
|
|
13
|
+
var _cell = require("../../../utils/cell");
|
|
14
|
+
var _mapEditorUtils = require("../../map-editor-utils");
|
|
15
15
|
var _largeEditor = _interopRequireDefault(require("./large-editor"));
|
|
16
|
-
var _lang = require("
|
|
16
|
+
var _lang = require("../../../lang");
|
|
17
17
|
class MapEditor extends _react.Component {
|
|
18
18
|
constructor(props) {
|
|
19
19
|
super(props);
|
|
@@ -7,12 +7,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _reactstrap = require("reactstrap");
|
|
10
|
-
var _toaster = _interopRequireDefault(require("
|
|
11
|
-
var _Loading = _interopRequireDefault(require("
|
|
12
|
-
var _constants = require("
|
|
13
|
-
var _cell = require("
|
|
14
|
-
var _mapEditorUtils = require("
|
|
15
|
-
var _lang = require("
|
|
10
|
+
var _toaster = _interopRequireDefault(require("../../../../toaster"));
|
|
11
|
+
var _Loading = _interopRequireDefault(require("../../../../Loading"));
|
|
12
|
+
var _constants = require("../../../../constants");
|
|
13
|
+
var _cell = require("../../../../utils/cell");
|
|
14
|
+
var _mapEditorUtils = require("../../../map-editor-utils");
|
|
15
|
+
var _lang = require("../../../../lang");
|
|
16
16
|
require("./index.css");
|
|
17
17
|
class LargeMapEditorDialog extends _react.default.Component {
|
|
18
18
|
constructor(props) {
|
|
@@ -427,7 +427,7 @@ class LargeMapEditorDialog extends _react.default.Component {
|
|
|
427
427
|
}, (0, _lang.getLocale)('Submit'))), /*#__PURE__*/_react.default.createElement("div", {
|
|
428
428
|
className: this.readOnly ? 'geolocation-map-read-only-container' : 'geolocation-map-container-large'
|
|
429
429
|
}, this.mapType && isLoading && /*#__PURE__*/_react.default.createElement(_Loading.default, null), !this.mapType && /*#__PURE__*/_react.default.createElement("div", {
|
|
430
|
-
className: "error-message d-flex justify-content-center mt-9"
|
|
430
|
+
className: "dtable-ui-geolocation-map-editor-error-message d-flex justify-content-center mt-9"
|
|
431
431
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
432
432
|
className: "alert-danger"
|
|
433
433
|
}, (0, _lang.getLocale)('The_map_plugin_is_not_properly_configured_contact_the_administrator'))), !isLoading && this.mapType && /*#__PURE__*/_react.default.createElement("div", {
|
package/lib/GeolocationEditor/{map-selection-editor → pc-editor/map-selection-editor}/index.js
RENAMED
|
@@ -8,13 +8,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _dtableUtils = require("dtable-utils");
|
|
11
|
-
var _toaster = _interopRequireDefault(require("
|
|
12
|
-
var _Loading = _interopRequireDefault(require("
|
|
13
|
-
var _constants = require("
|
|
14
|
-
var _cell = require("
|
|
15
|
-
var _mapEditorUtils = require("
|
|
11
|
+
var _toaster = _interopRequireDefault(require("../../../toaster"));
|
|
12
|
+
var _Loading = _interopRequireDefault(require("../../../Loading"));
|
|
13
|
+
var _constants = require("../../../constants");
|
|
14
|
+
var _cell = require("../../../utils/cell");
|
|
15
|
+
var _mapEditorUtils = require("../../map-editor-utils");
|
|
16
16
|
var _largeEditor = _interopRequireDefault(require("./large-editor"));
|
|
17
|
-
var _lang = require("
|
|
17
|
+
var _lang = require("../../../lang");
|
|
18
18
|
class MapSelectionEditor extends _react.Component {
|
|
19
19
|
constructor(props) {
|
|
20
20
|
super(props);
|
|
@@ -421,7 +421,7 @@ class MapSelectionEditor extends _react.Component {
|
|
|
421
421
|
})))), /*#__PURE__*/_react.default.createElement("div", {
|
|
422
422
|
className: this.readOnly ? 'geolocation-map-selection-read-only-container' : 'geolocation-map-selection-container'
|
|
423
423
|
}, this.mapType && isLoading && /*#__PURE__*/_react.default.createElement(_Loading.default, null), !this.mapType && /*#__PURE__*/_react.default.createElement("div", {
|
|
424
|
-
className: "error-message d-flex justify-content-center mt-9"
|
|
424
|
+
className: "dtable-ui-geolocation-map-editor-error-message d-flex justify-content-center mt-9"
|
|
425
425
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
426
426
|
className: "alert-danger"
|
|
427
427
|
}, (0, _lang.getLocale)('The_map_plugin_is_not_properly_configured_contact_the_administrator'))), !isLoading && this.mapType && /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -8,12 +8,12 @@ exports.default = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _reactstrap = require("reactstrap");
|
|
10
10
|
var _dtableUtils = require("dtable-utils");
|
|
11
|
-
var _toaster = _interopRequireDefault(require("
|
|
12
|
-
var _Loading = _interopRequireDefault(require("
|
|
13
|
-
var _constants = require("
|
|
14
|
-
var _cell = require("
|
|
15
|
-
var _mapEditorUtils = require("
|
|
16
|
-
var _lang = require("
|
|
11
|
+
var _toaster = _interopRequireDefault(require("../../../../toaster"));
|
|
12
|
+
var _Loading = _interopRequireDefault(require("../../../../Loading"));
|
|
13
|
+
var _constants = require("../../../../constants");
|
|
14
|
+
var _cell = require("../../../../utils/cell");
|
|
15
|
+
var _mapEditorUtils = require("../../../map-editor-utils");
|
|
16
|
+
var _lang = require("../../../../lang");
|
|
17
17
|
require("./index.css");
|
|
18
18
|
class LargeMapSelectionEditorDialog extends _react.default.Component {
|
|
19
19
|
constructor(props) {
|
|
@@ -413,7 +413,7 @@ class LargeMapSelectionEditorDialog extends _react.default.Component {
|
|
|
413
413
|
})))), /*#__PURE__*/_react.default.createElement("div", {
|
|
414
414
|
className: this.readOnly ? 'geolocation-map-read-only-container' : 'geolocation-map-container-large'
|
|
415
415
|
}, this.mapType && isLoading && /*#__PURE__*/_react.default.createElement(_Loading.default, null), !this.mapType && /*#__PURE__*/_react.default.createElement("div", {
|
|
416
|
-
className: "error-message d-flex justify-content-center mt-9"
|
|
416
|
+
className: "dtable-ui-geolocation-map-editor-error-message d-flex justify-content-center mt-9"
|
|
417
417
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
418
418
|
className: "alert-danger"
|
|
419
419
|
}, (0, _lang.getLocale)('The_map_plugin_is_not_properly_configured_contact_the_administrator'))), !isLoading && this.mapType && /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -8,13 +8,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _reactstrap = require("reactstrap");
|
|
11
|
-
var _DTableCustomFooter = _interopRequireDefault(require("
|
|
11
|
+
var _DTableCustomFooter = _interopRequireDefault(require("../../DTableCustomFooter"));
|
|
12
12
|
var _selectorList = _interopRequireDefault(require("./selector-list"));
|
|
13
13
|
var _selectorHeaderItem = _interopRequireDefault(require("./selector-header-item"));
|
|
14
|
-
var _Loading = _interopRequireDefault(require("
|
|
14
|
+
var _Loading = _interopRequireDefault(require("../../Loading"));
|
|
15
15
|
var _parseGeolocation = _interopRequireDefault(require("./parse-geolocation"));
|
|
16
|
-
var _constants = require("
|
|
17
|
-
var _lang = require("
|
|
16
|
+
var _constants = require("../../constants");
|
|
17
|
+
var _lang = require("../../lang");
|
|
18
18
|
class ProvinceCityEditor extends _react.Component {
|
|
19
19
|
constructor(props) {
|
|
20
20
|
super(props);
|
|
@@ -50,21 +50,6 @@ class ProvinceCityEditor extends _react.Component {
|
|
|
50
50
|
selectedItem: 'city'
|
|
51
51
|
};
|
|
52
52
|
};
|
|
53
|
-
this.getLocationData = () => {
|
|
54
|
-
const {
|
|
55
|
-
mediaUrl
|
|
56
|
-
} = window.dtable;
|
|
57
|
-
|
|
58
|
-
// get locations from server
|
|
59
|
-
return fetch("".concat(mediaUrl, "geo-data/cn-location.json")).then(res => {
|
|
60
|
-
return res.json();
|
|
61
|
-
}).catch(() => {
|
|
62
|
-
// get locations from local
|
|
63
|
-
return fetch('./geo-data/cn-location.json').then(res => {
|
|
64
|
-
return res.json();
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
};
|
|
68
53
|
this.onToggleSelector = () => {
|
|
69
54
|
this.setState({
|
|
70
55
|
isShowSelector: !this.state.isShowSelector,
|
|
@@ -174,24 +159,8 @@ class ProvinceCityEditor extends _react.Component {
|
|
|
174
159
|
this.isComposing = false;
|
|
175
160
|
}
|
|
176
161
|
componentDidMount() {
|
|
177
|
-
|
|
178
|
-
this.
|
|
179
|
-
this.locations = data;
|
|
180
|
-
window.app.location = data;
|
|
181
|
-
const {
|
|
182
|
-
selectedProvince,
|
|
183
|
-
selectedCity,
|
|
184
|
-
selectedItem
|
|
185
|
-
} = this.initLocationSelecting(this.value);
|
|
186
|
-
this.setState({
|
|
187
|
-
isLoadingData: false,
|
|
188
|
-
selectedProvince,
|
|
189
|
-
selectedCity,
|
|
190
|
-
selectedItem
|
|
191
|
-
});
|
|
192
|
-
});
|
|
193
|
-
} else {
|
|
194
|
-
this.locations = window.app.location;
|
|
162
|
+
this.props.getData().then(data => {
|
|
163
|
+
this.locations = data;
|
|
195
164
|
const {
|
|
196
165
|
selectedProvince,
|
|
197
166
|
selectedCity,
|
|
@@ -203,7 +172,7 @@ class ProvinceCityEditor extends _react.Component {
|
|
|
203
172
|
selectedCity,
|
|
204
173
|
selectedItem
|
|
205
174
|
});
|
|
206
|
-
}
|
|
175
|
+
});
|
|
207
176
|
}
|
|
208
177
|
render() {
|
|
209
178
|
const {
|