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,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* amis-rev-ui v6.13.0
|
|
3
|
+
* Copyright 2018-2026 fex
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
'use strict';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @file PdfViewer.tsx PDF 预览
|
|
10
|
+
*
|
|
11
|
+
* @created: 2024/02/26
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
var tslib_1 = require("tslib");
|
|
15
|
+
var react_1 = tslib_1.__importDefault(require("react"));
|
|
16
|
+
var amis_rev_core_1 = require("amis-rev-core");
|
|
17
|
+
var react_pdf_1 = require("react-pdf");
|
|
18
|
+
var icons_1 = require("./icons");
|
|
19
|
+
var Input_1 = tslib_1.__importDefault(require("./Input"));
|
|
20
|
+
var Spinner_1 = tslib_1.__importDefault(require("./Spinner"));
|
|
21
|
+
react_pdf_1.pdfjs.GlobalWorkerOptions.workerSrc = (0, amis_rev_core_1.getGlobalOptions)().pdfjsWorkerSrc;
|
|
22
|
+
var PdfViewer = function (props) {
|
|
23
|
+
var cx = props.classnames, className = props.className, loading = props.loading, _a = props.width, width = _a === void 0 ? 300 : _a;
|
|
24
|
+
var _b = tslib_1.__read(react_1.default.useState(props.file), 2), file = _b[0], setFile = _b[1];
|
|
25
|
+
var _c = tslib_1.__read(react_1.default.useState(false), 2), loaded = _c[0], setLoaded = _c[1];
|
|
26
|
+
var _d = tslib_1.__read(react_1.default.useState(1), 2), page = _d[0], setPage = _d[1];
|
|
27
|
+
var _e = tslib_1.__read(react_1.default.useState(1), 2), scale = _e[0], setScale = _e[1];
|
|
28
|
+
var _f = tslib_1.__read(react_1.default.useState(1), 2), total = _f[0], setTotal = _f[1];
|
|
29
|
+
var inputRef = react_1.default.useRef();
|
|
30
|
+
react_1.default.useEffect(function () {
|
|
31
|
+
if (props.file instanceof ArrayBuffer && props.file.byteLength > 0) {
|
|
32
|
+
setFile(props.file);
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
setFile(undefined);
|
|
36
|
+
}
|
|
37
|
+
}, [props.file]);
|
|
38
|
+
function handleLoadSuccess(_a) {
|
|
39
|
+
var numPages = _a.numPages;
|
|
40
|
+
setLoaded(true);
|
|
41
|
+
setTotal(numPages);
|
|
42
|
+
}
|
|
43
|
+
function handleChangePage(idx) {
|
|
44
|
+
var newPage = page + idx;
|
|
45
|
+
if (newPage <= 0 || newPage > total) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
setPage(newPage);
|
|
49
|
+
}
|
|
50
|
+
function handlePageBlur(event) {
|
|
51
|
+
var newPage = +event.target.value;
|
|
52
|
+
if (isNaN(newPage) || newPage <= 0 || newPage > total) {
|
|
53
|
+
if (inputRef.current) {
|
|
54
|
+
inputRef.current.value = page + '';
|
|
55
|
+
}
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
setPage(newPage);
|
|
59
|
+
}
|
|
60
|
+
function handleChangeScale(t) {
|
|
61
|
+
setScale(scale * t);
|
|
62
|
+
}
|
|
63
|
+
function renderLoading() {
|
|
64
|
+
return (react_1.default.createElement("div", { className: cx('PdfViewer-Loading') },
|
|
65
|
+
react_1.default.createElement(Spinner_1.default, null)));
|
|
66
|
+
}
|
|
67
|
+
function renderTool() {
|
|
68
|
+
return (react_1.default.createElement("div", { className: cx('PdfViewer-Tool') },
|
|
69
|
+
react_1.default.createElement(icons_1.Icon, { className: "icon", icon: "prev", onClick: function () { return handleChangePage(-1); } }),
|
|
70
|
+
react_1.default.createElement(Input_1.default, { className: "page-input", value: page, onBlur: handlePageBlur, ref: inputRef }),
|
|
71
|
+
react_1.default.createElement("span", { className: "gap" }, "/"),
|
|
72
|
+
react_1.default.createElement("span", null, total),
|
|
73
|
+
react_1.default.createElement(icons_1.Icon, { className: "icon", icon: "next", onClick: function () { return handleChangePage(1); } }),
|
|
74
|
+
react_1.default.createElement(icons_1.Icon, { className: "icon", icon: "zoom-in", onClick: function () { return handleChangeScale(1.2); } }),
|
|
75
|
+
react_1.default.createElement(icons_1.Icon, { className: "icon", icon: "zoom-out", onClick: function () { return handleChangeScale(0.8); } })));
|
|
76
|
+
}
|
|
77
|
+
return (react_1.default.createElement("div", { className: cx(className, 'PdfViewer') }, !file || loading ? (renderLoading()) : (react_1.default.createElement(react_1.default.Fragment, null,
|
|
78
|
+
react_1.default.createElement("div", { className: cx('PdfViewer-Content', { 'is-loaded': loaded }) },
|
|
79
|
+
react_1.default.createElement(react_pdf_1.Document, { file: file, onLoadSuccess: handleLoadSuccess, onLoadError: function (err) { return console.log(err); }, loading: renderLoading() },
|
|
80
|
+
react_1.default.createElement(react_pdf_1.Page, { className: cx('PdfViewer-Content-Page'), pageNumber: page, width: width, height: props.height, loading: renderLoading(), noData: react_1.default.createElement("div", null, "No PDF data"), scale: scale, renderTextLayer: false, renderAnnotationLayer: false }))),
|
|
81
|
+
loaded ? renderTool() : null))));
|
|
82
|
+
};
|
|
83
|
+
exports.default = (0, amis_rev_core_1.themeable)(PdfViewer);
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type OverlayAlignType = 'left' | 'center' | 'right';
|
|
3
|
+
export interface PopOverOverlay {
|
|
4
|
+
width?: string | number;
|
|
5
|
+
align?: OverlayAlignType;
|
|
6
|
+
}
|
|
7
|
+
export interface PopOverContainerProps {
|
|
8
|
+
show?: boolean;
|
|
9
|
+
children: (props: {
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
onClick: (e: React.MouseEvent) => void;
|
|
12
|
+
isOpened: boolean;
|
|
13
|
+
ref: any;
|
|
14
|
+
}) => JSX.Element;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/** 弹出层打开时触发的事件 */
|
|
17
|
+
onOpen?: () => void;
|
|
18
|
+
popOverRender: (props: {
|
|
19
|
+
onClose: () => void;
|
|
20
|
+
}) => JSX.Element;
|
|
21
|
+
popOverContainer?: any;
|
|
22
|
+
popOverClassName?: string;
|
|
23
|
+
mobileUI?: boolean;
|
|
24
|
+
placement?: string;
|
|
25
|
+
overlayWidth?: number | string;
|
|
26
|
+
overlayWidthField?: 'minWidth' | 'width';
|
|
27
|
+
showConfirm?: boolean;
|
|
28
|
+
align?: OverlayAlignType;
|
|
29
|
+
/** Popover层隐藏前触发的事件 */
|
|
30
|
+
onBeforeHide?: () => void;
|
|
31
|
+
/** Popover层隐藏后触发的事件 */
|
|
32
|
+
onAfterHide?: () => void;
|
|
33
|
+
onConfirm?: () => void;
|
|
34
|
+
}
|
|
35
|
+
export interface PopOverContainerState {
|
|
36
|
+
isOpened: boolean;
|
|
37
|
+
}
|
|
38
|
+
export declare class PopOverContainer extends React.Component<PopOverContainerProps, PopOverContainerState> {
|
|
39
|
+
static alignPlacementMap: {
|
|
40
|
+
left: string;
|
|
41
|
+
right: string;
|
|
42
|
+
center: string;
|
|
43
|
+
};
|
|
44
|
+
state: PopOverContainerState;
|
|
45
|
+
target: any;
|
|
46
|
+
targetRef(target: any): void;
|
|
47
|
+
handleClick(e?: React.MouseEvent): void;
|
|
48
|
+
close(): void;
|
|
49
|
+
getTarget(): any;
|
|
50
|
+
getParent(): any;
|
|
51
|
+
onConfirm(): void;
|
|
52
|
+
static calcOverlayWidth(overlay: PopOverOverlay, targetWidth: number): string | number | undefined;
|
|
53
|
+
static alignToPlacement(overlay?: PopOverOverlay): string;
|
|
54
|
+
getOverlayStyle(): {
|
|
55
|
+
[x: string]: string | number;
|
|
56
|
+
};
|
|
57
|
+
render(): React.JSX.Element;
|
|
58
|
+
}
|
|
59
|
+
export default PopOverContainer;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file RichText
|
|
3
|
+
* @description
|
|
4
|
+
* @author fex
|
|
5
|
+
*/
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import FroalaEditor from 'froala-editor';
|
|
8
|
+
import 'froala-editor/js/plugins/align.min';
|
|
9
|
+
import 'froala-editor/js/plugins/colors.min';
|
|
10
|
+
import 'froala-editor/js/plugins/char_counter.min';
|
|
11
|
+
import 'froala-editor/js/plugins/code_view.min';
|
|
12
|
+
import 'froala-editor/js/plugins/draggable.min';
|
|
13
|
+
import 'froala-editor/js/plugins/entities.min';
|
|
14
|
+
import 'froala-editor/js/plugins/font_family.min';
|
|
15
|
+
import 'froala-editor/js/plugins/font_size.min';
|
|
16
|
+
import 'froala-editor/js/plugins/forms.min';
|
|
17
|
+
import 'froala-editor/js/plugins/fullscreen.min';
|
|
18
|
+
import 'froala-editor/js/plugins/help.min';
|
|
19
|
+
import 'froala-editor/js/plugins/image.min';
|
|
20
|
+
import 'froala-editor/js/plugins/inline_class.min';
|
|
21
|
+
import 'froala-editor/js/plugins/inline_style.min';
|
|
22
|
+
import 'froala-editor/js/plugins/line_breaker.min';
|
|
23
|
+
import 'froala-editor/js/plugins/line_height.min';
|
|
24
|
+
import 'froala-editor/js/plugins/link.min';
|
|
25
|
+
import 'froala-editor/js/plugins/lists.min';
|
|
26
|
+
import 'froala-editor/js/plugins/paragraph_format.min';
|
|
27
|
+
import 'froala-editor/js/plugins/paragraph_style.min';
|
|
28
|
+
import 'froala-editor/js/plugins/print.min';
|
|
29
|
+
import 'froala-editor/js/plugins/quick_insert.min';
|
|
30
|
+
import 'froala-editor/js/plugins/quote.min';
|
|
31
|
+
import 'froala-editor/js/plugins/save.min';
|
|
32
|
+
import 'froala-editor/js/plugins/special_characters.min';
|
|
33
|
+
import 'froala-editor/js/plugins/table.min';
|
|
34
|
+
import 'froala-editor/js/plugins/url.min';
|
|
35
|
+
import 'froala-editor/js/plugins/video.min';
|
|
36
|
+
import 'froala-editor/js/plugins/word_paste.min';
|
|
37
|
+
import 'froala-editor/js/languages/zh_cn.js';
|
|
38
|
+
export interface FroalaEditorComponentProps {
|
|
39
|
+
config: any;
|
|
40
|
+
model: string;
|
|
41
|
+
onModelChange: (value: string) => void;
|
|
42
|
+
children?: React.ReactNode;
|
|
43
|
+
}
|
|
44
|
+
export default class extends React.Component<any, any> {
|
|
45
|
+
constructor(props: any);
|
|
46
|
+
render(): React.JSX.Element;
|
|
47
|
+
}
|
|
48
|
+
export { FroalaEditor };
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* amis-rev-ui v6.13.0
|
|
3
|
+
* Copyright 2018-2026 fex
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
'use strict';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @file RichText
|
|
10
|
+
* @description
|
|
11
|
+
* @author fex
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.FroalaEditor = void 0;
|
|
15
|
+
var tslib_1 = require("tslib");
|
|
16
|
+
var react_1 = tslib_1.__importDefault(require("react"));
|
|
17
|
+
var isEqual_1 = tslib_1.__importDefault(require("lodash/isEqual"));
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
var froala_editor_1 = tslib_1.__importDefault(require("froala-editor"));
|
|
20
|
+
exports.FroalaEditor = froala_editor_1.default;
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
var froala_editor_min_js_1 = tslib_1.__importDefault(require("froala-editor/js/froala_editor.min.js"));
|
|
23
|
+
require("froala-editor/js/plugins/align.min");
|
|
24
|
+
require("froala-editor/js/plugins/colors.min");
|
|
25
|
+
require("froala-editor/js/plugins/char_counter.min");
|
|
26
|
+
require("froala-editor/js/plugins/code_view.min");
|
|
27
|
+
require("froala-editor/js/plugins/draggable.min");
|
|
28
|
+
require("froala-editor/js/plugins/entities.min");
|
|
29
|
+
require("froala-editor/js/plugins/font_family.min");
|
|
30
|
+
require("froala-editor/js/plugins/font_size.min");
|
|
31
|
+
require("froala-editor/js/plugins/forms.min");
|
|
32
|
+
require("froala-editor/js/plugins/fullscreen.min");
|
|
33
|
+
require("froala-editor/js/plugins/help.min");
|
|
34
|
+
require("froala-editor/js/plugins/image.min");
|
|
35
|
+
require("froala-editor/js/plugins/inline_class.min");
|
|
36
|
+
require("froala-editor/js/plugins/inline_style.min");
|
|
37
|
+
require("froala-editor/js/plugins/line_breaker.min");
|
|
38
|
+
require("froala-editor/js/plugins/line_height.min");
|
|
39
|
+
require("froala-editor/js/plugins/link.min");
|
|
40
|
+
require("froala-editor/js/plugins/lists.min");
|
|
41
|
+
require("froala-editor/js/plugins/paragraph_format.min");
|
|
42
|
+
require("froala-editor/js/plugins/paragraph_style.min");
|
|
43
|
+
require("froala-editor/js/plugins/print.min");
|
|
44
|
+
require("froala-editor/js/plugins/quick_insert.min");
|
|
45
|
+
require("froala-editor/js/plugins/quote.min");
|
|
46
|
+
require("froala-editor/js/plugins/save.min");
|
|
47
|
+
require("froala-editor/js/plugins/special_characters.min");
|
|
48
|
+
require("froala-editor/js/plugins/table.min");
|
|
49
|
+
require("froala-editor/js/plugins/url.min");
|
|
50
|
+
require("froala-editor/js/plugins/video.min");
|
|
51
|
+
require("froala-editor/js/plugins/word_paste.min");
|
|
52
|
+
require("froala-editor/js/languages/zh_cn.js");
|
|
53
|
+
// 代码来源于:https://github.com/froala/react-froala-wysiwyg/blob/master/lib/FroalaEditorFunctionality.jsx
|
|
54
|
+
// 改动原因是model 同步有些问题,有时候不更新,所以基于官方代码改造一下。
|
|
55
|
+
// 目前发现的问题是,如果 model 数据修改,如果此时 editor 还没有初始化完成则不会同步成功
|
|
56
|
+
var FroalaEditorComponent = /** @class */ (function (_super) {
|
|
57
|
+
tslib_1.__extends(FroalaEditorComponent, _super);
|
|
58
|
+
function FroalaEditorComponent(props) {
|
|
59
|
+
var _this = _super.call(this, props) || this;
|
|
60
|
+
_this.listeningEvents = [];
|
|
61
|
+
_this.element = null;
|
|
62
|
+
_this.editor = null;
|
|
63
|
+
_this.config = {
|
|
64
|
+
immediateReactModelUpdate: false,
|
|
65
|
+
reactIgnoreAttrs: null
|
|
66
|
+
};
|
|
67
|
+
_this.editorInitialized = false;
|
|
68
|
+
_this.INNER_HTML_ATTR = 'innerHTML';
|
|
69
|
+
_this.oldModel = null;
|
|
70
|
+
return _this;
|
|
71
|
+
}
|
|
72
|
+
// After first time render.
|
|
73
|
+
FroalaEditorComponent.prototype.componentDidMount = function () {
|
|
74
|
+
this.createEditor();
|
|
75
|
+
};
|
|
76
|
+
FroalaEditorComponent.prototype.componentWillUnmount = function () {
|
|
77
|
+
this.destroyEditor();
|
|
78
|
+
};
|
|
79
|
+
FroalaEditorComponent.prototype.componentDidUpdate = function (prevProps) {
|
|
80
|
+
if (!(0, isEqual_1.default)(this.props.config, prevProps.config)) {
|
|
81
|
+
this.destroyEditor();
|
|
82
|
+
this.createEditor();
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
if (JSON.stringify(this.oldModel) == JSON.stringify(this.props.model)) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
this.setContent();
|
|
89
|
+
};
|
|
90
|
+
// Return cloned object
|
|
91
|
+
FroalaEditorComponent.prototype.clone = function (item) {
|
|
92
|
+
var me = this;
|
|
93
|
+
if (!item) {
|
|
94
|
+
return item;
|
|
95
|
+
} // null, undefined values check
|
|
96
|
+
var types = [Number, String, Boolean], result;
|
|
97
|
+
// normalizing primitives if someone did new String('aaa'), or new Number('444');
|
|
98
|
+
types.forEach(function (type) {
|
|
99
|
+
if (item instanceof type) {
|
|
100
|
+
result = type(item);
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
if (typeof result == 'undefined') {
|
|
104
|
+
if (Object.prototype.toString.call(item) === '[object Array]') {
|
|
105
|
+
result = [];
|
|
106
|
+
item.forEach(function (child, index, array) {
|
|
107
|
+
result[index] = me.clone(child);
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
else if (typeof item == 'object') {
|
|
111
|
+
// testing that this is DOM
|
|
112
|
+
if (item.nodeType && typeof item.cloneNode == 'function') {
|
|
113
|
+
result = item.cloneNode(true);
|
|
114
|
+
}
|
|
115
|
+
else if (!item.prototype) {
|
|
116
|
+
// check that this is a literal
|
|
117
|
+
if (item instanceof Date) {
|
|
118
|
+
result = new Date(item);
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
// it is an object literal
|
|
122
|
+
result = {};
|
|
123
|
+
for (var i in item) {
|
|
124
|
+
result[i] = me.clone(item[i]);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
{
|
|
130
|
+
result = item;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
result = item;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return result;
|
|
139
|
+
};
|
|
140
|
+
FroalaEditorComponent.prototype.createEditor = function () {
|
|
141
|
+
var _this = this;
|
|
142
|
+
if (this.editorInitialized) {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
this.config = this.clone(this.props.config || this.config);
|
|
146
|
+
this.config = tslib_1.__assign({}, this.config);
|
|
147
|
+
this.element = this.el;
|
|
148
|
+
if (this.props.model) {
|
|
149
|
+
this.element.innerHTML = this.props.model;
|
|
150
|
+
}
|
|
151
|
+
this.setContent();
|
|
152
|
+
// Default initialized.
|
|
153
|
+
this.registerEvent('initialized', this.config.events && this.config.events.initialized);
|
|
154
|
+
// Check if events are set.
|
|
155
|
+
if (!this.config.events)
|
|
156
|
+
this.config.events = {};
|
|
157
|
+
this.config.events.initialized = function () {
|
|
158
|
+
_this.editorInitialized = true;
|
|
159
|
+
_this.initListeners();
|
|
160
|
+
};
|
|
161
|
+
this.editor = new froala_editor_1.default(this.element, this.config);
|
|
162
|
+
};
|
|
163
|
+
FroalaEditorComponent.prototype.setContent = function () {
|
|
164
|
+
var _this = this;
|
|
165
|
+
if (this.props.model || this.props.model == '') {
|
|
166
|
+
this.oldModel = this.props.model;
|
|
167
|
+
if (this.editorInitialized) {
|
|
168
|
+
this.setNormalTagContent();
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
if (!this._initEvents)
|
|
172
|
+
this._initEvents = [];
|
|
173
|
+
this._initEvents.push(function () { return _this.setNormalTagContent(); });
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
FroalaEditorComponent.prototype.setNormalTagContent = function () {
|
|
178
|
+
var self = this;
|
|
179
|
+
self.editor.html && self.editor.html.set(self.props.model || '');
|
|
180
|
+
if (self.editorInitialized && self.editor.undo) {
|
|
181
|
+
//This will reset the undo stack everytime the model changes externally. Can we fix this?
|
|
182
|
+
self.editor.undo.reset();
|
|
183
|
+
self.editor.undo.saveStep();
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
FroalaEditorComponent.prototype.destroyEditor = function () {
|
|
187
|
+
if (this.element) {
|
|
188
|
+
this.editor.destroy && this.editor.destroy();
|
|
189
|
+
this.listeningEvents.length = 0;
|
|
190
|
+
this.element = null;
|
|
191
|
+
this.editorInitialized = false;
|
|
192
|
+
this._initEvents = [];
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
FroalaEditorComponent.prototype.getEditor = function () {
|
|
196
|
+
if (this.element) {
|
|
197
|
+
return this.editor;
|
|
198
|
+
}
|
|
199
|
+
return null;
|
|
200
|
+
};
|
|
201
|
+
FroalaEditorComponent.prototype.updateModel = function () {
|
|
202
|
+
if (!this.props.onModelChange) {
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
var modelContent = '';
|
|
206
|
+
var returnedHtml = this.editor.html.get();
|
|
207
|
+
if (typeof returnedHtml === 'string') {
|
|
208
|
+
modelContent = returnedHtml;
|
|
209
|
+
}
|
|
210
|
+
if (this.oldModel !== modelContent) {
|
|
211
|
+
this.oldModel = modelContent;
|
|
212
|
+
this.props.onModelChange(modelContent);
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
FroalaEditorComponent.prototype.initListeners = function () {
|
|
216
|
+
var self = this;
|
|
217
|
+
// bind contentChange and keyup event to froalaModel
|
|
218
|
+
this.editor.events.on('contentChanged', function () {
|
|
219
|
+
self.updateModel();
|
|
220
|
+
});
|
|
221
|
+
if (this.config.immediateReactModelUpdate) {
|
|
222
|
+
this.editor.events.on('keyup', function () {
|
|
223
|
+
self.updateModel();
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
// Call init events.
|
|
227
|
+
if (this._initEvents) {
|
|
228
|
+
for (var i = 0; i < this._initEvents.length; i++) {
|
|
229
|
+
this._initEvents[i].call(this.editor);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
// register event on jquery editor element
|
|
234
|
+
FroalaEditorComponent.prototype.registerEvent = function (eventName, callback) {
|
|
235
|
+
if (!eventName || !callback) {
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
if (eventName == 'initialized') {
|
|
239
|
+
if (!this._initEvents)
|
|
240
|
+
this._initEvents = [];
|
|
241
|
+
this._initEvents.push(callback);
|
|
242
|
+
}
|
|
243
|
+
else {
|
|
244
|
+
if (!this.config.events) {
|
|
245
|
+
this.config.events = {};
|
|
246
|
+
}
|
|
247
|
+
this.config.events[eventName] = callback;
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
FroalaEditorComponent.prototype.render = function () {
|
|
251
|
+
var _this = this;
|
|
252
|
+
return (react_1.default.createElement("textarea", { ref: function (el) { return (_this.el = el); } }, this.props.children));
|
|
253
|
+
};
|
|
254
|
+
return FroalaEditorComponent;
|
|
255
|
+
}(react_1.default.Component));
|
|
256
|
+
var default_1 = /** @class */ (function (_super) {
|
|
257
|
+
tslib_1.__extends(default_1, _super);
|
|
258
|
+
function default_1(props) {
|
|
259
|
+
var _this = _super.call(this, props) || this;
|
|
260
|
+
froala_editor_min_js_1.default.VIDEO_PROVIDERS = [
|
|
261
|
+
{
|
|
262
|
+
test_regex: /.*/,
|
|
263
|
+
url_regex: '',
|
|
264
|
+
url_text: '',
|
|
265
|
+
html: '<span class="fr-video fr-dvb fr-draggable" contenteditable="false" draggable="true"><video class="fr-draggable" controls="" data-msg="ok" data-status="0" src="{url}" style="width: 600px;"></video></span>'
|
|
266
|
+
}
|
|
267
|
+
];
|
|
268
|
+
return _this;
|
|
269
|
+
}
|
|
270
|
+
default_1.prototype.render = function () {
|
|
271
|
+
return (react_1.default.createElement(FroalaEditorComponent, { config: this.props.config, model: this.props.model, onModelChange: this.props.onModelChange }));
|
|
272
|
+
};
|
|
273
|
+
return default_1;
|
|
274
|
+
}(react_1.default.Component));
|
|
275
|
+
exports.default = default_1;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Option, SelectProps } from './Select';
|
|
3
|
+
interface SelectState {
|
|
4
|
+
isFocused: boolean;
|
|
5
|
+
inputValue: string;
|
|
6
|
+
itemHeight: number;
|
|
7
|
+
selection: Array<Option>;
|
|
8
|
+
}
|
|
9
|
+
interface Props extends SelectProps {
|
|
10
|
+
isOpen: boolean;
|
|
11
|
+
highlightedIndex: any;
|
|
12
|
+
selectedItem: any;
|
|
13
|
+
visibleItemCount?: number;
|
|
14
|
+
getInputProps: (...params: any) => any;
|
|
15
|
+
getItemProps: (...params: any) => any;
|
|
16
|
+
onClose: () => void;
|
|
17
|
+
}
|
|
18
|
+
export default class SelectMobile extends React.Component<Props, SelectState> {
|
|
19
|
+
input: HTMLInputElement;
|
|
20
|
+
target: HTMLElement;
|
|
21
|
+
constructor(props: Props);
|
|
22
|
+
handleChange([item]: any): void;
|
|
23
|
+
handleInputChange(evt: React.ChangeEvent<HTMLInputElement>): void;
|
|
24
|
+
getTarget(): HTMLElement;
|
|
25
|
+
inputRef(ref: HTMLInputElement): void;
|
|
26
|
+
toggleCheckAll(): void;
|
|
27
|
+
handleAddClick(): void;
|
|
28
|
+
handleEditClick(e: Event, item: any): void;
|
|
29
|
+
handleDeleteClick(e: Event, item: any): void;
|
|
30
|
+
onFocus(e: any): void;
|
|
31
|
+
onBlur(e: any): void;
|
|
32
|
+
focus(): void;
|
|
33
|
+
blur(): void;
|
|
34
|
+
clearSearchValue(): void;
|
|
35
|
+
onConfirm(): void;
|
|
36
|
+
render(): React.JSX.Element;
|
|
37
|
+
}
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import tinymce, { Editor } from 'tinymce/tinymce';
|
|
3
|
+
import 'tinymce/icons/default/index';
|
|
4
|
+
import 'tinymce/themes/silver';
|
|
5
|
+
import 'tinymce/models/dom/model';
|
|
6
|
+
import 'tinymce/plugins/advlist';
|
|
7
|
+
import 'tinymce/plugins/autolink';
|
|
8
|
+
import 'tinymce/plugins/autoresize';
|
|
9
|
+
import 'tinymce/plugins/lists';
|
|
10
|
+
import 'tinymce/plugins/link';
|
|
11
|
+
import 'tinymce/plugins/image';
|
|
12
|
+
import 'tinymce/plugins/charmap';
|
|
13
|
+
import 'tinymce/plugins/preview';
|
|
14
|
+
import 'tinymce/plugins/anchor';
|
|
15
|
+
import 'tinymce/plugins/searchreplace';
|
|
16
|
+
import 'tinymce/plugins/visualblocks';
|
|
17
|
+
import 'tinymce/plugins/code';
|
|
18
|
+
import 'tinymce/plugins/fullscreen';
|
|
19
|
+
import 'tinymce/plugins/insertdatetime';
|
|
20
|
+
import 'tinymce/plugins/media';
|
|
21
|
+
import 'tinymce/plugins/table';
|
|
22
|
+
import 'tinymce/plugins/help';
|
|
23
|
+
import 'tinymce/plugins/wordcount';
|
|
24
|
+
import 'tinymce/plugins/pagebreak';
|
|
25
|
+
import 'tinymce/plugins/visualchars';
|
|
26
|
+
import 'tinymce/plugins/template';
|
|
27
|
+
import 'tinymce/plugins/nonbreaking';
|
|
28
|
+
import 'tinymce/plugins/emoticons';
|
|
29
|
+
import 'tinymce/plugins/emoticons/js/emojis';
|
|
30
|
+
import 'tinymce/plugins/quickbars/plugin';
|
|
31
|
+
import 'tinymce/plugins/help/js/i18n/keynav/zh_CN';
|
|
32
|
+
import 'tinymce/plugins/help/js/i18n/keynav/en';
|
|
33
|
+
import 'tinymce/plugins/help/js/i18n/keynav/de';
|
|
34
|
+
import { LocaleProps } from 'amis-rev-core';
|
|
35
|
+
interface TinymceEditorProps extends LocaleProps {
|
|
36
|
+
model: string;
|
|
37
|
+
onModelChange?: (value: string) => void;
|
|
38
|
+
onFocus?: () => void;
|
|
39
|
+
onBlur?: () => void;
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
config?: {
|
|
42
|
+
onLoaded?: (tinymce: any) => void | Promise<void>;
|
|
43
|
+
[propName: string]: any;
|
|
44
|
+
};
|
|
45
|
+
outputFormat?: 'html' | 'text';
|
|
46
|
+
receiver?: string;
|
|
47
|
+
}
|
|
48
|
+
export default class TinymceEditor extends React.Component<TinymceEditorProps> {
|
|
49
|
+
static defaultProps: {
|
|
50
|
+
outputFormat: string;
|
|
51
|
+
};
|
|
52
|
+
config?: any;
|
|
53
|
+
editor?: Editor;
|
|
54
|
+
unmounted: boolean;
|
|
55
|
+
editorInitialized?: boolean;
|
|
56
|
+
currentContent?: string;
|
|
57
|
+
elementRef: React.RefObject<HTMLTextAreaElement>;
|
|
58
|
+
componentDidMount(): void;
|
|
59
|
+
componentDidUpdate(prevProps: TinymceEditorProps): void;
|
|
60
|
+
componentWillUnmount(): void;
|
|
61
|
+
initTiny(): Promise<void>;
|
|
62
|
+
handleIframeUnload(): void;
|
|
63
|
+
initEditor(e: any, editor: Editor): void;
|
|
64
|
+
render(): React.JSX.Element;
|
|
65
|
+
}
|
|
66
|
+
export { tinymce };
|