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
|
@@ -12,10 +12,10 @@ var _Picker = _interopRequireDefault(require("@seafile/seafile-calendar/lib/Pick
|
|
|
12
12
|
var _seafileCalendar = _interopRequireDefault(require("@seafile/seafile-calendar"));
|
|
13
13
|
var _editorUtils = require("../utils/editor-utils");
|
|
14
14
|
var _constants = require("../constants");
|
|
15
|
-
var _lang = require("../lang");
|
|
16
15
|
require("@seafile/seafile-calendar/assets/index.css");
|
|
16
|
+
var _lang = require("../lang");
|
|
17
17
|
let now = (0, _dayjs.default)();
|
|
18
|
-
class
|
|
18
|
+
class PCDateEditorPopover extends _react.default.Component {
|
|
19
19
|
constructor(props) {
|
|
20
20
|
super(props);
|
|
21
21
|
// event trigger sequence: onOpenChange --> onChange
|
|
@@ -28,10 +28,10 @@ class PCDateEditor extends _react.default.Component {
|
|
|
28
28
|
value: value,
|
|
29
29
|
open: true // if value changed, don't close datePicker
|
|
30
30
|
});
|
|
31
|
-
this.props.
|
|
31
|
+
this.props.onValueChanged(value.format(dateFormat));
|
|
32
32
|
};
|
|
33
33
|
this.onBlur = () => {
|
|
34
|
-
this.props.
|
|
34
|
+
this.props.onValueChanged(this.getValue());
|
|
35
35
|
};
|
|
36
36
|
this.getValue = () => {
|
|
37
37
|
let {
|
|
@@ -55,7 +55,7 @@ class PCDateEditor extends _react.default.Component {
|
|
|
55
55
|
this.toggleCalendar(open);
|
|
56
56
|
}
|
|
57
57
|
if (isInModal && !open) {
|
|
58
|
-
this.props.
|
|
58
|
+
this.props.hideCalendar && this.props.hideCalendar();
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
61
|
this.toggleCalendar = open => {
|
|
@@ -67,7 +67,7 @@ class PCDateEditor extends _react.default.Component {
|
|
|
67
67
|
this.setState({
|
|
68
68
|
value: null
|
|
69
69
|
});
|
|
70
|
-
this.props.
|
|
70
|
+
this.props.onValueChanged(null);
|
|
71
71
|
};
|
|
72
72
|
this.onFocusDatePicker = () => {
|
|
73
73
|
this.setState({
|
|
@@ -112,7 +112,7 @@ class PCDateEditor extends _react.default.Component {
|
|
|
112
112
|
const {
|
|
113
113
|
isInModal
|
|
114
114
|
} = this.props;
|
|
115
|
-
let onClickRightPanelTime = isInModal ? this.props.
|
|
115
|
+
let onClickRightPanelTime = isInModal ? this.props.hideCalendar : this.closeEditor;
|
|
116
116
|
// we should change value and save it(async function), then close Editor.
|
|
117
117
|
setTimeout(() => {
|
|
118
118
|
onClickRightPanelTime && onClickRightPanelTime();
|
|
@@ -122,7 +122,7 @@ class PCDateEditor extends _react.default.Component {
|
|
|
122
122
|
if (e.keyCode === _constants.KeyCodes.Escape) {
|
|
123
123
|
if (this.props.isInModal) {
|
|
124
124
|
e.stopPropagation();
|
|
125
|
-
this.props.
|
|
125
|
+
this.props.hideCalendar && this.props.hideCalendar();
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
};
|
|
@@ -261,4 +261,4 @@ class PCDateEditor extends _react.default.Component {
|
|
|
261
261
|
}));
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
|
-
var _default = exports.default =
|
|
264
|
+
var _default = exports.default = PCDateEditorPopover;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
var PropTypes = _interopRequireWildcard(require("prop-types"));
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _DatePicker2 = _interopRequireDefault(require("rmc-date-picker/lib/DatePicker"));
|
|
12
|
+
var _Popup = _interopRequireDefault(require("rmc-date-picker/lib/Popup"));
|
|
13
|
+
var _getLocale = require("../_util/getLocale");
|
|
14
|
+
var _utils = require("./utils");
|
|
15
|
+
require("./style/index.css");
|
|
16
|
+
/* tslint:disable:jsx-no-multiline-js */
|
|
17
|
+
|
|
18
|
+
class DatePicker extends React.Component {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments);
|
|
21
|
+
this.setScrollValue = v => {
|
|
22
|
+
this.scrollValue = v;
|
|
23
|
+
};
|
|
24
|
+
this.onOk = v => {
|
|
25
|
+
if (this.scrollValue !== undefined) {
|
|
26
|
+
v = this.scrollValue;
|
|
27
|
+
}
|
|
28
|
+
if (this.props.onChange) {
|
|
29
|
+
this.props.onChange(v);
|
|
30
|
+
}
|
|
31
|
+
if (this.props.onOk) {
|
|
32
|
+
this.props.onOk(v);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
this.onVisibleChange = visible => {
|
|
36
|
+
this.scrollValue = undefined;
|
|
37
|
+
if (this.props.onVisibleChange) {
|
|
38
|
+
this.props.onVisibleChange(visible);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
this.fixOnOk = picker => {
|
|
42
|
+
if (picker) {
|
|
43
|
+
picker.onOk = this.onOk;
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
render() {
|
|
48
|
+
// tslint:disable-next-line:no-this-assignment
|
|
49
|
+
const {
|
|
50
|
+
props,
|
|
51
|
+
context
|
|
52
|
+
} = this;
|
|
53
|
+
const {
|
|
54
|
+
children,
|
|
55
|
+
value,
|
|
56
|
+
popupPrefixCls
|
|
57
|
+
} = props;
|
|
58
|
+
const locale = (0, _getLocale.getComponentLocale)(props, context, 'DatePicker', () => require('./locale/zh_CN'));
|
|
59
|
+
const {
|
|
60
|
+
okText,
|
|
61
|
+
dismissText,
|
|
62
|
+
extra,
|
|
63
|
+
DatePickerLocale
|
|
64
|
+
} = locale;
|
|
65
|
+
/**
|
|
66
|
+
* 注意:
|
|
67
|
+
* 受控 表示 通过设置 value 属性、组件的最终状态跟 value 设置值一致。
|
|
68
|
+
* 默认不设置 value 或 只设置 defaultValue 表示非受控。
|
|
69
|
+
*
|
|
70
|
+
* DatePickerView 对外通过 value “只支持 受控” 模式(可以使用 defaultDate 支持 非受控 模式,但不对外)
|
|
71
|
+
* PickerView 对外通过 value “只支持 受控” 模式
|
|
72
|
+
*
|
|
73
|
+
* DatePicker / Picker 对外只有 value 属性 (没有 defaultValue),
|
|
74
|
+
* 其中 List 展示部分 “只支持 受控” 模式,
|
|
75
|
+
* 弹出的 选择器部分 会随外部 value 改变而变、同时能自由滚动
|
|
76
|
+
* (即不会因为传入的 value 不变而不能滚动 (不像原生 input 的受控行为))
|
|
77
|
+
*
|
|
78
|
+
*/
|
|
79
|
+
const datePicker = /*#__PURE__*/React.createElement(_DatePicker2.default, {
|
|
80
|
+
minuteStep: props.minuteStep,
|
|
81
|
+
locale: DatePickerLocale,
|
|
82
|
+
minDate: props.minDate,
|
|
83
|
+
maxDate: props.maxDate,
|
|
84
|
+
mode: props.mode,
|
|
85
|
+
pickerPrefixCls: props.pickerPrefixCls,
|
|
86
|
+
prefixCls: props.prefixCls,
|
|
87
|
+
defaultDate: value || new Date(),
|
|
88
|
+
use12Hours: props.use12Hours,
|
|
89
|
+
onValueChange: props.onValueChange,
|
|
90
|
+
onScrollChange: this.setScrollValue
|
|
91
|
+
});
|
|
92
|
+
return /*#__PURE__*/React.createElement(_Popup.default, Object.assign({
|
|
93
|
+
datePicker: datePicker,
|
|
94
|
+
WrapComponent: 'div',
|
|
95
|
+
transitionName: 'am-slide-up',
|
|
96
|
+
maskTransitionName: 'am-fade'
|
|
97
|
+
}, props, {
|
|
98
|
+
prefixCls: popupPrefixCls,
|
|
99
|
+
date: value || new Date(),
|
|
100
|
+
dismissText: this.props.dismissText || dismissText,
|
|
101
|
+
okText: this.props.okText || okText,
|
|
102
|
+
ref: this.fixOnOk,
|
|
103
|
+
onVisibleChange: this.onVisibleChange
|
|
104
|
+
}), children && /*#__PURE__*/React.isValidElement(children) && /*#__PURE__*/React.cloneElement(children, {
|
|
105
|
+
extra: value ? (0, _utils.formatFn)(this, value) : this.props.extra || extra
|
|
106
|
+
}));
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
DatePicker.defaultProps = {
|
|
110
|
+
mode: 'datetime',
|
|
111
|
+
prefixCls: 'am-picker',
|
|
112
|
+
pickerPrefixCls: 'am-picker-col',
|
|
113
|
+
popupPrefixCls: 'am-picker-popup',
|
|
114
|
+
minuteStep: 1,
|
|
115
|
+
use12Hours: false
|
|
116
|
+
};
|
|
117
|
+
DatePicker.contextTypes = {
|
|
118
|
+
antLocale: PropTypes.object
|
|
119
|
+
};
|
|
120
|
+
var _default = exports.default = DatePicker;
|
|
@@ -0,0 +1,14 @@
|
|
|
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 _en_US = _interopRequireDefault(require("rmc-date-picker/lib/locale/en_US"));
|
|
9
|
+
var _default = exports.default = {
|
|
10
|
+
okText: 'OK',
|
|
11
|
+
dismissText: 'Cancel',
|
|
12
|
+
extra: 'please select',
|
|
13
|
+
DatePickerLocale: _en_US.default
|
|
14
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
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 _en_US = _interopRequireDefault(require("rmc-date-picker/lib/locale/en_US"));
|
|
9
|
+
var _default = exports.default = {
|
|
10
|
+
okText: 'Ок',
|
|
11
|
+
dismissText: 'Отмена',
|
|
12
|
+
extra: '',
|
|
13
|
+
DatePickerLocale: _en_US.default
|
|
14
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
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 _en_US = _interopRequireDefault(require("rmc-date-picker/lib/locale/en_US"));
|
|
9
|
+
var _default = exports.default = {
|
|
10
|
+
okText: 'Ok',
|
|
11
|
+
dismissText: 'Avbryt',
|
|
12
|
+
extra: 'vänligen välj',
|
|
13
|
+
DatePickerLocale: _en_US.default
|
|
14
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
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 _zh_CN = _interopRequireDefault(require("rmc-date-picker/lib/locale/zh_CN"));
|
|
9
|
+
var _default = exports.default = {
|
|
10
|
+
okText: '确定',
|
|
11
|
+
dismissText: '取消',
|
|
12
|
+
extra: '请选择',
|
|
13
|
+
DatePickerLocale: _zh_CN.default
|
|
14
|
+
};
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
@import url('../../css/am.css');
|
|
2
|
+
|
|
3
|
+
.am-picker-popup {
|
|
4
|
+
left: 0;
|
|
5
|
+
bottom: 0;
|
|
6
|
+
position: fixed;
|
|
7
|
+
width: 100%;
|
|
8
|
+
background-color: #fff;
|
|
9
|
+
padding-bottom: env(safe-area-inset-bottom);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.am-picker-popup-wrap {
|
|
13
|
+
position: fixed;
|
|
14
|
+
overflow: auto;
|
|
15
|
+
top: 0;
|
|
16
|
+
right: 0;
|
|
17
|
+
bottom: 0;
|
|
18
|
+
left: 0;
|
|
19
|
+
z-index: 1000;
|
|
20
|
+
-webkit-overflow-scrolling: touch;
|
|
21
|
+
outline: 0;
|
|
22
|
+
-webkit-transform: translateZ(1px);
|
|
23
|
+
transform: translateZ(1px);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.am-picker-popup-mask {
|
|
27
|
+
position: fixed;
|
|
28
|
+
top: 0;
|
|
29
|
+
right: 0;
|
|
30
|
+
left: 0;
|
|
31
|
+
bottom: 0;
|
|
32
|
+
background-color: rgba(0, 0, 0, 0.4);
|
|
33
|
+
height: 100%;
|
|
34
|
+
z-index: 1000;
|
|
35
|
+
-webkit-transform: translateZ(1px);
|
|
36
|
+
transform: translateZ(1px);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.am-picker-popup-mask-hidden {
|
|
40
|
+
display: none;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.am-picker-popup-header {
|
|
44
|
+
background-image: -webkit-linear-gradient(top, #e7e7e7, #e7e7e7, transparent, transparent);
|
|
45
|
+
background-image: -webkit-gradient(linear, left top, left bottom, from(#e7e7e7), color-stop(#e7e7e7), color-stop(transparent), to(transparent));
|
|
46
|
+
background-image: linear-gradient(to bottom, #e7e7e7, #e7e7e7, transparent, transparent);
|
|
47
|
+
background-position: bottom;
|
|
48
|
+
background-size: 100% 1PX;
|
|
49
|
+
background-repeat: no-repeat;
|
|
50
|
+
display: -webkit-box;
|
|
51
|
+
display: -webkit-flex;
|
|
52
|
+
display: -ms-flexbox;
|
|
53
|
+
display: flex;
|
|
54
|
+
-webkit-box-align: center;
|
|
55
|
+
-webkit-align-items: center;
|
|
56
|
+
-ms-flex-align: center;
|
|
57
|
+
align-items: center;
|
|
58
|
+
position: relative;
|
|
59
|
+
border-bottom: 1PX solid #ddd;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@media (-webkit-min-device-pixel-ratio: 2),
|
|
63
|
+
(min-resolution: 2dppx) {
|
|
64
|
+
html:not([data-scale]) .am-picker-popup-header {
|
|
65
|
+
border-bottom: none;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
html:not([data-scale]) .am-picker-popup-header::after {
|
|
69
|
+
content: '';
|
|
70
|
+
position: absolute;
|
|
71
|
+
background-color: #ddd;
|
|
72
|
+
display: block;
|
|
73
|
+
z-index: 1;
|
|
74
|
+
top: auto;
|
|
75
|
+
right: auto;
|
|
76
|
+
bottom: 0;
|
|
77
|
+
left: 0;
|
|
78
|
+
width: 100%;
|
|
79
|
+
height: 1PX;
|
|
80
|
+
-webkit-transform-origin: 50% 100%;
|
|
81
|
+
-ms-transform-origin: 50% 100%;
|
|
82
|
+
transform-origin: 50% 100%;
|
|
83
|
+
-webkit-transform: scaleY(0.5);
|
|
84
|
+
-ms-transform: scaleY(0.5);
|
|
85
|
+
transform: scaleY(0.5);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@media (-webkit-min-device-pixel-ratio: 2) and (-webkit-min-device-pixel-ratio: 3),
|
|
90
|
+
(min-resolution: 2dppx) and (min-resolution: 3dppx) {
|
|
91
|
+
html:not([data-scale]) .am-picker-popup-header::after {
|
|
92
|
+
-webkit-transform: scaleY(0.33);
|
|
93
|
+
-ms-transform: scaleY(0.33);
|
|
94
|
+
transform: scaleY(0.33);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.am-picker-popup-header .am-picker-popup-header-right {
|
|
99
|
+
text-align: right;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.am-picker-popup-item {
|
|
103
|
+
color: #108ee9;
|
|
104
|
+
font-size: 17px;
|
|
105
|
+
padding: 9px 15px;
|
|
106
|
+
height: 42px;
|
|
107
|
+
-webkit-box-sizing: border-box;
|
|
108
|
+
box-sizing: border-box;
|
|
109
|
+
display: -webkit-box;
|
|
110
|
+
display: -webkit-flex;
|
|
111
|
+
display: -ms-flexbox;
|
|
112
|
+
display: flex;
|
|
113
|
+
-webkit-box-align: center;
|
|
114
|
+
-webkit-align-items: center;
|
|
115
|
+
-ms-flex-align: center;
|
|
116
|
+
align-items: center;
|
|
117
|
+
-webkit-box-pack: center;
|
|
118
|
+
-webkit-justify-content: center;
|
|
119
|
+
-ms-flex-pack: center;
|
|
120
|
+
justify-content: center;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.am-picker-popup-item-active {
|
|
124
|
+
background-color: #ddd;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.am-picker-popup-title {
|
|
128
|
+
-webkit-box-flex: 1;
|
|
129
|
+
-webkit-flex: 1;
|
|
130
|
+
-ms-flex: 1;
|
|
131
|
+
flex: 1;
|
|
132
|
+
text-align: center;
|
|
133
|
+
color: #000;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.am-picker-popup .am-picker-popup-close {
|
|
137
|
+
display: none;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.am-picker-col {
|
|
141
|
+
-webkit-box-flex: 1;
|
|
142
|
+
-webkit-flex: 1;
|
|
143
|
+
-ms-flex: 1;
|
|
144
|
+
flex: 1;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.am-picker-col {
|
|
148
|
+
display: block;
|
|
149
|
+
position: relative;
|
|
150
|
+
height: 238px;
|
|
151
|
+
overflow: hidden;
|
|
152
|
+
width: 100%;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.am-picker-col-content {
|
|
156
|
+
position: absolute;
|
|
157
|
+
left: 0;
|
|
158
|
+
top: 0;
|
|
159
|
+
width: 100%;
|
|
160
|
+
z-index: 1;
|
|
161
|
+
padding: 102px 0;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.am-picker-col-item {
|
|
165
|
+
-ms-touch-action: manipulation;
|
|
166
|
+
touch-action: manipulation;
|
|
167
|
+
text-align: center;
|
|
168
|
+
font-size: 16px;
|
|
169
|
+
height: 34px;
|
|
170
|
+
line-height: 34px;
|
|
171
|
+
color: #000;
|
|
172
|
+
white-space: nowrap;
|
|
173
|
+
text-overflow: ellipsis;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.am-picker-col-item-selected {
|
|
177
|
+
font-size: 17px;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.am-picker-col-mask {
|
|
181
|
+
position: absolute;
|
|
182
|
+
left: 0;
|
|
183
|
+
top: 0;
|
|
184
|
+
height: 100%;
|
|
185
|
+
margin: 0 auto;
|
|
186
|
+
width: 100%;
|
|
187
|
+
z-index: 3;
|
|
188
|
+
background-image: -webkit-linear-gradient(top, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.6)), -webkit-linear-gradient(bottom, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.6));
|
|
189
|
+
background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(255, 255, 255, 0.95)), to(rgba(255, 255, 255, 0.6))), -webkit-gradient(linear, left bottom, left top, from(rgba(255, 255, 255, 0.95)), to(rgba(255, 255, 255, 0.6)));
|
|
190
|
+
background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.6)), linear-gradient(to top, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.6));
|
|
191
|
+
background-position: top, bottom;
|
|
192
|
+
background-size: 100% 102px;
|
|
193
|
+
background-repeat: no-repeat;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.am-picker-col-indicator {
|
|
197
|
+
-webkit-box-sizing: border-box;
|
|
198
|
+
box-sizing: border-box;
|
|
199
|
+
width: 100%;
|
|
200
|
+
height: 34px;
|
|
201
|
+
position: absolute;
|
|
202
|
+
left: 0;
|
|
203
|
+
top: 102px;
|
|
204
|
+
z-index: 3;
|
|
205
|
+
border-top: 1PX solid #ddd;
|
|
206
|
+
border-bottom: 1PX solid #ddd;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
@media (-webkit-min-device-pixel-ratio: 2),
|
|
210
|
+
(min-resolution: 2dppx) {
|
|
211
|
+
html:not([data-scale]) .am-picker-col-indicator {
|
|
212
|
+
border-top: none;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
html:not([data-scale]) .am-picker-col-indicator::before {
|
|
216
|
+
content: '';
|
|
217
|
+
position: absolute;
|
|
218
|
+
background-color: #ddd;
|
|
219
|
+
display: block;
|
|
220
|
+
z-index: 1;
|
|
221
|
+
top: 0;
|
|
222
|
+
right: auto;
|
|
223
|
+
bottom: auto;
|
|
224
|
+
left: 0;
|
|
225
|
+
width: 100%;
|
|
226
|
+
height: 1PX;
|
|
227
|
+
-webkit-transform-origin: 50% 50%;
|
|
228
|
+
-ms-transform-origin: 50% 50%;
|
|
229
|
+
transform-origin: 50% 50%;
|
|
230
|
+
-webkit-transform: scaleY(0.5);
|
|
231
|
+
-ms-transform: scaleY(0.5);
|
|
232
|
+
transform: scaleY(0.5);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
@media (-webkit-min-device-pixel-ratio: 2) and (-webkit-min-device-pixel-ratio: 3),
|
|
237
|
+
(min-resolution: 2dppx) and (min-resolution: 3dppx) {
|
|
238
|
+
html:not([data-scale]) .am-picker-col-indicator::before {
|
|
239
|
+
-webkit-transform: scaleY(0.33);
|
|
240
|
+
-ms-transform: scaleY(0.33);
|
|
241
|
+
transform: scaleY(0.33);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
@media (-webkit-min-device-pixel-ratio: 2),
|
|
246
|
+
(min-resolution: 2dppx) {
|
|
247
|
+
html:not([data-scale]) .am-picker-col-indicator {
|
|
248
|
+
border-bottom: none;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
html:not([data-scale]) .am-picker-col-indicator::after {
|
|
252
|
+
content: '';
|
|
253
|
+
position: absolute;
|
|
254
|
+
background-color: #ddd;
|
|
255
|
+
display: block;
|
|
256
|
+
z-index: 1;
|
|
257
|
+
top: auto;
|
|
258
|
+
right: auto;
|
|
259
|
+
bottom: 0;
|
|
260
|
+
left: 0;
|
|
261
|
+
width: 100%;
|
|
262
|
+
height: 1PX;
|
|
263
|
+
-webkit-transform-origin: 50% 100%;
|
|
264
|
+
-ms-transform-origin: 50% 100%;
|
|
265
|
+
transform-origin: 50% 100%;
|
|
266
|
+
-webkit-transform: scaleY(0.5);
|
|
267
|
+
-ms-transform: scaleY(0.5);
|
|
268
|
+
transform: scaleY(0.5);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
@media (-webkit-min-device-pixel-ratio: 2) and (-webkit-min-device-pixel-ratio: 3),
|
|
273
|
+
(min-resolution: 2dppx) and (min-resolution: 3dppx) {
|
|
274
|
+
html:not([data-scale]) .am-picker-col-indicator::after {
|
|
275
|
+
-webkit-transform: scaleY(0.33);
|
|
276
|
+
-ms-transform: scaleY(0.33);
|
|
277
|
+
transform: scaleY(0.33);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.am-picker {
|
|
282
|
+
display: -webkit-box;
|
|
283
|
+
display: -webkit-flex;
|
|
284
|
+
display: -ms-flexbox;
|
|
285
|
+
display: flex;
|
|
286
|
+
-webkit-box-align: center;
|
|
287
|
+
-webkit-align-items: center;
|
|
288
|
+
-ms-flex-align: center;
|
|
289
|
+
align-items: center;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.am-picker-item {
|
|
293
|
+
-webkit-box-flex: 1;
|
|
294
|
+
-webkit-flex: 1;
|
|
295
|
+
-ms-flex: 1;
|
|
296
|
+
flex: 1;
|
|
297
|
+
text-align: center;
|
|
298
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.formatFn = formatFn;
|
|
7
|
+
function formatIt(date, form) {
|
|
8
|
+
const pad = n => n < 10 ? "0".concat(n) : n;
|
|
9
|
+
const dateStr = "".concat(date.getFullYear(), "-").concat(pad(date.getMonth() + 1), "-").concat(pad(date.getDate()));
|
|
10
|
+
const timeStr = "".concat(pad(date.getHours()), ":").concat(pad(date.getMinutes()));
|
|
11
|
+
if (form === 'YYYY-MM-DD') {
|
|
12
|
+
return dateStr;
|
|
13
|
+
}
|
|
14
|
+
if (form === 'HH:mm') {
|
|
15
|
+
return timeStr;
|
|
16
|
+
}
|
|
17
|
+
return "".concat(dateStr, " ").concat(timeStr);
|
|
18
|
+
}
|
|
19
|
+
function formatFn(instance, value) {
|
|
20
|
+
const formatsEnum = {
|
|
21
|
+
date: 'YYYY-MM-DD',
|
|
22
|
+
time: 'HH:mm',
|
|
23
|
+
datetime: 'YYYY-MM-DD HH:mm'
|
|
24
|
+
};
|
|
25
|
+
const {
|
|
26
|
+
format
|
|
27
|
+
} = instance.props;
|
|
28
|
+
const type = typeof format;
|
|
29
|
+
if (type === 'string') {
|
|
30
|
+
return formatIt(value, format);
|
|
31
|
+
}
|
|
32
|
+
if (type === 'function') {
|
|
33
|
+
return format(value);
|
|
34
|
+
}
|
|
35
|
+
return formatIt(value, formatsEnum[instance.props.mode]);
|
|
36
|
+
}
|
package/lib/{DepartmentMultipleSelectEditor → Department-editor/department-multiple-select}/index.js
RENAMED
|
@@ -7,9 +7,9 @@ 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 _lang = require("
|
|
10
|
+
var _utils = require("../utils");
|
|
11
|
+
var _selectedDepartments = _interopRequireDefault(require("../selected-departments"));
|
|
12
|
+
var _lang = require("../../lang");
|
|
13
13
|
require("./index.css");
|
|
14
14
|
function DepartmentMultipleSelect(props) {
|
|
15
15
|
const {
|
|
@@ -21,7 +21,7 @@ function DepartmentMultipleSelect(props) {
|
|
|
21
21
|
departments: initialDepartments
|
|
22
22
|
} = props;
|
|
23
23
|
const [searchVal, setSearchVal] = (0, _react.useState)('');
|
|
24
|
-
const [departments, setDepartments] = (0, _react.useState)((0,
|
|
24
|
+
const [departments, setDepartments] = (0, _react.useState)((0, _utils.getNormalizedDepartments)(initialDepartments));
|
|
25
25
|
const departmentContainerRef = (0, _react.useRef)(null);
|
|
26
26
|
const validDepartmentsRef = (0, _react.useRef)([]);
|
|
27
27
|
(0, _react.useEffect)(() => {
|
|
@@ -51,7 +51,7 @@ function DepartmentMultipleSelect(props) {
|
|
|
51
51
|
function onChangeSearch(event) {
|
|
52
52
|
const newSearchValue = event.target.value;
|
|
53
53
|
if (searchVal === newSearchValue) return;
|
|
54
|
-
validDepartmentsRef.current = (0,
|
|
54
|
+
validDepartmentsRef.current = (0, _utils.searchDepartments)(departments, newSearchValue);
|
|
55
55
|
setSearchVal(newSearchValue);
|
|
56
56
|
}
|
|
57
57
|
function onClick(e) {
|
|
@@ -130,7 +130,7 @@ function DepartmentMultipleSelect(props) {
|
|
|
130
130
|
}, isShowSelectedDepartments && /*#__PURE__*/_react.default.createElement("div", {
|
|
131
131
|
className: "selected-departments dtable-ui",
|
|
132
132
|
onClick: onClick
|
|
133
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
133
|
+
}, /*#__PURE__*/_react.default.createElement(_selectedDepartments.default, {
|
|
134
134
|
value: value,
|
|
135
135
|
removeDepartment: onCommit,
|
|
136
136
|
isShowRemoveIcon: true,
|
package/lib/{DepartmentSingleSelectEditor/pc-editor → Department-editor}/department-single-select.js
RENAMED
|
@@ -8,9 +8,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _dtableUtils = require("dtable-utils");
|
|
11
|
-
var _Loading = _interopRequireDefault(require("
|
|
12
|
-
var
|
|
13
|
-
var _lang = require("
|
|
11
|
+
var _Loading = _interopRequireDefault(require("../Loading"));
|
|
12
|
+
var _utils = require("./utils");
|
|
13
|
+
var _lang = require("../lang");
|
|
14
14
|
require("./index.css");
|
|
15
15
|
class DepartmentSingleSelect extends _react.Component {
|
|
16
16
|
constructor(props) {
|
|
@@ -28,7 +28,7 @@ class DepartmentSingleSelect extends _react.Component {
|
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
this.initDepartments = departments => {
|
|
31
|
-
const normalizedDepartments = (0,
|
|
31
|
+
const normalizedDepartments = (0, _utils.getNormalizedDepartments)(departments || []);
|
|
32
32
|
this.validDepartments = normalizedDepartments;
|
|
33
33
|
this.setState({
|
|
34
34
|
departments: normalizedDepartments
|
|
@@ -56,7 +56,7 @@ class DepartmentSingleSelect extends _react.Component {
|
|
|
56
56
|
} else {
|
|
57
57
|
targetDepartments = departments.filter(department => specificDepartments.includes(department.id));
|
|
58
58
|
}
|
|
59
|
-
const normalizedDepartments = (0,
|
|
59
|
+
const normalizedDepartments = (0, _utils.getNormalizedDepartments)(targetDepartments);
|
|
60
60
|
_this.validDepartments = normalizedDepartments;
|
|
61
61
|
_this.setState({
|
|
62
62
|
departments: normalizedDepartments,
|
|
@@ -94,7 +94,7 @@ class DepartmentSingleSelect extends _react.Component {
|
|
|
94
94
|
const {
|
|
95
95
|
departments
|
|
96
96
|
} = this.state;
|
|
97
|
-
this.validDepartments = (0,
|
|
97
|
+
this.validDepartments = (0, _utils.searchDepartments)(departments, newSearchValue);
|
|
98
98
|
this.setState({
|
|
99
99
|
searchVal: newSearchValue
|
|
100
100
|
});
|
|
@@ -202,7 +202,7 @@ class DepartmentSingleSelect extends _react.Component {
|
|
|
202
202
|
};
|
|
203
203
|
this.renderEmptyTip = () => {
|
|
204
204
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
205
|
-
className: "
|
|
205
|
+
className: "dtable-ui-editor-no-search-result"
|
|
206
206
|
}, (0, _lang.getLocale)('No_departments_available'));
|
|
207
207
|
};
|
|
208
208
|
this.renderMenuContent = () => {
|