dtable-ui-component 6.0.25 → 6.0.26-beta1
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/BodyPortal/index.js +29 -0
- package/lib/CheckboxEditor/index.js +20 -116
- package/lib/CheckboxEditor/lg.js +118 -0
- package/lib/CheckboxEditor/sm.js +101 -0
- package/lib/CollaboratorEditor/index.js +19 -9
- package/lib/CollaboratorEditor/{pc-collaborator-editor → lg}/index.js +2 -2
- package/lib/CollaboratorEditor/sm/index.css +41 -0
- package/lib/CollaboratorEditor/sm/index.js +88 -0
- package/lib/DTableCommonAddTool/index.js +1 -3
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-multiple-select-filter.js +3 -3
- package/lib/DTableFiltersPopover/widgets/department-select-filter/department-single-select-filter.js +4 -4
- package/lib/DateEditor/index.js +68 -95
- package/lib/DateEditor/{pc-date-editor-popover.js → large.js} +6 -6
- package/lib/DateEditor/sm/custom-rc-calendar.css +118 -0
- package/lib/DateEditor/sm/index.css +40 -0
- package/lib/DateEditor/{mb-date-editor-popover → sm}/index.js +20 -35
- package/lib/{Department-editor → DepartmentEditor}/constants.js +7 -0
- package/lib/{Department-editor → DepartmentEditor}/department-multiple-select/index.css +4 -1
- package/lib/{Department-editor → DepartmentEditor}/department-multiple-select/index.js +7 -4
- package/lib/DepartmentEditor/index.js +34 -0
- package/lib/{Department-editor → DepartmentEditor/lg}/department-single-select.js +10 -7
- package/lib/{Department-editor → DepartmentEditor/lg}/index.css +12 -3
- package/lib/{Department-editor → DepartmentEditor/lg}/index.js +8 -25
- package/lib/DepartmentEditor/sm/index.css +4 -0
- package/lib/DepartmentEditor/sm/index.js +220 -0
- package/lib/DigitalSignEditor/index.js +24 -171
- package/lib/DigitalSignEditor/lg/index.js +181 -0
- package/lib/DigitalSignEditor/sm/index.css +35 -0
- package/lib/DigitalSignEditor/sm/index.js +139 -0
- package/lib/FileEditor/files-previewer/index.js +16 -267
- package/lib/FileEditor/files-previewer/{file-previewer → lg/file-previewer}/dropdown-menu.js +1 -1
- package/lib/FileEditor/files-previewer/{file-previewer → lg/file-previewer}/file-name-editor/index.js +1 -1
- package/lib/FileEditor/files-previewer/{file-previewer → lg/file-previewer}/index.css +0 -2
- package/lib/FileEditor/files-previewer/{file-previewer → lg/file-previewer}/index.js +2 -2
- package/lib/FileEditor/files-previewer/lg/index.js +276 -0
- package/lib/FileEditor/files-previewer/sm/file-previewer/index.js +122 -0
- package/lib/FileEditor/files-previewer/sm/index.css +39 -0
- package/lib/FileEditor/files-previewer/sm/index.js +59 -0
- package/lib/FileEditor/index.css +0 -5
- package/lib/FileEditor/index.js +26 -265
- package/lib/FileEditor/lg/addition-previewer/index.css +1 -0
- package/lib/FileEditor/{addition-previewer → lg/addition-previewer}/index.js +1 -1
- package/lib/FileEditor/lg/addition-previewer/local-file-addition/index.css +1 -0
- package/lib/FileEditor/{addition-previewer → lg/addition-previewer}/local-file-addition/index.js +4 -4
- package/lib/FileEditor/lg/index.css +5 -0
- package/lib/FileEditor/lg/index.js +274 -0
- package/lib/FileEditor/sm/index.css +10 -0
- package/lib/FileEditor/sm/index.js +131 -0
- package/lib/FileFormatter/index.js +98 -38
- package/lib/FileItemFormatter/index.js +3 -1
- package/lib/FormulaFormatter/index.css +5 -5
- package/lib/GeolocationEditor/index.js +88 -231
- package/lib/GeolocationEditor/{country-editor.js → lg/country-editor.js} +5 -49
- package/lib/GeolocationEditor/{index.css → lg/index.css} +1 -2
- package/lib/GeolocationEditor/lg/index.js +247 -0
- package/lib/GeolocationEditor/{location-editor.js → lg/location-editor.js} +8 -41
- package/lib/GeolocationEditor/{map-editor → lg/map-editor}/index.js +6 -6
- package/lib/GeolocationEditor/{map-editor → lg/map-editor}/large-editor/index.js +7 -7
- package/lib/GeolocationEditor/{map-selection-editor → lg/map-selection-editor}/index.js +7 -7
- package/lib/GeolocationEditor/{map-selection-editor → lg/map-selection-editor}/large-editor/index.js +7 -7
- package/lib/GeolocationEditor/{province-city-editor.js → lg/province-city-editor.js} +7 -38
- package/lib/GeolocationEditor/{province-editor.js → lg/province-editor.js} +7 -31
- package/lib/GeolocationEditor/{selector-header-item.js → lg/selector-header-item.js} +1 -1
- package/lib/GeolocationEditor/map-editor-utils.js +6 -2
- package/lib/GeolocationEditor/sm/country-editor.js +70 -0
- package/lib/GeolocationEditor/sm/index.css +11 -0
- package/lib/GeolocationEditor/sm/index.js +125 -0
- package/lib/GeolocationEditor/sm/location-editor.js +93 -0
- package/lib/GeolocationEditor/sm/map-editor/index.css +11 -0
- package/lib/GeolocationEditor/sm/map-editor/index.js +469 -0
- package/lib/GeolocationEditor/sm/map-selection-editor/index.css +158 -0
- package/lib/GeolocationEditor/sm/map-selection-editor/index.js +525 -0
- package/lib/GeolocationEditor/sm/province-city-editor.js +68 -0
- package/lib/GeolocationEditor/sm/province-editor.js +67 -0
- package/lib/ImageEditor/images-previewer/image-preview/index.js +2 -2
- package/lib/ImageEditor/images-previewer/index.js +3 -3
- package/lib/ImageEditor/index.css +17 -16
- package/lib/ImageEditor/index.js +26 -185
- package/lib/ImageEditor/{addition-previewer → lg/addition-previewer}/image-link/index.js +1 -1
- package/lib/ImageEditor/{addition-previewer → lg/addition-previewer}/index.js +1 -1
- package/lib/ImageEditor/{addition-previewer → lg/addition-previewer}/local-image-addition/index.js +4 -4
- package/lib/ImageEditor/lg/images-previewer/index.js +140 -0
- package/lib/ImageEditor/lg/index.css +24 -0
- package/lib/ImageEditor/lg/index.js +194 -0
- package/lib/ImageEditor/sm/index.css +29 -0
- package/lib/ImageEditor/sm/index.js +131 -0
- package/lib/ImageThumbnail/index.js +2 -1
- package/lib/LinkEditor/pc-link-editor-popover/index.css +1 -1
- package/lib/LinkEditor/pc-link-editor-popover/index.js +1 -1
- package/lib/MobileFullScreenPage/body/index.css +9 -0
- package/lib/MobileFullScreenPage/body/index.js +23 -0
- package/lib/MobileFullScreenPage/header/index.css +35 -0
- package/lib/MobileFullScreenPage/header/index.js +38 -0
- package/lib/MobileFullScreenPage/index.css +13 -0
- package/lib/MobileFullScreenPage/index.js +81 -0
- package/lib/MobileModal/index.js +41 -0
- package/lib/MobileOperationSheet/index.css +27 -0
- package/lib/MobileOperationSheet/index.js +92 -0
- package/lib/MobileSelectorEditor/empty/index.css +3 -0
- package/lib/MobileSelectorEditor/empty/index.js +23 -0
- package/lib/MobileSelectorEditor/index.css +32 -0
- package/lib/MobileSelectorEditor/index.js +57 -0
- package/lib/MobileSelectorEditor/option/index.css +28 -0
- package/lib/MobileSelectorEditor/option/index.js +36 -0
- package/lib/MobileSelectorEditor/options/index.css +8 -0
- package/lib/MobileSelectorEditor/options/index.js +18 -0
- package/lib/MobileSelectorEditor/search/index.css +7 -0
- package/lib/MobileSelectorEditor/search/index.js +26 -0
- package/lib/MobileUpload/index.css +1 -0
- package/lib/MobileUpload/index.js +160 -0
- package/lib/MultipleSelectEditor/index.js +9 -14
- package/lib/RowExpand/index.js +19 -0
- package/lib/{RowExpandDialog → RowExpand/lg}/body/index.js +4 -4
- package/lib/{RowExpandDialog → RowExpand/lg}/column-content/index.js +2 -2
- package/lib/{RowExpandDialog → RowExpand/lg}/header/index.js +3 -3
- package/lib/{RowExpandDialog → RowExpand/lg}/index.js +6 -6
- package/lib/RowExpand/sm/body/index.css +173 -0
- package/lib/RowExpand/sm/body/index.js +111 -0
- package/lib/RowExpand/sm/column-content/index.css +27 -0
- package/lib/RowExpand/sm/column-content/index.js +25 -0
- package/lib/RowExpand/sm/index.css +0 -0
- package/lib/RowExpand/sm/index.js +172 -0
- package/lib/RowExpandEditor/RightAngle/index.css +6 -0
- package/lib/RowExpandEditor/RightAngle/index.js +17 -0
- package/lib/RowExpandEditor/RowExpandAddBtn/index.js +12 -17
- package/lib/RowExpandEditor/RowExpandAddBtn/lg/index.js +26 -0
- package/lib/RowExpandEditor/RowExpandAddBtn/sm/index.css +3 -0
- package/lib/RowExpandEditor/RowExpandAddBtn/sm/index.js +19 -0
- package/lib/RowExpandEditor/RowExpandCheckboxEditor/index.js +10 -33
- package/lib/RowExpandEditor/RowExpandCheckboxEditor/lg.js +42 -0
- package/lib/RowExpandEditor/RowExpandCheckboxEditor/sm/index.css +6 -0
- package/lib/RowExpandEditor/RowExpandCheckboxEditor/sm/index.js +39 -0
- package/lib/RowExpandEditor/RowExpandCollaboratorEditor/index.js +10 -223
- package/lib/RowExpandEditor/RowExpandCollaboratorEditor/{index.css → lg/index.css} +1 -1
- package/lib/RowExpandEditor/RowExpandCollaboratorEditor/lg/index.js +231 -0
- package/lib/RowExpandEditor/RowExpandCollaboratorEditor/sm/index.css +9 -0
- package/lib/RowExpandEditor/RowExpandCollaboratorEditor/sm/index.js +163 -0
- package/lib/RowExpandEditor/RowExpandDateEditor/index.js +10 -121
- package/lib/RowExpandEditor/RowExpandDateEditor/lg.js +130 -0
- package/lib/RowExpandEditor/RowExpandDateEditor/sm.js +84 -0
- package/lib/RowExpandEditor/RowExpandDepartmentEditor/index.js +11 -96
- package/lib/RowExpandEditor/RowExpandDepartmentEditor/lg.js +101 -0
- package/lib/RowExpandEditor/RowExpandDepartmentEditor/sm.js +65 -0
- package/lib/RowExpandEditor/RowExpandDigitalSignEditor/index.js +10 -199
- package/lib/RowExpandEditor/RowExpandDigitalSignEditor/{index.css → lg/index.css} +1 -1
- package/lib/RowExpandEditor/RowExpandDigitalSignEditor/lg/index.js +208 -0
- package/lib/RowExpandEditor/RowExpandDigitalSignEditor/sm/index.css +1 -0
- package/lib/RowExpandEditor/RowExpandDigitalSignEditor/sm/index.js +130 -0
- package/lib/RowExpandEditor/RowExpandDurationEditor/index.js +11 -97
- package/lib/RowExpandEditor/RowExpandDurationEditor/lg.js +105 -0
- package/lib/RowExpandEditor/RowExpandDurationEditor/sm.js +71 -0
- package/lib/RowExpandEditor/RowExpandEmailEditor/index.js +10 -116
- package/lib/RowExpandEditor/RowExpandEmailEditor/lg/index.css +1 -0
- package/lib/RowExpandEditor/RowExpandEmailEditor/lg/index.js +125 -0
- package/lib/RowExpandEditor/RowExpandEmailEditor/sm/index.css +1 -0
- package/lib/RowExpandEditor/RowExpandEmailEditor/sm/index.js +84 -0
- package/lib/RowExpandEditor/RowExpandFileEditor/index.js +10 -139
- package/lib/RowExpandEditor/RowExpandFileEditor/lg/index.css +1 -0
- package/lib/RowExpandEditor/RowExpandFileEditor/lg/index.js +148 -0
- package/lib/RowExpandEditor/RowExpandFileEditor/sm/index.js +116 -0
- package/lib/RowExpandEditor/RowExpandGeolocationEditor/index.js +10 -156
- package/lib/RowExpandEditor/RowExpandGeolocationEditor/lg/index.js +164 -0
- package/lib/RowExpandEditor/RowExpandGeolocationEditor/sm/index.css +0 -0
- package/lib/RowExpandEditor/RowExpandGeolocationEditor/sm/index.js +101 -0
- package/lib/RowExpandEditor/RowExpandImageEditor/index.js +10 -161
- package/lib/RowExpandEditor/RowExpandImageEditor/lg/index.js +170 -0
- package/lib/RowExpandEditor/RowExpandImageEditor/sm/index.css +25 -0
- package/lib/RowExpandEditor/RowExpandImageEditor/sm/index.js +109 -0
- package/lib/RowExpandEditor/RowExpandLongTextEditor/index.js +11 -115
- package/lib/RowExpandEditor/RowExpandLongTextEditor/lg/index.js +123 -0
- package/lib/RowExpandEditor/RowExpandLongTextEditor/sm/editor/index.css +10 -0
- package/lib/RowExpandEditor/RowExpandLongTextEditor/sm/editor/index.js +80 -0
- package/lib/RowExpandEditor/RowExpandLongTextEditor/sm/index.css +3 -0
- package/lib/RowExpandEditor/RowExpandLongTextEditor/sm/index.js +91 -0
- package/lib/RowExpandEditor/RowExpandMultipleSelectEditor/index.js +10 -238
- package/lib/RowExpandEditor/RowExpandMultipleSelectEditor/{index.css → lg/index.css} +1 -1
- package/lib/RowExpandEditor/RowExpandMultipleSelectEditor/lg/index.js +247 -0
- package/lib/RowExpandEditor/RowExpandMultipleSelectEditor/sm/index.css +0 -0
- package/lib/RowExpandEditor/RowExpandMultipleSelectEditor/sm/index.js +155 -0
- package/lib/RowExpandEditor/RowExpandNumberEditor/index.js +10 -96
- package/lib/RowExpandEditor/RowExpandNumberEditor/lg.js +105 -0
- package/lib/RowExpandEditor/RowExpandNumberEditor/sm/index.css +3 -0
- package/lib/RowExpandEditor/RowExpandNumberEditor/sm/index.js +76 -0
- package/lib/RowExpandEditor/RowExpandRateEditor/index.css +21 -0
- package/lib/RowExpandEditor/RowExpandRateEditor/index.js +10 -142
- package/lib/RowExpandEditor/RowExpandRateEditor/lg.js +151 -0
- package/lib/RowExpandEditor/RowExpandRateEditor/sm.js +92 -0
- package/lib/RowExpandEditor/RowExpandSingleSelectorEditor/index.js +11 -198
- package/lib/RowExpandEditor/RowExpandSingleSelectorEditor/lg/index.js +206 -0
- package/lib/RowExpandEditor/RowExpandSingleSelectorEditor/sm/index.css +8 -0
- package/lib/RowExpandEditor/RowExpandSingleSelectorEditor/sm/index.js +134 -0
- package/lib/RowExpandEditor/RowExpandTextEditor/index.js +11 -128
- package/lib/RowExpandEditor/RowExpandTextEditor/lg/index.js +136 -0
- package/lib/RowExpandEditor/RowExpandTextEditor/sm/index.css +14 -0
- package/lib/RowExpandEditor/RowExpandTextEditor/sm/index.js +37 -0
- package/lib/RowExpandEditor/RowExpandUrlEditor/index.js +10 -121
- package/lib/RowExpandEditor/RowExpandUrlEditor/lg/index.js +130 -0
- package/lib/RowExpandEditor/RowExpandUrlEditor/sm/index.css +17 -0
- package/lib/RowExpandEditor/RowExpandUrlEditor/sm/index.js +87 -0
- package/lib/RowExpandFormatter/RowExpandDepartmentFormatter/index.js +10 -18
- package/lib/RowExpandFormatter/RowExpandDepartmentFormatter/lg.js +27 -0
- package/lib/RowExpandFormatter/RowExpandDepartmentFormatter/sm.js +20 -0
- package/lib/RowExpandFormatter/RowExpandEmailFormatter/index.css +4 -4
- package/lib/RowExpandFormatter/RowExpandRateFormatter/index.css +1 -1
- package/lib/RowExpandFormatter/index.css +18 -18
- package/lib/RowExpandFormatter/index.js +1 -1
- package/lib/SelectItem/index.js +57 -33
- package/lib/SingleSelectEditor/index.js +9 -14
- package/lib/SvgIcon/index.js +2 -1
- package/lib/constants/file.js +1 -0
- package/lib/constants/index.js +3 -2
- package/lib/index.js +42 -98
- package/lib/locales/zh-CN.json +1 -1
- package/lib/select-editor/index.js +27 -20
- package/lib/select-editor/{pc-select-editor → lg}/index.css +1 -1
- package/lib/select-editor/{pc-select-editor → lg}/index.js +10 -10
- package/lib/select-editor/sm/index.css +1 -0
- package/lib/select-editor/sm/index.js +105 -0
- package/lib/utils/get-event-transfer.js +2 -1
- package/lib/utils/utils.js +11 -2
- package/package.json +3 -12
- package/lib/ActionSheet/index.js +0 -194
- package/lib/ActionSheet/style/index.css +0 -365
- package/lib/ActivityIndicator/index.css +0 -108
- package/lib/ActivityIndicator/index.js +0 -76
- package/lib/Badge/index.css +0 -96
- package/lib/Badge/index.js +0 -65
- package/lib/CollaboratorEditor/mb-collaborator-editor/index.css +0 -85
- package/lib/CollaboratorEditor/mb-collaborator-editor/index.js +0 -148
- package/lib/DateEditor/mb-date-editor-popover/custom-rc-calendar.css +0 -118
- package/lib/DateEditor/mb-date-editor-popover/index.css +0 -45
- package/lib/DatePicker/index.js +0 -120
- package/lib/DatePicker/locale/en_US.js +0 -14
- package/lib/DatePicker/locale/ru_RU.js +0 -14
- package/lib/DatePicker/locale/sv_SE.js +0 -14
- package/lib/DatePicker/locale/zh_CN.js +0 -14
- package/lib/DatePicker/style/index.css +0 -290
- package/lib/DatePicker/utils.js +0 -36
- package/lib/Drawer/index.css +0 -142
- package/lib/Drawer/index.js +0 -21
- package/lib/FileEditor/addition-previewer/index.css +0 -1
- package/lib/FileEditor/addition-previewer/local-file-addition/index.css +0 -1
- package/lib/Icon/index.css +0 -50
- package/lib/Icon/index.js +0 -34
- package/lib/Icon/load-sprite.js +0 -56
- package/lib/InputItem/custom-input.js +0 -321
- package/lib/InputItem/custom-keyboard.js +0 -162
- package/lib/InputItem/index.js +0 -388
- package/lib/InputItem/input.js +0 -45
- package/lib/InputItem/locale/en_US.js +0 -12
- package/lib/InputItem/locale/ru_RU.js +0 -12
- package/lib/InputItem/locale/sv_SE.js +0 -12
- package/lib/InputItem/locale/zh_CN.js +0 -12
- package/lib/InputItem/portal.js +0 -23
- package/lib/InputItem/style/index.css +0 -512
- package/lib/List/index.css +0 -381
- package/lib/List/index.js +0 -41
- package/lib/List/list-item.js +0 -169
- package/lib/Modal/alert.js +0 -82
- package/lib/Modal/index.js +0 -15
- package/lib/Modal/modal.js +0 -118
- package/lib/Modal/operation.js +0 -77
- package/lib/Modal/prompt.js +0 -207
- package/lib/Picker/AbstractPicker.js +0 -190
- package/lib/Picker/index.js +0 -28
- package/lib/Picker/locale/en_US.js +0 -12
- package/lib/Picker/locale/ru_RU.js +0 -12
- package/lib/Picker/locale/sv_SE.js +0 -12
- package/lib/Picker/locale/zh_CN.js +0 -12
- package/lib/Picker/popupProps.js +0 -12
- package/lib/Picker/style/index.css +0 -141
- package/lib/Popover/index.js +0 -62
- package/lib/Popover/item.js +0 -55
- package/lib/Popover/style/index.css +0 -229
- package/lib/Progress/index.css +0 -22
- package/lib/Progress/index.js +0 -65
- package/lib/Radio/Radio.js +0 -47
- package/lib/Radio/RadioItem.js +0 -57
- package/lib/Radio/index.css +0 -90
- package/lib/Radio/index.js +0 -12
- package/lib/RowExpandEditor/RowExpandEmailEditor/index.css +0 -2
- package/lib/RowExpandEditor/RowExpandFileEditor/index.css +0 -1
- package/lib/TabBar/Tab.js +0 -76
- package/lib/TabBar/index.css +0 -138
- package/lib/TabBar/index.js +0 -128
- package/lib/Tabs/index.css +0 -443
- package/lib/Tabs/index.js +0 -38
- package/lib/TextareaItem/index.css +0 -231
- package/lib/TextareaItem/index.js +0 -231
- package/lib/Toast/index.css +0 -65
- package/lib/Toast/index.js +0 -131
- package/lib/_util/class.js +0 -34
- package/lib/_util/closest.js +0 -17
- package/lib/_util/exenv.js +0 -8
- package/lib/_util/getDataAttr.js +0 -15
- package/lib/_util/getLocale.js +0 -42
- package/lib/select-editor/mb-select-editor/index.css +0 -127
- package/lib/select-editor/mb-select-editor/index.js +0 -197
- package/lib/select-editor/select-editor-option.js +0 -84
- /package/lib/CollaboratorEditor/{pc-collaborator-editor → lg}/index.css +0 -0
- /package/lib/{Department-editor → DepartmentEditor}/selected-departments/index.css +0 -0
- /package/lib/{Department-editor → DepartmentEditor}/selected-departments/index.js +0 -0
- /package/lib/{Department-editor → DepartmentEditor}/utils.js +0 -0
- /package/lib/DigitalSignEditor/{index.css → lg/index.css} +0 -0
- /package/lib/FileEditor/files-previewer/{file-previewer → lg/file-previewer}/file-name-editor/index.css +0 -0
- /package/lib/GeolocationEditor/{map-editor → lg/map-editor}/large-editor/index.css +0 -0
- /package/lib/GeolocationEditor/{map-selection-editor → lg/map-selection-editor}/large-editor/index.css +0 -0
- /package/lib/GeolocationEditor/{parse-geolocation.js → lg/parse-geolocation.js} +0 -0
- /package/lib/GeolocationEditor/{selector-list.js → lg/selector-list.js} +0 -0
- /package/lib/ImageEditor/{addition-previewer → lg/addition-previewer}/image-link/index.css +0 -0
- /package/lib/ImageEditor/{addition-previewer → lg/addition-previewer}/index.css +0 -0
- /package/lib/ImageEditor/{addition-previewer → lg/addition-previewer}/local-image-addition/index.css +0 -0
- /package/lib/{RowExpandDialog → RowExpand/lg}/body/index.css +0 -0
- /package/lib/{RowExpandDialog → RowExpand/lg}/column-content/index.css +0 -0
- /package/lib/{RowExpandDialog → RowExpand/lg}/header/index.css +0 -0
- /package/lib/{RowExpandDialog → RowExpand/lg}/index.css +0 -0
- /package/lib/RowExpandEditor/RowExpandAddBtn/{index.css → lg/index.css} +0 -0
- /package/lib/RowExpandEditor/RowExpandGeolocationEditor/{index.css → lg/index.css} +0 -0
- /package/lib/RowExpandEditor/RowExpandImageEditor/{index.css → lg/index.css} +0 -0
- /package/lib/RowExpandEditor/RowExpandLongTextEditor/{index.css → lg/index.css} +0 -0
- /package/lib/RowExpandEditor/RowExpandSingleSelectorEditor/{index.css → lg/index.css} +0 -0
- /package/lib/RowExpandEditor/RowExpandTextEditor/{index.css → lg/index.css} +0 -0
- /package/lib/RowExpandEditor/RowExpandUrlEditor/{index.css → lg/index.css} +0 -0
package/lib/Modal/modal.js
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = exports.ModalComponent = void 0;
|
|
9
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
-
var React = _interopRequireWildcard(require("react"));
|
|
11
|
-
var _rmcDialog = _interopRequireDefault(require("rmc-dialog"));
|
|
12
|
-
var _rmcFeedback = _interopRequireDefault(require("rmc-feedback"));
|
|
13
|
-
class ModalComponent extends React.Component {}
|
|
14
|
-
exports.ModalComponent = ModalComponent;
|
|
15
|
-
class Modal extends ModalComponent {
|
|
16
|
-
renderFooterButton(button, prefixCls, i) {
|
|
17
|
-
let buttonStyle = {};
|
|
18
|
-
if (button.style) {
|
|
19
|
-
buttonStyle = button.style;
|
|
20
|
-
if (typeof buttonStyle === 'string') {
|
|
21
|
-
const styleMap = {
|
|
22
|
-
cancel: {},
|
|
23
|
-
default: {},
|
|
24
|
-
destructive: {
|
|
25
|
-
color: 'red'
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
buttonStyle = styleMap[buttonStyle] || {};
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
const onClickFn = e => {
|
|
32
|
-
e.preventDefault();
|
|
33
|
-
if (button.onPress) {
|
|
34
|
-
button.onPress();
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
return /*#__PURE__*/React.createElement(_rmcFeedback.default, {
|
|
38
|
-
activeClassName: "".concat(prefixCls, "-button-active"),
|
|
39
|
-
key: i
|
|
40
|
-
}, /*#__PURE__*/React.createElement("a", {
|
|
41
|
-
className: "".concat(prefixCls, "-button"),
|
|
42
|
-
role: "button",
|
|
43
|
-
style: buttonStyle,
|
|
44
|
-
onClick: onClickFn
|
|
45
|
-
}, button.text || 'Button'));
|
|
46
|
-
}
|
|
47
|
-
render() {
|
|
48
|
-
const {
|
|
49
|
-
prefixCls,
|
|
50
|
-
className,
|
|
51
|
-
wrapClassName,
|
|
52
|
-
transitionName,
|
|
53
|
-
maskTransitionName,
|
|
54
|
-
style,
|
|
55
|
-
platform,
|
|
56
|
-
footer = [],
|
|
57
|
-
operation,
|
|
58
|
-
animated,
|
|
59
|
-
transparent,
|
|
60
|
-
popup,
|
|
61
|
-
animationType,
|
|
62
|
-
...restProps
|
|
63
|
-
} = this.props;
|
|
64
|
-
const btnGroupClass = (0, _classnames.default)("".concat(prefixCls, "-button-group-").concat(footer.length === 2 && !operation ? 'h' : 'v'), "".concat(prefixCls, "-button-group-").concat(operation ? 'operation' : 'normal'));
|
|
65
|
-
const footerDom = footer.length ? /*#__PURE__*/React.createElement("div", {
|
|
66
|
-
className: btnGroupClass,
|
|
67
|
-
role: "group"
|
|
68
|
-
}, footer.map((button, i) =>
|
|
69
|
-
// tslint:disable-next-line:jsx-no-multiline-js
|
|
70
|
-
this.renderFooterButton(button, prefixCls, i))) : null;
|
|
71
|
-
let transName;
|
|
72
|
-
let maskTransName;
|
|
73
|
-
if (animated) {
|
|
74
|
-
// tslint:disable-next-line:prefer-conditional-expression
|
|
75
|
-
if (transparent) {
|
|
76
|
-
transName = maskTransName = 'am-fade';
|
|
77
|
-
} else {
|
|
78
|
-
transName = maskTransName = 'am-slide-up';
|
|
79
|
-
}
|
|
80
|
-
if (popup) {
|
|
81
|
-
transName = animationType === 'slide-up' ? 'am-slide-up' : 'am-slide-down';
|
|
82
|
-
maskTransName = 'am-fade';
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
const wrapCls = (0, _classnames.default)(wrapClassName, {
|
|
86
|
-
["".concat(prefixCls, "-wrap-popup")]: popup
|
|
87
|
-
});
|
|
88
|
-
const cls = (0, _classnames.default)(className, {
|
|
89
|
-
["".concat(prefixCls, "-transparent")]: transparent,
|
|
90
|
-
["".concat(prefixCls, "-popup")]: popup,
|
|
91
|
-
["".concat(prefixCls, "-popup-").concat(animationType)]: popup && animationType,
|
|
92
|
-
["".concat(prefixCls, "-android")]: platform === 'android'
|
|
93
|
-
});
|
|
94
|
-
return /*#__PURE__*/React.createElement(_rmcDialog.default, Object.assign({}, restProps, {
|
|
95
|
-
prefixCls: prefixCls,
|
|
96
|
-
className: cls,
|
|
97
|
-
wrapClassName: wrapCls,
|
|
98
|
-
transitionName: transitionName || transName,
|
|
99
|
-
maskTransitionName: maskTransitionName || maskTransName,
|
|
100
|
-
style: style,
|
|
101
|
-
footer: footerDom
|
|
102
|
-
}));
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
exports.default = Modal;
|
|
106
|
-
Modal.defaultProps = {
|
|
107
|
-
prefixCls: 'am-modal',
|
|
108
|
-
transparent: false,
|
|
109
|
-
popup: false,
|
|
110
|
-
animationType: 'slide-down',
|
|
111
|
-
animated: true,
|
|
112
|
-
style: {},
|
|
113
|
-
onShow() {},
|
|
114
|
-
footer: [],
|
|
115
|
-
closable: false,
|
|
116
|
-
operation: false,
|
|
117
|
-
platform: 'ios'
|
|
118
|
-
};
|
package/lib/Modal/operation.js
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = operation;
|
|
9
|
-
var React = _interopRequireWildcard(require("react"));
|
|
10
|
-
var ReactDOM = _interopRequireWildcard(require("react-dom"));
|
|
11
|
-
var _closest = _interopRequireDefault(require("../_util/closest"));
|
|
12
|
-
var _modal = _interopRequireDefault(require("./modal"));
|
|
13
|
-
function operation() {
|
|
14
|
-
let actions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [{
|
|
15
|
-
text: '确定'
|
|
16
|
-
}];
|
|
17
|
-
let platform = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'ios';
|
|
18
|
-
let closed = false;
|
|
19
|
-
const prefixCls = 'am-modal';
|
|
20
|
-
const div = document.createElement('div');
|
|
21
|
-
document.body.appendChild(div);
|
|
22
|
-
function close() {
|
|
23
|
-
ReactDOM.unmountComponentAtNode(div);
|
|
24
|
-
if (div && div.parentNode) {
|
|
25
|
-
div.parentNode.removeChild(div);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
const footer = actions.map(button => {
|
|
29
|
-
// tslint:disable-next-line:only-arrow-functions
|
|
30
|
-
const orginPress = button.onPress || function () {};
|
|
31
|
-
button.onPress = () => {
|
|
32
|
-
if (closed) {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
const res = orginPress();
|
|
36
|
-
if (res && res.then) {
|
|
37
|
-
res.then(() => {
|
|
38
|
-
closed = true;
|
|
39
|
-
close();
|
|
40
|
-
}).catch(() => {});
|
|
41
|
-
} else {
|
|
42
|
-
closed = true;
|
|
43
|
-
close();
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
return button;
|
|
47
|
-
});
|
|
48
|
-
function onWrapTouchStart(e) {
|
|
49
|
-
if (!/iPhone|iPod|iPad/i.test(navigator.userAgent)) {
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
const pNode = (0, _closest.default)(e.target, '.am-modal-footer');
|
|
53
|
-
if (!pNode) {
|
|
54
|
-
e.preventDefault();
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
ReactDOM.render( /*#__PURE__*/React.createElement(_modal.default, {
|
|
58
|
-
visible: true,
|
|
59
|
-
operation: true,
|
|
60
|
-
transparent: true,
|
|
61
|
-
prefixCls: prefixCls,
|
|
62
|
-
transitionName: "am-zoom",
|
|
63
|
-
closable: false,
|
|
64
|
-
maskClosable: true,
|
|
65
|
-
onClose: close,
|
|
66
|
-
footer: footer,
|
|
67
|
-
maskTransitionName: "am-fade",
|
|
68
|
-
className: "am-modal-operation",
|
|
69
|
-
platform: platform,
|
|
70
|
-
wrapProps: {
|
|
71
|
-
onTouchStart: onWrapTouchStart
|
|
72
|
-
}
|
|
73
|
-
}), div);
|
|
74
|
-
return {
|
|
75
|
-
close
|
|
76
|
-
};
|
|
77
|
-
}
|
package/lib/Modal/prompt.js
DELETED
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = prompt;
|
|
9
|
-
var React = _interopRequireWildcard(require("react"));
|
|
10
|
-
var ReactDOM = _interopRequireWildcard(require("react-dom"));
|
|
11
|
-
var _closest = _interopRequireDefault(require("../_util/closest"));
|
|
12
|
-
var _modal = _interopRequireDefault(require("./modal"));
|
|
13
|
-
function prompt(title, message, callbackOrActions) {
|
|
14
|
-
let type = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'default';
|
|
15
|
-
let defaultValue = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : '';
|
|
16
|
-
let placeholders = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : ['', ''];
|
|
17
|
-
let platform = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : 'ios';
|
|
18
|
-
let closed = false;
|
|
19
|
-
defaultValue = typeof defaultValue === 'string' ? defaultValue : typeof defaultValue === 'number' ? "".concat(defaultValue) : '';
|
|
20
|
-
if (!callbackOrActions) {
|
|
21
|
-
// console.log('Must specify callbackOrActions');
|
|
22
|
-
return {
|
|
23
|
-
close: () => {}
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
const prefixCls = 'am-modal';
|
|
27
|
-
const data = {
|
|
28
|
-
text: defaultValue
|
|
29
|
-
};
|
|
30
|
-
function onChange(e) {
|
|
31
|
-
const target = e.target;
|
|
32
|
-
const inputType = target.getAttribute('type');
|
|
33
|
-
if (inputType !== null) {
|
|
34
|
-
data[inputType] = target.value;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// hotfix issue: https://github.com/ant-design/ant-design-mobile/issues/2177
|
|
39
|
-
function onClick(e) {
|
|
40
|
-
const target = e.currentTarget || e.target;
|
|
41
|
-
if (target) {
|
|
42
|
-
target.focus();
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
function onBlurFixWechat() {
|
|
46
|
-
// https://github.com/ant-design/ant-design-mobile/issues/3137
|
|
47
|
-
if (/MicroMessenger/.test(navigator.userAgent)) {
|
|
48
|
-
// eslint-disable-next-line no-self-assign
|
|
49
|
-
document.body.scrollTop = document.body.scrollTop;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
let inputDom;
|
|
53
|
-
const focusFn = input => {
|
|
54
|
-
setTimeout(() => {
|
|
55
|
-
if (input) {
|
|
56
|
-
input.focus();
|
|
57
|
-
}
|
|
58
|
-
}, 500);
|
|
59
|
-
};
|
|
60
|
-
switch (type) {
|
|
61
|
-
case 'login-password':
|
|
62
|
-
inputDom = /*#__PURE__*/React.createElement("div", {
|
|
63
|
-
className: "".concat(prefixCls, "-input-container")
|
|
64
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
65
|
-
className: "".concat(prefixCls, "-input")
|
|
66
|
-
}, /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("input", {
|
|
67
|
-
type: "text",
|
|
68
|
-
defaultValue: data.text,
|
|
69
|
-
ref: input => focusFn(input),
|
|
70
|
-
onClick: onClick,
|
|
71
|
-
onChange: onChange,
|
|
72
|
-
placeholder: placeholders[0],
|
|
73
|
-
onBlur: onBlurFixWechat
|
|
74
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
75
|
-
className: "".concat(prefixCls, "-input")
|
|
76
|
-
}, /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("input", {
|
|
77
|
-
type: "password",
|
|
78
|
-
defaultValue: data.password,
|
|
79
|
-
onClick: onClick,
|
|
80
|
-
onChange: onChange,
|
|
81
|
-
placeholder: placeholders[1],
|
|
82
|
-
onBlur: onBlurFixWechat
|
|
83
|
-
}))));
|
|
84
|
-
break;
|
|
85
|
-
case 'secure-text':
|
|
86
|
-
inputDom = /*#__PURE__*/React.createElement("div", {
|
|
87
|
-
className: "".concat(prefixCls, "-input-container")
|
|
88
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
89
|
-
className: "".concat(prefixCls, "-input")
|
|
90
|
-
}, /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("input", {
|
|
91
|
-
type: "password",
|
|
92
|
-
defaultValue: data.password,
|
|
93
|
-
ref: input => focusFn(input),
|
|
94
|
-
onClick: onClick,
|
|
95
|
-
onChange: onChange,
|
|
96
|
-
placeholder: placeholders[0],
|
|
97
|
-
onBlur: onBlurFixWechat
|
|
98
|
-
}))));
|
|
99
|
-
break;
|
|
100
|
-
case 'default':
|
|
101
|
-
default:
|
|
102
|
-
inputDom = /*#__PURE__*/React.createElement("div", {
|
|
103
|
-
className: "".concat(prefixCls, "-input-container")
|
|
104
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
105
|
-
className: "".concat(prefixCls, "-input")
|
|
106
|
-
}, /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("input", {
|
|
107
|
-
type: "text",
|
|
108
|
-
defaultValue: data.text,
|
|
109
|
-
ref: input => focusFn(input),
|
|
110
|
-
onClick: onClick,
|
|
111
|
-
onChange: onChange,
|
|
112
|
-
placeholder: placeholders[0],
|
|
113
|
-
onBlur: onBlurFixWechat
|
|
114
|
-
}))));
|
|
115
|
-
}
|
|
116
|
-
const content = /*#__PURE__*/React.createElement("div", null, message, inputDom);
|
|
117
|
-
const div = document.createElement('div');
|
|
118
|
-
document.body.appendChild(div);
|
|
119
|
-
function close() {
|
|
120
|
-
ReactDOM.unmountComponentAtNode(div);
|
|
121
|
-
if (div && div.parentNode) {
|
|
122
|
-
div.parentNode.removeChild(div);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
function handleConfirm(callback) {
|
|
126
|
-
if (typeof callback !== 'function') {
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
const {
|
|
130
|
-
text = '',
|
|
131
|
-
password = ''
|
|
132
|
-
} = data;
|
|
133
|
-
const callbackArgs = type === 'login-password' ? [text, password] : type === 'secure-text' ? [password] : [text];
|
|
134
|
-
return callback(...callbackArgs);
|
|
135
|
-
}
|
|
136
|
-
let actions;
|
|
137
|
-
if (typeof callbackOrActions === 'function') {
|
|
138
|
-
actions = [{
|
|
139
|
-
text: '取消',
|
|
140
|
-
onPress: () => {}
|
|
141
|
-
}, {
|
|
142
|
-
text: '确定',
|
|
143
|
-
onPress: () => {
|
|
144
|
-
handleConfirm(callbackOrActions);
|
|
145
|
-
}
|
|
146
|
-
}];
|
|
147
|
-
} else {
|
|
148
|
-
actions = callbackOrActions.map(item => {
|
|
149
|
-
return {
|
|
150
|
-
text: item.text,
|
|
151
|
-
onPress: () => {
|
|
152
|
-
return handleConfirm(item.onPress);
|
|
153
|
-
}
|
|
154
|
-
};
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
const footer = actions.map(button => {
|
|
158
|
-
// tslint:disable-next-line:only-arrow-functions
|
|
159
|
-
const orginPress = button.onPress || function () {};
|
|
160
|
-
button.onPress = () => {
|
|
161
|
-
if (closed) {
|
|
162
|
-
return;
|
|
163
|
-
}
|
|
164
|
-
const res = orginPress();
|
|
165
|
-
if (res && res.then) {
|
|
166
|
-
res.then(() => {
|
|
167
|
-
closed = true;
|
|
168
|
-
close();
|
|
169
|
-
}).catch(() => {});
|
|
170
|
-
} else {
|
|
171
|
-
closed = true;
|
|
172
|
-
close();
|
|
173
|
-
}
|
|
174
|
-
};
|
|
175
|
-
return button;
|
|
176
|
-
});
|
|
177
|
-
function onWrapTouchStart(e) {
|
|
178
|
-
// exclude input element for focus
|
|
179
|
-
if (!/iPhone|iPod|iPad/i.test(navigator.userAgent)) {
|
|
180
|
-
return;
|
|
181
|
-
}
|
|
182
|
-
const pNode = (0, _closest.default)(e.target, ".".concat(prefixCls, "-content"));
|
|
183
|
-
if (!pNode) {
|
|
184
|
-
e.preventDefault();
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
ReactDOM.render( /*#__PURE__*/React.createElement(_modal.default, {
|
|
188
|
-
visible: true,
|
|
189
|
-
transparent: true,
|
|
190
|
-
prefixCls: prefixCls,
|
|
191
|
-
title: title,
|
|
192
|
-
closable: false,
|
|
193
|
-
maskClosable: false,
|
|
194
|
-
transitionName: "am-zoom",
|
|
195
|
-
footer: footer,
|
|
196
|
-
maskTransitionName: "am-fade",
|
|
197
|
-
platform: platform,
|
|
198
|
-
wrapProps: {
|
|
199
|
-
onTouchStart: onWrapTouchStart
|
|
200
|
-
}
|
|
201
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
202
|
-
className: "".concat(prefixCls, "-propmt-content")
|
|
203
|
-
}, content)), div);
|
|
204
|
-
return {
|
|
205
|
-
close
|
|
206
|
-
};
|
|
207
|
-
}
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
exports.getDefaultProps = getDefaultProps;
|
|
10
|
-
var _arrayTreeFilter = _interopRequireDefault(require("array-tree-filter"));
|
|
11
|
-
var React = _interopRequireWildcard(require("react"));
|
|
12
|
-
var _Cascader = _interopRequireDefault(require("rmc-cascader/lib/Cascader"));
|
|
13
|
-
var _Popup = _interopRequireDefault(require("rmc-cascader/lib/Popup"));
|
|
14
|
-
var _MultiPicker = _interopRequireDefault(require("rmc-picker/lib/MultiPicker"));
|
|
15
|
-
var _Picker = _interopRequireDefault(require("rmc-picker/lib/Picker"));
|
|
16
|
-
var _getLocale = require("../_util/getLocale");
|
|
17
|
-
/* tslint:disable:jsx-no-multiline-js */
|
|
18
|
-
|
|
19
|
-
function getDefaultProps() {
|
|
20
|
-
const defaultFormat = values => {
|
|
21
|
-
// label is JSX.Element or other
|
|
22
|
-
if (values.length > 0 && typeof values[0] !== 'string') {
|
|
23
|
-
return values;
|
|
24
|
-
}
|
|
25
|
-
return values.join(',');
|
|
26
|
-
};
|
|
27
|
-
return {
|
|
28
|
-
triggerType: 'onClick',
|
|
29
|
-
prefixCls: 'am-picker',
|
|
30
|
-
pickerPrefixCls: 'am-picker-col',
|
|
31
|
-
popupPrefixCls: 'am-picker-popup',
|
|
32
|
-
format: defaultFormat,
|
|
33
|
-
cols: 3,
|
|
34
|
-
cascade: true,
|
|
35
|
-
title: ''
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
class AbstractPicker extends React.Component {
|
|
39
|
-
constructor() {
|
|
40
|
-
super(...arguments);
|
|
41
|
-
this.getSel = () => {
|
|
42
|
-
const value = this.props.value || [];
|
|
43
|
-
let treeChildren;
|
|
44
|
-
const {
|
|
45
|
-
data
|
|
46
|
-
} = this.props;
|
|
47
|
-
if (this.props.cascade) {
|
|
48
|
-
treeChildren = (0, _arrayTreeFilter.default)(data, (c, level) => {
|
|
49
|
-
return c.value === value[level];
|
|
50
|
-
});
|
|
51
|
-
} else {
|
|
52
|
-
treeChildren = value.map((v, i) => {
|
|
53
|
-
return data[i].filter(d => d.value === v)[0];
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
return this.props.format && this.props.format(treeChildren.map(v => {
|
|
57
|
-
return v.label;
|
|
58
|
-
}));
|
|
59
|
-
};
|
|
60
|
-
this.getPickerCol = () => {
|
|
61
|
-
const {
|
|
62
|
-
data,
|
|
63
|
-
pickerPrefixCls,
|
|
64
|
-
itemStyle,
|
|
65
|
-
indicatorStyle
|
|
66
|
-
} = this.props;
|
|
67
|
-
return data.map((col, index) => {
|
|
68
|
-
return /*#__PURE__*/React.createElement(_Picker.default, {
|
|
69
|
-
key: index,
|
|
70
|
-
prefixCls: pickerPrefixCls,
|
|
71
|
-
style: {
|
|
72
|
-
flex: 1
|
|
73
|
-
},
|
|
74
|
-
itemStyle: itemStyle,
|
|
75
|
-
indicatorStyle: indicatorStyle
|
|
76
|
-
}, col.map(item => {
|
|
77
|
-
return /*#__PURE__*/React.createElement(_Picker.default.Item, {
|
|
78
|
-
key: item.value,
|
|
79
|
-
value: item.value
|
|
80
|
-
}, item.label);
|
|
81
|
-
}));
|
|
82
|
-
});
|
|
83
|
-
};
|
|
84
|
-
this.onOk = v => {
|
|
85
|
-
if (this.scrollValue !== undefined) {
|
|
86
|
-
v = this.scrollValue;
|
|
87
|
-
}
|
|
88
|
-
if (this.props.onChange) {
|
|
89
|
-
this.props.onChange(v);
|
|
90
|
-
}
|
|
91
|
-
if (this.props.onOk) {
|
|
92
|
-
this.props.onOk(v);
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
this.setScrollValue = v => {
|
|
96
|
-
this.scrollValue = v;
|
|
97
|
-
};
|
|
98
|
-
this.setCasecadeScrollValue = v => {
|
|
99
|
-
// 级联情况下保证数据正确性,滚动过程中只有当最后一级变化时才变更数据
|
|
100
|
-
if (v && this.scrollValue) {
|
|
101
|
-
const length = this.scrollValue.length;
|
|
102
|
-
if (length === v.length && this.scrollValue[length - 1] === v[length - 1]) {
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
this.setScrollValue(v);
|
|
107
|
-
};
|
|
108
|
-
this.fixOnOk = cascader => {
|
|
109
|
-
if (cascader && cascader.onOk !== this.onOk) {
|
|
110
|
-
cascader.onOk = this.onOk;
|
|
111
|
-
cascader.forceUpdate();
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
this.onPickerChange = v => {
|
|
115
|
-
this.setScrollValue(v);
|
|
116
|
-
if (this.props.onPickerChange) {
|
|
117
|
-
this.props.onPickerChange(v);
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
|
-
this.onVisibleChange = visible => {
|
|
121
|
-
this.setScrollValue(undefined);
|
|
122
|
-
if (this.props.onVisibleChange) {
|
|
123
|
-
this.props.onVisibleChange(visible);
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
render() {
|
|
128
|
-
const {
|
|
129
|
-
children,
|
|
130
|
-
value = [],
|
|
131
|
-
popupPrefixCls,
|
|
132
|
-
itemStyle,
|
|
133
|
-
indicatorStyle,
|
|
134
|
-
okText,
|
|
135
|
-
dismissText,
|
|
136
|
-
extra,
|
|
137
|
-
cascade,
|
|
138
|
-
prefixCls,
|
|
139
|
-
pickerPrefixCls,
|
|
140
|
-
data,
|
|
141
|
-
cols,
|
|
142
|
-
onOk,
|
|
143
|
-
...restProps
|
|
144
|
-
} = this.props;
|
|
145
|
-
|
|
146
|
-
// tslint:disable-next-line:variable-name
|
|
147
|
-
const _locale = (0, _getLocale.getComponentLocale)(this.props, this.context, 'Picker', () => require('./locale/zh_CN'));
|
|
148
|
-
let cascader;
|
|
149
|
-
let popupMoreProps = {};
|
|
150
|
-
if (cascade) {
|
|
151
|
-
cascader = /*#__PURE__*/React.createElement(_Cascader.default, {
|
|
152
|
-
prefixCls: prefixCls,
|
|
153
|
-
pickerPrefixCls: pickerPrefixCls,
|
|
154
|
-
data: data,
|
|
155
|
-
cols: cols,
|
|
156
|
-
onChange: this.onPickerChange,
|
|
157
|
-
onScrollChange: this.setCasecadeScrollValue,
|
|
158
|
-
pickerItemStyle: itemStyle,
|
|
159
|
-
indicatorStyle: indicatorStyle
|
|
160
|
-
});
|
|
161
|
-
} else {
|
|
162
|
-
cascader = /*#__PURE__*/React.createElement(_MultiPicker.default, {
|
|
163
|
-
style: {
|
|
164
|
-
flexDirection: 'row',
|
|
165
|
-
alignItems: 'center'
|
|
166
|
-
},
|
|
167
|
-
prefixCls: prefixCls,
|
|
168
|
-
onScrollChange: this.setScrollValue
|
|
169
|
-
}, this.getPickerCol());
|
|
170
|
-
popupMoreProps = {
|
|
171
|
-
pickerValueProp: 'selectedValue',
|
|
172
|
-
pickerValueChangeProp: 'onValueChange'
|
|
173
|
-
};
|
|
174
|
-
}
|
|
175
|
-
return /*#__PURE__*/React.createElement(_Popup.default, Object.assign({
|
|
176
|
-
cascader: cascader
|
|
177
|
-
}, this.popupProps, restProps, {
|
|
178
|
-
prefixCls: popupPrefixCls,
|
|
179
|
-
value: value,
|
|
180
|
-
dismissText: dismissText || _locale.dismissText,
|
|
181
|
-
okText: okText || _locale.okText
|
|
182
|
-
}, popupMoreProps, {
|
|
183
|
-
ref: this.fixOnOk,
|
|
184
|
-
onVisibleChange: this.onVisibleChange
|
|
185
|
-
}), children && typeof children !== 'string' && /*#__PURE__*/React.isValidElement(children) && /*#__PURE__*/React.cloneElement(children, {
|
|
186
|
-
extra: this.getSel() || extra || _locale.extra
|
|
187
|
-
}));
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
exports.default = AbstractPicker;
|
package/lib/Picker/index.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.nonsense = exports.default = void 0;
|
|
9
|
-
var React = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _AbstractPicker = _interopRequireWildcard(require("./AbstractPicker"));
|
|
11
|
-
var PropTypes = _interopRequireWildcard(require("prop-types"));
|
|
12
|
-
var _popupProps = _interopRequireDefault(require("./popupProps"));
|
|
13
|
-
require("./style/index.css");
|
|
14
|
-
// TODO:
|
|
15
|
-
// fix error TS4026:Public static property 'defaultProps' of exported class has or is using name 'React.ReactElement'
|
|
16
|
-
// fix error TS6133: 'React' is declared but its value is never read.
|
|
17
|
-
const nonsense = exports.nonsense = /*#__PURE__*/React.createElement("div", null);
|
|
18
|
-
class Picker extends _AbstractPicker.default {
|
|
19
|
-
constructor() {
|
|
20
|
-
super(...arguments);
|
|
21
|
-
this.popupProps = _popupProps.default;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
exports.default = Picker;
|
|
25
|
-
Picker.defaultProps = (0, _AbstractPicker.getDefaultProps)();
|
|
26
|
-
Picker.contextTypes = {
|
|
27
|
-
antLocale: PropTypes.object
|
|
28
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
// eslint-disable-next-line import/no-anonymous-default-export
|
|
8
|
-
var _default = exports.default = {
|
|
9
|
-
okText: 'Ok',
|
|
10
|
-
dismissText: 'Cancel',
|
|
11
|
-
extra: 'please select'
|
|
12
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
// eslint-disable-next-line import/no-anonymous-default-export
|
|
8
|
-
var _default = exports.default = {
|
|
9
|
-
okText: 'Ок',
|
|
10
|
-
dismissText: 'Отмена',
|
|
11
|
-
extra: ''
|
|
12
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
// eslint-disable-next-line import/no-anonymous-default-export
|
|
8
|
-
var _default = exports.default = {
|
|
9
|
-
okText: 'Ok',
|
|
10
|
-
dismissText: 'Avbryt',
|
|
11
|
-
extra: 'vänligen välj'
|
|
12
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
// eslint-disable-next-line import/no-anonymous-default-export
|
|
8
|
-
var _default = exports.default = {
|
|
9
|
-
okText: '确定',
|
|
10
|
-
dismissText: '取消',
|
|
11
|
-
extra: '请选择'
|
|
12
|
-
};
|
package/lib/Picker/popupProps.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
const popupProps = {
|
|
8
|
-
WrapComponent: 'div',
|
|
9
|
-
transitionName: 'am-slide-up',
|
|
10
|
-
maskTransitionName: 'am-fade'
|
|
11
|
-
};
|
|
12
|
-
var _default = exports.default = popupProps;
|