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
|
@@ -8,9 +8,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
11
|
+
var _selectedDepartments = _interopRequireDefault(require("../../../Department-editor/selected-departments"));
|
|
12
|
+
var _departmentMultipleSelect = _interopRequireDefault(require("../../../Department-editor/department-multiple-select"));
|
|
13
|
+
var _constants = require("../../../Department-editor/constants");
|
|
14
14
|
var _commonHooks = require("../../../hooks/common-hooks");
|
|
15
15
|
var _lang = require("../../../lang");
|
|
16
16
|
function DepartmentMultipleSelectFilter(props) {
|
|
@@ -26,7 +26,7 @@ function DepartmentMultipleSelectFilter(props) {
|
|
|
26
26
|
onClickOutside: () => setIsShowSelector(false)
|
|
27
27
|
}, [selectedDepartments]);
|
|
28
28
|
function renderUserDepartmentOptions() {
|
|
29
|
-
return
|
|
29
|
+
return _constants.DEPARTMENT_SELECT_RANGE_OPTIONS.slice(0, 2).map((option, index) => {
|
|
30
30
|
const {
|
|
31
31
|
type,
|
|
32
32
|
name
|
|
@@ -78,14 +78,14 @@ function DepartmentMultipleSelectFilter(props) {
|
|
|
78
78
|
className: "selected-option"
|
|
79
79
|
}, selectedDepartments.length > 0 ? /*#__PURE__*/_react.default.createElement("span", {
|
|
80
80
|
className: "selected-option-show"
|
|
81
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
81
|
+
}, /*#__PURE__*/_react.default.createElement(_selectedDepartments.default, {
|
|
82
82
|
value: selectedDepartments,
|
|
83
83
|
departments: departments
|
|
84
84
|
})) : /*#__PURE__*/_react.default.createElement("span", {
|
|
85
85
|
className: "select-placeholder"
|
|
86
86
|
}, (0, _lang.getLocale)('Select_department')), /*#__PURE__*/_react.default.createElement("span", {
|
|
87
87
|
className: "dtable-font dtable-icon-down3"
|
|
88
|
-
})), isShowSelector && /*#__PURE__*/_react.default.createElement(
|
|
88
|
+
})), isShowSelector && /*#__PURE__*/_react.default.createElement(_departmentMultipleSelect.default, {
|
|
89
89
|
isShowSelectedDepartments: false,
|
|
90
90
|
classNamePrefix: "filter",
|
|
91
91
|
value: selectedDepartments,
|
package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js
CHANGED
|
@@ -8,9 +8,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
11
|
+
var _selectedDepartments = _interopRequireDefault(require("../../../Department-editor/selected-departments"));
|
|
12
|
+
var _departmentSingleSelect = _interopRequireDefault(require("../../../Department-editor/department-single-select"));
|
|
13
|
+
var _constants = require("../../../Department-editor/constants");
|
|
14
14
|
var _commonHooks = require("../../../hooks/common-hooks");
|
|
15
15
|
var _lang = require("../../../lang");
|
|
16
16
|
function DepartmentSingleSelectFilter(props) {
|
|
@@ -31,7 +31,7 @@ function DepartmentSingleSelectFilter(props) {
|
|
|
31
31
|
}, [selectedDepartment]);
|
|
32
32
|
function renderUserDepartmentOptions(onSelect) {
|
|
33
33
|
if (!departments || departments.length === 0) return [];
|
|
34
|
-
return
|
|
34
|
+
return _constants.DEPARTMENT_SELECT_RANGE_OPTIONS.slice(0, 2).map((option, index) => {
|
|
35
35
|
const {
|
|
36
36
|
type,
|
|
37
37
|
name
|
|
@@ -76,14 +76,14 @@ function DepartmentSingleSelectFilter(props) {
|
|
|
76
76
|
className: "selected-option"
|
|
77
77
|
}, value ? /*#__PURE__*/_react.default.createElement("span", {
|
|
78
78
|
className: "selected-option-show"
|
|
79
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
79
|
+
}, /*#__PURE__*/_react.default.createElement(_selectedDepartments.default, {
|
|
80
80
|
value: selectedDepartmentIds,
|
|
81
81
|
departments: departments
|
|
82
82
|
})) : /*#__PURE__*/_react.default.createElement("span", {
|
|
83
83
|
className: "select-placeholder"
|
|
84
84
|
}, (0, _lang.getLocale)('Select_department')), /*#__PURE__*/_react.default.createElement("span", {
|
|
85
85
|
className: "dtable-font dtable-icon-down3"
|
|
86
|
-
})), isShowSelector && /*#__PURE__*/_react.default.createElement(
|
|
86
|
+
})), isShowSelector && /*#__PURE__*/_react.default.createElement(_departmentSingleSelect.default, {
|
|
87
87
|
enableSelectRange: false,
|
|
88
88
|
column: column,
|
|
89
89
|
value: value,
|
package/lib/DateEditor/index.js
CHANGED
|
@@ -1,83 +1,109 @@
|
|
|
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 _dtableUtils = require("dtable-utils");
|
|
12
10
|
var _dayjs = _interopRequireDefault(require("../utils/dayjs"));
|
|
13
|
-
var
|
|
14
|
-
var
|
|
11
|
+
var _pcDateEditorPopover = _interopRequireDefault(require("./pc-date-editor-popover"));
|
|
12
|
+
var _mbDateEditorPopover = _interopRequireDefault(require("./mb-date-editor-popover"));
|
|
15
13
|
require("dayjs/locale/zh-cn");
|
|
16
14
|
require("dayjs/locale/en-gb");
|
|
17
15
|
require("./index.css");
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
16
|
+
class DateEditor extends _react.default.Component {
|
|
17
|
+
constructor(props) {
|
|
18
|
+
super(props);
|
|
19
|
+
this.getDateFormat = () => {
|
|
20
|
+
let {
|
|
21
|
+
column
|
|
22
|
+
} = this.props;
|
|
23
|
+
let defaultDateFormat = 'YYYY-MM-DD';
|
|
24
|
+
let dateFormat = column.data && column.data.format;
|
|
25
|
+
return dateFormat || defaultDateFormat;
|
|
26
|
+
};
|
|
27
|
+
this.onValueChanged = value => {
|
|
28
|
+
if (value !== this.state.newValue) {
|
|
29
|
+
this.setState({
|
|
30
|
+
newValue: value
|
|
31
|
+
});
|
|
32
|
+
this.onCommit(value);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
this.onCommit = newValue => {
|
|
36
|
+
this.props.onCommit(newValue);
|
|
37
|
+
};
|
|
38
|
+
this.state = {
|
|
39
|
+
isDateInit: false,
|
|
40
|
+
newValue: '',
|
|
41
|
+
dateFormat: '',
|
|
42
|
+
showHourAndMinute: false,
|
|
43
|
+
defaultCalendarValue: null
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
componentDidMount() {
|
|
47
|
+
const {
|
|
48
|
+
value,
|
|
49
|
+
lang
|
|
50
|
+
} = this.props;
|
|
46
51
|
_dayjs.default.locale(lang);
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
52
|
+
let dateFormat = this.getDateFormat();
|
|
53
|
+
this.setState({
|
|
54
|
+
isDateInit: true,
|
|
55
|
+
newValue: value,
|
|
56
|
+
dateFormat,
|
|
57
|
+
showHourAndMinute: dateFormat.indexOf('HH:mm') > -1
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
render() {
|
|
61
|
+
if (!this.state.isDateInit) {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
let {
|
|
65
|
+
lang,
|
|
66
|
+
column,
|
|
67
|
+
className,
|
|
68
|
+
isInModal,
|
|
69
|
+
firstDayOfWeek
|
|
70
|
+
} = this.props;
|
|
71
|
+
let {
|
|
72
|
+
newValue,
|
|
73
|
+
dateFormat,
|
|
74
|
+
showHourAndMinute
|
|
75
|
+
} = this.state;
|
|
76
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
77
|
+
query: '(min-width: 768px)'
|
|
78
|
+
}, /*#__PURE__*/_react.default.createElement(_pcDateEditorPopover.default, {
|
|
79
|
+
className: className,
|
|
80
|
+
lang: lang,
|
|
81
|
+
isInModal: isInModal,
|
|
82
|
+
value: newValue,
|
|
83
|
+
dateFormat: dateFormat,
|
|
84
|
+
showHourAndMinute: showHourAndMinute,
|
|
85
|
+
onValueChanged: this.onValueChanged,
|
|
86
|
+
hideCalendar: this.props.hideCalendar,
|
|
87
|
+
firstDayOfWeek: firstDayOfWeek
|
|
88
|
+
})), /*#__PURE__*/_react.default.createElement(_reactResponsive.default, {
|
|
89
|
+
query: '(max-width: 767.8px)'
|
|
90
|
+
}, /*#__PURE__*/_react.default.createElement(_mbDateEditorPopover.default, {
|
|
91
|
+
className: className,
|
|
92
|
+
isReadOnly: this.props.isReadOnly,
|
|
93
|
+
lang: lang,
|
|
94
|
+
value: newValue,
|
|
95
|
+
dateFormat: dateFormat,
|
|
96
|
+
showHourAndMinute: showHourAndMinute,
|
|
97
|
+
column: column,
|
|
98
|
+
onValueChanged: this.onValueChanged,
|
|
99
|
+
onClosePopover: this.props.hideCalendar,
|
|
100
|
+
firstDayOfWeek: firstDayOfWeek
|
|
101
|
+
})));
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
DateEditor.defaultProps = {
|
|
105
|
+
isReadOnly: false,
|
|
106
|
+
value: '',
|
|
107
|
+
lang: 'en'
|
|
108
|
+
};
|
|
83
109
|
var _default = exports.default = DateEditor;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
.dtable-ui.mb-date-editor-picker .rc-calendar-date {
|
|
2
|
+
width: 28px;
|
|
3
|
+
height: 30px;
|
|
4
|
+
border-radius: 50%;
|
|
5
|
+
font-size: 14px;
|
|
6
|
+
line-height: 30px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.dtable-ui.mb-date-editor-picker .rc-calendar-date-panel {
|
|
10
|
+
width: 100%;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-selected-day .rc-calendar-date {
|
|
14
|
+
background-color: #FcEcD9;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-date:hover,
|
|
18
|
+
.dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-year-panel-year:hover,
|
|
19
|
+
.dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-month-panel-cell .rc-calendar-month-panel-month:hover {
|
|
20
|
+
background-color: #FcEcD9;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-selected-date .rc-calendar-date,
|
|
24
|
+
.dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-selected-date .rc-calendar-date:hover,
|
|
25
|
+
.dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-year-panel-selected-cell .rc-calendar-year-panel-year,
|
|
26
|
+
.dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-month-panel-selected-cell .rc-calendar-month-panel-month {
|
|
27
|
+
background-color: #f09f3f;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-next-year-btn:not([href]):not([tabindex]),
|
|
31
|
+
.dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-prev-year-btn:not([href]):not([tabindex]),
|
|
32
|
+
.dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-next-month-btn:not([href]):not([tabindex]),
|
|
33
|
+
.dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-prev-month-btn:not([href]):not([tabindex]) {
|
|
34
|
+
color: #999;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-next-year-btn:not([href]):not([tabindex]):hover,
|
|
38
|
+
.dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-prev-year-btn:not([href]):not([tabindex]):hover,
|
|
39
|
+
.dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-next-month-btn:not([href]):not([tabindex]):hover,
|
|
40
|
+
.dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-prev-month-btn:not([href]):not([tabindex]):hover {
|
|
41
|
+
color: #666;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-today .rc-calendar-date {
|
|
45
|
+
border: none;
|
|
46
|
+
position: relative;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.dtable-ui.mb-date-editor-picker .rc-calendar .rc-calendar-today .rc-calendar-date::after {
|
|
50
|
+
content: '';
|
|
51
|
+
background: #f09f3f;
|
|
52
|
+
position: absolute;
|
|
53
|
+
width: 4px;
|
|
54
|
+
height: 4px;
|
|
55
|
+
border-radius: 50%;
|
|
56
|
+
left: 45%;
|
|
57
|
+
bottom: 0%;
|
|
58
|
+
display: inline-block;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.dtable-ui.mb-date-editor-picker .rc-calendar .rdg-editor-container input.editor-main[readonly] {
|
|
62
|
+
background-color: #fff;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.dtable-ui.mb-date-editor-picker .rc-calendar-time-picker {
|
|
66
|
+
z-index: 1;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.dtable-ui.mb-date-editor-picker .rc-calendar-right-panel-body ul li.highlight {
|
|
70
|
+
margin: 0;
|
|
71
|
+
border: none;
|
|
72
|
+
background-color: #fff;
|
|
73
|
+
font-size: 12px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.dtable-ui.mb-date-editor-picker .rc-calendar {
|
|
77
|
+
box-shadow: none;
|
|
78
|
+
border-radius: 0px;
|
|
79
|
+
border: 1px solid #e9e9e9;
|
|
80
|
+
border-left: none;
|
|
81
|
+
border-right: none;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.dtable-ui.mb-date-editor-picker .rc-calendar-date {
|
|
85
|
+
font-size: 14px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.dtable-ui.mb-date-editor-picker .rc-calendar-date-panel {
|
|
89
|
+
width: 100%;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.dtable-ui.mb-date-editor-picker .rc-calendar-body {
|
|
93
|
+
height: 22rem;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.dtable-ui.mb-date-editor-picker .rc-calendar-table tr {
|
|
97
|
+
height: 3rem;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.dtable-ui.mb-date-editor-picker .rc-calendar-prev-month-btn,
|
|
101
|
+
.dtable-ui.mb-date-editor-picker .rc-calendar-next-month-btn,
|
|
102
|
+
.dtable-ui.mb-date-editor-picker .rc-calendar-prev-year-btn,
|
|
103
|
+
.dtable-ui.mb-date-editor-picker .rc-calendar-next-year-btn {
|
|
104
|
+
font-size: 30px;
|
|
105
|
+
width: 50px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.dtable-ui.mb-date-editor-picker .rc-calendar-header {
|
|
109
|
+
border-bottom: none;
|
|
110
|
+
margin-top: 0.5rem;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.dtable-ui.mb-date-editor-picker .rc-calendar-year-select,
|
|
114
|
+
.dtable-ui.mb-date-editor-picker .rc-calendar-month-select,
|
|
115
|
+
.dtable-ui.mb-date-editor-picker .rc-calendar-day-select {
|
|
116
|
+
font-size: 16px;
|
|
117
|
+
padding: 5px;
|
|
118
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
@import url('./custom-rc-calendar.css');
|
|
2
|
+
@import url('../../css/mb-cell-editor.css');
|
|
3
|
+
|
|
4
|
+
@media screen and (max-width: 767.8px) {
|
|
5
|
+
.dtable-ui-mb-date-editor-body .mb-date-editor-input {
|
|
6
|
+
display: flex;
|
|
7
|
+
border-top: 1px solid #e9e9e9;
|
|
8
|
+
border-bottom: 1px solid #e9e9e9;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.dtable-ui-mb-date-editor-body .mb-date-editor-input .date-input {
|
|
12
|
+
flex: 1;
|
|
13
|
+
background-color: #fff;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.dtable-ui-mb-date-editor-body .mb-date-editor-input .date-input .date-input-day {
|
|
17
|
+
background-color: #f5f5f5;
|
|
18
|
+
border: 1px solid #e9e9e9;
|
|
19
|
+
margin: 10px;
|
|
20
|
+
padding: 3px 5px;
|
|
21
|
+
border-radius: 3px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.dtable-ui-mb-date-editor-body .dtable-ui.mb-date-editor-picker {
|
|
25
|
+
display: block;
|
|
26
|
+
position: relative;
|
|
27
|
+
margin-top: 20px;
|
|
28
|
+
line-height: 1.5;
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.dtable-ui-mb-date-editor-body .mb-date-editor-clear {
|
|
33
|
+
padding: 10px 0;
|
|
34
|
+
margin-top: 20px;
|
|
35
|
+
border-bottom: 1px solid #e9e9e9;
|
|
36
|
+
border-top: 1px solid #e9e9e9;
|
|
37
|
+
text-align: center;
|
|
38
|
+
color: #d27053;
|
|
39
|
+
background-color: #fff;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.dtable-ui .am-picker-popup-header .am-picker-popup-item {
|
|
43
|
+
color: #E5A252;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,226 @@
|
|
|
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 _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
var _dayjs = _interopRequireDefault(require("dayjs"));
|
|
12
|
+
var _seafileCalendar = _interopRequireDefault(require("@seafile/seafile-calendar"));
|
|
13
|
+
var SeaDatePicker = _interopRequireWildcard(require("@seafile/seafile-calendar/lib/Picker"));
|
|
14
|
+
var _DatePicker = _interopRequireDefault(require("../../DatePicker"));
|
|
15
|
+
var _lang = require("../../lang");
|
|
16
|
+
var _editorUtils = require("../../utils/editor-utils");
|
|
17
|
+
var _MBEditorHeader = _interopRequireDefault(require("../../MBEditorHeader"));
|
|
18
|
+
require("@seafile/seafile-calendar/assets/index.css");
|
|
19
|
+
require("./index.css");
|
|
20
|
+
class DateEditorPopover extends _react.default.PureComponent {
|
|
21
|
+
constructor(props) {
|
|
22
|
+
super(props);
|
|
23
|
+
this.handleHistaryBack = e => {
|
|
24
|
+
e.preventDefault();
|
|
25
|
+
this.closePopover();
|
|
26
|
+
};
|
|
27
|
+
this.handleDateChange = date => {
|
|
28
|
+
let {
|
|
29
|
+
dateFormat,
|
|
30
|
+
showHourAndMinute
|
|
31
|
+
} = this.props;
|
|
32
|
+
let newValue = (0, _dayjs.default)(date);
|
|
33
|
+
if (showHourAndMinute) {
|
|
34
|
+
const {
|
|
35
|
+
datePickerValue
|
|
36
|
+
} = this.state;
|
|
37
|
+
const HM = datePickerValue.format('HH:mm');
|
|
38
|
+
const format = dateFormat.split(' ')[0]; // 'YYYY-MM-DD HH:mm'
|
|
39
|
+
const newDate = (0, _dayjs.default)(date).format(format) + ' ' + HM;
|
|
40
|
+
newValue = (0, _dayjs.default)(newDate);
|
|
41
|
+
}
|
|
42
|
+
this.setState({
|
|
43
|
+
datePickerValue: (0, _dayjs.default)(date)
|
|
44
|
+
});
|
|
45
|
+
this.props.onValueChanged(newValue.format(dateFormat));
|
|
46
|
+
};
|
|
47
|
+
this.handleTimeChange = time => {
|
|
48
|
+
const {
|
|
49
|
+
datePickerValue
|
|
50
|
+
} = this.state;
|
|
51
|
+
const {
|
|
52
|
+
dateFormat
|
|
53
|
+
} = this.props;
|
|
54
|
+
const format = dateFormat.split(' ')[0]; // 'YYYY-MM-DD HH:mm'
|
|
55
|
+
const YMD = datePickerValue.format(format);
|
|
56
|
+
const newDate = YMD + ' ' + (0, _dayjs.default)(time).format('HH:mm');
|
|
57
|
+
const newValue = (0, _dayjs.default)(newDate);
|
|
58
|
+
this.setState({
|
|
59
|
+
datePickerValue: newValue
|
|
60
|
+
});
|
|
61
|
+
this.props.onValueChanged(datePickerValue.format(dateFormat));
|
|
62
|
+
};
|
|
63
|
+
this.closePopover = () => {
|
|
64
|
+
this.props.onClosePopover();
|
|
65
|
+
};
|
|
66
|
+
this.deleteDate = () => {
|
|
67
|
+
this.props.onValueChanged('');
|
|
68
|
+
this.closePopover();
|
|
69
|
+
};
|
|
70
|
+
this.onChange = value => {
|
|
71
|
+
if (!value) return;
|
|
72
|
+
let {
|
|
73
|
+
dateFormat
|
|
74
|
+
} = this.props;
|
|
75
|
+
this.setState({
|
|
76
|
+
datePickerValue: value
|
|
77
|
+
});
|
|
78
|
+
this.props.onValueChanged(value.format(dateFormat));
|
|
79
|
+
};
|
|
80
|
+
this.onContainerClick = event => {
|
|
81
|
+
if (this.editorPopover && this.editorPopover.contains(event.target)) {
|
|
82
|
+
event.stopPropagation();
|
|
83
|
+
event.nativeEvent.stopImmediatePropagation();
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
this.setEditorPopover = editorPopover => {
|
|
88
|
+
this.editorPopover = editorPopover;
|
|
89
|
+
};
|
|
90
|
+
this.getCalendarContainer = () => {
|
|
91
|
+
return this.calendarContainerRef.current;
|
|
92
|
+
};
|
|
93
|
+
this.getCalender = () => {
|
|
94
|
+
let {
|
|
95
|
+
dateFormat,
|
|
96
|
+
lang,
|
|
97
|
+
className,
|
|
98
|
+
firstDayOfWeek
|
|
99
|
+
} = this.props;
|
|
100
|
+
let defaultValue = (0, _dayjs.default)().clone();
|
|
101
|
+
return /*#__PURE__*/_react.default.createElement(_seafileCalendar.default, {
|
|
102
|
+
className: (0, _classnames.default)('dtable-rc-calendar', className),
|
|
103
|
+
locale: (0, _editorUtils.initDateEditorLanguage)(lang),
|
|
104
|
+
format: dateFormat,
|
|
105
|
+
defaultValue: defaultValue,
|
|
106
|
+
dateInputPlaceholder: (0, _lang.getLocale)('Please_input'),
|
|
107
|
+
showDateInput: false,
|
|
108
|
+
focusablePanel: false,
|
|
109
|
+
showToday: false,
|
|
110
|
+
showTime: false,
|
|
111
|
+
style: {
|
|
112
|
+
width: '100%',
|
|
113
|
+
fontSize: '14px'
|
|
114
|
+
},
|
|
115
|
+
firstDayOfWeek: firstDayOfWeek
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
this.renderDataPicker = () => {
|
|
119
|
+
let {
|
|
120
|
+
dateFormat
|
|
121
|
+
} = this.props;
|
|
122
|
+
let {
|
|
123
|
+
datePickerValue
|
|
124
|
+
} = this.state;
|
|
125
|
+
let calendar = this.getCalender();
|
|
126
|
+
return /*#__PURE__*/_react.default.createElement(SeaDatePicker, {
|
|
127
|
+
open: true,
|
|
128
|
+
style: {
|
|
129
|
+
width: '100%'
|
|
130
|
+
},
|
|
131
|
+
calendar: calendar,
|
|
132
|
+
value: datePickerValue,
|
|
133
|
+
getCalendarContainer: this.getCalendarContainer,
|
|
134
|
+
onChange: this.onChange
|
|
135
|
+
}, _ref => {
|
|
136
|
+
let {
|
|
137
|
+
value
|
|
138
|
+
} = _ref;
|
|
139
|
+
value = value && value.format(dateFormat);
|
|
140
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
141
|
+
tabIndex: "0",
|
|
142
|
+
onFocus: this.onReadOnlyFocus
|
|
143
|
+
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
144
|
+
placeholder: (0, _lang.getLocale)('Please_select'),
|
|
145
|
+
readOnly: true,
|
|
146
|
+
tabIndex: "-1",
|
|
147
|
+
className: "form-control",
|
|
148
|
+
value: value || ''
|
|
149
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
150
|
+
ref: this.calendarContainerRef,
|
|
151
|
+
style: {
|
|
152
|
+
height: '22rem'
|
|
153
|
+
}
|
|
154
|
+
}));
|
|
155
|
+
});
|
|
156
|
+
};
|
|
157
|
+
this.state = {
|
|
158
|
+
open: true,
|
|
159
|
+
datePickerValue: props.value ? (0, _dayjs.default)(props.value) : (0, _dayjs.default)().clone()
|
|
160
|
+
};
|
|
161
|
+
this.calendarContainerRef = /*#__PURE__*/_react.default.createRef();
|
|
162
|
+
}
|
|
163
|
+
componentDidMount() {
|
|
164
|
+
history.pushState(null, null, '#'); // eslint-disable-line
|
|
165
|
+
window.addEventListener('popstate', this.handleHistaryBack, false);
|
|
166
|
+
}
|
|
167
|
+
componentWillUnmount() {
|
|
168
|
+
window.removeEventListener('popstate', this.handleHistaryBack, false);
|
|
169
|
+
}
|
|
170
|
+
render() {
|
|
171
|
+
const {
|
|
172
|
+
lang,
|
|
173
|
+
column,
|
|
174
|
+
dateFormat,
|
|
175
|
+
showHourAndMinute
|
|
176
|
+
} = this.props;
|
|
177
|
+
const leftFormat = dateFormat.split(' ')[0];
|
|
178
|
+
const rightFormat = dateFormat.split(' ')[1];
|
|
179
|
+
const {
|
|
180
|
+
datePickerValue
|
|
181
|
+
} = this.state;
|
|
182
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
183
|
+
ref: this.setEditorPopover,
|
|
184
|
+
className: "dtable-ui-mb-editor-popover mb-date-editor-popover",
|
|
185
|
+
onClick: this.onContainerClick
|
|
186
|
+
}, /*#__PURE__*/_react.default.createElement(_MBEditorHeader.default, {
|
|
187
|
+
title: column.name,
|
|
188
|
+
leftContent: /*#__PURE__*/_react.default.createElement("i", {
|
|
189
|
+
className: "dtable-font dtable-icon-return"
|
|
190
|
+
}),
|
|
191
|
+
rightContent: /*#__PURE__*/_react.default.createElement("span", null, (0, _lang.getLocale)('Done')),
|
|
192
|
+
onLeftClick: this.props.onClosePopover,
|
|
193
|
+
onRightClick: this.props.onClosePopover
|
|
194
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
195
|
+
className: "dtable-ui-mb-editor-body dtable-ui-mb-date-editor-body"
|
|
196
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
197
|
+
className: "mb-date-editor-input"
|
|
198
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
199
|
+
className: "date-input"
|
|
200
|
+
}, /*#__PURE__*/_react.default.createElement(_DatePicker.default, {
|
|
201
|
+
mode: "date",
|
|
202
|
+
locale: (0, _editorUtils.initDateEditorLanguage)(lang),
|
|
203
|
+
value: this.state.value,
|
|
204
|
+
onChange: this.handleDateChange
|
|
205
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
206
|
+
className: "date-input-day"
|
|
207
|
+
}, datePickerValue && datePickerValue.format(leftFormat)))), showHourAndMinute && /*#__PURE__*/_react.default.createElement("div", {
|
|
208
|
+
className: "date-input"
|
|
209
|
+
}, /*#__PURE__*/_react.default.createElement(_DatePicker.default, {
|
|
210
|
+
mode: "time",
|
|
211
|
+
locale: (0, _editorUtils.initDateEditorLanguage)(lang),
|
|
212
|
+
value: this.state.value,
|
|
213
|
+
onChange: this.handleTimeChange
|
|
214
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
215
|
+
className: "date-input-day"
|
|
216
|
+
}, datePickerValue && datePickerValue.format(rightFormat))))), /*#__PURE__*/_react.default.createElement("div", {
|
|
217
|
+
className: "dtable-ui mb-date-editor-picker"
|
|
218
|
+
}, this.renderDataPicker()), /*#__PURE__*/_react.default.createElement("div", {
|
|
219
|
+
className: "mb-date-editor-clear"
|
|
220
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
221
|
+
onClick: this.deleteDate,
|
|
222
|
+
className: "clear-date"
|
|
223
|
+
}, (0, _lang.getLocale)('Clear')))));
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
var _default = exports.default = DateEditorPopover;
|