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,832 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* amis-ui v6.13.0
|
|
3
|
+
* Copyright 2018-2025 fex
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
'use strict';
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
|
+
|
|
10
|
+
var tslib = require('tslib');
|
|
11
|
+
var amisCore = require('amis-core');
|
|
12
|
+
var React = require('react');
|
|
13
|
+
var omit = require('lodash/omit');
|
|
14
|
+
var merge = require('lodash/merge');
|
|
15
|
+
var index = require('./virtual-list/index.js');
|
|
16
|
+
var TooltipWrapper = require('./TooltipWrapper.js');
|
|
17
|
+
var Downshift = require('downshift');
|
|
18
|
+
var icons = require('./icons.js');
|
|
19
|
+
var matchSorter = require('match-sorter');
|
|
20
|
+
var isPlainObject = require('lodash/isPlainObject');
|
|
21
|
+
var ReactDOM = require('react-dom');
|
|
22
|
+
var Checkbox = require('./Checkbox.js');
|
|
23
|
+
var Input = require('./Input.js');
|
|
24
|
+
var Spinner = require('./Spinner.js');
|
|
25
|
+
var WithRemoteConfig = require('./WithRemoteConfig.js');
|
|
26
|
+
var PopOverContainer = require('./PopOverContainer.js');
|
|
27
|
+
var SelectMobile = require('./SelectMobile.js');
|
|
28
|
+
var AutoFoldedList = require('./AutoFoldedList.js');
|
|
29
|
+
|
|
30
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
31
|
+
|
|
32
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
33
|
+
var omit__default = /*#__PURE__*/_interopDefaultLegacy(omit);
|
|
34
|
+
var merge__default = /*#__PURE__*/_interopDefaultLegacy(merge);
|
|
35
|
+
var Downshift__default = /*#__PURE__*/_interopDefaultLegacy(Downshift);
|
|
36
|
+
var isPlainObject__default = /*#__PURE__*/_interopDefaultLegacy(isPlainObject);
|
|
37
|
+
|
|
38
|
+
var __react_jsx__ = require('react');
|
|
39
|
+
var _J$X_ = (__react_jsx__["default"] || __react_jsx__).createElement;
|
|
40
|
+
(__react_jsx__["default"] || __react_jsx__).Fragment;
|
|
41
|
+
var defaultFilterOption = function (options, inputValue, option) {
|
|
42
|
+
return matchSorter.matchSorter(options, inputValue, tslib.__assign({ threshold: matchSorter.matchSorter.rankings.CONTAINS }, option));
|
|
43
|
+
};
|
|
44
|
+
function value2array(value, props, enableNodePath) {
|
|
45
|
+
if (enableNodePath === void 0) { enableNodePath = false; }
|
|
46
|
+
var labelField = props.labelField, _a = props.valueField, valueField = _a === void 0 ? 'value' : _a, pathSeparator = props.pathSeparator, delimiter = props.delimiter, options = props.options, multi = props.multi, multiple = props.multiple;
|
|
47
|
+
if (enableNodePath) {
|
|
48
|
+
value = amisCore.normalizeNodePath(value, enableNodePath, labelField, valueField, pathSeparator, delimiter).nodeValueArray;
|
|
49
|
+
}
|
|
50
|
+
if (multi || multiple) {
|
|
51
|
+
if (typeof value === 'string') {
|
|
52
|
+
value = value.split(delimiter || ',');
|
|
53
|
+
}
|
|
54
|
+
if (!Array.isArray(value)) {
|
|
55
|
+
if (value === null || value === undefined) {
|
|
56
|
+
return [];
|
|
57
|
+
}
|
|
58
|
+
value = [value];
|
|
59
|
+
}
|
|
60
|
+
return value
|
|
61
|
+
.map(function (value) {
|
|
62
|
+
return expandValue(value, options, valueField) ||
|
|
63
|
+
(amisCore.isObject(value) && value.hasOwnProperty(valueField)
|
|
64
|
+
? value
|
|
65
|
+
: undefined);
|
|
66
|
+
})
|
|
67
|
+
.filter(function (item) { return item; });
|
|
68
|
+
}
|
|
69
|
+
else if (Array.isArray(value)) {
|
|
70
|
+
value = value[0];
|
|
71
|
+
}
|
|
72
|
+
var expandedValue = expandValue(value, options, valueField);
|
|
73
|
+
return expandedValue
|
|
74
|
+
? [expandedValue]
|
|
75
|
+
: amisCore.isObject(value) && value.hasOwnProperty(valueField || 'value')
|
|
76
|
+
? [value]
|
|
77
|
+
: [];
|
|
78
|
+
}
|
|
79
|
+
function expandValue(value, options, valueField) {
|
|
80
|
+
var _a;
|
|
81
|
+
if (valueField === void 0) { valueField = 'value'; }
|
|
82
|
+
var valueType = typeof value;
|
|
83
|
+
if (valueType !== 'string' &&
|
|
84
|
+
valueType !== 'number' &&
|
|
85
|
+
valueType !== 'boolean' &&
|
|
86
|
+
valueType !== 'object') {
|
|
87
|
+
return value;
|
|
88
|
+
}
|
|
89
|
+
if (!options) {
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
if (valueType === 'object' &&
|
|
93
|
+
value &&
|
|
94
|
+
value.hasOwnProperty(valueField || 'value')) {
|
|
95
|
+
value = (_a = value[valueField || 'value']) !== null && _a !== void 0 ? _a : '';
|
|
96
|
+
}
|
|
97
|
+
return amisCore.findTree(options, optionValueCompare(value, valueField || 'value'), {
|
|
98
|
+
resolve: amisCore.getOptionValueBindField(valueField),
|
|
99
|
+
value: amisCore.getOptionValue(value, valueField)
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
function matchOptionValue(a, b, valueField) {
|
|
103
|
+
if (valueField === void 0) { valueField = 'value'; }
|
|
104
|
+
return amisCore.isObject(a)
|
|
105
|
+
? a === b[valueField || 'value']
|
|
106
|
+
: String(b[valueField || 'value']) === String(a);
|
|
107
|
+
}
|
|
108
|
+
function optionValueCompare(a, valueField) {
|
|
109
|
+
if (valueField === void 0) { valueField = 'value'; }
|
|
110
|
+
return function (b) { return matchOptionValue(a, b, valueField); };
|
|
111
|
+
}
|
|
112
|
+
function normalizeOptions(options, share, valueField) {
|
|
113
|
+
if (share === void 0) { share = {
|
|
114
|
+
values: [],
|
|
115
|
+
options: []
|
|
116
|
+
}; }
|
|
117
|
+
if (valueField === void 0) { valueField = 'value'; }
|
|
118
|
+
if (typeof options === 'string') {
|
|
119
|
+
return options.split(',').map(function (item) {
|
|
120
|
+
var idx = share.values.indexOf(item);
|
|
121
|
+
if (~idx) {
|
|
122
|
+
return share.options[idx];
|
|
123
|
+
}
|
|
124
|
+
var option = {
|
|
125
|
+
label: item,
|
|
126
|
+
value: item
|
|
127
|
+
};
|
|
128
|
+
share.values.push(option.value);
|
|
129
|
+
share.options.push(option);
|
|
130
|
+
return option;
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
else if (Array.isArray(options) &&
|
|
134
|
+
typeof options[0] === 'string') {
|
|
135
|
+
return options.map(function (item) {
|
|
136
|
+
var idx = share.values.indexOf(item);
|
|
137
|
+
if (~idx) {
|
|
138
|
+
return share.options[idx];
|
|
139
|
+
}
|
|
140
|
+
var option = {
|
|
141
|
+
label: item,
|
|
142
|
+
value: item
|
|
143
|
+
};
|
|
144
|
+
share.values.push(option.value);
|
|
145
|
+
share.options.push(option);
|
|
146
|
+
return option;
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
else if (Array.isArray(options)) {
|
|
150
|
+
return options.map(function (item) {
|
|
151
|
+
var value = item && item[valueField];
|
|
152
|
+
var idx = value !== undefined && !item.children
|
|
153
|
+
? share.values.indexOf(value)
|
|
154
|
+
: -1;
|
|
155
|
+
if (~idx) {
|
|
156
|
+
return share.options[idx];
|
|
157
|
+
}
|
|
158
|
+
var option = tslib.__assign(tslib.__assign({}, item), { value: value });
|
|
159
|
+
if (typeof option.children !== 'undefined') {
|
|
160
|
+
option.children = normalizeOptions(option.children, share, valueField);
|
|
161
|
+
}
|
|
162
|
+
else if (value !== undefined) {
|
|
163
|
+
share.values.push(value);
|
|
164
|
+
share.options.push(option);
|
|
165
|
+
}
|
|
166
|
+
return option;
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
else if (isPlainObject__default["default"](options)) {
|
|
170
|
+
return Object.keys(options).map(function (key) {
|
|
171
|
+
var idx = share.values.indexOf(key);
|
|
172
|
+
if (~idx) {
|
|
173
|
+
return share.options[idx];
|
|
174
|
+
}
|
|
175
|
+
var option = {
|
|
176
|
+
label: options[key],
|
|
177
|
+
value: key
|
|
178
|
+
};
|
|
179
|
+
share.values.push(option.value);
|
|
180
|
+
share.options.push(option);
|
|
181
|
+
return option;
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
return [];
|
|
185
|
+
}
|
|
186
|
+
var DownshiftChangeTypes = Downshift__default["default"].stateChangeTypes;
|
|
187
|
+
var Select = /** @class */ (function (_super) {
|
|
188
|
+
tslib.__extends(Select, _super);
|
|
189
|
+
function Select(props) {
|
|
190
|
+
var _this = _super.call(this, props) || this;
|
|
191
|
+
_this.menu = React__default["default"].createRef();
|
|
192
|
+
_this.state = {
|
|
193
|
+
isOpen: props.defaultOpen || false,
|
|
194
|
+
isFocused: false,
|
|
195
|
+
inputValue: '',
|
|
196
|
+
highlightedIndex: -1,
|
|
197
|
+
selection: value2array(props.value, props),
|
|
198
|
+
itemHeight: 32 /** Select选项高度保持一致 */,
|
|
199
|
+
pickerSelectItem: ''
|
|
200
|
+
};
|
|
201
|
+
return _this;
|
|
202
|
+
}
|
|
203
|
+
Select.prototype.componentDidMount = function () {
|
|
204
|
+
var loadOptions = this.props.loadOptions;
|
|
205
|
+
loadOptions && loadOptions('');
|
|
206
|
+
};
|
|
207
|
+
Select.prototype.componentDidUpdate = function (prevProps) {
|
|
208
|
+
var props = this.props;
|
|
209
|
+
var fn = amisCore.noop;
|
|
210
|
+
if (JSON.stringify(props.value) !== JSON.stringify(prevProps.value) ||
|
|
211
|
+
JSON.stringify(props.options) !== JSON.stringify(prevProps.options)) {
|
|
212
|
+
var selection = value2array(props.value, props);
|
|
213
|
+
this.setState({
|
|
214
|
+
selection: selection
|
|
215
|
+
}, fn);
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
Select.prototype.open = function () {
|
|
219
|
+
var _this = this;
|
|
220
|
+
var _a = this.props, disabled = _a.disabled, loading = _a.loading;
|
|
221
|
+
if (disabled || loading) {
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
this.setState({
|
|
225
|
+
isOpen: true,
|
|
226
|
+
highlightedIndex: -1
|
|
227
|
+
}, function () { return setTimeout(_this.focus, 500); });
|
|
228
|
+
};
|
|
229
|
+
Select.prototype.close = function () {
|
|
230
|
+
this.setState({
|
|
231
|
+
isOpen: false
|
|
232
|
+
});
|
|
233
|
+
};
|
|
234
|
+
Select.prototype.confirm = function () {
|
|
235
|
+
// @ts-ignore
|
|
236
|
+
this.handleChange(this.state.pickerSelectItem);
|
|
237
|
+
this.setState({
|
|
238
|
+
isOpen: false
|
|
239
|
+
});
|
|
240
|
+
};
|
|
241
|
+
Select.prototype.toggle = function (e) {
|
|
242
|
+
var _this = this;
|
|
243
|
+
var _a = this.props, disabled = _a.disabled, loading = _a.loading;
|
|
244
|
+
if ((e &&
|
|
245
|
+
this.menu.current &&
|
|
246
|
+
this.menu.current.contains(e.target)) ||
|
|
247
|
+
disabled ||
|
|
248
|
+
loading) {
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
this.setState({
|
|
252
|
+
isOpen: !this.state.isOpen,
|
|
253
|
+
highlightedIndex: -1
|
|
254
|
+
}, this.state.isOpen ? undefined : function () { return setTimeout(_this.focus, 500); });
|
|
255
|
+
};
|
|
256
|
+
Select.prototype.onFocus = function (e) {
|
|
257
|
+
var _a = this.props, simpleValue = _a.simpleValue, disabled = _a.disabled, loading = _a.loading;
|
|
258
|
+
var _b = this.state, selection = _b.selection, isOpen = _b.isOpen;
|
|
259
|
+
var value = simpleValue ? selection.map(function (item) { return item.value; }) : selection;
|
|
260
|
+
if (!disabled && !loading && !isOpen) {
|
|
261
|
+
this.setState({ isFocused: true }, this.focus);
|
|
262
|
+
}
|
|
263
|
+
this.props.onFocus &&
|
|
264
|
+
this.props.onFocus(tslib.__assign(tslib.__assign({}, e), { value: value }));
|
|
265
|
+
};
|
|
266
|
+
Select.prototype.onBlur = function (e) {
|
|
267
|
+
var simpleValue = this.props.simpleValue;
|
|
268
|
+
var selection = this.state.selection;
|
|
269
|
+
var value = simpleValue ? selection.map(function (item) { return item.value; }) : selection;
|
|
270
|
+
this.setState({
|
|
271
|
+
isFocused: false
|
|
272
|
+
});
|
|
273
|
+
this.props.onBlur &&
|
|
274
|
+
this.props.onBlur(tslib.__assign(tslib.__assign({}, e), { value: value }));
|
|
275
|
+
};
|
|
276
|
+
Select.prototype.focus = function () {
|
|
277
|
+
this.input
|
|
278
|
+
? this.input.focus()
|
|
279
|
+
: this.getTarget() && this.getTarget().focus();
|
|
280
|
+
};
|
|
281
|
+
Select.prototype.blur = function () {
|
|
282
|
+
this.input
|
|
283
|
+
? this.input.blur()
|
|
284
|
+
: this.getTarget() && this.getTarget().blur();
|
|
285
|
+
};
|
|
286
|
+
Select.prototype.getTarget = function () {
|
|
287
|
+
if (!this.target) {
|
|
288
|
+
this.target = ReactDOM.findDOMNode(this);
|
|
289
|
+
}
|
|
290
|
+
return this.target;
|
|
291
|
+
};
|
|
292
|
+
Select.prototype.inputRef = function (ref) {
|
|
293
|
+
this.input = ref;
|
|
294
|
+
};
|
|
295
|
+
Select.prototype.toggleCheckAll = function () {
|
|
296
|
+
var _a = this.props, options = _a.options, onChange = _a.onChange, simpleValue = _a.simpleValue, checkAllBySearch = _a.checkAllBySearch, labelField = _a.labelField, valueField = _a.valueField, _b = _a.filterOption, filterOption = _b === void 0 ? defaultFilterOption : _b;
|
|
297
|
+
var inputValue = this.state.inputValue;
|
|
298
|
+
var selection = this.state.selection;
|
|
299
|
+
var filtedOptions = (inputValue && checkAllBySearch !== false
|
|
300
|
+
? filterOption(options, inputValue, {
|
|
301
|
+
keys: [labelField || 'label', valueField || 'value']
|
|
302
|
+
})
|
|
303
|
+
: options.concat()).filter(function (option) { return option && !option.disabled; });
|
|
304
|
+
var optionsValues = filtedOptions.map(function (option) { return option.value; });
|
|
305
|
+
var selectionValues = selection.map(function (select) { return select.value; });
|
|
306
|
+
var checkedAll = optionsValues.every(function (option) { return selectionValues.indexOf(option) > -1; });
|
|
307
|
+
selection = checkedAll ? [] : filtedOptions;
|
|
308
|
+
onChange(simpleValue ? selection.map(function (item) { return item.value; }) : selection);
|
|
309
|
+
};
|
|
310
|
+
Select.prototype.removeItem = function (index, e) {
|
|
311
|
+
var _a = this.props, onChange = _a.onChange, simpleValue = _a.simpleValue, disabled = _a.disabled;
|
|
312
|
+
if (disabled) {
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
315
|
+
var value = this.state.selection;
|
|
316
|
+
e && e.stopPropagation();
|
|
317
|
+
value = Array.isArray(value) ? value.concat() : [value];
|
|
318
|
+
value.splice(index, 1);
|
|
319
|
+
onChange(simpleValue ? value.map(function (item) { return item.value; }) : value);
|
|
320
|
+
};
|
|
321
|
+
Select.prototype.handleInputChange = function (evt) {
|
|
322
|
+
var _this = this;
|
|
323
|
+
var loadOptions = this.props.loadOptions;
|
|
324
|
+
this.setState({
|
|
325
|
+
inputValue: evt.currentTarget.value
|
|
326
|
+
}, function () { return loadOptions && loadOptions(_this.state.inputValue); });
|
|
327
|
+
};
|
|
328
|
+
Select.prototype.handlePickerChange = function (selectItem, index, confirm) {
|
|
329
|
+
if (!this.props.multiple) {
|
|
330
|
+
selectItem = selectItem[0];
|
|
331
|
+
}
|
|
332
|
+
this.setState({
|
|
333
|
+
pickerSelectItem: selectItem
|
|
334
|
+
});
|
|
335
|
+
// 直接选中选项
|
|
336
|
+
if (confirm) {
|
|
337
|
+
this.handleChange(selectItem);
|
|
338
|
+
}
|
|
339
|
+
};
|
|
340
|
+
/**
|
|
341
|
+
* DownShift中ESC按键动作会触发change事件,此时selectItem为null,需要单独处理,参考:
|
|
342
|
+
* {@link https://github.com/downshift-js/downshift/issues/719 GitHub Issue #719}
|
|
343
|
+
*/
|
|
344
|
+
Select.prototype.handleChange = function (selectItem) {
|
|
345
|
+
var _a = this.props, onChange = _a.onChange, multiple = _a.multiple, simpleValue = _a.simpleValue, valueField = _a.valueField;
|
|
346
|
+
var selection = this.state.selection;
|
|
347
|
+
if (selectItem == null) {
|
|
348
|
+
return;
|
|
349
|
+
}
|
|
350
|
+
if (multiple) {
|
|
351
|
+
var selectionValues = selection.map(function (item) { return item[valueField]; });
|
|
352
|
+
selection = selection.concat();
|
|
353
|
+
var idx = selectionValues.indexOf(selectItem[valueField]);
|
|
354
|
+
if (~idx) {
|
|
355
|
+
selection.splice(idx, 1);
|
|
356
|
+
}
|
|
357
|
+
else {
|
|
358
|
+
selection.push(selectItem);
|
|
359
|
+
}
|
|
360
|
+
onChange(simpleValue ? selection.map(function (item) { return item[valueField]; }) : selection);
|
|
361
|
+
}
|
|
362
|
+
else {
|
|
363
|
+
// Downshift里面的判断修改后的值是否相等时,没有区分是否多选,且用的是!==,所以这里拦截一下
|
|
364
|
+
(!selection.length ||
|
|
365
|
+
selection[0][valueField] !== selectItem[valueField]) &&
|
|
366
|
+
onChange(simpleValue ? selectItem[valueField] : selectItem);
|
|
367
|
+
}
|
|
368
|
+
};
|
|
369
|
+
Select.prototype.handleStateChange = function (changes) {
|
|
370
|
+
var _a = this.props, multiple = _a.multiple, checkAll = _a.checkAll;
|
|
371
|
+
var update = {};
|
|
372
|
+
switch (changes.type) {
|
|
373
|
+
case DownshiftChangeTypes.keyDownEnter:
|
|
374
|
+
case DownshiftChangeTypes.clickItem:
|
|
375
|
+
update = tslib.__assign(tslib.__assign({}, update), { isOpen: multiple ? true : false, isFocused: multiple && checkAll ? true : false });
|
|
376
|
+
break;
|
|
377
|
+
case DownshiftChangeTypes.controlledPropUpdatedSelectedItem:
|
|
378
|
+
break;
|
|
379
|
+
case DownshiftChangeTypes.changeInput:
|
|
380
|
+
update.highlightedIndex = 0;
|
|
381
|
+
break;
|
|
382
|
+
case DownshiftChangeTypes.keyDownArrowDown:
|
|
383
|
+
case DownshiftChangeTypes.keyDownArrowUp:
|
|
384
|
+
case DownshiftChangeTypes.itemMouseEnter:
|
|
385
|
+
update = tslib.__assign(tslib.__assign({}, update), changes);
|
|
386
|
+
break;
|
|
387
|
+
}
|
|
388
|
+
if (Object.keys(update).length) {
|
|
389
|
+
this.setState(update);
|
|
390
|
+
}
|
|
391
|
+
};
|
|
392
|
+
Select.prototype.handleKeyPress = function (e) {
|
|
393
|
+
/**
|
|
394
|
+
* 考虑到label/value中有空格的case
|
|
395
|
+
* 这里使用组合键关闭 win:shift + space,mac:shift + space
|
|
396
|
+
*/
|
|
397
|
+
if (e.key === ' ' && e.shiftKey) {
|
|
398
|
+
this.toggle();
|
|
399
|
+
e.preventDefault();
|
|
400
|
+
}
|
|
401
|
+
};
|
|
402
|
+
Select.prototype.clearValue = function (e) {
|
|
403
|
+
var onChange = this.props.onChange;
|
|
404
|
+
e.preventDefault();
|
|
405
|
+
e.stopPropagation();
|
|
406
|
+
onChange(this.props.resetValue);
|
|
407
|
+
};
|
|
408
|
+
Select.prototype.clearSearchValue = function () {
|
|
409
|
+
var loadOptions = this.props.loadOptions;
|
|
410
|
+
this.setState({
|
|
411
|
+
inputValue: ''
|
|
412
|
+
}, function () { return loadOptions === null || loadOptions === void 0 ? void 0 : loadOptions(''); });
|
|
413
|
+
};
|
|
414
|
+
Select.prototype.handleAddClick = function () {
|
|
415
|
+
var onAdd = this.props.onAdd;
|
|
416
|
+
onAdd && onAdd();
|
|
417
|
+
};
|
|
418
|
+
Select.prototype.handleEditClick = function (e, item) {
|
|
419
|
+
var onEdit = this.props.onEdit;
|
|
420
|
+
e.preventDefault();
|
|
421
|
+
e.stopPropagation();
|
|
422
|
+
onEdit && onEdit(item);
|
|
423
|
+
};
|
|
424
|
+
Select.prototype.handleDeleteClick = function (e, item) {
|
|
425
|
+
var onDelete = this.props.onDelete;
|
|
426
|
+
e.preventDefault();
|
|
427
|
+
e.stopPropagation();
|
|
428
|
+
onDelete && onDelete(item);
|
|
429
|
+
};
|
|
430
|
+
Select.prototype.renderValue = function (_a) {
|
|
431
|
+
var _this = this;
|
|
432
|
+
_a.inputValue; _a.isOpen;
|
|
433
|
+
var _b = this.props, cx = _b.classnames, multiple = _b.multiple, valuesNoWrap = _b.valuesNoWrap, placeholder = _b.placeholder, labelField = _b.labelField, disabled = _b.disabled, maxTagCount = _b.maxTagCount, overflowTagPopover = _b.overflowTagPopover, showInvalidMatch = _b.showInvalidMatch, renderValueLabel = _b.renderValueLabel, popOverContainer = _b.popOverContainer, __ = _b.translate;
|
|
434
|
+
var selection = this.state.selection;
|
|
435
|
+
var labelKey = labelField || 'label';
|
|
436
|
+
if (!selection.length) {
|
|
437
|
+
return (_J$X_("div", { key: "placeholder", className: cx('Select-placeholder') }, __(placeholder)));
|
|
438
|
+
}
|
|
439
|
+
else if (multiple && typeof maxTagCount === 'number' && maxTagCount > 0) {
|
|
440
|
+
var tooltipProps = tslib.__assign({ tooltipClassName: cx('Select-overflow', overflowTagPopover === null || overflowTagPopover === void 0 ? void 0 : overflowTagPopover.tooltipClassName) }, omit__default["default"](overflowTagPopover, ['children', 'content', 'tooltipClassName']));
|
|
441
|
+
return (_J$X_(AutoFoldedList["default"], { tooltipClassName: cx('Select-overflow-wrapper'), items: selection, popOverContainer: popOverContainer, tooltipOptions: tooltipProps, maxVisibleCount: maxTagCount, renderItem: function (item, index, folded) {
|
|
442
|
+
var label = amisCore.labelToString(item[labelKey]);
|
|
443
|
+
var body = (_J$X_("div", { key: index, className: cx('Select-value', {
|
|
444
|
+
'is-disabled': disabled || item.disabled,
|
|
445
|
+
'is-invalid': showInvalidMatch ? item.__unmatched : false
|
|
446
|
+
}) },
|
|
447
|
+
_J$X_("span", { className: cx('Select-valueLabel') }, renderValueLabel ? renderValueLabel(item) : label),
|
|
448
|
+
_J$X_("span", { className: cx('Select-valueIcon', {
|
|
449
|
+
'is-disabled': disabled || item.disabled
|
|
450
|
+
}), onClick: _this.removeItem.bind(_this, index) },
|
|
451
|
+
_J$X_(icons.Icon, { icon: "close", className: "icon" }))));
|
|
452
|
+
return folded ? (body) : (_J$X_(TooltipWrapper["default"], { container: popOverContainer, placement: 'top', tooltip: label, trigger: 'hover', key: index }, body));
|
|
453
|
+
} }));
|
|
454
|
+
}
|
|
455
|
+
else {
|
|
456
|
+
return selection.map(function (item, index) {
|
|
457
|
+
var label = amisCore.labelToString(item[labelKey]);
|
|
458
|
+
if (!multiple) {
|
|
459
|
+
return (_J$X_("div", { className: cx('Select-value', {
|
|
460
|
+
'is-disabled': disabled,
|
|
461
|
+
'is-invalid': showInvalidMatch ? item.__unmatched : false
|
|
462
|
+
}), key: index }, renderValueLabel ? renderValueLabel(item) : label));
|
|
463
|
+
}
|
|
464
|
+
return valuesNoWrap ? ("".concat(label).concat(index === selection.length - 1 ? '' : ' + ')) : (_J$X_(TooltipWrapper["default"], { container: popOverContainer, placement: 'top', tooltip: label, trigger: 'hover', key: index },
|
|
465
|
+
_J$X_("div", { className: cx('Select-value', {
|
|
466
|
+
'is-disabled': disabled || item.disabled,
|
|
467
|
+
'is-invalid': showInvalidMatch ? item.__unmatched : false
|
|
468
|
+
}) },
|
|
469
|
+
_J$X_("span", { className: cx('Select-valueLabel') }, renderValueLabel ? renderValueLabel(item) : label),
|
|
470
|
+
_J$X_("span", { className: cx('Select-valueIcon', {
|
|
471
|
+
'is-disabled': disabled || item.disabled
|
|
472
|
+
}), onClick: _this.removeItem.bind(_this, index) },
|
|
473
|
+
_J$X_(icons.Icon, { icon: "close", className: "icon" })))));
|
|
474
|
+
});
|
|
475
|
+
}
|
|
476
|
+
};
|
|
477
|
+
Select.prototype.renderOuter = function (_a) {
|
|
478
|
+
var _this = this;
|
|
479
|
+
var _b;
|
|
480
|
+
var selectedItem = _a.selectedItem, getItemProps = _a.getItemProps, highlightedIndex = _a.highlightedIndex, inputValue = _a.inputValue, isOpen = _a.isOpen; _a.getToggleButtonProps; var getInputProps = _a.getInputProps;
|
|
481
|
+
var _c = this.props, popOverContainer = _c.popOverContainer, options = _c.options, valueField = _c.valueField, labelField = _c.labelField, noResultsText = _c.noResultsText, loadOptions = _c.loadOptions, creatable = _c.creatable, multiple = _c.multiple, valuesNoWrap = _c.valuesNoWrap, cx = _c.classnames, popoverClassName = _c.popoverClassName, popOverContainerSelector = _c.popOverContainerSelector, checkAll = _c.checkAll, checkAllLabel = _c.checkAllLabel, checkAllBySearch = _c.checkAllBySearch, searchable = _c.searchable, createBtnLabel = _c.createBtnLabel, disabled = _c.disabled, searchPromptText = _c.searchPromptText, editable = _c.editable, removable = _c.removable, overlayPlacement = _c.overlayPlacement, __ = _c.translate, hideSelected = _c.hideSelected, renderMenu = _c.renderMenu; _c.mobileClassName; var _d = _c.virtualThreshold, virtualThreshold = _d === void 0 ? 100 : _d, mobileUI = _c.mobileUI, _e = _c.filterOption, filterOption = _e === void 0 ? defaultFilterOption : _e, overlay = _c.overlay, loading = _c.loading, testIdBuilder = _c.testIdBuilder;
|
|
482
|
+
var selection = this.state.selection;
|
|
483
|
+
var checkedAll = false;
|
|
484
|
+
var checkedPartial = false;
|
|
485
|
+
var filtedOptions = (inputValue && isOpen && !loadOptions
|
|
486
|
+
? filterOption(options, inputValue, {
|
|
487
|
+
keys: [labelField || 'label', valueField || 'value']
|
|
488
|
+
})
|
|
489
|
+
: options.concat()).filter(function (option) { return !option.hidden && option.visible !== false; });
|
|
490
|
+
var enableVirtualRender = filtedOptions.length && filtedOptions.length > virtualThreshold;
|
|
491
|
+
var selectionValues = selection.map(function (select) { return select[valueField]; });
|
|
492
|
+
if (multiple && checkAll) {
|
|
493
|
+
var optionsValues = (checkAllBySearch !== false ? filtedOptions : options).map(function (option) { return option[valueField]; });
|
|
494
|
+
checkedAll = optionsValues.every(function (option) { return selectionValues.indexOf(option) > -1; });
|
|
495
|
+
checkedPartial = optionsValues.some(function (option) { return selectionValues.indexOf(option) > -1; });
|
|
496
|
+
}
|
|
497
|
+
// 用于虚拟渲染的每项高度
|
|
498
|
+
var virtualItemHeight = this.props.itemHeight || this.state.itemHeight;
|
|
499
|
+
// 渲染单个选项
|
|
500
|
+
var renderItem = function (_a) {
|
|
501
|
+
var index = _a.index, style = _a.style;
|
|
502
|
+
var item = filtedOptions[index];
|
|
503
|
+
if (!item) {
|
|
504
|
+
return null;
|
|
505
|
+
}
|
|
506
|
+
var checked = selectedItem === item || !!~selectionValues.indexOf(item[valueField]);
|
|
507
|
+
if (hideSelected && checked) {
|
|
508
|
+
return null;
|
|
509
|
+
}
|
|
510
|
+
var label = amisCore.labelToString(item[labelField]);
|
|
511
|
+
var optTestIdBudr = testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild("option-".concat(label || index));
|
|
512
|
+
return (_J$X_("div", tslib.__assign({}, getItemProps({
|
|
513
|
+
key: typeof item.value === 'string'
|
|
514
|
+
? "".concat(item.label, "-").concat(item.value)
|
|
515
|
+
: index,
|
|
516
|
+
index: index,
|
|
517
|
+
item: item,
|
|
518
|
+
disabled: item.disabled
|
|
519
|
+
}), { style: merge__default["default"](style, enableVirtualRender ? { width: '100%' } : {}), className: cx("Select-option", {
|
|
520
|
+
'is-disabled': item.disabled,
|
|
521
|
+
'is-highlight': highlightedIndex === index,
|
|
522
|
+
'is-active': checked
|
|
523
|
+
}) }, optTestIdBudr === null || optTestIdBudr === void 0 ? void 0 : optTestIdBudr.getTestId()),
|
|
524
|
+
renderMenu ? (multiple ? (_J$X_(Checkbox["default"], { checked: checked, trueValue: item.value, onChange: function () {
|
|
525
|
+
_this.handleChange(item);
|
|
526
|
+
}, disabled: item.disabled, testIdBuilder: optTestIdBudr === null || optTestIdBudr === void 0 ? void 0 : optTestIdBudr.getChild('chekbx'), size: "sm" }, renderMenu(item, {
|
|
527
|
+
multiple: multiple,
|
|
528
|
+
checkAll: checkAll,
|
|
529
|
+
checked: checked,
|
|
530
|
+
onChange: function () { return _this.handleChange(item); },
|
|
531
|
+
inputValue: inputValue || '',
|
|
532
|
+
searchable: searchable,
|
|
533
|
+
index: index
|
|
534
|
+
}))) : (renderMenu(item, {
|
|
535
|
+
multiple: multiple,
|
|
536
|
+
checkAll: checkAll,
|
|
537
|
+
checked: checked,
|
|
538
|
+
onChange: function () { return _this.handleChange(item); },
|
|
539
|
+
inputValue: inputValue || '',
|
|
540
|
+
searchable: searchable,
|
|
541
|
+
index: index
|
|
542
|
+
}))) : multiple ? (_J$X_("div", { title: label, className: cx('Select-option-checkbox') },
|
|
543
|
+
_J$X_(Checkbox["default"], { checked: checked, trueValue: item.value, onChange: function () {
|
|
544
|
+
_this.handleChange(item);
|
|
545
|
+
}, disabled: item.disabled, size: "sm" },
|
|
546
|
+
item.disabled
|
|
547
|
+
? label
|
|
548
|
+
: amisCore.highlight(label, inputValue, cx('Select-option-hl')),
|
|
549
|
+
item.tip ? _J$X_("span", null, item.tip) : null))) : (_J$X_("span", tslib.__assign({ className: cx('Select-option-content'), title: item.disabledTip && item.disabled
|
|
550
|
+
? ''
|
|
551
|
+
: typeof label === 'string'
|
|
552
|
+
? label
|
|
553
|
+
: '' }, optTestIdBudr === null || optTestIdBudr === void 0 ? void 0 : optTestIdBudr.getChild('content').getTestId()),
|
|
554
|
+
item.disabled
|
|
555
|
+
? label
|
|
556
|
+
: amisCore.highlight(label, inputValue, cx('Select-option-hl')),
|
|
557
|
+
item.disabledTip && item.disabled ? (_J$X_(TooltipWrapper["default"], { placement: "right", tooltip: item.disabledTip, trigger: "hover" },
|
|
558
|
+
_J$X_("a", { className: cx('Select-option-disabledTip') },
|
|
559
|
+
_J$X_(icons.Icon, { className: "icon", icon: "question2" })))) : item.tip ? (_J$X_("span", null, item.tip)) : null)),
|
|
560
|
+
editable ? (_J$X_("a", { "data-tooltip": __('Select.edit'), "data-position": "left" },
|
|
561
|
+
_J$X_(icons.Icon, { icon: "pencil", className: "icon", onClick: function (e) { return _this.handleEditClick(e, item); } }))) : null,
|
|
562
|
+
removable ? (_J$X_("a", { "data-tooltip": __('Select.clear'), "data-position": "left" },
|
|
563
|
+
_J$X_(icons.Icon, { icon: "close", className: "icon", onClick: function (e) { return _this.handleDeleteClick(e, item); } }))) : null));
|
|
564
|
+
};
|
|
565
|
+
var menu = (_J$X_("div", { ref: this.menu, className: cx('Select-menu', {
|
|
566
|
+
'Select--longlist': enableVirtualRender,
|
|
567
|
+
'is-mobile': mobileUI
|
|
568
|
+
}) },
|
|
569
|
+
searchable ? (_J$X_("div", { className: cx("Select-input", {
|
|
570
|
+
'is-focused': this.state.isFocused
|
|
571
|
+
}) },
|
|
572
|
+
_J$X_(icons.Icon, { icon: "search", className: "icon" }),
|
|
573
|
+
_J$X_(Input["default"], tslib.__assign({}, getInputProps({
|
|
574
|
+
onFocus: this.onFocus,
|
|
575
|
+
onBlur: this.onBlur,
|
|
576
|
+
disabled: disabled,
|
|
577
|
+
placeholder: __(searchPromptText),
|
|
578
|
+
onChange: this.handleInputChange,
|
|
579
|
+
ref: this.inputRef
|
|
580
|
+
}))),
|
|
581
|
+
(inputValue === null || inputValue === void 0 ? void 0 : inputValue.length) ? (_J$X_("a", { onClick: this.clearSearchValue, className: cx('Select-clear') },
|
|
582
|
+
_J$X_(icons.Icon, { icon: "close", className: "icon" }))) : null)) : null,
|
|
583
|
+
loading ? (_J$X_("div", { className: cx('Select-noResult') }, __('loading'))) : (_J$X_(React__default["default"].Fragment, null,
|
|
584
|
+
multiple && valuesNoWrap ? (_J$X_("div", { className: cx('Select-option') },
|
|
585
|
+
__('Select.selected'),
|
|
586
|
+
"(",
|
|
587
|
+
selectionValues.length,
|
|
588
|
+
")")) : null,
|
|
589
|
+
multiple && checkAll && filtedOptions.length ? (_J$X_("div", { className: cx('Select-option') },
|
|
590
|
+
_J$X_(Checkbox["default"], { checked: checkedPartial, partial: checkedPartial && !checkedAll, onChange: this.toggleCheckAll, size: "sm" }, __(checkAllLabel)))) : null,
|
|
591
|
+
creatable && !disabled ? (_J$X_("a", { className: cx('Select-addBtn'), onClick: this.handleAddClick },
|
|
592
|
+
_J$X_(icons.Icon, { icon: "plus", className: "icon" }),
|
|
593
|
+
__(createBtnLabel))) : null,
|
|
594
|
+
filtedOptions.length ? (filtedOptions.length > virtualThreshold ? ( // 较多数据时才启用 virtuallist,避免滚动条问题
|
|
595
|
+
_J$X_(index["default"], { height: filtedOptions.length > 8
|
|
596
|
+
? 266
|
|
597
|
+
: filtedOptions.length * virtualItemHeight, itemCount: filtedOptions.length, itemSize: virtualItemHeight, renderItem: renderItem })) : (filtedOptions.map(function (item, index) {
|
|
598
|
+
return renderItem({ index: index });
|
|
599
|
+
}))) : (_J$X_("div", { className: cx('Select-noResult') }, __(noResultsText)))))));
|
|
600
|
+
return mobileUI ? (_J$X_(SelectMobile["default"], tslib.__assign({}, this.props, { highlightedIndex: highlightedIndex, isOpen: isOpen, getItemProps: getItemProps, getInputProps: getInputProps, selectedItem: selectedItem, onChange: function (selection) {
|
|
601
|
+
_this.setState({
|
|
602
|
+
isOpen: false
|
|
603
|
+
});
|
|
604
|
+
_this.props.onChange(selection);
|
|
605
|
+
}, onClose: this.close }))) : (_J$X_(amisCore.Overlay, { container: popOverContainer || this.getTarget, containerSelector: popOverContainerSelector, target: this.getTarget, placement: overlayPlacement === 'auto'
|
|
606
|
+
? PopOverContainer.PopOverContainer.alignToPlacement(overlay)
|
|
607
|
+
: overlayPlacement, show: true },
|
|
608
|
+
_J$X_(amisCore.PopOver, { overlay: true, className: cx('Select-popover', popoverClassName), style: {
|
|
609
|
+
width: (overlay &&
|
|
610
|
+
PopOverContainer.PopOverContainer.calcOverlayWidth(overlay, (_b = this.target) === null || _b === void 0 ? void 0 : _b.offsetWidth)) ||
|
|
611
|
+
(this.target ? this.target.offsetWidth : 'auto')
|
|
612
|
+
}, onHide: this.close }, menu)));
|
|
613
|
+
};
|
|
614
|
+
Select.prototype.render = function () {
|
|
615
|
+
var _this = this;
|
|
616
|
+
var _a = this.props, cx = _a.classnames, multiple = _a.multiple, valuesNoWrap = _a.valuesNoWrap, searchable = _a.searchable, inline = _a.inline, block = _a.block, className = _a.className, value = _a.value, loading = _a.loading, clearable = _a.clearable, labelField = _a.labelField, disabled = _a.disabled; _a.checkAll; var borderMode = _a.borderMode, mobileUI = _a.mobileUI, hasError = _a.hasError, testIdBuilder = _a.testIdBuilder, loadingConfig = _a.loadingConfig, controlStyle = _a.controlStyle;
|
|
617
|
+
var selection = this.state.selection;
|
|
618
|
+
var inputValue = this.state.inputValue;
|
|
619
|
+
var resetValue = this.props.resetValue;
|
|
620
|
+
return (_J$X_(Downshift__default["default"], { selectedItem: selection, highlightedIndex: this.state.highlightedIndex, isOpen: this.state.isOpen, inputValue: inputValue, onChange:
|
|
621
|
+
/*展示 Checkbox 的时候,会出发多次 onChange 原因待查*/
|
|
622
|
+
multiple ? amisCore.noop : this.handleChange, onStateChange: this.handleStateChange, itemToString: function (item) {
|
|
623
|
+
return item ? "".concat(amisCore.labelToString(item[labelField])) : '';
|
|
624
|
+
} }, function (options) {
|
|
625
|
+
var _a;
|
|
626
|
+
var isOpen = options.isOpen;
|
|
627
|
+
return (_J$X_("div", tslib.__assign({ tabIndex: disabled ? -1 : 0, onKeyPress: _this.handleKeyPress, onClick: _this.toggle, onFocus: _this.onFocus, onBlur: _this.onBlur }, testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getTestId(), { className: cx("Select", (_a = {},
|
|
628
|
+
_a["Select--multi"] = multiple,
|
|
629
|
+
_a["Select--inline"] = inline,
|
|
630
|
+
_a["Select--block"] = block,
|
|
631
|
+
_a["Select--searchable"] = searchable,
|
|
632
|
+
_a['is-opened'] = isOpen,
|
|
633
|
+
_a['is-focused'] = _this.state.isFocused,
|
|
634
|
+
_a['is-disabled'] = disabled || loading,
|
|
635
|
+
_a['is-mobile'] = mobileUI,
|
|
636
|
+
_a['is-error'] = hasError,
|
|
637
|
+
_a["Select--border".concat(amisCore.ucFirst(borderMode))] = borderMode,
|
|
638
|
+
_a), className), "data-amis-name": _this.props.dataName, style: controlStyle }),
|
|
639
|
+
_J$X_("div", { className: cx("Select-valueWrap", {
|
|
640
|
+
'Select-valuesNoWrap': valuesNoWrap
|
|
641
|
+
}) }, _this.renderValue(options)),
|
|
642
|
+
clearable &&
|
|
643
|
+
!disabled &&
|
|
644
|
+
(Array.isArray(value)
|
|
645
|
+
? value.length
|
|
646
|
+
: value != null && value !== resetValue) ? (_J$X_("a", tslib.__assign({ onClick: _this.clearValue, className: cx('Select-clear') }, testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('clear').getTestId()),
|
|
647
|
+
_J$X_(icons.Icon, { icon: "input-clear", className: "icon" }))) : null,
|
|
648
|
+
loading ? (_J$X_(Spinner["default"], { show: true, icon: "reload", size: "sm", spinnerClassName: cx('Select-spinner'), loadingConfig: loadingConfig })) : null,
|
|
649
|
+
_J$X_("span", tslib.__assign({ className: cx('Select-arrow') }, testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('arrow').getTestId()),
|
|
650
|
+
_J$X_(icons.Icon, { icon: "right-arrow-bold", className: "icon" })),
|
|
651
|
+
isOpen ? _this.renderOuter(options) : null));
|
|
652
|
+
}));
|
|
653
|
+
};
|
|
654
|
+
Select.defaultProps = {
|
|
655
|
+
multiple: false,
|
|
656
|
+
clearable: true,
|
|
657
|
+
creatable: false,
|
|
658
|
+
showInvalidMatch: false,
|
|
659
|
+
createBtnLabel: 'Select.createLabel',
|
|
660
|
+
searchPromptText: 'Select.searchPromptText',
|
|
661
|
+
loadingPlaceholder: 'loading',
|
|
662
|
+
noResultsText: 'noResult',
|
|
663
|
+
clearAllText: 'Select.clearAll',
|
|
664
|
+
clearValueText: 'Select.clear',
|
|
665
|
+
placeholder: 'Select.placeholder',
|
|
666
|
+
valueField: 'value',
|
|
667
|
+
labelField: 'label',
|
|
668
|
+
resetValue: '',
|
|
669
|
+
inline: false,
|
|
670
|
+
disabled: false,
|
|
671
|
+
checkAll: false,
|
|
672
|
+
checkAllLabel: 'Select.checkAll',
|
|
673
|
+
defaultCheckAll: false,
|
|
674
|
+
overlayPlacement: 'auto',
|
|
675
|
+
virtualThreshold: 100
|
|
676
|
+
};
|
|
677
|
+
tslib.__decorate([
|
|
678
|
+
amisCore.autobind,
|
|
679
|
+
tslib.__metadata("design:type", Function),
|
|
680
|
+
tslib.__metadata("design:paramtypes", []),
|
|
681
|
+
tslib.__metadata("design:returntype", void 0)
|
|
682
|
+
], Select.prototype, "open", null);
|
|
683
|
+
tslib.__decorate([
|
|
684
|
+
amisCore.autobind,
|
|
685
|
+
tslib.__metadata("design:type", Function),
|
|
686
|
+
tslib.__metadata("design:paramtypes", []),
|
|
687
|
+
tslib.__metadata("design:returntype", void 0)
|
|
688
|
+
], Select.prototype, "close", null);
|
|
689
|
+
tslib.__decorate([
|
|
690
|
+
amisCore.autobind,
|
|
691
|
+
tslib.__metadata("design:type", Function),
|
|
692
|
+
tslib.__metadata("design:paramtypes", []),
|
|
693
|
+
tslib.__metadata("design:returntype", void 0)
|
|
694
|
+
], Select.prototype, "confirm", null);
|
|
695
|
+
tslib.__decorate([
|
|
696
|
+
amisCore.autobind,
|
|
697
|
+
tslib.__metadata("design:type", Function),
|
|
698
|
+
tslib.__metadata("design:paramtypes", [Object]),
|
|
699
|
+
tslib.__metadata("design:returntype", void 0)
|
|
700
|
+
], Select.prototype, "toggle", null);
|
|
701
|
+
tslib.__decorate([
|
|
702
|
+
amisCore.autobind,
|
|
703
|
+
tslib.__metadata("design:type", Function),
|
|
704
|
+
tslib.__metadata("design:paramtypes", [Object]),
|
|
705
|
+
tslib.__metadata("design:returntype", void 0)
|
|
706
|
+
], Select.prototype, "onFocus", null);
|
|
707
|
+
tslib.__decorate([
|
|
708
|
+
amisCore.autobind,
|
|
709
|
+
tslib.__metadata("design:type", Function),
|
|
710
|
+
tslib.__metadata("design:paramtypes", [Object]),
|
|
711
|
+
tslib.__metadata("design:returntype", void 0)
|
|
712
|
+
], Select.prototype, "onBlur", null);
|
|
713
|
+
tslib.__decorate([
|
|
714
|
+
amisCore.autobind,
|
|
715
|
+
tslib.__metadata("design:type", Function),
|
|
716
|
+
tslib.__metadata("design:paramtypes", []),
|
|
717
|
+
tslib.__metadata("design:returntype", void 0)
|
|
718
|
+
], Select.prototype, "focus", null);
|
|
719
|
+
tslib.__decorate([
|
|
720
|
+
amisCore.autobind,
|
|
721
|
+
tslib.__metadata("design:type", Function),
|
|
722
|
+
tslib.__metadata("design:paramtypes", []),
|
|
723
|
+
tslib.__metadata("design:returntype", void 0)
|
|
724
|
+
], Select.prototype, "getTarget", null);
|
|
725
|
+
tslib.__decorate([
|
|
726
|
+
amisCore.autobind,
|
|
727
|
+
tslib.__metadata("design:type", Function),
|
|
728
|
+
tslib.__metadata("design:paramtypes", [HTMLInputElement]),
|
|
729
|
+
tslib.__metadata("design:returntype", void 0)
|
|
730
|
+
], Select.prototype, "inputRef", null);
|
|
731
|
+
tslib.__decorate([
|
|
732
|
+
amisCore.autobind,
|
|
733
|
+
tslib.__metadata("design:type", Function),
|
|
734
|
+
tslib.__metadata("design:paramtypes", []),
|
|
735
|
+
tslib.__metadata("design:returntype", void 0)
|
|
736
|
+
], Select.prototype, "toggleCheckAll", null);
|
|
737
|
+
tslib.__decorate([
|
|
738
|
+
amisCore.autobind,
|
|
739
|
+
tslib.__metadata("design:type", Function),
|
|
740
|
+
tslib.__metadata("design:paramtypes", [Object]),
|
|
741
|
+
tslib.__metadata("design:returntype", void 0)
|
|
742
|
+
], Select.prototype, "handleInputChange", null);
|
|
743
|
+
tslib.__decorate([
|
|
744
|
+
amisCore.autobind,
|
|
745
|
+
tslib.__metadata("design:type", Function),
|
|
746
|
+
tslib.__metadata("design:paramtypes", [Object, Number, Boolean]),
|
|
747
|
+
tslib.__metadata("design:returntype", void 0)
|
|
748
|
+
], Select.prototype, "handlePickerChange", null);
|
|
749
|
+
tslib.__decorate([
|
|
750
|
+
amisCore.autobind,
|
|
751
|
+
tslib.__metadata("design:type", Function),
|
|
752
|
+
tslib.__metadata("design:paramtypes", [Object]),
|
|
753
|
+
tslib.__metadata("design:returntype", void 0)
|
|
754
|
+
], Select.prototype, "handleChange", null);
|
|
755
|
+
tslib.__decorate([
|
|
756
|
+
amisCore.autobind,
|
|
757
|
+
tslib.__metadata("design:type", Function),
|
|
758
|
+
tslib.__metadata("design:paramtypes", [Object]),
|
|
759
|
+
tslib.__metadata("design:returntype", void 0)
|
|
760
|
+
], Select.prototype, "handleStateChange", null);
|
|
761
|
+
tslib.__decorate([
|
|
762
|
+
amisCore.autobind,
|
|
763
|
+
tslib.__metadata("design:type", Function),
|
|
764
|
+
tslib.__metadata("design:paramtypes", [Object]),
|
|
765
|
+
tslib.__metadata("design:returntype", void 0)
|
|
766
|
+
], Select.prototype, "handleKeyPress", null);
|
|
767
|
+
tslib.__decorate([
|
|
768
|
+
amisCore.autobind,
|
|
769
|
+
tslib.__metadata("design:type", Function),
|
|
770
|
+
tslib.__metadata("design:paramtypes", [Object]),
|
|
771
|
+
tslib.__metadata("design:returntype", void 0)
|
|
772
|
+
], Select.prototype, "clearValue", null);
|
|
773
|
+
tslib.__decorate([
|
|
774
|
+
amisCore.autobind,
|
|
775
|
+
tslib.__metadata("design:type", Function),
|
|
776
|
+
tslib.__metadata("design:paramtypes", []),
|
|
777
|
+
tslib.__metadata("design:returntype", void 0)
|
|
778
|
+
], Select.prototype, "clearSearchValue", null);
|
|
779
|
+
tslib.__decorate([
|
|
780
|
+
amisCore.autobind,
|
|
781
|
+
tslib.__metadata("design:type", Function),
|
|
782
|
+
tslib.__metadata("design:paramtypes", []),
|
|
783
|
+
tslib.__metadata("design:returntype", void 0)
|
|
784
|
+
], Select.prototype, "handleAddClick", null);
|
|
785
|
+
tslib.__decorate([
|
|
786
|
+
amisCore.autobind,
|
|
787
|
+
tslib.__metadata("design:type", Function),
|
|
788
|
+
tslib.__metadata("design:paramtypes", [Event, Object]),
|
|
789
|
+
tslib.__metadata("design:returntype", void 0)
|
|
790
|
+
], Select.prototype, "handleEditClick", null);
|
|
791
|
+
tslib.__decorate([
|
|
792
|
+
amisCore.autobind,
|
|
793
|
+
tslib.__metadata("design:type", Function),
|
|
794
|
+
tslib.__metadata("design:paramtypes", [Event, Object]),
|
|
795
|
+
tslib.__metadata("design:returntype", void 0)
|
|
796
|
+
], Select.prototype, "handleDeleteClick", null);
|
|
797
|
+
return Select;
|
|
798
|
+
}(React__default["default"].Component));
|
|
799
|
+
var methods = ['focus', 'blur'];
|
|
800
|
+
var EnhancedSelect = amisCore.uncontrollable(amisCore.themeable(amisCore.localeable(Select, methods), methods), {
|
|
801
|
+
value: 'onChange'
|
|
802
|
+
}, methods);
|
|
803
|
+
var SelectWithRemoteOptions = WithRemoteConfig.withRemoteConfig({
|
|
804
|
+
adaptor: function (data) { return data.options || data.items || data.rows || data; },
|
|
805
|
+
normalizeConfig: function (options, origin) {
|
|
806
|
+
options = normalizeOptions(options);
|
|
807
|
+
if (Array.isArray(options)) {
|
|
808
|
+
return options.concat();
|
|
809
|
+
}
|
|
810
|
+
return origin;
|
|
811
|
+
}
|
|
812
|
+
})(/** @class */ (function (_super) {
|
|
813
|
+
tslib.__extends(class_1, _super);
|
|
814
|
+
function class_1() {
|
|
815
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
816
|
+
}
|
|
817
|
+
class_1.prototype.render = function () {
|
|
818
|
+
var _a = this.props, loading = _a.loading, config = _a.config; _a.deferLoad; _a.updateConfig; var rest = tslib.__rest(_a, ["loading", "config", "deferLoad", "updateConfig"]);
|
|
819
|
+
return (_J$X_(EnhancedSelect, tslib.__assign({}, rest, { options: config || rest.options || [], loading: loading })));
|
|
820
|
+
};
|
|
821
|
+
return class_1;
|
|
822
|
+
}(React__default["default"].Component)));
|
|
823
|
+
|
|
824
|
+
exports.Select = Select;
|
|
825
|
+
exports.SelectWithRemoteOptions = SelectWithRemoteOptions;
|
|
826
|
+
exports["default"] = EnhancedSelect;
|
|
827
|
+
exports.defaultFilterOption = defaultFilterOption;
|
|
828
|
+
exports.expandValue = expandValue;
|
|
829
|
+
exports.matchOptionValue = matchOptionValue;
|
|
830
|
+
exports.normalizeOptions = normalizeOptions;
|
|
831
|
+
exports.optionValueCompare = optionValueCompare;
|
|
832
|
+
exports.value2array = value2array;
|