amis-rev-ui 6.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/esm/HTMLFilterContext.d.ts +3 -0
- package/esm/HTMLFilterContext.js +10 -0
- package/esm/components/404.js +35 -0
- package/esm/components/Alert.js +266 -0
- package/esm/components/Alert2.js +58 -0
- package/esm/components/AlphabetIndexer.d.ts +11 -0
- package/esm/components/AlphabetIndexer.js +48 -0
- package/esm/components/AnchorNav.js +153 -0
- package/esm/components/AnchorNavSection.d.ts +2 -0
- package/esm/components/AnchorNavSection.js +7 -0
- package/esm/components/ArrayInput.js +146 -0
- package/esm/components/AsideNav.js +133 -0
- package/esm/components/AssociatedSelection.js +107 -0
- package/esm/components/AutoFoldedList.js +124 -0
- package/esm/components/AutoSizer.d.ts +2 -0
- package/esm/components/AutoSizer.js +8 -0
- package/esm/components/Avatar.js +126 -0
- package/esm/components/Badge.d.ts +20 -0
- package/esm/components/Badge.js +154 -0
- package/esm/components/BaiduMapPicker.js +366 -0
- package/esm/components/BarCode.js +42 -0
- package/esm/components/Breadcrumb.js +160 -0
- package/esm/components/Button.js +64 -0
- package/esm/components/CalendarMobile.js +538 -0
- package/esm/components/Card.js +88 -0
- package/esm/components/Cascader.js +515 -0
- package/esm/components/ChainedDropdownSelection.js +104 -0
- package/esm/components/ChainedSelection.js +184 -0
- package/esm/components/Checkbox.js +87 -0
- package/esm/components/CityArea.js +190 -0
- package/esm/components/CityDB.d.ts +13 -0
- package/esm/components/CityDB.js +3942 -0
- package/esm/components/CodeMirror.d.ts +29 -0
- package/esm/components/CodeMirror.js +140 -0
- package/esm/components/Collapse.js +184 -0
- package/esm/components/CollapseGroup.js +117 -0
- package/esm/components/ColorPicker.js +259 -0
- package/esm/components/Combo.js +212 -0
- package/esm/components/ConditionBuilder.d.ts +2 -0
- package/esm/components/ConditionBuilder.js +7 -0
- package/esm/components/ConfirmBox.js +128 -0
- package/esm/components/ContextMenu.js +310 -0
- package/esm/components/DatePicker.js +716 -0
- package/esm/components/DateRangePicker.js +1385 -0
- package/esm/components/DiffEditor.d.ts +21 -0
- package/esm/components/DiffEditor.js +119 -0
- package/esm/components/DndContainer.js +25 -0
- package/esm/components/Drawer.js +272 -0
- package/esm/components/DropDownSelection.js +77 -0
- package/esm/components/DropdownContextMenus.js +93 -0
- package/esm/components/Editor.js +238 -0
- package/esm/components/Form.d.ts +31 -0
- package/esm/components/Form.js +84 -0
- package/esm/components/FormField.js +78 -0
- package/esm/components/FormulaPicker.d.ts +2 -0
- package/esm/components/FormulaPicker.js +7 -0
- package/esm/components/GaodeMapPicker.js +204 -0
- package/esm/components/GridNav.d.ts +53 -0
- package/esm/components/GridNav.js +125 -0
- package/esm/components/GridNavItem.d.ts +2 -0
- package/esm/components/GridNavItem.js +7 -0
- package/esm/components/GroupedSelection.js +138 -0
- package/esm/components/HeadCellDropDown.d.ts +2 -0
- package/esm/components/HeadCellDropDown.js +7 -0
- package/esm/components/HorizontalScroll.d.ts +74 -0
- package/esm/components/HorizontalScroll.js +271 -0
- package/esm/components/Html.js +55 -0
- package/esm/components/Icon.d.ts +2 -0
- package/esm/components/Icon.js +7 -0
- package/esm/components/ImageGallery.js +396 -0
- package/esm/components/Input.d.ts +18 -0
- package/esm/components/Input.js +75 -0
- package/esm/components/InputBox.js +99 -0
- package/esm/components/InputBoxWithSuggestion.js +70 -0
- package/esm/components/InputJSONSchema.d.ts +2 -0
- package/esm/components/InputJSONSchema.js +7 -0
- package/esm/components/InputTable.js +176 -0
- package/esm/components/JSONSchemaEditor.d.ts +2 -0
- package/esm/components/JSONSchemaEditor.js +7 -0
- package/esm/components/Layout.js +60 -0
- package/esm/components/Link.js +44 -0
- package/esm/components/ListGroup.js +31 -0
- package/esm/components/ListMenu.js +62 -0
- package/esm/components/LocationPicker.js +208 -0
- package/esm/components/Markdown.d.ts +25 -0
- package/esm/components/Markdown.js +70 -0
- package/esm/components/Menu.d.ts +2 -0
- package/esm/components/Menu.js +7 -0
- package/esm/components/MixedInput.js +88 -0
- package/esm/components/MobileDevTool.d.ts +12 -0
- package/esm/components/MobileDevTool.js +312 -0
- package/esm/components/Modal.js +261 -0
- package/esm/components/ModalManager.d.ts +16 -0
- package/esm/components/ModalManager.js +42 -0
- package/esm/components/MultilineText.js +90 -0
- package/esm/components/NumberInput.js +274 -0
- package/esm/components/OverflowTpl.js +100 -0
- package/esm/components/Pagination.js +377 -0
- package/esm/components/PdfViewer.js +83 -0
- package/esm/components/Picker.js +73 -0
- package/esm/components/PickerColumn.js +276 -0
- package/esm/components/PickerContainer.js +157 -0
- package/esm/components/PopOverContainer.d.ts +59 -0
- package/esm/components/PopOverContainer.js +148 -0
- package/esm/components/PopUp.js +85 -0
- package/esm/components/Progress.js +136 -0
- package/esm/components/PullRefresh.js +172 -0
- package/esm/components/Radios.js +129 -0
- package/esm/components/Range.js +516 -0
- package/esm/components/Rating.js +341 -0
- package/esm/components/ResultBox.js +195 -0
- package/esm/components/ResultList.js +253 -0
- package/esm/components/ResultTableList.js +152 -0
- package/esm/components/ResultTreeList.js +241 -0
- package/esm/components/RichText.d.ts +48 -0
- package/esm/components/RichText.js +271 -0
- package/esm/components/SearchBox.js +298 -0
- package/esm/components/Select.js +814 -0
- package/esm/components/SelectMobile.d.ts +38 -0
- package/esm/components/SelectMobile.js +369 -0
- package/esm/components/Selection.js +166 -0
- package/esm/components/Shape.js +429 -0
- package/esm/components/Signature.js +294 -0
- package/esm/components/Slider.js +140 -0
- package/esm/components/SparkLine.js +62 -0
- package/esm/components/Spinner.js +202 -0
- package/esm/components/Steps.js +76 -0
- package/esm/components/Switch.js +73 -0
- package/esm/components/Tab.d.ts +2 -0
- package/esm/components/Tab.js +7 -0
- package/esm/components/Table.d.ts +2 -0
- package/esm/components/Table.js +7 -0
- package/esm/components/TableSelection.js +169 -0
- package/esm/components/Tabs.js +607 -0
- package/esm/components/TabsTransfer.js +221 -0
- package/esm/components/TabsTransferPicker.js +81 -0
- package/esm/components/Tag.js +137 -0
- package/esm/components/Textarea.js +146 -0
- package/esm/components/Timeline.js +60 -0
- package/esm/components/TimelineItem.js +101 -0
- package/esm/components/Tinymce.d.ts +66 -0
- package/esm/components/Tinymce.js +634 -0
- package/esm/components/TitleBar.js +48 -0
- package/esm/components/Toast.js +247 -0
- package/esm/components/Tooltip.js +36 -0
- package/esm/components/TooltipWrapper.js +180 -0
- package/esm/components/Transfer.js +485 -0
- package/esm/components/TransferDropDown.js +98 -0
- package/esm/components/TransferPicker.js +98 -0
- package/esm/components/TransferSearch.js +100 -0
- package/esm/components/Tree.js +1256 -0
- package/esm/components/TreeSelection.js +201 -0
- package/esm/components/UserSelect.js +674 -0
- package/esm/components/UserTabSelect.js +227 -0
- package/esm/components/VerificationCode.js +172 -0
- package/esm/components/VirtualList.d.ts +2 -0
- package/esm/components/VirtualList.js +7 -0
- package/esm/components/WithRemoteConfig.d.ts +70 -0
- package/esm/components/WithRemoteConfig.js +301 -0
- package/esm/components/WithStore.d.ts +13 -0
- package/esm/components/WithStore.js +48 -0
- package/esm/components/calendar/Calendar.d.ts +83 -0
- package/esm/components/calendar/Calendar.js +529 -0
- package/esm/components/calendar/CalendarContainer.d.ts +10 -0
- package/esm/components/calendar/CalendarContainer.js +27 -0
- package/esm/components/calendar/DaysView.js +528 -0
- package/esm/components/calendar/MonthsView.js +175 -0
- package/esm/components/calendar/QuartersView.js +125 -0
- package/esm/components/calendar/TimeView.js +559 -0
- package/esm/components/calendar/YearsView.js +122 -0
- package/esm/components/condition-builder/Expression.js +121 -0
- package/esm/components/condition-builder/Field.js +32 -0
- package/esm/components/condition-builder/Func.js +75 -0
- package/esm/components/condition-builder/Group.js +196 -0
- package/esm/components/condition-builder/GroupOrItem.js +107 -0
- package/esm/components/condition-builder/InputSwitch.js +28 -0
- package/esm/components/condition-builder/Item.js +233 -0
- package/esm/components/condition-builder/Value.js +115 -0
- package/esm/components/condition-builder/config.d.ts +36 -0
- package/esm/components/condition-builder/config.js +120 -0
- package/esm/components/condition-builder/index.js +242 -0
- package/esm/components/condition-builder/types.d.ts +116 -0
- package/esm/components/formula/CodeEditor.js +99 -0
- package/esm/components/formula/Editor.js +446 -0
- package/esm/components/formula/FuncList.js +64 -0
- package/esm/components/formula/Input.js +141 -0
- package/esm/components/formula/Picker.js +454 -0
- package/esm/components/formula/VariableList.js +185 -0
- package/esm/components/formula/plugin.d.ts +51 -0
- package/esm/components/formula/plugin.js +445 -0
- package/esm/components/icons.d.ts +61 -0
- package/esm/components/icons.js +458 -0
- package/esm/components/index.d.ts +138 -0
- package/esm/components/json-schema/Array.d.ts +3 -0
- package/esm/components/json-schema/Array.js +129 -0
- package/esm/components/json-schema/Item.d.ts +5 -0
- package/esm/components/json-schema/Item.js +63 -0
- package/esm/components/json-schema/Object.d.ts +5 -0
- package/esm/components/json-schema/Object.js +272 -0
- package/esm/components/json-schema/index.js +29 -0
- package/esm/components/menu/MenuContext.d.ts +82 -0
- package/esm/components/menu/MenuContext.js +25 -0
- package/esm/components/menu/MenuItem.js +112 -0
- package/esm/components/menu/PanelMenu.js +68 -0
- package/esm/components/menu/SubMenu.js +137 -0
- package/esm/components/menu/index.js +368 -0
- package/esm/components/schema-editor/Array.d.ts +11 -0
- package/esm/components/schema-editor/Array.js +84 -0
- package/esm/components/schema-editor/Common.d.ts +61 -0
- package/esm/components/schema-editor/Common.js +162 -0
- package/esm/components/schema-editor/Item.d.ts +8 -0
- package/esm/components/schema-editor/Item.js +24 -0
- package/esm/components/schema-editor/Object.d.ts +51 -0
- package/esm/components/schema-editor/Object.js +294 -0
- package/esm/components/schema-editor/SchemaVariableList.js +74 -0
- package/esm/components/schema-editor/SchemaVariableListPicker.js +34 -0
- package/esm/components/schema-editor/index.js +122 -0
- package/esm/components/table/Cell.d.ts +36 -0
- package/esm/components/table/Cell.js +43 -0
- package/esm/components/table/ColGroup.d.ts +24 -0
- package/esm/components/table/ColGroup.js +77 -0
- package/esm/components/table/Head.d.ts +45 -0
- package/esm/components/table/Head.js +150 -0
- package/esm/components/table/HeadCellDropDown.js +54 -0
- package/esm/components/table/HeadCellFilter.js +130 -0
- package/esm/components/table/HeadCellSelect.js +51 -0
- package/esm/components/table/HeadCellSort.js +88 -0
- package/esm/components/table/ItemActionsWrapper.d.ts +10 -0
- package/esm/components/table/ItemActionsWrapper.js +29 -0
- package/esm/components/table/Row.d.ts +56 -0
- package/esm/components/table/Row.js +224 -0
- package/esm/components/table/SummaryRow.d.ts +28 -0
- package/esm/components/table/SummaryRow.js +73 -0
- package/esm/components/table/index.js +1095 -0
- package/esm/components/table/util.d.ts +25 -0
- package/esm/components/table/util.js +279 -0
- package/esm/components/virtual-list/AutoSizer.d.ts +19 -0
- package/esm/components/virtual-list/AutoSizer.js +48 -0
- package/esm/components/virtual-list/SizeAndPositionManager.d.ts +70 -0
- package/esm/components/virtual-list/SizeAndPositionManager.js +216 -0
- package/esm/components/virtual-list/constants.d.ts +34 -0
- package/esm/components/virtual-list/constants.js +45 -0
- package/esm/components/virtual-list/index.d.ts +98 -0
- package/esm/components/virtual-list/index.js +288 -0
- package/esm/components/withBadge.d.ts +2 -0
- package/esm/components/withBadge.js +7 -0
- package/esm/hooks/index.d.ts +8 -0
- package/esm/hooks/use-click-away.d.ts +12 -0
- package/esm/hooks/use-click-away.js +55 -0
- package/esm/hooks/use-on-screen.d.ts +2 -0
- package/esm/hooks/use-on-screen.js +28 -0
- package/esm/hooks/use-set-state.d.ts +2 -0
- package/esm/hooks/use-set-state.js +19 -0
- package/esm/hooks/use-sub-form.d.ts +4 -0
- package/esm/hooks/use-sub-form.js +39 -0
- package/esm/hooks/use-touch.d.ts +16 -0
- package/esm/hooks/use-touch.js +77 -0
- package/esm/hooks/use-update-effect.d.ts +3 -0
- package/esm/hooks/use-update-effect.js +21 -0
- package/esm/hooks/use-validation-resolver.d.ts +7 -0
- package/esm/hooks/use-validation-resolver.js +115 -0
- package/esm/icons/alert-danger.svg.js +22 -0
- package/esm/icons/alert-info.svg.js +22 -0
- package/esm/icons/alert-success.svg.js +22 -0
- package/esm/icons/alert-warning.svg.js +22 -0
- package/esm/icons/arrow-double-left.svg.js +24 -0
- package/esm/icons/arrow-double-right.svg.js +24 -0
- package/esm/icons/back.svg.js +21 -0
- package/esm/icons/calendar.svg.js +31 -0
- package/esm/icons/caret.svg.js +21 -0
- package/esm/icons/check.svg.js +21 -0
- package/esm/icons/clock.svg.js +29 -0
- package/esm/icons/close-small.svg.js +24 -0
- package/esm/icons/close.svg.js +21 -0
- package/esm/icons/cloud-upload.svg.js +22 -0
- package/esm/icons/column-filter.svg.js +22 -0
- package/esm/icons/columns.svg.js +21 -0
- package/esm/icons/compress-alt.svg.js +21 -0
- package/esm/icons/copy.svg.js +26 -0
- package/esm/icons/date.svg.js +26 -0
- package/esm/icons/department.svg.js +52 -0
- package/esm/icons/desk-empty.svg.js +73 -0
- package/esm/icons/dot.svg.js +36 -0
- package/esm/icons/down-arrow-bold.svg.js +22 -0
- package/esm/icons/down.svg.js +23 -0
- package/esm/icons/download.svg.js +24 -0
- package/esm/icons/drag-bar.svg.js +53 -0
- package/esm/icons/drag.svg.js +22 -0
- package/esm/icons/edit.svg.js +21 -0
- package/esm/icons/ellipsis-v.svg.js +21 -0
- package/esm/icons/enter.svg.js +20 -0
- package/esm/icons/exchange.svg.js +21 -0
- package/esm/icons/expand-alt.svg.js +21 -0
- package/esm/icons/fail.svg.js +31 -0
- package/esm/icons/file.svg.js +22 -0
- package/esm/icons/filter.svg.js +21 -0
- package/esm/icons/folder.svg.js +24 -0
- package/esm/icons/fullscreen.svg.js +21 -0
- package/esm/icons/function.svg.js +21 -0
- package/esm/icons/home.svg.js +21 -0
- package/esm/icons/if.svg.js +21 -0
- package/esm/icons/image.svg.js +20 -0
- package/esm/icons/info-circle.svg.js +21 -0
- package/esm/icons/info.svg.js +27 -0
- package/esm/icons/input-clear.svg.js +20 -0
- package/esm/icons/invisible.svg.js +22 -0
- package/esm/icons/left-arrow.svg.js +23 -0
- package/esm/icons/loading-outline.svg.js +21 -0
- package/esm/icons/location.svg.js +20 -0
- package/esm/icons/menu.svg.js +20 -0
- package/esm/icons/minus.svg.js +21 -0
- package/esm/icons/move.svg.js +22 -0
- package/esm/icons/mute.svg.js +21 -0
- package/esm/icons/new-edit.svg.js +22 -0
- package/esm/icons/pause.svg.js +21 -0
- package/esm/icons/pencil.svg.js +21 -0
- package/esm/icons/play.svg.js +20 -0
- package/esm/icons/plus-cicle.svg.js +20 -0
- package/esm/icons/plus-fine.svg.js +21 -0
- package/esm/icons/plus.svg.js +21 -0
- package/esm/icons/post.svg.js +48 -0
- package/esm/icons/question-mark.svg.js +26 -0
- package/esm/icons/question.svg.js +21 -0
- package/esm/icons/question2.svg.js +34 -0
- package/esm/icons/redo.svg.js +21 -0
- package/esm/icons/refresh.svg.js +21 -0
- package/esm/icons/reload.svg.js +21 -0
- package/esm/icons/remove.svg.js +21 -0
- package/esm/icons/retry.svg.js +24 -0
- package/esm/icons/right-arrow-bold.svg.js +21 -0
- package/esm/icons/right-arrow.svg.js +23 -0
- package/esm/icons/right-double-arrow.svg.js +22 -0
- package/esm/icons/role.svg.js +43 -0
- package/esm/icons/rotate-left.svg.js +22 -0
- package/esm/icons/rotate-right.svg.js +22 -0
- package/esm/icons/rotate-screen.svg.js +21 -0
- package/esm/icons/scale-origin.svg.js +24 -0
- package/esm/icons/schedule.svg.js +24 -0
- package/esm/icons/search.svg.js +21 -0
- package/esm/icons/setting.svg.js +21 -0
- package/esm/icons/slider-handle-icon.svg.js +22 -0
- package/esm/icons/sort-asc.svg.js +21 -0
- package/esm/icons/sort-default.svg.js +21 -0
- package/esm/icons/sort-desc.svg.js +21 -0
- package/esm/icons/star.svg.js +21 -0
- package/esm/icons/status-close.svg.js +23 -0
- package/esm/icons/steps-finsh.svg.js +22 -0
- package/esm/icons/sub-plus.svg.js +20 -0
- package/esm/icons/success.svg.js +29 -0
- package/esm/icons/transparent.svg.js +38 -0
- package/esm/icons/trash.svg.js +22 -0
- package/esm/icons/tree-down.svg.js +21 -0
- package/esm/icons/undo-normal.svg.js +25 -0
- package/esm/icons/undo.svg.js +21 -0
- package/esm/icons/unfullscreen.svg.js +21 -0
- package/esm/icons/upload.svg.js +21 -0
- package/esm/icons/user-remove.svg.js +33 -0
- package/esm/icons/view.svg.js +22 -0
- package/esm/icons/volume.svg.js +24 -0
- package/esm/icons/warning-mark.svg.js +22 -0
- package/esm/icons/warning.svg.js +21 -0
- package/esm/icons/window-restore.svg.js +21 -0
- package/esm/icons/zoom-in.svg.js +21 -0
- package/esm/icons/zoom-out.svg.js +21 -0
- package/esm/index.d.ts +16 -0
- package/esm/index.js +157 -0
- package/esm/locale/de-DE.d.ts +1 -0
- package/esm/locale/de-DE.js +423 -0
- package/esm/locale/en-US.d.ts +1 -0
- package/esm/locale/en-US.js +429 -0
- package/esm/locale/zh-CN.d.ts +1 -0
- package/esm/locale/zh-CN.js +438 -0
- package/esm/themes/ang.d.ts +3 -0
- package/esm/themes/ang.js +15 -0
- package/esm/themes/antd.d.ts +1 -0
- package/esm/themes/antd.js +42 -0
- package/esm/themes/cxd.d.ts +3 -0
- package/esm/themes/cxd.js +455 -0
- package/esm/themes/dark.d.ts +3 -0
- package/esm/themes/dark.js +23 -0
- package/esm/themes/default.d.ts +4 -0
- package/esm/utils/index.d.ts +2 -0
- package/esm/utils/smoothSignature.d.ts +86 -0
- package/esm/utils/vectorComputed.d.ts +20 -0
- package/esm/utils/vectorComputed.js +75 -0
- package/esm/withRemoteConfig.d.ts +2 -0
- package/esm/withRemoteConfig.js +7 -0
- package/esm/withStore.d.ts +2 -0
- package/esm/withStore.js +7 -0
- package/lib/HTMLFilterContext.d.ts +3 -0
- package/lib/components/AlphabetIndexer.d.ts +11 -0
- package/lib/components/AnchorNavSection.d.ts +2 -0
- package/lib/components/AutoSizer.d.ts +2 -0
- package/lib/components/Badge.d.ts +20 -0
- package/lib/components/BarCode.js +44 -0
- package/lib/components/CityDB.d.ts +13 -0
- package/lib/components/CityDB.js +3945 -0
- package/lib/components/CodeMirror.d.ts +29 -0
- package/lib/components/ColorPicker.js +267 -0
- package/lib/components/ConditionBuilder.d.ts +2 -0
- package/lib/components/DiffEditor.d.ts +21 -0
- package/lib/components/Form.d.ts +31 -0
- package/lib/components/FormulaPicker.d.ts +2 -0
- package/lib/components/GridNav.d.ts +53 -0
- package/lib/components/GridNavItem.d.ts +2 -0
- package/lib/components/HeadCellDropDown.d.ts +2 -0
- package/lib/components/HorizontalScroll.d.ts +74 -0
- package/lib/components/Icon.d.ts +2 -0
- package/lib/components/Input.d.ts +18 -0
- package/lib/components/InputJSONSchema.d.ts +2 -0
- package/lib/components/JSONSchemaEditor.d.ts +2 -0
- package/lib/components/Markdown.d.ts +25 -0
- package/lib/components/Markdown.js +76 -0
- package/lib/components/Menu.d.ts +2 -0
- package/lib/components/MobileDevTool.d.ts +12 -0
- package/lib/components/ModalManager.d.ts +16 -0
- package/lib/components/PdfViewer.js +83 -0
- package/lib/components/PopOverContainer.d.ts +59 -0
- package/lib/components/RichText.d.ts +48 -0
- package/lib/components/RichText.js +275 -0
- package/lib/components/SelectMobile.d.ts +38 -0
- package/lib/components/Tab.d.ts +2 -0
- package/lib/components/Table.d.ts +2 -0
- package/lib/components/Tinymce.d.ts +66 -0
- package/lib/components/Tinymce.js +641 -0
- package/lib/components/VirtualList.d.ts +2 -0
- package/lib/components/WithRemoteConfig.d.ts +70 -0
- package/lib/components/WithStore.d.ts +13 -0
- package/lib/components/calendar/Calendar.d.ts +83 -0
- package/lib/components/calendar/CalendarContainer.d.ts +10 -0
- package/lib/components/condition-builder/config.d.ts +36 -0
- package/lib/components/condition-builder/types.d.ts +116 -0
- package/lib/components/formula/plugin.d.ts +51 -0
- package/lib/components/icons.d.ts +61 -0
- package/lib/components/index.d.ts +138 -0
- package/lib/components/json-schema/Array.d.ts +3 -0
- package/lib/components/json-schema/Item.d.ts +5 -0
- package/lib/components/json-schema/Object.d.ts +5 -0
- package/lib/components/menu/MenuContext.d.ts +82 -0
- package/lib/components/schema-editor/Array.d.ts +11 -0
- package/lib/components/schema-editor/Common.d.ts +61 -0
- package/lib/components/schema-editor/Item.d.ts +8 -0
- package/lib/components/schema-editor/Object.d.ts +51 -0
- package/lib/components/table/Cell.d.ts +36 -0
- package/lib/components/table/ColGroup.d.ts +24 -0
- package/lib/components/table/Head.d.ts +45 -0
- package/lib/components/table/ItemActionsWrapper.d.ts +10 -0
- package/lib/components/table/Row.d.ts +56 -0
- package/lib/components/table/SummaryRow.d.ts +28 -0
- package/lib/components/table/util.d.ts +25 -0
- package/lib/components/virtual-list/AutoSizer.d.ts +19 -0
- package/lib/components/virtual-list/SizeAndPositionManager.d.ts +70 -0
- package/lib/components/virtual-list/constants.d.ts +34 -0
- package/lib/components/virtual-list/index.d.ts +98 -0
- package/lib/components/withBadge.d.ts +2 -0
- package/lib/helper.css +47762 -0
- package/lib/hooks/index.d.ts +8 -0
- package/lib/hooks/use-click-away.d.ts +12 -0
- package/lib/hooks/use-on-screen.d.ts +2 -0
- package/lib/hooks/use-set-state.d.ts +2 -0
- package/lib/hooks/use-sub-form.d.ts +4 -0
- package/lib/hooks/use-touch.d.ts +16 -0
- package/lib/hooks/use-update-effect.d.ts +3 -0
- package/lib/hooks/use-validation-resolver.d.ts +7 -0
- package/lib/index.d.ts +16 -0
- package/lib/index.js +28 -0
- package/lib/locale/de-DE.d.ts +1 -0
- package/lib/locale/en-US.d.ts +1 -0
- package/lib/locale/zh-CN.d.ts +1 -0
- package/lib/scss/helper.scss.js +12 -0
- package/lib/scss/themes/ang.scss.js +12 -0
- package/lib/scss/themes/antd.scss.js +12 -0
- package/lib/scss/themes/cxd.scss.js +12 -0
- package/lib/scss/themes/dark.scss.js +12 -0
- package/lib/scss/themes/default.scss.js +12 -0
- package/lib/themes/ang.css +45895 -0
- package/lib/themes/ang.d.ts +3 -0
- package/lib/themes/antd.css +45882 -0
- package/lib/themes/antd.d.ts +1 -0
- package/lib/themes/cxd.css +45871 -0
- package/lib/themes/cxd.d.ts +3 -0
- package/lib/themes/dark.css +45902 -0
- package/lib/themes/dark.d.ts +3 -0
- package/lib/themes/default.css +45871 -0
- package/lib/themes/default.d.ts +4 -0
- package/lib/utils/index.d.ts +2 -0
- package/lib/utils/smoothSignature.d.ts +86 -0
- package/lib/utils/vectorComputed.d.ts +20 -0
- package/lib/withRemoteConfig.d.ts +2 -0
- package/lib/withStore.d.ts +2 -0
- package/package.json +158 -0
- package/scss/README.md +9 -0
- package/scss/_components.scss +4346 -0
- package/scss/_functions.scss +137 -0
- package/scss/_mixins.scss +805 -0
- package/scss/_properties.scss +898 -0
- package/scss/_thirds.scss +12 -0
- package/scss/_utilities.scss +1757 -0
- package/scss/_variables.scss +439 -0
- package/scss/base/_animate.scss +84 -0
- package/scss/base/_common.scss +19 -0
- package/scss/base/_normalize.scss +376 -0
- package/scss/base/_reset.scss +18 -0
- package/scss/base/_typography.scss +79 -0
- package/scss/components/_alert.scss +123 -0
- package/scss/components/_anchor-nav.scss +158 -0
- package/scss/components/_app.scss +46 -0
- package/scss/components/_array-input.scss +107 -0
- package/scss/components/_audio.scss +146 -0
- package/scss/components/_auto-folder.scss +40 -0
- package/scss/components/_avatar.scss +55 -0
- package/scss/components/_badge.scss +145 -0
- package/scss/components/_barcode.scss +6 -0
- package/scss/components/_breadcrumb.scss +110 -0
- package/scss/components/_button-group.scss +165 -0
- package/scss/components/_button.scss +871 -0
- package/scss/components/_calendar.scss +442 -0
- package/scss/components/_card.scss +389 -0
- package/scss/components/_card2.scss +28 -0
- package/scss/components/_cards.scss +221 -0
- package/scss/components/_carousel.scss +292 -0
- package/scss/components/_cascader.scss +157 -0
- package/scss/components/_chart.scss +22 -0
- package/scss/components/_city-area.scss +37 -0
- package/scss/components/_code.scss +10 -0
- package/scss/components/_collapse-group.scss +83 -0
- package/scss/components/_collapse.scss +245 -0
- package/scss/components/_color.scss +17 -0
- package/scss/components/_column-toggler.scss +261 -0
- package/scss/components/_condition-builder.scss +521 -0
- package/scss/components/_context-menu.scss +204 -0
- package/scss/components/_copyable.scss +10 -0
- package/scss/components/_crud.scss +195 -0
- package/scss/components/_crud2.scss +345 -0
- package/scss/components/_debug.scss +259 -0
- package/scss/components/_divider.scss +81 -0
- package/scss/components/_drawer.scss +393 -0
- package/scss/components/_dropdown-context-menus.scss +27 -0
- package/scss/components/_dropdown.scss +159 -0
- package/scss/components/_each.scss +7 -0
- package/scss/components/_formula.scss +723 -0
- package/scss/components/_grid-nav.scss +128 -0
- package/scss/components/_horizontal-scroll.scss +51 -0
- package/scss/components/_icon.scss +4 -0
- package/scss/components/_image-gallery.scss +331 -0
- package/scss/components/_images.scss +650 -0
- package/scss/components/_input-box.scss +111 -0
- package/scss/components/_json-schema-editor.scss +149 -0
- package/scss/components/_json-schema.scss +166 -0
- package/scss/components/_json.scss +7 -0
- package/scss/components/_link.scss +22 -0
- package/scss/components/_list-menu.scss +114 -0
- package/scss/components/_list.scss +313 -0
- package/scss/components/_log.scss +169 -0
- package/scss/components/_mapping.scss +6 -0
- package/scss/components/_markdown.scss +266 -0
- package/scss/components/_menu.scss +795 -0
- package/scss/components/_mobile-dev-tool.scss +175 -0
- package/scss/components/_modal.scss +282 -0
- package/scss/components/_multiline-text.scss +20 -0
- package/scss/components/_nav.scss +45 -0
- package/scss/components/_overflow-tpl.scss +5 -0
- package/scss/components/_page.scss +198 -0
- package/scss/components/_pagination.scss +403 -0
- package/scss/components/_panel.scss +263 -0
- package/scss/components/_pdf_viewer.scss +47 -0
- package/scss/components/_picker-columns.scss +140 -0
- package/scss/components/_popover.scss +54 -0
- package/scss/components/_popoverable.scss +100 -0
- package/scss/components/_popup.scss +171 -0
- package/scss/components/_portlet.scss +51 -0
- package/scss/components/_print.scss +13 -0
- package/scss/components/_progress.scss +165 -0
- package/scss/components/_property.scss +47 -0
- package/scss/components/_pull-refresh.scss +30 -0
- package/scss/components/_quick-edit.scss +53 -0
- package/scss/components/_remark.scss +58 -0
- package/scss/components/_result-box.scss +380 -0
- package/scss/components/_search-box.scss +267 -0
- package/scss/components/_service.scss +3 -0
- package/scss/components/_shape.scss +19 -0
- package/scss/components/_signature.scss +98 -0
- package/scss/components/_slider.scss +27 -0
- package/scss/components/_sparkline.scss +18 -0
- package/scss/components/_spinner.scss +214 -0
- package/scss/components/_status.scss +118 -0
- package/scss/components/_steps.scss +481 -0
- package/scss/components/_table.scss +1234 -0
- package/scss/components/_table2.scss +1066 -0
- package/scss/components/_tabs.scss +1410 -0
- package/scss/components/_tag.scss +191 -0
- package/scss/components/_timeline.scss +572 -0
- package/scss/components/_toast.scss +342 -0
- package/scss/components/_tooltip.scss +340 -0
- package/scss/components/_tpl.scss +51 -0
- package/scss/components/_verificationCode.scss +33 -0
- package/scss/components/_video.scss +38 -0
- package/scss/components/_wizard.scss +287 -0
- package/scss/components/_wrapper.scss +26 -0
- package/scss/components/form/_chained-select.scss +10 -0
- package/scss/components/form/_checks.scss +433 -0
- package/scss/components/form/_city.scss +33 -0
- package/scss/components/form/_color.scss +148 -0
- package/scss/components/form/_combo.scss +360 -0
- package/scss/components/form/_date-range.scss +332 -0
- package/scss/components/form/_date.scss +807 -0
- package/scss/components/form/_editor.scss +139 -0
- package/scss/components/form/_excel.scss +150 -0
- package/scss/components/form/_fieldset.scss +202 -0
- package/scss/components/form/_file.scss +308 -0
- package/scss/components/form/_form.scss +936 -0
- package/scss/components/form/_group.scss +116 -0
- package/scss/components/form/_icon-picker.scss +113 -0
- package/scss/components/form/_icon-select.scss +245 -0
- package/scss/components/form/_image.scss +359 -0
- package/scss/components/form/_input-group.scss +213 -0
- package/scss/components/form/_input-table.scss +17 -0
- package/scss/components/form/_list.scss +225 -0
- package/scss/components/form/_location.scss +210 -0
- package/scss/components/form/_matrix.scss +7 -0
- package/scss/components/form/_nested-select.scss +149 -0
- package/scss/components/form/_number.scss +633 -0
- package/scss/components/form/_picker.scss +237 -0
- package/scss/components/form/_qr-code.scss +4 -0
- package/scss/components/form/_range.scss +438 -0
- package/scss/components/form/_rating.scss +94 -0
- package/scss/components/form/_repeat.scss +40 -0
- package/scss/components/form/_result-list.scss +98 -0
- package/scss/components/form/_rich-text.scss +163 -0
- package/scss/components/form/_select.scss +712 -0
- package/scss/components/form/_selection.scss +485 -0
- package/scss/components/form/_sub-form.scss +118 -0
- package/scss/components/form/_switch.scss +228 -0
- package/scss/components/form/_tag.scss +146 -0
- package/scss/components/form/_text.scss +508 -0
- package/scss/components/form/_textarea.scss +78 -0
- package/scss/components/form/_tinymce.scss +6 -0
- package/scss/components/form/_transfer.scss +624 -0
- package/scss/components/form/_tree-select.scss +47 -0
- package/scss/components/form/_tree.scss +458 -0
- package/scss/components/form/_user-select.scss +643 -0
- package/scss/components/react-datetime.scss +267 -0
- package/scss/helper/background/_background-color.md +131 -0
- package/scss/helper/background/_background-color.scss +214 -0
- package/scss/helper/border/_border-color.md +109 -0
- package/scss/helper/border/_border-color.scss +178 -0
- package/scss/helper/border/_border-radius.md +86 -0
- package/scss/helper/border/_border-radius.scss +152 -0
- package/scss/helper/border/_border-style.md +11 -0
- package/scss/helper/border/_border-style.scss +40 -0
- package/scss/helper/border/_border-width.md +31 -0
- package/scss/helper/border/_border-width.scss +72 -0
- package/scss/helper/box-alignment/_align-content.md +12 -0
- package/scss/helper/box-alignment/_align-content.scss +44 -0
- package/scss/helper/box-alignment/_align-items.md +11 -0
- package/scss/helper/box-alignment/_align-items.scss +41 -0
- package/scss/helper/box-alignment/_align-self.md +11 -0
- package/scss/helper/box-alignment/_align-self.scss +40 -0
- package/scss/helper/box-alignment/_justify-content.md +12 -0
- package/scss/helper/box-alignment/_justify-content.scss +44 -0
- package/scss/helper/box-alignment/_justify-items.md +11 -0
- package/scss/helper/box-alignment/_justify-items.scss +40 -0
- package/scss/helper/box-alignment/_justify-self.md +11 -0
- package/scss/helper/box-alignment/_justify-self.scss +40 -0
- package/scss/helper/box-alignment/_place-content.md +13 -0
- package/scss/helper/box-alignment/_place-content.scss +48 -0
- package/scss/helper/box-alignment/_place-items.md +11 -0
- package/scss/helper/box-alignment/_place-items.scss +40 -0
- package/scss/helper/box-alignment/_place-self.md +11 -0
- package/scss/helper/box-alignment/_place-self.scss +40 -0
- package/scss/helper/effect/_box-shadow.md +16 -0
- package/scss/helper/effect/_box-shadow.scss +74 -0
- package/scss/helper/effect/_opacity.md +21 -0
- package/scss/helper/effect/_opacity.scss +66 -0
- package/scss/helper/flex/_direction.md +10 -0
- package/scss/helper/flex/_direction.scss +41 -0
- package/scss/helper/flex/_flex.md +10 -0
- package/scss/helper/flex/_flex.scss +38 -0
- package/scss/helper/flex/_grow.md +8 -0
- package/scss/helper/flex/_grow.scss +28 -0
- package/scss/helper/flex/_order.md +20 -0
- package/scss/helper/flex/_order.scss +56 -0
- package/scss/helper/flex/_shrink.md +8 -0
- package/scss/helper/flex/_shrink.scss +27 -0
- package/scss/helper/flex/_wrap.md +9 -0
- package/scss/helper/flex/_wrap.scss +36 -0
- package/scss/helper/grid/_auto-columns.md +10 -0
- package/scss/helper/grid/_auto-columns.scss +38 -0
- package/scss/helper/grid/_auto-flow.md +10 -0
- package/scss/helper/grid/_auto-flow.scss +38 -0
- package/scss/helper/grid/_auto-rows.md +10 -0
- package/scss/helper/grid/_auto-rows.scss +38 -0
- package/scss/helper/grid/_column-start-end.md +48 -0
- package/scss/helper/grid/_column-start-end.scss +201 -0
- package/scss/helper/grid/_columns.md +19 -0
- package/scss/helper/grid/_columns.scss +74 -0
- package/scss/helper/grid/_gap.md +117 -0
- package/scss/helper/grid/_gap.scss +154 -0
- package/scss/helper/grid/_row-start-end.md +48 -0
- package/scss/helper/grid/_row-start-end.scss +201 -0
- package/scss/helper/grid/_rows.md +13 -0
- package/scss/helper/grid/_rows.scss +50 -0
- package/scss/helper/layout/_box-sizing.md +35 -0
- package/scss/helper/layout/_box-sizing.scss +51 -0
- package/scss/helper/layout/_clear.md +27 -0
- package/scss/helper/layout/_clear.scss +56 -0
- package/scss/helper/layout/_display.md +41 -0
- package/scss/helper/layout/_display.scss +82 -0
- package/scss/helper/layout/_float.md +47 -0
- package/scss/helper/layout/_float.scss +71 -0
- package/scss/helper/layout/_overflow.md +34 -0
- package/scss/helper/layout/_overflow.scss +85 -0
- package/scss/helper/layout/_position.md +27 -0
- package/scss/helper/layout/_position.scss +55 -0
- package/scss/helper/layout/_top-right-bottom-left.md +150 -0
- package/scss/helper/layout/_top-right-bottom-left.scss +292 -0
- package/scss/helper/layout/_visibility.md +21 -0
- package/scss/helper/layout/_visibility.scss +42 -0
- package/scss/helper/layout/_z-index.md +37 -0
- package/scss/helper/layout/_z-index.scss +67 -0
- package/scss/helper/sizing/_height.md +103 -0
- package/scss/helper/sizing/_height.scss +161 -0
- package/scss/helper/sizing/_width.md +109 -0
- package/scss/helper/sizing/_width.scss +174 -0
- package/scss/helper/spacing/_margin.md +527 -0
- package/scss/helper/spacing/_margin.scss +821 -0
- package/scss/helper/spacing/_padding.md +265 -0
- package/scss/helper/spacing/_padding.scss +394 -0
- package/scss/helper/spacing/_space-between.md +155 -0
- package/scss/helper/spacing/_space-between.scss +224 -0
- package/scss/helper/typography/_font-family.md +9 -0
- package/scss/helper/typography/_font-family.scss +28 -0
- package/scss/helper/typography/_font-size.md +19 -0
- package/scss/helper/typography/_font-size.scss +40 -0
- package/scss/helper/typography/_font-style.md +8 -0
- package/scss/helper/typography/_font-style.scss +31 -0
- package/scss/helper/typography/_font-weight.md +15 -0
- package/scss/helper/typography/_font-weight.scss +49 -0
- package/scss/helper/typography/_letter-spacing.md +12 -0
- package/scss/helper/typography/_letter-spacing.scss +43 -0
- package/scss/helper/typography/_line-height.md +20 -0
- package/scss/helper/typography/_line-height.scss +59 -0
- package/scss/helper/typography/_list-style-type.md +11 -0
- package/scss/helper/typography/_list-style-type.scss +43 -0
- package/scss/helper/typography/_text-align.md +10 -0
- package/scss/helper/typography/_text-align.scss +34 -0
- package/scss/helper/typography/_text-color.md +110 -0
- package/scss/helper/typography/_text-color.scss +184 -0
- package/scss/helper/typography/_text-decoration.md +9 -0
- package/scss/helper/typography/_text-decoration.scss +34 -0
- package/scss/helper/typography/_text-overflow.md +9 -0
- package/scss/helper/typography/_text-overflow.scss +40 -0
- package/scss/helper/typography/_text-transform.md +10 -0
- package/scss/helper/typography/_text-transform.scss +40 -0
- package/scss/helper/typography/_vertical-align.md +12 -0
- package/scss/helper/typography/_vertical-align.scss +44 -0
- package/scss/helper/typography/_whitespace.md +11 -0
- package/scss/helper/typography/_whitespace.scss +42 -0
- package/scss/helper/typography/_word-break.md +9 -0
- package/scss/helper/typography/_word-break.scss +36 -0
- package/scss/helper.scss +72 -0
- package/scss/layout/_aside.scss +361 -0
- package/scss/layout/_grid.scss +173 -0
- package/scss/layout/_hbox.scss +127 -0
- package/scss/layout/_header.scss +0 -0
- package/scss/layout/_layout.scss +492 -0
- package/scss/layout/_vbox.scss +38 -0
- package/scss/themes/_ang-variables.scss +224 -0
- package/scss/themes/_antd-variables.scss +238 -0
- package/scss/themes/_common.scss +157 -0
- package/scss/themes/_cxd-variables.scss +222 -0
- package/scss/themes/_dark-variables.scss +229 -0
- package/scss/themes/ang-ie11.scss +1 -0
- package/scss/themes/ang.scss +27 -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 +5 -0
- package/scss/themes/dark-ie11.scss +1 -0
- package/scss/themes/dark.scss +34 -0
- package/scss/themes/default.scss +2 -0
- package/scss/themes/extract-antd-color.py +27 -0
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* amis-rev-ui v6.13.0
|
|
3
|
+
* Copyright 2018-2026 fex
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { __extends, __spreadArray, __read, __awaiter, __generator, __decorate, __metadata } from 'tslib';
|
|
7
|
+
import React__default from 'react';
|
|
8
|
+
import { uuid, loadScript, autobind, themeable } from 'amis-rev-core';
|
|
9
|
+
import debounce from 'lodash/debounce';
|
|
10
|
+
import { Icon } from './icons.js';
|
|
11
|
+
|
|
12
|
+
var COORDINATES_GCJ02 = 3;
|
|
13
|
+
var COORDINATES_BD09 = 5;
|
|
14
|
+
// 记录百度地图SDK加载状态
|
|
15
|
+
var BMapLoadingPromise = null;
|
|
16
|
+
var BaiduMapPicker = /** @class */ (function (_super) {
|
|
17
|
+
__extends(BaiduMapPicker, _super);
|
|
18
|
+
function BaiduMapPicker() {
|
|
19
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments), false)) || this;
|
|
20
|
+
_this.state = {
|
|
21
|
+
inputValue: '',
|
|
22
|
+
locs: [],
|
|
23
|
+
locIndex: -1,
|
|
24
|
+
sugs: [],
|
|
25
|
+
innerValue: _this.props.value // 内部定位的值,用于内部更新地图定位点
|
|
26
|
+
};
|
|
27
|
+
_this.id = uuid();
|
|
28
|
+
_this.mapRef = React__default.createRef();
|
|
29
|
+
_this.search = debounce(function () {
|
|
30
|
+
var _a;
|
|
31
|
+
if (_this.state.inputValue) {
|
|
32
|
+
(_a = _this.ac) === null || _a === void 0 ? void 0 : _a.search(_this.state.inputValue);
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
_this.setState({
|
|
36
|
+
sugs: []
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}, 250, {
|
|
40
|
+
trailing: true,
|
|
41
|
+
leading: false
|
|
42
|
+
});
|
|
43
|
+
return _this;
|
|
44
|
+
}
|
|
45
|
+
BaiduMapPicker.prototype.componentDidMount = function () {
|
|
46
|
+
if (window.BMap) {
|
|
47
|
+
this.initMap();
|
|
48
|
+
}
|
|
49
|
+
else if (BMapLoadingPromise) {
|
|
50
|
+
BMapLoadingPromise.then(this.initMap).then(function () {
|
|
51
|
+
BMapLoadingPromise = null;
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
BMapLoadingPromise = loadScript("//api.map.baidu.com/api?v=3.0&ak=".concat(this.props.ak, "&callback={{callback}}"));
|
|
56
|
+
BMapLoadingPromise.then(this.initMap).then(function () {
|
|
57
|
+
BMapLoadingPromise = null;
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
BaiduMapPicker.prototype.componentWillUnmount = function () {
|
|
62
|
+
var _a, _b;
|
|
63
|
+
(_b = (_a = this.ac) === null || _a === void 0 ? void 0 : _a.dispose) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
64
|
+
this.placeholderInput && document.body.removeChild(this.placeholderInput);
|
|
65
|
+
delete this.placeholderInput;
|
|
66
|
+
delete this.map;
|
|
67
|
+
};
|
|
68
|
+
BaiduMapPicker.prototype.componentDidUpdate = function (prevProps, prevState) {
|
|
69
|
+
var _this = this;
|
|
70
|
+
// 值更新后需要重绘地图
|
|
71
|
+
if (prevProps.value !== this.props.value) {
|
|
72
|
+
this.setState({
|
|
73
|
+
innerValue: this.props.value
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
else if (this.state.innerValue !== prevState.innerValue &&
|
|
77
|
+
this.state.innerValue &&
|
|
78
|
+
this.map) {
|
|
79
|
+
this.map.clearOverlays();
|
|
80
|
+
var value = this.state.innerValue;
|
|
81
|
+
var point = value
|
|
82
|
+
? new BMap.Point(value.lng, value.lat)
|
|
83
|
+
: new BMap.Point(116.404, 39.915);
|
|
84
|
+
var zoom_1 = (value === null || value === void 0 ? void 0 : value.zoom) || 15;
|
|
85
|
+
if (this.props.coordinatesType == 'gcj02') {
|
|
86
|
+
this.covertPoint(point, COORDINATES_GCJ02, COORDINATES_BD09).then(function (point) { return _this.map.centerAndZoom(point, zoom_1); });
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
this.map.centerAndZoom(point, zoom_1);
|
|
90
|
+
}
|
|
91
|
+
var mk = new BMap.Marker(point);
|
|
92
|
+
// 增加定位点
|
|
93
|
+
this.map.addOverlay(mk);
|
|
94
|
+
// 移动到中心
|
|
95
|
+
this.map.panTo(point);
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
BaiduMapPicker.prototype.initMap = function () {
|
|
99
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
100
|
+
var autoSelectCurrentLoc, map, value, point, zoom, geolocationControl, input;
|
|
101
|
+
var _this = this;
|
|
102
|
+
var _a;
|
|
103
|
+
return __generator(this, function (_b) {
|
|
104
|
+
switch (_b.label) {
|
|
105
|
+
case 0:
|
|
106
|
+
autoSelectCurrentLoc = (_a = this.props.autoSelectCurrentLoc) !== null && _a !== void 0 ? _a : false;
|
|
107
|
+
map = new BMap.Map(this.mapRef.current, {
|
|
108
|
+
enableMapClick: false
|
|
109
|
+
});
|
|
110
|
+
this.map = map;
|
|
111
|
+
this.convertor = new BMap.Convertor();
|
|
112
|
+
value = this.props.value;
|
|
113
|
+
point = value
|
|
114
|
+
? new BMap.Point(value.lng, value.lat)
|
|
115
|
+
: new BMap.Point(116.404, 39.915);
|
|
116
|
+
zoom = (value === null || value === void 0 ? void 0 : value.zoom) || 15;
|
|
117
|
+
if (!(this.props.coordinatesType == 'gcj02')) return [3 /*break*/, 2];
|
|
118
|
+
return [4 /*yield*/, this.covertPoint(point, COORDINATES_GCJ02, COORDINATES_BD09)];
|
|
119
|
+
case 1:
|
|
120
|
+
point = _b.sent();
|
|
121
|
+
map.centerAndZoom(point, zoom);
|
|
122
|
+
return [3 /*break*/, 3];
|
|
123
|
+
case 2:
|
|
124
|
+
map.centerAndZoom(point, zoom);
|
|
125
|
+
_b.label = 3;
|
|
126
|
+
case 3:
|
|
127
|
+
if (!this.props.hideViewControl) {
|
|
128
|
+
map.addControl(
|
|
129
|
+
// @ts-ignore
|
|
130
|
+
new BMap.NavigationControl({ type: BMAP_NAVIGATION_CONTROL_SMALL }));
|
|
131
|
+
}
|
|
132
|
+
geolocationControl = new BMap.GeolocationControl();
|
|
133
|
+
geolocationControl.addEventListener('locationSuccess', function (e) {
|
|
134
|
+
_this.getLocations(e.point, autoSelectCurrentLoc);
|
|
135
|
+
});
|
|
136
|
+
if (this.props.showGeoLoc === true) {
|
|
137
|
+
map.addControl(geolocationControl);
|
|
138
|
+
}
|
|
139
|
+
map.addEventListener('click', function (e) {
|
|
140
|
+
if (_this.props.onlySelectCurrentLoc) {
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
_this.getLocations(e.point, true);
|
|
144
|
+
});
|
|
145
|
+
input = document.createElement('input');
|
|
146
|
+
input.className = 'invisible';
|
|
147
|
+
this.placeholderInput = input;
|
|
148
|
+
document.body.appendChild(input);
|
|
149
|
+
this.ac = new BMap.Autocomplete({
|
|
150
|
+
input: input,
|
|
151
|
+
location: map,
|
|
152
|
+
onSearchComplete: function (result) {
|
|
153
|
+
// 说明已经销毁了。
|
|
154
|
+
if (!_this.map) {
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
var sugs = [];
|
|
158
|
+
var poiLength = result.getNumPois();
|
|
159
|
+
if (poiLength) {
|
|
160
|
+
for (var i = 0; i < poiLength; i++) {
|
|
161
|
+
var poi = result.getPoi(i);
|
|
162
|
+
if (poi) {
|
|
163
|
+
sugs.push([
|
|
164
|
+
poi.province,
|
|
165
|
+
poi.city,
|
|
166
|
+
poi.district,
|
|
167
|
+
poi.street,
|
|
168
|
+
poi.business
|
|
169
|
+
].join(' '));
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
_this.setState({
|
|
173
|
+
sugs: sugs
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
value ? this.getLocations(point) : geolocationControl.location();
|
|
179
|
+
return [2 /*return*/];
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
});
|
|
183
|
+
};
|
|
184
|
+
BaiduMapPicker.prototype.getLocations = function (point, selectCurrentLoc) {
|
|
185
|
+
var _this = this;
|
|
186
|
+
var map = this.map;
|
|
187
|
+
map.clearOverlays();
|
|
188
|
+
var mk = new BMap.Marker(point);
|
|
189
|
+
map.addOverlay(mk);
|
|
190
|
+
map.panTo(point);
|
|
191
|
+
var geoc = new BMap.Geocoder();
|
|
192
|
+
geoc.getLocation(point, function (rs) {
|
|
193
|
+
// 说明已经销毁了。
|
|
194
|
+
if (!_this.map) {
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
var index = 0;
|
|
198
|
+
var locs = [];
|
|
199
|
+
locs.push({
|
|
200
|
+
title: '当前位置',
|
|
201
|
+
address: rs.address,
|
|
202
|
+
city: rs.addressComponents.city,
|
|
203
|
+
lat: rs.point.lat,
|
|
204
|
+
lng: rs.point.lng
|
|
205
|
+
});
|
|
206
|
+
if (Array.isArray(rs.surroundingPois)) {
|
|
207
|
+
rs.surroundingPois.forEach(function (item) {
|
|
208
|
+
locs.push({
|
|
209
|
+
title: item.title,
|
|
210
|
+
address: item.address,
|
|
211
|
+
city: item.city,
|
|
212
|
+
lat: item.point.lat,
|
|
213
|
+
lng: item.point.lng
|
|
214
|
+
});
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
_this.setState({
|
|
218
|
+
locIndex: index,
|
|
219
|
+
locs: locs
|
|
220
|
+
}, function () {
|
|
221
|
+
if (!selectCurrentLoc) {
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
_this.triggerOnChange(locs[0]);
|
|
225
|
+
});
|
|
226
|
+
});
|
|
227
|
+
};
|
|
228
|
+
BaiduMapPicker.prototype.handleChange = function (e) {
|
|
229
|
+
this.setState({
|
|
230
|
+
inputValue: e.currentTarget.value
|
|
231
|
+
}, this.search);
|
|
232
|
+
};
|
|
233
|
+
BaiduMapPicker.prototype.handleSelect = function (e) {
|
|
234
|
+
var _this = this;
|
|
235
|
+
var index = parseInt(e.currentTarget.getAttribute('data-index'), 10);
|
|
236
|
+
var loc = this.state.locs[index];
|
|
237
|
+
this.setState({
|
|
238
|
+
locIndex: index,
|
|
239
|
+
innerValue: loc
|
|
240
|
+
}, function () {
|
|
241
|
+
_this.triggerOnChange(loc);
|
|
242
|
+
});
|
|
243
|
+
};
|
|
244
|
+
BaiduMapPicker.prototype.covertPoint = function (point, from, to) {
|
|
245
|
+
var _this = this;
|
|
246
|
+
return new Promise(function (resolve, reject) {
|
|
247
|
+
_this.convertor.translate([point], from, to, function (res) {
|
|
248
|
+
if (res.status === 0 && res.points.length) {
|
|
249
|
+
resolve(new BMap.Point(res.points[0].lng, res.points[0].lat));
|
|
250
|
+
}
|
|
251
|
+
else {
|
|
252
|
+
reject();
|
|
253
|
+
}
|
|
254
|
+
});
|
|
255
|
+
});
|
|
256
|
+
};
|
|
257
|
+
BaiduMapPicker.prototype.triggerOnChange = function (loc) {
|
|
258
|
+
var _this = this;
|
|
259
|
+
var _a, _b;
|
|
260
|
+
var point = new BMap.Point(loc.lng, loc.lat);
|
|
261
|
+
if (this.props.coordinatesType == 'gcj02') {
|
|
262
|
+
this.covertPoint(point, COORDINATES_BD09, COORDINATES_GCJ02).then(function (convertedPoint) {
|
|
263
|
+
var _a;
|
|
264
|
+
typeof ((_a = _this.props) === null || _a === void 0 ? void 0 : _a.onChange) === 'function' &&
|
|
265
|
+
_this.props.onChange({
|
|
266
|
+
address: loc.address.trim() || loc.title,
|
|
267
|
+
lat: convertedPoint.lat,
|
|
268
|
+
lng: convertedPoint.lng,
|
|
269
|
+
city: loc.city
|
|
270
|
+
});
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
else {
|
|
274
|
+
typeof ((_a = this.props) === null || _a === void 0 ? void 0 : _a.onChange) === 'function' &&
|
|
275
|
+
((_b = this.props) === null || _b === void 0 ? void 0 : _b.onChange({
|
|
276
|
+
address: loc.address.trim() || loc.title,
|
|
277
|
+
lat: loc.lat,
|
|
278
|
+
lng: loc.lng,
|
|
279
|
+
city: loc.city
|
|
280
|
+
}));
|
|
281
|
+
}
|
|
282
|
+
};
|
|
283
|
+
BaiduMapPicker.prototype.handleSugSelect = function (e) {
|
|
284
|
+
var _this = this;
|
|
285
|
+
var value = e.currentTarget.innerText;
|
|
286
|
+
this.setState({
|
|
287
|
+
inputValue: value
|
|
288
|
+
});
|
|
289
|
+
var local = new BMap.LocalSearch(this.map, {
|
|
290
|
+
// 智能搜索
|
|
291
|
+
onSearchComplete: function () {
|
|
292
|
+
var results = local.getResults();
|
|
293
|
+
var poi = results.getPoi(0);
|
|
294
|
+
_this.setState({
|
|
295
|
+
inputValue: poi === null || poi === void 0 ? void 0 : poi.title,
|
|
296
|
+
sugs: []
|
|
297
|
+
});
|
|
298
|
+
_this.getLocations(poi === null || poi === void 0 ? void 0 : poi.point, true);
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
local.search(value);
|
|
302
|
+
};
|
|
303
|
+
BaiduMapPicker.prototype.render = function () {
|
|
304
|
+
var _this = this;
|
|
305
|
+
var _a, _b;
|
|
306
|
+
var _c = this.props, cx = _c.classnames, mapStyle = _c.mapStyle, placeholder = _c.placeholder;
|
|
307
|
+
var onlySelectCurrentLoc = (_a = this.props.onlySelectCurrentLoc) !== null && _a !== void 0 ? _a : false;
|
|
308
|
+
var _d = this.state, locIndex = _d.locIndex, locs = _d.locs, inputValue = _d.inputValue, sugs = _d.sugs;
|
|
309
|
+
var showSug = (_b = this.props.showSug) !== null && _b !== void 0 ? _b : true;
|
|
310
|
+
var hasSug = Array.isArray(sugs) && sugs.length;
|
|
311
|
+
return (React__default.createElement("div", { className: cx('MapPicker') },
|
|
312
|
+
!onlySelectCurrentLoc && (React__default.createElement("div", { className: cx('MapPicker-search TextControl-control') },
|
|
313
|
+
React__default.createElement("div", { className: cx('TextControl-input') },
|
|
314
|
+
React__default.createElement("input", { onChange: this.handleChange, value: inputValue, placeholder: placeholder || '搜索地点' })))),
|
|
315
|
+
React__default.createElement("div", { ref: this.mapRef, className: cx('MapPicker-map', {
|
|
316
|
+
invisible: hasSug
|
|
317
|
+
}), style: mapStyle }),
|
|
318
|
+
!showSug ? null : (React__default.createElement("div", { className: cx('MapPicker-result', {
|
|
319
|
+
invisible: hasSug
|
|
320
|
+
}) },
|
|
321
|
+
!onlySelectCurrentLoc &&
|
|
322
|
+
locs.map(function (item, index) { return (React__default.createElement("div", { onClick: _this.handleSelect, key: index, "data-index": index, className: cx('MapPicker-item') },
|
|
323
|
+
React__default.createElement("div", { className: cx('MapPicker-itemTitle') }, item.title),
|
|
324
|
+
React__default.createElement("div", { className: cx('MapPicker-itemDesc') }, item.address),
|
|
325
|
+
locIndex === index ? (React__default.createElement(Icon, { icon: "success", className: "icon" })) : null)); }),
|
|
326
|
+
onlySelectCurrentLoc && locs.length > 0 && (React__default.createElement("div", { onClick: this.handleSelect, key: "locs-current", "data-index": 0, className: cx('MapPicker-item') },
|
|
327
|
+
React__default.createElement("div", { className: cx('MapPicker-itemTitle') }, locs[0].title),
|
|
328
|
+
React__default.createElement("div", { className: cx('MapPicker-itemDesc') }, locs[0].address),
|
|
329
|
+
locIndex === 0 ? (React__default.createElement(Icon, { icon: "success", className: "icon" })) : null)))),
|
|
330
|
+
showSug && hasSug && !onlySelectCurrentLoc ? (React__default.createElement("div", { className: cx('MapPicker-sug') }, sugs.map(function (item) { return (React__default.createElement("div", { onClick: _this.handleSugSelect, className: cx('MapPicker-sugItem'), key: item }, item)); }))) : null));
|
|
331
|
+
};
|
|
332
|
+
__decorate([
|
|
333
|
+
autobind,
|
|
334
|
+
__metadata("design:type", Function),
|
|
335
|
+
__metadata("design:paramtypes", []),
|
|
336
|
+
__metadata("design:returntype", Promise)
|
|
337
|
+
], BaiduMapPicker.prototype, "initMap", null);
|
|
338
|
+
__decorate([
|
|
339
|
+
autobind,
|
|
340
|
+
__metadata("design:type", Function),
|
|
341
|
+
__metadata("design:paramtypes", [Object, Boolean]),
|
|
342
|
+
__metadata("design:returntype", void 0)
|
|
343
|
+
], BaiduMapPicker.prototype, "getLocations", null);
|
|
344
|
+
__decorate([
|
|
345
|
+
autobind,
|
|
346
|
+
__metadata("design:type", Function),
|
|
347
|
+
__metadata("design:paramtypes", [Object]),
|
|
348
|
+
__metadata("design:returntype", void 0)
|
|
349
|
+
], BaiduMapPicker.prototype, "handleChange", null);
|
|
350
|
+
__decorate([
|
|
351
|
+
autobind,
|
|
352
|
+
__metadata("design:type", Function),
|
|
353
|
+
__metadata("design:paramtypes", [Object]),
|
|
354
|
+
__metadata("design:returntype", void 0)
|
|
355
|
+
], BaiduMapPicker.prototype, "handleSelect", null);
|
|
356
|
+
__decorate([
|
|
357
|
+
autobind,
|
|
358
|
+
__metadata("design:type", Function),
|
|
359
|
+
__metadata("design:paramtypes", [Object]),
|
|
360
|
+
__metadata("design:returntype", void 0)
|
|
361
|
+
], BaiduMapPicker.prototype, "handleSugSelect", null);
|
|
362
|
+
return BaiduMapPicker;
|
|
363
|
+
}(React__default.Component));
|
|
364
|
+
var BaiduMapPicker$1 = themeable(BaiduMapPicker);
|
|
365
|
+
|
|
366
|
+
export { BaiduMapPicker, BaiduMapPicker$1 as default };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* amis-rev-ui v6.13.0
|
|
3
|
+
* Copyright 2018-2026 fex
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { __extends } from 'tslib';
|
|
7
|
+
import React__default from 'react';
|
|
8
|
+
import { themeable } from 'amis-rev-core';
|
|
9
|
+
import JsBarcode from 'jsbarcode';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @file 基于实现 bar code
|
|
13
|
+
*/
|
|
14
|
+
var BarCode = /** @class */ (function (_super) {
|
|
15
|
+
__extends(BarCode, _super);
|
|
16
|
+
function BarCode(props) {
|
|
17
|
+
var _this = _super.call(this, props) || this;
|
|
18
|
+
_this.dom = React__default.createRef();
|
|
19
|
+
return _this;
|
|
20
|
+
}
|
|
21
|
+
BarCode.prototype.componentDidUpdate = function (prevProps) {
|
|
22
|
+
if (this.props.value !== prevProps.value ||
|
|
23
|
+
JSON.stringify(this.props.options) !== JSON.stringify(prevProps.options)) {
|
|
24
|
+
this.renderBarCode();
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
BarCode.prototype.renderBarCode = function () {
|
|
28
|
+
if (this.dom.current) {
|
|
29
|
+
JsBarcode(this.dom.current, this.props.value, this.props.options);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
BarCode.prototype.componentDidMount = function () {
|
|
33
|
+
this.renderBarCode();
|
|
34
|
+
};
|
|
35
|
+
BarCode.prototype.render = function () {
|
|
36
|
+
return React__default.createElement("img", { ref: this.dom });
|
|
37
|
+
};
|
|
38
|
+
return BarCode;
|
|
39
|
+
}(React__default.Component));
|
|
40
|
+
var BarCode$1 = themeable(BarCode);
|
|
41
|
+
|
|
42
|
+
export { BarCode, BarCode$1 as default };
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* amis-rev-ui v6.13.0
|
|
3
|
+
* Copyright 2018-2026 fex
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { __extends, __rest, __assign, __spreadArray, __read } from 'tslib';
|
|
7
|
+
import React__default from 'react';
|
|
8
|
+
import TooltipWrapper from './TooltipWrapper.js';
|
|
9
|
+
import { removeHTMLTag, RootClose, themeable } from 'amis-rev-core';
|
|
10
|
+
import { Icon } from './icons.js';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @file Breadcrumb 面包屑
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* Breadcrumb 面包屑类
|
|
17
|
+
*/
|
|
18
|
+
var Breadcrumb = /** @class */ (function (_super) {
|
|
19
|
+
__extends(Breadcrumb, _super);
|
|
20
|
+
function Breadcrumb() {
|
|
21
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
22
|
+
}
|
|
23
|
+
Breadcrumb.prototype.render = function () {
|
|
24
|
+
var cx = this.props.classnames;
|
|
25
|
+
var _a = this.props, className = _a.className, style = _a.style, separatorClassName = _a.separatorClassName, items = _a.items, separator = _a.separator, testIdBuilder = _a.testIdBuilder, restProps = __rest(_a, ["className", "style", "separatorClassName", "items", "separator", "testIdBuilder"]);
|
|
26
|
+
var crumbsLength = items === null || items === void 0 ? void 0 : items.length;
|
|
27
|
+
if (!crumbsLength) {
|
|
28
|
+
return React__default.createElement("div", { className: cx('Breadcrumb', className) });
|
|
29
|
+
}
|
|
30
|
+
var crumbs = items
|
|
31
|
+
.map(function (item, index) {
|
|
32
|
+
var itemTestIdBuilder = testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild("item-".concat(item.label || index));
|
|
33
|
+
var itemPlace = 'middle';
|
|
34
|
+
if (index === 0) {
|
|
35
|
+
itemPlace = 'start';
|
|
36
|
+
}
|
|
37
|
+
if (index === crumbsLength - 1) {
|
|
38
|
+
itemPlace = 'end';
|
|
39
|
+
}
|
|
40
|
+
return (React__default.createElement(BreadcrumbItem, __assign({}, restProps, { item: item, itemPlace: itemPlace, key: index, testIdBuilder: itemTestIdBuilder })));
|
|
41
|
+
})
|
|
42
|
+
.reduce(function (prev, curr, index) { return [
|
|
43
|
+
prev,
|
|
44
|
+
React__default.createElement("span", { className: cx('Breadcrumb-separator', separatorClassName), key: "separator-".concat(index) }, separator),
|
|
45
|
+
curr
|
|
46
|
+
]; });
|
|
47
|
+
return (React__default.createElement("div", { className: cx('Breadcrumb', className), style: style }, crumbs));
|
|
48
|
+
};
|
|
49
|
+
Breadcrumb.defaultProps = {
|
|
50
|
+
separator: '>',
|
|
51
|
+
labelMaxLength: 16,
|
|
52
|
+
tooltipPosition: 'top'
|
|
53
|
+
};
|
|
54
|
+
return Breadcrumb;
|
|
55
|
+
}(React__default.Component));
|
|
56
|
+
/**
|
|
57
|
+
* BreadcrumbItem 面包项类
|
|
58
|
+
*/
|
|
59
|
+
var BreadcrumbItem = /** @class */ (function (_super) {
|
|
60
|
+
__extends(BreadcrumbItem, _super);
|
|
61
|
+
function BreadcrumbItem() {
|
|
62
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments), false)) || this;
|
|
63
|
+
_this.state = {
|
|
64
|
+
tooltipTrigger: ['hover', 'focus'],
|
|
65
|
+
tooltipRootClose: false,
|
|
66
|
+
isOpened: false
|
|
67
|
+
};
|
|
68
|
+
_this.domRef = function (ref) {
|
|
69
|
+
_this.target = ref;
|
|
70
|
+
};
|
|
71
|
+
_this.toogle = function (e) {
|
|
72
|
+
e.preventDefault();
|
|
73
|
+
_this.setState({
|
|
74
|
+
isOpened: !_this.state.isOpened
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
_this.close = function () {
|
|
78
|
+
_this.setState({
|
|
79
|
+
isOpened: false
|
|
80
|
+
});
|
|
81
|
+
};
|
|
82
|
+
return _this;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* 渲染基础面包项
|
|
86
|
+
* @param showHref 是否显示超链接
|
|
87
|
+
* @param itemType 基础面包项类型
|
|
88
|
+
* @param item 面包项
|
|
89
|
+
* @param label 渲染文本
|
|
90
|
+
* @returns
|
|
91
|
+
*/
|
|
92
|
+
BreadcrumbItem.prototype.renderBreadcrumbBaseItem = function (showHref, itemType, item, label) {
|
|
93
|
+
var _a = this.props, itemClassName = _a.itemClassName, dropdownItemClassName = _a.dropdownItemClassName, cx = _a.classnames, testIdBuilder = _a.testIdBuilder;
|
|
94
|
+
var baseItemClassName = itemType === 'default' ? itemClassName : dropdownItemClassName;
|
|
95
|
+
if (showHref) {
|
|
96
|
+
return (React__default.createElement("a", __assign({ href: item.href, className: cx('Breadcrumb-item-' + itemType, baseItemClassName) }, testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getTestId()),
|
|
97
|
+
item.icon ? (React__default.createElement(Icon, { cx: cx, icon: item.icon, className: "Icon", classNameProp: "Breadcrumb-icon" })) : null,
|
|
98
|
+
React__default.createElement("span", { className: cx('TplField fr-view') }, label)));
|
|
99
|
+
}
|
|
100
|
+
return (React__default.createElement("span", __assign({ className: cx('Breadcrumb-item-' + itemType, baseItemClassName) }, testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getTestId()),
|
|
101
|
+
item.icon ? (React__default.createElement(Icon, { cx: cx, icon: item.icon, className: "Icon", classNameProp: "Breadcrumb-icon" })) : null,
|
|
102
|
+
React__default.createElement("span", { className: cx('TplField fr-view') }, label)));
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* 渲染基础面包项完整节点
|
|
106
|
+
* @param item 面包项
|
|
107
|
+
* @param tooltipPosition 浮窗提示位置
|
|
108
|
+
* @param itemPlace 面包香所在相对位置
|
|
109
|
+
* @param itemType 基础面包项类型
|
|
110
|
+
* @returns
|
|
111
|
+
*/
|
|
112
|
+
BreadcrumbItem.prototype.renderBreadcrumbNode = function (item, tooltipPosition, itemPlace, itemType) {
|
|
113
|
+
if (tooltipPosition === void 0) { tooltipPosition = 'top'; }
|
|
114
|
+
var _a = this.props, labelMaxLength = _a.labelMaxLength, tooltipContainer = _a.tooltipContainer;
|
|
115
|
+
var _b = this.state, tooltipTrigger = _b.tooltipTrigger, tooltipRootClose = _b.tooltipRootClose;
|
|
116
|
+
var pureLabel = item.label ? removeHTMLTag(item.label) : '';
|
|
117
|
+
// 限制最大展示长度的最小值
|
|
118
|
+
var maxLength = labelMaxLength && +labelMaxLength > 1 ? +labelMaxLength : 1;
|
|
119
|
+
// 面包项相对位置为 middle ,且超过最大展示长度的面包项,进行缩略展示,并使用浮窗提示
|
|
120
|
+
if (pureLabel.length > maxLength && itemPlace === 'middle') {
|
|
121
|
+
return (React__default.createElement(TooltipWrapper, { tooltip: pureLabel, placement: tooltipPosition, container: tooltipContainer, trigger: tooltipTrigger, rootClose: tooltipRootClose }, this.renderBreadcrumbBaseItem(true, itemType, item, pureLabel.substring(0, maxLength) + '...')));
|
|
122
|
+
}
|
|
123
|
+
var showHref = !item.href || itemPlace === 'end';
|
|
124
|
+
return this.renderBreadcrumbBaseItem(!showHref, itemType, item, pureLabel);
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* 渲染下拉菜单节点
|
|
128
|
+
* @param dropdown 面包项下拉菜单
|
|
129
|
+
* @returns
|
|
130
|
+
*/
|
|
131
|
+
BreadcrumbItem.prototype.renderDropdownNode = function (dropdown) {
|
|
132
|
+
var _this = this;
|
|
133
|
+
var _a = this.props, dropdownClassName = _a.dropdownClassName, cx = _a.classnames;
|
|
134
|
+
return (React__default.createElement(RootClose, { disabled: !this.state.isOpened, onRootClose: this.close }, function (ref) {
|
|
135
|
+
return (React__default.createElement("ul", { className: cx('Breadcrumb-dropdown', dropdownClassName), onClick: _this.close, ref: ref }, Array.isArray(dropdown) &&
|
|
136
|
+
dropdown.map(function (menuItem, index) {
|
|
137
|
+
return (React__default.createElement("li", { key: 'dropdown-item' + index }, _this.renderBreadcrumbNode(menuItem, 'right', 'middle', 'dropdown')));
|
|
138
|
+
})));
|
|
139
|
+
}));
|
|
140
|
+
};
|
|
141
|
+
BreadcrumbItem.prototype.render = function () {
|
|
142
|
+
var _a = this.props, item = _a.item, itemPlace = _a.itemPlace, tooltipPosition = _a.tooltipPosition, cx = _a.classnames;
|
|
143
|
+
var dropdown = item.dropdown, restItemProps = __rest(item, ["dropdown"]);
|
|
144
|
+
return (React__default.createElement("span", { className: cx('Breadcrumb-item', {
|
|
145
|
+
'is-opened': this.state.isOpened
|
|
146
|
+
}, {
|
|
147
|
+
'Breadcrumb-item-last': itemPlace === 'end'
|
|
148
|
+
}), ref: this.domRef },
|
|
149
|
+
this.renderBreadcrumbNode(__assign({}, restItemProps), tooltipPosition, itemPlace, 'default'),
|
|
150
|
+
dropdown ? (React__default.createElement("span", { onClick: this.toogle, className: cx('Breadcrumb-item-caret') },
|
|
151
|
+
React__default.createElement(Icon, { icon: "down", className: "icon" }))) : null,
|
|
152
|
+
dropdown && this.state.isOpened
|
|
153
|
+
? this.renderDropdownNode(dropdown)
|
|
154
|
+
: null));
|
|
155
|
+
};
|
|
156
|
+
return BreadcrumbItem;
|
|
157
|
+
}(React__default.Component));
|
|
158
|
+
var Breadcrumb$1 = themeable(Breadcrumb);
|
|
159
|
+
|
|
160
|
+
export { Breadcrumb, BreadcrumbItem, Breadcrumb$1 as default };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* amis-rev-ui v6.13.0
|
|
3
|
+
* Copyright 2018-2026 fex
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { __extends, __rest, __assign } from 'tslib';
|
|
7
|
+
import React__default from 'react';
|
|
8
|
+
import TooltipWrapper from './TooltipWrapper.js';
|
|
9
|
+
import { pickEventsProps, themeable } from 'amis-rev-core';
|
|
10
|
+
import Spinner from './Spinner.js';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @file Button
|
|
14
|
+
* @author fex
|
|
15
|
+
*/
|
|
16
|
+
var Button = /** @class */ (function (_super) {
|
|
17
|
+
__extends(Button, _super);
|
|
18
|
+
function Button() {
|
|
19
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
20
|
+
}
|
|
21
|
+
Button.prototype.renderButton = function () {
|
|
22
|
+
var _a, _b;
|
|
23
|
+
var _c = this.props, level = _c.level, _d = _c.size, size = _d === void 0 ? 'default' : _d, disabled = _c.disabled, className = _c.className, style = _c.style, title = _c.title, Comp = _c.componentClass, cx = _c.classnames, children = _c.children; _c.disabledTip; var block = _c.block, type = _c.type, active = _c.active, iconOnly = _c.iconOnly, href = _c.href, loading = _c.loading, loadingClassName = _c.loadingClassName, overrideClassName = _c.overrideClassName, loadingConfig = _c.loadingConfig, testIdBuilder = _c.testIdBuilder, tabIndex = _c.tabIndex, rest = __rest(_c, ["level", "size", "disabled", "className", "style", "title", "componentClass", "classnames", "children", "disabledTip", "block", "type", "active", "iconOnly", "href", "loading", "loadingClassName", "overrideClassName", "loadingConfig", "testIdBuilder", "tabIndex"]);
|
|
24
|
+
if (href) {
|
|
25
|
+
Comp = 'a';
|
|
26
|
+
}
|
|
27
|
+
else if ((Comp === 'button' && disabled) || loading) {
|
|
28
|
+
Comp = 'div';
|
|
29
|
+
}
|
|
30
|
+
return (React__default.createElement(Comp, __assign({ type: Comp === 'input' || Comp === 'button' ? type : undefined }, pickEventsProps(rest), { onClick: rest.onClick && (disabled || loading) ? function () { } : rest.onClick, href: href }, testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getTestId(), { className: cx(overrideClassName
|
|
31
|
+
? ''
|
|
32
|
+
: (_a = {
|
|
33
|
+
'Button': true
|
|
34
|
+
},
|
|
35
|
+
_a["Button--".concat(level)] = level,
|
|
36
|
+
_a["Button--size-".concat(size)] = size,
|
|
37
|
+
_a["Button--block"] = block,
|
|
38
|
+
_a["Button--iconOnly"] = iconOnly,
|
|
39
|
+
_a['is-disabled'] = disabled,
|
|
40
|
+
_a['is-active'] = active,
|
|
41
|
+
_a['is-loading'] = loading,
|
|
42
|
+
_a), className), style: style, title: title, disabled: disabled, tabIndex: tabIndex }),
|
|
43
|
+
loading && !disabled && (React__default.createElement(Spinner, { loadingConfig: loadingConfig, size: "sm", show: true, icon: "loading-outline", className: cx(overrideClassName
|
|
44
|
+
? ''
|
|
45
|
+
: (_b = {}, _b["Button--loading Button--loading--".concat(level)] = level, _b), loadingClassName) })),
|
|
46
|
+
children));
|
|
47
|
+
};
|
|
48
|
+
Button.prototype.render = function () {
|
|
49
|
+
var _a = this.props, tooltip = _a.tooltip, tooltipPlacement = _a.tooltipPlacement, tooltipContainer = _a.tooltipContainer, tooltipTrigger = _a.tooltipTrigger, tooltipRootClose = _a.tooltipRootClose, disabled = _a.disabled, disabledTip = _a.disabledTip; _a.classnames;
|
|
50
|
+
return (React__default.createElement(TooltipWrapper, { placement: tooltipPlacement, tooltip: disabled ? disabledTip : tooltip, container: tooltipContainer, trigger: tooltipTrigger, rootClose: tooltipRootClose }, this.renderButton()));
|
|
51
|
+
};
|
|
52
|
+
Button.defaultProps = {
|
|
53
|
+
componentClass: 'button',
|
|
54
|
+
level: 'default',
|
|
55
|
+
type: 'button',
|
|
56
|
+
tooltipPlacement: 'top',
|
|
57
|
+
tooltipTrigger: ['hover', 'focus'],
|
|
58
|
+
tooltipRootClose: false
|
|
59
|
+
};
|
|
60
|
+
return Button;
|
|
61
|
+
}(React__default.Component));
|
|
62
|
+
var Button$1 = themeable(Button);
|
|
63
|
+
|
|
64
|
+
export { Button, Button$1 as default };
|