amis-ui 3.2.0 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/components/404.js +1 -1
- package/esm/components/Alert.d.ts +122 -122
- package/esm/components/Alert.js +55 -17
- package/esm/components/Alert2.d.ts +20 -20
- package/esm/components/Alert2.js +5 -8
- package/esm/components/AnchorNav.d.ts +20 -20
- package/esm/components/AnchorNav.js +1 -1
- package/esm/components/ArrayInput.d.ts +40 -40
- package/esm/components/ArrayInput.js +1 -1
- package/esm/components/AsideNav.js +1 -1
- package/esm/components/AssociatedSelection.d.ts +120 -120
- package/esm/components/AssociatedSelection.js +1 -1
- package/esm/components/Avatar.d.ts +102 -101
- package/esm/components/Avatar.js +4 -3
- package/esm/components/Badge.js +1 -1
- package/esm/components/BaiduMapPicker.js +1 -1
- package/esm/components/BarCode.js +1 -1
- package/esm/components/Breadcrumb.js +5 -9
- package/esm/components/Button.d.ts +20 -20
- package/esm/components/Button.js +1 -1
- package/esm/components/CalendarMobile.d.ts +40 -40
- package/esm/components/CalendarMobile.js +1 -1
- package/esm/components/Card.d.ts +100 -100
- package/esm/components/Card.js +1 -1
- package/esm/components/Cascader.js +1 -1
- package/esm/components/ChainedDropdownSelection.d.ts +120 -120
- package/esm/components/ChainedDropdownSelection.js +1 -1
- package/esm/components/ChainedSelection.d.ts +120 -120
- package/esm/components/ChainedSelection.js +1 -1
- package/esm/components/Checkbox.d.ts +10 -10
- package/esm/components/Checkbox.js +1 -1
- package/esm/components/CityArea.js +1 -1
- package/esm/components/CityDB.js +1 -1
- package/esm/components/CodeMirror.js +1 -1
- package/esm/components/Collapse.d.ts +140 -140
- package/esm/components/Collapse.js +2 -2
- package/esm/components/CollapseGroup.d.ts +30 -30
- package/esm/components/CollapseGroup.js +1 -1
- package/esm/components/ColorPicker.d.ts +80 -80
- package/esm/components/ColorPicker.js +1 -1
- package/esm/components/Combo.js +1 -1
- package/esm/components/ConfirmBox.d.ts +80 -80
- package/esm/components/ConfirmBox.js +1 -1
- package/esm/components/ContextMenu.d.ts +2 -2
- package/esm/components/ContextMenu.js +25 -10
- package/esm/components/DatePicker.d.ts +82 -81
- package/esm/components/DatePicker.js +5 -2
- package/esm/components/DateRangePicker.d.ts +120 -120
- package/esm/components/DateRangePicker.js +1 -1
- package/esm/components/DndContainer.js +1 -1
- package/esm/components/Drawer.d.ts +30 -30
- package/esm/components/Drawer.js +1 -1
- package/esm/components/DropDownSelection.d.ts +120 -120
- package/esm/components/DropDownSelection.js +1 -1
- package/esm/components/Editor.d.ts +120 -120
- package/esm/components/Editor.js +1 -1
- package/esm/components/Form.js +1 -1
- package/esm/components/FormField.js +1 -1
- package/esm/components/GaodeMapPicker.js +1 -1
- package/esm/components/GridNav.js +1 -1
- package/esm/components/GroupedSelection.d.ts +120 -120
- package/esm/components/GroupedSelection.js +1 -1
- package/esm/components/Html.js +1 -1
- package/esm/components/ImageGallery.d.ts +40 -40
- package/esm/components/ImageGallery.js +1 -1
- package/esm/components/Input.js +1 -1
- package/esm/components/InputBox.d.ts +10 -10
- package/esm/components/InputBox.js +1 -1
- package/esm/components/InputBoxWithSuggestion.js +2 -2
- package/esm/components/InputTable.js +1 -1
- package/esm/components/Layout.d.ts +10 -10
- package/esm/components/Layout.js +1 -1
- package/esm/components/Link.js +5 -4
- package/esm/components/ListGroup.d.ts +10 -10
- package/esm/components/ListGroup.js +1 -1
- package/esm/components/ListMenu.d.ts +80 -80
- package/esm/components/ListMenu.js +1 -1
- package/esm/components/LocationPicker.d.ts +40 -40
- package/esm/components/LocationPicker.js +4 -4
- package/esm/components/Markdown.js +1 -1
- package/esm/components/Modal.d.ts +80 -80
- package/esm/components/Modal.js +1 -1
- package/esm/components/ModalManager.js +1 -1
- package/esm/components/MonthRangePicker.d.ts +120 -120
- package/esm/components/MultilineText.d.ts +40 -40
- package/esm/components/MultilineText.js +1 -1
- package/esm/components/NumberInput.d.ts +20 -20
- package/esm/components/NumberInput.js +6 -3
- package/esm/components/Pagination.d.ts +80 -80
- package/esm/components/Pagination.js +1 -1
- package/esm/components/Picker.js +1 -1
- package/esm/components/PickerColumn.js +1 -1
- package/esm/components/PickerContainer.js +1 -1
- package/esm/components/PopOverContainer.js +1 -1
- package/esm/components/PopUp.d.ts +120 -120
- package/esm/components/PopUp.js +1 -1
- package/esm/components/Progress.d.ts +30 -30
- package/esm/components/Progress.js +1 -1
- package/esm/components/PullRefresh.js +1 -1
- package/esm/components/Radios.d.ts +11 -10
- package/esm/components/Radios.js +7 -6
- package/esm/components/Range.js +4 -4
- package/esm/components/Rating.d.ts +20 -20
- package/esm/components/Rating.js +2 -2
- package/esm/components/ResultBox.d.ts +80 -80
- package/esm/components/ResultBox.js +1 -1
- package/esm/components/ResultList.d.ts +40 -40
- package/esm/components/ResultList.js +2 -2
- package/esm/components/ResultTableList.d.ts +120 -120
- package/esm/components/ResultTableList.js +1 -1
- package/esm/components/ResultTreeList.d.ts +40 -40
- package/esm/components/ResultTreeList.js +4 -2
- package/esm/components/RichText.js +1 -1
- package/esm/components/SearchBox.d.ts +82 -82
- package/esm/components/SearchBox.js +4 -4
- package/esm/components/Select.d.ts +1546 -1546
- package/esm/components/Select.js +4 -2
- package/esm/components/SelectMobile.js +1 -1
- package/esm/components/Selection.d.ts +120 -120
- package/esm/components/Selection.js +1 -1
- package/esm/components/SparkLine.d.ts +40 -40
- package/esm/components/SparkLine.js +1 -1
- package/esm/components/Spinner.d.ts +50 -50
- package/esm/components/Spinner.js +4 -4
- package/esm/components/Steps.js +1 -1
- package/esm/components/Switch.d.ts +10 -10
- package/esm/components/Switch.js +1 -1
- package/esm/components/TableSelection.d.ts +120 -120
- package/esm/components/TableSelection.js +3 -2
- package/esm/components/Tabs.d.ts +80 -80
- package/esm/components/Tabs.js +3 -3
- package/esm/components/TabsTransfer.d.ts +40 -40
- package/esm/components/TabsTransfer.js +1 -1
- package/esm/components/TabsTransferPicker.js +1 -1
- package/esm/components/Tag.d.ts +80 -80
- package/esm/components/Tag.js +5 -10
- package/esm/components/Textarea.d.ts +40 -40
- package/esm/components/Textarea.js +1 -1
- package/esm/components/Timeline.js +1 -1
- package/esm/components/TimelineItem.d.ts +1 -1
- package/esm/components/TimelineItem.js +4 -3
- package/esm/components/Tinymce.d.ts +1 -0
- package/esm/components/Tinymce.js +7 -3
- package/esm/components/TitleBar.js +1 -1
- package/esm/components/Toast.d.ts +80 -80
- package/esm/components/Toast.js +1 -1
- package/esm/components/Tooltip.js +1 -1
- package/esm/components/TooltipWrapper.d.ts +30 -30
- package/esm/components/TooltipWrapper.js +1 -1
- package/esm/components/Transfer.d.ts +169 -169
- package/esm/components/Transfer.js +7 -2
- package/esm/components/TransferDropDown.d.ts +160 -160
- package/esm/components/TransferDropDown.js +1 -1
- package/esm/components/TransferPicker.js +1 -1
- package/esm/components/TransferSearch.js +2 -2
- package/esm/components/Tree.d.ts +160 -160
- package/esm/components/Tree.js +35 -9
- package/esm/components/TreeSelection.d.ts +120 -120
- package/esm/components/TreeSelection.js +1 -1
- package/esm/components/UserSelect.d.ts +40 -40
- package/esm/components/UserSelect.js +1 -1
- package/esm/components/UserTabSelect.d.ts +40 -40
- package/esm/components/UserTabSelect.js +1 -1
- package/esm/components/WithRemoteConfig.js +1 -1
- package/esm/components/WithStore.js +1 -1
- package/esm/components/calendar/Calendar.js +1 -1
- package/esm/components/calendar/CalendarContainer.js +1 -1
- package/esm/components/calendar/DaysView.js +1 -1
- package/esm/components/calendar/MonthsView.js +1 -1
- 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 +2 -2
- 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 +8 -3
- package/esm/components/condition-builder/config.js +1 -1
- package/esm/components/condition-builder/index.js +1 -1
- package/esm/components/formula/Editor.d.ts +43 -40
- package/esm/components/formula/Editor.js +36 -9
- package/esm/components/formula/FuncList.js +8 -4
- package/esm/components/formula/Input.d.ts +272 -0
- package/esm/components/formula/Input.js +115 -0
- package/esm/components/formula/Picker.d.ts +61 -44
- package/esm/components/formula/Picker.js +86 -16
- package/esm/components/formula/VariableList.js +43 -23
- package/esm/components/formula/plugin.js +1 -1
- package/esm/components/icons.d.ts +11 -2
- package/esm/components/icons.js +64 -22
- package/esm/components/json-schema/Array.js +2 -2
- package/esm/components/json-schema/Item.js +1 -1
- package/esm/components/json-schema/Object.js +2 -2
- package/esm/components/json-schema/index.js +1 -1
- package/esm/components/menu/MenuContext.js +1 -1
- package/esm/components/menu/MenuItem.js +1 -1
- package/esm/components/menu/SubMenu.js +1 -1
- package/esm/components/menu/index.d.ts +60 -60
- package/esm/components/menu/index.js +1 -1
- package/esm/components/schema-editor/Array.js +1 -1
- package/esm/components/schema-editor/Common.js +1 -1
- package/esm/components/schema-editor/Item.js +1 -1
- package/esm/components/schema-editor/Object.js +1 -1
- 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 +40 -40
- package/esm/components/schema-editor/index.js +1 -1
- package/esm/components/table/Cell.d.ts +80 -80
- package/esm/components/table/Cell.js +1 -1
- package/esm/components/table/HeadCellDropDown.js +1 -1
- package/esm/components/table/HeadCellFilter.d.ts +40 -40
- package/esm/components/table/HeadCellFilter.js +1 -1
- package/esm/components/table/HeadCellSelect.d.ts +40 -40
- package/esm/components/table/HeadCellSelect.js +1 -1
- package/esm/components/table/HeadCellSort.js +1 -1
- package/esm/components/table/ItemActionsWrapper.js +1 -1
- package/esm/components/table/index.d.ts +120 -120
- package/esm/components/table/index.js +1 -1
- package/esm/components/virtual-list/AutoSizer.js +1 -1
- package/esm/components/virtual-list/SizeAndPositionManager.js +1 -1
- package/esm/components/virtual-list/constants.js +1 -1
- package/esm/components/virtual-list/index.js +1 -1
- package/esm/hooks/use-set-state.js +1 -1
- package/esm/hooks/use-sub-form.js +1 -1
- package/esm/hooks/use-touch.js +1 -1
- package/esm/hooks/use-update-effect.js +1 -1
- package/esm/hooks/use-validation-resolver.js +1 -1
- package/esm/icons/alert-danger.svg.js +1 -1
- package/esm/icons/alert-info.svg.js +1 -1
- package/esm/icons/alert-success.svg.js +1 -1
- package/esm/icons/alert-warning.svg.js +1 -1
- package/esm/icons/back.svg.js +1 -1
- package/esm/icons/calendar.svg.js +1 -1
- package/esm/icons/caret.svg.js +1 -1
- package/esm/icons/check.svg.js +1 -1
- package/esm/icons/clock.svg.js +1 -1
- package/esm/icons/close-small.svg.js +1 -1
- package/esm/icons/close.svg.js +1 -1
- package/esm/icons/cloud-upload.svg.js +1 -1
- package/esm/icons/column-filter.svg.js +1 -1
- package/esm/icons/columns.svg.js +1 -1
- package/esm/icons/compress-alt.svg.js +1 -1
- package/esm/icons/copy.svg.js +1 -1
- package/esm/icons/date.svg.js +1 -1
- package/esm/icons/department.svg.js +1 -1
- package/esm/icons/desk-empty.svg.js +1 -1
- package/esm/icons/dot.svg.js +1 -1
- package/esm/icons/down-arrow-bold.svg.js +1 -1
- package/esm/icons/down.svg.js +1 -1
- package/esm/icons/download.svg.js +1 -1
- package/esm/icons/drag-bar.svg.js +1 -1
- package/esm/icons/drag.svg.js +1 -1
- package/esm/icons/edit.svg.js +1 -1
- package/esm/icons/ellipsis-v.svg.js +1 -1
- package/esm/icons/enter.svg.js +1 -1
- package/esm/icons/exchange.svg.js +1 -1
- package/esm/icons/expand-alt.svg.js +1 -1
- package/esm/icons/fail.svg.js +1 -1
- package/esm/icons/file.svg.js +1 -1
- package/esm/icons/filter.svg.js +1 -1
- package/esm/icons/folder.svg.js +1 -1
- package/esm/icons/function.svg.js +15 -8
- package/esm/icons/home.svg.js +1 -1
- package/esm/icons/image.svg.js +1 -1
- package/esm/icons/info-circle.svg.js +1 -1
- package/esm/icons/info.svg.js +1 -1
- package/esm/icons/input-clear.svg.js +1 -1
- package/esm/icons/invisible.svg.js +1 -1
- package/esm/icons/left-arrow.svg.js +1 -1
- package/esm/icons/loading-outline.svg.js +1 -1
- package/esm/icons/location.svg.js +1 -1
- package/esm/icons/menu.svg.js +1 -1
- package/esm/icons/minus.svg.js +1 -1
- package/esm/icons/move.svg.js +1 -1
- package/esm/icons/mute.svg.js +1 -1
- package/esm/icons/new-edit.svg.js +1 -1
- package/esm/icons/pause.svg.js +1 -1
- package/esm/icons/pencil.svg.js +1 -1
- package/esm/icons/play.svg.js +1 -1
- package/esm/icons/plus-cicle.svg.js +1 -1
- package/esm/icons/plus-fine.svg.js +1 -1
- package/esm/icons/plus.svg.js +1 -1
- package/esm/icons/post.svg.js +1 -1
- package/esm/icons/question-mark.svg.js +1 -1
- package/esm/icons/question.svg.js +1 -1
- package/esm/icons/redo.svg.js +1 -1
- package/esm/icons/refresh.svg.js +1 -1
- package/esm/icons/reload.svg.js +1 -1
- package/esm/icons/remove.svg.js +1 -1
- package/esm/icons/retry.svg.js +1 -1
- package/esm/icons/right-arrow-bold.svg.js +1 -1
- package/esm/icons/right-arrow.svg.js +1 -1
- package/esm/icons/right-double-arrow.svg.js +1 -1
- package/esm/icons/role.svg.js +1 -1
- package/esm/icons/rotate-left.svg.js +1 -1
- package/esm/icons/rotate-right.svg.js +1 -1
- package/esm/icons/scale-origin.svg.js +1 -1
- package/esm/icons/schedule.svg.js +1 -1
- package/esm/icons/search.svg.js +1 -1
- package/esm/icons/setting.svg.js +1 -1
- package/esm/icons/slider-handle-icon.svg.js +1 -1
- package/esm/icons/sort-asc.svg.js +1 -1
- package/esm/icons/sort-default.svg.js +1 -1
- package/esm/icons/sort-desc.svg.js +1 -1
- package/esm/icons/star.svg.js +1 -1
- package/esm/icons/status-close.svg.js +1 -1
- package/esm/icons/steps-finsh.svg.js +1 -1
- package/esm/icons/success.svg.js +1 -1
- package/esm/icons/transparent.svg.js +1 -1
- package/esm/icons/trash.svg.js +1 -1
- package/esm/icons/tree-down.svg.js +1 -1
- package/esm/icons/undo.svg.js +1 -1
- package/esm/icons/upload.svg.js +1 -1
- package/esm/icons/user-remove.svg.js +1 -1
- package/esm/icons/view.svg.js +1 -1
- package/esm/icons/volume.svg.js +1 -1
- package/esm/icons/warning-mark.svg.js +1 -1
- package/esm/icons/warning.svg.js +1 -1
- package/esm/icons/window-restore.svg.js +1 -1
- package/esm/icons/zoom-in.svg.js +1 -1
- package/esm/icons/zoom-out.svg.js +1 -1
- package/esm/index.js +1 -1
- package/esm/locale/de-DE.js +6 -2
- package/esm/locale/en-US.js +6 -2
- package/esm/locale/zh-CN.js +6 -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 +1 -1
- package/esm/node_modules/rc-overflow/es/RawItem.js +1 -1
- package/esm/node_modules/rc-overflow/es/context.js +1 -1
- package/esm/node_modules/rc-overflow/es/hooks/channelUpdate.js +1 -1
- package/esm/node_modules/rc-overflow/es/hooks/useEffectState.js +1 -1
- package/esm/node_modules/rc-overflow/es/index.js +1 -1
- package/esm/node_modules/rc-resize-observer/es/Collection.js +1 -1
- package/esm/node_modules/rc-resize-observer/es/SingleObserver/DomWrapper.js +1 -1
- package/esm/node_modules/rc-resize-observer/es/SingleObserver/index.js +1 -1
- package/esm/node_modules/rc-resize-observer/es/index.js +1 -1
- package/esm/node_modules/rc-resize-observer/es/utils/observerUtil.js +1 -1
- package/esm/node_modules/rc-util/es/Children/toArray.js +3 -4
- package/esm/node_modules/rc-util/es/Dom/canUseDom.js +1 -1
- package/esm/node_modules/rc-util/es/Dom/findDOMNode.js +1 -1
- package/esm/node_modules/rc-util/es/hooks/useEvent.js +1 -1
- package/esm/node_modules/rc-util/es/hooks/useLayoutEffect.js +1 -1
- package/esm/node_modules/rc-util/es/raf.js +1 -1
- package/esm/node_modules/rc-util/es/ref.js +3 -4
- package/esm/node_modules/rc-util/es/warning.js +1 -1
- package/esm/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js +1 -1
- package/esm/themes/ang.js +1 -1
- package/esm/themes/antd.js +1 -1
- package/esm/themes/cxd.js +1 -1
- package/esm/themes/dark.js +1 -1
- package/lib/components/404.js +12 -13
- package/lib/components/Alert.d.ts +42 -42
- package/lib/components/Alert.js +64 -27
- package/lib/components/Alert2.d.ts +10 -10
- package/lib/components/Alert2.js +13 -17
- package/lib/components/AnchorNav.d.ts +10 -10
- package/lib/components/AnchorNav.js +10 -12
- package/lib/components/ArrayInput.d.ts +40 -40
- package/lib/components/ArrayInput.js +17 -14
- package/lib/components/AsideNav.js +13 -15
- package/lib/components/AssociatedSelection.d.ts +40 -40
- package/lib/components/AssociatedSelection.js +11 -17
- package/lib/components/Avatar.d.ts +42 -41
- package/lib/components/Avatar.js +10 -6
- package/lib/components/Badge.js +13 -13
- package/lib/components/BaiduMapPicker.js +15 -12
- package/lib/components/BarCode.js +5 -5
- package/lib/components/Breadcrumb.js +21 -25
- package/lib/components/Button.d.ts +10 -10
- package/lib/components/Button.js +7 -8
- package/lib/components/CalendarMobile.d.ts +40 -40
- package/lib/components/CalendarMobile.js +36 -38
- package/lib/components/Card.d.ts +50 -50
- package/lib/components/Card.js +22 -19
- package/lib/components/Cascader.js +18 -19
- package/lib/components/ChainedDropdownSelection.d.ts +40 -40
- package/lib/components/ChainedDropdownSelection.js +7 -5
- package/lib/components/ChainedSelection.d.ts +40 -40
- package/lib/components/ChainedSelection.js +23 -20
- package/lib/components/Checkbox.d.ts +10 -10
- package/lib/components/Checkbox.js +9 -10
- package/lib/components/CityArea.js +9 -10
- package/lib/components/CityDB.js +1 -1
- package/lib/components/CodeMirror.js +5 -2
- package/lib/components/Collapse.d.ts +50 -50
- package/lib/components/Collapse.js +12 -14
- package/lib/components/CollapseGroup.d.ts +30 -30
- package/lib/components/CollapseGroup.js +5 -7
- package/lib/components/ColorPicker.d.ts +40 -40
- package/lib/components/ColorPicker.js +15 -17
- package/lib/components/Combo.js +16 -73
- package/lib/components/ConfirmBox.d.ts +40 -40
- package/lib/components/ConfirmBox.js +24 -21
- package/lib/components/ContextMenu.d.ts +2 -2
- package/lib/components/ContextMenu.js +37 -19
- package/lib/components/DatePicker.d.ts +41 -40
- package/lib/components/DatePicker.js +26 -25
- package/lib/components/DateRangePicker.d.ts +40 -40
- package/lib/components/DateRangePicker.js +40 -42
- package/lib/components/DndContainer.js +6 -8
- package/lib/components/Drawer.js +13 -15
- package/lib/components/DropDownSelection.d.ts +40 -40
- package/lib/components/DropDownSelection.js +14 -15
- package/lib/components/Editor.d.ts +40 -40
- package/lib/components/Editor.js +9 -11
- package/lib/components/Form.js +8 -5
- package/lib/components/FormField.js +20 -21
- package/lib/components/GaodeMapPicker.js +10 -7
- package/lib/components/GridNav.js +15 -16
- package/lib/components/GroupedSelection.d.ts +40 -40
- package/lib/components/GroupedSelection.js +22 -19
- package/lib/components/Html.js +5 -7
- package/lib/components/ImageGallery.d.ts +40 -40
- package/lib/components/ImageGallery.js +28 -25
- package/lib/components/Input.js +6 -3
- package/lib/components/InputBox.d.ts +10 -10
- package/lib/components/InputBox.js +8 -5
- package/lib/components/InputBoxWithSuggestion.js +11 -8
- package/lib/components/InputTable.js +24 -21
- package/lib/components/Layout.d.ts +10 -10
- package/lib/components/Layout.js +13 -26
- package/lib/components/Link.js +8 -4
- package/lib/components/ListGroup.d.ts +10 -10
- package/lib/components/ListGroup.js +8 -5
- package/lib/components/ListMenu.d.ts +40 -40
- package/lib/components/ListMenu.js +11 -8
- package/lib/components/LocationPicker.d.ts +40 -40
- package/lib/components/LocationPicker.js +16 -13
- package/lib/components/Markdown.js +5 -2
- package/lib/components/Modal.d.ts +40 -40
- package/lib/components/Modal.js +15 -17
- package/lib/components/ModalManager.js +1 -1
- package/lib/components/MonthRangePicker.d.ts +40 -40
- package/lib/components/MultilineText.d.ts +40 -40
- package/lib/components/MultilineText.js +9 -6
- package/lib/components/NumberInput.d.ts +10 -10
- package/lib/components/NumberInput.js +13 -7
- package/lib/components/Pagination.d.ts +40 -40
- package/lib/components/Pagination.js +30 -27
- package/lib/components/Picker.js +13 -14
- package/lib/components/PickerColumn.js +7 -5
- package/lib/components/PickerContainer.js +6 -3
- package/lib/components/PopOverContainer.js +7 -4
- package/lib/components/PopUp.d.ts +40 -40
- package/lib/components/PopUp.js +18 -20
- package/lib/components/Progress.d.ts +40 -40
- package/lib/components/Progress.js +14 -11
- package/lib/components/PullRefresh.js +8 -14
- package/lib/components/Radios.d.ts +11 -10
- package/lib/components/Radios.js +13 -24
- package/lib/components/Range.js +24 -26
- package/lib/components/Rating.d.ts +10 -10
- package/lib/components/Rating.js +14 -15
- package/lib/components/ResultBox.d.ts +40 -40
- package/lib/components/ResultBox.js +31 -28
- package/lib/components/ResultList.d.ts +40 -40
- package/lib/components/ResultList.js +19 -15
- package/lib/components/ResultTableList.d.ts +40 -40
- package/lib/components/ResultTableList.js +13 -13
- package/lib/components/ResultTreeList.d.ts +40 -40
- package/lib/components/ResultTreeList.js +21 -13
- package/lib/components/RichText.js +6 -8
- package/lib/components/SearchBox.d.ts +42 -42
- package/lib/components/SearchBox.js +26 -23
- package/lib/components/Select.d.ts +193 -193
- package/lib/components/Select.js +60 -61
- package/lib/components/SelectMobile.js +20 -17
- package/lib/components/Selection.d.ts +40 -40
- package/lib/components/Selection.js +7 -9
- package/lib/components/SparkLine.d.ts +40 -40
- package/lib/components/SparkLine.js +8 -5
- package/lib/components/Spinner.d.ts +10 -10
- package/lib/components/Spinner.js +13 -16
- package/lib/components/Steps.js +20 -21
- package/lib/components/Switch.d.ts +10 -10
- package/lib/components/Switch.js +8 -10
- package/lib/components/TableSelection.d.ts +40 -40
- package/lib/components/TableSelection.js +35 -29
- package/lib/components/Tabs.d.ts +40 -40
- package/lib/components/Tabs.js +41 -43
- package/lib/components/TabsTransfer.d.ts +40 -40
- package/lib/components/TabsTransfer.js +17 -14
- package/lib/components/TabsTransferPicker.js +8 -5
- package/lib/components/Tag.d.ts +60 -60
- package/lib/components/Tag.js +12 -17
- package/lib/components/Textarea.d.ts +40 -40
- package/lib/components/Textarea.js +9 -6
- package/lib/components/Timeline.js +6 -7
- package/lib/components/TimelineItem.d.ts +1 -1
- package/lib/components/TimelineItem.js +18 -14
- package/lib/components/Tinymce.d.ts +1 -0
- package/lib/components/Tinymce.js +11 -4
- package/lib/components/TitleBar.js +10 -16
- package/lib/components/Toast.d.ts +40 -40
- package/lib/components/Toast.js +14 -16
- package/lib/components/Tooltip.js +8 -10
- package/lib/components/TooltipWrapper.js +6 -8
- package/lib/components/Transfer.d.ts +40 -40
- package/lib/components/Transfer.js +47 -33
- package/lib/components/TransferDropDown.d.ts +40 -40
- package/lib/components/TransferDropDown.js +11 -12
- package/lib/components/TransferPicker.js +8 -5
- package/lib/components/TransferSearch.js +10 -6
- package/lib/components/Tree.d.ts +40 -40
- package/lib/components/Tree.js +86 -75
- package/lib/components/TreeSelection.d.ts +40 -40
- package/lib/components/TreeSelection.js +15 -16
- package/lib/components/UserSelect.d.ts +40 -40
- package/lib/components/UserSelect.js +84 -85
- package/lib/components/UserTabSelect.d.ts +40 -40
- package/lib/components/UserTabSelect.js +17 -18
- package/lib/components/WithRemoteConfig.js +5 -2
- package/lib/components/WithStore.js +5 -2
- package/lib/components/calendar/Calendar.js +7 -4
- package/lib/components/calendar/CalendarContainer.js +5 -2
- package/lib/components/calendar/DaysView.js +55 -53
- package/lib/components/calendar/MonthsView.js +18 -15
- package/lib/components/calendar/QuartersView.js +17 -14
- package/lib/components/calendar/TimeView.js +32 -29
- package/lib/components/calendar/YearsView.js +18 -15
- package/lib/components/condition-builder/Expression.js +10 -7
- package/lib/components/condition-builder/Field.js +7 -4
- package/lib/components/condition-builder/Formula.js +6 -3
- package/lib/components/condition-builder/Func.js +16 -13
- package/lib/components/condition-builder/Group.js +22 -19
- package/lib/components/condition-builder/GroupOrItem.js +14 -11
- package/lib/components/condition-builder/InputSwitch.js +10 -11
- package/lib/components/condition-builder/Item.js +19 -16
- package/lib/components/condition-builder/Value.js +18 -10
- package/lib/components/condition-builder/config.js +1 -1
- package/lib/components/condition-builder/index.js +8 -5
- package/lib/components/formula/Editor.d.ts +43 -40
- package/lib/components/formula/Editor.js +54 -24
- package/lib/components/formula/FuncList.js +32 -25
- package/lib/components/formula/Input.d.ts +272 -0
- package/lib/components/formula/Input.js +128 -0
- package/lib/components/formula/Picker.d.ts +61 -44
- package/lib/components/formula/Picker.js +113 -39
- package/lib/components/formula/VariableList.js +60 -37
- package/lib/components/formula/plugin.js +1 -1
- package/lib/components/icons.d.ts +11 -2
- package/lib/components/icons.js +76 -30
- package/lib/components/json-schema/Array.js +15 -12
- package/lib/components/json-schema/Item.js +11 -12
- package/lib/components/json-schema/Object.js +18 -15
- package/lib/components/json-schema/index.js +6 -7
- package/lib/components/menu/MenuContext.js +1 -1
- package/lib/components/menu/MenuItem.js +16 -18
- package/lib/components/menu/SubMenu.js +17 -19
- package/lib/components/menu/index.d.ts +10 -10
- package/lib/components/menu/index.js +14 -16
- package/lib/components/schema-editor/Array.js +10 -7
- package/lib/components/schema-editor/Common.js +19 -16
- package/lib/components/schema-editor/Item.js +5 -2
- package/lib/components/schema-editor/Object.js +15 -12
- package/lib/components/schema-editor/SchemaVariableList.js +9 -6
- package/lib/components/schema-editor/SchemaVariableListPicker.js +7 -4
- package/lib/components/schema-editor/index.d.ts +40 -40
- package/lib/components/schema-editor/index.js +6 -6
- package/lib/components/table/Cell.d.ts +40 -40
- package/lib/components/table/Cell.js +5 -6
- package/lib/components/table/HeadCellDropDown.js +8 -9
- package/lib/components/table/HeadCellFilter.d.ts +40 -40
- package/lib/components/table/HeadCellFilter.js +12 -13
- package/lib/components/table/HeadCellSelect.d.ts +40 -40
- package/lib/components/table/HeadCellSelect.js +6 -7
- package/lib/components/table/HeadCellSort.js +11 -12
- package/lib/components/table/ItemActionsWrapper.js +5 -2
- package/lib/components/table/index.d.ts +80 -80
- package/lib/components/table/index.js +62 -63
- package/lib/components/virtual-list/AutoSizer.js +5 -2
- package/lib/components/virtual-list/SizeAndPositionManager.js +1 -1
- package/lib/components/virtual-list/constants.js +1 -1
- package/lib/components/virtual-list/index.js +6 -6
- package/lib/helper.css +1393 -9569
- package/lib/hooks/use-set-state.js +1 -1
- package/lib/hooks/use-sub-form.js +1 -1
- package/lib/hooks/use-touch.js +1 -1
- package/lib/hooks/use-update-effect.js +1 -1
- package/lib/hooks/use-validation-resolver.js +1 -1
- package/lib/icons/alert-danger.svg.js +7 -24
- package/lib/icons/alert-info.svg.js +7 -24
- package/lib/icons/alert-success.svg.js +7 -24
- package/lib/icons/alert-warning.svg.js +7 -24
- package/lib/icons/back.svg.js +7 -24
- package/lib/icons/calendar.svg.js +11 -28
- package/lib/icons/caret.svg.js +7 -24
- package/lib/icons/check.svg.js +7 -24
- package/lib/icons/clock.svg.js +9 -26
- package/lib/icons/close-small.svg.js +8 -25
- package/lib/icons/close.svg.js +7 -24
- package/lib/icons/cloud-upload.svg.js +7 -24
- package/lib/icons/column-filter.svg.js +7 -24
- package/lib/icons/columns.svg.js +7 -24
- package/lib/icons/compress-alt.svg.js +7 -24
- package/lib/icons/copy.svg.js +9 -26
- package/lib/icons/date.svg.js +9 -26
- package/lib/icons/department.svg.js +12 -29
- package/lib/icons/desk-empty.svg.js +19 -36
- package/lib/icons/dot.svg.js +10 -27
- package/lib/icons/down-arrow-bold.svg.js +7 -24
- package/lib/icons/down.svg.js +7 -24
- package/lib/icons/download.svg.js +7 -24
- package/lib/icons/drag-bar.svg.js +15 -32
- package/lib/icons/drag.svg.js +7 -24
- package/lib/icons/edit.svg.js +7 -24
- package/lib/icons/ellipsis-v.svg.js +7 -24
- package/lib/icons/enter.svg.js +7 -24
- package/lib/icons/exchange.svg.js +7 -24
- package/lib/icons/expand-alt.svg.js +7 -24
- package/lib/icons/fail.svg.js +9 -26
- package/lib/icons/file.svg.js +8 -25
- package/lib/icons/filter.svg.js +7 -24
- package/lib/icons/folder.svg.js +9 -26
- package/lib/icons/function.svg.js +20 -30
- package/lib/icons/home.svg.js +7 -24
- package/lib/icons/image.svg.js +7 -24
- package/lib/icons/info-circle.svg.js +7 -24
- package/lib/icons/info.svg.js +8 -25
- package/lib/icons/input-clear.svg.js +7 -24
- package/lib/icons/invisible.svg.js +7 -24
- package/lib/icons/left-arrow.svg.js +7 -24
- package/lib/icons/loading-outline.svg.js +7 -24
- package/lib/icons/location.svg.js +7 -24
- package/lib/icons/menu.svg.js +7 -24
- package/lib/icons/minus.svg.js +7 -24
- package/lib/icons/move.svg.js +7 -24
- package/lib/icons/mute.svg.js +7 -24
- package/lib/icons/new-edit.svg.js +7 -24
- package/lib/icons/pause.svg.js +7 -24
- package/lib/icons/pencil.svg.js +7 -24
- package/lib/icons/play.svg.js +7 -24
- package/lib/icons/plus-cicle.svg.js +7 -24
- package/lib/icons/plus-fine.svg.js +7 -24
- package/lib/icons/plus.svg.js +7 -24
- package/lib/icons/post.svg.js +12 -29
- package/lib/icons/question-mark.svg.js +8 -25
- package/lib/icons/question.svg.js +7 -24
- package/lib/icons/redo.svg.js +7 -24
- package/lib/icons/refresh.svg.js +7 -24
- package/lib/icons/reload.svg.js +7 -24
- package/lib/icons/remove.svg.js +7 -24
- package/lib/icons/retry.svg.js +9 -26
- package/lib/icons/right-arrow-bold.svg.js +7 -24
- package/lib/icons/right-arrow.svg.js +7 -24
- package/lib/icons/right-double-arrow.svg.js +7 -24
- package/lib/icons/role.svg.js +11 -28
- package/lib/icons/rotate-left.svg.js +8 -25
- package/lib/icons/rotate-right.svg.js +8 -25
- package/lib/icons/scale-origin.svg.js +9 -26
- package/lib/icons/schedule.svg.js +9 -26
- package/lib/icons/search.svg.js +7 -24
- package/lib/icons/setting.svg.js +7 -24
- package/lib/icons/slider-handle-icon.svg.js +7 -24
- package/lib/icons/sort-asc.svg.js +7 -24
- package/lib/icons/sort-default.svg.js +8 -25
- package/lib/icons/sort-desc.svg.js +7 -24
- package/lib/icons/star.svg.js +7 -24
- package/lib/icons/status-close.svg.js +7 -24
- package/lib/icons/steps-finsh.svg.js +7 -24
- package/lib/icons/success.svg.js +9 -26
- package/lib/icons/transparent.svg.js +12 -29
- package/lib/icons/trash.svg.js +7 -24
- package/lib/icons/tree-down.svg.js +7 -24
- package/lib/icons/undo.svg.js +7 -24
- package/lib/icons/upload.svg.js +7 -24
- package/lib/icons/user-remove.svg.js +9 -26
- package/lib/icons/view.svg.js +7 -24
- package/lib/icons/volume.svg.js +8 -25
- package/lib/icons/warning-mark.svg.js +8 -25
- package/lib/icons/warning.svg.js +7 -24
- package/lib/icons/window-restore.svg.js +7 -24
- package/lib/icons/zoom-in.svg.js +7 -24
- package/lib/icons/zoom-out.svg.js +7 -24
- package/lib/index.js +1 -1
- package/lib/locale/de-DE.js +6 -2
- package/lib/locale/en-US.js +6 -2
- package/lib/locale/zh-CN.js +6 -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 +1 -1
- package/lib/node_modules/rc-overflow/es/RawItem.js +1 -1
- package/lib/node_modules/rc-overflow/es/context.js +1 -1
- package/lib/node_modules/rc-overflow/es/hooks/channelUpdate.js +1 -1
- package/lib/node_modules/rc-overflow/es/hooks/useEffectState.js +1 -1
- package/lib/node_modules/rc-overflow/es/index.js +1 -1
- package/lib/node_modules/rc-resize-observer/es/Collection.js +1 -1
- package/lib/node_modules/rc-resize-observer/es/SingleObserver/DomWrapper.js +1 -1
- package/lib/node_modules/rc-resize-observer/es/SingleObserver/index.js +1 -1
- package/lib/node_modules/rc-resize-observer/es/index.js +1 -1
- package/lib/node_modules/rc-resize-observer/es/utils/observerUtil.js +1 -1
- package/lib/node_modules/rc-util/es/Children/toArray.js +3 -4
- package/lib/node_modules/rc-util/es/Dom/canUseDom.js +1 -1
- package/lib/node_modules/rc-util/es/Dom/findDOMNode.js +1 -1
- package/lib/node_modules/rc-util/es/hooks/useEvent.js +1 -1
- package/lib/node_modules/rc-util/es/hooks/useLayoutEffect.js +1 -1
- package/lib/node_modules/rc-util/es/raf.js +1 -1
- package/lib/node_modules/rc-util/es/ref.js +3 -4
- package/lib/node_modules/rc-util/es/warning.js +1 -1
- package/lib/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js +1 -1
- package/lib/packages/amis-ui/scss/helper.scss.js +1 -1
- package/lib/packages/amis-ui/scss/themes/ang.scss.js +1 -1
- package/lib/packages/amis-ui/scss/themes/antd.scss.js +1 -1
- package/lib/packages/amis-ui/scss/themes/cxd.scss.js +1 -1
- package/lib/packages/amis-ui/scss/themes/dark.scss.js +1 -1
- package/lib/packages/amis-ui/scss/themes/default.scss.js +1 -1
- package/lib/themes/ang.css +600 -746
- package/lib/themes/ang.js +1 -1
- package/lib/themes/antd.css +600 -746
- package/lib/themes/antd.js +1 -1
- package/lib/themes/cxd.css +600 -746
- package/lib/themes/cxd.js +1 -1
- package/lib/themes/dark.css +600 -746
- package/lib/themes/dark.js +1 -1
- package/lib/themes/default.css +600 -746
- package/package.json +6 -6
- package/scss/_components.scss +7 -6
- package/scss/_mixins.scss +0 -1
- package/scss/_properties.scss +6 -4
- package/scss/_variables.scss +20 -0
- package/scss/base/_common.scss +4 -0
- package/scss/components/_cards.scss +3 -10
- package/scss/components/_column-toggler.scss +4 -4
- package/scss/components/_condition-builder.scss +1 -1
- package/scss/components/_debug.scss +34 -1
- package/scss/components/_drawer.scss +10 -1
- package/scss/components/_dropdown.scss +5 -4
- package/scss/components/_formula.scss +39 -3
- package/scss/components/_input-box.scss +2 -1
- package/scss/components/_json-schema-editor.scss +2 -2
- package/scss/components/_json-schema.scss +2 -2
- package/scss/components/_list.scss +3 -10
- package/scss/components/_menu.scss +1 -0
- package/scss/components/_progress.scss +1 -1
- package/scss/components/_search-box.scss +6 -0
- package/scss/components/_steps.scss +5 -3
- package/scss/components/_table.scss +104 -129
- package/scss/components/_timeline.scss +2 -1
- package/scss/components/form/_checks.scss +3 -1
- package/scss/components/form/_date.scss +3 -0
- package/scss/components/form/_form.scss +7 -0
- package/scss/components/form/_list.scss +1 -1
- package/scss/components/form/_nested-select.scss +3 -2
- package/scss/components/form/_selection.scss +8 -0
- package/scss/helper/sizing/_width.md +105 -94
- package/scss/helper/sizing/_width.scss +16 -0
- package/esm/_virtual/index.js +0 -8
- package/esm/_virtual/react-is.development.js +0 -8
- package/esm/_virtual/react-is.production.min.js +0 -8
- package/esm/node_modules/rc-util/node_modules/react-is/cjs/react-is.development.js +0 -195
- package/esm/node_modules/rc-util/node_modules/react-is/cjs/react-is.production.min.js +0 -31
- package/esm/node_modules/rc-util/node_modules/react-is/index.js +0 -17
- package/lib/_virtual/index.js +0 -12
- package/lib/_virtual/react-is.development.js +0 -12
- package/lib/_virtual/react-is.production.min.js +0 -12
- package/lib/node_modules/rc-util/node_modules/react-is/cjs/react-is.development.js +0 -199
- package/lib/node_modules/rc-util/node_modules/react-is/cjs/react-is.production.min.js +0 -35
- package/lib/node_modules/rc-util/node_modules/react-is/index.js +0 -19
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-ui v3.
|
|
2
|
+
* amis-ui v3.3.0
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -14,16 +14,23 @@ var Collapse = require('../Collapse.js');
|
|
|
14
14
|
var CollapseGroup = require('../CollapseGroup.js');
|
|
15
15
|
var SearchBox = require('../SearchBox.js');
|
|
16
16
|
var TooltipWrapper = require('../TooltipWrapper.js');
|
|
17
|
+
var icons = require('../icons.js');
|
|
17
18
|
|
|
18
19
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
19
20
|
|
|
20
21
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
21
22
|
|
|
23
|
+
var __react_jsx__ = require('react');
|
|
24
|
+
var _J$X_ = (__react_jsx__["default"] || __react_jsx__).createElement;
|
|
25
|
+
(__react_jsx__["default"] || __react_jsx__).Fragment;
|
|
22
26
|
function FuncList(props) {
|
|
23
27
|
var _a;
|
|
24
28
|
var title = props.title, className = props.className, cx = props.classnames, bodyClassName = props.bodyClassName, descClassName = props.descClassName;
|
|
25
29
|
var _b = tslib.__read(React__default["default"].useState(props.data), 2), filteredFuncs = _b[0], setFiteredFuncs = _b[1];
|
|
26
30
|
var _c = tslib.__read(React__default["default"].useState(null), 2), activeFunc = _c[0], setActiveFunc = _c[1];
|
|
31
|
+
React__default["default"].useEffect(function () {
|
|
32
|
+
setFiteredFuncs(props.data);
|
|
33
|
+
}, [props.data]);
|
|
27
34
|
function onSearch(term) {
|
|
28
35
|
var filtered = props.data
|
|
29
36
|
.map(function (item) {
|
|
@@ -34,32 +41,32 @@ function FuncList(props) {
|
|
|
34
41
|
.filter(function (item) { return item.items.length; });
|
|
35
42
|
setFiteredFuncs(filtered);
|
|
36
43
|
}
|
|
37
|
-
return (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
return (_J$X_("div", { className: cx('FormulaEditor-panel', 'left', className) },
|
|
45
|
+
_J$X_("div", { className: cx('FormulaEditor-FuncList', (activeFunc === null || activeFunc === void 0 ? void 0 : activeFunc.name) ? 'withDoc' : '') },
|
|
46
|
+
_J$X_("div", { className: cx('FormulaEditor-panel-header') }, title),
|
|
47
|
+
_J$X_("div", { className: cx('FormulaEditor-panel-body') },
|
|
48
|
+
_J$X_("div", { className: cx('FormulaEditor-FuncList-searchBox') },
|
|
49
|
+
_J$X_(SearchBox["default"], { mini: false, onSearch: onSearch, useMobileUI: true })),
|
|
50
|
+
_J$X_("div", { className: cx('FormulaEditor-FuncList-body', bodyClassName) },
|
|
51
|
+
_J$X_(CollapseGroup["default"], { className: cx('FormulaEditor-FuncList-collapseGroup'), defaultActiveKey: (_a = filteredFuncs[0]) === null || _a === void 0 ? void 0 : _a.groupName, expandIcon: _J$X_(icons.Icon, { cx: cx, icon: "fa fa-chevron-right FormulaEditor-FuncList-expandIcon", className: "Icon" }), accordion: true }, filteredFuncs.map(function (item) { return (_J$X_(Collapse["default"], { className: cx('FormulaEditor-FuncList-collapse'), headingClassName: cx('FormulaEditor-FuncList-groupTitle'), bodyClassName: cx('FormulaEditor-FuncList-groupBody'), propKey: item.groupName, header: item.groupName, key: item.groupName }, item.items.map(function (item) { return (_J$X_("div", { className: cx('FormulaEditor-FuncList-item', {
|
|
45
52
|
'is-active': item.name === (activeFunc === null || activeFunc === void 0 ? void 0 : activeFunc.name)
|
|
46
|
-
}),
|
|
47
|
-
(activeFunc === null || activeFunc === void 0 ? void 0 : activeFunc.name) ? (
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
Array.isArray(activeFunc.params) ? (
|
|
52
|
-
|
|
53
|
-
children: function () { return (
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
53
|
+
}), onMouseEnter: function () { return setActiveFunc(item); }, onClick: function () { var _a; return (_a = props.onSelect) === null || _a === void 0 ? void 0 : _a.call(props, item); }, key: item.name }, item.name)); }))); }))))),
|
|
54
|
+
(activeFunc === null || activeFunc === void 0 ? void 0 : activeFunc.name) ? (_J$X_("div", { className: cx('FormulaEditor-FuncDoc') },
|
|
55
|
+
_J$X_("div", { className: cx('FormulaEditor-panel-header') }, (activeFunc === null || activeFunc === void 0 ? void 0 : activeFunc.name) || ''),
|
|
56
|
+
_J$X_("div", { className: cx('FormulaEditor-panel-body') },
|
|
57
|
+
_J$X_("div", { className: cx('FormulaEditor-FuncList-doc', descClassName) }, activeFunc ? (_J$X_(React__default["default"].Fragment, null,
|
|
58
|
+
Array.isArray(activeFunc.params) ? (_J$X_("pre", null,
|
|
59
|
+
_J$X_(TooltipWrapper["default"], { placement: "top", tooltip: {
|
|
60
|
+
children: function () { return (_J$X_("table", { className: cx('FormulaEditor-FuncList-doc-example', 'Table-table') },
|
|
61
|
+
_J$X_("thead", null,
|
|
62
|
+
_J$X_("tr", null, ['参数名称', '类型', '描述'].map(function (name, index) { return (_J$X_("th", { key: index }, name)); }))),
|
|
63
|
+
_J$X_("tbody", null, activeFunc.params.map(function (param, index) { return (_J$X_("tr", { key: index },
|
|
64
|
+
_J$X_("td", null, param.name),
|
|
65
|
+
_J$X_("td", null, param.type),
|
|
66
|
+
_J$X_("td", null, param.description))); })))); }
|
|
60
67
|
}, trigger: "hover" },
|
|
61
|
-
|
|
62
|
-
|
|
68
|
+
_J$X_("code", null, activeFunc.example)))) : null,
|
|
69
|
+
_J$X_("div", { className: cx('FormulaEditor-FuncList-doc-desc') }, activeFunc.description))) : null)))) : null));
|
|
63
70
|
}
|
|
64
71
|
var FuncList$1 = amisCore.themeable(FuncList);
|
|
65
72
|
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
/// <reference types="hoist-non-react-statics" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ThemeProps, LocaleProps } from 'amis-core';
|
|
4
|
+
import { VariableItem } from './Editor';
|
|
5
|
+
import type { FormulaPickerProps } from './Picker';
|
|
6
|
+
export interface FormulaInputProps extends Pick<FormulaPickerProps, 'className' | 'disabled' | 'evalMode' | 'allowInput' | 'placeholder' | 'clearable' | 'borderMode' | 'variables' | 'inputSettings'>, ThemeProps, LocaleProps {
|
|
7
|
+
/**
|
|
8
|
+
* 输入值
|
|
9
|
+
*/
|
|
10
|
+
value?: string;
|
|
11
|
+
mixedMode?: boolean;
|
|
12
|
+
variables?: VariableItem[];
|
|
13
|
+
popOverContainer?: any;
|
|
14
|
+
/**
|
|
15
|
+
* Change事件回调
|
|
16
|
+
*/
|
|
17
|
+
onChange?: (value: string | any[]) => void;
|
|
18
|
+
/**
|
|
19
|
+
* 子元素渲染
|
|
20
|
+
*/
|
|
21
|
+
itemRender?: (value: any) => JSX.Element | string;
|
|
22
|
+
}
|
|
23
|
+
declare const _default: {
|
|
24
|
+
new (props: Omit<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
25
|
+
locale?: string | undefined;
|
|
26
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
27
|
+
}, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOutterProps): {
|
|
28
|
+
ref: any;
|
|
29
|
+
childRef(ref: any): void;
|
|
30
|
+
getWrappedInstance(): any;
|
|
31
|
+
render(): React.JSX.Element;
|
|
32
|
+
context: unknown;
|
|
33
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
34
|
+
locale?: string | undefined;
|
|
35
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
36
|
+
}, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOutterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
37
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
38
|
+
readonly props: Readonly<Omit<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
39
|
+
locale?: string | undefined;
|
|
40
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
41
|
+
}, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOutterProps>;
|
|
42
|
+
state: Readonly<{}>;
|
|
43
|
+
refs: {
|
|
44
|
+
[key: string]: React.ReactInstance;
|
|
45
|
+
};
|
|
46
|
+
componentDidMount?(): void;
|
|
47
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
48
|
+
locale?: string | undefined;
|
|
49
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
50
|
+
}, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
51
|
+
componentWillUnmount?(): void;
|
|
52
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
53
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
54
|
+
locale?: string | undefined;
|
|
55
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
56
|
+
}, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOutterProps>, prevState: Readonly<{}>): any;
|
|
57
|
+
componentDidUpdate?(prevProps: Readonly<Omit<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
58
|
+
locale?: string | undefined;
|
|
59
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
60
|
+
}, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOutterProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
61
|
+
componentWillMount?(): void;
|
|
62
|
+
UNSAFE_componentWillMount?(): void;
|
|
63
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
64
|
+
locale?: string | undefined;
|
|
65
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
66
|
+
}, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOutterProps>, nextContext: any): void;
|
|
67
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
68
|
+
locale?: string | undefined;
|
|
69
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
70
|
+
}, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOutterProps>, nextContext: any): void;
|
|
71
|
+
componentWillUpdate?(nextProps: Readonly<Omit<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
72
|
+
locale?: string | undefined;
|
|
73
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
74
|
+
}, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
75
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
76
|
+
locale?: string | undefined;
|
|
77
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
78
|
+
}, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
79
|
+
};
|
|
80
|
+
displayName: string;
|
|
81
|
+
contextType: React.Context<string>;
|
|
82
|
+
ComposedComponent: React.ComponentType<{
|
|
83
|
+
new (props: Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
84
|
+
locale?: string | undefined;
|
|
85
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
86
|
+
}): {
|
|
87
|
+
ref: any;
|
|
88
|
+
childRef(ref: any): void;
|
|
89
|
+
getWrappedInstance(): any;
|
|
90
|
+
render(): React.JSX.Element;
|
|
91
|
+
context: unknown;
|
|
92
|
+
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
93
|
+
locale?: string | undefined;
|
|
94
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
95
|
+
}>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
|
|
96
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
97
|
+
readonly props: Readonly<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
98
|
+
locale?: string | undefined;
|
|
99
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
100
|
+
}>;
|
|
101
|
+
state: Readonly<{}>;
|
|
102
|
+
refs: {
|
|
103
|
+
[key: string]: React.ReactInstance;
|
|
104
|
+
};
|
|
105
|
+
componentDidMount?(): void;
|
|
106
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
107
|
+
locale?: string | undefined;
|
|
108
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
109
|
+
}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
110
|
+
componentWillUnmount?(): void;
|
|
111
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
112
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
113
|
+
locale?: string | undefined;
|
|
114
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
115
|
+
}>, prevState: Readonly<{}>): any;
|
|
116
|
+
componentDidUpdate?(prevProps: Readonly<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
117
|
+
locale?: string | undefined;
|
|
118
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
119
|
+
}>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
120
|
+
componentWillMount?(): void;
|
|
121
|
+
UNSAFE_componentWillMount?(): void;
|
|
122
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
123
|
+
locale?: string | undefined;
|
|
124
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
125
|
+
}>, nextContext: any): void;
|
|
126
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
127
|
+
locale?: string | undefined;
|
|
128
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
129
|
+
}>, nextContext: any): void;
|
|
130
|
+
componentWillUpdate?(nextProps: Readonly<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
131
|
+
locale?: string | undefined;
|
|
132
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
133
|
+
}>, nextState: Readonly<{}>, nextContext: any): void;
|
|
134
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
135
|
+
locale?: string | undefined;
|
|
136
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
137
|
+
}>, nextState: Readonly<{}>, nextContext: any): void;
|
|
138
|
+
};
|
|
139
|
+
displayName: string;
|
|
140
|
+
contextType: React.Context<string>;
|
|
141
|
+
ComposedComponent: React.ComponentType<React.FC<FormulaInputProps>>;
|
|
142
|
+
} & import("hoist-non-react-statics").NonReactStatics<React.FC<FormulaInputProps>, {}> & {
|
|
143
|
+
ComposedComponent: React.FC<FormulaInputProps>;
|
|
144
|
+
}>;
|
|
145
|
+
} & import("hoist-non-react-statics").NonReactStatics<{
|
|
146
|
+
new (props: Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
147
|
+
locale?: string | undefined;
|
|
148
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
149
|
+
}): {
|
|
150
|
+
ref: any;
|
|
151
|
+
childRef(ref: any): void;
|
|
152
|
+
getWrappedInstance(): any;
|
|
153
|
+
render(): React.JSX.Element;
|
|
154
|
+
context: unknown;
|
|
155
|
+
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
156
|
+
locale?: string | undefined;
|
|
157
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
158
|
+
}>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
|
|
159
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
160
|
+
readonly props: Readonly<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
161
|
+
locale?: string | undefined;
|
|
162
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
163
|
+
}>;
|
|
164
|
+
state: Readonly<{}>;
|
|
165
|
+
refs: {
|
|
166
|
+
[key: string]: React.ReactInstance;
|
|
167
|
+
};
|
|
168
|
+
componentDidMount?(): void;
|
|
169
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
170
|
+
locale?: string | undefined;
|
|
171
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
172
|
+
}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
173
|
+
componentWillUnmount?(): void;
|
|
174
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
175
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
176
|
+
locale?: string | undefined;
|
|
177
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
178
|
+
}>, prevState: Readonly<{}>): any;
|
|
179
|
+
componentDidUpdate?(prevProps: Readonly<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
180
|
+
locale?: string | undefined;
|
|
181
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
182
|
+
}>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
183
|
+
componentWillMount?(): void;
|
|
184
|
+
UNSAFE_componentWillMount?(): void;
|
|
185
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
186
|
+
locale?: string | undefined;
|
|
187
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
188
|
+
}>, nextContext: any): void;
|
|
189
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
190
|
+
locale?: string | undefined;
|
|
191
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
192
|
+
}>, nextContext: any): void;
|
|
193
|
+
componentWillUpdate?(nextProps: Readonly<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
194
|
+
locale?: string | undefined;
|
|
195
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
196
|
+
}>, nextState: Readonly<{}>, nextContext: any): void;
|
|
197
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
198
|
+
locale?: string | undefined;
|
|
199
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
200
|
+
}>, nextState: Readonly<{}>, nextContext: any): void;
|
|
201
|
+
};
|
|
202
|
+
displayName: string;
|
|
203
|
+
contextType: React.Context<string>;
|
|
204
|
+
ComposedComponent: React.ComponentType<React.FC<FormulaInputProps>>;
|
|
205
|
+
} & import("hoist-non-react-statics").NonReactStatics<React.FC<FormulaInputProps>, {}> & {
|
|
206
|
+
ComposedComponent: React.FC<FormulaInputProps>;
|
|
207
|
+
}, {}> & {
|
|
208
|
+
ComposedComponent: {
|
|
209
|
+
new (props: Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
210
|
+
locale?: string | undefined;
|
|
211
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
212
|
+
}): {
|
|
213
|
+
ref: any;
|
|
214
|
+
childRef(ref: any): void;
|
|
215
|
+
getWrappedInstance(): any;
|
|
216
|
+
render(): React.JSX.Element;
|
|
217
|
+
context: unknown;
|
|
218
|
+
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
219
|
+
locale?: string | undefined;
|
|
220
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
221
|
+
}>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
|
|
222
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
223
|
+
readonly props: Readonly<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
224
|
+
locale?: string | undefined;
|
|
225
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
226
|
+
}>;
|
|
227
|
+
state: Readonly<{}>;
|
|
228
|
+
refs: {
|
|
229
|
+
[key: string]: React.ReactInstance;
|
|
230
|
+
};
|
|
231
|
+
componentDidMount?(): void;
|
|
232
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
233
|
+
locale?: string | undefined;
|
|
234
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
235
|
+
}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
236
|
+
componentWillUnmount?(): void;
|
|
237
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
238
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
239
|
+
locale?: string | undefined;
|
|
240
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
241
|
+
}>, prevState: Readonly<{}>): any;
|
|
242
|
+
componentDidUpdate?(prevProps: Readonly<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
243
|
+
locale?: string | undefined;
|
|
244
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
245
|
+
}>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
246
|
+
componentWillMount?(): void;
|
|
247
|
+
UNSAFE_componentWillMount?(): void;
|
|
248
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
249
|
+
locale?: string | undefined;
|
|
250
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
251
|
+
}>, nextContext: any): void;
|
|
252
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
253
|
+
locale?: string | undefined;
|
|
254
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
255
|
+
}>, nextContext: any): void;
|
|
256
|
+
componentWillUpdate?(nextProps: Readonly<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
257
|
+
locale?: string | undefined;
|
|
258
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
259
|
+
}>, nextState: Readonly<{}>, nextContext: any): void;
|
|
260
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<FormulaInputProps, keyof LocaleProps> & {
|
|
261
|
+
locale?: string | undefined;
|
|
262
|
+
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
263
|
+
}>, nextState: Readonly<{}>, nextContext: any): void;
|
|
264
|
+
};
|
|
265
|
+
displayName: string;
|
|
266
|
+
contextType: React.Context<string>;
|
|
267
|
+
ComposedComponent: React.ComponentType<React.FC<FormulaInputProps>>;
|
|
268
|
+
} & import("hoist-non-react-statics").NonReactStatics<React.FC<FormulaInputProps>, {}> & {
|
|
269
|
+
ComposedComponent: React.FC<FormulaInputProps>;
|
|
270
|
+
};
|
|
271
|
+
};
|
|
272
|
+
export default _default;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* amis-ui v3.3.0
|
|
3
|
+
* Copyright 2018-2023 fex
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
'use strict';
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
|
+
|
|
10
|
+
var tslib = require('tslib');
|
|
11
|
+
var React = require('react');
|
|
12
|
+
var moment = require('moment');
|
|
13
|
+
var pick = require('lodash/pick');
|
|
14
|
+
var amisCore = require('amis-core');
|
|
15
|
+
var Editor = require('./Editor.js');
|
|
16
|
+
var ResultBox = require('../ResultBox.js');
|
|
17
|
+
var Select = require('../Select.js');
|
|
18
|
+
var NumberInput = require('../NumberInput.js');
|
|
19
|
+
var DatePicker = require('../DatePicker.js');
|
|
20
|
+
var Tag = require('../Tag.js');
|
|
21
|
+
|
|
22
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
23
|
+
|
|
24
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
25
|
+
var moment__default = /*#__PURE__*/_interopDefaultLegacy(moment);
|
|
26
|
+
var pick__default = /*#__PURE__*/_interopDefaultLegacy(pick);
|
|
27
|
+
|
|
28
|
+
var __react_jsx__ = require('react');
|
|
29
|
+
var _J$X_ = (__react_jsx__["default"] || __react_jsx__).createElement;
|
|
30
|
+
(__react_jsx__["default"] || __react_jsx__).Fragment;
|
|
31
|
+
var FormulaInput = function (props) {
|
|
32
|
+
var _a, _b, _c, _d, _e;
|
|
33
|
+
var __ = props.translate, className = props.className, cx = props.classnames, allowInput = props.allowInput, placeholder = props.placeholder, borderMode = props.borderMode, evalMode = props.evalMode, mixedMode = props.mixedMode, value = props.value, variables = props.variables, _f = props.inputSettings, inputSettings = _f === void 0 ? { type: 'text' } : _f, popOverContainer = props.popOverContainer, onChange = props.onChange, itemRender = props.itemRender;
|
|
34
|
+
var schemaType = inputSettings.type;
|
|
35
|
+
/** 自上层共享的属性 */
|
|
36
|
+
var sharedProps = pick__default["default"](props, ['disabeld', 'clearable']);
|
|
37
|
+
var pipInValue = React.useCallback(function (value) {
|
|
38
|
+
return value;
|
|
39
|
+
}, ['value']);
|
|
40
|
+
var pipOutValue = React.useCallback(function (origin) {
|
|
41
|
+
var result = origin;
|
|
42
|
+
if (origin === undefined) {
|
|
43
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(result);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
if (schemaType === 'boolean') {
|
|
47
|
+
result = origin.value;
|
|
48
|
+
}
|
|
49
|
+
else if (schemaType === 'select') {
|
|
50
|
+
result = Array.isArray(origin)
|
|
51
|
+
? origin.map(function (item) { return item.value; })
|
|
52
|
+
: origin.value;
|
|
53
|
+
}
|
|
54
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(result);
|
|
55
|
+
}, ['onChange']);
|
|
56
|
+
var cmptValue = pipInValue(value !== null && value !== void 0 ? value : inputSettings.defaultValue);
|
|
57
|
+
var targetVariable = variables && cmptValue != null && typeof cmptValue === 'string'
|
|
58
|
+
? amisCore.findTree(variables, function (item) {
|
|
59
|
+
return mixedMode
|
|
60
|
+
? cmptValue.replace(/^\$\{/, '').replace(/\}$/, '') === (item === null || item === void 0 ? void 0 : item.value)
|
|
61
|
+
: cmptValue === (item === null || item === void 0 ? void 0 : item.value);
|
|
62
|
+
})
|
|
63
|
+
: null;
|
|
64
|
+
if (amisCore.isExpression(cmptValue) ||
|
|
65
|
+
targetVariable ||
|
|
66
|
+
(schemaType === 'number' &&
|
|
67
|
+
cmptValue != null &&
|
|
68
|
+
typeof cmptValue !== 'number') ||
|
|
69
|
+
(['date', 'time', 'datetime'].includes(schemaType) &&
|
|
70
|
+
!moment__default["default"](cmptValue).isValid()) ||
|
|
71
|
+
(schemaType === 'select' &&
|
|
72
|
+
cmptValue != null &&
|
|
73
|
+
!((_a = inputSettings === null || inputSettings === void 0 ? void 0 : inputSettings.options) !== null && _a !== void 0 ? _a : []).some(function (item) { return (item === null || item === void 0 ? void 0 : item.value) === cmptValue; })) ||
|
|
74
|
+
(schemaType === 'boolean' &&
|
|
75
|
+
cmptValue != null &&
|
|
76
|
+
typeof cmptValue !== 'boolean')) {
|
|
77
|
+
var varName = cmptValue && mixedMode
|
|
78
|
+
? cmptValue.replace(/^\$\{/, '').replace(/\}$/, '')
|
|
79
|
+
: cmptValue;
|
|
80
|
+
var resultValue = (_b = targetVariable === null || targetVariable === void 0 ? void 0 : targetVariable.value) !== null && _b !== void 0 ? _b : varName;
|
|
81
|
+
return (_J$X_(ResultBox["default"], { className: cx("FormulaPicker-input-variable"), allowInput: false, value: resultValue, result: resultValue == null
|
|
82
|
+
? void 0
|
|
83
|
+
: Editor.FormulaEditor.highlightValue(resultValue, variables, evalMode), itemRender: function (item) {
|
|
84
|
+
return (_J$X_("div", { className: cx('FormulaPicker-ResultBox'), dangerouslySetInnerHTML: { __html: item.html } }));
|
|
85
|
+
}, onResultChange: amisCore.noop, onChange: pipOutValue, onClear: function () { return pipOutValue(undefined); }, clearable: true }));
|
|
86
|
+
}
|
|
87
|
+
if (schemaType === 'number') {
|
|
88
|
+
return (_J$X_(NumberInput["default"], tslib.__assign({}, sharedProps, { className: cx(className, 'FormulaPicker-input-number'), borderMode: "none", placeholder: __(placeholder !== null && placeholder !== void 0 ? placeholder : 'NumberInput.placeholder'), step: inputSettings.step, min: inputSettings.minimum, max: inputSettings.maximum, precision: inputSettings.precision, value: cmptValue, onChange: pipOutValue })));
|
|
89
|
+
}
|
|
90
|
+
else if (schemaType === 'date') {
|
|
91
|
+
var cmptValue_1 = pipInValue(value !== null && value !== void 0 ? value : inputSettings.defaultValue);
|
|
92
|
+
return (_J$X_(DatePicker["default"], tslib.__assign({}, sharedProps, { className: cx(className, 'FormulaPicker-input-date'), borderMode: "none", closeOnSelect: true, placeholder: __(placeholder !== null && placeholder !== void 0 ? placeholder : 'Date.placeholder'), format: inputSettings.format || 'YYYY-MM-DD', inputFormat: inputSettings.inputFormat || 'YYYY-MM-DD', timeFormat: "", popOverContainer: popOverContainer, value: cmptValue_1, onChange: pipOutValue })));
|
|
93
|
+
}
|
|
94
|
+
else if (schemaType === 'time') {
|
|
95
|
+
return (_J$X_(DatePicker["default"], tslib.__assign({}, sharedProps, { className: cx(className, 'FormulaPicker-input-time'), viewMode: "time", borderMode: "none", closeOnSelect: true, placeholder: __(placeholder !== null && placeholder !== void 0 ? placeholder : 'Time.placeholder'), format: inputSettings.format || 'HH:mm', inputFormat: inputSettings.inputFormat || 'HH:mm', dateFormat: "", timeFormat: inputSettings.format || 'HH:mm', popOverContainer: popOverContainer, value: pipInValue(value !== null && value !== void 0 ? value : inputSettings.defaultValue), onChange: pipOutValue })));
|
|
96
|
+
}
|
|
97
|
+
else if (schemaType === 'datetime') {
|
|
98
|
+
return (_J$X_(DatePicker["default"], tslib.__assign({}, sharedProps, { className: cx(className, 'FormulaPicker-input-datetime'), borderMode: "none", closeOnSelect: true, placeholder: __(placeholder !== null && placeholder !== void 0 ? placeholder : 'Time.placeholder'), format: inputSettings.format || '', inputFormat: inputSettings.inputFormat || 'YYYY-MM-DD HH:mm', timeFormat: inputSettings.timeFormat || 'HH:mm', popOverContainer: popOverContainer, value: pipInValue(value !== null && value !== void 0 ? value : inputSettings.defaultValue), onChange: pipOutValue })));
|
|
99
|
+
}
|
|
100
|
+
else if (schemaType === 'select' || schemaType === 'boolean') {
|
|
101
|
+
return (_J$X_(Select["default"], tslib.__assign({}, sharedProps, { className: cx(className, "FormulaPicker-input-".concat(schemaType)), borderMode: "none", multiple: schemaType === 'boolean' ? false : inputSettings.multiple, options: schemaType === 'boolean'
|
|
102
|
+
? [
|
|
103
|
+
{
|
|
104
|
+
label: __((_c = inputSettings === null || inputSettings === void 0 ? void 0 : inputSettings.trueLabel) !== null && _c !== void 0 ? _c : 'FormulaInput.True'),
|
|
105
|
+
value: true
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
label: __((_d = inputSettings === null || inputSettings === void 0 ? void 0 : inputSettings.falseLabel) !== null && _d !== void 0 ? _d : 'FormulaInput.False'),
|
|
109
|
+
value: false
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
: (_e = inputSettings.options) !== null && _e !== void 0 ? _e : [], value: pipInValue(value), renderValueLabel: function (option) {
|
|
113
|
+
var _a, _b;
|
|
114
|
+
var label = (_b = (_a = option.label) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : '';
|
|
115
|
+
return schemaType === 'boolean' || !inputSettings.multiple ? (_J$X_(Tag["default"], { label: label, className: cx('rounded') })) : (_J$X_(React__default["default"].Fragment, null, label));
|
|
116
|
+
}, onChange: pipOutValue })));
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
return (_J$X_(ResultBox["default"], tslib.__assign({}, sharedProps, { className: cx(className), allowInput: allowInput, borderMode: borderMode, placeholder: placeholder, value: pipInValue(value), result: allowInput || !value
|
|
120
|
+
? void 0
|
|
121
|
+
: Editor.FormulaEditor.highlightValue(value, variables, evalMode), itemRender: itemRender, onResultChange: amisCore.noop, onChange: pipOutValue })));
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
var FormulaInput$1 = amisCore.themeable(amisCore.localeable(amisCore.uncontrollable(FormulaInput, {
|
|
125
|
+
value: 'onChange'
|
|
126
|
+
})));
|
|
127
|
+
|
|
128
|
+
exports["default"] = FormulaInput$1;
|