amis-ui 3.1.1 → 3.3.0
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/esm/components/404.js +1 -1
- package/esm/components/Alert.d.ts +122 -122
- package/esm/components/Alert.js +55 -17
- package/esm/components/Alert2.d.ts +20 -20
- package/esm/components/Alert2.js +5 -8
- package/esm/components/AnchorNav.d.ts +20 -20
- package/esm/components/AnchorNav.js +1 -1
- package/esm/components/ArrayInput.d.ts +40 -40
- package/esm/components/ArrayInput.js +1 -1
- package/esm/components/AsideNav.js +1 -1
- package/esm/components/AssociatedSelection.d.ts +120 -120
- package/esm/components/AssociatedSelection.js +1 -1
- package/esm/components/Avatar.d.ts +102 -101
- package/esm/components/Avatar.js +4 -3
- package/esm/components/Badge.d.ts +1 -1
- package/esm/components/Badge.js +1 -1
- package/esm/components/BaiduMapPicker.js +27 -23
- package/esm/components/BarCode.js +1 -1
- package/esm/components/Breadcrumb.js +5 -9
- package/esm/components/Button.d.ts +20 -20
- package/esm/components/Button.js +1 -1
- package/esm/components/CalendarMobile.d.ts +41 -40
- package/esm/components/CalendarMobile.js +21 -5
- package/esm/components/Card.d.ts +100 -100
- package/esm/components/Card.js +1 -1
- package/esm/components/Cascader.d.ts +4 -3
- package/esm/components/Cascader.js +106 -105
- package/esm/components/ChainedDropdownSelection.d.ts +559 -0
- package/esm/components/ChainedDropdownSelection.js +104 -0
- package/esm/components/ChainedSelection.d.ts +120 -120
- package/esm/components/ChainedSelection.js +1 -1
- package/esm/components/Checkbox.d.ts +11 -10
- package/esm/components/Checkbox.js +3 -2
- package/esm/components/CityArea.js +3 -3
- package/esm/components/CityDB.js +1 -1
- package/esm/components/CodeMirror.js +1 -1
- package/esm/components/Collapse.d.ts +162 -140
- package/esm/components/Collapse.js +11 -7
- package/esm/components/CollapseGroup.d.ts +53 -31
- package/esm/components/CollapseGroup.js +19 -14
- package/esm/components/ColorPicker.d.ts +84 -80
- package/esm/components/ColorPicker.js +32 -5
- package/esm/components/Combo.js +1 -1
- package/esm/components/ConfirmBox.d.ts +82 -81
- package/esm/components/ConfirmBox.js +11 -4
- package/esm/components/ContextMenu.d.ts +2 -2
- package/esm/components/ContextMenu.js +25 -10
- package/esm/components/DatePicker.d.ts +85 -81
- package/esm/components/DatePicker.js +9 -6
- package/esm/components/DateRangePicker.d.ts +120 -120
- package/esm/components/DateRangePicker.js +38 -17
- package/esm/components/DndContainer.js +1 -1
- package/esm/components/Drawer.d.ts +30 -30
- package/esm/components/Drawer.js +1 -1
- package/esm/components/DropDownSelection.d.ts +555 -0
- package/esm/components/DropDownSelection.js +77 -0
- package/esm/components/Editor.d.ts +120 -120
- package/esm/components/Editor.js +1 -1
- package/esm/components/Form.js +1 -1
- package/esm/components/FormField.js +1 -1
- package/esm/components/GaodeMapPicker.js +1 -1
- package/esm/components/GridNav.js +1 -1
- package/esm/components/GroupedSelection.d.ts +120 -120
- package/esm/components/GroupedSelection.js +1 -1
- package/esm/components/Html.js +1 -1
- package/esm/components/ImageGallery.d.ts +40 -40
- package/esm/components/ImageGallery.js +1 -1
- package/esm/components/Input.js +1 -1
- package/esm/components/InputBox.d.ts +11 -10
- package/esm/components/InputBox.js +5 -3
- package/esm/components/InputBoxWithSuggestion.d.ts +1 -0
- package/esm/components/InputBoxWithSuggestion.js +4 -4
- package/esm/components/InputTable.js +3 -3
- package/esm/components/Layout.d.ts +10 -10
- package/esm/components/Layout.js +1 -1
- package/esm/components/Link.js +5 -4
- package/esm/components/ListGroup.d.ts +10 -10
- package/esm/components/ListGroup.js +1 -1
- package/esm/components/ListMenu.d.ts +81 -80
- package/esm/components/ListMenu.js +6 -5
- package/esm/components/LocationPicker.d.ts +44 -40
- package/esm/components/LocationPicker.js +35 -8
- package/esm/components/Markdown.js +1 -1
- package/esm/components/Modal.d.ts +80 -80
- package/esm/components/Modal.js +1 -1
- package/esm/components/ModalManager.js +1 -1
- package/esm/components/MonthRangePicker.d.ts +120 -120
- package/esm/components/MultilineText.d.ts +40 -40
- package/esm/components/MultilineText.js +1 -1
- package/esm/components/NumberInput.d.ts +22 -25
- package/esm/components/NumberInput.js +14 -7
- package/esm/components/Pagination.d.ts +86 -81
- package/esm/components/Pagination.js +13 -4
- package/esm/components/Picker.js +3 -3
- package/esm/components/PickerColumn.d.ts +1 -1
- package/esm/components/PickerColumn.js +2 -2
- package/esm/components/PickerContainer.d.ts +1 -0
- package/esm/components/PickerContainer.js +4 -4
- package/esm/components/PopOverContainer.d.ts +3 -0
- package/esm/components/PopOverContainer.js +14 -3
- package/esm/components/PopUp.d.ts +120 -120
- package/esm/components/PopUp.js +3 -3
- package/esm/components/Progress.d.ts +30 -30
- package/esm/components/Progress.js +1 -1
- package/esm/components/PullRefresh.js +1 -1
- package/esm/components/Radios.d.ts +11 -10
- package/esm/components/Radios.js +7 -6
- package/esm/components/Range.d.ts +2 -1
- package/esm/components/Range.js +67 -16
- package/esm/components/Rating.d.ts +20 -20
- package/esm/components/Rating.js +2 -2
- package/esm/components/ResultBox.d.ts +83 -41
- package/esm/components/ResultBox.js +6 -5
- package/esm/components/ResultList.d.ts +40 -40
- package/esm/components/ResultList.js +2 -2
- package/esm/components/ResultTableList.d.ts +120 -120
- package/esm/components/ResultTableList.js +1 -1
- package/esm/components/ResultTreeList.d.ts +40 -40
- package/esm/components/ResultTreeList.js +4 -2
- package/esm/components/RichText.js +1 -1
- package/esm/components/SearchBox.d.ts +83 -82
- package/esm/components/SearchBox.js +8 -7
- package/esm/components/Select.d.ts +1353 -1353
- package/esm/components/Select.js +16 -9
- package/esm/components/SelectMobile.d.ts +37 -0
- package/esm/components/SelectMobile.js +362 -0
- package/esm/components/Selection.d.ts +120 -120
- package/esm/components/Selection.js +1 -1
- package/esm/components/SparkLine.d.ts +40 -40
- package/esm/components/SparkLine.js +1 -1
- package/esm/components/Spinner.d.ts +50 -50
- package/esm/components/Spinner.js +4 -4
- package/esm/components/Steps.js +1 -1
- package/esm/components/Switch.d.ts +10 -10
- package/esm/components/Switch.js +1 -1
- package/esm/components/TableSelection.d.ts +120 -120
- package/esm/components/TableSelection.js +3 -2
- package/esm/components/Tabs.d.ts +92 -80
- package/esm/components/Tabs.js +88 -13
- package/esm/components/TabsTransfer.d.ts +41 -40
- package/esm/components/TabsTransfer.js +7 -6
- package/esm/components/TabsTransferPicker.d.ts +2 -0
- package/esm/components/TabsTransferPicker.js +8 -8
- package/esm/components/Tag.d.ts +80 -80
- package/esm/components/Tag.js +5 -10
- package/esm/components/Textarea.d.ts +41 -40
- package/esm/components/Textarea.js +1 -1
- package/esm/components/Timeline.js +1 -1
- package/esm/components/TimelineItem.d.ts +1 -1
- package/esm/components/TimelineItem.js +4 -3
- package/esm/components/Tinymce.d.ts +1 -0
- package/esm/components/Tinymce.js +7 -3
- package/esm/components/TitleBar.js +1 -1
- package/esm/components/Toast.d.ts +80 -80
- package/esm/components/Toast.js +1 -1
- package/esm/components/Tooltip.js +1 -1
- package/esm/components/TooltipWrapper.d.ts +31 -31
- package/esm/components/TooltipWrapper.js +1 -1
- package/esm/components/Transfer.d.ts +134 -132
- package/esm/components/Transfer.js +26 -16
- package/esm/components/TransferDropDown.d.ts +124 -120
- package/esm/components/TransferDropDown.js +52 -18
- package/esm/components/TransferPicker.d.ts +2 -0
- package/esm/components/TransferPicker.js +8 -8
- package/esm/components/TransferSearch.js +3 -3
- package/esm/components/Tree.d.ts +161 -160
- package/esm/components/Tree.js +58 -23
- package/esm/components/TreeSelection.d.ts +120 -120
- package/esm/components/TreeSelection.js +3 -3
- package/esm/components/UserSelect.d.ts +40 -40
- package/esm/components/UserSelect.js +17 -9
- package/esm/components/UserTabSelect.d.ts +40 -40
- package/esm/components/UserTabSelect.js +1 -1
- package/esm/components/WithRemoteConfig.js +7 -7
- package/esm/components/WithStore.js +1 -1
- package/esm/components/calendar/Calendar.d.ts +2 -0
- package/esm/components/calendar/Calendar.js +8 -4
- package/esm/components/calendar/CalendarContainer.js +1 -1
- package/esm/components/calendar/DaysView.d.ts +3 -0
- package/esm/components/calendar/DaysView.js +17 -5
- package/esm/components/calendar/MonthsView.js +1 -1
- package/esm/components/calendar/QuartersView.d.ts +11 -0
- package/esm/components/calendar/QuartersView.js +47 -5
- package/esm/components/calendar/TimeView.js +4 -2
- package/esm/components/calendar/YearsView.js +1 -1
- package/esm/components/condition-builder/Expression.d.ts +1 -1
- package/esm/components/condition-builder/Expression.js +1 -1
- package/esm/components/condition-builder/Field.d.ts +3 -7
- package/esm/components/condition-builder/Field.js +14 -72
- package/esm/components/condition-builder/Formula.js +2 -2
- package/esm/components/condition-builder/Func.js +2 -2
- package/esm/components/condition-builder/Group.d.ts +10 -1
- package/esm/components/condition-builder/Group.js +9 -5
- package/esm/components/condition-builder/GroupOrItem.d.ts +10 -1
- package/esm/components/condition-builder/GroupOrItem.js +9 -6
- package/esm/components/condition-builder/InputSwitch.js +1 -1
- package/esm/components/condition-builder/Item.d.ts +1 -1
- package/esm/components/condition-builder/Item.js +5 -6
- package/esm/components/condition-builder/Value.js +13 -8
- package/esm/components/condition-builder/config.js +1 -1
- package/esm/components/condition-builder/index.d.ts +10 -1
- package/esm/components/condition-builder/index.js +8 -4
- package/esm/components/formula/Editor.d.ts +57 -40
- package/esm/components/formula/Editor.js +124 -24
- package/esm/components/formula/FuncList.js +24 -10
- package/esm/components/formula/Input.d.ts +272 -0
- package/esm/components/formula/Input.js +115 -0
- package/esm/components/formula/Picker.d.ts +64 -45
- package/esm/components/formula/Picker.js +120 -28
- package/esm/components/formula/VariableList.d.ts +1 -0
- package/esm/components/formula/VariableList.js +127 -23
- package/esm/components/formula/plugin.d.ts +4 -2
- package/esm/components/formula/plugin.js +49 -25
- package/esm/components/icons.d.ts +11 -2
- package/esm/components/icons.js +64 -22
- package/esm/components/json-schema/Array.js +6 -4
- package/esm/components/json-schema/Item.js +4 -4
- package/esm/components/json-schema/Object.js +9 -5
- package/esm/components/json-schema/index.d.ts +1 -0
- package/esm/components/json-schema/index.js +1 -1
- package/esm/components/menu/MenuContext.js +1 -1
- package/esm/components/menu/MenuItem.js +3 -2
- package/esm/components/menu/SubMenu.js +3 -3
- package/esm/components/menu/index.d.ts +65 -60
- package/esm/components/menu/index.js +34 -14
- package/esm/components/schema-editor/Array.js +3 -3
- package/esm/components/schema-editor/Common.d.ts +1 -0
- package/esm/components/schema-editor/Common.js +7 -7
- package/esm/components/schema-editor/Item.d.ts +1 -0
- package/esm/components/schema-editor/Item.js +1 -1
- package/esm/components/schema-editor/Object.js +5 -5
- package/esm/components/schema-editor/SchemaVariableList.js +1 -1
- package/esm/components/schema-editor/SchemaVariableListPicker.js +1 -1
- package/esm/components/schema-editor/index.d.ts +41 -40
- package/esm/components/schema-editor/index.js +3 -3
- package/esm/components/table/Cell.d.ts +80 -80
- package/esm/components/table/Cell.js +1 -1
- package/esm/components/table/HeadCellDropDown.js +1 -1
- package/esm/components/table/HeadCellFilter.d.ts +40 -40
- package/esm/components/table/HeadCellFilter.js +1 -1
- package/esm/components/table/HeadCellSelect.d.ts +40 -40
- package/esm/components/table/HeadCellSelect.js +1 -1
- package/esm/components/table/HeadCellSort.d.ts +5 -2
- package/esm/components/table/HeadCellSort.js +11 -11
- package/esm/components/table/ItemActionsWrapper.js +1 -1
- package/esm/components/table/index.d.ts +121 -121
- package/esm/components/table/index.js +1 -1
- package/esm/components/virtual-list/AutoSizer.js +1 -1
- package/esm/components/virtual-list/SizeAndPositionManager.js +1 -1
- package/esm/components/virtual-list/constants.js +1 -1
- package/esm/components/virtual-list/index.js +1 -1
- package/esm/hooks/use-set-state.js +1 -1
- package/esm/hooks/use-sub-form.js +1 -1
- package/esm/hooks/use-touch.js +1 -1
- package/esm/hooks/use-update-effect.js +1 -1
- package/esm/hooks/use-validation-resolver.js +1 -1
- package/esm/icons/alert-danger.svg.js +1 -1
- package/esm/icons/alert-info.svg.js +1 -1
- package/esm/icons/alert-success.svg.js +1 -1
- package/esm/icons/alert-warning.svg.js +1 -1
- package/esm/icons/back.svg.js +1 -1
- package/esm/icons/calendar.svg.js +1 -1
- package/esm/icons/caret.svg.js +1 -1
- package/esm/icons/check.svg.js +1 -1
- package/esm/icons/clock.svg.js +1 -1
- package/esm/icons/close-small.svg.js +1 -1
- package/esm/icons/close.svg.js +1 -1
- package/esm/icons/cloud-upload.svg.js +1 -1
- package/esm/icons/column-filter.svg.js +1 -1
- package/esm/icons/columns.svg.js +1 -1
- package/esm/icons/compress-alt.svg.js +1 -1
- package/esm/icons/copy.svg.js +1 -1
- package/esm/icons/date.svg.js +1 -1
- package/esm/icons/department.svg.js +1 -1
- package/esm/icons/desk-empty.svg.js +1 -1
- package/esm/icons/dot.svg.js +1 -1
- package/esm/icons/down-arrow-bold.svg.js +1 -1
- package/esm/icons/down.svg.js +1 -1
- package/esm/icons/download.svg.js +1 -1
- package/esm/icons/drag-bar.svg.js +1 -1
- package/esm/icons/drag.svg.js +1 -1
- package/esm/icons/edit.svg.js +1 -1
- package/esm/icons/ellipsis-v.svg.js +1 -1
- package/esm/icons/enter.svg.js +1 -1
- package/esm/icons/exchange.svg.js +1 -1
- package/esm/icons/expand-alt.svg.js +1 -1
- package/esm/icons/fail.svg.js +1 -1
- package/esm/icons/file.svg.js +1 -1
- package/esm/icons/filter.svg.js +1 -1
- package/esm/icons/folder.svg.js +1 -1
- package/esm/icons/function.svg.js +15 -8
- package/esm/icons/home.svg.js +1 -1
- package/esm/icons/image.svg.js +1 -1
- package/esm/icons/info-circle.svg.js +1 -1
- package/esm/icons/info.svg.js +1 -1
- package/esm/icons/input-clear.svg.js +1 -1
- package/esm/icons/invisible.svg.js +1 -1
- package/esm/icons/left-arrow.svg.js +1 -1
- package/esm/icons/loading-outline.svg.js +1 -1
- package/esm/icons/location.svg.js +1 -1
- package/esm/icons/menu.svg.js +1 -1
- package/esm/icons/minus.svg.js +1 -1
- package/esm/icons/move.svg.js +1 -1
- package/esm/icons/mute.svg.js +1 -1
- package/esm/icons/new-edit.svg.js +1 -1
- package/esm/icons/pause.svg.js +1 -1
- package/esm/icons/pencil.svg.js +1 -1
- package/esm/icons/play.svg.js +1 -1
- package/esm/icons/plus-cicle.svg.js +1 -1
- package/esm/icons/plus-fine.svg.js +1 -1
- package/esm/icons/plus.svg.js +1 -1
- package/esm/icons/post.svg.js +1 -1
- package/esm/icons/question-mark.svg.js +1 -1
- package/esm/icons/question.svg.js +1 -1
- package/esm/icons/redo.svg.js +1 -1
- package/esm/icons/refresh.svg.js +1 -1
- package/esm/icons/reload.svg.js +1 -1
- package/esm/icons/remove.svg.js +1 -1
- package/esm/icons/retry.svg.js +1 -1
- package/esm/icons/right-arrow-bold.svg.js +1 -1
- package/esm/icons/right-arrow.svg.js +1 -1
- package/esm/icons/right-double-arrow.svg.js +1 -1
- package/esm/icons/role.svg.js +1 -1
- package/esm/icons/rotate-left.svg.js +1 -1
- package/esm/icons/rotate-right.svg.js +1 -1
- package/esm/icons/scale-origin.svg.js +1 -1
- package/esm/icons/schedule.svg.js +1 -1
- package/esm/icons/search.svg.js +1 -1
- package/esm/icons/setting.svg.js +1 -1
- package/esm/icons/slider-handle-icon.svg.js +1 -1
- package/esm/icons/sort-asc.svg.js +1 -1
- package/esm/icons/sort-default.svg.js +1 -1
- package/esm/icons/sort-desc.svg.js +1 -1
- package/esm/icons/star.svg.js +1 -1
- package/esm/icons/status-close.svg.js +1 -1
- package/esm/icons/steps-finsh.svg.js +1 -1
- package/esm/icons/success.svg.js +1 -1
- package/esm/icons/transparent.svg.js +1 -1
- package/esm/icons/trash.svg.js +1 -1
- package/esm/icons/tree-down.svg.js +1 -1
- package/esm/icons/undo.svg.js +1 -1
- package/esm/icons/upload.svg.js +1 -1
- package/esm/icons/user-remove.svg.js +1 -1
- package/esm/icons/view.svg.js +1 -1
- package/esm/icons/volume.svg.js +1 -1
- package/esm/icons/warning-mark.svg.js +1 -1
- package/esm/icons/warning.svg.js +1 -1
- package/esm/icons/window-restore.svg.js +1 -1
- package/esm/icons/zoom-in.svg.js +1 -1
- package/esm/icons/zoom-out.svg.js +1 -1
- package/esm/index.js +1 -1
- package/esm/locale/de-DE.js +7 -2
- package/esm/locale/en-US.js +7 -2
- package/esm/locale/zh-CN.js +8 -3
- package/esm/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +1 -1
- package/esm/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +1 -1
- package/esm/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +1 -1
- package/esm/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +1 -1
- package/esm/node_modules/@babel/runtime/helpers/esm/createClass.js +1 -1
- package/esm/node_modules/@babel/runtime/helpers/esm/createSuper.js +1 -1
- package/esm/node_modules/@babel/runtime/helpers/esm/defineProperty.js +1 -1
- package/esm/node_modules/@babel/runtime/helpers/esm/extends.js +1 -1
- package/esm/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +1 -1
- package/esm/node_modules/@babel/runtime/helpers/esm/inherits.js +1 -1
- package/esm/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +1 -1
- package/esm/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +1 -1
- package/esm/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +1 -1
- package/esm/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +1 -1
- package/esm/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +1 -1
- package/esm/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +1 -1
- package/esm/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +1 -1
- package/esm/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +1 -1
- package/esm/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +1 -1
- package/esm/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +1 -1
- package/esm/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +1 -1
- package/esm/node_modules/@babel/runtime/helpers/esm/typeof.js +1 -1
- package/esm/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +1 -1
- package/esm/node_modules/rc-overflow/es/Item.js +1 -1
- package/esm/node_modules/rc-overflow/es/Overflow.js +4 -3
- package/esm/node_modules/rc-overflow/es/RawItem.js +2 -2
- package/esm/node_modules/rc-overflow/es/context.js +10 -0
- package/esm/node_modules/rc-overflow/es/hooks/channelUpdate.js +1 -1
- package/esm/node_modules/rc-overflow/es/hooks/useEffectState.js +1 -1
- package/esm/node_modules/rc-overflow/es/index.js +1 -1
- package/esm/node_modules/rc-resize-observer/es/Collection.js +1 -1
- package/esm/node_modules/rc-resize-observer/es/SingleObserver/DomWrapper.js +1 -1
- package/esm/node_modules/rc-resize-observer/es/SingleObserver/index.js +1 -1
- package/esm/node_modules/rc-resize-observer/es/index.js +1 -1
- package/esm/node_modules/rc-resize-observer/es/utils/observerUtil.js +1 -1
- package/esm/node_modules/rc-util/es/Children/toArray.js +3 -4
- package/esm/node_modules/rc-util/es/Dom/canUseDom.js +1 -1
- package/esm/node_modules/rc-util/es/Dom/findDOMNode.js +1 -1
- package/esm/node_modules/rc-util/es/hooks/useEvent.js +1 -1
- package/esm/node_modules/rc-util/es/hooks/useLayoutEffect.js +16 -2
- package/esm/node_modules/rc-util/es/raf.js +1 -1
- package/esm/node_modules/rc-util/es/ref.js +3 -4
- package/esm/node_modules/rc-util/es/warning.js +1 -1
- package/esm/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js +1 -1
- package/esm/themes/ang.js +1 -1
- package/esm/themes/antd.js +1 -1
- package/esm/themes/cxd.js +1 -1
- package/esm/themes/dark.js +1 -1
- package/lib/components/404.js +12 -13
- package/lib/components/Alert.d.ts +122 -122
- package/lib/components/Alert.js +64 -27
- package/lib/components/Alert2.d.ts +20 -20
- package/lib/components/Alert2.js +13 -17
- package/lib/components/AnchorNav.d.ts +20 -20
- package/lib/components/AnchorNav.js +10 -12
- package/lib/components/ArrayInput.d.ts +40 -40
- package/lib/components/ArrayInput.js +17 -14
- package/lib/components/AsideNav.d.ts +10 -10
- package/lib/components/AsideNav.js +13 -15
- package/lib/components/AssociatedSelection.d.ts +80 -80
- package/lib/components/AssociatedSelection.js +11 -17
- package/lib/components/Avatar.d.ts +102 -101
- package/lib/components/Avatar.js +10 -6
- package/lib/components/Badge.d.ts +1 -1
- package/lib/components/Badge.js +13 -13
- package/lib/components/BaiduMapPicker.js +41 -34
- package/lib/components/BarCode.js +5 -5
- package/lib/components/Breadcrumb.js +21 -25
- package/lib/components/Button.d.ts +30 -30
- package/lib/components/Button.js +7 -8
- package/lib/components/CalendarMobile.d.ts +81 -80
- package/lib/components/CalendarMobile.js +55 -41
- package/lib/components/Card.d.ts +110 -110
- package/lib/components/Card.js +22 -19
- package/lib/components/Cascader.d.ts +4 -3
- package/lib/components/Cascader.js +114 -114
- package/lib/components/ChainedDropdownSelection.d.ts +559 -0
- package/lib/components/ChainedDropdownSelection.js +116 -0
- package/lib/components/ChainedSelection.d.ts +80 -80
- package/lib/components/ChainedSelection.js +23 -20
- package/lib/components/Checkbox.d.ts +11 -10
- package/lib/components/Checkbox.js +10 -10
- package/lib/components/CityArea.js +10 -11
- package/lib/components/CityDB.js +1 -1
- package/lib/components/CodeMirror.js +5 -2
- package/lib/components/Collapse.d.ts +152 -130
- package/lib/components/Collapse.js +19 -17
- package/lib/components/CollapseGroup.d.ts +53 -31
- package/lib/components/CollapseGroup.js +22 -19
- package/lib/components/ColorPicker.d.ts +84 -80
- package/lib/components/ColorPicker.js +44 -19
- package/lib/components/Combo.js +16 -73
- package/lib/components/ConfirmBox.d.ts +82 -81
- package/lib/components/ConfirmBox.js +31 -21
- package/lib/components/ContextMenu.d.ts +2 -2
- package/lib/components/ContextMenu.js +37 -19
- package/lib/components/DatePicker.d.ts +125 -121
- package/lib/components/DatePicker.js +28 -27
- package/lib/components/DateRangePicker.d.ts +280 -280
- package/lib/components/DateRangePicker.js +67 -48
- package/lib/components/DndContainer.js +6 -8
- package/lib/components/Drawer.d.ts +30 -30
- package/lib/components/Drawer.js +13 -15
- package/lib/components/DropDownSelection.d.ts +555 -0
- package/lib/components/DropDownSelection.js +84 -0
- package/lib/components/Editor.d.ts +40 -40
- package/lib/components/Editor.js +9 -11
- package/lib/components/Form.js +8 -5
- package/lib/components/FormField.js +20 -21
- package/lib/components/GaodeMapPicker.js +10 -7
- package/lib/components/GridNav.js +15 -16
- package/lib/components/GroupedSelection.d.ts +80 -80
- package/lib/components/GroupedSelection.js +22 -19
- package/lib/components/Html.js +5 -7
- package/lib/components/ImageGallery.d.ts +40 -40
- package/lib/components/ImageGallery.js +28 -25
- package/lib/components/Input.js +6 -3
- package/lib/components/InputBox.d.ts +21 -20
- package/lib/components/InputBox.js +11 -6
- package/lib/components/InputBoxWithSuggestion.d.ts +1 -0
- package/lib/components/InputBoxWithSuggestion.js +12 -9
- package/lib/components/InputTable.js +25 -22
- package/lib/components/Layout.d.ts +10 -10
- package/lib/components/Layout.js +13 -26
- package/lib/components/Link.js +8 -4
- package/lib/components/ListGroup.d.ts +10 -10
- package/lib/components/ListGroup.js +8 -5
- package/lib/components/ListMenu.d.ts +81 -80
- package/lib/components/ListMenu.js +14 -10
- package/lib/components/LocationPicker.d.ts +84 -80
- package/lib/components/LocationPicker.js +45 -15
- package/lib/components/Markdown.js +5 -2
- package/lib/components/Modal.d.ts +40 -40
- package/lib/components/Modal.js +15 -17
- package/lib/components/ModalManager.js +1 -1
- package/lib/components/MonthRangePicker.d.ts +200 -200
- package/lib/components/MultilineText.d.ts +40 -40
- package/lib/components/MultilineText.js +9 -6
- package/lib/components/NumberInput.d.ts +32 -35
- package/lib/components/NumberInput.js +20 -10
- package/lib/components/Pagination.d.ts +86 -81
- package/lib/components/Pagination.js +40 -28
- package/lib/components/Picker.js +13 -14
- package/lib/components/PickerColumn.d.ts +1 -1
- package/lib/components/PickerColumn.js +7 -5
- package/lib/components/PickerContainer.d.ts +1 -0
- package/lib/components/PickerContainer.js +8 -5
- package/lib/components/PopOverContainer.d.ts +3 -0
- package/lib/components/PopOverContainer.js +19 -5
- package/lib/components/PopUp.d.ts +80 -80
- package/lib/components/PopUp.js +18 -20
- package/lib/components/Progress.d.ts +80 -80
- package/lib/components/Progress.js +14 -11
- package/lib/components/PullRefresh.js +8 -14
- package/lib/components/Radios.d.ts +41 -40
- package/lib/components/Radios.js +13 -24
- package/lib/components/Range.d.ts +2 -1
- package/lib/components/Range.js +83 -34
- package/lib/components/Rating.d.ts +30 -30
- package/lib/components/Rating.js +14 -15
- package/lib/components/ResultBox.d.ts +123 -81
- package/lib/components/ResultBox.js +34 -30
- package/lib/components/ResultList.d.ts +40 -40
- package/lib/components/ResultList.js +19 -15
- package/lib/components/ResultTableList.d.ts +80 -80
- package/lib/components/ResultTableList.js +13 -13
- package/lib/components/ResultTreeList.d.ts +40 -40
- package/lib/components/ResultTreeList.js +21 -13
- package/lib/components/RichText.js +6 -8
- package/lib/components/SearchBox.d.ts +83 -82
- package/lib/components/SearchBox.js +28 -24
- package/lib/components/Select.d.ts +1933 -1933
- package/lib/components/Select.js +66 -62
- package/lib/components/SelectMobile.d.ts +37 -0
- package/lib/components/SelectMobile.js +374 -0
- package/lib/components/Selection.d.ts +80 -80
- package/lib/components/Selection.js +7 -9
- package/lib/components/SparkLine.d.ts +40 -40
- package/lib/components/SparkLine.js +8 -5
- package/lib/components/Spinner.d.ts +50 -50
- package/lib/components/Spinner.js +13 -16
- package/lib/components/Steps.js +20 -21
- package/lib/components/Switch.d.ts +10 -10
- package/lib/components/Switch.js +8 -10
- package/lib/components/TableSelection.d.ts +80 -80
- package/lib/components/TableSelection.js +35 -29
- package/lib/components/Tabs.d.ts +92 -80
- package/lib/components/Tabs.js +122 -49
- package/lib/components/TabsTransfer.d.ts +41 -40
- package/lib/components/TabsTransfer.js +20 -16
- package/lib/components/TabsTransferPicker.d.ts +2 -0
- package/lib/components/TabsTransferPicker.js +10 -7
- package/lib/components/Tag.d.ts +90 -90
- package/lib/components/Tag.js +12 -17
- package/lib/components/Textarea.d.ts +41 -40
- package/lib/components/Textarea.js +9 -6
- package/lib/components/Timeline.js +6 -7
- package/lib/components/TimelineItem.d.ts +1 -1
- package/lib/components/TimelineItem.js +18 -14
- package/lib/components/Tinymce.d.ts +1 -0
- package/lib/components/Tinymce.js +11 -4
- package/lib/components/TitleBar.js +10 -16
- package/lib/components/Toast.d.ts +120 -120
- package/lib/components/Toast.js +14 -16
- package/lib/components/Tooltip.js +8 -10
- package/lib/components/TooltipWrapper.d.ts +31 -31
- package/lib/components/TooltipWrapper.js +6 -8
- package/lib/components/Transfer.d.ts +174 -172
- package/lib/components/Transfer.js +61 -42
- package/lib/components/TransferDropDown.d.ts +164 -160
- package/lib/components/TransferDropDown.js +59 -26
- package/lib/components/TransferPicker.d.ts +2 -0
- package/lib/components/TransferPicker.js +10 -7
- package/lib/components/TransferSearch.js +10 -6
- package/lib/components/Tree.d.ts +241 -240
- package/lib/components/Tree.js +104 -84
- package/lib/components/TreeSelection.d.ts +80 -80
- package/lib/components/TreeSelection.js +17 -18
- package/lib/components/UserSelect.d.ts +40 -40
- package/lib/components/UserSelect.js +98 -91
- package/lib/components/UserTabSelect.d.ts +40 -40
- package/lib/components/UserTabSelect.js +17 -18
- package/lib/components/WithRemoteConfig.js +11 -8
- package/lib/components/WithStore.js +5 -2
- package/lib/components/calendar/Calendar.d.ts +2 -0
- package/lib/components/calendar/Calendar.js +12 -5
- package/lib/components/calendar/CalendarContainer.js +5 -2
- package/lib/components/calendar/DaysView.d.ts +3 -0
- package/lib/components/calendar/DaysView.js +70 -56
- package/lib/components/calendar/MonthsView.js +18 -15
- package/lib/components/calendar/QuartersView.d.ts +11 -0
- package/lib/components/calendar/QuartersView.js +59 -14
- package/lib/components/calendar/TimeView.js +35 -30
- package/lib/components/calendar/YearsView.js +18 -15
- package/lib/components/condition-builder/Expression.d.ts +1 -1
- package/lib/components/condition-builder/Expression.js +10 -7
- package/lib/components/condition-builder/Field.d.ts +3 -7
- package/lib/components/condition-builder/Field.js +16 -71
- package/lib/components/condition-builder/Formula.js +6 -3
- package/lib/components/condition-builder/Func.js +16 -13
- package/lib/components/condition-builder/Group.d.ts +10 -1
- package/lib/components/condition-builder/Group.js +27 -20
- package/lib/components/condition-builder/GroupOrItem.d.ts +10 -1
- package/lib/components/condition-builder/GroupOrItem.js +19 -13
- package/lib/components/condition-builder/InputSwitch.js +10 -11
- package/lib/components/condition-builder/Item.d.ts +1 -1
- package/lib/components/condition-builder/Item.js +19 -17
- package/lib/components/condition-builder/Value.js +18 -10
- package/lib/components/condition-builder/config.js +1 -1
- package/lib/components/condition-builder/index.d.ts +10 -1
- package/lib/components/condition-builder/index.js +13 -6
- package/lib/components/formula/Editor.d.ts +57 -40
- package/lib/components/formula/Editor.js +128 -25
- package/lib/components/formula/FuncList.js +33 -16
- package/lib/components/formula/Input.d.ts +272 -0
- package/lib/components/formula/Input.js +128 -0
- package/lib/components/formula/Picker.d.ts +64 -45
- package/lib/components/formula/Picker.js +140 -44
- package/lib/components/formula/VariableList.d.ts +1 -0
- package/lib/components/formula/VariableList.js +128 -21
- package/lib/components/formula/plugin.d.ts +4 -2
- package/lib/components/formula/plugin.js +48 -24
- package/lib/components/icons.d.ts +11 -2
- package/lib/components/icons.js +76 -30
- package/lib/components/json-schema/Array.js +18 -13
- package/lib/components/json-schema/Item.js +11 -12
- package/lib/components/json-schema/Object.js +22 -15
- package/lib/components/json-schema/index.d.ts +1 -0
- package/lib/components/json-schema/index.js +6 -7
- package/lib/components/menu/MenuContext.js +1 -1
- package/lib/components/menu/MenuItem.js +18 -19
- package/lib/components/menu/SubMenu.js +19 -21
- package/lib/components/menu/index.d.ts +75 -70
- package/lib/components/menu/index.js +46 -28
- package/lib/components/schema-editor/Array.js +11 -8
- package/lib/components/schema-editor/Common.d.ts +1 -0
- package/lib/components/schema-editor/Common.js +20 -17
- package/lib/components/schema-editor/Item.d.ts +1 -0
- package/lib/components/schema-editor/Item.js +5 -2
- package/lib/components/schema-editor/Object.js +16 -13
- package/lib/components/schema-editor/SchemaVariableList.js +9 -6
- package/lib/components/schema-editor/SchemaVariableListPicker.js +7 -4
- package/lib/components/schema-editor/index.d.ts +41 -40
- package/lib/components/schema-editor/index.js +7 -7
- package/lib/components/table/Cell.d.ts +40 -40
- package/lib/components/table/Cell.js +5 -6
- package/lib/components/table/HeadCellDropDown.js +8 -9
- package/lib/components/table/HeadCellFilter.d.ts +40 -40
- package/lib/components/table/HeadCellFilter.js +12 -13
- package/lib/components/table/HeadCellSelect.d.ts +40 -40
- package/lib/components/table/HeadCellSelect.js +6 -7
- package/lib/components/table/HeadCellSort.d.ts +5 -2
- package/lib/components/table/HeadCellSort.js +19 -20
- package/lib/components/table/ItemActionsWrapper.js +5 -2
- package/lib/components/table/index.d.ts +81 -81
- package/lib/components/table/index.js +62 -63
- package/lib/components/virtual-list/AutoSizer.js +5 -2
- package/lib/components/virtual-list/SizeAndPositionManager.js +1 -1
- package/lib/components/virtual-list/constants.js +1 -1
- package/lib/components/virtual-list/index.js +6 -6
- package/lib/helper.css +159 -0
- package/lib/hooks/use-set-state.js +1 -1
- package/lib/hooks/use-sub-form.js +1 -1
- package/lib/hooks/use-touch.js +1 -1
- package/lib/hooks/use-update-effect.js +1 -1
- package/lib/hooks/use-validation-resolver.js +1 -1
- package/lib/icons/alert-danger.svg.js +7 -24
- package/lib/icons/alert-info.svg.js +7 -24
- package/lib/icons/alert-success.svg.js +7 -24
- package/lib/icons/alert-warning.svg.js +7 -24
- package/lib/icons/back.svg.js +7 -24
- package/lib/icons/calendar.svg.js +11 -28
- package/lib/icons/caret.svg.js +7 -24
- package/lib/icons/check.svg.js +7 -24
- package/lib/icons/clock.svg.js +9 -26
- package/lib/icons/close-small.svg.js +8 -25
- package/lib/icons/close.svg.js +7 -24
- package/lib/icons/cloud-upload.svg.js +7 -24
- package/lib/icons/column-filter.svg.js +7 -24
- package/lib/icons/columns.svg.js +7 -24
- package/lib/icons/compress-alt.svg.js +7 -24
- package/lib/icons/copy.svg.js +9 -26
- package/lib/icons/date.svg.js +9 -26
- package/lib/icons/department.svg.js +12 -29
- package/lib/icons/desk-empty.svg.js +19 -36
- package/lib/icons/dot.svg.js +10 -27
- package/lib/icons/down-arrow-bold.svg.js +7 -24
- package/lib/icons/down.svg.js +7 -24
- package/lib/icons/download.svg.js +7 -24
- package/lib/icons/drag-bar.svg.js +15 -32
- package/lib/icons/drag.svg.js +7 -24
- package/lib/icons/edit.svg.js +7 -24
- package/lib/icons/ellipsis-v.svg.js +7 -24
- package/lib/icons/enter.svg.js +7 -24
- package/lib/icons/exchange.svg.js +7 -24
- package/lib/icons/expand-alt.svg.js +7 -24
- package/lib/icons/fail.svg.js +9 -26
- package/lib/icons/file.svg.js +8 -25
- package/lib/icons/filter.svg.js +7 -24
- package/lib/icons/folder.svg.js +9 -26
- package/lib/icons/function.svg.js +20 -30
- package/lib/icons/home.svg.js +7 -24
- package/lib/icons/image.svg.js +7 -24
- package/lib/icons/info-circle.svg.js +7 -24
- package/lib/icons/info.svg.js +8 -25
- package/lib/icons/input-clear.svg.js +7 -24
- package/lib/icons/invisible.svg.js +7 -24
- package/lib/icons/left-arrow.svg.js +7 -24
- package/lib/icons/loading-outline.svg.js +7 -24
- package/lib/icons/location.svg.js +7 -24
- package/lib/icons/menu.svg.js +7 -24
- package/lib/icons/minus.svg.js +7 -24
- package/lib/icons/move.svg.js +7 -24
- package/lib/icons/mute.svg.js +7 -24
- package/lib/icons/new-edit.svg.js +7 -24
- package/lib/icons/pause.svg.js +7 -24
- package/lib/icons/pencil.svg.js +7 -24
- package/lib/icons/play.svg.js +7 -24
- package/lib/icons/plus-cicle.svg.js +7 -24
- package/lib/icons/plus-fine.svg.js +7 -24
- package/lib/icons/plus.svg.js +7 -24
- package/lib/icons/post.svg.js +12 -29
- package/lib/icons/question-mark.svg.js +8 -25
- package/lib/icons/question.svg.js +7 -24
- package/lib/icons/redo.svg.js +7 -24
- package/lib/icons/refresh.svg.js +7 -24
- package/lib/icons/reload.svg.js +7 -24
- package/lib/icons/remove.svg.js +7 -24
- package/lib/icons/retry.svg.js +9 -26
- package/lib/icons/right-arrow-bold.svg.js +7 -24
- package/lib/icons/right-arrow.svg.js +7 -24
- package/lib/icons/right-double-arrow.svg.js +7 -24
- package/lib/icons/role.svg.js +11 -28
- package/lib/icons/rotate-left.svg.js +8 -25
- package/lib/icons/rotate-right.svg.js +8 -25
- package/lib/icons/scale-origin.svg.js +9 -26
- package/lib/icons/schedule.svg.js +9 -26
- package/lib/icons/search.svg.js +7 -24
- package/lib/icons/setting.svg.js +7 -24
- package/lib/icons/slider-handle-icon.svg.js +7 -24
- package/lib/icons/sort-asc.svg.js +7 -24
- package/lib/icons/sort-default.svg.js +8 -25
- package/lib/icons/sort-desc.svg.js +7 -24
- package/lib/icons/star.svg.js +7 -24
- package/lib/icons/status-close.svg.js +7 -24
- package/lib/icons/steps-finsh.svg.js +7 -24
- package/lib/icons/success.svg.js +9 -26
- package/lib/icons/transparent.svg.js +12 -29
- package/lib/icons/trash.svg.js +7 -24
- package/lib/icons/tree-down.svg.js +7 -24
- package/lib/icons/undo.svg.js +7 -24
- package/lib/icons/upload.svg.js +7 -24
- package/lib/icons/user-remove.svg.js +9 -26
- package/lib/icons/view.svg.js +7 -24
- package/lib/icons/volume.svg.js +8 -25
- package/lib/icons/warning-mark.svg.js +8 -25
- package/lib/icons/warning.svg.js +7 -24
- package/lib/icons/window-restore.svg.js +7 -24
- package/lib/icons/zoom-in.svg.js +7 -24
- package/lib/icons/zoom-out.svg.js +7 -24
- package/lib/index.js +1 -1
- package/lib/locale/de-DE.js +7 -2
- package/lib/locale/en-US.js +7 -2
- package/lib/locale/zh-CN.js +8 -3
- package/lib/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +1 -1
- package/lib/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +1 -1
- package/lib/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +1 -1
- package/lib/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +1 -1
- package/lib/node_modules/@babel/runtime/helpers/esm/createClass.js +1 -1
- package/lib/node_modules/@babel/runtime/helpers/esm/createSuper.js +1 -1
- package/lib/node_modules/@babel/runtime/helpers/esm/defineProperty.js +1 -1
- package/lib/node_modules/@babel/runtime/helpers/esm/extends.js +1 -1
- package/lib/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +1 -1
- package/lib/node_modules/@babel/runtime/helpers/esm/inherits.js +1 -1
- package/lib/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +1 -1
- package/lib/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +1 -1
- package/lib/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +1 -1
- package/lib/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +1 -1
- package/lib/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +1 -1
- package/lib/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +1 -1
- package/lib/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +1 -1
- package/lib/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +1 -1
- package/lib/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +1 -1
- package/lib/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +1 -1
- package/lib/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +1 -1
- package/lib/node_modules/@babel/runtime/helpers/esm/typeof.js +1 -1
- package/lib/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +1 -1
- package/lib/node_modules/rc-overflow/es/Item.js +1 -1
- package/lib/node_modules/rc-overflow/es/Overflow.js +5 -5
- package/lib/node_modules/rc-overflow/es/RawItem.js +7 -7
- package/lib/node_modules/rc-overflow/es/context.js +18 -0
- package/lib/node_modules/rc-overflow/es/hooks/channelUpdate.js +1 -1
- package/lib/node_modules/rc-overflow/es/hooks/useEffectState.js +1 -1
- package/lib/node_modules/rc-overflow/es/index.js +1 -1
- package/lib/node_modules/rc-resize-observer/es/Collection.js +1 -1
- package/lib/node_modules/rc-resize-observer/es/SingleObserver/DomWrapper.js +1 -1
- package/lib/node_modules/rc-resize-observer/es/SingleObserver/index.js +1 -1
- package/lib/node_modules/rc-resize-observer/es/index.js +1 -1
- package/lib/node_modules/rc-resize-observer/es/utils/observerUtil.js +1 -1
- package/lib/node_modules/rc-util/es/Children/toArray.js +3 -4
- package/lib/node_modules/rc-util/es/Dom/canUseDom.js +1 -1
- package/lib/node_modules/rc-util/es/Dom/findDOMNode.js +1 -1
- package/lib/node_modules/rc-util/es/hooks/useEvent.js +1 -1
- package/lib/node_modules/rc-util/es/hooks/useLayoutEffect.js +16 -2
- package/lib/node_modules/rc-util/es/raf.js +1 -1
- package/lib/node_modules/rc-util/es/ref.js +3 -4
- package/lib/node_modules/rc-util/es/warning.js +1 -1
- package/lib/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js +1 -1
- package/lib/packages/amis-ui/scss/helper.scss.js +1 -1
- package/lib/packages/amis-ui/scss/themes/ang.scss.js +1 -1
- package/lib/packages/amis-ui/scss/themes/antd.scss.js +1 -1
- package/lib/packages/amis-ui/scss/themes/cxd.scss.js +1 -1
- package/lib/packages/amis-ui/scss/themes/dark.scss.js +1 -1
- package/lib/packages/amis-ui/scss/themes/default.scss.js +1 -1
- package/lib/themes/ang.css +1280 -691
- package/lib/themes/ang.js +1 -1
- package/lib/themes/antd.css +1280 -691
- package/lib/themes/antd.js +1 -1
- package/lib/themes/cxd.css +1280 -691
- package/lib/themes/cxd.js +1 -1
- package/lib/themes/dark.css +1280 -691
- package/lib/themes/dark.js +1 -1
- package/lib/themes/default.css +1280 -691
- package/package.json +10 -5
- package/scss/_components.scss +20 -9
- package/scss/_mixins.scss +0 -1
- package/scss/_properties.scss +30 -4
- package/scss/_variables.scss +20 -0
- package/scss/base/_common.scss +4 -0
- package/scss/components/_button-group.scss +1 -0
- package/scss/components/_calendar.scss +24 -14
- package/scss/components/_cards.scss +3 -10
- package/scss/components/_cascader.scss +26 -3
- package/scss/components/_city-area.scss +6 -0
- package/scss/components/_collapse-group.scss +11 -1
- package/scss/components/_collapse.scss +34 -1
- package/scss/components/_column-toggler.scss +11 -9
- package/scss/components/_condition-builder.scss +30 -4
- package/scss/components/_crud.scss +22 -12
- package/scss/components/_debug.scss +34 -1
- package/scss/components/_drawer.scss +10 -1
- package/scss/components/_dropdown.scss +13 -9
- package/scss/components/_formula.scss +139 -37
- package/scss/components/_input-box.scss +26 -1
- package/scss/components/_json-schema-editor.scss +2 -2
- package/scss/components/_json-schema.scss +30 -2
- package/scss/components/_list-menu.scss +40 -0
- package/scss/components/_list.scss +3 -10
- package/scss/components/_menu.scss +1 -0
- package/scss/components/_nav.scss +1 -0
- package/scss/components/_panel.scss +1 -1
- package/scss/components/_picker-columns.scss +2 -4
- package/scss/components/_popup.scss +8 -1
- package/scss/components/_progress.scss +1 -1
- package/scss/components/_result-box.scss +5 -0
- package/scss/components/_search-box.scss +12 -0
- package/scss/components/_steps.scss +5 -3
- package/scss/components/_table.scss +127 -129
- package/scss/components/_tabs.scss +12 -0
- package/scss/components/_timeline.scss +2 -1
- package/scss/components/form/_checks.scss +11 -1
- package/scss/components/form/_color.scss +31 -5
- package/scss/components/form/_combo.scss +27 -0
- package/scss/components/form/_date-range.scss +24 -5
- package/scss/components/form/_date.scss +13 -10
- package/scss/components/form/_editor.scss +4 -0
- package/scss/components/form/_fieldset.scss +13 -0
- package/scss/components/form/_form.scss +259 -109
- package/scss/components/form/_input-group.scss +6 -0
- package/scss/components/form/_list.scss +1 -1
- package/scss/components/form/_location.scss +39 -0
- package/scss/components/form/_matrix.scss +2 -0
- package/scss/components/form/_nested-select.scss +9 -3
- package/scss/components/form/_number.scss +8 -0
- package/scss/components/form/_picker.scss +12 -0
- package/scss/components/form/_range.scss +47 -5
- package/scss/components/form/_select.scss +39 -1
- package/scss/components/form/_selection.scss +46 -2
- package/scss/components/form/_text.scss +5 -6
- package/scss/components/form/_transfer.scss +50 -1
- package/scss/components/form/_tree.scss +34 -4
- package/scss/components/react-datetime.scss +8 -0
- package/scss/helper/sizing/_width.md +105 -94
- package/scss/helper/sizing/_width.scss +16 -0
- package/esm/_virtual/index.js +0 -8
- package/esm/_virtual/react-is.development.js +0 -8
- package/esm/_virtual/react-is.production.min.js +0 -8
- package/esm/node_modules/rc-util/node_modules/react-is/cjs/react-is.development.js +0 -195
- package/esm/node_modules/rc-util/node_modules/react-is/cjs/react-is.production.min.js +0 -31
- package/esm/node_modules/rc-util/node_modules/react-is/index.js +0 -17
- package/lib/_virtual/index.js +0 -12
- package/lib/_virtual/react-is.development.js +0 -12
- package/lib/_virtual/react-is.production.min.js +0 -12
- package/lib/node_modules/rc-util/node_modules/react-is/cjs/react-is.development.js +0 -199
- package/lib/node_modules/rc-util/node_modules/react-is/cjs/react-is.production.min.js +0 -35
- package/lib/node_modules/rc-util/node_modules/react-is/index.js +0 -19
package/esm/components/Select.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-ui v3.
|
|
2
|
+
* amis-ui v3.3.0
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { __extends, __assign, __spreadArray, __read, __decorate, __metadata, __rest } from 'tslib';
|
|
7
|
-
import { isMobile, Overlay, PopOver, noop, ucFirst, autobind, themeable, localeable, uncontrollable,
|
|
7
|
+
import { normalizeNodePath, isObject, findTree, isMobile, Overlay, PopOver, noop, ucFirst, autobind, themeable, localeable, uncontrollable, highlight } from 'amis-core';
|
|
8
8
|
import React__default from 'react';
|
|
9
9
|
import isInteger from 'lodash/isInteger';
|
|
10
10
|
import omit from 'lodash/omit';
|
|
@@ -20,8 +20,8 @@ import Checkbox from './Checkbox.js';
|
|
|
20
20
|
import Input from './Input.js';
|
|
21
21
|
import Spinner from './Spinner.js';
|
|
22
22
|
import { withRemoteConfig } from './WithRemoteConfig.js';
|
|
23
|
-
import PopUp from './PopUp.js';
|
|
24
23
|
import { PopOverContainer } from './PopOverContainer.js';
|
|
24
|
+
import SelectMobile from './SelectMobile.js';
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* @file Select
|
|
@@ -29,7 +29,9 @@ import { PopOverContainer } from './PopOverContainer.js';
|
|
|
29
29
|
* @author fex
|
|
30
30
|
* @date 2017-11-07
|
|
31
31
|
*/
|
|
32
|
-
var defaultFilterOption = function (options, inputValue, option) {
|
|
32
|
+
var defaultFilterOption = function (options, inputValue, option) {
|
|
33
|
+
return matchSorter(options, inputValue, __assign({ threshold: matchSorter.rankings.CONTAINS }, option));
|
|
34
|
+
};
|
|
33
35
|
function value2array(value, props, enableNodePath) {
|
|
34
36
|
if (enableNodePath === void 0) { enableNodePath = false; }
|
|
35
37
|
if (enableNodePath) {
|
|
@@ -403,7 +405,7 @@ var Select = /** @class */ (function (_super) {
|
|
|
403
405
|
Select.prototype.renderValue = function (_a) {
|
|
404
406
|
var _this = this;
|
|
405
407
|
_a.inputValue; _a.isOpen;
|
|
406
|
-
var _b = this.props, cx = _b.classnames, multiple = _b.multiple, valuesNoWrap = _b.valuesNoWrap, placeholder = _b.placeholder, labelField = _b.labelField, disabled = _b.disabled, maxTagCount = _b.maxTagCount, overflowTagPopover = _b.overflowTagPopover, showInvalidMatch = _b.showInvalidMatch, renderValueLabel = _b.renderValueLabel, __ = _b.translate;
|
|
408
|
+
var _b = this.props, cx = _b.classnames, multiple = _b.multiple, valuesNoWrap = _b.valuesNoWrap, placeholder = _b.placeholder, labelField = _b.labelField, disabled = _b.disabled, maxTagCount = _b.maxTagCount, overflowTagPopover = _b.overflowTagPopover, showInvalidMatch = _b.showInvalidMatch, renderValueLabel = _b.renderValueLabel, popOverContainer = _b.popOverContainer, __ = _b.translate;
|
|
407
409
|
var selection = this.state.selection;
|
|
408
410
|
if (!selection.length) {
|
|
409
411
|
return (React__default.createElement("div", { key: "placeholder", className: cx('Select-placeholder') }, __(placeholder)));
|
|
@@ -419,7 +421,7 @@ var Select = /** @class */ (function (_super) {
|
|
|
419
421
|
{ label: "+ ".concat(selection.length - maxVisibleCount_1, " ...") }
|
|
420
422
|
], false).map(function (item, index) {
|
|
421
423
|
if (index === maxVisibleCount_1) {
|
|
422
|
-
return (React__default.createElement(TooltipWrapper, { key: selection.length, tooltip: __assign(__assign({}, tooltipProps_1), { children: function () { return (React__default.createElement("div", { className: cx('Select-overflow-wrapper') }, selection
|
|
424
|
+
return (React__default.createElement(TooltipWrapper, { key: selection.length, container: popOverContainer, tooltip: __assign(__assign({}, tooltipProps_1), { children: function () { return (React__default.createElement("div", { className: cx('Select-overflow-wrapper') }, selection
|
|
423
425
|
.slice(maxVisibleCount_1, selection.length)
|
|
424
426
|
.map(function (item, index) {
|
|
425
427
|
var itemIndex = index + maxVisibleCount_1;
|
|
@@ -447,7 +449,7 @@ var Select = /** @class */ (function (_super) {
|
|
|
447
449
|
? renderValueLabel(item)
|
|
448
450
|
: item[labelField || 'label']))));
|
|
449
451
|
}
|
|
450
|
-
return (React__default.createElement(TooltipWrapper, { placement: 'top', tooltip: item[labelField || 'label'], trigger: 'hover', key: index },
|
|
452
|
+
return (React__default.createElement(TooltipWrapper, { container: popOverContainer, placement: 'top', tooltip: item[labelField || 'label'], trigger: 'hover', key: index },
|
|
451
453
|
React__default.createElement("div", { className: cx('Select-value', {
|
|
452
454
|
'is-disabled': disabled,
|
|
453
455
|
'is-invalid': showInvalidMatch ? item.__unmatched : false
|
|
@@ -470,7 +472,7 @@ var Select = /** @class */ (function (_super) {
|
|
|
470
472
|
? renderValueLabel(item)
|
|
471
473
|
: item[labelField || 'label']));
|
|
472
474
|
}
|
|
473
|
-
return valuesNoWrap ? ("".concat(item[labelField || 'label']).concat(index === selection.length - 1 ? '' : ' + ')) : (React__default.createElement(TooltipWrapper, { placement: 'top', tooltip: item[labelField || 'label'], trigger: 'hover', key: index },
|
|
475
|
+
return valuesNoWrap ? ("".concat(item[labelField || 'label']).concat(index === selection.length - 1 ? '' : ' + ')) : (React__default.createElement(TooltipWrapper, { container: popOverContainer, placement: 'top', tooltip: item[labelField || 'label'], trigger: 'hover', key: index },
|
|
474
476
|
React__default.createElement("div", { className: cx('Select-value', {
|
|
475
477
|
'is-disabled': disabled,
|
|
476
478
|
'is-invalid': showInvalidMatch ? item.__unmatched : false
|
|
@@ -598,7 +600,12 @@ var Select = /** @class */ (function (_super) {
|
|
|
598
600
|
: filtedOptions.length * virtualItemHeight, itemCount: filtedOptions.length, itemSize: virtualItemHeight, renderItem: renderItem })) : (filtedOptions.map(function (item, index) {
|
|
599
601
|
return renderItem({ index: index });
|
|
600
602
|
}))) : (React__default.createElement("div", { className: cx('Select-noResult') }, __(noResultsText)))));
|
|
601
|
-
return mobileUI ? (React__default.createElement(
|
|
603
|
+
return mobileUI ? (React__default.createElement(SelectMobile, __assign({}, this.props, { highlightedIndex: highlightedIndex, isOpen: isOpen, getItemProps: getItemProps, getInputProps: getInputProps, selectedItem: selectedItem, onChange: function (selection) {
|
|
604
|
+
_this.setState({
|
|
605
|
+
isOpen: false
|
|
606
|
+
});
|
|
607
|
+
_this.props.onChange(selection);
|
|
608
|
+
}, onClose: this.close }))) : (React__default.createElement(Overlay, { container: popOverContainer || this.getTarget, containerSelector: popOverContainerSelector, target: this.getTarget, placement: overlayPlacement === 'auto'
|
|
602
609
|
? PopOverContainer.alignToPlacement(overlay)
|
|
603
610
|
: overlayPlacement, show: true },
|
|
604
611
|
React__default.createElement(PopOver, { overlay: true, className: cx('Select-popover'), style: {
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Option, SelectProps } from './Select';
|
|
3
|
+
interface SelectState {
|
|
4
|
+
isFocused: boolean;
|
|
5
|
+
inputValue: string;
|
|
6
|
+
itemHeight: number;
|
|
7
|
+
selection: Array<Option>;
|
|
8
|
+
}
|
|
9
|
+
interface Props extends SelectProps {
|
|
10
|
+
isOpen: boolean;
|
|
11
|
+
highlightedIndex: any;
|
|
12
|
+
selectedItem: any;
|
|
13
|
+
getInputProps: (...params: any) => any;
|
|
14
|
+
getItemProps: (...params: any) => any;
|
|
15
|
+
onClose: () => void;
|
|
16
|
+
}
|
|
17
|
+
export default class SelectMobile extends React.Component<Props, SelectState> {
|
|
18
|
+
input: HTMLInputElement;
|
|
19
|
+
target: HTMLElement;
|
|
20
|
+
constructor(props: Props);
|
|
21
|
+
handleChange([item]: any): void;
|
|
22
|
+
handleInputChange(evt: React.ChangeEvent<HTMLInputElement>): void;
|
|
23
|
+
getTarget(): HTMLElement;
|
|
24
|
+
inputRef(ref: HTMLInputElement): void;
|
|
25
|
+
toggleCheckAll(): void;
|
|
26
|
+
handleAddClick(): void;
|
|
27
|
+
handleEditClick(e: Event, item: any): void;
|
|
28
|
+
handleDeleteClick(e: Event, item: any): void;
|
|
29
|
+
onFocus(e: any): void;
|
|
30
|
+
onBlur(e: any): void;
|
|
31
|
+
focus(): void;
|
|
32
|
+
blur(): void;
|
|
33
|
+
clearSearchValue(): void;
|
|
34
|
+
onConfirm(): void;
|
|
35
|
+
render(): React.JSX.Element;
|
|
36
|
+
}
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* amis-ui v3.3.0
|
|
3
|
+
* Copyright 2018-2023 fex
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { __extends, __read, __assign, __decorate, __metadata } from 'tslib';
|
|
7
|
+
import React__default from 'react';
|
|
8
|
+
import { findDOMNode } from 'react-dom';
|
|
9
|
+
import Picker from './Picker.js';
|
|
10
|
+
import PopUp from './PopUp.js';
|
|
11
|
+
import { autobind, highlight } from 'amis-core';
|
|
12
|
+
import merge from 'lodash/merge';
|
|
13
|
+
import { matchSorter } from 'match-sorter';
|
|
14
|
+
import { value2array } from './Select.js';
|
|
15
|
+
import VirtualList from './virtual-list/index.js';
|
|
16
|
+
import Checkbox from './Checkbox.js';
|
|
17
|
+
import Input from './Input.js';
|
|
18
|
+
import { Icon } from './icons.js';
|
|
19
|
+
|
|
20
|
+
var SelectMobile = /** @class */ (function (_super) {
|
|
21
|
+
__extends(SelectMobile, _super);
|
|
22
|
+
function SelectMobile(props) {
|
|
23
|
+
var _this = _super.call(this, props) || this;
|
|
24
|
+
_this.state = {
|
|
25
|
+
selection: value2array(props.value, props),
|
|
26
|
+
isFocused: false,
|
|
27
|
+
inputValue: '',
|
|
28
|
+
itemHeight: 32 /** Select选项高度保持一致 */
|
|
29
|
+
};
|
|
30
|
+
return _this;
|
|
31
|
+
}
|
|
32
|
+
SelectMobile.prototype.handleChange = function (_a) {
|
|
33
|
+
var _b = __read(_a, 1), item = _b[0];
|
|
34
|
+
var _c = this.props; _c.onChange; var multiple = _c.multiple; _c.simpleValue; var valueField = _c.valueField, options = _c.options;
|
|
35
|
+
var selection = this.state.selection;
|
|
36
|
+
// 单选是字符串
|
|
37
|
+
var selectItem = options.find(function (option) {
|
|
38
|
+
return multiple
|
|
39
|
+
? option[valueField] === item[valueField]
|
|
40
|
+
: option[valueField] === item;
|
|
41
|
+
});
|
|
42
|
+
if (multiple) {
|
|
43
|
+
var selectionValues = selection.map(function (item) { return item[valueField]; });
|
|
44
|
+
selection = selection.concat();
|
|
45
|
+
var idx = selectionValues.indexOf(selectItem === null || selectItem === void 0 ? void 0 : selectItem[valueField]);
|
|
46
|
+
if (~idx) {
|
|
47
|
+
selection.splice(idx, 1);
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
selectItem && selection.push(selectItem);
|
|
51
|
+
}
|
|
52
|
+
this.setState({
|
|
53
|
+
selection: selection
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
this.setState({
|
|
58
|
+
selection: selectItem ? [selectItem] : []
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
SelectMobile.prototype.handleInputChange = function (evt) {
|
|
63
|
+
var _this = this;
|
|
64
|
+
var loadOptions = this.props.loadOptions;
|
|
65
|
+
this.setState({
|
|
66
|
+
inputValue: evt.currentTarget.value
|
|
67
|
+
}, function () { return loadOptions && loadOptions(_this.state.inputValue); });
|
|
68
|
+
};
|
|
69
|
+
SelectMobile.prototype.getTarget = function () {
|
|
70
|
+
if (!this.target) {
|
|
71
|
+
this.target = findDOMNode(this);
|
|
72
|
+
}
|
|
73
|
+
return this.target;
|
|
74
|
+
};
|
|
75
|
+
SelectMobile.prototype.inputRef = function (ref) {
|
|
76
|
+
this.input = ref;
|
|
77
|
+
};
|
|
78
|
+
SelectMobile.prototype.toggleCheckAll = function () {
|
|
79
|
+
var _a = this.props, options = _a.options; _a.onChange; _a.simpleValue; var checkAllBySearch = _a.checkAllBySearch, labelField = _a.labelField, valueField = _a.valueField;
|
|
80
|
+
var inputValue = this.state.inputValue;
|
|
81
|
+
var selection = this.state.selection;
|
|
82
|
+
var filtedOptions = inputValue && checkAllBySearch !== false
|
|
83
|
+
? matchSorter(options, inputValue, {
|
|
84
|
+
keys: [labelField || 'label', valueField || 'value']
|
|
85
|
+
})
|
|
86
|
+
: options.concat();
|
|
87
|
+
var optionsValues = filtedOptions.map(function (option) { return option.value; });
|
|
88
|
+
var selectionValues = selection.map(function (select) { return select.value; });
|
|
89
|
+
var checkedAll = optionsValues.every(function (option) { return selectionValues.indexOf(option) > -1; });
|
|
90
|
+
selection = checkedAll ? [] : filtedOptions;
|
|
91
|
+
this.setState({ selection: selection });
|
|
92
|
+
};
|
|
93
|
+
SelectMobile.prototype.handleAddClick = function () {
|
|
94
|
+
var onAdd = this.props.onAdd;
|
|
95
|
+
onAdd && onAdd();
|
|
96
|
+
};
|
|
97
|
+
SelectMobile.prototype.handleEditClick = function (e, item) {
|
|
98
|
+
var onEdit = this.props.onEdit;
|
|
99
|
+
e.preventDefault();
|
|
100
|
+
e.stopPropagation();
|
|
101
|
+
onEdit && onEdit(item);
|
|
102
|
+
};
|
|
103
|
+
SelectMobile.prototype.handleDeleteClick = function (e, item) {
|
|
104
|
+
var onDelete = this.props.onDelete;
|
|
105
|
+
e.preventDefault();
|
|
106
|
+
e.stopPropagation();
|
|
107
|
+
onDelete && onDelete(item);
|
|
108
|
+
};
|
|
109
|
+
SelectMobile.prototype.onFocus = function (e) {
|
|
110
|
+
var simpleValue = this.props.simpleValue;
|
|
111
|
+
var selection = this.state.selection;
|
|
112
|
+
var value = simpleValue ? selection.map(function (item) { return item.value; }) : selection;
|
|
113
|
+
this.props.disabled ||
|
|
114
|
+
this.props.isOpen ||
|
|
115
|
+
this.setState({
|
|
116
|
+
isFocused: true
|
|
117
|
+
}, this.focus);
|
|
118
|
+
this.props.onFocus &&
|
|
119
|
+
this.props.onFocus(__assign(__assign({}, e), { value: value }));
|
|
120
|
+
};
|
|
121
|
+
SelectMobile.prototype.onBlur = function (e) {
|
|
122
|
+
var simpleValue = this.props.simpleValue;
|
|
123
|
+
var selection = this.state.selection;
|
|
124
|
+
var value = simpleValue ? selection.map(function (item) { return item.value; }) : selection;
|
|
125
|
+
this.setState({
|
|
126
|
+
isFocused: false
|
|
127
|
+
});
|
|
128
|
+
this.props.onBlur &&
|
|
129
|
+
this.props.onBlur(__assign(__assign({}, e), { value: value }));
|
|
130
|
+
};
|
|
131
|
+
SelectMobile.prototype.focus = function () {
|
|
132
|
+
this.input
|
|
133
|
+
? this.input.focus()
|
|
134
|
+
: this.getTarget() && this.getTarget().focus();
|
|
135
|
+
};
|
|
136
|
+
SelectMobile.prototype.blur = function () {
|
|
137
|
+
this.input
|
|
138
|
+
? this.input.blur()
|
|
139
|
+
: this.getTarget() && this.getTarget().blur();
|
|
140
|
+
};
|
|
141
|
+
SelectMobile.prototype.clearSearchValue = function () {
|
|
142
|
+
var loadOptions = this.props.loadOptions;
|
|
143
|
+
this.setState({
|
|
144
|
+
inputValue: ''
|
|
145
|
+
}, function () { return loadOptions === null || loadOptions === void 0 ? void 0 : loadOptions(''); });
|
|
146
|
+
};
|
|
147
|
+
SelectMobile.prototype.onConfirm = function () {
|
|
148
|
+
var _a, _b;
|
|
149
|
+
var selection = this.state.selection;
|
|
150
|
+
var _c = this.props, multiple = _c.multiple, onChange = _c.onChange, simpleValue = _c.simpleValue, valueField = _c.valueField, options = _c.options, loadOptions = _c.loadOptions, labelField = _c.labelField;
|
|
151
|
+
if (multiple) {
|
|
152
|
+
onChange(simpleValue ? selection.map(function (item) { return item[valueField]; }) : selection);
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
var inputValue = this.state.inputValue;
|
|
156
|
+
var filtedOptions = (inputValue && !loadOptions
|
|
157
|
+
? matchSorter(options, inputValue, {
|
|
158
|
+
keys: [labelField || 'label', valueField || 'value']
|
|
159
|
+
})
|
|
160
|
+
: options.concat()).filter(function (option) { return !option.hidden && option.visible !== false; });
|
|
161
|
+
// picker 打开未滑动时选中第一项
|
|
162
|
+
if (!selection.length && filtedOptions.length) {
|
|
163
|
+
onChange(simpleValue ? (_a = filtedOptions[0]) === null || _a === void 0 ? void 0 : _a[valueField] : filtedOptions[0]);
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
onChange(simpleValue ? (_b = selection[0]) === null || _b === void 0 ? void 0 : _b[valueField] : selection[0]);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
SelectMobile.prototype.render = function () {
|
|
171
|
+
var _this = this;
|
|
172
|
+
var _a;
|
|
173
|
+
var _b = this.props, popOverContainer = _b.popOverContainer, options = _b.options, valueField = _b.valueField, labelField = _b.labelField, noResultsText = _b.noResultsText, loadOptions = _b.loadOptions, multiple = _b.multiple, valuesNoWrap = _b.valuesNoWrap, cx = _b.classnames, checkAll = _b.checkAll, checkAllLabel = _b.checkAllLabel, checkAllBySearch = _b.checkAllBySearch, searchable = _b.searchable, disabled = _b.disabled, searchPromptText = _b.searchPromptText, __ = _b.translate, hideSelected = _b.hideSelected, renderMenu = _b.renderMenu, _c = _b.virtualThreshold, virtualThreshold = _c === void 0 ? 100 : _c, isOpen = _b.isOpen, onClose = _b.onClose, getInputProps = _b.getInputProps, getItemProps = _b.getItemProps, selectedItem = _b.selectedItem;
|
|
174
|
+
var selection = this.state.selection;
|
|
175
|
+
var inputValue = this.state.inputValue;
|
|
176
|
+
var checkedAll = false;
|
|
177
|
+
var checkedPartial = false;
|
|
178
|
+
var filtedOptions = (inputValue && isOpen && !loadOptions
|
|
179
|
+
? matchSorter(options, inputValue, {
|
|
180
|
+
keys: [labelField || 'label', valueField || 'value']
|
|
181
|
+
})
|
|
182
|
+
: options.concat()).filter(function (option) {
|
|
183
|
+
return !option.hidden &&
|
|
184
|
+
option.visible !== false &&
|
|
185
|
+
option[labelField || 'label'];
|
|
186
|
+
});
|
|
187
|
+
var enableVirtualRender = filtedOptions.length && filtedOptions.length > virtualThreshold;
|
|
188
|
+
var selectionValues = selection.map(function (select) { return select[valueField]; });
|
|
189
|
+
if (multiple && checkAll) {
|
|
190
|
+
var optionsValues = (checkAllBySearch !== false ? filtedOptions : options).map(function (option) { return option[valueField]; });
|
|
191
|
+
checkedAll = optionsValues.every(function (option) { return selectionValues.indexOf(option) > -1; });
|
|
192
|
+
checkedPartial = optionsValues.some(function (option) { return selectionValues.indexOf(option) > -1; });
|
|
193
|
+
}
|
|
194
|
+
// 用于虚拟渲染的每项高度
|
|
195
|
+
var virtualItemHeight = this.props.itemHeight || this.state.itemHeight;
|
|
196
|
+
// 渲染单个选项
|
|
197
|
+
var renderItem = function (_a) {
|
|
198
|
+
var index = _a.index, style = _a.style;
|
|
199
|
+
var item = filtedOptions[index];
|
|
200
|
+
if (!item) {
|
|
201
|
+
return null;
|
|
202
|
+
}
|
|
203
|
+
var checked = selectedItem === item || !!~selectionValues.indexOf(item[valueField]);
|
|
204
|
+
if (hideSelected && checked) {
|
|
205
|
+
return null;
|
|
206
|
+
}
|
|
207
|
+
return (React__default.createElement("div", __assign({}, getItemProps({
|
|
208
|
+
key: typeof item.value === 'string'
|
|
209
|
+
? "".concat(item.label, "-").concat(item.value)
|
|
210
|
+
: index,
|
|
211
|
+
index: index,
|
|
212
|
+
item: item,
|
|
213
|
+
disabled: item.disabled
|
|
214
|
+
}), { style: merge(style, enableVirtualRender ? { width: '100%' } : {}), className: cx("Select-option", {
|
|
215
|
+
'is-disabled': item.disabled,
|
|
216
|
+
'is-active': checked,
|
|
217
|
+
'is-mobile': true
|
|
218
|
+
}) }), renderMenu ? (multiple ? (renderMenu(item, {
|
|
219
|
+
multiple: multiple,
|
|
220
|
+
checkAll: checkAll,
|
|
221
|
+
checked: checked,
|
|
222
|
+
onChange: function () { return _this.handleChange(item); },
|
|
223
|
+
inputValue: inputValue || '',
|
|
224
|
+
searchable: searchable,
|
|
225
|
+
index: index
|
|
226
|
+
})) : (renderMenu(item, {
|
|
227
|
+
multiple: multiple,
|
|
228
|
+
checkAll: checkAll,
|
|
229
|
+
checked: checked,
|
|
230
|
+
onChange: function () { return _this.handleChange(item); },
|
|
231
|
+
inputValue: inputValue || '',
|
|
232
|
+
searchable: searchable,
|
|
233
|
+
index: index
|
|
234
|
+
}))) : multiple ? (React__default.createElement(React__default.Fragment, null,
|
|
235
|
+
React__default.createElement("div", { title: item[labelField], className: cx('Select-option-item-check'), onClick: function () { return !item.disabled && _this.handleChange([item]); } },
|
|
236
|
+
item.disabled
|
|
237
|
+
? item[labelField]
|
|
238
|
+
: highlight(item[labelField], inputValue, cx('Select-option-hl')),
|
|
239
|
+
item.tip),
|
|
240
|
+
checked ? (React__default.createElement(Icon, { icon: "check", className: cx('Select-option-mcheck') })) : null)) : (React__default.createElement("span", { className: cx('Select-option-content'), title: typeof item[labelField] === 'string' ? item[labelField] : '' },
|
|
241
|
+
item.disabled
|
|
242
|
+
? item[labelField]
|
|
243
|
+
: highlight(item[labelField], inputValue, cx('Select-option-hl')),
|
|
244
|
+
item.tip))));
|
|
245
|
+
};
|
|
246
|
+
var menu = (React__default.createElement("div", { className: cx('Select-menu', {
|
|
247
|
+
'Select--longlist': enableVirtualRender,
|
|
248
|
+
'is-mobile': true
|
|
249
|
+
}) },
|
|
250
|
+
searchable ? (React__default.createElement("div", { className: cx("Select-input", {
|
|
251
|
+
'is-focused': this.state.isFocused
|
|
252
|
+
}) },
|
|
253
|
+
React__default.createElement(Icon, { icon: "search", className: "icon" }),
|
|
254
|
+
React__default.createElement(Input, __assign({}, getInputProps({
|
|
255
|
+
onFocus: this.onFocus,
|
|
256
|
+
onBlur: this.onBlur,
|
|
257
|
+
disabled: disabled,
|
|
258
|
+
placeholder: __(searchPromptText),
|
|
259
|
+
onChange: this.handleInputChange,
|
|
260
|
+
ref: this.inputRef
|
|
261
|
+
}))),
|
|
262
|
+
(inputValue === null || inputValue === void 0 ? void 0 : inputValue.length) ? (React__default.createElement("a", { onClick: this.clearSearchValue, className: cx('Select-clear') },
|
|
263
|
+
React__default.createElement(Icon, { icon: "close", className: "icon" }))) : null)) : null,
|
|
264
|
+
multiple && valuesNoWrap ? (React__default.createElement("div", { className: cx('Select-option') },
|
|
265
|
+
"\u5DF2\u9009\u62E9(",
|
|
266
|
+
selectionValues.length,
|
|
267
|
+
")")) : null,
|
|
268
|
+
multiple && checkAll && filtedOptions.length ? (React__default.createElement("div", { className: cx('Select-option') },
|
|
269
|
+
React__default.createElement(Checkbox, { checked: checkedPartial, partial: checkedPartial && !checkedAll, onChange: this.toggleCheckAll, size: "sm" }, __(checkAllLabel)))) : null,
|
|
270
|
+
filtedOptions.length ? (filtedOptions.length > virtualThreshold ? ( // 较多数据时才启用 virtuallist,避免滚动条问题
|
|
271
|
+
React__default.createElement(VirtualList, { height: filtedOptions.length > 8
|
|
272
|
+
? 266
|
|
273
|
+
: filtedOptions.length * virtualItemHeight, itemCount: filtedOptions.length, itemSize: virtualItemHeight, renderItem: renderItem })) : (filtedOptions.map(function (item, index) {
|
|
274
|
+
return renderItem({ index: index });
|
|
275
|
+
}))) : (React__default.createElement("div", { className: cx('Select-noResult') }, __(noResultsText)))));
|
|
276
|
+
return (React__default.createElement(PopUp, { className: cx("Select-popup"), container: popOverContainer, isShow: isOpen, showConfirm: true, onConfirm: this.onConfirm, onHide: onClose }, multiple ? (menu) : (React__default.createElement(Picker, { className: 'Select-picker', columns: {
|
|
277
|
+
options: filtedOptions,
|
|
278
|
+
optionRender: renderMenu
|
|
279
|
+
}, onChange: function (item) { return _this.handleChange(item); }, showToolbar: false, labelField: labelField, valueField: valueField, itemHeight: 40, value: [(_a = selection[0]) === null || _a === void 0 ? void 0 : _a[valueField]] }))));
|
|
280
|
+
};
|
|
281
|
+
__decorate([
|
|
282
|
+
autobind,
|
|
283
|
+
__metadata("design:type", Function),
|
|
284
|
+
__metadata("design:paramtypes", [Object]),
|
|
285
|
+
__metadata("design:returntype", void 0)
|
|
286
|
+
], SelectMobile.prototype, "handleChange", null);
|
|
287
|
+
__decorate([
|
|
288
|
+
autobind,
|
|
289
|
+
__metadata("design:type", Function),
|
|
290
|
+
__metadata("design:paramtypes", [Object]),
|
|
291
|
+
__metadata("design:returntype", void 0)
|
|
292
|
+
], SelectMobile.prototype, "handleInputChange", null);
|
|
293
|
+
__decorate([
|
|
294
|
+
autobind,
|
|
295
|
+
__metadata("design:type", Function),
|
|
296
|
+
__metadata("design:paramtypes", []),
|
|
297
|
+
__metadata("design:returntype", void 0)
|
|
298
|
+
], SelectMobile.prototype, "getTarget", null);
|
|
299
|
+
__decorate([
|
|
300
|
+
autobind,
|
|
301
|
+
__metadata("design:type", Function),
|
|
302
|
+
__metadata("design:paramtypes", [HTMLInputElement]),
|
|
303
|
+
__metadata("design:returntype", void 0)
|
|
304
|
+
], SelectMobile.prototype, "inputRef", null);
|
|
305
|
+
__decorate([
|
|
306
|
+
autobind,
|
|
307
|
+
__metadata("design:type", Function),
|
|
308
|
+
__metadata("design:paramtypes", []),
|
|
309
|
+
__metadata("design:returntype", void 0)
|
|
310
|
+
], SelectMobile.prototype, "toggleCheckAll", null);
|
|
311
|
+
__decorate([
|
|
312
|
+
autobind,
|
|
313
|
+
__metadata("design:type", Function),
|
|
314
|
+
__metadata("design:paramtypes", []),
|
|
315
|
+
__metadata("design:returntype", void 0)
|
|
316
|
+
], SelectMobile.prototype, "handleAddClick", null);
|
|
317
|
+
__decorate([
|
|
318
|
+
autobind,
|
|
319
|
+
__metadata("design:type", Function),
|
|
320
|
+
__metadata("design:paramtypes", [Event, Object]),
|
|
321
|
+
__metadata("design:returntype", void 0)
|
|
322
|
+
], SelectMobile.prototype, "handleEditClick", null);
|
|
323
|
+
__decorate([
|
|
324
|
+
autobind,
|
|
325
|
+
__metadata("design:type", Function),
|
|
326
|
+
__metadata("design:paramtypes", [Event, Object]),
|
|
327
|
+
__metadata("design:returntype", void 0)
|
|
328
|
+
], SelectMobile.prototype, "handleDeleteClick", null);
|
|
329
|
+
__decorate([
|
|
330
|
+
autobind,
|
|
331
|
+
__metadata("design:type", Function),
|
|
332
|
+
__metadata("design:paramtypes", [Object]),
|
|
333
|
+
__metadata("design:returntype", void 0)
|
|
334
|
+
], SelectMobile.prototype, "onFocus", null);
|
|
335
|
+
__decorate([
|
|
336
|
+
autobind,
|
|
337
|
+
__metadata("design:type", Function),
|
|
338
|
+
__metadata("design:paramtypes", [Object]),
|
|
339
|
+
__metadata("design:returntype", void 0)
|
|
340
|
+
], SelectMobile.prototype, "onBlur", null);
|
|
341
|
+
__decorate([
|
|
342
|
+
autobind,
|
|
343
|
+
__metadata("design:type", Function),
|
|
344
|
+
__metadata("design:paramtypes", []),
|
|
345
|
+
__metadata("design:returntype", void 0)
|
|
346
|
+
], SelectMobile.prototype, "focus", null);
|
|
347
|
+
__decorate([
|
|
348
|
+
autobind,
|
|
349
|
+
__metadata("design:type", Function),
|
|
350
|
+
__metadata("design:paramtypes", []),
|
|
351
|
+
__metadata("design:returntype", void 0)
|
|
352
|
+
], SelectMobile.prototype, "clearSearchValue", null);
|
|
353
|
+
__decorate([
|
|
354
|
+
autobind,
|
|
355
|
+
__metadata("design:type", Function),
|
|
356
|
+
__metadata("design:paramtypes", []),
|
|
357
|
+
__metadata("design:returntype", void 0)
|
|
358
|
+
], SelectMobile.prototype, "onConfirm", null);
|
|
359
|
+
return SelectMobile;
|
|
360
|
+
}(React__default.Component));
|
|
361
|
+
|
|
362
|
+
export { SelectMobile as default };
|