dtable-ui-component 6.0.29-beta9 → 6.0.30
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 +365 -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,76 @@
|
|
|
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 _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
require("./index.css");
|
|
12
|
+
/* tslint:disable:jsx-no-multiline-js */
|
|
13
|
+
|
|
14
|
+
class ActivityIndicator extends React.Component {
|
|
15
|
+
render() {
|
|
16
|
+
const {
|
|
17
|
+
prefixCls,
|
|
18
|
+
className,
|
|
19
|
+
animating,
|
|
20
|
+
toast,
|
|
21
|
+
size,
|
|
22
|
+
text
|
|
23
|
+
} = this.props;
|
|
24
|
+
const wrapClass = (0, _classnames.default)(prefixCls, className, {
|
|
25
|
+
["".concat(prefixCls, "-lg")]: size === 'large',
|
|
26
|
+
["".concat(prefixCls, "-sm")]: size === 'small',
|
|
27
|
+
["".concat(prefixCls, "-toast")]: !!toast
|
|
28
|
+
});
|
|
29
|
+
const spinnerClass = (0, _classnames.default)("".concat(prefixCls, "-spinner"), {
|
|
30
|
+
["".concat(prefixCls, "-spinner-lg")]: !!toast || size === 'large'
|
|
31
|
+
});
|
|
32
|
+
if (animating) {
|
|
33
|
+
if (toast) {
|
|
34
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
35
|
+
className: wrapClass
|
|
36
|
+
}, text ? /*#__PURE__*/React.createElement("div", {
|
|
37
|
+
className: "".concat(prefixCls, "-content")
|
|
38
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
39
|
+
className: spinnerClass,
|
|
40
|
+
"aria-hidden": "true"
|
|
41
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
42
|
+
className: "".concat(prefixCls, "-toast")
|
|
43
|
+
}, text)) : /*#__PURE__*/React.createElement("div", {
|
|
44
|
+
className: "".concat(prefixCls, "-content")
|
|
45
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
46
|
+
className: spinnerClass,
|
|
47
|
+
"aria-label": "Loading"
|
|
48
|
+
})));
|
|
49
|
+
} else {
|
|
50
|
+
return text ? /*#__PURE__*/React.createElement("div", {
|
|
51
|
+
className: wrapClass
|
|
52
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
53
|
+
className: spinnerClass,
|
|
54
|
+
"aria-hidden": "true"
|
|
55
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
56
|
+
className: "".concat(prefixCls, "-tip")
|
|
57
|
+
}, text)) : /*#__PURE__*/React.createElement("div", {
|
|
58
|
+
className: wrapClass
|
|
59
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
60
|
+
className: spinnerClass,
|
|
61
|
+
"aria-label": "loading"
|
|
62
|
+
}));
|
|
63
|
+
}
|
|
64
|
+
} else {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.default = ActivityIndicator;
|
|
70
|
+
ActivityIndicator.defaultProps = {
|
|
71
|
+
prefixCls: 'am-activity-indicator',
|
|
72
|
+
animating: true,
|
|
73
|
+
size: 'small',
|
|
74
|
+
panelColor: 'rgba(34,34,34,0.6)',
|
|
75
|
+
toast: false
|
|
76
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
@import url('../css/am.css');
|
|
2
|
+
|
|
3
|
+
.am-badge {
|
|
4
|
+
position: relative;
|
|
5
|
+
display: inline-block;
|
|
6
|
+
line-height: 1;
|
|
7
|
+
vertical-align: middle;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.am-badge-text {
|
|
11
|
+
text-rendering: optimizeLegibility;
|
|
12
|
+
-webkit-font-smoothing: antialiased;
|
|
13
|
+
-moz-osx-font-smoothing: grayscale;
|
|
14
|
+
position: absolute;
|
|
15
|
+
top: -6px;
|
|
16
|
+
height: 18px;
|
|
17
|
+
line-height: 18px;
|
|
18
|
+
min-width: 9px;
|
|
19
|
+
border-radius: 12px;
|
|
20
|
+
padding: 0 5px;
|
|
21
|
+
text-align: center;
|
|
22
|
+
font-size: 12px;
|
|
23
|
+
color: #fff;
|
|
24
|
+
background-color: #ff5b05;
|
|
25
|
+
white-space: nowrap;
|
|
26
|
+
-webkit-transform: translateX(-45%);
|
|
27
|
+
-ms-transform: translateX(-45%);
|
|
28
|
+
transform: translateX(-45%);
|
|
29
|
+
-webkit-transform-origin: -10% center;
|
|
30
|
+
-ms-transform-origin: -10% center;
|
|
31
|
+
transform-origin: -10% center;
|
|
32
|
+
z-index: 10;
|
|
33
|
+
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "\5FAE\8F6F\96C5\9ED1", SimSun, sans-serif;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.am-badge-text a {
|
|
37
|
+
color: #fff;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.am-badge-text p {
|
|
41
|
+
margin: 0;
|
|
42
|
+
padding: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.am-badge-hot .am-badge-text {
|
|
46
|
+
background-color: #f96268;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.am-badge-dot {
|
|
50
|
+
position: absolute;
|
|
51
|
+
-webkit-transform: translateX(-50%);
|
|
52
|
+
-ms-transform: translateX(-50%);
|
|
53
|
+
transform: translateX(-50%);
|
|
54
|
+
-webkit-transform-origin: 0 center;
|
|
55
|
+
-ms-transform-origin: 0 center;
|
|
56
|
+
transform-origin: 0 center;
|
|
57
|
+
top: -4px;
|
|
58
|
+
height: 8px;
|
|
59
|
+
width: 8px;
|
|
60
|
+
border-radius: 100%;
|
|
61
|
+
background: #ff5b05;
|
|
62
|
+
z-index: 10;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.am-badge-dot-large {
|
|
66
|
+
height: 16px;
|
|
67
|
+
width: 16px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.am-badge-not-a-wrapper .am-badge-text,
|
|
71
|
+
.am-badge-not-a-wrapper .am-badge-dot {
|
|
72
|
+
top: auto;
|
|
73
|
+
display: block;
|
|
74
|
+
position: relative;
|
|
75
|
+
-webkit-transform: translateX(0);
|
|
76
|
+
-ms-transform: translateX(0);
|
|
77
|
+
transform: translateX(0);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.am-badge-corner {
|
|
81
|
+
width: 80px;
|
|
82
|
+
padding: 8px;
|
|
83
|
+
position: absolute;
|
|
84
|
+
right: -32px;
|
|
85
|
+
top: 8px;
|
|
86
|
+
background-color: #ff5b05;
|
|
87
|
+
color: #fff;
|
|
88
|
+
white-space: nowrap;
|
|
89
|
+
-webkit-transform: rotate(45deg);
|
|
90
|
+
-ms-transform: rotate(45deg);
|
|
91
|
+
transform: rotate(45deg);
|
|
92
|
+
text-align: center;
|
|
93
|
+
font-size: 15px;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.am-badge-corner-wrapper {
|
|
97
|
+
overflow: hidden;
|
|
98
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
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 _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
require("./index.css");
|
|
12
|
+
class Badge extends React.Component {
|
|
13
|
+
render() {
|
|
14
|
+
// tslint:disable:prefer-const
|
|
15
|
+
let {
|
|
16
|
+
className,
|
|
17
|
+
prefixCls,
|
|
18
|
+
children,
|
|
19
|
+
text,
|
|
20
|
+
size,
|
|
21
|
+
overflowCount,
|
|
22
|
+
dot,
|
|
23
|
+
corner,
|
|
24
|
+
hot,
|
|
25
|
+
...restProps
|
|
26
|
+
} = this.props;
|
|
27
|
+
// eslint-disable-next-line no-self-assign
|
|
28
|
+
overflowCount = overflowCount;
|
|
29
|
+
text = typeof text === 'number' && text > overflowCount ? "".concat(overflowCount, "+") : text;
|
|
30
|
+
|
|
31
|
+
// dot mode don't need text
|
|
32
|
+
if (dot) {
|
|
33
|
+
text = '';
|
|
34
|
+
}
|
|
35
|
+
const scrollNumberCls = (0, _classnames.default)({
|
|
36
|
+
["".concat(prefixCls, "-dot")]: dot,
|
|
37
|
+
["".concat(prefixCls, "-dot-large")]: dot && size === 'large',
|
|
38
|
+
["".concat(prefixCls, "-text")]: !dot && !corner,
|
|
39
|
+
["".concat(prefixCls, "-corner")]: corner,
|
|
40
|
+
["".concat(prefixCls, "-corner-large")]: corner && size === 'large'
|
|
41
|
+
});
|
|
42
|
+
const badgeCls = (0, _classnames.default)(prefixCls, className, {
|
|
43
|
+
["".concat(prefixCls, "-not-a-wrapper")]: !children,
|
|
44
|
+
["".concat(prefixCls, "-corner-wrapper")]: corner,
|
|
45
|
+
["".concat(prefixCls, "-hot")]: !!hot,
|
|
46
|
+
["".concat(prefixCls, "-corner-wrapper-large")]: corner && size === 'large'
|
|
47
|
+
});
|
|
48
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
49
|
+
className: badgeCls
|
|
50
|
+
}, children, (text || dot) &&
|
|
51
|
+
/*#__PURE__*/
|
|
52
|
+
// tslint:disable-next-line:jsx-no-multiline-js
|
|
53
|
+
React.createElement("sup", Object.assign({
|
|
54
|
+
className: scrollNumberCls
|
|
55
|
+
}, restProps), text));
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.default = Badge;
|
|
59
|
+
Badge.defaultProps = {
|
|
60
|
+
prefixCls: 'am-badge',
|
|
61
|
+
size: 'small',
|
|
62
|
+
overflowCount: 99,
|
|
63
|
+
dot: false,
|
|
64
|
+
corner: false
|
|
65
|
+
};
|
|
@@ -7,29 +7,121 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
var _SvgIcon = _interopRequireDefault(require("../SvgIcon"));
|
|
12
|
+
var _utils = require("../utils/utils");
|
|
13
|
+
var _constants = require("../constants");
|
|
13
14
|
require("./index.css");
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
15
|
+
class CheckboxEditor extends _react.Component {
|
|
16
|
+
constructor(props) {
|
|
17
|
+
super(props);
|
|
18
|
+
this.onKeyDown = event => {
|
|
19
|
+
const {
|
|
20
|
+
isEditorShow,
|
|
21
|
+
readOnly
|
|
22
|
+
} = this.props;
|
|
23
|
+
if (event.keyCode === _constants.KeyCodes.Enter && isEditorShow && !readOnly) {
|
|
24
|
+
this.setState({
|
|
25
|
+
value: !this.state.value
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
this.getValue = () => {
|
|
30
|
+
const {
|
|
31
|
+
value
|
|
32
|
+
} = this.state;
|
|
33
|
+
return value;
|
|
34
|
+
};
|
|
35
|
+
this.updateValue = value => {
|
|
36
|
+
if (value === this.state.value) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
this.setState({
|
|
40
|
+
value
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
this.onChangeCheckboxValue = event => {
|
|
44
|
+
if (event) {
|
|
45
|
+
event.stopPropagation();
|
|
46
|
+
event.nativeEvent.stopImmediatePropagation();
|
|
47
|
+
event.persist();
|
|
48
|
+
}
|
|
49
|
+
const {
|
|
50
|
+
value
|
|
51
|
+
} = this.state;
|
|
52
|
+
const newValue = !value;
|
|
53
|
+
this.setState({
|
|
54
|
+
value: newValue
|
|
55
|
+
}, () => {
|
|
56
|
+
if (this.props.onCommit) {
|
|
57
|
+
this.props.onCommit(event);
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
this.renderIcon = (symbol, color) => {
|
|
62
|
+
const className = (0, _classnames.default)('dtable-ui-checkbox-check-mark', {
|
|
63
|
+
'dtable-ui-checkbox-check-svg': !(symbol !== null && symbol !== void 0 && symbol.startsWith('dtable-icon'))
|
|
64
|
+
});
|
|
65
|
+
if (symbol.startsWith('dtable-icon')) {
|
|
66
|
+
return /*#__PURE__*/_react.default.createElement("span", {
|
|
67
|
+
className: "dtable-font ".concat(symbol, " ").concat(className || ''),
|
|
68
|
+
style: {
|
|
69
|
+
color
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
return /*#__PURE__*/_react.default.createElement(_SvgIcon.default, {
|
|
74
|
+
className: className,
|
|
75
|
+
symbol: symbol,
|
|
76
|
+
color: color
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
this.state = {
|
|
80
|
+
value: props.value || false
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
componentDidMount() {
|
|
84
|
+
document.addEventListener('keydown', this.onKeyDown);
|
|
85
|
+
}
|
|
86
|
+
componentWillUnmount() {
|
|
87
|
+
document.removeEventListener('keydown', this.onKeyDown);
|
|
88
|
+
}
|
|
89
|
+
componentDidUpdate(prevProps) {
|
|
90
|
+
const {
|
|
91
|
+
value
|
|
92
|
+
} = this.props;
|
|
93
|
+
if (value !== prevProps.value) {
|
|
94
|
+
this.setState({
|
|
95
|
+
value
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
render() {
|
|
100
|
+
var _column$data;
|
|
101
|
+
const {
|
|
102
|
+
className,
|
|
103
|
+
style,
|
|
104
|
+
column
|
|
105
|
+
} = this.props;
|
|
106
|
+
const {
|
|
107
|
+
value
|
|
108
|
+
} = this.state;
|
|
109
|
+
const checkboxProps = {
|
|
110
|
+
...(!_utils.isMobile && {
|
|
111
|
+
onClick: this.onChangeCheckboxValue
|
|
112
|
+
}),
|
|
113
|
+
...(_utils.isMobile && {
|
|
114
|
+
onTouchStart: this.onChangeCheckboxValue
|
|
115
|
+
})
|
|
116
|
+
};
|
|
117
|
+
let checkboxStyle = column === null || column === void 0 ? void 0 : (_column$data = column.data) === null || _column$data === void 0 ? void 0 : _column$data.checkbox_style;
|
|
118
|
+
if (!checkboxStyle || Object.keys(checkboxStyle).length < 2) {
|
|
119
|
+
checkboxStyle = _constants.DEFAULT_CHECKBOX_MARK_STYLE;
|
|
120
|
+
}
|
|
121
|
+
return /*#__PURE__*/_react.default.createElement("div", Object.assign({
|
|
122
|
+
className: (0, _classnames.default)('dtable-ui-checkbox-editor', className),
|
|
123
|
+
style: style || {}
|
|
124
|
+
}, checkboxProps), value && this.renderIcon(checkboxStyle.type, checkboxStyle.color));
|
|
125
|
+
}
|
|
126
|
+
}
|
|
35
127
|
var _default = exports.default = CheckboxEditor;
|
|
@@ -1,41 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
var _react =
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
9
|
var _reactResponsive = _interopRequireDefault(require("react-responsive"));
|
|
11
|
-
var
|
|
12
|
-
var
|
|
10
|
+
var _pcCollaboratorEditor = _interopRequireDefault(require("./pc-collaborator-editor"));
|
|
11
|
+
var _mbCollaboratorEditor = _interopRequireDefault(require("./mb-collaborator-editor"));
|
|
13
12
|
require("./index.css");
|
|
14
|
-
const CollaboratorEditor =
|
|
13
|
+
const CollaboratorEditor = _ref => {
|
|
15
14
|
let {
|
|
16
|
-
isMobile,
|
|
17
15
|
value: oldValue,
|
|
18
16
|
...props
|
|
19
17
|
} = _ref;
|
|
20
18
|
const value = Array.isArray(oldValue) ? oldValue : [];
|
|
21
|
-
if (isMobile === false) return /*#__PURE__*/_react.default.createElement(_pcEditor.default, Object.assign({}, props, {
|
|
22
|
-
value: value,
|
|
23
|
-
ref: ref
|
|
24
|
-
}));
|
|
25
|
-
if (isMobile === true) return /*#__PURE__*/_react.default.createElement(_mbEditor.default, Object.assign({}, props, {
|
|
26
|
-
value: value,
|
|
27
|
-
ref: ref
|
|
28
|
-
}));
|
|
29
19
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
30
|
-
query:
|
|
31
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
32
|
-
value: value
|
|
33
|
-
ref: ref
|
|
20
|
+
query: '(min-width: 768px)'
|
|
21
|
+
}, /*#__PURE__*/_react.default.createElement(_pcCollaboratorEditor.default, Object.assign({}, props, {
|
|
22
|
+
value: value
|
|
34
23
|
}))), /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
35
|
-
query:
|
|
36
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
37
|
-
value: value
|
|
38
|
-
ref: ref
|
|
24
|
+
query: '(max-width: 767.8px)'
|
|
25
|
+
}, /*#__PURE__*/_react.default.createElement(_mbCollaboratorEditor.default, Object.assign({}, props, {
|
|
26
|
+
value: value
|
|
39
27
|
}))));
|
|
40
|
-
}
|
|
28
|
+
};
|
|
41
29
|
var _default = exports.default = CollaboratorEditor;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
@import url('../../css/mb-cell-editor.css');
|
|
2
|
+
|
|
3
|
+
@media screen and (max-width: 767.8px) {
|
|
4
|
+
.dtable-ui-mb-collaborator-editor-body .mb-search-collaborator-items {
|
|
5
|
+
padding: 8px 16px;
|
|
6
|
+
margin-top: 20px;
|
|
7
|
+
border-top: 1px solid #e9e9e9;
|
|
8
|
+
border-bottom: 1px solid #e9e9e9;
|
|
9
|
+
background-color: #fff;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.dtable-ui-mb-collaborator-editor-body .mb-search-collaborator-items > input {
|
|
13
|
+
outline: none;
|
|
14
|
+
height: 30px;
|
|
15
|
+
padding: 0;
|
|
16
|
+
line-height: 30px;
|
|
17
|
+
border: none;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.dtable-ui-mb-collaborator-editor-body .mb-search-collaborator-items > input:focus,
|
|
21
|
+
.dtable-ui-mb-collaborator-editor-body .mb-search-collaborator-items > input:active {
|
|
22
|
+
outline: none;
|
|
23
|
+
box-shadow: none;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.dtable-ui-mb-collaborator-editor-body .mb-collaborators-container {
|
|
27
|
+
flex: 1;
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
margin-top: 10px;
|
|
31
|
+
min-height: 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.dtable-ui-mb-collaborator-editor-body .mb-collaborators-container .title {
|
|
35
|
+
padding: 6px 16px;
|
|
36
|
+
border-bottom: 1px solid #e9e9e9;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.dtable-ui-mb-collaborator-editor-body .mb-collaborators-container .content {
|
|
40
|
+
flex: 1;
|
|
41
|
+
overflow: auto;
|
|
42
|
+
display: flex;
|
|
43
|
+
flex-direction: column;
|
|
44
|
+
border-bottom: 1px solid #e9e9e9;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.dtable-ui-mb-collaborator-editor-body .search-result-none {
|
|
48
|
+
padding: 16px 0 16px 16px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.dtable-ui-mb-collaborator-editor-body .mb-collaborator-option-item {
|
|
52
|
+
display: flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
justify-content: space-between;
|
|
55
|
+
height: 50px;
|
|
56
|
+
padding: 10px 10px 10px 16px;
|
|
57
|
+
font-size: 13px;
|
|
58
|
+
background-color: #fff;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.dtable-ui-mb-collaborator-editor-body .mb-collaborator-option-item {
|
|
62
|
+
border-bottom: 1px solid #e9e9e9;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.dtable-ui-mb-collaborator-editor-body .mb-collaborator-option-item .mb-collaborator-info {
|
|
66
|
+
display: flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.dtable-ui-mb-collaborator-editor-body .mb-collaborator-option-item .collaborator-avatar img {
|
|
71
|
+
width: 24px;
|
|
72
|
+
height: 24px;
|
|
73
|
+
border-radius: 50%;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.dtable-ui-mb-collaborator-editor-body .mb-collaborator-option-item .collaborator-name {
|
|
77
|
+
padding: 0 10px;
|
|
78
|
+
overflow: hidden;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.dtable-ui-mb-collaborator-editor-body .mb-collaborator-option-item .dtable-font {
|
|
82
|
+
font-size: 12px;
|
|
83
|
+
color: #798d99;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
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 _MBEditorHeader = _interopRequireDefault(require("../../MBEditorHeader"));
|
|
11
|
+
var _DTableSearchInput = _interopRequireDefault(require("../../DTableSearchInput"));
|
|
12
|
+
var _lang = require("../../lang");
|
|
13
|
+
require("./index.css");
|
|
14
|
+
class MBCollaboratorEditor 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 = newValue => {
|
|
29
|
+
let {
|
|
30
|
+
searchVal
|
|
31
|
+
} = this.state;
|
|
32
|
+
if (searchVal === newValue) return;
|
|
33
|
+
this.setState({
|
|
34
|
+
searchVal: newValue
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
this.getSelectedCollaborators = () => {
|
|
38
|
+
let {
|
|
39
|
+
value,
|
|
40
|
+
collaborators
|
|
41
|
+
} = this.props;
|
|
42
|
+
if (!Array.isArray(value)) {
|
|
43
|
+
return [];
|
|
44
|
+
}
|
|
45
|
+
return collaborators.filter(collaborator => {
|
|
46
|
+
return value.indexOf(collaborator.email) > -1;
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
this.getFilteredCollaborators = () => {
|
|
50
|
+
let {
|
|
51
|
+
collaborators
|
|
52
|
+
} = this.props;
|
|
53
|
+
let {
|
|
54
|
+
searchVal
|
|
55
|
+
} = this.state;
|
|
56
|
+
return searchVal ? (0, _dtableUtils.searchCollaborators)(collaborators, searchVal) : collaborators;
|
|
57
|
+
};
|
|
58
|
+
this.onCollaboratorClick = collaborator => {
|
|
59
|
+
this.props.onCommit(collaborator);
|
|
60
|
+
};
|
|
61
|
+
this.onRemoveCollaborator = collaborator => {
|
|
62
|
+
this.props.onCommit(collaborator);
|
|
63
|
+
};
|
|
64
|
+
this.renderFilteredCollaborators = collaborators => {
|
|
65
|
+
let {
|
|
66
|
+
value = []
|
|
67
|
+
} = this.props;
|
|
68
|
+
return collaborators.map((collaborator, index) => {
|
|
69
|
+
const isSelected = value.includes(collaborator.email);
|
|
70
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
71
|
+
className: "mb-collaborator-option-item",
|
|
72
|
+
key: index,
|
|
73
|
+
onMouseDown: this.onCollaboratorClick.bind(this, collaborator)
|
|
74
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
75
|
+
className: "mb-collaborator-info"
|
|
76
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
77
|
+
className: "collaborator-avatar"
|
|
78
|
+
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
79
|
+
src: collaborator.avatar_url,
|
|
80
|
+
width: "24",
|
|
81
|
+
height: "24",
|
|
82
|
+
alt: "avatar"
|
|
83
|
+
})), /*#__PURE__*/_react.default.createElement("span", {
|
|
84
|
+
className: "collaborator-name"
|
|
85
|
+
}, collaborator.name)), isSelected && /*#__PURE__*/_react.default.createElement("i", {
|
|
86
|
+
className: "mb-collaborator-checked dtable-font dtable-icon-check-mark"
|
|
87
|
+
}));
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
this.setEditorPopover = editorPopover => {
|
|
91
|
+
this.editorPopover = editorPopover;
|
|
92
|
+
};
|
|
93
|
+
this.state = {
|
|
94
|
+
searchVal: ''
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
componentDidMount() {
|
|
98
|
+
history.pushState(null, null, '#'); // eslint-disable-line
|
|
99
|
+
window.addEventListener('popstate', this.handleHistoryBack, false);
|
|
100
|
+
}
|
|
101
|
+
componentWillUnmount() {
|
|
102
|
+
window.removeEventListener('popstate', this.handleHistoryBack, false);
|
|
103
|
+
}
|
|
104
|
+
render() {
|
|
105
|
+
const {
|
|
106
|
+
column
|
|
107
|
+
} = this.props;
|
|
108
|
+
const {
|
|
109
|
+
searchVal
|
|
110
|
+
} = this.state;
|
|
111
|
+
let filteredCollaborators = this.getFilteredCollaborators();
|
|
112
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
113
|
+
ref: this.setEditorPopover,
|
|
114
|
+
className: "dtable-ui-mb-editor-popover mb-collaborator-editor-popover",
|
|
115
|
+
onClick: this.onContainerClick
|
|
116
|
+
}, /*#__PURE__*/_react.default.createElement(_MBEditorHeader.default, {
|
|
117
|
+
title: column.name,
|
|
118
|
+
leftContent: /*#__PURE__*/_react.default.createElement("i", {
|
|
119
|
+
className: "dtable-font dtable-icon-return"
|
|
120
|
+
}),
|
|
121
|
+
rightContent: /*#__PURE__*/_react.default.createElement("span", null, (0, _lang.getLocale)('Done')),
|
|
122
|
+
onLeftClick: this.props.onClose,
|
|
123
|
+
onRightClick: this.props.onClose
|
|
124
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
125
|
+
className: "dtable-ui-mb-editor-body dtable-ui-mb-collaborator-editor-body"
|
|
126
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
127
|
+
className: "mb-search-collaborator-items"
|
|
128
|
+
}, /*#__PURE__*/_react.default.createElement(_DTableSearchInput.default, {
|
|
129
|
+
autoFocus: true,
|
|
130
|
+
value: searchVal,
|
|
131
|
+
placeholder: (0, _lang.getLocale)('Search_collaborator'),
|
|
132
|
+
onChange: this.onChangeSearch
|
|
133
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
134
|
+
className: "mb-collaborators-container"
|
|
135
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
136
|
+
className: "title"
|
|
137
|
+
}, (0, _lang.getLocale)('Choose_a_collaborator')), /*#__PURE__*/_react.default.createElement("div", {
|
|
138
|
+
className: "content"
|
|
139
|
+
}, filteredCollaborators.length === 0 && /*#__PURE__*/_react.default.createElement("div", {
|
|
140
|
+
className: "search-result-none"
|
|
141
|
+
}, (0, _lang.getLocale)('No_collaborators_available')), filteredCollaborators.length > 0 && this.renderFilteredCollaborators(filteredCollaborators)))));
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
MBCollaboratorEditor.defaultProps = {
|
|
145
|
+
isReadOnly: false,
|
|
146
|
+
value: []
|
|
147
|
+
};
|
|
148
|
+
var _default = exports.default = MBCollaboratorEditor;
|
|
@@ -19,7 +19,9 @@ function DTableCommonAddTool(_ref) {
|
|
|
19
19
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
20
20
|
className: "dtable-ui add-item-btn ".concat(className ? className : ''),
|
|
21
21
|
style: style,
|
|
22
|
-
onClick: e =>
|
|
22
|
+
onClick: e => {
|
|
23
|
+
callBack(e);
|
|
24
|
+
}
|
|
23
25
|
}, !hideIcon && /*#__PURE__*/_react.default.createElement("span", {
|
|
24
26
|
className: "dtable-font dtable-icon-add-table ".concat(addIconClassName || '')
|
|
25
27
|
}), /*#__PURE__*/_react.default.createElement("span", {
|