amis-ui 6.2.2 → 6.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/_virtual/_commonjsHelpers.js +10 -0
- package/esm/_virtual/pdf.worker.min.js +8 -0
- package/esm/components/404.js +1 -1
- package/esm/components/Alert.d.ts +124 -122
- package/esm/components/Alert.js +10 -6
- package/esm/components/Alert2.d.ts +20 -20
- package/esm/components/Alert2.js +1 -1
- package/esm/components/AnchorNav.d.ts +20 -20
- package/esm/components/AnchorNav.js +1 -1
- package/esm/components/ArrayInput.d.ts +40 -40
- package/esm/components/ArrayInput.js +1 -1
- package/esm/components/AsideNav.d.ts +2 -1
- package/esm/components/AsideNav.js +6 -3
- package/esm/components/AssociatedSelection.d.ts +120 -120
- package/esm/components/AssociatedSelection.js +4 -4
- package/esm/components/Avatar.d.ts +140 -140
- package/esm/components/Avatar.js +1 -1
- package/esm/components/Badge.js +1 -1
- package/esm/components/BaiduMapPicker.js +1 -1
- package/esm/components/BarCode.js +1 -1
- package/esm/components/Breadcrumb.d.ts +3 -0
- package/esm/components/Breadcrumb.js +7 -6
- package/esm/components/Button.d.ts +32 -31
- package/esm/components/Button.js +4 -4
- package/esm/components/CalendarMobile.d.ts +45 -40
- package/esm/components/CalendarMobile.js +41 -6
- package/esm/components/Card.d.ts +140 -140
- package/esm/components/Card.js +1 -1
- package/esm/components/Cascader.js +1 -1
- package/esm/components/ChainedDropdownSelection.d.ts +120 -120
- package/esm/components/ChainedDropdownSelection.js +1 -1
- package/esm/components/ChainedSelection.d.ts +120 -120
- package/esm/components/ChainedSelection.js +8 -6
- package/esm/components/Checkbox.d.ts +12 -11
- package/esm/components/Checkbox.js +7 -7
- package/esm/components/CityArea.js +1 -1
- package/esm/components/CityDB.d.ts +1 -1
- package/esm/components/CityDB.js +377 -889
- package/esm/components/CodeMirror.d.ts +1 -0
- package/esm/components/CodeMirror.js +16 -5
- package/esm/components/Collapse.d.ts +140 -140
- package/esm/components/Collapse.js +1 -1
- package/esm/components/CollapseGroup.d.ts +30 -30
- package/esm/components/CollapseGroup.js +1 -1
- package/esm/components/ColorPicker.d.ts +80 -80
- package/esm/components/ColorPicker.js +1 -1
- package/esm/components/Combo.js +1 -1
- package/esm/components/ConfirmBox.d.ts +81 -80
- package/esm/components/ConfirmBox.js +6 -3
- package/esm/components/ContextMenu.d.ts +17 -3
- package/esm/components/ContextMenu.js +72 -20
- package/esm/components/DatePicker.d.ts +84 -82
- package/esm/components/DatePicker.js +12 -12
- package/esm/components/DateRangePicker.d.ts +133 -129
- package/esm/components/DateRangePicker.js +40 -27
- package/esm/components/DndContainer.js +1 -1
- package/esm/components/Drawer.d.ts +30 -30
- package/esm/components/Drawer.js +1 -1
- package/esm/components/DropDownSelection.d.ts +120 -120
- package/esm/components/DropDownSelection.js +1 -1
- package/esm/components/Editor.d.ts +120 -120
- package/esm/components/Editor.js +3 -3
- package/esm/components/Form.js +1 -1
- package/esm/components/FormField.js +1 -1
- package/esm/components/GaodeMapPicker.js +1 -1
- package/esm/components/GridNav.js +1 -1
- package/esm/components/GroupedSelection.d.ts +120 -120
- package/esm/components/GroupedSelection.js +5 -4
- package/esm/components/Html.js +1 -1
- package/esm/components/ImageGallery.d.ts +40 -40
- package/esm/components/ImageGallery.js +2 -1
- package/esm/components/Input.d.ts +3 -1
- package/esm/components/Input.js +3 -3
- package/esm/components/InputBox.d.ts +14 -13
- package/esm/components/InputBox.js +7 -7
- package/esm/components/InputBoxWithSuggestion.js +7 -7
- package/esm/components/InputTable.js +1 -1
- package/esm/components/Layout.d.ts +10 -10
- package/esm/components/Layout.js +1 -1
- package/esm/components/Link.js +1 -1
- package/esm/components/ListGroup.d.ts +10 -10
- package/esm/components/ListGroup.js +1 -1
- package/esm/components/ListMenu.d.ts +82 -80
- package/esm/components/ListMenu.js +3 -3
- package/esm/components/LocationPicker.d.ts +40 -40
- package/esm/components/LocationPicker.js +1 -1
- package/esm/components/Markdown.js +1 -1
- package/esm/components/Modal.d.ts +120 -120
- package/esm/components/Modal.js +1 -1
- package/esm/components/ModalManager.js +1 -1
- package/esm/components/MonthRangePicker.d.ts +120 -120
- package/esm/components/MultilineText.d.ts +40 -40
- package/esm/components/MultilineText.js +1 -1
- package/esm/components/NumberInput.d.ts +30 -21
- package/esm/components/NumberInput.js +36 -6
- package/esm/components/OverflowTpl.js +1 -1
- package/esm/components/Pagination.d.ts +200 -110
- package/esm/components/Pagination.js +21 -21
- package/esm/components/PdfViewer.d.ts +49 -0
- package/esm/components/PdfViewer.js +85 -0
- package/esm/components/Picker.d.ts +1 -0
- package/esm/components/Picker.js +4 -4
- package/esm/components/PickerColumn.d.ts +1 -0
- package/esm/components/PickerColumn.js +8 -6
- package/esm/components/PickerContainer.d.ts +1 -2
- package/esm/components/PickerContainer.js +26 -16
- package/esm/components/PopOverContainer.d.ts +1 -0
- package/esm/components/PopOverContainer.js +3 -3
- package/esm/components/PopUp.d.ts +120 -120
- package/esm/components/PopUp.js +1 -1
- package/esm/components/Progress.d.ts +60 -60
- package/esm/components/Progress.js +1 -1
- package/esm/components/PullRefresh.js +1 -1
- package/esm/components/Radios.d.ts +12 -10
- package/esm/components/Radios.js +4 -3
- package/esm/components/Range.js +1 -1
- package/esm/components/Rating.d.ts +20 -20
- package/esm/components/Rating.js +1 -1
- package/esm/components/ResultBox.d.ts +82 -81
- package/esm/components/ResultBox.js +25 -21
- package/esm/components/ResultList.d.ts +42 -40
- package/esm/components/ResultList.js +5 -4
- package/esm/components/ResultTableList.d.ts +120 -120
- package/esm/components/ResultTableList.js +5 -4
- package/esm/components/ResultTreeList.d.ts +40 -40
- package/esm/components/ResultTreeList.js +3 -3
- package/esm/components/RichText.js +1 -1
- package/esm/components/SearchBox.d.ts +82 -81
- package/esm/components/SearchBox.js +8 -8
- package/esm/components/Select.d.ts +1363 -1354
- package/esm/components/Select.js +13 -12
- package/esm/components/SelectMobile.js +22 -19
- package/esm/components/Selection.d.ts +122 -120
- package/esm/components/Selection.js +1 -1
- package/esm/components/Signature.d.ts +280 -0
- package/esm/components/Signature.js +271 -0
- package/esm/components/SparkLine.d.ts +40 -40
- package/esm/components/SparkLine.js +1 -1
- package/esm/components/Spinner.d.ts +60 -60
- package/esm/components/Spinner.js +1 -1
- package/esm/components/Steps.js +1 -1
- package/esm/components/Switch.d.ts +12 -12
- package/esm/components/Switch.js +4 -4
- package/esm/components/TableSelection.d.ts +120 -120
- package/esm/components/TableSelection.js +6 -5
- package/esm/components/Tabs.d.ts +83 -81
- package/esm/components/Tabs.js +21 -22
- package/esm/components/TabsTransfer.d.ts +40 -40
- package/esm/components/TabsTransfer.js +16 -14
- package/esm/components/TabsTransferPicker.js +1 -1
- package/esm/components/Tag.d.ts +70 -70
- package/esm/components/Tag.js +1 -1
- package/esm/components/Textarea.d.ts +42 -42
- package/esm/components/Textarea.js +4 -4
- package/esm/components/Timeline.js +1 -1
- package/esm/components/TimelineItem.d.ts +1 -1
- package/esm/components/TimelineItem.js +1 -1
- package/esm/components/Tinymce.js +7 -4
- package/esm/components/TitleBar.d.ts +10 -10
- package/esm/components/TitleBar.js +1 -1
- package/esm/components/Toast.d.ts +120 -120
- package/esm/components/Toast.js +1 -1
- package/esm/components/Tooltip.js +1 -1
- package/esm/components/TooltipWrapper.d.ts +32 -32
- package/esm/components/TooltipWrapper.js +1 -1
- package/esm/components/Transfer.d.ts +174 -172
- package/esm/components/Transfer.js +16 -16
- package/esm/components/TransferDropDown.d.ts +160 -160
- package/esm/components/TransferDropDown.js +1 -1
- package/esm/components/TransferPicker.js +1 -1
- package/esm/components/TransferSearch.js +1 -1
- package/esm/components/Tree.d.ts +206 -210
- package/esm/components/Tree.js +32 -30
- package/esm/components/TreeSelection.d.ts +120 -120
- package/esm/components/TreeSelection.js +1 -1
- package/esm/components/UserSelect.d.ts +40 -40
- package/esm/components/UserSelect.js +1 -1
- package/esm/components/UserTabSelect.d.ts +40 -40
- package/esm/components/UserTabSelect.js +1 -1
- package/esm/components/WithRemoteConfig.d.ts +9 -0
- package/esm/components/WithRemoteConfig.js +19 -3
- package/esm/components/WithStore.js +1 -1
- package/esm/components/calendar/Calendar.d.ts +2 -1
- package/esm/components/calendar/Calendar.js +7 -6
- package/esm/components/calendar/CalendarContainer.js +1 -1
- package/esm/components/calendar/DaysView.d.ts +2 -1
- package/esm/components/calendar/DaysView.js +17 -15
- package/esm/components/calendar/MonthsView.d.ts +2 -0
- package/esm/components/calendar/MonthsView.js +8 -6
- package/esm/components/calendar/QuartersView.d.ts +2 -0
- package/esm/components/calendar/QuartersView.js +7 -6
- package/esm/components/calendar/TimeView.d.ts +2 -0
- package/esm/components/calendar/TimeView.js +8 -7
- package/esm/components/calendar/YearsView.d.ts +2 -0
- package/esm/components/calendar/YearsView.js +6 -5
- package/esm/components/condition-builder/Expression.js +1 -1
- package/esm/components/condition-builder/Field.js +1 -1
- package/esm/components/condition-builder/Func.js +1 -1
- package/esm/components/condition-builder/Group.js +1 -1
- package/esm/components/condition-builder/GroupOrItem.js +1 -1
- package/esm/components/condition-builder/InputSwitch.js +1 -1
- package/esm/components/condition-builder/Item.js +1 -1
- package/esm/components/condition-builder/Value.d.ts +1 -0
- package/esm/components/condition-builder/Value.js +30 -14
- package/esm/components/condition-builder/config.js +1 -1
- package/esm/components/condition-builder/index.js +1 -1
- package/esm/components/formula/CodeEditor.d.ts +92 -0
- package/esm/components/formula/CodeEditor.js +99 -0
- package/esm/components/formula/Editor.d.ts +64 -69
- package/esm/components/formula/Editor.js +173 -81
- package/esm/components/formula/FuncList.d.ts +1 -1
- package/esm/components/formula/FuncList.js +10 -9
- package/esm/components/formula/Input.d.ts +68 -54
- package/esm/components/formula/Input.js +45 -102
- package/esm/components/formula/Picker.d.ts +74 -60
- package/esm/components/formula/Picker.js +129 -69
- package/esm/components/formula/VariableList.d.ts +1 -1
- package/esm/components/formula/VariableList.js +26 -12
- package/esm/components/formula/plugin.d.ts +28 -7
- package/esm/components/formula/plugin.js +217 -90
- package/esm/components/icons.d.ts +4 -2
- package/esm/components/icons.js +14 -5
- package/esm/components/index.d.ts +5 -3
- package/esm/components/json-schema/Array.js +2 -2
- package/esm/components/json-schema/Item.d.ts +3 -1
- package/esm/components/json-schema/Item.js +35 -9
- package/esm/components/json-schema/Object.d.ts +3 -1
- package/esm/components/json-schema/Object.js +112 -52
- package/esm/components/json-schema/index.d.ts +53 -50
- package/esm/components/json-schema/index.js +14 -5
- package/esm/components/menu/MenuContext.js +1 -1
- package/esm/components/menu/MenuItem.d.ts +2 -1
- package/esm/components/menu/MenuItem.js +4 -4
- package/esm/components/menu/SubMenu.d.ts +2 -1
- package/esm/components/menu/SubMenu.js +6 -6
- package/esm/components/menu/index.d.ts +66 -63
- package/esm/components/menu/index.js +10 -7
- package/esm/components/schema-editor/Array.js +23 -8
- package/esm/components/schema-editor/Common.d.ts +17 -1
- package/esm/components/schema-editor/Common.js +84 -37
- package/esm/components/schema-editor/Item.js +2 -2
- package/esm/components/schema-editor/Object.d.ts +7 -1
- package/esm/components/schema-editor/Object.js +106 -14
- package/esm/components/schema-editor/SchemaVariableList.d.ts +1 -1
- package/esm/components/schema-editor/SchemaVariableList.js +1 -1
- package/esm/components/schema-editor/SchemaVariableListPicker.js +1 -1
- package/esm/components/schema-editor/index.d.ts +48 -40
- package/esm/components/schema-editor/index.js +4 -4
- package/esm/components/table/Cell.d.ts +2 -0
- package/esm/components/table/Cell.js +4 -4
- package/esm/components/table/ColGroup.js +1 -1
- package/esm/components/table/Head.d.ts +2 -0
- package/esm/components/table/Head.js +12 -9
- package/esm/components/table/HeadCellDropDown.d.ts +2 -0
- package/esm/components/table/HeadCellDropDown.js +1 -1
- package/esm/components/table/HeadCellFilter.d.ts +42 -40
- package/esm/components/table/HeadCellFilter.js +8 -8
- package/esm/components/table/HeadCellSelect.d.ts +40 -40
- package/esm/components/table/HeadCellSelect.js +1 -1
- package/esm/components/table/HeadCellSort.d.ts +2 -0
- package/esm/components/table/HeadCellSort.js +8 -8
- package/esm/components/table/ItemActionsWrapper.js +1 -1
- package/esm/components/table/Row.d.ts +2 -0
- package/esm/components/table/Row.js +4 -3
- package/esm/components/table/SummaryRow.js +1 -1
- package/esm/components/table/index.d.ts +162 -160
- package/esm/components/table/index.js +7 -5
- package/esm/components/table/util.d.ts +7 -7
- package/esm/components/table/util.js +4 -2
- package/esm/components/virtual-list/AutoSizer.js +1 -1
- package/esm/components/virtual-list/SizeAndPositionManager.js +1 -1
- package/esm/components/virtual-list/constants.js +1 -1
- package/esm/components/virtual-list/index.js +1 -1
- package/esm/hooks/use-set-state.js +1 -1
- package/esm/hooks/use-sub-form.js +1 -1
- package/esm/hooks/use-touch.js +1 -1
- package/esm/hooks/use-update-effect.js +1 -1
- package/esm/hooks/use-validation-resolver.js +1 -1
- package/esm/icons/alert-danger.svg.js +1 -1
- package/esm/icons/alert-info.svg.js +1 -1
- package/esm/icons/alert-success.svg.js +1 -1
- package/esm/icons/alert-warning.svg.js +1 -1
- package/esm/icons/arrow-double-left.svg.js +1 -1
- package/esm/icons/arrow-double-right.svg.js +1 -1
- package/esm/icons/back.svg.js +1 -1
- package/esm/icons/calendar.svg.js +1 -1
- package/esm/icons/caret.svg.js +1 -1
- package/esm/icons/check.svg.js +1 -1
- package/esm/icons/clock.svg.js +1 -1
- package/esm/icons/close-small.svg.js +1 -1
- package/esm/icons/close.svg.js +1 -1
- package/esm/icons/cloud-upload.svg.js +1 -1
- package/esm/icons/column-filter.svg.js +1 -1
- package/esm/icons/columns.svg.js +1 -1
- package/esm/icons/compress-alt.svg.js +1 -1
- package/esm/icons/copy.svg.js +1 -1
- package/esm/icons/date.svg.js +1 -1
- package/esm/icons/department.svg.js +1 -1
- package/esm/icons/desk-empty.svg.js +1 -1
- package/esm/icons/dot.svg.js +1 -1
- package/esm/icons/down-arrow-bold.svg.js +1 -1
- package/esm/icons/down.svg.js +1 -1
- package/esm/icons/download.svg.js +1 -1
- package/esm/icons/drag-bar.svg.js +1 -1
- package/esm/icons/drag.svg.js +1 -1
- package/esm/icons/edit.svg.js +1 -1
- package/esm/icons/ellipsis-v.svg.js +1 -1
- package/esm/icons/enter.svg.js +1 -1
- package/esm/icons/exchange.svg.js +1 -1
- package/esm/icons/expand-alt.svg.js +1 -1
- package/esm/icons/fail.svg.js +1 -1
- package/esm/icons/file.svg.js +1 -1
- package/esm/icons/filter.svg.js +1 -1
- package/esm/icons/folder.svg.js +1 -1
- package/esm/icons/fullscreen.svg.js +21 -0
- package/esm/icons/function.svg.js +1 -1
- package/esm/icons/home.svg.js +1 -1
- package/esm/icons/if.svg.js +1 -1
- package/esm/icons/image.svg.js +1 -1
- package/esm/icons/info-circle.svg.js +1 -1
- package/esm/icons/info.svg.js +1 -1
- package/esm/icons/input-clear.svg.js +1 -1
- package/esm/icons/invisible.svg.js +1 -1
- package/esm/icons/left-arrow.svg.js +1 -1
- package/esm/icons/loading-outline.svg.js +1 -1
- package/esm/icons/location.svg.js +1 -1
- package/esm/icons/menu.svg.js +1 -1
- package/esm/icons/minus.svg.js +1 -1
- package/esm/icons/move.svg.js +1 -1
- package/esm/icons/mute.svg.js +1 -1
- package/esm/icons/new-edit.svg.js +1 -1
- package/esm/icons/pause.svg.js +1 -1
- package/esm/icons/pencil.svg.js +1 -1
- package/esm/icons/play.svg.js +1 -1
- package/esm/icons/plus-cicle.svg.js +1 -1
- package/esm/icons/plus-fine.svg.js +1 -1
- package/esm/icons/plus.svg.js +1 -1
- package/esm/icons/post.svg.js +1 -1
- package/esm/icons/question-mark.svg.js +1 -1
- package/esm/icons/question.svg.js +1 -1
- package/esm/icons/redo.svg.js +1 -1
- package/esm/icons/refresh.svg.js +1 -1
- package/esm/icons/reload.svg.js +1 -1
- package/esm/icons/remove.svg.js +1 -1
- package/esm/icons/retry.svg.js +1 -1
- package/esm/icons/right-arrow-bold.svg.js +1 -1
- package/esm/icons/right-arrow.svg.js +1 -1
- package/esm/icons/right-double-arrow.svg.js +1 -1
- package/esm/icons/role.svg.js +1 -1
- package/esm/icons/rotate-left.svg.js +1 -1
- package/esm/icons/rotate-right.svg.js +1 -1
- package/esm/icons/scale-origin.svg.js +1 -1
- package/esm/icons/schedule.svg.js +1 -1
- package/esm/icons/search.svg.js +1 -1
- package/esm/icons/setting.svg.js +1 -1
- package/esm/icons/slider-handle-icon.svg.js +1 -1
- package/esm/icons/sort-asc.svg.js +1 -1
- package/esm/icons/sort-default.svg.js +1 -1
- package/esm/icons/sort-desc.svg.js +1 -1
- package/esm/icons/star.svg.js +1 -1
- package/esm/icons/status-close.svg.js +1 -1
- package/esm/icons/steps-finsh.svg.js +1 -1
- package/esm/icons/sub-plus.svg.js +20 -0
- package/esm/icons/success.svg.js +1 -1
- package/esm/icons/transparent.svg.js +1 -1
- package/esm/icons/trash.svg.js +1 -1
- package/esm/icons/tree-down.svg.js +1 -1
- package/esm/icons/undo-normal.svg.js +25 -0
- package/esm/icons/undo.svg.js +1 -1
- package/esm/icons/unfullscreen.svg.js +21 -0
- package/esm/icons/upload.svg.js +1 -1
- package/esm/icons/user-remove.svg.js +1 -1
- package/esm/icons/view.svg.js +1 -1
- package/esm/icons/volume.svg.js +1 -1
- package/esm/icons/warning-mark.svg.js +1 -1
- package/esm/icons/warning.svg.js +1 -1
- package/esm/icons/window-restore.svg.js +1 -1
- package/esm/icons/zoom-in.svg.js +1 -1
- package/esm/icons/zoom-out.svg.js +1 -1
- package/esm/index.js +4 -2
- package/esm/locale/de-DE.js +27 -11
- package/esm/locale/en-US.js +18 -2
- package/esm/locale/zh-CN.js +19 -3
- package/esm/node_modules/pdfjs-dist/build/pdf.worker.min.js +37 -0
- package/esm/node_modules/smooth-signature/es/index.js +506 -0
- package/esm/themes/ang.js +1 -1
- package/esm/themes/antd.js +1 -1
- package/esm/themes/cxd.js +1 -1
- package/esm/themes/dark.js +1 -1
- package/lib/_virtual/_commonjsHelpers.js +14 -0
- package/lib/_virtual/pdf.worker.min.js +12 -0
- package/lib/components/404.js +1 -1
- package/lib/components/Alert.d.ts +124 -122
- package/lib/components/Alert.js +10 -6
- package/lib/components/Alert2.d.ts +20 -20
- package/lib/components/Alert2.js +1 -1
- package/lib/components/AnchorNav.d.ts +20 -20
- package/lib/components/AnchorNav.js +1 -1
- package/lib/components/ArrayInput.d.ts +40 -40
- package/lib/components/ArrayInput.js +1 -1
- package/lib/components/AsideNav.d.ts +12 -11
- package/lib/components/AsideNav.js +5 -2
- package/lib/components/AssociatedSelection.d.ts +80 -80
- package/lib/components/AssociatedSelection.js +4 -4
- package/lib/components/Avatar.d.ts +70 -70
- package/lib/components/Avatar.js +1 -1
- package/lib/components/Badge.d.ts +1 -1
- package/lib/components/Badge.js +1 -1
- package/lib/components/BaiduMapPicker.js +1 -1
- package/lib/components/BarCode.js +1 -1
- package/lib/components/Breadcrumb.d.ts +3 -0
- package/lib/components/Breadcrumb.js +7 -6
- package/lib/components/Button.d.ts +42 -41
- package/lib/components/Button.js +3 -3
- package/lib/components/CalendarMobile.d.ts +85 -80
- package/lib/components/CalendarMobile.js +41 -6
- package/lib/components/Card.d.ts +110 -110
- package/lib/components/Card.js +1 -1
- package/lib/components/Cascader.js +1 -1
- package/lib/components/ChainedDropdownSelection.d.ts +80 -80
- package/lib/components/ChainedDropdownSelection.js +1 -1
- package/lib/components/ChainedSelection.d.ts +80 -80
- package/lib/components/ChainedSelection.js +8 -6
- package/lib/components/Checkbox.d.ts +12 -11
- package/lib/components/Checkbox.js +6 -6
- package/lib/components/CityArea.js +1 -1
- package/lib/components/CityDB.d.ts +1 -1
- package/lib/components/CityDB.js +377 -889
- package/lib/components/CodeMirror.d.ts +1 -0
- package/lib/components/CodeMirror.js +15 -4
- package/lib/components/Collapse.d.ts +140 -140
- package/lib/components/Collapse.js +1 -1
- package/lib/components/CollapseGroup.d.ts +20 -20
- package/lib/components/CollapseGroup.js +1 -1
- package/lib/components/ColorPicker.d.ts +40 -40
- package/lib/components/ColorPicker.js +1 -1
- package/lib/components/Combo.js +1 -1
- package/lib/components/ConfirmBox.d.ts +81 -80
- package/lib/components/ConfirmBox.js +6 -3
- package/lib/components/ContextMenu.d.ts +17 -3
- package/lib/components/ContextMenu.js +73 -20
- package/lib/components/DatePicker.d.ts +124 -122
- package/lib/components/DatePicker.js +12 -12
- package/lib/components/DateRangePicker.d.ts +293 -289
- package/lib/components/DateRangePicker.js +40 -27
- package/lib/components/DndContainer.js +1 -1
- package/lib/components/Drawer.d.ts +30 -30
- package/lib/components/Drawer.js +1 -1
- package/lib/components/DropDownSelection.d.ts +80 -80
- package/lib/components/DropDownSelection.js +1 -1
- package/lib/components/Editor.d.ts +120 -120
- package/lib/components/Editor.js +3 -3
- package/lib/components/Form.js +1 -1
- package/lib/components/FormField.js +1 -1
- package/lib/components/GaodeMapPicker.js +1 -1
- package/lib/components/GridNav.js +1 -1
- package/lib/components/GroupedSelection.d.ts +80 -80
- package/lib/components/GroupedSelection.js +5 -4
- package/lib/components/Html.js +1 -1
- package/lib/components/ImageGallery.d.ts +40 -40
- package/lib/components/ImageGallery.js +2 -1
- package/lib/components/Input.d.ts +3 -1
- package/lib/components/Input.js +3 -3
- package/lib/components/InputBox.d.ts +14 -13
- package/lib/components/InputBox.js +6 -6
- package/lib/components/InputBoxWithSuggestion.js +7 -7
- package/lib/components/InputTable.js +1 -1
- package/lib/components/Layout.d.ts +10 -10
- package/lib/components/Layout.js +1 -1
- package/lib/components/Link.js +1 -1
- package/lib/components/ListGroup.d.ts +10 -10
- package/lib/components/ListGroup.js +1 -1
- package/lib/components/ListMenu.d.ts +82 -80
- package/lib/components/ListMenu.js +3 -3
- package/lib/components/LocationPicker.d.ts +40 -40
- package/lib/components/LocationPicker.js +1 -1
- package/lib/components/Markdown.js +1 -1
- package/lib/components/Modal.d.ts +80 -80
- package/lib/components/Modal.js +1 -1
- package/lib/components/ModalManager.js +1 -1
- package/lib/components/MonthRangePicker.d.ts +160 -160
- package/lib/components/MultilineText.d.ts +40 -40
- package/lib/components/MultilineText.js +1 -1
- package/lib/components/NumberInput.d.ts +30 -21
- package/lib/components/NumberInput.js +36 -6
- package/lib/components/OverflowTpl.js +1 -1
- package/lib/components/Pagination.d.ts +200 -110
- package/lib/components/Pagination.js +20 -20
- package/lib/components/PdfViewer.d.ts +49 -0
- package/lib/components/PdfViewer.js +91 -0
- package/lib/components/Picker.d.ts +1 -0
- package/lib/components/Picker.js +4 -4
- package/lib/components/PickerColumn.d.ts +1 -0
- package/lib/components/PickerColumn.js +7 -5
- package/lib/components/PickerContainer.d.ts +1 -2
- package/lib/components/PickerContainer.js +26 -16
- package/lib/components/PopOverContainer.d.ts +1 -0
- package/lib/components/PopOverContainer.js +3 -3
- package/lib/components/PopUp.d.ts +40 -40
- package/lib/components/PopUp.js +1 -1
- package/lib/components/Progress.d.ts +50 -50
- package/lib/components/Progress.js +1 -1
- package/lib/components/PullRefresh.js +1 -1
- package/lib/components/Radios.d.ts +12 -10
- package/lib/components/Radios.js +4 -3
- package/lib/components/Range.js +1 -1
- package/lib/components/Rating.d.ts +10 -10
- package/lib/components/Rating.js +1 -1
- package/lib/components/ResultBox.d.ts +82 -81
- package/lib/components/ResultBox.js +25 -21
- package/lib/components/ResultList.d.ts +42 -40
- package/lib/components/ResultList.js +5 -4
- package/lib/components/ResultTableList.d.ts +80 -80
- package/lib/components/ResultTableList.js +5 -4
- package/lib/components/ResultTreeList.d.ts +40 -40
- package/lib/components/ResultTreeList.js +3 -3
- package/lib/components/RichText.js +1 -1
- package/lib/components/SearchBox.d.ts +82 -81
- package/lib/components/SearchBox.js +7 -7
- package/lib/components/Select.d.ts +1366 -1357
- package/lib/components/Select.js +12 -11
- package/lib/components/SelectMobile.js +22 -19
- package/lib/components/Selection.d.ts +82 -80
- package/lib/components/Selection.js +1 -1
- package/lib/components/Signature.d.ts +280 -0
- package/lib/components/Signature.js +275 -0
- package/lib/components/SparkLine.d.ts +40 -40
- package/lib/components/SparkLine.js +1 -1
- package/lib/components/Spinner.d.ts +60 -60
- package/lib/components/Spinner.js +1 -1
- package/lib/components/Steps.js +1 -1
- package/lib/components/Switch.d.ts +12 -12
- package/lib/components/Switch.js +3 -3
- package/lib/components/TableSelection.d.ts +80 -80
- package/lib/components/TableSelection.js +6 -5
- package/lib/components/Tabs.d.ts +83 -81
- package/lib/components/Tabs.js +21 -22
- package/lib/components/TabsTransfer.d.ts +40 -40
- package/lib/components/TabsTransfer.js +16 -14
- package/lib/components/TabsTransferPicker.js +1 -1
- package/lib/components/Tag.d.ts +70 -70
- package/lib/components/Tag.js +1 -1
- package/lib/components/Textarea.d.ts +42 -42
- package/lib/components/Textarea.js +3 -3
- package/lib/components/Timeline.js +1 -1
- package/lib/components/TimelineItem.d.ts +1 -1
- package/lib/components/TimelineItem.js +1 -1
- package/lib/components/Tinymce.js +7 -4
- package/lib/components/TitleBar.d.ts +10 -10
- package/lib/components/TitleBar.js +1 -1
- package/lib/components/Toast.d.ts +80 -80
- package/lib/components/Toast.js +1 -1
- package/lib/components/Tooltip.js +1 -1
- package/lib/components/TooltipWrapper.d.ts +42 -42
- package/lib/components/TooltipWrapper.js +1 -1
- package/lib/components/Transfer.d.ts +192 -190
- package/lib/components/Transfer.js +16 -16
- package/lib/components/TransferDropDown.d.ts +160 -160
- package/lib/components/TransferDropDown.js +1 -1
- package/lib/components/TransferPicker.js +1 -1
- package/lib/components/TransferSearch.js +1 -1
- package/lib/components/Tree.d.ts +286 -290
- package/lib/components/Tree.js +31 -29
- package/lib/components/TreeSelection.d.ts +120 -120
- package/lib/components/TreeSelection.js +1 -1
- package/lib/components/UserSelect.d.ts +40 -40
- package/lib/components/UserSelect.js +1 -1
- package/lib/components/UserTabSelect.d.ts +40 -40
- package/lib/components/UserTabSelect.js +1 -1
- package/lib/components/WithRemoteConfig.d.ts +9 -0
- package/lib/components/WithRemoteConfig.js +19 -3
- package/lib/components/WithStore.js +1 -1
- package/lib/components/calendar/Calendar.d.ts +2 -1
- package/lib/components/calendar/Calendar.js +6 -5
- package/lib/components/calendar/CalendarContainer.js +1 -1
- package/lib/components/calendar/DaysView.d.ts +2 -1
- package/lib/components/calendar/DaysView.js +17 -15
- package/lib/components/calendar/MonthsView.d.ts +2 -0
- package/lib/components/calendar/MonthsView.js +8 -6
- package/lib/components/calendar/QuartersView.d.ts +2 -0
- package/lib/components/calendar/QuartersView.js +7 -6
- package/lib/components/calendar/TimeView.d.ts +2 -0
- package/lib/components/calendar/TimeView.js +8 -7
- package/lib/components/calendar/YearsView.d.ts +2 -0
- package/lib/components/calendar/YearsView.js +6 -5
- package/lib/components/condition-builder/Expression.js +1 -1
- package/lib/components/condition-builder/Field.js +1 -1
- package/lib/components/condition-builder/Func.js +1 -1
- package/lib/components/condition-builder/Group.js +1 -1
- package/lib/components/condition-builder/GroupOrItem.js +1 -1
- package/lib/components/condition-builder/InputSwitch.js +1 -1
- package/lib/components/condition-builder/Item.js +1 -1
- package/lib/components/condition-builder/Value.d.ts +1 -0
- package/lib/components/condition-builder/Value.js +28 -12
- package/lib/components/condition-builder/config.js +1 -1
- package/lib/components/condition-builder/index.d.ts +1 -1
- package/lib/components/condition-builder/index.js +1 -1
- package/lib/components/formula/CodeEditor.d.ts +92 -0
- package/lib/components/formula/CodeEditor.js +110 -0
- package/lib/components/formula/Editor.d.ts +64 -69
- package/lib/components/formula/Editor.js +172 -78
- package/lib/components/formula/FuncList.d.ts +1 -1
- package/lib/components/formula/FuncList.js +10 -9
- package/lib/components/formula/Input.d.ts +68 -54
- package/lib/components/formula/Input.js +43 -101
- package/lib/components/formula/Picker.d.ts +74 -60
- package/lib/components/formula/Picker.js +128 -68
- package/lib/components/formula/VariableList.d.ts +1 -1
- package/lib/components/formula/VariableList.js +24 -10
- package/lib/components/formula/plugin.d.ts +28 -7
- package/lib/components/formula/plugin.js +220 -89
- package/lib/components/icons.d.ts +4 -2
- package/lib/components/icons.js +14 -5
- package/lib/components/index.d.ts +5 -3
- package/lib/components/json-schema/Array.js +3 -3
- package/lib/components/json-schema/Item.d.ts +3 -1
- package/lib/components/json-schema/Item.js +39 -8
- package/lib/components/json-schema/Object.d.ts +3 -1
- package/lib/components/json-schema/Object.js +113 -51
- package/lib/components/json-schema/index.d.ts +53 -50
- package/lib/components/json-schema/index.js +18 -5
- package/lib/components/menu/MenuContext.js +1 -1
- package/lib/components/menu/MenuItem.d.ts +2 -1
- package/lib/components/menu/MenuItem.js +3 -3
- package/lib/components/menu/SubMenu.d.ts +2 -1
- package/lib/components/menu/SubMenu.js +5 -5
- package/lib/components/menu/index.d.ts +86 -83
- package/lib/components/menu/index.js +10 -7
- package/lib/components/schema-editor/Array.js +23 -8
- package/lib/components/schema-editor/Common.d.ts +17 -1
- package/lib/components/schema-editor/Common.js +83 -36
- package/lib/components/schema-editor/Item.js +2 -2
- package/lib/components/schema-editor/Object.d.ts +7 -1
- package/lib/components/schema-editor/Object.js +105 -13
- package/lib/components/schema-editor/SchemaVariableList.d.ts +1 -1
- package/lib/components/schema-editor/SchemaVariableList.js +1 -1
- package/lib/components/schema-editor/SchemaVariableListPicker.js +1 -1
- package/lib/components/schema-editor/index.d.ts +48 -40
- package/lib/components/schema-editor/index.js +4 -4
- package/lib/components/table/Cell.d.ts +2 -0
- package/lib/components/table/Cell.js +4 -4
- package/lib/components/table/ColGroup.js +1 -1
- package/lib/components/table/Head.d.ts +2 -0
- package/lib/components/table/Head.js +12 -9
- package/lib/components/table/HeadCellDropDown.d.ts +2 -0
- package/lib/components/table/HeadCellDropDown.js +1 -1
- package/lib/components/table/HeadCellFilter.d.ts +82 -80
- package/lib/components/table/HeadCellFilter.js +8 -8
- package/lib/components/table/HeadCellSelect.d.ts +40 -40
- package/lib/components/table/HeadCellSelect.js +1 -1
- package/lib/components/table/HeadCellSort.d.ts +2 -0
- package/lib/components/table/HeadCellSort.js +7 -7
- package/lib/components/table/ItemActionsWrapper.js +1 -1
- package/lib/components/table/Row.d.ts +2 -0
- package/lib/components/table/Row.js +4 -3
- package/lib/components/table/SummaryRow.js +1 -1
- package/lib/components/table/index.d.ts +122 -120
- package/lib/components/table/index.js +7 -5
- package/lib/components/table/util.d.ts +7 -7
- package/lib/components/table/util.js +4 -2
- package/lib/components/virtual-list/AutoSizer.js +1 -1
- package/lib/components/virtual-list/SizeAndPositionManager.js +1 -1
- package/lib/components/virtual-list/constants.js +1 -1
- package/lib/components/virtual-list/index.js +1 -1
- package/lib/hooks/use-set-state.js +1 -1
- package/lib/hooks/use-sub-form.js +1 -1
- package/lib/hooks/use-touch.js +1 -1
- package/lib/hooks/use-update-effect.js +1 -1
- package/lib/hooks/use-validation-resolver.js +1 -1
- package/lib/icons/alert-danger.svg.js +1 -1
- package/lib/icons/alert-info.svg.js +1 -1
- package/lib/icons/alert-success.svg.js +1 -1
- package/lib/icons/alert-warning.svg.js +1 -1
- package/lib/icons/arrow-double-left.svg.js +1 -1
- package/lib/icons/arrow-double-right.svg.js +1 -1
- package/lib/icons/back.svg.js +1 -1
- package/lib/icons/calendar.svg.js +1 -1
- package/lib/icons/caret.svg.js +1 -1
- package/lib/icons/check.svg.js +1 -1
- package/lib/icons/clock.svg.js +1 -1
- package/lib/icons/close-small.svg.js +1 -1
- package/lib/icons/close.svg.js +1 -1
- package/lib/icons/cloud-upload.svg.js +1 -1
- package/lib/icons/column-filter.svg.js +1 -1
- package/lib/icons/columns.svg.js +1 -1
- package/lib/icons/compress-alt.svg.js +1 -1
- package/lib/icons/copy.svg.js +1 -1
- package/lib/icons/date.svg.js +1 -1
- package/lib/icons/department.svg.js +1 -1
- package/lib/icons/desk-empty.svg.js +1 -1
- package/lib/icons/dot.svg.js +1 -1
- package/lib/icons/down-arrow-bold.svg.js +1 -1
- package/lib/icons/down.svg.js +1 -1
- package/lib/icons/download.svg.js +1 -1
- package/lib/icons/drag-bar.svg.js +1 -1
- package/lib/icons/drag.svg.js +1 -1
- package/lib/icons/edit.svg.js +1 -1
- package/lib/icons/ellipsis-v.svg.js +1 -1
- package/lib/icons/enter.svg.js +1 -1
- package/lib/icons/exchange.svg.js +1 -1
- package/lib/icons/expand-alt.svg.js +1 -1
- package/lib/icons/fail.svg.js +1 -1
- package/lib/icons/file.svg.js +1 -1
- package/lib/icons/filter.svg.js +1 -1
- package/lib/icons/folder.svg.js +1 -1
- package/lib/icons/fullscreen.svg.js +28 -0
- package/lib/icons/function.svg.js +1 -1
- package/lib/icons/home.svg.js +1 -1
- package/lib/icons/if.svg.js +1 -1
- package/lib/icons/image.svg.js +1 -1
- package/lib/icons/info-circle.svg.js +1 -1
- package/lib/icons/info.svg.js +1 -1
- package/lib/icons/input-clear.svg.js +1 -1
- package/lib/icons/invisible.svg.js +1 -1
- package/lib/icons/left-arrow.svg.js +1 -1
- package/lib/icons/loading-outline.svg.js +1 -1
- package/lib/icons/location.svg.js +1 -1
- package/lib/icons/menu.svg.js +1 -1
- package/lib/icons/minus.svg.js +1 -1
- package/lib/icons/move.svg.js +1 -1
- package/lib/icons/mute.svg.js +1 -1
- package/lib/icons/new-edit.svg.js +1 -1
- package/lib/icons/pause.svg.js +1 -1
- package/lib/icons/pencil.svg.js +1 -1
- package/lib/icons/play.svg.js +1 -1
- package/lib/icons/plus-cicle.svg.js +1 -1
- package/lib/icons/plus-fine.svg.js +1 -1
- package/lib/icons/plus.svg.js +1 -1
- package/lib/icons/post.svg.js +1 -1
- package/lib/icons/question-mark.svg.js +1 -1
- package/lib/icons/question.svg.js +1 -1
- package/lib/icons/redo.svg.js +1 -1
- package/lib/icons/refresh.svg.js +1 -1
- package/lib/icons/reload.svg.js +1 -1
- package/lib/icons/remove.svg.js +1 -1
- package/lib/icons/retry.svg.js +1 -1
- package/lib/icons/right-arrow-bold.svg.js +1 -1
- package/lib/icons/right-arrow.svg.js +1 -1
- package/lib/icons/right-double-arrow.svg.js +1 -1
- package/lib/icons/role.svg.js +1 -1
- package/lib/icons/rotate-left.svg.js +1 -1
- package/lib/icons/rotate-right.svg.js +1 -1
- package/lib/icons/scale-origin.svg.js +1 -1
- package/lib/icons/schedule.svg.js +1 -1
- package/lib/icons/search.svg.js +1 -1
- package/lib/icons/setting.svg.js +1 -1
- package/lib/icons/slider-handle-icon.svg.js +1 -1
- package/lib/icons/sort-asc.svg.js +1 -1
- package/lib/icons/sort-default.svg.js +1 -1
- package/lib/icons/sort-desc.svg.js +1 -1
- package/lib/icons/star.svg.js +1 -1
- package/lib/icons/status-close.svg.js +1 -1
- package/lib/icons/steps-finsh.svg.js +1 -1
- package/lib/icons/sub-plus.svg.js +27 -0
- package/lib/icons/success.svg.js +1 -1
- package/lib/icons/transparent.svg.js +1 -1
- package/lib/icons/trash.svg.js +1 -1
- package/lib/icons/tree-down.svg.js +1 -1
- package/lib/icons/undo-normal.svg.js +32 -0
- package/lib/icons/undo.svg.js +1 -1
- package/lib/icons/unfullscreen.svg.js +28 -0
- package/lib/icons/upload.svg.js +1 -1
- package/lib/icons/user-remove.svg.js +1 -1
- package/lib/icons/view.svg.js +1 -1
- package/lib/icons/volume.svg.js +1 -1
- package/lib/icons/warning-mark.svg.js +1 -1
- package/lib/icons/warning.svg.js +1 -1
- package/lib/icons/window-restore.svg.js +1 -1
- package/lib/icons/zoom-in.svg.js +1 -1
- package/lib/icons/zoom-out.svg.js +1 -1
- package/lib/index.js +6 -1
- package/lib/locale/de-DE.js +27 -11
- package/lib/locale/en-US.js +18 -2
- package/lib/locale/zh-CN.js +19 -3
- package/lib/node_modules/pdfjs-dist/build/pdf.worker.min.js +41 -0
- package/lib/node_modules/smooth-signature/es/index.js +510 -0
- package/lib/{scss → packages/amis-ui/scss}/helper.scss.js +1 -1
- package/lib/{scss → packages/amis-ui/scss}/themes/ang.scss.js +1 -1
- package/lib/{scss → packages/amis-ui/scss}/themes/antd.scss.js +1 -1
- package/lib/{scss → packages/amis-ui/scss}/themes/cxd.scss.js +1 -1
- package/lib/{scss → packages/amis-ui/scss}/themes/dark.scss.js +1 -1
- package/lib/{scss → packages/amis-ui/scss}/themes/default.scss.js +1 -1
- package/lib/themes/ang.css +1032 -38
- package/lib/themes/ang.js +1 -1
- package/lib/themes/antd.css +1032 -38
- package/lib/themes/antd.js +1 -1
- package/lib/themes/cxd.css +1032 -38
- package/lib/themes/cxd.js +1 -1
- package/lib/themes/dark.css +1032 -38
- package/lib/themes/dark.js +1 -1
- package/lib/themes/default.css +1032 -38
- package/package.json +4 -3
- package/scss/_components.scss +7 -0
- package/scss/_mixins.scss +1 -0
- package/scss/_thirds.scss +3 -0
- package/scss/components/_collapse.scss +1 -1
- package/scss/components/_condition-builder.scss +18 -0
- package/scss/components/_crud2.scss +4 -0
- package/scss/components/_formula.scss +148 -26
- package/scss/components/_image-gallery.scss +7 -1
- package/scss/components/_input-box.scss +6 -0
- package/scss/components/_json-schema-editor.scss +24 -3
- package/scss/components/_json-schema.scss +5 -0
- package/scss/components/_menu.scss +3 -0
- package/scss/components/_pdf_viewer.scss +47 -0
- package/scss/components/_signature.scss +97 -0
- package/scss/components/_table.scss +6 -1
- package/scss/components/_tabs.scss +10 -4
- package/scss/components/form/_combo.scss +1 -0
- package/scss/components/form/_form.scss +10 -0
- package/scss/components/form/_icon-select.scss +3 -0
- package/scss/components/form/_picker.scss +2 -1
- package/scss/components/form/_tag.scss +2 -1
- package/scss/components/form/_text.scss +4 -4
- package/scss/themes/_common.scss +2 -0
|
@@ -0,0 +1,506 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* amis-ui v6.4.0
|
|
3
|
+
* Copyright 2018-2024 fex
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
7
|
+
|
|
8
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
9
|
+
|
|
10
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
11
|
+
|
|
12
|
+
var isMobile = /Android|iPhone|iPad|Mobile/i.test(navigator.userAgent);
|
|
13
|
+
|
|
14
|
+
var SmoothSignature = /*#__PURE__*/function () {
|
|
15
|
+
function SmoothSignature(_canvas, options) {
|
|
16
|
+
var _this = this;
|
|
17
|
+
|
|
18
|
+
_classCallCheck(this, SmoothSignature);
|
|
19
|
+
|
|
20
|
+
this.canvas = {};
|
|
21
|
+
this.ctx = {};
|
|
22
|
+
this.width = 320;
|
|
23
|
+
this.height = 200;
|
|
24
|
+
this.scale = window.devicePixelRatio || 1;
|
|
25
|
+
this.color = 'black';
|
|
26
|
+
this.bgColor = '';
|
|
27
|
+
this.canDraw = false;
|
|
28
|
+
this.openSmooth = true;
|
|
29
|
+
this.minWidth = 2;
|
|
30
|
+
this.maxWidth = 6;
|
|
31
|
+
this.minSpeed = 1.5;
|
|
32
|
+
this.maxWidthDiffRate = 20;
|
|
33
|
+
this.points = [];
|
|
34
|
+
this.canAddHistory = true;
|
|
35
|
+
this.historyList = [];
|
|
36
|
+
this.maxHistoryLength = 20;
|
|
37
|
+
|
|
38
|
+
this.onStart = function () {};
|
|
39
|
+
|
|
40
|
+
this.onEnd = function () {};
|
|
41
|
+
|
|
42
|
+
this.addListener = function () {
|
|
43
|
+
_this.removeListener();
|
|
44
|
+
|
|
45
|
+
_this.canvas.style.touchAction = 'none';
|
|
46
|
+
|
|
47
|
+
if (isMobile && ('ontouchstart' in window || navigator.maxTouchPoints)) {
|
|
48
|
+
_this.canvas.addEventListener('touchstart', _this.onDrawStart, {
|
|
49
|
+
passive: false
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
_this.canvas.addEventListener('touchmove', _this.onDrawMove, {
|
|
53
|
+
passive: false
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
document.addEventListener('touchcancel', _this.onDrawEnd, {
|
|
57
|
+
passive: false
|
|
58
|
+
});
|
|
59
|
+
document.addEventListener('touchend', _this.onDrawEnd, {
|
|
60
|
+
passive: false
|
|
61
|
+
});
|
|
62
|
+
} else {
|
|
63
|
+
_this.canvas.addEventListener('mousedown', _this.onDrawStart);
|
|
64
|
+
|
|
65
|
+
_this.canvas.addEventListener('mousemove', _this.onDrawMove);
|
|
66
|
+
|
|
67
|
+
document.addEventListener('mouseup', _this.onDrawEnd);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
this.removeListener = function () {
|
|
72
|
+
_this.canvas.style.touchAction = 'auto';
|
|
73
|
+
|
|
74
|
+
_this.canvas.removeEventListener('touchstart', _this.onDrawStart);
|
|
75
|
+
|
|
76
|
+
_this.canvas.removeEventListener('touchmove', _this.onDrawMove);
|
|
77
|
+
|
|
78
|
+
document.removeEventListener('touchend', _this.onDrawEnd);
|
|
79
|
+
document.removeEventListener('touchcancel', _this.onDrawEnd);
|
|
80
|
+
|
|
81
|
+
_this.canvas.removeEventListener('mousedown', _this.onDrawStart);
|
|
82
|
+
|
|
83
|
+
_this.canvas.removeEventListener('mousemove', _this.onDrawMove);
|
|
84
|
+
|
|
85
|
+
document.removeEventListener('mouseup', _this.onDrawEnd);
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
this.onDrawStart = function (e) {
|
|
89
|
+
e.preventDefault();
|
|
90
|
+
_this.canDraw = true;
|
|
91
|
+
_this.canAddHistory = true;
|
|
92
|
+
_this.ctx.strokeStyle = _this.color;
|
|
93
|
+
|
|
94
|
+
_this.initPoint(e);
|
|
95
|
+
|
|
96
|
+
_this.onStart && _this.onStart(e);
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
this.onDrawMove = function (e) {
|
|
100
|
+
e.preventDefault();
|
|
101
|
+
if (!_this.canDraw) return;
|
|
102
|
+
|
|
103
|
+
_this.initPoint(e);
|
|
104
|
+
|
|
105
|
+
if (_this.points.length < 2) return;
|
|
106
|
+
|
|
107
|
+
_this.addHistory();
|
|
108
|
+
|
|
109
|
+
var point = _this.points.slice(-1)[0];
|
|
110
|
+
|
|
111
|
+
var prePoint = _this.points.slice(-2, -1)[0];
|
|
112
|
+
|
|
113
|
+
if (window.requestAnimationFrame) {
|
|
114
|
+
window.requestAnimationFrame(function () {
|
|
115
|
+
return _this.onDraw(prePoint, point);
|
|
116
|
+
});
|
|
117
|
+
} else {
|
|
118
|
+
_this.onDraw(prePoint, point);
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
this.onDraw = function (prePoint, point) {
|
|
123
|
+
if (_this.openSmooth) {
|
|
124
|
+
_this.drawSmoothLine(prePoint, point);
|
|
125
|
+
} else {
|
|
126
|
+
_this.drawNoSmoothLine(prePoint, point);
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
this.onDrawEnd = function (e) {
|
|
131
|
+
if (!_this.canDraw) return;
|
|
132
|
+
_this.canDraw = false;
|
|
133
|
+
_this.canAddHistory = true;
|
|
134
|
+
_this.points = [];
|
|
135
|
+
_this.onEnd && _this.onEnd(e);
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
this.getLineWidth = function (speed) {
|
|
139
|
+
var minSpeed = _this.minSpeed > 10 ? 10 : _this.minSpeed < 1 ? 1 : _this.minSpeed;
|
|
140
|
+
var addWidth = (_this.maxWidth - _this.minWidth) * speed / minSpeed;
|
|
141
|
+
var lineWidth = Math.max(_this.maxWidth - addWidth, _this.minWidth);
|
|
142
|
+
return Math.min(lineWidth, _this.maxWidth);
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
this.getRadianData = function (x1, y1, x2, y2) {
|
|
146
|
+
var dis_x = x2 - x1;
|
|
147
|
+
var dis_y = y2 - y1;
|
|
148
|
+
|
|
149
|
+
if (dis_x === 0) {
|
|
150
|
+
return {
|
|
151
|
+
val: 0,
|
|
152
|
+
pos: -1
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
if (dis_y === 0) {
|
|
157
|
+
return {
|
|
158
|
+
val: 0,
|
|
159
|
+
pos: 1
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
var val = Math.abs(Math.atan(dis_y / dis_x));
|
|
164
|
+
|
|
165
|
+
if (x2 > x1 && y2 < y1 || x2 < x1 && y2 > y1) {
|
|
166
|
+
return {
|
|
167
|
+
val: val,
|
|
168
|
+
pos: 1
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
return {
|
|
173
|
+
val: val,
|
|
174
|
+
pos: -1
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
this.getRadianPoints = function (radianData, x, y, halfLineWidth) {
|
|
179
|
+
if (radianData.val === 0) {
|
|
180
|
+
if (radianData.pos === 1) {
|
|
181
|
+
return [{
|
|
182
|
+
x: x,
|
|
183
|
+
y: y + halfLineWidth
|
|
184
|
+
}, {
|
|
185
|
+
x: x,
|
|
186
|
+
y: y - halfLineWidth
|
|
187
|
+
}];
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
return [{
|
|
191
|
+
y: y,
|
|
192
|
+
x: x + halfLineWidth
|
|
193
|
+
}, {
|
|
194
|
+
y: y,
|
|
195
|
+
x: x - halfLineWidth
|
|
196
|
+
}];
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
var dis_x = Math.sin(radianData.val) * halfLineWidth;
|
|
200
|
+
var dis_y = Math.cos(radianData.val) * halfLineWidth;
|
|
201
|
+
|
|
202
|
+
if (radianData.pos === 1) {
|
|
203
|
+
return [{
|
|
204
|
+
x: x + dis_x,
|
|
205
|
+
y: y + dis_y
|
|
206
|
+
}, {
|
|
207
|
+
x: x - dis_x,
|
|
208
|
+
y: y - dis_y
|
|
209
|
+
}];
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
return [{
|
|
213
|
+
x: x + dis_x,
|
|
214
|
+
y: y - dis_y
|
|
215
|
+
}, {
|
|
216
|
+
x: x - dis_x,
|
|
217
|
+
y: y + dis_y
|
|
218
|
+
}];
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
this.initPoint = function (event) {
|
|
222
|
+
var t = Date.now();
|
|
223
|
+
|
|
224
|
+
var prePoint = _this.points.slice(-1)[0];
|
|
225
|
+
|
|
226
|
+
if (prePoint && prePoint.t === t) {
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
var rect = _this.canvas.getBoundingClientRect();
|
|
231
|
+
|
|
232
|
+
var e = event.touches && event.touches[0] || event;
|
|
233
|
+
var x = e.clientX - rect.left;
|
|
234
|
+
var y = e.clientY - rect.top;
|
|
235
|
+
|
|
236
|
+
if (prePoint && prePoint.x === x && prePoint.y === y) {
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
var point = {
|
|
241
|
+
x: x,
|
|
242
|
+
y: y,
|
|
243
|
+
t: t
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
if (_this.openSmooth && prePoint) {
|
|
247
|
+
var prePoint2 = _this.points.slice(-2, -1)[0];
|
|
248
|
+
|
|
249
|
+
point.distance = Math.sqrt(Math.pow(point.x - prePoint.x, 2) + Math.pow(point.y - prePoint.y, 2));
|
|
250
|
+
point.speed = point.distance / (point.t - prePoint.t || 0.1);
|
|
251
|
+
point.lineWidth = _this.getLineWidth(point.speed);
|
|
252
|
+
|
|
253
|
+
if (prePoint2 && prePoint2.lineWidth && prePoint.lineWidth) {
|
|
254
|
+
var rate = (point.lineWidth - prePoint.lineWidth) / prePoint.lineWidth;
|
|
255
|
+
var maxRate = _this.maxWidthDiffRate / 100;
|
|
256
|
+
maxRate = maxRate > 1 ? 1 : maxRate < 0.01 ? 0.01 : maxRate;
|
|
257
|
+
|
|
258
|
+
if (Math.abs(rate) > maxRate) {
|
|
259
|
+
var per = rate > 0 ? maxRate : -maxRate;
|
|
260
|
+
point.lineWidth = prePoint.lineWidth * (1 + per);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
_this.points.push(point);
|
|
266
|
+
|
|
267
|
+
_this.points = _this.points.slice(-3);
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
this.drawSmoothLine = function (prePoint, point) {
|
|
271
|
+
var dis_x = point.x - prePoint.x;
|
|
272
|
+
var dis_y = point.y - prePoint.y;
|
|
273
|
+
|
|
274
|
+
if (Math.abs(dis_x) + Math.abs(dis_y) <= _this.scale) {
|
|
275
|
+
point.lastX1 = point.lastX2 = prePoint.x + dis_x * 0.5;
|
|
276
|
+
point.lastY1 = point.lastY2 = prePoint.y + dis_y * 0.5;
|
|
277
|
+
} else {
|
|
278
|
+
point.lastX1 = prePoint.x + dis_x * 0.3;
|
|
279
|
+
point.lastY1 = prePoint.y + dis_y * 0.3;
|
|
280
|
+
point.lastX2 = prePoint.x + dis_x * 0.7;
|
|
281
|
+
point.lastY2 = prePoint.y + dis_y * 0.7;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
point.perLineWidth = (prePoint.lineWidth + point.lineWidth) / 2;
|
|
285
|
+
|
|
286
|
+
if (typeof prePoint.lastX1 === 'number') {
|
|
287
|
+
_this.drawCurveLine(prePoint.lastX2, prePoint.lastY2, prePoint.x, prePoint.y, point.lastX1, point.lastY1, point.perLineWidth);
|
|
288
|
+
|
|
289
|
+
if (prePoint.isFirstPoint) return;
|
|
290
|
+
if (prePoint.lastX1 === prePoint.lastX2 && prePoint.lastY1 === prePoint.lastY2) return;
|
|
291
|
+
|
|
292
|
+
var data = _this.getRadianData(prePoint.lastX1, prePoint.lastY1, prePoint.lastX2, prePoint.lastY2);
|
|
293
|
+
|
|
294
|
+
var points1 = _this.getRadianPoints(data, prePoint.lastX1, prePoint.lastY1, prePoint.perLineWidth / 2);
|
|
295
|
+
|
|
296
|
+
var points2 = _this.getRadianPoints(data, prePoint.lastX2, prePoint.lastY2, point.perLineWidth / 2);
|
|
297
|
+
|
|
298
|
+
_this.drawTrapezoid(points1[0], points2[0], points2[1], points1[1]);
|
|
299
|
+
} else {
|
|
300
|
+
point.isFirstPoint = true;
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
|
|
304
|
+
this.drawNoSmoothLine = function (prePoint, point) {
|
|
305
|
+
point.lastX = prePoint.x + (point.x - prePoint.x) * 0.5;
|
|
306
|
+
point.lastY = prePoint.y + (point.y - prePoint.y) * 0.5;
|
|
307
|
+
|
|
308
|
+
if (typeof prePoint.lastX === 'number') {
|
|
309
|
+
_this.drawCurveLine(prePoint.lastX, prePoint.lastY, prePoint.x, prePoint.y, point.lastX, point.lastY, _this.maxWidth);
|
|
310
|
+
}
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
this.drawCurveLine = function (x1, y1, x2, y2, x3, y3, lineWidth) {
|
|
314
|
+
_this.ctx.lineWidth = Number(lineWidth.toFixed(1));
|
|
315
|
+
|
|
316
|
+
_this.ctx.beginPath();
|
|
317
|
+
|
|
318
|
+
_this.ctx.moveTo(Number(x1.toFixed(1)), Number(y1.toFixed(1)));
|
|
319
|
+
|
|
320
|
+
_this.ctx.quadraticCurveTo(Number(x2.toFixed(1)), Number(y2.toFixed(1)), Number(x3.toFixed(1)), Number(y3.toFixed(1)));
|
|
321
|
+
|
|
322
|
+
_this.ctx.stroke();
|
|
323
|
+
};
|
|
324
|
+
|
|
325
|
+
this.drawTrapezoid = function (point1, point2, point3, point4) {
|
|
326
|
+
_this.ctx.beginPath();
|
|
327
|
+
|
|
328
|
+
_this.ctx.moveTo(Number(point1.x.toFixed(1)), Number(point1.y.toFixed(1)));
|
|
329
|
+
|
|
330
|
+
_this.ctx.lineTo(Number(point2.x.toFixed(1)), Number(point2.y.toFixed(1)));
|
|
331
|
+
|
|
332
|
+
_this.ctx.lineTo(Number(point3.x.toFixed(1)), Number(point3.y.toFixed(1)));
|
|
333
|
+
|
|
334
|
+
_this.ctx.lineTo(Number(point4.x.toFixed(1)), Number(point4.y.toFixed(1)));
|
|
335
|
+
|
|
336
|
+
_this.ctx.fillStyle = _this.color;
|
|
337
|
+
|
|
338
|
+
_this.ctx.fill();
|
|
339
|
+
};
|
|
340
|
+
|
|
341
|
+
this.drawBgColor = function () {
|
|
342
|
+
if (!_this.bgColor) return;
|
|
343
|
+
_this.ctx.fillStyle = _this.bgColor;
|
|
344
|
+
|
|
345
|
+
_this.ctx.fillRect(0, 0, _this.width, _this.height);
|
|
346
|
+
};
|
|
347
|
+
|
|
348
|
+
this.drawByImageUrl = function (url) {
|
|
349
|
+
var image = new Image();
|
|
350
|
+
|
|
351
|
+
image.onload = function () {
|
|
352
|
+
_this.ctx.clearRect(0, 0, _this.width, _this.height);
|
|
353
|
+
|
|
354
|
+
_this.ctx.drawImage(image, 0, 0, _this.width, _this.height);
|
|
355
|
+
};
|
|
356
|
+
|
|
357
|
+
image.crossOrigin = 'anonymous';
|
|
358
|
+
image.src = url;
|
|
359
|
+
};
|
|
360
|
+
|
|
361
|
+
this.addHistory = function () {
|
|
362
|
+
if (!_this.maxHistoryLength || !_this.canAddHistory) return;
|
|
363
|
+
_this.canAddHistory = false;
|
|
364
|
+
|
|
365
|
+
_this.historyList.push(_this.canvas.toDataURL());
|
|
366
|
+
|
|
367
|
+
_this.historyList = _this.historyList.slice(-_this.maxHistoryLength);
|
|
368
|
+
};
|
|
369
|
+
|
|
370
|
+
this.clear = function () {
|
|
371
|
+
_this.ctx.clearRect(0, 0, _this.width, _this.height);
|
|
372
|
+
|
|
373
|
+
_this.drawBgColor();
|
|
374
|
+
|
|
375
|
+
_this.historyList.length = 0;
|
|
376
|
+
};
|
|
377
|
+
|
|
378
|
+
this.undo = function () {
|
|
379
|
+
var dataUrl = _this.historyList.splice(-1)[0];
|
|
380
|
+
|
|
381
|
+
dataUrl && _this.drawByImageUrl(dataUrl);
|
|
382
|
+
};
|
|
383
|
+
|
|
384
|
+
this.toDataURL = function () {
|
|
385
|
+
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'image/png';
|
|
386
|
+
var quality = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
387
|
+
|
|
388
|
+
if (_this.canvas.width === _this.width) {
|
|
389
|
+
return _this.canvas.toDataURL(type, quality);
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
var canvas = document.createElement('canvas');
|
|
393
|
+
canvas.width = _this.width;
|
|
394
|
+
canvas.height = _this.height;
|
|
395
|
+
var ctx = canvas.getContext('2d');
|
|
396
|
+
ctx.drawImage(_this.canvas, 0, 0, canvas.width, canvas.height);
|
|
397
|
+
return canvas.toDataURL(type, quality);
|
|
398
|
+
};
|
|
399
|
+
|
|
400
|
+
this.getPNG = function () {
|
|
401
|
+
return _this.toDataURL();
|
|
402
|
+
};
|
|
403
|
+
|
|
404
|
+
this.getJPG = function () {
|
|
405
|
+
var quality = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0.8;
|
|
406
|
+
return _this.toDataURL('image/jpeg', quality);
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
this.isEmpty = function () {
|
|
410
|
+
var canvas = document.createElement('canvas');
|
|
411
|
+
var ctx = canvas.getContext('2d');
|
|
412
|
+
canvas.width = _this.canvas.width;
|
|
413
|
+
canvas.height = _this.canvas.height;
|
|
414
|
+
|
|
415
|
+
if (_this.bgColor) {
|
|
416
|
+
ctx.fillStyle = _this.bgColor;
|
|
417
|
+
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
|
418
|
+
} else if (_this.scale !== 1) {
|
|
419
|
+
ctx.scale(_this.scale, _this.scale);
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
return canvas.toDataURL() === _this.canvas.toDataURL();
|
|
423
|
+
};
|
|
424
|
+
|
|
425
|
+
this.getRotateCanvas = function () {
|
|
426
|
+
var degree = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 90;
|
|
427
|
+
|
|
428
|
+
if (degree > 0) {
|
|
429
|
+
degree = degree > 90 ? 180 : 90;
|
|
430
|
+
} else {
|
|
431
|
+
degree = degree < -90 ? 180 : -90;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
var canvas = document.createElement('canvas');
|
|
435
|
+
var w = _this.width;
|
|
436
|
+
var h = _this.height;
|
|
437
|
+
|
|
438
|
+
if (degree === 180) {
|
|
439
|
+
canvas.width = w;
|
|
440
|
+
canvas.height = h;
|
|
441
|
+
} else {
|
|
442
|
+
canvas.width = h;
|
|
443
|
+
canvas.height = w;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
var ctx = canvas.getContext('2d');
|
|
447
|
+
ctx.rotate(degree * Math.PI / 180);
|
|
448
|
+
|
|
449
|
+
if (degree === 90) {
|
|
450
|
+
// 顺时针90度
|
|
451
|
+
ctx.drawImage(_this.canvas, 0, -h, w, h);
|
|
452
|
+
} else if (degree === -90) {
|
|
453
|
+
// 逆时针90度
|
|
454
|
+
ctx.drawImage(_this.canvas, -w, 0, w, h);
|
|
455
|
+
} else if (degree === 180) {
|
|
456
|
+
ctx.drawImage(_this.canvas, -w, -h, w, h);
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
return canvas;
|
|
460
|
+
};
|
|
461
|
+
|
|
462
|
+
this.init(_canvas, options);
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
_createClass(SmoothSignature, [{
|
|
466
|
+
key: "init",
|
|
467
|
+
value: function init(canvas) {
|
|
468
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
469
|
+
if (!canvas) return;
|
|
470
|
+
this.canvas = canvas;
|
|
471
|
+
this.ctx = canvas.getContext('2d');
|
|
472
|
+
this.width = options.width || canvas.clientWidth || this.width;
|
|
473
|
+
this.height = options.height || canvas.clientHeight || this.height;
|
|
474
|
+
this.scale = options.scale || this.scale;
|
|
475
|
+
this.color = options.color || this.color;
|
|
476
|
+
this.bgColor = options.bgColor || this.bgColor;
|
|
477
|
+
this.openSmooth = options.openSmooth === undefined ? this.openSmooth : !!options.openSmooth;
|
|
478
|
+
this.minWidth = options.minWidth || this.minWidth;
|
|
479
|
+
this.maxWidth = options.maxWidth || this.maxWidth;
|
|
480
|
+
this.minSpeed = options.minSpeed || this.minSpeed;
|
|
481
|
+
this.maxWidthDiffRate = options.maxWidthDiffRate || this.maxWidthDiffRate;
|
|
482
|
+
this.maxHistoryLength = options.maxHistoryLength || this.maxHistoryLength;
|
|
483
|
+
this.onStart = options.onStart;
|
|
484
|
+
this.onEnd = options.onEnd;
|
|
485
|
+
|
|
486
|
+
if (this.scale > 0) {
|
|
487
|
+
this.canvas.height = this.height * this.scale;
|
|
488
|
+
this.canvas.width = this.width * this.scale;
|
|
489
|
+
|
|
490
|
+
if (this.scale !== 1) {
|
|
491
|
+
this.canvas.style.width = this.width + 'px';
|
|
492
|
+
this.canvas.style.height = this.height + 'px';
|
|
493
|
+
this.ctx.scale(this.scale, this.scale);
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
this.ctx.lineCap = 'round';
|
|
498
|
+
this.drawBgColor();
|
|
499
|
+
this.addListener();
|
|
500
|
+
}
|
|
501
|
+
}]);
|
|
502
|
+
|
|
503
|
+
return SmoothSignature;
|
|
504
|
+
}();
|
|
505
|
+
|
|
506
|
+
export { SmoothSignature as default };
|
package/esm/themes/ang.js
CHANGED
package/esm/themes/antd.js
CHANGED
package/esm/themes/cxd.js
CHANGED
package/esm/themes/dark.js
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* amis-ui v6.4.0
|
|
3
|
+
* Copyright 2018-2024 fex
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
'use strict';
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
|
+
|
|
10
|
+
function getDefaultExportFromCjs (x) {
|
|
11
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
|
package/lib/components/404.js
CHANGED