amis-editor 3.3.9 → 4.0.1-beta.8
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/150a58f3318ca7541ed9.png +0 -0
- package/dist/471adb97c322b226e589.png +0 -0
- package/dist/4de5f42360bc5946c3c2.png +0 -0
- package/dist/4e9968bba3855f088fed.png +0 -0
- package/dist/7f09c38ebc687fea847a.png +0 -0
- package/dist/c94073576487510314ea.png +0 -0
- package/dist/component/AvailableRenderersPanel.d.ts +13 -1
- package/dist/component/BackTop.d.ts +26 -0
- package/dist/component/Breadcrumb.d.ts +1 -1
- package/dist/component/InputComponentName.d.ts +8 -0
- package/dist/component/Outline.d.ts +6 -0
- package/dist/component/Preview.d.ts +2 -0
- package/dist/component/RegionHLBox.d.ts +1 -8
- package/dist/dnd/default.d.ts +1 -1
- package/dist/dnd/index.d.ts +1 -1
- package/dist/index.d.ts +3 -4
- package/dist/index.min.js +1 -1
- package/dist/manager.d.ts +442 -0
- package/dist/plugin/BasicToolbar.d.ts +1 -1
- package/dist/plugin/Date.d.ts +1 -0
- package/dist/plugin/Datetime.d.ts +3 -0
- package/dist/plugin/Form/FieldSet.d.ts +1 -0
- package/dist/plugin/Form/Group.d.ts +1 -0
- package/dist/plugin/Form/InputExcel.d.ts +13 -1
- package/dist/plugin/Form/InputKV.d.ts +28 -0
- package/dist/plugin/Form/Item.d.ts +1 -1
- package/dist/plugin/Grid.d.ts +17 -20
- package/dist/plugin/HBox.d.ts +1 -0
- package/dist/plugin/Log.d.ts +1 -0
- package/dist/plugin/Plain.d.ts +1 -0
- package/dist/plugin/Reset.d.ts +1 -0
- package/dist/plugin/Steps.d.ts +1 -7
- package/dist/plugin/Submit.d.ts +1 -0
- package/dist/plugin/Time.d.ts +3 -0
- package/dist/plugin/WebComponent.d.ts +1 -0
- package/dist/plugin/Wrapper.d.ts +1 -0
- package/dist/plugin.d.ts +18 -0
- package/dist/store/editor.d.ts +5 -1
- package/dist/style.css +1 -1
- package/package.json +9 -7
- package/publish-local.sh +37 -0
- package/static/Code-hover.png +0 -0
- package/static/Code.png +0 -0
- package/static/Outline-hover.png +0 -0
- package/static/Outline.png +0 -0
- package/static/Renderers-hover.png +0 -0
- package/static/Renderers.png +0 -0
- package/dist/npm/src/compat.d.ts +0 -30
- package/dist/npm/src/component/AvailableRenderersPanel.d.ts +0 -8
- package/dist/npm/src/component/Breadcrumb.d.ts +0 -12
- package/dist/npm/src/component/ClassNameControl.d.ts +0 -31
- package/dist/npm/src/component/CodeEditor.d.ts +0 -34
- package/dist/npm/src/component/CodeEditorPanel.d.ts +0 -12
- package/dist/npm/src/component/ContainerWrapper.d.ts +0 -12
- package/dist/npm/src/component/Editor.d.ts +0 -48
- package/dist/npm/src/component/ErrorRenderer.d.ts +0 -4
- package/dist/npm/src/component/HighlightBox.d.ts +0 -13
- package/dist/npm/src/component/InsertSubRendererPanel.d.ts +0 -11
- package/dist/npm/src/component/MiniEditor.d.ts +0 -8
- package/dist/npm/src/component/NodeWrapper.d.ts +0 -20
- package/dist/npm/src/component/Outline.d.ts +0 -12
- package/dist/npm/src/component/Panels.d.ts +0 -17
- package/dist/npm/src/component/Preview.d.ts +0 -43
- package/dist/npm/src/component/RegionHLBox.d.ts +0 -27
- package/dist/npm/src/component/RegionWrapper.d.ts +0 -150
- package/dist/npm/src/component/RendererThumb.d.ts +0 -23
- package/dist/npm/src/component/ScaffoldModal.d.ts +0 -53
- package/dist/npm/src/component/SubEditor.d.ts +0 -71
- package/dist/npm/src/component/VRenderer.d.ts +0 -142
- package/dist/npm/src/component/schemaTpl.d.ts +0 -4
- package/dist/npm/src/dnd/default.d.ts +0 -47
- package/dist/npm/src/dnd/index.d.ts +0 -119
- package/dist/npm/src/dnd/interface.d.ts +0 -14
- package/dist/npm/src/dnd/position-h.d.ts +0 -7
- package/dist/npm/src/env.d.ts +0 -5
- package/dist/npm/src/index.d.ts +0 -126
- package/dist/npm/src/mocker.d.ts +0 -1
- package/dist/npm/src/plugin/Action.d.ts +0 -6
- package/dist/npm/src/plugin/Alert.d.ts +0 -18
- package/dist/npm/src/plugin/Audio.d.ts +0 -21
- package/dist/npm/src/plugin/AvailableRenderers.d.ts +0 -8
- package/dist/npm/src/plugin/BasicToolbar.d.ts +0 -9
- package/dist/npm/src/plugin/Button.d.ts +0 -24
- package/dist/npm/src/plugin/ButtonGroup.d.ts +0 -59
- package/dist/npm/src/plugin/ButtonToolbar.d.ts +0 -35
- package/dist/npm/src/plugin/CRUD.d.ts +0 -28
- package/dist/npm/src/plugin/Card.d.ts +0 -55
- package/dist/npm/src/plugin/Cards.d.ts +0 -69
- package/dist/npm/src/plugin/Carousel.d.ts +0 -31
- package/dist/npm/src/plugin/Chart.d.ts +0 -44
- package/dist/npm/src/plugin/Code.d.ts +0 -9
- package/dist/npm/src/plugin/Collapse.d.ts +0 -21
- package/dist/npm/src/plugin/Container.d.ts +0 -20
- package/dist/npm/src/plugin/Date.d.ts +0 -19
- package/dist/npm/src/plugin/Datetime.d.ts +0 -10
- package/dist/npm/src/plugin/Dialog.d.ts +0 -18
- package/dist/npm/src/plugin/DiffEditor.d.ts +0 -19
- package/dist/npm/src/plugin/Divider.d.ts +0 -13
- package/dist/npm/src/plugin/Drawer.d.ts +0 -16
- package/dist/npm/src/plugin/DropDownButton.d.ts +0 -41
- package/dist/npm/src/plugin/Each.d.ts +0 -35
- package/dist/npm/src/plugin/ErrorRenderer.d.ts +0 -6
- package/dist/npm/src/plugin/Form/Array.d.ts +0 -26
- package/dist/npm/src/plugin/Form/Button.d.ts +0 -11
- package/dist/npm/src/plugin/Form/ButtonGroup.d.ts +0 -21
- package/dist/npm/src/plugin/Form/ButtonToolbar.d.ts +0 -26
- package/dist/npm/src/plugin/Form/ChainedSelect.d.ts +0 -18
- package/dist/npm/src/plugin/Form/Checkbox.d.ts +0 -18
- package/dist/npm/src/plugin/Form/Checkboxes.d.ts +0 -23
- package/dist/npm/src/plugin/Form/City.d.ts +0 -18
- package/dist/npm/src/plugin/Form/Color.d.ts +0 -18
- package/dist/npm/src/plugin/Form/Combo.d.ts +0 -37
- package/dist/npm/src/plugin/Form/Container.d.ts +0 -36
- package/dist/npm/src/plugin/Form/Date.d.ts +0 -20
- package/dist/npm/src/plugin/Form/DateRange.d.ts +0 -20
- package/dist/npm/src/plugin/Form/DateTime.d.ts +0 -19
- package/dist/npm/src/plugin/Form/DiffEditor.d.ts +0 -18
- package/dist/npm/src/plugin/Form/Editor.d.ts +0 -39
- package/dist/npm/src/plugin/Form/Email.d.ts +0 -24
- package/dist/npm/src/plugin/Form/FieldSet.d.ts +0 -25
- package/dist/npm/src/plugin/Form/File.d.ts +0 -18
- package/dist/npm/src/plugin/Form/Form.d.ts +0 -18
- package/dist/npm/src/plugin/Form/Formula.d.ts +0 -50
- package/dist/npm/src/plugin/Form/Grid.d.ts +0 -32
- package/dist/npm/src/plugin/Form/Group.d.ts +0 -23
- package/dist/npm/src/plugin/Form/HBox.d.ts +0 -72
- package/dist/npm/src/plugin/Form/Hidden.d.ts +0 -22
- package/dist/npm/src/plugin/Form/Image.d.ts +0 -19
- package/dist/npm/src/plugin/Form/InputGroup.d.ts +0 -33
- package/dist/npm/src/plugin/Form/Item.d.ts +0 -10
- package/dist/npm/src/plugin/Form/List.d.ts +0 -23
- package/dist/npm/src/plugin/Form/Matrix.d.ts +0 -25
- package/dist/npm/src/plugin/Form/NestedSelect.d.ts +0 -72
- package/dist/npm/src/plugin/Form/Number.d.ts +0 -19
- package/dist/npm/src/plugin/Form/Panel.d.ts +0 -23
- package/dist/npm/src/plugin/Form/Password.d.ts +0 -24
- package/dist/npm/src/plugin/Form/Picker.d.ts +0 -25
- package/dist/npm/src/plugin/Form/QRCode.d.ts +0 -19
- package/dist/npm/src/plugin/Form/Radios.d.ts +0 -23
- package/dist/npm/src/plugin/Form/Range.d.ts +0 -18
- package/dist/npm/src/plugin/Form/Rating.d.ts +0 -18
- package/dist/npm/src/plugin/Form/Repeat.d.ts +0 -18
- package/dist/npm/src/plugin/Form/Reset.d.ts +0 -6
- package/dist/npm/src/plugin/Form/RichText.d.ts +0 -18
- package/dist/npm/src/plugin/Form/Select.d.ts +0 -23
- package/dist/npm/src/plugin/Form/Service.d.ts +0 -23
- package/dist/npm/src/plugin/Form/Static.d.ts +0 -22
- package/dist/npm/src/plugin/Form/SubForm.d.ts +0 -62
- package/dist/npm/src/plugin/Form/Submit.d.ts +0 -6
- package/dist/npm/src/plugin/Form/Switch.d.ts +0 -19
- package/dist/npm/src/plugin/Form/Table.d.ts +0 -33
- package/dist/npm/src/plugin/Form/Tabs.d.ts +0 -16
- package/dist/npm/src/plugin/Form/Tag.d.ts +0 -20
- package/dist/npm/src/plugin/Form/Text.d.ts +0 -19
- package/dist/npm/src/plugin/Form/Textarea.d.ts +0 -19
- package/dist/npm/src/plugin/Form/Time.d.ts +0 -18
- package/dist/npm/src/plugin/Form/Tree.d.ts +0 -72
- package/dist/npm/src/plugin/Form/TreeSelect.d.ts +0 -72
- package/dist/npm/src/plugin/Form/Url.d.ts +0 -24
- package/dist/npm/src/plugin/Grid.d.ts +0 -30
- package/dist/npm/src/plugin/HBox.d.ts +0 -32
- package/dist/npm/src/plugin/IFrame.d.ts +0 -28
- package/dist/npm/src/plugin/Image.d.ts +0 -19
- package/dist/npm/src/plugin/Images.d.ts +0 -24
- package/dist/npm/src/plugin/Json.d.ts +0 -24
- package/dist/npm/src/plugin/Link.d.ts +0 -20
- package/dist/npm/src/plugin/List.d.ts +0 -53
- package/dist/npm/src/plugin/ListItem.d.ts +0 -16
- package/dist/npm/src/plugin/Mapping.d.ts +0 -35
- package/dist/npm/src/plugin/Nav.d.ts +0 -161
- package/dist/npm/src/plugin/Operation.d.ts +0 -25
- package/dist/npm/src/plugin/Page.d.ts +0 -26
- package/dist/npm/src/plugin/Panel.d.ts +0 -16
- package/dist/npm/src/plugin/Plain.d.ts +0 -18
- package/dist/npm/src/plugin/Progress.d.ts +0 -19
- package/dist/npm/src/plugin/QRCode.d.ts +0 -19
- package/dist/npm/src/plugin/Reset.d.ts +0 -10
- package/dist/npm/src/plugin/Service.d.ts +0 -24
- package/dist/npm/src/plugin/Status.d.ts +0 -19
- package/dist/npm/src/plugin/Submit.d.ts +0 -10
- package/dist/npm/src/plugin/Switch.d.ts +0 -21
- package/dist/npm/src/plugin/Table.d.ts +0 -18
- package/dist/npm/src/plugin/TableCell.d.ts +0 -8
- package/dist/npm/src/plugin/Tabs.d.ts +0 -43
- package/dist/npm/src/plugin/Tasks.d.ts +0 -41
- package/dist/npm/src/plugin/Time.d.ts +0 -10
- package/dist/npm/src/plugin/Tpl.d.ts +0 -16
- package/dist/npm/src/plugin/Unknown.d.ts +0 -5
- package/dist/npm/src/plugin/Video.d.ts +0 -24
- package/dist/npm/src/plugin/Wizard.d.ts +0 -40
- package/dist/npm/src/plugin/Wrapper.d.ts +0 -20
- package/dist/npm/src/plugin.d.ts +0 -486
- package/dist/npm/src/store/editor.d.ts +0 -731
- package/dist/npm/src/store/node.d.ts +0 -208
- package/dist/npm/src/util.d.ts +0 -45
- package/dist/plugin/DiffEditor.d.ts +0 -19
- package/dist/plugin/Form/AnchorNav.d.ts +0 -17
- package/dist/plugin/Form/Array.d.ts +0 -27
- package/dist/plugin/Form/Button.d.ts +0 -11
- package/dist/plugin/Form/ButtonGroup.d.ts +0 -22
- package/dist/plugin/Form/City.d.ts +0 -19
- package/dist/plugin/Form/Color.d.ts +0 -39
- package/dist/plugin/Form/Container.d.ts +0 -37
- package/dist/plugin/Form/Date.d.ts +0 -20
- package/dist/plugin/Form/DateRange.d.ts +0 -20
- package/dist/plugin/Form/DateTime.d.ts +0 -19
- package/dist/plugin/Form/Email.d.ts +0 -25
- package/dist/plugin/Form/File.d.ts +0 -19
- package/dist/plugin/Form/Grid.d.ts +0 -32
- package/dist/plugin/Form/HBox.d.ts +0 -73
- package/dist/plugin/Form/Image.d.ts +0 -20
- package/dist/plugin/Form/List.d.ts +0 -24
- package/dist/plugin/Form/Location.d.ts +0 -48
- package/dist/plugin/Form/Matrix.d.ts +0 -26
- package/dist/plugin/Form/Month.d.ts +0 -16
- package/dist/plugin/Form/MonthRange.d.ts +0 -20
- package/dist/plugin/Form/Number.d.ts +0 -20
- package/dist/plugin/Form/Panel.d.ts +0 -24
- package/dist/plugin/Form/Password.d.ts +0 -25
- package/dist/plugin/Form/QRCode.d.ts +0 -20
- package/dist/plugin/Form/Range.d.ts +0 -19
- package/dist/plugin/Form/Rating.d.ts +0 -19
- package/dist/plugin/Form/Repeat.d.ts +0 -19
- package/dist/plugin/Form/Reset.d.ts +0 -7
- package/dist/plugin/Form/RichText.d.ts +0 -19
- package/dist/plugin/Form/Service.d.ts +0 -24
- package/dist/plugin/Form/SubForm.d.ts +0 -64
- package/dist/plugin/Form/Submit.d.ts +0 -6
- package/dist/plugin/Form/Table.d.ts +0 -34
- package/dist/plugin/Form/Tabs.d.ts +0 -17
- package/dist/plugin/Form/Tag.d.ts +0 -21
- package/dist/plugin/Form/Text.d.ts +0 -20
- package/dist/plugin/Form/Time.d.ts +0 -19
- package/dist/plugin/Form/Tree.d.ts +0 -73
- package/dist/plugin/Form/Url.d.ts +0 -25
- package/dist/plugin/Form/Year.d.ts +0 -16
- package/dist/plugin/Switch.d.ts +0 -21
- package/dist/src/compat.d.ts +0 -30
- package/dist/src/component/AvailableRenderersPanel.d.ts +0 -8
- package/dist/src/component/Breadcrumb.d.ts +0 -12
- package/dist/src/component/ClassNameControl.d.ts +0 -31
- package/dist/src/component/CodeEditor.d.ts +0 -37
- package/dist/src/component/CodeEditorPanel.d.ts +0 -12
- package/dist/src/component/CommonConfigWrapper.d.ts +0 -6
- package/dist/src/component/ContainerWrapper.d.ts +0 -12
- package/dist/src/component/Editor.d.ts +0 -60
- package/dist/src/component/ErrorRenderer.d.ts +0 -4
- package/dist/src/component/HighlightBox.d.ts +0 -22
- package/dist/src/component/IFrameBridge.d.ts +0 -32
- package/dist/src/component/IFramePreview.d.ts +0 -37
- package/dist/src/component/InsertSubRendererPanel.d.ts +0 -11
- package/dist/src/component/MiniEditor.d.ts +0 -9
- package/dist/src/component/NodeWrapper.d.ts +0 -20
- package/dist/src/component/Outline.d.ts +0 -12
- package/dist/src/component/Panels.d.ts +0 -17
- package/dist/src/component/PopOverForm.d.ts +0 -22
- package/dist/src/component/Preview.d.ts +0 -62
- package/dist/src/component/RegionHLBox.d.ts +0 -27
- package/dist/src/component/RegionWrapper.d.ts +0 -181
- package/dist/src/component/RendererThumb.d.ts +0 -22
- package/dist/src/component/ScaffoldModal.d.ts +0 -24
- package/dist/src/component/SubEditor.d.ts +0 -67
- package/dist/src/component/TableViewEditor.d.ts +0 -79
- package/dist/src/component/TargetNamePanel.d.ts +0 -7
- package/dist/src/component/VRenderer.d.ts +0 -169
- package/dist/src/component/schemaTpl.d.ts +0 -4
- package/dist/src/dnd/default.d.ts +0 -47
- package/dist/src/dnd/index.d.ts +0 -119
- package/dist/src/dnd/interface.d.ts +0 -14
- package/dist/src/dnd/position-h.d.ts +0 -7
- package/dist/src/env.d.ts +0 -5
- package/dist/src/icons/index.d.ts +0 -2
- package/dist/src/index.d.ts +0 -151
- package/dist/src/mocker.d.ts +0 -1
- package/dist/src/plugin/Action.d.ts +0 -6
- package/dist/src/plugin/Alert.d.ts +0 -19
- package/dist/src/plugin/AnchorNav.d.ts +0 -66
- package/dist/src/plugin/Audio.d.ts +0 -21
- package/dist/src/plugin/AvailableRenderers.d.ts +0 -8
- package/dist/src/plugin/Avatar.d.ts +0 -17
- package/dist/src/plugin/BasicToolbar.d.ts +0 -11
- package/dist/src/plugin/Breadcrumb.d.ts +0 -25
- package/dist/src/plugin/Button.d.ts +0 -24
- package/dist/src/plugin/ButtonGroup.d.ts +0 -59
- package/dist/src/plugin/ButtonToolbar.d.ts +0 -35
- package/dist/src/plugin/CRUD.d.ts +0 -144
- package/dist/src/plugin/Card.d.ts +0 -55
- package/dist/src/plugin/Cards.d.ts +0 -69
- package/dist/src/plugin/Carousel.d.ts +0 -38
- package/dist/src/plugin/Chart.d.ts +0 -46
- package/dist/src/plugin/Code.d.ts +0 -9
- package/dist/src/plugin/CodeView.d.ts +0 -18
- package/dist/src/plugin/Collapse.d.ts +0 -21
- package/dist/src/plugin/Container.d.ts +0 -20
- package/dist/src/plugin/Custom.d.ts +0 -23
- package/dist/src/plugin/DataDebug.d.ts +0 -20
- package/dist/src/plugin/Date.d.ts +0 -19
- package/dist/src/plugin/Datetime.d.ts +0 -13
- package/dist/src/plugin/Dialog.d.ts +0 -20
- package/dist/src/plugin/DiffEditor.d.ts +0 -19
- package/dist/src/plugin/Divider.d.ts +0 -14
- package/dist/src/plugin/Drawer.d.ts +0 -17
- package/dist/src/plugin/DropDownButton.d.ts +0 -41
- package/dist/src/plugin/Each.d.ts +0 -35
- package/dist/src/plugin/ErrorRenderer.d.ts +0 -6
- package/dist/src/plugin/Flex.d.ts +0 -28
- package/dist/src/plugin/Form/Array.d.ts +0 -26
- package/dist/src/plugin/Form/Button.d.ts +0 -11
- package/dist/src/plugin/Form/ButtonGroup.d.ts +0 -21
- package/dist/src/plugin/Form/ButtonGroupSelect.d.ts +0 -22
- package/dist/src/plugin/Form/ButtonToolbar.d.ts +0 -27
- package/dist/src/plugin/Form/ChainedSelect.d.ts +0 -19
- package/dist/src/plugin/Form/Checkbox.d.ts +0 -19
- package/dist/src/plugin/Form/Checkboxes.d.ts +0 -24
- package/dist/src/plugin/Form/City.d.ts +0 -18
- package/dist/src/plugin/Form/Color.d.ts +0 -39
- package/dist/src/plugin/Form/Combo.d.ts +0 -38
- package/dist/src/plugin/Form/ConditionBuilder.d.ts +0 -43
- package/dist/src/plugin/Form/Container.d.ts +0 -36
- package/dist/src/plugin/Form/Control.d.ts +0 -21
- package/dist/src/plugin/Form/Date.d.ts +0 -20
- package/dist/src/plugin/Form/DateRange.d.ts +0 -20
- package/dist/src/plugin/Form/DateTime.d.ts +0 -19
- package/dist/src/plugin/Form/DiffEditor.d.ts +0 -19
- package/dist/src/plugin/Form/Editor.d.ts +0 -40
- package/dist/src/plugin/Form/Email.d.ts +0 -24
- package/dist/src/plugin/Form/FieldSet.d.ts +0 -26
- package/dist/src/plugin/Form/File.d.ts +0 -18
- package/dist/src/plugin/Form/Form.d.ts +0 -18
- package/dist/src/plugin/Form/Formula.d.ts +0 -51
- package/dist/src/plugin/Form/Grid.d.ts +0 -32
- package/dist/src/plugin/Form/Group.d.ts +0 -25
- package/dist/src/plugin/Form/HBox.d.ts +0 -72
- package/dist/src/plugin/Form/Hidden.d.ts +0 -24
- package/dist/src/plugin/Form/Image.d.ts +0 -19
- package/dist/src/plugin/Form/InputArray.d.ts +0 -27
- package/dist/src/plugin/Form/InputCity.d.ts +0 -19
- package/dist/src/plugin/Form/InputDate.d.ts +0 -20
- package/dist/src/plugin/Form/InputDateRange.d.ts +0 -20
- package/dist/src/plugin/Form/InputDateTime.d.ts +0 -19
- package/dist/src/plugin/Form/InputDateTimeRange.d.ts +0 -20
- package/dist/src/plugin/Form/InputEmail.d.ts +0 -25
- package/dist/src/plugin/Form/InputFile.d.ts +0 -19
- package/dist/src/plugin/Form/InputGroup.d.ts +0 -34
- package/dist/src/plugin/Form/InputImage.d.ts +0 -20
- package/dist/src/plugin/Form/InputMonth.d.ts +0 -16
- package/dist/src/plugin/Form/InputMonthRange.d.ts +0 -20
- package/dist/src/plugin/Form/InputNumber.d.ts +0 -20
- package/dist/src/plugin/Form/InputPassword.d.ts +0 -25
- package/dist/src/plugin/Form/InputQuarter.d.ts +0 -16
- package/dist/src/plugin/Form/InputQuarterRange.d.ts +0 -20
- package/dist/src/plugin/Form/InputRange.d.ts +0 -19
- package/dist/src/plugin/Form/InputRating.d.ts +0 -19
- package/dist/src/plugin/Form/InputRepeat.d.ts +0 -19
- package/dist/src/plugin/Form/InputRichText.d.ts +0 -19
- package/dist/src/plugin/Form/InputSubForm.d.ts +0 -64
- package/dist/src/plugin/Form/InputTable.d.ts +0 -40
- package/dist/src/plugin/Form/InputTag.d.ts +0 -21
- package/dist/src/plugin/Form/InputText.d.ts +0 -20
- package/dist/src/plugin/Form/InputTime.d.ts +0 -19
- package/dist/src/plugin/Form/InputTree.d.ts +0 -73
- package/dist/src/plugin/Form/InputURL.d.ts +0 -25
- package/dist/src/plugin/Form/InputYear.d.ts +0 -16
- package/dist/src/plugin/Form/Item.d.ts +0 -10
- package/dist/src/plugin/Form/List.d.ts +0 -23
- package/dist/src/plugin/Form/ListSelect.d.ts +0 -24
- package/dist/src/plugin/Form/LocationPicker.d.ts +0 -48
- package/dist/src/plugin/Form/Matrix.d.ts +0 -25
- package/dist/src/plugin/Form/MatrixCheckboxes.d.ts +0 -26
- package/dist/src/plugin/Form/NestedSelect.d.ts +0 -73
- package/dist/src/plugin/Form/Number.d.ts +0 -19
- package/dist/src/plugin/Form/Panel.d.ts +0 -23
- package/dist/src/plugin/Form/Password.d.ts +0 -24
- package/dist/src/plugin/Form/Picker.d.ts +0 -26
- package/dist/src/plugin/Form/QRCode.d.ts +0 -19
- package/dist/src/plugin/Form/Radios.d.ts +0 -24
- package/dist/src/plugin/Form/Range.d.ts +0 -18
- package/dist/src/plugin/Form/Rating.d.ts +0 -18
- package/dist/src/plugin/Form/Repeat.d.ts +0 -18
- package/dist/src/plugin/Form/Reset.d.ts +0 -7
- package/dist/src/plugin/Form/RichText.d.ts +0 -18
- package/dist/src/plugin/Form/Select.d.ts +0 -24
- package/dist/src/plugin/Form/Service.d.ts +0 -23
- package/dist/src/plugin/Form/Static.d.ts +0 -23
- package/dist/src/plugin/Form/SubForm.d.ts +0 -62
- package/dist/src/plugin/Form/Submit.d.ts +0 -6
- package/dist/src/plugin/Form/Switch.d.ts +0 -20
- package/dist/src/plugin/Form/Table.d.ts +0 -33
- package/dist/src/plugin/Form/Tabs.d.ts +0 -16
- package/dist/src/plugin/Form/TabsTransfer.d.ts +0 -74
- package/dist/src/plugin/Form/Tag.d.ts +0 -20
- package/dist/src/plugin/Form/Text.d.ts +0 -19
- package/dist/src/plugin/Form/Textarea.d.ts +0 -20
- package/dist/src/plugin/Form/Time.d.ts +0 -18
- package/dist/src/plugin/Form/Transfer.d.ts +0 -68
- package/dist/src/plugin/Form/Tree.d.ts +0 -72
- package/dist/src/plugin/Form/TreeSelect.d.ts +0 -73
- package/dist/src/plugin/Form/UUID.d.ts +0 -23
- package/dist/src/plugin/Form/Url.d.ts +0 -24
- package/dist/src/plugin/Grid.d.ts +0 -49
- package/dist/src/plugin/HBox.d.ts +0 -44
- package/dist/src/plugin/IFrame.d.ts +0 -28
- package/dist/src/plugin/Image.d.ts +0 -19
- package/dist/src/plugin/Images.d.ts +0 -24
- package/dist/src/plugin/Json.d.ts +0 -24
- package/dist/src/plugin/Link.d.ts +0 -20
- package/dist/src/plugin/List.d.ts +0 -53
- package/dist/src/plugin/ListItem.d.ts +0 -16
- package/dist/src/plugin/Log.d.ts +0 -16
- package/dist/src/plugin/Mapping.d.ts +0 -35
- package/dist/src/plugin/Markdown.d.ts +0 -19
- package/dist/src/plugin/Name.d.ts +0 -8
- package/dist/src/plugin/Nav.d.ts +0 -161
- package/dist/src/plugin/Operation.d.ts +0 -25
- package/dist/src/plugin/Page.d.ts +0 -27
- package/dist/src/plugin/Panel.d.ts +0 -17
- package/dist/src/plugin/Plain.d.ts +0 -19
- package/dist/src/plugin/Progress.d.ts +0 -19
- package/dist/src/plugin/Property.d.ts +0 -26
- package/dist/src/plugin/QRCode.d.ts +0 -19
- package/dist/src/plugin/Reset.d.ts +0 -11
- package/dist/src/plugin/Service.d.ts +0 -24
- package/dist/src/plugin/Sparkline.d.ts +0 -28
- package/dist/src/plugin/Status.d.ts +0 -19
- package/dist/src/plugin/Steps.d.ts +0 -43
- package/dist/src/plugin/Submit.d.ts +0 -10
- package/dist/src/plugin/Switch.d.ts +0 -21
- package/dist/src/plugin/Table.d.ts +0 -19
- package/dist/src/plugin/TableCell.d.ts +0 -9
- package/dist/src/plugin/TableView.d.ts +0 -132
- package/dist/src/plugin/Tabs.d.ts +0 -43
- package/dist/src/plugin/Tasks.d.ts +0 -41
- package/dist/src/plugin/Time.d.ts +0 -13
- package/dist/src/plugin/Tpl.d.ts +0 -18
- package/dist/src/plugin/Unknown.d.ts +0 -5
- package/dist/src/plugin/Video.d.ts +0 -24
- package/dist/src/plugin/WebComponent.d.ts +0 -47
- package/dist/src/plugin/Wizard.d.ts +0 -40
- package/dist/src/plugin/Wrapper.d.ts +0 -20
- package/dist/src/plugin.d.ts +0 -560
- package/dist/src/store/editor.d.ts +0 -891
- package/dist/src/store/node.d.ts +0 -247
- package/dist/src/util.d.ts +0 -62
@@ -1,24 +0,0 @@
|
|
1
|
-
import { BasePlugin } from '../plugin';
|
2
|
-
export declare class VideoPlugin extends BasePlugin {
|
3
|
-
rendererName: string;
|
4
|
-
$schema: string;
|
5
|
-
name: string;
|
6
|
-
description: string;
|
7
|
-
tags: never[];
|
8
|
-
icon: string;
|
9
|
-
scaffold: {
|
10
|
-
type: string;
|
11
|
-
autoPlay: boolean;
|
12
|
-
src: string;
|
13
|
-
poster: string;
|
14
|
-
};
|
15
|
-
previewSchema: {
|
16
|
-
type: string;
|
17
|
-
autoPlay: boolean;
|
18
|
-
src: string;
|
19
|
-
poster: string;
|
20
|
-
};
|
21
|
-
panelTitle: string;
|
22
|
-
panelControls: any[];
|
23
|
-
filterProps(props: any): any;
|
24
|
-
}
|
@@ -1,40 +0,0 @@
|
|
1
|
-
import { SchemaObject } from '@fex/amis';
|
2
|
-
import { BaseEventContext, BasePlugin, BasicToolbarItem, VRendererConfig } from '../plugin';
|
3
|
-
export declare class WizardPlugin extends BasePlugin {
|
4
|
-
rendererName: string;
|
5
|
-
$schema: 'https://isuda.baidu.com/schemas/WizardSchema.json';
|
6
|
-
name: string;
|
7
|
-
description: string;
|
8
|
-
docLink: string;
|
9
|
-
tags: string[];
|
10
|
-
icon: string;
|
11
|
-
scaffold: SchemaObject;
|
12
|
-
previewSchema: {
|
13
|
-
type: string;
|
14
|
-
className: string;
|
15
|
-
steps: {
|
16
|
-
title: string;
|
17
|
-
controls: {
|
18
|
-
type: string;
|
19
|
-
label: string;
|
20
|
-
name: string;
|
21
|
-
}[];
|
22
|
-
}[];
|
23
|
-
};
|
24
|
-
panelTitle: string;
|
25
|
-
panelControls: any[];
|
26
|
-
/**
|
27
|
-
* 补充切换的 toolbar
|
28
|
-
* @param context
|
29
|
-
* @param toolbars
|
30
|
-
*/
|
31
|
-
buildEditorToolbar(context: BaseEventContext, toolbars: Array<BasicToolbarItem>): void;
|
32
|
-
filterProps(props: any): any;
|
33
|
-
patchContainers: string[];
|
34
|
-
vRendererConfig: VRendererConfig;
|
35
|
-
wizardWrapperResolve: (dom: HTMLElement) => any;
|
36
|
-
overrides: {
|
37
|
-
renderWizard: (this: any) => any;
|
38
|
-
renderFooter: (this: any) => any;
|
39
|
-
};
|
40
|
-
}
|
@@ -1,20 +0,0 @@
|
|
1
|
-
import { BasePlugin, RegionConfig } from '../plugin';
|
2
|
-
export declare class WrapperPlugin extends BasePlugin {
|
3
|
-
rendererName: string;
|
4
|
-
$schema: string;
|
5
|
-
name: string;
|
6
|
-
description: string;
|
7
|
-
tags: string[];
|
8
|
-
icon: string;
|
9
|
-
scaffold: {
|
10
|
-
type: string;
|
11
|
-
body: string;
|
12
|
-
};
|
13
|
-
previewSchema: {
|
14
|
-
type: string;
|
15
|
-
body: string;
|
16
|
-
};
|
17
|
-
regions: Array<RegionConfig>;
|
18
|
-
panelTitle: string;
|
19
|
-
panelControls: any[];
|
20
|
-
}
|
package/dist/npm/src/plugin.d.ts
DELETED
@@ -1,486 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @file 定义插件的 interface,以及提供一个 BasePlugin 基类,把一些通用的方法放在这。
|
3
|
-
*/
|
4
|
-
import { BaseSchema } from '@fex/amis';
|
5
|
-
import { MenuDivider, MenuItem } from '@fex/amis/lib/components/ContextMenu';
|
6
|
-
import { RendererConfig } from '@fex/amis/lib/factory';
|
7
|
-
import { RegionWrapperProps } from './component/RegionWrapper';
|
8
|
-
import { EditorManager } from './manager';
|
9
|
-
import { EditorStoreType } from './store/editor';
|
10
|
-
import { EditorNodeType } from './store/node';
|
11
|
-
import { DNDModeInterface } from './dnd/interface';
|
12
|
-
import { EditorDNDManager } from './dnd';
|
13
|
-
import React from 'react';
|
14
|
-
import { DiffChange } from './util';
|
15
|
-
/**
|
16
|
-
* 区域的定义,容器渲染器都需要定义区域信息。
|
17
|
-
*/
|
18
|
-
export interface RegionConfig {
|
19
|
-
/**
|
20
|
-
* 简单情况,如果区域直接用的 render('region', subSchema)
|
21
|
-
* 这种只需要配置 key 就能简单插入 Region 节点。
|
22
|
-
*/
|
23
|
-
key: string;
|
24
|
-
/**
|
25
|
-
* 区域用来显示的名字。
|
26
|
-
*/
|
27
|
-
label: string;
|
28
|
-
/**
|
29
|
-
* 对于复杂的控件需要用到这个配置。
|
30
|
-
* 如果配置了,则遍历 react dom 直到目标节点调换成 Region 节点
|
31
|
-
*
|
32
|
-
* 如果没有配置这个,但是又配置了 renderMethod 方法,
|
33
|
-
* 那就直接将 renderMethod 里面返回的 react dom 直接包一层 Region
|
34
|
-
*/
|
35
|
-
matchRegion?: (elem: JSX.Element | undefined | null, component: JSX.Element) => boolean;
|
36
|
-
/**
|
37
|
-
* 指定要覆盖哪个方法。
|
38
|
-
*/
|
39
|
-
renderMethod?: string;
|
40
|
-
/**
|
41
|
-
* 当配置 renderMethod 的时候会自动把 Region 插入进去。
|
42
|
-
* 默认是 outter 模式,有时候可能需要配置成 inner,
|
43
|
-
* 比如 renderMethod 为 render 的时候。
|
44
|
-
*/
|
45
|
-
insertPosition?: 'outter' | 'inner';
|
46
|
-
/**
|
47
|
-
* 是否为可选容器,如果是可选容器,不会强制自动创建成员
|
48
|
-
*/
|
49
|
-
optional?: boolean;
|
50
|
-
/**
|
51
|
-
* 有时候有些包括是需要其他条件的,所以要自己写包裹逻辑。
|
52
|
-
* 比如 panel 里面的 renderBody
|
53
|
-
*/
|
54
|
-
renderMethodOverride?: (regions: Array<RegionConfig>, insertRegion: (component: JSX.Element, dom: JSX.Element, regions: Array<RegionConfig>, info: RendererInfo, manager: EditorManager) => JSX.Element) => Function;
|
55
|
-
/**
|
56
|
-
* 偏好什么类型的组件?比如表单里面,controls 容器偏向表单项。
|
57
|
-
*/
|
58
|
-
preferTag?: string;
|
59
|
-
/**
|
60
|
-
* 用来指定用什么组件包裹,默认是 RegionWrapper
|
61
|
-
*/
|
62
|
-
wrapper?: React.ComponentType<RegionWrapperProps>;
|
63
|
-
/**
|
64
|
-
* 返回需要添加 data-region 的 dom 节点。
|
65
|
-
*/
|
66
|
-
wrapperResolve?: (dom: HTMLElement) => HTMLElement;
|
67
|
-
/**
|
68
|
-
* 当拖入到这个容器时,是否需要修改一下 ghost 结构?
|
69
|
-
*/
|
70
|
-
modifyGhost?: (ghost: HTMLElement, schema?: any) => void;
|
71
|
-
/**
|
72
|
-
* dnd 拖拽模式。比如 table 那种需要配置成 position-h
|
73
|
-
*/
|
74
|
-
dndMode?: 'default' | 'position-h' | 'position-v' | (new (dnd: EditorDNDManager) => DNDModeInterface);
|
75
|
-
/**
|
76
|
-
* 可以用来判断是否允许拖入当前节点。
|
77
|
-
*/
|
78
|
-
accept?: (json: any) => boolean;
|
79
|
-
}
|
80
|
-
export interface VRendererConfig {
|
81
|
-
/**
|
82
|
-
* 配置了这些会自动创建编辑面板。
|
83
|
-
*/
|
84
|
-
panelIcon?: string;
|
85
|
-
panelTitle?: string;
|
86
|
-
panelControls?: Array<any>;
|
87
|
-
panelDefinitions?: any;
|
88
|
-
panelControlsCreator?: (context: BaseEventContext) => Array<any>;
|
89
|
-
/**
|
90
|
-
* 配置了,要是不在 overides 里面使用也是没用的。
|
91
|
-
*/
|
92
|
-
regions?: {
|
93
|
-
[propName: string]: RegionConfig;
|
94
|
-
};
|
95
|
-
}
|
96
|
-
/**
|
97
|
-
* 渲染器信息。
|
98
|
-
*/
|
99
|
-
export interface RendererInfo {
|
100
|
-
/**
|
101
|
-
* 组件名称
|
102
|
-
*/
|
103
|
-
name: string;
|
104
|
-
/**
|
105
|
-
* json schema 协议
|
106
|
-
*/
|
107
|
-
$schema?: string;
|
108
|
-
/**
|
109
|
-
* 配置区域。
|
110
|
-
*/
|
111
|
-
regions?: Array<RegionConfig>;
|
112
|
-
/**
|
113
|
-
* 哪些容器属性需要自动转成数组的。如果不配置默认就从 regions 里面读取。
|
114
|
-
*/
|
115
|
-
patchContainers?: Array<string>;
|
116
|
-
/**
|
117
|
-
* 覆写某些方法,一般用来插入虚拟的渲染器编辑器。
|
118
|
-
*/
|
119
|
-
overrides?: {
|
120
|
-
[propName: string]: Function;
|
121
|
-
};
|
122
|
-
/**
|
123
|
-
* 虚拟渲染器的配置项,有时候需要给那些并不是渲染器的组件添加点选编辑功能。
|
124
|
-
* 比如: Tabs 下面的 Tab, 这个并不是个渲染器,但是需要可以点选修改内容。
|
125
|
-
*/
|
126
|
-
vRendererConfig?: VRendererConfig;
|
127
|
-
/**
|
128
|
-
* 默认为 BaseWrapper, 容器类的指定为 BaseContainerWrapper 或者再实现一个
|
129
|
-
* 暂时没有需要配置的所以注释掉。
|
130
|
-
* wrapper?: React.ComponentType<NodeWrapperProps>;
|
131
|
-
*
|
132
|
-
* 返回哪些 dom 节点,需要自动加上 data-editor-id 属性
|
133
|
-
* 目前只有 TableCell 里面用到了,就它需要同时给某一列下所有 td 都加上那个属性。
|
134
|
-
*/
|
135
|
-
wrapperResolve?: (dom: HTMLElement) => HTMLElement | Array<HTMLElement>;
|
136
|
-
/**
|
137
|
-
* 默认下发哪些属性,如果要动态下发,请使用 filterProps
|
138
|
-
*/
|
139
|
-
wrapperProps?: any;
|
140
|
-
/**
|
141
|
-
* 修改一些属性,一般用来干掉 $$id
|
142
|
-
* 这样它的孩子节点就不能直接点选编辑了,比如 Combo。
|
143
|
-
*/
|
144
|
-
filterProps?: (props: any, node: EditorNodeType) => any;
|
145
|
-
/**
|
146
|
-
* 有些没有视图的组件,可以自己输出点内容,否则没办法点选编辑。
|
147
|
-
*/
|
148
|
-
renderRenderer?: (props: any, info: RendererInfo) => JSX.Element;
|
149
|
-
/**
|
150
|
-
* 是否有多重身份?
|
151
|
-
* 比如 CRUD 即是 CRUD 又可能是 Table
|
152
|
-
*
|
153
|
-
* 表格的列,即是表格列,也可能是其他文本框。
|
154
|
-
*
|
155
|
-
* 配置了这个后会自动添加多个 panel 面板来编辑。
|
156
|
-
*/
|
157
|
-
multifactor?: boolean;
|
158
|
-
id: string;
|
159
|
-
plugin: PluginInterface;
|
160
|
-
renderer: RendererConfig;
|
161
|
-
schemaPath: string;
|
162
|
-
editable?: boolean;
|
163
|
-
removable?: boolean;
|
164
|
-
draggable?: boolean;
|
165
|
-
movable?: boolean;
|
166
|
-
replaceable?: boolean;
|
167
|
-
duplicatable?: boolean;
|
168
|
-
memberImmutable?: boolean | Array<string>;
|
169
|
-
typeMutable?: boolean;
|
170
|
-
hostId?: string;
|
171
|
-
memberIndex?: number;
|
172
|
-
}
|
173
|
-
export declare type BasicRendererInfo = Omit<RendererInfo, 'id' | 'plugin' | 'renderer' | 'schemaPath'>;
|
174
|
-
export interface ScaffoldForm {
|
175
|
-
title?: string;
|
176
|
-
size?: 'xs' | 'sm' | 'md' | 'lg' | 'full';
|
177
|
-
/**
|
178
|
-
* 脚手架配置项。
|
179
|
-
*/
|
180
|
-
controls: Array<any>;
|
181
|
-
/**
|
182
|
-
* 整体验证脚手架配置,如果有错误返回错误对象。
|
183
|
-
* key 是配置的字段名。
|
184
|
-
* value 是具体错误信息。
|
185
|
-
*/
|
186
|
-
validate?: (values: any) => void | {
|
187
|
-
[propName: string]: string;
|
188
|
-
} | Promise<void | {
|
189
|
-
[propName: string]: string;
|
190
|
-
}>;
|
191
|
-
/**
|
192
|
-
* schema 配置转脚手架配置
|
193
|
-
*/
|
194
|
-
pipeIn?: (value: any, prevScaffoldValue?: any) => any;
|
195
|
-
/**
|
196
|
-
* 脚手架配置转 schema 配置。
|
197
|
-
*/
|
198
|
-
pipeOut?: (value: any) => any;
|
199
|
-
/**
|
200
|
-
* 是否允许重新构建;
|
201
|
-
*/
|
202
|
-
canRebuild?: boolean;
|
203
|
-
}
|
204
|
-
/**
|
205
|
-
* 子渲染器信息
|
206
|
-
*/
|
207
|
-
export interface SubRendererInfo {
|
208
|
-
icon?: string;
|
209
|
-
name: string;
|
210
|
-
description?: string;
|
211
|
-
docLink?: string;
|
212
|
-
previewSchema?: any;
|
213
|
-
tags?: string | Array<string>;
|
214
|
-
type?: string;
|
215
|
-
scaffold?: any;
|
216
|
-
/**
|
217
|
-
* 首次拖入的时候可以用来配置个表单。
|
218
|
-
*/
|
219
|
-
scaffoldForm?: ScaffoldForm;
|
220
|
-
plugin: PluginInterface;
|
221
|
-
parent: RendererInfo;
|
222
|
-
id: string;
|
223
|
-
order: number;
|
224
|
-
}
|
225
|
-
export declare type BasicSubRenderInfo = Omit<SubRendererInfo, 'plugin' | 'parent' | 'id' | 'order'> & Partial<Pick<SubRendererInfo, 'order'>>;
|
226
|
-
/**
|
227
|
-
* 工具按钮信息。
|
228
|
-
*/
|
229
|
-
export interface ToolbarItem {
|
230
|
-
label?: string;
|
231
|
-
id?: string;
|
232
|
-
order: number;
|
233
|
-
level?: 'primary' | 'secondary' | 'special';
|
234
|
-
className?: string;
|
235
|
-
draggable?: boolean;
|
236
|
-
onDragStart?: (e: React.DragEvent) => void;
|
237
|
-
icon: string;
|
238
|
-
onClick?: (e: React.MouseEvent) => void;
|
239
|
-
tooltip?: string;
|
240
|
-
placement?: 'top' | 'bottom' | 'right' | 'left';
|
241
|
-
}
|
242
|
-
export declare type BasicToolbarItem = Partial<ToolbarItem> & Pick<ToolbarItem, 'icon'>;
|
243
|
-
export declare type ContextMenuItem = MenuItem | MenuDivider;
|
244
|
-
/**
|
245
|
-
* 面板的属性定义
|
246
|
-
*/
|
247
|
-
export interface PanelProps {
|
248
|
-
id?: string;
|
249
|
-
info?: RendererInfo;
|
250
|
-
path?: string;
|
251
|
-
value: BaseSchema;
|
252
|
-
onChange: (value: BaseSchema, diff?: Array<DiffChange>) => void;
|
253
|
-
store: EditorStoreType;
|
254
|
-
manager: EditorManager;
|
255
|
-
popOverContainer?: () => HTMLElement | void;
|
256
|
-
}
|
257
|
-
/**
|
258
|
-
* 面板信息定义
|
259
|
-
*/
|
260
|
-
export interface PanelItem {
|
261
|
-
nodeId?: string;
|
262
|
-
key: string;
|
263
|
-
icon: string;
|
264
|
-
title: string;
|
265
|
-
component?: React.ComponentType<PanelProps>;
|
266
|
-
order: number;
|
267
|
-
position?: 'left' | 'right';
|
268
|
-
render?: (props: PanelProps) => JSX.Element;
|
269
|
-
}
|
270
|
-
export declare type BasicPanelItem = Omit<PanelItem, 'order'> & Partial<Pick<PanelItem, 'order'>>;
|
271
|
-
export interface EventContext {
|
272
|
-
data?: any;
|
273
|
-
}
|
274
|
-
/**
|
275
|
-
* 事件上下文
|
276
|
-
*/
|
277
|
-
export interface BaseEventContext extends EventContext {
|
278
|
-
node: EditorNodeType;
|
279
|
-
id: string;
|
280
|
-
info: RendererInfo;
|
281
|
-
path: string;
|
282
|
-
schema: any;
|
283
|
-
schemaPath: string;
|
284
|
-
}
|
285
|
-
export interface RendererInfoResolveEventContext extends EventContext {
|
286
|
-
renderer: RendererConfig;
|
287
|
-
path: string;
|
288
|
-
schema: any;
|
289
|
-
schemaPath: string;
|
290
|
-
data?: RendererInfo;
|
291
|
-
}
|
292
|
-
export interface RendererJSONSchemaResolveEventContext extends BaseEventContext {
|
293
|
-
data: string;
|
294
|
-
}
|
295
|
-
/**
|
296
|
-
* 右键菜单事件的上下文。
|
297
|
-
*/
|
298
|
-
export interface ContextMenuEventContext extends BaseEventContext {
|
299
|
-
region: string;
|
300
|
-
data: Array<ContextMenuItem>;
|
301
|
-
}
|
302
|
-
export interface RendererEventContext extends BaseEventContext {
|
303
|
-
region?: string;
|
304
|
-
}
|
305
|
-
export interface ActiveEventContext extends Partial<BaseEventContext> {
|
306
|
-
active?: boolean;
|
307
|
-
}
|
308
|
-
/**
|
309
|
-
* 插入节点的事件上下文信息
|
310
|
-
*/
|
311
|
-
export interface InsertEventContext extends BaseEventContext {
|
312
|
-
region: string;
|
313
|
-
beforeId?: string;
|
314
|
-
index: number;
|
315
|
-
data: any;
|
316
|
-
subRenderer?: SubRendererInfo;
|
317
|
-
dragInfo?: {
|
318
|
-
id: string;
|
319
|
-
type: string;
|
320
|
-
data: any;
|
321
|
-
};
|
322
|
-
}
|
323
|
-
export interface ReplaceEventContext extends BaseEventContext {
|
324
|
-
data: any;
|
325
|
-
subRenderer?: SubRendererInfo;
|
326
|
-
region?: string;
|
327
|
-
}
|
328
|
-
export interface MoveEventContext extends BaseEventContext {
|
329
|
-
region: string;
|
330
|
-
sourceId: string;
|
331
|
-
beforeId?: string;
|
332
|
-
direction?: 'up' | 'down';
|
333
|
-
}
|
334
|
-
/**
|
335
|
-
* 更新节点的事件上下文
|
336
|
-
*/
|
337
|
-
export interface ChangeEventContext extends BaseEventContext {
|
338
|
-
value: any;
|
339
|
-
readonly diff: Array<DiffChange>;
|
340
|
-
}
|
341
|
-
export interface DragEventContext extends EventContext {
|
342
|
-
mode: 'move' | 'copy';
|
343
|
-
sourceType: 'schema' | 'subrenderer' | string;
|
344
|
-
sourceId: string;
|
345
|
-
data: any;
|
346
|
-
targetId?: string;
|
347
|
-
targetRegion?: string;
|
348
|
-
}
|
349
|
-
export interface BuildPanelEventContext extends BaseEventContext {
|
350
|
-
data: Array<BasicPanelItem>;
|
351
|
-
}
|
352
|
-
export interface PreventClickEventContext extends EventContext {
|
353
|
-
data: MouseEvent;
|
354
|
-
}
|
355
|
-
/**
|
356
|
-
* 将事件上下文转成事件对象。
|
357
|
-
*/
|
358
|
-
export declare type PluginEvent<T> = {
|
359
|
-
context: T;
|
360
|
-
type: string;
|
361
|
-
preventDefault: () => void;
|
362
|
-
stopPropagation: () => void;
|
363
|
-
setData: (data: any) => void;
|
364
|
-
prevented?: boolean;
|
365
|
-
stoped?: boolean;
|
366
|
-
data?: any;
|
367
|
-
};
|
368
|
-
export declare type PluginEventFn = (e: PluginEvent<EventContext>) => false | void;
|
369
|
-
/**
|
370
|
-
* 创建事件。
|
371
|
-
* @param type
|
372
|
-
* @param context
|
373
|
-
*/
|
374
|
-
export declare function createEvent<T extends EventContext>(type: string, context: T): PluginEvent<T>;
|
375
|
-
export interface PluginEventListener {
|
376
|
-
onActive?: (event: PluginEvent<ActiveEventContext>) => void;
|
377
|
-
/**
|
378
|
-
* 事件,当有配置项插入前调用。通过 event.preventDefault() 可以干预。
|
379
|
-
*/
|
380
|
-
beforeInsert?: (event: PluginEvent<InsertEventContext>) => false | void;
|
381
|
-
afterInsert?: (event: PluginEvent<InsertEventContext>) => void;
|
382
|
-
/**
|
383
|
-
* 面板里面编辑修改的事件。
|
384
|
-
*/
|
385
|
-
beforeUpdate?: (event: PluginEvent<ChangeEventContext>) => false | void;
|
386
|
-
afterUpdate?: (event: PluginEvent<ChangeEventContext>) => void;
|
387
|
-
/**
|
388
|
-
* 更新渲染器,或者右键粘贴配置。
|
389
|
-
*/
|
390
|
-
beforeReplace?: (event: PluginEvent<ReplaceEventContext>) => false | void;
|
391
|
-
afterReplace?: (event: PluginEvent<ReplaceEventContext>) => void;
|
392
|
-
/**
|
393
|
-
* 移动节点的时候触发,包括上移,下移
|
394
|
-
*/
|
395
|
-
beforeMove?: (event: PluginEvent<MoveEventContext>) => false | void;
|
396
|
-
aftterMove?: (event: PluginEvent<MoveEventContext>) => void;
|
397
|
-
/**
|
398
|
-
* 删除的时候触发
|
399
|
-
*/
|
400
|
-
beforeDelete?: (event: PluginEvent<BaseEventContext>) => false | void;
|
401
|
-
afterDelete?: (event: PluginEvent<BaseEventContext>) => void;
|
402
|
-
beforeResolveEditorInfo?: (event: PluginEvent<RendererInfoResolveEventContext>) => false | void;
|
403
|
-
afterResolveEditorInfo?: (event: PluginEvent<RendererInfoResolveEventContext>) => void;
|
404
|
-
beforeResolveJsonSchema?: (event: PluginEvent<RendererJSONSchemaResolveEventContext>) => false | void;
|
405
|
-
afterResolveJsonSchema?: (event: PluginEvent<RendererJSONSchemaResolveEventContext>) => void;
|
406
|
-
onDndAccept?: (event: PluginEvent<DragEventContext>) => false | void;
|
407
|
-
onBuildPanels?: (event: PluginEvent<BuildPanelEventContext>) => void;
|
408
|
-
onBuildContextMenus?: (event: PluginEvent<ContextMenuEventContext>) => void;
|
409
|
-
onPreventClick?: (event: PluginEvent<PreventClickEventContext>) => false | void;
|
410
|
-
}
|
411
|
-
/**
|
412
|
-
* 插件的 interface 定义
|
413
|
-
*/
|
414
|
-
export interface PluginInterface extends Partial<BasicRendererInfo>, Partial<BasicSubRenderInfo>, PluginEventListener {
|
415
|
-
readonly manager: EditorManager;
|
416
|
-
order?: number;
|
417
|
-
/**
|
418
|
-
* 渲染器的名字,关联后不用自己实现 getRendererInfo 了。
|
419
|
-
*/
|
420
|
-
rendererName?: string;
|
421
|
-
/**
|
422
|
-
* 默认的配置面板信息
|
423
|
-
*/
|
424
|
-
panelIcon?: string;
|
425
|
-
panelTitle?: string;
|
426
|
-
panelControls?: Array<any>;
|
427
|
-
panelDefinitions?: any;
|
428
|
-
panelControlsCreator?: (context: BaseEventContext) => Array<any>;
|
429
|
-
/**
|
430
|
-
* 返回渲染器信息。不是每个插件都需要。
|
431
|
-
*/
|
432
|
-
getRendererInfo?: (context: RendererInfoResolveEventContext) => BasicRendererInfo | void;
|
433
|
-
/**
|
434
|
-
* 生成节点的 JSON Schema 的 uri 地址。
|
435
|
-
*/
|
436
|
-
buildJSONSchema?: (context: RendererJSONSchemaResolveEventContext) => void | string;
|
437
|
-
/**
|
438
|
-
* 构建右上角功能按钮集合
|
439
|
-
*/
|
440
|
-
buildEditorToolbar?: (context: BaseEventContext, toolbars: Array<BasicToolbarItem>) => void;
|
441
|
-
/**
|
442
|
-
* 构建右键菜单项
|
443
|
-
*/
|
444
|
-
buildEditorContextMenu?: (context: ContextMenuEventContext, menus: Array<ContextMenuItem>) => void;
|
445
|
-
/**
|
446
|
-
* 构建编辑器面板。
|
447
|
-
*/
|
448
|
-
buildEditorPanel?: (context: BaseEventContext, panels: Array<BasicPanelItem>) => void;
|
449
|
-
/**
|
450
|
-
* 构建子渲染器信息集合。
|
451
|
-
*/
|
452
|
-
buildSubRenderers?: (context: RendererEventContext, renderers: Array<SubRendererInfo>) => BasicSubRenderInfo | Array<BasicSubRenderInfo> | void;
|
453
|
-
}
|
454
|
-
/**
|
455
|
-
* 基类,所有插件都继承这个好了,可以少写些逻辑。
|
456
|
-
*/
|
457
|
-
export declare abstract class BasePlugin implements PluginInterface {
|
458
|
-
readonly manager: EditorManager;
|
459
|
-
constructor(manager: EditorManager);
|
460
|
-
/**
|
461
|
-
* 如果配置里面有 rendererName 自动返回渲染器信息。
|
462
|
-
* @param renderer
|
463
|
-
*/
|
464
|
-
getRendererInfo({ renderer, schema }: RendererInfoResolveEventContext): BasicRendererInfo | void;
|
465
|
-
/**
|
466
|
-
* 配置了 panelControls 自动生成配置面板
|
467
|
-
* @param context
|
468
|
-
* @param panels
|
469
|
-
*/
|
470
|
-
buildEditorPanel(context: BaseEventContext, panels: Array<BasicPanelItem>): void;
|
471
|
-
/**
|
472
|
-
* 默认什么组件都加入的子组件里面,子类里面可以复写这个改变行为。
|
473
|
-
* @param context
|
474
|
-
* @param renderers
|
475
|
-
*/
|
476
|
-
buildSubRenderers(context: RendererEventContext, renderers: Array<SubRendererInfo>): BasicSubRenderInfo | Array<BasicSubRenderInfo> | void;
|
477
|
-
buildEditorContextMenu({ id, schema, region, info }: ContextMenuEventContext, menus: Array<ContextMenuItem>): void;
|
478
|
-
renderPlaceholder(text: string, key?: any): React.DetailedReactHTMLElement<{
|
479
|
-
key: any;
|
480
|
-
className: string;
|
481
|
-
children: React.DetailedReactHTMLElement<{
|
482
|
-
className: string;
|
483
|
-
children: string;
|
484
|
-
}, HTMLElement>;
|
485
|
-
}, HTMLElement>;
|
486
|
-
}
|