amis-editor 4.2.0-beta.0 → 5.2.0-beta.0
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/component/BaseControl.d.ts +1831 -0
- package/lib/component/BaseControl.js +366 -0
- package/{dist/component/base → lib/component}/InputComponentName.d.ts +0 -0
- package/lib/component/InputComponentName.js +44 -0
- package/{dist → lib}/component/TableViewEditor.d.ts +2 -2
- package/lib/component/TableViewEditor.js +528 -0
- package/lib/event-action/actions.d.ts +3 -0
- package/lib/event-action/actions.js +188 -0
- package/lib/event-action/schema.d.ts +13 -0
- package/lib/event-action/schema.js +134 -0
- package/{dist → lib}/index.d.ts +26 -33
- package/lib/index.js +181 -0
- package/{dist → lib}/plugin/Alert.d.ts +4 -2
- package/lib/plugin/Alert.js +113 -0
- package/lib/plugin/AnchorNav.d.ts +48 -0
- package/lib/plugin/AnchorNav.js +297 -0
- package/{dist → lib}/plugin/Audio.d.ts +1 -1
- package/lib/plugin/Audio.js +157 -0
- package/{dist → lib}/plugin/Avatar.d.ts +11 -2
- package/lib/plugin/Avatar.js +305 -0
- package/{dist → lib}/plugin/Breadcrumb.d.ts +1 -1
- package/lib/plugin/Breadcrumb.js +116 -0
- package/{dist → lib}/plugin/Button.d.ts +6 -2
- package/lib/plugin/Button.js +297 -0
- package/lib/plugin/ButtonGroup.d.ts +39 -0
- package/lib/plugin/ButtonGroup.js +139 -0
- package/{dist → lib}/plugin/ButtonToolbar.d.ts +5 -11
- package/lib/plugin/ButtonToolbar.js +89 -0
- package/{dist → lib}/plugin/CRUD.d.ts +3 -1
- package/lib/plugin/CRUD.js +1528 -0
- package/{dist → lib}/plugin/Card.d.ts +1 -1
- package/lib/plugin/Card.js +233 -0
- package/{dist → lib}/plugin/Cards.d.ts +1 -1
- package/lib/plugin/Cards.js +254 -0
- package/{dist → lib}/plugin/Carousel.d.ts +1 -1
- package/lib/plugin/Carousel.js +358 -0
- package/{dist → lib}/plugin/Chart.d.ts +3 -1
- package/lib/plugin/Chart.js +192 -0
- package/{dist → lib}/plugin/CodeView.d.ts +1 -1
- package/lib/plugin/CodeView.js +68 -0
- package/{dist → lib}/plugin/Collapse.d.ts +2 -1
- package/lib/plugin/Collapse.js +138 -0
- package/{dist → lib}/plugin/CollapseGroup.d.ts +29 -5
- package/lib/plugin/CollapseGroup.js +237 -0
- package/{dist → lib}/plugin/Container.d.ts +3 -2
- package/lib/plugin/Container.js +100 -0
- package/{dist → lib}/plugin/Custom.d.ts +1 -1
- package/lib/plugin/Custom.js +109 -0
- package/{dist → lib}/plugin/CustomRegion.d.ts +1 -1
- package/lib/plugin/CustomRegion.js +154 -0
- package/{dist → lib}/plugin/Date.d.ts +1 -1
- package/lib/plugin/Date.js +82 -0
- package/{dist → lib}/plugin/Datetime.d.ts +1 -1
- package/lib/plugin/Datetime.js +77 -0
- package/{dist → lib}/plugin/Dialog.d.ts +12 -2
- package/lib/plugin/Dialog.js +214 -0
- package/{dist → lib}/plugin/Divider.d.ts +1 -1
- package/lib/plugin/Divider.js +49 -0
- package/{dist → lib}/plugin/Drawer.d.ts +12 -2
- package/lib/plugin/Drawer.js +240 -0
- package/{dist → lib}/plugin/DropDownButton.d.ts +12 -11
- package/lib/plugin/DropDownButton.js +229 -0
- package/{dist → lib}/plugin/Each.d.ts +1 -1
- package/lib/plugin/Each.js +131 -0
- package/{dist → lib}/plugin/Flex.d.ts +1 -1
- package/lib/plugin/Flex.js +203 -0
- package/{dist → lib}/plugin/Form/ButtonGroupSelect.d.ts +7 -2
- package/lib/plugin/Form/ButtonGroupSelect.js +161 -0
- package/{dist → lib}/plugin/Form/ButtonToolbar.d.ts +8 -7
- package/lib/plugin/Form/ButtonToolbar.js +107 -0
- package/{dist → lib}/plugin/Form/ChainedSelect.d.ts +8 -2
- package/lib/plugin/Form/ChainedSelect.js +183 -0
- package/{dist → lib}/plugin/Form/Checkbox.d.ts +7 -2
- package/lib/plugin/Form/Checkbox.js +174 -0
- package/{dist → lib}/plugin/Form/Checkboxes.d.ts +8 -2
- package/lib/plugin/Form/Checkboxes.js +213 -0
- package/lib/plugin/Form/CodeEditor.d.ts +25 -0
- package/lib/plugin/Form/CodeEditor.js +201 -0
- package/{dist → lib}/plugin/Form/Combo.d.ts +4 -1
- package/lib/plugin/Form/Combo.js +546 -0
- package/{dist → lib}/plugin/Form/ConditionBuilder.d.ts +1 -1
- package/lib/plugin/Form/ConditionBuilder.js +302 -0
- package/{dist → lib}/plugin/Form/Control.d.ts +6 -2
- package/lib/plugin/Form/Control.js +88 -0
- package/{dist → lib}/plugin/Form/DiffEditor.d.ts +8 -2
- package/lib/plugin/Form/DiffEditor.js +204 -0
- package/{dist → lib}/plugin/Form/FieldSet.d.ts +1 -1
- package/lib/plugin/Form/FieldSet.js +152 -0
- package/{dist → lib}/plugin/Form/Form.d.ts +7 -1
- package/lib/plugin/Form/Form.js +846 -0
- package/{dist → lib}/plugin/Form/Formula.d.ts +2 -26
- package/lib/plugin/Form/Formula.js +82 -0
- package/{dist → lib}/plugin/Form/Group.d.ts +1 -1
- package/lib/plugin/Form/Group.js +252 -0
- package/{dist → lib}/plugin/Form/Hidden.d.ts +1 -1
- package/lib/plugin/Form/Hidden.js +58 -0
- package/{dist → lib}/plugin/Form/InputArray.d.ts +1 -1
- package/lib/plugin/Form/InputArray.js +181 -0
- package/{dist → lib}/plugin/Form/InputCity.d.ts +6 -2
- package/lib/plugin/Form/InputCity.js +139 -0
- package/{dist → lib}/plugin/Form/InputColor.d.ts +20 -18
- package/lib/plugin/Form/InputColor.js +295 -0
- package/lib/plugin/Form/InputDate.d.ts +26 -0
- package/lib/plugin/Form/InputDate.js +357 -0
- package/lib/plugin/Form/InputDateRange.d.ts +26 -0
- package/lib/plugin/Form/InputDateRange.js +350 -0
- package/{dist → lib}/plugin/Form/InputDateTime.d.ts +4 -4
- package/lib/plugin/Form/InputDateTime.js +50 -0
- package/lib/plugin/Form/InputDateTimeRange.d.ts +20 -0
- package/lib/plugin/Form/InputDateTimeRange.js +51 -0
- package/{dist → lib}/plugin/Form/InputEmail.d.ts +1 -0
- package/lib/plugin/Form/InputEmail.js +45 -0
- package/lib/plugin/Form/InputExcel.d.ts +23 -0
- package/lib/plugin/Form/InputExcel.js +121 -0
- package/{dist → lib}/plugin/Form/InputFile.d.ts +7 -3
- package/lib/plugin/Form/InputFile.js +354 -0
- package/{dist → lib}/plugin/Form/InputGroup.d.ts +1 -1
- package/lib/plugin/Form/InputGroup.js +100 -0
- package/{dist → lib}/plugin/Form/InputImage.d.ts +6 -2
- package/lib/plugin/Form/InputImage.js +271 -0
- package/{dist → lib}/plugin/Form/InputKV.d.ts +7 -1
- package/lib/plugin/Form/InputKV.js +129 -0
- package/{dist → lib}/plugin/Form/InputMonth.d.ts +1 -0
- package/lib/plugin/Form/InputMonth.js +48 -0
- package/{dist → lib}/plugin/Form/InputMonthRange.d.ts +4 -4
- package/lib/plugin/Form/InputMonthRange.js +51 -0
- package/{dist → lib}/plugin/Form/InputNumber.d.ts +7 -2
- package/lib/plugin/Form/InputNumber.js +263 -0
- package/{dist → lib}/plugin/Form/InputPassword.d.ts +1 -0
- package/lib/plugin/Form/InputPassword.js +45 -0
- package/{dist → lib}/plugin/Form/InputQuarter.d.ts +1 -0
- package/lib/plugin/Form/InputQuarter.js +48 -0
- package/{dist → lib}/plugin/Form/InputQuarterRange.d.ts +4 -4
- package/lib/plugin/Form/InputQuarterRange.js +51 -0
- package/{dist → lib}/plugin/Form/InputRange.d.ts +7 -2
- package/lib/plugin/Form/InputRange.js +292 -0
- package/lib/plugin/Form/InputRating.d.ts +25 -0
- package/lib/plugin/Form/InputRating.js +357 -0
- package/{dist → lib}/plugin/Form/InputRepeat.d.ts +1 -1
- package/lib/plugin/Form/InputRepeat.js +65 -0
- package/{dist → lib}/plugin/Form/InputRichText.d.ts +1 -1
- package/lib/plugin/Form/InputRichText.js +193 -0
- package/{dist → lib}/plugin/Form/InputSubForm.d.ts +1 -1
- package/lib/plugin/Form/InputSubForm.js +160 -0
- package/{dist → lib}/plugin/Form/InputTable.d.ts +1 -1
- package/lib/plugin/Form/InputTable.js +400 -0
- package/{dist → lib}/plugin/Form/InputTag.d.ts +6 -2
- package/lib/plugin/Form/InputTag.js +155 -0
- package/lib/plugin/Form/InputText.d.ts +42 -0
- package/lib/plugin/Form/InputText.js +328 -0
- package/{dist → lib}/plugin/Form/InputTime.d.ts +3 -3
- package/lib/plugin/Form/InputTime.js +48 -0
- package/{dist/plugin/Form/InputDateTimeRange.d.ts → lib/plugin/Form/InputTimeRange.d.ts} +4 -4
- package/lib/plugin/Form/InputTimeRange.js +51 -0
- package/{dist → lib}/plugin/Form/InputTree.d.ts +6 -2
- package/lib/plugin/Form/InputTree.js +375 -0
- package/{dist → lib}/plugin/Form/InputURL.d.ts +1 -0
- package/lib/plugin/Form/InputURL.js +46 -0
- package/{dist → lib}/plugin/Form/InputYear.d.ts +1 -0
- package/lib/plugin/Form/InputYear.js +48 -0
- package/{dist/plugin/Form/InputDate.d.ts → lib/plugin/Form/InputYearRange.d.ts} +4 -4
- package/lib/plugin/Form/InputYearRange.js +51 -0
- package/{dist → lib}/plugin/Form/Item.d.ts +2 -2
- package/lib/plugin/Form/Item.js +265 -0
- package/{dist → lib}/plugin/Form/ListSelect.d.ts +6 -2
- package/lib/plugin/Form/ListSelect.js +130 -0
- package/{dist/plugin/Form/InputDateRange.d.ts → lib/plugin/Form/LocationPicker.d.ts} +5 -6
- package/lib/plugin/Form/LocationPicker.js +74 -0
- package/{dist → lib}/plugin/Form/MatrixCheckboxes.d.ts +7 -2
- package/lib/plugin/Form/MatrixCheckboxes.js +234 -0
- package/{dist → lib}/plugin/Form/NestedSelect.d.ts +8 -2
- package/lib/plugin/Form/NestedSelect.js +328 -0
- package/{dist → lib}/plugin/Form/Picker.d.ts +1 -1
- package/lib/plugin/Form/Picker.js +169 -0
- package/{dist → lib}/plugin/Form/Radios.d.ts +7 -2
- package/lib/plugin/Form/Radios.js +189 -0
- package/{dist → lib}/plugin/Form/Select.d.ts +7 -2
- package/lib/plugin/Form/Select.js +304 -0
- package/{dist → lib}/plugin/Form/Static.d.ts +4 -3
- package/lib/plugin/Form/Static.js +312 -0
- package/{dist → lib}/plugin/Form/Switch.d.ts +7 -2
- package/lib/plugin/Form/Switch.js +219 -0
- package/{dist → lib}/plugin/Form/TabsTransfer.d.ts +5 -2
- package/lib/plugin/Form/TabsTransfer.js +348 -0
- package/{dist → lib}/plugin/Form/Textarea.d.ts +8 -2
- package/lib/plugin/Form/Textarea.js +190 -0
- package/{dist → lib}/plugin/Form/Transfer.d.ts +5 -2
- package/lib/plugin/Form/Transfer.js +414 -0
- package/{dist → lib}/plugin/Form/TreeSelect.d.ts +6 -2
- package/lib/plugin/Form/TreeSelect.js +375 -0
- package/{dist → lib}/plugin/Form/UUID.d.ts +1 -1
- package/lib/plugin/Form/UUID.js +55 -0
- package/{dist → lib}/plugin/Grid.d.ts +2 -2
- package/lib/plugin/Grid.js +680 -0
- package/{dist → lib}/plugin/HBox.d.ts +2 -2
- package/lib/plugin/HBox.js +594 -0
- package/{dist → lib}/plugin/IFrame.d.ts +3 -2
- package/lib/plugin/IFrame.js +94 -0
- package/{dist → lib}/plugin/Image.d.ts +1 -1
- package/lib/plugin/Image.js +264 -0
- package/{dist → lib}/plugin/Images.d.ts +1 -1
- package/lib/plugin/Images.js +214 -0
- package/{dist → lib}/plugin/Json.d.ts +1 -1
- package/lib/plugin/Json.js +82 -0
- package/{dist → lib}/plugin/Link.d.ts +2 -1
- package/lib/plugin/Link.js +120 -0
- package/{dist → lib}/plugin/List.d.ts +1 -1
- package/lib/plugin/List.js +220 -0
- package/{dist → lib}/plugin/ListItem.d.ts +1 -1
- package/lib/plugin/ListItem.js +195 -0
- package/{dist → lib}/plugin/Log.d.ts +1 -1
- package/lib/plugin/Log.js +62 -0
- package/{dist → lib}/plugin/Mapping.d.ts +1 -1
- package/lib/plugin/Mapping.js +149 -0
- package/{dist → lib}/plugin/Markdown.d.ts +1 -1
- package/lib/plugin/Markdown.js +58 -0
- package/lib/plugin/Nav.d.ts +48 -0
- package/lib/plugin/Nav.js +181 -0
- package/{dist → lib}/plugin/Operation.d.ts +1 -1
- package/lib/plugin/Operation.js +84 -0
- package/{dist → lib}/plugin/Others/Action.d.ts +6 -2
- package/lib/plugin/Others/Action.js +350 -0
- package/{dist → lib}/plugin/Others/TableCell.d.ts +1 -1
- package/lib/plugin/Others/TableCell.js +393 -0
- package/{dist → lib}/plugin/Page.d.ts +6 -3
- package/lib/plugin/Page.js +363 -0
- package/lib/plugin/Pagination.d.ts +51 -0
- package/lib/plugin/Pagination.js +247 -0
- package/{dist → lib}/plugin/Panel.d.ts +1 -1
- package/lib/plugin/Panel.js +222 -0
- package/{dist → lib}/plugin/Plain.d.ts +1 -1
- package/lib/plugin/Plain.js +88 -0
- package/{dist → lib}/plugin/Progress.d.ts +6 -2
- package/lib/plugin/Progress.js +258 -0
- package/{dist → lib}/plugin/Property.d.ts +1 -1
- package/lib/plugin/Property.js +147 -0
- package/{dist → lib}/plugin/QRCode.d.ts +1 -1
- package/lib/plugin/QRCode.js +107 -0
- package/{dist → lib}/plugin/Reset.d.ts +0 -0
- package/lib/plugin/Reset.js +38 -0
- package/{dist → lib}/plugin/Service.d.ts +4 -1
- package/lib/plugin/Service.js +217 -0
- package/{dist → lib}/plugin/Sparkline.d.ts +1 -1
- package/lib/plugin/Sparkline.js +50 -0
- package/{dist → lib}/plugin/Status.d.ts +1 -1
- package/lib/plugin/Status.js +86 -0
- package/{dist → lib}/plugin/Steps.d.ts +1 -1
- package/lib/plugin/Steps.js +136 -0
- package/{dist → lib}/plugin/Submit.d.ts +0 -0
- package/lib/plugin/Submit.js +38 -0
- package/{dist → lib}/plugin/Table.d.ts +6 -1
- package/lib/plugin/Table.js +594 -0
- package/{dist → lib}/plugin/TableView.d.ts +1 -1
- package/lib/plugin/TableView.js +744 -0
- package/{dist → lib}/plugin/Tabs.d.ts +33 -2
- package/lib/plugin/Tabs.js +429 -0
- package/{dist → lib}/plugin/Tasks.d.ts +1 -1
- package/lib/plugin/Tasks.js +263 -0
- package/{dist → lib}/plugin/Time.d.ts +1 -1
- package/lib/plugin/Time.js +77 -0
- package/{dist → lib}/plugin/TooltipWrapper.d.ts +11 -1
- package/lib/plugin/TooltipWrapper.js +281 -0
- package/{dist → lib}/plugin/Tpl.d.ts +3 -2
- package/lib/plugin/Tpl.js +183 -0
- package/{dist → lib}/plugin/Video.d.ts +1 -1
- package/lib/plugin/Video.js +140 -0
- package/{dist → lib}/plugin/WebComponent.d.ts +1 -1
- package/lib/plugin/WebComponent.js +70 -0
- package/{dist → lib}/plugin/Wizard.d.ts +5 -2
- package/lib/plugin/Wizard.js +799 -0
- package/{dist → lib}/plugin/Wrapper.d.ts +1 -1
- package/lib/plugin/Wrapper.js +136 -0
- package/lib/renderer/APIControl.d.ts +7526 -0
- package/lib/renderer/APIControl.js +791 -0
- package/lib/renderer/BadgeControl.d.ts +133 -0
- package/lib/renderer/BadgeControl.js +290 -0
- package/lib/renderer/DataBindingControl.d.ts +14 -0
- package/lib/renderer/DataBindingControl.js +91 -0
- package/lib/renderer/DataMappingControl.d.ts +11 -0
- package/lib/renderer/DataMappingControl.js +73 -0
- package/lib/renderer/DataPickerControl.d.ts +13 -0
- package/lib/renderer/DataPickerControl.js +83 -0
- package/lib/renderer/DateShortCutControl.d.ts +83 -0
- package/lib/renderer/DateShortCutControl.js +254 -0
- package/lib/renderer/FormulaControl.d.ts +96 -0
- package/lib/renderer/FormulaControl.js +324 -0
- package/{dist/component/Control → lib/renderer}/OptionControl.d.ts +23 -34
- package/lib/renderer/OptionControl.js +672 -0
- package/{dist/component/Control → lib/renderer}/PopoverEdit.d.ts +0 -0
- package/lib/renderer/RangePartsControl.d.ts +91 -0
- package/lib/renderer/RangePartsControl.js +392 -0
- package/lib/renderer/StatusControl.d.ts +39 -0
- package/lib/renderer/StatusControl.js +171 -0
- package/lib/renderer/SwitchMoreControl.d.ts +222 -0
- package/lib/renderer/SwitchMoreControl.js +302 -0
- package/lib/renderer/ValidationControl.d.ts +65 -0
- package/lib/renderer/ValidationControl.js +279 -0
- package/lib/renderer/ValidationItem.d.ts +46 -0
- package/lib/renderer/ValidationItem.js +147 -0
- package/lib/renderer/style-control/Background.d.ts +17 -0
- package/lib/renderer/style-control/Background.js +493 -0
- package/lib/renderer/style-control/Border.d.ts +18 -0
- package/lib/renderer/style-control/Border.js +191 -0
- package/lib/renderer/style-control/BoxModel.d.ts +17 -0
- package/lib/renderer/style-control/BoxModel.js +73 -0
- package/lib/renderer/style-control/BoxShadow.d.ts +18 -0
- package/lib/renderer/style-control/BoxShadow.js +125 -0
- package/lib/renderer/style-control/Display.d.ts +14 -0
- package/lib/renderer/style-control/Display.js +233 -0
- package/lib/renderer/style-control/Font.d.ts +16 -0
- package/lib/renderer/style-control/Font.js +239 -0
- package/lib/renderer/style-control/font-family.d.ts +11 -0
- package/lib/renderer/style-control/font-family.js +149 -0
- package/lib/renderer/style-control/transformation.d.ts +29 -0
- package/lib/renderer/style-control/transformation.js +84 -0
- package/lib/renderer/style-control/types.d.ts +8 -0
- package/lib/tpl/api.d.ts +1 -0
- package/lib/tpl/api.js +378 -0
- package/lib/tpl/common.d.ts +1 -0
- package/lib/tpl/common.js +808 -0
- package/lib/tpl/horizontal.d.ts +1 -0
- package/lib/tpl/horizontal.js +260 -0
- package/lib/tpl/index.d.ts +7 -0
- package/lib/tpl/options.d.ts +1 -0
- package/lib/tpl/options.js +265 -0
- package/{dist/component/schemaTpl.d.ts → lib/tpl/style.d.ts} +0 -4
- package/lib/tpl/style.js +372 -0
- package/lib/tpl/validations.d.ts +1 -0
- package/lib/tpl/validations.js +568 -0
- package/lib/util.d.ts +23 -0
- package/lib/util.js +64 -0
- package/lib/validator.d.ts +62 -0
- package/lib/validator.js +417 -0
- package/package.json +36 -32
- package/dist/cebfe0bc5a1dbde02da1.svg +0 -10
- package/dist/compat.d.ts +0 -30
- package/dist/component/Breadcrumb.d.ts +0 -33
- package/dist/component/ClassNameControl.d.ts +0 -31
- package/dist/component/CommonConfigWrapper.d.ts +0 -6
- package/dist/component/ContainerWrapper.d.ts +0 -12
- package/dist/component/Control/APIControl.d.ts +0 -504
- package/dist/component/Control/ValidationControl.d.ts +0 -30
- package/dist/component/Editor.d.ts +0 -81
- package/dist/component/HighlightBox.d.ts +0 -29
- package/dist/component/IFrameBridge.d.ts +0 -32
- package/dist/component/IFramePreview.d.ts +0 -38
- package/dist/component/MiniEditor.d.ts +0 -9
- package/dist/component/NodeWrapper.d.ts +0 -20
- package/dist/component/Panel/AMisCodeEditor.d.ts +0 -37
- package/dist/component/Panel/AvailableRenderersPanel.d.ts +0 -10
- package/dist/component/Panel/CodeEditorPanel.d.ts +0 -6
- package/dist/component/Panel/ContextMenuPanel.d.ts +0 -8
- package/dist/component/Panel/DrawerPanel.d.ts +0 -15
- package/dist/component/Panel/DrawerRendererPanel.d.ts +0 -15
- package/dist/component/Panel/InsertSubRendererPanel.d.ts +0 -11
- package/dist/component/Panel/LeftPanels.d.ts +0 -20
- package/dist/component/Panel/Outline.d.ts +0 -18
- package/dist/component/Panel/RenderersPanel.d.ts +0 -31
- package/dist/component/Panel/RightPanels.d.ts +0 -21
- package/dist/component/Panel/TargetNamePanel.d.ts +0 -7
- package/dist/component/PopOverForm.d.ts +0 -22
- package/dist/component/Preview.d.ts +0 -67
- package/dist/component/RegionHLBox.d.ts +0 -20
- package/dist/component/RegionWrapper.d.ts +0 -196
- package/dist/component/RendererThumb.d.ts +0 -22
- package/dist/component/ScaffoldModal.d.ts +0 -24
- package/dist/component/SubEditor.d.ts +0 -67
- package/dist/component/VRenderer.d.ts +0 -181
- package/dist/component/base/BackTop.d.ts +0 -26
- package/dist/component/base/ErrorRenderer.d.ts +0 -4
- package/dist/component/base/SearchCustomRendererPanel.d.ts +0 -15
- package/dist/component/base/SearchPanel.d.ts +0 -83
- package/dist/component/base/SearchRendererPanel.d.ts +0 -19
- package/dist/component/base/WidthDraggableBtn.d.ts +0 -16
- package/dist/component/base/WidthDraggableContainer.d.ts +0 -2
- package/dist/component/remarkTpl.d.ts +0 -150
- package/dist/dnd/default.d.ts +0 -47
- package/dist/dnd/index.d.ts +0 -119
- package/dist/dnd/interface.d.ts +0 -14
- package/dist/dnd/position-h.d.ts +0 -7
- package/dist/env.d.ts +0 -5
- package/dist/exports.d.ts +0 -8
- package/dist/exports.min.js +0 -1
- package/dist/icons/index.d.ts +0 -2
- package/dist/index.min.js +0 -1
- package/dist/manager.d.ts +0 -457
- package/dist/mocker.d.ts +0 -1
- package/dist/plugin/AnchorNav.d.ts +0 -67
- package/dist/plugin/ButtonGroup.d.ts +0 -60
- package/dist/plugin/ErrorRenderer.d.ts +0 -7
- package/dist/plugin/Form/CodeEditor.d.ts +0 -40
- package/dist/plugin/Form/InputExcel.d.ts +0 -58
- package/dist/plugin/Form/InputRating.d.ts +0 -19
- package/dist/plugin/Form/InputText.d.ts +0 -20
- package/dist/plugin/Form/LocationPicker.d.ts +0 -48
- package/dist/plugin/Nav.d.ts +0 -163
- package/dist/plugin/Others/BasicToolbar.d.ts +0 -11
- package/dist/plugin/Others/DataDebug.d.ts +0 -19
- package/dist/plugin/Others/Unknown.d.ts +0 -5
- package/dist/plugin/Panel/AvailableRenderers.d.ts +0 -8
- package/dist/plugin/Panel/Code.d.ts +0 -9
- package/dist/plugin/Panel/Name.d.ts +0 -8
- package/dist/plugin/Panel/Outline.d.ts +0 -8
- package/dist/plugin.d.ts +0 -601
- package/dist/store/editor.d.ts +0 -1021
- package/dist/store/node.d.ts +0 -265
- package/dist/style.css +0 -1
- package/dist/util.d.ts +0 -72
- package/src/component/schemaTpl.tsx +0 -2157
- package/src/plugin/Alert.tsx +0 -87
- package/src/plugin/AnchorNav.tsx +0 -233
- package/src/plugin/Audio.tsx +0 -154
- package/src/plugin/Avatar.tsx +0 -77
- package/src/plugin/Breadcrumb.tsx +0 -107
- package/src/plugin/Button.tsx +0 -281
- package/src/plugin/ButtonGroup.tsx +0 -85
- package/src/plugin/ButtonToolbar.tsx +0 -87
- package/src/plugin/CRUD.tsx +0 -1835
- package/src/plugin/Card.tsx +0 -290
- package/src/plugin/Cards.tsx +0 -318
- package/src/plugin/Carousel.tsx +0 -377
- package/src/plugin/Chart.tsx +0 -218
- package/src/plugin/CodeView.tsx +0 -60
- package/src/plugin/Collapse.tsx +0 -136
- package/src/plugin/CollapseGroup.tsx +0 -167
- package/src/plugin/Container.tsx +0 -40
- package/src/plugin/Custom.tsx +0 -128
- package/src/plugin/CustomRegion.tsx +0 -156
- package/src/plugin/Date.tsx +0 -74
- package/src/plugin/Datetime.tsx +0 -68
- package/src/plugin/Dialog.tsx +0 -176
- package/src/plugin/Divider.tsx +0 -36
- package/src/plugin/Drawer.tsx +0 -214
- package/src/plugin/DropDownButton.tsx +0 -235
- package/src/plugin/Each.tsx +0 -150
- package/src/plugin/ErrorRenderer.tsx +0 -15
- package/src/plugin/Flex.tsx +0 -151
- package/src/plugin/Form/ButtonGroupSelect.tsx +0 -75
- package/src/plugin/Form/ButtonToolbar.tsx +0 -110
- package/src/plugin/Form/ChainedSelect.tsx +0 -70
- package/src/plugin/Form/Checkbox.tsx +0 -87
- package/src/plugin/Form/Checkboxes.tsx +0 -167
- package/src/plugin/Form/CodeEditor.tsx +0 -81
- package/src/plugin/Form/Combo.tsx +0 -582
- package/src/plugin/Form/ConditionBuilder.tsx +0 -315
- package/src/plugin/Form/Control.tsx +0 -139
- package/src/plugin/Form/DiffEditor.tsx +0 -111
- package/src/plugin/Form/FieldSet.tsx +0 -163
- package/src/plugin/Form/Form.tsx +0 -687
- package/src/plugin/Form/Formula.tsx +0 -79
- package/src/plugin/Form/Group.tsx +0 -295
- package/src/plugin/Form/Hidden.tsx +0 -44
- package/src/plugin/Form/InputArray.tsx +0 -228
- package/src/plugin/Form/InputCity.tsx +0 -93
- package/src/plugin/Form/InputColor.tsx +0 -123
- package/src/plugin/Form/InputDate.tsx +0 -175
- package/src/plugin/Form/InputDateRange.tsx +0 -225
- package/src/plugin/Form/InputDateTime.tsx +0 -183
- package/src/plugin/Form/InputDateTimeRange.tsx +0 -221
- package/src/plugin/Form/InputEmail.tsx +0 -33
- package/src/plugin/Form/InputExcel.tsx +0 -85
- package/src/plugin/Form/InputFile.tsx +0 -221
- package/src/plugin/Form/InputGroup.tsx +0 -96
- package/src/plugin/Form/InputImage.tsx +0 -266
- package/src/plugin/Form/InputKV.tsx +0 -72
- package/src/plugin/Form/InputMonth.tsx +0 -35
- package/src/plugin/Form/InputMonthRange.tsx +0 -195
- package/src/plugin/Form/InputNumber.tsx +0 -89
- package/src/plugin/Form/InputPassword.tsx +0 -33
- package/src/plugin/Form/InputQuarter.tsx +0 -35
- package/src/plugin/Form/InputQuarterRange.tsx +0 -195
- package/src/plugin/Form/InputRange.tsx +0 -121
- package/src/plugin/Form/InputRating.tsx +0 -78
- package/src/plugin/Form/InputRepeat.tsx +0 -57
- package/src/plugin/Form/InputRichText.tsx +0 -186
- package/src/plugin/Form/InputSubForm.tsx +0 -189
- package/src/plugin/Form/InputTable.tsx +0 -434
- package/src/plugin/Form/InputTag.tsx +0 -70
- package/src/plugin/Form/InputText.tsx +0 -186
- package/src/plugin/Form/InputTime.tsx +0 -85
- package/src/plugin/Form/InputTree.tsx +0 -229
- package/src/plugin/Form/InputURL.tsx +0 -34
- package/src/plugin/Form/InputYear.tsx +0 -35
- package/src/plugin/Form/Item.tsx +0 -327
- package/src/plugin/Form/ListSelect.tsx +0 -73
- package/src/plugin/Form/LocationPicker.tsx +0 -62
- package/src/plugin/Form/MatrixCheckboxes.tsx +0 -136
- package/src/plugin/Form/NestedSelect.tsx +0 -211
- package/src/plugin/Form/Picker.tsx +0 -209
- package/src/plugin/Form/Radios.tsx +0 -119
- package/src/plugin/Form/Select.tsx +0 -233
- package/src/plugin/Form/Static.tsx +0 -322
- package/src/plugin/Form/Switch.tsx +0 -107
- package/src/plugin/Form/TabsTransfer.tsx +0 -259
- package/src/plugin/Form/Textarea.tsx +0 -83
- package/src/plugin/Form/Transfer.tsx +0 -368
- package/src/plugin/Form/TreeSelect.tsx +0 -263
- package/src/plugin/Form/UUID.tsx +0 -48
- package/src/plugin/Grid.tsx +0 -798
- package/src/plugin/HBox.tsx +0 -727
- package/src/plugin/IFrame.tsx +0 -70
- package/src/plugin/Image.tsx +0 -314
- package/src/plugin/Images.tsx +0 -231
- package/src/plugin/Json.tsx +0 -69
- package/src/plugin/Link.tsx +0 -93
- package/src/plugin/List.tsx +0 -278
- package/src/plugin/ListItem.tsx +0 -229
- package/src/plugin/Log.tsx +0 -52
- package/src/plugin/Mapping.tsx +0 -149
- package/src/plugin/Markdown.tsx +0 -47
- package/src/plugin/Nav.tsx +0 -184
- package/src/plugin/Operation.tsx +0 -95
- package/src/plugin/Others/Action.tsx +0 -426
- package/src/plugin/Others/BasicToolbar.tsx +0 -585
- package/src/plugin/Others/DataDebug.tsx +0 -134
- package/src/plugin/Others/TableCell.tsx +0 -480
- package/src/plugin/Others/Unknown.tsx +0 -37
- package/src/plugin/Page.tsx +0 -306
- package/src/plugin/Panel/AvailableRenderers.tsx +0 -41
- package/src/plugin/Panel/Code.tsx +0 -44
- package/src/plugin/Panel/Name.tsx +0 -26
- package/src/plugin/Panel/Outline.tsx +0 -40
- package/src/plugin/Panel.tsx +0 -243
- package/src/plugin/Plain.tsx +0 -84
- package/src/plugin/Progress.tsx +0 -125
- package/src/plugin/Property.tsx +0 -139
- package/src/plugin/QRCode.tsx +0 -96
- package/src/plugin/Reset.tsx +0 -23
- package/src/plugin/Service.tsx +0 -162
- package/src/plugin/Sparkline.tsx +0 -40
- package/src/plugin/Status.tsx +0 -76
- package/src/plugin/Steps.tsx +0 -128
- package/src/plugin/Submit.tsx +0 -23
- package/src/plugin/Table.tsx +0 -428
- package/src/plugin/TableView.tsx +0 -709
- package/src/plugin/Tabs.tsx +0 -362
- package/src/plugin/Tasks.tsx +0 -274
- package/src/plugin/Time.tsx +0 -68
- package/src/plugin/TooltipWrapper.tsx +0 -193
- package/src/plugin/Tpl.tsx +0 -158
- package/src/plugin/Video.tsx +0 -158
- package/src/plugin/WebComponent.tsx +0 -53
- package/src/plugin/Wizard.tsx +0 -740
- package/src/plugin/Wrapper.tsx +0 -107
- package/src/plugin.ts +0 -1050
- 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/static/side_hide_left.svg +0 -10
package/dist/dnd/index.d.ts
DELETED
@@ -1,119 +0,0 @@
|
|
1
|
-
import { EditorManager } from '../manager';
|
2
|
-
import { EditorStoreType } from '../store/editor';
|
3
|
-
import { EditorNodeType } from '../store/node';
|
4
|
-
import { DNDModeInterface } from './interface';
|
5
|
-
export declare class EditorDNDManager {
|
6
|
-
readonly manager: EditorManager;
|
7
|
-
readonly store: EditorStoreType;
|
8
|
-
toDispose: Array<() => void>;
|
9
|
-
/**
|
10
|
-
* 这个会随着 region 的切换,每次动态创建。
|
11
|
-
*/
|
12
|
-
dndMode?: DNDModeInterface;
|
13
|
-
/**
|
14
|
-
* 拖拽对象 dom。
|
15
|
-
*/
|
16
|
-
readonly dragGhost: HTMLElement;
|
17
|
-
/**
|
18
|
-
* 统计dragEnter 的次数,因为这个方法会调用很多次,
|
19
|
-
* 有时候只想第一次进来的时候处理逻辑
|
20
|
-
*/
|
21
|
-
dragEnterCount: number;
|
22
|
-
/**
|
23
|
-
* 当前被拖动的渲染器元素。注意这里不一定是 e.target。
|
24
|
-
*/
|
25
|
-
dragElement?: HTMLElement;
|
26
|
-
/**
|
27
|
-
* 拖拽跟随元素
|
28
|
-
*/
|
29
|
-
dragImage?: HTMLElement;
|
30
|
-
/**
|
31
|
-
* 记录上次鼠标位置信息,协助拖拽计算的。
|
32
|
-
*/
|
33
|
-
lastX: number;
|
34
|
-
lastY: number;
|
35
|
-
lastMoveAt: number;
|
36
|
-
constructor(manager: EditorManager, store: EditorStoreType);
|
37
|
-
/**
|
38
|
-
* 创建拖拽跟随元素,如果用默认太大了,而且有时候不统一。
|
39
|
-
* @param id
|
40
|
-
* @param node
|
41
|
-
*/
|
42
|
-
createDragImage(id: string, node: EditorNodeType): HTMLDivElement;
|
43
|
-
/**
|
44
|
-
* 销毁拖拽跟随元素
|
45
|
-
*/
|
46
|
-
disposeDragImage(): void;
|
47
|
-
/**
|
48
|
-
* 切换到目标区域。
|
49
|
-
* @param e
|
50
|
-
* @param id
|
51
|
-
* @param region
|
52
|
-
*/
|
53
|
-
switchToRegion(e: DragEvent, id: string, region: string): boolean;
|
54
|
-
/**
|
55
|
-
* 根据区域的配置,创建拖拽模式实例。
|
56
|
-
* 比如 table 列区域的拖拽就是放根线表示拖入的位置。
|
57
|
-
* @param region
|
58
|
-
*/
|
59
|
-
makeDNDModeInstance(region: EditorNodeType): void;
|
60
|
-
/**
|
61
|
-
* 拖拽入口,一个是拖拽按钮 toolbar,一个是 outline 里面的导航项
|
62
|
-
* @param id
|
63
|
-
* @param e
|
64
|
-
*/
|
65
|
-
startDrag(id: string, e: DragEvent): void;
|
66
|
-
/**
|
67
|
-
* 有东西拖进来了。目前只支持内部面边里面的可用组件,后续还会支持其他类型。
|
68
|
-
* @param e
|
69
|
-
*/
|
70
|
-
dragEnter(e: DragEvent): void;
|
71
|
-
/**
|
72
|
-
* 拖入后的每一次移动,除了切换区域的逻辑外都丢给 DNDMode 那个去处理了。
|
73
|
-
* @param e
|
74
|
-
*/
|
75
|
-
dragOver(e: DragEvent): void;
|
76
|
-
/**
|
77
|
-
* 拖拽释放的逻辑。
|
78
|
-
* @param e
|
79
|
-
*/
|
80
|
-
drop(e: DragEvent): Promise<void>;
|
81
|
-
/**
|
82
|
-
* 拖拽离开时调用。
|
83
|
-
* @param e
|
84
|
-
*/
|
85
|
-
dragLeave(e: DragEvent): void;
|
86
|
-
/**
|
87
|
-
* 拖拽结束了。
|
88
|
-
* @param e
|
89
|
-
*/
|
90
|
-
dragEnd(e: DragEvent): void;
|
91
|
-
/**
|
92
|
-
* 自动给正在拖拽的元素加 is-draging 之类的 css。
|
93
|
-
*/
|
94
|
-
updateDragElements(dragId: string): void;
|
95
|
-
/**
|
96
|
-
* 自动给拖入的区域添加 is-dragenter 之类的 css。
|
97
|
-
*/
|
98
|
-
updateDropRegion(value: {
|
99
|
-
id: string;
|
100
|
-
region: string;
|
101
|
-
}, oldValue?: {
|
102
|
-
id: string;
|
103
|
-
region: string;
|
104
|
-
}): void;
|
105
|
-
/**
|
106
|
-
* 自动给即将激活的区域添加高亮。
|
107
|
-
*/
|
108
|
-
updatePlanDropRegion(value: {
|
109
|
-
id: string;
|
110
|
-
region: string;
|
111
|
-
}, oldValue?: {
|
112
|
-
id: string;
|
113
|
-
region: string;
|
114
|
-
}): void;
|
115
|
-
/**
|
116
|
-
* 销毁函数。
|
117
|
-
*/
|
118
|
-
dispose(): void;
|
119
|
-
}
|
package/dist/dnd/interface.d.ts
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
import { EditorNodeType } from '../store/node';
|
2
|
-
import { EditorDNDManager } from './index';
|
3
|
-
/**
|
4
|
-
* 每种拖拽模式都需要实现这些约定。
|
5
|
-
*/
|
6
|
-
export interface DNDModeInterface {
|
7
|
-
readonly dnd: EditorDNDManager;
|
8
|
-
readonly region: EditorNodeType;
|
9
|
-
enter: (e: DragEvent, ghost: HTMLElement) => void;
|
10
|
-
leave: (e: DragEvent, ghost: HTMLElement) => void;
|
11
|
-
over: (e: DragEvent, ghost: HTMLElement) => void;
|
12
|
-
getDropBeforeId: () => string | undefined;
|
13
|
-
dispose: () => void;
|
14
|
-
}
|
package/dist/dnd/position-h.d.ts
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
import { DefaultDNDMode } from './default';
|
2
|
-
import { DNDModeInterface } from './interface';
|
3
|
-
export declare class PositionHDNDMode extends DefaultDNDMode implements DNDModeInterface {
|
4
|
-
enter(e: DragEvent, ghost: HTMLElement): void;
|
5
|
-
leave(e: DragEvent, ghost: HTMLElement): void;
|
6
|
-
over(e: DragEvent, ghost: HTMLElement): void;
|
7
|
-
}
|
package/dist/env.d.ts
DELETED
package/dist/exports.d.ts
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* 用于导出纯工具类方法
|
3
|
-
* 比如:BasePlugin、registerEditorPlugin
|
4
|
-
*/
|
5
|
-
import { BasePlugin } from './plugin';
|
6
|
-
import { registerEditorPlugin, unRegisterEditorPlugin, getEditorPlugins } from './manager';
|
7
|
-
import { getSchemaTpl, defaultValue, setSchemaTpl } from './component/schemaTpl';
|
8
|
-
export { BasePlugin, getSchemaTpl, setSchemaTpl, defaultValue, registerEditorPlugin, unRegisterEditorPlugin, getEditorPlugins };
|
package/dist/exports.min.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
(()=>{"use strict";var e={3190:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CommonConfigWrapper=void 0;var i=n(752),r=n(6405),a=n(3570),o=(0,i.__importDefault)(n(6689)),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.__extends)(t,e),t.prototype.componentWillUnmount=function(){var e=(0,r.findDOMNode)(this);if(e){var t=this.props.$$editor,n=t.wrapperResolve?t.wrapperResolve(e):e;(Array.isArray(n)?n:n?[n]:[]).forEach((function(e){e.classList.remove("ae-Editor-common-config")}))}},t.prototype.markDom=function(e){var t=(0,r.findDOMNode)(this);if(t&&e){var n=this.props.$$editor,i=n.wrapperResolve?n.wrapperResolve(t):t;this.props.$$commonSchema&&(Array.isArray(i)?i:i?[i]:[]).forEach((function(t){t.setAttribute("data-editor-id",e),t.classList.add("ae-Editor-common-config")}))}},t.prototype.render=function(){var e=this.props,t=e.$$editor,n=e.$$node,r=e.$schema,l=e.store,s=(0,i.__rest)(e,["$$editor","$$node","$schema","store"]),d=t.renderer;return s=(0,a.JSONPipeOut)(s),t.filterProps&&(s=t.filterProps.call(t.plugin,s,n)),t.renderRenderer?t.renderRenderer.call(t.plugin,(0,i.__assign)((0,i.__assign)((0,i.__assign)((0,i.__assign)({},s),{store:l,$schema:r,$$editor:t}),t.wrapperProps),{ref:this.refFn}),t):o.default.createElement(d.component,(0,i.__assign)({},s,{store:l,$schema:r,$$editor:t},t.wrapperProps,{ref:this.refFn}))},t}(n(1160).NodeWrapper);t.CommonConfigWrapper=l},9305:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerWrapper=void 0;var i=n(752),r=n(1160),a=(0,i.__importDefault)(n(6689)),o=n(2062),l=n(3570),s=(0,i.__importDefault)(n(6918)),d=n(1548),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.__extends)(t,e),t.prototype.getWrappedInstance=function(){return this.ref},t.prototype.refFn=function(e){this.ref=e},t.prototype.renderChild=function(e,t,n){var i=this.props,r=i.render,o=i.$$editor,l=i.$$node,u=r(e,t,n),p=(0,s.default)(o.regions,(function(t){return t.key===e&&!t.matchRegion&&!t.renderMethod}));if(p){var c=p.wrapper||d.RegionWrapper;return a.default.createElement(c,{key:null==n?void 0:n.key,preferTag:p.preferTag,name:p.key,label:p.label,placeholder:p.placeholder,regionConfig:p,editorStore:o.plugin.manager.store,wrapperResolve:p.wrapperResolve,manager:o.plugin.manager,children:u,rendererName:o.renderer.name,$$editor:o,node:l})}return u},t.prototype.render=function(){var e=this.props,t=e.$$editor,n=e.$$node,o=(0,i.__rest)(e,["$$editor","$$node"]),l={},s=t.plugin.manager.store;return t.id&&(s.isActive(t.id)||s.dropId===t.id)&&Array.isArray(t.regions)&&t.regions.forEach((function(e){var t=e.key;if(!e.optional&&!(null==n?void 0:n.memberImmutable(t))){var i=[];"actions"!==t||void 0!==o.submitText&&!o.submitText||(i=[{type:"submit",label:o.submitText||"提交",primary:!0}]);var r=Array.isArray(o[t])?o[t].concat():o[t]?[o[t]]:i;r.length||r.push({children:function(){return null}}),l[t]=r}})),a.default.createElement(r.NodeWrapper,(0,i.__assign)({},o,l,{$$editor:t,$$node:n,render:this.renderChild,ref:this.refFn}))},(0,i.__decorate)([l.autobind,(0,i.__metadata)("design:type",Function),(0,i.__metadata)("design:paramtypes",[Object]),(0,i.__metadata)("design:returntype",void 0)],t.prototype,"refFn",null),(0,i.__decorate)([l.autobind,(0,i.__metadata)("design:type",Function),(0,i.__metadata)("design:paramtypes",[String,Object,Object]),(0,i.__metadata)("design:returntype",void 0)],t.prototype,"renderChild",null),(0,i.__decorate)([o.observer],t)}(a.default.Component);t.ContainerWrapper=u},1160:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NodeWrapper=void 0;var i=n(752),r=n(2062),a=(n(2717),(0,i.__importDefault)(n(6689))),o=n(6405),l=n(3570),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.__extends)(t,e),t.prototype.componentDidMount=function(){this.markDom(this.props.$$editor.id),this.props.$$node&&requestAnimationFrame((function(){}))},t.prototype.componentDidUpdate=function(e){this.markDom(this.props.$$editor.id)},t.prototype.getWrappedInstance=function(){return this.ref},t.prototype.refFn=function(e){this.ref=e},t.prototype.markDom=function(e){var t,n,i=(0,o.findDOMNode)(this);if(i&&e){var r=this.props.$$editor,a=!1!==this.props.$$visible&&!0!==this.props.$$hidden,l=r.wrapperResolve?r.wrapperResolve(i):i;(Array.isArray(l)?l:l?[l]:[]).forEach((function(t){t.setAttribute("data-editor-id",e),t.setAttribute("data-visible",a?"":"false")})),null===(n=null===(t=r.plugin)||void 0===t?void 0:t.markDom)||void 0===n||n.call(t,l,this.props)}},t.prototype.render=function(){var e=this.props,t=e.$$editor,n=e.$$node,r=e.store,o=(0,i.__rest)(e,["$$editor","$$node","store"]),l=t.renderer;return t.filterProps&&(o=t.filterProps.call(t.plugin,o,n)),t.renderRenderer?t.renderRenderer.call(t.plugin,(0,i.__assign)((0,i.__assign)((0,i.__assign)((0,i.__assign)((0,i.__assign)((0,i.__assign)({},o),{store:r}),null==n?void 0:n.state),{$$editor:t}),t.wrapperProps),{ref:this.refFn}),t):a.default.createElement(l.component,(0,i.__assign)({},o,{store:r},null==n?void 0:n.state,{$$editor:t},t.wrapperProps,{ref:this.refFn}))},(0,i.__decorate)([l.autobind,(0,i.__metadata)("design:type",Function),(0,i.__metadata)("design:paramtypes",[Object]),(0,i.__metadata)("design:returntype",void 0)],t.prototype,"refFn",null),(0,i.__decorate)([r.observer],t)}(a.default.Component);t.NodeWrapper=s},1548:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RegionWrapper=void 0;var i=n(752),r=n(2717),a=(0,i.__importDefault)(n(6689)),o=n(6405),l=n(2406),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.__extends)(t,e),t.prototype.UNSAFE_componentWillMount=function(){this.parentNode=this.context;var e=this.props,t=e.$$editor,n=e.manager;if(!this.parentNode&&t&&t.id){var i=n.store.getNodeById(t.id);i&&(this.parentNode=i)}this.parentNode&&(this.editorNode=this.parentNode.addChild({id:this.parentNode.id,label:this.props.label,path:this.parentNode.path+"/"+this.props.name,region:this.props.name,regionInfo:this.props.regionConfig,preferTag:this.props.preferTag}))},t.prototype.componentDidMount=function(){this.editorNode&&this.markDom(this.editorNode.id,this.props.name,this.props.rendererName)},t.prototype.componentDidUpdate=function(e){this.editorNode&&this.markDom(this.editorNode.id,this.props.name,this.props.rendererName)},t.prototype.componentWillUnmount=function(){this.editorNode&&(0,r.isAlive)(this.editorNode)&&this.parentNode.removeChild(this.editorNode)},t.prototype.markDom=function(e,t,n){var i=(0,o.findDOMNode)(this);if(i){var r=this.props.wrapperResolve,a=r?r(i):i.parentElement;a.setAttribute("data-region",t),a.setAttribute("data-region-host",e),a.setAttribute("data-region-placeholder",this.props.placeholder||this.props.label),n&&a.setAttribute("data-renderer",n)}},t.prototype.render=function(){return a.default.createElement(l.EditorNodeContext.Provider,{value:this.editorNode},this.props.children,a.default.createElement("span",{className:"ae-Region-placeholder"}))},t.contextType=l.EditorNodeContext,t}(a.default.Component);t.RegionWrapper=s},5992:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InputComponentName=void 0;var i=n(6689);t.InputComponentName=function(e){var t=e.value,n=e.onChange,r=e.render,a=e.name,o=e.node,l=(0,i.useState)([]),s=l[0],d=l[1];return(0,i.useEffect)((function(){for(var e=null==o?void 0:o.getComponent(),t=null==e?void 0:e.context,n=[];null==t?void 0:t.getComponents;)t.getComponents().forEach((function(t){t.props.name&&t!==e&&n.push(t.props.name)})),t=t.parent;d(n)}),[o]),r("inner",{type:"input-text",name:a},{value:t,onChange:function(e){return n(e),!1},options:s})}},9703:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.renderThumbToGhost=t.mapReactElement=t.hackIn=t.makeSchemaFormRender=t.makeWrapper=void 0;var i=n(752),r=n(1502),a=n(2717),o=(0,i.__importDefault)(n(6689)),l=n(1160),s=(0,i.__importDefault)(n(9003)),d=(0,i.__importDefault)(n(8492)),u=n(1548),p=(0,i.__importDefault)(n(6918)),c=n(9305),h=n(2062),m=n(2406),f=(0,i.__importDefault)(n(8579)),g=n(6405),v=n(3570),b=n(9794),y=n(3190);function _(e){var t,n=e.body,a=e.definitions,o=e.controls,l=e.onChange,d=e.value,u=e.env,p=e.api,c=e.popOverContainer,h=e.submitOnChange,m=e.node,f="body";Array.isArray(o)&&(n=o,f="controls"),n=Array.isArray(n)?n.concat():[],!1===h&&n.push({type:"submit",label:"保存",level:"primary",block:!0,className:"ae-Settings-actions"});var g=((t={definitions:a})[f]=n,t.className=(0,s.default)("config-form-content","ae-Settings-content","hoverShowScrollBar",!1===h?"with-actions":""),t.wrapperComponent="div",t.type="form",t.title="",t.mode="normal",t.api=p,t.wrapWithPanel=!1,t.submitOnChange=!1!==h,t.messages={validateFailed:""},t);return(0,r.render)(g,{onFinished:function(e){return l(e,(0,v.diff)(d,e))},data:d,node:m,popOverContainer:c},(0,i.__assign)({},u))}function x(e,t,n,i,r){var a=(0,p.default)(n,(function(e){return!e.matchRegion}));if(a){var l=a.wrapper||u.RegionWrapper;return"inner"===a.insertPosition&&o.default.isValidElement(t)?o.default.cloneElement(t,{children:o.default.createElement(l,{key:a.key,preferTag:a.preferTag,name:a.key,label:a.label,placeholder:a.placeholder,regionConfig:a,editorStore:r.store,manager:r,children:t.props.children,wrapperResolve:a.wrapperResolve,rendererName:i.renderer.name})}):o.default.createElement(l,{key:a.key,preferTag:a.preferTag,name:a.key,label:a.label,placeholder:a.placeholder,regionConfig:a,editorStore:r.store,manager:r,children:t,wrapperResolve:a.wrapperResolve,rendererName:i.renderer.name})}if(n.length){var s=function(e,t,n){var i=-1,r=void 0;return n.some((function(n,a){return!!n.matchRegion(t,e)&&(i=a,r=n,!0)})),[r,i]}(e,t,n),d=s[0],c=s[1];if(d){if(l=d.wrapper||u.RegionWrapper,n.splice(c,1),"outter"===d.insertPosition)return o.default.createElement(l,{key:d.key,preferTag:d.preferTag,name:d.key,label:d.label,placeholder:d.placeholder,regionConfig:d,editorStore:r.store,manager:r,children:t,wrapperResolve:d.wrapperResolve});if(o.default.isValidElement(t)){var h=t.props.children;return o.default.cloneElement(t,{children:o.default.createElement(l,{key:d.key,preferTag:d.preferTag,name:d.key,label:d.label,placeholder:d.placeholder,regionConfig:d,editorStore:r.store,manager:r,children:h,wrapperResolve:d.wrapperResolve})})}}else if(o.default.isValidElement(t)&&t.props.children)return h=t.props.children,h=Array.isArray(h)?h.map((function(t){return x(e,t,n,i,r)})):x(e,h,n,i,r),o.default.cloneElement(t,{children:h})}return t}t.makeWrapper=function(e,t,n){var r=e.store,s=n.component;return function(e){function n(t){var n=e.call(this,t)||this;return n.state={hasError:!1},n}return(0,i.__extends)(n,e),n.prototype.UNSAFE_componentWillMount=function(){var e=this,n=this.context||r.root;this.editorNode=t.id?n.addChild({id:t.id,label:t.name,isCommonConfig:!!this.props.$$commonSchema,path:this.props.$path,schemaPath:t.schemaPath,info:t,getData:function(){return e.props.data}}):void 0},n.prototype.componentDidUpdate=function(e){var t=this.props;this.editorNode&&t.$$commonSchema!==e.$$commonSchema&&this.editorNode.updateIsCommonConfig(!!this.props.$$commonSchema)},n.prototype.componentDidCatch=function(e,n){console.warn(t.name+"("+t.id+")渲染发生错误:"),console.warn("当前渲染器信息:",t),console.warn("错误对象:",e),console.warn("错误信息:",n),this.setState({hasError:!0})},n.prototype.componentWillUnmount=function(){this.editorNode&&(0,a.isAlive)(this.editorNode)&&(this.context||r.root).removeChild(this.editorNode)},n.prototype.wrapperRef=function(e){for(;null==e?void 0:e.getWrappedInstance;)e=e.getWrappedInstance();this.editorNode&&(0,a.isAlive)(this.editorNode)&&this.editorNode.setComponent(e)},n.prototype.renderChild=function(e,n,r){return(0,this.props.render)(e,n,(0,i.__assign)((0,i.__assign)({},r),{$$editor:t}))},n.prototype.render=function(){var e=this.props,n=(e.$$id,(0,i.__rest)(e,["$$id"]));if(this.state.hasError)return o.default.createElement("div",{className:"ae-Editor-renderer-error"},t.name,"(",t.id,")渲染发生错误,详细错误信息请查看控制台输出。");var r=this.props.$$commonSchema?y.CommonConfigWrapper:t.regions?c.ContainerWrapper:l.NodeWrapper;return o.default.createElement(m.EditorNodeContext.Provider,{value:this.editorNode||this.context},o.default.createElement(r,(0,i.__assign)({},n,{render:this.renderChild,$$editor:t,$$node:this.editorNode,ref:this.wrapperRef})))},n.displayName=s.displayName,n.propsList=(s&&s.propsList||[]).concat(["$$id"]),n.contextType=m.EditorNodeContext,(0,i.__decorate)([v.autobind,(0,i.__metadata)("design:type",Function),(0,i.__metadata)("design:paramtypes",[Object]),(0,i.__metadata)("design:returntype",void 0)],n.prototype,"wrapperRef",null),(0,i.__decorate)([v.autobind,(0,i.__metadata)("design:type",Function),(0,i.__metadata)("design:paramtypes",[String,Object,Object]),(0,i.__metadata)("design:returntype",void 0)],n.prototype,"renderChild",null),(0,i.__decorate)([h.observer,(0,i.__metadata)("design:paramtypes",[Object])],n)}(o.default.Component)},t.makeSchemaFormRender=function(e,t){var n=(0,i.__assign)((0,i.__assign)({},e.env),{session:"schema-form"});return function(r){var a=r.value,l=r.onChange,s=r.popOverContainer,d=r.id,u=r.store,p=r.node,c=(0,i.__assign)({},e.store.ctx);return d&&Object.defineProperty(c,"__props__",{get:function(){var e,t=u.getNodeById(d);return(null===(e=null==t?void 0:t.getComponent())||void 0===e?void 0:e.props)||{}}}),o.default.createElement(_,{key:""+d,api:t.api,definitions:t.definitions,body:t.body?(0,f.default)(Array.isArray(t.body)?t.body:[t.body]):void 0,controls:t.controls?(0,f.default)(Array.isArray(t.controls)?t.controls:[t.controls]):void 0,value:(0,b.createObject)(c,a),submitOnChange:t.submitOnChange,onChange:l,env:n,popOverContainer:s,node:p})}},t.hackIn=function(e,t,n){for(var r=e.Renderer;r.ComposedComponent;)r=r.ComposedComponent;var a=r.prototype;if(Array.isArray(t)){var o=(0,d.default)(t,(function(e){return e.renderMethod}));Object.keys(o).forEach((function(e){var t;if(!a["__"+e]&&a[e]){var n,r,l=o[e],s=null===(t=l[0])||void 0===t?void 0:t.renderMethodOverride;a["__"+e]=a[e],a[e]=(n=a["__"+e],r=(null==s?void 0:s(l.concat(),x))||function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this.props.$$editor,r=this.super.apply(this,e);if(n&&!this.props.$$commonSchema&&Array.isArray(n.regions)&&l.every((function(e){return(0,p.default)(n.regions,(function(t){return t.key===e.key}))}))){var a=l.map((function(e){var t=(0,p.default)(n.regions,(function(t){return t.key===e.key&&(!e.rendererName||e.rendererName===t.rendererName)}));return t?(0,i.__assign)((0,i.__assign)({},e),{label:t.label,preferTag:t.preferTag}):e}));return x(this,r,a,n,n.plugin.manager)}return r},"function"!=typeof n?n:function(){var e=this.super;this.super=n.bind(this);var t=r.apply(this,arguments);return this.super=e,t})}}))}else n&&Object.keys(n).forEach((function(e){var t,i;a["__"+e]||"function"!=typeof a[e]||(a["__"+e]=a[e],a[e]=(t=a["__"+e],i=n[e],"function"!=typeof t?t:function(){var e=this.super;this.super=t.bind(this);var n=i.apply(this,arguments);return this.super=e,n}))}))},t.mapReactElement=function e(t,n,i){if(!o.default.isValidElement(t))return t;var r=n(t,i);if(r===t&&t.props.children){var a=t.props.children;if(Array.isArray(a)){var l=[],s=!1;a.forEach((function(t,i){var r=e(t,n,i);r!==t&&(s=!0,o.default.isValidElement(r)&&!r.key&&(r=o.default.cloneElement(r,{key:i}))),l.push(r)})),s&&(r=o.default.cloneElement(r,{children:l}))}else{var d=e(a,n,i);d!==a&&(r=o.default.cloneElement(r,{children:d}))}}return r};var C=document.createElement("div");t.renderThumbToGhost=function(e,t,n,a){e.innerHTML="";var o=t.host.getComponent(),l=(null==o?void 0:o.renderControl)&&"body"===t.region;try{(0,g.render)((0,r.render)({children:function(e){var i=e.render;return l?i("",{type:"form",wrapWithPanel:!1,mode:o.props.mode,body:[n]}):i(t.region,n)}},{},(0,i.__assign)((0,i.__assign)({},a.env),{theme:(null==o?void 0:o.props.theme)||a.env.theme,session:"ghost-thumb"}),""),C)}catch(e){}var s=C.innerHTML||'<div class="wrapper-sm b-a b-light m-b-sm">拖入占位</div>';e.innerHTML=s,(0,g.unmountComponentAtNode)(C),C.innerHTML=""}},7137:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return{type:"control",label:e.label,mode:"horizontal",className:"w-full flex items-center",labelRemark:{icon:"fa fa-question-circle",trigger:["hover","focus"],setting:!0,title:"",content:"在输入控件旁边展示一个 icon,当鼠标放上去时展示详细描述,注意启动后请将控件宽度设置成非占满,否则 icon 显示位置会换行",placement:"bottom"},body:[{type:"container",className:"flex justify-end",body:[{type:"input-sub-form",name:e.name,label:"",btnLabel:"",visibleOn:"this."+e.name,className:"inline-block m-0 h-6 mr-2.5",itemClassName:"bg-white",icon:"fa fa-cog",form:{title:"设置提示信息",mode:"normal",size:"md",body:{type:"grid",columns:[{md:"6",body:[{name:"title",type:"input-text",label:"提示标题",placeholder:"请输入提示标题"},{name:"content",type:"textarea",label:"内容"}]},{md:"6",body:[{name:"placement",type:"button-group-select",size:"md",label:"弹出位置",options:[{label:"上",value:"top"},{label:"下",value:"bottom"},{label:"左",value:"left"},{label:"右",value:"right"}]},{name:"icon",label:"图标",type:"icon-picker"},{name:"className",label:"CSS 类名",type:"input-text",labelRemark:{trigger:"click",className:"m-l-xs",rootClose:!0,content:'有哪些辅助类 CSS 类名?请前往 <a href="https://baidu.gitee.io/amis/zh-CN/style/index" target="_blank">样式说明</a>,除此之外你可以添加自定义类名,然后在系统配置中添加自定义样式。',placement:"left"}},{name:"trigger",type:"select",label:"触发方式",multiple:!0,pipeIn:function(e){return Array.isArray(e)?e.join(","):[]},pipeOut:function(e){return e&&e.length?e.split(","):void 0},options:[{label:"鼠标悬停",value:"hover"},{label:"点击",value:"click"}]},{name:"rootClose",visibleOn:'~this.trigger.indexOf("click")',label:"点击空白关闭",type:"switch"}]}]}}},{type:"switch",name:e.name,mode:"inline",pipeIn:function(e){return!!e},pipeOut:function(e){return e?{icon:"fa fa-question-circle",trigger:["hover","focus"],className:"Remark--warning",setting:!0,placement:"top"}:null}}]}]}}},9547:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.defaultValue=t.valuePipeOut=t.setSchemaTpl=t.getSchemaTpl=t.styleTpl=void 0;var i,r,a=n(752),o=n(3570),l=n(6918),s=n(1502),d=(0,a.__importDefault)(n(8579)),u=n(6689),p=n(5992),c=(0,a.__importDefault)(n(7137)),h={formItemName:{label:"字段名",name:"name",type:"input-text"},formItemMode:{label:"表单项展示模式",name:"mode",type:"button-group-select",size:"sm",option:"继承",pipeIn:f(""),options:[{label:"继承",value:""},{label:"正常",value:"normal"},{label:"内联",value:"inline"},{label:"水平",value:"horizontal"}]},formItemInline:{label:"表单项内联",name:"inline",type:"switch",visibleOn:'data.mode != "inline"',mode:"inline",className:"w-full",pipeIn:f(!1)},formItemSize:{name:"size",label:"控件尺寸",type:"button-group-select",size:"sm",pipeIn:f("full"),options:[{label:"极小",value:"xs"},{label:"小",value:"sm"},{label:"中",value:"md"},{label:"大",value:"lg"},{label:"默认",value:""}]},minLength:{name:"minLength",type:"input-number",label:"限制最小数量"},maxLength:{name:"maxLength",type:"input-number",label:"限制最大数量"},label:[{label:"Label",name:"label",type:"input-text",hiddenOn:"data.label === false"},{name:"label",label:"隐藏 Label",type:"switch",mode:"inline",className:"w-full",pipeIn:function(e){return!1===e},pipeOut:function(e){return!0!==e&&""},visibleOn:'__props__.formMode === "horizontal" || data.mode === "horizontal" || data.label ===false',description:"当 form 为水平布局时有用,可以用来去掉间隔。"}],placeholder:{label:"占位符",name:"placeholder",type:"input-text",placeholder:"占位符"},tabs:function(e){return{type:"tabs",tabsMode:"line",className:"editor-prop-config-tabs",contentClassName:"no-border editor-prop-config-tabs-cont hoverShowScrollBar",tabs:e.filter((function(e){return e})).map((function(e){return(0,a.__assign)((0,a.__assign)({},e),{body:(0,d.default)(e.body)})}))}},collapse:function(e){return{type:"wrapper",className:"editor-prop-config-collapse",body:e.filter((function(e){return e})).map((function(e){return(0,a.__assign)((0,a.__assign)({type:"collapse",headingClassName:"editor-prop-config-head",bodyClassName:"editor-prop-config-body"},e),{body:(0,d.default)(e.body)})}))}},fieldSet:function(e){return(0,a.__assign)((0,a.__assign)({collapsable:!0,collapsed:!1},e),{type:"fieldset",title:e.title,body:(0,d.default)(e.body.filter((function(e){return e})))})},clearable:{type:"switch",name:"clearable",mode:"inline",className:"w-full",label:"启用清除按钮"},hint:{label:"输入提示",type:"input-text",name:"hint",description:"当输入框获得焦点的时候显示,用来提示用户输入内容。"},remark:(0,c.default)({name:"remark",label:"控件提示"}),labelRemark:(0,c.default)({name:"labelRemark",label:"标题提示"}),expression:{type:"input-text",description:"支持 JS 表达式,如:`this.xxx == 1`"},icon:{label:"图标",type:"icon-picker",name:"icon",placeholder:"点击选择图标",clearable:!0,description:""},size:{label:"控件尺寸",type:"button-group-select",name:"size",size:"sm",clearable:!0,options:[{label:"极小",value:"xs"},{label:"小",value:"sm"},{label:"中",value:"md"},{label:"大",value:"lg"}]},name:{label:"名字",name:"name",type:"input-text",description:"需要联动时才需要,其他组件可以通过这个名字跟当前组件联动",placeholder:"请输入字母或者数字"},reload:{label:"刷新目标组件",name:"reload",asFormItem:!0,component:p.InputComponentName,description:"可以指定操作完成后刷新目标组件,请填写目标组件的 <code>name</code> 属性,多个组件请用<code>,</code>隔开,如果目标组件为表单项,请先填写表单的名字,再用<code>.</code>连接表单项的名字如:<code>xxForm.xxControl</code>。另外如果刷新目标对象设置为 <code>window</code>,则会刷新整个页面。",labelRemark:{trigger:"click",className:"m-l-xs",rootClose:!0,content:"设置名字后,当前组件操作完成会触发目标组件(根据设置的名字)的刷新。",placement:"left"}},className:{label:"CSS 类名",type:"ae-classname",name:"className",labelRemark:{trigger:"click",className:"m-l-xs",rootClose:!0,content:'有哪些辅助类 CSS 类名?请前往 <a href="https://baidu.github.io/amis/docs/concepts/style" target="_blank">样式说明</a>,除此之外你可以添加自定义类名,然后在系统配置中添加自定义样式。',placement:"left"}},apiControl:function(e){void 0===e&&(e={});var t=e.name,n=e.label,i=(e.value,e.description),r=e.sampleBuilder,o=(0,a.__rest)(e,["name","label","value","description","sampleBuilder"]);return(0,a.__assign)({type:"ae-apiControl",label:n,name:t,description:i,labelRemark:r?{icon:"",label:"示例",title:"接口返回示例",tooltipClassName:"ae-ApiSample-tooltip",render:function(e){return u.createElement(s.Html,{className:"ae-ApiSample",inline:!1,html:"\n <pre><code>"+r(e)+"</code></pre>\n "})},trigger:"click",className:"m-l-xs",rootClose:!0,placement:"left"}:void 0},o)},api:function(e){void 0===e&&(e={});var t=e.name,n=e.label,i=e.value,r=e.description,o=e.sampleBuilder,l=(0,a.__rest)(e,["name","label","value","description","sampleBuilder"]);return(0,a.__assign)({type:"container",body:[{type:"checkbox",label:n||"API",labelRemark:o?{icon:"",label:"示例",title:"接口返回示例",tooltipClassName:"ae-ApiSample-tooltip",render:function(e){return u.createElement(s.Html,{className:"ae-ApiSample",inline:!1,html:"\n <pre><code>"+o(e)+"</code></pre>\n "})},trigger:"click",className:"m-l-xs",rootClose:!0,placement:"left"}:void 0,option:"高级配置",name:t||"api",mode:"inline",className:"w-full m-b-sm",inputClassName:"pull-right text-sm m-t-sm p-t-none",onChange:function(){},pipeIn:function(e){return e&&"string"!=typeof e},pipeOut:function(e,t){var n=(0,s.buildApi)(t);return e?{method:n.method,url:n.url}:n.url?(n.method?n.method+":":"")+n.url:""}},{name:t||"api",type:"input-text",value:i,placeholder:"http://",description:r,visibleOn:"!this."+(t||"api")+" || typeof this."+(t||"api")+" === 'string'",className:"m-b-none",labelRemark:{}},{type:"combo",name:t||"api",description:r,syncDefaultValue:!1,multiLine:!0,visibleOn:"this."+(t||"api")+" && typeof this."+(t||"api")+" !== 'string'",className:"m-b-none",messages:{validateFailed:"接口配置中存在错误,请仔细检查"},pipeIn:function(e){if("string"==typeof e){var t=e,n="get",i=/^(raw:|external:)?(get|post|put|patch|delete):(.*)$/.exec(t);return i&&(t=i[1]+i[3],n=i[2]),{method:n,url:t}}return e},items:[{label:"发送方式",name:"method",value:"get",type:"select",mode:"horizontal",horizontal:{leftFixed:"sm"},options:[{value:"get",label:"GET"},{value:"post",label:"POST"},{value:"put",label:"PUT"},{value:"patch",label:"PATCH"},{value:"delete",label:"DELETE"}]},{label:"接口地址",type:"input-text",name:"url",placeholder:"http://",required:!0},{type:"switch",label:"数据映射",name:"data",mode:"inline",className:"w-full m-b-xs",pipeIn:function(e){return!!e},pipeOut:function(e){return e?{"&":"$$"}:null}},{type:"tpl",visibleOn:"!this.data",inline:!1,className:"text-sm text-muted m-b",tpl:"当没开启数据映射时,发送 API 的时候会发送尽可能多的数据,如果你想自己控制发送的数据,或者需要额外的数据处理,请开启此选项"},{type:"input-kv",syncDefaultValue:!1,name:"data",visibleOn:"this.data",descriptionClassName:"help-block text-xs m-b-none",description:'<p>当没开启数据映射时,发送数据自动切成白名单模式,配置啥发送啥,请绑定数据。如:<code>{"a": "\\${a}", "b": 2}</code></p><p>如果希望在默认的基础上定制,请先添加一个 Key 为 `&` Value 为 `\\$$` 作为第一行。</p><div>当值为 <code>__undefined</code>时,表示删除对应的字段,可以结合<code>{"&": "\\$$"}</code>来达到黑名单效果。</div>'},{label:"发送条件",type:"input-text",name:"sendOn",placeholder:'如:this.type == "123"',description:"用表达式来设置该请求的发送条件"},{type:"switch",label:"是否设置缓存",name:"cache",mode:"inline",className:"w-full m-b-xs",description:"设置该请求缓存的有效时间",pipeIn:function(e){return!!e},pipeOut:function(e){return e?3e3:void 0}},{type:"input-number",name:"cache",mode:"inline",min:0,step:500,visibleOn:"this.cache",pipeIn:function(e){return"number"==typeof e?e:0}},{label:"文件下载",type:"switch",name:"responseType",mode:"inline",className:"block",pipeIn:function(e){return"blob"===e},pipeOut:function(e){return e?"blob":void 0},description:"当接口为二进制文件下载时请勾选,并设置 Content-Disposition"},{label:"数据格式",type:"button-group-select",name:"dataType",description:'发送体格式为:<%= data.dataType === "json" ? "application/json" : data.dataType === "form-data" ? "multipart/form-data" : data.dataType === "form" ? "application/x-www-form-urlencoded" : "" %>,当发送内容中存在文件时会自动使用 form-data 格式。',size:"sm",className:"block",mode:"inline",options:[{label:"JSON",value:"json"},{label:"FormData",value:"form-data"},{label:"Form",value:"form"}]},{type:"switch",label:"数据替换",name:"replaceData",mode:"inline",className:"w-full",description:"默认数据都是追加方式,开启这个后是完全替换"},{type:"switch",label:"返回结果映射",name:"responseData",mode:"inline",className:"w-full m-b-xs",pipeIn:function(e){return!!e},pipeOut:function(e){return e?{"&":"$$"}:null}},{type:"tpl",visibleOn:"!this.responseData",inline:!1,className:"text-sm text-muted m-b",tpl:"如果需要对返回结果做额外的数据处理,请开启此选项"},{type:"input-kv",syncDefaultValue:!1,name:"responseData",visibleOn:"this.responseData",descriptionClassName:"help-block text-xs m-b-none"},{title:"自定义适配器",type:"fieldSet",className:"m-b-none",size:"sm",collapsable:!1,collapsedOn:"!this.requestAdaptor && !this.adaptor",body:[{name:"requestAdaptor",type:"js-editor",allowFullscreen:!0,label:"发送适配器",description:"函数签名:(api) => api, 数据在 api.data 中,修改后返回 api 对象。"},{name:"adaptor",type:"js-editor",allowFullscreen:!0,label:"接收适配器",description:"函数签名: (payload, response, api) => payload"}]}]}]},l)},source:function(e){return void 0===e&&(e={}),m("api",(0,a.__assign)({name:"source",label:"获取选项接口",description:"可以通过接口获取动态选项,一次拉取全部。",sampleBuilder:function(e){return JSON.stringify({status:0,msg:"",data:{options:[{label:"选项A",value:"a"},{label:"选项B",value:"b"}]}},null,2)}},e))},autoFill:{type:"input-kv",name:"autoFill",label:"自动填充",descriptionClassName:"help-block text-xs m-b-none",description:"将当前已选中的选项的某个字段的值,自动填充到表单中某个表单项中,支持数据映射"},autoFillApi:{},apiString:{name:"api",type:"input-text",placeholder:"http://"},required:{name:"required",type:"switch",mode:"inline",className:"w-full",label:"是否必填"},description:{name:"description",type:"textarea",label:"描述",pipeIn:function(e,t){return e||t.desc||""}},options:{label:"选项 Options",name:"options",type:"combo",multiple:!0,draggable:!0,addButtonText:"新增选项",scaffold:{label:"",value:""},items:[{type:"input-text",name:"label",placeholder:"名称",required:!0},{type:"select",name:"value",pipeIn:function(e){return"string"==typeof e?"text":"boolean"==typeof e?"boolean":"number"==typeof e?"number":"text"},pipeOut:function(e,t){if("text"===e)return String(t);if("number"===e){var n=Number(t);return isNaN(n)?0:n}return"boolean"===e?Boolean(t):""},options:[{label:"文本",value:"text"},{label:"数字",value:"number"},{label:"布尔",value:"boolean"}]},{type:"input-number",name:"value",placeholder:"值",visibleOn:'typeof data.value === "number"',unique:!0},{type:"switch",name:"value",placeholder:"值",visibleOn:'typeof data.value === "boolean"',unique:!0},{type:"input-text",name:"value",placeholder:"值",visibleOn:'typeof data.value === "undefined" || typeof data.value === "string"',unique:!0}]},tree:{label:"选项 Options",name:"options",type:"combo",multiple:!0,draggable:!0,addButtonText:"新增选项",description:"静态数据暂不支持多级,请切换到代码模式,或者采用 source 接口获取。",scaffold:{label:"",value:""},items:[{type:"input-text",name:"label",placeholder:"名称",required:!0},{type:"input-text",name:"value",placeholder:"值",unique:!0}]},horizontalMode:{label:"表单项左右占比设置",name:"horizontal",type:"switch",onText:"继承",offText:"自定义",mode:"inline",className:"w-full",inputClassName:"text-sm",visibleOn:'this.mode == "horizontal" && this.label !== false',pipeIn:function(e){return!e},pipeOut:function(e,t,n){return e?null:n.formHorizontal||{leftFixed:"normal"}}},horizontal:{type:"combo",syncDefaultValue:!1,name:"horizontal",multiLine:!0,visibleOn:'data.mode == "horizontal" && data.label !== false && data.horizontal',pipeIn:function(e){return{leftRate:e&&"number"==typeof e.left?e.left:e&&/\bcol\-(?:xs|sm|md|lg)\-(\d+)\b/.test(e.left)?parseInt(RegExp.$1,10):2,leftFixed:e&&e.leftFixed||""}},pipeOut:function(e){var t=Math.min(11,Math.max(1,e.leftRate||2));return{leftFixed:e.leftFixed||"",left:t,right:12-t}},inputClassName:"no-padder",items:[{name:"leftFixed",type:"button-group-select",label:"左侧宽度",size:"xs",options:[{label:"比率",value:""},{label:"小宽度",value:"sm",visibleOn:"this.leftFixed"},{label:"固定宽度",value:"normal"},{label:"大宽度",value:"lg",visibleOn:"this.leftFixed"}]},{name:"leftRate",type:"input-range",visibleOn:"!this.leftFixed",min:1,max:11,step:1,label:"左右分布调整(n/12)",labelRemark:{trigger:"click",className:"m-l-xs",rootClose:!0,content:"一共 12 等份,这里可以设置左侧宽度占比 n/12。",placement:"left"}}]},subFormItemMode:{label:"子表单展示模式",name:"subFormMode",type:"button-group-select",size:"sm",option:"继承",pipeIn:f(""),options:[{label:"继承",value:""},{label:"正常",value:"normal"},{label:"内联",value:"inline"},{label:"水平",value:"horizontal"}]},subFormHorizontalMode:{label:"子表单水平占比设置",name:"subFormHorizontal",type:"switch",onText:"继承",offText:"自定义",mode:"inline",className:"w-full",inputClassName:"text-sm",visibleOn:'this.subFormMode == "horizontal"',pipeIn:function(e){return!e},pipeOut:function(e,t,n){return e?null:n.formHorizontal||{leftFixed:"normal"}}},subFormHorizontal:{type:"combo",syncDefaultValue:!1,visibleOn:'data.subFormMode == "horizontal" && data.subFormHorizontal',name:"subFormHorizontal",multiLine:!0,pipeIn:function(e){return{leftRate:e&&"number"==typeof e.left?e.left:e&&/\bcol\-(?:xs|sm|md|lg)\-(\d+)\b/.test(e.left)?parseInt(RegExp.$1,10):2,leftFixed:e&&e.leftFixed||""}},pipeOut:function(e){var t=Math.min(11,Math.max(1,e.leftRate||2));return{leftFixed:e.leftFixed||"",left:t,right:12-t}},inputClassName:"no-padder",items:[{name:"leftFixed",type:"button-group-select",label:"左侧宽度",size:"xs",options:[{label:"比率",value:""},{label:"小宽度",value:"sm",visibleOn:"this.leftFixed"},{label:"固定宽度",value:"normal"},{label:"大宽度",value:"lg",visibleOn:"this.leftFixed"}]},{name:"leftRate",type:"input-range",visibleOn:"!this.leftFixed",min:1,max:11,step:1,label:"左右分布调整(n/12)",labelRemark:{trigger:"click",className:"m-l-xs",rootClose:!0,content:"一共 12 等份,这里可以设置左侧宽度占比 n/12。",placement:"left"}}]},validations:(i=[{label:"邮箱格式",value:"isEmail"},{label:"Url格式",value:"isUrl"},{label:"数字",value:"isNumeric"},{label:"字母",value:"isAlpha"},{label:"字母和数字",value:"isAlphanumeric"},{label:"整型数字",value:"isInt"},{label:"浮点型数字",value:"isFloat"},{label:"固定长度",value:"isLength"},{label:"最大长度",value:"maxLength"},{label:"最小长度",value:"minLength"},{label:"最大值",value:"maximum"},{label:"最小值",value:"minimum"},{label:"手机号码",value:"isPhoneNumber"},{label:"电话号码",value:"isTelNumber"},{label:"邮编号码",value:"isZipcode"},{label:"身份证号码",value:"isId"},{label:"JSON格式",value:"isJson"},{label:"与指定值相同",value:"equals"},{label:"与指定字段值相同",value:"equalsField"},{label:"自定义正则",value:"matchRegexp"},{label:"自定义正则2",value:"matchRegexp1"},{label:"自定义正则3",value:"matchRegexp2"},{label:"自定义正则4",value:"matchRegexp3"},{label:"自定义正则5",value:"matchRegexp4"}],r=["isEmail","isUrl","isNumeric","isAlpha","isAlphanumeric","isInt","isFloat","isJson","isPhoneNumber","isTelNumber","isZipcode","isId"],{type:"combo",syncDefaultValue:!1,name:"validations",label:"验证规则",addButtonText:"新增规则",multiple:!0,pipeIn:function(e){if("string"==typeof e&&e&&(e=(0,s.str2rules)(e)),!(0,o.isObject)(e))return e;var t=[];return Object.keys(e).forEach((function(n){var i;/^\$\$/.test(n)||t.push(((i={type:n})[n]=Array.isArray(e[n])?e[n][0]:e[n],i))})),t},pipeOut:function(e){if(!Array.isArray(e))return e;var t={};return e.forEach((function(e){var n,a,o=e.type||(n=function(e){return!t[e.value]},(a=l(i,n))?a.value:"")||i[0].value;t[o]=e[o]||!!~r.indexOf(o)||""})),t},items:[{type:"select",unique:!0,name:"type",options:i,columnClassName:"w-sm"},{type:"input-number",name:"isLength",visibleOn:'data.type == "isLength"',placeholder:"设置长度",value:"1"},{type:"input-number",name:"maximum",visibleOn:'data.type == "maximum"',placeholder:"设置最大值"},{type:"input-number",name:"minimum",visibleOn:'data.type == "minimum"',placeholder:"设置最小值"},{type:"input-number",name:"maxLength",visibleOn:'data.type == "maxLength"',placeholder:"设置最大长度值"},{type:"input-number",name:"minLength",visibleOn:'data.type == "minLength"',placeholder:"设置最小长度值"},{type:"input-text",name:"equals",visibleOn:'data.type == "equals"',placeholder:"设置值",value:""},{type:"input-text",name:"equalsField",visibleOn:'data.type == "equalsField"',placeholder:"设置字段名",value:""},{type:"input-text",name:"matchRegexp",visibleOn:'data.type == "matchRegexp"',placeholder:"设置正则规则"},{type:"input-text",name:"matchRegexp1",visibleOn:'data.type == "matchRegexp1"',placeholder:"设置正则规则"},{type:"input-text",name:"matchRegexp2",visibleOn:'data.type == "matchRegexp2"',placeholder:"设置正则规则"},{type:"input-text",name:"matchRegexp3",visibleOn:'data.type == "matchRegexp3"',placeholder:"设置正则规则"},{type:"input-text",name:"matchRegexp4",visibleOn:'data.type == "matchRegexp4"',placeholder:"设置正则规则"}]}),validationErrors:function(){var e=[{label:"邮箱格式",value:"isEmail"},{label:"Url格式",value:"isUrl"},{label:"数字",value:"isNumeric"},{label:"字母",value:"isAlpha"},{label:"字母和数字",value:"isAlphanumeric"},{label:"整型数字",value:"isInt"},{label:"浮点型数字",value:"isFloat"},{label:"固定长度",value:"isLength"},{label:"最大长度",value:"maxLength"},{label:"最小长度",value:"minLength"},{label:"最大值",value:"maximum"},{label:"最小值",value:"minimum"},{label:"JSON格式",value:"isJson"},{label:"手机号码",value:"isPhoneNumber"},{label:"电话号码",value:"isTelNumber"},{label:"邮编号码",value:"isZipcode"},{label:"身份证号码",value:"isId"},{label:"与指定值相同",value:"equals"},{label:"与指定字段值相同",value:"equalsField"},{label:"自定义正则",value:"matchRegexp"},{label:"自定义正则2",value:"matchRegexp1"},{label:"自定义正则3",value:"matchRegexp2"},{label:"自定义正则4",value:"matchRegexp3"},{label:"自定义正则5",value:"matchRegexp4"}],t={isEmail:"Email 格式不正确",isRequired:"这是必填项",isUrl:"Url 格式不正确",isInt:"请输入整形数字",isAlpha:"请输入字母",isNumeric:"请输入数字",isAlphanumeric:"请输入字母或者数字",isFloat:"请输入浮点型数值",isWords:"请输入字母",isUrlPath:"只能输入字母、数字、`-` 和 `_`.",matchRegexp:"格式不正确, 请输入符合规则为 `$1` 的内容。",minLength:"请输入更多的内容,至少输入 $1 个字符。",maxLength:"请控制内容长度, 请不要输入 $1 个字符以上",maximum:"当前输入值超出最大值 $1,请检查",minimum:"当前输入值低于最小值 $1,请检查",isJson:"请检查 Json 格式。",isPhoneNumber:"请输入合法的手机号码",isTelNumber:"请输入合法的电话号码",isZipcode:"请输入合法的邮编地址",isId:"请输入合法的身份证号",isLength:"请输入长度为 $1 的内容",notEmptyString:"请不要全输入空白字符",equalsField:"输入的数据与 $1 值不一致",equals:"输入的数据与 $1 不一致"};return{type:"combo",syncDefaultValue:!1,name:"validationErrors",label:"自定义验证提示",description:"自带提示不满足时,可以自定义。",addButtonText:"新增提示",multiple:!0,pipeIn:function(e){if(!(0,o.isObject)(e))return e;var t=[];return Object.keys(e).forEach((function(n){/^\$\$/.test(n)||t.push({type:n,msg:e[n]})})),t},pipeOut:function(n){if(!Array.isArray(n))return n;var i={};return n.forEach((function(n){var r,a,o=n.type||(r=function(e){return!i[e.value]},(a=l(e,r))?a.value:"")||e[0].value;i[o]=n.msg||t[o]||""})),i},items:[{type:"select",unique:!0,name:"type",options:e,columnClassName:"w-sm"},{type:"input-text",name:"msg",placeholder:"提示信息"},{type:"formula",name:"msg",initSet:!1,formula:"({\n isEmail: 'Email 格式不正确',\n isRequired: '这是必填项',\n isUrl: 'Url 格式不正确',\n isInt: '请输入整形数字',\n isAlpha: '请输入字母',\n isNumeric: '请输入数字',\n isAlphanumeric: '请输入字母或者数字',\n isFloat: '请输入浮点型数值',\n isWords: '请输入字母',\n isUrlPath: '只能输入字母、数字、`-` 和 `_`.',\n matchRegexp: '格式不正确, 请输入符合规则为 `$1` 的内容。',\n minLength: '请输入更多的内容,至少输入 $1 个字符。',\n maxLength: '请控制内容长度, 请不要输入 $1 个字符以上',\n maximum: '当前输入值超出最大值 $1,请检查',\n minimum: '当前输入值低于最小值 $1,请检查',\n isJson: '请检查 Json 格式。',\n isLength: '请输入长度为 $1 的内容',\n notEmptyString: '请不要全输入空白字符',\n equalsField: '输入的数据与 $1 值不一致',\n equals: '输入的数据与 $1 不一致',\n isPhoneNumber: '请输入合法的手机号码',\n isTelNumber: '请输入合法的电话号码',\n isZipcode: '请输入合法的邮编地址',\n isId: '请输入合法的身份证号',\n })[data.type] || ''"}]}}(),submitOnChange:{label:"修改即提交",type:"switch",name:"submitOnChange",mode:"inline",className:"w-full",labelRemark:{trigger:"click",className:"m-l-xs",rootClose:!0,content:"设置后,表单中每次有修改都会触发提交",placement:"left"}},validateOnChange:{type:"button-group-select",name:"validateOnChange",label:"修改即触发表单验证",description:"默认为当表单提交过则每次修改都触发验证。",size:"xs",mode:"inline",className:"w-full",options:[{label:"默认",value:""},{label:"开启",value:!0},{label:"关闭",value:!1}],pipeIn:f(""),pipeOut:function(e){return""===e?void 0:!!e}},validationControl:{type:"ae-validationControl",label:"校验",mode:"normal"},visible:{type:"fieldSet",title:"显隐配置",collapsable:!1,body:[{label:"设置方式",name:"visible",type:"button-group-select",size:"xs",mode:"inline",className:"w-full",options:[{label:"静态设置",value:1},{label:"表达式",value:2}],pipeIn:function(e){return"boolean"==typeof e?1:2},pipeOut:function(e){return 1===e||""},onChange:function(e,t,n,i){e?i.setValues({__visibleOn:i.data.visibleOn,visibleOn:"",clearValueOnHidden:!1}):i.setValueByName("visibleOn",i.data.__visibleOn)}},{type:"switch",label:"可见(visible)",name:"visible",visibleOn:'typeof this.visible === "boolean"',pipeIn:function(e,t){return!1!==e&&!t.hidden},mode:"inline",className:"w-full m-b-none",onChange:function(e,t,n,i){return i.setValueByName("visibleOn","")}},{name:"visibleOn",label:"可见表达式(visibleOn)",labelRemark:{trigger:"click",className:"m-l-xs",rootClose:!0,content:'纯粹的 JS 语法,this 指向当前数据层。文档:<a href="https://baidu.github.io/amis/docs/concepts/expression">表达式语法</a>',placement:"left"},placeholder:"如:this.type === 1",type:"input-text",visibleOn:'typeof this.visible !== "boolean"',autoComplete:!1,pipeIn:function(e,t){return e||t.hiddenOn&&"!("+t.hiddenOn+")"||""},className:"m-b-none"}]},initFetch:{type:"group",label:"是否初始加载",visibleOn:"this.initApi",direction:"vertical",className:"m-b-none",labelRemark:{trigger:"click",rootClose:!0,className:"m-l-xs",content:"当配置初始化接口后,组件初始就会拉取接口数据,可以通过以下配置修改。",placement:"left"},body:[{name:"initFetch",type:"radios",inline:!0,onChange:function(){},options:[{label:"是",value:!0},{label:"否",value:!1},{label:"表达式",value:""}]},{name:"initFetchOn",autoComplete:!1,visibleOn:'typeof this.initFetch !== "boolean"',type:"input-text",placeholder:"如:this.id 表示有 id 值时初始加载",className:"m-t-n-sm"}]},disabled:function(e){return void 0===e&&(e=[]),{type:"fieldSet",title:"禁用配置",collapsable:!1,body:(0,a.__spreadArray)((0,a.__spreadArray)([],e,!0),[{label:"设置方式",name:"disabled",type:"button-group-select",size:"xs",mode:"inline",className:"w-full",options:[{label:"静态设置",value:1},{label:"表达式",value:2}],pipeIn:function(e){return"boolean"==typeof e?1:2},pipeOut:function(e){return 1!==e&&""}},{type:"switch",label:"禁用(disabled)",name:"disabled",visibleOn:'typeof this.disabled === "boolean"',pipeIn:function(e,t){return!1!==e&&!t.hidden},mode:"inline",className:"w-full m-b-none",onChange:function(e,t,n,i){return i.setValueByName("disabledOn","")}},{name:"disabledOn",label:"禁用表达式(disabledOn)",placeholder:"如:this.type === 1",labelRemark:{trigger:"click",className:"m-l-xs",rootClose:!0,content:'纯粹的 JS 语法,this 指向当前数据层。文档:<a href="https://baidu.github.io/amis/docs/concepts/expression">表达式语法</a>',placement:"left"},type:"input-text",visibleOn:'typeof this.disabled !== "boolean"',className:"m-b-none"}],!1)}},switchDefaultValue:{type:"switch",name:"value",label:"设置默认值",mode:"inline",className:"w-full",pipeIn:function(e){return void 0!==e},pipeOut:function(e,t,n){return e?"":void 0},remark:"不设置时根据 name 获取"},multiple:{label:"多选模式",name:"multiple",type:"switch",mode:"inline",className:"w-full"},joinValues:{type:"switch",name:"joinValues",mode:"inline",className:"w-full",visibleOn:"data.multiple",label:"是否拼接值",value:!0,description:"开启后将选中的选项 value 的值用连接符拼接起来,作为当前表单项的值。"},delimiter:{type:"input-text",name:"delimiter",label:"连接符",visibleOn:"data.multiple && data.joinValues",pipeIn:f(",")},extractValue:{type:"switch",name:"extractValue",mode:"inline",className:"w-full",label:"是否抽取value值",visibleOn:"data.joinValues === false",pipeIn:f(!1),description:"开启后将选中的选项 value 的值封装为数组,作为当前表单项的值。"},creatable:{label:"可创建选项",name:"creatable",type:"switch",mode:"inline",className:"w-full"},createBtnLabel:{label:"创建按钮文字",name:"createBtnLabel",type:"input-text",mode:"inline",placeholder:"新增选项",className:"w-full"},editable:{label:"可编辑选项",name:"editable",type:"switch",mode:"inline",className:"w-full"},removable:{label:"可删除选项",name:"removable",type:"switch",mode:"inline",className:"w-full"},ref:function(){return null},imageUrl:{type:"input-text",label:"图片"},fileUrl:{type:"input-text",label:"文件"},markdownBody:{name:"value",type:"editor",language:"markdown",size:"xxl",label:"Markdown 内容",options:{lineNumbers:"off"}},richText:{label:"富文本",type:"input-rich-text",buttons:["paragraphFormat","quote","color","|","bold","italic","underline","strikeThrough","|","formatOL","formatUL","align","|","insertLink","insertImage","insertTable","|","undo","redo","fullscreen"],name:"html",description:'支持使用 <code>\\${xxx}</code> 来获取变量,或者用 lodash.template 语法来写模板逻辑。<a target="_blank" href="/amis/zh-CN/docs/concepts/template">详情</a>',size:"lg"},showCounter:{label:"是否显示计数器",name:"showCounter",type:"switch",mode:"inline",className:"w-full"},borderMode:{type:"select",name:"borderMode",label:"边框模式",options:[{label:"全边框",value:"full"},{label:"半边框",value:"half"},{label:"无边框",value:"none"}]},data:{type:"input-kv",name:"data",label:"初始静态数据"}};function m(e,t){var n=h[e];return"function"==typeof n?n(t):n?t?(0,a.__assign)((0,a.__assign)({},n),t):n:null}function f(e,t){return void 0===t&&(t=!0),t?function(t){return void 0===t?e:t}:function(t){return t||e}}t.styleTpl={name:"style",type:"combo",label:"",noBorder:!0,multiLine:!0,items:[{type:"fieldSet",title:"文字",body:[{type:"group",body:[{label:"文字大小",type:"input-text",name:"fontSize"},{label:"文字粗细",name:"fontWeight",type:"select",options:["normal","bold","lighter","bolder"]}]},{type:"group",body:[{label:"文字颜色",type:"input-color",name:"color"},{label:"对齐方式",name:"textAlign",type:"select",options:["left","right","center","justify","justify-all","start","end","match-parent"]}]}]},{type:"fieldSet",title:"背景",body:[{label:"颜色",name:"backgroundColor",type:"input-color"},m("imageUrl",{name:"backgroundImage"})]},{type:"fieldSet",title:"边距",body:[{type:"group",label:"外边距",body:[{label:"上",name:"marginTop",type:"input-text"},{label:"右",name:"marginRight",type:"input-text"},{label:"下",name:"marginBottom",type:"input-text"},{label:"左",name:"marginLeft",type:"input-text"}]},{type:"group",label:"内边距",body:[{label:"上",name:"paddingTop",type:"input-text"},{label:"右",name:"paddingRight",type:"input-text"},{label:"下",name:"paddingBottom",type:"input-text"},{label:"左",name:"paddingLeft",type:"input-text"}]}]},{type:"fieldSet",title:"边框",body:[{type:"group",body:[{label:"样式",name:"borderStyle",type:"select",options:["none","solid","dotted","dashed"]},{label:"颜色",name:"borderColor",type:"input-color"}]},{type:"group",body:[{label:"宽度",name:"borderWidth",type:"input-text"},{label:"圆角宽度",name:"borderRadius",type:"input-text"}]}]},{type:"fieldSet",title:"特效",body:[{label:"透明度",name:"opacity",min:0,max:1,step:.05,type:"input-range",pipeIn:f(1)},{label:"阴影",name:"boxShadow",type:"input-text"}]}]},h.style=t.styleTpl,t.getSchemaTpl=m,t.setSchemaTpl=function(e,t){h[e]=t},t.valuePipeOut=function(e){try{if("undefined"===e)return;return JSON.parse(e)}catch(t){return e}},t.defaultValue=f},5610:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultDNDMode=void 0;var i=n(752),r=n(1502),a=(0,i.__importDefault)(n(8425)),o=n(9703),l=function(){function e(e,t){this.dnd=e,this.region=t,this.exchangeX=0,this.exchangeY=0,this.dndContainer=this.dnd.store.getDoc().querySelector('[data-region="'+t.region+'"][data-region-host="'+t.id+'"]')}return e.prototype.enter=function(e,t){var n=this.dnd.dragElement,i=Array.isArray(this.region.schema)?this.region.schema:[];if(n&&n.closest("[data-region]")===this.dndContainer){var r=this.getChild(this.dndContainer,n),l=n.getAttribute("data-editor-id"),s=(0,a.default)(i,(function(e){return e.$$id===l}));~s&&i[s+1]&&(this.dropBeforeId=i[s+1].$$id),this.dndContainer.insertBefore(t,r);var d=n.outerHTML.replace("ae-is-draging","").replace(/\bdata\-editor\-id=(?:'.+?'|".+?")/g,"");t.innerHTML=d}else{var u=this.dnd.manager,p=u.store;(0,o.renderThumbToGhost)(t,this.region,p.dragSchema,u),this.dndContainer.appendChild(t)}},e.prototype.leave=function(e,t){this.dndContainer.removeChild(t)},e.prototype.over=function(e,t){var n,i,o=this.getTarget(e),l=this.dndContainer,s=Array.isArray(this.region.schema)?this.region.schema:[],d=e.clientX-this.exchangeX,u=e.clientY-this.exchangeY;if(Math.abs(u),Math.abs(d),o&&!r.animation.animating){var p=o.getAttribute("data-editor-id"),c=this.getChild(l,o),h=(0,a.default)(s,(function(e){return e.$$id===p})),m=Array.prototype.indexOf.call(l.children,t),f=Array.prototype.indexOf.call(l.children,c);~m&&m>f&&(!this.exchangeY||u<0||d<0)?(this.exchangeX=e.clientX,this.exchangeY=e.clientY,this.dropBeforeId=null===(n=s[h])||void 0===n?void 0:n.$$id,m!==f-1&&(r.animation.capture(l),l.insertBefore(t,c),r.animation.animateAll())):~m&&m<f&&(!this.exchangeY||u>0||d>0)&&(this.exchangeX=e.clientX,this.exchangeY=e.clientY,s[h+1]?this.dropBeforeId=null===(i=s[h+1])||void 0===i?void 0:i.$$id:delete this.dropBeforeId,m!==f+1&&(r.animation.capture(l),l.insertBefore(t,c.nextSibling),r.animation.animateAll()))}t.parentNode!==l&&(delete this.dropBeforeId,r.animation.capture(l),l.appendChild(t),r.animation.animateAll())},e.prototype.getDropBeforeId=function(){return this.dropBeforeId},e.prototype.getTarget=function(e){for(var t,n,i=e.target.closest("[data-editor-id]");i;){if((null===(t=i.parentElement)||void 0===t?void 0:t.closest("[data-region]"))===this.dndContainer)return"grid"===i.getAttribute("data-renderer")?i.parentElement:i;i=(null===(n=i.parentElement)||void 0===n?void 0:n.closest("[data-editor-id]"))||null}return null},e.prototype.getChild=function(e,t){for(var n=t;n&&n.parentElement!==e;)n=n.parentElement;return n},e.prototype.dispose=function(){},e}();t.DefaultDNDMode=l},6162:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EditorDNDManager=void 0;var i=n(752),r=(0,i.__importDefault)(n(6918)),a=n(3570),o=n(5610),l=n(8772),s=function(){function e(e,t){this.manager=e,this.store=t,this.toDispose=[],this.dragEnterCount=0,this.lastX=0,this.lastY=0,this.lastMoveAt=0,this.toDispose.push((0,a.reactionWithOldValue)((function(){return"schema"===t.dragType?t.dragId:""}),this.updateDragElements),(0,a.reactionWithOldValue)((function(){return{id:t.dropId,region:t.dropRegion}}),this.updateDropRegion),(0,a.reactionWithOldValue)((function(){return{id:t.planDropId,region:t.planDropRegion}}),this.updatePlanDropRegion)),this.dragGhost=document.createElement("div"),this.dragGhost.classList.add("ae-DragGhost"),this.dragGhost.classList.add("is-ghost")}return e.prototype.createDragImage=function(e,t){var n=document.createElement("div");return n.classList.add("ae-DragImage"),n.innerHTML="<span>"+t.label+"</span>",document.body.appendChild(n),this.dragImage=n,n},e.prototype.disposeDragImage=function(){var e,t=this.dragImage;null===(e=null==t?void 0:t.parentElement)||void 0===e||e.removeChild(t),delete this.dragImage},e.prototype.switchToRegion=function(e,t,n){var i,r,a,o=this.store;if(!t||!n||o.dropId===t&&o.dropRegion===n)return!1;var l=o.getNodeById(t,n),s=l.regionInfo,d=o.dragSchema;if(!1===(null===(i=null==s?void 0:s.accept)||void 0===i?void 0:i.call(s,d)))return!1;var u={mode:o.dragMode,sourceType:o.dragType,sourceId:o.dragId,data:o.dragSchema,targetId:t,targetRegion:n};return!this.manager.trigger("dnd-accept",u).prevented&&(null===(r=this.dndMode)||void 0===r||r.leave(e,this.dragGhost),null===(a=this.dndMode)||void 0===a||a.dispose(),o.setDropId(t,n),this.makeDNDModeInstance(l),this.dndMode.enter(e,this.dragGhost),!0)},e.prototype.makeDNDModeInstance=function(e){var t,n=null===(t=e.regionInfo)||void 0===t?void 0:t.dndMode,i=o.DefaultDNDMode;"position-h"===n&&(i=l.PositionHDNDMode),this.dndMode=new i(this,e)},e.prototype.startDrag=function(e,t){var n,i=this,r=this.store.getNodeById(e),a=this.store.getDoc().querySelector('[data-editor-id="'+e+'"]');r&&a?(this.dragElement=a,t.dataTransfer.effectAllowed="move",t.dataTransfer.setDragImage(this.createDragImage(e,r),0,0),t.dataTransfer.setData(("dnd/ae-node-"+e).toLowerCase(),""),null===(n=t.target)||void 0===n||n.addEventListener("dragend",this.dragEnd),setTimeout((function(){i.store.setDragId(e);var n=r.parent;i.switchToRegion(t,n.id,n.region)}),4)):t.preventDefault()},e.prototype.dragEnter=function(e){var t=this.store;if(this.dragEnterCount++,!t.dragId&&1===this.dragEnterCount)for(var n=e.dataTransfer.types,i=n.length-1;i>=0;i--)if(/^dnd-dom\/(.*)$/.test(n[i])){var r=RegExp.$1,a=document.querySelector(r);if(a){a.addEventListener("dragend",this.dragEnd);var o=a.getAttribute("data-dnd-id"),l=a.getAttribute("data-dnd-type"),s=a.getAttribute("data-dnd-data"),d=s?JSON.parse(s):{type:"tpl",tpl:"Unknown"};t.setDragId(o,"copy",l,d);var u=t.activeContainerId;if(u){var p=t.getNodeById(u);(null==p?void 0:p.childRegions.length)&&this.switchToRegion(e,p.id,p.childRegions[0].region)}break}}},e.prototype.dragOver=function(e){var t=this.store,n=e.target;if(t.dropId&&n){e.preventDefault();var i=e.clientX-this.lastX,r=e.clientY-this.lastY,a=Math.max(Math.abs(i),Math.abs(r)),o=Date.now();if(a<5){var l=n.closest("[data-region][data-region-host]"),s=null==l?void 0:l.getAttribute("data-region-host"),d=null==l?void 0:l.getAttribute("data-region");if(!l||s===t.dropId)return;o-this.lastMoveAt>200&&d&&s&&this.switchToRegion(e,s,d)}else{t.setPlanDropId("",""),this.lastMoveAt=o,this.lastX=e.clientX,this.lastY=e.clientY;var u=n.closest('[data-region][data-region-host="'+t.dropId+'"]'),p=null==u?void 0:u.getAttribute("data-region");p&&p!==t.dropRegion&&this.switchToRegion(e,t.dropId,p),this.dndMode.over(e,this.dragGhost)}}},e.prototype.drop=function(e){return(0,i.__awaiter)(this,void 0,void 0,(function(){var e,t,n,a,o,l;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return e=this.store,t=this.dndMode.getDropBeforeId(),"move"!==e.dragMode?[3,1]:(this.manager.move(e.dropId,e.dropRegion,e.dragId,t),[3,4]);case 1:return"copy"!==e.dragMode?[3,4]:(n=e.dragSchema,a=e.dropId,o=e.dropRegion,l=void 0,"subrenderer"!==e.dragType?[3,3]:(null==(l=(0,r.default)(e.subRenderers,(function(t){return t.id===e.dragId})))?void 0:l.scaffoldForm)?[4,this.manager.scaffold(l.scaffoldForm,n)]:[3,3]);case 2:n=i.sent(),i.label=3;case 3:this.manager.addChild(a,o,n,t,l,{id:e.dragId,type:e.dragType,data:e.dragSchema}),i.label=4;case 4:return[2]}}))}))},e.prototype.dragLeave=function(e){this.dragEnterCount--},e.prototype.dragEnd=function(e){var t,n;null===(t=e.target)||void 0===t||t.removeEventListener("dragend",this.dragEnd),null===(n=this.dndMode)||void 0===n||n.leave(e,this.dragGhost),delete this.dndMode,this.dragGhost.innerHTML="",this.store.setDragId(""),this.store.setDropId(""),this.disposeDragImage(),this.dragEnterCount=0},e.prototype.updateDragElements=function(e){e?[].slice.call(this.store.getDoc().querySelectorAll('[data-editor-id="'+e+'"]')).forEach((function(e){return e.classList.add("ae-is-draging")})):[].slice.call(this.store.getDoc().querySelectorAll(".ae-is-draging")).forEach((function(e){return e.classList.remove("ae-is-draging")}))},e.prototype.updateDropRegion=function(e,t){var n,i;(null==t?void 0:t.id)&&t.region&&(null===(n=this.store.getDoc().querySelector('[data-region="'+t.region+'"][data-region-host="'+t.id+'"]'))||void 0===n||n.classList.remove("is-dragenter")),e.id&&e.region&&(null===(i=this.store.getDoc().querySelector('[data-region="'+e.region+'"][data-region-host="'+e.id+'"]'))||void 0===i||i.classList.add("is-dragenter"))},e.prototype.updatePlanDropRegion=function(e,t){var n,i;(null==t?void 0:t.id)&&t.region&&(null===(n=this.store.getDoc().querySelector('[data-region="'+t.region+'"][data-region-host="'+t.id+'"]'))||void 0===n||n.classList.remove("is-entering")),e.id&&e.region&&(null===(i=this.store.getDoc().querySelector('[data-region="'+e.region+'"][data-region-host="'+e.id+'"]'))||void 0===i||i.classList.add("is-entering"))},e.prototype.dispose=function(){this.disposeDragImage(),this.toDispose.forEach((function(e){return e()})),this.toDispose=[]},(0,i.__decorate)([a.autobind,(0,i.__metadata)("design:type",Function),(0,i.__metadata)("design:paramtypes",[DragEvent]),(0,i.__metadata)("design:returntype",void 0)],e.prototype,"dragEnter",null),(0,i.__decorate)([a.autobind,(0,i.__metadata)("design:type",Function),(0,i.__metadata)("design:paramtypes",[DragEvent]),(0,i.__metadata)("design:returntype",void 0)],e.prototype,"dragOver",null),(0,i.__decorate)([a.autobind,(0,i.__metadata)("design:type",Function),(0,i.__metadata)("design:paramtypes",[DragEvent]),(0,i.__metadata)("design:returntype",Promise)],e.prototype,"drop",null),(0,i.__decorate)([a.autobind,(0,i.__metadata)("design:type",Function),(0,i.__metadata)("design:paramtypes",[DragEvent]),(0,i.__metadata)("design:returntype",void 0)],e.prototype,"dragLeave",null),(0,i.__decorate)([a.autobind,(0,i.__metadata)("design:type",Function),(0,i.__metadata)("design:paramtypes",[DragEvent]),(0,i.__metadata)("design:returntype",void 0)],e.prototype,"dragEnd",null),(0,i.__decorate)([a.autobind,(0,i.__metadata)("design:type",Function),(0,i.__metadata)("design:paramtypes",[String]),(0,i.__metadata)("design:returntype",void 0)],e.prototype,"updateDragElements",null),(0,i.__decorate)([a.autobind,(0,i.__metadata)("design:type",Function),(0,i.__metadata)("design:paramtypes",[Object,Object]),(0,i.__metadata)("design:returntype",void 0)],e.prototype,"updateDropRegion",null),(0,i.__decorate)([a.autobind,(0,i.__metadata)("design:type",Function),(0,i.__metadata)("design:paramtypes",[Object,Object]),(0,i.__metadata)("design:returntype",void 0)],e.prototype,"updatePlanDropRegion",null),e}();t.EditorDNDManager=s},8772:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PositionHDNDMode=void 0;var i=n(752),r=(0,i.__importDefault)(n(8425)),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.__extends)(t,e),t.prototype.enter=function(e,t){t.innerHTML="",t.classList.add("use-position"),t.classList.add("is-horizontal");var n=this.dnd.dragElement,i=this.dndContainer.getBoundingClientRect(),a=Array.isArray(this.region.schema)?this.region.schema:[];if(n&&n.closest("[data-region]")===this.dndContainer){var o=n.getAttribute("data-editor-id"),l=(0,r.default)(a,(function(e){return e.$$id===o}));if(~l&&a[l+1]&&(this.dropBeforeId=a[l+1].$$id),n.nextElementSibling){var s=n.nextElementSibling.getBoundingClientRect();t.style.cssText+="top: 0; left: "+(s.x-i.x)+"px;"}else t.style.cssText+="top: 0; left: 100%;"}else t.style.cssText+="top: 0; left: -999999%;";this.dndContainer.appendChild(t)},t.prototype.leave=function(e,t){t.classList.remove("use-position"),t.classList.remove("is-horizontal")},t.prototype.over=function(e,t){var n,i,r=this.getTarget(e);if(r){if("table"===(null===(n=this.dndContainer)||void 0===n?void 0:n.getAttribute("data-renderer"))){var a=null===(i=r.parentElement)||void 0===i?void 0:i.closest("th[data-editor-id], td[data-editor-id]");a&&this.dndContainer.contains(a)&&(r=a)}var o=this.dndContainer.getBoundingClientRect(),l=(Array.isArray(this.region.schema)&&this.region.schema,r.getBoundingClientRect());r.nextElementSibling&&r.nextElementSibling.hasAttribute("data-editor-id")?(t.style.cssText+="left: "+(l.x-o.x)+"px;",this.dropBeforeId=r.getAttribute("data-editor-id")):e.clientX>l.x+l.width/2?(t.style.cssText+="top: 0; left: "+(l.right-o.x)+"px;",delete this.dropBeforeId):(t.style.cssText+="left: "+(l.x-o.x)+"px;",this.dropBeforeId=r.getAttribute("data-editor-id"))}},t}(n(5610).DefaultDNDMode);t.PositionHDNDMode=a},5951:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.env=void 0;var i=(0,n(752).__importDefault)(n(2167)),r=n(1502);t.env={updateLocation:function(){},jumpTo:function(){r.toast.info("温馨提示:预览模式下禁止跳转")},fetcher:function(e){var t=e.url,n=e.method,r=e.data,a=e.config;return(a=a||{}).withCredentials=!0,a.cancelExecutor&&(a.cancelToken=new i.default.CancelToken(a.cancelExecutor)),"post"!==n&&"put"!==n&&"patch"!==n?(r&&(a.params=r),i.default[n](t,a)):(r&&r instanceof FormData||!r||"string"==typeof r||r instanceof Blob||r instanceof ArrayBuffer||(r=JSON.stringify(r),a.headers=a.headers||{},a.headers["Content-Type"]="application/json"),i.default[n](t,r,a))},isCancel:function(e){return i.default.isCancel(e)},alert:r.alert,confirm:r.confirm,notify:function(e,t){r.toast[e]?r.toast[e](t,"error"===e?"系统错误":"系统消息"):console.warn("[Notify]",e,t)}}},9756:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EditorManager=t.unRegisterEditorPlugin=t.getEditorPlugins=t.registerEditorPlugin=void 0;var i=n(752),r=n(9794),a=n(9933),o=n(3570),l=n(6211),s=n(9703),d=n(5951),u=(0,i.__importDefault)(n(3908)),p=n(1502),c=n(5720),h=(0,i.__importDefault)(n(8425)),m=n(6162),f=[];t.registerEditorPlugin=function(e){(e.prototype&&e.prototype.isNpmCustomWidget?f.find((function(t){return t.prototype.name===e.prototype.name})):f.find((function(t){return t===e})))?console.warn("注册插件异常,已存在同名插件:",e):f.push(e)},t.getEditorPlugins=function(){return f.concat()},t.unRegisterEditorPlugin=function(e){var t=(0,h.default)(f,(function(t){return t.id===e}));~t&&f.splice(t,1)};var g=function(){function e(e,t,n){var r=this;this.config=e,this.store=t,this.parent=n,this.toDispose=[],this.id=(0,o.guid)(),this.disableHover=!1,this.listeners=[],this.lazyPatchSchema=(0,u.default)(this.patchSchema.bind(this),250,{leading:!1,trailing:!0}),this.patching=!1;var a=!!n;this.env=(0,i.__assign)((0,i.__assign)((0,i.__assign)({},d.env),e.amisEnv),{theme:e.theme}),this.hackIn=(null==n?void 0:n.hackIn)||s.hackIn,this.plugins=(null==n?void 0:n.plugins)||(e.disableBultinPlugin?[]:f).concat(e.plugins||[]).map((function(e){var t,n=new e(r);return n.order=null!==(t=n.order)&&void 0!==t?t:0,n})).sort((function(e,t){return e.order-t.order})),this.hackRenderers(),this.dnd=(null==n?void 0:n.dnd)||new m.EditorDNDManager(this,t),a||this.toDispose.push((0,o.reactionWithOldValue)((function(){return t.activeId}),(function(e,t){return(0,i.__awaiter)(r,void 0,void 0,(function(){return(0,i.__generator)(this,(function(n){switch(n.label){case 0:return this.store.insertId&&this.store.closeInsertPanel(),this.buildJSONSchemaUri(),this.buildToolbars(),[4,this.buildRenderers()];case 1:return n.sent(),this.buildPanels(),this.trigger("active",e?(0,i.__assign)((0,i.__assign)({},this.buildEventContext(e)),{active:!0}):{id:t,active:!1}),[2]}}))}))})),(0,l.reaction)((function(){return t.selections.join(",")}),(function(){r.buildPanels()})),(0,l.reaction)((function(){return t.needPatch}),(function(e){e&&r.lazyPatchSchema()})),(0,o.reactionWithOldValue)((function(){return{id:t.hoverId,region:t.hoverRegion}}),(function(e,n){var i,r,a=t.getDoc();e.id&&e.region?null===(i=a.querySelector('[data-region="'+e.region+'"][data-region-host="'+e.id+'"]'))||void 0===i||i.classList.add("is-region-active"):(null==n?void 0:n.id)&&(null==n?void 0:n.region)&&(null===(r=a.querySelector('[data-region="'+n.region+'"][data-region-host="'+n.id+'"]'))||void 0===r||r.classList.remove("is-region-active"))})))}return e.prototype.dynamicAddPlugin=function(e){var t;if(e)if(this.plugins.some((function(t){return t&&t.name===e})))console.warn("[amis-editor]当前已有"+e+"插件");else{var n=f.find((function(t){return t.prototype&&t.prototype.name===e}));if(n){var i=new n(this);i.order=null!==(t=i.order)&&void 0!==t?t:0,this.plugins.push(i),this.plugins.sort((function(e,t){return e.order-t.order})),this.buildRenderers()}}},e.prototype.buildRenderersAndPanels=function(){var e=this;setTimeout((function(){return(0,i.__awaiter)(e,void 0,void 0,(function(){var e,t;return(0,i.__generator)(this,(function(n){switch(n.label){case 0:return(e=this.store).activeId||!(null===(t=null==e?void 0:e.schema)||void 0===t?void 0:t.$$id)?[3,2]:[4,this.buildRenderers()];case 1:n.sent(),this.buildPanels(e.schema.$$id),n.label=2;case 2:return[2]}}))}))}),200)},e.prototype.buildEventContext=function(e){var t="string"==typeof e?this.store.getNodeById(e):e,n=this.store.getSchema(t.id);return{node:t,id:t.id,info:t.info,path:t.path,schemaPath:t.schemaPath,schema:n,data:""}},e.prototype.buildJSONSchemaUri=function(){var e=this.store.activeId,t="";if(e){var n=this.buildEventContext(e),i=this.trigger("before-resolve-json-schema",n);if(t=i.context.data,!i.prevented){this.plugins.forEach((function(e){var i;if(!t){var r=null===(i=e.buildJSONSchema)||void 0===i?void 0:i.call(e,n);r&&(t=r)}})),n.data=t;var r=this.trigger("after-resolve-json-schema",n);t=r.data}}this.store.setJSONSchemaUri(t)},e.prototype.buildToolbars=function(){var e=this.store.activeId,t=[];if(e){var n=this.buildEventContext(e);this.plugins.forEach((function(e){var r,a=(0,i.__assign)({},n);null===(r=e.buildEditorToolbar)||void 0===r||r.call(e,a,t)})),this.trigger("build-toolbars",(0,i.__assign)((0,i.__assign)({},n),{data:t}))}this.store.setActiveToolbars(t.map((function(e){return(0,i.__assign)((0,i.__assign)({},e),{order:e.order||0,id:(0,o.guid)()})})))},e.prototype.collectPanels=function(e,t,n){var r=this;void 0===t&&(t=!1),void 0===n&&(n=!1);var a=[];if(e){var o=(0,i.__assign)((0,i.__assign)({},this.buildEventContext(e)),{secondFactor:n,data:a,selections:this.store.selections.map((function(e){return r.buildEventContext(e)}))});this.plugins.forEach((function(e){var t;null===(t=e.buildEditorPanel)||void 0===t||t.call(e,o,a)})),t&&this.trigger("build-panels",o),a=o.data||a}return a},e.prototype.buildPanels=function(e){var t=e||this.store.activeId,n=[];if(t||this.store.selections.length){t=t||this.store.selections[0];var r=this.store.getNodeById(t);n=r?this.collectPanels(r,!0):n}this.store.setPanels(n.map((function(e){return(0,i.__assign)((0,i.__assign)({},e),{order:e.order||0})})))},e.prototype.collectRenderers=function(e,t){var n,a,l,s;return void 0===t&&(t=this.store.activeContainerId),(0,i.__awaiter)(this,void 0,void 0,(function(){var d,u,p,c,h,m,f,g,v,b,y,_,x;return(0,i.__generator)(this,(function(C){switch(C.label){case 0:if(d=[],!(u=t)&&(null===(n=this.store)||void 0===n?void 0:n.schema)&&(u=null===(a=this.store)||void 0===a?void 0:a.schema.$$id),!u)return[2,d];if(!(p=this.store.getNodeById(u)))return[2,d];for(c=this.store.getSchema(u),h={node:p,id:p.id,info:p.info,path:p.path,schemaPath:p.schemaPath,schema:c,region:e},m=[],f=function(e,t){var n=g.plugins[e],a=null===(l=n.buildSubRenderers)||void 0===l?void 0:l.call(n,h,d,(0,r.getRenderers)());a&&(Array.isArray(a)?a:[a]).forEach((function(e){return d.push((0,i.__assign)((0,i.__assign)({},e),{id:(0,o.guid)(),plugin:n,parent:p.info,order:e.order||0}))})),n.asyncUpdateCustomSubRenderersInfo&&m.push(n)},g=this,v=0,b=this.plugins.length;v<b;v++)f(v);if(!m.length)return[3,4];y=0,_=m.length,C.label=1;case 1:return y<_?(x=m[y],[4,null===(s=x.asyncUpdateCustomSubRenderersInfo)||void 0===s?void 0:s.call(x,h,d,(0,r.getRenderers)())]):[3,4];case 2:C.sent(),C.label=3;case 3:return y++,[3,1];case 4:return[2,d.filter((function(e){return!e.disabledRendererPlugin}))]}}))}))},e.prototype.buildRenderers=function(e){return(0,i.__awaiter)(this,void 0,void 0,(function(){var t;return(0,i.__generator)(this,(function(n){switch(n.label){case 0:return[4,this.collectRenderers(e)];case 1:return t=n.sent(),this.store.setSubRenderers(t),this.store.changeSubRendererRegion(e||""),[2]}}))}))},e.prototype.rebuild=function(){return(0,i.__awaiter)(this,void 0,void 0,(function(){return(0,i.__generator)(this,(function(e){switch(e.label){case 0:return[4,this.buildRenderers()];case 1:return e.sent(),this.buildToolbars(),this.buildPanels(),[2]}}))}))},e.prototype.switchToRegion=function(e){this.store.activeId&&this.buildRenderers(e)},e.prototype.showInsertPanel=function(e,t,n,r,a,o){var l,s,d;return void 0===t&&(t=this.store.activeId),void 0===r&&(r="insert"),void 0===a&&(a=""),(0,i.__awaiter)(this,void 0,void 0,(function(){var u,p;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return void 0===n&&t&&(u=this.store.getNodeById(t),n=null===(d=null===(s=null===(l=null==u?void 0:u.info)||void 0===l?void 0:l.regions)||void 0===s?void 0:s.find((function(t){return t.key===e})))||void 0===d?void 0:d.preferTag),[4,this.collectRenderers(e,t)];case 1:return p=i.sent(),this.store.setInsertRenderers(p),this.store.setInsertRegion(e,t,n,r,a,o),[2]}}))}))},e.prototype.showReplacePanel=function(e,t){var n=this.store.getNodeById(e),i=null==n?void 0:n.parent;if(n&&i&&i.isRegion&&i.parent){var r=i.parent;this.showInsertPanel(i.region,r.id,t,"replace",n.id)}},e.prototype.showRendererPanel=function(e,t){this.store.showRendererPanel(e,t)},e.prototype.on=function(e,t){this.listeners.push({type:e,fn:t})},e.prototype.off=function(e,t){var n=(0,h.default)(this.listeners,(function(n){return n.type===e&&n.fn===t}));~n&&this.listeners.splice(n,1)},e.prototype.trigger=function(e,t){var n,i,r=(0,a.createEvent)(e,t),l=(0,o.camelize)(/^(?:before|after)/.test(e)?e:"on-"+e),s=this.listeners.filter((function(t){return t.type===e}));return this.plugins.forEach((function(t){return t[l]&&s.push({type:e,fn:t[l].bind(t)})})),s.some((function(e){var t=e.fn.call(null,r);return!1===t?(r.preventDefault(),r.stopPropagation()):void 0!==t&&r.setData(t),r.stoped})),r.stoped||!1!==(null===(i=(n=this.config)[l])||void 0===i?void 0:i.call(n,r))||(r.preventDefault(),r.stopPropagation()),r},e.prototype.addElem=function(e){var t;return(0,i.__awaiter)(this,void 0,void 0,(function(){var n,r,a,l,s,d,u,c,h,m,f,g,v,b;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:if(!e)return[2];if(n="",(0,o.isString)(e)?n=e.toString():(0,o.isObject)(e)&&(r=e),a=this.store,n&&(l=a.getSubRendererById(n)),!l&&!r)return[2];if(s=a.activeId,!(d=a.getNodeById(s)))return p.toast.warning("请先选择一个元素作为插入的位置。"),[2];if(u=d.parent,c=null,h=null,m=null,a.activeRegion)h=s,m=a.activeRegion;else if(d.schema.columns)h=s,m="columns";else if(d.schema.body)h=s,m="body";else if(u){if(h=u.id,m=u.region,!u.region&&u.schema.body)m="body";else if(!u.region&&!u.schema.body)return p.toast.warning("当前节点不允许追加新组件。"),[2];f=a.getSchemaParentById(s),g=-1,f.some((function(e,t){var n=!1;return e.$$id===s&&(g=t,n=!0),n})),c=null===(t=f[g+1])||void 0===t?void 0:t.$$id}else h=s,m="body";return v=r,!l||r?[3,2]:(v=l.scaffold||{type:l.type},l.scaffoldForm?[4,this.scaffold(l.scaffoldForm,v)]:[3,2]);case 1:v=i.sent(),i.label=2;case 2:return(b=this.addChild(h,m,v,c,l))&&setTimeout((function(){a.setActiveId(b.$$id)}),100),[2]}}))}))},e.prototype.appendSiblingSchema=function(e){var t;return(0,i.__awaiter)(this,void 0,void 0,(function(){var n,r,a,o,l,s,d,u,c,h;return(0,i.__generator)(this,(function(i){if(!e)return[2];if(n=this.store,r=n.activeId,!(a=n.getNodeById(r)))return p.toast.warning("请先选择一个元素作为插入的位置。"),[2];if(o=a.parent,l=null,s=null,d=null,o){if(s=o.id,d=o.region,!o.region&&o.schema.body)d="body";else if(!o.region&&!o.schema.body)return p.toast.warning("当前节点不允许追加新组件。"),[2];u=n.getSchemaParentById(r),c=-1,u.some((function(e,t){var n=!1;return e.$$id===r&&(c=t,n=!0),n})),l=null===(t=u[c+1])||void 0===t?void 0:t.$$id,(h=this.addChild(s,d,e,l))&&setTimeout((function(){n.setActiveId(h.$$id)}),100)}return[2]}))}))},e.prototype.insert=function(){return(0,i.__awaiter)(this,void 0,void 0,(function(){var e,t,n,r,a,o,l;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return e=this.store,(t=e.selectedInsertRendererInfo)?(n=e.insertId,r=e.insertRegion,a=e.insertBeforeId,o=t.scaffold||{type:t.type},t.scaffoldForm?[4,this.scaffold(t.scaffoldForm,o)]:[3,2]):[2];case 1:o=i.sent(),i.label=2;case 2:return(l=this.addChild(n,r,o,a,t))&&(e.closeInsertPanel(),setTimeout((function(){e.setActiveId(l.$$id)}),100)),[2]}}))}))},e.prototype.replace=function(){return(0,i.__awaiter)(this,void 0,void 0,(function(){var e,t,n,r,a,o=this;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return e=this.store,(t=e.selectedInsertRendererInfo)?(n=e.insertOrigId,r=t.scaffold||{type:t.type},a=e.insertRegion,t.scaffoldForm?[4,this.scaffold(t.scaffoldForm,r)]:[3,2]):[2];case 1:r=i.sent(),i.label=2;case 2:return this.replaceChild(n,r,t,a)&&(e.closeInsertPanel(),setTimeout((function(){o.rebuild()}),4)),[2]}}))}))},e.prototype.getEditorInfo=function(e,t,n){var r=null,a=n.$$id?this.store.getSchemaPath(n.$$id):"",o={renderer:e,path:t,schemaPath:a,schema:n},l=this.trigger("before-resolve-editor-info",o);return l.prevented?l.context.data:(this.plugins.some((function(t){var l,s=null===(l=t.getRendererInfo)||void 0===l?void 0:l.call(t,o);return!!s&&(r=(0,i.__assign)((0,i.__assign)({id:n.$$id},s),{plugin:t,renderer:e,schemaPath:a}),!0)})),this.trigger("after-resolve-editor-info",(0,i.__assign)((0,i.__assign)({},o),{data:r})).context.data)},e.prototype.panelChangeValue=function(e,t){var n=this.store,r=(0,i.__assign)((0,i.__assign)({},this.buildEventContext(n.activeId)),{value:e,diff:t});this.trigger("before-update",r).prevented||(n.changeValue(e,t),this.trigger("after-update",r))},e.prototype.openSubEditor=function(e){this.store.openSubEditor(e)},e.prototype.openContextMenu=function(e,t,n){var r=this,a=[],o=this.buildEventContext(e),l=(0,i.__assign)((0,i.__assign)({},o),{selections:this.store.selections.map((function(e){return r.buildEventContext(e)})),region:t,data:a});(a=this.buildContextMenus(l)).length&&(this.store.setContextId(e),(0,p.openContextMenus)({x:n.x,y:n.y},a,(function(){return r.store.setContextId("")})))},e.prototype.buildContextMenus=function(e){return this.plugins.forEach((function(t){var n;null===(n=t.buildEditorContextMenu)||void 0===n||n.call(t,e,e.data)})),this.trigger("build-context-menus",e),e.data},e.prototype.closeContextMenu=function(){},e.prototype.moveUp=function(){var e,t=this.store;if(t.activeId){var n=t.getNodeById(t.activeId),r=n.parent,a=n.host,o=this.buildEventContext(a),l=(0,i.__assign)((0,i.__assign)({},o),{sourceId:n.id,direction:"up",beforeId:null===(e=n.prevSibling)||void 0===e?void 0:e.id,region:r.region});this.trigger("before-move",l).prevented||(t.moveUp(n.id),this.buildToolbars(),this.trigger("after-move",l))}},e.prototype.moveDown=function(){var e,t,n=this.store;if(n.activeId){var r=n.getNodeById(n.activeId),a=r.parent,o=r.host,l=this.buildEventContext(o),s=(0,i.__assign)((0,i.__assign)({},l),{sourceId:r.id,direction:"up",beforeId:null===(t=null===(e=r.nextSibling)||void 0===e?void 0:e.nextSibling)||void 0===t?void 0:t.id,region:a.region});this.trigger("before-move",s).prevented||(n.moveDown(r.id),this.buildToolbars(),this.trigger("after-move",s))}},e.prototype.del=function(e){if(e&&e.length){var t=Array.isArray(e)?e[0]:e,n=(0,i.__assign)((0,i.__assign)({},this.buildEventContext(t)),{data:Array.isArray(e)?e.concat():[]});this.trigger("before-delete",n).prevented||(Array.isArray(n.data)&&n.data.length?this.store.delMulti(n.data):this.store.del(t),this.trigger("after-delete",n))}},e.prototype.duplicate=function(e){this.store.duplicate(e)},e.prototype.copy=function(e){var t=this.store.getValueOf(e);this.clipboardData=(0,c.stringify)(t),p.toast.info("配置项已复制")},e.prototype.cut=function(e){this.copy(e),this.del(e)},e.prototype.paste=function(e,t){return(0,i.__awaiter)(this,void 0,void 0,(function(){var n;return(0,i.__generator)(this,(function(i){return this.clipboardData?(n=(0,o.reGenerateID)((0,c.parse)(this.clipboardData)),t?this.addChild(e,t,n):this.replaceChild(e,n),[2]):((0,p.alert)("剪切板内容为空"),[2])}))}))},e.prototype.emptyRegion=function(e,t){var n=this;this.store.emptyRegion(e,t),setTimeout((function(){n.store.activeId&&n.store.getNodeById(n.store.activeId)||n.store.setActiveId(e)}),100)},e.prototype.addChild=function(e,t,n,r,a,l){var s=this.store,d=-1,u=this.buildEventContext(e);if("id"in n||(n=(0,i.__assign)((0,i.__assign)({},n),{id:"u:"+(0,o.guid)()})),r){var p=u.schema[t];Array.isArray(p)&&(d=(0,h.default)(p,(function(e){return(null==e?void 0:e.$$id)===r})))}var c=(0,i.__assign)((0,i.__assign)({},u),{beforeId:r,index:d,region:t,data:n,subRenderer:a,dragInfo:l}),m=this.trigger("before-insert",c);if(!m.prevented){var f=s.insertSchema(m);return this.trigger("after-insert",c),f}return null},e.prototype.move=function(e,t,n,r){var a=this.store,o=(0,i.__assign)((0,i.__assign)({},this.buildEventContext(e)),{beforeId:r,region:t,sourceId:n}),l=this.trigger("before-move",o);return!l.prevented&&(a.moveSchema(l),this.trigger("after-move",o),!0)},e.prototype.replaceChild=function(e,t,n,r){var a=(0,i.__assign)((0,i.__assign)({},this.buildEventContext(e)),{data:t,subRenderer:n,region:r}),o=this.trigger("before-replace",a);return!(o.prevented||!o.context.data||(this.store.replaceChild(e,o.context.data),this.trigger("after-replace",a),0))},e.prototype.setActiveId=function(e){this.store.setActiveId(e)},e.prototype.openConfigPanel=function(e){var t=this.store;t.activeId!==e&&t.setActiveId(e),t.changePanelKey("config")},e.prototype.openCodePanel=function(e){var t=this.store;t.activeId!==e&&t.setActiveId(e),t.changePanelKey("code")},e.prototype.toggleSelection=function(e){var t=this.store,n=t.selections.concat();!n.length&&t.activeId&&n.push(t.activeId);var i=n.indexOf(e);~i?n.splice(i,1):n.push(e),this.setSelection(n,e)},e.prototype.setSelection=function(e,t){var n=this;void 0===t&&(t=e[0]);var r=this.store,a=this.buildEventContext(t),o=(0,i.__assign)((0,i.__assign)({},a),{selections:e.map((function(e){return n.buildEventContext(e)})),data:e});this.trigger("selection-change",o).prevented||(1===(e=o.data).length?r.setActiveId(e[0]):r.setSelections(e))},e.prototype.startDrag=function(e,t){t.persist(),this.dnd.startDrag(e,t.nativeEvent)},e.prototype.scaffold=function(e,t){return(0,i.__awaiter)(this,void 0,void 0,(function(){var n=this;return(0,i.__generator)(this,(function(r){return[2,new Promise((function(r){n.store.openScaffoldForm((0,i.__assign)((0,i.__assign)({},e),{value:e.pipeIn?e.pipeIn(t):t,callback:r}))}))]}))}))},e.prototype.reScaffold=function(e,t,n){return(0,i.__awaiter)(this,void 0,void 0,(function(){var r;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return[4,this.scaffold(t,n)];case 1:return r=i.sent(),this.replaceChild(e,r),[2]}}))}))},e.prototype.patchSchema=function(e){var t=this;if(void 0===e&&(e=!1),!this.patching){this.patching=!0;var n=function(i){i.forEach((function(i){i.uniqueChildren&&i.uniqueChildren.length&&n(i.uniqueChildren),i.isRegion||i.patch(t.store,e)}))};n(this.store.root.children),this.patching=!1}},e.prototype.hackRenderers=function(e){var t=this;void 0===e&&(e=(0,r.getRenderers)());var n=[];e.forEach((function(e){t.plugins.filter((function(t){var n;return Array.isArray(null==t?void 0:t.regions)&&t.regions.some((function(n){var i;return n.renderMethod&&(null!==(i=n.rendererName)&&void 0!==i?i:t.rendererName)===e.name}))||t.overrides&&(null!==(n=t.overrideTargetRendererName)&&void 0!==n?n:t.rendererName)===e.name})).forEach((function(t){var i,r,a=null===(i=t.regions)||void 0===i?void 0:i.filter((function(n){var i;return n.renderMethod&&(null!==(i=n.rendererName)&&void 0!==i?i:t.rendererName)===e.name}));(null==a?void 0:a.length)&&n.push({renderer:e,regions:a}),t.overrides&&(null!==(r=t.overrideTargetRendererName)&&void 0!==r?r:t.rendererName)===e.name&&n.push({renderer:e,overrides:t.overrides})}))})),n.forEach((function(e){var n=e.regions,i=e.renderer,r=e.overrides;return t.hackIn(i,n,r)}))},e.prototype.makeWrapper=function(e,t){var n;return(null===(n=this.parent)||void 0===n?void 0:n.makeWrapper)?this.parent.makeWrapper(e,t):(0,s.makeWrapper)(this,e,t)},e.prototype.makeSchemaFormRender=function(e){return(0,s.makeSchemaFormRender)(this,e)},e.prototype.onWidthChangeStart=function(e,t){return this.trigger("width-change-start",(0,i.__assign)((0,i.__assign)({},t),{nativeEvent:e}))},e.prototype.onHeightChangeStart=function(e,t){return this.trigger("height-change-start",(0,i.__assign)((0,i.__assign)({},t),{nativeEvent:e}))},e.prototype.onSizeChangeStart=function(e,t){return this.trigger("size-change-start",(0,i.__assign)((0,i.__assign)({},t),{nativeEvent:e}))},e.prototype.openNodePopOverForm=function(e){var t,n,i,r,a="string"==typeof e?this.store.getNodeById(e):e;if(a&&((null===(n=null===(t=a.info)||void 0===t?void 0:t.plugin)||void 0===n?void 0:n.popOverBody)||(null===(r=null===(i=a.info)||void 0===i?void 0:i.plugin)||void 0===r?void 0:r.popOverBodyCreator))){var o=a.info.plugin,l=this.store,s={body:o.popOverBodyCreator?o.popOverBodyCreator(this.buildEventContext(a)):o.popOverBody,value:l.getValueOf(a.id),callback:this.panelChangeValue,target:function(){return document.querySelector('[data-editor-id="'+a.id+'"]')}};l.openPopOverForm(s)}},e.prototype.dispose=function(){this.toDispose.forEach((function(e){return e()})),this.toDispose=[],this.listeners.splice(0,this.listeners.length),this.lazyPatchSchema.cancel(),this.dnd.dispose()},(0,i.__decorate)([o.autobind,(0,i.__metadata)("design:type",Function),(0,i.__metadata)("design:paramtypes",[Object,Object]),(0,i.__metadata)("design:returntype",void 0)],e.prototype,"panelChangeValue",null),e}();t.EditorManager=g},9933:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BasePlugin=t.createEvent=void 0;var i=n(752),r=(0,i.__importDefault)(n(6689)),a=(0,i.__importDefault)(n(6918));t.createEvent=function(e,t){var n={context:t,type:e,prevented:!1,stoped:!1,preventDefault:function(){n.prevented=!0},stopPropagation:function(){n.stoped=!0},get data(){return n.context.data},setData:function(e){n.context.data=e}};return n};var o=function(){function e(e){this.manager=e}return e.prototype.getRendererInfo=function(e){var t=e.renderer,n=this;if(e.schema.$$id&&n.name&&n.rendererName&&n.rendererName===t.name)return{name:n.name,regions:n.regions,patchContainers:n.patchContainers,vRendererConfig:n.vRendererConfig,wrapperProps:n.wrapperProps,wrapperResolve:n.wrapperResolve,filterProps:n.filterProps,$schema:n.$schema,renderRenderer:n.renderRenderer,multifactor:n.multifactor,scaffoldForm:n.scaffoldForm,disabledRendererPlugin:n.disabledRendererPlugin,isBaseComponent:n.isBaseComponent,rendererName:n.rendererName}},e.prototype.buildEditorPanel=function(e,t){var n,r,a,o,l=this;if(this.manager.store.activeId&&!e.selections.length&&(!e.info.hostId&&(l.panelControls||l.panelControlsCreator||l.panelBody||l.panelBodyCreator)&&e.info.plugin===this?t.push({key:"config",icon:l.panelIcon||l.icon||"fa fa-cog",title:l.panelTitle||"设置",render:this.manager.makeSchemaFormRender({definitions:l.panelDefinitions,submitOnChange:l.panelSubmitOnChange,api:l.panelApi,body:l.panelBodyCreator?l.panelBodyCreator(e):l.panelBody,controls:l.panelControlsCreator?l.panelControlsCreator(e):l.panelControls})}):e.info.plugin===this&&e.info.hostId&&((null===(n=l.vRendererConfig)||void 0===n?void 0:n.panelControls)||(null===(r=l.vRendererConfig)||void 0===r?void 0:r.panelControlsCreator)||(null===(a=l.vRendererConfig)||void 0===a?void 0:a.panelBody)||(null===(o=l.vRendererConfig)||void 0===o?void 0:o.panelBodyCreator))&&t.push({key:e.info.multifactor?"vconfig":"config",icon:l.vRendererConfig.panelIcon||"fa fa-cog",title:l.vRendererConfig.panelTitle||"设置",render:this.manager.makeSchemaFormRender({submitOnChange:l.panelSubmitOnChange,api:l.panelApi,definitions:l.vRendererConfig.panelDefinitions,controls:l.vRendererConfig.panelControlsCreator?l.vRendererConfig.panelControlsCreator(e):l.vRendererConfig.panelControls,body:l.vRendererConfig.panelBodyCreator?l.vRendererConfig.panelBodyCreator(e):l.vRendererConfig.panelBody})}),e.info.plugin===this&&e.info.multifactor)){var s=e.node.sameIdChild;s&&this.manager.collectPanels(s,!1,!0).forEach((function(e){var n,r;if("code"===e.key){var a=t.some((function(e){return"code"===e.key}));a||t.push(e)}else"renderers"===e.key?(a=t.some((function(e){return"renderers"===e.key})),a||t.push(e)):"outline"===e.key||"commonConfig"===e.key||"name-list"===e.key||t.push((0,i.__assign)((0,i.__assign)({},e),{key:"sub-"+e.key,icon:(null===(r=null===(n=s.info)||void 0===n?void 0:n.plugin)||void 0===r?void 0:r.icon)||e.icon}))}))}},e.prototype.buildSubRenderers=function(e,t,n){var i=this;return Array.isArray(i.scaffolds)?i.scaffolds.map((function(e){var t,n,r,a,o,l,s,d;return{name:null!==(t=e.name)&&void 0!==t?t:i.name,icon:null!==(n=e.icon)&&void 0!==n?n:i.icon,description:null!==(r=e.description)&&void 0!==r?r:i.description,previewSchema:null!==(a=e.previewSchema)&&void 0!==a?a:i.previewSchema,tags:null!==(o=e.tags)&&void 0!==o?o:i.tags,docLink:null!==(l=e.docLink)&&void 0!==l?l:i.docLink,type:null!==(s=e.type)&&void 0!==s?s:i.type,scaffold:null!==(d=e.scaffold)&&void 0!==d?d:i.scaffold,scaffoldForm:i.scaffoldForm,disabledRendererPlugin:i.disabledRendererPlugin,isBaseComponent:i.isBaseComponent,rendererName:i.rendererName}})):i.name&&i.description?{name:i.name,icon:i.icon,description:i.description,previewSchema:i.previewSchema,tags:i.tags,docLink:i.docLink,type:i.type,scaffold:i.scaffold,scaffoldForm:i.scaffoldForm,disabledRendererPlugin:i.disabledRendererPlugin,isBaseComponent:i.isBaseComponent,rendererName:i.rendererName}:void 0},e.prototype.buildEditorContextMenu=function(e,t){var n,i,r=this,a=e.id,o=e.schema,l=(e.region,e.info),s=e.selections,d=this;l.plugin!==d||s.length||!(null===(n=d.scaffoldForm)||void 0===n?void 0:n.canRebuild)&&!(null===(i=l.scaffoldForm)||void 0===i?void 0:i.canRebuild)||t.push({label:"快速构建「"+l.plugin.name+"」",disabled:o.$$commonSchema,onSelect:function(){return r.manager.reScaffold(a,l.scaffoldForm||d.scaffoldForm,o)}})},e.prototype.buildEditorToolbar=function(e,t){var n,i,r=this,a=e.id,o=e.schema,l=e.info,s=this;l.plugin===s&&((null===(n=s.scaffoldForm)||void 0===n?void 0:n.canRebuild)||(null===(i=l.scaffoldForm)||void 0===i?void 0:i.canRebuild))&&t.push({iconSvg:"harmmer",tooltip:"快速构建「"+l.plugin.name+"」",placement:"bottom",onClick:function(){return r.manager.reScaffold(a,l.scaffoldForm||s.scaffoldForm,o)}})},e.prototype.renderPlaceholder=function(e,t){return r.default.createElement("div",{key:t,className:"wrapper-sm b-a b-light m-b-sm",children:r.default.createElement("span",{className:"text-muted",children:e})})},e.prototype.getPlugin=function(e){return(0,a.default)(this.manager.plugins,(function(t){return"string"==typeof e?t.rendererName===e:t instanceof e}))},e}();t.BasePlugin=o},2406:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EditorNodeContext=t.EditorNode=void 0;var i=n(752),r=n(2717),a=n(3570),o=n(1502),l=(0,i.__importDefault)(n(6689)),s=n(8425);t.EditorNode=r.types.model("EditorNode",{parentId:"",parentRegion:"",isCommonConfig:!1,id:"",label:"",regionInfo:r.types.maybe(r.types.frozen()),path:"",schemaPath:"",region:"",preferTag:"",state:r.types.optional(r.types.frozen(),{}),widthMutable:!1,heightMutable:!1,memberIndex:-1,folded:!1,patched:!1,x:0,y:0,w:0,h:0,children:r.types.optional(r.types.array(r.types.late((function(){return t.EditorNode}))),[])}).volatile((function(){return{getData:r.types.frozen()}})).views((function(e){var t;return{get info(){return t},setInfo:function(e){t=e},get isVitualRenderer(){return!!~e.memberIndex},get clickable(){var e,t;return!1!==(null===(e=this.info)||void 0===e?void 0:e.editable)||!(null===(t=this.info)||void 0===t?void 0:t.hostId)},get draggable(){var e;return!(!this.moveable||!1===(null===(e=this.info)||void 0===e?void 0:e.draggable))},get moveable(){var e,t;return!(this.isRegion||!1===(null===(e=this.info)||void 0===e?void 0:e.movable)||!Array.isArray(this.schemaParent)||(null===(t=this.host)||void 0===t?void 0:t.memberImmutable(this.parent.region)))},get canMoveUp(){return!(this.isRegion||!this.moveable||!Array.isArray(this.schemaParent)||!this.prevSibling)},get canMoveDown(){return!(this.isRegion||!this.moveable||!Array.isArray(this.schemaParent)||!this.nextSibling)},get removable(){var e;return!(this.isRegion||!1===(null===(e=this.info)||void 0===e?void 0:e.removable)||!Array.isArray(this.schemaParent)||!this.host||this.host.memberImmutable(this.parent.region))},get duplicatable(){var e;return!(this.isRegion||!1===(null===(e=this.info)||void 0===e?void 0:e.duplicatable)||!Array.isArray(this.schemaParent)||this.host.memberImmutable(this.parent.region))},get replaceable(){var e;return!this.isRegion&&!1!==(null===(e=this.info)||void 0===e?void 0:e.replaceable)},memberImmutable:function(e){var t,n;return!!(!0===(null===(t=this.info)||void 0===t?void 0:t.memberImmutable)||Array.isArray(null===(n=this.info)||void 0===n?void 0:n.memberImmutable)&&~this.info.memberImmutable.indexOf(e))},get isRegion(){return!!e.region},get childRegions(){var e,t,n=this.uniqueChildren.filter((function(e,t,n){return e.isRegion}));if(null===(e=this.info)||void 0===e?void 0:e.multifactor){var i=this.sameIdChild;null===(t=null==i?void 0:i.childRegions)||void 0===t||t.forEach((function(e){return n.push(e)}))}return n},get uniqueChildren(){var t=e.children.filter((function(e,t,n){return n.findIndex((function(t){return e.isRegion?t.id===e.id&&t.region===e.region:t.id===e.id}))===t}));if(Array.isArray(this.schema)){var n=this.schema;t=t.sort((function(e,t){return s(n,(function(t){return(null==t?void 0:t.$$id)===e.id}))-s(n,(function(e){return(null==e?void 0:e.$$id)===t.id}))}))}return t},get sameIdChild(){var t;return null===(t=this.uniqueChildren)||void 0===t?void 0:t.find((function(t){return!t.isRegion&&t.id===e.id}))},get singleRegion(){return!(1!==this.uniqueChildren.length||!this.uniqueChildren[0].isRegion)},isExists:function(t){return e.children.some((function(e){return e.id===t}))},getChildById:function(t){return e.children.find((function(e){return e.id===t}))},get parent(){var t=(0,r.getParent)(e,2);return"root"!==(null==t?void 0:t.id)?t:null},get host(){var t=e.parent;return(null==t?void 0:t.isRegion)&&(t=t.parent),t},get firstChild(){var t=e;if(!t.children.length)return null;for(var n=t.children[0];n;){if(!n.isRegion&&n.id!==t.id)return n;n=n.children.length?n.children[0]:null}return null},get index(){return this.parent.uniqueChildren.indexOf(e)},get prevSibling(){for(var t=this.parent.uniqueChildren,n=t.indexOf(e)-1;n>=0&&t[n];){if(t[n].id!==e.id)return t[n];n--}return null},get nextSibling(){for(var t=this.parent.uniqueChildren,n=t.length,i=t.indexOf(e)+1;i<n&&t[i];){if(t[i].id!==e.id)return t[i];i++}return null},get schema(){var t=(0,r.getRoot)(e).getSchema(e.id);return this.isRegion&&t&&(t=t[e.region]),t},get schemaParent(){var t=(0,r.getRoot)(e);return this.isRegion?t.getSchema(e.id):t.getSchemaParentById(e.id)},get isSecondFactor(){var t;return(null===(t=this.parent)||void 0===t?void 0:t.id)===e.id}}})).actions((function(e){function t(e,n){var r=!1,o={};if(e)return n.forEach((function(n){var i=n.split(".");n=i.shift();var l=e[n];if("string"==typeof l)return r=!0,void(o[n]=[(0,a.JSONPipeIn)({type:"tpl",tpl:l,inline:!1})]);if(Array.isArray(l)){var s=!1,d=l.map((function(e){if("string"==typeof e&&e)return s=!0,(0,a.JSONPipeIn)({type:"tpl",tpl:e,inline:!1});if(i.length){var n=t(e,[i.join(".")]);n!==e&&(s=!0,e=n)}return e}));s&&(r=!0,o[n]=d)}else l&&(o[n]=[(0,a.JSONPipeIn)(l)],r=!0)})),r&&(e=(0,i.__assign)((0,i.__assign)({},e),o)),e}function n(t){var n=Array.isArray(t)?t:t?[t]:[];if(n.length){var i=(0,r.getRoot)(e).getIframe(),a=(0,r.getRoot)(e).getLayer().getBoundingClientRect(),o=function(e){for(var t=e.concat(),n=t.shift(),i=n.getBoundingClientRect(),r={left:i.left,top:i.top,width:i.width,height:i.height,right:i.right,bottom:i.bottom},a=n.parentElement.closest(".ae-Preview-inner,[data-region]");t.length;){var o=t.shift(),l=o.getBoundingClientRect(),s=o.parentElement.closest(".ae-Preview-inner,[data-region],[data-editor-id]");if(!a&&s)a=s;else if(s&&a&&s!==a)continue;r.left=Math.min(r.left,l.left),r.top=Math.min(r.top,l.top),r.right=Math.max(r.right,l.right),r.bottom=Math.max(r.bottom,l.bottom),r.width=r.right-r.left,r.height=r.bottom-r.top}return r}(n),l={left:o.left-a.left,top:o.top-a.top};if(i){var s=i.getBoundingClientRect();l.left+=s.left,l.top+=s.top}var d=o.height;d&&(e.x=l.left+0,e.y=l.top+0,e.w=o.width,e.h=d)}}var l;return{updateIsCommonConfig:function(t){e.isCommonConfig=!!t},addChild:function(t){e.children.push((0,i.__assign)((0,i.__assign)({},t),{parentId:e.id,parentRegion:e.region}));var n=e.children[e.children.length-1];return n.setInfo(t.info),n},removeChild:function(t){var n=e.children.findIndex((function(e){return e===t}));e.children.splice(n,1)},toggleFold:function(t){t.stopPropagation(),t.preventDefault(),e.folded=!e.folded},patch:function(n,i){if(void 0===i&&(i=!1),!e.patched||i){e.patched=!0;var r=n,l=e.info;if(!1!==l.editable){var s=r.getSchema(l.id),d=s;(Array.isArray(l.regions)&&l.regions.length||Array.isArray(l.patchContainers))&&(d=t(d,l.patchContainers||l.regions.map((function(e){return e.key})))),d=(0,o.filterSchema)(d,{component:l.renderer.component}),(d=(0,a.JSONPipeIn)(d))!==s&&r.changeValueById(l.id,d,void 0,!0,!0)}}},updateSchema:function(t){var n=e.info;if(!1!==n.editable){var a=(0,r.getRoot)(e),o=a.getSchema(n.id);o=(0,i.__assign)((0,i.__assign)({},o),t),a.changeValueById(n.id,o)}},setComponent:function(e){l=e},getComponent:function(){return l},calculateHighlightBox:function(t){var i;if(void 0===t&&(t=(0,r.getRoot)(e)),t.calculateStarted){var a=(0,r.getRoot)(e).getDoc();if(e.isRegion)n(o=a.querySelector('[data-region="'+e.region+'"][data-region-host="'+e.id+'"]'));else{var o=[].slice.call(a.querySelectorAll('[data-editor-id="'+e.id+'"]'));n("button"===(null===(i=e.info)||void 0===i?void 0:i.renderer.name)?null==o?void 0:o[0]:o),e.childRegions.forEach((function(e){return e.calculateHighlightBox(t)}))}}},resetHighlightBox:function(t){e.x=0,e.y=0,e.w=0,e.h=0,e.childRegions.forEach((function(e){return e.resetHighlightBox(t)}))},updateState:function(t,n){void 0===n&&(n=!1),e.state=(0,i.__assign)((0,i.__assign)({},n?null:e.state),t)},setWidthMutable:function(t){e.widthMutable=!!t},setHeightMutable:function(t){e.heightMutable=!!t}}})),t.EditorNodeContext=l.default.createContext(null)},3570:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=t.isString=t.JSONTraverse=t.patchDiff=t.diff=t.repeatArray=t.reactionWithOldValue=t.camelize=t.removeDragingClass=t.addDragingClass=t.autobind=t.normalizeId=t.persistSet=t.persistGet=t.sortByList=t.blackList=t.filterSchemaForEditor=t.filterSchemaForConfig=t.deepFind=t.createElementFromHTML=t.reGenerateID=t.JSONDuplicate=t.JSONMoveDownById=t.JSONCanMoveDown=t.JSONMoveUpById=t.JSONCanMoveUp=t.JSONChangeInArray=t.JSONMerge=t.JSONDelete=t.JSONUpdate=t.JSONGetParentById=t.JSONGetById=t.JSONGetPathById=t.JSONGetByPath=t.JSONPipeOut=t.JSONPipeIn=t.cleanUndefined=t.__uri=t.isEmpty=t.omitControls=t.makeHorizontalDeeper=t.noop=t.anyChanged=t.isObjectShallowModified=t.guid=void 0;var i=n(752),r=n(1502),a=(0,i.__importDefault)(n(113)),o=n(6211),l=(0,i.__importDefault)(n(6410)),s=(0,i.__importDefault)(n(5452)),d=r.utils.guid,u=r.utils.omitControls,p=r.utils.isObjectShallowModified,c=r.utils.anyChanged,h=r.utils.noop,m=r.utils.makeHorizontalDeeper,f=r.utils.findIndex,g=r.utils.isEmpty;function v(e){return R(e)?(Object.keys(e).forEach((function(t){void 0===e[t]&&delete e[t]})),e):e}function b(e){if(!R(e)||e.$$typeof)return e;if(Array.isArray(e))return e.map(b);var t={},n=!1;return e.$$id||(n=!0,t.$$id=d()),Object.keys(e).forEach((function(i){var r=e[i];if(Array.isArray(r)){var a=!1,o=r.map((function(e){var t=b(e);return t!==e&&(a=!0),t}));a&&(n=!0,t[i]=o)}else(o=b(r))!==r&&(n=!0,t[i]=o)})),n&&(e=v((0,i.__assign)((0,i.__assign)({},e),t))),e}function y(e,t){if(Array.isArray(e)){var n=!1,r=e.map((function(e){var i=y(e,t);return i!==e&&(n=!0),i}));return n?r:e}if(!R(e)||(0,o.isObservable)(e))return e;var a=!1,l={};return e.$$id&&(a=!0,l.$$id=void 0),Object.keys(e).forEach((function(n){var i=e[n];if("function"==typeof t?t(n,i):t&&"__"===n.substring(0,2))return l[n]=void 0,void(a=!0);var r=y(i,t);r!==i&&(a=!0,l[n]=r)})),a&&(e=v((0,i.__assign)((0,i.__assign)({},e),l))),e}function _(e,t,n){var i=e;return n&&n.push(e),t.forEach((function(e){i=i[e],n&&n.push(i)})),i}function x(e,t){for(var n=[],i=!1,r=[{path:".",data:e}],a=function(){var e=r.shift(),a=e.data,o=e.path;if(a.$$id===t)return i=!0,n=o.split(".").filter((function(e){return e})),"break";Object.keys(a).forEach((function(e){var t=a[e];Array.isArray(t)?t.forEach((function(t,n){R(t)&&r.push({data:t,path:o+"."+e+"."+n})})):R(t)&&r.push({data:t,path:o+"."+e})}))};r.length&&"break"!==a(););return i?n:null}function C(e,t,n){void 0===n&&(n=!1);var i=x(e,t);if(null===i||!i.length)return null;var r=e,a=[r];for(i.pop(),i.forEach((function(e){r=r[e],a.unshift(r)}));n&&Array.isArray(a[0]);)a.shift();return a[0]}function N(e,t,n){var r=x(e,t);if(null===r)return e;var a=parseInt(r.pop(),10),o=[],l=_(e,r,o);if(!Array.isArray(l))return e;for(o[o.length-1]=l=l.concat(),n(l,l[a],a);o.length>1;){var s=o.pop();Array.isArray(o[o.length-1])?o[o.length-1]=o[o.length-1].concat():o[o.length-1]=(0,i.__assign)({},o[o.length-1]),o[o.length-1][r[o.length-1]]=s}return o[0]}function O(e){return S(e,(function(e,t,n){return"id"===t&&"string"==typeof e&&0===e.indexOf("u:")&&n&&(n.id="u:"+d()),e})),e}function I(e,t,n){return void 0===n&&(n={}),(null==e?void 0:e.$$commonSchema)===t?n[t]=e:(0,s.default)(e)?Object.keys(e).forEach((function(i){I(e[i],t,n)})):Array.isArray(e)&&e.map((function(e){return I(e,t,n)})),n}function S(e,t){Object.keys(e).forEach((function(n){var i=e[n];(0,s.default)(i)||Array.isArray(i)?S(i,t):t(i,n,e)}))}function R(e){var t=!1;return"Object"===Object.prototype.toString.call(e).slice(8,-1)&&(t=!0),t}t.guid=d,t.omitControls=u,t.isObjectShallowModified=p,t.anyChanged=c,t.noop=h,t.makeHorizontalDeeper=m,t.isEmpty=g,t.__uri=function(e){return e},t.cleanUndefined=v,t.JSONPipeIn=b,t.JSONPipeOut=y,t.JSONGetByPath=_,t.JSONGetPathById=x,t.JSONGetById=function(e,t){var n=x(e,t);return null===n?null:_(e,n)},t.JSONGetParentById=C,t.JSONUpdate=function(e,t,n,r){void 0===r&&(r=!1);var a=x(e,t);if(null===a)return e;var o=[],l=_(e,a,o);if(Array.isArray(n)&&o[o.length-2]&&Array.isArray(o[o.length-2])){var s=o[o.length-2].indexOf(o[o.length-1]);o[o.length-2]=o[o.length-2].concat(),o[o.length-2].splice.apply(o[o.length-2],[s,1].concat(n)),o.pop()}else o[o.length-1]=l=(0,i.__assign)((0,i.__assign)((0,i.__assign)({},r?null:l),n),{$$id:t});for(;o.length>1;){var d=o.pop();Array.isArray(o[o.length-1])?o[o.length-1]=o[o.length-1].concat():o[o.length-1]=(0,i.__assign)({},o[o.length-1]),o[o.length-1][a[o.length-1]]=d}return o[0]},t.JSONDelete=function(e,t,n,r){var a=x(e,t);if(null===a)return e;Array.isArray(n)&&n.push.apply(n,a);var o=a.pop(),l=[],s=_(e,a,l);for(Array.isArray(s)?(l[l.length-1]=s=s.concat(),s.splice(o,1),r&&!s.length&&(l[l.length-1]=void 0)):(l[l.length-1]=s=(0,i.__assign)({},s),delete s[o]);l.length>1;){var d=l.pop();Array.isArray(l[l.length-1])?l[l.length-1]=l[l.length-1].concat():l[l.length-1]=(0,i.__assign)({},l[l.length-1]),void 0===d?delete l[l.length-1][a[l.length-1]]:l[l.length-1][a[l.length-1]]=d}return l[0]},t.JSONMerge=function e(t,n){if(!R(t)||!R(n))return n;if(!p(t,n))return t;var i={};return t.$$id&&(i.$$id=t.$$id),Object.keys(n).forEach((function(r){Array.isArray(n[r])&&Array.isArray(t[r])&&n[r]!==t[r]?i[r]=n[r].map((function(n,i){return t[r][i]?e(t[r][i],n):n})):void 0===t[r]?i[r]=n[r]:i[r]=e(t[r],n[r])})),i},t.JSONChangeInArray=N,t.JSONCanMoveUp=function(e,t){var n=C(e,t);return!(!n||!Array.isArray(n))&&f(n,(function(e){return e.$$id===t}))>0},t.JSONMoveUpById=function(e,t){return N(e,t,(function(e,t,n){0!==n&&(e.splice(n,1),e.splice(n-1,0,t))}))},t.JSONCanMoveDown=function(e,t){var n=C(e,t);if(!n||!Array.isArray(n))return!1;var i=f(n,(function(e){return e.$$id===t}));return~i&&i<n.length-1},t.JSONMoveDownById=function(e,t){return N(e,t,(function(e,t,n){n!==e.length-1&&(e.splice(n,1),e.splice(n+1,0,t))}))},t.JSONDuplicate=function(e,t){return N(e,t,(function(e,t,n){var i=b(y(t));e.splice(n+1,0,O(i))}))},t.reGenerateID=O,t.createElementFromHTML=function(e){var t=document.createElement("div");return t.innerHTML=e.trim(),t.firstChild},t.deepFind=I,t.filterSchemaForConfig=function e(t,n){if(Array.isArray(t))return t.map((function(t){return e(t,n)}));if((0,s.default)(t)){var r={},a=!1;return Object.keys(t).forEach((function(o){var l=t[o],s=e(l,n);if(t.$$commonSchema?r[o]&&(r[o]=s):r[o]=s,s!==l&&(a=!0),"$$commonSchema"!==o||n){if("$$commonSchema"===o&&n){var d=I(n,l);d[l]&&(t=r=(0,i.__assign)({},d[l]))}}else t=r={$$commonSchema:l}})),a?r:t}return t},t.filterSchemaForEditor=function e(t){if(Array.isArray(t))return t.map((function(t){return e(t)}));if((0,s.default)(t)){var n={},i=!1;return Object.keys(t).forEach((function(r){var a=t[r];~["visible","visibleOn","hidden","hiddenOn","toggled"].indexOf(r)&&(r="$$"+r,i=!0);var o=e(a);n[r]=o,o!==a&&(i=!0)})),i?n:t}return t},t.blackList=function(e){return function(t){return!~e.indexOf(t)}},t.sortByList=function(e,t){var n=t?"function"==typeof t?t:function(e){return e[t]}:function(e){return e};return function(t,i){var r=e.indexOf(n(t)),a=e.indexOf(n(i));return(r=~r?r:999999)>(a=~a?a:999999)?1:r===a?0:-1}},t.persistGet=function(e,t){var n=localStorage.getItem("amis-editor-"+e);return n&&(n=JSON.parse(n)),n||t},t.persistSet=function(e,t){t=JSON.stringify(t),localStorage.setItem("amis-editor-"+e,t)},t.normalizeId=function(e){return e.replace(/\-[a-z0-9]+$/g,"")},t.autobind=r.utils.autobind,t.addDragingClass=function(e){for(;e&&(e.classList.add("ae-is-draging"),!(null==(e=e.parentElement)?void 0:e.hasAttribute("data-region"))););},t.removeDragingClass=function(e){for(;e&&(e.classList.remove("ae-is-draging"),!(null==(e=e.parentElement)?void 0:e.hasAttribute("data-region"))););},t.camelize=function(e){return e.replace(/\W+(.)/g,(function(e,t){return t.toUpperCase()}))},t.reactionWithOldValue=function(e,t){var n;return(0,o.reaction)(e,(function(e){(0,a.default)(e,n)||(t(e,n),n=e)}))},t.repeatArray=function(e,t){void 0===t&&(t=1);for(var n=[];t-- >0;)n.push(e);return n},t.diff=function(e,t,n){return l.default.diff(e,t,n)},t.patchDiff=function(e,t){return t?t.reduce((function(t,n){return function(e,t,n){if(e&&Array.isArray(null==n?void 0:n.path)){e=e===t?(0,i.__assign)({},e):e;var r=n.path.concat();"A"!==n.kind&&r.pop(),r.reduce((function(e,t){var n=e.target,r=e.source[t],a=n[t];return r===a&&(a=Array.isArray(a)?a.concat():(0,i.__assign)({},a),n[t]=a),{source:r,target:a}}),{target:e,source:t}),l.default.applyChange(e,t,n)}return e}(t,e,n)}),e):e},t.JSONTraverse=S,t.isString=function(e){return"String"===Object.prototype.toString.call(e).slice(8,-1)},t.isObject=R},1502:e=>{e.exports=require("amis")},9794:e=>{e.exports=require("amis-core")},2167:e=>{e.exports=require("axios")},9003:e=>{e.exports=require("classnames")},6410:e=>{e.exports=require("deep-diff")},5720:e=>{e.exports=require("json-ast-comments")},3908:e=>{e.exports=require("lodash/debounce")},6918:e=>{e.exports=require("lodash/find")},8425:e=>{e.exports=require("lodash/findIndex")},8579:e=>{e.exports=require("lodash/flatten")},8492:e=>{e.exports=require("lodash/groupBy")},113:e=>{e.exports=require("lodash/isEqual")},5452:e=>{e.exports=require("lodash/isPlainObject")},6211:e=>{e.exports=require("mobx")},2062:e=>{e.exports=require("mobx-react")},2717:e=>{e.exports=require("mobx-state-tree")},6689:e=>{e.exports=require("react")},6405:e=>{e.exports=require("react-dom")},752:e=>{e.exports=require("tslib")}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var a=t[i]={exports:{}};return e[i](a,a.exports,n),a.exports}var i={};(()=>{var e=i;Object.defineProperty(e,"__esModule",{value:!0}),e.getEditorPlugins=e.unRegisterEditorPlugin=e.registerEditorPlugin=e.defaultValue=e.setSchemaTpl=e.getSchemaTpl=e.BasePlugin=void 0;var t=n(9933);Object.defineProperty(e,"BasePlugin",{enumerable:!0,get:function(){return t.BasePlugin}});var r=n(9756);Object.defineProperty(e,"registerEditorPlugin",{enumerable:!0,get:function(){return r.registerEditorPlugin}}),Object.defineProperty(e,"unRegisterEditorPlugin",{enumerable:!0,get:function(){return r.unRegisterEditorPlugin}}),Object.defineProperty(e,"getEditorPlugins",{enumerable:!0,get:function(){return r.getEditorPlugins}});var a=n(9547);Object.defineProperty(e,"getSchemaTpl",{enumerable:!0,get:function(){return a.getSchemaTpl}}),Object.defineProperty(e,"defaultValue",{enumerable:!0,get:function(){return a.defaultValue}}),Object.defineProperty(e,"setSchemaTpl",{enumerable:!0,get:function(){return a.setSchemaTpl}})})();var r=exports;for(var a in i)r[a]=i[a];i.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
|
package/dist/icons/index.d.ts
DELETED