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,79 @@
|
|
|
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 _Picker = _interopRequireDefault(require("../../Picker"));
|
|
11
|
+
var _List = _interopRequireDefault(require("../../List"));
|
|
12
|
+
var _MobileFullScreenPage = _interopRequireDefault(require("../../MobileFullScreenPage"));
|
|
13
|
+
var _lang = require("../../lang");
|
|
14
|
+
const {
|
|
15
|
+
Header,
|
|
16
|
+
Body
|
|
17
|
+
} = _MobileFullScreenPage.default;
|
|
18
|
+
const CountryEditor = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
column,
|
|
21
|
+
value: oldValue,
|
|
22
|
+
getData,
|
|
23
|
+
onToggle,
|
|
24
|
+
onCommit
|
|
25
|
+
} = _ref;
|
|
26
|
+
const [value, setValue] = (0, _react.useState)([]);
|
|
27
|
+
const [isLoading, setLoading] = (0, _react.useState)(true);
|
|
28
|
+
const locations = (0, _react.useRef)([]);
|
|
29
|
+
(0, _react.useEffect)(() => {
|
|
30
|
+
getData().then(data => {
|
|
31
|
+
locations.current = data;
|
|
32
|
+
const continent = data.find(a => a.children.find(b => b.value === (oldValue === null || oldValue === void 0 ? void 0 : oldValue.country_region) || ''));
|
|
33
|
+
const value = [(continent === null || continent === void 0 ? void 0 : continent.value) || '', (oldValue === null || oldValue === void 0 ? void 0 : oldValue.country_region) || ''];
|
|
34
|
+
setValue(value);
|
|
35
|
+
setLoading(false);
|
|
36
|
+
});
|
|
37
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
38
|
+
}, []);
|
|
39
|
+
const onValueChange = (0, _react.useCallback)(newValue => {
|
|
40
|
+
if (value === newValue) return;
|
|
41
|
+
setValue(newValue);
|
|
42
|
+
}, [value]);
|
|
43
|
+
const onSubmit = (0, _react.useCallback)(() => {
|
|
44
|
+
if (value[1] !== (oldValue === null || oldValue === void 0 ? void 0 : oldValue.country_region)) {
|
|
45
|
+
onCommit({
|
|
46
|
+
country_region: value[1]
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
onToggle();
|
|
50
|
+
}, [value, oldValue, onCommit, onToggle]);
|
|
51
|
+
return /*#__PURE__*/_react.default.createElement(_MobileFullScreenPage.default, {
|
|
52
|
+
onClose: onToggle
|
|
53
|
+
}, /*#__PURE__*/_react.default.createElement(Header, {
|
|
54
|
+
onLeftClick: onToggle,
|
|
55
|
+
onRightClick: onSubmit
|
|
56
|
+
}, /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (0, _lang.getLocale)('Cancel')), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, column.name), /*#__PURE__*/_react.default.createElement("span", {
|
|
57
|
+
style: {
|
|
58
|
+
color: '#f09f3f'
|
|
59
|
+
}
|
|
60
|
+
}, (0, _lang.getLocale)('Submit'))), /*#__PURE__*/_react.default.createElement(Body, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
61
|
+
className: "dtable-ui-mobile-row-expand-subtitle"
|
|
62
|
+
}, /*#__PURE__*/_react.default.createElement("span", null, (0, _lang.getLocale)('Address_information'))), /*#__PURE__*/_react.default.createElement(_Picker.default, {
|
|
63
|
+
className: "dtable-ui-mobile-geolocation-editor-picker",
|
|
64
|
+
data: isLoading ? [] : locations.current,
|
|
65
|
+
value: value,
|
|
66
|
+
format: "",
|
|
67
|
+
onChange: onValueChange,
|
|
68
|
+
cascade: true,
|
|
69
|
+
title: (0, _lang.getLocale)('Address_information'),
|
|
70
|
+
extra: (0, _lang.getLocale)('Select_location'),
|
|
71
|
+
onOk: e => onValueChange(e),
|
|
72
|
+
okText: (0, _lang.getLocale)('Done'),
|
|
73
|
+
dismissText: (0, _lang.getLocale)('Cancel'),
|
|
74
|
+
cols: 2
|
|
75
|
+
}, /*#__PURE__*/_react.default.createElement(_List.default.Item, {
|
|
76
|
+
arrow: "horizontal"
|
|
77
|
+
}, value[1] || (0, _lang.getLocale)('Select_location')))));
|
|
78
|
+
};
|
|
79
|
+
var _default = exports.default = CountryEditor;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
.dtable-ui-mobile-geolocation-editor-picker .am-picker-popup-content .am-picker-popup-header-left {
|
|
2
|
+
color: #666666;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.dtable-ui-mobile-geolocation-editor-picker .am-picker-popup-content .am-picker-popup-title {
|
|
6
|
+
color: #212529;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.dtable-ui-mobile-geolocation-editor-picker .am-picker-popup-content .am-picker-popup-header-right {
|
|
10
|
+
color: #e5a252;
|
|
11
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
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 _dtableUtils = require("dtable-utils");
|
|
11
|
+
var _countryEditor = _interopRequireDefault(require("./country-editor"));
|
|
12
|
+
var _provinceEditor = _interopRequireDefault(require("./province-editor"));
|
|
13
|
+
var _provinceCityEditor = _interopRequireDefault(require("./province-city-editor"));
|
|
14
|
+
var _locationEditor = _interopRequireDefault(require("./location-editor"));
|
|
15
|
+
var _mapEditor = _interopRequireDefault(require("./map-editor"));
|
|
16
|
+
var _mapSelectionEditor = _interopRequireDefault(require("./map-selection-editor"));
|
|
17
|
+
require("./index.css");
|
|
18
|
+
const transLocationData = data => {
|
|
19
|
+
if (Object.prototype.toString.call(data) === '[object Object]') {
|
|
20
|
+
const name = data.name;
|
|
21
|
+
data.label = name;
|
|
22
|
+
data.value = name;
|
|
23
|
+
data.name = null;
|
|
24
|
+
if (data.children) {
|
|
25
|
+
data.children.map(child => {
|
|
26
|
+
return transLocationData(child);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return data.children;
|
|
31
|
+
};
|
|
32
|
+
const transCountryData = data => {
|
|
33
|
+
let _data = [];
|
|
34
|
+
for (let key in data) {
|
|
35
|
+
let obj = {};
|
|
36
|
+
let children = [];
|
|
37
|
+
obj.label = key;
|
|
38
|
+
obj.value = key;
|
|
39
|
+
obj.name = null;
|
|
40
|
+
data[key].forEach(item => {
|
|
41
|
+
let obj = {};
|
|
42
|
+
obj.label = item;
|
|
43
|
+
obj.value = item;
|
|
44
|
+
obj.name = null;
|
|
45
|
+
children.push(obj);
|
|
46
|
+
});
|
|
47
|
+
obj.children = children;
|
|
48
|
+
_data.push(obj);
|
|
49
|
+
}
|
|
50
|
+
return _data;
|
|
51
|
+
};
|
|
52
|
+
const MBGeolocationEditor = _ref => {
|
|
53
|
+
let {
|
|
54
|
+
column,
|
|
55
|
+
config,
|
|
56
|
+
getLocationData,
|
|
57
|
+
getCountryData,
|
|
58
|
+
...props
|
|
59
|
+
} = _ref;
|
|
60
|
+
const format = (0, _react.useMemo)(() => {
|
|
61
|
+
let data = column.data || {};
|
|
62
|
+
return data.geo_format ? data.geo_format : _dtableUtils.DEFAULT_GEOLOCATION_FORMAT;
|
|
63
|
+
}, [column]);
|
|
64
|
+
const getData = (0, _react.useCallback)(() => {
|
|
65
|
+
return getLocationData().then(data => transLocationData(data));
|
|
66
|
+
}, [getLocationData]);
|
|
67
|
+
const _getCountryData = (0, _react.useCallback)(() => {
|
|
68
|
+
const columnData = column.data || {};
|
|
69
|
+
const lang = columnData.lang === 'cn' ? 'cn' : 'en';
|
|
70
|
+
return getCountryData(lang).then(data => transCountryData(data));
|
|
71
|
+
}, [column, getCountryData]);
|
|
72
|
+
switch (format) {
|
|
73
|
+
case _dtableUtils.GEOLOCATION_FORMAT.LNG_LAT:
|
|
74
|
+
{
|
|
75
|
+
return /*#__PURE__*/_react.default.createElement(_mapEditor.default, Object.assign({}, props, {
|
|
76
|
+
config: config,
|
|
77
|
+
column: column
|
|
78
|
+
}));
|
|
79
|
+
}
|
|
80
|
+
case _dtableUtils.GEOLOCATION_FORMAT.MAP_SELECTION:
|
|
81
|
+
{
|
|
82
|
+
return /*#__PURE__*/_react.default.createElement(_mapSelectionEditor.default, Object.assign({}, props, {
|
|
83
|
+
config: config,
|
|
84
|
+
column: column
|
|
85
|
+
}));
|
|
86
|
+
}
|
|
87
|
+
case _dtableUtils.GEOLOCATION_FORMAT.COUNTRY_REGION:
|
|
88
|
+
{
|
|
89
|
+
return /*#__PURE__*/_react.default.createElement(_countryEditor.default, Object.assign({}, props, {
|
|
90
|
+
getData: _getCountryData,
|
|
91
|
+
column: column
|
|
92
|
+
}));
|
|
93
|
+
}
|
|
94
|
+
case _dtableUtils.GEOLOCATION_FORMAT.PROVINCE:
|
|
95
|
+
{
|
|
96
|
+
return /*#__PURE__*/_react.default.createElement(_provinceEditor.default, Object.assign({}, props, {
|
|
97
|
+
getData: getData,
|
|
98
|
+
column: column
|
|
99
|
+
}));
|
|
100
|
+
}
|
|
101
|
+
case _dtableUtils.GEOLOCATION_FORMAT.PROVINCE_CITY:
|
|
102
|
+
{
|
|
103
|
+
return /*#__PURE__*/_react.default.createElement(_provinceCityEditor.default, Object.assign({}, props, {
|
|
104
|
+
getData: getData,
|
|
105
|
+
column: column
|
|
106
|
+
}));
|
|
107
|
+
}
|
|
108
|
+
case _dtableUtils.GEOLOCATION_FORMAT.PROVINCE_CITY_DISTRICT:
|
|
109
|
+
{
|
|
110
|
+
return /*#__PURE__*/_react.default.createElement(_locationEditor.default, Object.assign({}, props, {
|
|
111
|
+
getData: getData,
|
|
112
|
+
column: column
|
|
113
|
+
}));
|
|
114
|
+
}
|
|
115
|
+
default:
|
|
116
|
+
{
|
|
117
|
+
return /*#__PURE__*/_react.default.createElement(_locationEditor.default, Object.assign({}, props, {
|
|
118
|
+
isShowDetails: true,
|
|
119
|
+
getData: getData,
|
|
120
|
+
column: column
|
|
121
|
+
}));
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
var _default = exports.default = MBGeolocationEditor;
|
|
@@ -0,0 +1,101 @@
|
|
|
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 _InputItem = _interopRequireDefault(require("../../InputItem"));
|
|
11
|
+
var _Picker = _interopRequireDefault(require("../../Picker"));
|
|
12
|
+
var _List = _interopRequireDefault(require("../../List"));
|
|
13
|
+
var _MobileFullScreenPage = _interopRequireDefault(require("../../MobileFullScreenPage"));
|
|
14
|
+
var _lang = require("../../lang");
|
|
15
|
+
var _objectUtils = _interopRequireDefault(require("../../utils/object-utils"));
|
|
16
|
+
const {
|
|
17
|
+
Header,
|
|
18
|
+
Body
|
|
19
|
+
} = _MobileFullScreenPage.default;
|
|
20
|
+
const LocationEditor = _ref => {
|
|
21
|
+
let {
|
|
22
|
+
isShowDetails,
|
|
23
|
+
column,
|
|
24
|
+
value: oldValue,
|
|
25
|
+
getData,
|
|
26
|
+
onToggle,
|
|
27
|
+
onCommit
|
|
28
|
+
} = _ref;
|
|
29
|
+
let initValue = [(oldValue === null || oldValue === void 0 ? void 0 : oldValue.province) || '', (oldValue === null || oldValue === void 0 ? void 0 : oldValue.city) || '', (oldValue === null || oldValue === void 0 ? void 0 : oldValue.district) || ''];
|
|
30
|
+
if (isShowDetails) {
|
|
31
|
+
initValue.push((oldValue === null || oldValue === void 0 ? void 0 : oldValue.detail) || '');
|
|
32
|
+
}
|
|
33
|
+
const [value, setValue] = (0, _react.useState)(initValue);
|
|
34
|
+
const [isLoading, setLoading] = (0, _react.useState)(true);
|
|
35
|
+
const locations = (0, _react.useRef)([]);
|
|
36
|
+
(0, _react.useEffect)(() => {
|
|
37
|
+
getData().then(data => {
|
|
38
|
+
locations.current = data;
|
|
39
|
+
setLoading(false);
|
|
40
|
+
});
|
|
41
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
42
|
+
}, []);
|
|
43
|
+
const onValueChange = (0, _react.useCallback)(newValue => {
|
|
44
|
+
if (value === newValue) return;
|
|
45
|
+
setValue(newValue);
|
|
46
|
+
}, [value]);
|
|
47
|
+
const onAddressChange = (0, _react.useCallback)(address => {
|
|
48
|
+
const newValue = value.slice(0, 3);
|
|
49
|
+
newValue.push(address);
|
|
50
|
+
setValue(newValue);
|
|
51
|
+
}, [value]);
|
|
52
|
+
const onSubmit = (0, _react.useCallback)(() => {
|
|
53
|
+
let newValue = {
|
|
54
|
+
province: value[0],
|
|
55
|
+
city: value[1],
|
|
56
|
+
district: value[2]
|
|
57
|
+
};
|
|
58
|
+
if (isShowDetails) {
|
|
59
|
+
newValue['detail'] = value[3];
|
|
60
|
+
}
|
|
61
|
+
if (!_objectUtils.default.isSameObject(newValue, oldValue)) {
|
|
62
|
+
onCommit(newValue);
|
|
63
|
+
}
|
|
64
|
+
onToggle();
|
|
65
|
+
}, [isShowDetails, value, oldValue, onCommit, onToggle]);
|
|
66
|
+
return /*#__PURE__*/_react.default.createElement(_MobileFullScreenPage.default, {
|
|
67
|
+
onToggle: onToggle
|
|
68
|
+
}, /*#__PURE__*/_react.default.createElement(Header, {
|
|
69
|
+
onLeftClick: onToggle,
|
|
70
|
+
onRightClick: onSubmit
|
|
71
|
+
}, /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (0, _lang.getLocale)('Cancel')), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, column.name), /*#__PURE__*/_react.default.createElement("span", {
|
|
72
|
+
style: {
|
|
73
|
+
color: '#f09f3f'
|
|
74
|
+
}
|
|
75
|
+
}, (0, _lang.getLocale)('Submit'))), /*#__PURE__*/_react.default.createElement(Body, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
76
|
+
className: "dtable-ui-mobile-row-expand-subtitle"
|
|
77
|
+
}, /*#__PURE__*/_react.default.createElement("span", null, (0, _lang.getLocale)('Address_information'))), /*#__PURE__*/_react.default.createElement(_Picker.default, {
|
|
78
|
+
className: "dtable-ui-mobile-geolocation-editor-picker",
|
|
79
|
+
data: isLoading ? [] : locations.current,
|
|
80
|
+
value: value.slice(0, 3),
|
|
81
|
+
format: "",
|
|
82
|
+
onChange: onValueChange,
|
|
83
|
+
cascade: true,
|
|
84
|
+
title: (0, _lang.getLocale)('Address_information'),
|
|
85
|
+
extra: (0, _lang.getLocale)('Select_location'),
|
|
86
|
+
onOk: e => onValueChange(e),
|
|
87
|
+
okText: (0, _lang.getLocale)('Done'),
|
|
88
|
+
dismissText: (0, _lang.getLocale)('Cancel'),
|
|
89
|
+
cols: 3
|
|
90
|
+
}, /*#__PURE__*/_react.default.createElement(_List.default.Item, {
|
|
91
|
+
arrow: "horizontal"
|
|
92
|
+
}, value.slice(0, 3).join(' ') || (0, _lang.getLocale)('Select_location'))), isShowDetails && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
93
|
+
className: "dtable-ui-mobile-row-expand-subtitle"
|
|
94
|
+
}, /*#__PURE__*/_react.default.createElement("span", null, (0, _lang.getLocale)('Detailed_address'))), /*#__PURE__*/_react.default.createElement(_InputItem.default, {
|
|
95
|
+
placeholder: (0, _lang.getLocale)('Detailed_address_placeholder'),
|
|
96
|
+
value: value[3],
|
|
97
|
+
onChange: onAddressChange,
|
|
98
|
+
moneyKeyboardAlign: "left"
|
|
99
|
+
}))));
|
|
100
|
+
};
|
|
101
|
+
var _default = exports.default = LocationEditor;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
.dtable-ui-mobile-geolocation-map-editor .dtable-ui-mobile-geolocation-map-editor-input-container {
|
|
2
|
+
height: 60px;
|
|
3
|
+
padding-top: 16px;
|
|
4
|
+
width: 100%;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.dtable-ui-mobile-geolocation-map-editor .dtable-ui-mobile-geolocation-map-editor-map {
|
|
8
|
+
flex: 1;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
width: 100%;
|
|
11
|
+
}
|