amis-ui 1.0.0-beta.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/dist/components/404.d.ts +54 -0
- package/dist/components/404.js +44 -0
- package/dist/components/Alert.d.ts +560 -0
- package/dist/components/Alert.js +201 -0
- package/dist/components/Alert2.d.ts +66 -0
- package/dist/components/Alert2.js +69 -0
- package/dist/components/AnchorNav.d.ts +118 -0
- package/dist/components/AnchorNav.js +181 -0
- package/dist/components/ArrayInput.d.ts +625 -0
- package/dist/components/ArrayInput.js +162 -0
- package/dist/components/AsideNav.d.ts +142 -0
- package/dist/components/AsideNav.js +139 -0
- package/dist/components/AssociatedSelection.d.ts +491 -0
- package/dist/components/AssociatedSelection.js +113 -0
- package/dist/components/Avatar.d.ts +113 -0
- package/dist/components/Avatar.js +150 -0
- package/dist/components/Badge.d.ts +120 -0
- package/dist/components/BaiduMapPicker.d.ts +86 -0
- package/dist/components/BarCode.d.ts +58 -0
- package/dist/components/Breadcrumb.d.ts +115 -0
- package/dist/components/Breadcrumb.js +173 -0
- package/dist/components/Button.d.ts +74 -0
- package/dist/components/Button.js +73 -0
- package/dist/components/CalendarMobile.d.ts +353 -0
- package/dist/components/CalendarMobile.js +541 -0
- package/dist/components/Card.d.ts +75 -0
- package/dist/components/Cascader.d.ts +109 -0
- package/dist/components/ChainedSelection.d.ts +480 -0
- package/dist/components/ChainedSelection.js +131 -0
- package/dist/components/Checkbox.d.ts +69 -0
- package/dist/components/Checkbox.js +73 -0
- package/dist/components/CityArea.d.ts +307 -0
- package/dist/components/CityDB.d.ts +13 -0
- package/dist/components/CodeMirror.d.ts +25 -0
- package/dist/components/CodeMirror.js +113 -0
- package/dist/components/Collapse.d.ts +92 -0
- package/dist/components/Collapse.js +166 -0
- package/dist/components/CollapseGroup.d.ts +68 -0
- package/dist/components/CollapseGroup.js +96 -0
- package/dist/components/ColorPicker.d.ts +524 -0
- package/dist/components/ContextMenu.d.ts +96 -0
- package/dist/components/ContextMenu.js +225 -0
- package/dist/components/DatePicker.d.ts +619 -0
- package/dist/components/DatePicker.js +534 -0
- package/dist/components/DateRangePicker.d.ts +876 -0
- package/dist/components/DateRangePicker.js +1050 -0
- package/dist/components/Drawer.d.ts +95 -0
- package/dist/components/Drawer.js +262 -0
- package/dist/components/Editor.d.ts +605 -0
- package/dist/components/Editor.js +245 -0
- package/dist/components/Form.d.ts +22 -0
- package/dist/components/FormField.d.ts +65 -0
- package/dist/components/GridNav.d.ts +52 -0
- package/dist/components/GroupedSelection.d.ts +467 -0
- package/dist/components/GroupedSelection.js +71 -0
- package/dist/components/Html.d.ts +83 -0
- package/dist/components/Html.js +61 -0
- package/dist/components/ImageGallery.d.ts +297 -0
- package/dist/components/Input.d.ts +16 -0
- package/dist/components/Input.js +70 -0
- package/dist/components/InputBox.d.ts +99 -0
- package/dist/components/InputBox.js +106 -0
- package/dist/components/InputBoxWithSuggestion.d.ts +280 -0
- package/dist/components/InputBoxWithSuggestion.js +75 -0
- package/dist/components/Layout.d.ts +144 -0
- package/dist/components/Layout.js +75 -0
- package/dist/components/Link.d.ts +62 -0
- package/dist/components/ListGroup.d.ts +76 -0
- package/dist/components/ListGroup.js +40 -0
- package/dist/components/ListMenu.d.ts +573 -0
- package/dist/components/LocationPicker.d.ts +427 -0
- package/dist/components/Markdown.d.ts +20 -0
- package/dist/components/Modal.d.ts +1278 -0
- package/dist/components/Modal.js +159 -0
- package/dist/components/ModalManager.d.ts +17 -0
- package/dist/components/ModalManager.js +53 -0
- package/dist/components/MonthRangePicker.d.ts +748 -0
- package/dist/components/NumberInput.d.ts +89 -0
- package/dist/components/NumberInput.js +147 -0
- package/dist/components/Overlay.d.ts +41 -0
- package/dist/components/Overlay.js +218 -0
- package/dist/components/Pagination.d.ts +685 -0
- package/dist/components/Picker.d.ts +284 -0
- package/dist/components/Picker.js +82 -0
- package/dist/components/PickerColumn.d.ts +63 -0
- package/dist/components/PickerColumn.js +285 -0
- package/dist/components/PickerContainer.d.ts +303 -0
- package/dist/components/PickerContainer.js +158 -0
- package/dist/components/PopOver.d.ts +90 -0
- package/dist/components/PopOver.js +98 -0
- package/dist/components/PopOverContainer.d.ts +28 -0
- package/dist/components/PopOverContainer.js +101 -0
- package/dist/components/PopUp.d.ts +578 -0
- package/dist/components/PopUp.js +96 -0
- package/dist/components/Progress.d.ts +68 -0
- package/dist/components/PullRefresh.d.ts +64 -0
- package/dist/components/PullRefresh.js +149 -0
- package/dist/components/Radios.d.ts +180 -0
- package/dist/components/Radios.js +121 -0
- package/dist/components/Range.d.ts +122 -0
- package/dist/components/Range.js +418 -0
- package/dist/components/Rating.d.ts +252 -0
- package/dist/components/Rating.js +324 -0
- package/dist/components/ResultBox.d.ts +290 -0
- package/dist/components/ResultBox.js +156 -0
- package/dist/components/ResultList.d.ts +319 -0
- package/dist/components/ResultList.js +192 -0
- package/dist/components/ResultTableList.d.ts +708 -0
- package/dist/components/ResultTableList.js +135 -0
- package/dist/components/ResultTreeList.d.ts +308 -0
- package/dist/components/ResultTreeList.js +217 -0
- package/dist/components/RichText.d.ts +45 -0
- package/dist/components/SearchBox.d.ts +504 -0
- package/dist/components/SearchBox.js +137 -0
- package/dist/components/Select.d.ts +6280 -0
- package/dist/components/Select.js +772 -0
- package/dist/components/Selection.d.ts +510 -0
- package/dist/components/Selection.js +151 -0
- package/dist/components/SparkLine.d.ts +403 -0
- package/dist/components/SparkLine.js +71 -0
- package/dist/components/Spinner.d.ts +174 -0
- package/dist/components/Spinner.js +77 -0
- package/dist/components/Steps.d.ts +110 -0
- package/dist/components/Switch.d.ts +101 -0
- package/dist/components/Switch.js +73 -0
- package/dist/components/TableSelection.d.ts +695 -0
- package/dist/components/TableSelection.js +88 -0
- package/dist/components/Tabs.d.ts +210 -0
- package/dist/components/Tabs.js +486 -0
- package/dist/components/TabsTransfer.d.ts +297 -0
- package/dist/components/TabsTransfer.js +220 -0
- package/dist/components/TabsTransferPicker.d.ts +273 -0
- package/dist/components/Tag.d.ts +104 -0
- package/dist/components/Textarea.d.ts +568 -0
- package/dist/components/Textarea.js +144 -0
- package/dist/components/Timeline.d.ts +47 -0
- package/dist/components/TimelineItem.d.ts +297 -0
- package/dist/components/Tinymce.d.ts +55 -0
- package/dist/components/TitleBar.d.ts +115 -0
- package/dist/components/TitleBar.js +57 -0
- package/dist/components/Toast.d.ts +358 -0
- package/dist/components/Toast.js +260 -0
- package/dist/components/Tooltip.d.ts +65 -0
- package/dist/components/Tooltip.js +45 -0
- package/dist/components/TooltipWrapper.d.ts +155 -0
- package/dist/components/TooltipWrapper.js +192 -0
- package/dist/components/Transfer.d.ts +1243 -0
- package/dist/components/Transfer.js +332 -0
- package/dist/components/TransferDropDown.d.ts +271 -0
- package/dist/components/TransferPicker.d.ts +277 -0
- package/dist/components/TransferSearch.d.ts +292 -0
- package/dist/components/TransferSearch.js +104 -0
- package/dist/components/Tree.d.ts +1708 -0
- package/dist/components/Tree.js +773 -0
- package/dist/components/TreeSelection.d.ts +526 -0
- package/dist/components/TreeSelection.js +209 -0
- package/dist/components/UserSelect.d.ts +500 -0
- package/dist/components/UserTabSelect.d.ts +320 -0
- package/dist/components/WithRemoteConfig.d.ts +386 -0
- package/dist/components/WithRemoteConfig.js +268 -0
- package/dist/components/WithStore.d.ts +75 -0
- package/dist/components/WithStore.js +57 -0
- package/dist/components/calendar/Calendar.d.ts +64 -0
- package/dist/components/calendar/Calendar.js +499 -0
- package/dist/components/calendar/CalendarContainer.d.ts +10 -0
- package/dist/components/calendar/CalendarContainer.js +35 -0
- package/dist/components/calendar/DaysView.d.ts +170 -0
- package/dist/components/calendar/DaysView.js +453 -0
- package/dist/components/calendar/MonthsView.d.ts +128 -0
- package/dist/components/calendar/MonthsView.js +168 -0
- package/dist/components/calendar/QuartersView.d.ts +92 -0
- package/dist/components/calendar/QuartersView.js +93 -0
- package/dist/components/calendar/TimeView.d.ts +178 -0
- package/dist/components/calendar/TimeView.js +474 -0
- package/dist/components/calendar/YearsView.d.ts +102 -0
- package/dist/components/calendar/YearsView.js +131 -0
- package/dist/components/condition-builder/Expression.d.ts +298 -0
- package/dist/components/condition-builder/Field.d.ts +280 -0
- package/dist/components/condition-builder/Formula.d.ts +269 -0
- package/dist/components/condition-builder/Func.d.ts +279 -0
- package/dist/components/condition-builder/Group.d.ts +296 -0
- package/dist/components/condition-builder/GroupOrItem.d.ts +72 -0
- package/dist/components/condition-builder/InputSwitch.d.ts +47 -0
- package/dist/components/condition-builder/Item.d.ts +292 -0
- package/dist/components/condition-builder/Value.d.ts +277 -0
- package/dist/components/condition-builder/config.d.ts +35 -0
- package/dist/components/condition-builder/index.d.ts +303 -0
- package/dist/components/condition-builder/types.d.ts +150 -0
- package/dist/components/formula/Editor.d.ts +362 -0
- package/dist/components/formula/Editor.js +217 -0
- package/dist/components/formula/FuncList.d.ts +48 -0
- package/dist/components/formula/FuncList.js +57 -0
- package/dist/components/formula/Picker.d.ts +440 -0
- package/dist/components/formula/Picker.js +231 -0
- package/dist/components/formula/VariableList.d.ts +54 -0
- package/dist/components/formula/VariableList.js +49 -0
- package/dist/components/formula/plugin.d.ts +27 -0
- package/dist/components/formula/plugin.js +211 -0
- package/dist/components/icons.d.ts +45 -0
- package/dist/components/icons.js +270 -0
- package/dist/components/index.d.ts +64 -0
- package/dist/components/json-schema/Array.d.ts +3 -0
- package/dist/components/json-schema/Array.js +136 -0
- package/dist/components/json-schema/Item.d.ts +3 -0
- package/dist/components/json-schema/Item.js +45 -0
- package/dist/components/json-schema/Object.d.ts +3 -0
- package/dist/components/json-schema/Object.js +189 -0
- package/dist/components/json-schema/index.d.ts +277 -0
- package/dist/components/json-schema/index.js +28 -0
- package/dist/components/schema-editor/Array.d.ts +11 -0
- package/dist/components/schema-editor/Common.d.ts +29 -0
- package/dist/components/schema-editor/Item.d.ts +8 -0
- package/dist/components/schema-editor/Object.d.ts +44 -0
- package/dist/components/schema-editor/SchemaVariableList.d.ts +193 -0
- package/dist/components/schema-editor/SchemaVariableList.js +83 -0
- package/dist/components/schema-editor/SchemaVariableListPicker.d.ts +186 -0
- package/dist/components/schema-editor/SchemaVariableListPicker.js +43 -0
- package/dist/components/schema-editor/index.d.ts +303 -0
- package/dist/components/table/Cell.d.ts +489 -0
- package/dist/components/table/Cell.js +47 -0
- package/dist/components/table/HeadCellDropDown.d.ts +293 -0
- package/dist/components/table/HeadCellDropDown.js +64 -0
- package/dist/components/table/HeadCellFilter.d.ts +419 -0
- package/dist/components/table/HeadCellFilter.js +146 -0
- package/dist/components/table/HeadCellSelect.d.ts +364 -0
- package/dist/components/table/HeadCellSelect.js +57 -0
- package/dist/components/table/HeadCellSort.d.ts +278 -0
- package/dist/components/table/HeadCellSort.js +83 -0
- package/dist/components/table/ItemActionsWrapper.d.ts +10 -0
- package/dist/components/table/ItemActionsWrapper.js +37 -0
- package/dist/components/table/index.d.ts +794 -0
- package/dist/components/table/index.js +1250 -0
- package/dist/components/virtual-list/SizeAndPositionManager.d.ts +70 -0
- package/dist/components/virtual-list/SizeAndPositionManager.js +220 -0
- package/dist/components/virtual-list/constants.d.ts +34 -0
- package/dist/components/virtual-list/constants.js +53 -0
- package/dist/components/virtual-list/index.d.ts +94 -0
- package/dist/components/virtual-list/index.js +309 -0
- package/dist/hooks/index.d.ts +7 -0
- package/dist/hooks/use-set-state.d.ts +2 -0
- package/dist/hooks/use-set-state.js +27 -0
- package/dist/hooks/use-touch.d.ts +16 -0
- package/dist/hooks/use-touch.js +81 -0
- package/dist/hooks/use-update-effect.d.ts +3 -0
- package/dist/hooks/use-update-effect.js +25 -0
- package/dist/hooks/use-validation-resolver.d.ts +2 -0
- package/dist/hooks/use-validation-resolver.js +59 -0
- package/dist/icons/alert-danger.svg.js +48 -0
- package/dist/icons/alert-info.svg.js +48 -0
- package/dist/icons/alert-success.svg.js +48 -0
- package/dist/icons/alert-warning.svg.js +48 -0
- package/dist/icons/back.svg.js +47 -0
- package/dist/icons/calendar.svg.js +56 -0
- package/dist/icons/caret.svg.js +46 -0
- package/dist/icons/check.svg.js +45 -0
- package/dist/icons/clock.svg.js +56 -0
- package/dist/icons/close-small.svg.js +49 -0
- package/dist/icons/close.svg.js +45 -0
- package/dist/icons/cloud-upload.svg.js +57 -0
- package/dist/icons/column-filter.svg.js +47 -0
- package/dist/icons/columns.svg.js +46 -0
- package/dist/icons/compress-alt.svg.js +46 -0
- package/dist/icons/copy.svg.js +51 -0
- package/dist/icons/date.svg.js +52 -0
- package/dist/icons/department.svg.js +78 -0
- package/dist/icons/desk-empty.svg.js +99 -0
- package/dist/icons/dot.svg.js +62 -0
- package/dist/icons/down-arrow-bold.svg.js +48 -0
- package/dist/icons/download.svg.js +50 -0
- package/dist/icons/drag-bar.svg.js +79 -0
- package/dist/icons/drag.svg.js +48 -0
- package/dist/icons/edit.svg.js +48 -0
- package/dist/icons/ellipsis-v.svg.js +47 -0
- package/dist/icons/enter.svg.js +45 -0
- package/dist/icons/exchange.svg.js +47 -0
- package/dist/icons/expand-alt.svg.js +46 -0
- package/dist/icons/fail.svg.js +54 -0
- package/dist/icons/file.svg.js +47 -0
- package/dist/icons/filter.svg.js +46 -0
- package/dist/icons/folder.svg.js +49 -0
- package/dist/icons/function.svg.js +48 -0
- package/dist/icons/home.svg.js +46 -0
- package/dist/icons/image.svg.js +45 -0
- package/dist/icons/info-circle.svg.js +46 -0
- package/dist/icons/info.svg.js +52 -0
- package/dist/icons/input-clear.svg.js +48 -0
- package/dist/icons/invisible.svg.js +48 -0
- package/dist/icons/left-arrow.svg.js +46 -0
- package/dist/icons/loading-outline.svg.js +49 -0
- package/dist/icons/location.svg.js +46 -0
- package/dist/icons/menu.svg.js +48 -0
- package/dist/icons/minus.svg.js +46 -0
- package/dist/icons/move.svg.js +47 -0
- package/dist/icons/mute.svg.js +46 -0
- package/dist/icons/pause.svg.js +46 -0
- package/dist/icons/pencil.svg.js +46 -0
- package/dist/icons/play.svg.js +45 -0
- package/dist/icons/plus-cicle.svg.js +47 -0
- package/dist/icons/plus-fine.svg.js +48 -0
- package/dist/icons/plus.svg.js +47 -0
- package/dist/icons/post.svg.js +74 -0
- package/dist/icons/question-mark.svg.js +51 -0
- package/dist/icons/question.svg.js +46 -0
- package/dist/icons/redo.svg.js +46 -0
- package/dist/icons/refresh.svg.js +47 -0
- package/dist/icons/reload.svg.js +46 -0
- package/dist/icons/remove.svg.js +48 -0
- package/dist/icons/retry.svg.js +51 -0
- package/dist/icons/right-arrow-bold.svg.js +46 -0
- package/dist/icons/right-arrow.svg.js +46 -0
- package/dist/icons/role.svg.js +69 -0
- package/dist/icons/schedule.svg.js +49 -0
- package/dist/icons/search.svg.js +45 -0
- package/dist/icons/setting.svg.js +47 -0
- package/dist/icons/slider-handle-icon.svg.js +48 -0
- package/dist/icons/sort-asc.svg.js +46 -0
- package/dist/icons/sort-default.svg.js +47 -0
- package/dist/icons/sort-desc.svg.js +46 -0
- package/dist/icons/star.svg.js +47 -0
- package/dist/icons/status-close.svg.js +49 -0
- package/dist/icons/status-fail.svg.js +48 -0
- package/dist/icons/status-info.svg.js +52 -0
- package/dist/icons/status-success.svg.js +48 -0
- package/dist/icons/status-warning.svg.js +52 -0
- package/dist/icons/success.svg.js +52 -0
- package/dist/icons/transparent.svg.js +65 -0
- package/dist/icons/trash.svg.js +48 -0
- package/dist/icons/tree-down.svg.js +47 -0
- package/dist/icons/undo.svg.js +46 -0
- package/dist/icons/upload.svg.js +48 -0
- package/dist/icons/user-remove.svg.js +59 -0
- package/dist/icons/view.svg.js +48 -0
- package/dist/icons/volume.svg.js +49 -0
- package/dist/icons/warning-mark.svg.js +49 -0
- package/dist/icons/warning.svg.js +46 -0
- package/dist/icons/window-restore.svg.js +46 -0
- package/dist/icons/zoom-in.svg.js +46 -0
- package/dist/icons/zoom-out.svg.js +46 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +151 -0
- package/dist/locale/de-DE.d.ts +1 -0
- package/dist/locale/de-DE.js +344 -0
- package/dist/locale/en-US.d.ts +1 -0
- package/dist/locale/en-US.js +347 -0
- package/dist/locale/zh-CN.d.ts +1 -0
- package/dist/locale/zh-CN.js +358 -0
- package/dist/themes/ang.d.ts +3 -0
- package/dist/themes/ang.js +20 -0
- package/dist/themes/antd.d.ts +1 -0
- package/dist/themes/antd.js +44 -0
- package/dist/themes/cxd.d.ts +3 -0
- package/dist/themes/cxd.js +459 -0
- package/dist/themes/dark.d.ts +3 -0
- package/dist/themes/dark.js +28 -0
- package/dist/themes/default.d.ts +4 -0
- package/esm-dist/components/404.d.ts +54 -0
- package/esm-dist/components/404.js +35 -0
- package/esm-dist/components/Alert.d.ts +560 -0
- package/esm-dist/components/Alert.js +188 -0
- package/esm-dist/components/Alert2.d.ts +66 -0
- package/esm-dist/components/Alert2.js +60 -0
- package/esm-dist/components/AnchorNav.d.ts +118 -0
- package/esm-dist/components/AnchorNav.js +171 -0
- package/esm-dist/components/ArrayInput.d.ts +625 -0
- package/esm-dist/components/ArrayInput.js +152 -0
- package/esm-dist/components/AsideNav.d.ts +142 -0
- package/esm-dist/components/AsideNav.js +130 -0
- package/esm-dist/components/AssociatedSelection.d.ts +491 -0
- package/esm-dist/components/AssociatedSelection.js +104 -0
- package/esm-dist/components/Avatar.d.ts +113 -0
- package/esm-dist/components/Avatar.js +125 -0
- package/esm-dist/components/Badge.d.ts +120 -0
- package/esm-dist/components/BaiduMapPicker.d.ts +86 -0
- package/esm-dist/components/BarCode.d.ts +58 -0
- package/esm-dist/components/Breadcrumb.d.ts +115 -0
- package/esm-dist/components/Breadcrumb.js +163 -0
- package/esm-dist/components/Button.d.ts +74 -0
- package/esm-dist/components/Button.js +64 -0
- package/esm-dist/components/CalendarMobile.d.ts +353 -0
- package/esm-dist/components/CalendarMobile.js +531 -0
- package/esm-dist/components/Card.d.ts +75 -0
- package/esm-dist/components/Cascader.d.ts +109 -0
- package/esm-dist/components/ChainedSelection.d.ts +480 -0
- package/esm-dist/components/ChainedSelection.js +121 -0
- package/esm-dist/components/Checkbox.d.ts +69 -0
- package/esm-dist/components/Checkbox.js +64 -0
- package/esm-dist/components/CityArea.d.ts +307 -0
- package/esm-dist/components/CityDB.d.ts +13 -0
- package/esm-dist/components/CodeMirror.d.ts +25 -0
- package/esm-dist/components/CodeMirror.js +104 -0
- package/esm-dist/components/Collapse.d.ts +92 -0
- package/esm-dist/components/Collapse.js +156 -0
- package/esm-dist/components/CollapseGroup.d.ts +68 -0
- package/esm-dist/components/CollapseGroup.js +88 -0
- package/esm-dist/components/ColorPicker.d.ts +524 -0
- package/esm-dist/components/ContextMenu.d.ts +96 -0
- package/esm-dist/components/ContextMenu.js +213 -0
- package/esm-dist/components/DatePicker.d.ts +619 -0
- package/esm-dist/components/DatePicker.js +524 -0
- package/esm-dist/components/DateRangePicker.d.ts +876 -0
- package/esm-dist/components/DateRangePicker.js +1038 -0
- package/esm-dist/components/Drawer.d.ts +95 -0
- package/esm-dist/components/Drawer.js +250 -0
- package/esm-dist/components/Editor.d.ts +605 -0
- package/esm-dist/components/Editor.js +234 -0
- package/esm-dist/components/Form.d.ts +22 -0
- package/esm-dist/components/FormField.d.ts +65 -0
- package/esm-dist/components/GridNav.d.ts +52 -0
- package/esm-dist/components/GroupedSelection.d.ts +467 -0
- package/esm-dist/components/GroupedSelection.js +62 -0
- package/esm-dist/components/Html.d.ts +83 -0
- package/esm-dist/components/Html.js +52 -0
- package/esm-dist/components/ImageGallery.d.ts +297 -0
- package/esm-dist/components/Input.d.ts +16 -0
- package/esm-dist/components/Input.js +62 -0
- package/esm-dist/components/InputBox.d.ts +99 -0
- package/esm-dist/components/InputBox.js +97 -0
- package/esm-dist/components/InputBoxWithSuggestion.d.ts +280 -0
- package/esm-dist/components/InputBoxWithSuggestion.js +66 -0
- package/esm-dist/components/Layout.d.ts +144 -0
- package/esm-dist/components/Layout.js +66 -0
- package/esm-dist/components/Link.d.ts +62 -0
- package/esm-dist/components/ListGroup.d.ts +76 -0
- package/esm-dist/components/ListGroup.js +31 -0
- package/esm-dist/components/ListMenu.d.ts +573 -0
- package/esm-dist/components/LocationPicker.d.ts +427 -0
- package/esm-dist/components/Markdown.d.ts +20 -0
- package/esm-dist/components/Modal.d.ts +1278 -0
- package/esm-dist/components/Modal.js +148 -0
- package/esm-dist/components/ModalManager.d.ts +17 -0
- package/esm-dist/components/ModalManager.js +42 -0
- package/esm-dist/components/MonthRangePicker.d.ts +748 -0
- package/esm-dist/components/NumberInput.d.ts +89 -0
- package/esm-dist/components/NumberInput.js +136 -0
- package/esm-dist/components/Overlay.d.ts +41 -0
- package/esm-dist/components/Overlay.js +207 -0
- package/esm-dist/components/Pagination.d.ts +685 -0
- package/esm-dist/components/Picker.d.ts +284 -0
- package/esm-dist/components/Picker.js +74 -0
- package/esm-dist/components/PickerColumn.d.ts +63 -0
- package/esm-dist/components/PickerColumn.js +275 -0
- package/esm-dist/components/PickerContainer.d.ts +303 -0
- package/esm-dist/components/PickerContainer.js +149 -0
- package/esm-dist/components/PopOver.d.ts +90 -0
- package/esm-dist/components/PopOver.js +89 -0
- package/esm-dist/components/PopOverContainer.d.ts +28 -0
- package/esm-dist/components/PopOverContainer.js +92 -0
- package/esm-dist/components/PopUp.d.ts +578 -0
- package/esm-dist/components/PopUp.js +85 -0
- package/esm-dist/components/Progress.d.ts +68 -0
- package/esm-dist/components/PullRefresh.d.ts +64 -0
- package/esm-dist/components/PullRefresh.js +141 -0
- package/esm-dist/components/Radios.d.ts +180 -0
- package/esm-dist/components/Radios.js +112 -0
- package/esm-dist/components/Range.d.ts +122 -0
- package/esm-dist/components/Range.js +405 -0
- package/esm-dist/components/Rating.d.ts +252 -0
- package/esm-dist/components/Rating.js +315 -0
- package/esm-dist/components/ResultBox.d.ts +290 -0
- package/esm-dist/components/ResultBox.js +146 -0
- package/esm-dist/components/ResultList.d.ts +319 -0
- package/esm-dist/components/ResultList.js +182 -0
- package/esm-dist/components/ResultTableList.d.ts +708 -0
- package/esm-dist/components/ResultTableList.js +126 -0
- package/esm-dist/components/ResultTreeList.d.ts +308 -0
- package/esm-dist/components/ResultTreeList.js +208 -0
- package/esm-dist/components/RichText.d.ts +45 -0
- package/esm-dist/components/SearchBox.d.ts +504 -0
- package/esm-dist/components/SearchBox.js +127 -0
- package/esm-dist/components/Select.d.ts +6281 -0
- package/esm-dist/components/Select.js +756 -0
- package/esm-dist/components/Selection.d.ts +510 -0
- package/esm-dist/components/Selection.js +140 -0
- package/esm-dist/components/SparkLine.d.ts +403 -0
- package/esm-dist/components/SparkLine.js +62 -0
- package/esm-dist/components/Spinner.d.ts +174 -0
- package/esm-dist/components/Spinner.js +67 -0
- package/esm-dist/components/Steps.d.ts +110 -0
- package/esm-dist/components/Switch.d.ts +101 -0
- package/esm-dist/components/Switch.js +64 -0
- package/esm-dist/components/TableSelection.d.ts +695 -0
- package/esm-dist/components/TableSelection.js +79 -0
- package/esm-dist/components/Tabs.d.ts +210 -0
- package/esm-dist/components/Tabs.js +473 -0
- package/esm-dist/components/TabsTransfer.d.ts +297 -0
- package/esm-dist/components/TabsTransfer.js +210 -0
- package/esm-dist/components/TabsTransferPicker.d.ts +273 -0
- package/esm-dist/components/Tag.d.ts +104 -0
- package/esm-dist/components/Textarea.d.ts +568 -0
- package/esm-dist/components/Textarea.js +134 -0
- package/esm-dist/components/Timeline.d.ts +47 -0
- package/esm-dist/components/TimelineItem.d.ts +297 -0
- package/esm-dist/components/Tinymce.d.ts +55 -0
- package/esm-dist/components/TitleBar.d.ts +115 -0
- package/esm-dist/components/TitleBar.js +48 -0
- package/esm-dist/components/Toast.d.ts +358 -0
- package/esm-dist/components/Toast.js +247 -0
- package/esm-dist/components/Tooltip.d.ts +65 -0
- package/esm-dist/components/Tooltip.js +36 -0
- package/esm-dist/components/TooltipWrapper.d.ts +155 -0
- package/esm-dist/components/TooltipWrapper.js +183 -0
- package/esm-dist/components/Transfer.d.ts +1243 -0
- package/esm-dist/components/Transfer.js +323 -0
- package/esm-dist/components/TransferDropDown.d.ts +271 -0
- package/esm-dist/components/TransferPicker.d.ts +277 -0
- package/esm-dist/components/TransferSearch.d.ts +292 -0
- package/esm-dist/components/TransferSearch.js +95 -0
- package/esm-dist/components/Tree.d.ts +1708 -0
- package/esm-dist/components/Tree.js +764 -0
- package/esm-dist/components/TreeSelection.d.ts +526 -0
- package/esm-dist/components/TreeSelection.js +200 -0
- package/esm-dist/components/UserSelect.d.ts +500 -0
- package/esm-dist/components/UserTabSelect.d.ts +320 -0
- package/esm-dist/components/WithRemoteConfig.d.ts +386 -0
- package/esm-dist/components/WithRemoteConfig.js +257 -0
- package/esm-dist/components/WithStore.d.ts +75 -0
- package/esm-dist/components/WithStore.js +48 -0
- package/esm-dist/components/calendar/Calendar.d.ts +64 -0
- package/esm-dist/components/calendar/Calendar.js +489 -0
- package/esm-dist/components/calendar/CalendarContainer.d.ts +10 -0
- package/esm-dist/components/calendar/CalendarContainer.js +27 -0
- package/esm-dist/components/calendar/DaysView.d.ts +170 -0
- package/esm-dist/components/calendar/DaysView.js +440 -0
- package/esm-dist/components/calendar/MonthsView.d.ts +128 -0
- package/esm-dist/components/calendar/MonthsView.js +158 -0
- package/esm-dist/components/calendar/QuartersView.d.ts +92 -0
- package/esm-dist/components/calendar/QuartersView.js +83 -0
- package/esm-dist/components/calendar/TimeView.d.ts +178 -0
- package/esm-dist/components/calendar/TimeView.js +462 -0
- package/esm-dist/components/calendar/YearsView.d.ts +102 -0
- package/esm-dist/components/calendar/YearsView.js +121 -0
- package/esm-dist/components/condition-builder/Expression.d.ts +298 -0
- package/esm-dist/components/condition-builder/Field.d.ts +280 -0
- package/esm-dist/components/condition-builder/Formula.d.ts +269 -0
- package/esm-dist/components/condition-builder/Func.d.ts +279 -0
- package/esm-dist/components/condition-builder/Group.d.ts +296 -0
- package/esm-dist/components/condition-builder/GroupOrItem.d.ts +72 -0
- package/esm-dist/components/condition-builder/InputSwitch.d.ts +47 -0
- package/esm-dist/components/condition-builder/Item.d.ts +292 -0
- package/esm-dist/components/condition-builder/Value.d.ts +277 -0
- package/esm-dist/components/condition-builder/config.d.ts +35 -0
- package/esm-dist/components/condition-builder/index.d.ts +303 -0
- package/esm-dist/components/condition-builder/types.d.ts +150 -0
- package/esm-dist/components/formula/Editor.d.ts +362 -0
- package/esm-dist/components/formula/Editor.js +208 -0
- package/esm-dist/components/formula/FuncList.d.ts +48 -0
- package/esm-dist/components/formula/FuncList.js +48 -0
- package/esm-dist/components/formula/Picker.d.ts +440 -0
- package/esm-dist/components/formula/Picker.js +222 -0
- package/esm-dist/components/formula/VariableList.d.ts +54 -0
- package/esm-dist/components/formula/VariableList.js +41 -0
- package/esm-dist/components/formula/plugin.d.ts +27 -0
- package/esm-dist/components/formula/plugin.js +206 -0
- package/esm-dist/components/icons.d.ts +45 -0
- package/esm-dist/components/icons.js +249 -0
- package/esm-dist/components/index.d.ts +64 -0
- package/esm-dist/components/json-schema/Array.d.ts +3 -0
- package/esm-dist/components/json-schema/Array.js +128 -0
- package/esm-dist/components/json-schema/Item.d.ts +3 -0
- package/esm-dist/components/json-schema/Item.js +37 -0
- package/esm-dist/components/json-schema/Object.d.ts +3 -0
- package/esm-dist/components/json-schema/Object.js +181 -0
- package/esm-dist/components/json-schema/index.d.ts +277 -0
- package/esm-dist/components/json-schema/index.js +20 -0
- package/esm-dist/components/schema-editor/Array.d.ts +11 -0
- package/esm-dist/components/schema-editor/Common.d.ts +29 -0
- package/esm-dist/components/schema-editor/Item.d.ts +8 -0
- package/esm-dist/components/schema-editor/Object.d.ts +44 -0
- package/esm-dist/components/schema-editor/SchemaVariableList.d.ts +193 -0
- package/esm-dist/components/schema-editor/SchemaVariableList.js +74 -0
- package/esm-dist/components/schema-editor/SchemaVariableListPicker.d.ts +186 -0
- package/esm-dist/components/schema-editor/SchemaVariableListPicker.js +34 -0
- package/esm-dist/components/schema-editor/index.d.ts +303 -0
- package/esm-dist/components/table/Cell.d.ts +489 -0
- package/esm-dist/components/table/Cell.js +38 -0
- package/esm-dist/components/table/HeadCellDropDown.d.ts +293 -0
- package/esm-dist/components/table/HeadCellDropDown.js +55 -0
- package/esm-dist/components/table/HeadCellFilter.d.ts +419 -0
- package/esm-dist/components/table/HeadCellFilter.js +136 -0
- package/esm-dist/components/table/HeadCellSelect.d.ts +364 -0
- package/esm-dist/components/table/HeadCellSelect.js +48 -0
- package/esm-dist/components/table/HeadCellSort.d.ts +278 -0
- package/esm-dist/components/table/HeadCellSort.js +74 -0
- package/esm-dist/components/table/ItemActionsWrapper.d.ts +10 -0
- package/esm-dist/components/table/ItemActionsWrapper.js +29 -0
- package/esm-dist/components/table/index.d.ts +794 -0
- package/esm-dist/components/table/index.js +1234 -0
- package/esm-dist/components/virtual-list/SizeAndPositionManager.d.ts +70 -0
- package/esm-dist/components/virtual-list/SizeAndPositionManager.js +216 -0
- package/esm-dist/components/virtual-list/constants.d.ts +34 -0
- package/esm-dist/components/virtual-list/constants.js +45 -0
- package/esm-dist/components/virtual-list/index.d.ts +94 -0
- package/esm-dist/components/virtual-list/index.js +281 -0
- package/esm-dist/hooks/index.d.ts +7 -0
- package/esm-dist/hooks/use-set-state.d.ts +2 -0
- package/esm-dist/hooks/use-set-state.js +19 -0
- package/esm-dist/hooks/use-touch.d.ts +16 -0
- package/esm-dist/hooks/use-touch.js +77 -0
- package/esm-dist/hooks/use-update-effect.d.ts +3 -0
- package/esm-dist/hooks/use-update-effect.js +21 -0
- package/esm-dist/hooks/use-validation-resolver.d.ts +2 -0
- package/esm-dist/hooks/use-validation-resolver.js +49 -0
- package/esm-dist/icons/alert-danger.svg.js +24 -0
- package/esm-dist/icons/alert-info.svg.js +24 -0
- package/esm-dist/icons/alert-success.svg.js +24 -0
- package/esm-dist/icons/alert-warning.svg.js +24 -0
- package/esm-dist/icons/back.svg.js +23 -0
- package/esm-dist/icons/calendar.svg.js +32 -0
- package/esm-dist/icons/caret.svg.js +22 -0
- package/esm-dist/icons/check.svg.js +21 -0
- package/esm-dist/icons/clock.svg.js +32 -0
- package/esm-dist/icons/close-small.svg.js +25 -0
- package/esm-dist/icons/close.svg.js +21 -0
- package/esm-dist/icons/cloud-upload.svg.js +33 -0
- package/esm-dist/icons/column-filter.svg.js +23 -0
- package/esm-dist/icons/columns.svg.js +22 -0
- package/esm-dist/icons/compress-alt.svg.js +22 -0
- package/esm-dist/icons/copy.svg.js +27 -0
- package/esm-dist/icons/date.svg.js +28 -0
- package/esm-dist/icons/department.svg.js +54 -0
- package/esm-dist/icons/desk-empty.svg.js +75 -0
- package/esm-dist/icons/dot.svg.js +38 -0
- package/esm-dist/icons/down-arrow-bold.svg.js +24 -0
- package/esm-dist/icons/download.svg.js +26 -0
- package/esm-dist/icons/drag-bar.svg.js +55 -0
- package/esm-dist/icons/drag.svg.js +24 -0
- package/esm-dist/icons/edit.svg.js +24 -0
- package/esm-dist/icons/ellipsis-v.svg.js +23 -0
- package/esm-dist/icons/enter.svg.js +21 -0
- package/esm-dist/icons/exchange.svg.js +23 -0
- package/esm-dist/icons/expand-alt.svg.js +22 -0
- package/esm-dist/icons/fail.svg.js +30 -0
- package/esm-dist/icons/file.svg.js +23 -0
- package/esm-dist/icons/filter.svg.js +22 -0
- package/esm-dist/icons/folder.svg.js +25 -0
- package/esm-dist/icons/function.svg.js +24 -0
- package/esm-dist/icons/home.svg.js +22 -0
- package/esm-dist/icons/image.svg.js +21 -0
- package/esm-dist/icons/info-circle.svg.js +22 -0
- package/esm-dist/icons/info.svg.js +28 -0
- package/esm-dist/icons/input-clear.svg.js +24 -0
- package/esm-dist/icons/invisible.svg.js +24 -0
- package/esm-dist/icons/left-arrow.svg.js +22 -0
- package/esm-dist/icons/loading-outline.svg.js +25 -0
- package/esm-dist/icons/location.svg.js +22 -0
- package/esm-dist/icons/menu.svg.js +24 -0
- package/esm-dist/icons/minus.svg.js +22 -0
- package/esm-dist/icons/move.svg.js +23 -0
- package/esm-dist/icons/mute.svg.js +22 -0
- package/esm-dist/icons/pause.svg.js +22 -0
- package/esm-dist/icons/pencil.svg.js +22 -0
- package/esm-dist/icons/play.svg.js +21 -0
- package/esm-dist/icons/plus-cicle.svg.js +23 -0
- package/esm-dist/icons/plus-fine.svg.js +24 -0
- package/esm-dist/icons/plus.svg.js +23 -0
- package/esm-dist/icons/post.svg.js +50 -0
- package/esm-dist/icons/question-mark.svg.js +27 -0
- package/esm-dist/icons/question.svg.js +22 -0
- package/esm-dist/icons/redo.svg.js +22 -0
- package/esm-dist/icons/refresh.svg.js +23 -0
- package/esm-dist/icons/reload.svg.js +22 -0
- package/esm-dist/icons/remove.svg.js +24 -0
- package/esm-dist/icons/retry.svg.js +27 -0
- package/esm-dist/icons/right-arrow-bold.svg.js +22 -0
- package/esm-dist/icons/right-arrow.svg.js +22 -0
- package/esm-dist/icons/role.svg.js +45 -0
- package/esm-dist/icons/schedule.svg.js +25 -0
- package/esm-dist/icons/search.svg.js +21 -0
- package/esm-dist/icons/setting.svg.js +23 -0
- package/esm-dist/icons/slider-handle-icon.svg.js +24 -0
- package/esm-dist/icons/sort-asc.svg.js +22 -0
- package/esm-dist/icons/sort-default.svg.js +23 -0
- package/esm-dist/icons/sort-desc.svg.js +22 -0
- package/esm-dist/icons/star.svg.js +23 -0
- package/esm-dist/icons/status-close.svg.js +25 -0
- package/esm-dist/icons/status-fail.svg.js +24 -0
- package/esm-dist/icons/status-info.svg.js +28 -0
- package/esm-dist/icons/status-success.svg.js +24 -0
- package/esm-dist/icons/status-warning.svg.js +28 -0
- package/esm-dist/icons/success.svg.js +28 -0
- package/esm-dist/icons/transparent.svg.js +41 -0
- package/esm-dist/icons/trash.svg.js +24 -0
- package/esm-dist/icons/tree-down.svg.js +23 -0
- package/esm-dist/icons/undo.svg.js +22 -0
- package/esm-dist/icons/upload.svg.js +24 -0
- package/esm-dist/icons/user-remove.svg.js +35 -0
- package/esm-dist/icons/view.svg.js +24 -0
- package/esm-dist/icons/volume.svg.js +25 -0
- package/esm-dist/icons/warning-mark.svg.js +25 -0
- package/esm-dist/icons/warning.svg.js +22 -0
- package/esm-dist/icons/window-restore.svg.js +22 -0
- package/esm-dist/icons/zoom-in.svg.js +22 -0
- package/esm-dist/icons/zoom-out.svg.js +22 -0
- package/esm-dist/index.d.ts +10 -0
- package/esm-dist/index.js +74 -0
- package/esm-dist/locale/de-DE.d.ts +1 -0
- package/esm-dist/locale/de-DE.js +342 -0
- package/esm-dist/locale/en-US.d.ts +1 -0
- package/esm-dist/locale/en-US.js +345 -0
- package/esm-dist/locale/zh-CN.d.ts +1 -0
- package/esm-dist/locale/zh-CN.js +356 -0
- package/esm-dist/themes/ang.d.ts +3 -0
- package/esm-dist/themes/ang.js +15 -0
- package/esm-dist/themes/antd.d.ts +1 -0
- package/esm-dist/themes/antd.js +42 -0
- package/esm-dist/themes/cxd.d.ts +3 -0
- package/esm-dist/themes/cxd.js +455 -0
- package/esm-dist/themes/dark.d.ts +3 -0
- package/esm-dist/themes/dark.js +23 -0
- package/esm-dist/themes/default.d.ts +4 -0
- package/package.json +71 -0
- package/rollup.config.js +129 -0
- package/scss/README.md +9 -0
- package/scss/_functions.scss +101 -0
- package/scss/_mixins.scss +472 -0
- package/scss/_properties.scss +1702 -0
- package/scss/_thirds.scss +8 -0
- package/scss/_utilities.scss +1753 -0
- package/scss/_variables.scss +417 -0
- package/scss/base/_common.scss +3 -0
- package/scss/base/_normalize.scss +361 -0
- package/scss/base/_reset.scss +18 -0
- package/scss/base/_typography.scss +59 -0
- package/scss/components/_alert.scss +82 -0
- package/scss/components/_anchor-nav.scss +115 -0
- package/scss/components/_app.scss +31 -0
- package/scss/components/_array-input.scss +101 -0
- package/scss/components/_audio.scss +146 -0
- package/scss/components/_avatar.scss +55 -0
- package/scss/components/_badge.scss +136 -0
- package/scss/components/_barcode.scss +6 -0
- package/scss/components/_breadcrumb.scss +98 -0
- package/scss/components/_button-group.scss +131 -0
- package/scss/components/_button.scss +379 -0
- package/scss/components/_calendar.scss +395 -0
- package/scss/components/_card.scss +359 -0
- package/scss/components/_card2.scss +28 -0
- package/scss/components/_cards.scss +187 -0
- package/scss/components/_carousel.scss +197 -0
- package/scss/components/_cascader.scss +102 -0
- package/scss/components/_chart.scss +20 -0
- package/scss/components/_city-area.scss +29 -0
- package/scss/components/_collapse-group.scss +30 -0
- package/scss/components/_collapse.scss +120 -0
- package/scss/components/_color.scss +18 -0
- package/scss/components/_column-toggler.scss +244 -0
- package/scss/components/_condition-builder.scss +280 -0
- package/scss/components/_context-menu.scss +206 -0
- package/scss/components/_copyable.scss +10 -0
- package/scss/components/_crud.scss +151 -0
- package/scss/components/_debug.scss +170 -0
- package/scss/components/_divider.scss +11 -0
- package/scss/components/_drawer.scss +314 -0
- package/scss/components/_dropdown.scss +144 -0
- package/scss/components/_each.scss +7 -0
- package/scss/components/_formula.scss +407 -0
- package/scss/components/_grid-nav.scss +128 -0
- package/scss/components/_icon.scss +4 -0
- package/scss/components/_image-gallery.scss +205 -0
- package/scss/components/_images.scss +186 -0
- package/scss/components/_input-box.scss +74 -0
- package/scss/components/_json-schema-editor.scss +126 -0
- package/scss/components/_json-schema.scss +124 -0
- package/scss/components/_json.scss +7 -0
- package/scss/components/_link.scss +6 -0
- package/scss/components/_list-menu.scss +74 -0
- package/scss/components/_list.scss +249 -0
- package/scss/components/_log.scss +141 -0
- package/scss/components/_mapping.scss +6 -0
- package/scss/components/_markdown.scss +266 -0
- package/scss/components/_modal.scss +252 -0
- package/scss/components/_nav.scss +310 -0
- package/scss/components/_page.scss +144 -0
- package/scss/components/_pagination.scss +200 -0
- package/scss/components/_panel.scss +229 -0
- package/scss/components/_picker-columns.scss +140 -0
- package/scss/components/_popover.scss +54 -0
- package/scss/components/_popoverable.scss +62 -0
- package/scss/components/_popup.scss +160 -0
- package/scss/components/_portlet.scss +51 -0
- package/scss/components/_progress.scss +142 -0
- package/scss/components/_property.scss +47 -0
- package/scss/components/_pull-refresh.scss +25 -0
- package/scss/components/_quick-edit.scss +56 -0
- package/scss/components/_remark.scss +58 -0
- package/scss/components/_result-box.scss +246 -0
- package/scss/components/_search-box.scss +138 -0
- package/scss/components/_service.scss +3 -0
- package/scss/components/_sparkline.scss +18 -0
- package/scss/components/_spinner.scss +176 -0
- package/scss/components/_status.scss +102 -0
- package/scss/components/_steps.scss +394 -0
- package/scss/components/_table-v2.scss +912 -0
- package/scss/components/_table.scss +936 -0
- package/scss/components/_tabs.scss +1021 -0
- package/scss/components/_tag.scss +177 -0
- package/scss/components/_timeline.scss +198 -0
- package/scss/components/_toast.scss +272 -0
- package/scss/components/_tooltip.scss +339 -0
- package/scss/components/_tpl.scss +5 -0
- package/scss/components/_video.scss +38 -0
- package/scss/components/_wizard.scss +270 -0
- package/scss/components/_wrapper.scss +21 -0
- package/scss/components/form/_chained-select.scss +5 -0
- package/scss/components/form/_checks.scss +513 -0
- package/scss/components/form/_city.scss +33 -0
- package/scss/components/form/_color.scss +119 -0
- package/scss/components/form/_combo.scss +316 -0
- package/scss/components/form/_date-range.scss +222 -0
- package/scss/components/form/_date.scss +633 -0
- package/scss/components/form/_editor.scss +125 -0
- package/scss/components/form/_excel.scss +42 -0
- package/scss/components/form/_fieldset.scss +136 -0
- package/scss/components/form/_file.scss +246 -0
- package/scss/components/form/_form.scss +617 -0
- package/scss/components/form/_group.scss +116 -0
- package/scss/components/form/_icon-picker.scss +107 -0
- package/scss/components/form/_image.scss +266 -0
- package/scss/components/form/_input-group.scss +150 -0
- package/scss/components/form/_list.scss +122 -0
- package/scss/components/form/_location.scss +140 -0
- package/scss/components/form/_matrix.scss +5 -0
- package/scss/components/form/_nested-select.scss +106 -0
- package/scss/components/form/_number.scss +312 -0
- package/scss/components/form/_picker.scss +101 -0
- package/scss/components/form/_qr-code.scss +4 -0
- package/scss/components/form/_range.scss +274 -0
- package/scss/components/form/_rating.scss +74 -0
- package/scss/components/form/_repeat.scss +40 -0
- package/scss/components/form/_result-list.scss +87 -0
- package/scss/components/form/_rich-text.scss +116 -0
- package/scss/components/form/_select.scss +447 -0
- package/scss/components/form/_selection.scss +350 -0
- package/scss/components/form/_sub-form.scss +118 -0
- package/scss/components/form/_switch.scss +102 -0
- package/scss/components/form/_tag.scss +92 -0
- package/scss/components/form/_text.scss +307 -0
- package/scss/components/form/_textarea.scss +62 -0
- package/scss/components/form/_tinymce.scss +6 -0
- package/scss/components/form/_transfer.scss +320 -0
- package/scss/components/form/_tree-select.scss +39 -0
- package/scss/components/form/_tree.scss +317 -0
- package/scss/components/form/_user-select.scss +422 -0
- package/scss/components/react-datetime.scss +247 -0
- package/scss/helper/background/_background-color.scss +214 -0
- package/scss/helper/border/_border-color.scss +178 -0
- package/scss/helper/border/_border-radius.scss +152 -0
- package/scss/helper/border/_border-style.scss +40 -0
- package/scss/helper/border/_border-width.scss +72 -0
- package/scss/helper/box-alignment/_align-content.scss +44 -0
- package/scss/helper/box-alignment/_align-items.scss +41 -0
- package/scss/helper/box-alignment/_align-self.scss +40 -0
- package/scss/helper/box-alignment/_justify-content.scss +44 -0
- package/scss/helper/box-alignment/_justify-items.scss +40 -0
- package/scss/helper/box-alignment/_justify-self.scss +40 -0
- package/scss/helper/box-alignment/_place-content.scss +48 -0
- package/scss/helper/box-alignment/_place-items.scss +40 -0
- package/scss/helper/box-alignment/_place-self.scss +40 -0
- package/scss/helper/effect/_box-shadow.scss +74 -0
- package/scss/helper/effect/_opacity.scss +66 -0
- package/scss/helper/flex/_direction.scss +41 -0
- package/scss/helper/flex/_flex.scss +38 -0
- package/scss/helper/flex/_grow.scss +28 -0
- package/scss/helper/flex/_order.scss +56 -0
- package/scss/helper/flex/_shrink.scss +27 -0
- package/scss/helper/flex/_wrap.scss +36 -0
- package/scss/helper/grid/_auto-columns.scss +38 -0
- package/scss/helper/grid/_auto-flow.scss +38 -0
- package/scss/helper/grid/_auto-rows.scss +38 -0
- package/scss/helper/grid/_column-start-end.scss +201 -0
- package/scss/helper/grid/_columns.scss +74 -0
- package/scss/helper/grid/_gap.scss +154 -0
- package/scss/helper/grid/_row-start-end.scss +201 -0
- package/scss/helper/grid/_rows.scss +50 -0
- package/scss/helper/layout/_box-sizing.scss +51 -0
- package/scss/helper/layout/_clear.scss +56 -0
- package/scss/helper/layout/_display.scss +82 -0
- package/scss/helper/layout/_float.scss +71 -0
- package/scss/helper/layout/_overflow.scss +85 -0
- package/scss/helper/layout/_position.scss +55 -0
- package/scss/helper/layout/_top-right-bottom-left.scss +292 -0
- package/scss/helper/layout/_visibility.scss +42 -0
- package/scss/helper/layout/_z-index.scss +67 -0
- package/scss/helper/sizing/_height.scss +161 -0
- package/scss/helper/sizing/_width.scss +158 -0
- package/scss/helper/spacing/_margin.scss +821 -0
- package/scss/helper/spacing/_padding.scss +394 -0
- package/scss/helper/spacing/_space-between.scss +224 -0
- package/scss/helper/typography/_font-family.scss +28 -0
- package/scss/helper/typography/_font-size.scss +40 -0
- package/scss/helper/typography/_font-style.scss +31 -0
- package/scss/helper/typography/_font-weight.scss +49 -0
- package/scss/helper/typography/_letter-spacing.scss +43 -0
- package/scss/helper/typography/_line-height.scss +59 -0
- package/scss/helper/typography/_list-style-type.scss +43 -0
- package/scss/helper/typography/_text-align.scss +34 -0
- package/scss/helper/typography/_text-color.scss +184 -0
- package/scss/helper/typography/_text-decoration.scss +34 -0
- package/scss/helper/typography/_text-overflow.scss +40 -0
- package/scss/helper/typography/_text-transform.scss +40 -0
- package/scss/helper/typography/_vertical-align.scss +44 -0
- package/scss/helper/typography/_whitespace.scss +42 -0
- package/scss/helper/typography/_word-break.scss +36 -0
- package/scss/helper.scss +70 -0
- package/scss/layout/_aside.scss +361 -0
- package/scss/layout/_grid.scss +171 -0
- package/scss/layout/_hbox.scss +127 -0
- package/scss/layout/_header.scss +0 -0
- package/scss/layout/_layout.scss +458 -0
- package/scss/layout/_vbox.scss +38 -0
- package/scss/themes/_ang-variables.scss +132 -0
- package/scss/themes/_antd-colors.scss +149 -0
- package/scss/themes/_antd-variables.scss +171 -0
- package/scss/themes/_common.scss +138 -0
- package/scss/themes/_cxd-colors.scss +56 -0
- package/scss/themes/_cxd-variables.scss +687 -0
- package/scss/themes/_dark-variables.scss +129 -0
- package/scss/themes/ang-ie11.scss +1 -0
- package/scss/themes/ang.scss +4 -0
- package/scss/themes/antd-ie11.scss +1 -0
- package/scss/themes/antd.scss +5 -0
- package/scss/themes/cxd-ie11.scss +1 -0
- package/scss/themes/cxd.scss +426 -0
- package/scss/themes/dark-ie11.scss +1 -0
- package/scss/themes/dark.scss +3 -0
- package/scss/themes/default.scss +2 -0
- package/scss/themes/extract-antd-color.py +27 -0
- package/src/components/404.tsx +49 -0
- package/src/components/Alert.tsx +300 -0
- package/src/components/Alert2.tsx +117 -0
- package/src/components/AnchorNav.tsx +265 -0
- package/src/components/ArrayInput.tsx +234 -0
- package/src/components/AsideNav.tsx +280 -0
- package/src/components/AssociatedSelection.tsx +243 -0
- package/src/components/Avatar.tsx +255 -0
- package/src/components/Badge.tsx +300 -0
- package/src/components/BaiduMapPicker.tsx +394 -0
- package/src/components/BarCode.tsx +50 -0
- package/src/components/Breadcrumb.tsx +294 -0
- package/src/components/Button.tsx +149 -0
- package/src/components/CalendarMobile.tsx +803 -0
- package/src/components/Card.tsx +206 -0
- package/src/components/Cascader.tsx +596 -0
- package/src/components/ChainedSelection.tsx +253 -0
- package/src/components/Checkbox.tsx +117 -0
- package/src/components/CityArea.tsx +318 -0
- package/src/components/CityDB.ts +4109 -0
- package/src/components/CodeMirror.tsx +99 -0
- package/src/components/Collapse.tsx +253 -0
- package/src/components/CollapseGroup.tsx +133 -0
- package/src/components/ColorPicker.tsx +374 -0
- package/src/components/ContextMenu.tsx +313 -0
- package/src/components/DatePicker.tsx +879 -0
- package/src/components/DateRangePicker.tsx +1500 -0
- package/src/components/Drawer.tsx +357 -0
- package/src/components/Editor.tsx +341 -0
- package/src/components/Form.tsx +70 -0
- package/src/components/FormField.tsx +127 -0
- package/src/components/GridNav.tsx +233 -0
- package/src/components/GroupedSelection.tsx +123 -0
- package/src/components/Html.tsx +75 -0
- package/src/components/ImageGallery.tsx +179 -0
- package/src/components/Input.tsx +72 -0
- package/src/components/InputBox.tsx +126 -0
- package/src/components/InputBoxWithSuggestion.tsx +113 -0
- package/src/components/Layout.tsx +123 -0
- package/src/components/Link.tsx +85 -0
- package/src/components/ListGroup.tsx +72 -0
- package/src/components/ListMenu.tsx +112 -0
- package/src/components/LocationPicker.tsx +213 -0
- package/src/components/Markdown.tsx +53 -0
- package/src/components/Modal.tsx +294 -0
- package/src/components/ModalManager.ts +49 -0
- package/src/components/MonthRangePicker.tsx +699 -0
- package/src/components/NumberInput.tsx +255 -0
- package/src/components/Overlay.tsx +317 -0
- package/src/components/Pagination.tsx +526 -0
- package/src/components/Picker.tsx +161 -0
- package/src/components/PickerColumn.tsx +400 -0
- package/src/components/PickerContainer.tsx +178 -0
- package/src/components/PopOver.tsx +155 -0
- package/src/components/PopOverContainer.tsx +114 -0
- package/src/components/PopUp.tsx +161 -0
- package/src/components/Progress.tsx +173 -0
- package/src/components/PullRefresh.tsx +197 -0
- package/src/components/Radios.tsx +198 -0
- package/src/components/Range.tsx +561 -0
- package/src/components/Rating.tsx +421 -0
- package/src/components/ResultBox.tsx +224 -0
- package/src/components/ResultList.tsx +300 -0
- package/src/components/ResultTableList.tsx +229 -0
- package/src/components/ResultTreeList.tsx +312 -0
- package/src/components/RichText.tsx +312 -0
- package/src/components/SearchBox.tsx +175 -0
- package/src/components/Select.tsx +1229 -0
- package/src/components/Selection.tsx +232 -0
- package/src/components/SparkLine.tsx +111 -0
- package/src/components/Spinner.tsx +126 -0
- package/src/components/Steps.tsx +221 -0
- package/src/components/Switch.tsx +122 -0
- package/src/components/TableSelection.tsx +183 -0
- package/src/components/Tabs.tsx +747 -0
- package/src/components/TabsTransfer.tsx +422 -0
- package/src/components/TabsTransferPicker.tsx +111 -0
- package/src/components/Tag.tsx +179 -0
- package/src/components/Textarea.tsx +234 -0
- package/src/components/Timeline.tsx +36 -0
- package/src/components/TimelineItem.tsx +140 -0
- package/src/components/Tinymce.tsx +614 -0
- package/src/components/TitleBar.tsx +61 -0
- package/src/components/Toast.tsx +421 -0
- package/src/components/Tooltip.tsx +78 -0
- package/src/components/TooltipWrapper.tsx +366 -0
- package/src/components/Transfer.tsx +755 -0
- package/src/components/TransferDropDown.tsx +136 -0
- package/src/components/TransferPicker.tsx +118 -0
- package/src/components/TransferSearch.tsx +126 -0
- package/src/components/Tree.tsx +1183 -0
- package/src/components/TreeSelection.tsx +315 -0
- package/src/components/UserSelect.tsx +850 -0
- package/src/components/UserTabSelect.tsx +261 -0
- package/src/components/WithRemoteConfig.tsx +406 -0
- package/src/components/WithStore.tsx +73 -0
- package/src/components/calendar/Calendar.tsx +710 -0
- package/src/components/calendar/CalendarContainer.tsx +30 -0
- package/src/components/calendar/DaysView.tsx +812 -0
- package/src/components/calendar/MonthsView.tsx +288 -0
- package/src/components/calendar/QuartersView.tsx +156 -0
- package/src/components/calendar/TimeView.tsx +742 -0
- package/src/components/calendar/YearsView.tsx +214 -0
- package/src/components/condition-builder/Expression.tsx +244 -0
- package/src/components/condition-builder/Field.tsx +152 -0
- package/src/components/condition-builder/Formula.tsx +39 -0
- package/src/components/condition-builder/Func.tsx +141 -0
- package/src/components/condition-builder/Group.tsx +258 -0
- package/src/components/condition-builder/GroupOrItem.tsx +161 -0
- package/src/components/condition-builder/InputSwitch.tsx +51 -0
- package/src/components/condition-builder/Item.tsx +427 -0
- package/src/components/condition-builder/Value.tsx +162 -0
- package/src/components/condition-builder/config.ts +133 -0
- package/src/components/condition-builder/index.tsx +269 -0
- package/src/components/condition-builder/types.ts +218 -0
- package/src/components/formula/Editor.tsx +337 -0
- package/src/components/formula/FuncList.tsx +113 -0
- package/src/components/formula/Picker.tsx +415 -0
- package/src/components/formula/VariableList.tsx +126 -0
- package/src/components/formula/plugin.ts +252 -0
- package/src/components/icons.tsx +267 -0
- package/src/components/index.tsx +133 -0
- package/src/components/json-schema/Array.tsx +216 -0
- package/src/components/json-schema/Item.tsx +47 -0
- package/src/components/json-schema/Object.tsx +339 -0
- package/src/components/json-schema/index.tsx +48 -0
- package/src/components/schema-editor/Array.tsx +99 -0
- package/src/components/schema-editor/Common.tsx +191 -0
- package/src/components/schema-editor/Item.tsx +30 -0
- package/src/components/schema-editor/Object.tsx +302 -0
- package/src/components/schema-editor/SchemaVariableList.tsx +98 -0
- package/src/components/schema-editor/SchemaVariableListPicker.tsx +68 -0
- package/src/components/schema-editor/index.tsx +228 -0
- package/src/components/table/Cell.tsx +71 -0
- package/src/components/table/HeadCellDropDown.tsx +112 -0
- package/src/components/table/HeadCellFilter.tsx +230 -0
- package/src/components/table/HeadCellSelect.tsx +97 -0
- package/src/components/table/HeadCellSort.tsx +99 -0
- package/src/components/table/ItemActionsWrapper.tsx +37 -0
- package/src/components/table/index.tsx +2012 -0
- package/src/components/virtual-list/SizeAndPositionManager.ts +308 -0
- package/src/components/virtual-list/constants.ts +41 -0
- package/src/components/virtual-list/index.tsx +447 -0
- package/src/custom.d.ts +14 -0
- package/src/hooks/index.ts +7 -0
- package/src/hooks/use-set-state.ts +19 -0
- package/src/hooks/use-touch.ts +100 -0
- package/src/hooks/use-update-effect.ts +16 -0
- package/src/hooks/use-validation-resolver.ts +47 -0
- package/src/icons/alert-danger.svg +1 -0
- package/src/icons/alert-info.svg +1 -0
- package/src/icons/alert-success.svg +1 -0
- package/src/icons/alert-warning.svg +1 -0
- package/src/icons/back.svg +11 -0
- package/src/icons/calendar.svg +27 -0
- package/src/icons/caret.svg +7 -0
- package/src/icons/check.svg +9 -0
- package/src/icons/clock.svg +1 -0
- package/src/icons/close-small.svg +5 -0
- package/src/icons/close.svg +4 -0
- package/src/icons/cloud-upload.svg +22 -0
- package/src/icons/column-filter.svg +9 -0
- package/src/icons/columns.svg +7 -0
- package/src/icons/compress-alt.svg +3 -0
- package/src/icons/copy.svg +9 -0
- package/src/icons/date.svg +9 -0
- package/src/icons/department.svg +17 -0
- package/src/icons/desk-empty.svg +25 -0
- package/src/icons/dot.svg +11 -0
- package/src/icons/down-arrow-bold.svg +10 -0
- package/src/icons/download.svg +4 -0
- package/src/icons/drag-bar.svg +13 -0
- package/src/icons/drag.svg +8 -0
- package/src/icons/edit.svg +8 -0
- package/src/icons/ellipsis-v.svg +9 -0
- package/src/icons/enter.svg +4 -0
- package/src/icons/exchange.svg +7 -0
- package/src/icons/expand-alt.svg +3 -0
- package/src/icons/fail.svg +8 -0
- package/src/icons/file.svg +8 -0
- package/src/icons/filter.svg +7 -0
- package/src/icons/folder.svg +9 -0
- package/src/icons/function.svg +4 -0
- package/src/icons/home.svg +7 -0
- package/src/icons/image.svg +1 -0
- package/src/icons/info-circle.svg +7 -0
- package/src/icons/info.svg +8 -0
- package/src/icons/input-clear.svg +1 -0
- package/src/icons/invisible.svg +10 -0
- package/src/icons/left-arrow.svg +7 -0
- package/src/icons/loading-outline.svg +4 -0
- package/src/icons/location.svg +10 -0
- package/src/icons/menu.svg +2 -0
- package/src/icons/minus.svg +7 -0
- package/src/icons/move.svg +8 -0
- package/src/icons/mute.svg +4 -0
- package/src/icons/pause.svg +5 -0
- package/src/icons/pencil.svg +7 -0
- package/src/icons/play.svg +4 -0
- package/src/icons/plus-cicle.svg +9 -0
- package/src/icons/plus-fine.svg +10 -0
- package/src/icons/plus.svg +9 -0
- package/src/icons/post.svg +15 -0
- package/src/icons/question-mark.svg +12 -0
- package/src/icons/question.svg +7 -0
- package/src/icons/redo.svg +7 -0
- package/src/icons/refresh.svg +7 -0
- package/src/icons/reload.svg +6 -0
- package/src/icons/remove.svg +10 -0
- package/src/icons/retry.svg +8 -0
- package/src/icons/right-arrow-bold.svg +7 -0
- package/src/icons/right-arrow.svg +7 -0
- package/src/icons/role.svg +14 -0
- package/src/icons/schedule.svg +9 -0
- package/src/icons/search.svg +4 -0
- package/src/icons/setting.svg +9 -0
- package/src/icons/slider-handle-icon.svg +6 -0
- package/src/icons/sort-asc.svg +7 -0
- package/src/icons/sort-default.svg +9 -0
- package/src/icons/sort-desc.svg +7 -0
- package/src/icons/star.svg +12 -0
- package/src/icons/status-close.svg +10 -0
- package/src/icons/status-fail.svg +10 -0
- package/src/icons/status-info.svg +8 -0
- package/src/icons/status-success.svg +10 -0
- package/src/icons/status-warning.svg +8 -0
- package/src/icons/success.svg +10 -0
- package/src/icons/transparent.svg +11 -0
- package/src/icons/trash.svg +8 -0
- package/src/icons/tree-down.svg +5 -0
- package/src/icons/undo.svg +7 -0
- package/src/icons/upload.svg +9 -0
- package/src/icons/user-remove.svg +12 -0
- package/src/icons/view.svg +10 -0
- package/src/icons/volume.svg +5 -0
- package/src/icons/warning-mark.svg +13 -0
- package/src/icons/warning.svg +7 -0
- package/src/icons/window-restore.svg +7 -0
- package/src/icons/zoom-in.svg +7 -0
- package/src/icons/zoom-out.svg +7 -0
- package/src/index.tsx +11 -0
- package/src/locale/de-DE.ts +357 -0
- package/src/locale/en-US.ts +346 -0
- package/src/locale/zh-CN.ts +351 -0
- package/src/themes/ang.ts +8 -0
- package/src/themes/antd.ts +44 -0
- package/src/themes/cxd.ts +458 -0
- package/src/themes/dark.ts +16 -0
- package/src/themes/default.ts +5 -0
- package/tsconfig.json +14 -0
- package/tsconfig.tsbuildinfo +1 -0
|
@@ -0,0 +1,756 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* amis-ui v1.0.0-beta.0
|
|
3
|
+
* Copyright 2018-2022 fex
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { __extends, __assign, __decorate, __metadata, __rest } from 'tslib';
|
|
7
|
+
import { uncontrollable } from 'uncontrollable';
|
|
8
|
+
import React__default from 'react';
|
|
9
|
+
import VirtualList from './virtual-list/index.js';
|
|
10
|
+
import Overlay from './Overlay.js';
|
|
11
|
+
import PopOver from './PopOver.js';
|
|
12
|
+
import TooltipWrapper from './TooltipWrapper.js';
|
|
13
|
+
import Downshift from 'downshift';
|
|
14
|
+
import { Icon } from './icons.js';
|
|
15
|
+
import { matchSorter } from 'match-sorter';
|
|
16
|
+
import { isMobile, noop, ucFirst, autobind, themeable, localeable, normalizeNodePath, isObject, findTree, highlight } from 'amis-core';
|
|
17
|
+
import isPlainObject from 'lodash/isPlainObject';
|
|
18
|
+
import { findDOMNode } from 'react-dom';
|
|
19
|
+
import CheckBox from './Checkbox.js';
|
|
20
|
+
import Input from './Input.js';
|
|
21
|
+
import Spinner from './Spinner.js';
|
|
22
|
+
import { withRemoteConfig } from './WithRemoteConfig.js';
|
|
23
|
+
import PopUp from './PopUp.js';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @file Select
|
|
27
|
+
* @description
|
|
28
|
+
* @author fex
|
|
29
|
+
* @date 2017-11-07
|
|
30
|
+
*/
|
|
31
|
+
function value2array(value, props, enableNodePath) {
|
|
32
|
+
if (enableNodePath === void 0) { enableNodePath = false; }
|
|
33
|
+
if (enableNodePath) {
|
|
34
|
+
value = normalizeNodePath(value, enableNodePath, props.labelField, props.valueField, props.pathSeparator, props.delimiter).nodeValueArray;
|
|
35
|
+
}
|
|
36
|
+
if (props.multi || props.multiple) {
|
|
37
|
+
if (typeof value === 'string') {
|
|
38
|
+
value = value.split(props.delimiter || ',');
|
|
39
|
+
}
|
|
40
|
+
if (!Array.isArray(value)) {
|
|
41
|
+
if (value === null || value === undefined) {
|
|
42
|
+
return [];
|
|
43
|
+
}
|
|
44
|
+
value = [value];
|
|
45
|
+
}
|
|
46
|
+
return value
|
|
47
|
+
.map(function (value) {
|
|
48
|
+
return expandValue(value, props.options, props.valueField) ||
|
|
49
|
+
(isObject(value) && value.hasOwnProperty(props.valueField || 'value')
|
|
50
|
+
? value
|
|
51
|
+
: undefined);
|
|
52
|
+
})
|
|
53
|
+
.filter(function (item) { return item; });
|
|
54
|
+
}
|
|
55
|
+
else if (Array.isArray(value)) {
|
|
56
|
+
value = value[0];
|
|
57
|
+
}
|
|
58
|
+
var expandedValue = expandValue(value, props.options, props.valueField);
|
|
59
|
+
return expandedValue
|
|
60
|
+
? [expandedValue]
|
|
61
|
+
: isObject(value) &&
|
|
62
|
+
value.hasOwnProperty(props.valueField || 'value')
|
|
63
|
+
? [value]
|
|
64
|
+
: [];
|
|
65
|
+
}
|
|
66
|
+
function expandValue(value, options, valueField) {
|
|
67
|
+
var _a;
|
|
68
|
+
if (valueField === void 0) { valueField = 'value'; }
|
|
69
|
+
var valueType = typeof value;
|
|
70
|
+
if (valueType !== 'string' &&
|
|
71
|
+
valueType !== 'number' &&
|
|
72
|
+
valueType !== 'boolean' &&
|
|
73
|
+
valueType !== 'object') {
|
|
74
|
+
return value;
|
|
75
|
+
}
|
|
76
|
+
if (!options) {
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
if (valueType === 'object' &&
|
|
80
|
+
value &&
|
|
81
|
+
value.hasOwnProperty(valueField || 'value')) {
|
|
82
|
+
value = (_a = value[valueField || 'value']) !== null && _a !== void 0 ? _a : '';
|
|
83
|
+
}
|
|
84
|
+
return findTree(options, optionValueCompare(value, valueField || 'value'));
|
|
85
|
+
}
|
|
86
|
+
function matchOptionValue(a, b, valueField) {
|
|
87
|
+
if (valueField === void 0) { valueField = 'value'; }
|
|
88
|
+
return isObject(a)
|
|
89
|
+
? a === b[valueField || 'value']
|
|
90
|
+
: String(b[valueField || 'value']) === String(a);
|
|
91
|
+
}
|
|
92
|
+
function optionValueCompare(a, valueField) {
|
|
93
|
+
if (valueField === void 0) { valueField = 'value'; }
|
|
94
|
+
return function (b) { return matchOptionValue(a, b, valueField); };
|
|
95
|
+
}
|
|
96
|
+
function normalizeOptions(options, share, valueField) {
|
|
97
|
+
if (share === void 0) { share = {
|
|
98
|
+
values: [],
|
|
99
|
+
options: []
|
|
100
|
+
}; }
|
|
101
|
+
if (valueField === void 0) { valueField = 'value'; }
|
|
102
|
+
if (typeof options === 'string') {
|
|
103
|
+
return options.split(',').map(function (item) {
|
|
104
|
+
var idx = share.values.indexOf(item);
|
|
105
|
+
if (~idx) {
|
|
106
|
+
return share.options[idx];
|
|
107
|
+
}
|
|
108
|
+
var option = {
|
|
109
|
+
label: item,
|
|
110
|
+
value: item
|
|
111
|
+
};
|
|
112
|
+
share.values.push(option.value);
|
|
113
|
+
share.options.push(option);
|
|
114
|
+
return option;
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
else if (Array.isArray(options) &&
|
|
118
|
+
typeof options[0] === 'string') {
|
|
119
|
+
return options.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
|
+
return options.map(function (item) {
|
|
135
|
+
var value = item && item[valueField];
|
|
136
|
+
var idx = value !== undefined && !item.children
|
|
137
|
+
? share.values.indexOf(value)
|
|
138
|
+
: -1;
|
|
139
|
+
if (~idx) {
|
|
140
|
+
return share.options[idx];
|
|
141
|
+
}
|
|
142
|
+
var option = __assign(__assign({}, item), { value: value });
|
|
143
|
+
if (typeof option.children !== 'undefined') {
|
|
144
|
+
option.children = normalizeOptions(option.children, share, valueField);
|
|
145
|
+
}
|
|
146
|
+
else if (value !== undefined) {
|
|
147
|
+
share.values.push(value);
|
|
148
|
+
share.options.push(option);
|
|
149
|
+
}
|
|
150
|
+
return option;
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
else if (isPlainObject(options)) {
|
|
154
|
+
return Object.keys(options).map(function (key) {
|
|
155
|
+
var idx = share.values.indexOf(key);
|
|
156
|
+
if (~idx) {
|
|
157
|
+
return share.options[idx];
|
|
158
|
+
}
|
|
159
|
+
var option = {
|
|
160
|
+
label: options[key],
|
|
161
|
+
value: key
|
|
162
|
+
};
|
|
163
|
+
share.values.push(option.value);
|
|
164
|
+
share.options.push(option);
|
|
165
|
+
return option;
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
return [];
|
|
169
|
+
}
|
|
170
|
+
var DownshiftChangeTypes = Downshift.stateChangeTypes;
|
|
171
|
+
var Select = /** @class */ (function (_super) {
|
|
172
|
+
__extends(Select, _super);
|
|
173
|
+
function Select(props) {
|
|
174
|
+
var _this = _super.call(this, props) || this;
|
|
175
|
+
_this.menu = React__default.createRef();
|
|
176
|
+
_this.state = {
|
|
177
|
+
isOpen: props.defaultOpen || false,
|
|
178
|
+
isFocused: false,
|
|
179
|
+
inputValue: '',
|
|
180
|
+
highlightedIndex: -1,
|
|
181
|
+
selection: value2array(props.value, props),
|
|
182
|
+
itemHeight: 35,
|
|
183
|
+
pickerSelectItem: ''
|
|
184
|
+
};
|
|
185
|
+
return _this;
|
|
186
|
+
}
|
|
187
|
+
Select.prototype.componentDidMount = function () {
|
|
188
|
+
var loadOptions = this.props.loadOptions;
|
|
189
|
+
loadOptions && loadOptions('');
|
|
190
|
+
};
|
|
191
|
+
Select.prototype.componentDidUpdate = function (prevProps) {
|
|
192
|
+
var props = this.props;
|
|
193
|
+
var fn = noop;
|
|
194
|
+
if (JSON.stringify(props.value) !== JSON.stringify(prevProps.value) ||
|
|
195
|
+
JSON.stringify(props.options) !== JSON.stringify(prevProps.options)) {
|
|
196
|
+
var selection = value2array(props.value, props);
|
|
197
|
+
this.setState({
|
|
198
|
+
selection: selection
|
|
199
|
+
}, fn);
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
Select.prototype.open = function () {
|
|
203
|
+
var _this = this;
|
|
204
|
+
this.props.disabled ||
|
|
205
|
+
this.setState({
|
|
206
|
+
isOpen: true,
|
|
207
|
+
highlightedIndex: -1
|
|
208
|
+
}, function () { return setTimeout(_this.focus, 500); });
|
|
209
|
+
};
|
|
210
|
+
Select.prototype.close = function () {
|
|
211
|
+
this.setState({
|
|
212
|
+
isOpen: false
|
|
213
|
+
});
|
|
214
|
+
};
|
|
215
|
+
Select.prototype.confirm = function () {
|
|
216
|
+
// @ts-ignore
|
|
217
|
+
this.handleChange(this.state.pickerSelectItem);
|
|
218
|
+
this.setState({
|
|
219
|
+
isOpen: false
|
|
220
|
+
});
|
|
221
|
+
};
|
|
222
|
+
Select.prototype.toggle = function (e) {
|
|
223
|
+
var _this = this;
|
|
224
|
+
if (e &&
|
|
225
|
+
this.menu.current &&
|
|
226
|
+
this.menu.current.contains(e.target)) {
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
this.props.disabled ||
|
|
230
|
+
this.setState({
|
|
231
|
+
isOpen: !this.state.isOpen,
|
|
232
|
+
highlightedIndex: -1
|
|
233
|
+
}, this.state.isOpen ? undefined : function () { return setTimeout(_this.focus, 500); });
|
|
234
|
+
};
|
|
235
|
+
Select.prototype.onFocus = function (e) {
|
|
236
|
+
var simpleValue = this.props.simpleValue;
|
|
237
|
+
var selection = this.state.selection;
|
|
238
|
+
var value = simpleValue ? selection.map(function (item) { return item.value; }) : selection;
|
|
239
|
+
this.props.disabled ||
|
|
240
|
+
this.state.isOpen ||
|
|
241
|
+
this.setState({
|
|
242
|
+
isFocused: true
|
|
243
|
+
}, this.focus);
|
|
244
|
+
this.props.onFocus &&
|
|
245
|
+
this.props.onFocus(__assign(__assign({}, e), { value: value }));
|
|
246
|
+
};
|
|
247
|
+
Select.prototype.onBlur = function (e) {
|
|
248
|
+
var simpleValue = this.props.simpleValue;
|
|
249
|
+
var selection = this.state.selection;
|
|
250
|
+
var value = simpleValue ? selection.map(function (item) { return item.value; }) : selection;
|
|
251
|
+
this.setState({
|
|
252
|
+
isFocused: false
|
|
253
|
+
});
|
|
254
|
+
this.props.onBlur &&
|
|
255
|
+
this.props.onBlur(__assign(__assign({}, e), { value: value }));
|
|
256
|
+
};
|
|
257
|
+
Select.prototype.focus = function () {
|
|
258
|
+
this.input
|
|
259
|
+
? this.input.focus()
|
|
260
|
+
: this.getTarget() && this.getTarget().focus();
|
|
261
|
+
};
|
|
262
|
+
Select.prototype.blur = function () {
|
|
263
|
+
this.input
|
|
264
|
+
? this.input.blur()
|
|
265
|
+
: this.getTarget() && this.getTarget().blur();
|
|
266
|
+
};
|
|
267
|
+
Select.prototype.getTarget = function () {
|
|
268
|
+
if (!this.target) {
|
|
269
|
+
this.target = findDOMNode(this);
|
|
270
|
+
}
|
|
271
|
+
return this.target;
|
|
272
|
+
};
|
|
273
|
+
Select.prototype.inputRef = function (ref) {
|
|
274
|
+
this.input = ref;
|
|
275
|
+
};
|
|
276
|
+
Select.prototype.toggleCheckAll = function () {
|
|
277
|
+
var _a = this.props, options = _a.options, onChange = _a.onChange, simpleValue = _a.simpleValue, checkAllBySearch = _a.checkAllBySearch, labelField = _a.labelField, valueField = _a.valueField;
|
|
278
|
+
var inputValue = this.state.inputValue;
|
|
279
|
+
var selection = this.state.selection;
|
|
280
|
+
var filtedOptions = inputValue && checkAllBySearch
|
|
281
|
+
? matchSorter(options, inputValue, {
|
|
282
|
+
keys: [labelField || 'label', valueField || 'value']
|
|
283
|
+
})
|
|
284
|
+
: options.concat();
|
|
285
|
+
var optionsValues = filtedOptions.map(function (option) { return option.value; });
|
|
286
|
+
var selectionValues = selection.map(function (select) { return select.value; });
|
|
287
|
+
var checkedAll = optionsValues.every(function (option) { return selectionValues.indexOf(option) > -1; });
|
|
288
|
+
selection = checkedAll ? [] : filtedOptions;
|
|
289
|
+
onChange(simpleValue ? selection.map(function (item) { return item.value; }) : selection);
|
|
290
|
+
};
|
|
291
|
+
Select.prototype.removeItem = function (index, e) {
|
|
292
|
+
var _a = this.props, onChange = _a.onChange, simpleValue = _a.simpleValue, disabled = _a.disabled;
|
|
293
|
+
if (disabled) {
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
var value = this.state.selection;
|
|
297
|
+
e && e.stopPropagation();
|
|
298
|
+
value = Array.isArray(value) ? value.concat() : [value];
|
|
299
|
+
value.splice(index, 1);
|
|
300
|
+
onChange(simpleValue ? value.map(function (item) { return item.value; }) : value);
|
|
301
|
+
};
|
|
302
|
+
Select.prototype.handleInputChange = function (evt) {
|
|
303
|
+
var _this = this;
|
|
304
|
+
var loadOptions = this.props.loadOptions;
|
|
305
|
+
this.setState({
|
|
306
|
+
inputValue: evt.currentTarget.value
|
|
307
|
+
}, function () { return loadOptions && loadOptions(_this.state.inputValue); });
|
|
308
|
+
};
|
|
309
|
+
Select.prototype.handlePickerChange = function (selectItem, index, confirm) {
|
|
310
|
+
if (!this.props.multiple) {
|
|
311
|
+
selectItem = selectItem[0];
|
|
312
|
+
}
|
|
313
|
+
this.setState({
|
|
314
|
+
pickerSelectItem: selectItem
|
|
315
|
+
});
|
|
316
|
+
// 直接选中选项
|
|
317
|
+
if (confirm) {
|
|
318
|
+
this.handleChange(selectItem);
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
Select.prototype.handleChange = function (selectItem) {
|
|
322
|
+
var _a = this.props, onChange = _a.onChange, multiple = _a.multiple, simpleValue = _a.simpleValue, valueField = _a.valueField;
|
|
323
|
+
var selection = this.state.selection;
|
|
324
|
+
if (multiple) {
|
|
325
|
+
var selectionValues = selection.map(function (item) { return item[valueField]; });
|
|
326
|
+
selection = selection.concat();
|
|
327
|
+
var idx = selectionValues.indexOf(selectItem[valueField]);
|
|
328
|
+
if (~idx) {
|
|
329
|
+
selection.splice(idx, 1);
|
|
330
|
+
}
|
|
331
|
+
else {
|
|
332
|
+
selection.push(selectItem);
|
|
333
|
+
}
|
|
334
|
+
onChange(simpleValue ? selection.map(function (item) { return item[valueField]; }) : selection);
|
|
335
|
+
}
|
|
336
|
+
else {
|
|
337
|
+
onChange(simpleValue ? selectItem[valueField] : selectItem);
|
|
338
|
+
}
|
|
339
|
+
};
|
|
340
|
+
Select.prototype.handleStateChange = function (changes) {
|
|
341
|
+
var _a = this.props, multiple = _a.multiple, checkAll = _a.checkAll;
|
|
342
|
+
var update = {};
|
|
343
|
+
switch (changes.type) {
|
|
344
|
+
case DownshiftChangeTypes.keyDownEnter:
|
|
345
|
+
case DownshiftChangeTypes.clickItem:
|
|
346
|
+
update = __assign(__assign({}, update), { isOpen: multiple ? true : false, isFocused: multiple && checkAll ? true : false });
|
|
347
|
+
break;
|
|
348
|
+
case DownshiftChangeTypes.controlledPropUpdatedSelectedItem:
|
|
349
|
+
break;
|
|
350
|
+
case DownshiftChangeTypes.changeInput:
|
|
351
|
+
update.highlightedIndex = 0;
|
|
352
|
+
break;
|
|
353
|
+
case DownshiftChangeTypes.keyDownArrowDown:
|
|
354
|
+
case DownshiftChangeTypes.keyDownArrowUp:
|
|
355
|
+
case DownshiftChangeTypes.itemMouseEnter:
|
|
356
|
+
update = __assign(__assign({}, update), changes);
|
|
357
|
+
break;
|
|
358
|
+
}
|
|
359
|
+
if (Object.keys(update).length) {
|
|
360
|
+
this.setState(update);
|
|
361
|
+
}
|
|
362
|
+
};
|
|
363
|
+
Select.prototype.handleKeyPress = function (e) {
|
|
364
|
+
if (this.props.multiple && e.key === ' ') {
|
|
365
|
+
this.toggle();
|
|
366
|
+
e.preventDefault();
|
|
367
|
+
}
|
|
368
|
+
};
|
|
369
|
+
Select.prototype.clearValue = function (e) {
|
|
370
|
+
var onChange = this.props.onChange;
|
|
371
|
+
e.preventDefault();
|
|
372
|
+
e.stopPropagation();
|
|
373
|
+
onChange(this.props.resetValue);
|
|
374
|
+
};
|
|
375
|
+
Select.prototype.clearSearchValue = function () {
|
|
376
|
+
var loadOptions = this.props.loadOptions;
|
|
377
|
+
this.setState({
|
|
378
|
+
inputValue: ''
|
|
379
|
+
}, function () { return loadOptions === null || loadOptions === void 0 ? void 0 : loadOptions(''); });
|
|
380
|
+
};
|
|
381
|
+
Select.prototype.handleAddClick = function () {
|
|
382
|
+
var onAdd = this.props.onAdd;
|
|
383
|
+
onAdd && onAdd();
|
|
384
|
+
};
|
|
385
|
+
Select.prototype.handleEditClick = function (e, item) {
|
|
386
|
+
var onEdit = this.props.onEdit;
|
|
387
|
+
e.preventDefault();
|
|
388
|
+
e.stopPropagation();
|
|
389
|
+
onEdit && onEdit(item);
|
|
390
|
+
};
|
|
391
|
+
Select.prototype.handleDeleteClick = function (e, item) {
|
|
392
|
+
var onDelete = this.props.onDelete;
|
|
393
|
+
e.preventDefault();
|
|
394
|
+
e.stopPropagation();
|
|
395
|
+
onDelete && onDelete(item);
|
|
396
|
+
};
|
|
397
|
+
Select.prototype.menuItemRef = function (ref) {
|
|
398
|
+
ref && this.setState({ itemHeight: ref.offsetHeight });
|
|
399
|
+
};
|
|
400
|
+
Select.prototype.renderValue = function (_a) {
|
|
401
|
+
var _this = this;
|
|
402
|
+
_a.inputValue; _a.isOpen;
|
|
403
|
+
var _b = this.props, cx = _b.classnames, multiple = _b.multiple, valuesNoWrap = _b.valuesNoWrap, placeholder = _b.placeholder, labelField = _b.labelField, disabled = _b.disabled, __ = _b.translate;
|
|
404
|
+
var selection = this.state.selection;
|
|
405
|
+
// console.log('selection', selection);
|
|
406
|
+
if (!selection.length) {
|
|
407
|
+
return (React__default.createElement("div", { key: "placeholder", className: cx('Select-placeholder') }, __(placeholder)));
|
|
408
|
+
}
|
|
409
|
+
return selection.map(function (item, index) {
|
|
410
|
+
if (!multiple) {
|
|
411
|
+
return (React__default.createElement("div", { className: cx('Select-value', {
|
|
412
|
+
'is-disabled': disabled,
|
|
413
|
+
'is-invalid': item.__unmatched
|
|
414
|
+
}), key: index }, item[labelField || 'label']));
|
|
415
|
+
}
|
|
416
|
+
return valuesNoWrap ? ("".concat(item[labelField || 'label']).concat(index === selection.length - 1 ? '' : ' + ')) : (React__default.createElement(TooltipWrapper, { placement: 'top', tooltip: item[labelField || 'label'], trigger: 'hover', key: index },
|
|
417
|
+
React__default.createElement("div", { className: cx('Select-value', {
|
|
418
|
+
'is-disabled': disabled,
|
|
419
|
+
'is-invalid': item.__unmatched
|
|
420
|
+
}) },
|
|
421
|
+
React__default.createElement("span", { className: cx('Select-valueLabel') }, item[labelField || 'label']),
|
|
422
|
+
React__default.createElement("span", { className: cx('Select-valueIcon', {
|
|
423
|
+
'is-disabled': disabled || item.disabled
|
|
424
|
+
}), onClick: _this.removeItem.bind(_this, index) },
|
|
425
|
+
React__default.createElement(Icon, { icon: "close", className: "icon" })))));
|
|
426
|
+
});
|
|
427
|
+
};
|
|
428
|
+
Select.prototype.renderOuter = function (_a) {
|
|
429
|
+
var _this = this;
|
|
430
|
+
var selectedItem = _a.selectedItem, getItemProps = _a.getItemProps, highlightedIndex = _a.highlightedIndex, inputValue = _a.inputValue, isOpen = _a.isOpen; _a.getToggleButtonProps; var getInputProps = _a.getInputProps;
|
|
431
|
+
var _b = this.props, popOverContainer = _b.popOverContainer, options = _b.options; _b.value; var valueField = _b.valueField, labelField = _b.labelField, noResultsText = _b.noResultsText, loadOptions = _b.loadOptions, creatable = _b.creatable, multiple = _b.multiple, valuesNoWrap = _b.valuesNoWrap, cx = _b.classnames; _b.popoverClassName; var checkAll = _b.checkAll, checkAllLabel = _b.checkAllLabel, checkAllBySearch = _b.checkAllBySearch, searchable = _b.searchable, createBtnLabel = _b.createBtnLabel, disabled = _b.disabled, searchPromptText = _b.searchPromptText, editable = _b.editable, removable = _b.removable, overlayPlacement = _b.overlayPlacement, __ = _b.translate, hideSelected = _b.hideSelected, renderMenu = _b.renderMenu; _b.mobileClassName; var _c = _b.useMobileUI, useMobileUI = _c === void 0 ? false : _c;
|
|
432
|
+
var selection = this.state.selection;
|
|
433
|
+
var checkedAll = false;
|
|
434
|
+
var checkedPartial = false;
|
|
435
|
+
var filtedOptions = (inputValue && isOpen && !loadOptions
|
|
436
|
+
? matchSorter(options, inputValue, {
|
|
437
|
+
keys: [labelField || 'label', valueField || 'value']
|
|
438
|
+
})
|
|
439
|
+
: options.concat()).filter(function (option) { return !option.hidden && option.visible !== false; });
|
|
440
|
+
var selectionValues = selection.map(function (select) { return select[valueField]; });
|
|
441
|
+
if (multiple && checkAll) {
|
|
442
|
+
var optionsValues = (checkAllBySearch ? filtedOptions : options).map(function (option) { return option[valueField]; });
|
|
443
|
+
checkedAll = optionsValues.every(function (option) { return selectionValues.indexOf(option) > -1; });
|
|
444
|
+
checkedPartial = optionsValues.some(function (option) { return selectionValues.indexOf(option) > -1; });
|
|
445
|
+
}
|
|
446
|
+
var itemHeight = this.state.itemHeight;
|
|
447
|
+
// 渲染单个选项
|
|
448
|
+
var renderItem = function (_a) {
|
|
449
|
+
var index = _a.index, style = _a.style;
|
|
450
|
+
var item = filtedOptions[index];
|
|
451
|
+
if (!item) {
|
|
452
|
+
return null;
|
|
453
|
+
}
|
|
454
|
+
var checked = selectedItem === item || !!~selectionValues.indexOf(item[valueField]);
|
|
455
|
+
if (hideSelected && checked) {
|
|
456
|
+
return null;
|
|
457
|
+
}
|
|
458
|
+
return (React__default.createElement("div", __assign({}, getItemProps({
|
|
459
|
+
key: typeof item.value === 'string'
|
|
460
|
+
? "".concat(item.label, "-").concat(item.value)
|
|
461
|
+
: index,
|
|
462
|
+
index: index,
|
|
463
|
+
item: item,
|
|
464
|
+
disabled: item.disabled
|
|
465
|
+
}), { style: style, className: cx("Select-option", {
|
|
466
|
+
'is-disabled': item.disabled,
|
|
467
|
+
'is-highlight': highlightedIndex === index,
|
|
468
|
+
'is-active': checked
|
|
469
|
+
}) }),
|
|
470
|
+
removable ? (React__default.createElement("a", { "data-tooltip": __('Select.clear'), "data-position": "left" },
|
|
471
|
+
React__default.createElement(Icon, { icon: "close", className: "icon", onClick: function (e) { return _this.handleDeleteClick(e, item); } }))) : null,
|
|
472
|
+
editable ? (React__default.createElement("a", { "data-tooltip": "\u7F16\u8F91", "data-position": "left" },
|
|
473
|
+
React__default.createElement(Icon, { icon: "pencil", className: "icon", onClick: function (e) { return _this.handleEditClick(e, item); } }))) : null,
|
|
474
|
+
renderMenu ? (multiple ? (React__default.createElement(CheckBox, { checked: checked, trueValue: item.value, onChange: function () {
|
|
475
|
+
_this.handleChange(item);
|
|
476
|
+
}, disabled: item.disabled }, renderMenu(item, {
|
|
477
|
+
multiple: multiple,
|
|
478
|
+
checkAll: checkAll,
|
|
479
|
+
checked: checked,
|
|
480
|
+
onChange: function () { return _this.handleChange(item); },
|
|
481
|
+
inputValue: inputValue || '',
|
|
482
|
+
searchable: searchable,
|
|
483
|
+
index: index
|
|
484
|
+
}))) : (renderMenu(item, {
|
|
485
|
+
multiple: multiple,
|
|
486
|
+
checkAll: checkAll,
|
|
487
|
+
checked: checked,
|
|
488
|
+
onChange: function () { return _this.handleChange(item); },
|
|
489
|
+
inputValue: inputValue || '',
|
|
490
|
+
searchable: searchable,
|
|
491
|
+
index: index
|
|
492
|
+
}))) : multiple ? (React__default.createElement(CheckBox, { checked: checked, trueValue: item.value, onChange: function () {
|
|
493
|
+
_this.handleChange(item);
|
|
494
|
+
}, disabled: item.disabled, size: "sm" },
|
|
495
|
+
item.disabled
|
|
496
|
+
? item[labelField]
|
|
497
|
+
: highlight(item[labelField], inputValue, cx('Select-option-hl')),
|
|
498
|
+
item.tip)) : (React__default.createElement("span", null,
|
|
499
|
+
item.disabled
|
|
500
|
+
? item[labelField]
|
|
501
|
+
: highlight(item[labelField], inputValue, cx('Select-option-hl')),
|
|
502
|
+
item.tip))));
|
|
503
|
+
};
|
|
504
|
+
var mobileUI = isMobile() && useMobileUI;
|
|
505
|
+
var menu = (React__default.createElement("div", { ref: this.menu, className: cx('Select-menu', {
|
|
506
|
+
'Select--longlist': filtedOptions.length && filtedOptions.length > 100,
|
|
507
|
+
'is-mobile': mobileUI
|
|
508
|
+
}) },
|
|
509
|
+
searchable ? (React__default.createElement("div", { className: cx("Select-input", {
|
|
510
|
+
'is-focused': this.state.isFocused
|
|
511
|
+
}) },
|
|
512
|
+
React__default.createElement(Icon, { icon: "search", className: "icon" }),
|
|
513
|
+
React__default.createElement(Input, __assign({}, getInputProps({
|
|
514
|
+
onFocus: this.onFocus,
|
|
515
|
+
onBlur: this.onBlur,
|
|
516
|
+
disabled: disabled,
|
|
517
|
+
placeholder: __(searchPromptText),
|
|
518
|
+
onChange: this.handleInputChange,
|
|
519
|
+
ref: this.inputRef
|
|
520
|
+
}))),
|
|
521
|
+
(inputValue === null || inputValue === void 0 ? void 0 : inputValue.length) ? (React__default.createElement("a", { onClick: this.clearSearchValue, className: cx('Select-clear') },
|
|
522
|
+
React__default.createElement(Icon, { icon: "close", className: "icon" }))) : null)) : null,
|
|
523
|
+
multiple && valuesNoWrap ? (React__default.createElement("div", { className: cx('Select-option') },
|
|
524
|
+
"\u5DF2\u9009\u62E9(",
|
|
525
|
+
selectionValues.length,
|
|
526
|
+
")")) : null,
|
|
527
|
+
multiple && checkAll && filtedOptions.length ? (React__default.createElement("div", { className: cx('Select-option') },
|
|
528
|
+
React__default.createElement(CheckBox, { checked: checkedPartial, partial: checkedPartial && !checkedAll, onChange: this.toggleCheckAll, size: "sm" }, __(checkAllLabel)))) : null,
|
|
529
|
+
React__default.createElement("div", { ref: this.menuItemRef, className: cx('Select-option invisible') }, multiple ? (React__default.createElement(CheckBox, { size: "sm" }, "Placeholder")) : (React__default.createElement("span", null, "Placeholder"))),
|
|
530
|
+
creatable && !disabled ? (React__default.createElement("a", { className: cx('Select-addBtn'), onClick: this.handleAddClick },
|
|
531
|
+
React__default.createElement(Icon, { icon: "plus", className: "icon" }),
|
|
532
|
+
__(createBtnLabel))) : null,
|
|
533
|
+
filtedOptions.length ? (filtedOptions.length > 100 ? ( // 超过 100 行数据才启用 virtuallist 避免滚动条问题
|
|
534
|
+
React__default.createElement(VirtualList, { height: filtedOptions.length > 8
|
|
535
|
+
? 266
|
|
536
|
+
: filtedOptions.length * itemHeight, itemCount: filtedOptions.length, itemSize: itemHeight, renderItem: renderItem })) : (filtedOptions.map(function (item, index) {
|
|
537
|
+
return renderItem({ index: index });
|
|
538
|
+
}))) : (React__default.createElement("div", { className: cx('Select-noResult') }, __(noResultsText)))));
|
|
539
|
+
return mobileUI ? (React__default.createElement(PopUp, { className: cx("Select-popup"), container: popOverContainer, isShow: this.state.isOpen, onHide: this.close }, menu)) : (React__default.createElement(Overlay, { container: popOverContainer || this.getTarget, target: this.getTarget, placement: overlayPlacement, show: true },
|
|
540
|
+
React__default.createElement(PopOver, { overlay: true, className: cx('Select-popover'), style: {
|
|
541
|
+
minWidth: this.target ? this.target.offsetWidth : 'auto'
|
|
542
|
+
}, onHide: this.close }, menu)));
|
|
543
|
+
};
|
|
544
|
+
Select.prototype.render = function () {
|
|
545
|
+
var _this = this;
|
|
546
|
+
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, useMobileUI = _a.useMobileUI, hasError = _a.hasError;
|
|
547
|
+
var selection = this.state.selection;
|
|
548
|
+
var inputValue = this.state.inputValue;
|
|
549
|
+
var resetValue = this.props.resetValue;
|
|
550
|
+
var mobileUI = useMobileUI && isMobile();
|
|
551
|
+
return (React__default.createElement(Downshift, { selectedItem: selection, highlightedIndex: this.state.highlightedIndex, isOpen: this.state.isOpen, inputValue: inputValue, onChange:
|
|
552
|
+
/*展示 Checkbox 的时候,会出发多次 onChange 原因待查*/
|
|
553
|
+
multiple ? noop : this.handleChange, onStateChange: this.handleStateChange, itemToString: function (item) { return (item ? "".concat(item[labelField]) : ''); } }, function (options) {
|
|
554
|
+
var _a;
|
|
555
|
+
var isOpen = options.isOpen;
|
|
556
|
+
return (React__default.createElement("div", { tabIndex: disabled ? -1 : 0, onKeyPress: _this.handleKeyPress, onClick: _this.toggle, onFocus: _this.onFocus, onBlur: _this.onBlur, className: cx("Select", (_a = {},
|
|
557
|
+
_a["Select--multi"] = multiple,
|
|
558
|
+
_a["Select--inline"] = inline,
|
|
559
|
+
_a["Select--block"] = block,
|
|
560
|
+
_a["Select--searchable"] = searchable,
|
|
561
|
+
_a['is-opened'] = isOpen,
|
|
562
|
+
_a['is-focused'] = _this.state.isFocused,
|
|
563
|
+
_a['is-disabled'] = disabled,
|
|
564
|
+
_a['is-mobile'] = mobileUI,
|
|
565
|
+
_a['is-error'] = hasError,
|
|
566
|
+
_a["Select--border".concat(ucFirst(borderMode))] = borderMode,
|
|
567
|
+
_a), className) },
|
|
568
|
+
React__default.createElement("div", { className: cx("Select-valueWrap", {
|
|
569
|
+
'Select-valuesNoWrap': valuesNoWrap
|
|
570
|
+
}) }, _this.renderValue(options)),
|
|
571
|
+
clearable &&
|
|
572
|
+
!disabled &&
|
|
573
|
+
(Array.isArray(value)
|
|
574
|
+
? value.length
|
|
575
|
+
: value != null && value !== resetValue) ? (React__default.createElement("a", { onClick: _this.clearValue, className: cx('Select-clear') },
|
|
576
|
+
React__default.createElement(Icon, { icon: "close-small", className: "icon" }))) : null,
|
|
577
|
+
loading ? (React__default.createElement(Spinner, { show: true, icon: "reload", size: "sm", spinnerClassName: cx('Select-spinner') })) : null,
|
|
578
|
+
React__default.createElement("span", { className: cx('Select-arrow') },
|
|
579
|
+
React__default.createElement(Icon, { icon: "right-arrow-bold", className: "icon" })),
|
|
580
|
+
isOpen ? _this.renderOuter(options) : null));
|
|
581
|
+
}));
|
|
582
|
+
};
|
|
583
|
+
Select.defaultProps = {
|
|
584
|
+
multiple: false,
|
|
585
|
+
clearable: true,
|
|
586
|
+
creatable: false,
|
|
587
|
+
createBtnLabel: 'Select.createLabel',
|
|
588
|
+
searchPromptText: 'Select.searchPromptText',
|
|
589
|
+
loadingPlaceholder: 'loading',
|
|
590
|
+
noResultsText: 'noResult',
|
|
591
|
+
clearAllText: 'Select.clearAll',
|
|
592
|
+
clearValueText: 'Select.clear',
|
|
593
|
+
placeholder: 'Select.placeholder',
|
|
594
|
+
valueField: 'value',
|
|
595
|
+
labelField: 'label',
|
|
596
|
+
resetValue: '',
|
|
597
|
+
inline: false,
|
|
598
|
+
disabled: false,
|
|
599
|
+
checkAll: false,
|
|
600
|
+
checkAllLabel: 'Select.checkAll',
|
|
601
|
+
defaultCheckAll: false,
|
|
602
|
+
overlayPlacement: 'auto'
|
|
603
|
+
};
|
|
604
|
+
__decorate([
|
|
605
|
+
autobind,
|
|
606
|
+
__metadata("design:type", Function),
|
|
607
|
+
__metadata("design:paramtypes", []),
|
|
608
|
+
__metadata("design:returntype", void 0)
|
|
609
|
+
], Select.prototype, "open", null);
|
|
610
|
+
__decorate([
|
|
611
|
+
autobind,
|
|
612
|
+
__metadata("design:type", Function),
|
|
613
|
+
__metadata("design:paramtypes", []),
|
|
614
|
+
__metadata("design:returntype", void 0)
|
|
615
|
+
], Select.prototype, "close", null);
|
|
616
|
+
__decorate([
|
|
617
|
+
autobind,
|
|
618
|
+
__metadata("design:type", Function),
|
|
619
|
+
__metadata("design:paramtypes", []),
|
|
620
|
+
__metadata("design:returntype", void 0)
|
|
621
|
+
], Select.prototype, "confirm", null);
|
|
622
|
+
__decorate([
|
|
623
|
+
autobind,
|
|
624
|
+
__metadata("design:type", Function),
|
|
625
|
+
__metadata("design:paramtypes", [Object]),
|
|
626
|
+
__metadata("design:returntype", void 0)
|
|
627
|
+
], Select.prototype, "toggle", null);
|
|
628
|
+
__decorate([
|
|
629
|
+
autobind,
|
|
630
|
+
__metadata("design:type", Function),
|
|
631
|
+
__metadata("design:paramtypes", [Object]),
|
|
632
|
+
__metadata("design:returntype", void 0)
|
|
633
|
+
], Select.prototype, "onFocus", null);
|
|
634
|
+
__decorate([
|
|
635
|
+
autobind,
|
|
636
|
+
__metadata("design:type", Function),
|
|
637
|
+
__metadata("design:paramtypes", [Object]),
|
|
638
|
+
__metadata("design:returntype", void 0)
|
|
639
|
+
], Select.prototype, "onBlur", null);
|
|
640
|
+
__decorate([
|
|
641
|
+
autobind,
|
|
642
|
+
__metadata("design:type", Function),
|
|
643
|
+
__metadata("design:paramtypes", []),
|
|
644
|
+
__metadata("design:returntype", void 0)
|
|
645
|
+
], Select.prototype, "focus", null);
|
|
646
|
+
__decorate([
|
|
647
|
+
autobind,
|
|
648
|
+
__metadata("design:type", Function),
|
|
649
|
+
__metadata("design:paramtypes", []),
|
|
650
|
+
__metadata("design:returntype", void 0)
|
|
651
|
+
], Select.prototype, "getTarget", null);
|
|
652
|
+
__decorate([
|
|
653
|
+
autobind,
|
|
654
|
+
__metadata("design:type", Function),
|
|
655
|
+
__metadata("design:paramtypes", [HTMLInputElement]),
|
|
656
|
+
__metadata("design:returntype", void 0)
|
|
657
|
+
], Select.prototype, "inputRef", null);
|
|
658
|
+
__decorate([
|
|
659
|
+
autobind,
|
|
660
|
+
__metadata("design:type", Function),
|
|
661
|
+
__metadata("design:paramtypes", []),
|
|
662
|
+
__metadata("design:returntype", void 0)
|
|
663
|
+
], Select.prototype, "toggleCheckAll", null);
|
|
664
|
+
__decorate([
|
|
665
|
+
autobind,
|
|
666
|
+
__metadata("design:type", Function),
|
|
667
|
+
__metadata("design:paramtypes", [Object]),
|
|
668
|
+
__metadata("design:returntype", void 0)
|
|
669
|
+
], Select.prototype, "handleInputChange", null);
|
|
670
|
+
__decorate([
|
|
671
|
+
autobind,
|
|
672
|
+
__metadata("design:type", Function),
|
|
673
|
+
__metadata("design:paramtypes", [Object, Number, Boolean]),
|
|
674
|
+
__metadata("design:returntype", void 0)
|
|
675
|
+
], Select.prototype, "handlePickerChange", null);
|
|
676
|
+
__decorate([
|
|
677
|
+
autobind,
|
|
678
|
+
__metadata("design:type", Function),
|
|
679
|
+
__metadata("design:paramtypes", [Object]),
|
|
680
|
+
__metadata("design:returntype", void 0)
|
|
681
|
+
], Select.prototype, "handleChange", null);
|
|
682
|
+
__decorate([
|
|
683
|
+
autobind,
|
|
684
|
+
__metadata("design:type", Function),
|
|
685
|
+
__metadata("design:paramtypes", [Object]),
|
|
686
|
+
__metadata("design:returntype", void 0)
|
|
687
|
+
], Select.prototype, "handleStateChange", null);
|
|
688
|
+
__decorate([
|
|
689
|
+
autobind,
|
|
690
|
+
__metadata("design:type", Function),
|
|
691
|
+
__metadata("design:paramtypes", [Object]),
|
|
692
|
+
__metadata("design:returntype", void 0)
|
|
693
|
+
], Select.prototype, "handleKeyPress", null);
|
|
694
|
+
__decorate([
|
|
695
|
+
autobind,
|
|
696
|
+
__metadata("design:type", Function),
|
|
697
|
+
__metadata("design:paramtypes", [Object]),
|
|
698
|
+
__metadata("design:returntype", void 0)
|
|
699
|
+
], Select.prototype, "clearValue", null);
|
|
700
|
+
__decorate([
|
|
701
|
+
autobind,
|
|
702
|
+
__metadata("design:type", Function),
|
|
703
|
+
__metadata("design:paramtypes", []),
|
|
704
|
+
__metadata("design:returntype", void 0)
|
|
705
|
+
], Select.prototype, "clearSearchValue", null);
|
|
706
|
+
__decorate([
|
|
707
|
+
autobind,
|
|
708
|
+
__metadata("design:type", Function),
|
|
709
|
+
__metadata("design:paramtypes", []),
|
|
710
|
+
__metadata("design:returntype", void 0)
|
|
711
|
+
], Select.prototype, "handleAddClick", null);
|
|
712
|
+
__decorate([
|
|
713
|
+
autobind,
|
|
714
|
+
__metadata("design:type", Function),
|
|
715
|
+
__metadata("design:paramtypes", [Event, Object]),
|
|
716
|
+
__metadata("design:returntype", void 0)
|
|
717
|
+
], Select.prototype, "handleEditClick", null);
|
|
718
|
+
__decorate([
|
|
719
|
+
autobind,
|
|
720
|
+
__metadata("design:type", Function),
|
|
721
|
+
__metadata("design:paramtypes", [Event, Object]),
|
|
722
|
+
__metadata("design:returntype", void 0)
|
|
723
|
+
], Select.prototype, "handleDeleteClick", null);
|
|
724
|
+
__decorate([
|
|
725
|
+
autobind,
|
|
726
|
+
__metadata("design:type", Function),
|
|
727
|
+
__metadata("design:paramtypes", [Object]),
|
|
728
|
+
__metadata("design:returntype", void 0)
|
|
729
|
+
], Select.prototype, "menuItemRef", null);
|
|
730
|
+
return Select;
|
|
731
|
+
}(React__default.Component));
|
|
732
|
+
var EnhancedSelect = themeable(localeable(uncontrollable(Select, {
|
|
733
|
+
value: 'onChange'
|
|
734
|
+
})));
|
|
735
|
+
withRemoteConfig({
|
|
736
|
+
adaptor: function (data) { return data.options || data.items || data.rows || data; },
|
|
737
|
+
normalizeConfig: function (options, origin) {
|
|
738
|
+
options = normalizeOptions(options);
|
|
739
|
+
if (Array.isArray(options)) {
|
|
740
|
+
return options.concat();
|
|
741
|
+
}
|
|
742
|
+
return origin;
|
|
743
|
+
}
|
|
744
|
+
})(/** @class */ (function (_super) {
|
|
745
|
+
__extends(class_1, _super);
|
|
746
|
+
function class_1() {
|
|
747
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
748
|
+
}
|
|
749
|
+
class_1.prototype.render = function () {
|
|
750
|
+
var _a = this.props, loading = _a.loading, config = _a.config; _a.deferLoad; _a.updateConfig; var rest = __rest(_a, ["loading", "config", "deferLoad", "updateConfig"]);
|
|
751
|
+
return (React__default.createElement(EnhancedSelect, __assign({}, rest, { options: config || rest.options || [], loading: loading })));
|
|
752
|
+
};
|
|
753
|
+
return class_1;
|
|
754
|
+
}(React__default.Component)));
|
|
755
|
+
|
|
756
|
+
export { Select, EnhancedSelect as default, expandValue, matchOptionValue, normalizeOptions, optionValueCompare, value2array };
|