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,194 +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 _reactstrap = require("reactstrap");
|
|
10
|
-
var _imagesPreviewer = _interopRequireDefault(require("../images-previewer"));
|
|
11
|
-
var _additionPreviewer = _interopRequireDefault(require("./addition-previewer"));
|
|
12
|
-
var _constants = require("../../constants");
|
|
13
|
-
var _DTableModalHeader = _interopRequireDefault(require("../../DTableModalHeader"));
|
|
14
|
-
var _lang = require("../../lang");
|
|
15
|
-
var _constants2 = require("../constants");
|
|
16
|
-
require("./index.css");
|
|
17
|
-
class PCImageEditor extends _react.default.Component {
|
|
18
|
-
constructor(props) {
|
|
19
|
-
var _this;
|
|
20
|
-
super(props);
|
|
21
|
-
_this = this;
|
|
22
|
-
this.getValue = () => {
|
|
23
|
-
return this.state.value;
|
|
24
|
-
};
|
|
25
|
-
this.getEditorView = () => {
|
|
26
|
-
const {
|
|
27
|
-
isInModal,
|
|
28
|
-
value
|
|
29
|
-
} = this.props;
|
|
30
|
-
return !value || value.length === 0 || isInModal ? _constants.FILE_EDITOR_STATUS.ADDITION : _constants.FILE_EDITOR_STATUS.PREVIEWER;
|
|
31
|
-
};
|
|
32
|
-
this.deleteImage = function (index) {
|
|
33
|
-
let type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
34
|
-
let uploadLocalImageValue = _this.state.uploadLocalImageValue.slice(0);
|
|
35
|
-
let value = _this.state.value.slice(0);
|
|
36
|
-
if (_this.state.editorView === _constants.FILE_EDITOR_STATUS.PREVIEWER) {
|
|
37
|
-
value.splice(index, 1);
|
|
38
|
-
} else {
|
|
39
|
-
if (type === 'localPicture') {
|
|
40
|
-
uploadLocalImageValue.splice(index, 1);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
_this.setState({
|
|
44
|
-
uploadLocalImageValue: uploadLocalImageValue,
|
|
45
|
-
isUpdated: true,
|
|
46
|
-
value: value
|
|
47
|
-
});
|
|
48
|
-
};
|
|
49
|
-
this.resetAdditionImage = () => {
|
|
50
|
-
this.setState({
|
|
51
|
-
uploadLocalImageValue: [],
|
|
52
|
-
imageLinkValue: []
|
|
53
|
-
});
|
|
54
|
-
};
|
|
55
|
-
this.toggle = e => {
|
|
56
|
-
e.stopPropagation();
|
|
57
|
-
if (this.state.isOpen && this.state.isUpdated) {
|
|
58
|
-
if (this.state.editorView === _constants.FILE_EDITOR_STATUS.ADDITION) {
|
|
59
|
-
let {
|
|
60
|
-
value,
|
|
61
|
-
uploadLocalImageValue
|
|
62
|
-
} = this.state;
|
|
63
|
-
let newValue = value.concat(uploadLocalImageValue);
|
|
64
|
-
this.setState({
|
|
65
|
-
value: newValue
|
|
66
|
-
}, () => {
|
|
67
|
-
this.props.isInModal ? this.props.onCommit(this.getValue()) : this.props.onCommit();
|
|
68
|
-
});
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
this.props.isInModal ? this.props.onCommit(this.getValue()) : this.props.onCommit();
|
|
72
|
-
}
|
|
73
|
-
if (this.props.isInModal) {
|
|
74
|
-
this.props.onToggle();
|
|
75
|
-
}
|
|
76
|
-
const nextIsOpen = !this.state.isOpen;
|
|
77
|
-
this.setState({
|
|
78
|
-
isOpen: nextIsOpen
|
|
79
|
-
}, () => {
|
|
80
|
-
if (!nextIsOpen) {
|
|
81
|
-
this.props.onCommitCancel && this.props.onCommitCancel();
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
};
|
|
85
|
-
this.closeEditor = () => {
|
|
86
|
-
this.setState({
|
|
87
|
-
isOpen: false
|
|
88
|
-
});
|
|
89
|
-
};
|
|
90
|
-
this.togglePreviewer = type => {
|
|
91
|
-
this.setState({
|
|
92
|
-
editorView: type
|
|
93
|
-
});
|
|
94
|
-
};
|
|
95
|
-
this.fileUploadCompleted = fileMessage => {
|
|
96
|
-
let uploadLocalImageValue = this.state.uploadLocalImageValue.slice(0);
|
|
97
|
-
const imageUrl = fileMessage.url;
|
|
98
|
-
uploadLocalImageValue.push(imageUrl);
|
|
99
|
-
this.setState({
|
|
100
|
-
uploadLocalImageValue: uploadLocalImageValue,
|
|
101
|
-
isUpdated: true
|
|
102
|
-
});
|
|
103
|
-
};
|
|
104
|
-
this.addUploadedFile = fileMessageList => {
|
|
105
|
-
let uploadLocalImageValue = this.state.uploadLocalImageValue.slice(0);
|
|
106
|
-
// eslint-disable-next-line no-unused-vars
|
|
107
|
-
for (let fileMessage of fileMessageList) {
|
|
108
|
-
uploadLocalImageValue.push(fileMessage.url);
|
|
109
|
-
}
|
|
110
|
-
this.setState({
|
|
111
|
-
uploadLocalImageValue: uploadLocalImageValue,
|
|
112
|
-
isUpdated: true
|
|
113
|
-
});
|
|
114
|
-
};
|
|
115
|
-
this.renderHeader = () => {
|
|
116
|
-
let {
|
|
117
|
-
editorView
|
|
118
|
-
} = this.state;
|
|
119
|
-
if (this.props.isInModal) {
|
|
120
|
-
return /*#__PURE__*/_react.default.createElement("span", null, (0, _lang.getLocale)('Add_images'));
|
|
121
|
-
}
|
|
122
|
-
if (editorView === _constants.FILE_EDITOR_STATUS.PREVIEWER) {
|
|
123
|
-
return /*#__PURE__*/_react.default.createElement("span", null, (0, _lang.getLocale)('All_images'));
|
|
124
|
-
}
|
|
125
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
126
|
-
onClick: this.showImageListPreviewer
|
|
127
|
-
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
128
|
-
"aria-hidden": "true",
|
|
129
|
-
className: "dtable-font dtable-icon-return mr-2"
|
|
130
|
-
}), /*#__PURE__*/_react.default.createElement("span", null, (0, _lang.getLocale)('Add_images')));
|
|
131
|
-
};
|
|
132
|
-
this.showImageListPreviewer = () => {
|
|
133
|
-
let {
|
|
134
|
-
value,
|
|
135
|
-
uploadLocalImageValue,
|
|
136
|
-
imageLinkValue
|
|
137
|
-
} = this.state;
|
|
138
|
-
let newValue = value.concat(uploadLocalImageValue, imageLinkValue);
|
|
139
|
-
this.setState({
|
|
140
|
-
value: newValue
|
|
141
|
-
});
|
|
142
|
-
this.togglePreviewer(_constants.FILE_EDITOR_STATUS.PREVIEWER);
|
|
143
|
-
};
|
|
144
|
-
this.saveImageLink = imageUrl => {
|
|
145
|
-
this.setState({
|
|
146
|
-
imageLinkValue: imageUrl,
|
|
147
|
-
isUpdated: true
|
|
148
|
-
});
|
|
149
|
-
this.showImageListPreviewer();
|
|
150
|
-
};
|
|
151
|
-
this.uploadFile = (file, callback) => {
|
|
152
|
-
return this.props.uploadFile(file, _constants2.IMAGES_FOLDER, callback);
|
|
153
|
-
};
|
|
154
|
-
this.state = {
|
|
155
|
-
value: props.value || [],
|
|
156
|
-
editorView: this.getEditorView(),
|
|
157
|
-
isOpen: true,
|
|
158
|
-
isShowFileChooser: false,
|
|
159
|
-
uploadLocalImageValue: [],
|
|
160
|
-
imageLinkValue: [],
|
|
161
|
-
isUpdated: false
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
render() {
|
|
165
|
-
return /*#__PURE__*/_react.default.createElement(_reactstrap.Modal, {
|
|
166
|
-
className: "dtable-ui-image-editor-dialog",
|
|
167
|
-
contentClassName: "dtable-ui-image-editor-modal",
|
|
168
|
-
isOpen: this.state.isOpen,
|
|
169
|
-
toggle: this.toggle
|
|
170
|
-
}, /*#__PURE__*/_react.default.createElement(_DTableModalHeader.default, {
|
|
171
|
-
toggle: this.toggle
|
|
172
|
-
}, this.renderHeader()), /*#__PURE__*/_react.default.createElement(_reactstrap.ModalBody, {
|
|
173
|
-
className: "p-0"
|
|
174
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
175
|
-
className: "dtable-ui-image-editor-container"
|
|
176
|
-
}, this.state.editorView === _constants.FILE_EDITOR_STATUS.PREVIEWER && /*#__PURE__*/_react.default.createElement(_imagesPreviewer.default, {
|
|
177
|
-
value: this.state.value,
|
|
178
|
-
togglePreviewer: this.togglePreviewer,
|
|
179
|
-
deleteImage: this.deleteImage,
|
|
180
|
-
resetAdditionImage: this.resetAdditionImage
|
|
181
|
-
}), this.state.editorView === _constants.FILE_EDITOR_STATUS.ADDITION && /*#__PURE__*/_react.default.createElement(_additionPreviewer.default, {
|
|
182
|
-
deleteImage: this.deleteImage,
|
|
183
|
-
handleFilesChange: this.handleFilesChange,
|
|
184
|
-
uploadLocalImageValue: this.state.uploadLocalImageValue,
|
|
185
|
-
togglePreviewer: this.togglePreviewer,
|
|
186
|
-
saveImageLink: this.saveImageLink,
|
|
187
|
-
fileUploadCompleted: this.fileUploadCompleted,
|
|
188
|
-
addUploadedFile: this.addUploadedFile,
|
|
189
|
-
showImageListPreviewer: this.showImageListPreviewer,
|
|
190
|
-
uploadFile: this.uploadFile
|
|
191
|
-
}))));
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
var _default = exports.default = PCImageEditor;
|
|
@@ -1,23 +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 _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
-
require("./index.css");
|
|
11
|
-
const Body = _ref => {
|
|
12
|
-
let {
|
|
13
|
-
classNamePrefix,
|
|
14
|
-
className,
|
|
15
|
-
children
|
|
16
|
-
} = _ref;
|
|
17
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
18
|
-
className: (0, _classnames.default)('dtable-ui-mobile-full-screen-page-body', className, {
|
|
19
|
-
["".concat(classNamePrefix, "-mobile-full-screen-page-body")]: classNamePrefix
|
|
20
|
-
})
|
|
21
|
-
}, children);
|
|
22
|
-
};
|
|
23
|
-
var _default = exports.default = Body;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
.dtable-ui-mobile-full-screen-page-header {
|
|
2
|
-
width: 100%;
|
|
3
|
-
height: 51px;
|
|
4
|
-
background-color: #fff;
|
|
5
|
-
border-bottom: 1px solid #e9e9e9;
|
|
6
|
-
padding: 0;
|
|
7
|
-
color: #666;
|
|
8
|
-
font-size: 14px;
|
|
9
|
-
display: flex;
|
|
10
|
-
justify-content: space-between;
|
|
11
|
-
flex-shrink: 0;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.dtable-ui-mobile-full-screen-page-header .dtable-ui-mobile-full-screen-page-header-btn {
|
|
15
|
-
line-height: 24px;
|
|
16
|
-
min-width: 75px;
|
|
17
|
-
padding: 13px 16px;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.dtable-ui-mobile-full-screen-page-header .dtable-ui-mobile-full-screen-page-header-btn:hover {
|
|
21
|
-
cursor: pointer;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.dtable-ui-mobile-full-screen-page-header .dtable-ui-mobile-full-screen-page-header-title {
|
|
25
|
-
color: #212529;
|
|
26
|
-
line-height: 50px;
|
|
27
|
-
margin-bottom: 0;
|
|
28
|
-
overflow: hidden;
|
|
29
|
-
text-overflow: ellipsis;
|
|
30
|
-
white-space: nowrap;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.dtable-ui-mobile-full-screen-page-header .dtable-ui-mobile-full-screen-page-header-btn:first-child {
|
|
34
|
-
text-align: left;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.dtable-ui-mobile-full-screen-page-header .dtable-ui-mobile-full-screen-page-header-btn:last-child {
|
|
38
|
-
text-align: right;
|
|
39
|
-
}
|
|
@@ -1,38 +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 _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
-
require("./index.css");
|
|
11
|
-
const Header = _ref => {
|
|
12
|
-
let {
|
|
13
|
-
classNamePrefix,
|
|
14
|
-
children,
|
|
15
|
-
onLeftClick,
|
|
16
|
-
onRightClick
|
|
17
|
-
} = _ref;
|
|
18
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
19
|
-
className: (0, _classnames.default)('dtable-ui-mobile-full-screen-page-header p-0', {
|
|
20
|
-
["".concat(classNamePrefix, "-mobile-full-screen-page-header")]: classNamePrefix
|
|
21
|
-
})
|
|
22
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
23
|
-
className: (0, _classnames.default)('dtable-ui-mobile-full-screen-page-header-btn', {
|
|
24
|
-
["".concat(classNamePrefix, "-mobile-full-screen-page-header-btn")]: classNamePrefix
|
|
25
|
-
}),
|
|
26
|
-
onClick: onLeftClick
|
|
27
|
-
}, children[0]), /*#__PURE__*/_react.default.createElement("h4", {
|
|
28
|
-
className: (0, _classnames.default)('dtable-ui-mobile-full-screen-page-header-title', {
|
|
29
|
-
["".concat(classNamePrefix, "-mobile-full-screen-page-header-title")]: classNamePrefix
|
|
30
|
-
})
|
|
31
|
-
}, children[1]), /*#__PURE__*/_react.default.createElement("div", {
|
|
32
|
-
className: (0, _classnames.default)('dtable-ui-mobile-full-screen-page-header-btn', {
|
|
33
|
-
["".concat(classNamePrefix, "-mobile-full-screen-page-header-btn")]: classNamePrefix
|
|
34
|
-
}),
|
|
35
|
-
onClick: onRightClick
|
|
36
|
-
}, children[2]));
|
|
37
|
-
};
|
|
38
|
-
var _default = exports.default = Header;
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
-
var _BodyPortal = _interopRequireDefault(require("../BodyPortal"));
|
|
12
|
-
var _header = _interopRequireDefault(require("./header"));
|
|
13
|
-
var _body = _interopRequireDefault(require("./body"));
|
|
14
|
-
var _utils = require("../utils/utils");
|
|
15
|
-
require("./index.css");
|
|
16
|
-
const MobileFullScreenPage = _ref => {
|
|
17
|
-
let {
|
|
18
|
-
classNamePrefix,
|
|
19
|
-
className,
|
|
20
|
-
style,
|
|
21
|
-
zIndex,
|
|
22
|
-
children,
|
|
23
|
-
onClose,
|
|
24
|
-
historyCallback
|
|
25
|
-
} = _ref;
|
|
26
|
-
const [isMount, setMount] = (0, _react.useState)(false);
|
|
27
|
-
const element = (0, _react.useMemo)(() => {
|
|
28
|
-
let _element = document.createElement('div');
|
|
29
|
-
_element.setAttribute('tabindex', '-1');
|
|
30
|
-
_element.style.position = 'relative';
|
|
31
|
-
_element.style.zIndex = zIndex || 100;
|
|
32
|
-
return _element;
|
|
33
|
-
}, [zIndex]);
|
|
34
|
-
const handelHistoryCallback = (0, _react.useCallback)(event => {
|
|
35
|
-
event.preventDefault();
|
|
36
|
-
if ((0, _utils.isFunction)(historyCallback)) {
|
|
37
|
-
historyCallback();
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
if ((0, _utils.isFunction)(onClose)) {
|
|
41
|
-
onClose();
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
}, [onClose, historyCallback]);
|
|
45
|
-
(0, _react.useEffect)(() => {
|
|
46
|
-
// eslint-disable-next-line no-restricted-globals
|
|
47
|
-
history.pushState(null, null, '#');
|
|
48
|
-
window.addEventListener('popstate', handelHistoryCallback, false);
|
|
49
|
-
return () => {
|
|
50
|
-
window.removeEventListener('popstate', handelHistoryCallback, false);
|
|
51
|
-
};
|
|
52
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
53
|
-
}, [handelHistoryCallback]);
|
|
54
|
-
(0, _react.useEffect)(() => {
|
|
55
|
-
document.body.appendChild(element);
|
|
56
|
-
setMount(true);
|
|
57
|
-
return () => {
|
|
58
|
-
document.body.removeChild(element);
|
|
59
|
-
};
|
|
60
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
61
|
-
}, []);
|
|
62
|
-
return /*#__PURE__*/_react.default.createElement(_BodyPortal.default, {
|
|
63
|
-
node: element
|
|
64
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
65
|
-
className: (0, _classnames.default)('dtable-ui-mobile-full-screen-page', className, {
|
|
66
|
-
["".concat(classNamePrefix, "-mobile-full-screen-page")]: classNamePrefix
|
|
67
|
-
}),
|
|
68
|
-
style: style
|
|
69
|
-
}, isMount && children));
|
|
70
|
-
};
|
|
71
|
-
MobileFullScreenPage.Header = _header.default;
|
|
72
|
-
MobileFullScreenPage.Body = _body.default;
|
|
73
|
-
var _default = exports.default = MobileFullScreenPage;
|
package/lib/MobileModal/index.js
DELETED
|
@@ -1,41 +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 _modal = _interopRequireDefault(require("antd-mobile/lib/modal"));
|
|
9
|
-
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
class MobileModal extends _react.default.PureComponent {
|
|
11
|
-
constructor() {
|
|
12
|
-
super(...arguments);
|
|
13
|
-
this.handleHistoryBack = e => {
|
|
14
|
-
e.preventDefault();
|
|
15
|
-
this.props.onClose();
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
componentDidMount() {
|
|
19
|
-
window.history.pushState(null, null, '#');
|
|
20
|
-
window.addEventListener('popstate', this.handleHistoryBack, false);
|
|
21
|
-
}
|
|
22
|
-
componentWillUnmount() {
|
|
23
|
-
window.removeEventListener('popstate', this.handleHistoryBack, false);
|
|
24
|
-
}
|
|
25
|
-
render() {
|
|
26
|
-
const {
|
|
27
|
-
children,
|
|
28
|
-
...props
|
|
29
|
-
} = this.props;
|
|
30
|
-
return /*#__PURE__*/_react.default.createElement(_modal.default, Object.assign({}, props, {
|
|
31
|
-
popup: true
|
|
32
|
-
}), children);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
MobileModal.defaultProps = {
|
|
36
|
-
visible: true,
|
|
37
|
-
animationType: 'slide-up',
|
|
38
|
-
transitionName: 'transitionName',
|
|
39
|
-
maskTransitionName: 'maskTransitionName'
|
|
40
|
-
};
|
|
41
|
-
var _default = exports.default = MobileModal;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
.dtable-ui-mobile-action-sheet .am-action-sheet-button-list {
|
|
2
|
-
text-align: left;
|
|
3
|
-
color: #212529;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.dtable-ui-mobile-action-sheet .am-action-sheet-button-list .am-action-sheet-button-list-item {
|
|
7
|
-
padding: 0;
|
|
8
|
-
height: 44px;
|
|
9
|
-
line-height: 44px;
|
|
10
|
-
font-size: 16px;
|
|
11
|
-
overflow-y: hidden;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
html:not([data-scale]) .dtable-ui-mobile-action-sheet .am-action-sheet-button-list .am-action-sheet-button-list-item::before {
|
|
15
|
-
background-color: #fff;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.dtable-ui-mobile-action-sheet .my-am-action {
|
|
19
|
-
padding: 0 16px;
|
|
20
|
-
align-items: center;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.dtable-ui-mobile-action-sheet .am-action-sheet-button-list .am-action-sheet-button-list-item .dtable-font {
|
|
24
|
-
color: #888;
|
|
25
|
-
font-size: 20px;
|
|
26
|
-
margin-right: 16px;
|
|
27
|
-
}
|
|
@@ -1,92 +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 = exports.OPERATION_TYPE = void 0;
|
|
9
|
-
var _actionSheet = _interopRequireDefault(require("antd-mobile/lib/action-sheet"));
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
var _lang = require("../lang");
|
|
12
|
-
require("./index.css");
|
|
13
|
-
const OPERATION_TYPE = exports.OPERATION_TYPE = {
|
|
14
|
-
RENAME: 'rename',
|
|
15
|
-
DOWNLOAD: 'download',
|
|
16
|
-
DELETE: 'delete',
|
|
17
|
-
CLOSE: 'close'
|
|
18
|
-
};
|
|
19
|
-
const OPERATION_TYPES = [OPERATION_TYPE.RENAME, OPERATION_TYPE.DOWNLOAD, OPERATION_TYPE.DELETE];
|
|
20
|
-
const MobileOperationSheet = _ref => {
|
|
21
|
-
let {
|
|
22
|
-
onChange,
|
|
23
|
-
onClose,
|
|
24
|
-
operations = OPERATION_TYPES
|
|
25
|
-
} = _ref;
|
|
26
|
-
const actionSheet = (0, _react.useRef)(_actionSheet.default);
|
|
27
|
-
const btns = (0, _react.useMemo)(() => {
|
|
28
|
-
let _btns = [];
|
|
29
|
-
if (operations.includes(OPERATION_TYPE.RENAME)) {
|
|
30
|
-
_btns.push({
|
|
31
|
-
dom: /*#__PURE__*/_react.default.createElement("div", {
|
|
32
|
-
className: "my-am-action"
|
|
33
|
-
}, /*#__PURE__*/_react.default.createElement("i", {
|
|
34
|
-
"aria-hidden": "true",
|
|
35
|
-
className: "dtable-font dtable-icon-rename"
|
|
36
|
-
}), /*#__PURE__*/_react.default.createElement("span", null, (0, _lang.getLocale)('Rename'))),
|
|
37
|
-
value: OPERATION_TYPE.RENAME
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
if (operations.includes(OPERATION_TYPE.DOWNLOAD)) {
|
|
41
|
-
_btns.push({
|
|
42
|
-
dom: /*#__PURE__*/_react.default.createElement("div", {
|
|
43
|
-
className: "my-am-action"
|
|
44
|
-
}, /*#__PURE__*/_react.default.createElement("i", {
|
|
45
|
-
"aria-hidden": "true",
|
|
46
|
-
className: "dtable-font dtable-icon-download"
|
|
47
|
-
}), /*#__PURE__*/_react.default.createElement("span", null, (0, _lang.getLocale)('Download'))),
|
|
48
|
-
value: OPERATION_TYPE.DOWNLOAD
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
if (operations.includes(OPERATION_TYPE.DELETE)) {
|
|
52
|
-
_btns.push({
|
|
53
|
-
dom: /*#__PURE__*/_react.default.createElement("div", {
|
|
54
|
-
className: "my-am-action"
|
|
55
|
-
}, /*#__PURE__*/_react.default.createElement("i", {
|
|
56
|
-
"aria-hidden": "true",
|
|
57
|
-
className: "dtable-font dtable-icon-delete"
|
|
58
|
-
}), /*#__PURE__*/_react.default.createElement("span", null, (0, _lang.getLocale)('Delete'))),
|
|
59
|
-
value: OPERATION_TYPE.DELETE
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
return _btns;
|
|
63
|
-
}, [operations]);
|
|
64
|
-
const showActionSheet = (0, _react.useCallback)(() => {
|
|
65
|
-
const _btns = btns.map(btn => btn.dom);
|
|
66
|
-
actionSheet.current.showActionSheetWithOptions({
|
|
67
|
-
options: _btns,
|
|
68
|
-
maskClosable: true,
|
|
69
|
-
className: 'dtable-ui-mobile-action-sheet'
|
|
70
|
-
}, index => {
|
|
71
|
-
const {
|
|
72
|
-
value = 'close'
|
|
73
|
-
} = btns[index] || {};
|
|
74
|
-
if (value === 'close') {
|
|
75
|
-
onClose && onClose();
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
onChange && onChange(value);
|
|
79
|
-
});
|
|
80
|
-
}, [btns, onChange, onClose]);
|
|
81
|
-
(0, _react.useEffect)(() => {
|
|
82
|
-
showActionSheet();
|
|
83
|
-
return () => {
|
|
84
|
-
actionSheet.current.close();
|
|
85
|
-
actionSheet.current = null;
|
|
86
|
-
onClose && onClose();
|
|
87
|
-
};
|
|
88
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
89
|
-
}, []);
|
|
90
|
-
return null;
|
|
91
|
-
};
|
|
92
|
-
var _default = exports.default = MobileOperationSheet;
|
|
@@ -1,23 +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 _list = _interopRequireDefault(require("antd-mobile/lib/list"));
|
|
9
|
-
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
require("./index.css");
|
|
12
|
-
const Empty = _ref => {
|
|
13
|
-
let {
|
|
14
|
-
children
|
|
15
|
-
} = _ref;
|
|
16
|
-
return /*#__PURE__*/_react.default.createElement(_list.default.Item, {
|
|
17
|
-
className: "dtable-ui-mobile-selector-no-options"
|
|
18
|
-
}, children);
|
|
19
|
-
};
|
|
20
|
-
Empty.propType = {
|
|
21
|
-
children: _propTypes.default.any
|
|
22
|
-
};
|
|
23
|
-
var _default = exports.default = Empty;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
.dtable-ui-mobile-selector .am-list-header {
|
|
2
|
-
color: #212529;
|
|
3
|
-
font-size: 16px;
|
|
4
|
-
font-weight: bold;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.dtable-ui-mobile-selector .am-list-header .mobile-selector-editor-close-btn {
|
|
8
|
-
width: 20px;
|
|
9
|
-
font-size: 16px;
|
|
10
|
-
color: #798d99;
|
|
11
|
-
right: 0px;
|
|
12
|
-
position: absolute;
|
|
13
|
-
bottom: 0px;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
html:not([data-scale]) .dtable-ui-mobile-selector .am-list-body:before,
|
|
17
|
-
html:not([data-scale]) .dtable-ui-mobile-selector .am-list-body:after {
|
|
18
|
-
background-color: #e9e9e9;
|
|
19
|
-
transform: scaleY(1) !important;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.dtable-ui-mobile-selector .am-list-body .dtable-ui-mobile-selector-search + .dtable-ui-mobile-selector-options {
|
|
23
|
-
border-top: 1px solid #e9e9e9;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.dtable-ui-mobile-selector .am-list-body .add-item-btn {
|
|
27
|
-
color: #212529;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.dtable-ui-mobile-selector .am-list-body .am-list-item {
|
|
31
|
-
min-height: 50px;
|
|
32
|
-
}
|
|
@@ -1,57 +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 _list = _interopRequireDefault(require("antd-mobile/lib/list"));
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
|
-
var _MobileModal = _interopRequireDefault(require("../MobileModal"));
|
|
13
|
-
var _search = _interopRequireDefault(require("./search"));
|
|
14
|
-
var _options = _interopRequireDefault(require("./options"));
|
|
15
|
-
var _option = _interopRequireDefault(require("./option"));
|
|
16
|
-
var _empty = _interopRequireDefault(require("./empty"));
|
|
17
|
-
require("./index.css");
|
|
18
|
-
const MobileSelector = _ref => {
|
|
19
|
-
let {
|
|
20
|
-
className,
|
|
21
|
-
listClassName,
|
|
22
|
-
title,
|
|
23
|
-
children,
|
|
24
|
-
onClose
|
|
25
|
-
} = _ref;
|
|
26
|
-
const handleHistoryBack = (0, _react.useCallback)(event => {
|
|
27
|
-
event.preventDefault();
|
|
28
|
-
onClose && onClose();
|
|
29
|
-
}, [onClose]);
|
|
30
|
-
(0, _react.useEffect)(() => {
|
|
31
|
-
history.pushState(null, null, '#'); // eslint-disable-line
|
|
32
|
-
window.addEventListener('popstate', handleHistoryBack, false);
|
|
33
|
-
return () => {
|
|
34
|
-
window.removeEventListener('popstate', handleHistoryBack, false);
|
|
35
|
-
};
|
|
36
|
-
}, [handleHistoryBack]);
|
|
37
|
-
const renderHeader = (0, _react.useCallback)(() => {
|
|
38
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
39
|
-
className: "position-relative"
|
|
40
|
-
}, /*#__PURE__*/_react.default.createElement("span", null, title), /*#__PURE__*/_react.default.createElement("span", {
|
|
41
|
-
className: "mobile-selector-editor-close-btn dtable-font dtable-icon-x",
|
|
42
|
-
onClick: onClose
|
|
43
|
-
}));
|
|
44
|
-
}, [title, onClose]);
|
|
45
|
-
return /*#__PURE__*/_react.default.createElement(_MobileModal.default, {
|
|
46
|
-
onClose: onClose,
|
|
47
|
-
className: className
|
|
48
|
-
}, /*#__PURE__*/_react.default.createElement(_list.default, {
|
|
49
|
-
renderHeader: renderHeader,
|
|
50
|
-
className: (0, _classnames.default)('popup-list dtable-ui-mobile-selector', listClassName)
|
|
51
|
-
}, children));
|
|
52
|
-
};
|
|
53
|
-
MobileSelector.Search = _search.default;
|
|
54
|
-
MobileSelector.Option = _option.default;
|
|
55
|
-
MobileSelector.Options = _options.default;
|
|
56
|
-
MobileSelector.Empty = _empty.default;
|
|
57
|
-
var _default = exports.default = MobileSelector;
|