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
|
@@ -1,247 +0,0 @@
|
|
|
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;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
.dtable-ui-mobile-image-editor .dtable-ui-image-previewer-container {
|
|
2
|
-
width: 100%;
|
|
3
|
-
margin-top: 20px;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.dtable-ui-mobile-image-editor .dtable-ui-image-previewer-container .dtable-ui-image-previewer-wrapper {
|
|
7
|
-
background-color: #fff;
|
|
8
|
-
width: 100%;
|
|
9
|
-
border-top: 1px solid rgb(233, 233, 233);
|
|
10
|
-
border-bottom: 1px solid rgb(233, 233, 233);
|
|
11
|
-
height: fit-content;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.dtable-ui-mobile-image-editor .dtable-ui-image-previewer-container .dtable-ui-image-previewer-box {
|
|
15
|
-
margin-right: 0;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.dtable-ui-mobile-image-editor .dtable-ui-image-previewer-container .dtable-ui-image-previewer-box:nth-child(even) {
|
|
19
|
-
margin-left: 15px;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.dtable-ui-mobile-image-editor .dtable-ui-image-previewer-container .add-item-btn {
|
|
23
|
-
margin-top: 20px;
|
|
24
|
-
border-bottom: 1px solid #dedede;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.dtable-ui-mobile-image-editor .dtable-ui-image-previewer-container .add-item-btn:hover {
|
|
28
|
-
background-color: #fff;
|
|
29
|
-
}
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
var _activityIndicator = _interopRequireDefault(require("antd-mobile/lib/activity-indicator"));
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
var _MobileFullScreenPage = _interopRequireDefault(require("../../MobileFullScreenPage"));
|
|
12
|
-
var _imagesPreviewer = _interopRequireDefault(require("../images-previewer"));
|
|
13
|
-
var _MobileUpload = _interopRequireDefault(require("../../MobileUpload"));
|
|
14
|
-
var _toaster = _interopRequireDefault(require("../../toaster"));
|
|
15
|
-
var _utils = require("../../utils/utils");
|
|
16
|
-
var _lang = require("../../lang");
|
|
17
|
-
require("./index.css");
|
|
18
|
-
const {
|
|
19
|
-
Header,
|
|
20
|
-
Body
|
|
21
|
-
} = _MobileFullScreenPage.default;
|
|
22
|
-
const MBImageEditor = _ref => {
|
|
23
|
-
let {
|
|
24
|
-
value: oldValue,
|
|
25
|
-
column,
|
|
26
|
-
config,
|
|
27
|
-
onToggle,
|
|
28
|
-
onCommit,
|
|
29
|
-
uploadFile
|
|
30
|
-
} = _ref;
|
|
31
|
-
const [value, setValue] = (0, _react.useState)(oldValue || []);
|
|
32
|
-
const [isShowEditor, setShowEditor] = (0, _react.useState)(false);
|
|
33
|
-
const [uploadLocalImages, setUploadLocalImages] = (0, _react.useState)([]);
|
|
34
|
-
const [isUploading, setUploading] = (0, _react.useState)(false);
|
|
35
|
-
const uploadingFilesCount = (0, _react.useRef)(0);
|
|
36
|
-
const uploadedFilesCount = (0, _react.useRef)(0);
|
|
37
|
-
const {
|
|
38
|
-
mediaUrl
|
|
39
|
-
} = config || {};
|
|
40
|
-
const resetAdditionImage = (0, _react.useCallback)(() => {
|
|
41
|
-
setUploadLocalImages([]);
|
|
42
|
-
}, []);
|
|
43
|
-
const openEditor = (0, _react.useCallback)(() => {
|
|
44
|
-
setShowEditor(true);
|
|
45
|
-
}, []);
|
|
46
|
-
const closeEditor = (0, _react.useCallback)(() => {
|
|
47
|
-
setShowEditor(false);
|
|
48
|
-
}, []);
|
|
49
|
-
const deleteImage = (0, _react.useCallback)(index => {
|
|
50
|
-
const newValue = value.slice(0);
|
|
51
|
-
newValue.splice(index, 1);
|
|
52
|
-
setValue(newValue);
|
|
53
|
-
onCommit(newValue);
|
|
54
|
-
}, [value, onCommit]);
|
|
55
|
-
const onChange = (0, _react.useCallback)(() => {
|
|
56
|
-
const newValue = value.concat(uploadLocalImages);
|
|
57
|
-
setValue(newValue);
|
|
58
|
-
onCommit(newValue);
|
|
59
|
-
setShowEditor(false);
|
|
60
|
-
}, [value, uploadLocalImages, onCommit]);
|
|
61
|
-
const uploadImage = (0, _react.useCallback)(file => {
|
|
62
|
-
uploadFile(file).then(res => {
|
|
63
|
-
const fileInfo = res;
|
|
64
|
-
const newUploadLocalImages = uploadLocalImages.slice(0);
|
|
65
|
-
newUploadLocalImages.push(fileInfo.url);
|
|
66
|
-
setUploadLocalImages(newUploadLocalImages);
|
|
67
|
-
uploadedFilesCount.current = uploadedFilesCount.current + 1;
|
|
68
|
-
}).catch(error => {
|
|
69
|
-
let errMsg = (0, _utils.getErrorMsg)(error, true);
|
|
70
|
-
if (!error.response || error.response.status !== 403) {
|
|
71
|
-
_toaster.default.danger((0, _lang.getLocale)(errMsg));
|
|
72
|
-
}
|
|
73
|
-
uploadedFilesCount.current = uploadedFilesCount.current + 1;
|
|
74
|
-
});
|
|
75
|
-
}, [uploadFile, uploadLocalImages]);
|
|
76
|
-
const onFilesChange = (0, _react.useCallback)(function () {
|
|
77
|
-
let files = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
78
|
-
setUploading(true);
|
|
79
|
-
uploadingFilesCount.current = files.length;
|
|
80
|
-
uploadedFilesCount.current = 0;
|
|
81
|
-
for (let i = 0; i < uploadingFilesCount.current; i++) {
|
|
82
|
-
const file = files[i];
|
|
83
|
-
const reader = new FileReader();
|
|
84
|
-
reader.readAsDataURL(file);
|
|
85
|
-
reader.addEventListener('load', () => {
|
|
86
|
-
uploadImage(file);
|
|
87
|
-
}, false);
|
|
88
|
-
reader.addEventListener('error', () => {
|
|
89
|
-
const message = (0, _lang.getLocale)('Image_loading_failed');
|
|
90
|
-
_toaster.default.warning(message);
|
|
91
|
-
uploadedFilesCount.current = uploadedFilesCount.current + 1;
|
|
92
|
-
}, false);
|
|
93
|
-
}
|
|
94
|
-
}, [uploadImage]);
|
|
95
|
-
(0, _react.useEffect)(() => {
|
|
96
|
-
if (uploadingFilesCount.current === uploadedFilesCount.current && uploadedFilesCount.current !== 0) {
|
|
97
|
-
uploadedFilesCount.current = 0;
|
|
98
|
-
uploadingFilesCount.current = 0;
|
|
99
|
-
onChange();
|
|
100
|
-
setUploading(false);
|
|
101
|
-
}
|
|
102
|
-
}, [uploadingFilesCount, uploadedFilesCount, onChange]);
|
|
103
|
-
return /*#__PURE__*/_react.default.createElement(_MobileFullScreenPage.default, {
|
|
104
|
-
onClose: onToggle,
|
|
105
|
-
className: "dtable-ui-mobile-image-editor"
|
|
106
|
-
}, /*#__PURE__*/_react.default.createElement(Header, {
|
|
107
|
-
onLeftClick: onToggle
|
|
108
|
-
}, /*#__PURE__*/_react.default.createElement("i", {
|
|
109
|
-
"aria-hidden": "true",
|
|
110
|
-
className: "dtable-font dtable-icon-return"
|
|
111
|
-
}), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, column.name)), /*#__PURE__*/_react.default.createElement(Body, null, (0, _utils.isIPhone)() && (0, _utils.isQQBuiltInBrowser)() ? /*#__PURE__*/_react.default.createElement("div", {
|
|
112
|
-
className: "dtable-ui-file-open-external-browser"
|
|
113
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
114
|
-
className: "seatable-tip-danger"
|
|
115
|
-
}, '不支持 QQ 内置浏览器上传图片或者文件'), /*#__PURE__*/_react.default.createElement("div", {
|
|
116
|
-
className: "image-container"
|
|
117
|
-
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
118
|
-
src: mediaUrl + 'img/qq-upload-tip.png',
|
|
119
|
-
alt: "Open browser tip"
|
|
120
|
-
}))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_imagesPreviewer.default, {
|
|
121
|
-
value: value,
|
|
122
|
-
resetAdditionImage: resetAdditionImage,
|
|
123
|
-
togglePreviewer: openEditor,
|
|
124
|
-
closeEditor: closeEditor,
|
|
125
|
-
deleteImage: deleteImage
|
|
126
|
-
}), isShowEditor && /*#__PURE__*/_react.default.createElement(_MobileUpload.default, {
|
|
127
|
-
type: "image",
|
|
128
|
-
onClose: closeEditor,
|
|
129
|
-
onChange: onFilesChange
|
|
130
|
-
}), isUploading && /*#__PURE__*/_react.default.createElement(_activityIndicator.default, {
|
|
131
|
-
toast: true,
|
|
132
|
-
text: (0, _lang.getLocale)('Images_are_uploading'),
|
|
133
|
-
animating: isUploading
|
|
134
|
-
}))));
|
|
135
|
-
};
|
|
136
|
-
var _default = exports.default = MBImageEditor;
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _ImagePreviewerLightbox = _interopRequireDefault(require("../../ImagePreviewerLightbox"));
|
|
10
|
-
var _imagePreview = _interopRequireDefault(require("./image-preview"));
|
|
11
|
-
var _DTableCommonAddTool = _interopRequireDefault(require("../../DTableCommonAddTool"));
|
|
12
|
-
var _utils = require("../../utils/utils");
|
|
13
|
-
var _constants = require("../../constants");
|
|
14
|
-
var _lang = require("../../lang");
|
|
15
|
-
require("./index.css");
|
|
16
|
-
class ImagesPreviewer extends _react.default.Component {
|
|
17
|
-
constructor(props) {
|
|
18
|
-
super(props);
|
|
19
|
-
this.handleHistoryBack = e => {
|
|
20
|
-
if (this.state.isShowLargeImage) {
|
|
21
|
-
this.hideLargeImage();
|
|
22
|
-
} else if (this.props.closeEditor) {
|
|
23
|
-
this.props.closeEditor();
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
this.showLargeImage = itemUrl => {
|
|
27
|
-
let {
|
|
28
|
-
value
|
|
29
|
-
} = this.props;
|
|
30
|
-
this.setState({
|
|
31
|
-
isShowLargeImage: true,
|
|
32
|
-
largeImageIndex: value.indexOf(itemUrl)
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
|
-
this.hideLargeImage = () => {
|
|
36
|
-
this.setState({
|
|
37
|
-
isShowLargeImage: false,
|
|
38
|
-
largeImageIndex: ''
|
|
39
|
-
});
|
|
40
|
-
};
|
|
41
|
-
this.moveNext = () => {
|
|
42
|
-
let images = this.props.value;
|
|
43
|
-
this.setState(prevState => ({
|
|
44
|
-
largeImageIndex: (prevState.largeImageIndex + 1) % images.length
|
|
45
|
-
}));
|
|
46
|
-
};
|
|
47
|
-
this.movePrev = () => {
|
|
48
|
-
let images = this.props.value;
|
|
49
|
-
this.setState(prevState => ({
|
|
50
|
-
largeImageIndex: (prevState.largeImageIndex + images.length - 1) % images.length
|
|
51
|
-
}));
|
|
52
|
-
};
|
|
53
|
-
this.togglePreviewer = () => {
|
|
54
|
-
this.props.togglePreviewer(_constants.FILE_EDITOR_STATUS.ADDITION);
|
|
55
|
-
this.props.resetAdditionImage();
|
|
56
|
-
};
|
|
57
|
-
this.deleteImage = (index, type) => {
|
|
58
|
-
this.props.deleteImage(index, type);
|
|
59
|
-
const {
|
|
60
|
-
value
|
|
61
|
-
} = this.props;
|
|
62
|
-
if (index > value.length - 2) {
|
|
63
|
-
if (value.length - 2 < 0) {
|
|
64
|
-
this.hideLargeImage();
|
|
65
|
-
} else {
|
|
66
|
-
this.setState({
|
|
67
|
-
largeImageIndex: 0
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
this.downloadImage = imageItemUrl => {
|
|
73
|
-
let rotateIndex = imageItemUrl.indexOf('?a=');
|
|
74
|
-
if (rotateIndex > -1) {
|
|
75
|
-
imageItemUrl = imageItemUrl.slice(0, rotateIndex);
|
|
76
|
-
}
|
|
77
|
-
let imageUrlSuffix = imageItemUrl.indexOf('?dl=1');
|
|
78
|
-
let downloadUrl = imageUrlSuffix !== -1 ? imageItemUrl : imageItemUrl + '?dl=1';
|
|
79
|
-
(0, _utils.downloadFile)(downloadUrl);
|
|
80
|
-
};
|
|
81
|
-
this.setImageItemIndex = index => {
|
|
82
|
-
this.setState({
|
|
83
|
-
enterImageItemIndex: index
|
|
84
|
-
});
|
|
85
|
-
};
|
|
86
|
-
this.state = {
|
|
87
|
-
isShowLargeImage: false,
|
|
88
|
-
largeImageIndex: '',
|
|
89
|
-
enterImageItemIndex: -1
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
componentDidMount() {
|
|
93
|
-
if (_constants.isMobile) {
|
|
94
|
-
window.history.pushState(null, null, '#');
|
|
95
|
-
window.addEventListener('popstate', this.handleHistoryBack, false);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
componentWillUnmount() {
|
|
99
|
-
if (_constants.isMobile) {
|
|
100
|
-
window.removeEventListener('popstate', this.handleHistoryBack, false);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
render() {
|
|
104
|
-
let {
|
|
105
|
-
value
|
|
106
|
-
} = this.props;
|
|
107
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
108
|
-
className: "dtable-ui-image-previewer-container"
|
|
109
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
110
|
-
className: "dtable-ui-image-previewer-wrapper ".concat(value.length === 0 && _constants.isMobile ? 'd-none' : '')
|
|
111
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
112
|
-
className: "dtable-ui-image-previewer-content"
|
|
113
|
-
}, value.length > 0 && value.map((imageItemUrl, index) => {
|
|
114
|
-
return /*#__PURE__*/_react.default.createElement(_imagePreview.default, {
|
|
115
|
-
key: imageItemUrl + index,
|
|
116
|
-
imageItemUrl: imageItemUrl,
|
|
117
|
-
value: value,
|
|
118
|
-
itemIndex: index,
|
|
119
|
-
deleteImage: this.props.deleteImage,
|
|
120
|
-
showLargeImage: this.showLargeImage,
|
|
121
|
-
downloadImage: this.downloadImage,
|
|
122
|
-
enterImageItemIndex: this.state.enterImageItemIndex,
|
|
123
|
-
setImageItemIndex: this.setImageItemIndex
|
|
124
|
-
});
|
|
125
|
-
}))), this.state.isShowLargeImage && /*#__PURE__*/_react.default.createElement(_ImagePreviewerLightbox.default, {
|
|
126
|
-
imageItems: value,
|
|
127
|
-
imageIndex: this.state.largeImageIndex,
|
|
128
|
-
closeImagePopup: this.hideLargeImage,
|
|
129
|
-
moveToPrevImage: this.movePrev,
|
|
130
|
-
moveToNextImage: this.moveNext,
|
|
131
|
-
deleteImage: this.props.deleteImage ? this.deleteImage : null,
|
|
132
|
-
downloadImage: this.downloadImage,
|
|
133
|
-
onRotateImage: this.props.onRotateImage
|
|
134
|
-
}), /*#__PURE__*/_react.default.createElement(_DTableCommonAddTool.default, {
|
|
135
|
-
callBack: this.togglePreviewer,
|
|
136
|
-
footerName: (0, _lang.getLocale)('Add_images')
|
|
137
|
-
}));
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
var _default = exports.default = ImagesPreviewer;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
.dtable-ui-image-editor-dialog {
|
|
2
|
-
max-width: 620px;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.dtable-ui-image-editor-modal {
|
|
6
|
-
width: 620px;
|
|
7
|
-
max-height: 620px;
|
|
8
|
-
overflow: hidden;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.dtable-ui-image-editor-container {
|
|
12
|
-
width: 100%;
|
|
13
|
-
background-color: #fff;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.dtable-ui-image-addition-container {
|
|
17
|
-
display: flex;
|
|
18
|
-
flex-direction: row;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.dtable-ui-image-editor-dialog .dtable-icon-return {
|
|
22
|
-
color: #666666;
|
|
23
|
-
font-size: 14px;
|
|
24
|
-
}
|