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
|
@@ -0,0 +1,197 @@
|
|
|
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 _lang = require("../../lang");
|
|
11
|
+
var _selectEditorOption = _interopRequireDefault(require("../select-editor-option"));
|
|
12
|
+
var _MBEditorHeader = _interopRequireDefault(require("../../MBEditorHeader"));
|
|
13
|
+
require("./index.css");
|
|
14
|
+
class MBSelectEditorPopover extends _react.default.Component {
|
|
15
|
+
constructor(props) {
|
|
16
|
+
super(props);
|
|
17
|
+
this.handleHistoryBack = e => {
|
|
18
|
+
e.preventDefault();
|
|
19
|
+
this.props.onClosePopover();
|
|
20
|
+
};
|
|
21
|
+
this.onContainerClick = event => {
|
|
22
|
+
if (this.editorPopover && this.editorPopover.contains(event.target)) {
|
|
23
|
+
event.stopPropagation();
|
|
24
|
+
event.nativeEvent.stopImmediatePropagation();
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
this.onChangeSearch = event => {
|
|
29
|
+
let {
|
|
30
|
+
searchVal
|
|
31
|
+
} = this.state;
|
|
32
|
+
if (searchVal === event.target.value) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
searchVal = event.target.value;
|
|
36
|
+
this.setState({
|
|
37
|
+
searchVal
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
this.getSelectedOptions = () => {
|
|
41
|
+
let {
|
|
42
|
+
value,
|
|
43
|
+
options
|
|
44
|
+
} = this.props;
|
|
45
|
+
if (!Array.isArray(value)) {
|
|
46
|
+
return [];
|
|
47
|
+
}
|
|
48
|
+
return options.filter(option => {
|
|
49
|
+
return value.indexOf(option.id) > -1;
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
this.getFilteredOptions = () => {
|
|
53
|
+
let {
|
|
54
|
+
options
|
|
55
|
+
} = this.props;
|
|
56
|
+
let {
|
|
57
|
+
searchVal
|
|
58
|
+
} = this.state;
|
|
59
|
+
return searchVal ? options.filter(item => item.name.indexOf(searchVal) > -1) : options;
|
|
60
|
+
};
|
|
61
|
+
this.onSelectOption = option => {
|
|
62
|
+
this.props.onOptionItemToggle(option);
|
|
63
|
+
};
|
|
64
|
+
this.onAddNewOption = event => {
|
|
65
|
+
event.stopPropagation();
|
|
66
|
+
event.nativeEvent.stopImmediatePropagation();
|
|
67
|
+
let newOption = this.state.searchVal.trim();
|
|
68
|
+
if (newOption) {
|
|
69
|
+
this.props.onAddNewOption(newOption);
|
|
70
|
+
this.props.onClosePopover();
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
this.onRemoveOption = option => {
|
|
74
|
+
this.props.onOptionItemToggle(option);
|
|
75
|
+
};
|
|
76
|
+
this.renderSelectOptions = options => {
|
|
77
|
+
let {
|
|
78
|
+
value
|
|
79
|
+
} = this.props;
|
|
80
|
+
return options.map((option, index) => {
|
|
81
|
+
let isSelect = value.some(item => item === option.id);
|
|
82
|
+
let style = {
|
|
83
|
+
backgroundColor: option.color,
|
|
84
|
+
color: option.textColor || null
|
|
85
|
+
};
|
|
86
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
87
|
+
className: "mb-select-option-item",
|
|
88
|
+
key: index,
|
|
89
|
+
onMouseDown: this.onSelectOption.bind(this, option)
|
|
90
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
91
|
+
className: "mb-select-item"
|
|
92
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
93
|
+
className: "item-name",
|
|
94
|
+
style: style,
|
|
95
|
+
title: option.name
|
|
96
|
+
}, option.name)), /*#__PURE__*/_react.default.createElement("span", {
|
|
97
|
+
className: "mb-item-checked"
|
|
98
|
+
}, isSelect && /*#__PURE__*/_react.default.createElement("i", {
|
|
99
|
+
className: "dtable-font dtable-icon-check-mark"
|
|
100
|
+
})));
|
|
101
|
+
});
|
|
102
|
+
};
|
|
103
|
+
this.setEditorPopover = editorPopover => {
|
|
104
|
+
this.editorPopover = editorPopover;
|
|
105
|
+
};
|
|
106
|
+
this.state = {
|
|
107
|
+
searchVal: ''
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
componentDidMount() {
|
|
111
|
+
history.pushState(null, null, '#'); // eslint-disable-line
|
|
112
|
+
window.addEventListener('popstate', this.handleHistoryBack, false);
|
|
113
|
+
}
|
|
114
|
+
componentWillUnmount() {
|
|
115
|
+
window.removeEventListener('popstate', this.handleHistoryBack, false);
|
|
116
|
+
}
|
|
117
|
+
render() {
|
|
118
|
+
const {
|
|
119
|
+
isReadOnly,
|
|
120
|
+
column,
|
|
121
|
+
isSupportNewOption,
|
|
122
|
+
isShowRemoveIcon
|
|
123
|
+
} = this.props;
|
|
124
|
+
const {
|
|
125
|
+
searchVal
|
|
126
|
+
} = this.state;
|
|
127
|
+
const selectedOptions = this.getSelectedOptions();
|
|
128
|
+
const filteredOptions = this.getFilteredOptions();
|
|
129
|
+
let isShowRemoveBtn = !isReadOnly && isShowRemoveIcon;
|
|
130
|
+
let isShowCreateBtn = !isReadOnly && isSupportNewOption && !!searchVal;
|
|
131
|
+
if (isShowCreateBtn) {
|
|
132
|
+
isShowCreateBtn = filteredOptions.length === 0;
|
|
133
|
+
}
|
|
134
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
135
|
+
ref: this.setEditorPopover,
|
|
136
|
+
className: "dtable-ui-mb-editor-popover mb-select-editor-popover",
|
|
137
|
+
style: {
|
|
138
|
+
zIndex: 99
|
|
139
|
+
},
|
|
140
|
+
onClick: this.onContainerClick
|
|
141
|
+
}, /*#__PURE__*/_react.default.createElement(_MBEditorHeader.default, {
|
|
142
|
+
title: column.name,
|
|
143
|
+
leftContent: /*#__PURE__*/_react.default.createElement("i", {
|
|
144
|
+
className: "dtable-font dtable-icon-return"
|
|
145
|
+
}),
|
|
146
|
+
onLeftClick: this.props.onClosePopover
|
|
147
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
148
|
+
className: "dtable-ui-mb-editor-body dtable-ui-mb-select-editor-body"
|
|
149
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
150
|
+
className: "mb-selected-item"
|
|
151
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
152
|
+
className: "title"
|
|
153
|
+
}, (0, _lang.getLocale)('Current_option')), /*#__PURE__*/_react.default.createElement("div", {
|
|
154
|
+
className: "content"
|
|
155
|
+
}, selectedOptions.length === 0 && /*#__PURE__*/_react.default.createElement("span", {
|
|
156
|
+
className: "empty-placeholder"
|
|
157
|
+
}, (0, _lang.getLocale)('No_option')), selectedOptions.length > 0 && selectedOptions.map(selectedOption => {
|
|
158
|
+
return /*#__PURE__*/_react.default.createElement(_selectEditorOption.default, {
|
|
159
|
+
key: selectedOption.id,
|
|
160
|
+
option: selectedOption,
|
|
161
|
+
isShowRemoveIcon: isShowRemoveBtn,
|
|
162
|
+
onDeleteSelectOption: this.onRemoveOption
|
|
163
|
+
});
|
|
164
|
+
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
165
|
+
className: "mb-search-select-items"
|
|
166
|
+
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
167
|
+
className: "form-control",
|
|
168
|
+
type: "text",
|
|
169
|
+
placeholder: (0, _lang.getLocale)('Search_option'),
|
|
170
|
+
value: searchVal,
|
|
171
|
+
onChange: this.onChangeSearch,
|
|
172
|
+
onClick: this.onInputClick
|
|
173
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
174
|
+
className: "mb-select-options-container"
|
|
175
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
176
|
+
className: "title"
|
|
177
|
+
}, /*#__PURE__*/_react.default.createElement("span", null, (0, _lang.getLocale)('Choose_an_option'))), /*#__PURE__*/_react.default.createElement("div", {
|
|
178
|
+
className: "content"
|
|
179
|
+
}, /*#__PURE__*/_react.default.createElement(_react.Fragment, null, filteredOptions.length === 0 && /*#__PURE__*/_react.default.createElement("div", {
|
|
180
|
+
className: "search-result-none"
|
|
181
|
+
}, (0, _lang.getLocale)('No_options_available')), filteredOptions.length > 0 && this.renderSelectOptions(filteredOptions)))), isShowCreateBtn && /*#__PURE__*/_react.default.createElement("div", {
|
|
182
|
+
className: "mb-create-select-item",
|
|
183
|
+
onClick: this.onAddNewOption
|
|
184
|
+
}, /*#__PURE__*/_react.default.createElement("i", {
|
|
185
|
+
className: "dtable-font dtable-icon-add-table"
|
|
186
|
+
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
187
|
+
className: "dtable-ui-add-new-option"
|
|
188
|
+
}, "".concat((0, _lang.getLocale)('Add_an_option'), " ").concat(searchVal)))));
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
MBSelectEditorPopover.defaultProps = {
|
|
192
|
+
isReadOnly: false,
|
|
193
|
+
isShowRemoveIcon: false,
|
|
194
|
+
isSupportNewOption: false,
|
|
195
|
+
value: []
|
|
196
|
+
};
|
|
197
|
+
var _default = exports.default = MBSelectEditorPopover;
|
|
@@ -45,7 +45,7 @@ class PCSelectEditor extends _react.default.Component {
|
|
|
45
45
|
option = this.filteredOptions[this.state.highlightIndex];
|
|
46
46
|
}
|
|
47
47
|
if (option) {
|
|
48
|
-
this.
|
|
48
|
+
this.onOptionItemToggle(option);
|
|
49
49
|
} else {
|
|
50
50
|
const {
|
|
51
51
|
searchValue
|
|
@@ -103,18 +103,18 @@ class PCSelectEditor extends _react.default.Component {
|
|
|
103
103
|
this.setState({
|
|
104
104
|
searchValue
|
|
105
105
|
});
|
|
106
|
-
|
|
106
|
+
let val = searchValue.toLowerCase();
|
|
107
107
|
this.filteredOptions = val ? options.filter(item => item.name && item.name.toLowerCase().indexOf(val) > -1) : options;
|
|
108
108
|
this.setState({
|
|
109
109
|
highlightIndex: this.filteredOptions.length > 0 ? 0 : -1
|
|
110
110
|
});
|
|
111
111
|
};
|
|
112
112
|
this.onAddNewOption = () => {
|
|
113
|
-
|
|
113
|
+
let name = this.state.searchValue.trim();
|
|
114
114
|
this.props.onAddNewOption(name);
|
|
115
115
|
};
|
|
116
|
-
this.
|
|
117
|
-
this.props.onCommit(
|
|
116
|
+
this.onOptionItemToggle = item => {
|
|
117
|
+
this.props.onCommit(item);
|
|
118
118
|
};
|
|
119
119
|
this.onMenuMouseEnter = index => {
|
|
120
120
|
this.setState({
|
|
@@ -231,7 +231,7 @@ class PCSelectEditor extends _react.default.Component {
|
|
|
231
231
|
onChange: this.onValueChanged,
|
|
232
232
|
autoFocus: true
|
|
233
233
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
234
|
-
className: "select-
|
|
234
|
+
className: "select-options-container",
|
|
235
235
|
ref: ref => this.container = ref
|
|
236
236
|
}, this.filteredOptions.length > 0 && this.filteredOptions.map((option, index) => {
|
|
237
237
|
let optionStyle = this.getOptionStyle(option);
|
|
@@ -248,7 +248,7 @@ class PCSelectEditor extends _react.default.Component {
|
|
|
248
248
|
className: (0, _classnames.default)('select-option-item-container', {
|
|
249
249
|
'select-option-item-container-highlight': index === highlightIndex
|
|
250
250
|
}),
|
|
251
|
-
onMouseDown: this.
|
|
251
|
+
onMouseDown: this.onOptionItemToggle.bind(this, option),
|
|
252
252
|
onMouseEnter: this.onMenuMouseEnter.bind(this, index),
|
|
253
253
|
onMouseLeave: this.onMenuMouseLeave.bind(this, index)
|
|
254
254
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -0,0 +1,84 @@
|
|
|
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
|
+
class SelectEditorOption extends _react.default.Component {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.onDeleteOption = event => {
|
|
13
|
+
event.nativeEvent.stopImmediatePropagation();
|
|
14
|
+
event.stopPropagation();
|
|
15
|
+
this.props.onDeleteSelectOption(this.props.option);
|
|
16
|
+
};
|
|
17
|
+
this.getContainerStyle = () => {
|
|
18
|
+
let option = this.props.option;
|
|
19
|
+
return {
|
|
20
|
+
display: 'inline-flex',
|
|
21
|
+
justifyContent: 'center',
|
|
22
|
+
marginRight: '10px',
|
|
23
|
+
padding: '0px 10px',
|
|
24
|
+
height: '20px',
|
|
25
|
+
borderRadius: '10px',
|
|
26
|
+
fontSize: '13px',
|
|
27
|
+
backgroundColor: option.color
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
this.getOptionStyle = option => {
|
|
31
|
+
const textColor = option.textColor || null;
|
|
32
|
+
return {
|
|
33
|
+
flex: 1,
|
|
34
|
+
display: 'flex',
|
|
35
|
+
alignContent: 'center',
|
|
36
|
+
margin: '0 4px 0 2px',
|
|
37
|
+
color: textColor
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
this.getOperationStyle = option => {
|
|
41
|
+
const textColor = option.textColor || null;
|
|
42
|
+
return {
|
|
43
|
+
height: '20px',
|
|
44
|
+
width: '16px',
|
|
45
|
+
cursor: 'pointer',
|
|
46
|
+
color: textColor === '#FFFFFF' ? '#FFFFFF' : '#909090',
|
|
47
|
+
transform: 'scale(.8)'
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
render() {
|
|
52
|
+
let {
|
|
53
|
+
option,
|
|
54
|
+
isShowRemoveIcon
|
|
55
|
+
} = this.props;
|
|
56
|
+
let containerStyle = this.getContainerStyle();
|
|
57
|
+
let optionStyle = this.getOptionStyle(option);
|
|
58
|
+
let operationStyle = this.getOperationStyle(option);
|
|
59
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
60
|
+
className: "dtable-ui select-option-item",
|
|
61
|
+
style: containerStyle
|
|
62
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
63
|
+
className: "option-info",
|
|
64
|
+
style: optionStyle
|
|
65
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
66
|
+
className: "option-name",
|
|
67
|
+
title: option.name
|
|
68
|
+
}, option.name)), isShowRemoveIcon && /*#__PURE__*/_react.default.createElement("div", {
|
|
69
|
+
className: "option-remove",
|
|
70
|
+
style: operationStyle,
|
|
71
|
+
onClick: this.onDeleteOption
|
|
72
|
+
}, /*#__PURE__*/_react.default.createElement("i", {
|
|
73
|
+
className: "dtable-font dtable-icon-fork-number",
|
|
74
|
+
style: {
|
|
75
|
+
fontSize: '12px',
|
|
76
|
+
lineHeight: '20px'
|
|
77
|
+
}
|
|
78
|
+
})));
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
SelectEditorOption.defaultProps = {
|
|
82
|
+
isShowRemoveIcon: false
|
|
83
|
+
};
|
|
84
|
+
var _default = exports.default = SelectEditorOption;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.initDateEditorLanguage = exports.getTrimmedString = exports.getSelectOptionItem = void 0;
|
|
7
7
|
const zhCN = require('@seafile/seafile-calendar/lib/locale/zh_CN');
|
|
8
8
|
const zhTW = require('@seafile/seafile-calendar/lib/locale/zh_TW');
|
|
9
9
|
const enUS = require('@seafile/seafile-calendar/lib/locale/en_US');
|
|
@@ -66,8 +66,4 @@ exports.getSelectOptionItem = getSelectOptionItem;
|
|
|
66
66
|
const getTrimmedString = value => {
|
|
67
67
|
return typeof value === 'string' ? value.trim() : '';
|
|
68
68
|
};
|
|
69
|
-
|
|
70
|
-
// min date and max date for mobile date picker
|
|
71
|
-
exports.getTrimmedString = getTrimmedString;
|
|
72
|
-
const minDate = exports.minDate = new Date('1900/01/01');
|
|
73
|
-
const maxDate = exports.maxDate = new Date('2100/12/31');
|
|
69
|
+
exports.getTrimmedString = getTrimmedString;
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _constants = require("../constants");
|
|
8
7
|
const HTML = 'text/html';
|
|
9
8
|
const TEXT = 'text/plain';
|
|
10
9
|
// const FILES = 'files';
|
|
@@ -37,7 +36,7 @@ function getEventTransfer(event) {
|
|
|
37
36
|
let html;
|
|
38
37
|
let text;
|
|
39
38
|
let files;
|
|
40
|
-
if (
|
|
39
|
+
if (window.isMobile) {
|
|
41
40
|
if (window.dtableTransfer) {
|
|
42
41
|
text = window.dtableTransfer['TEXT'];
|
|
43
42
|
}
|
package/lib/utils/utils.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.getTrimmedString = exports.getFormulaArrayValue = exports.getEventClassName = exports.getErrorMsg = exports.downloadFiles = exports.downloadFile = exports.debounce = void 0;
|
|
7
7
|
exports.isArrayFormatColumn = isArrayFormatColumn;
|
|
8
|
-
exports.throttle = exports.openUrlLink = exports.isValidUrl = exports.isValidCellValue = exports.
|
|
8
|
+
exports.throttle = exports.openUrlLink = exports.isValidUrl = exports.isValidCellValue = exports.isMobile = exports.isMac = exports.isFunction = void 0;
|
|
9
9
|
var _constants = require("../constants");
|
|
10
10
|
var _url = require("./url");
|
|
11
11
|
const debounce = (fn, wait) => {
|
|
@@ -34,22 +34,13 @@ const throttle = (func, delay) => {
|
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
36
|
exports.throttle = throttle;
|
|
37
|
+
const isMobile = exports.isMobile = typeof window !== 'undefined' && (window.innerWidth < 768 || navigator.userAgent.toLowerCase().match(/(ipod|ipad|iphone|android|coolpad|mmp|smartphone|midp|wap|xoom|symbian|j2me|blackberry|wince)/i) != null);
|
|
37
38
|
const isMac = () => {
|
|
38
39
|
const platform = navigator.platform;
|
|
39
40
|
// eslint-disable-next-line eqeqeq
|
|
40
41
|
return platform == 'Mac68K' || platform == 'MacPPC' || platform == 'Macintosh' || platform == 'MacIntel';
|
|
41
42
|
};
|
|
42
43
|
exports.isMac = isMac;
|
|
43
|
-
const isQQBuiltInBrowser = () => {
|
|
44
|
-
const userAgent = navigator.userAgent.toLowerCase();
|
|
45
|
-
return userAgent.indexOf(' qq') > -1 && userAgent.indexOf('mqqbrowser') < 0;
|
|
46
|
-
};
|
|
47
|
-
exports.isQQBuiltInBrowser = isQQBuiltInBrowser;
|
|
48
|
-
const isIPhone = () => {
|
|
49
|
-
const userAgent = navigator.userAgent.toLowerCase();
|
|
50
|
-
return /iphone/gi.test(userAgent);
|
|
51
|
-
};
|
|
52
|
-
exports.isIPhone = isIPhone;
|
|
53
44
|
const downloadFile = downloadUrl => {
|
|
54
45
|
const downloadFrame = document.getElementById('dtableUiComponentDownloadFrame');
|
|
55
46
|
if (downloadFrame != null) {
|
package/package.json
CHANGED
|
@@ -1,22 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dtable-ui-component",
|
|
3
|
-
"version": "6.0.29
|
|
3
|
+
"version": "6.0.29",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@seafile/react-image-lightbox": "4.0.2",
|
|
7
|
-
"@seafile/seafile-calendar": "0.0.
|
|
7
|
+
"@seafile/seafile-calendar": "0.0.24",
|
|
8
8
|
"@seafile/seafile-editor": "~2.0.6",
|
|
9
|
-
"antd-mobile": "2.3.1",
|
|
10
9
|
"classnames": "2.3.2",
|
|
11
10
|
"dayjs": "1.10.7",
|
|
12
11
|
"dtable-utils": "~5.0.19",
|
|
13
12
|
"is-hotkey": "0.2.0",
|
|
13
|
+
"rc-checkbox": "3.5.0",
|
|
14
14
|
"react-color": "2.19.3",
|
|
15
15
|
"react-responsive": "10.0.0",
|
|
16
16
|
"react-select": "5.10.0",
|
|
17
17
|
"react-sweet-progress": "^1.1.2",
|
|
18
18
|
"react-transition-group": "4.4.5",
|
|
19
|
-
"reactstrap": "9.2.3"
|
|
19
|
+
"reactstrap": "9.2.3",
|
|
20
|
+
"rmc-cascader": "5.0.3",
|
|
21
|
+
"rmc-date-picker": "6.0.10",
|
|
22
|
+
"rmc-dialog": "1.1.1",
|
|
23
|
+
"rmc-drawer": "0.4.11",
|
|
24
|
+
"rmc-feedback": "2.0.0",
|
|
25
|
+
"rmc-notification": "1.0.0",
|
|
26
|
+
"rmc-picker": "5.0.10",
|
|
27
|
+
"rmc-tabs": "1.2.29",
|
|
28
|
+
"rmc-tooltip": "1.0.1"
|
|
20
29
|
},
|
|
21
30
|
"scripts": {
|
|
22
31
|
"lint": "./node_modules/.bin/eslint ./src/ --fix",
|
|
@@ -66,18 +75,18 @@
|
|
|
66
75
|
"@babel/runtime": "7.22.11",
|
|
67
76
|
"@cfaester/enzyme-adapter-react-18": "0.8.0",
|
|
68
77
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
|
|
69
|
-
"@storybook/addon-actions": "
|
|
70
|
-
"@storybook/addon-
|
|
71
|
-
"@storybook/addon-
|
|
72
|
-
"@storybook/addon-
|
|
73
|
-
"@storybook/addon-
|
|
78
|
+
"@storybook/addon-actions": "8.6.12",
|
|
79
|
+
"@storybook/addon-controls": "^8.6.12",
|
|
80
|
+
"@storybook/addon-docs": "8.6.12",
|
|
81
|
+
"@storybook/addon-essentials": "8.6.12",
|
|
82
|
+
"@storybook/addon-interactions": "8.6.12",
|
|
74
83
|
"@storybook/addon-links": "7.6.17",
|
|
75
|
-
"@storybook/addon-onboarding": "
|
|
76
|
-
"@storybook/blocks": "
|
|
77
|
-
"@storybook/preset-create-react-app": "
|
|
78
|
-
"@storybook/react": "
|
|
79
|
-
"@storybook/react-webpack5": "
|
|
80
|
-
"@storybook/test": "
|
|
84
|
+
"@storybook/addon-onboarding": "8.6.12",
|
|
85
|
+
"@storybook/blocks": "8.6.12",
|
|
86
|
+
"@storybook/preset-create-react-app": "8.6.12",
|
|
87
|
+
"@storybook/react": "8.6.12",
|
|
88
|
+
"@storybook/react-webpack5": "8.6.12",
|
|
89
|
+
"@storybook/test": "^8.6.12",
|
|
81
90
|
"@svgr/webpack": "8.1.0",
|
|
82
91
|
"@testing-library/jest-dom": "5.17.0",
|
|
83
92
|
"@testing-library/react": "^11.1.0",
|
|
@@ -137,7 +146,7 @@
|
|
|
137
146
|
"sass-loader": "^12.3.0",
|
|
138
147
|
"semver": "^7.3.5",
|
|
139
148
|
"source-map-loader": "^3.0.0",
|
|
140
|
-
"storybook": "
|
|
149
|
+
"storybook": "8.6.12",
|
|
141
150
|
"style-loader": "^3.3.1",
|
|
142
151
|
"tailwindcss": "^3.0.2",
|
|
143
152
|
"terser-webpack-plugin": "^5.2.5",
|
package/lib/BodyPortal/index.js
DELETED
|
@@ -1,29 +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 _reactDom = _interopRequireDefault(require("react-dom"));
|
|
10
|
-
const canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
|
11
|
-
class BodyPortal extends _react.default.Component {
|
|
12
|
-
componentWillUnmount() {
|
|
13
|
-
if (this.defaultNode) {
|
|
14
|
-
document.body.removeChild(this.defaultNode);
|
|
15
|
-
}
|
|
16
|
-
this.defaultNode = null;
|
|
17
|
-
}
|
|
18
|
-
render() {
|
|
19
|
-
if (!canUseDOM) {
|
|
20
|
-
return null;
|
|
21
|
-
}
|
|
22
|
-
if (!this.props.node && !this.defaultNode) {
|
|
23
|
-
this.defaultNode = document.createElement('div');
|
|
24
|
-
document.body.appendChild(this.defaultNode);
|
|
25
|
-
}
|
|
26
|
-
return /*#__PURE__*/_reactDom.default.createPortal(this.props.children, this.props.node || this.defaultNode);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
var _default = exports.default = BodyPortal;
|
|
@@ -1,99 +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 _SvgIcon = _interopRequireDefault(require("../SvgIcon"));
|
|
12
|
-
var _constants = require("../constants");
|
|
13
|
-
class MBCheckboxEditor extends _react.Component {
|
|
14
|
-
constructor(props) {
|
|
15
|
-
super(props);
|
|
16
|
-
this.getValue = () => {
|
|
17
|
-
const {
|
|
18
|
-
value
|
|
19
|
-
} = this.state;
|
|
20
|
-
return value;
|
|
21
|
-
};
|
|
22
|
-
this.updateValue = value => {
|
|
23
|
-
if (value === this.state.value) {
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
this.setState({
|
|
27
|
-
value
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
this.onChangeCheckboxValue = event => {
|
|
31
|
-
if (event) {
|
|
32
|
-
event.stopPropagation();
|
|
33
|
-
event.nativeEvent.stopImmediatePropagation();
|
|
34
|
-
event.persist();
|
|
35
|
-
}
|
|
36
|
-
const {
|
|
37
|
-
value
|
|
38
|
-
} = this.state;
|
|
39
|
-
const newValue = !value;
|
|
40
|
-
this.setState({
|
|
41
|
-
value: newValue
|
|
42
|
-
}, () => {
|
|
43
|
-
this.props.onCommit && this.props.onCommit(newValue);
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
this.renderIcon = (symbol, color) => {
|
|
47
|
-
const className = (0, _classnames.default)('dtable-ui-checkbox-check-mark', {
|
|
48
|
-
'dtable-ui-checkbox-check-svg': !(symbol !== null && symbol !== void 0 && symbol.startsWith('dtable-icon'))
|
|
49
|
-
});
|
|
50
|
-
if (symbol.startsWith('dtable-icon')) {
|
|
51
|
-
return /*#__PURE__*/_react.default.createElement("span", {
|
|
52
|
-
className: "dtable-font ".concat(symbol, " ").concat(className || ''),
|
|
53
|
-
style: {
|
|
54
|
-
color
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
return /*#__PURE__*/_react.default.createElement(_SvgIcon.default, {
|
|
59
|
-
className: className,
|
|
60
|
-
symbol: symbol,
|
|
61
|
-
color: color
|
|
62
|
-
});
|
|
63
|
-
};
|
|
64
|
-
this.state = {
|
|
65
|
-
value: props.value || false
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
componentDidUpdate(prevProps) {
|
|
69
|
-
const {
|
|
70
|
-
value
|
|
71
|
-
} = this.props;
|
|
72
|
-
if (value !== prevProps.value) {
|
|
73
|
-
this.setState({
|
|
74
|
-
value
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
render() {
|
|
79
|
-
var _column$data;
|
|
80
|
-
const {
|
|
81
|
-
className,
|
|
82
|
-
style,
|
|
83
|
-
column
|
|
84
|
-
} = this.props;
|
|
85
|
-
const {
|
|
86
|
-
value
|
|
87
|
-
} = this.state;
|
|
88
|
-
let checkboxStyle = column === null || column === void 0 ? void 0 : (_column$data = column.data) === null || _column$data === void 0 ? void 0 : _column$data.checkbox_style;
|
|
89
|
-
if (!checkboxStyle || Object.keys(checkboxStyle).length < 2) {
|
|
90
|
-
checkboxStyle = _constants.DEFAULT_CHECKBOX_MARK_STYLE;
|
|
91
|
-
}
|
|
92
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
93
|
-
className: (0, _classnames.default)('dtable-ui-checkbox-editor', className),
|
|
94
|
-
style: style || {},
|
|
95
|
-
onTouchStart: this.onChangeCheckboxValue
|
|
96
|
-
}, value && this.renderIcon(checkboxStyle.type, checkboxStyle.color));
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
var _default = exports.default = MBCheckboxEditor;
|