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,24 +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 _reactResponsive = _interopRequireDefault(require("react-responsive"));
|
|
11
|
-
var _pcEditor = _interopRequireDefault(require("./pc-editor"));
|
|
12
|
-
var _mbEditor = _interopRequireDefault(require("./mb-editor"));
|
|
13
|
-
const RowExpandGeolocationEditor = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
14
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
15
|
-
query: "(min-width: 768px)"
|
|
16
|
-
}, /*#__PURE__*/_react.default.createElement(_pcEditor.default, Object.assign({}, props, {
|
|
17
|
-
ref: ref
|
|
18
|
-
}))), /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
19
|
-
query: "(max-width: 768px)"
|
|
20
|
-
}, /*#__PURE__*/_react.default.createElement(_mbEditor.default, Object.assign({}, props, {
|
|
21
|
-
ref: ref
|
|
22
|
-
}))));
|
|
23
|
-
});
|
|
24
|
-
var _default = exports.default = RowExpandGeolocationEditor;
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _dtableUtils = require("dtable-utils");
|
|
10
|
-
var _addBtn = _interopRequireDefault(require("../../add-btn"));
|
|
11
|
-
var _lang = require("../../../lang");
|
|
12
|
-
var _GeolocationEditor = _interopRequireDefault(require("../../../GeolocationEditor"));
|
|
13
|
-
class RowExpandMBGeolocationEditor extends _react.default.Component {
|
|
14
|
-
constructor(props) {
|
|
15
|
-
super(props);
|
|
16
|
-
this.openEditor = () => {
|
|
17
|
-
this.setState({
|
|
18
|
-
isShowEditor: true
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
this.closeEditor = () => {
|
|
22
|
-
this.setState({
|
|
23
|
-
isShowEditor: false
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
this.onCommit = value => {
|
|
27
|
-
this.setState({
|
|
28
|
-
value
|
|
29
|
-
});
|
|
30
|
-
this.props.onCommit(value);
|
|
31
|
-
};
|
|
32
|
-
this.getLocationInfo = value => {
|
|
33
|
-
const {
|
|
34
|
-
column,
|
|
35
|
-
config
|
|
36
|
-
} = this.props;
|
|
37
|
-
const {
|
|
38
|
-
dtableBaiduMapKey,
|
|
39
|
-
dtableMineMapKey
|
|
40
|
-
} = config;
|
|
41
|
-
const isBaiduMap = !!(dtableBaiduMapKey || dtableMineMapKey);
|
|
42
|
-
return (0, _dtableUtils.getGeolocationDisplayString)(value, column.data, {
|
|
43
|
-
isBaiduMap,
|
|
44
|
-
hyphen: ' '
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
this.renderGeoLocation = () => {
|
|
48
|
-
const {
|
|
49
|
-
value
|
|
50
|
-
} = this.state;
|
|
51
|
-
const text = (0, _dtableUtils.isEmptyObject)(value) ? (0, _lang.getLocale)('Edit_Location') : this.getLocationInfo(value);
|
|
52
|
-
return /*#__PURE__*/_react.default.createElement(_addBtn.default, {
|
|
53
|
-
onClick: this.openEditor,
|
|
54
|
-
text: text,
|
|
55
|
-
className: "py-4"
|
|
56
|
-
});
|
|
57
|
-
};
|
|
58
|
-
const {
|
|
59
|
-
row,
|
|
60
|
-
column: _column,
|
|
61
|
-
valueKey
|
|
62
|
-
} = props;
|
|
63
|
-
this.state = {
|
|
64
|
-
isShowEditor: false,
|
|
65
|
-
value: row[_column[valueKey]] || {}
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
69
|
-
const {
|
|
70
|
-
column,
|
|
71
|
-
row,
|
|
72
|
-
valueKey
|
|
73
|
-
} = nextProps;
|
|
74
|
-
if (row._id !== this.props.row._id) {
|
|
75
|
-
this.setState({
|
|
76
|
-
value: row[column[valueKey]] || {},
|
|
77
|
-
isShowEditor: false
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
render() {
|
|
82
|
-
const {
|
|
83
|
-
column,
|
|
84
|
-
row,
|
|
85
|
-
config
|
|
86
|
-
} = this.props;
|
|
87
|
-
const {
|
|
88
|
-
value
|
|
89
|
-
} = this.state;
|
|
90
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, this.renderGeoLocation(), this.state.isShowEditor && /*#__PURE__*/_react.default.createElement(_GeolocationEditor.default, {
|
|
91
|
-
column: column,
|
|
92
|
-
row: row,
|
|
93
|
-
value: value,
|
|
94
|
-
config: config,
|
|
95
|
-
onCommit: this.onCommit,
|
|
96
|
-
onToggle: this.closeEditor
|
|
97
|
-
}));
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
var _default = exports.default = RowExpandMBGeolocationEditor;
|
|
@@ -1,24 +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 _reactResponsive = _interopRequireDefault(require("react-responsive"));
|
|
11
|
-
var _pcEditor = _interopRequireDefault(require("./pc-editor"));
|
|
12
|
-
var _mbEditor = _interopRequireDefault(require("./mb-editor"));
|
|
13
|
-
const RowExpandImageEditor = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
14
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
15
|
-
query: "(min-width: 768px)"
|
|
16
|
-
}, /*#__PURE__*/_react.default.createElement(_pcEditor.default, Object.assign({}, props, {
|
|
17
|
-
ref: ref
|
|
18
|
-
}))), /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
19
|
-
query: "(max-width: 768px)"
|
|
20
|
-
}, /*#__PURE__*/_react.default.createElement(_mbEditor.default, Object.assign({}, props, {
|
|
21
|
-
ref: ref
|
|
22
|
-
}))));
|
|
23
|
-
});
|
|
24
|
-
var _default = exports.default = RowExpandImageEditor;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
.dtable-ui-mobile-row-expand-image {
|
|
2
|
-
margin: 0;
|
|
3
|
-
width: 100%;
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-wrap: wrap;
|
|
6
|
-
justify-content: flex-start;
|
|
7
|
-
min-height: 50px;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.dtable-ui-mobile-row-expand-image .dtable-ui-mobile-row-expand-add-btn {
|
|
11
|
-
height: 100%;
|
|
12
|
-
line-height: 50px;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.dtable-ui-mobile-row-expand-image .dtable-ui-mobile-row-expand-img-item {
|
|
16
|
-
height: auto;
|
|
17
|
-
max-height: 150px;
|
|
18
|
-
width: calc(50% - 10px);
|
|
19
|
-
margin-left: 0px;
|
|
20
|
-
margin-right: 0px;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.dtable-ui-mobile-row-expand-image .dtable-ui-mobile-row-expand-img-item img {
|
|
24
|
-
max-width: 100%;
|
|
25
|
-
max-height: 100%;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.dtable-ui-mobile-row-expand-image .dtable-ui-mobile-row-expand-img-item:nth-child(even) {
|
|
29
|
-
margin-left: 20px;
|
|
30
|
-
}
|
|
@@ -1,109 +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 _addBtn = _interopRequireDefault(require("../../add-btn"));
|
|
10
|
-
var _lang = require("../../../lang");
|
|
11
|
-
var _ImageThumbnail = _interopRequireDefault(require("../../../ImageThumbnail"));
|
|
12
|
-
var _ImageEditor = _interopRequireDefault(require("../../../ImageEditor"));
|
|
13
|
-
require("./index.css");
|
|
14
|
-
class RowExpandMBImageEditor extends _react.default.Component {
|
|
15
|
-
constructor(props) {
|
|
16
|
-
super(props);
|
|
17
|
-
this.toggleEditor = () => {
|
|
18
|
-
this.setState({
|
|
19
|
-
isShowEditor: !this.state.isShowEditor
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
this.closeEditor = () => {
|
|
23
|
-
this.setState({
|
|
24
|
-
isShowEditor: false
|
|
25
|
-
});
|
|
26
|
-
};
|
|
27
|
-
this.onCommit = value => {
|
|
28
|
-
this.setState({
|
|
29
|
-
value: value
|
|
30
|
-
});
|
|
31
|
-
this.props.onCommit(value);
|
|
32
|
-
};
|
|
33
|
-
this.deleteImage = index => {
|
|
34
|
-
let value = this.state.value;
|
|
35
|
-
let updatedValue = value.slice(0);
|
|
36
|
-
updatedValue.splice(index, 1);
|
|
37
|
-
this.setState({
|
|
38
|
-
value: updatedValue
|
|
39
|
-
});
|
|
40
|
-
this.props.onCommit(updatedValue);
|
|
41
|
-
};
|
|
42
|
-
this.renderImages = () => {
|
|
43
|
-
const {
|
|
44
|
-
value
|
|
45
|
-
} = this.state;
|
|
46
|
-
const {
|
|
47
|
-
config
|
|
48
|
-
} = this.props;
|
|
49
|
-
return value.map((src, index) => {
|
|
50
|
-
return /*#__PURE__*/_react.default.createElement(_ImageThumbnail.default, {
|
|
51
|
-
key: "image-".concat(index),
|
|
52
|
-
index: index,
|
|
53
|
-
src: src,
|
|
54
|
-
className: "dtable-ui-mobile-row-expand-img-item",
|
|
55
|
-
config: config,
|
|
56
|
-
onClick: this.toggleEditor,
|
|
57
|
-
deleteImage: this.deleteImage
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
};
|
|
61
|
-
const {
|
|
62
|
-
column,
|
|
63
|
-
row,
|
|
64
|
-
valueKey
|
|
65
|
-
} = props;
|
|
66
|
-
this.state = {
|
|
67
|
-
isShowEditor: false,
|
|
68
|
-
value: row[column[valueKey]] || []
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
72
|
-
const {
|
|
73
|
-
column,
|
|
74
|
-
row,
|
|
75
|
-
valueKey
|
|
76
|
-
} = nextProps;
|
|
77
|
-
if (row._id !== this.props.row._id) {
|
|
78
|
-
this.setState({
|
|
79
|
-
value: row[column[valueKey]] || [],
|
|
80
|
-
isShowEditor: false
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
render() {
|
|
85
|
-
const {
|
|
86
|
-
column,
|
|
87
|
-
config,
|
|
88
|
-
uploadFile
|
|
89
|
-
} = this.props;
|
|
90
|
-
const {
|
|
91
|
-
isShowEditor,
|
|
92
|
-
value
|
|
93
|
-
} = this.state;
|
|
94
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
95
|
-
className: "dtable-ui-mobile-row-expand-image position-relative"
|
|
96
|
-
}, value.length === 0 ? /*#__PURE__*/_react.default.createElement(_addBtn.default, {
|
|
97
|
-
onClick: this.toggleEditor,
|
|
98
|
-
text: (0, _lang.getLocale)('Add_images')
|
|
99
|
-
}) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, this.renderImages())), isShowEditor && /*#__PURE__*/_react.default.createElement(_ImageEditor.default, {
|
|
100
|
-
value: value,
|
|
101
|
-
column: column,
|
|
102
|
-
config: config,
|
|
103
|
-
onToggle: this.closeEditor,
|
|
104
|
-
onCommit: this.onCommit,
|
|
105
|
-
uploadFile: uploadFile
|
|
106
|
-
}));
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
var _default = exports.default = RowExpandMBImageEditor;
|
|
@@ -1,24 +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 _reactResponsive = _interopRequireDefault(require("react-responsive"));
|
|
11
|
-
var _pcEditor = _interopRequireDefault(require("./pc-editor"));
|
|
12
|
-
var _mbEditor = _interopRequireDefault(require("./mb-editor"));
|
|
13
|
-
const RowExpandLongTextEditor = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
14
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
15
|
-
query: "(min-width: 768px)"
|
|
16
|
-
}, /*#__PURE__*/_react.default.createElement(_pcEditor.default, Object.assign({}, props, {
|
|
17
|
-
ref: ref
|
|
18
|
-
}))), /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
19
|
-
query: "(max-width: 768px)"
|
|
20
|
-
}, /*#__PURE__*/_react.default.createElement(_mbEditor.default, Object.assign({}, props, {
|
|
21
|
-
ref: ref
|
|
22
|
-
}))));
|
|
23
|
-
});
|
|
24
|
-
var _default = exports.default = RowExpandLongTextEditor;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
.dtable-ui-mobile-long-text-editor .dtable-ui-mobile-long-text-editor-container {
|
|
2
|
-
margin-top: 20px;
|
|
3
|
-
border-top: 1px solid #e9e9e9;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.dtable-ui-mobile-long-text-editor .dtable-ui-mobile-long-text-editor-container .am-textarea-item {
|
|
7
|
-
padding: 0 1rem;
|
|
8
|
-
border-bottom: 1px solid #e9e9e9;
|
|
9
|
-
height: unset;
|
|
10
|
-
}
|
|
@@ -1,80 +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 _textareaItem = _interopRequireDefault(require("antd-mobile/lib/textarea-item"));
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
var _seafileEditor = require("@seafile/seafile-editor");
|
|
12
|
-
var _MobileFullScreenPage = _interopRequireDefault(require("../../../../MobileFullScreenPage"));
|
|
13
|
-
var _lang = require("../../../../lang");
|
|
14
|
-
require("./index.css");
|
|
15
|
-
const Editor = _ref => {
|
|
16
|
-
let {
|
|
17
|
-
value: oldValue,
|
|
18
|
-
title,
|
|
19
|
-
onToggle,
|
|
20
|
-
onChange
|
|
21
|
-
} = _ref;
|
|
22
|
-
const [value, setValue] = (0, _react.useState)(oldValue || '');
|
|
23
|
-
const hasUnSaved = (0, _react.useRef)(false);
|
|
24
|
-
const timer = (0, _react.useRef)(null);
|
|
25
|
-
const rowCounts = (0, _react.useMemo)(() => document.body.offsetWidth < 768 ? 10 : 20, []);
|
|
26
|
-
const handleTextChange = (0, _react.useCallback)(newValue => {
|
|
27
|
-
if (value === newValue) return;
|
|
28
|
-
setValue(newValue);
|
|
29
|
-
hasUnSaved.current = true;
|
|
30
|
-
}, [value]);
|
|
31
|
-
const onSave = (0, _react.useCallback)(() => {
|
|
32
|
-
if (!hasUnSaved.current) return;
|
|
33
|
-
const {
|
|
34
|
-
previewText,
|
|
35
|
-
images,
|
|
36
|
-
links,
|
|
37
|
-
checklist
|
|
38
|
-
} = (0, _seafileEditor.getPreviewContent)(value);
|
|
39
|
-
const newValue = Object.assign({}, {
|
|
40
|
-
text: value,
|
|
41
|
-
preview: previewText,
|
|
42
|
-
images: images,
|
|
43
|
-
links: links,
|
|
44
|
-
checklist
|
|
45
|
-
});
|
|
46
|
-
onChange && onChange(newValue);
|
|
47
|
-
hasUnSaved.current = false;
|
|
48
|
-
}, [value, onChange]);
|
|
49
|
-
const handleSave = (0, _react.useCallback)(() => {
|
|
50
|
-
onSave();
|
|
51
|
-
onToggle();
|
|
52
|
-
}, [onSave, onToggle]);
|
|
53
|
-
(0, _react.useEffect)(() => {
|
|
54
|
-
timer.current = setInterval(() => {
|
|
55
|
-
onSave();
|
|
56
|
-
}, 60000);
|
|
57
|
-
return () => {
|
|
58
|
-
onSave();
|
|
59
|
-
clearInterval(timer.current);
|
|
60
|
-
timer.current = null;
|
|
61
|
-
};
|
|
62
|
-
}, [onSave]);
|
|
63
|
-
return /*#__PURE__*/_react.default.createElement(_MobileFullScreenPage.default, {
|
|
64
|
-
className: "dtable-ui-mobile-long-text-editor",
|
|
65
|
-
onLeftClick: onToggle,
|
|
66
|
-
onClose: onToggle,
|
|
67
|
-
onRightClick: handleSave
|
|
68
|
-
}, /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (0, _lang.getLocale)('Cancel')), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, title), /*#__PURE__*/_react.default.createElement("span", {
|
|
69
|
-
style: {
|
|
70
|
-
color: '#f09f3f'
|
|
71
|
-
}
|
|
72
|
-
}, (0, _lang.getLocale)('Submit')), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
73
|
-
className: "dtable-ui-mobile-long-text-editor-container"
|
|
74
|
-
}, /*#__PURE__*/_react.default.createElement(_textareaItem.default, {
|
|
75
|
-
rows: rowCounts,
|
|
76
|
-
value: value,
|
|
77
|
-
onChange: handleTextChange
|
|
78
|
-
}))));
|
|
79
|
-
};
|
|
80
|
-
var _default = exports.default = Editor;
|
|
@@ -1,91 +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 _seafileEditor = require("@seafile/seafile-editor");
|
|
10
|
-
var _lang = require("../../../lang");
|
|
11
|
-
var _addBtn = _interopRequireDefault(require("../../add-btn"));
|
|
12
|
-
var _editor = _interopRequireDefault(require("./editor"));
|
|
13
|
-
require("./index.css");
|
|
14
|
-
class RowExpandMBLongTextEditor extends _react.default.Component {
|
|
15
|
-
constructor(props) {
|
|
16
|
-
super(props);
|
|
17
|
-
this.convertMarkdown = value => {
|
|
18
|
-
const newValue = value && typeof value === 'object' ? value.text : value;
|
|
19
|
-
_seafileEditor.processor.process(newValue).then(result => {
|
|
20
|
-
const innerHtml = String(result).replace(/<a /ig, '<a target="_blank" ');
|
|
21
|
-
this.setState({
|
|
22
|
-
innerHtml
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
this.onCommit = value => {
|
|
27
|
-
this.convertMarkdown(value.text);
|
|
28
|
-
this.props.onCommit(value);
|
|
29
|
-
};
|
|
30
|
-
this.openEditor = () => {
|
|
31
|
-
this.setState({
|
|
32
|
-
isShowEditor: true
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
|
-
this.closeEditor = () => {
|
|
36
|
-
this.setState({
|
|
37
|
-
isShowEditor: false
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
this.state = {
|
|
41
|
-
innerHtml: null,
|
|
42
|
-
isShowEditor: false
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
componentDidMount() {
|
|
46
|
-
this.convertMarkdown(this.props.value);
|
|
47
|
-
}
|
|
48
|
-
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
49
|
-
var _this$editorRef, _this$editorRef$curre;
|
|
50
|
-
const {
|
|
51
|
-
column,
|
|
52
|
-
row,
|
|
53
|
-
valueKey
|
|
54
|
-
} = nextProps;
|
|
55
|
-
const {
|
|
56
|
-
column: currentColumn,
|
|
57
|
-
row: currentRow
|
|
58
|
-
} = this.props;
|
|
59
|
-
const value = row[column[valueKey]];
|
|
60
|
-
const currentValue = currentRow[currentColumn[valueKey]];
|
|
61
|
-
if (value !== currentValue && !((_this$editorRef = this.editorRef) !== null && _this$editorRef !== void 0 && (_this$editorRef$curre = _this$editorRef.current) !== null && _this$editorRef$curre !== void 0 && _this$editorRef$curre.enableEdit)) {
|
|
62
|
-
this.convertMarkdown(value);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
render() {
|
|
66
|
-
const {
|
|
67
|
-
column
|
|
68
|
-
} = this.props;
|
|
69
|
-
const {
|
|
70
|
-
innerHtml,
|
|
71
|
-
isShowEditor
|
|
72
|
-
} = this.state;
|
|
73
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, innerHtml ? /*#__PURE__*/_react.default.createElement("div", {
|
|
74
|
-
className: "dtable-ui-mobile-long-text-formatter article py-2",
|
|
75
|
-
onClick: this.openEditor.bind(this),
|
|
76
|
-
dangerouslySetInnerHTML: {
|
|
77
|
-
__html: this.state.innerHtml
|
|
78
|
-
}
|
|
79
|
-
}) : /*#__PURE__*/_react.default.createElement(_addBtn.default, {
|
|
80
|
-
className: "py-4",
|
|
81
|
-
onClick: this.openEditor,
|
|
82
|
-
text: (0, _lang.getLocale)('Edit_long_text')
|
|
83
|
-
}), isShowEditor && /*#__PURE__*/_react.default.createElement(_editor.default, {
|
|
84
|
-
onChange: this.onCommit,
|
|
85
|
-
value: innerHtml,
|
|
86
|
-
onToggle: this.closeEditor,
|
|
87
|
-
title: column.name
|
|
88
|
-
}));
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
var _default = exports.default = RowExpandMBLongTextEditor;
|
|
@@ -1,24 +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 _reactResponsive = _interopRequireDefault(require("react-responsive"));
|
|
11
|
-
var _pcEditor = _interopRequireDefault(require("./pc-editor"));
|
|
12
|
-
var _mbEditor = _interopRequireDefault(require("./mb-editor"));
|
|
13
|
-
const RowExpandMultipleSelectEditor = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
14
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
15
|
-
query: "(min-width: 768px)"
|
|
16
|
-
}, /*#__PURE__*/_react.default.createElement(_pcEditor.default, Object.assign({}, props, {
|
|
17
|
-
ref: ref
|
|
18
|
-
}))), /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
19
|
-
query: "(max-width: 768px)"
|
|
20
|
-
}, /*#__PURE__*/_react.default.createElement(_mbEditor.default, Object.assign({}, props, {
|
|
21
|
-
ref: ref
|
|
22
|
-
}))));
|
|
23
|
-
});
|
|
24
|
-
var _default = exports.default = RowExpandMultipleSelectEditor;
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _dtableUtils = require("dtable-utils");
|
|
10
|
-
var _MultipleSelectEditor = _interopRequireDefault(require("../../../MultipleSelectEditor"));
|
|
11
|
-
var _SelectItem = _interopRequireDefault(require("../../../SelectItem"));
|
|
12
|
-
var _lang = require("../../../lang");
|
|
13
|
-
var _rightAngle = _interopRequireDefault(require("../../right-angle"));
|
|
14
|
-
var _objectUtils = _interopRequireDefault(require("../../../utils/object-utils"));
|
|
15
|
-
var _constants = require("../../../constants");
|
|
16
|
-
var _addBtn = _interopRequireDefault(require("../../add-btn"));
|
|
17
|
-
class RowExpandMBMultipleSelectEditor extends _react.default.Component {
|
|
18
|
-
constructor(_props) {
|
|
19
|
-
super(_props);
|
|
20
|
-
this.getOptions = props => {
|
|
21
|
-
const {
|
|
22
|
-
column
|
|
23
|
-
} = props;
|
|
24
|
-
return (0, _dtableUtils.getColumnOptions)(column);
|
|
25
|
-
};
|
|
26
|
-
this.toggleEditor = value => {
|
|
27
|
-
this.setState({
|
|
28
|
-
showEditor: value
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
this.openEditor = event => {
|
|
32
|
-
event.stopPropagation();
|
|
33
|
-
this.toggleEditor(true);
|
|
34
|
-
};
|
|
35
|
-
this.closeEditor = () => {
|
|
36
|
-
this.toggleEditor(false);
|
|
37
|
-
};
|
|
38
|
-
this.onChange = option => {
|
|
39
|
-
const optionKey = option[this.key];
|
|
40
|
-
let newValue = this.state.value.slice(0);
|
|
41
|
-
const optionKeyIndex = newValue.findIndex(o => o === optionKey);
|
|
42
|
-
if (optionKeyIndex === -1) {
|
|
43
|
-
newValue.push(optionKey);
|
|
44
|
-
} else {
|
|
45
|
-
newValue.splice(optionKeyIndex, 1);
|
|
46
|
-
}
|
|
47
|
-
this.setState({
|
|
48
|
-
value: newValue
|
|
49
|
-
});
|
|
50
|
-
this.props.onCommit(newValue);
|
|
51
|
-
};
|
|
52
|
-
this.removeOption = (option, event) => {
|
|
53
|
-
event.stopPropagation();
|
|
54
|
-
event && event.nativeEvent.stopImmediatePropagation();
|
|
55
|
-
const optionKey = option[this.key];
|
|
56
|
-
let newValue = this.state.value.slice(0);
|
|
57
|
-
const optionKeyIndex = newValue.findIndex(o => o === optionKey);
|
|
58
|
-
if (optionKeyIndex !== -1) {
|
|
59
|
-
newValue.splice(optionKeyIndex, 1);
|
|
60
|
-
}
|
|
61
|
-
this.setState({
|
|
62
|
-
value: newValue
|
|
63
|
-
});
|
|
64
|
-
this.props.onCommit(newValue);
|
|
65
|
-
};
|
|
66
|
-
this.renderOptions = () => {
|
|
67
|
-
const {
|
|
68
|
-
value
|
|
69
|
-
} = this.state;
|
|
70
|
-
let displayOptions = [];
|
|
71
|
-
if (Array.isArray(value)) {
|
|
72
|
-
const selectedOptions = this.options.filter(option => value.includes(option[this.key]));
|
|
73
|
-
const selectedOptionIds = selectedOptions.map(option => option[this.key]);
|
|
74
|
-
const invalidOptionIds = value.filter(optionId => !selectedOptionIds.includes(optionId));
|
|
75
|
-
displayOptions = selectedOptions.map((option, optionIdx) => {
|
|
76
|
-
return /*#__PURE__*/_react.default.createElement(_SelectItem.default, {
|
|
77
|
-
option: option,
|
|
78
|
-
key: optionIdx,
|
|
79
|
-
isShowRemove: true,
|
|
80
|
-
onRemove: this.removeOption.bind(this, option)
|
|
81
|
-
});
|
|
82
|
-
}).concat(invalidOptionIds.map((optionId, index) => {
|
|
83
|
-
const option = {
|
|
84
|
-
name: (0, _lang.getLocale)(_constants.DELETED_OPTION_TIPS),
|
|
85
|
-
color: _constants.DELETED_OPTION_BACKGROUND_COLOR
|
|
86
|
-
};
|
|
87
|
-
return /*#__PURE__*/_react.default.createElement(_SelectItem.default, {
|
|
88
|
-
option: option,
|
|
89
|
-
key: "deleted-".concat(index),
|
|
90
|
-
isShowRemove: true,
|
|
91
|
-
onRemove: this.removeOption.bind(this, {
|
|
92
|
-
[this.key]: optionId
|
|
93
|
-
})
|
|
94
|
-
});
|
|
95
|
-
}));
|
|
96
|
-
}
|
|
97
|
-
if (displayOptions.length === 0) return /*#__PURE__*/_react.default.createElement(_addBtn.default, {
|
|
98
|
-
text: (0, _lang.getLocale)('Select_option(s)')
|
|
99
|
-
});
|
|
100
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
101
|
-
style: {
|
|
102
|
-
minHeight: 50,
|
|
103
|
-
padding: '10px 0',
|
|
104
|
-
display: 'flex',
|
|
105
|
-
flexWrap: 'wrap'
|
|
106
|
-
}
|
|
107
|
-
}, displayOptions);
|
|
108
|
-
};
|
|
109
|
-
this.state = {
|
|
110
|
-
value: _props.value || [],
|
|
111
|
-
isShowEditor: false
|
|
112
|
-
};
|
|
113
|
-
this.key = _props.valueKey === 'name' ? 'name' : 'id';
|
|
114
|
-
this.options = this.getOptions(_props);
|
|
115
|
-
}
|
|
116
|
-
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
117
|
-
const {
|
|
118
|
-
value,
|
|
119
|
-
column
|
|
120
|
-
} = nextProps;
|
|
121
|
-
if (value !== this.props.value || !_objectUtils.default.isSameObject(column, this.props.column)) {
|
|
122
|
-
this.options = this.getOptions(nextProps);
|
|
123
|
-
this.setState({
|
|
124
|
-
value,
|
|
125
|
-
isShowEditor: false
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
render() {
|
|
130
|
-
const {
|
|
131
|
-
column,
|
|
132
|
-
isSupportNewOption,
|
|
133
|
-
onAddNewOption
|
|
134
|
-
} = this.props;
|
|
135
|
-
const {
|
|
136
|
-
showEditor,
|
|
137
|
-
value
|
|
138
|
-
} = this.state;
|
|
139
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
140
|
-
className: "dtable-ui dtable-ui-mobile-row-expand-options-editor position-relative",
|
|
141
|
-
onClick: this.openEditor
|
|
142
|
-
}, this.renderOptions(), /*#__PURE__*/_react.default.createElement(_rightAngle.default, null)), showEditor && /*#__PURE__*/_react.default.createElement(_MultipleSelectEditor.default, {
|
|
143
|
-
value: value,
|
|
144
|
-
column: column,
|
|
145
|
-
valueKey: this.key,
|
|
146
|
-
options: this.options,
|
|
147
|
-
onCommit: this.onChange,
|
|
148
|
-
onClose: this.closeEditor,
|
|
149
|
-
isSupportNewOption: isSupportNewOption,
|
|
150
|
-
onAddNewOption: onAddNewOption
|
|
151
|
-
}));
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
var _default = exports.default = RowExpandMBMultipleSelectEditor;
|