dtable-ui-component 6.0.29-beta9 → 6.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ActionSheet/index.js +196 -0
- package/lib/ActionSheet/style/index.css +377 -0
- package/lib/ActivityIndicator/index.css +110 -0
- package/lib/ActivityIndicator/index.js +76 -0
- package/lib/Badge/index.css +98 -0
- package/lib/Badge/index.js +65 -0
- package/lib/CheckboxEditor/index.js +116 -24
- package/lib/CollaboratorEditor/index.js +11 -23
- package/lib/CollaboratorEditor/mb-collaborator-editor/index.css +85 -0
- package/lib/CollaboratorEditor/mb-collaborator-editor/index.js +148 -0
- package/lib/DTableCommonAddTool/index.js +3 -1
- 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 +95 -69
- package/lib/DateEditor/mb-date-editor-popover/custom-rc-calendar.css +118 -0
- package/lib/DateEditor/mb-date-editor-popover/index.css +45 -0
- package/lib/DateEditor/mb-date-editor-popover/index.js +226 -0
- package/lib/DateEditor/{pc-editor.js → pc-date-editor-popover.js} +9 -9
- package/lib/DatePicker/index.js +120 -0
- package/lib/DatePicker/locale/en_US.js +14 -0
- package/lib/DatePicker/locale/ru_RU.js +14 -0
- package/lib/DatePicker/locale/sv_SE.js +14 -0
- package/lib/DatePicker/locale/zh_CN.js +14 -0
- package/lib/DatePicker/style/index.css +298 -0
- package/lib/DatePicker/utils.js +36 -0
- package/lib/{DepartmentMultipleSelectEditor → Department-editor/department-multiple-select}/index.js +6 -6
- package/lib/{DepartmentSingleSelectEditor/pc-editor → Department-editor}/department-single-select.js +7 -7
- package/lib/{DepartmentSingleSelectEditor/pc-editor → Department-editor}/index.css +3 -10
- package/lib/{DepartmentSingleSelectEditor/pc-editor → Department-editor}/index.js +25 -8
- package/lib/{SelectedDepartments → Department-editor/selected-departments}/index.css +1 -0
- package/lib/{SelectedDepartments → Department-editor/selected-departments}/index.js +3 -3
- package/lib/DigitalSignEditor/index.js +171 -24
- package/lib/Drawer/index.css +144 -0
- package/lib/Drawer/index.js +21 -0
- package/lib/FileEditor/addition-previewer/index.css +1 -0
- package/lib/FileEditor/{pc-editor/addition-previewer → addition-previewer}/index.js +1 -1
- package/lib/FileEditor/addition-previewer/local-file-addition/index.css +1 -0
- package/lib/FileEditor/{pc-editor/addition-previewer → addition-previewer}/local-file-addition/index.js +4 -4
- package/lib/FileEditor/files-previewer/{pc-previewer/file-previewer → file-previewer}/dropdown-menu.js +1 -1
- package/lib/FileEditor/files-previewer/{pc-previewer/file-previewer → file-previewer}/file-name-editor/index.js +1 -1
- package/lib/FileEditor/files-previewer/{pc-previewer/file-previewer → file-previewer}/index.css +2 -0
- package/lib/FileEditor/files-previewer/{pc-previewer/file-previewer → file-previewer}/index.js +2 -2
- package/lib/FileEditor/files-previewer/index.js +268 -26
- package/lib/FileEditor/index.css +5 -0
- package/lib/FileEditor/index.js +265 -26
- package/lib/FormulaFormatter/index.css +5 -5
- package/lib/GeolocationEditor/{pc-editor/country-editor.js → country-editor.js} +49 -5
- package/lib/GeolocationEditor/{pc-editor/index.css → index.css} +4 -3
- package/lib/GeolocationEditor/index.js +230 -90
- package/lib/GeolocationEditor/{pc-editor/location-editor.js → location-editor.js} +41 -8
- package/lib/GeolocationEditor/{pc-editor/map-editor → map-editor}/index.js +6 -6
- package/lib/GeolocationEditor/{pc-editor/map-editor → map-editor}/large-editor/index.js +7 -7
- package/lib/GeolocationEditor/map-editor-utils.js +4 -10
- package/lib/GeolocationEditor/{pc-editor/map-selection-editor → map-selection-editor}/index.js +7 -7
- package/lib/GeolocationEditor/{pc-editor/map-selection-editor → map-selection-editor}/large-editor/index.js +7 -7
- package/lib/GeolocationEditor/{pc-editor/province-city-editor.js → province-city-editor.js} +38 -7
- package/lib/GeolocationEditor/{pc-editor/province-editor.js → province-editor.js} +31 -7
- package/lib/GeolocationEditor/{pc-editor/selector-header-item.js → selector-header-item.js} +1 -1
- package/lib/Icon/index.css +50 -0
- package/lib/Icon/index.js +35 -0
- package/lib/Icon/load-sprite.js +56 -0
- package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/image-link/index.js +1 -1
- package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/index.js +1 -1
- package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/local-image-addition/index.js +4 -4
- package/lib/ImageEditor/images-previewer/image-preview/index.js +3 -3
- package/lib/ImageEditor/images-previewer/index.js +4 -9
- package/lib/ImageEditor/index.css +16 -17
- package/lib/ImageEditor/index.js +185 -26
- package/lib/ImageThumbnail/index.js +1 -2
- package/lib/InputItem/custom-input.js +321 -0
- package/lib/InputItem/custom-keyboard.js +162 -0
- package/lib/InputItem/index.js +389 -0
- package/lib/InputItem/input.js +45 -0
- package/lib/InputItem/locale/en_US.js +12 -0
- package/lib/InputItem/locale/ru_RU.js +12 -0
- package/lib/InputItem/locale/sv_SE.js +12 -0
- package/lib/InputItem/locale/zh_CN.js +12 -0
- package/lib/InputItem/portal.js +23 -0
- package/lib/InputItem/style/index.css +524 -0
- package/lib/LinkEditor/index.js +5 -5
- package/lib/LinkEditor/{mb-popover → mb-link-editor-popover}/index.css +1 -1
- package/lib/List/index.css +389 -0
- package/lib/List/index.js +41 -0
- package/lib/List/list-item.js +169 -0
- package/lib/Modal/alert.js +86 -0
- package/lib/Modal/index.js +16 -0
- package/lib/Modal/modal.js +118 -0
- package/lib/Modal/operation.js +81 -0
- package/lib/Modal/prompt.js +211 -0
- package/lib/Modal/style/index.css +593 -0
- package/lib/MultipleSelectEditor/index.js +14 -9
- package/lib/Picker/AbstractPicker.js +190 -0
- package/lib/Picker/index.js +28 -0
- package/lib/Picker/locale/en_US.js +12 -0
- package/lib/Picker/locale/ru_RU.js +12 -0
- package/lib/Picker/locale/sv_SE.js +12 -0
- package/lib/Picker/locale/zh_CN.js +12 -0
- package/lib/Picker/popupProps.js +12 -0
- package/lib/Picker/style/index.css +145 -0
- package/lib/Popover/index.js +63 -0
- package/lib/Popover/item.js +55 -0
- package/lib/Popover/style/index.css +233 -0
- package/lib/Progress/index.css +24 -0
- package/lib/Progress/index.js +66 -0
- package/lib/Radio/Radio.js +47 -0
- package/lib/Radio/RadioItem.js +57 -0
- package/lib/Radio/index.css +92 -0
- package/lib/Radio/index.js +12 -0
- package/lib/RowExpandDialog/column-content/index.js +2 -2
- package/lib/RowExpandDialog/index.js +0 -2
- package/lib/RowExpandEditor/{add-btn/pc-add-btn → RowExpandAddBtn}/index.js +4 -6
- package/lib/RowExpandEditor/{checkbox-editor/pc-editor.js → RowExpandCheckboxEditor/index.js} +13 -9
- package/lib/RowExpandEditor/{collaborator-editor/pc-editor → RowExpandCollaboratorEditor}/index.css +1 -1
- package/lib/RowExpandEditor/{collaborator-editor/pc-editor → RowExpandCollaboratorEditor}/index.js +7 -6
- package/lib/RowExpandEditor/{date-editor/pc-editor.js → RowExpandDateEditor/index.js} +2 -2
- package/lib/RowExpandEditor/{department-editor/pc-editor.js → RowExpandDepartmentEditor/index.js} +49 -44
- package/lib/RowExpandEditor/{digital-sign-editor/pc-editor → RowExpandDigitalSignEditor}/index.css +1 -1
- package/lib/RowExpandEditor/{digital-sign-editor/pc-editor → RowExpandDigitalSignEditor}/index.js +11 -11
- package/lib/RowExpandEditor/{duration-editor/pc-editor.js → RowExpandDurationEditor/index.js} +2 -2
- package/lib/RowExpandEditor/RowExpandEmailEditor/index.css +2 -0
- package/lib/RowExpandEditor/{email-editor/pc-editor → RowExpandEmailEditor}/index.js +3 -3
- package/lib/RowExpandEditor/RowExpandFileEditor/index.css +1 -0
- package/lib/RowExpandEditor/{file-editor/pc-editor → RowExpandFileEditor}/index.js +9 -9
- package/lib/RowExpandEditor/{geolocation-editor/pc-editor → RowExpandGeolocationEditor}/index.js +13 -17
- package/lib/RowExpandEditor/{image-editor/pc-editor → RowExpandImageEditor}/index.js +9 -9
- package/lib/RowExpandEditor/{long-text-editor/pc-editor → RowExpandLongTextEditor}/index.js +7 -7
- package/lib/RowExpandEditor/{multiple-select-editor/pc-editor → RowExpandMultipleSelectEditor}/index.css +1 -1
- package/lib/RowExpandEditor/{multiple-select-editor/pc-editor → RowExpandMultipleSelectEditor}/index.js +6 -6
- package/lib/RowExpandEditor/{number-editor/pc-editor.js → RowExpandNumberEditor/index.js} +2 -2
- package/lib/RowExpandEditor/RowExpandRateEditor/index.css +13 -0
- package/lib/RowExpandEditor/{rate-editor/pc-editor.js → RowExpandRateEditor/index.js} +3 -2
- package/lib/RowExpandEditor/{single-select-editor/pc-editor → RowExpandSingleSelectorEditor}/index.js +17 -17
- package/lib/RowExpandEditor/{text-editor/pc-editor → RowExpandTextEditor}/index.js +7 -7
- package/lib/RowExpandEditor/{url-editor/pc-editor → RowExpandUrlEditor}/index.js +6 -6
- package/lib/RowExpandEditor/constants.js +34 -34
- package/lib/RowExpandFormatter/{department-formatter/pc-formatter.js → RowExpandDepartmentFormatter/index.js} +2 -2
- package/lib/RowExpandFormatter/{email-formatter → RowExpandEmailFormatter}/index.css +4 -4
- package/lib/RowExpandFormatter/RowExpandRateFormatter/index.css +5 -0
- package/lib/RowExpandFormatter/constants.js +17 -17
- package/lib/RowExpandFormatter/index.css +18 -33
- package/lib/RowExpandFormatter/index.js +1 -1
- package/lib/SelectItem/index.js +33 -57
- package/lib/SingleSelectEditor/index.js +14 -9
- package/lib/SvgIcon/index.js +1 -2
- package/lib/TabBar/Tab.js +76 -0
- package/lib/TabBar/index.css +142 -0
- package/lib/TabBar/index.js +129 -0
- package/lib/Tabs/index.css +453 -0
- package/lib/Tabs/index.js +39 -0
- package/lib/TextareaItem/index.css +235 -0
- package/lib/TextareaItem/index.js +231 -0
- package/lib/Toast/index.css +67 -0
- package/lib/Toast/index.js +131 -0
- package/lib/_util/class.js +34 -0
- package/lib/_util/closest.js +17 -0
- package/lib/_util/exenv.js +8 -0
- package/lib/_util/getDataAttr.js +15 -0
- package/lib/_util/getLocale.js +42 -0
- package/lib/constants/index.js +2 -3
- package/lib/css/am.css +390 -0
- package/lib/css/mb-cell-editor.css +1 -1
- package/lib/index.js +100 -51
- package/lib/locales/de.json +1 -3
- package/lib/locales/en.json +1 -3
- package/lib/locales/es.json +1 -3
- package/lib/locales/fr.json +1 -3
- package/lib/locales/pt.json +1 -3
- package/lib/locales/ru.json +1 -3
- package/lib/locales/zh-CN.json +1 -3
- package/lib/select-editor/index.js +20 -27
- package/lib/select-editor/mb-select-editor/index.css +127 -0
- package/lib/select-editor/mb-select-editor/index.js +197 -0
- package/lib/select-editor/{pc-editor → pc-select-editor}/index.css +1 -1
- package/lib/select-editor/{pc-editor → pc-select-editor}/index.js +7 -7
- package/lib/select-editor/select-editor-option.js +84 -0
- package/lib/utils/editor-utils.js +2 -6
- package/lib/utils/get-event-transfer.js +1 -2
- package/lib/utils/utils.js +2 -11
- package/package.json +25 -16
- package/lib/BodyPortal/index.js +0 -29
- package/lib/CheckboxEditor/mb-editor.js +0 -99
- package/lib/CheckboxEditor/pc-editor.js +0 -118
- package/lib/CollaboratorEditor/mb-editor/index.css +0 -41
- package/lib/CollaboratorEditor/mb-editor/index.js +0 -88
- package/lib/DateEditor/mb-editor/custom-rc-calendar.css +0 -118
- package/lib/DateEditor/mb-editor/index.css +0 -39
- package/lib/DateEditor/mb-editor/index.js +0 -215
- package/lib/DepartmentSingleSelectEditor/index.js +0 -34
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.css +0 -4
- package/lib/DepartmentSingleSelectEditor/mb-editor/index.js +0 -230
- package/lib/DigitalSignEditor/mb-editor/index.css +0 -35
- package/lib/DigitalSignEditor/mb-editor/index.js +0 -144
- package/lib/DigitalSignEditor/pc-editor/index.js +0 -181
- package/lib/FileEditor/files-previewer/mb-previewer/file-previewer/index.js +0 -122
- package/lib/FileEditor/files-previewer/mb-previewer/index.css +0 -39
- package/lib/FileEditor/files-previewer/mb-previewer/index.js +0 -64
- package/lib/FileEditor/files-previewer/pc-previewer/index.js +0 -276
- package/lib/FileEditor/mb-editor/index.css +0 -10
- package/lib/FileEditor/mb-editor/index.js +0 -136
- package/lib/FileEditor/pc-editor/addition-previewer/index.css +0 -1
- package/lib/FileEditor/pc-editor/addition-previewer/local-file-addition/index.css +0 -1
- package/lib/FileEditor/pc-editor/index.css +0 -5
- package/lib/FileEditor/pc-editor/index.js +0 -274
- package/lib/GeolocationEditor/mb-editor/country-editor.js +0 -79
- package/lib/GeolocationEditor/mb-editor/index.css +0 -11
- package/lib/GeolocationEditor/mb-editor/index.js +0 -125
- package/lib/GeolocationEditor/mb-editor/location-editor.js +0 -101
- package/lib/GeolocationEditor/mb-editor/map-editor/index.css +0 -11
- package/lib/GeolocationEditor/mb-editor/map-editor/index.js +0 -474
- package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.css +0 -158
- package/lib/GeolocationEditor/mb-editor/map-selection-editor/index.js +0 -530
- package/lib/GeolocationEditor/mb-editor/province-city-editor.js +0 -77
- package/lib/GeolocationEditor/mb-editor/province-editor.js +0 -76
- package/lib/GeolocationEditor/pc-editor/index.js +0 -247
- package/lib/ImageEditor/mb-editor/index.css +0 -29
- package/lib/ImageEditor/mb-editor/index.js +0 -136
- package/lib/ImageEditor/pc-editor/images-previewer/index.js +0 -140
- package/lib/ImageEditor/pc-editor/index.css +0 -24
- package/lib/ImageEditor/pc-editor/index.js +0 -194
- package/lib/MobileFullScreenPage/body/index.css +0 -9
- package/lib/MobileFullScreenPage/body/index.js +0 -23
- package/lib/MobileFullScreenPage/header/index.css +0 -39
- package/lib/MobileFullScreenPage/header/index.js +0 -38
- package/lib/MobileFullScreenPage/index.css +0 -13
- package/lib/MobileFullScreenPage/index.js +0 -73
- package/lib/MobileModal/index.js +0 -41
- package/lib/MobileOperationSheet/index.css +0 -27
- package/lib/MobileOperationSheet/index.js +0 -92
- package/lib/MobileSelector/empty/index.css +0 -3
- package/lib/MobileSelector/empty/index.js +0 -23
- package/lib/MobileSelector/index.css +0 -32
- package/lib/MobileSelector/index.js +0 -57
- package/lib/MobileSelector/option/index.css +0 -28
- package/lib/MobileSelector/option/index.js +0 -36
- package/lib/MobileSelector/options/index.css +0 -8
- package/lib/MobileSelector/options/index.js +0 -18
- package/lib/MobileSelector/search/index.css +0 -7
- package/lib/MobileSelector/search/index.js +0 -26
- package/lib/MobileUpload/index.css +0 -1
- package/lib/MobileUpload/index.js +0 -160
- package/lib/RowExpand/index.js +0 -24
- package/lib/RowExpandEditor/add-btn/index.js +0 -24
- package/lib/RowExpandEditor/add-btn/mb-add-btn/index.css +0 -3
- package/lib/RowExpandEditor/add-btn/mb-add-btn/index.js +0 -19
- package/lib/RowExpandEditor/checkbox-editor/index.js +0 -25
- package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.css +0 -6
- package/lib/RowExpandEditor/checkbox-editor/mb-editor/index.js +0 -36
- package/lib/RowExpandEditor/collaborator-editor/index.js +0 -24
- package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.css +0 -9
- package/lib/RowExpandEditor/collaborator-editor/mb-editor/index.js +0 -163
- package/lib/RowExpandEditor/date-editor/index.js +0 -24
- package/lib/RowExpandEditor/date-editor/mb-editor.js +0 -82
- package/lib/RowExpandEditor/department-editor/index.js +0 -24
- package/lib/RowExpandEditor/department-editor/mb-editor.js +0 -65
- package/lib/RowExpandEditor/digital-sign-editor/index.js +0 -24
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.css +0 -1
- package/lib/RowExpandEditor/digital-sign-editor/mb-editor/index.js +0 -130
- package/lib/RowExpandEditor/duration-editor/index.js +0 -24
- package/lib/RowExpandEditor/duration-editor/mb-editor.js +0 -71
- package/lib/RowExpandEditor/email-editor/index.js +0 -24
- package/lib/RowExpandEditor/email-editor/mb-editor/index.css +0 -1
- package/lib/RowExpandEditor/email-editor/mb-editor/index.js +0 -84
- package/lib/RowExpandEditor/email-editor/pc-editor/index.css +0 -1
- package/lib/RowExpandEditor/file-editor/index.js +0 -24
- package/lib/RowExpandEditor/file-editor/mb-editor/index.js +0 -114
- package/lib/RowExpandEditor/file-editor/pc-editor/index.css +0 -1
- package/lib/RowExpandEditor/geolocation-editor/index.js +0 -24
- package/lib/RowExpandEditor/geolocation-editor/mb-editor/index.js +0 -100
- package/lib/RowExpandEditor/image-editor/index.js +0 -24
- package/lib/RowExpandEditor/image-editor/mb-editor/index.css +0 -30
- package/lib/RowExpandEditor/image-editor/mb-editor/index.js +0 -109
- package/lib/RowExpandEditor/long-text-editor/index.js +0 -24
- package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.css +0 -10
- package/lib/RowExpandEditor/long-text-editor/mb-editor/editor/index.js +0 -80
- package/lib/RowExpandEditor/long-text-editor/mb-editor/index.css +0 -3
- package/lib/RowExpandEditor/long-text-editor/mb-editor/index.js +0 -91
- package/lib/RowExpandEditor/multiple-select-editor/index.js +0 -24
- package/lib/RowExpandEditor/multiple-select-editor/mb-editor/index.js +0 -154
- package/lib/RowExpandEditor/number-editor/index.js +0 -24
- package/lib/RowExpandEditor/number-editor/mb-editor/index.css +0 -3
- package/lib/RowExpandEditor/number-editor/mb-editor/index.js +0 -76
- package/lib/RowExpandEditor/rate-editor/index.css +0 -34
- package/lib/RowExpandEditor/rate-editor/index.js +0 -25
- package/lib/RowExpandEditor/rate-editor/mb-editor.js +0 -92
- package/lib/RowExpandEditor/right-angle/index.css +0 -6
- package/lib/RowExpandEditor/right-angle/index.js +0 -17
- package/lib/RowExpandEditor/single-select-editor/index.js +0 -24
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.css +0 -8
- package/lib/RowExpandEditor/single-select-editor/mb-editor/index.js +0 -134
- package/lib/RowExpandEditor/text-editor/index.js +0 -24
- package/lib/RowExpandEditor/text-editor/mb-editor/index.css +0 -14
- package/lib/RowExpandEditor/text-editor/mb-editor/index.js +0 -37
- package/lib/RowExpandEditor/url-editor/index.js +0 -24
- package/lib/RowExpandEditor/url-editor/mb-editor/index.css +0 -17
- package/lib/RowExpandEditor/url-editor/mb-editor/index.js +0 -87
- package/lib/RowExpandFormatter/department-formatter/index.js +0 -19
- package/lib/RowExpandFormatter/department-formatter/mb-formatter.js +0 -20
- package/lib/RowExpandFormatter/rate-formatter/index.css +0 -5
- package/lib/RowExpandView/body/index.css +0 -173
- package/lib/RowExpandView/body/index.js +0 -111
- package/lib/RowExpandView/column-content/index.css +0 -27
- package/lib/RowExpandView/column-content/index.js +0 -25
- package/lib/RowExpandView/index.css +0 -3
- package/lib/RowExpandView/index.js +0 -178
- package/lib/select-editor/mb-editor/index.css +0 -1
- package/lib/select-editor/mb-editor/index.js +0 -105
- /package/lib/CollaboratorEditor/{pc-editor → pc-collaborator-editor}/index.css +0 -0
- /package/lib/CollaboratorEditor/{pc-editor → pc-collaborator-editor}/index.js +0 -0
- /package/lib/{constants/departments.js → Department-editor/constants.js} +0 -0
- /package/lib/{DepartmentMultipleSelectEditor → Department-editor/department-multiple-select}/index.css +0 -0
- /package/lib/{utils/departments.js → Department-editor/utils.js} +0 -0
- /package/lib/DigitalSignEditor/{pc-editor/index.css → index.css} +0 -0
- /package/lib/FileEditor/files-previewer/{pc-previewer/file-previewer → file-previewer}/file-name-editor/index.css +0 -0
- /package/lib/GeolocationEditor/{pc-editor/map-editor → map-editor}/large-editor/index.css +0 -0
- /package/lib/GeolocationEditor/{pc-editor/map-selection-editor → map-selection-editor}/large-editor/index.css +0 -0
- /package/lib/GeolocationEditor/{pc-editor/parse-geolocation.js → parse-geolocation.js} +0 -0
- /package/lib/GeolocationEditor/{pc-editor/selector-list.js → selector-list.js} +0 -0
- /package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/image-link/index.css +0 -0
- /package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/index.css +0 -0
- /package/lib/ImageEditor/{pc-editor/addition-previewer → addition-previewer}/local-image-addition/index.css +0 -0
- /package/lib/LinkEditor/{mb-popover → mb-link-editor-popover}/index.js +0 -0
- /package/lib/LinkEditor/{pc-popover → pc-link-editor-popover}/index.css +0 -0
- /package/lib/LinkEditor/{pc-popover → pc-link-editor-popover}/index.js +0 -0
- /package/lib/RowExpandEditor/{add-btn/pc-add-btn → RowExpandAddBtn}/index.css +0 -0
- /package/lib/RowExpandEditor/{checkbox-editor → RowExpandCheckboxEditor}/index.css +0 -0
- /package/lib/RowExpandEditor/{geolocation-editor/pc-editor → RowExpandGeolocationEditor}/index.css +0 -0
- /package/lib/RowExpandEditor/{image-editor/pc-editor → RowExpandImageEditor}/index.css +0 -0
- /package/lib/RowExpandEditor/{long-text-editor/pc-editor → RowExpandLongTextEditor}/index.css +0 -0
- /package/lib/RowExpandEditor/{single-select-editor/pc-editor → RowExpandSingleSelectorEditor}/index.css +0 -0
- /package/lib/RowExpandEditor/{text-editor/pc-editor → RowExpandTextEditor}/index.css +0 -0
- /package/lib/RowExpandEditor/{url-editor/pc-editor → RowExpandUrlEditor}/index.css +0 -0
- /package/lib/RowExpandFormatter/{email-formatter → RowExpandEmailFormatter}/index.js +0 -0
- /package/lib/RowExpandFormatter/{file-formatter → RowExpandFileFormatter}/index.css +0 -0
- /package/lib/RowExpandFormatter/{file-formatter → RowExpandFileFormatter}/index.js +0 -0
- /package/lib/RowExpandFormatter/{file-formatter → RowExpandFileFormatter}/row-expand-file-item-formatter.js +0 -0
- /package/lib/RowExpandFormatter/{formula-formatter → RowExpandFormulaFormatter}/index.js +0 -0
- /package/lib/RowExpandFormatter/{image-formatter → RowExpandImageFormatter}/index.css +0 -0
- /package/lib/RowExpandFormatter/{image-formatter → RowExpandImageFormatter}/index.js +0 -0
- /package/lib/RowExpandFormatter/{image-formatter → RowExpandImageFormatter}/row-expand-image-item-formatter.js +0 -0
- /package/lib/RowExpandFormatter/{link-formatter → RowExpandLinkFormatter}/collaborator-item-formatter.js +0 -0
- /package/lib/RowExpandFormatter/{link-formatter → RowExpandLinkFormatter}/index.css +0 -0
- /package/lib/RowExpandFormatter/{link-formatter → RowExpandLinkFormatter}/index.js +0 -0
- /package/lib/RowExpandFormatter/{link-formatter → RowExpandLinkFormatter}/value-display-utils.js +0 -0
- /package/lib/RowExpandFormatter/{rate-formatter → RowExpandRateFormatter}/index.js +0 -0
- /package/lib/RowExpandFormatter/{url-formatter → RowExpandUrlFormatter}/index.css +0 -0
- /package/lib/RowExpandFormatter/{url-formatter → RowExpandUrlFormatter}/index.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,6 +126,29 @@ 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
|
+
};
|
|
129
152
|
this.createContinentList = () => {
|
|
130
153
|
let isSearchResultEmpty = true;
|
|
131
154
|
const continents = Object.keys(this.filteredCountry);
|
|
@@ -237,12 +260,33 @@ class CountryEditor extends _react.Component {
|
|
|
237
260
|
}
|
|
238
261
|
componentDidMount() {
|
|
239
262
|
document.addEventListener('keydown', this.onHotKey, true);
|
|
240
|
-
this.
|
|
241
|
-
this.geolocationRegions =
|
|
263
|
+
if (this.lang === 'cn' && window.app.countryListCn) {
|
|
264
|
+
this.geolocationRegions = window.app.countryListCn;
|
|
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;
|
|
242
273
|
this.filteredCountry = this.geolocationRegions;
|
|
243
274
|
this.setState({
|
|
244
275
|
isLoadingData: false
|
|
245
276
|
});
|
|
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
|
+
});
|
|
246
290
|
});
|
|
247
291
|
}
|
|
248
292
|
componentWillUnmount() {
|
|
@@ -205,6 +205,7 @@
|
|
|
205
205
|
}
|
|
206
206
|
|
|
207
207
|
.dtable-ui-geolocation-map-editor .search-tables-input {
|
|
208
|
+
line-height: 38px;
|
|
208
209
|
padding-right: 30px;
|
|
209
210
|
border-bottom: 0;
|
|
210
211
|
background: #fff;
|
|
@@ -434,7 +435,7 @@
|
|
|
434
435
|
box-shadow: 0 -0 3px rgb(0 0 0 / 30%);
|
|
435
436
|
}
|
|
436
437
|
|
|
437
|
-
.dtable-ui-geolocation-map-editor
|
|
438
|
+
.dtable-ui-geolocation-map-editor .error-message {
|
|
438
439
|
word-break: break-all;
|
|
439
440
|
padding: 10px;
|
|
440
441
|
margin: auto;
|
|
@@ -479,7 +480,7 @@
|
|
|
479
480
|
background-color: #f5f5f5;
|
|
480
481
|
}
|
|
481
482
|
|
|
482
|
-
@media screen and (max-width:
|
|
483
|
+
@media screen and (max-width: 767.8px) {
|
|
483
484
|
.dtable-ui-geolocation-locate-control,
|
|
484
485
|
.dtable-ui-geolocation-zoom-control .dtable-ui-geolocation-zoom-control-btn {
|
|
485
486
|
margin-bottom: 4px;
|
|
@@ -493,7 +494,7 @@
|
|
|
493
494
|
}
|
|
494
495
|
}
|
|
495
496
|
|
|
496
|
-
@media screen and (min-width:
|
|
497
|
+
@media screen and (min-width: 767.8px) {
|
|
497
498
|
.dtable-ui-geolocation-locate-control,
|
|
498
499
|
.dtable-ui-geolocation-zoom-control .dtable-ui-geolocation-zoom-control-btn {
|
|
499
500
|
margin-bottom: 4px;
|
|
@@ -1,100 +1,240 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
var _react =
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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 GeolocationEditor 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
|
+
}
|
|
24
31
|
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
// get locations from server
|
|
36
|
-
return res.json();
|
|
37
|
-
}).catch(() => {
|
|
38
|
-
// get locations from local
|
|
39
|
-
return fetch('./geo-data/cn-location.json').then(res => {
|
|
40
|
-
return res.json();
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
}, [config]);
|
|
44
|
-
const getCountryData = (0, _react.useCallback)(lang => {
|
|
45
|
-
if (lang === 'cn' && window.app.countryListCn) return new Promise((resolve, reject) => {
|
|
46
|
-
resolve(window.app.countryListCn);
|
|
47
|
-
});
|
|
48
|
-
if (lang !== 'cn' && window.app.countryListEn) return new Promise((resolve, reject) => {
|
|
49
|
-
resolve(window.app.countryListEn);
|
|
50
|
-
});
|
|
51
|
-
const {
|
|
52
|
-
mediaUrl
|
|
53
|
-
} = config;
|
|
54
|
-
const geoFileName = lang === 'cn' ? 'cn-region-location' : 'en-region-location';
|
|
55
|
-
return fetch("".concat(mediaUrl, "geo-data/").concat(geoFileName, ".json")).then(res => {
|
|
56
|
-
return res.json();
|
|
57
|
-
}).catch(() => {
|
|
58
|
-
// get locations from local
|
|
59
|
-
return fetch("./geo-data/".concat(geoFileName, ".json")).then(res => {
|
|
60
|
-
return res.json();
|
|
61
|
-
});
|
|
62
|
-
}).then(res => {
|
|
63
|
-
const data = res || {};
|
|
64
|
-
if (lang === 'cn') {
|
|
65
|
-
window.app.countryListCn = data;
|
|
66
|
-
} else {
|
|
67
|
-
window.app.countryListEn = data;
|
|
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;
|
|
68
42
|
}
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
43
|
+
this.props.onCommit(this.value);
|
|
44
|
+
};
|
|
45
|
+
this.onCancel = () => {
|
|
46
|
+
this.props.onCommitCancel && this.props.onCommitCancel();
|
|
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
|
+
} = this.props;
|
|
160
|
+
const props = {
|
|
161
|
+
column,
|
|
162
|
+
config,
|
|
163
|
+
value: this.value,
|
|
164
|
+
setValue: this.setValue,
|
|
165
|
+
onSubmit: this.onSubmit,
|
|
166
|
+
onCancel: this.onCancel
|
|
167
|
+
};
|
|
168
|
+
switch (geoFormat) {
|
|
169
|
+
case _dtableUtils.GEOLOCATION_FORMAT.LNG_LAT:
|
|
170
|
+
{
|
|
171
|
+
return /*#__PURE__*/_react.default.createElement(_mapEditor.default, Object.assign({}, props, {
|
|
172
|
+
ref: ref => this.editor = ref
|
|
173
|
+
}));
|
|
174
|
+
}
|
|
175
|
+
case _dtableUtils.GEOLOCATION_FORMAT.MAP_SELECTION:
|
|
176
|
+
{
|
|
177
|
+
return /*#__PURE__*/_react.default.createElement(_mapSelectionEditor.default, Object.assign({}, props, {
|
|
178
|
+
ref: ref => this.editor = ref
|
|
179
|
+
}));
|
|
180
|
+
}
|
|
181
|
+
case _dtableUtils.GEOLOCATION_FORMAT.COUNTRY_REGION:
|
|
182
|
+
{
|
|
183
|
+
return /*#__PURE__*/_react.default.createElement(_countryEditor.default, Object.assign({}, props, {
|
|
184
|
+
ref: ref => this.editor = ref
|
|
185
|
+
}));
|
|
186
|
+
}
|
|
187
|
+
case _dtableUtils.GEOLOCATION_FORMAT.PROVINCE:
|
|
188
|
+
{
|
|
189
|
+
return /*#__PURE__*/_react.default.createElement(_provinceEditor.default, Object.assign({}, props, {
|
|
190
|
+
onPressTab: this.props.onPressTab,
|
|
191
|
+
ref: ref => this.editor = ref
|
|
192
|
+
}));
|
|
193
|
+
}
|
|
194
|
+
case _dtableUtils.GEOLOCATION_FORMAT.PROVINCE_CITY:
|
|
195
|
+
{
|
|
196
|
+
return /*#__PURE__*/_react.default.createElement(_provinceCityEditor.default, Object.assign({}, props, {
|
|
197
|
+
ref: ref => this.editor = ref
|
|
198
|
+
}));
|
|
199
|
+
}
|
|
200
|
+
case _dtableUtils.GEOLOCATION_FORMAT.PROVINCE_CITY_DISTRICT:
|
|
201
|
+
{
|
|
202
|
+
return /*#__PURE__*/_react.default.createElement(_locationEditor.default, Object.assign({}, props, {
|
|
203
|
+
ref: ref => this.editor = ref
|
|
204
|
+
}));
|
|
205
|
+
}
|
|
206
|
+
default:
|
|
207
|
+
{
|
|
208
|
+
return /*#__PURE__*/_react.default.createElement(_locationEditor.default, Object.assign({}, props, {
|
|
209
|
+
isShowAddressDetail: true,
|
|
210
|
+
ref: ref => this.editor = ref
|
|
211
|
+
}));
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
this.value = _props.value || {};
|
|
216
|
+
this.initValue = this.value;
|
|
217
|
+
this.state = {
|
|
218
|
+
editorPosition: null
|
|
219
|
+
};
|
|
220
|
+
this.editor = null;
|
|
221
|
+
}
|
|
222
|
+
componentDidMount() {
|
|
223
|
+
this.setEditorPosition();
|
|
224
|
+
document.addEventListener('keydown', this.onHotKey, true);
|
|
225
|
+
}
|
|
226
|
+
componentWillUnmount() {
|
|
227
|
+
document.removeEventListener('keydown', this.onHotKey, true);
|
|
228
|
+
}
|
|
229
|
+
render() {
|
|
230
|
+
const {
|
|
231
|
+
editorPosition
|
|
232
|
+
} = this.state;
|
|
233
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
234
|
+
ref: ref => this.ref = ref,
|
|
235
|
+
style: editorPosition,
|
|
236
|
+
className: "dtable-ui-dtable-ui-geolocation-editor"
|
|
237
|
+
}, this.createEditor());
|
|
238
|
+
}
|
|
239
|
+
}
|
|
100
240
|
var _default = exports.default = GeolocationEditor;
|
|
@@ -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,6 +62,21 @@ 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
|
+
};
|
|
65
80
|
this.onKeyDown = e => {
|
|
66
81
|
e.stopPropagation();
|
|
67
82
|
e.nativeEvent.stopImmediatePropagation();
|
|
@@ -202,8 +217,26 @@ class LocationEditor extends _react.Component {
|
|
|
202
217
|
this.timer = null;
|
|
203
218
|
}
|
|
204
219
|
UNSAFE_componentWillMount() {
|
|
205
|
-
|
|
206
|
-
this.
|
|
220
|
+
if (!window.app.location) {
|
|
221
|
+
this.getLocationData().then(data => {
|
|
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;
|
|
207
240
|
const {
|
|
208
241
|
selectedProvince,
|
|
209
242
|
selectedCity,
|
|
@@ -217,7 +250,7 @@ class LocationEditor extends _react.Component {
|
|
|
217
250
|
selectedCounty,
|
|
218
251
|
selectedItem
|
|
219
252
|
});
|
|
220
|
-
}
|
|
253
|
+
}
|
|
221
254
|
}
|
|
222
255
|
render() {
|
|
223
256
|
const {
|
|
@@ -282,7 +315,7 @@ class LocationEditor extends _react.Component {
|
|
|
282
315
|
parent: selectedCity,
|
|
283
316
|
selectedItem: selectedCounty,
|
|
284
317
|
clickHandler: this.selectCounty
|
|
285
|
-
})))), this.props.
|
|
318
|
+
})))), this.props.isShowAddressDetail && /*#__PURE__*/_react.default.createElement("div", {
|
|
286
319
|
className: "dtable-ui-geolocation-editor-item dtable-ui-geolocation-editor-detail"
|
|
287
320
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
288
321
|
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: "
|
|
430
|
+
className: "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", {
|
|
@@ -3,11 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.locateCurrentPosition = exports.loadMapSource = exports.getMineMapUrl = exports.getMapInfo = exports.getInitCenter = exports.MAP_TYPES = exports.
|
|
7
|
-
const INPUT_MODE_MAP = exports.INPUT_MODE_MAP = {
|
|
8
|
-
ANY_LOCATION: 'any_location',
|
|
9
|
-
ONLY_MOBILE_POSITIONING: 'only_mobile_positioning'
|
|
10
|
-
};
|
|
6
|
+
exports.locateCurrentPosition = exports.loadMapSource = exports.getMineMapUrl = exports.getMapInfo = exports.getInitCenter = exports.MAP_TYPES = exports.DOMESTIC_MAP_TYPE = void 0;
|
|
11
7
|
const MAP_TYPES = exports.MAP_TYPES = {
|
|
12
8
|
B_MAP: 'b_map',
|
|
13
9
|
// baidu
|
|
@@ -26,12 +22,11 @@ const MINE_MAP_ONLINE_SERVICE = {
|
|
|
26
22
|
SERVICE_URL: 'https://service.minedata.cn/service'
|
|
27
23
|
};
|
|
28
24
|
const getMineMapUrl = function () {
|
|
29
|
-
var _window;
|
|
30
25
|
let config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
31
26
|
const {
|
|
32
27
|
dtableMineMapCustomConfig = {}
|
|
33
28
|
} = {
|
|
34
|
-
...
|
|
29
|
+
...window.dtable,
|
|
35
30
|
...config
|
|
36
31
|
};
|
|
37
32
|
const {
|
|
@@ -71,14 +66,13 @@ const getInitCenter = function () {
|
|
|
71
66
|
};
|
|
72
67
|
exports.getInitCenter = getInitCenter;
|
|
73
68
|
const getMapInfo = function () {
|
|
74
|
-
var _window2;
|
|
75
69
|
let config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
76
70
|
const {
|
|
77
71
|
dtableBaiduMapKey: baiduMapKey,
|
|
78
72
|
dtableGoogleMapKey: googleMapKey,
|
|
79
73
|
dtableMineMapKey: mineMapKey
|
|
80
74
|
} = {
|
|
81
|
-
...
|
|
75
|
+
...window.dtable,
|
|
82
76
|
...config
|
|
83
77
|
};
|
|
84
78
|
let mapType;
|
|
@@ -105,7 +99,7 @@ const loadMapSource = (mapType, mapKey, callback) => {
|
|
|
105
99
|
let script = document.createElement('script');
|
|
106
100
|
script.type = 'text/javascript';
|
|
107
101
|
if (mapType === MAP_TYPES.B_MAP) {
|
|
108
|
-
scriptUrl = "https://api.map.baidu.com/api?v=3.0&ak=".concat(mapKey, "&callback=renderBaiduMap");
|
|
102
|
+
scriptUrl = "https://api.map.baidu.com/api?v=3.0&ak=".concat(mapKey, "}&callback=renderBaiduMap");
|
|
109
103
|
} else if (mapType === MAP_TYPES.G_MAP) {
|
|
110
104
|
scriptUrl = "https://maps.googleapis.com/maps/api/js?key=".concat(mapKey, "&callback=renderGoogleMap&libraries=&v=weekly");
|
|
111
105
|
} else {
|
package/lib/GeolocationEditor/{pc-editor/map-selection-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: "
|
|
424
|
+
className: "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", {
|