amis-ui 6.13.0-beta.8 → 6.13.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.d.ts +53 -0
- package/esm/components/404.js +35 -0
- package/esm/components/Alert.d.ts +615 -0
- package/esm/components/Alert.js +266 -0
- package/esm/components/Alert2.d.ts +117 -0
- package/esm/components/Alert2.js +58 -0
- package/esm/components/AlphabetIndexer.d.ts +11 -0
- package/esm/components/AlphabetIndexer.js +48 -0
- package/esm/components/AnchorNav.d.ts +162 -0
- package/esm/components/AnchorNav.js +153 -0
- package/esm/components/AnchorNavSection.d.ts +2 -0
- package/esm/components/AnchorNavSection.js +7 -0
- package/esm/components/ArrayInput.d.ts +617 -0
- package/esm/components/ArrayInput.js +147 -0
- package/esm/components/AsideNav.d.ts +142 -0
- package/esm/components/AsideNav.js +133 -0
- package/esm/components/AssociatedSelection.d.ts +564 -0
- package/esm/components/AssociatedSelection.js +107 -0
- package/esm/components/AutoFoldedList.d.ts +87 -0
- package/esm/components/AutoFoldedList.js +124 -0
- package/esm/components/AutoSizer.d.ts +2 -0
- package/esm/components/AutoSizer.js +8 -0
- package/esm/components/Avatar.d.ts +374 -0
- package/esm/components/Avatar.js +126 -0
- package/esm/components/Badge.d.ts +118 -0
- package/esm/components/Badge.js +154 -0
- package/esm/components/BaiduMapPicker.d.ts +100 -0
- package/esm/components/BaiduMapPicker.js +366 -0
- package/esm/components/BarCode.d.ts +56 -0
- package/esm/components/BarCode.js +42 -0
- package/esm/components/Breadcrumb.d.ts +115 -0
- package/esm/components/Breadcrumb.js +160 -0
- package/esm/components/Button.d.ts +147 -0
- package/esm/components/Button.js +63 -0
- package/esm/components/CalendarMobile.d.ts +431 -0
- package/esm/components/CalendarMobile.js +538 -0
- package/esm/components/Card.d.ts +444 -0
- package/esm/components/Card.js +88 -0
- package/esm/components/Cascader.d.ts +108 -0
- package/esm/components/Cascader.js +515 -0
- package/esm/components/ChainedDropdownSelection.d.ts +561 -0
- package/esm/components/ChainedDropdownSelection.js +104 -0
- package/esm/components/ChainedSelection.d.ts +554 -0
- package/esm/components/ChainedSelection.js +184 -0
- package/esm/components/Checkbox.d.ts +110 -0
- package/esm/components/Checkbox.js +87 -0
- package/esm/components/CityArea.d.ts +299 -0
- package/esm/components/CityArea.js +190 -0
- package/esm/components/CityDB.d.ts +13 -0
- package/esm/components/CityDB.js +3942 -0
- package/esm/components/CodeMirror.d.ts +29 -0
- package/esm/components/CodeMirror.js +140 -0
- package/esm/components/Collapse.d.ts +447 -0
- package/esm/components/Collapse.js +184 -0
- package/esm/components/CollapseGroup.d.ts +219 -0
- package/esm/components/CollapseGroup.js +117 -0
- package/esm/components/ColorPicker.d.ts +530 -0
- package/esm/components/ColorPicker.js +260 -0
- package/esm/components/Combo.d.ts +354 -0
- package/esm/components/Combo.js +212 -0
- package/esm/components/ConditionBuilder.d.ts +2 -0
- package/esm/components/ConditionBuilder.js +7 -0
- package/esm/components/ConfirmBox.d.ts +322 -0
- package/esm/components/ConfirmBox.js +129 -0
- package/esm/components/ContextMenu.d.ts +115 -0
- package/esm/components/ContextMenu.js +310 -0
- package/esm/components/DatePicker.d.ts +638 -0
- package/esm/components/DatePicker.js +717 -0
- package/esm/components/DateRangePicker.d.ts +1046 -0
- package/esm/components/DateRangePicker.js +1386 -0
- package/esm/components/DiffEditor.d.ts +21 -0
- package/esm/components/DiffEditor.js +119 -0
- package/esm/components/DndContainer.d.ts +205 -0
- package/esm/components/DndContainer.js +25 -0
- package/esm/components/Drawer.d.ts +159 -0
- package/esm/components/Drawer.js +272 -0
- package/esm/components/DropDownSelection.d.ts +557 -0
- package/esm/components/DropDownSelection.js +78 -0
- package/esm/components/DropdownContextMenus.d.ts +84 -0
- package/esm/components/DropdownContextMenus.js +93 -0
- package/esm/components/Editor.d.ts +681 -0
- package/esm/components/Editor.js +238 -0
- package/esm/components/Form.d.ts +31 -0
- package/esm/components/Form.js +84 -0
- package/esm/components/FormField.d.ts +287 -0
- package/esm/components/FormField.js +78 -0
- package/esm/components/FormulaPicker.d.ts +2 -0
- package/esm/components/FormulaPicker.js +7 -0
- package/esm/components/GaodeMapPicker.d.ts +89 -0
- package/esm/components/GaodeMapPicker.js +204 -0
- package/esm/components/GridNav.d.ts +53 -0
- package/esm/components/GridNav.js +125 -0
- package/esm/components/GridNavItem.d.ts +2 -0
- package/esm/components/GridNavItem.js +7 -0
- package/esm/components/GroupedSelection.d.ts +543 -0
- package/esm/components/GroupedSelection.js +138 -0
- package/esm/components/HeadCellDropDown.d.ts +2 -0
- package/esm/components/HeadCellDropDown.js +7 -0
- package/esm/components/HorizontalScroll.d.ts +75 -0
- package/esm/components/HorizontalScroll.js +271 -0
- package/esm/components/Html.d.ts +82 -0
- package/esm/components/Html.js +52 -0
- package/esm/components/Icon.d.ts +2 -0
- package/esm/components/Icon.js +7 -0
- package/esm/components/ImageGallery.d.ts +465 -0
- package/esm/components/ImageGallery.js +396 -0
- package/esm/components/Input.d.ts +18 -0
- package/esm/components/Input.js +75 -0
- package/esm/components/InputBox.d.ts +100 -0
- package/esm/components/InputBox.js +98 -0
- package/esm/components/InputBoxWithSuggestion.d.ts +272 -0
- package/esm/components/InputBoxWithSuggestion.js +69 -0
- package/esm/components/InputJSONSchema.d.ts +2 -0
- package/esm/components/InputJSONSchema.js +7 -0
- package/esm/components/InputTable.d.ts +317 -0
- package/esm/components/InputTable.js +176 -0
- package/esm/components/JSONSchemaEditor.d.ts +2 -0
- package/esm/components/JSONSchemaEditor.js +7 -0
- package/esm/components/Layout.d.ts +74 -0
- package/esm/components/Layout.js +60 -0
- package/esm/components/Link.d.ts +60 -0
- package/esm/components/Link.js +44 -0
- package/esm/components/ListGroup.d.ts +77 -0
- package/esm/components/ListGroup.js +31 -0
- package/esm/components/ListMenu.d.ts +568 -0
- package/esm/components/ListMenu.js +62 -0
- package/esm/components/LocationPicker.d.ts +467 -0
- package/esm/components/LocationPicker.js +208 -0
- package/esm/components/Markdown.d.ts +25 -0
- package/esm/components/Markdown.js +70 -0
- package/esm/components/Menu.d.ts +2 -0
- package/esm/components/Menu.js +7 -0
- package/esm/components/MixedInput.d.ts +55 -0
- package/esm/components/MixedInput.js +88 -0
- package/esm/components/MobileDevTool.d.ts +12 -0
- package/esm/components/MobileDevTool.js +312 -0
- package/esm/components/Modal.d.ts +1316 -0
- package/esm/components/Modal.js +261 -0
- package/esm/components/ModalManager.d.ts +17 -0
- package/esm/components/ModalManager.js +42 -0
- package/esm/components/MonthRangePicker.d.ts +744 -0
- package/esm/components/MultilineText.d.ts +454 -0
- package/esm/components/MultilineText.js +90 -0
- package/esm/components/NumberInput.d.ts +201 -0
- package/esm/components/NumberInput.js +274 -0
- package/esm/components/OverflowTpl.d.ts +61 -0
- package/esm/components/OverflowTpl.js +101 -0
- package/esm/components/Pagination.d.ts +812 -0
- package/esm/components/Pagination.js +377 -0
- package/esm/components/PdfViewer.d.ts +49 -0
- package/esm/components/PdfViewer.js +83 -0
- package/esm/components/Picker.d.ts +277 -0
- package/esm/components/Picker.js +73 -0
- package/esm/components/PickerColumn.d.ts +62 -0
- package/esm/components/PickerColumn.js +276 -0
- package/esm/components/PickerContainer.d.ts +291 -0
- package/esm/components/PickerContainer.js +157 -0
- package/esm/components/PopOverContainer.d.ts +59 -0
- package/esm/components/PopOverContainer.js +149 -0
- package/esm/components/PopUp.d.ts +573 -0
- package/esm/components/PopUp.js +85 -0
- package/esm/components/Progress.d.ts +311 -0
- package/esm/components/Progress.js +136 -0
- package/esm/components/PullRefresh.d.ts +79 -0
- package/esm/components/PullRefresh.js +172 -0
- package/esm/components/Radios.d.ts +170 -0
- package/esm/components/Radios.js +129 -0
- package/esm/components/Range.d.ts +131 -0
- package/esm/components/Range.js +517 -0
- package/esm/components/Rating.d.ts +227 -0
- package/esm/components/Rating.js +341 -0
- package/esm/components/ResultBox.d.ts +532 -0
- package/esm/components/ResultBox.js +195 -0
- package/esm/components/ResultList.d.ts +554 -0
- package/esm/components/ResultList.js +254 -0
- package/esm/components/ResultTableList.d.ts +786 -0
- package/esm/components/ResultTableList.js +152 -0
- package/esm/components/ResultTreeList.d.ts +425 -0
- package/esm/components/ResultTreeList.js +241 -0
- package/esm/components/RichText.d.ts +48 -0
- package/esm/components/RichText.js +271 -0
- package/esm/components/SearchBox.d.ts +625 -0
- package/esm/components/SearchBox.js +299 -0
- package/esm/components/Select.d.ts +6498 -0
- package/esm/components/Select.js +815 -0
- package/esm/components/SelectMobile.d.ts +38 -0
- package/esm/components/SelectMobile.js +370 -0
- package/esm/components/Selection.d.ts +598 -0
- package/esm/components/Selection.js +166 -0
- package/esm/components/Shape.d.ts +58 -0
- package/esm/components/Shape.js +429 -0
- package/esm/components/Signature.d.ts +279 -0
- package/esm/components/Signature.js +293 -0
- package/esm/components/Slider.d.ts +56 -0
- package/esm/components/Slider.js +140 -0
- package/esm/components/SparkLine.d.ts +397 -0
- package/esm/components/SparkLine.js +62 -0
- package/esm/components/Spinner.d.ts +266 -0
- package/esm/components/Spinner.js +202 -0
- package/esm/components/Steps.d.ts +117 -0
- package/esm/components/Steps.js +76 -0
- package/esm/components/Switch.d.ts +105 -0
- package/esm/components/Switch.js +73 -0
- package/esm/components/Tab.d.ts +2 -0
- package/esm/components/Tab.js +7 -0
- package/esm/components/Table.d.ts +2 -0
- package/esm/components/Table.js +7 -0
- package/esm/components/TableSelection.d.ts +791 -0
- package/esm/components/TableSelection.js +169 -0
- package/esm/components/Tabs.d.ts +670 -0
- package/esm/components/Tabs.js +607 -0
- package/esm/components/TabsTransfer.d.ts +423 -0
- package/esm/components/TabsTransfer.js +221 -0
- package/esm/components/TabsTransferPicker.d.ts +267 -0
- package/esm/components/TabsTransferPicker.js +81 -0
- package/esm/components/Tag.d.ts +318 -0
- package/esm/components/Tag.js +137 -0
- package/esm/components/Textarea.d.ts +564 -0
- package/esm/components/Textarea.js +147 -0
- package/esm/components/Timeline.d.ts +56 -0
- package/esm/components/Timeline.js +60 -0
- package/esm/components/TimelineItem.d.ts +1292 -0
- package/esm/components/TimelineItem.js +101 -0
- package/esm/components/Tinymce.d.ts +66 -0
- package/esm/components/Tinymce.js +632 -0
- package/esm/components/TitleBar.d.ts +123 -0
- package/esm/components/TitleBar.js +48 -0
- package/esm/components/Toast.d.ts +591 -0
- package/esm/components/Toast.js +247 -0
- package/esm/components/Tooltip.d.ts +65 -0
- package/esm/components/Tooltip.js +36 -0
- package/esm/components/TooltipWrapper.d.ts +217 -0
- package/esm/components/TooltipWrapper.js +181 -0
- package/esm/components/Transfer.d.ts +1844 -0
- package/esm/components/Transfer.js +485 -0
- package/esm/components/TransferDropDown.d.ts +634 -0
- package/esm/components/TransferDropDown.js +98 -0
- package/esm/components/TransferPicker.d.ts +275 -0
- package/esm/components/TransferPicker.js +98 -0
- package/esm/components/TransferSearch.d.ts +283 -0
- package/esm/components/TransferSearch.js +100 -0
- package/esm/components/Tree.d.ts +1953 -0
- package/esm/components/Tree.js +1220 -0
- package/esm/components/TreeSelection.d.ts +601 -0
- package/esm/components/TreeSelection.js +201 -0
- package/esm/components/UserSelect.d.ts +541 -0
- package/esm/components/UserSelect.js +674 -0
- package/esm/components/UserTabSelect.d.ts +315 -0
- package/esm/components/UserTabSelect.js +227 -0
- package/esm/components/VerificationCode.d.ts +116 -0
- package/esm/components/VerificationCode.js +172 -0
- package/esm/components/VirtualList.d.ts +2 -0
- package/esm/components/VirtualList.js +7 -0
- package/esm/components/WithRemoteConfig.d.ts +383 -0
- package/esm/components/WithRemoteConfig.js +302 -0
- package/esm/components/WithStore.d.ts +72 -0
- package/esm/components/WithStore.js +48 -0
- package/esm/components/calendar/Calendar.d.ts +83 -0
- package/esm/components/calendar/Calendar.js +529 -0
- package/esm/components/calendar/CalendarContainer.d.ts +10 -0
- package/esm/components/calendar/CalendarContainer.js +27 -0
- package/esm/components/calendar/DaysView.d.ts +184 -0
- package/esm/components/calendar/DaysView.js +528 -0
- package/esm/components/calendar/MonthsView.d.ts +133 -0
- package/esm/components/calendar/MonthsView.js +175 -0
- package/esm/components/calendar/QuartersView.d.ts +102 -0
- package/esm/components/calendar/QuartersView.js +125 -0
- package/esm/components/calendar/TimeView.d.ts +183 -0
- package/esm/components/calendar/TimeView.js +559 -0
- package/esm/components/calendar/YearsView.d.ts +102 -0
- package/esm/components/calendar/YearsView.js +122 -0
- package/esm/components/condition-builder/Expression.d.ts +292 -0
- package/esm/components/condition-builder/Expression.js +121 -0
- package/esm/components/condition-builder/Field.d.ts +272 -0
- package/esm/components/condition-builder/Field.js +32 -0
- package/esm/components/condition-builder/Formula.d.ts +261 -0
- package/esm/components/condition-builder/Func.d.ts +273 -0
- package/esm/components/condition-builder/Func.js +75 -0
- package/esm/components/condition-builder/Group.d.ts +310 -0
- package/esm/components/condition-builder/Group.js +191 -0
- package/esm/components/condition-builder/GroupOrItem.d.ts +87 -0
- package/esm/components/condition-builder/GroupOrItem.js +105 -0
- package/esm/components/condition-builder/InputSwitch.d.ts +47 -0
- package/esm/components/condition-builder/InputSwitch.js +28 -0
- package/esm/components/condition-builder/Item.d.ts +287 -0
- package/esm/components/condition-builder/Item.js +232 -0
- package/esm/components/condition-builder/Value.d.ts +274 -0
- package/esm/components/condition-builder/Value.js +114 -0
- package/esm/components/condition-builder/config.d.ts +36 -0
- package/esm/components/condition-builder/config.js +120 -0
- package/esm/components/condition-builder/index.d.ts +319 -0
- package/esm/components/condition-builder/index.js +228 -0
- package/esm/components/condition-builder/types.d.ts +116 -0
- package/esm/components/formula/CodeEditor.d.ts +92 -0
- package/esm/components/formula/CodeEditor.js +99 -0
- package/esm/components/formula/Editor.d.ts +516 -0
- package/esm/components/formula/Editor.js +446 -0
- package/esm/components/formula/FuncList.d.ts +46 -0
- package/esm/components/formula/FuncList.js +64 -0
- package/esm/components/formula/Input.d.ts +292 -0
- package/esm/components/formula/Input.js +122 -0
- package/esm/components/formula/Picker.d.ts +492 -0
- package/esm/components/formula/Picker.js +454 -0
- package/esm/components/formula/VariableList.d.ts +58 -0
- package/esm/components/formula/VariableList.js +183 -0
- package/esm/components/formula/plugin.d.ts +51 -0
- package/esm/components/formula/plugin.js +372 -0
- package/esm/components/icons.d.ts +61 -0
- package/esm/components/icons.js +458 -0
- package/esm/components/index.d.ts +138 -0
- package/esm/components/json-schema/Array.d.ts +3 -0
- package/esm/components/json-schema/Array.js +129 -0
- package/esm/components/json-schema/Item.d.ts +5 -0
- package/esm/components/json-schema/Item.js +63 -0
- package/esm/components/json-schema/Object.d.ts +5 -0
- package/esm/components/json-schema/Object.js +265 -0
- package/esm/components/json-schema/index.d.ts +272 -0
- package/esm/components/json-schema/index.js +29 -0
- package/esm/components/menu/MenuContext.d.ts +83 -0
- package/esm/components/menu/MenuContext.js +25 -0
- package/esm/components/menu/MenuItem.d.ts +81 -0
- package/esm/components/menu/MenuItem.js +112 -0
- package/esm/components/menu/PanelMenu.d.ts +46 -0
- package/esm/components/menu/PanelMenu.js +68 -0
- package/esm/components/menu/SubMenu.d.ts +84 -0
- package/esm/components/menu/SubMenu.js +137 -0
- package/esm/components/menu/index.d.ts +381 -0
- package/esm/components/menu/index.js +369 -0
- package/esm/components/schema-editor/Array.d.ts +11 -0
- package/esm/components/schema-editor/Array.js +84 -0
- package/esm/components/schema-editor/Common.d.ts +61 -0
- package/esm/components/schema-editor/Common.js +161 -0
- package/esm/components/schema-editor/Item.d.ts +8 -0
- package/esm/components/schema-editor/Item.js +24 -0
- package/esm/components/schema-editor/Object.d.ts +51 -0
- package/esm/components/schema-editor/Object.js +294 -0
- package/esm/components/schema-editor/SchemaVariableList.d.ts +186 -0
- package/esm/components/schema-editor/SchemaVariableList.js +74 -0
- package/esm/components/schema-editor/SchemaVariableListPicker.d.ts +179 -0
- package/esm/components/schema-editor/SchemaVariableListPicker.js +34 -0
- package/esm/components/schema-editor/index.d.ts +797 -0
- package/esm/components/schema-editor/index.js +122 -0
- package/esm/components/table/Cell.d.ts +36 -0
- package/esm/components/table/Cell.js +43 -0
- package/esm/components/table/ColGroup.d.ts +24 -0
- package/esm/components/table/ColGroup.js +58 -0
- package/esm/components/table/Head.d.ts +45 -0
- package/esm/components/table/Head.js +150 -0
- package/esm/components/table/HeadCellDropDown.d.ts +289 -0
- package/esm/components/table/HeadCellDropDown.js +55 -0
- package/esm/components/table/HeadCellFilter.d.ts +414 -0
- package/esm/components/table/HeadCellFilter.js +131 -0
- package/esm/components/table/HeadCellSelect.d.ts +357 -0
- package/esm/components/table/HeadCellSelect.js +52 -0
- package/esm/components/table/HeadCellSort.d.ts +278 -0
- package/esm/components/table/HeadCellSort.js +88 -0
- package/esm/components/table/ItemActionsWrapper.d.ts +10 -0
- package/esm/components/table/ItemActionsWrapper.js +29 -0
- package/esm/components/table/Row.d.ts +56 -0
- package/esm/components/table/Row.js +224 -0
- package/esm/components/table/SummaryRow.d.ts +28 -0
- package/esm/components/table/SummaryRow.js +73 -0
- package/esm/components/table/index.d.ts +852 -0
- package/esm/components/table/index.js +1069 -0
- package/esm/components/table/util.d.ts +56 -0
- package/esm/components/table/util.js +276 -0
- package/esm/components/virtual-list/AutoSizer.d.ts +19 -0
- package/esm/components/virtual-list/AutoSizer.js +49 -0
- package/esm/components/virtual-list/SizeAndPositionManager.d.ts +70 -0
- package/esm/components/virtual-list/SizeAndPositionManager.js +216 -0
- package/esm/components/virtual-list/constants.d.ts +34 -0
- package/esm/components/virtual-list/constants.js +45 -0
- package/esm/components/virtual-list/index.d.ts +99 -0
- package/esm/components/virtual-list/index.js +288 -0
- package/esm/components/withBadge.d.ts +2 -0
- package/esm/components/withBadge.js +7 -0
- package/esm/hooks/index.d.ts +8 -0
- package/esm/hooks/use-click-away.d.ts +12 -0
- package/esm/hooks/use-click-away.js +55 -0
- package/esm/hooks/use-on-screen.d.ts +2 -0
- package/esm/hooks/use-on-screen.js +28 -0
- package/esm/hooks/use-set-state.d.ts +2 -0
- package/esm/hooks/use-set-state.js +19 -0
- package/esm/hooks/use-sub-form.d.ts +4 -0
- package/esm/hooks/use-sub-form.js +39 -0
- package/esm/hooks/use-touch.d.ts +16 -0
- package/esm/hooks/use-touch.js +77 -0
- package/esm/hooks/use-update-effect.d.ts +3 -0
- package/esm/hooks/use-update-effect.js +21 -0
- package/esm/hooks/use-validation-resolver.d.ts +7 -0
- package/esm/hooks/use-validation-resolver.js +115 -0
- package/esm/icons/alert-danger.svg.js +22 -0
- package/esm/icons/alert-info.svg.js +22 -0
- package/esm/icons/alert-success.svg.js +22 -0
- package/esm/icons/alert-warning.svg.js +22 -0
- package/esm/icons/arrow-double-left.svg.js +24 -0
- package/esm/icons/arrow-double-right.svg.js +24 -0
- package/esm/icons/back.svg.js +21 -0
- package/esm/icons/calendar.svg.js +31 -0
- package/esm/icons/caret.svg.js +21 -0
- package/esm/icons/check.svg.js +21 -0
- package/esm/icons/clock.svg.js +29 -0
- package/esm/icons/close-small.svg.js +24 -0
- package/esm/icons/close.svg.js +21 -0
- package/esm/icons/cloud-upload.svg.js +22 -0
- package/esm/icons/column-filter.svg.js +22 -0
- package/esm/icons/columns.svg.js +21 -0
- package/esm/icons/compress-alt.svg.js +21 -0
- package/esm/icons/copy.svg.js +26 -0
- package/esm/icons/date.svg.js +26 -0
- package/esm/icons/department.svg.js +52 -0
- package/esm/icons/desk-empty.svg.js +73 -0
- package/esm/icons/dot.svg.js +36 -0
- package/esm/icons/down-arrow-bold.svg.js +22 -0
- package/esm/icons/down.svg.js +23 -0
- package/esm/icons/download.svg.js +24 -0
- package/esm/icons/drag-bar.svg.js +53 -0
- package/esm/icons/drag.svg.js +22 -0
- package/esm/icons/edit.svg.js +21 -0
- package/esm/icons/ellipsis-v.svg.js +21 -0
- package/esm/icons/enter.svg.js +20 -0
- package/esm/icons/exchange.svg.js +21 -0
- package/esm/icons/expand-alt.svg.js +21 -0
- package/esm/icons/fail.svg.js +31 -0
- package/esm/icons/file.svg.js +22 -0
- package/esm/icons/filter.svg.js +21 -0
- package/esm/icons/folder.svg.js +24 -0
- package/esm/icons/fullscreen.svg.js +21 -0
- package/esm/icons/function.svg.js +21 -0
- package/esm/icons/home.svg.js +21 -0
- package/esm/icons/if.svg.js +21 -0
- package/esm/icons/image.svg.js +20 -0
- package/esm/icons/info-circle.svg.js +21 -0
- package/esm/icons/info.svg.js +27 -0
- package/esm/icons/input-clear.svg.js +20 -0
- package/esm/icons/invisible.svg.js +22 -0
- package/esm/icons/left-arrow.svg.js +23 -0
- package/esm/icons/loading-outline.svg.js +21 -0
- package/esm/icons/location.svg.js +20 -0
- package/esm/icons/menu.svg.js +20 -0
- package/esm/icons/minus.svg.js +21 -0
- package/esm/icons/move.svg.js +22 -0
- package/esm/icons/mute.svg.js +21 -0
- package/esm/icons/new-edit.svg.js +22 -0
- package/esm/icons/pause.svg.js +21 -0
- package/esm/icons/pencil.svg.js +21 -0
- package/esm/icons/play.svg.js +20 -0
- package/esm/icons/plus-cicle.svg.js +20 -0
- package/esm/icons/plus-fine.svg.js +21 -0
- package/esm/icons/plus.svg.js +21 -0
- package/esm/icons/post.svg.js +48 -0
- package/esm/icons/question-mark.svg.js +26 -0
- package/esm/icons/question.svg.js +21 -0
- package/esm/icons/question2.svg.js +34 -0
- package/esm/icons/redo.svg.js +21 -0
- package/esm/icons/refresh.svg.js +21 -0
- package/esm/icons/reload.svg.js +21 -0
- package/esm/icons/remove.svg.js +21 -0
- package/esm/icons/retry.svg.js +24 -0
- package/esm/icons/right-arrow-bold.svg.js +21 -0
- package/esm/icons/right-arrow.svg.js +23 -0
- package/esm/icons/right-double-arrow.svg.js +22 -0
- package/esm/icons/role.svg.js +43 -0
- package/esm/icons/rotate-left.svg.js +22 -0
- package/esm/icons/rotate-right.svg.js +22 -0
- package/esm/icons/rotate-screen.svg.js +21 -0
- package/esm/icons/scale-origin.svg.js +24 -0
- package/esm/icons/schedule.svg.js +24 -0
- package/esm/icons/search.svg.js +21 -0
- package/esm/icons/setting.svg.js +21 -0
- package/esm/icons/slider-handle-icon.svg.js +22 -0
- package/esm/icons/sort-asc.svg.js +21 -0
- package/esm/icons/sort-default.svg.js +21 -0
- package/esm/icons/sort-desc.svg.js +21 -0
- package/esm/icons/star.svg.js +21 -0
- package/esm/icons/status-close.svg.js +23 -0
- package/esm/icons/steps-finsh.svg.js +22 -0
- package/esm/icons/sub-plus.svg.js +20 -0
- package/esm/icons/success.svg.js +29 -0
- package/esm/icons/transparent.svg.js +38 -0
- package/esm/icons/trash.svg.js +22 -0
- package/esm/icons/tree-down.svg.js +21 -0
- package/esm/icons/undo-normal.svg.js +25 -0
- package/esm/icons/undo.svg.js +21 -0
- package/esm/icons/unfullscreen.svg.js +21 -0
- package/esm/icons/upload.svg.js +21 -0
- package/esm/icons/user-remove.svg.js +33 -0
- package/esm/icons/view.svg.js +22 -0
- package/esm/icons/volume.svg.js +24 -0
- package/esm/icons/warning-mark.svg.js +22 -0
- package/esm/icons/warning.svg.js +21 -0
- package/esm/icons/window-restore.svg.js +21 -0
- package/esm/icons/zoom-in.svg.js +21 -0
- package/esm/icons/zoom-out.svg.js +21 -0
- package/esm/index.d.ts +15 -0
- package/esm/index.js +156 -0
- package/esm/locale/de-DE.d.ts +1 -0
- package/esm/locale/de-DE.js +421 -0
- package/esm/locale/en-US.d.ts +1 -0
- package/esm/locale/en-US.js +427 -0
- package/esm/locale/zh-CN.d.ts +1 -0
- package/esm/locale/zh-CN.js +436 -0
- package/esm/themes/ang.d.ts +3 -0
- package/esm/themes/ang.js +15 -0
- package/esm/themes/antd.d.ts +1 -0
- package/esm/themes/antd.js +42 -0
- package/esm/themes/cxd.d.ts +3 -0
- package/esm/themes/cxd.js +455 -0
- package/esm/themes/dark.d.ts +3 -0
- package/esm/themes/dark.js +23 -0
- package/esm/themes/default.d.ts +4 -0
- package/esm/utils/index.d.ts +2 -0
- package/esm/utils/smoothSignature.d.ts +86 -0
- package/esm/utils/vectorComputed.d.ts +20 -0
- package/esm/utils/vectorComputed.js +75 -0
- package/esm/withRemoteConfig.d.ts +2 -0
- package/esm/withRemoteConfig.js +7 -0
- package/esm/withStore.d.ts +2 -0
- package/esm/withStore.js +7 -0
- package/lib/components/404.d.ts +53 -0
- package/lib/components/404.js +43 -0
- package/lib/components/Alert.d.ts +615 -0
- package/lib/components/Alert.js +279 -0
- package/lib/components/Alert2.d.ts +117 -0
- package/lib/components/Alert2.js +66 -0
- package/lib/components/AlphabetIndexer.d.ts +11 -0
- package/lib/components/AlphabetIndexer.js +59 -0
- package/lib/components/AnchorNav.d.ts +162 -0
- package/lib/components/AnchorNav.js +162 -0
- package/lib/components/AnchorNavSection.d.ts +2 -0
- package/lib/components/AnchorNavSection.js +14 -0
- package/lib/components/ArrayInput.d.ts +617 -0
- package/lib/components/ArrayInput.js +160 -0
- package/lib/components/AsideNav.d.ts +142 -0
- package/lib/components/AsideNav.js +140 -0
- package/lib/components/AssociatedSelection.d.ts +564 -0
- package/lib/components/AssociatedSelection.js +110 -0
- package/lib/components/AutoFoldedList.d.ts +87 -0
- package/lib/components/AutoFoldedList.js +128 -0
- package/lib/components/AutoSizer.d.ts +2 -0
- package/lib/components/AutoSizer.js +15 -0
- package/lib/components/Avatar.d.ts +374 -0
- package/lib/components/Avatar.js +154 -0
- package/lib/components/Badge.d.ts +118 -0
- package/lib/components/Badge.js +165 -0
- package/lib/components/BaiduMapPicker.d.ts +100 -0
- package/lib/components/BaiduMapPicker.js +379 -0
- package/lib/components/BarCode.d.ts +56 -0
- package/lib/components/BarCode.js +52 -0
- package/lib/components/Breadcrumb.d.ts +115 -0
- package/lib/components/Breadcrumb.js +170 -0
- package/lib/components/Button.d.ts +147 -0
- package/lib/components/Button.js +71 -0
- package/lib/components/CalendarMobile.d.ts +431 -0
- package/lib/components/CalendarMobile.js +546 -0
- package/lib/components/Card.d.ts +444 -0
- package/lib/components/Card.js +100 -0
- package/lib/components/Cascader.d.ts +108 -0
- package/lib/components/Cascader.js +527 -0
- package/lib/components/ChainedDropdownSelection.d.ts +561 -0
- package/lib/components/ChainedDropdownSelection.js +116 -0
- package/lib/components/ChainedSelection.d.ts +554 -0
- package/lib/components/ChainedSelection.js +197 -0
- package/lib/components/Checkbox.d.ts +110 -0
- package/lib/components/Checkbox.js +95 -0
- package/lib/components/CityArea.d.ts +299 -0
- package/lib/components/CityArea.js +197 -0
- package/lib/components/CityDB.d.ts +13 -0
- package/lib/components/CityDB.js +3949 -0
- package/lib/components/CodeMirror.d.ts +29 -0
- package/lib/components/CodeMirror.js +152 -0
- package/lib/components/Collapse.d.ts +447 -0
- package/lib/components/Collapse.js +192 -0
- package/lib/components/CollapseGroup.d.ts +219 -0
- package/lib/components/CollapseGroup.js +124 -0
- package/lib/components/ColorPicker.d.ts +530 -0
- package/lib/components/ColorPicker.js +267 -0
- package/lib/components/Combo.d.ts +354 -0
- package/lib/components/Combo.js +165 -0
- package/lib/components/ConditionBuilder.d.ts +2 -0
- package/lib/components/ConditionBuilder.js +14 -0
- package/lib/components/ConfirmBox.d.ts +322 -0
- package/lib/components/ConfirmBox.js +141 -0
- package/lib/components/ContextMenu.d.ts +115 -0
- package/lib/components/ContextMenu.js +327 -0
- package/lib/components/DatePicker.d.ts +638 -0
- package/lib/components/DatePicker.js +725 -0
- package/lib/components/DateRangePicker.d.ts +1046 -0
- package/lib/components/DateRangePicker.js +1398 -0
- package/lib/components/DiffEditor.d.ts +21 -0
- package/lib/components/DiffEditor.js +130 -0
- package/lib/components/DndContainer.d.ts +205 -0
- package/lib/components/DndContainer.js +32 -0
- package/lib/components/Drawer.d.ts +159 -0
- package/lib/components/Drawer.js +282 -0
- package/lib/components/DropDownSelection.d.ts +557 -0
- package/lib/components/DropDownSelection.js +85 -0
- package/lib/components/DropdownContextMenus.d.ts +84 -0
- package/lib/components/DropdownContextMenus.js +101 -0
- package/lib/components/Editor.d.ts +681 -0
- package/lib/components/Editor.js +246 -0
- package/lib/components/Form.d.ts +31 -0
- package/lib/components/Form.js +97 -0
- package/lib/components/FormField.d.ts +287 -0
- package/lib/components/FormField.js +90 -0
- package/lib/components/FormulaPicker.d.ts +2 -0
- package/lib/components/FormulaPicker.js +14 -0
- package/lib/components/GaodeMapPicker.d.ts +89 -0
- package/lib/components/GaodeMapPicker.js +217 -0
- package/lib/components/GridNav.d.ts +53 -0
- package/lib/components/GridNav.js +133 -0
- package/lib/components/GridNavItem.d.ts +2 -0
- package/lib/components/GridNavItem.js +14 -0
- package/lib/components/GroupedSelection.d.ts +543 -0
- package/lib/components/GroupedSelection.js +150 -0
- package/lib/components/HeadCellDropDown.d.ts +2 -0
- package/lib/components/HeadCellDropDown.js +14 -0
- package/lib/components/HorizontalScroll.d.ts +75 -0
- package/lib/components/HorizontalScroll.js +283 -0
- package/lib/components/Html.d.ts +82 -0
- package/lib/components/Html.js +59 -0
- package/lib/components/Icon.d.ts +2 -0
- package/lib/components/Icon.js +14 -0
- package/lib/components/ImageGallery.d.ts +465 -0
- package/lib/components/ImageGallery.js +409 -0
- package/lib/components/Input.d.ts +18 -0
- package/lib/components/Input.js +86 -0
- package/lib/components/InputBox.d.ts +100 -0
- package/lib/components/InputBox.js +110 -0
- package/lib/components/InputBoxWithSuggestion.d.ts +272 -0
- package/lib/components/InputBoxWithSuggestion.js +81 -0
- package/lib/components/InputJSONSchema.d.ts +2 -0
- package/lib/components/InputJSONSchema.js +14 -0
- package/lib/components/InputTable.d.ts +317 -0
- package/lib/components/InputTable.js +189 -0
- package/lib/components/JSONSchemaEditor.d.ts +2 -0
- package/lib/components/JSONSchemaEditor.js +14 -0
- package/lib/components/Layout.d.ts +74 -0
- package/lib/components/Layout.js +56 -0
- package/lib/components/Link.d.ts +60 -0
- package/lib/components/Link.js +56 -0
- package/lib/components/ListGroup.d.ts +77 -0
- package/lib/components/ListGroup.js +43 -0
- package/lib/components/ListMenu.d.ts +568 -0
- package/lib/components/ListMenu.js +74 -0
- package/lib/components/LocationPicker.d.ts +467 -0
- package/lib/components/LocationPicker.js +220 -0
- package/lib/components/Markdown.d.ts +25 -0
- package/lib/components/Markdown.js +83 -0
- package/lib/components/Menu.d.ts +2 -0
- package/lib/components/Menu.js +14 -0
- package/lib/components/MixedInput.d.ts +55 -0
- package/lib/components/MixedInput.js +99 -0
- package/lib/components/MobileDevTool.d.ts +12 -0
- package/lib/components/MobileDevTool.js +325 -0
- package/lib/components/Modal.d.ts +1316 -0
- package/lib/components/Modal.js +272 -0
- package/lib/components/ModalManager.d.ts +17 -0
- package/lib/components/ModalManager.js +53 -0
- package/lib/components/MonthRangePicker.d.ts +744 -0
- package/lib/components/MultilineText.d.ts +454 -0
- package/lib/components/MultilineText.js +102 -0
- package/lib/components/NumberInput.d.ts +201 -0
- package/lib/components/NumberInput.js +289 -0
- package/lib/components/OverflowTpl.d.ts +61 -0
- package/lib/components/OverflowTpl.js +109 -0
- package/lib/components/Pagination.d.ts +812 -0
- package/lib/components/Pagination.js +390 -0
- package/lib/components/PdfViewer.d.ts +49 -0
- package/lib/components/PdfViewer.js +89 -0
- package/lib/components/Picker.d.ts +277 -0
- package/lib/components/Picker.js +80 -0
- package/lib/components/PickerColumn.d.ts +62 -0
- package/lib/components/PickerColumn.js +288 -0
- package/lib/components/PickerContainer.d.ts +291 -0
- package/lib/components/PickerContainer.js +169 -0
- package/lib/components/PopOverContainer.d.ts +59 -0
- package/lib/components/PopOverContainer.js +162 -0
- package/lib/components/PopUp.d.ts +573 -0
- package/lib/components/PopUp.js +94 -0
- package/lib/components/Progress.d.ts +311 -0
- package/lib/components/Progress.js +148 -0
- package/lib/components/PullRefresh.d.ts +79 -0
- package/lib/components/PullRefresh.js +178 -0
- package/lib/components/Radios.d.ts +170 -0
- package/lib/components/Radios.js +126 -0
- package/lib/components/Range.d.ts +131 -0
- package/lib/components/Range.js +528 -0
- package/lib/components/Rating.d.ts +227 -0
- package/lib/components/Rating.js +349 -0
- package/lib/components/ResultBox.d.ts +532 -0
- package/lib/components/ResultBox.js +209 -0
- package/lib/components/ResultList.d.ts +554 -0
- package/lib/components/ResultList.js +268 -0
- package/lib/components/ResultTableList.d.ts +786 -0
- package/lib/components/ResultTableList.js +161 -0
- package/lib/components/ResultTreeList.d.ts +425 -0
- package/lib/components/ResultTreeList.js +256 -0
- package/lib/components/RichText.d.ts +48 -0
- package/lib/components/RichText.js +283 -0
- package/lib/components/SearchBox.d.ts +625 -0
- package/lib/components/SearchBox.js +315 -0
- package/lib/components/Select.d.ts +6497 -0
- package/lib/components/Select.js +832 -0
- package/lib/components/SelectMobile.d.ts +38 -0
- package/lib/components/SelectMobile.js +382 -0
- package/lib/components/Selection.d.ts +598 -0
- package/lib/components/Selection.js +176 -0
- package/lib/components/Shape.d.ts +58 -0
- package/lib/components/Shape.js +434 -0
- package/lib/components/Signature.d.ts +279 -0
- package/lib/components/Signature.js +297 -0
- package/lib/components/Slider.d.ts +56 -0
- package/lib/components/Slider.js +146 -0
- package/lib/components/SparkLine.d.ts +397 -0
- package/lib/components/SparkLine.js +74 -0
- package/lib/components/Spinner.d.ts +266 -0
- package/lib/components/Spinner.js +210 -0
- package/lib/components/Steps.d.ts +117 -0
- package/lib/components/Steps.js +84 -0
- package/lib/components/Switch.d.ts +105 -0
- package/lib/components/Switch.js +80 -0
- package/lib/components/Tab.d.ts +2 -0
- package/lib/components/Tab.js +14 -0
- package/lib/components/Table.d.ts +2 -0
- package/lib/components/Table.js +14 -0
- package/lib/components/TableSelection.d.ts +791 -0
- package/lib/components/TableSelection.js +183 -0
- package/lib/components/Tabs.d.ts +670 -0
- package/lib/components/Tabs.js +618 -0
- package/lib/components/TabsTransfer.d.ts +423 -0
- package/lib/components/TabsTransfer.js +234 -0
- package/lib/components/TabsTransferPicker.d.ts +267 -0
- package/lib/components/TabsTransferPicker.js +93 -0
- package/lib/components/Tag.d.ts +318 -0
- package/lib/components/Tag.js +146 -0
- package/lib/components/Textarea.d.ts +564 -0
- package/lib/components/Textarea.js +160 -0
- package/lib/components/Timeline.d.ts +56 -0
- package/lib/components/Timeline.js +68 -0
- package/lib/components/TimelineItem.d.ts +1292 -0
- package/lib/components/TimelineItem.js +118 -0
- package/lib/components/Tinymce.d.ts +66 -0
- package/lib/components/Tinymce.js +648 -0
- package/lib/components/TitleBar.d.ts +123 -0
- package/lib/components/TitleBar.js +51 -0
- package/lib/components/Toast.d.ts +591 -0
- package/lib/components/Toast.js +258 -0
- package/lib/components/Tooltip.d.ts +65 -0
- package/lib/components/Tooltip.js +43 -0
- package/lib/components/TooltipWrapper.d.ts +217 -0
- package/lib/components/TooltipWrapper.js +188 -0
- package/lib/components/Transfer.d.ts +1844 -0
- package/lib/components/Transfer.js +502 -0
- package/lib/components/TransferDropDown.d.ts +634 -0
- package/lib/components/TransferDropDown.js +106 -0
- package/lib/components/TransferPicker.d.ts +275 -0
- package/lib/components/TransferPicker.js +110 -0
- package/lib/components/TransferSearch.d.ts +283 -0
- package/lib/components/TransferSearch.js +113 -0
- package/lib/components/Tree.d.ts +1953 -0
- package/lib/components/Tree.js +1214 -0
- package/lib/components/TreeSelection.d.ts +601 -0
- package/lib/components/TreeSelection.js +209 -0
- package/lib/components/UserSelect.d.ts +541 -0
- package/lib/components/UserSelect.js +685 -0
- package/lib/components/UserTabSelect.d.ts +315 -0
- package/lib/components/UserTabSelect.js +235 -0
- package/lib/components/VerificationCode.d.ts +116 -0
- package/lib/components/VerificationCode.js +191 -0
- package/lib/components/VirtualList.d.ts +2 -0
- package/lib/components/VirtualList.js +14 -0
- package/lib/components/WithRemoteConfig.d.ts +382 -0
- package/lib/components/WithRemoteConfig.js +316 -0
- package/lib/components/WithStore.d.ts +72 -0
- package/lib/components/WithStore.js +61 -0
- package/lib/components/calendar/Calendar.d.ts +83 -0
- package/lib/components/calendar/Calendar.js +542 -0
- package/lib/components/calendar/CalendarContainer.d.ts +10 -0
- package/lib/components/calendar/CalendarContainer.js +38 -0
- package/lib/components/calendar/DaysView.d.ts +184 -0
- package/lib/components/calendar/DaysView.js +547 -0
- package/lib/components/calendar/MonthsView.d.ts +133 -0
- package/lib/components/calendar/MonthsView.js +188 -0
- package/lib/components/calendar/QuartersView.d.ts +102 -0
- package/lib/components/calendar/QuartersView.js +138 -0
- package/lib/components/calendar/TimeView.d.ts +183 -0
- package/lib/components/calendar/TimeView.js +574 -0
- package/lib/components/calendar/YearsView.d.ts +102 -0
- package/lib/components/calendar/YearsView.js +135 -0
- package/lib/components/condition-builder/Expression.d.ts +292 -0
- package/lib/components/condition-builder/Expression.js +133 -0
- package/lib/components/condition-builder/Field.d.ts +272 -0
- package/lib/components/condition-builder/Field.js +44 -0
- package/lib/components/condition-builder/Formula.d.ts +261 -0
- package/lib/components/condition-builder/Func.d.ts +273 -0
- package/lib/components/condition-builder/Func.js +87 -0
- package/lib/components/condition-builder/Group.d.ts +310 -0
- package/lib/components/condition-builder/Group.js +203 -0
- package/lib/components/condition-builder/GroupOrItem.d.ts +87 -0
- package/lib/components/condition-builder/GroupOrItem.js +117 -0
- package/lib/components/condition-builder/InputSwitch.d.ts +47 -0
- package/lib/components/condition-builder/InputSwitch.js +36 -0
- package/lib/components/condition-builder/Item.d.ts +287 -0
- package/lib/components/condition-builder/Item.js +244 -0
- package/lib/components/condition-builder/Value.d.ts +274 -0
- package/lib/components/condition-builder/Value.js +127 -0
- package/lib/components/condition-builder/config.d.ts +36 -0
- package/lib/components/condition-builder/config.js +125 -0
- package/lib/components/condition-builder/index.d.ts +319 -0
- package/lib/components/condition-builder/index.js +240 -0
- package/lib/components/condition-builder/types.d.ts +116 -0
- package/lib/components/formula/CodeEditor.d.ts +92 -0
- package/lib/components/formula/CodeEditor.js +110 -0
- package/lib/components/formula/Editor.d.ts +516 -0
- package/lib/components/formula/Editor.js +460 -0
- package/lib/components/formula/FuncList.d.ts +46 -0
- package/lib/components/formula/FuncList.js +76 -0
- package/lib/components/formula/Input.d.ts +292 -0
- package/lib/components/formula/Input.js +134 -0
- package/lib/components/formula/Picker.d.ts +492 -0
- package/lib/components/formula/Picker.js +467 -0
- package/lib/components/formula/VariableList.d.ts +58 -0
- package/lib/components/formula/VariableList.js +194 -0
- package/lib/components/formula/plugin.d.ts +51 -0
- package/lib/components/formula/plugin.js +381 -0
- package/lib/components/icons.d.ts +61 -0
- package/lib/components/icons.js +486 -0
- package/lib/components/index.d.ts +138 -0
- package/lib/components/json-schema/Array.d.ts +3 -0
- package/lib/components/json-schema/Array.js +140 -0
- package/lib/components/json-schema/Item.d.ts +5 -0
- package/lib/components/json-schema/Item.js +75 -0
- package/lib/components/json-schema/Object.d.ts +5 -0
- package/lib/components/json-schema/Object.js +278 -0
- package/lib/components/json-schema/index.d.ts +272 -0
- package/lib/components/json-schema/index.js +40 -0
- package/lib/components/menu/MenuContext.d.ts +83 -0
- package/lib/components/menu/MenuContext.js +29 -0
- package/lib/components/menu/MenuItem.d.ts +81 -0
- package/lib/components/menu/MenuItem.js +120 -0
- package/lib/components/menu/PanelMenu.d.ts +46 -0
- package/lib/components/menu/PanelMenu.js +74 -0
- package/lib/components/menu/SubMenu.d.ts +84 -0
- package/lib/components/menu/SubMenu.js +145 -0
- package/lib/components/menu/index.d.ts +381 -0
- package/lib/components/menu/index.js +379 -0
- package/lib/components/schema-editor/Array.d.ts +11 -0
- package/lib/components/schema-editor/Array.js +95 -0
- package/lib/components/schema-editor/Common.d.ts +61 -0
- package/lib/components/schema-editor/Common.js +174 -0
- package/lib/components/schema-editor/Item.d.ts +8 -0
- package/lib/components/schema-editor/Item.js +35 -0
- package/lib/components/schema-editor/Object.d.ts +51 -0
- package/lib/components/schema-editor/Object.js +305 -0
- package/lib/components/schema-editor/SchemaVariableList.d.ts +186 -0
- package/lib/components/schema-editor/SchemaVariableList.js +86 -0
- package/lib/components/schema-editor/SchemaVariableListPicker.d.ts +179 -0
- package/lib/components/schema-editor/SchemaVariableListPicker.js +46 -0
- package/lib/components/schema-editor/index.d.ts +797 -0
- package/lib/components/schema-editor/index.js +131 -0
- package/lib/components/table/Cell.d.ts +36 -0
- package/lib/components/table/Cell.js +50 -0
- package/lib/components/table/ColGroup.d.ts +24 -0
- package/lib/components/table/ColGroup.js +69 -0
- package/lib/components/table/Head.d.ts +45 -0
- package/lib/components/table/Head.js +157 -0
- package/lib/components/table/HeadCellDropDown.d.ts +289 -0
- package/lib/components/table/HeadCellDropDown.js +63 -0
- package/lib/components/table/HeadCellFilter.d.ts +414 -0
- package/lib/components/table/HeadCellFilter.js +140 -0
- package/lib/components/table/HeadCellSelect.d.ts +357 -0
- package/lib/components/table/HeadCellSelect.js +60 -0
- package/lib/components/table/HeadCellSort.d.ts +278 -0
- package/lib/components/table/HeadCellSort.js +96 -0
- package/lib/components/table/ItemActionsWrapper.d.ts +10 -0
- package/lib/components/table/ItemActionsWrapper.js +40 -0
- package/lib/components/table/Row.d.ts +56 -0
- package/lib/components/table/Row.js +231 -0
- package/lib/components/table/SummaryRow.d.ts +28 -0
- package/lib/components/table/SummaryRow.js +81 -0
- package/lib/components/table/index.d.ts +852 -0
- package/lib/components/table/index.js +1083 -0
- package/lib/components/table/util.d.ts +56 -0
- package/lib/components/table/util.js +298 -0
- package/lib/components/virtual-list/AutoSizer.d.ts +19 -0
- package/lib/components/virtual-list/AutoSizer.js +76 -0
- package/lib/components/virtual-list/SizeAndPositionManager.d.ts +70 -0
- package/lib/components/virtual-list/SizeAndPositionManager.js +220 -0
- package/lib/components/virtual-list/constants.d.ts +34 -0
- package/lib/components/virtual-list/constants.js +53 -0
- package/lib/components/virtual-list/index.d.ts +99 -0
- package/lib/components/virtual-list/index.js +317 -0
- package/lib/components/withBadge.d.ts +2 -0
- package/lib/components/withBadge.js +14 -0
- package/lib/helper.css +47744 -0
- package/lib/hooks/index.d.ts +8 -0
- package/lib/hooks/use-click-away.d.ts +12 -0
- package/lib/hooks/use-click-away.js +59 -0
- package/lib/hooks/use-on-screen.d.ts +2 -0
- package/lib/hooks/use-on-screen.js +32 -0
- package/lib/hooks/use-set-state.d.ts +2 -0
- package/lib/hooks/use-set-state.js +27 -0
- package/lib/hooks/use-sub-form.d.ts +4 -0
- package/lib/hooks/use-sub-form.js +48 -0
- package/lib/hooks/use-touch.d.ts +16 -0
- package/lib/hooks/use-touch.js +81 -0
- package/lib/hooks/use-update-effect.d.ts +3 -0
- package/lib/hooks/use-update-effect.js +25 -0
- package/lib/hooks/use-validation-resolver.d.ts +7 -0
- package/lib/hooks/use-validation-resolver.js +125 -0
- package/lib/icons/alert-danger.svg.js +29 -0
- package/lib/icons/alert-info.svg.js +29 -0
- package/lib/icons/alert-success.svg.js +29 -0
- package/lib/icons/alert-warning.svg.js +29 -0
- package/lib/icons/arrow-double-left.svg.js +31 -0
- package/lib/icons/arrow-double-right.svg.js +31 -0
- package/lib/icons/back.svg.js +28 -0
- package/lib/icons/calendar.svg.js +38 -0
- package/lib/icons/caret.svg.js +28 -0
- package/lib/icons/check.svg.js +28 -0
- package/lib/icons/clock.svg.js +36 -0
- package/lib/icons/close-small.svg.js +31 -0
- package/lib/icons/close.svg.js +28 -0
- package/lib/icons/cloud-upload.svg.js +29 -0
- package/lib/icons/column-filter.svg.js +29 -0
- package/lib/icons/columns.svg.js +28 -0
- package/lib/icons/compress-alt.svg.js +28 -0
- package/lib/icons/copy.svg.js +33 -0
- package/lib/icons/date.svg.js +33 -0
- package/lib/icons/department.svg.js +59 -0
- package/lib/icons/desk-empty.svg.js +80 -0
- package/lib/icons/dot.svg.js +43 -0
- package/lib/icons/down-arrow-bold.svg.js +29 -0
- package/lib/icons/down.svg.js +30 -0
- package/lib/icons/download.svg.js +31 -0
- package/lib/icons/drag-bar.svg.js +60 -0
- package/lib/icons/drag.svg.js +29 -0
- package/lib/icons/edit.svg.js +28 -0
- package/lib/icons/ellipsis-v.svg.js +28 -0
- package/lib/icons/enter.svg.js +27 -0
- package/lib/icons/exchange.svg.js +28 -0
- package/lib/icons/expand-alt.svg.js +28 -0
- package/lib/icons/fail.svg.js +38 -0
- package/lib/icons/file.svg.js +29 -0
- package/lib/icons/filter.svg.js +28 -0
- package/lib/icons/folder.svg.js +31 -0
- package/lib/icons/fullscreen.svg.js +28 -0
- package/lib/icons/function.svg.js +28 -0
- package/lib/icons/home.svg.js +28 -0
- package/lib/icons/if.svg.js +28 -0
- package/lib/icons/image.svg.js +27 -0
- package/lib/icons/info-circle.svg.js +28 -0
- package/lib/icons/info.svg.js +34 -0
- package/lib/icons/input-clear.svg.js +27 -0
- package/lib/icons/invisible.svg.js +29 -0
- package/lib/icons/left-arrow.svg.js +30 -0
- package/lib/icons/loading-outline.svg.js +28 -0
- package/lib/icons/location.svg.js +27 -0
- package/lib/icons/menu.svg.js +27 -0
- package/lib/icons/minus.svg.js +28 -0
- package/lib/icons/move.svg.js +29 -0
- package/lib/icons/mute.svg.js +28 -0
- package/lib/icons/new-edit.svg.js +29 -0
- package/lib/icons/pause.svg.js +28 -0
- package/lib/icons/pencil.svg.js +28 -0
- package/lib/icons/play.svg.js +27 -0
- package/lib/icons/plus-cicle.svg.js +27 -0
- package/lib/icons/plus-fine.svg.js +28 -0
- package/lib/icons/plus.svg.js +28 -0
- package/lib/icons/post.svg.js +55 -0
- package/lib/icons/question-mark.svg.js +33 -0
- package/lib/icons/question.svg.js +28 -0
- package/lib/icons/question2.svg.js +41 -0
- package/lib/icons/redo.svg.js +28 -0
- package/lib/icons/refresh.svg.js +28 -0
- package/lib/icons/reload.svg.js +28 -0
- package/lib/icons/remove.svg.js +28 -0
- package/lib/icons/retry.svg.js +31 -0
- package/lib/icons/right-arrow-bold.svg.js +28 -0
- package/lib/icons/right-arrow.svg.js +30 -0
- package/lib/icons/right-double-arrow.svg.js +29 -0
- package/lib/icons/role.svg.js +50 -0
- package/lib/icons/rotate-left.svg.js +29 -0
- package/lib/icons/rotate-right.svg.js +29 -0
- package/lib/icons/rotate-screen.svg.js +28 -0
- package/lib/icons/scale-origin.svg.js +31 -0
- package/lib/icons/schedule.svg.js +31 -0
- package/lib/icons/search.svg.js +28 -0
- package/lib/icons/setting.svg.js +28 -0
- package/lib/icons/slider-handle-icon.svg.js +29 -0
- package/lib/icons/sort-asc.svg.js +28 -0
- package/lib/icons/sort-default.svg.js +28 -0
- package/lib/icons/sort-desc.svg.js +28 -0
- package/lib/icons/star.svg.js +28 -0
- package/lib/icons/status-close.svg.js +30 -0
- package/lib/icons/steps-finsh.svg.js +29 -0
- package/lib/icons/sub-plus.svg.js +27 -0
- package/lib/icons/success.svg.js +36 -0
- package/lib/icons/transparent.svg.js +45 -0
- package/lib/icons/trash.svg.js +29 -0
- package/lib/icons/tree-down.svg.js +28 -0
- package/lib/icons/undo-normal.svg.js +32 -0
- package/lib/icons/undo.svg.js +28 -0
- package/lib/icons/unfullscreen.svg.js +28 -0
- package/lib/icons/upload.svg.js +28 -0
- package/lib/icons/user-remove.svg.js +40 -0
- package/lib/icons/view.svg.js +29 -0
- package/lib/icons/volume.svg.js +31 -0
- package/lib/icons/warning-mark.svg.js +29 -0
- package/lib/icons/warning.svg.js +28 -0
- package/lib/icons/window-restore.svg.js +28 -0
- package/lib/icons/zoom-in.svg.js +28 -0
- package/lib/icons/zoom-out.svg.js +28 -0
- package/lib/index.d.ts +15 -0
- package/lib/index.js +348 -0
- package/lib/locale/de-DE.d.ts +1 -0
- package/lib/locale/de-DE.js +423 -0
- package/lib/locale/en-US.d.ts +1 -0
- package/lib/locale/en-US.js +429 -0
- package/lib/locale/zh-CN.d.ts +1 -0
- package/lib/locale/zh-CN.js +438 -0
- package/lib/scss/helper.scss.js +12 -0
- package/lib/scss/themes/ang.scss.js +12 -0
- package/lib/scss/themes/antd.scss.js +12 -0
- package/lib/scss/themes/cxd.scss.js +12 -0
- package/lib/scss/themes/dark.scss.js +12 -0
- package/lib/scss/themes/default.scss.js +12 -0
- package/lib/themes/ang.css +46414 -0
- package/lib/themes/ang.d.ts +3 -0
- package/lib/themes/ang.js +20 -0
- package/lib/themes/antd.css +46401 -0
- package/lib/themes/antd.d.ts +1 -0
- package/lib/themes/antd.js +44 -0
- package/lib/themes/cxd.css +46390 -0
- package/lib/themes/cxd.d.ts +3 -0
- package/lib/themes/cxd.js +459 -0
- package/lib/themes/dark.css +46421 -0
- package/lib/themes/dark.d.ts +3 -0
- package/lib/themes/dark.js +28 -0
- package/lib/themes/default.css +46390 -0
- package/lib/themes/default.d.ts +4 -0
- package/lib/utils/index.d.ts +2 -0
- package/lib/utils/smoothSignature.d.ts +86 -0
- package/lib/utils/vectorComputed.d.ts +20 -0
- package/lib/utils/vectorComputed.js +84 -0
- package/lib/withRemoteConfig.d.ts +2 -0
- package/lib/withRemoteConfig.js +14 -0
- package/lib/withStore.d.ts +2 -0
- package/lib/withStore.js +14 -0
- package/package.json +8 -4
- package/scss/_components.scss +4 -7
- package/scss/_mixins.scss +1 -0
- package/scss/_properties.scss +1 -1
- package/scss/components/_auto-folder.scss +40 -0
- package/scss/components/_cascader.scss +22 -2
- package/scss/components/_condition-builder.scss +1 -0
- package/scss/components/_crud.scss +32 -0
- package/scss/components/_modal.scss +13 -0
- package/scss/components/_page.scss +0 -1
- package/scss/components/_pagination.scss +1 -2
- package/scss/components/_result-box.scss +15 -3
- package/scss/components/_table.scss +2 -0
- package/scss/components/form/_combo.scss +13 -0
- package/scss/components/form/_form.scss +14 -1
- package/scss/components/form/_icon-picker.scss +1 -0
- package/scss/components/form/_input-group.scss +23 -2
- package/scss/components/form/_nested-select.scss +10 -0
- package/scss/components/form/_picker.scss +33 -0
- package/scss/components/form/_select.scss +30 -4
- package/scss/components/form/_selection.scss +2 -0
- package/scss/components/form/_tree.scss +8 -9
- package/scss/layout/_layout.scss +1 -0
- package/scss/themes/_common.scss +1 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/// <reference types="hoist-non-react-statics" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ThemeProps, TestIdBuilder } from 'amis-core';
|
|
4
|
+
export type ValueType = string | number;
|
|
5
|
+
export interface NumberProps extends ThemeProps {
|
|
6
|
+
name?: string;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
max?: ValueType;
|
|
9
|
+
min?: ValueType;
|
|
10
|
+
step?: number;
|
|
11
|
+
showSteps?: boolean;
|
|
12
|
+
precision?: number;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* 只读
|
|
16
|
+
*/
|
|
17
|
+
readOnly?: boolean;
|
|
18
|
+
value?: ValueType;
|
|
19
|
+
onChange?: (value: number) => void;
|
|
20
|
+
/**
|
|
21
|
+
* 边框模式,全边框,还是半边框,或者没边框。
|
|
22
|
+
*/
|
|
23
|
+
borderMode?: 'full' | 'half' | 'none';
|
|
24
|
+
/**
|
|
25
|
+
* 指定输入框展示值的格式
|
|
26
|
+
*/
|
|
27
|
+
formatter?: Function;
|
|
28
|
+
/**
|
|
29
|
+
* 指定从 formatter 里转换回数字的方式,和 formatter 搭配使用
|
|
30
|
+
*/
|
|
31
|
+
parser?: Function;
|
|
32
|
+
inputRef?: Function;
|
|
33
|
+
/**
|
|
34
|
+
* 获取焦点事件
|
|
35
|
+
*/
|
|
36
|
+
onFocus?: Function;
|
|
37
|
+
/**
|
|
38
|
+
* 失去焦点事件
|
|
39
|
+
*/
|
|
40
|
+
onBlur?: Function;
|
|
41
|
+
/**
|
|
42
|
+
* 指定输入框是基础输入框,增强输入框
|
|
43
|
+
*/
|
|
44
|
+
displayMode?: 'base' | 'enhance';
|
|
45
|
+
keyboard?: Boolean;
|
|
46
|
+
/**
|
|
47
|
+
* 是否是大数
|
|
48
|
+
*/
|
|
49
|
+
big?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* 清空输入内容时的值
|
|
52
|
+
*/
|
|
53
|
+
resetValue?: any;
|
|
54
|
+
/**
|
|
55
|
+
* 后缀
|
|
56
|
+
*/
|
|
57
|
+
suffix?: string;
|
|
58
|
+
/**
|
|
59
|
+
* 用来开启百分号的展示形式,搭配suffix使用
|
|
60
|
+
*/
|
|
61
|
+
showAsPercent?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* 是否在清空内容时从数据域中删除该表单项对应的值
|
|
64
|
+
*/
|
|
65
|
+
clearValueOnEmpty?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* 数字输入框类名
|
|
68
|
+
*/
|
|
69
|
+
inputControlClassName?: string;
|
|
70
|
+
testIdBuilder?: TestIdBuilder;
|
|
71
|
+
}
|
|
72
|
+
export interface NumberState {
|
|
73
|
+
focused: boolean;
|
|
74
|
+
}
|
|
75
|
+
export declare class NumberInput extends React.Component<NumberProps, NumberState> {
|
|
76
|
+
static defaultProps: Pick<NumberProps, 'step' | 'readOnly' | 'borderMode' | 'resetValue'>;
|
|
77
|
+
/**
|
|
78
|
+
* 处理value值
|
|
79
|
+
*
|
|
80
|
+
* @param value value 值
|
|
81
|
+
* @param min 最小值
|
|
82
|
+
* @param max 最大值
|
|
83
|
+
* @param precision 精度
|
|
84
|
+
* @param resetValue 重置值
|
|
85
|
+
* @param isBig 是否为大数模式
|
|
86
|
+
*/
|
|
87
|
+
static normalizeValue: (value: any, min: ValueType | undefined, max: ValueType | undefined, precision: number, resetValue: any, clearValueOnEmpty?: boolean, isBig?: boolean) => any;
|
|
88
|
+
/**
|
|
89
|
+
* 处理value值(仅使用 resetValue 和 clearValueOnEmpty)
|
|
90
|
+
*
|
|
91
|
+
* @param value value 值
|
|
92
|
+
* @param resetValue 重置值
|
|
93
|
+
* @param clearValueOnEmpty 是否在清空内容时从数据域中删除该表单项对应的值
|
|
94
|
+
*/
|
|
95
|
+
static normalizeValue2: (value: any, resetValue: any, clearValueOnEmpty?: boolean) => any;
|
|
96
|
+
/**
|
|
97
|
+
* 获取精度,合法的精度为0和正整数,不合法的精度统一转化为0
|
|
98
|
+
* 若设置了step,则会基于step的精度生成,最终使用更高的精度
|
|
99
|
+
*
|
|
100
|
+
* @param precision 精度
|
|
101
|
+
* @param step 步长
|
|
102
|
+
*/
|
|
103
|
+
static normalizePrecision: (precision: any, step?: number) => number;
|
|
104
|
+
/**
|
|
105
|
+
* 是否是 bigNumber,如果输入的内容是字符串就自动开启
|
|
106
|
+
*/
|
|
107
|
+
isBig: boolean;
|
|
108
|
+
constructor(props: NumberProps);
|
|
109
|
+
componentDidUpdate(prevProps: NumberProps): void;
|
|
110
|
+
handleChange(value: any): void;
|
|
111
|
+
handleFocus(e: React.SyntheticEvent<HTMLElement>): void;
|
|
112
|
+
handleBlur(e: React.SyntheticEvent<HTMLElement>): void;
|
|
113
|
+
handleClick(e: React.SyntheticEvent<HTMLElement>): void;
|
|
114
|
+
handleEnhanceModeChange(action: 'add' | 'subtract', e: React.MouseEvent): void;
|
|
115
|
+
renderBase(): React.JSX.Element;
|
|
116
|
+
render(): JSX.Element;
|
|
117
|
+
}
|
|
118
|
+
declare const _default: {
|
|
119
|
+
new (props: Pick<Omit<NumberProps, keyof ThemeProps>, "onChange" | "big" | "name" | "value" | "placeholder" | "disabled" | "onFocus" | "onBlur" | "testIdBuilder" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard" | "suffix" | "showAsPercent" | "clearValueOnEmpty" | "inputControlClassName"> & {
|
|
120
|
+
borderMode?: "none" | "full" | "half" | undefined;
|
|
121
|
+
resetValue?: any;
|
|
122
|
+
readOnly?: boolean | undefined;
|
|
123
|
+
step?: number | undefined;
|
|
124
|
+
} & {} & import("packages/amis-core/lib/theme").ThemeOuterProps): {
|
|
125
|
+
ref: any;
|
|
126
|
+
childRef(ref: any): void;
|
|
127
|
+
getWrappedInstance(): any;
|
|
128
|
+
render(): React.JSX.Element;
|
|
129
|
+
context: unknown;
|
|
130
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "onChange" | "big" | "name" | "value" | "placeholder" | "disabled" | "onFocus" | "onBlur" | "testIdBuilder" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard" | "suffix" | "showAsPercent" | "clearValueOnEmpty" | "inputControlClassName"> & {
|
|
131
|
+
borderMode?: "none" | "full" | "half" | undefined;
|
|
132
|
+
resetValue?: any;
|
|
133
|
+
readOnly?: boolean | undefined;
|
|
134
|
+
step?: number | undefined;
|
|
135
|
+
} & {} & import("packages/amis-core/lib/theme").ThemeOuterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
136
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
137
|
+
readonly props: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "onChange" | "big" | "name" | "value" | "placeholder" | "disabled" | "onFocus" | "onBlur" | "testIdBuilder" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard" | "suffix" | "showAsPercent" | "clearValueOnEmpty" | "inputControlClassName"> & {
|
|
138
|
+
borderMode?: "none" | "full" | "half" | undefined;
|
|
139
|
+
resetValue?: any;
|
|
140
|
+
readOnly?: boolean | undefined;
|
|
141
|
+
step?: number | undefined;
|
|
142
|
+
} & {} & import("packages/amis-core/lib/theme").ThemeOuterProps>;
|
|
143
|
+
state: Readonly<{}>;
|
|
144
|
+
refs: {
|
|
145
|
+
[key: string]: React.ReactInstance;
|
|
146
|
+
};
|
|
147
|
+
componentDidMount?(): void;
|
|
148
|
+
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "onChange" | "big" | "name" | "value" | "placeholder" | "disabled" | "onFocus" | "onBlur" | "testIdBuilder" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard" | "suffix" | "showAsPercent" | "clearValueOnEmpty" | "inputControlClassName"> & {
|
|
149
|
+
borderMode?: "none" | "full" | "half" | undefined;
|
|
150
|
+
resetValue?: any;
|
|
151
|
+
readOnly?: boolean | undefined;
|
|
152
|
+
step?: number | undefined;
|
|
153
|
+
} & {} & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
154
|
+
componentWillUnmount?(): void;
|
|
155
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
156
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "onChange" | "big" | "name" | "value" | "placeholder" | "disabled" | "onFocus" | "onBlur" | "testIdBuilder" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard" | "suffix" | "showAsPercent" | "clearValueOnEmpty" | "inputControlClassName"> & {
|
|
157
|
+
borderMode?: "none" | "full" | "half" | undefined;
|
|
158
|
+
resetValue?: any;
|
|
159
|
+
readOnly?: boolean | undefined;
|
|
160
|
+
step?: number | undefined;
|
|
161
|
+
} & {} & import("packages/amis-core/lib/theme").ThemeOuterProps>, prevState: Readonly<{}>): any;
|
|
162
|
+
componentDidUpdate?(prevProps: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "onChange" | "big" | "name" | "value" | "placeholder" | "disabled" | "onFocus" | "onBlur" | "testIdBuilder" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard" | "suffix" | "showAsPercent" | "clearValueOnEmpty" | "inputControlClassName"> & {
|
|
163
|
+
borderMode?: "none" | "full" | "half" | undefined;
|
|
164
|
+
resetValue?: any;
|
|
165
|
+
readOnly?: boolean | undefined;
|
|
166
|
+
step?: number | undefined;
|
|
167
|
+
} & {} & import("packages/amis-core/lib/theme").ThemeOuterProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
168
|
+
componentWillMount?(): void;
|
|
169
|
+
UNSAFE_componentWillMount?(): void;
|
|
170
|
+
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "onChange" | "big" | "name" | "value" | "placeholder" | "disabled" | "onFocus" | "onBlur" | "testIdBuilder" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard" | "suffix" | "showAsPercent" | "clearValueOnEmpty" | "inputControlClassName"> & {
|
|
171
|
+
borderMode?: "none" | "full" | "half" | undefined;
|
|
172
|
+
resetValue?: any;
|
|
173
|
+
readOnly?: boolean | undefined;
|
|
174
|
+
step?: number | undefined;
|
|
175
|
+
} & {} & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextContext: any): void;
|
|
176
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "onChange" | "big" | "name" | "value" | "placeholder" | "disabled" | "onFocus" | "onBlur" | "testIdBuilder" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard" | "suffix" | "showAsPercent" | "clearValueOnEmpty" | "inputControlClassName"> & {
|
|
177
|
+
borderMode?: "none" | "full" | "half" | undefined;
|
|
178
|
+
resetValue?: any;
|
|
179
|
+
readOnly?: boolean | undefined;
|
|
180
|
+
step?: number | undefined;
|
|
181
|
+
} & {} & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextContext: any): void;
|
|
182
|
+
componentWillUpdate?(nextProps: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "onChange" | "big" | "name" | "value" | "placeholder" | "disabled" | "onFocus" | "onBlur" | "testIdBuilder" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard" | "suffix" | "showAsPercent" | "clearValueOnEmpty" | "inputControlClassName"> & {
|
|
183
|
+
borderMode?: "none" | "full" | "half" | undefined;
|
|
184
|
+
resetValue?: any;
|
|
185
|
+
readOnly?: boolean | undefined;
|
|
186
|
+
step?: number | undefined;
|
|
187
|
+
} & {} & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
188
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "onChange" | "big" | "name" | "value" | "placeholder" | "disabled" | "onFocus" | "onBlur" | "testIdBuilder" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard" | "suffix" | "showAsPercent" | "clearValueOnEmpty" | "inputControlClassName"> & {
|
|
189
|
+
borderMode?: "none" | "full" | "half" | undefined;
|
|
190
|
+
resetValue?: any;
|
|
191
|
+
readOnly?: boolean | undefined;
|
|
192
|
+
step?: number | undefined;
|
|
193
|
+
} & {} & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
194
|
+
};
|
|
195
|
+
displayName: string;
|
|
196
|
+
contextType: React.Context<string>;
|
|
197
|
+
ComposedComponent: React.ComponentType<typeof NumberInput>;
|
|
198
|
+
} & import("hoist-non-react-statics").NonReactStatics<typeof NumberInput, {}> & {
|
|
199
|
+
ComposedComponent: typeof NumberInput;
|
|
200
|
+
};
|
|
201
|
+
export default _default;
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* amis-ui v6.13.0
|
|
3
|
+
* Copyright 2018-2025 fex
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { __extends, __assign, __decorate, __metadata } from 'tslib';
|
|
7
|
+
import React__default from 'react';
|
|
8
|
+
import isInteger from 'lodash/isInteger';
|
|
9
|
+
import InputNumber from 'rc-input-number';
|
|
10
|
+
import getMiniDecimal, { getNumberPrecision, toFixed } from '@rc-component/mini-decimal';
|
|
11
|
+
import { Icon } from './icons.js';
|
|
12
|
+
import { ucFirst, isNumeric, autobind, themeable } from 'amis-core';
|
|
13
|
+
|
|
14
|
+
var NumberInput = /** @class */ (function (_super) {
|
|
15
|
+
__extends(NumberInput, _super);
|
|
16
|
+
function NumberInput(props) {
|
|
17
|
+
var _this = _super.call(this, props) || this;
|
|
18
|
+
/**
|
|
19
|
+
* 是否是 bigNumber,如果输入的内容是字符串就自动开启
|
|
20
|
+
*/
|
|
21
|
+
_this.isBig = false;
|
|
22
|
+
// 严格判断大数模式,因为初始化value为empty string时,修改value值格式仍然为string
|
|
23
|
+
_this.isBig = !!props.big;
|
|
24
|
+
_this.state = {
|
|
25
|
+
focused: false
|
|
26
|
+
};
|
|
27
|
+
return _this;
|
|
28
|
+
}
|
|
29
|
+
NumberInput.prototype.componentDidUpdate = function (prevProps) {
|
|
30
|
+
var isBig = !!this.props.big;
|
|
31
|
+
if (!!(prevProps === null || prevProps === void 0 ? void 0 : prevProps.big) !== isBig) {
|
|
32
|
+
this.isBig = isBig;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
NumberInput.prototype.handleChange = function (value) {
|
|
36
|
+
var _a = this.props, min = _a.min, max = _a.max, step = _a.step, resetValue = _a.resetValue, clearValueOnEmpty = _a.clearValueOnEmpty, onChange = _a.onChange;
|
|
37
|
+
var _b = this.props, suffix = _b.suffix, precision = _b.precision, showAsPercent = _b.showAsPercent;
|
|
38
|
+
//在显示百分号情况下,需先将数值恢复到实际value值
|
|
39
|
+
if (showAsPercent && suffix == '%') {
|
|
40
|
+
value = value / 100;
|
|
41
|
+
precision = (precision || 0) + 2;
|
|
42
|
+
}
|
|
43
|
+
var finalPrecision = NumberInput.normalizePrecision(precision, step);
|
|
44
|
+
var result = NumberInput.normalizeValue(value, min, max, finalPrecision, resetValue, clearValueOnEmpty, this.isBig);
|
|
45
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(result);
|
|
46
|
+
};
|
|
47
|
+
NumberInput.prototype.handleFocus = function (e) {
|
|
48
|
+
var onFocus = this.props.onFocus;
|
|
49
|
+
this.setState({ focused: true });
|
|
50
|
+
onFocus && onFocus(e);
|
|
51
|
+
};
|
|
52
|
+
NumberInput.prototype.handleBlur = function (e) {
|
|
53
|
+
var onBlur = this.props.onBlur;
|
|
54
|
+
this.setState({ focused: false });
|
|
55
|
+
onBlur && onBlur(e);
|
|
56
|
+
};
|
|
57
|
+
NumberInput.prototype.handleClick = function (e) {
|
|
58
|
+
e.stopPropagation();
|
|
59
|
+
};
|
|
60
|
+
NumberInput.prototype.handleEnhanceModeChange = function (action, e) {
|
|
61
|
+
e.stopPropagation();
|
|
62
|
+
var _a = this.props, value = _a.value, _b = _a.step, step = _b === void 0 ? 1 : _b, disabled = _a.disabled, readOnly = _a.readOnly, precision = _a.precision;
|
|
63
|
+
// value为undefined会导致溢出错误
|
|
64
|
+
var val = value || 0;
|
|
65
|
+
if (disabled || readOnly) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
if (isNaN(Number(step)) || !Number(step)) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
var stepDecimal = getMiniDecimal(step);
|
|
72
|
+
if (action !== 'add') {
|
|
73
|
+
stepDecimal = stepDecimal.negate();
|
|
74
|
+
}
|
|
75
|
+
var target = getMiniDecimal(val).add(stepDecimal.toString());
|
|
76
|
+
var getPrecision = function (numStr) {
|
|
77
|
+
if (precision != null && precision >= 0) {
|
|
78
|
+
return precision;
|
|
79
|
+
}
|
|
80
|
+
return Math.max(getNumberPrecision(numStr), getNumberPrecision(Number(step) || 1));
|
|
81
|
+
};
|
|
82
|
+
var triggerValueUpdate = function (newValue, userTyping) {
|
|
83
|
+
var updateValue = newValue;
|
|
84
|
+
var numStr = updateValue.toString();
|
|
85
|
+
var mergedPrecision = getPrecision(numStr);
|
|
86
|
+
if (mergedPrecision >= 0) {
|
|
87
|
+
updateValue = getMiniDecimal(toFixed(numStr, '.', mergedPrecision));
|
|
88
|
+
}
|
|
89
|
+
return updateValue;
|
|
90
|
+
};
|
|
91
|
+
var updatedValue = triggerValueUpdate(target);
|
|
92
|
+
if (this.isBig) {
|
|
93
|
+
this.handleChange(updatedValue.toString());
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
val = Number(updatedValue.toString());
|
|
97
|
+
this.handleChange(val);
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
NumberInput.prototype.renderBase = function () {
|
|
101
|
+
var _a;
|
|
102
|
+
var _b = this.props, className = _b.className, ns = _b.classPrefix, cx = _b.classnames, step = _b.step, precision = _b.precision, disabled = _b.disabled, placeholder = _b.placeholder, showSteps = _b.showSteps, formatter = _b.formatter, suffix = _b.suffix, showAsPercent = _b.showAsPercent, parser = _b.parser, borderMode = _b.borderMode, readOnly = _b.readOnly, displayMode = _b.displayMode, inputRef = _b.inputRef, keyboard = _b.keyboard, inputControlClassName = _b.inputControlClassName, mobileUI = _b.mobileUI, name = _b.name, testIdBuilder = _b.testIdBuilder;
|
|
103
|
+
var _c = this.props, value = _c.value, max = _c.max, min = _c.min;
|
|
104
|
+
//需要展示百分号的情况下,数值乘100显示,注意精度丢失问题
|
|
105
|
+
if (showAsPercent && suffix == '%' && value) {
|
|
106
|
+
value = parseFloat((Number(value) * 100).toFixed(precision));
|
|
107
|
+
max = max != null ? Math.round(Number(max) * 100) : max;
|
|
108
|
+
min = min != null ? Math.round(Number(min) * 100) : min;
|
|
109
|
+
}
|
|
110
|
+
var precisionProps = {
|
|
111
|
+
precision: NumberInput.normalizePrecision(precision, step)
|
|
112
|
+
};
|
|
113
|
+
return (React__default.createElement(InputNumber, __assign({ name: name, className: cx(className, showSteps === false || readOnly ? 'no-steps' : '', displayMode === 'enhance'
|
|
114
|
+
? 'Number--enhance-input'
|
|
115
|
+
: inputControlClassName, (_a = {},
|
|
116
|
+
_a["Number--border".concat(ucFirst(borderMode))] = borderMode,
|
|
117
|
+
_a), {
|
|
118
|
+
'is-mobile': mobileUI
|
|
119
|
+
}), ref: inputRef, readOnly: readOnly, prefixCls: "".concat(ns, "Number"), value: value, step: step, max: max, min: min, formatter: formatter, parser: parser, onChange: this.handleChange, disabled: disabled, placeholder: placeholder, onFocus: this.handleFocus, onClick: this.handleClick, onBlur: this.handleBlur, stringMode: this.isBig ? true : false, keyboard: keyboard }, precisionProps, testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getTestId())));
|
|
120
|
+
};
|
|
121
|
+
NumberInput.prototype.render = function () {
|
|
122
|
+
var _a;
|
|
123
|
+
var _this = this;
|
|
124
|
+
var _b;
|
|
125
|
+
var _c = this.props, cx = _c.classnames, value = _c.value, max = _c.max, min = _c.min, disabled = _c.disabled, showSteps = _c.showSteps, borderMode = _c.borderMode, readOnly = _c.readOnly, displayMode = _c.displayMode, inputControlClassName = _c.inputControlClassName; _c.mobileUI;
|
|
126
|
+
return (React__default.createElement(React__default.Fragment, null, displayMode === 'enhance' ? (React__default.createElement("div", { className: cx('Number--enhance', disabled ? 'Number--enhance-disabled' : '', showSteps === false ? 'Number--enhance-no-steps' : '', (_a = {},
|
|
127
|
+
_a["Number--enhance-border".concat(ucFirst(borderMode))] = borderMode,
|
|
128
|
+
_a), inputControlClassName, ((_b = this.state) === null || _b === void 0 ? void 0 : _b.focused) && 'focused') },
|
|
129
|
+
React__default.createElement("div", { className: cx('Number--enhance-left-icon', value && value === min ? 'Number--enhance-border-min' : '', disabled ? 'Number--enhance-border-disabled' : '', readOnly ? 'Number--enhance-border-readOnly' : ''), onClick: function (e) { return _this.handleEnhanceModeChange('subtract', e); } },
|
|
130
|
+
React__default.createElement(Icon, { icon: "minus", className: "icon", classNameProp: cx('InputNumber-enhance-minus icon'), iconContent: "InputNumber-enhance-minus" })),
|
|
131
|
+
this.renderBase(),
|
|
132
|
+
React__default.createElement("div", { className: cx('Number--enhance-right-icon', value && value === max ? 'Number--enhance-border-max' : '', disabled ? 'Number--enhance-border-disabled' : '', readOnly ? 'Number--enhance-border-readOnly' : ''), onClick: function (e) { return _this.handleEnhanceModeChange('add', e); } },
|
|
133
|
+
React__default.createElement(Icon, { icon: "plus", className: "icon", classNameProp: cx('InputNumber-enhance-plus icon'), iconContent: "InputNumber-enhance-plus" })))) : (this.renderBase())));
|
|
134
|
+
};
|
|
135
|
+
NumberInput.defaultProps = {
|
|
136
|
+
step: 1,
|
|
137
|
+
readOnly: false,
|
|
138
|
+
borderMode: 'full',
|
|
139
|
+
resetValue: ''
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* 处理value值
|
|
143
|
+
*
|
|
144
|
+
* @param value value 值
|
|
145
|
+
* @param min 最小值
|
|
146
|
+
* @param max 最大值
|
|
147
|
+
* @param precision 精度
|
|
148
|
+
* @param resetValue 重置值
|
|
149
|
+
* @param isBig 是否为大数模式
|
|
150
|
+
*/
|
|
151
|
+
NumberInput.normalizeValue = function (value, min, max, precision, resetValue, clearValueOnEmpty, isBig) {
|
|
152
|
+
/**
|
|
153
|
+
* 输入不合法时重置为resetValue
|
|
154
|
+
* 若resetValue为不合法数字,直接清空输入
|
|
155
|
+
* 若resetValue为数字,则需要处理max,min,precision,保证抛出的值满足条件
|
|
156
|
+
*/
|
|
157
|
+
if (!isNumeric(value)) {
|
|
158
|
+
if (!isNumeric(resetValue)) {
|
|
159
|
+
return clearValueOnEmpty ? undefined : '';
|
|
160
|
+
}
|
|
161
|
+
value = resetValue;
|
|
162
|
+
}
|
|
163
|
+
// 处理max & min
|
|
164
|
+
if (typeof value === 'number') {
|
|
165
|
+
if (typeof min === 'number') {
|
|
166
|
+
value = Math.max(value, min);
|
|
167
|
+
}
|
|
168
|
+
if (typeof max === 'number') {
|
|
169
|
+
value = Math.min(value, max);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
// 处理string类型输入
|
|
173
|
+
if (typeof value === 'string') {
|
|
174
|
+
var val = getMiniDecimal(value);
|
|
175
|
+
if (typeof min !== 'undefined') {
|
|
176
|
+
var minValue = getMiniDecimal(min);
|
|
177
|
+
if (val.lessEquals(minValue)) {
|
|
178
|
+
value = min;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
if (typeof max !== 'undefined') {
|
|
182
|
+
var maxValue = getMiniDecimal(max);
|
|
183
|
+
if (maxValue.lessEquals(val)) {
|
|
184
|
+
value = max;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* 非大数模式下,如果精度不满足要求,需要处理value值,只做精度处理,不做四舍五入
|
|
190
|
+
*/
|
|
191
|
+
if (!isBig && getNumberPrecision(value) !== precision) {
|
|
192
|
+
var multiplier = Math.pow(10, precision);
|
|
193
|
+
var truncatedValue = Math.trunc(getMiniDecimal(value).multi(multiplier).toNumber()) /
|
|
194
|
+
multiplier;
|
|
195
|
+
value = getMiniDecimal(truncatedValue).toNumber();
|
|
196
|
+
}
|
|
197
|
+
return value;
|
|
198
|
+
};
|
|
199
|
+
/**
|
|
200
|
+
* 处理value值(仅使用 resetValue 和 clearValueOnEmpty)
|
|
201
|
+
*
|
|
202
|
+
* @param value value 值
|
|
203
|
+
* @param resetValue 重置值
|
|
204
|
+
* @param clearValueOnEmpty 是否在清空内容时从数据域中删除该表单项对应的值
|
|
205
|
+
*/
|
|
206
|
+
NumberInput.normalizeValue2 = function (value, resetValue, clearValueOnEmpty) {
|
|
207
|
+
if (!isNumeric(value)) {
|
|
208
|
+
if (!isNumeric(resetValue)) {
|
|
209
|
+
return clearValueOnEmpty ? undefined : '';
|
|
210
|
+
}
|
|
211
|
+
value = resetValue;
|
|
212
|
+
}
|
|
213
|
+
return value;
|
|
214
|
+
};
|
|
215
|
+
/**
|
|
216
|
+
* 获取精度,合法的精度为0和正整数,不合法的精度统一转化为0
|
|
217
|
+
* 若设置了step,则会基于step的精度生成,最终使用更高的精度
|
|
218
|
+
*
|
|
219
|
+
* @param precision 精度
|
|
220
|
+
* @param step 步长
|
|
221
|
+
*/
|
|
222
|
+
NumberInput.normalizePrecision = function (precision, step) {
|
|
223
|
+
if (typeof precision === 'number' &&
|
|
224
|
+
isInteger(precision) &&
|
|
225
|
+
precision >= 0) {
|
|
226
|
+
return Math.max(precision, getNumberPrecision(step !== null && step !== void 0 ? step : 1));
|
|
227
|
+
}
|
|
228
|
+
// 如果设置了step,就基于step和precision,选取更高精度
|
|
229
|
+
if (step != null) {
|
|
230
|
+
return Math.max(0, getNumberPrecision(step));
|
|
231
|
+
}
|
|
232
|
+
return 0;
|
|
233
|
+
};
|
|
234
|
+
__decorate([
|
|
235
|
+
autobind,
|
|
236
|
+
__metadata("design:type", Function),
|
|
237
|
+
__metadata("design:paramtypes", [Object]),
|
|
238
|
+
__metadata("design:returntype", void 0)
|
|
239
|
+
], NumberInput.prototype, "handleChange", null);
|
|
240
|
+
__decorate([
|
|
241
|
+
autobind,
|
|
242
|
+
__metadata("design:type", Function),
|
|
243
|
+
__metadata("design:paramtypes", [Object]),
|
|
244
|
+
__metadata("design:returntype", void 0)
|
|
245
|
+
], NumberInput.prototype, "handleFocus", null);
|
|
246
|
+
__decorate([
|
|
247
|
+
autobind,
|
|
248
|
+
__metadata("design:type", Function),
|
|
249
|
+
__metadata("design:paramtypes", [Object]),
|
|
250
|
+
__metadata("design:returntype", void 0)
|
|
251
|
+
], NumberInput.prototype, "handleBlur", null);
|
|
252
|
+
__decorate([
|
|
253
|
+
autobind,
|
|
254
|
+
__metadata("design:type", Function),
|
|
255
|
+
__metadata("design:paramtypes", [Object]),
|
|
256
|
+
__metadata("design:returntype", void 0)
|
|
257
|
+
], NumberInput.prototype, "handleClick", null);
|
|
258
|
+
__decorate([
|
|
259
|
+
autobind,
|
|
260
|
+
__metadata("design:type", Function),
|
|
261
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
262
|
+
__metadata("design:returntype", void 0)
|
|
263
|
+
], NumberInput.prototype, "handleEnhanceModeChange", null);
|
|
264
|
+
__decorate([
|
|
265
|
+
autobind,
|
|
266
|
+
__metadata("design:type", Function),
|
|
267
|
+
__metadata("design:paramtypes", []),
|
|
268
|
+
__metadata("design:returntype", void 0)
|
|
269
|
+
], NumberInput.prototype, "renderBase", null);
|
|
270
|
+
return NumberInput;
|
|
271
|
+
}(React__default.Component));
|
|
272
|
+
var NumberInput$1 = themeable(NumberInput);
|
|
273
|
+
|
|
274
|
+
export { NumberInput, NumberInput$1 as default };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file OverflowTpl
|
|
3
|
+
* @desc 文字提示组件,会基于内部文字是否触发ellipsis,动态展示tooltip提示, 默认使用子节点文本作为tooltip内容
|
|
4
|
+
*/
|
|
5
|
+
/// <reference types="hoist-non-react-statics" />
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import type { ThemeProps } from 'amis-core';
|
|
8
|
+
import type { TooltipWrapperProps } from './TooltipWrapper';
|
|
9
|
+
export interface OverflowTplProps extends ThemeProps {
|
|
10
|
+
className?: string;
|
|
11
|
+
/**
|
|
12
|
+
* tooltip相关配置
|
|
13
|
+
*/
|
|
14
|
+
tooltip?: TooltipWrapperProps['tooltip'];
|
|
15
|
+
/**
|
|
16
|
+
* 是否使用行内标签,默认为 true,使用 span 标签,否则使用 div 标签
|
|
17
|
+
*/
|
|
18
|
+
inline?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* 目标元素的selector,通常不需要指定
|
|
21
|
+
*/
|
|
22
|
+
targetSelector?: string;
|
|
23
|
+
/**
|
|
24
|
+
* 内部节点
|
|
25
|
+
*/
|
|
26
|
+
children?: React.ReactNode | React.ReactNode[];
|
|
27
|
+
}
|
|
28
|
+
declare const _default: {
|
|
29
|
+
new (props: Omit<OverflowTplProps, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps): {
|
|
30
|
+
ref: any;
|
|
31
|
+
childRef(ref: any): void;
|
|
32
|
+
getWrappedInstance(): any;
|
|
33
|
+
render(): React.JSX.Element;
|
|
34
|
+
context: unknown;
|
|
35
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<OverflowTplProps, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
36
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
37
|
+
readonly props: Readonly<Omit<OverflowTplProps, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>;
|
|
38
|
+
state: Readonly<{}>;
|
|
39
|
+
refs: {
|
|
40
|
+
[key: string]: React.ReactInstance;
|
|
41
|
+
};
|
|
42
|
+
componentDidMount?(): void;
|
|
43
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<OverflowTplProps, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
44
|
+
componentWillUnmount?(): void;
|
|
45
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
46
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<OverflowTplProps, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, prevState: Readonly<{}>): any;
|
|
47
|
+
componentDidUpdate?(prevProps: Readonly<Omit<OverflowTplProps, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
48
|
+
componentWillMount?(): void;
|
|
49
|
+
UNSAFE_componentWillMount?(): void;
|
|
50
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<OverflowTplProps, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextContext: any): void;
|
|
51
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<OverflowTplProps, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextContext: any): void;
|
|
52
|
+
componentWillUpdate?(nextProps: Readonly<Omit<OverflowTplProps, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
53
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<OverflowTplProps, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
54
|
+
};
|
|
55
|
+
displayName: string;
|
|
56
|
+
contextType: React.Context<string>;
|
|
57
|
+
ComposedComponent: React.ComponentType<React.FC<OverflowTplProps>>;
|
|
58
|
+
} & import("hoist-non-react-statics").NonReactStatics<React.FC<OverflowTplProps>, {}> & {
|
|
59
|
+
ComposedComponent: React.FC<OverflowTplProps>;
|
|
60
|
+
};
|
|
61
|
+
export default _default;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* amis-ui v6.13.0
|
|
3
|
+
* Copyright 2018-2025 fex
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { __read, __assign } from 'tslib';
|
|
7
|
+
import React__default, { useState, useRef, useCallback, useEffect } from 'react';
|
|
8
|
+
import { findDOMNode } from 'react-dom';
|
|
9
|
+
import omit from 'lodash/omit';
|
|
10
|
+
import { themeable, isObject } from 'amis-core';
|
|
11
|
+
import TooltipWrapper from './TooltipWrapper.js';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @file OverflowTpl
|
|
15
|
+
* @desc 文字提示组件,会基于内部文字是否触发ellipsis,动态展示tooltip提示, 默认使用子节点文本作为tooltip内容
|
|
16
|
+
*/
|
|
17
|
+
var OverflowTpl = function (props) {
|
|
18
|
+
var cx = props.classnames, children = props.children, className = props.className, targetSelector = props.targetSelector, tooltip = props.tooltip, _a = props.inline, inline = _a === void 0 ? true : _a;
|
|
19
|
+
var _b = __read(useState(false), 2), ellipsisAvtived = _b[0], setEllipsisAvtived = _b[1];
|
|
20
|
+
var _c = __read(useState(''), 2), innerText = _c[0], setInnerText = _c[1];
|
|
21
|
+
var innerRef = useRef(null);
|
|
22
|
+
var defaultTooltip = tooltip
|
|
23
|
+
? typeof tooltip === 'string'
|
|
24
|
+
? { content: tooltip }
|
|
25
|
+
: isObject(tooltip)
|
|
26
|
+
? tooltip
|
|
27
|
+
: undefined
|
|
28
|
+
: typeof children === 'string'
|
|
29
|
+
? { content: children }
|
|
30
|
+
: undefined; /** 默认使用子节点文本 */
|
|
31
|
+
var normalizedTooltip = innerText && (!defaultTooltip || (defaultTooltip === null || defaultTooltip === void 0 ? void 0 : defaultTooltip.content) == null)
|
|
32
|
+
? __assign(__assign({}, defaultTooltip), { content: innerText }) : defaultTooltip;
|
|
33
|
+
var updateEllipsisActivation = useCallback(function (el) {
|
|
34
|
+
setEllipsisAvtived(el
|
|
35
|
+
? el.scrollWidth > el.clientWidth || el.scrollHeight > el.scrollHeight
|
|
36
|
+
: false);
|
|
37
|
+
}, [innerRef.current]);
|
|
38
|
+
var onMutation = useCallback(function (mutations) {
|
|
39
|
+
var dom = (targetSelector
|
|
40
|
+
? document.querySelector(targetSelector)
|
|
41
|
+
: mutations === null || mutations === void 0 ? void 0 : mutations[0].target);
|
|
42
|
+
updateEllipsisActivation(dom);
|
|
43
|
+
if ((dom === null || dom === void 0 ? void 0 : dom.textContent) &&
|
|
44
|
+
typeof dom.textContent === 'string' &&
|
|
45
|
+
(!defaultTooltip || (defaultTooltip === null || defaultTooltip === void 0 ? void 0 : defaultTooltip.content) == null)) {
|
|
46
|
+
setInnerText(dom.textContent);
|
|
47
|
+
}
|
|
48
|
+
}, [targetSelector]);
|
|
49
|
+
var onResize = useCallback(function (entries) {
|
|
50
|
+
var dom = (targetSelector
|
|
51
|
+
? document.querySelector(targetSelector)
|
|
52
|
+
: entries === null || entries === void 0 ? void 0 : entries[0].target);
|
|
53
|
+
updateEllipsisActivation(dom);
|
|
54
|
+
if ((dom === null || dom === void 0 ? void 0 : dom.textContent) &&
|
|
55
|
+
typeof dom.textContent === 'string' &&
|
|
56
|
+
(!defaultTooltip || !(defaultTooltip === null || defaultTooltip === void 0 ? void 0 : defaultTooltip.content) == null)) {
|
|
57
|
+
setInnerText(dom.textContent);
|
|
58
|
+
}
|
|
59
|
+
}, [targetSelector]);
|
|
60
|
+
/** 监听目标元素的DOM变化 */
|
|
61
|
+
useEffect(function () {
|
|
62
|
+
var element = innerRef.current instanceof React__default.Component
|
|
63
|
+
? findDOMNode(innerRef.current)
|
|
64
|
+
: innerRef.current;
|
|
65
|
+
if (element) {
|
|
66
|
+
var observer_1 = new MutationObserver(onMutation);
|
|
67
|
+
observer_1.observe(element, {
|
|
68
|
+
childList: true,
|
|
69
|
+
subtree: true,
|
|
70
|
+
characterDataOldValue: true,
|
|
71
|
+
characterData: true
|
|
72
|
+
});
|
|
73
|
+
return function () { return observer_1.disconnect(); };
|
|
74
|
+
}
|
|
75
|
+
return;
|
|
76
|
+
}, [innerRef.current]);
|
|
77
|
+
/** 监听目标元素的尺寸变化 */
|
|
78
|
+
useEffect(function () {
|
|
79
|
+
var element = innerRef.current instanceof React__default.Component
|
|
80
|
+
? findDOMNode(innerRef.current)
|
|
81
|
+
: innerRef.current;
|
|
82
|
+
if (element) {
|
|
83
|
+
var observer_2 = new ResizeObserver(onResize);
|
|
84
|
+
observer_2.observe(element);
|
|
85
|
+
return function () { return observer_2.disconnect(); };
|
|
86
|
+
}
|
|
87
|
+
return;
|
|
88
|
+
}, [innerRef.current]);
|
|
89
|
+
var WrapComponent = inline !== false ? 'span' : 'div';
|
|
90
|
+
var showTooltip = ellipsisAvtived && normalizedTooltip;
|
|
91
|
+
var Body = React__default.isValidElement(children) ? (React__default.cloneElement(children, { ref: innerRef })) : (React__default.createElement(WrapComponent, { ref: innerRef, className: cx('OverflowTpl', className, {
|
|
92
|
+
'OverflowTpl--with-tooltip': showTooltip
|
|
93
|
+
}) }, children));
|
|
94
|
+
return showTooltip ? (React__default.createElement(TooltipWrapper, __assign({}, omit(props, ['className', 'inline', 'targetSelector', 'children']), { tooltip: normalizedTooltip }), Body)) : (Body);
|
|
95
|
+
};
|
|
96
|
+
OverflowTpl.defaultProps = {
|
|
97
|
+
inline: true
|
|
98
|
+
};
|
|
99
|
+
var OverflowTpl$1 = themeable(OverflowTpl);
|
|
100
|
+
|
|
101
|
+
export { OverflowTpl$1 as default };
|