amis-ui 3.1.0 → 3.2.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.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 +1 -1
- 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.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.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 +22 -0
- package/esm/components/Collapse.js +10 -6
- package/esm/components/CollapseGroup.d.ts +23 -1
- package/esm/components/CollapseGroup.js +19 -14
- package/esm/components/ColorPicker.d.ts +4 -0
- package/esm/components/ColorPicker.js +32 -5
- package/esm/components/Combo.js +1 -1
- package/esm/components/ConfirmBox.d.ts +42 -41
- package/esm/components/ConfirmBox.js +11 -4
- package/esm/components/ContextMenu.js +1 -1
- package/esm/components/DatePicker.d.ts +43 -40
- package/esm/components/DatePicker.js +5 -5
- package/esm/components/DateRangePicker.d.ts +40 -40
- package/esm/components/DateRangePicker.js +41 -20
- package/esm/components/DndContainer.js +1 -1
- 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.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.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.d.ts +11 -10
- package/esm/components/InputBox.js +5 -3
- package/esm/components/InputBoxWithSuggestion.d.ts +1 -0
- package/esm/components/InputBoxWithSuggestion.js +3 -3
- package/esm/components/InputTable.js +3 -3
- package/esm/components/Layout.js +1 -1
- package/esm/components/Link.js +1 -1
- package/esm/components/ListGroup.d.ts +10 -10
- package/esm/components/ListGroup.js +1 -1
- package/esm/components/ListMenu.d.ts +41 -40
- 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.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 +12 -15
- package/esm/components/NumberInput.js +9 -5
- package/esm/components/Pagination.d.ts +46 -41
- 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.js +3 -3
- package/esm/components/Progress.js +1 -1
- package/esm/components/PullRefresh.js +1 -1
- package/esm/components/Radios.d.ts +10 -10
- package/esm/components/Radios.js +1 -1
- package/esm/components/Range.d.ts +2 -1
- package/esm/components/Range.js +65 -14
- package/esm/components/Rating.js +1 -1
- package/esm/components/ResultBox.d.ts +83 -41
- package/esm/components/ResultBox.js +6 -5
- package/esm/components/ResultList.js +1 -1
- package/esm/components/ResultTableList.js +1 -1
- package/esm/components/ResultTreeList.d.ts +40 -40
- package/esm/components/ResultTreeList.js +1 -1
- package/esm/components/RichText.js +1 -1
- package/esm/components/SearchBox.d.ts +41 -40
- package/esm/components/SearchBox.js +5 -4
- package/esm/components/Select.d.ts +580 -580
- package/esm/components/Select.js +13 -8
- package/esm/components/SelectMobile.d.ts +37 -0
- package/esm/components/SelectMobile.js +362 -0
- package/esm/components/Selection.js +1 -1
- package/esm/components/SparkLine.js +1 -1
- package/esm/components/Spinner.js +1 -1
- 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 +52 -40
- package/esm/components/Tabs.js +87 -12
- 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.js +1 -1
- 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.js +1 -1
- package/esm/components/Tinymce.js +1 -1
- package/esm/components/TitleBar.js +1 -1
- package/esm/components/Toast.js +1 -1
- package/esm/components/Tooltip.js +1 -1
- package/esm/components/TooltipWrapper.d.ts +1 -1
- package/esm/components/TooltipWrapper.js +1 -1
- package/esm/components/Transfer.d.ts +94 -92
- package/esm/components/Transfer.js +20 -15
- package/esm/components/TransferDropDown.d.ts +84 -80
- 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 +2 -2
- package/esm/components/Tree.d.ts +41 -40
- package/esm/components/Tree.js +25 -16
- 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.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 +7 -7
- 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 +54 -40
- package/esm/components/formula/Editor.js +94 -21
- package/esm/components/formula/FuncList.js +19 -9
- package/esm/components/formula/Picker.d.ts +43 -41
- package/esm/components/formula/Picker.js +39 -17
- package/esm/components/formula/VariableList.d.ts +1 -0
- package/esm/components/formula/VariableList.js +107 -23
- package/esm/components/formula/plugin.d.ts +4 -2
- package/esm/components/formula/plugin.js +49 -25
- package/esm/components/icons.js +1 -1
- package/esm/components/json-schema/Array.js +5 -3
- package/esm/components/json-schema/Item.js +4 -4
- package/esm/components/json-schema/Object.js +8 -4
- 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 +15 -10
- 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.js +1 -1
- package/esm/components/table/HeadCellDropDown.js +1 -1
- package/esm/components/table/HeadCellFilter.js +1 -1
- 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 +1 -1
- 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 +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 +3 -1
- package/esm/locale/en-US.js +3 -1
- package/esm/locale/zh-CN.js +4 -2
- 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 +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/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 +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.d.ts +120 -120
- package/lib/components/Alert.js +1 -1
- package/lib/components/Alert2.d.ts +20 -20
- package/lib/components/Alert2.js +1 -1
- package/lib/components/AnchorNav.d.ts +20 -20
- 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.d.ts +10 -10
- package/lib/components/AsideNav.js +1 -1
- package/lib/components/AssociatedSelection.d.ts +120 -120
- package/lib/components/AssociatedSelection.js +1 -1
- package/lib/components/Avatar.d.ts +110 -110
- package/lib/components/Avatar.js +1 -1
- package/lib/components/Badge.d.ts +1 -1
- package/lib/components/Badge.js +1 -1
- package/lib/components/BaiduMapPicker.js +27 -23
- package/lib/components/BarCode.js +1 -1
- package/lib/components/Breadcrumb.js +1 -1
- package/lib/components/Button.d.ts +30 -30
- package/lib/components/Button.js +1 -1
- package/lib/components/CalendarMobile.d.ts +41 -40
- package/lib/components/CalendarMobile.js +21 -5
- package/lib/components/Card.d.ts +100 -100
- package/lib/components/Card.js +1 -1
- package/lib/components/Cascader.d.ts +4 -3
- package/lib/components/Cascader.js +105 -104
- package/lib/components/ChainedDropdownSelection.d.ts +559 -0
- package/lib/components/ChainedDropdownSelection.js +114 -0
- package/lib/components/ChainedSelection.d.ts +120 -120
- package/lib/components/ChainedSelection.js +1 -1
- package/lib/components/Checkbox.d.ts +11 -10
- package/lib/components/Checkbox.js +2 -1
- package/lib/components/CityArea.js +3 -3
- package/lib/components/CityDB.js +1 -1
- package/lib/components/CodeMirror.js +1 -1
- package/lib/components/Collapse.d.ts +152 -130
- package/lib/components/Collapse.js +9 -5
- package/lib/components/CollapseGroup.d.ts +53 -31
- package/lib/components/CollapseGroup.js +18 -13
- package/lib/components/ColorPicker.d.ts +84 -80
- package/lib/components/ColorPicker.js +32 -5
- package/lib/components/Combo.js +1 -1
- package/lib/components/ConfirmBox.d.ts +82 -81
- package/lib/components/ConfirmBox.js +10 -3
- package/lib/components/ContextMenu.js +1 -1
- package/lib/components/DatePicker.d.ts +124 -121
- package/lib/components/DatePicker.js +5 -5
- package/lib/components/DateRangePicker.d.ts +280 -280
- package/lib/components/DateRangePicker.js +40 -19
- package/lib/components/DndContainer.js +1 -1
- package/lib/components/Drawer.d.ts +30 -30
- package/lib/components/Drawer.js +1 -1
- package/lib/components/DropDownSelection.d.ts +555 -0
- package/lib/components/DropDownSelection.js +85 -0
- package/lib/components/Editor.d.ts +120 -120
- package/lib/components/Editor.js +1 -1
- package/lib/components/Form.js +1 -1
- package/lib/components/FormField.js +1 -1
- package/lib/components/GaodeMapPicker.js +1 -1
- package/lib/components/GridNav.js +1 -1
- package/lib/components/GroupedSelection.d.ts +120 -120
- package/lib/components/GroupedSelection.js +1 -1
- package/lib/components/Html.js +1 -1
- package/lib/components/ImageGallery.d.ts +40 -40
- package/lib/components/ImageGallery.js +1 -1
- package/lib/components/Input.js +1 -1
- package/lib/components/InputBox.d.ts +21 -20
- package/lib/components/InputBox.js +4 -2
- package/lib/components/InputBoxWithSuggestion.d.ts +1 -0
- package/lib/components/InputBoxWithSuggestion.js +3 -3
- package/lib/components/InputTable.js +3 -3
- package/lib/components/Layout.d.ts +10 -10
- 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 +81 -80
- package/lib/components/ListMenu.js +5 -4
- package/lib/components/LocationPicker.d.ts +84 -80
- package/lib/components/LocationPicker.js +34 -7
- package/lib/components/Markdown.js +1 -1
- package/lib/components/Modal.d.ts +80 -80
- package/lib/components/Modal.js +1 -1
- 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 +1 -1
- package/lib/components/NumberInput.d.ts +28 -31
- package/lib/components/NumberInput.js +8 -4
- package/lib/components/Pagination.d.ts +86 -81
- package/lib/components/Pagination.js +12 -3
- package/lib/components/Picker.js +3 -3
- package/lib/components/PickerColumn.d.ts +1 -1
- package/lib/components/PickerColumn.js +2 -2
- package/lib/components/PickerContainer.d.ts +1 -0
- package/lib/components/PickerContainer.js +4 -4
- package/lib/components/PopOverContainer.d.ts +3 -0
- package/lib/components/PopOverContainer.js +14 -3
- package/lib/components/PopUp.d.ts +80 -80
- package/lib/components/PopUp.js +3 -3
- package/lib/components/Progress.d.ts +60 -60
- package/lib/components/Progress.js +1 -1
- package/lib/components/PullRefresh.js +1 -1
- package/lib/components/Radios.d.ts +30 -30
- package/lib/components/Radios.js +1 -1
- package/lib/components/Range.d.ts +2 -1
- package/lib/components/Range.js +64 -13
- package/lib/components/Rating.d.ts +30 -30
- package/lib/components/Rating.js +1 -1
- package/lib/components/ResultBox.d.ts +123 -81
- package/lib/components/ResultBox.js +6 -5
- package/lib/components/ResultList.d.ts +40 -40
- package/lib/components/ResultList.js +1 -1
- package/lib/components/ResultTableList.d.ts +120 -120
- 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 +81 -80
- package/lib/components/SearchBox.js +4 -3
- package/lib/components/Select.d.ts +1738 -1738
- package/lib/components/Select.js +12 -7
- package/lib/components/SelectMobile.d.ts +37 -0
- package/lib/components/SelectMobile.js +371 -0
- package/lib/components/Selection.d.ts +120 -120
- package/lib/components/Selection.js +1 -1
- package/lib/components/SparkLine.d.ts +40 -40
- package/lib/components/SparkLine.js +1 -1
- package/lib/components/Spinner.d.ts +70 -70
- package/lib/components/Spinner.js +1 -1
- 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 +120 -120
- package/lib/components/TableSelection.js +1 -1
- package/lib/components/Tabs.d.ts +92 -80
- package/lib/components/Tabs.js +86 -11
- package/lib/components/TabsTransfer.d.ts +41 -40
- package/lib/components/TabsTransfer.js +6 -5
- package/lib/components/TabsTransferPicker.d.ts +2 -0
- package/lib/components/TabsTransferPicker.js +7 -7
- package/lib/components/Tag.d.ts +70 -70
- package/lib/components/Tag.js +1 -1
- package/lib/components/Textarea.d.ts +41 -40
- package/lib/components/Textarea.js +1 -1
- package/lib/components/Timeline.js +1 -1
- package/lib/components/TimelineItem.js +1 -1
- package/lib/components/Tinymce.js +1 -1
- package/lib/components/TitleBar.js +1 -1
- package/lib/components/Toast.d.ts +80 -80
- package/lib/components/Toast.js +1 -1
- package/lib/components/Tooltip.js +1 -1
- package/lib/components/TooltipWrapper.d.ts +31 -31
- package/lib/components/TooltipWrapper.js +1 -1
- package/lib/components/Transfer.d.ts +134 -132
- package/lib/components/Transfer.js +19 -14
- package/lib/components/TransferDropDown.d.ts +124 -120
- package/lib/components/TransferDropDown.js +52 -18
- package/lib/components/TransferPicker.d.ts +2 -0
- package/lib/components/TransferPicker.js +7 -7
- package/lib/components/TransferSearch.js +2 -2
- package/lib/components/Tree.d.ts +161 -160
- package/lib/components/Tree.js +24 -15
- package/lib/components/TreeSelection.d.ts +120 -120
- package/lib/components/TreeSelection.js +3 -3
- package/lib/components/UserSelect.d.ts +80 -80
- package/lib/components/UserSelect.js +16 -8
- package/lib/components/UserTabSelect.d.ts +40 -40
- package/lib/components/UserTabSelect.js +1 -1
- package/lib/components/WithRemoteConfig.d.ts +1 -0
- package/lib/components/WithRemoteConfig.js +7 -7
- package/lib/components/WithStore.js +1 -1
- package/lib/components/calendar/Calendar.d.ts +2 -0
- package/lib/components/calendar/Calendar.js +7 -3
- package/lib/components/calendar/CalendarContainer.js +1 -1
- package/lib/components/calendar/DaysView.d.ts +3 -0
- package/lib/components/calendar/DaysView.js +17 -5
- package/lib/components/calendar/MonthsView.js +1 -1
- package/lib/components/calendar/QuartersView.d.ts +11 -0
- package/lib/components/calendar/QuartersView.js +45 -3
- package/lib/components/calendar/TimeView.js +4 -2
- package/lib/components/calendar/YearsView.js +1 -1
- package/lib/components/condition-builder/Expression.d.ts +1 -1
- package/lib/components/condition-builder/Expression.js +1 -1
- package/lib/components/condition-builder/Field.d.ts +3 -7
- package/lib/components/condition-builder/Field.js +13 -71
- package/lib/components/condition-builder/Formula.js +2 -2
- package/lib/components/condition-builder/Func.js +2 -2
- package/lib/components/condition-builder/Group.d.ts +10 -1
- package/lib/components/condition-builder/Group.js +9 -5
- package/lib/components/condition-builder/GroupOrItem.d.ts +10 -1
- package/lib/components/condition-builder/GroupOrItem.js +8 -5
- package/lib/components/condition-builder/InputSwitch.js +1 -1
- package/lib/components/condition-builder/Item.d.ts +1 -1
- package/lib/components/condition-builder/Item.js +4 -5
- package/lib/components/condition-builder/Value.js +7 -7
- 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 +8 -4
- package/lib/components/formula/Editor.d.ts +54 -40
- package/lib/components/formula/Editor.js +92 -19
- package/lib/components/formula/FuncList.js +19 -9
- package/lib/components/formula/Picker.d.ts +44 -42
- package/lib/components/formula/Picker.js +38 -16
- package/lib/components/formula/VariableList.d.ts +1 -0
- package/lib/components/formula/VariableList.js +104 -20
- package/lib/components/formula/plugin.d.ts +4 -2
- package/lib/components/formula/plugin.js +48 -24
- package/lib/components/icons.js +1 -1
- package/lib/components/json-schema/Array.js +4 -2
- package/lib/components/json-schema/Item.js +4 -4
- package/lib/components/json-schema/Object.js +7 -3
- package/lib/components/json-schema/index.d.ts +1 -0
- package/lib/components/json-schema/index.js +1 -1
- package/lib/components/menu/MenuContext.js +1 -1
- package/lib/components/menu/MenuItem.js +3 -2
- package/lib/components/menu/SubMenu.js +3 -3
- package/lib/components/menu/index.d.ts +85 -80
- package/lib/components/menu/index.js +34 -14
- package/lib/components/schema-editor/Array.js +3 -3
- package/lib/components/schema-editor/Common.d.ts +1 -0
- package/lib/components/schema-editor/Common.js +7 -7
- package/lib/components/schema-editor/Item.d.ts +1 -0
- package/lib/components/schema-editor/Item.js +1 -1
- package/lib/components/schema-editor/Object.js +5 -5
- 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 +41 -40
- package/lib/components/schema-editor/index.js +3 -3
- 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.d.ts +40 -40
- package/lib/components/table/HeadCellFilter.js +1 -1
- package/lib/components/table/HeadCellSelect.d.ts +40 -40
- package/lib/components/table/HeadCellSelect.js +1 -1
- package/lib/components/table/HeadCellSort.d.ts +5 -2
- package/lib/components/table/HeadCellSort.js +11 -11
- package/lib/components/table/ItemActionsWrapper.js +1 -1
- package/lib/components/table/index.d.ts +81 -81
- package/lib/components/table/index.js +1 -1
- 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/helper.css +9569 -1234
- 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 +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 +3 -1
- package/lib/locale/en-US.js +3 -1
- package/lib/locale/zh-CN.js +4 -2
- 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 +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/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 +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 +1177 -442
- package/lib/themes/ang.js +1 -1
- package/lib/themes/antd.css +1177 -442
- package/lib/themes/antd.js +1 -1
- package/lib/themes/cxd.css +1177 -442
- package/lib/themes/cxd.js +1 -1
- package/lib/themes/dark.css +1177 -442
- package/lib/themes/dark.js +1 -1
- package/lib/themes/default.css +1177 -442
- package/package.json +9 -4
- package/scss/_components.scss +13 -3
- package/scss/_properties.scss +24 -0
- package/scss/components/_button-group.scss +1 -0
- package/scss/components/_calendar.scss +24 -14
- 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 +7 -5
- package/scss/components/_condition-builder.scss +29 -3
- package/scss/components/_crud.scss +22 -12
- package/scss/components/_dropdown.scss +8 -5
- package/scss/components/_formula.scss +100 -34
- package/scss/components/_input-box.scss +24 -0
- package/scss/components/_json-schema.scss +28 -0
- package/scss/components/_list-menu.scss +40 -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/_result-box.scss +5 -0
- package/scss/components/_search-box.scss +6 -0
- package/scss/components/_table.scss +23 -0
- package/scss/components/_tabs.scss +12 -0
- package/scss/components/form/_checks.scss +8 -0
- 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 +10 -10
- package/scss/components/form/_editor.scss +4 -0
- package/scss/components/form/_fieldset.scss +13 -0
- package/scss/components/form/_form.scss +253 -110
- package/scss/components/form/_input-group.scss +6 -0
- package/scss/components/form/_location.scss +39 -0
- package/scss/components/form/_matrix.scss +2 -0
- package/scss/components/form/_nested-select.scss +6 -1
- 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 +38 -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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-ui v3.
|
|
2
|
+
* amis-ui v3.2.0
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -15,6 +15,7 @@ var ResultBox = require('../ResultBox.js');
|
|
|
15
15
|
var Button = require('../Button.js');
|
|
16
16
|
var icons = require('../icons.js');
|
|
17
17
|
var Modal = require('../Modal.js');
|
|
18
|
+
var PopUp = require('../PopUp.js');
|
|
18
19
|
|
|
19
20
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
20
21
|
|
|
@@ -29,7 +30,8 @@ var FormulaPicker = /** @class */ (function (_super) {
|
|
|
29
30
|
isOpened: false,
|
|
30
31
|
value: _this.props.value,
|
|
31
32
|
editorValue: _this.value2EditorValue(_this.props),
|
|
32
|
-
isError: false
|
|
33
|
+
isError: false,
|
|
34
|
+
variables: Array.isArray(props.variables) ? props.variables : []
|
|
33
35
|
};
|
|
34
36
|
return _this;
|
|
35
37
|
}
|
|
@@ -107,14 +109,29 @@ var FormulaPicker = /** @class */ (function (_super) {
|
|
|
107
109
|
FormulaPicker.prototype.handleClick = function () {
|
|
108
110
|
var _a, _b;
|
|
109
111
|
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
110
|
-
var state,
|
|
111
|
-
return tslib.__generator(this, function (
|
|
112
|
-
switch (
|
|
112
|
+
var _c, variables, data, list, result, state, _d;
|
|
113
|
+
return tslib.__generator(this, function (_e) {
|
|
114
|
+
switch (_e.label) {
|
|
113
115
|
case 0:
|
|
114
|
-
_c =
|
|
115
|
-
|
|
116
|
+
_c = this.props, variables = _c.variables, data = _c.data;
|
|
117
|
+
if (!(typeof variables === 'function')) return [3 /*break*/, 2];
|
|
118
|
+
return [4 /*yield*/, variables(this.props)];
|
|
116
119
|
case 1:
|
|
117
|
-
|
|
120
|
+
list = _e.sent();
|
|
121
|
+
this.setState({ variables: list });
|
|
122
|
+
return [3 /*break*/, 4];
|
|
123
|
+
case 2:
|
|
124
|
+
if (!(typeof variables === 'string' && amisCore.isExpression(variables))) return [3 /*break*/, 4];
|
|
125
|
+
return [4 /*yield*/, amisCore.resolveVariableAndFilterForAsync(variables, data, '|raw')];
|
|
126
|
+
case 3:
|
|
127
|
+
result = _e.sent();
|
|
128
|
+
this.setState({ variables: result });
|
|
129
|
+
_e.label = 4;
|
|
130
|
+
case 4:
|
|
131
|
+
_d = [{}];
|
|
132
|
+
return [4 /*yield*/, ((_b = (_a = this.props).onPickerOpen) === null || _b === void 0 ? void 0 : _b.call(_a, this.props))];
|
|
133
|
+
case 5:
|
|
134
|
+
state = tslib.__assign.apply(void 0, [tslib.__assign.apply(void 0, _d.concat([(_e.sent())])), { editorValue: this.value2EditorValue(this.props), isOpened: true }]);
|
|
118
135
|
this.setState(state);
|
|
119
136
|
return [2 /*return*/];
|
|
120
137
|
}
|
|
@@ -157,10 +174,11 @@ var FormulaPicker = /** @class */ (function (_super) {
|
|
|
157
174
|
};
|
|
158
175
|
FormulaPicker.prototype.render = function () {
|
|
159
176
|
var _a, _b, _c;
|
|
160
|
-
var _d, _e, _f, _g, _h;
|
|
161
|
-
var
|
|
162
|
-
var
|
|
177
|
+
var _d, _e, _f, _g, _h, _j;
|
|
178
|
+
var _k = this.props, cx = _k.classnames, __ = _k.translate, disabled = _k.disabled, _l = _k.allowInput, allowInput = _l === void 0 ? true : _l, className = _k.className, style = _k.style; _k.onChange; _k.size; var borderMode = _k.borderMode, placeholder = _k.placeholder, _m = _k.mode, mode = _m === void 0 ? 'input-button' : _m, btnLabel = _k.btnLabel, level = _k.level, btnSize = _k.btnSize, icon = _k.icon, title = _k.title, clearable = _k.clearable, functions = _k.functions, children = _k.children, variableMode = _k.variableMode, mixedMode = _k.mixedMode, evalMode = _k.evalMode, popOverContainer = _k.popOverContainer, useMobileUI = _k.useMobileUI, rest = tslib.__rest(_k, ["classnames", "translate", "disabled", "allowInput", "className", "style", "onChange", "size", "borderMode", "placeholder", "mode", "btnLabel", "level", "btnSize", "icon", "title", "clearable", "functions", "children", "variableMode", "mixedMode", "evalMode", "popOverContainer", "useMobileUI"]);
|
|
179
|
+
var _o = this.state, isOpened = _o.isOpened, value = _o.value, editorValue = _o.editorValue, isError = _o.isError;
|
|
163
180
|
var iconElement = amisCore.generateIcon(cx, icon, 'Icon');
|
|
181
|
+
var mobileUI = useMobileUI && amisCore.isMobile();
|
|
164
182
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
165
183
|
children ? (children({
|
|
166
184
|
isOpened: this.state.isOpened,
|
|
@@ -179,7 +197,7 @@ var FormulaPicker = /** @class */ (function (_super) {
|
|
|
179
197
|
mode === 'input-button' && (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
180
198
|
React__default["default"].createElement(ResultBox["default"], { className: cx('FormulaPicker-input', isOpened ? 'is-active' : '', !!isError ? 'is-error' : ''), allowInput: allowInput, clearable: clearable, value: value, result: allowInput
|
|
181
199
|
? void 0
|
|
182
|
-
: Editor.FormulaEditor.highlightValue(value, variables, this.props.evalMode), itemRender: this.renderFormulaValue, onResultChange: amisCore.noop, onChange: this.handleInputChange, disabled: disabled, borderMode: borderMode, placeholder: placeholder }),
|
|
200
|
+
: Editor.FormulaEditor.highlightValue(value, this.state.variables, this.props.evalMode), itemRender: this.renderFormulaValue, onResultChange: amisCore.noop, onChange: this.handleInputChange, disabled: disabled, borderMode: borderMode, placeholder: placeholder, useMobileUI: useMobileUI, showArrow: false }),
|
|
183
201
|
React__default["default"].createElement(Button["default"], { className: cx('FormulaPicker-action'), onClick: this.handleClick },
|
|
184
202
|
React__default["default"].createElement(icons.Icon, { icon: "function", className: cx('FormulaPicker-icon', 'icon', (_c = {},
|
|
185
203
|
_c['is-filled'] = !!value,
|
|
@@ -187,18 +205,22 @@ var FormulaPicker = /** @class */ (function (_super) {
|
|
|
187
205
|
mode === 'input-group' && (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
188
206
|
React__default["default"].createElement(ResultBox["default"], { className: cx('FormulaPicker-input', isOpened ? 'is-active' : '', !!isError ? 'is-error' : ''), allowInput: allowInput, clearable: clearable, value: value, result: allowInput
|
|
189
207
|
? void 0
|
|
190
|
-
: Editor.FormulaEditor.highlightValue(value, variables, this.props.evalMode), itemRender: this.renderFormulaValue, onResultChange: amisCore.noop, onChange: this.handleInputChange, disabled: disabled, borderMode: borderMode, placeholder: placeholder }),
|
|
208
|
+
: Editor.FormulaEditor.highlightValue(value, this.state.variables, this.props.evalMode), itemRender: this.renderFormulaValue, onResultChange: amisCore.noop, onChange: this.handleInputChange, disabled: disabled, borderMode: borderMode, placeholder: placeholder, useMobileUI: useMobileUI, showArrow: false }),
|
|
191
209
|
React__default["default"].createElement("a", { className: cx("FormulaPicker-toggler"), onClick: this.handleClick },
|
|
192
210
|
React__default["default"].createElement(icons.Icon, { icon: "function", className: "icon" })))))),
|
|
193
|
-
React__default["default"].createElement(
|
|
211
|
+
mobileUI ? (React__default["default"].createElement(PopUp["default"], { className: cx("FormulaPicker-popup"), isShow: this.state.isOpened, showConfirm: true, onHide: this.close, onConfirm: this.handleEditorConfirm, container: popOverContainer },
|
|
212
|
+
React__default["default"].createElement("div", { className: cx('FormulaPicker-popup-inner') },
|
|
213
|
+
React__default["default"].createElement(Editor["default"], tslib.__assign({}, rest, { evalMode: mixedMode ? true : evalMode, variables: this.state.variables, functions: (_f = this.state.functions) !== null && _f !== void 0 ? _f : functions, variableMode: (_g = this.state.variableMode) !== null && _g !== void 0 ? _g : variableMode, value: editorValue, onChange: this.handleEditorChange, selfVariableName: this.props.selfVariableName })),
|
|
214
|
+
!!isError ? (React__default["default"].createElement("div", { className: cx('Dialog-info'), key: "info" },
|
|
215
|
+
React__default["default"].createElement("span", { className: cx('Dialog-error') }, __('FormulaEditor.invalidData', { err: isError })))) : null))) : (React__default["default"].createElement(Modal["default"], { size: "lg", closeOnEsc: true, show: this.state.isOpened, onHide: this.close, container: popOverContainer },
|
|
194
216
|
React__default["default"].createElement(Modal["default"].Header, { onClose: this.close, className: "font-bold" }, __(title || 'FormulaEditor.title')),
|
|
195
217
|
React__default["default"].createElement(Modal["default"].Body, null,
|
|
196
|
-
React__default["default"].createElement(Editor["default"], tslib.__assign({}, rest, { evalMode: mixedMode ? true : evalMode, variables:
|
|
218
|
+
React__default["default"].createElement(Editor["default"], tslib.__assign({}, rest, { evalMode: mixedMode ? true : evalMode, variables: this.state.variables, functions: (_h = this.state.functions) !== null && _h !== void 0 ? _h : functions, variableMode: (_j = this.state.variableMode) !== null && _j !== void 0 ? _j : variableMode, value: editorValue, onChange: this.handleEditorChange, selfVariableName: this.props.selfVariableName }))),
|
|
197
219
|
React__default["default"].createElement(Modal["default"].Footer, null,
|
|
198
220
|
!!isError ? (React__default["default"].createElement("div", { className: cx('Dialog-info'), key: "info" },
|
|
199
221
|
React__default["default"].createElement("span", { className: cx('Dialog-error') }, __('FormulaEditor.invalidData', { err: isError })))) : null,
|
|
200
222
|
React__default["default"].createElement(Button["default"], { onClick: this.close }, __('cancel')),
|
|
201
|
-
React__default["default"].createElement(Button["default"], { onClick: this.handleEditorConfirm, level: "primary" }, __('confirm'))))));
|
|
223
|
+
React__default["default"].createElement(Button["default"], { onClick: this.handleEditorConfirm, level: "primary" }, __('confirm')))))));
|
|
202
224
|
};
|
|
203
225
|
FormulaPicker.defaultProps = {
|
|
204
226
|
evalMode: true
|
|
@@ -17,6 +17,7 @@ export interface VariableListProps extends ThemeProps, SpinnerExtraProps {
|
|
|
17
17
|
placeholderRender?: (props: any) => JSX.Element | null;
|
|
18
18
|
onSelect?: (item: VariableItem) => void;
|
|
19
19
|
selfVariableName?: string;
|
|
20
|
+
expandTree?: boolean;
|
|
20
21
|
}
|
|
21
22
|
declare function VariableList(props: VariableListProps): React.JSX.Element;
|
|
22
23
|
declare const _default: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-ui v3.
|
|
2
|
+
* amis-ui v3.2.0
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -15,45 +15,129 @@ var Tabs = require('../Tabs.js');
|
|
|
15
15
|
var TreeSelection = require('../TreeSelection.js');
|
|
16
16
|
var SearchBox = require('../SearchBox.js');
|
|
17
17
|
var Badge = require('../Badge.js');
|
|
18
|
+
var PopOverContainer = require('../PopOverContainer.js');
|
|
19
|
+
var matchSorter = require('match-sorter');
|
|
20
|
+
var TooltipWrapper = require('../TooltipWrapper.js');
|
|
18
21
|
|
|
19
22
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
20
23
|
|
|
21
24
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
22
25
|
|
|
26
|
+
// 数组成员读取
|
|
27
|
+
var memberOpers = [
|
|
28
|
+
{
|
|
29
|
+
label: '取该成员的记录',
|
|
30
|
+
value: 'ARRAYMAP(${arr}, item => item.${member})'
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
label: '取该成员的记录并过滤',
|
|
34
|
+
value: 'ARRAYFILTER(${arr}, item => item.${member})'
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
label: '取该成员列表记录中符合条件的总数',
|
|
38
|
+
value: 'COUNT(ARRAYFILTER(${arr}, item => item.${member} === 条件))'
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
label: '取该成员去重之后的总数',
|
|
42
|
+
value: 'COUNT(UNIQ(${arr}, item.${member}))'
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
label: '取该成员的总和',
|
|
46
|
+
value: 'SUM(ARRAYMAP(${arr}, item => item.${member}))'
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
label: '取该成员的平均值',
|
|
50
|
+
value: 'AVG(ARRAYMAP(${arr}, item => item.${member}))'
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
label: '取该成员的最大值',
|
|
54
|
+
value: 'MAX(ARRAYMAP(${arr}, item => item.${member}))'
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
label: '取该成员的最小值',
|
|
58
|
+
value: 'MIN(ARRAYMAP(${arr}, item => item.${member}))'
|
|
59
|
+
}
|
|
60
|
+
];
|
|
23
61
|
function VariableList(props) {
|
|
24
|
-
var
|
|
62
|
+
var variableListRef = React__default["default"].useRef(null);
|
|
63
|
+
var list = props.data, className = props.className, cx = props.classnames, _a = props.tabsMode, tabsMode = _a === void 0 ? 'line' : _a, themePrefix = props.classPrefix, itemClassName = props.itemClassName, selectMode = props.selectMode, onSelect = props.onSelect, placeholderRender = props.placeholderRender, selfVariableName = props.selfVariableName, expandTree = props.expandTree;
|
|
25
64
|
var _b = tslib.__read(React__default["default"].useState(list), 2), filterVars = _b[0], setFilterVars = _b[1];
|
|
26
65
|
var classPrefix = "".concat(themePrefix, "FormulaEditor-VariableList");
|
|
66
|
+
React.useEffect(function () {
|
|
67
|
+
var data = props.data;
|
|
68
|
+
if (data) {
|
|
69
|
+
setFilterVars(data);
|
|
70
|
+
}
|
|
71
|
+
}, [props.data]);
|
|
27
72
|
var itemRender = props.itemRender && typeof props.itemRender === 'function'
|
|
28
73
|
? props.itemRender
|
|
29
74
|
: function (option, states) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
option.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
75
|
+
var _a;
|
|
76
|
+
return (React__default["default"].createElement("div", null,
|
|
77
|
+
React__default["default"].createElement("div", { className: cx("".concat(classPrefix, "-item"), itemClassName) },
|
|
78
|
+
option.label &&
|
|
79
|
+
selfVariableName &&
|
|
80
|
+
option.value === selfVariableName && (React__default["default"].createElement(Badge.Badge, { classnames: cx, badge: {
|
|
81
|
+
mode: 'text',
|
|
82
|
+
text: 'self',
|
|
83
|
+
offset: [15, 2]
|
|
84
|
+
} },
|
|
85
|
+
React__default["default"].createElement("label", null, option.label))),
|
|
86
|
+
option.label &&
|
|
87
|
+
(!selfVariableName || option.value !== selfVariableName) && (React__default["default"].createElement(TooltipWrapper["default"], { tooltip: (_a = option.description) !== null && _a !== void 0 ? _a : option.label, tooltipTheme: "dark" },
|
|
88
|
+
React__default["default"].createElement("label", null, option.label))),
|
|
89
|
+
option.memberDepth < 2 ? (React__default["default"].createElement(PopOverContainer.PopOverContainer, { popOverContainer: function () {
|
|
90
|
+
return document.querySelector(".".concat(cx('FormulaPicker-Modal')));
|
|
91
|
+
}, popOverRender: function (_a) {
|
|
92
|
+
var onClose = _a.onClose;
|
|
93
|
+
return (React__default["default"].createElement("ul", { className: cx("".concat(classPrefix, "-item-oper")) }, memberOpers.map(function (item, i) {
|
|
94
|
+
return (React__default["default"].createElement("li", { key: i, onClick: function () {
|
|
95
|
+
return handleMemberClick(tslib.__assign(tslib.__assign({}, item), { isMember: true }), option, onClose);
|
|
96
|
+
} },
|
|
97
|
+
React__default["default"].createElement("span", null, item.label)));
|
|
98
|
+
})));
|
|
99
|
+
} }, function (_a) {
|
|
100
|
+
var onClick = _a.onClick; _a.ref; _a.isOpened;
|
|
101
|
+
return (React__default["default"].createElement("i", { className: "fa fa-ellipsis-h", onClick: onClick }));
|
|
102
|
+
})) : null,
|
|
103
|
+
(option === null || option === void 0 ? void 0 : option.tag) ? (React__default["default"].createElement("span", { className: cx("".concat(classPrefix, "-item-tag")) }, option.tag)) : null)));
|
|
42
104
|
};
|
|
105
|
+
function handleMemberClick(item, option, onClose) {
|
|
106
|
+
// todo:暂时只提供一层的快捷操作
|
|
107
|
+
var lastPointIdx = option.value.lastIndexOf('.');
|
|
108
|
+
var arr = option.value.substring(0, lastPointIdx);
|
|
109
|
+
var member = option.value.substring(lastPointIdx + 1);
|
|
110
|
+
var value = item.value
|
|
111
|
+
.replace('${arr}', arr)
|
|
112
|
+
.replace('${member}', member);
|
|
113
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
114
|
+
onSelect === null || onSelect === void 0 ? void 0 : onSelect(tslib.__assign(tslib.__assign({}, item), { label: value, value: value }));
|
|
115
|
+
}
|
|
43
116
|
function onSearch(term) {
|
|
44
|
-
var tree = amisCore.
|
|
117
|
+
var tree = amisCore.filterTree(list, function (i, key, level, paths) {
|
|
118
|
+
return !!((Array.isArray(i.children) && i.children.length) ||
|
|
119
|
+
!!matchSorter.matchSorter([i].concat(paths), term, {
|
|
120
|
+
keys: ['label', 'value']
|
|
121
|
+
}).length);
|
|
122
|
+
}, 1, true);
|
|
45
123
|
setFilterVars(!term ? list : tree);
|
|
46
124
|
}
|
|
47
125
|
function renderSearchBox() {
|
|
48
126
|
return (React__default["default"].createElement("div", { className: cx('FormulaEditor-VariableList-searchBox') },
|
|
49
|
-
React__default["default"].createElement(SearchBox["default"], { mini: false, onSearch: onSearch })));
|
|
127
|
+
React__default["default"].createElement(SearchBox["default"], { mini: false, onSearch: onSearch, useMobileUI: true })));
|
|
128
|
+
}
|
|
129
|
+
function handleChange(item) {
|
|
130
|
+
if (item.isMember) {
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
onSelect === null || onSelect === void 0 ? void 0 : onSelect(item);
|
|
50
134
|
}
|
|
51
|
-
return (React__default["default"].createElement("div", { className: cx(className, 'FormulaEditor-VariableList', selectMode && "FormulaEditor-VariableList-".concat(selectMode)) }, selectMode === 'tabs' ? (React__default["default"].createElement(Tabs["default"], { tabsMode: tabsMode, className: cx("".concat(classPrefix, "-base ").concat(classPrefix, "-tabs")) }, filterVars.map(function (item, index) { return (React__default["default"].createElement(Tabs.Tab, { className: cx("".concat(classPrefix, "-tab")), eventKey: index, key: index, title: item.label },
|
|
52
|
-
React__default["default"].createElement(VariableList, { classnames: cx, classPrefix: "".concat(classPrefix, "-sub-"), className: cx("".concat(classPrefix, "-sub")), itemRender: itemRender, placeholderRender: placeholderRender, selectMode: item.selectMode, data: item.children, onSelect:
|
|
135
|
+
return (React__default["default"].createElement("div", { className: cx(className, 'FormulaEditor-VariableList', selectMode && "FormulaEditor-VariableList-".concat(selectMode)), ref: variableListRef }, selectMode === 'tabs' ? (React__default["default"].createElement(Tabs["default"], { tabsMode: tabsMode, className: cx("".concat(classPrefix, "-base ").concat(classPrefix, "-tabs")) }, filterVars.map(function (item, index) { return (React__default["default"].createElement(Tabs.Tab, { className: cx("".concat(classPrefix, "-tab")), eventKey: index, key: index, title: item.label },
|
|
136
|
+
React__default["default"].createElement(VariableList, { classnames: cx, classPrefix: "".concat(classPrefix, "-sub-"), className: cx("".concat(classPrefix, "-sub")), itemRender: itemRender, placeholderRender: placeholderRender, selectMode: item.selectMode, data: item.children, onSelect: handleChange, selfVariableName: selfVariableName }))); }))) : selectMode === 'tree' ? (React__default["default"].createElement("div", { className: cx('FormulaEditor-VariableList-body') },
|
|
53
137
|
renderSearchBox(),
|
|
54
|
-
React__default["default"].createElement(TreeSelection["default"], { itemRender: itemRender, placeholderRender: placeholderRender, className: cx("".concat(classPrefix, "-base"), 'is-scrollable'), multiple: false, options: filterVars, onChange: function (item) { return
|
|
138
|
+
React__default["default"].createElement(TreeSelection["default"], { itemRender: itemRender, placeholderRender: placeholderRender, className: cx("".concat(classPrefix, "-base"), 'is-scrollable'), multiple: false, expand: expandTree ? 'all' : 'none', options: filterVars, onChange: function (item) { return handleChange(item); } }))) : (React__default["default"].createElement("div", { className: cx('FormulaEditor-VariableList-body') },
|
|
55
139
|
renderSearchBox(),
|
|
56
|
-
React__default["default"].createElement(GroupedSelection["default"], { itemRender: itemRender, placeholderRender: placeholderRender, className: cx("".concat(classPrefix, "-base"), 'is-scrollable'), multiple: false, options: filterVars, onChange: function (item) { return
|
|
140
|
+
React__default["default"].createElement(GroupedSelection["default"], { itemRender: itemRender, placeholderRender: placeholderRender, className: cx("".concat(classPrefix, "-base"), 'is-scrollable'), multiple: false, options: filterVars, onChange: function (item) { return handleChange(item); } })))));
|
|
57
141
|
}
|
|
58
142
|
var VariableList$1 = amisCore.themeable(VariableList);
|
|
59
143
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type CodeMirror from 'codemirror';
|
|
5
5
|
import { FormulaEditorProps, VariableItem } from './Editor';
|
|
6
|
-
export declare function editorFactory(dom: HTMLElement, cm: typeof CodeMirror, props: any): CodeMirror.Editor;
|
|
6
|
+
export declare function editorFactory(dom: HTMLElement, cm: typeof CodeMirror, props: any, options?: any): CodeMirror.Editor;
|
|
7
7
|
export declare class FormulaPlugin {
|
|
8
8
|
readonly editor: CodeMirror.Editor;
|
|
9
9
|
readonly cm: typeof CodeMirror;
|
|
@@ -19,7 +19,9 @@ export declare class FormulaPlugin {
|
|
|
19
19
|
end: number;
|
|
20
20
|
}[]): boolean;
|
|
21
21
|
insertBraces(originFrom: CodeMirror.Position, originTo: CodeMirror.Position): void;
|
|
22
|
-
insertContent(value: any, type?: 'variable' | 'func'): void;
|
|
22
|
+
insertContent(value: any, type?: 'variable' | 'func', className?: string, toMark?: boolean): void;
|
|
23
|
+
setValue(value: string): void;
|
|
24
|
+
getValue(): string;
|
|
23
25
|
markText(from: CodeMirror.Position, to: CodeMirror.Position, label: string, className?: string): void;
|
|
24
26
|
autoMark(variables: Array<VariableItem>): void;
|
|
25
27
|
focus(value: string): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-ui v3.
|
|
2
|
+
* amis-ui v3.2.0
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -14,13 +14,9 @@ var Editor = require('./Editor.js');
|
|
|
14
14
|
/**
|
|
15
15
|
* @file 扩展 codemirror
|
|
16
16
|
*/
|
|
17
|
-
function editorFactory(dom, cm, props) {
|
|
17
|
+
function editorFactory(dom, cm, props, options) {
|
|
18
18
|
registerLaunguageMode(cm);
|
|
19
|
-
return cm(dom, {
|
|
20
|
-
value: props.value || '',
|
|
21
|
-
autofocus: true,
|
|
22
|
-
mode: props.evalMode ? 'text/formula' : 'text/formula-template'
|
|
23
|
-
});
|
|
19
|
+
return cm(dom, tslib.__assign({ value: props.value || '', autofocus: true, mode: props.evalMode ? 'text/formula' : 'text/formula-template' }, options));
|
|
24
20
|
}
|
|
25
21
|
var FormulaPlugin = /** @class */ (function () {
|
|
26
22
|
function FormulaPlugin(editor, cm, getProps) {
|
|
@@ -94,22 +90,34 @@ var FormulaPlugin = /** @class */ (function () {
|
|
|
94
90
|
this.editor.replaceSelection('}');
|
|
95
91
|
}
|
|
96
92
|
};
|
|
97
|
-
FormulaPlugin.prototype.insertContent = function (value, type) {
|
|
93
|
+
FormulaPlugin.prototype.insertContent = function (value, type, className, toMark) {
|
|
94
|
+
var _this = this;
|
|
95
|
+
if (className === void 0) { className = 'cm-field'; }
|
|
96
|
+
if (toMark === void 0) { toMark = true; }
|
|
98
97
|
var from = this.editor.getCursor();
|
|
99
98
|
var evalMode = this.getProps().evalMode;
|
|
100
99
|
if (type === 'variable') {
|
|
101
100
|
this.editor.replaceSelection(value.key);
|
|
102
|
-
var
|
|
103
|
-
|
|
104
|
-
|
|
101
|
+
var to_1 = this.editor.getCursor();
|
|
102
|
+
if (toMark) {
|
|
103
|
+
// 路径中每个变量分别进行标记
|
|
104
|
+
var markFrom_1 = from.ch;
|
|
105
|
+
value.path.split('.').forEach(function (label, index) {
|
|
106
|
+
var val = value.key.split('.')[index];
|
|
107
|
+
_this.markText({ line: from.line, ch: markFrom_1 }, { line: to_1.line, ch: markFrom_1 + val.length }, label, className);
|
|
108
|
+
markFrom_1 += 1 + val.length;
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
!evalMode && this.insertBraces(from, to_1);
|
|
105
112
|
}
|
|
106
113
|
else if (type === 'func') {
|
|
107
114
|
this.editor.replaceSelection("".concat(value, "()"));
|
|
108
115
|
var to = this.editor.getCursor();
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
116
|
+
toMark &&
|
|
117
|
+
this.markText(from, {
|
|
118
|
+
line: to.line,
|
|
119
|
+
ch: to.ch - 2
|
|
120
|
+
}, value, 'cm-func');
|
|
113
121
|
this.editor.setCursor({
|
|
114
122
|
line: to.line,
|
|
115
123
|
ch: to.ch - 1
|
|
@@ -124,9 +132,17 @@ var FormulaPlugin = /** @class */ (function () {
|
|
|
124
132
|
}
|
|
125
133
|
else if (typeof value === 'string') {
|
|
126
134
|
this.editor.replaceSelection(value);
|
|
135
|
+
// 非变量、非函数,可能是组合模式,也需要标记
|
|
136
|
+
toMark && setTimeout(function () { return _this.autoMarkText(); }, 0);
|
|
127
137
|
}
|
|
128
138
|
this.editor.focus();
|
|
129
139
|
};
|
|
140
|
+
FormulaPlugin.prototype.setValue = function (value) {
|
|
141
|
+
this.editor.setValue(value);
|
|
142
|
+
};
|
|
143
|
+
FormulaPlugin.prototype.getValue = function () {
|
|
144
|
+
return this.editor.getValue();
|
|
145
|
+
};
|
|
130
146
|
FormulaPlugin.prototype.markText = function (from, to, label, className) {
|
|
131
147
|
if (className === void 0) { className = 'cm-func'; }
|
|
132
148
|
var text = document.createElement('span');
|
|
@@ -144,8 +160,9 @@ var FormulaPlugin = /** @class */ (function () {
|
|
|
144
160
|
}
|
|
145
161
|
var varMap = {};
|
|
146
162
|
amisCore.eachTree(variables, function (item) {
|
|
163
|
+
var _a;
|
|
147
164
|
if (item.value) {
|
|
148
|
-
varMap[item.value] = item.label;
|
|
165
|
+
varMap[item.value] = (_a = item.path) !== null && _a !== void 0 ? _a : item.label;
|
|
149
166
|
}
|
|
150
167
|
});
|
|
151
168
|
var vars = Object.keys(varMap).sort(function (a, b) { return b.length - a.length; });
|
|
@@ -170,19 +187,26 @@ var FormulaPlugin = /** @class */ (function () {
|
|
|
170
187
|
vars.forEach(function (v) {
|
|
171
188
|
var from = 0;
|
|
172
189
|
var idx = -1;
|
|
173
|
-
|
|
190
|
+
var _loop_2 = function () {
|
|
174
191
|
var encode = Editor.FormulaEditor.replaceStrByIndex(content, idx, v, REPLACE_KEY);
|
|
175
192
|
var reg = Editor.FormulaEditor.getRegExpByMode(evalMode, REPLACE_KEY);
|
|
176
193
|
if (reg.test(encode)) {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
194
|
+
var markFrom_2 = idx;
|
|
195
|
+
v.split('.').forEach(function (val, index) {
|
|
196
|
+
_this.markText({
|
|
197
|
+
line: line,
|
|
198
|
+
ch: markFrom_2
|
|
199
|
+
}, {
|
|
200
|
+
line: line,
|
|
201
|
+
ch: markFrom_2 + val.length
|
|
202
|
+
}, varMap[v].split('.')[index], 'cm-field');
|
|
203
|
+
markFrom_2 += 1 + val.length;
|
|
204
|
+
});
|
|
184
205
|
}
|
|
185
206
|
from = idx + v.length;
|
|
207
|
+
};
|
|
208
|
+
while (~(idx = content.indexOf(v, from))) {
|
|
209
|
+
_loop_2();
|
|
186
210
|
}
|
|
187
211
|
});
|
|
188
212
|
};
|
package/lib/components/icons.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-ui v3.
|
|
2
|
+
* amis-ui v3.2.0
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -20,7 +20,7 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
20
20
|
|
|
21
21
|
function InputJSONSchemaArray(props) {
|
|
22
22
|
var _a, _b, _c;
|
|
23
|
-
var cx = props.classnames, value = props.value, onChange = props.onChange, disabled = props.disabled, __ = props.translate, collapsable = props.collapsable, renderValue = props.renderValue;
|
|
23
|
+
var cx = props.classnames, value = props.value, onChange = props.onChange, disabled = props.disabled, __ = props.translate, collapsable = props.collapsable, renderValue = props.renderValue, useMobileUI = props.useMobileUI;
|
|
24
24
|
var buildMembers = React__default["default"].useCallback(function (schema, value) {
|
|
25
25
|
var members = [];
|
|
26
26
|
var len = Array.isArray(value) ? value.length : 1;
|
|
@@ -111,12 +111,14 @@ function InputJSONSchemaArray(props) {
|
|
|
111
111
|
// todo additionalProperties 还有其他格式
|
|
112
112
|
var allowAdd = !maxContains || maxContains > members.length;
|
|
113
113
|
var allowDelete = !minContains || minContains < members.length;
|
|
114
|
+
var mobileUI = useMobileUI && amisCore.isMobile();
|
|
114
115
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
115
116
|
collapsable ? (React__default["default"].createElement("a", { className: cx('JSONSchemaObject-caret', {
|
|
116
117
|
'is-collapsed': collapsed
|
|
117
118
|
}), onClick: toggleCollapsed },
|
|
118
119
|
React__default["default"].createElement(icons.Icon, { icon: "caret", className: "icon" }))) : null,
|
|
119
120
|
React__default["default"].createElement("div", { className: cx('JSONSchemaObject', {
|
|
121
|
+
'is-mobile': mobileUI,
|
|
120
122
|
'is-expanded': collapsable && !collapsed
|
|
121
123
|
}) },
|
|
122
124
|
collapsed ? (renderValue ? (React__default["default"].createElement(Item.InputJSONSchemaItem, tslib.__assign({}, props, { value: value, onChange: onChange, schema: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-ui v3.
|
|
2
|
+
* amis-ui v3.2.0
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -31,15 +31,15 @@ function InputJSONSchemaItem(props) {
|
|
|
31
31
|
return props.renderValue(props.value, props.onChange, schema, props);
|
|
32
32
|
}
|
|
33
33
|
else if (schema.type == 'number') {
|
|
34
|
-
return (React__default["default"].createElement(NumberInput["default"], { value: props.value, onChange: props.onChange, placeholder: props.placeholder }));
|
|
34
|
+
return (React__default["default"].createElement(NumberInput["default"], { value: props.value, onChange: props.onChange, placeholder: props.placeholder, useMobileUI: props.useMobileUI }));
|
|
35
35
|
}
|
|
36
36
|
else if (schema.type == 'integer') {
|
|
37
|
-
return (React__default["default"].createElement(NumberInput["default"], { value: props.value, onChange: props.onChange, precision: 0, placeholder: props.placeholder }));
|
|
37
|
+
return (React__default["default"].createElement(NumberInput["default"], { value: props.value, onChange: props.onChange, precision: 0, placeholder: props.placeholder, useMobileUI: props.useMobileUI }));
|
|
38
38
|
}
|
|
39
39
|
else if (schema.type == 'boolean') {
|
|
40
40
|
return (React__default["default"].createElement(Switch["default"], { value: props.value, onChange: props.onChange, className: "mt-2" }));
|
|
41
41
|
}
|
|
42
|
-
return (React__default["default"].createElement(InputBox["default"], { value: props.value, onChange: props.onChange, placeholder: props.placeholder }));
|
|
42
|
+
return (React__default["default"].createElement(InputBox["default"], { value: props.value, onChange: props.onChange, placeholder: props.placeholder, useMobileUI: props.useMobileUI }));
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
exports.InputJSONSchemaItem = InputJSONSchemaItem;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-ui v3.
|
|
2
|
+
* amis-ui v3.2.0
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -23,7 +23,7 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
23
23
|
|
|
24
24
|
function InputJSONSchemaObject(props) {
|
|
25
25
|
var _a, _b;
|
|
26
|
-
var cx = props.classnames, value = props.value, onChange = props.onChange, disabled = props.disabled, __ = props.translate, renderKey = props.renderKey, collapsable = props.collapsable, renderValue = props.renderValue;
|
|
26
|
+
var cx = props.classnames, value = props.value, onChange = props.onChange, disabled = props.disabled, __ = props.translate, renderKey = props.renderKey, collapsable = props.collapsable, renderValue = props.renderValue, useMobileUI = props.useMobileUI;
|
|
27
27
|
var buildMembers = React__default["default"].useCallback(function (schema, value) {
|
|
28
28
|
var e_1, _a;
|
|
29
29
|
var members = [];
|
|
@@ -179,12 +179,14 @@ function InputJSONSchemaObject(props) {
|
|
|
179
179
|
var allowAdd = !(props.schema.additionalProperties === false &&
|
|
180
180
|
options.every(function (o) { return members.find(function (m) { return m.name === o.value; }); }));
|
|
181
181
|
var allowInput = props.schema.additionalProperties !== false;
|
|
182
|
+
var mobileUI = useMobileUI && amisCore.isMobile();
|
|
182
183
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
183
184
|
collapsable ? (React__default["default"].createElement("a", { className: cx('JSONSchemaObject-caret', {
|
|
184
185
|
'is-collapsed': collapsed
|
|
185
186
|
}), onClick: toggleCollapsed },
|
|
186
187
|
React__default["default"].createElement(icons.Icon, { icon: "caret", className: "icon" }))) : null,
|
|
187
188
|
React__default["default"].createElement("div", { className: cx('JSONSchemaObject', {
|
|
189
|
+
'is-mobile': mobileUI,
|
|
188
190
|
'is-expanded': collapsable && !collapsed
|
|
189
191
|
}) },
|
|
190
192
|
collapsed ? (renderValue ? (React__default["default"].createElement(Item.InputJSONSchemaItem, tslib.__assign({}, props, { value: value, onChange: onChange, schema: {
|
|
@@ -193,7 +195,9 @@ function InputJSONSchemaObject(props) {
|
|
|
193
195
|
var _a, _b;
|
|
194
196
|
var filtedOptions = options.filter(function (o) { return !members.find(function (m) { return m !== member && m.name === o.value; }); });
|
|
195
197
|
return (React__default["default"].createElement("div", { key: member.key, className: cx('JSONSchemaMember') },
|
|
196
|
-
React__default["default"].createElement("div", { className: cx('JSONSchemaMember-key'
|
|
198
|
+
React__default["default"].createElement("div", { className: cx('JSONSchemaMember-key', {
|
|
199
|
+
'is-mobile': mobileUI
|
|
200
|
+
}) }, member.nameMutable ? (React__default["default"].createElement(React__default["default"].Fragment, null, renderKey ? (renderKey(member.name, onMemberKeyChange.bind(null, member), member.schema, props)) : filtedOptions.length ? (allowInput ? (React__default["default"].createElement(InputBoxWithSuggestion["default"], { value: member.name, hasError: member.invalid, onChange: onMemberKeyChange.bind(null, member), clearable: false, placeholder: __('JSONSchema.key'), options: filtedOptions, useMobileUI: useMobileUI })) : (React__default["default"].createElement(Select["default"], { simpleValue: true, block: true, value: member.name, hasError: member.invalid, onChange: onMemberKeyChange.bind(null, member), clearable: false, placeholder: __('JSONSchema.key'), options: filtedOptions, useMobileUI: useMobileUI }))) : (React__default["default"].createElement(InputBox["default"], { value: member.name, hasError: member.invalid, onChange: onMemberKeyChange.bind(null, member), clearable: false, placeholder: __('JSONSchema.key'), useMobileUI: useMobileUI })))) : (React__default["default"].createElement("span", null,
|
|
197
201
|
member.required ? (React__default["default"].createElement("span", { className: cx("Form-star") }, "*")) : null,
|
|
198
202
|
((_a = member.schema) === null || _a === void 0 ? void 0 : _a.title) || member.name))),
|
|
199
203
|
React__default["default"].createElement("div", { className: cx('JSONSchemaMember-value') },
|
|
@@ -12,6 +12,7 @@ export interface InputJSONSchemaItemProps extends ThemeProps, LocaleProps {
|
|
|
12
12
|
renderKey?: (value: any, onChange: (value: any) => void, schema: any, props: any) => JSX.Element;
|
|
13
13
|
collapsable?: boolean;
|
|
14
14
|
placeholder?: string;
|
|
15
|
+
useMobileUI?: boolean;
|
|
15
16
|
}
|
|
16
17
|
export interface InputJSONSchemaProps extends Omit<InputJSONSchemaItemProps, 'schema'> {
|
|
17
18
|
schema?: any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-ui v3.
|
|
2
|
+
* amis-ui v3.2.0
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -46,7 +46,8 @@ var MenuItem = /** @class */ (function (_super) {
|
|
|
46
46
|
'attribute',
|
|
47
47
|
'onMouseEnter',
|
|
48
48
|
'onMouseLeave',
|
|
49
|
-
'onClick'
|
|
49
|
+
'onClick',
|
|
50
|
+
'className'
|
|
50
51
|
];
|
|
51
52
|
return _this;
|
|
52
53
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-ui v3.
|
|
2
|
+
* amis-ui v3.2.0
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -113,11 +113,11 @@ var SubMenu = /** @class */ (function (_super) {
|
|
|
113
113
|
};
|
|
114
114
|
SubMenu.prototype.render = function () {
|
|
115
115
|
var _a, _b;
|
|
116
|
-
var _c = this.props, popupClassName = _c.popupClassName, cx = _c.classnames, hidden = _c.hidden;
|
|
116
|
+
var _c = this.props, popupClassName = _c.popupClassName, cx = _c.classnames, hidden = _c.hidden, className = _c.className;
|
|
117
117
|
var isDarkTheme = this.context.themeColor === 'dark';
|
|
118
118
|
return hidden ? null : (React__default["default"].createElement(RcMenu.SubMenu, tslib.__assign({}, pick__default["default"](this.props, this.internalProps), { className: cx('Nav-Menu-submenu', (_a = {},
|
|
119
119
|
_a['Nav-Menu-submenu-dark'] = isDarkTheme,
|
|
120
|
-
_a)), popupClassName: cx(
|
|
120
|
+
_a), className), popupClassName: cx((_b = {},
|
|
121
121
|
_b['Nav-Menu-submenu-popup-dark'] = isDarkTheme,
|
|
122
122
|
_b), popupClassName), title: this.renderSubMenuTitle(), onTitleClick: this.handleSubmenuTitleActived })));
|
|
123
123
|
};
|