amis-ui 2.7.2 → 2.8.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/_virtual/index.js +1 -1
- package/esm/_virtual/react-is.development.js +1 -1
- package/esm/_virtual/react-is.production.min.js +1 -1
- package/esm/components/404.js +1 -1
- package/esm/components/Alert.js +1 -1
- package/esm/components/Alert2.js +1 -1
- package/esm/components/AnchorNav.js +1 -1
- package/esm/components/ArrayInput.js +1 -1
- package/esm/components/AsideNav.js +1 -1
- package/esm/components/AssociatedSelection.js +1 -1
- package/esm/components/Avatar.js +1 -1
- package/esm/components/Badge.js +5 -2
- package/esm/components/BaiduMapPicker.js +1 -1
- package/esm/components/BarCode.js +1 -1
- package/esm/components/Breadcrumb.js +1 -1
- package/esm/components/Button.js +1 -1
- package/esm/components/CalendarMobile.js +1 -1
- package/esm/components/Card.js +1 -1
- package/esm/components/Cascader.js +23 -13
- package/esm/components/ChainedSelection.js +1 -1
- package/esm/components/Checkbox.js +1 -1
- package/esm/components/CityArea.js +12 -12
- package/esm/components/CityDB.js +1 -1
- package/esm/components/CodeMirror.js +1 -1
- package/esm/components/Collapse.js +1 -1
- package/esm/components/CollapseGroup.js +1 -1
- package/esm/components/ColorPicker.d.ts +40 -40
- package/esm/components/ColorPicker.js +1 -1
- package/esm/components/Combo.js +28 -15
- package/esm/components/ConfirmBox.js +9 -6
- package/esm/components/ContextMenu.js +1 -1
- package/esm/components/DatePicker.d.ts +40 -40
- package/esm/components/DatePicker.js +6 -4
- package/esm/components/DateRangePicker.d.ts +40 -40
- package/esm/components/DateRangePicker.js +7 -5
- package/esm/components/DndContainer.js +1 -1
- package/esm/components/Drawer.js +1 -1
- package/esm/components/Editor.js +1 -1
- package/esm/components/Form.js +1 -1
- package/esm/components/FormField.js +1 -1
- package/esm/components/GridNav.js +1 -1
- package/esm/components/GroupedSelection.js +1 -1
- package/esm/components/Html.js +1 -1
- package/esm/components/ImageGallery.js +1 -1
- package/esm/components/Input.js +1 -1
- package/esm/components/InputBox.js +1 -1
- package/esm/components/InputBoxWithSuggestion.js +1 -1
- package/esm/components/InputTable.js +28 -15
- package/esm/components/Layout.js +1 -1
- package/esm/components/Link.js +1 -1
- package/esm/components/ListGroup.js +1 -1
- package/esm/components/ListMenu.js +1 -1
- package/esm/components/LocationPicker.d.ts +40 -40
- package/esm/components/LocationPicker.js +1 -1
- package/esm/components/Markdown.js +1 -1
- package/esm/components/Modal.js +1 -1
- package/esm/components/ModalManager.js +1 -1
- package/esm/components/MonthRangePicker.d.ts +40 -40
- package/esm/components/MultilineText.js +1 -1
- package/esm/components/NumberInput.d.ts +15 -11
- package/esm/components/NumberInput.js +9 -9
- package/esm/components/Pagination.js +1 -1
- package/esm/components/Picker.js +4 -4
- package/esm/components/PickerColumn.js +4 -4
- package/esm/components/PickerContainer.js +1 -1
- package/esm/components/PopOverContainer.d.ts +18 -0
- package/esm/components/PopOverContainer.js +42 -9
- package/esm/components/PopUp.js +1 -1
- package/esm/components/Progress.js +1 -1
- package/esm/components/PullRefresh.js +4 -4
- package/esm/components/Radios.js +1 -1
- package/esm/components/Range.js +1 -1
- package/esm/components/Rating.js +1 -1
- package/esm/components/ResultBox.d.ts +40 -40
- package/esm/components/ResultBox.js +3 -3
- package/esm/components/ResultList.js +1 -1
- package/esm/components/ResultTableList.js +1 -1
- package/esm/components/ResultTreeList.js +1 -1
- package/esm/components/RichText.js +1 -1
- package/esm/components/SearchBox.d.ts +82 -40
- package/esm/components/SearchBox.js +10 -7
- package/esm/components/Select.d.ts +195 -193
- package/esm/components/Select.js +19 -9
- package/esm/components/Selection.js +3 -3
- package/esm/components/SparkLine.js +4 -4
- package/esm/components/Spinner.js +29 -33
- package/esm/components/Steps.js +1 -1
- package/esm/components/Switch.js +1 -1
- package/esm/components/TableSelection.js +1 -1
- package/esm/components/Tabs.d.ts +41 -40
- package/esm/components/Tabs.js +15 -10
- package/esm/components/TabsTransfer.js +1 -1
- package/esm/components/TabsTransferPicker.js +1 -1
- package/esm/components/Tag.js +1 -1
- package/esm/components/Textarea.js +1 -1
- package/esm/components/Timeline.js +1 -1
- package/esm/components/TimelineItem.js +3 -2
- package/esm/components/Tinymce.js +1 -1
- package/esm/components/TitleBar.js +1 -1
- package/esm/components/Toast.js +3 -3
- package/esm/components/Tooltip.js +1 -1
- package/esm/components/TooltipWrapper.js +1 -1
- package/esm/components/Transfer.js +1 -1
- package/esm/components/TransferDropDown.d.ts +44 -40
- package/esm/components/TransferDropDown.js +3 -3
- package/esm/components/TransferPicker.js +1 -1
- package/esm/components/TransferSearch.js +1 -1
- package/esm/components/Tree.d.ts +82 -40
- package/esm/components/Tree.js +45 -28
- package/esm/components/TreeSelection.js +1 -1
- package/esm/components/UserSelect.js +1 -1
- package/esm/components/UserTabSelect.js +32 -13
- package/esm/components/WithRemoteConfig.js +1 -1
- package/esm/components/WithStore.js +1 -1
- package/esm/components/calendar/Calendar.js +4 -4
- package/esm/components/calendar/CalendarContainer.js +1 -1
- package/esm/components/calendar/DaysView.js +1 -1
- package/esm/components/calendar/MonthsView.js +3 -3
- package/esm/components/calendar/QuartersView.js +1 -1
- package/esm/components/calendar/TimeView.js +1 -1
- package/esm/components/calendar/YearsView.js +1 -1
- package/esm/components/condition-builder/Expression.js +1 -1
- package/esm/components/condition-builder/Field.js +1 -1
- package/esm/components/condition-builder/Formula.js +1 -1
- package/esm/components/condition-builder/Func.js +1 -1
- package/esm/components/condition-builder/Group.js +1 -1
- package/esm/components/condition-builder/GroupOrItem.js +1 -1
- package/esm/components/condition-builder/InputSwitch.js +1 -1
- package/esm/components/condition-builder/Item.js +1 -1
- package/esm/components/condition-builder/Value.js +2 -2
- package/esm/components/condition-builder/config.js +1 -1
- package/esm/components/condition-builder/index.js +5 -4
- package/esm/components/formula/Editor.js +3 -3
- package/esm/components/formula/FuncList.js +4 -4
- package/esm/components/formula/Picker.js +3 -3
- package/esm/components/formula/VariableList.js +3 -2
- package/esm/components/formula/plugin.js +3 -2
- package/esm/components/icons.js +4 -4
- package/esm/components/json-schema/Array.js +4 -4
- package/esm/components/json-schema/Item.js +1 -1
- package/esm/components/json-schema/Object.js +30 -10
- package/esm/components/json-schema/index.js +1 -1
- package/esm/components/menu/MenuContext.js +1 -1
- package/esm/components/menu/MenuItem.js +5 -5
- package/esm/components/menu/SubMenu.js +5 -6
- package/esm/components/menu/index.d.ts +6 -9
- package/esm/components/menu/index.js +59 -43
- package/esm/components/schema-editor/Array.js +3 -3
- package/esm/components/schema-editor/Common.d.ts +10 -0
- package/esm/components/schema-editor/Common.js +16 -6
- package/esm/components/schema-editor/Item.js +1 -1
- package/esm/components/schema-editor/Object.d.ts +2 -1
- package/esm/components/schema-editor/Object.js +10 -6
- 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 +46 -41
- package/esm/components/schema-editor/index.js +6 -4
- package/esm/components/table/Cell.js +1 -1
- package/esm/components/table/HeadCellDropDown.js +1 -1
- package/esm/components/table/HeadCellFilter.js +3 -3
- package/esm/components/table/HeadCellSelect.js +1 -1
- package/esm/components/table/HeadCellSort.js +1 -1
- package/esm/components/table/ItemActionsWrapper.js +1 -1
- package/esm/components/table/index.js +19 -19
- 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 +3 -3
- package/esm/hooks/use-sub-form.js +1 -1
- package/esm/hooks/use-touch.js +3 -3
- package/esm/hooks/use-update-effect.js +1 -1
- package/esm/hooks/use-validation-resolver.js +56 -32
- 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 +1 -1
- 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 +1 -1
- package/esm/locale/en-US.js +1 -1
- package/esm/locale/zh-CN.js +1 -1
- package/esm/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +2 -4
- 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 +2 -4
- 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 +3 -3
- package/esm/node_modules/rc-overflow/es/Overflow.js +3 -3
- package/esm/node_modules/rc-overflow/es/RawItem.js +1 -1
- package/esm/node_modules/rc-overflow/es/hooks/useBatchFrameState.js +1 -1
- package/esm/node_modules/rc-overflow/es/index.js +1 -1
- package/esm/node_modules/rc-resize-observer/es/Collection.js +4 -5
- package/esm/node_modules/rc-resize-observer/es/SingleObserver/DomWrapper.js +1 -7
- package/esm/node_modules/rc-resize-observer/es/SingleObserver/index.js +38 -37
- package/esm/node_modules/rc-resize-observer/es/index.js +13 -11
- package/esm/node_modules/rc-resize-observer/es/utils/observerUtil.js +6 -12
- package/esm/node_modules/rc-util/es/Children/toArray.js +1 -1
- 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/useLayoutEffect.js +1 -1
- package/esm/node_modules/rc-util/es/hooks/useState.js +1 -1
- package/esm/node_modules/rc-util/es/raf.js +1 -1
- package/esm/node_modules/rc-util/es/ref.js +1 -1
- package/esm/node_modules/rc-util/es/warning.js +1 -1
- package/esm/node_modules/rc-util/node_modules/react-is/cjs/react-is.development.js +1 -1
- package/esm/node_modules/rc-util/node_modules/react-is/cjs/react-is.production.min.js +1 -1
- package/esm/node_modules/rc-util/node_modules/react-is/index.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/_virtual/index.js +1 -1
- package/lib/_virtual/react-is.development.js +1 -1
- package/lib/_virtual/react-is.production.min.js +1 -1
- package/lib/components/404.js +1 -1
- package/lib/components/Alert.js +1 -1
- package/lib/components/Alert2.d.ts +10 -10
- package/lib/components/Alert2.js +1 -1
- package/lib/components/AnchorNav.d.ts +10 -10
- package/lib/components/AnchorNav.js +1 -1
- package/lib/components/ArrayInput.d.ts +40 -40
- package/lib/components/ArrayInput.js +1 -1
- package/lib/components/AsideNav.js +1 -1
- package/lib/components/AssociatedSelection.d.ts +40 -40
- package/lib/components/AssociatedSelection.js +1 -1
- package/lib/components/Avatar.d.ts +10 -10
- package/lib/components/Avatar.js +1 -1
- package/lib/components/Badge.js +5 -2
- package/lib/components/BaiduMapPicker.js +1 -1
- package/lib/components/BarCode.js +1 -1
- package/lib/components/Breadcrumb.js +1 -1
- package/lib/components/Button.d.ts +10 -10
- package/lib/components/Button.js +1 -1
- package/lib/components/CalendarMobile.d.ts +40 -40
- package/lib/components/CalendarMobile.js +1 -1
- package/lib/components/Card.d.ts +10 -10
- package/lib/components/Card.js +1 -1
- package/lib/components/Cascader.js +22 -12
- package/lib/components/ChainedSelection.d.ts +40 -40
- package/lib/components/ChainedSelection.js +1 -1
- package/lib/components/Checkbox.d.ts +10 -10
- package/lib/components/Checkbox.js +1 -1
- package/lib/components/CityArea.js +11 -11
- package/lib/components/CityDB.js +1 -1
- package/lib/components/CodeMirror.js +1 -1
- package/lib/components/Collapse.d.ts +10 -10
- package/lib/components/Collapse.js +1 -1
- package/lib/components/CollapseGroup.js +1 -1
- package/lib/components/ColorPicker.d.ts +40 -40
- package/lib/components/ColorPicker.js +1 -1
- package/lib/components/Combo.js +27 -14
- package/lib/components/ConfirmBox.d.ts +40 -40
- package/lib/components/ConfirmBox.js +8 -5
- package/lib/components/ContextMenu.js +1 -1
- package/lib/components/DatePicker.d.ts +40 -40
- package/lib/components/DatePicker.js +5 -3
- package/lib/components/DateRangePicker.d.ts +40 -40
- package/lib/components/DateRangePicker.js +6 -4
- package/lib/components/DndContainer.js +1 -1
- package/lib/components/Drawer.d.ts +10 -10
- package/lib/components/Drawer.js +1 -1
- package/lib/components/Editor.d.ts +40 -40
- package/lib/components/Editor.js +1 -1
- package/lib/components/Form.js +1 -1
- package/lib/components/FormField.js +1 -1
- package/lib/components/GridNav.js +1 -1
- package/lib/components/GroupedSelection.d.ts +40 -40
- package/lib/components/GroupedSelection.js +1 -1
- package/lib/components/Html.js +1 -1
- package/lib/components/ImageGallery.js +1 -1
- package/lib/components/Input.js +1 -1
- package/lib/components/InputBox.d.ts +10 -10
- package/lib/components/InputBox.js +1 -1
- package/lib/components/InputBoxWithSuggestion.js +1 -1
- package/lib/components/InputTable.js +27 -14
- package/lib/components/Layout.js +1 -1
- package/lib/components/Link.js +1 -1
- package/lib/components/ListGroup.d.ts +10 -10
- package/lib/components/ListGroup.js +1 -1
- package/lib/components/ListMenu.d.ts +40 -40
- package/lib/components/ListMenu.js +1 -1
- package/lib/components/LocationPicker.d.ts +40 -40
- package/lib/components/LocationPicker.js +1 -1
- package/lib/components/Markdown.js +1 -1
- package/lib/components/Modal.d.ts +40 -40
- package/lib/components/Modal.js +1 -1
- package/lib/components/ModalManager.js +1 -1
- package/lib/components/MonthRangePicker.d.ts +40 -40
- package/lib/components/MultilineText.js +1 -1
- package/lib/components/NumberInput.d.ts +15 -11
- package/lib/components/NumberInput.js +8 -8
- package/lib/components/Pagination.js +1 -1
- package/lib/components/Picker.js +3 -3
- package/lib/components/PickerColumn.js +3 -3
- package/lib/components/PickerContainer.js +1 -1
- package/lib/components/PopOverContainer.d.ts +18 -0
- package/lib/components/PopOverContainer.js +41 -8
- package/lib/components/PopUp.js +1 -1
- package/lib/components/Progress.d.ts +10 -10
- package/lib/components/Progress.js +1 -1
- package/lib/components/PullRefresh.js +4 -4
- package/lib/components/Radios.d.ts +10 -10
- package/lib/components/Radios.js +1 -1
- package/lib/components/Range.js +1 -1
- package/lib/components/Rating.d.ts +10 -10
- package/lib/components/Rating.js +1 -1
- package/lib/components/ResultBox.d.ts +40 -40
- package/lib/components/ResultBox.js +2 -2
- package/lib/components/ResultList.d.ts +40 -40
- package/lib/components/ResultList.js +1 -1
- package/lib/components/ResultTableList.d.ts +40 -40
- package/lib/components/ResultTableList.js +1 -1
- package/lib/components/ResultTreeList.d.ts +40 -40
- package/lib/components/ResultTreeList.js +1 -1
- package/lib/components/RichText.js +1 -1
- package/lib/components/SearchBox.d.ts +82 -40
- package/lib/components/SearchBox.js +9 -6
- package/lib/components/Select.d.ts +195 -193
- package/lib/components/Select.js +18 -8
- package/lib/components/Selection.d.ts +40 -40
- package/lib/components/Selection.js +2 -2
- package/lib/components/SparkLine.d.ts +40 -40
- package/lib/components/SparkLine.js +3 -3
- package/lib/components/Spinner.d.ts +10 -10
- package/lib/components/Spinner.js +29 -33
- package/lib/components/Steps.js +1 -1
- package/lib/components/Switch.d.ts +10 -10
- package/lib/components/Switch.js +1 -1
- package/lib/components/TableSelection.d.ts +40 -40
- package/lib/components/TableSelection.js +1 -1
- package/lib/components/Tabs.d.ts +41 -40
- package/lib/components/Tabs.js +15 -10
- package/lib/components/TabsTransfer.d.ts +40 -40
- package/lib/components/TabsTransfer.js +1 -1
- package/lib/components/TabsTransferPicker.js +1 -1
- package/lib/components/Tag.d.ts +10 -10
- package/lib/components/Tag.js +1 -1
- package/lib/components/Textarea.d.ts +40 -40
- package/lib/components/Textarea.js +1 -1
- package/lib/components/Timeline.js +1 -1
- package/lib/components/TimelineItem.js +3 -2
- package/lib/components/Tinymce.js +1 -1
- package/lib/components/TitleBar.js +1 -1
- package/lib/components/Toast.js +2 -2
- package/lib/components/Tooltip.js +1 -1
- package/lib/components/TooltipWrapper.js +1 -1
- package/lib/components/Transfer.d.ts +40 -40
- package/lib/components/Transfer.js +1 -1
- package/lib/components/TransferDropDown.d.ts +44 -40
- package/lib/components/TransferDropDown.js +3 -3
- package/lib/components/TransferPicker.js +1 -1
- package/lib/components/TransferSearch.js +1 -1
- package/lib/components/Tree.d.ts +82 -40
- package/lib/components/Tree.js +44 -27
- package/lib/components/TreeSelection.d.ts +40 -40
- package/lib/components/TreeSelection.js +1 -1
- package/lib/components/UserSelect.d.ts +40 -40
- package/lib/components/UserSelect.js +1 -1
- package/lib/components/UserTabSelect.d.ts +40 -40
- package/lib/components/UserTabSelect.js +31 -12
- package/lib/components/WithRemoteConfig.js +1 -1
- package/lib/components/WithStore.js +1 -1
- package/lib/components/calendar/Calendar.js +3 -3
- package/lib/components/calendar/CalendarContainer.js +1 -1
- package/lib/components/calendar/DaysView.js +1 -1
- package/lib/components/calendar/MonthsView.js +2 -2
- package/lib/components/calendar/QuartersView.js +1 -1
- package/lib/components/calendar/TimeView.js +1 -1
- package/lib/components/calendar/YearsView.js +1 -1
- package/lib/components/condition-builder/Expression.js +1 -1
- package/lib/components/condition-builder/Field.js +1 -1
- package/lib/components/condition-builder/Formula.js +1 -1
- package/lib/components/condition-builder/Func.js +1 -1
- package/lib/components/condition-builder/Group.js +1 -1
- package/lib/components/condition-builder/GroupOrItem.js +1 -1
- package/lib/components/condition-builder/InputSwitch.js +1 -1
- package/lib/components/condition-builder/Item.js +1 -1
- package/lib/components/condition-builder/Value.js +2 -2
- package/lib/components/condition-builder/config.js +1 -1
- package/lib/components/condition-builder/index.js +4 -3
- package/lib/components/formula/Editor.d.ts +40 -40
- package/lib/components/formula/Editor.js +2 -2
- package/lib/components/formula/FuncList.js +3 -3
- package/lib/components/formula/Picker.d.ts +40 -40
- package/lib/components/formula/Picker.js +2 -2
- package/lib/components/formula/VariableList.js +3 -2
- package/lib/components/formula/plugin.js +3 -2
- package/lib/components/icons.js +3 -3
- package/lib/components/json-schema/Array.js +3 -3
- package/lib/components/json-schema/Item.js +1 -1
- package/lib/components/json-schema/Object.js +29 -9
- package/lib/components/json-schema/index.js +1 -1
- package/lib/components/menu/MenuContext.js +1 -1
- package/lib/components/menu/MenuItem.js +5 -5
- package/lib/components/menu/SubMenu.js +4 -5
- package/lib/components/menu/index.d.ts +16 -19
- package/lib/components/menu/index.js +56 -41
- package/lib/components/schema-editor/Array.js +3 -3
- package/lib/components/schema-editor/Common.d.ts +10 -0
- package/lib/components/schema-editor/Common.js +16 -5
- package/lib/components/schema-editor/Item.js +1 -1
- package/lib/components/schema-editor/Object.d.ts +2 -1
- package/lib/components/schema-editor/Object.js +10 -6
- package/lib/components/schema-editor/SchemaVariableList.js +1 -1
- package/lib/components/schema-editor/SchemaVariableListPicker.js +1 -1
- package/lib/components/schema-editor/index.d.ts +46 -41
- package/lib/components/schema-editor/index.js +6 -4
- package/lib/components/table/Cell.d.ts +40 -40
- package/lib/components/table/Cell.js +1 -1
- package/lib/components/table/HeadCellDropDown.js +1 -1
- package/lib/components/table/HeadCellFilter.js +2 -2
- package/lib/components/table/HeadCellSelect.js +1 -1
- package/lib/components/table/HeadCellSort.js +1 -1
- package/lib/components/table/ItemActionsWrapper.js +1 -1
- package/lib/components/table/index.d.ts +40 -40
- package/lib/components/table/index.js +18 -18
- package/lib/components/virtual-list/AutoSizer.js +1 -1
- 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 +1 -1
- package/lib/hooks/use-set-state.js +2 -2
- package/lib/hooks/use-sub-form.js +1 -1
- package/lib/hooks/use-touch.js +2 -2
- package/lib/hooks/use-update-effect.js +1 -1
- package/lib/hooks/use-validation-resolver.js +55 -31
- package/lib/icons/alert-danger.svg.js +1 -1
- package/lib/icons/alert-info.svg.js +1 -1
- package/lib/icons/alert-success.svg.js +1 -1
- package/lib/icons/alert-warning.svg.js +1 -1
- package/lib/icons/back.svg.js +1 -1
- package/lib/icons/calendar.svg.js +1 -1
- package/lib/icons/caret.svg.js +1 -1
- package/lib/icons/check.svg.js +1 -1
- package/lib/icons/clock.svg.js +1 -1
- package/lib/icons/close-small.svg.js +1 -1
- package/lib/icons/close.svg.js +1 -1
- package/lib/icons/cloud-upload.svg.js +1 -1
- package/lib/icons/column-filter.svg.js +1 -1
- package/lib/icons/columns.svg.js +1 -1
- package/lib/icons/compress-alt.svg.js +1 -1
- package/lib/icons/copy.svg.js +1 -1
- package/lib/icons/date.svg.js +1 -1
- package/lib/icons/department.svg.js +1 -1
- package/lib/icons/desk-empty.svg.js +1 -1
- package/lib/icons/dot.svg.js +1 -1
- package/lib/icons/down-arrow-bold.svg.js +1 -1
- package/lib/icons/down.svg.js +1 -1
- package/lib/icons/download.svg.js +1 -1
- package/lib/icons/drag-bar.svg.js +1 -1
- package/lib/icons/drag.svg.js +1 -1
- package/lib/icons/edit.svg.js +1 -1
- package/lib/icons/ellipsis-v.svg.js +1 -1
- package/lib/icons/enter.svg.js +1 -1
- package/lib/icons/exchange.svg.js +1 -1
- package/lib/icons/expand-alt.svg.js +1 -1
- package/lib/icons/fail.svg.js +1 -1
- package/lib/icons/file.svg.js +1 -1
- package/lib/icons/filter.svg.js +1 -1
- package/lib/icons/folder.svg.js +1 -1
- package/lib/icons/function.svg.js +1 -1
- package/lib/icons/home.svg.js +1 -1
- package/lib/icons/image.svg.js +1 -1
- package/lib/icons/info-circle.svg.js +1 -1
- package/lib/icons/info.svg.js +1 -1
- package/lib/icons/input-clear.svg.js +1 -1
- package/lib/icons/invisible.svg.js +1 -1
- package/lib/icons/left-arrow.svg.js +1 -1
- package/lib/icons/loading-outline.svg.js +1 -1
- package/lib/icons/location.svg.js +1 -1
- package/lib/icons/menu.svg.js +1 -1
- package/lib/icons/minus.svg.js +1 -1
- package/lib/icons/move.svg.js +1 -1
- package/lib/icons/mute.svg.js +1 -1
- package/lib/icons/new-edit.svg.js +1 -1
- package/lib/icons/pause.svg.js +1 -1
- package/lib/icons/pencil.svg.js +1 -1
- package/lib/icons/play.svg.js +1 -1
- package/lib/icons/plus-cicle.svg.js +1 -1
- package/lib/icons/plus-fine.svg.js +1 -1
- package/lib/icons/plus.svg.js +1 -1
- package/lib/icons/post.svg.js +1 -1
- package/lib/icons/question-mark.svg.js +1 -1
- package/lib/icons/question.svg.js +1 -1
- package/lib/icons/redo.svg.js +1 -1
- package/lib/icons/refresh.svg.js +1 -1
- package/lib/icons/reload.svg.js +1 -1
- package/lib/icons/remove.svg.js +1 -1
- package/lib/icons/retry.svg.js +1 -1
- package/lib/icons/right-arrow-bold.svg.js +1 -1
- package/lib/icons/right-arrow.svg.js +1 -1
- package/lib/icons/right-double-arrow.svg.js +1 -1
- package/lib/icons/role.svg.js +1 -1
- package/lib/icons/rotate-left.svg.js +1 -1
- package/lib/icons/rotate-right.svg.js +1 -1
- package/lib/icons/scale-origin.svg.js +1 -1
- package/lib/icons/schedule.svg.js +1 -1
- package/lib/icons/search.svg.js +1 -1
- package/lib/icons/setting.svg.js +1 -1
- package/lib/icons/slider-handle-icon.svg.js +1 -1
- package/lib/icons/sort-asc.svg.js +1 -1
- package/lib/icons/sort-default.svg.js +1 -1
- package/lib/icons/sort-desc.svg.js +1 -1
- package/lib/icons/star.svg.js +1 -1
- package/lib/icons/status-close.svg.js +1 -1
- package/lib/icons/steps-finsh.svg.js +1 -1
- package/lib/icons/success.svg.js +1 -1
- package/lib/icons/transparent.svg.js +1 -1
- package/lib/icons/trash.svg.js +1 -1
- package/lib/icons/tree-down.svg.js +1 -1
- package/lib/icons/undo.svg.js +1 -1
- package/lib/icons/upload.svg.js +1 -1
- package/lib/icons/user-remove.svg.js +1 -1
- package/lib/icons/view.svg.js +1 -1
- package/lib/icons/volume.svg.js +1 -1
- package/lib/icons/warning-mark.svg.js +1 -1
- package/lib/icons/warning.svg.js +1 -1
- package/lib/icons/window-restore.svg.js +1 -1
- package/lib/icons/zoom-in.svg.js +1 -1
- package/lib/icons/zoom-out.svg.js +1 -1
- package/lib/index.js +1 -1
- package/lib/locale/de-DE.js +1 -1
- package/lib/locale/en-US.js +1 -1
- package/lib/locale/zh-CN.js +1 -1
- package/lib/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +2 -4
- 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 +2 -4
- 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 +1 -1
- package/lib/node_modules/rc-overflow/es/RawItem.js +1 -1
- package/lib/node_modules/rc-overflow/es/hooks/useBatchFrameState.js +1 -1
- package/lib/node_modules/rc-overflow/es/index.js +1 -1
- package/lib/node_modules/rc-resize-observer/es/Collection.js +4 -5
- package/lib/node_modules/rc-resize-observer/es/SingleObserver/DomWrapper.js +1 -7
- package/lib/node_modules/rc-resize-observer/es/SingleObserver/index.js +38 -37
- package/lib/node_modules/rc-resize-observer/es/index.js +11 -9
- package/lib/node_modules/rc-resize-observer/es/utils/observerUtil.js +6 -12
- package/lib/node_modules/rc-util/es/Children/toArray.js +1 -1
- 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/useLayoutEffect.js +1 -1
- package/lib/node_modules/rc-util/es/hooks/useState.js +1 -1
- package/lib/node_modules/rc-util/es/raf.js +1 -1
- package/lib/node_modules/rc-util/es/ref.js +1 -1
- package/lib/node_modules/rc-util/es/warning.js +1 -1
- package/lib/node_modules/rc-util/node_modules/react-is/cjs/react-is.development.js +1 -1
- package/lib/node_modules/rc-util/node_modules/react-is/cjs/react-is.production.min.js +1 -1
- package/lib/node_modules/rc-util/node_modules/react-is/index.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 +903 -429
- package/lib/themes/ang.js +1 -1
- package/lib/themes/antd.css +917 -435
- package/lib/themes/antd.js +1 -1
- package/lib/themes/cxd.css +903 -429
- package/lib/themes/cxd.js +1 -1
- package/lib/themes/dark.css +903 -429
- package/lib/themes/dark.js +1 -1
- package/lib/themes/default.css +903 -429
- package/package.json +4 -4
- package/scss/_components.scss +464 -6
- package/scss/_properties.scss +3 -199
- package/scss/base/_normalize.scss +11 -0
- package/scss/components/_button.scss +8 -17
- package/scss/components/_formula.scss +13 -0
- package/scss/components/_menu.scss +93 -75
- package/scss/components/_result-box.scss +83 -17
- package/scss/components/_table.scss +0 -5
- package/scss/components/_tabs.scss +4 -0
- package/scss/components/form/_chained-select.scss +5 -0
- package/scss/components/form/_checks.scss +0 -4
- package/scss/components/form/_date-range.scss +73 -11
- package/scss/components/form/_date.scss +93 -23
- package/scss/components/form/_form.scss +0 -1
- package/scss/components/form/_input-group.scss +11 -0
- package/scss/components/form/_location.scss +16 -16
- package/scss/components/form/_nested-select.scss +6 -2
- package/scss/components/form/_number.scss +12 -3
- package/scss/components/form/_select.scss +119 -52
- package/scss/components/form/_selection.scss +62 -40
- package/scss/components/form/_tag.scss +0 -4
- package/scss/components/form/_text.scss +13 -3
- package/scss/components/form/_tree.scss +22 -2
- package/scss/components/react-datetime.scss +8 -2
- package/scss/themes/_antd-variables.scss +20 -6
|
@@ -50,6 +50,10 @@ export interface NumberProps extends ThemeProps {
|
|
|
50
50
|
* 清空输入内容时的值
|
|
51
51
|
*/
|
|
52
52
|
resetValue?: any;
|
|
53
|
+
/**
|
|
54
|
+
* 是否在清空内容时从数据域中删除该表单项对应的值
|
|
55
|
+
*/
|
|
56
|
+
clearValueOnEmpty?: boolean;
|
|
53
57
|
}
|
|
54
58
|
export declare class NumberInput extends React.Component<NumberProps, any> {
|
|
55
59
|
static defaultProps: Pick<NumberProps, 'step' | 'readOnly' | 'borderMode' | 'resetValue'>;
|
|
@@ -63,7 +67,7 @@ export declare class NumberInput extends React.Component<NumberProps, any> {
|
|
|
63
67
|
* @param resetValue 重置值
|
|
64
68
|
* @param isBig 是否为大数模式
|
|
65
69
|
*/
|
|
66
|
-
static normalizeValue: (value: any, min: ValueType | undefined, max: ValueType | undefined, precision: number, resetValue: any,
|
|
70
|
+
static normalizeValue: (value: any, min: ValueType | undefined, max: ValueType | undefined, precision: number, resetValue: any, clearValueOnEmpty?: boolean, isBig?: boolean) => any;
|
|
67
71
|
/**
|
|
68
72
|
* 获取精度,合法的精度为0和正整数,不合法的精度统一转化为0
|
|
69
73
|
* 若设置了step,则会基于step的精度生成,最终使用更高的精度
|
|
@@ -86,15 +90,15 @@ export declare class NumberInput extends React.Component<NumberProps, any> {
|
|
|
86
90
|
render(): JSX.Element;
|
|
87
91
|
}
|
|
88
92
|
declare const _default: {
|
|
89
|
-
new (props: Pick<Omit<NumberProps, keyof ThemeProps>, "big" | "
|
|
93
|
+
new (props: Pick<Omit<NumberProps, keyof ThemeProps>, "big" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "value" | "disabled" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard" | "clearValueOnEmpty"> & Partial<Pick<Omit<NumberProps, keyof ThemeProps>, "step" | "readOnly" | "resetValue" | "borderMode">> & Partial<Pick<Pick<NumberProps, "step" | "readOnly" | "resetValue" | "borderMode">, never>> & import("packages/amis-core/lib/theme").ThemeOutterProps): {
|
|
90
94
|
ref: any;
|
|
91
95
|
childRef(ref: any): void;
|
|
92
96
|
getWrappedInstance(): any;
|
|
93
97
|
render(): JSX.Element;
|
|
94
98
|
context: any;
|
|
95
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "big" | "
|
|
99
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "big" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "value" | "disabled" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard" | "clearValueOnEmpty"> & Partial<Pick<Omit<NumberProps, keyof ThemeProps>, "step" | "readOnly" | "resetValue" | "borderMode">> & Partial<Pick<Pick<NumberProps, "step" | "readOnly" | "resetValue" | "borderMode">, never>> & import("packages/amis-core/lib/theme").ThemeOutterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
96
100
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
97
|
-
readonly props: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "big" | "
|
|
101
|
+
readonly props: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "big" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "value" | "disabled" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard" | "clearValueOnEmpty"> & Partial<Pick<Omit<NumberProps, keyof ThemeProps>, "step" | "readOnly" | "resetValue" | "borderMode">> & Partial<Pick<Pick<NumberProps, "step" | "readOnly" | "resetValue" | "borderMode">, never>> & import("packages/amis-core/lib/theme").ThemeOutterProps> & Readonly<{
|
|
98
102
|
children?: React.ReactNode;
|
|
99
103
|
}>;
|
|
100
104
|
state: Readonly<{}>;
|
|
@@ -102,17 +106,17 @@ declare const _default: {
|
|
|
102
106
|
[key: string]: React.ReactInstance;
|
|
103
107
|
};
|
|
104
108
|
componentDidMount?(): void;
|
|
105
|
-
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "big" | "
|
|
109
|
+
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "big" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "value" | "disabled" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard" | "clearValueOnEmpty"> & Partial<Pick<Omit<NumberProps, keyof ThemeProps>, "step" | "readOnly" | "resetValue" | "borderMode">> & Partial<Pick<Pick<NumberProps, "step" | "readOnly" | "resetValue" | "borderMode">, never>> & import("packages/amis-core/lib/theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
106
110
|
componentWillUnmount?(): void;
|
|
107
111
|
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
108
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "big" | "
|
|
109
|
-
componentDidUpdate?(prevProps: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "big" | "
|
|
112
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "big" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "value" | "disabled" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard" | "clearValueOnEmpty"> & Partial<Pick<Omit<NumberProps, keyof ThemeProps>, "step" | "readOnly" | "resetValue" | "borderMode">> & Partial<Pick<Pick<NumberProps, "step" | "readOnly" | "resetValue" | "borderMode">, never>> & import("packages/amis-core/lib/theme").ThemeOutterProps>, prevState: Readonly<{}>): any;
|
|
113
|
+
componentDidUpdate?(prevProps: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "big" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "value" | "disabled" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard" | "clearValueOnEmpty"> & Partial<Pick<Omit<NumberProps, keyof ThemeProps>, "step" | "readOnly" | "resetValue" | "borderMode">> & Partial<Pick<Pick<NumberProps, "step" | "readOnly" | "resetValue" | "borderMode">, never>> & import("packages/amis-core/lib/theme").ThemeOutterProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
110
114
|
componentWillMount?(): void;
|
|
111
115
|
UNSAFE_componentWillMount?(): void;
|
|
112
|
-
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "big" | "
|
|
113
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "big" | "
|
|
114
|
-
componentWillUpdate?(nextProps: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "big" | "
|
|
115
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "big" | "
|
|
116
|
+
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "big" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "value" | "disabled" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard" | "clearValueOnEmpty"> & Partial<Pick<Omit<NumberProps, keyof ThemeProps>, "step" | "readOnly" | "resetValue" | "borderMode">> & Partial<Pick<Pick<NumberProps, "step" | "readOnly" | "resetValue" | "borderMode">, never>> & import("packages/amis-core/lib/theme").ThemeOutterProps>, nextContext: any): void;
|
|
117
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "big" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "value" | "disabled" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard" | "clearValueOnEmpty"> & Partial<Pick<Omit<NumberProps, keyof ThemeProps>, "step" | "readOnly" | "resetValue" | "borderMode">> & Partial<Pick<Pick<NumberProps, "step" | "readOnly" | "resetValue" | "borderMode">, never>> & import("packages/amis-core/lib/theme").ThemeOutterProps>, nextContext: any): void;
|
|
118
|
+
componentWillUpdate?(nextProps: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "big" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "value" | "disabled" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard" | "clearValueOnEmpty"> & Partial<Pick<Omit<NumberProps, keyof ThemeProps>, "step" | "readOnly" | "resetValue" | "borderMode">> & Partial<Pick<Pick<NumberProps, "step" | "readOnly" | "resetValue" | "borderMode">, never>> & import("packages/amis-core/lib/theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
119
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "big" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "value" | "disabled" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard" | "clearValueOnEmpty"> & Partial<Pick<Omit<NumberProps, keyof ThemeProps>, "step" | "readOnly" | "resetValue" | "borderMode">> & Partial<Pick<Pick<NumberProps, "step" | "readOnly" | "resetValue" | "borderMode">, never>> & import("packages/amis-core/lib/theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
116
120
|
};
|
|
117
121
|
displayName: string;
|
|
118
122
|
contextType: React.Context<string>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-ui v2.
|
|
2
|
+
* amis-ui v2.8.0
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -41,9 +41,9 @@ var NumberInput = /** @class */ (function (_super) {
|
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
NumberInput.prototype.handleChange = function (value) {
|
|
44
|
-
var _a = this.props, min = _a.min, max = _a.max, step = _a.step, precision = _a.precision, resetValue = _a.resetValue, onChange = _a.onChange;
|
|
44
|
+
var _a = this.props, min = _a.min, max = _a.max, step = _a.step, precision = _a.precision, resetValue = _a.resetValue, clearValueOnEmpty = _a.clearValueOnEmpty, onChange = _a.onChange;
|
|
45
45
|
var finalPrecision = NumberInput.normalizePrecision(precision, step);
|
|
46
|
-
var result = NumberInput.normalizeValue(value, min, max, finalPrecision, resetValue, this.isBig);
|
|
46
|
+
var result = NumberInput.normalizeValue(value, min, max, finalPrecision, resetValue, clearValueOnEmpty, this.isBig);
|
|
47
47
|
onChange === null || onChange === void 0 ? void 0 : onChange(result);
|
|
48
48
|
};
|
|
49
49
|
NumberInput.prototype.handleFocus = function (e) {
|
|
@@ -132,15 +132,15 @@ var NumberInput = /** @class */ (function (_super) {
|
|
|
132
132
|
* @param resetValue 重置值
|
|
133
133
|
* @param isBig 是否为大数模式
|
|
134
134
|
*/
|
|
135
|
-
NumberInput.normalizeValue = function (value, min, max, precision, resetValue, isBig) {
|
|
135
|
+
NumberInput.normalizeValue = function (value, min, max, precision, resetValue, clearValueOnEmpty, isBig) {
|
|
136
136
|
/**
|
|
137
137
|
* 输入不合法时重置为resetValue
|
|
138
|
-
* 若resetValue
|
|
138
|
+
* 若resetValue为不合法数字,直接清空输入
|
|
139
139
|
* 若resetValue为数字,则需要处理max,min,precision,保证抛出的值满足条件
|
|
140
140
|
*/
|
|
141
|
-
if (value
|
|
142
|
-
if (
|
|
143
|
-
return
|
|
141
|
+
if (!amisCore.isNumeric(value)) {
|
|
142
|
+
if (!amisCore.isNumeric(resetValue)) {
|
|
143
|
+
return clearValueOnEmpty ? undefined : '';
|
|
144
144
|
}
|
|
145
145
|
value = resetValue;
|
|
146
146
|
}
|
package/lib/components/Picker.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-ui v2.
|
|
2
|
+
* amis-ui v2.8.0
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -26,7 +26,7 @@ function fixToArray(data) {
|
|
|
26
26
|
var Picker = React.memo(function (props) {
|
|
27
27
|
var title = props.title, labelField = props.labelField, valueField = props.valueField, _a = props.visibleItemCount, visibleItemCount = _a === void 0 ? 5 : _a, _b = props.value, value = _b === void 0 ? [] : _b, _c = props.swipeDuration, swipeDuration = _c === void 0 ? 1000 : _c, _d = props.columns, columns = _d === void 0 ? [] : _d, _e = props.itemHeight, itemHeight = _e === void 0 ? 48 : _e, _f = props.showToolbar, showToolbar = _f === void 0 ? true : _f, _g = props.className, className = _g === void 0 ? '' : _g, cx = props.classnames, ns = props.classPrefix, __ = props.translate;
|
|
28
28
|
var _columns = fixToArray(columns);
|
|
29
|
-
var _h = React.useState(fixToArray(props.value === undefined ? props.defaultValue || [] : value)), innerValue = _h[0], setInnerValue = _h[1];
|
|
29
|
+
var _h = tslib.__read(React.useState(fixToArray(props.value === undefined ? props.defaultValue || [] : value)), 2), innerValue = _h[0], setInnerValue = _h[1];
|
|
30
30
|
React.useEffect(function () {
|
|
31
31
|
if (value === innerValue)
|
|
32
32
|
return;
|
|
@@ -43,7 +43,7 @@ var Picker = React.memo(function (props) {
|
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
var onChange = function (itemValue, columnIndex, confirm) {
|
|
46
|
-
var nextInnerValue = tslib.__spreadArray([], innerValue,
|
|
46
|
+
var nextInnerValue = tslib.__spreadArray([], tslib.__read(innerValue), false);
|
|
47
47
|
nextInnerValue[columnIndex] = itemValue;
|
|
48
48
|
setInnerValue(nextInnerValue);
|
|
49
49
|
if (props.onChange) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-ui v2.
|
|
2
|
+
* amis-ui v2.8.0
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -85,12 +85,12 @@ var PickerColumn = React.forwardRef(function (props, ref) {
|
|
|
85
85
|
}
|
|
86
86
|
return null;
|
|
87
87
|
};
|
|
88
|
-
var _g = useSetState["default"]({
|
|
88
|
+
var _g = tslib.__read(useSetState["default"]({
|
|
89
89
|
index: adjustIndex(defaultIndex) || 0,
|
|
90
90
|
offset: 0,
|
|
91
91
|
duration: 0,
|
|
92
92
|
options: cloneDeep__default["default"](options)
|
|
93
|
-
}), state = _g[0], updateState = _g[1];
|
|
93
|
+
}), 2), state = _g[0], updateState = _g[1];
|
|
94
94
|
/**
|
|
95
95
|
*
|
|
96
96
|
* @param index 索引
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
export type OverlayAlignType = 'left' | 'center' | 'right';
|
|
3
|
+
export interface PopOverOverlay {
|
|
4
|
+
width?: string | number;
|
|
5
|
+
align?: OverlayAlignType;
|
|
6
|
+
}
|
|
2
7
|
export interface PopOverContainerProps {
|
|
3
8
|
children: (props: {
|
|
4
9
|
onClick: (e: React.MouseEvent) => void;
|
|
@@ -12,6 +17,9 @@ export interface PopOverContainerProps {
|
|
|
12
17
|
popOverClassName?: string;
|
|
13
18
|
useMobileUI?: boolean;
|
|
14
19
|
placement?: string;
|
|
20
|
+
overlayWidth?: number | string;
|
|
21
|
+
overlayWidthField?: 'minWidth' | 'width';
|
|
22
|
+
align?: OverlayAlignType;
|
|
15
23
|
/** Popover层隐藏前触发的事件 */
|
|
16
24
|
onBeforeHide?: () => void;
|
|
17
25
|
/** Popover层隐藏后触发的事件 */
|
|
@@ -21,6 +29,11 @@ export interface PopOverContainerState {
|
|
|
21
29
|
isOpened: boolean;
|
|
22
30
|
}
|
|
23
31
|
export declare class PopOverContainer extends React.Component<PopOverContainerProps, PopOverContainerState> {
|
|
32
|
+
static alignPlacementMap: {
|
|
33
|
+
left: string;
|
|
34
|
+
right: string;
|
|
35
|
+
center: string;
|
|
36
|
+
};
|
|
24
37
|
state: PopOverContainerState;
|
|
25
38
|
target: any;
|
|
26
39
|
targetRef(target: any): void;
|
|
@@ -28,6 +41,11 @@ export declare class PopOverContainer extends React.Component<PopOverContainerPr
|
|
|
28
41
|
close(): void;
|
|
29
42
|
getTarget(): any;
|
|
30
43
|
getParent(): any;
|
|
44
|
+
static calcOverlayWidth(overlay?: PopOverOverlay): string | number | undefined;
|
|
45
|
+
static alignToPlacement(overlay?: PopOverOverlay): string;
|
|
46
|
+
getOverlayStyle(): {
|
|
47
|
+
[x: string]: string | number;
|
|
48
|
+
};
|
|
31
49
|
render(): JSX.Element;
|
|
32
50
|
}
|
|
33
51
|
export default PopOverContainer;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-ui v2.
|
|
2
|
+
* amis-ui v2.8.0
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -53,8 +53,40 @@ var PopOverContainer = /** @class */ (function (_super) {
|
|
|
53
53
|
var _a;
|
|
54
54
|
return (_a = this.getTarget()) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
55
55
|
};
|
|
56
|
+
PopOverContainer.calcOverlayWidth = function (overlay) {
|
|
57
|
+
var overlayWidth = overlay && overlay.width;
|
|
58
|
+
if (!overlayWidth)
|
|
59
|
+
return;
|
|
60
|
+
// 数字字符串需要转化下,否则不生效
|
|
61
|
+
if (typeof overlayWidth === 'number' || /^\d+$/.test(overlayWidth)) {
|
|
62
|
+
return amisCore.toNumber(overlayWidth);
|
|
63
|
+
}
|
|
64
|
+
// 带单位,如: 80%、200px、30vw、5rem
|
|
65
|
+
if (/^\d+(px|%|rem|em|vw)$/.test(overlayWidth)) {
|
|
66
|
+
return overlayWidth;
|
|
67
|
+
}
|
|
68
|
+
// 带单位的相对值
|
|
69
|
+
// 如: -100px 代表 100% - 100px。+10vw 代表 100% + 10vw
|
|
70
|
+
if (/^(\+|\-)\d+(px|%|rem|em|vw)$/.test(overlayWidth)) {
|
|
71
|
+
return overlayWidth.replace(/^(\+|\-)(.*)/, 'calc(100% $1 $2)');
|
|
72
|
+
}
|
|
73
|
+
return;
|
|
74
|
+
};
|
|
75
|
+
PopOverContainer.alignToPlacement = function (overlay) {
|
|
76
|
+
var align = overlay && overlay.align;
|
|
77
|
+
return (align && PopOverContainer.alignPlacementMap[align]) || 'auto';
|
|
78
|
+
};
|
|
79
|
+
// 可以自定义下拉框宽度
|
|
80
|
+
PopOverContainer.prototype.getOverlayStyle = function () {
|
|
81
|
+
var _a;
|
|
82
|
+
var _b = this.props, overlayWidth = _b.overlayWidth, overlayWidthField = _b.overlayWidthField;
|
|
83
|
+
return _a = {},
|
|
84
|
+
_a[overlayWidthField || 'minWidth'] = PopOverContainer.calcOverlayWidth({ width: overlayWidth }) ||
|
|
85
|
+
(this.target ? Math.max(this.target.offsetWidth, 100) : 'auto'),
|
|
86
|
+
_a;
|
|
87
|
+
};
|
|
56
88
|
PopOverContainer.prototype.render = function () {
|
|
57
|
-
var _a = this.props, useMobileUI = _a.useMobileUI, children = _a.children, popOverContainer = _a.popOverContainer, popOverClassName = _a.popOverClassName, dropdownRender = _a.popOverRender, placement = _a.placement;
|
|
89
|
+
var _a = this.props, useMobileUI = _a.useMobileUI, children = _a.children, popOverContainer = _a.popOverContainer, popOverClassName = _a.popOverClassName, dropdownRender = _a.popOverRender, placement = _a.placement, align = _a.align;
|
|
58
90
|
var mobileUI = useMobileUI && amisCore.isMobile();
|
|
59
91
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
60
92
|
children({
|
|
@@ -62,12 +94,13 @@ var PopOverContainer = /** @class */ (function (_super) {
|
|
|
62
94
|
onClick: this.handleClick,
|
|
63
95
|
ref: this.targetRef
|
|
64
96
|
}),
|
|
65
|
-
mobileUI ? (React__default["default"].createElement(PopUp["default"], { isShow: this.state.isOpened, container: popOverContainer, className: popOverClassName, onHide: this.close }, dropdownRender({ onClose: this.close }))) : (React__default["default"].createElement(amisCore.Overlay, { container: popOverContainer || this.getParent, target: this.getTarget, placement: placement ||
|
|
66
|
-
React__default["default"].createElement(amisCore.PopOver, { overlay: true, className: popOverClassName, style: {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
97
|
+
mobileUI ? (React__default["default"].createElement(PopUp["default"], { isShow: this.state.isOpened, container: popOverContainer, className: popOverClassName, onHide: this.close }, dropdownRender({ onClose: this.close }))) : (React__default["default"].createElement(amisCore.Overlay, { container: popOverContainer || this.getParent, target: this.getTarget, placement: placement || PopOverContainer.alignToPlacement({ align: align }), show: this.state.isOpened },
|
|
98
|
+
React__default["default"].createElement(amisCore.PopOver, { overlay: true, className: popOverClassName, style: this.getOverlayStyle(), onHide: this.close }, dropdownRender({ onClose: this.close }))))));
|
|
99
|
+
};
|
|
100
|
+
PopOverContainer.alignPlacementMap = {
|
|
101
|
+
left: 'left-bottom-left-top',
|
|
102
|
+
right: 'right-bottom-right-top',
|
|
103
|
+
center: 'center-bottom-center-top'
|
|
71
104
|
};
|
|
72
105
|
tslib.__decorate([
|
|
73
106
|
amisCore.autobind,
|
package/lib/components/PopUp.js
CHANGED
|
@@ -36,15 +36,15 @@ export declare class Progress extends React.Component<ProgressProps, Object> {
|
|
|
36
36
|
render(): JSX.Element;
|
|
37
37
|
}
|
|
38
38
|
declare const _default: {
|
|
39
|
-
new (props: Pick<Omit<ProgressProps, keyof ThemeProps>, never> & Partial<Pick<Omit<ProgressProps, keyof ThemeProps>, "type" | "map" | "animate" | "
|
|
39
|
+
new (props: Pick<Omit<ProgressProps, keyof ThemeProps>, never> & Partial<Pick<Omit<ProgressProps, keyof ThemeProps>, "type" | "map" | "animate" | "placeholder" | "value" | "format" | "showLabel" | "stripe" | "gapDegree" | "gapPosition" | "strokeWidth" | "progressClassName" | "threshold" | "showThresholdText">> & Partial<Pick<Partial<ProgressProps>, "classPrefix" | "classnames" | "className" | "style" | "theme">> & import("packages/amis-core/lib/theme").ThemeOutterProps): {
|
|
40
40
|
ref: any;
|
|
41
41
|
childRef(ref: any): void;
|
|
42
42
|
getWrappedInstance(): any;
|
|
43
43
|
render(): JSX.Element;
|
|
44
44
|
context: any;
|
|
45
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<ProgressProps, keyof ThemeProps>, never> & Partial<Pick<Omit<ProgressProps, keyof ThemeProps>, "type" | "map" | "animate" | "
|
|
45
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<ProgressProps, keyof ThemeProps>, never> & Partial<Pick<Omit<ProgressProps, keyof ThemeProps>, "type" | "map" | "animate" | "placeholder" | "value" | "format" | "showLabel" | "stripe" | "gapDegree" | "gapPosition" | "strokeWidth" | "progressClassName" | "threshold" | "showThresholdText">> & Partial<Pick<Partial<ProgressProps>, "classPrefix" | "classnames" | "className" | "style" | "theme">> & import("packages/amis-core/lib/theme").ThemeOutterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
46
46
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
47
|
-
readonly props: Readonly<Pick<Omit<ProgressProps, keyof ThemeProps>, never> & Partial<Pick<Omit<ProgressProps, keyof ThemeProps>, "type" | "map" | "animate" | "
|
|
47
|
+
readonly props: Readonly<Pick<Omit<ProgressProps, keyof ThemeProps>, never> & Partial<Pick<Omit<ProgressProps, keyof ThemeProps>, "type" | "map" | "animate" | "placeholder" | "value" | "format" | "showLabel" | "stripe" | "gapDegree" | "gapPosition" | "strokeWidth" | "progressClassName" | "threshold" | "showThresholdText">> & Partial<Pick<Partial<ProgressProps>, "classPrefix" | "classnames" | "className" | "style" | "theme">> & import("packages/amis-core/lib/theme").ThemeOutterProps> & Readonly<{
|
|
48
48
|
children?: React.ReactNode;
|
|
49
49
|
}>;
|
|
50
50
|
state: Readonly<{}>;
|
|
@@ -52,17 +52,17 @@ declare const _default: {
|
|
|
52
52
|
[key: string]: React.ReactInstance;
|
|
53
53
|
};
|
|
54
54
|
componentDidMount?(): void;
|
|
55
|
-
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<ProgressProps, keyof ThemeProps>, never> & Partial<Pick<Omit<ProgressProps, keyof ThemeProps>, "type" | "map" | "animate" | "
|
|
55
|
+
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<ProgressProps, keyof ThemeProps>, never> & Partial<Pick<Omit<ProgressProps, keyof ThemeProps>, "type" | "map" | "animate" | "placeholder" | "value" | "format" | "showLabel" | "stripe" | "gapDegree" | "gapPosition" | "strokeWidth" | "progressClassName" | "threshold" | "showThresholdText">> & Partial<Pick<Partial<ProgressProps>, "classPrefix" | "classnames" | "className" | "style" | "theme">> & import("packages/amis-core/lib/theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
56
56
|
componentWillUnmount?(): void;
|
|
57
57
|
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
58
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<ProgressProps, keyof ThemeProps>, never> & Partial<Pick<Omit<ProgressProps, keyof ThemeProps>, "type" | "map" | "animate" | "
|
|
59
|
-
componentDidUpdate?(prevProps: Readonly<Pick<Omit<ProgressProps, keyof ThemeProps>, never> & Partial<Pick<Omit<ProgressProps, keyof ThemeProps>, "type" | "map" | "animate" | "
|
|
58
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<ProgressProps, keyof ThemeProps>, never> & Partial<Pick<Omit<ProgressProps, keyof ThemeProps>, "type" | "map" | "animate" | "placeholder" | "value" | "format" | "showLabel" | "stripe" | "gapDegree" | "gapPosition" | "strokeWidth" | "progressClassName" | "threshold" | "showThresholdText">> & Partial<Pick<Partial<ProgressProps>, "classPrefix" | "classnames" | "className" | "style" | "theme">> & import("packages/amis-core/lib/theme").ThemeOutterProps>, prevState: Readonly<{}>): any;
|
|
59
|
+
componentDidUpdate?(prevProps: Readonly<Pick<Omit<ProgressProps, keyof ThemeProps>, never> & Partial<Pick<Omit<ProgressProps, keyof ThemeProps>, "type" | "map" | "animate" | "placeholder" | "value" | "format" | "showLabel" | "stripe" | "gapDegree" | "gapPosition" | "strokeWidth" | "progressClassName" | "threshold" | "showThresholdText">> & Partial<Pick<Partial<ProgressProps>, "classPrefix" | "classnames" | "className" | "style" | "theme">> & import("packages/amis-core/lib/theme").ThemeOutterProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
60
60
|
componentWillMount?(): void;
|
|
61
61
|
UNSAFE_componentWillMount?(): void;
|
|
62
|
-
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<ProgressProps, keyof ThemeProps>, never> & Partial<Pick<Omit<ProgressProps, keyof ThemeProps>, "type" | "map" | "animate" | "
|
|
63
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<ProgressProps, keyof ThemeProps>, never> & Partial<Pick<Omit<ProgressProps, keyof ThemeProps>, "type" | "map" | "animate" | "
|
|
64
|
-
componentWillUpdate?(nextProps: Readonly<Pick<Omit<ProgressProps, keyof ThemeProps>, never> & Partial<Pick<Omit<ProgressProps, keyof ThemeProps>, "type" | "map" | "animate" | "
|
|
65
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<ProgressProps, keyof ThemeProps>, never> & Partial<Pick<Omit<ProgressProps, keyof ThemeProps>, "type" | "map" | "animate" | "
|
|
62
|
+
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<ProgressProps, keyof ThemeProps>, never> & Partial<Pick<Omit<ProgressProps, keyof ThemeProps>, "type" | "map" | "animate" | "placeholder" | "value" | "format" | "showLabel" | "stripe" | "gapDegree" | "gapPosition" | "strokeWidth" | "progressClassName" | "threshold" | "showThresholdText">> & Partial<Pick<Partial<ProgressProps>, "classPrefix" | "classnames" | "className" | "style" | "theme">> & import("packages/amis-core/lib/theme").ThemeOutterProps>, nextContext: any): void;
|
|
63
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<ProgressProps, keyof ThemeProps>, never> & Partial<Pick<Omit<ProgressProps, keyof ThemeProps>, "type" | "map" | "animate" | "placeholder" | "value" | "format" | "showLabel" | "stripe" | "gapDegree" | "gapPosition" | "strokeWidth" | "progressClassName" | "threshold" | "showThresholdText">> & Partial<Pick<Partial<ProgressProps>, "classPrefix" | "classnames" | "className" | "style" | "theme">> & import("packages/amis-core/lib/theme").ThemeOutterProps>, nextContext: any): void;
|
|
64
|
+
componentWillUpdate?(nextProps: Readonly<Pick<Omit<ProgressProps, keyof ThemeProps>, never> & Partial<Pick<Omit<ProgressProps, keyof ThemeProps>, "type" | "map" | "animate" | "placeholder" | "value" | "format" | "showLabel" | "stripe" | "gapDegree" | "gapPosition" | "strokeWidth" | "progressClassName" | "threshold" | "showThresholdText">> & Partial<Pick<Partial<ProgressProps>, "classPrefix" | "classnames" | "className" | "style" | "theme">> & import("packages/amis-core/lib/theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
65
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<ProgressProps, keyof ThemeProps>, never> & Partial<Pick<Omit<ProgressProps, keyof ThemeProps>, "type" | "map" | "animate" | "placeholder" | "value" | "format" | "showLabel" | "stripe" | "gapDegree" | "gapPosition" | "strokeWidth" | "progressClassName" | "threshold" | "showThresholdText">> & Partial<Pick<Partial<ProgressProps>, "classPrefix" | "classnames" | "className" | "style" | "theme">> & import("packages/amis-core/lib/theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
66
66
|
};
|
|
67
67
|
displayName: string;
|
|
68
68
|
contextType: React.Context<string>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-ui v2.
|
|
2
|
+
* amis-ui v2.8.0
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
9
|
|
|
10
|
+
var tslib = require('tslib');
|
|
10
11
|
var React = require('react');
|
|
11
12
|
var amisCore = require('amis-core');
|
|
12
13
|
var useSetState = require('../hooks/use-set-state.js');
|
|
13
14
|
var useTouch = require('../hooks/use-touch.js');
|
|
14
|
-
require('tslib');
|
|
15
15
|
require('lodash/pick');
|
|
16
16
|
var icons = require('./icons.js');
|
|
17
17
|
|
|
@@ -43,10 +43,10 @@ var PullRefresh = React.forwardRef(function (props, ref) {
|
|
|
43
43
|
loadSuccess();
|
|
44
44
|
}
|
|
45
45
|
}, [props.loading]);
|
|
46
|
-
var _a = useSetState["default"]({
|
|
46
|
+
var _a = tslib.__read(useSetState["default"]({
|
|
47
47
|
status: 'normal',
|
|
48
48
|
offsetY: 0
|
|
49
|
-
}), state = _a[0], updateState = _a[1];
|
|
49
|
+
}), 2), state = _a[0], updateState = _a[1];
|
|
50
50
|
var isTouchable = function () {
|
|
51
51
|
return (!props.disabled &&
|
|
52
52
|
state.status !== 'loading' &&
|
|
@@ -53,7 +53,7 @@ export declare class Radios extends React.Component<RadioProps, any> {
|
|
|
53
53
|
render(): JSX.Element;
|
|
54
54
|
}
|
|
55
55
|
declare const _default: {
|
|
56
|
-
new (props: Pick<Omit<RadioProps, keyof import("amis-core").ThemeProps>, "
|
|
56
|
+
new (props: Pick<Omit<RadioProps, keyof import("amis-core").ThemeProps>, "id" | "placeholder" | "onChange" | "value" | "disabled" | "block" | "multiple" | "level" | "loading" | "itemClassName" | "labelClassName" | "labelField" | "valueField" | "itemHeight" | "options" | "multi" | "delimiter" | "pathSeparator" | "simpleValue" | "extractValue" | "creatable" | "virtualThreshold" | "hasError" | "onAdd" | "editable" | "onEdit" | "removable" | "onDelete"> & Partial<Pick<Omit<RadioProps, keyof import("amis-core").ThemeProps>, "type" | "inline" | "optionType" | "joinValues" | "clearable" | "resetValue" | "btnActiveLevel" | "columnsCount">> & Partial<Pick<{
|
|
57
57
|
type: string;
|
|
58
58
|
optionType: string;
|
|
59
59
|
btnActiveLevel: string;
|
|
@@ -68,7 +68,7 @@ declare const _default: {
|
|
|
68
68
|
getWrappedInstance(): any;
|
|
69
69
|
render(): JSX.Element;
|
|
70
70
|
context: any;
|
|
71
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<RadioProps, keyof import("amis-core").ThemeProps>, "
|
|
71
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<RadioProps, keyof import("amis-core").ThemeProps>, "id" | "placeholder" | "onChange" | "value" | "disabled" | "block" | "multiple" | "level" | "loading" | "itemClassName" | "labelClassName" | "labelField" | "valueField" | "itemHeight" | "options" | "multi" | "delimiter" | "pathSeparator" | "simpleValue" | "extractValue" | "creatable" | "virtualThreshold" | "hasError" | "onAdd" | "editable" | "onEdit" | "removable" | "onDelete"> & Partial<Pick<Omit<RadioProps, keyof import("amis-core").ThemeProps>, "type" | "inline" | "optionType" | "joinValues" | "clearable" | "resetValue" | "btnActiveLevel" | "columnsCount">> & Partial<Pick<{
|
|
72
72
|
type: string;
|
|
73
73
|
optionType: string;
|
|
74
74
|
btnActiveLevel: string;
|
|
@@ -79,7 +79,7 @@ declare const _default: {
|
|
|
79
79
|
columnsCount: number;
|
|
80
80
|
}, never>> & import("packages/amis-core/lib/theme").ThemeOutterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
81
81
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
82
|
-
readonly props: Readonly<Pick<Omit<RadioProps, keyof import("amis-core").ThemeProps>, "
|
|
82
|
+
readonly props: Readonly<Pick<Omit<RadioProps, keyof import("amis-core").ThemeProps>, "id" | "placeholder" | "onChange" | "value" | "disabled" | "block" | "multiple" | "level" | "loading" | "itemClassName" | "labelClassName" | "labelField" | "valueField" | "itemHeight" | "options" | "multi" | "delimiter" | "pathSeparator" | "simpleValue" | "extractValue" | "creatable" | "virtualThreshold" | "hasError" | "onAdd" | "editable" | "onEdit" | "removable" | "onDelete"> & Partial<Pick<Omit<RadioProps, keyof import("amis-core").ThemeProps>, "type" | "inline" | "optionType" | "joinValues" | "clearable" | "resetValue" | "btnActiveLevel" | "columnsCount">> & Partial<Pick<{
|
|
83
83
|
type: string;
|
|
84
84
|
optionType: string;
|
|
85
85
|
btnActiveLevel: string;
|
|
@@ -96,7 +96,7 @@ declare const _default: {
|
|
|
96
96
|
[key: string]: React.ReactInstance;
|
|
97
97
|
};
|
|
98
98
|
componentDidMount?(): void;
|
|
99
|
-
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<RadioProps, keyof import("amis-core").ThemeProps>, "
|
|
99
|
+
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<RadioProps, keyof import("amis-core").ThemeProps>, "id" | "placeholder" | "onChange" | "value" | "disabled" | "block" | "multiple" | "level" | "loading" | "itemClassName" | "labelClassName" | "labelField" | "valueField" | "itemHeight" | "options" | "multi" | "delimiter" | "pathSeparator" | "simpleValue" | "extractValue" | "creatable" | "virtualThreshold" | "hasError" | "onAdd" | "editable" | "onEdit" | "removable" | "onDelete"> & Partial<Pick<Omit<RadioProps, keyof import("amis-core").ThemeProps>, "type" | "inline" | "optionType" | "joinValues" | "clearable" | "resetValue" | "btnActiveLevel" | "columnsCount">> & Partial<Pick<{
|
|
100
100
|
type: string;
|
|
101
101
|
optionType: string;
|
|
102
102
|
btnActiveLevel: string;
|
|
@@ -108,7 +108,7 @@ declare const _default: {
|
|
|
108
108
|
}, never>> & import("packages/amis-core/lib/theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
109
109
|
componentWillUnmount?(): void;
|
|
110
110
|
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
111
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<RadioProps, keyof import("amis-core").ThemeProps>, "
|
|
111
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<RadioProps, keyof import("amis-core").ThemeProps>, "id" | "placeholder" | "onChange" | "value" | "disabled" | "block" | "multiple" | "level" | "loading" | "itemClassName" | "labelClassName" | "labelField" | "valueField" | "itemHeight" | "options" | "multi" | "delimiter" | "pathSeparator" | "simpleValue" | "extractValue" | "creatable" | "virtualThreshold" | "hasError" | "onAdd" | "editable" | "onEdit" | "removable" | "onDelete"> & Partial<Pick<Omit<RadioProps, keyof import("amis-core").ThemeProps>, "type" | "inline" | "optionType" | "joinValues" | "clearable" | "resetValue" | "btnActiveLevel" | "columnsCount">> & Partial<Pick<{
|
|
112
112
|
type: string;
|
|
113
113
|
optionType: string;
|
|
114
114
|
btnActiveLevel: string;
|
|
@@ -118,7 +118,7 @@ declare const _default: {
|
|
|
118
118
|
clearable: boolean;
|
|
119
119
|
columnsCount: number;
|
|
120
120
|
}, never>> & import("packages/amis-core/lib/theme").ThemeOutterProps>, prevState: Readonly<{}>): any;
|
|
121
|
-
componentDidUpdate?(prevProps: Readonly<Pick<Omit<RadioProps, keyof import("amis-core").ThemeProps>, "
|
|
121
|
+
componentDidUpdate?(prevProps: Readonly<Pick<Omit<RadioProps, keyof import("amis-core").ThemeProps>, "id" | "placeholder" | "onChange" | "value" | "disabled" | "block" | "multiple" | "level" | "loading" | "itemClassName" | "labelClassName" | "labelField" | "valueField" | "itemHeight" | "options" | "multi" | "delimiter" | "pathSeparator" | "simpleValue" | "extractValue" | "creatable" | "virtualThreshold" | "hasError" | "onAdd" | "editable" | "onEdit" | "removable" | "onDelete"> & Partial<Pick<Omit<RadioProps, keyof import("amis-core").ThemeProps>, "type" | "inline" | "optionType" | "joinValues" | "clearable" | "resetValue" | "btnActiveLevel" | "columnsCount">> & Partial<Pick<{
|
|
122
122
|
type: string;
|
|
123
123
|
optionType: string;
|
|
124
124
|
btnActiveLevel: string;
|
|
@@ -130,7 +130,7 @@ declare const _default: {
|
|
|
130
130
|
}, never>> & import("packages/amis-core/lib/theme").ThemeOutterProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
131
131
|
componentWillMount?(): void;
|
|
132
132
|
UNSAFE_componentWillMount?(): void;
|
|
133
|
-
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<RadioProps, keyof import("amis-core").ThemeProps>, "
|
|
133
|
+
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<RadioProps, keyof import("amis-core").ThemeProps>, "id" | "placeholder" | "onChange" | "value" | "disabled" | "block" | "multiple" | "level" | "loading" | "itemClassName" | "labelClassName" | "labelField" | "valueField" | "itemHeight" | "options" | "multi" | "delimiter" | "pathSeparator" | "simpleValue" | "extractValue" | "creatable" | "virtualThreshold" | "hasError" | "onAdd" | "editable" | "onEdit" | "removable" | "onDelete"> & Partial<Pick<Omit<RadioProps, keyof import("amis-core").ThemeProps>, "type" | "inline" | "optionType" | "joinValues" | "clearable" | "resetValue" | "btnActiveLevel" | "columnsCount">> & Partial<Pick<{
|
|
134
134
|
type: string;
|
|
135
135
|
optionType: string;
|
|
136
136
|
btnActiveLevel: string;
|
|
@@ -140,7 +140,7 @@ declare const _default: {
|
|
|
140
140
|
clearable: boolean;
|
|
141
141
|
columnsCount: number;
|
|
142
142
|
}, never>> & import("packages/amis-core/lib/theme").ThemeOutterProps>, nextContext: any): void;
|
|
143
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<RadioProps, keyof import("amis-core").ThemeProps>, "
|
|
143
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<RadioProps, keyof import("amis-core").ThemeProps>, "id" | "placeholder" | "onChange" | "value" | "disabled" | "block" | "multiple" | "level" | "loading" | "itemClassName" | "labelClassName" | "labelField" | "valueField" | "itemHeight" | "options" | "multi" | "delimiter" | "pathSeparator" | "simpleValue" | "extractValue" | "creatable" | "virtualThreshold" | "hasError" | "onAdd" | "editable" | "onEdit" | "removable" | "onDelete"> & Partial<Pick<Omit<RadioProps, keyof import("amis-core").ThemeProps>, "type" | "inline" | "optionType" | "joinValues" | "clearable" | "resetValue" | "btnActiveLevel" | "columnsCount">> & Partial<Pick<{
|
|
144
144
|
type: string;
|
|
145
145
|
optionType: string;
|
|
146
146
|
btnActiveLevel: string;
|
|
@@ -150,7 +150,7 @@ declare const _default: {
|
|
|
150
150
|
clearable: boolean;
|
|
151
151
|
columnsCount: number;
|
|
152
152
|
}, never>> & import("packages/amis-core/lib/theme").ThemeOutterProps>, nextContext: any): void;
|
|
153
|
-
componentWillUpdate?(nextProps: Readonly<Pick<Omit<RadioProps, keyof import("amis-core").ThemeProps>, "
|
|
153
|
+
componentWillUpdate?(nextProps: Readonly<Pick<Omit<RadioProps, keyof import("amis-core").ThemeProps>, "id" | "placeholder" | "onChange" | "value" | "disabled" | "block" | "multiple" | "level" | "loading" | "itemClassName" | "labelClassName" | "labelField" | "valueField" | "itemHeight" | "options" | "multi" | "delimiter" | "pathSeparator" | "simpleValue" | "extractValue" | "creatable" | "virtualThreshold" | "hasError" | "onAdd" | "editable" | "onEdit" | "removable" | "onDelete"> & Partial<Pick<Omit<RadioProps, keyof import("amis-core").ThemeProps>, "type" | "inline" | "optionType" | "joinValues" | "clearable" | "resetValue" | "btnActiveLevel" | "columnsCount">> & Partial<Pick<{
|
|
154
154
|
type: string;
|
|
155
155
|
optionType: string;
|
|
156
156
|
btnActiveLevel: string;
|
|
@@ -160,7 +160,7 @@ declare const _default: {
|
|
|
160
160
|
clearable: boolean;
|
|
161
161
|
columnsCount: number;
|
|
162
162
|
}, never>> & import("packages/amis-core/lib/theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
163
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<RadioProps, keyof import("amis-core").ThemeProps>, "
|
|
163
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<RadioProps, keyof import("amis-core").ThemeProps>, "id" | "placeholder" | "onChange" | "value" | "disabled" | "block" | "multiple" | "level" | "loading" | "itemClassName" | "labelClassName" | "labelField" | "valueField" | "itemHeight" | "options" | "multi" | "delimiter" | "pathSeparator" | "simpleValue" | "extractValue" | "creatable" | "virtualThreshold" | "hasError" | "onAdd" | "editable" | "onEdit" | "removable" | "onDelete"> & Partial<Pick<Omit<RadioProps, keyof import("amis-core").ThemeProps>, "type" | "inline" | "optionType" | "joinValues" | "clearable" | "resetValue" | "btnActiveLevel" | "columnsCount">> & Partial<Pick<{
|
|
164
164
|
type: string;
|
|
165
165
|
optionType: string;
|
|
166
166
|
btnActiveLevel: string;
|
package/lib/components/Radios.js
CHANGED
package/lib/components/Range.js
CHANGED