amis-editor 5.2.0-beta.0 → 5.2.0-beta.2
Sign up to get free protection for your applications and to get access to all the features.
- package/esm/component/BaseControl.d.ts +1029 -0
- package/esm/component/BaseControl.js +319 -0
- package/esm/component/InputComponentName.d.ts +8 -0
- package/esm/component/InputComponentName.js +41 -0
- package/esm/component/TableViewEditor.d.ts +79 -0
- package/esm/component/TableViewEditor.js +588 -0
- package/esm/icons/btn/btn-group.svg.js +36 -0
- package/esm/icons/btn/btn-select.svg.js +32 -0
- package/esm/icons/btn/btn-toolbar.svg.js +32 -0
- package/esm/icons/btn/button.svg.js +32 -0
- package/esm/icons/btn/dropdown-btn.svg.js +30 -0
- package/esm/icons/container/anchor-nav.svg.js +30 -0
- package/esm/icons/container/collapse.svg.js +30 -0
- package/esm/icons/container/container.svg.js +26 -0
- package/esm/icons/container/flex-container.svg.js +30 -0
- package/esm/icons/container/form-group.svg.js +30 -0
- package/esm/icons/container/grid.svg.js +27 -0
- package/esm/icons/container/iframe.svg.js +29 -0
- package/esm/icons/container/panel.svg.js +30 -0
- package/esm/icons/container/table-view.svg.js +30 -0
- package/esm/icons/container/tabs.svg.js +30 -0
- package/esm/icons/container/tooltip-wrapper.svg.js +34 -0
- package/esm/icons/container/web-component.svg.js +26 -0
- package/esm/icons/feat/audio.svg.js +34 -0
- package/esm/icons/feat/custom.svg.js +28 -0
- package/esm/icons/feat/each.svg.js +30 -0
- package/esm/icons/feat/form.svg.js +30 -0
- package/esm/icons/feat/nav.svg.js +26 -0
- package/esm/icons/feat/qrcode.svg.js +30 -0
- package/esm/icons/feat/service.svg.js +30 -0
- package/esm/icons/feat/table.svg.js +34 -0
- package/esm/icons/feat/tasks.svg.js +37 -0
- package/esm/icons/feat/video.svg.js +29 -0
- package/esm/icons/feat/wizard.svg.js +40 -0
- package/esm/icons/form/chained-select.svg.js +35 -0
- package/esm/icons/form/checkbox.svg.js +32 -0
- package/esm/icons/form/checkboxes.svg.js +30 -0
- package/esm/icons/form/combo.svg.js +33 -0
- package/esm/icons/form/condition-builder.svg.js +29 -0
- package/esm/icons/form/diff-editor.svg.js +30 -0
- package/esm/icons/form/editor.svg.js +30 -0
- package/esm/icons/form/formula.svg.js +35 -0
- package/esm/icons/form/hidden.svg.js +34 -0
- package/esm/icons/form/input-city.svg.js +30 -0
- package/esm/icons/form/input-color.svg.js +39 -0
- package/esm/icons/form/input-date-range.svg.js +30 -0
- package/esm/icons/form/input-date.svg.js +36 -0
- package/esm/icons/form/input-datetime.svg.js +30 -0
- package/esm/icons/form/input-email.svg.js +30 -0
- package/esm/icons/form/input-excel.svg.js +30 -0
- package/esm/icons/form/input-file.svg.js +30 -0
- package/esm/icons/form/input-group.svg.js +33 -0
- package/esm/icons/form/input-image.svg.js +35 -0
- package/esm/icons/form/input-kv.svg.js +32 -0
- package/esm/icons/form/input-month-range.svg.js +30 -0
- package/esm/icons/form/input-number.svg.js +32 -0
- package/esm/icons/form/input-password.svg.js +30 -0
- package/esm/icons/form/input-quarter-range.svg.js +41 -0
- package/esm/icons/form/input-range.svg.js +41 -0
- package/esm/icons/form/input-rating.svg.js +26 -0
- package/esm/icons/form/input-repeat.svg.js +30 -0
- package/esm/icons/form/input-rich-text.svg.js +55 -0
- package/esm/icons/form/input-tag.svg.js +31 -0
- package/esm/icons/form/input-text.svg.js +34 -0
- package/esm/icons/form/input-time-range.svg.js +35 -0
- package/esm/icons/form/input-time.svg.js +34 -0
- package/esm/icons/form/input-tree.svg.js +30 -0
- package/esm/icons/form/input-url.svg.js +33 -0
- package/esm/icons/form/input-year.svg.js +36 -0
- package/esm/icons/form/inputArray.svg.js +32 -0
- package/esm/icons/form/list-select.svg.js +28 -0
- package/esm/icons/form/location-picker.svg.js +34 -0
- package/esm/icons/form/matrix-checkboxes.svg.js +27 -0
- package/esm/icons/form/month.svg.js +30 -0
- package/esm/icons/form/nested-select.svg.js +28 -0
- package/esm/icons/form/picker.svg.js +30 -0
- package/esm/icons/form/quarter.svg.js +36 -0
- package/esm/icons/form/radios.svg.js +34 -0
- package/esm/icons/form/select.svg.js +30 -0
- package/esm/icons/form/static.svg.js +32 -0
- package/esm/icons/form/sub-form.svg.js +30 -0
- package/esm/icons/form/switch.svg.js +35 -0
- package/esm/icons/form/tabs-transfer.svg.js +33 -0
- package/esm/icons/form/textarea.svg.js +38 -0
- package/esm/icons/form/transfer.svg.js +30 -0
- package/esm/icons/form/tree-select.svg.js +35 -0
- package/esm/icons/form/uuid.svg.js +32 -0
- package/esm/icons/index.d.ts +2 -0
- package/esm/icons/index.js +228 -0
- package/esm/icons/other/divider.svg.js +28 -0
- package/esm/icons/other/property-sheet.svg.js +30 -0
- package/esm/icons/other/tooltip.svg.js +32 -0
- package/esm/icons/show/URL.svg.js +33 -0
- package/esm/icons/show/avatar.svg.js +36 -0
- package/esm/icons/show/breadcrumb.svg.js +30 -0
- package/esm/icons/show/card.svg.js +30 -0
- package/esm/icons/show/cards.svg.js +27 -0
- package/esm/icons/show/carousel.svg.js +34 -0
- package/esm/icons/show/chart.svg.js +29 -0
- package/esm/icons/show/code.svg.js +34 -0
- package/esm/icons/show/date.svg.js +30 -0
- package/esm/icons/show/datetime.svg.js +30 -0
- package/esm/icons/show/image.svg.js +34 -0
- package/esm/icons/show/images.svg.js +37 -0
- package/esm/icons/show/json-view.svg.js +40 -0
- package/esm/icons/show/list.svg.js +30 -0
- package/esm/icons/show/log.svg.js +30 -0
- package/esm/icons/show/mapping.svg.js +30 -0
- package/esm/icons/show/markdown.svg.js +32 -0
- package/esm/icons/show/plain.svg.js +35 -0
- package/esm/icons/show/progress.svg.js +28 -0
- package/esm/icons/show/sparkline.svg.js +30 -0
- package/esm/icons/show/status.svg.js +33 -0
- package/esm/icons/show/steps.svg.js +30 -0
- package/esm/icons/show/time.svg.js +32 -0
- package/esm/index.d.ts +167 -0
- package/esm/index.js +177 -0
- package/esm/locale/en-US.d.ts +1 -0
- package/esm/locale/en-US.js +2669 -0
- package/esm/locale/index.d.ts +2 -0
- package/esm/locale/zh-CN.d.ts +1 -0
- package/esm/locale/zh-CN.js +2600 -0
- package/esm/plugin/Alert.d.ts +23 -0
- package/esm/plugin/Alert.js +107 -0
- package/esm/plugin/AnchorNav.d.ts +49 -0
- package/esm/plugin/AnchorNav.js +296 -0
- package/esm/plugin/Audio.d.ts +23 -0
- package/esm/plugin/Audio.js +131 -0
- package/esm/plugin/Avatar.d.ts +28 -0
- package/esm/plugin/Avatar.js +274 -0
- package/{lib/plugin/ButtonToolbar.d.ts → esm/plugin/Breadcrumb.d.ts} +13 -15
- package/esm/plugin/Breadcrumb.js +96 -0
- package/esm/plugin/Button.d.ts +30 -0
- package/esm/plugin/Button.js +262 -0
- package/esm/plugin/ButtonGroup.d.ts +40 -0
- package/esm/plugin/ButtonGroup.js +124 -0
- package/esm/plugin/CRUD.d.ts +128 -0
- package/esm/plugin/CRUD.js +1468 -0
- package/esm/plugin/CRUD2.d.ts +79 -0
- package/esm/plugin/CRUD2.js +1752 -0
- package/esm/plugin/Card.d.ts +55 -0
- package/esm/plugin/Card.js +238 -0
- package/esm/plugin/Card2.d.ts +22 -0
- package/esm/plugin/Card2.js +91 -0
- package/esm/plugin/Cards.d.ts +72 -0
- package/esm/plugin/Cards.js +271 -0
- package/esm/plugin/Carousel.d.ts +41 -0
- package/esm/plugin/Carousel.js +314 -0
- package/esm/plugin/Chart.d.ts +50 -0
- package/esm/plugin/Chart.js +193 -0
- package/esm/plugin/CodeView.d.ts +20 -0
- package/esm/plugin/CodeView.js +62 -0
- package/esm/plugin/Collapse.d.ts +34 -0
- package/esm/plugin/Collapse.js +119 -0
- package/esm/plugin/CollapseGroup.d.ts +66 -0
- package/esm/plugin/CollapseGroup.js +214 -0
- package/esm/plugin/ColumnToggler.d.ts +23 -0
- package/esm/plugin/ColumnToggler.js +114 -0
- package/esm/plugin/Container.d.ts +30 -0
- package/esm/plugin/Container.js +87 -0
- package/esm/plugin/Custom.d.ts +28 -0
- package/esm/plugin/Custom.js +102 -0
- package/esm/plugin/CustomRegion.d.ts +40 -0
- package/esm/plugin/CustomRegion.js +138 -0
- package/esm/plugin/Date.d.ts +22 -0
- package/esm/plugin/Date.js +79 -0
- package/esm/plugin/Datetime.d.ts +18 -0
- package/esm/plugin/Datetime.js +74 -0
- package/esm/plugin/Dialog.d.ts +41 -0
- package/esm/plugin/Dialog.js +211 -0
- package/esm/plugin/Divider.d.ts +16 -0
- package/esm/plugin/Divider.js +49 -0
- package/esm/plugin/Drawer.d.ts +29 -0
- package/esm/plugin/Drawer.js +219 -0
- package/esm/plugin/DropDownButton.d.ts +45 -0
- package/esm/plugin/DropDownButton.js +214 -0
- package/esm/plugin/Each.d.ts +36 -0
- package/esm/plugin/Each.js +146 -0
- package/esm/plugin/Flex.d.ts +31 -0
- package/esm/plugin/Flex.js +173 -0
- package/esm/plugin/Form/ButtonGroupSelect.d.ts +29 -0
- package/esm/plugin/Form/ButtonGroupSelect.js +149 -0
- package/esm/plugin/Form/ButtonToolbar.d.ts +31 -0
- package/esm/plugin/Form/ButtonToolbar.js +112 -0
- package/esm/plugin/Form/ChainedSelect.d.ts +25 -0
- package/esm/plugin/Form/ChainedSelect.js +153 -0
- package/esm/plugin/Form/Checkbox.d.ts +25 -0
- package/esm/plugin/Form/Checkbox.js +160 -0
- package/esm/plugin/Form/Checkboxes.d.ts +31 -0
- package/esm/plugin/Form/Checkboxes.js +177 -0
- package/esm/plugin/Form/CodeEditor.d.ts +27 -0
- package/esm/plugin/Form/CodeEditor.js +171 -0
- package/esm/plugin/Form/Combo.d.ts +42 -0
- package/esm/plugin/Form/Combo.js +499 -0
- package/esm/plugin/Form/ConditionBuilder.d.ts +37 -0
- package/esm/plugin/Form/ConditionBuilder.js +259 -0
- package/esm/plugin/Form/Control.d.ts +28 -0
- package/esm/plugin/Form/Control.js +87 -0
- package/esm/plugin/Form/DiffEditor.d.ts +27 -0
- package/esm/plugin/Form/DiffEditor.js +175 -0
- package/esm/plugin/Form/FieldSet.d.ts +26 -0
- package/esm/plugin/Form/FieldSet.js +133 -0
- package/esm/plugin/Form/Form.d.ts +43 -0
- package/esm/plugin/Form/Form.js +813 -0
- package/esm/plugin/Form/Formula.d.ts +28 -0
- package/esm/plugin/Form/Formula.js +79 -0
- package/esm/plugin/Form/Group.d.ts +27 -0
- package/esm/plugin/Form/Group.js +218 -0
- package/esm/plugin/Form/Hidden.d.ts +25 -0
- package/esm/plugin/Form/Hidden.js +60 -0
- package/esm/plugin/Form/InputArray.d.ts +29 -0
- package/esm/plugin/Form/InputArray.js +185 -0
- package/esm/plugin/Form/InputCity.d.ts +25 -0
- package/esm/plugin/Form/InputCity.js +127 -0
- package/esm/plugin/Form/InputColor.d.ts +42 -0
- package/esm/plugin/Form/InputColor.js +287 -0
- package/esm/plugin/Form/InputDate.d.ts +27 -0
- package/esm/plugin/Form/InputDate.js +304 -0
- package/esm/plugin/Form/InputDateRange.d.ts +27 -0
- package/esm/plugin/Form/InputDateRange.js +309 -0
- package/esm/plugin/Form/InputDateTime.d.ts +20 -0
- package/esm/plugin/Form/InputDateTime.js +51 -0
- package/esm/plugin/Form/InputDateTimeRange.d.ts +21 -0
- package/esm/plugin/Form/InputDateTimeRange.js +52 -0
- package/esm/plugin/Form/InputEmail.d.ts +28 -0
- package/esm/plugin/Form/InputEmail.js +48 -0
- package/esm/plugin/Form/InputExcel.d.ts +24 -0
- package/esm/plugin/Form/InputExcel.js +111 -0
- package/esm/plugin/Form/InputFile.d.ts +28 -0
- package/esm/plugin/Form/InputFile.js +304 -0
- package/esm/plugin/Form/InputGroup.d.ts +33 -0
- package/esm/plugin/Form/InputGroup.js +93 -0
- package/esm/plugin/Form/InputImage.d.ts +28 -0
- package/esm/plugin/Form/InputImage.js +335 -0
- package/esm/plugin/Form/InputKV.d.ts +36 -0
- package/esm/plugin/Form/InputKV.js +114 -0
- package/esm/plugin/Form/InputMonth.d.ts +19 -0
- package/esm/plugin/Form/InputMonth.js +49 -0
- package/esm/plugin/Form/InputMonthRange.d.ts +21 -0
- package/esm/plugin/Form/InputMonthRange.js +52 -0
- package/esm/plugin/Form/InputNumber.d.ts +26 -0
- package/esm/plugin/Form/InputNumber.js +226 -0
- package/esm/plugin/Form/InputPassword.d.ts +28 -0
- package/esm/plugin/Form/InputPassword.js +48 -0
- package/esm/plugin/Form/InputQuarter.d.ts +19 -0
- package/esm/plugin/Form/InputQuarter.js +49 -0
- package/esm/plugin/Form/InputQuarterRange.d.ts +21 -0
- package/esm/plugin/Form/InputQuarterRange.js +52 -0
- package/esm/plugin/Form/InputRange.d.ts +25 -0
- package/esm/plugin/Form/InputRange.js +268 -0
- package/esm/plugin/Form/InputRating.d.ts +26 -0
- package/esm/plugin/Form/InputRating.js +326 -0
- package/esm/plugin/Form/InputRepeat.d.ts +20 -0
- package/esm/plugin/Form/InputRepeat.js +62 -0
- package/esm/plugin/Form/InputRichText.d.ts +21 -0
- package/esm/plugin/Form/InputRichText.js +173 -0
- package/esm/plugin/Form/InputSubForm.d.ts +33 -0
- package/esm/plugin/Form/InputSubForm.js +201 -0
- package/esm/plugin/Form/InputTable.d.ts +40 -0
- package/esm/plugin/Form/InputTable.js +353 -0
- package/esm/plugin/Form/InputTag.d.ts +26 -0
- package/esm/plugin/Form/InputTag.js +141 -0
- package/esm/plugin/Form/InputText.d.ts +43 -0
- package/esm/plugin/Form/InputText.js +300 -0
- package/esm/plugin/Form/InputTime.d.ts +20 -0
- package/esm/plugin/Form/InputTime.js +51 -0
- package/esm/plugin/Form/InputTimeRange.d.ts +21 -0
- package/esm/plugin/Form/InputTimeRange.js +52 -0
- package/esm/plugin/Form/InputTree.d.ts +79 -0
- package/esm/plugin/Form/InputTree.js +403 -0
- package/esm/plugin/Form/InputURL.d.ts +29 -0
- package/esm/plugin/Form/InputURL.js +49 -0
- package/esm/plugin/Form/InputYear.d.ts +19 -0
- package/esm/plugin/Form/InputYear.js +49 -0
- package/esm/plugin/Form/InputYearRange.d.ts +21 -0
- package/esm/plugin/Form/InputYearRange.js +52 -0
- package/esm/plugin/Form/Item.d.ts +11 -0
- package/esm/plugin/Form/Item.js +231 -0
- package/esm/plugin/Form/ListSelect.d.ts +29 -0
- package/esm/plugin/Form/ListSelect.js +116 -0
- package/esm/plugin/Form/LocationPicker.d.ts +20 -0
- package/esm/plugin/Form/LocationPicker.js +77 -0
- package/esm/plugin/Form/MatrixCheckboxes.d.ts +32 -0
- package/esm/plugin/Form/MatrixCheckboxes.js +193 -0
- package/esm/plugin/Form/NestedSelect.d.ts +80 -0
- package/esm/plugin/Form/NestedSelect.js +279 -0
- package/esm/plugin/Form/Picker.d.ts +29 -0
- package/esm/plugin/Form/Picker.js +210 -0
- package/esm/plugin/Form/Radios.d.ts +30 -0
- package/esm/plugin/Form/Radios.js +159 -0
- package/esm/plugin/Form/Select.d.ts +30 -0
- package/esm/plugin/Form/Select.js +258 -0
- package/esm/plugin/Form/Static.d.ts +24 -0
- package/esm/plugin/Form/Static.js +311 -0
- package/esm/plugin/Form/Switch.d.ts +28 -0
- package/esm/plugin/Form/Switch.js +197 -0
- package/esm/plugin/Form/TabsTransfer.d.ts +80 -0
- package/esm/plugin/Form/TabsTransfer.js +278 -0
- package/esm/plugin/Form/Textarea.d.ts +27 -0
- package/esm/plugin/Form/Textarea.js +155 -0
- package/esm/plugin/Form/Transfer.d.ts +73 -0
- package/esm/plugin/Form/Transfer.js +291 -0
- package/esm/plugin/Form/TreeSelect.d.ts +79 -0
- package/esm/plugin/Form/TreeSelect.js +400 -0
- package/esm/plugin/Form/UUID.d.ts +24 -0
- package/esm/plugin/Form/UUID.js +60 -0
- package/esm/plugin/Grid.d.ts +49 -0
- package/esm/plugin/Grid.js +706 -0
- package/esm/plugin/HBox.d.ts +46 -0
- package/esm/plugin/HBox.js +633 -0
- package/esm/plugin/IFrame.d.ts +31 -0
- package/esm/plugin/IFrame.js +81 -0
- package/esm/plugin/Image.d.ts +34 -0
- package/esm/plugin/Image.js +248 -0
- package/esm/plugin/Images.d.ts +26 -0
- package/esm/plugin/Images.js +186 -0
- package/esm/plugin/Json.d.ts +27 -0
- package/esm/plugin/Json.js +75 -0
- package/esm/plugin/Link.d.ts +23 -0
- package/esm/plugin/Link.js +105 -0
- package/esm/plugin/List.d.ts +56 -0
- package/esm/plugin/List.js +245 -0
- package/esm/plugin/ListItem.d.ts +16 -0
- package/esm/plugin/ListItem.js +206 -0
- package/esm/plugin/Log.d.ts +19 -0
- package/esm/plugin/Log.js +61 -0
- package/esm/plugin/Mapping.d.ts +38 -0
- package/esm/plugin/Mapping.js +139 -0
- package/esm/plugin/Markdown.d.ts +22 -0
- package/esm/plugin/Markdown.js +57 -0
- package/esm/plugin/Nav.d.ts +49 -0
- package/esm/plugin/Nav.js +163 -0
- package/esm/plugin/Operation.d.ts +26 -0
- package/esm/plugin/Operation.js +80 -0
- package/esm/plugin/Others/Action.d.ts +9 -0
- package/esm/plugin/Others/Action.js +358 -0
- package/esm/plugin/Others/TableCell.d.ts +8 -0
- package/esm/plugin/Others/TableCell.js +367 -0
- package/esm/plugin/Page.d.ts +34 -0
- package/esm/plugin/Page.js +318 -0
- package/esm/plugin/Pagination.d.ts +48 -0
- package/esm/plugin/Pagination.js +242 -0
- package/esm/plugin/Panel.d.ts +32 -0
- package/esm/plugin/Panel.js +213 -0
- package/esm/plugin/Plain.d.ts +22 -0
- package/esm/plugin/Plain.js +82 -0
- package/esm/plugin/Progress.d.ts +26 -0
- package/esm/plugin/Progress.js +225 -0
- package/esm/plugin/Property.d.ts +28 -0
- package/esm/plugin/Property.js +126 -0
- package/esm/plugin/QRCode.d.ts +22 -0
- package/esm/plugin/QRCode.js +91 -0
- package/esm/plugin/Reset.d.ts +12 -0
- package/esm/plugin/Reset.js +41 -0
- package/esm/plugin/Service.d.ts +32 -0
- package/esm/plugin/Service.js +195 -0
- package/esm/plugin/Sparkline.d.ts +31 -0
- package/esm/plugin/Sparkline.js +52 -0
- package/esm/plugin/Status.d.ts +22 -0
- package/esm/plugin/Status.js +76 -0
- package/esm/plugin/Steps.d.ts +40 -0
- package/esm/plugin/Steps.js +115 -0
- package/esm/plugin/Submit.d.ts +11 -0
- package/esm/plugin/Submit.js +41 -0
- package/esm/plugin/Table-v2.d.ts +26 -0
- package/esm/plugin/Table-v2.js +819 -0
- package/esm/plugin/Table.d.ts +27 -0
- package/esm/plugin/Table.js +572 -0
- package/esm/plugin/TableCell-v2.d.ts +8 -0
- package/esm/plugin/TableCell-v2.js +499 -0
- package/esm/plugin/TableView.d.ts +135 -0
- package/esm/plugin/TableView.js +767 -0
- package/esm/plugin/Tabs.d.ts +77 -0
- package/esm/plugin/Tabs.js +416 -0
- package/esm/plugin/Tasks.d.ts +44 -0
- package/esm/plugin/Tasks.js +212 -0
- package/esm/plugin/Time.d.ts +18 -0
- package/esm/plugin/Time.js +74 -0
- package/esm/plugin/Timeline.d.ts +34 -0
- package/esm/plugin/Timeline.js +116 -0
- package/esm/plugin/TooltipWrapper.d.ts +42 -0
- package/esm/plugin/TooltipWrapper.js +230 -0
- package/esm/plugin/Tpl.d.ts +21 -0
- package/esm/plugin/Tpl.js +140 -0
- package/esm/plugin/Video.d.ts +27 -0
- package/esm/plugin/Video.js +123 -0
- package/esm/plugin/WebComponent.d.ts +25 -0
- package/esm/plugin/WebComponent.js +91 -0
- package/esm/plugin/Wizard.d.ts +56 -0
- package/esm/plugin/Wizard.js +772 -0
- package/esm/plugin/Wrapper.d.ts +23 -0
- package/esm/plugin/Wrapper.js +110 -0
- package/esm/renderer/APIControl.d.ts +5736 -0
- package/esm/renderer/APIControl.js +956 -0
- package/esm/renderer/ActionApiControl.d.ts +7454 -0
- package/esm/renderer/BadgeControl.d.ts +102 -0
- package/esm/renderer/BadgeControl.js +315 -0
- package/esm/renderer/ColumnControl.d.ts +19 -0
- package/esm/renderer/DataBindingControl.d.ts +42 -0
- package/esm/renderer/DataBindingControl.js +300 -0
- package/esm/renderer/DataMappingControl.d.ts +11 -0
- package/esm/renderer/DataMappingControl.js +65 -0
- package/esm/renderer/DataPickerControl.d.ts +13 -0
- package/esm/renderer/DataPickerControl.js +77 -0
- package/esm/renderer/DateShortCutControl.d.ts +83 -0
- package/esm/renderer/DateShortCutControl.js +348 -0
- package/esm/renderer/FeatureControl.d.ts +64 -0
- package/esm/renderer/FeatureControl.js +283 -0
- package/esm/renderer/FormulaControl.d.ts +104 -0
- package/esm/renderer/FormulaControl.js +437 -0
- package/esm/renderer/GoConfigControl.d.ts +17 -0
- package/esm/renderer/GoConfigControl.js +74 -0
- package/esm/renderer/OptionControl.d.ts +152 -0
- package/esm/renderer/OptionControl.js +844 -0
- package/esm/renderer/RangePartsControl.d.ts +91 -0
- package/esm/renderer/RangePartsControl.js +511 -0
- package/esm/renderer/StatusControl.d.ts +44 -0
- package/esm/renderer/StatusControl.js +203 -0
- package/esm/renderer/SwitchMoreControl.d.ts +238 -0
- package/esm/renderer/SwitchMoreControl.js +434 -0
- package/esm/renderer/TimelineItemControl.d.ts +220 -0
- package/esm/renderer/TimelineItemControl.js +555 -0
- package/esm/renderer/TransferTableControl.d.ts +201 -0
- package/esm/renderer/TransferTableControl.js +487 -0
- package/esm/renderer/TreeOptionControl.d.ts +71 -0
- package/esm/renderer/TreeOptionControl.js +700 -0
- package/esm/renderer/ValidationControl.d.ts +65 -0
- package/esm/renderer/ValidationControl.js +362 -0
- package/esm/renderer/ValidationItem.d.ts +46 -0
- package/esm/renderer/ValidationItem.js +189 -0
- package/esm/renderer/event-control/action-config-dialog.d.ts +73 -0
- package/esm/renderer/event-control/action-config-dialog.js +266 -0
- package/esm/renderer/event-control/action-config-panel.d.ts +8 -0
- package/esm/renderer/event-control/action-config-panel.js +71 -0
- package/esm/renderer/event-control/actions.d.ts +3 -0
- package/esm/renderer/event-control/actions.js +855 -0
- package/esm/renderer/event-control/comp-action-select.d.ts +11 -0
- package/esm/renderer/event-control/comp-action-select.js +56 -0
- package/esm/renderer/event-control/helper.d.ts +133 -0
- package/esm/renderer/event-control/helper.js +1014 -0
- package/esm/renderer/event-control/index.d.ts +90 -0
- package/esm/renderer/event-control/index.js +758 -0
- package/esm/renderer/event-control/types.d.ts +26 -0
- package/esm/renderer/style-control/Background.d.ts +17 -0
- package/esm/renderer/style-control/Background.js +536 -0
- package/esm/renderer/style-control/Border.d.ts +18 -0
- package/esm/renderer/style-control/Border.js +233 -0
- package/esm/renderer/style-control/BoxModel.d.ts +17 -0
- package/esm/renderer/style-control/BoxModel.js +65 -0
- package/esm/renderer/style-control/BoxShadow.d.ts +18 -0
- package/esm/renderer/style-control/BoxShadow.js +121 -0
- package/esm/renderer/style-control/Display.d.ts +14 -0
- package/esm/renderer/style-control/Display.js +193 -0
- package/esm/renderer/style-control/Font.d.ts +16 -0
- package/esm/renderer/style-control/Font.js +207 -0
- package/esm/renderer/style-control/font-family.d.ts +11 -0
- package/esm/renderer/style-control/font-family.js +146 -0
- package/esm/renderer/style-control/transformation.d.ts +29 -0
- package/esm/renderer/style-control/transformation.js +74 -0
- package/esm/renderer/style-control/types.d.ts +8 -0
- package/esm/tpl/api.d.ts +1 -0
- package/esm/tpl/api.js +494 -0
- package/esm/tpl/common.d.ts +1 -0
- package/esm/tpl/common.js +872 -0
- package/esm/tpl/horizontal.d.ts +1 -0
- package/esm/tpl/horizontal.js +243 -0
- package/esm/tpl/index.d.ts +7 -0
- package/esm/tpl/options.d.ts +1 -0
- package/esm/tpl/options.js +377 -0
- package/esm/tpl/style.d.ts +15 -0
- package/esm/tpl/style.js +354 -0
- package/esm/tpl/validations.d.ts +1 -0
- package/esm/tpl/validations.js +500 -0
- package/esm/validator.d.ts +63 -0
- package/esm/validator.js +326 -0
- package/lib/component/BaseControl.d.ts +9 -811
- package/lib/component/BaseControl.js +255 -291
- package/lib/component/InputComponentName.js +4 -3
- package/lib/component/TableViewEditor.js +560 -491
- package/lib/icons/btn/btn-group.svg.js +60 -0
- package/lib/icons/btn/btn-select.svg.js +56 -0
- package/lib/icons/btn/btn-toolbar.svg.js +56 -0
- package/lib/icons/btn/button.svg.js +56 -0
- package/lib/icons/btn/dropdown-btn.svg.js +54 -0
- package/lib/icons/container/anchor-nav.svg.js +54 -0
- package/lib/icons/container/collapse.svg.js +54 -0
- package/lib/icons/container/container.svg.js +50 -0
- package/lib/icons/container/flex-container.svg.js +54 -0
- package/lib/icons/container/form-group.svg.js +54 -0
- package/lib/icons/container/grid.svg.js +51 -0
- package/lib/icons/container/iframe.svg.js +53 -0
- package/lib/icons/container/panel.svg.js +54 -0
- package/lib/icons/container/table-view.svg.js +54 -0
- package/lib/icons/container/tabs.svg.js +54 -0
- package/lib/icons/container/tooltip-wrapper.svg.js +58 -0
- package/lib/icons/container/web-component.svg.js +50 -0
- package/lib/icons/feat/audio.svg.js +58 -0
- package/lib/icons/feat/custom.svg.js +52 -0
- package/lib/icons/feat/each.svg.js +54 -0
- package/lib/icons/feat/form.svg.js +54 -0
- package/lib/icons/feat/nav.svg.js +50 -0
- package/lib/icons/feat/qrcode.svg.js +54 -0
- package/lib/icons/feat/service.svg.js +54 -0
- package/lib/icons/feat/table.svg.js +58 -0
- package/lib/icons/feat/tasks.svg.js +61 -0
- package/lib/icons/feat/video.svg.js +53 -0
- package/lib/icons/feat/wizard.svg.js +64 -0
- package/lib/icons/form/chained-select.svg.js +59 -0
- package/lib/icons/form/checkbox.svg.js +56 -0
- package/lib/icons/form/checkboxes.svg.js +54 -0
- package/lib/icons/form/combo.svg.js +57 -0
- package/lib/icons/form/condition-builder.svg.js +53 -0
- package/lib/icons/form/diff-editor.svg.js +54 -0
- package/lib/icons/form/editor.svg.js +54 -0
- package/lib/icons/form/formula.svg.js +59 -0
- package/lib/icons/form/hidden.svg.js +58 -0
- package/lib/icons/form/input-city.svg.js +54 -0
- package/lib/icons/form/input-color.svg.js +63 -0
- package/lib/icons/form/input-date-range.svg.js +54 -0
- package/lib/icons/form/input-date.svg.js +60 -0
- package/lib/icons/form/input-datetime.svg.js +54 -0
- package/lib/icons/form/input-email.svg.js +54 -0
- package/lib/icons/form/input-excel.svg.js +54 -0
- package/lib/icons/form/input-file.svg.js +54 -0
- package/lib/icons/form/input-group.svg.js +57 -0
- package/lib/icons/form/input-image.svg.js +59 -0
- package/lib/icons/form/input-kv.svg.js +56 -0
- package/lib/icons/form/input-month-range.svg.js +54 -0
- package/lib/icons/form/input-number.svg.js +56 -0
- package/lib/icons/form/input-password.svg.js +54 -0
- package/lib/icons/form/input-quarter-range.svg.js +65 -0
- package/lib/icons/form/input-range.svg.js +65 -0
- package/lib/icons/form/input-rating.svg.js +50 -0
- package/lib/icons/form/input-repeat.svg.js +54 -0
- package/lib/icons/form/input-rich-text.svg.js +79 -0
- package/lib/icons/form/input-tag.svg.js +55 -0
- package/lib/icons/form/input-text.svg.js +58 -0
- package/lib/icons/form/input-time-range.svg.js +59 -0
- package/lib/icons/form/input-time.svg.js +58 -0
- package/lib/icons/form/input-tree.svg.js +54 -0
- package/lib/icons/form/input-url.svg.js +57 -0
- package/lib/icons/form/input-year.svg.js +60 -0
- package/lib/icons/form/inputArray.svg.js +56 -0
- package/lib/icons/form/list-select.svg.js +52 -0
- package/lib/icons/form/location-picker.svg.js +58 -0
- package/lib/icons/form/matrix-checkboxes.svg.js +51 -0
- package/lib/icons/form/month.svg.js +54 -0
- package/lib/icons/form/nested-select.svg.js +52 -0
- package/lib/icons/form/picker.svg.js +54 -0
- package/lib/icons/form/quarter.svg.js +60 -0
- package/lib/icons/form/radios.svg.js +58 -0
- package/lib/icons/form/select.svg.js +54 -0
- package/lib/icons/form/static.svg.js +56 -0
- package/lib/icons/form/sub-form.svg.js +54 -0
- package/lib/icons/form/switch.svg.js +59 -0
- package/lib/icons/form/tabs-transfer.svg.js +57 -0
- package/lib/icons/form/textarea.svg.js +62 -0
- package/lib/icons/form/transfer.svg.js +54 -0
- package/lib/icons/form/tree-select.svg.js +59 -0
- package/lib/icons/form/uuid.svg.js +56 -0
- package/lib/icons/index.d.ts +2 -0
- package/lib/icons/index.js +236 -0
- package/lib/icons/other/divider.svg.js +52 -0
- package/lib/icons/other/property-sheet.svg.js +54 -0
- package/lib/icons/other/tooltip.svg.js +56 -0
- package/lib/icons/show/URL.svg.js +57 -0
- package/lib/icons/show/avatar.svg.js +60 -0
- package/lib/icons/show/breadcrumb.svg.js +54 -0
- package/lib/icons/show/card.svg.js +54 -0
- package/lib/icons/show/cards.svg.js +51 -0
- package/lib/icons/show/carousel.svg.js +58 -0
- package/lib/icons/show/chart.svg.js +53 -0
- package/lib/icons/show/code.svg.js +58 -0
- package/lib/icons/show/date.svg.js +54 -0
- package/lib/icons/show/datetime.svg.js +54 -0
- package/lib/icons/show/image.svg.js +58 -0
- package/lib/icons/show/images.svg.js +61 -0
- package/lib/icons/show/json-view.svg.js +64 -0
- package/lib/icons/show/list.svg.js +54 -0
- package/lib/icons/show/log.svg.js +54 -0
- package/lib/icons/show/mapping.svg.js +54 -0
- package/lib/icons/show/markdown.svg.js +56 -0
- package/lib/icons/show/plain.svg.js +59 -0
- package/lib/icons/show/progress.svg.js +52 -0
- package/lib/icons/show/sparkline.svg.js +54 -0
- package/lib/icons/show/status.svg.js +57 -0
- package/lib/icons/show/steps.svg.js +54 -0
- package/lib/icons/show/time.svg.js +56 -0
- package/lib/index.d.ts +14 -1
- package/lib/index.js +23 -6
- package/lib/locale/en-US.d.ts +1 -0
- package/lib/locale/en-US.js +2671 -0
- package/lib/locale/index.d.ts +2 -0
- package/lib/locale/zh-CN.d.ts +1 -0
- package/lib/locale/zh-CN.js +2602 -0
- package/lib/plugin/Alert.d.ts +1 -0
- package/lib/plugin/Alert.js +99 -101
- package/lib/plugin/AnchorNav.d.ts +1 -0
- package/lib/plugin/AnchorNav.js +282 -274
- package/lib/plugin/Audio.d.ts +1 -0
- package/lib/plugin/Audio.js +123 -145
- package/lib/plugin/Avatar.d.ts +1 -0
- package/lib/plugin/Avatar.js +263 -290
- package/lib/plugin/Breadcrumb.d.ts +1 -0
- package/lib/plugin/Breadcrumb.js +88 -104
- package/lib/plugin/Button.d.ts +4 -3
- package/lib/plugin/Button.js +251 -282
- package/lib/plugin/ButtonGroup.d.ts +1 -0
- package/lib/plugin/ButtonGroup.js +114 -125
- package/lib/plugin/CRUD.d.ts +3 -2
- package/lib/plugin/CRUD.js +1438 -1488
- package/lib/plugin/CRUD2.d.ts +79 -0
- package/lib/plugin/CRUD2.js +1764 -0
- package/lib/plugin/Card.d.ts +1 -0
- package/lib/plugin/Card.js +223 -209
- package/lib/plugin/Card2.d.ts +22 -0
- package/lib/plugin/Card2.js +95 -0
- package/lib/plugin/Cards.d.ts +1 -0
- package/lib/plugin/Cards.js +259 -234
- package/lib/plugin/Carousel.d.ts +1 -0
- package/lib/plugin/Carousel.js +304 -344
- package/lib/plugin/Chart.d.ts +3 -3
- package/lib/plugin/Chart.js +180 -171
- package/lib/plugin/CodeView.d.ts +1 -0
- package/lib/plugin/CodeView.js +54 -56
- package/lib/plugin/Collapse.d.ts +1 -0
- package/lib/plugin/Collapse.js +110 -125
- package/lib/plugin/CollapseGroup.d.ts +1 -0
- package/lib/plugin/CollapseGroup.js +204 -223
- package/lib/plugin/ColumnToggler.d.ts +23 -0
- package/lib/plugin/ColumnToggler.js +118 -0
- package/lib/plugin/Container.d.ts +10 -2
- package/lib/plugin/Container.js +79 -88
- package/lib/plugin/Custom.d.ts +1 -0
- package/lib/plugin/Custom.js +90 -93
- package/lib/plugin/CustomRegion.js +125 -133
- package/lib/plugin/Date.d.ts +1 -0
- package/lib/plugin/Date.js +71 -70
- package/lib/plugin/Datetime.d.ts +1 -0
- package/lib/plugin/Datetime.js +65 -64
- package/lib/plugin/Dialog.d.ts +10 -0
- package/lib/plugin/Dialog.js +199 -193
- package/lib/plugin/Divider.d.ts +1 -0
- package/lib/plugin/Divider.js +42 -38
- package/lib/plugin/Drawer.d.ts +1 -0
- package/lib/plugin/Drawer.js +204 -221
- package/lib/plugin/DropDownButton.d.ts +1 -0
- package/lib/plugin/DropDownButton.js +201 -208
- package/lib/plugin/Each.d.ts +1 -0
- package/lib/plugin/Each.js +134 -111
- package/lib/plugin/Flex.d.ts +1 -0
- package/lib/plugin/Flex.js +164 -190
- package/lib/plugin/Form/ButtonGroupSelect.d.ts +6 -4
- package/lib/plugin/Form/ButtonGroupSelect.js +141 -149
- package/lib/plugin/Form/ButtonToolbar.d.ts +4 -1
- package/lib/plugin/Form/ButtonToolbar.js +102 -93
- package/lib/plugin/Form/ChainedSelect.d.ts +4 -4
- package/lib/plugin/Form/ChainedSelect.js +144 -170
- package/lib/plugin/Form/Checkbox.d.ts +4 -3
- package/lib/plugin/Form/Checkbox.js +147 -157
- package/lib/plugin/Form/Checkboxes.d.ts +4 -3
- package/lib/plugin/Form/Checkboxes.js +166 -198
- package/lib/plugin/Form/CodeEditor.d.ts +5 -3
- package/lib/plugin/Form/CodeEditor.js +161 -187
- package/lib/plugin/Form/Combo.d.ts +4 -3
- package/lib/plugin/Form/Combo.js +477 -516
- package/lib/plugin/Form/ConditionBuilder.d.ts +1 -0
- package/lib/plugin/Form/ConditionBuilder.js +247 -282
- package/lib/plugin/Form/Control.d.ts +1 -0
- package/lib/plugin/Form/Control.js +76 -69
- package/lib/plugin/Form/DiffEditor.d.ts +5 -3
- package/lib/plugin/Form/DiffEditor.js +165 -190
- package/lib/plugin/Form/FieldSet.d.ts +0 -1
- package/lib/plugin/Form/FieldSet.js +122 -133
- package/lib/plugin/Form/Form.d.ts +4 -3
- package/lib/plugin/Form/Form.js +798 -827
- package/lib/plugin/Form/Formula.d.ts +1 -0
- package/lib/plugin/Form/Formula.js +70 -69
- package/lib/plugin/Form/Group.d.ts +1 -0
- package/lib/plugin/Form/Group.js +206 -232
- package/lib/plugin/Form/Hidden.d.ts +1 -0
- package/lib/plugin/Form/Hidden.js +50 -40
- package/lib/plugin/Form/InputArray.d.ts +1 -0
- package/lib/plugin/Form/InputArray.js +172 -160
- package/lib/plugin/Form/InputCity.d.ts +6 -4
- package/lib/plugin/Form/InputCity.js +119 -127
- package/lib/plugin/Form/InputColor.d.ts +1 -0
- package/lib/plugin/Form/InputColor.js +263 -263
- package/lib/plugin/Form/InputDate.d.ts +4 -3
- package/lib/plugin/Form/InputDate.js +291 -340
- package/lib/plugin/Form/InputDateRange.d.ts +4 -3
- package/lib/plugin/Form/InputDateRange.js +294 -331
- package/lib/plugin/Form/InputDateTime.d.ts +1 -0
- package/lib/plugin/Form/InputDateTime.js +42 -37
- package/lib/plugin/Form/InputDateTimeRange.d.ts +1 -0
- package/lib/plugin/Form/InputDateTimeRange.js +43 -38
- package/lib/plugin/Form/InputEmail.d.ts +1 -0
- package/lib/plugin/Form/InputEmail.js +39 -32
- package/lib/plugin/Form/InputExcel.d.ts +4 -3
- package/lib/plugin/Form/InputExcel.js +102 -108
- package/lib/plugin/Form/InputFile.d.ts +8 -3
- package/lib/plugin/Form/InputFile.js +291 -337
- package/lib/plugin/Form/InputGroup.d.ts +1 -0
- package/lib/plugin/Form/InputGroup.js +83 -82
- package/lib/plugin/Form/InputImage.d.ts +10 -6
- package/lib/plugin/Form/InputImage.js +323 -255
- package/lib/plugin/Form/InputKV.d.ts +4 -3
- package/lib/plugin/Form/InputKV.js +106 -117
- package/lib/plugin/Form/InputMonth.d.ts +1 -0
- package/lib/plugin/Form/InputMonth.js +40 -35
- package/lib/plugin/Form/InputMonthRange.d.ts +1 -0
- package/lib/plugin/Form/InputMonthRange.js +43 -38
- package/lib/plugin/Form/InputNumber.d.ts +4 -3
- package/lib/plugin/Form/InputNumber.js +214 -247
- package/lib/plugin/Form/InputPassword.d.ts +1 -0
- package/lib/plugin/Form/InputPassword.js +39 -32
- package/lib/plugin/Form/InputQuarter.d.ts +1 -0
- package/lib/plugin/Form/InputQuarter.js +40 -35
- package/lib/plugin/Form/InputQuarterRange.d.ts +1 -0
- package/lib/plugin/Form/InputQuarterRange.js +43 -38
- package/lib/plugin/Form/InputRange.d.ts +4 -3
- package/lib/plugin/Form/InputRange.js +256 -276
- package/lib/plugin/Form/InputRating.d.ts +4 -3
- package/lib/plugin/Form/InputRating.js +312 -339
- package/lib/plugin/Form/InputRepeat.d.ts +1 -0
- package/lib/plugin/Form/InputRepeat.js +54 -53
- package/lib/plugin/Form/InputRichText.d.ts +3 -1
- package/lib/plugin/Form/InputRichText.js +163 -179
- package/lib/plugin/Form/InputSubForm.d.ts +3 -33
- package/lib/plugin/Form/InputSubForm.js +181 -132
- package/lib/plugin/Form/InputTable.d.ts +1 -0
- package/lib/plugin/Form/InputTable.js +338 -377
- package/lib/plugin/Form/InputTag.d.ts +4 -3
- package/lib/plugin/Form/InputTag.js +132 -142
- package/lib/plugin/Form/InputText.d.ts +1 -0
- package/lib/plugin/Form/InputText.js +285 -309
- package/lib/plugin/Form/InputTime.d.ts +1 -0
- package/lib/plugin/Form/InputTime.js +42 -35
- package/lib/plugin/Form/InputTimeRange.d.ts +1 -0
- package/lib/plugin/Form/InputTimeRange.js +43 -38
- package/lib/plugin/Form/InputTree.d.ts +5 -3
- package/lib/plugin/Form/InputTree.js +391 -355
- package/lib/plugin/Form/InputURL.d.ts +1 -0
- package/lib/plugin/Form/InputURL.js +40 -33
- package/lib/plugin/Form/InputYear.d.ts +1 -0
- package/lib/plugin/Form/InputYear.js +40 -35
- package/lib/plugin/Form/InputYearRange.d.ts +1 -0
- package/lib/plugin/Form/InputYearRange.js +43 -38
- package/lib/plugin/Form/Item.d.ts +1 -0
- package/lib/plugin/Form/Item.js +219 -245
- package/lib/plugin/Form/ListSelect.d.ts +4 -3
- package/lib/plugin/Form/ListSelect.js +107 -117
- package/lib/plugin/Form/LocationPicker.d.ts +1 -0
- package/lib/plugin/Form/LocationPicker.js +69 -62
- package/lib/plugin/Form/MatrixCheckboxes.d.ts +4 -3
- package/lib/plugin/Form/MatrixCheckboxes.js +180 -217
- package/lib/plugin/Form/NestedSelect.d.ts +4 -3
- package/lib/plugin/Form/NestedSelect.js +268 -313
- package/lib/plugin/Form/Picker.d.ts +4 -1
- package/lib/plugin/Form/Picker.js +196 -147
- package/lib/plugin/Form/Radios.d.ts +4 -3
- package/lib/plugin/Form/Radios.js +149 -175
- package/lib/plugin/Form/Select.d.ts +4 -3
- package/lib/plugin/Form/Select.js +247 -289
- package/lib/plugin/Form/Static.d.ts +1 -0
- package/lib/plugin/Form/Static.js +299 -292
- package/lib/plugin/Form/Switch.d.ts +4 -3
- package/lib/plugin/Form/Switch.js +186 -204
- package/lib/plugin/Form/TabsTransfer.d.ts +6 -3
- package/lib/plugin/Form/TabsTransfer.js +269 -331
- package/lib/plugin/Form/Textarea.d.ts +4 -3
- package/lib/plugin/Form/Textarea.js +146 -177
- package/lib/plugin/Form/Transfer.d.ts +9 -7
- package/lib/plugin/Form/Transfer.js +280 -399
- package/lib/plugin/Form/TreeSelect.d.ts +6 -4
- package/lib/plugin/Form/TreeSelect.js +387 -358
- package/lib/plugin/Form/UUID.d.ts +1 -0
- package/lib/plugin/Form/UUID.js +50 -37
- package/lib/plugin/Grid.d.ts +1 -0
- package/lib/plugin/Grid.js +666 -632
- package/lib/plugin/HBox.js +608 -561
- package/lib/plugin/IFrame.d.ts +1 -0
- package/lib/plugin/IFrame.js +72 -81
- package/lib/plugin/Image.d.ts +1 -0
- package/lib/plugin/Image.js +236 -248
- package/lib/plugin/Images.d.ts +1 -0
- package/lib/plugin/Images.js +178 -202
- package/lib/plugin/Json.d.ts +1 -0
- package/lib/plugin/Json.js +66 -65
- package/lib/plugin/Link.d.ts +1 -0
- package/lib/plugin/Link.js +97 -108
- package/lib/plugin/List.d.ts +1 -0
- package/lib/plugin/List.js +232 -199
- package/lib/plugin/ListItem.js +194 -175
- package/lib/plugin/Log.d.ts +1 -0
- package/lib/plugin/Log.js +54 -51
- package/lib/plugin/Mapping.d.ts +1 -0
- package/lib/plugin/Mapping.js +131 -137
- package/lib/plugin/Markdown.d.ts +1 -0
- package/lib/plugin/Markdown.js +50 -47
- package/lib/plugin/Nav.d.ts +1 -0
- package/lib/plugin/Nav.js +155 -169
- package/lib/plugin/Operation.js +69 -65
- package/lib/plugin/Others/Action.d.ts +2 -5
- package/lib/plugin/Others/Action.js +342 -326
- package/lib/plugin/Others/TableCell.js +355 -373
- package/lib/plugin/Page.d.ts +6 -3
- package/lib/plugin/Page.js +306 -347
- package/lib/plugin/Pagination.d.ts +6 -9
- package/lib/plugin/Pagination.js +231 -232
- package/lib/plugin/Panel.d.ts +2 -0
- package/lib/plugin/Panel.js +200 -201
- package/lib/plugin/Plain.d.ts +1 -0
- package/lib/plugin/Plain.js +74 -76
- package/lib/plugin/Progress.d.ts +1 -0
- package/lib/plugin/Progress.js +217 -246
- package/lib/plugin/Property.d.ts +1 -0
- package/lib/plugin/Property.js +118 -135
- package/lib/plugin/QRCode.d.ts +1 -0
- package/lib/plugin/QRCode.js +83 -95
- package/lib/plugin/Reset.js +32 -25
- package/lib/plugin/Service.d.ts +6 -3
- package/lib/plugin/Service.js +184 -198
- package/lib/plugin/Sparkline.d.ts +1 -0
- package/lib/plugin/Sparkline.js +41 -35
- package/lib/plugin/Status.d.ts +1 -0
- package/lib/plugin/Status.js +68 -74
- package/lib/plugin/Steps.d.ts +1 -0
- package/lib/plugin/Steps.js +107 -124
- package/lib/plugin/Submit.js +32 -25
- package/lib/plugin/Table-v2.d.ts +26 -0
- package/lib/plugin/Table-v2.js +823 -0
- package/lib/plugin/Table.d.ts +5 -3
- package/lib/plugin/Table.js +557 -575
- package/lib/plugin/TableCell-v2.d.ts +8 -0
- package/lib/plugin/TableCell-v2.js +507 -0
- package/lib/plugin/TableView.d.ts +1 -0
- package/lib/plugin/TableView.js +729 -698
- package/lib/plugin/Tabs.d.ts +4 -2
- package/lib/plugin/Tabs.js +397 -401
- package/lib/plugin/Tasks.d.ts +1 -0
- package/lib/plugin/Tasks.js +204 -251
- package/lib/plugin/Time.d.ts +1 -0
- package/lib/plugin/Time.js +65 -64
- package/lib/plugin/Timeline.d.ts +34 -0
- package/lib/plugin/Timeline.js +120 -0
- package/lib/plugin/TooltipWrapper.d.ts +1 -0
- package/lib/plugin/TooltipWrapper.js +219 -266
- package/lib/plugin/Tpl.d.ts +1 -0
- package/lib/plugin/Tpl.js +129 -168
- package/lib/plugin/Video.d.ts +1 -0
- package/lib/plugin/Video.js +114 -127
- package/lib/plugin/WebComponent.d.ts +5 -6
- package/lib/plugin/WebComponent.js +80 -55
- package/lib/plugin/Wizard.d.ts +6 -3
- package/lib/plugin/Wizard.js +753 -772
- package/lib/plugin/Wrapper.js +102 -124
- package/lib/renderer/APIControl.d.ts +2026 -3816
- package/lib/renderer/APIControl.js +929 -753
- package/lib/renderer/ActionApiControl.d.ts +7454 -0
- package/lib/renderer/BadgeControl.d.ts +6 -37
- package/lib/renderer/BadgeControl.js +297 -263
- package/lib/renderer/ColumnControl.d.ts +19 -0
- package/lib/renderer/DataBindingControl.d.ts +37 -9
- package/lib/renderer/DataBindingControl.js +288 -69
- package/lib/renderer/DataMappingControl.js +3 -3
- package/lib/renderer/DataPickerControl.js +5 -5
- package/lib/renderer/DateShortCutControl.js +325 -221
- package/lib/renderer/FeatureControl.d.ts +64 -0
- package/lib/renderer/FeatureControl.js +293 -0
- package/lib/renderer/FormulaControl.d.ts +10 -2
- package/lib/renderer/FormulaControl.js +406 -275
- package/lib/renderer/GoConfigControl.d.ts +17 -0
- package/lib/renderer/GoConfigControl.js +83 -0
- package/lib/renderer/OptionControl.d.ts +2 -2
- package/lib/renderer/OptionControl.js +813 -629
- package/lib/renderer/RangePartsControl.js +477 -348
- package/lib/renderer/StatusControl.d.ts +8 -3
- package/lib/renderer/StatusControl.js +186 -145
- package/lib/renderer/SwitchMoreControl.d.ts +56 -40
- package/lib/renderer/SwitchMoreControl.js +413 -272
- package/lib/renderer/TimelineItemControl.d.ts +220 -0
- package/lib/renderer/TimelineItemControl.js +566 -0
- package/lib/renderer/TransferTableControl.d.ts +201 -0
- package/lib/renderer/TransferTableControl.js +496 -0
- package/lib/renderer/TreeOptionControl.d.ts +71 -0
- package/lib/renderer/TreeOptionControl.js +713 -0
- package/lib/renderer/ValidationControl.js +339 -245
- package/lib/renderer/ValidationItem.js +174 -123
- package/lib/renderer/event-control/action-config-dialog.d.ts +73 -0
- package/lib/renderer/event-control/action-config-dialog.js +274 -0
- package/lib/renderer/event-control/action-config-panel.d.ts +8 -0
- package/lib/renderer/event-control/action-config-panel.js +80 -0
- package/lib/renderer/event-control/actions.d.ts +3 -0
- package/lib/renderer/event-control/actions.js +863 -0
- package/lib/renderer/event-control/comp-action-select.d.ts +11 -0
- package/lib/renderer/event-control/comp-action-select.js +65 -0
- package/lib/renderer/event-control/helper.d.ts +133 -0
- package/lib/renderer/event-control/helper.js +1041 -0
- package/lib/renderer/event-control/index.d.ts +90 -0
- package/lib/renderer/event-control/index.js +788 -0
- package/lib/renderer/event-control/types.d.ts +26 -0
- package/lib/renderer/style-control/Background.js +500 -446
- package/lib/renderer/style-control/Border.d.ts +3 -3
- package/lib/renderer/style-control/Border.js +214 -164
- package/lib/renderer/style-control/BoxModel.js +3 -3
- package/lib/renderer/style-control/BoxShadow.d.ts +3 -3
- package/lib/renderer/style-control/BoxShadow.js +97 -92
- package/lib/renderer/style-control/Display.js +176 -208
- package/lib/renderer/style-control/Font.js +188 -210
- package/lib/renderer/style-control/font-family.js +128 -127
- package/lib/renderer/style-control/transformation.js +1 -1
- package/lib/tpl/api.js +477 -355
- package/lib/tpl/common.js +821 -751
- package/lib/tpl/horizontal.js +224 -239
- package/lib/tpl/options.js +351 -232
- package/lib/tpl/style.js +338 -350
- package/lib/tpl/validations.js +482 -542
- package/lib/validator.d.ts +2 -1
- package/lib/validator.js +296 -381
- package/package.json +21 -11
- package/README.md +0 -74
- package/lib/event-action/actions.d.ts +0 -3
- package/lib/event-action/actions.js +0 -188
- package/lib/event-action/schema.d.ts +0 -13
- package/lib/event-action/schema.js +0 -134
- package/lib/plugin/ButtonToolbar.js +0 -89
- package/lib/renderer/PopoverEdit.d.ts +0 -57
- package/lib/util.d.ts +0 -23
- package/lib/util.js +0 -64
package/lib/plugin/CRUD.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* amis-editor v5.2.0-beta.
|
2
|
+
* amis-editor v5.2.0-beta.2
|
3
3
|
* Copyright 2018-2022 @fex
|
4
4
|
*/
|
5
5
|
|
@@ -12,9 +12,10 @@ var amis = require('amis');
|
|
12
12
|
var get = require('lodash/get');
|
13
13
|
var cloneDeep = require('lodash/cloneDeep');
|
14
14
|
var React = require('react');
|
15
|
-
var
|
15
|
+
var amisEditorCore = require('amis-editor-core');
|
16
16
|
var amisCore = require('amis-core');
|
17
17
|
var mobxStateTree = require('mobx-state-tree');
|
18
|
+
var i18nRuntime = require('i18n-runtime');
|
18
19
|
|
19
20
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
20
21
|
|
@@ -22,1507 +23,1456 @@ var get__default = /*#__PURE__*/_interopDefaultLegacy(get);
|
|
22
23
|
var cloneDeep__default = /*#__PURE__*/_interopDefaultLegacy(cloneDeep);
|
23
24
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
24
25
|
|
25
|
-
// 将展现控件转成编辑控件
|
26
26
|
var viewTypeToEditType = function (type) {
|
27
|
-
|
28
|
-
? 'input-text'
|
29
|
-
: type === 'status' || type === 'mapping'
|
30
|
-
? 'select'
|
31
|
-
: "input-".concat(type);
|
27
|
+
return type === 'tpl' ? 'input-text' : type === 'status' || type === 'mapping' ? 'select' : "input-".concat(type);
|
32
28
|
};
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
items: [],
|
70
|
-
total: 0
|
71
|
-
};
|
72
|
-
if (Array.isArray(schema === null || schema === void 0 ? void 0 : schema.columns)) {
|
73
|
-
var item_1 = {};
|
74
|
-
schema.columns.forEach(function (control) {
|
75
|
-
if (control === null || control === void 0 ? void 0 : control.name) {
|
76
|
-
amisCore.setVariable(item_1, control.name, 'sample');
|
77
|
-
}
|
78
|
-
});
|
79
|
-
data.items.push(item_1);
|
80
|
-
}
|
81
|
-
return JSON.stringify({
|
82
|
-
status: 0,
|
83
|
-
msg: '',
|
84
|
-
data: data
|
85
|
-
}, null, 2);
|
86
|
-
};
|
87
|
-
_this.btnSchemas = {
|
88
|
-
create: {
|
89
|
-
label: '新增',
|
90
|
-
type: 'button',
|
91
|
-
actionType: 'dialog',
|
92
|
-
level: 'primary',
|
93
|
-
dialog: {
|
94
|
-
title: '新增',
|
95
|
-
body: {
|
96
|
-
type: 'form',
|
97
|
-
api: 'xxx/create',
|
98
|
-
body: []
|
99
|
-
}
|
100
|
-
}
|
101
|
-
},
|
102
|
-
update: {
|
103
|
-
label: '编辑',
|
104
|
-
type: 'button',
|
105
|
-
actionType: 'dialog',
|
106
|
-
level: 'link',
|
107
|
-
dialog: {
|
108
|
-
title: '编辑',
|
109
|
-
body: {
|
110
|
-
type: 'form',
|
111
|
-
api: 'xxx/update',
|
112
|
-
body: []
|
113
|
-
}
|
114
|
-
}
|
115
|
-
},
|
116
|
-
view: {
|
117
|
-
label: '查看',
|
118
|
-
type: 'button',
|
119
|
-
actionType: 'dialog',
|
120
|
-
level: 'link',
|
121
|
-
dialog: {
|
122
|
-
title: '查看详情',
|
123
|
-
body: {
|
124
|
-
type: 'form',
|
125
|
-
api: 'xxx/update',
|
126
|
-
body: []
|
127
|
-
}
|
128
|
-
}
|
129
|
-
},
|
130
|
-
delete: {
|
131
|
-
type: 'button',
|
132
|
-
label: '删除',
|
133
|
-
actionType: 'ajax',
|
134
|
-
level: 'link',
|
135
|
-
className: 'text-danger',
|
136
|
-
confirmText: '确定要删除?',
|
137
|
-
api: 'delete:/xxx/delete'
|
138
|
-
},
|
139
|
-
bulkDelete: {
|
140
|
-
type: 'button',
|
141
|
-
level: 'danger',
|
142
|
-
label: '批量删除',
|
143
|
-
actionType: 'ajax',
|
144
|
-
confirmText: '确定要删除?',
|
145
|
-
api: '/xxx/batch-delete'
|
146
|
-
},
|
147
|
-
bulkUpdate: {
|
148
|
-
type: 'button',
|
149
|
-
label: '批量编辑',
|
150
|
-
actionType: 'dialog',
|
151
|
-
dialog: {
|
152
|
-
title: '批量编辑',
|
153
|
-
size: 'md',
|
154
|
-
body: {
|
155
|
-
type: 'form',
|
156
|
-
api: '/xxx/bacth-edit',
|
157
|
-
body: [
|
158
|
-
{
|
159
|
-
label: '字段1',
|
160
|
-
text: '字段1',
|
161
|
-
type: 'input-text'
|
162
|
-
}
|
163
|
-
]
|
164
|
-
}
|
165
|
-
}
|
166
|
-
},
|
167
|
-
// itemDelete: {
|
168
|
-
// type: 'button',
|
169
|
-
// level: 'danger',
|
170
|
-
// label: '删除',
|
171
|
-
// api: '/xxx/delete-one',
|
172
|
-
// actionType: 'ajax',
|
173
|
-
// confirmText: '确定要删除?'
|
174
|
-
// },
|
175
|
-
filter: {
|
176
|
-
title: '查询条件',
|
177
|
-
body: [
|
178
|
-
{
|
179
|
-
type: 'input-text',
|
180
|
-
name: 'keywords',
|
181
|
-
label: '关键字'
|
182
|
-
}
|
183
|
-
]
|
184
|
-
}
|
185
|
-
};
|
186
|
-
_this.scaffoldForm = {
|
187
|
-
title: '增删改查快速开始-CRUD',
|
188
|
-
body: [
|
189
|
-
AMisCodeEditor.getSchemaTpl('api', {
|
190
|
-
label: '接口地址',
|
191
|
-
sampleBuilder: function (schema) {
|
192
|
-
return JSON.stringify({
|
193
|
-
status: 0,
|
194
|
-
msg: '',
|
195
|
-
data: [
|
196
|
-
{ id: 1, name: 'Jack' },
|
197
|
-
{ id: 2, name: 'Rose' }
|
198
|
-
]
|
199
|
-
}, null, 2);
|
200
|
-
}
|
201
|
-
}),
|
202
|
-
{
|
203
|
-
type: 'button',
|
204
|
-
label: '格式校验并自动生成列配置',
|
205
|
-
className: 'm-t-xs m-b-xs',
|
206
|
-
onClick: function (e, props) { return tslib.__awaiter(_this, void 0, void 0, function () {
|
207
|
-
var data, schemaFilter, api, result, autoFillKeyValues, items;
|
208
|
-
var _a, _b;
|
209
|
-
return tslib.__generator(this, function (_c) {
|
210
|
-
switch (_c.label) {
|
211
|
-
case 0:
|
212
|
-
data = props.data;
|
213
|
-
schemaFilter = mobxStateTree.getEnv(window.editorStore).schemaFilter;
|
214
|
-
api = data.api;
|
215
|
-
// 主要是给爱速搭中替换 url
|
216
|
-
if (schemaFilter) {
|
217
|
-
api = schemaFilter({
|
218
|
-
api: data.api
|
219
|
-
}).api;
|
220
|
-
}
|
221
|
-
return [4 /*yield*/, props.env.fetcher(api, data)];
|
222
|
-
case 1:
|
223
|
-
result = _c.sent();
|
224
|
-
autoFillKeyValues = [];
|
225
|
-
items = ((_a = result.data) === null || _a === void 0 ? void 0 : _a.rows) || ((_b = result.data) === null || _b === void 0 ? void 0 : _b.items);
|
226
|
-
if (items === null || items === void 0 ? void 0 : items.length) {
|
227
|
-
Object.keys(items[0]).forEach(function (key) {
|
228
|
-
items[0][key];
|
229
|
-
autoFillKeyValues.push({
|
230
|
-
label: key,
|
231
|
-
type: 'text',
|
232
|
-
name: key
|
233
|
-
});
|
234
|
-
});
|
235
|
-
props.formStore.setValues({
|
236
|
-
columns: autoFillKeyValues
|
237
|
-
});
|
238
|
-
// 查询条件的字段列表
|
239
|
-
props.formStore.setValues({
|
240
|
-
filterSettingSource: autoFillKeyValues.map(function (column) {
|
241
|
-
return column.name;
|
242
|
-
})
|
243
|
-
});
|
244
|
-
}
|
245
|
-
else {
|
246
|
-
amis.toast.warning("API\u8FD4\u56DE\u683C\u5F0F\u4E0D\u6B63\u786E\uFF0C\u8BF7\u70B9\u51FB\u63A5\u53E3\u5730\u5740\u53F3\u4FA7\u793A\u4F8B\u7684\u95EE\u53F7\u67E5\u770B\u793A\u4F8B");
|
247
|
-
}
|
248
|
-
return [2 /*return*/];
|
249
|
-
}
|
250
|
-
});
|
251
|
-
}); }
|
252
|
-
},
|
253
|
-
{
|
254
|
-
name: 'features',
|
255
|
-
label: '启用功能',
|
256
|
-
type: 'checkboxes',
|
257
|
-
joinValues: false,
|
258
|
-
extractValue: true,
|
259
|
-
itemClassName: 'max-w-lg',
|
260
|
-
options: [
|
261
|
-
{ label: '新增', value: 'create' },
|
262
|
-
{ label: '查询', value: 'filter' },
|
263
|
-
{ label: '批量删除', value: 'bulkDelete' },
|
264
|
-
{ label: '批量修改', value: 'bulkUpdate' },
|
265
|
-
{ label: '操作栏-编辑', value: 'update' },
|
266
|
-
{ label: '操作栏-查看详情', value: 'view' },
|
267
|
-
{ label: '操作栏-删除', value: 'delete' }
|
268
|
-
]
|
269
|
-
},
|
270
|
-
{
|
271
|
-
type: 'group',
|
272
|
-
body: [
|
273
|
-
{
|
274
|
-
columnRatio: 10,
|
275
|
-
type: 'checkboxes',
|
276
|
-
label: '启用的查询字段',
|
277
|
-
name: 'filterEnabledList',
|
278
|
-
joinValues: false,
|
279
|
-
source: '${filterSettingSource}'
|
280
|
-
},
|
281
|
-
{
|
282
|
-
columnRatio: 2,
|
283
|
-
type: 'input-number',
|
284
|
-
label: '每列显示几个字段',
|
285
|
-
value: 3,
|
286
|
-
name: 'filterColumnCount'
|
287
|
-
}
|
288
|
-
],
|
289
|
-
visibleOn: 'data.features && data.features.includes("filter")'
|
290
|
-
},
|
291
|
-
{
|
292
|
-
name: 'columns',
|
293
|
-
type: 'input-table',
|
294
|
-
label: false,
|
295
|
-
addable: true,
|
296
|
-
removable: true,
|
297
|
-
needConfirm: false,
|
298
|
-
columns: [
|
299
|
-
{
|
300
|
-
type: 'input-text',
|
301
|
-
name: 'label',
|
302
|
-
label: '标题'
|
303
|
-
},
|
304
|
-
{
|
305
|
-
type: 'input-text',
|
306
|
-
name: 'name',
|
307
|
-
label: '绑定字段名'
|
308
|
-
},
|
309
|
-
{
|
310
|
-
type: 'select',
|
311
|
-
name: 'type',
|
312
|
-
label: '类型',
|
313
|
-
value: 'text',
|
314
|
-
options: [
|
315
|
-
{
|
316
|
-
value: 'text',
|
317
|
-
label: '纯文本'
|
318
|
-
},
|
319
|
-
{
|
320
|
-
value: 'tpl',
|
321
|
-
label: '模板'
|
322
|
-
},
|
323
|
-
{
|
324
|
-
value: 'image',
|
325
|
-
label: '图片'
|
326
|
-
},
|
327
|
-
{
|
328
|
-
value: 'date',
|
329
|
-
label: '日期'
|
330
|
-
},
|
331
|
-
{
|
332
|
-
value: 'progress',
|
333
|
-
label: '进度'
|
334
|
-
},
|
335
|
-
{
|
336
|
-
value: 'status',
|
337
|
-
label: '状态'
|
338
|
-
},
|
339
|
-
{
|
340
|
-
value: 'mapping',
|
341
|
-
label: '映射'
|
342
|
-
},
|
343
|
-
{
|
344
|
-
value: 'operation',
|
345
|
-
label: '操作栏'
|
346
|
-
}
|
347
|
-
]
|
348
|
-
}
|
349
|
-
]
|
350
|
-
}
|
351
|
-
],
|
352
|
-
pipeOut: function (value) {
|
353
|
-
var valueSchema = cloneDeep__default["default"](value);
|
354
|
-
// 查看/删除 操作,可选择是否使用接口返回值预填充
|
355
|
-
var features = valueSchema.features;
|
356
|
-
var oper = {
|
357
|
-
type: 'operation',
|
358
|
-
label: '操作',
|
359
|
-
buttons: []
|
360
|
-
};
|
361
|
-
var itemBtns = ['update', 'view', 'delete'];
|
362
|
-
var hasFeatures = get__default["default"](features, 'length');
|
363
|
-
valueSchema.bulkActions = [];
|
364
|
-
/** 统一api格式 */
|
365
|
-
valueSchema.api = amisCore.normalizeApi(valueSchema.api);
|
366
|
-
hasFeatures &&
|
367
|
-
features.forEach(function (item) {
|
368
|
-
var _a, _b;
|
369
|
-
if (itemBtns.includes(item)) {
|
370
|
-
var schema = void 0;
|
371
|
-
if (item === 'update') {
|
372
|
-
schema = cloneDeep__default["default"](_this.btnSchemas.update);
|
373
|
-
schema.dialog.body.body = value.columns
|
374
|
-
.filter(function (_a) {
|
375
|
-
var type = _a.type;
|
376
|
-
return type !== 'progress' && type !== 'operation';
|
377
|
-
})
|
378
|
-
.map(function (_a) {
|
379
|
-
var type = _a.type, rest = tslib.__rest(_a, ["type"]);
|
380
|
-
return (tslib.__assign(tslib.__assign({}, rest), { type: viewTypeToEditType(type) }));
|
381
|
-
});
|
382
|
-
}
|
383
|
-
else if (item === 'view') {
|
384
|
-
schema = cloneDeep__default["default"](_this.btnSchemas.view);
|
385
|
-
schema.dialog.body.body = value.columns.map(function (_a) {
|
386
|
-
_a.type; var rest = tslib.__rest(_a, ["type"]);
|
387
|
-
return (tslib.__assign(tslib.__assign({}, rest), { type: 'static' }));
|
388
|
-
});
|
389
|
-
}
|
390
|
-
else if (item === 'delete') {
|
391
|
-
schema = cloneDeep__default["default"](_this.btnSchemas.delete);
|
392
|
-
schema.api = ((_a = valueSchema.api) === null || _a === void 0 ? void 0 : _a.method.match(/^(post|delete)$/i))
|
393
|
-
? valueSchema.api
|
394
|
-
: tslib.__assign(tslib.__assign({}, valueSchema.api), { method: 'post' });
|
395
|
-
}
|
396
|
-
// 添加操作按钮
|
397
|
-
_this.addItem(oper.buttons, schema);
|
398
|
-
}
|
399
|
-
else {
|
400
|
-
// 批量操作
|
401
|
-
if (item === 'bulkUpdate') {
|
402
|
-
_this.addItem(valueSchema.bulkActions, cloneDeep__default["default"](_this.btnSchemas.bulkUpdate));
|
403
|
-
}
|
404
|
-
if (item === 'bulkDelete') {
|
405
|
-
_this.addItem(valueSchema.bulkActions, cloneDeep__default["default"](_this.btnSchemas.bulkDelete));
|
406
|
-
}
|
407
|
-
// 创建
|
408
|
-
if (item === 'create') {
|
409
|
-
var createSchemaBase = _this.btnSchemas.create;
|
410
|
-
createSchemaBase.dialog.body = {
|
411
|
-
type: 'form',
|
412
|
-
api: ((_b = valueSchema.api) === null || _b === void 0 ? void 0 : _b.method.match(/^(post|put)$/i))
|
413
|
-
? valueSchema.api
|
414
|
-
: tslib.__assign(tslib.__assign({}, valueSchema.api), { method: 'post' }),
|
415
|
-
body: valueSchema.columns.map(function (column) {
|
416
|
-
var type = column.type;
|
417
|
-
return {
|
418
|
-
type: viewTypeToEditType(type),
|
419
|
-
name: column.name,
|
420
|
-
label: column.label
|
421
|
-
};
|
422
|
-
})
|
423
|
-
};
|
424
|
-
valueSchema.headerToolbar = [createSchemaBase, 'bulkActions'];
|
425
|
-
}
|
426
|
-
var keysFilter = Object.keys(valueSchema.filter || {});
|
427
|
-
if (item === 'filter' && !keysFilter.length) {
|
428
|
-
if (valueSchema.filterEnabledList) {
|
429
|
-
valueSchema.filter = {
|
430
|
-
title: '查询条件'
|
431
|
-
};
|
432
|
-
valueSchema.filter.columnCount = value.filterColumnCount;
|
433
|
-
valueSchema.filter.mode = 'horizontal';
|
434
|
-
valueSchema.filter.body = valueSchema.filterEnabledList.map(function (item) {
|
435
|
-
return {
|
436
|
-
type: 'input-text',
|
437
|
-
label: item.label,
|
438
|
-
name: item.value
|
439
|
-
};
|
440
|
-
});
|
441
|
-
}
|
442
|
-
}
|
443
|
-
}
|
444
|
-
});
|
445
|
-
var hasOperate = valueSchema.columns.find(function (item) { return item.type === 'operation'; });
|
446
|
-
hasFeatures && !hasOperate && valueSchema.columns.push(oper);
|
447
|
-
return valueSchema;
|
448
|
-
},
|
449
|
-
canRebuild: true
|
450
|
-
};
|
451
|
-
_this.multifactor = true;
|
452
|
-
_this.previewSchema = {
|
453
|
-
syncLocation: false,
|
454
|
-
type: 'crud',
|
455
|
-
className: 'text-left',
|
456
|
-
bodyClassName: 'm-b-none',
|
457
|
-
affixHeader: false,
|
458
|
-
data: {
|
459
|
-
items: [
|
460
|
-
{ a: 1, b: 2 },
|
461
|
-
{ a: 3, b: 4 },
|
462
|
-
{ a: 5, b: 6 }
|
463
|
-
]
|
464
|
-
},
|
465
|
-
source: '${items}',
|
466
|
-
columns: [
|
467
|
-
{
|
468
|
-
label: 'A',
|
469
|
-
name: 'a'
|
470
|
-
},
|
471
|
-
{
|
472
|
-
label: 'B',
|
473
|
-
name: 'b'
|
474
|
-
},
|
475
|
-
{
|
476
|
-
type: 'operation',
|
477
|
-
label: '操作',
|
478
|
-
buttons: [
|
479
|
-
{
|
480
|
-
icon: 'fa fa-eye',
|
481
|
-
type: 'button'
|
482
|
-
},
|
483
|
-
{
|
484
|
-
icon: 'fa fa-edit',
|
485
|
-
type: 'button'
|
486
|
-
}
|
487
|
-
]
|
488
|
-
}
|
489
|
-
]
|
490
|
-
};
|
491
|
-
_this.panelTitle = '增删改查';
|
492
|
-
_this.panelBodyCreator = function (context) {
|
493
|
-
_this.manager.store;
|
494
|
-
var id = context.id;
|
495
|
-
return AMisCodeEditor.getSchemaTpl('tabs', [
|
496
|
-
{
|
497
|
-
title: '常规',
|
498
|
-
body: [
|
499
|
-
AMisCodeEditor.getSchemaTpl('switch', {
|
500
|
-
name: 'filter',
|
501
|
-
label: '启用查询条件',
|
502
|
-
pipeIn: function (value) { return !!value; },
|
503
|
-
pipeOut: function (value, originValue) {
|
504
|
-
if (value) {
|
505
|
-
return (_this.oldFilter ||
|
506
|
-
AMisCodeEditor.JSONPipeIn({
|
507
|
-
title: '查询条件',
|
508
|
-
body: [
|
509
|
-
{
|
510
|
-
type: 'input-text',
|
511
|
-
name: 'keywords',
|
512
|
-
label: '关键字'
|
513
|
-
}
|
514
|
-
]
|
515
|
-
}));
|
516
|
-
}
|
517
|
-
else {
|
518
|
-
_this.oldFilter = originValue;
|
519
|
-
}
|
520
|
-
return null;
|
521
|
-
}
|
522
|
-
}),
|
523
|
-
{
|
524
|
-
type: 'divider'
|
525
|
-
},
|
526
|
-
{
|
527
|
-
label: '批量操作',
|
528
|
-
name: 'bulkActions',
|
529
|
-
type: 'combo',
|
530
|
-
hiddenOn: 'data.pickerMode && data.multiple',
|
531
|
-
inputClassName: 'ae-BulkActions-control',
|
532
|
-
multiple: true,
|
533
|
-
draggable: true,
|
534
|
-
draggableTip: '',
|
535
|
-
scaffold: {
|
536
|
-
label: '按钮',
|
537
|
-
type: 'button'
|
538
|
-
},
|
539
|
-
labelRemark: {
|
540
|
-
className: 'm-l-xs',
|
541
|
-
trigger: 'click',
|
542
|
-
rootClose: true,
|
543
|
-
content: '通过此可以管理批量操作按钮,只有设置了批量操作按钮才会出现选择框,可在外观中配置批量操作按钮位置。',
|
544
|
-
placement: 'left'
|
545
|
-
},
|
546
|
-
items: [
|
547
|
-
{
|
548
|
-
type: 'tpl',
|
549
|
-
tpl: '<span class="label label-success">${label}</span>',
|
550
|
-
columnClassName: 'p-t-xs'
|
551
|
-
},
|
552
|
-
{
|
553
|
-
columnClassName: 'p-t-xs col-edit',
|
554
|
-
children: function (_a) {
|
555
|
-
var index = _a.index;
|
556
|
-
return (React__default["default"].createElement("button", { onClick: _this.handleBulkActionEdit.bind(_this, id, index), "data-tooltip": "\u4FEE\u6539", "data-position": "bottom", className: "text-muted" },
|
557
|
-
React__default["default"].createElement("i", { className: "fa fa-pencil" })));
|
558
|
-
}
|
559
|
-
}
|
560
|
-
]
|
561
|
-
},
|
562
|
-
// getSchemaTpl('switch', {
|
563
|
-
// name: 'defaultChecked',
|
564
|
-
// label: '默认是否全部勾选',
|
565
|
-
// visibleOn: 'data.bulkActions && data.bulkActions.length',
|
566
|
-
// pipeIn: defaultValue(false)
|
567
|
-
// }),
|
568
|
-
{
|
569
|
-
type: 'divider'
|
570
|
-
},
|
571
|
-
{
|
572
|
-
label: '单条操作',
|
573
|
-
name: 'itemActions',
|
574
|
-
type: 'combo',
|
575
|
-
labelRemark: {
|
576
|
-
className: 'm-l-xs',
|
577
|
-
trigger: 'click',
|
578
|
-
rootClose: true,
|
579
|
-
content: '设置后,当鼠标悬停行数据上,会出现该操作按钮,同时顶部操作栏也会显示该按钮,勾选成员时与批量按钮智能切换。',
|
580
|
-
placement: 'left'
|
581
|
-
},
|
582
|
-
hiddenOn: 'this.mode && this.mode !== "table" || this.pickerMode',
|
583
|
-
inputClassName: 'ae-BulkActions-control',
|
584
|
-
multiple: true,
|
585
|
-
draggable: true,
|
586
|
-
scaffold: {
|
587
|
-
label: '按钮',
|
588
|
-
type: 'button'
|
589
|
-
},
|
590
|
-
items: [
|
591
|
-
{
|
592
|
-
type: 'tpl',
|
593
|
-
tpl: '<span class="label label-success">${label}</span>',
|
594
|
-
columnClassName: 'p-t-xs'
|
595
|
-
},
|
596
|
-
{
|
597
|
-
type: 'checkbox',
|
598
|
-
className: 'text-xs',
|
599
|
-
option: '悬停隐藏',
|
600
|
-
name: 'hiddenOnHover'
|
601
|
-
},
|
602
|
-
{
|
603
|
-
columnClassName: 'p-t-xs col-edit',
|
604
|
-
children: function (_a) {
|
605
|
-
var index = _a.index;
|
606
|
-
return (React__default["default"].createElement("button", { onClick: _this.handleItemActionEdit.bind(_this, id, index), "data-tooltip": "\u4FEE\u6539", "data-position": "bottom", className: "text-muted" },
|
607
|
-
React__default["default"].createElement("i", { className: "fa fa-pencil" })));
|
608
|
-
}
|
609
|
-
}
|
610
|
-
]
|
611
|
-
},
|
612
|
-
{
|
613
|
-
type: 'divider',
|
614
|
-
hiddenOn: 'this.mode && this.mode !== "table" || this.pickerMode'
|
615
|
-
},
|
616
|
-
AMisCodeEditor.getSchemaTpl('switch', {
|
617
|
-
name: 'syncLocation',
|
618
|
-
label: '同步地址栏',
|
619
|
-
pipeIn: AMisCodeEditor.defaultValue(true),
|
620
|
-
labelRemark: {
|
621
|
-
className: 'm-l-xs',
|
622
|
-
trigger: 'click',
|
623
|
-
rootClose: true,
|
624
|
-
content: '开启后会把查询条件数据和分页信息同步到地址栏中,页面中出现多个时,建议只保留一个同步地址栏,否则会相互影响。',
|
625
|
-
placement: 'left'
|
626
|
-
}
|
627
|
-
}),
|
628
|
-
{
|
629
|
-
label: '默认参数',
|
630
|
-
type: 'input-kv',
|
631
|
-
name: 'defaultParams',
|
632
|
-
labelRemark: {
|
633
|
-
className: 'm-l-xs',
|
634
|
-
trigger: 'click',
|
635
|
-
rootClose: true,
|
636
|
-
content: '可以用来设置默认参数,比如 <code>perPage:20</code>',
|
637
|
-
placement: 'left'
|
638
|
-
}
|
639
|
-
},
|
640
|
-
{
|
641
|
-
type: 'divider'
|
642
|
-
},
|
643
|
-
AMisCodeEditor.getSchemaTpl('switch', {
|
644
|
-
name: 'keepItemSelectionOnPageChange',
|
645
|
-
label: '保留条目选择',
|
646
|
-
visbileOn: 'this.bulkActions && this.bulkActions.length || this.itemActions && this.itemActions.length',
|
647
|
-
labelRemark: {
|
648
|
-
className: 'm-l-xs',
|
649
|
-
trigger: 'click',
|
650
|
-
rootClose: true,
|
651
|
-
content: '默认分页、搜索后,用户选择条目会被清空,开启此选项后会保留用户选择,可以实现跨页面批量操作。',
|
652
|
-
placement: 'left'
|
653
|
-
}
|
654
|
-
}),
|
655
|
-
{
|
656
|
-
name: 'labelTpl',
|
657
|
-
type: 'input-text',
|
658
|
-
label: '单条描述模板',
|
659
|
-
visibleOn: 'this.keepItemSelectionOnPageChange',
|
660
|
-
labelRemark: {
|
661
|
-
className: 'm-l-xs',
|
662
|
-
trigger: 'click',
|
663
|
-
rootClose: true,
|
664
|
-
content: '开启【保留条目选择】后会把所有已选择条目列出来,此选项可以用来定制条目展示文案。',
|
665
|
-
placement: 'left'
|
666
|
-
}
|
667
|
-
},
|
668
|
-
{
|
669
|
-
name: 'primaryField',
|
670
|
-
label: '指定主键',
|
671
|
-
type: 'input-text',
|
672
|
-
pipeIn: AMisCodeEditor.defaultValue('id'),
|
673
|
-
description: '默认<code>id</code>,用于批量操作获取行级数据'
|
674
|
-
}
|
675
|
-
]
|
676
|
-
},
|
677
|
-
{
|
678
|
-
title: '接口',
|
679
|
-
body: [
|
680
|
-
AMisCodeEditor.getSchemaTpl('api', {
|
681
|
-
label: '数据拉取接口',
|
682
|
-
sampleBuilder: function () {
|
683
|
-
var _a, _b;
|
684
|
-
var data = {
|
685
|
-
items: [],
|
686
|
-
total: 0
|
687
|
-
};
|
688
|
-
var columns = (_b = (_a = context === null || context === void 0 ? void 0 : context.schema) === null || _a === void 0 ? void 0 : _a.columns) !== null && _b !== void 0 ? _b : [];
|
689
|
-
var row = {};
|
690
|
-
columns.forEach(function (column) {
|
691
|
-
if (column.name) {
|
692
|
-
amisCore.setVariable(row, column.name, 'sample');
|
693
|
-
}
|
694
|
-
});
|
695
|
-
data.items.push(row);
|
696
|
-
return JSON.stringify({
|
697
|
-
status: 0,
|
698
|
-
msg: '',
|
699
|
-
data: data
|
700
|
-
}, null, 2);
|
701
|
-
}
|
702
|
-
}),
|
703
|
-
{
|
704
|
-
name: 'initFetch',
|
705
|
-
type: 'radios',
|
706
|
-
label: '是否初始拉取',
|
707
|
-
pipeIn: function (value) {
|
708
|
-
return (typeof value == 'boolean' && value) ||
|
709
|
-
(typeof value !== 'boolean' && '');
|
710
|
-
},
|
711
|
-
inline: true,
|
712
|
-
onChange: function () { },
|
713
|
-
options: [
|
714
|
-
{
|
715
|
-
label: '是',
|
716
|
-
value: true
|
717
|
-
},
|
718
|
-
{
|
719
|
-
label: '否',
|
720
|
-
value: false
|
721
|
-
},
|
722
|
-
{
|
723
|
-
label: '表达式',
|
724
|
-
value: ''
|
725
|
-
}
|
726
|
-
]
|
727
|
-
},
|
728
|
-
{
|
729
|
-
name: 'initFetch',
|
730
|
-
autoComplete: false,
|
731
|
-
visibleOn: 'typeof this.initFetch !== "boolean"',
|
732
|
-
type: 'input-text',
|
733
|
-
placeholder: '用 JS 表达式来决定',
|
734
|
-
className: 'm-t-n-sm'
|
735
|
-
},
|
736
|
-
AMisCodeEditor.getSchemaTpl('switch', {
|
737
|
-
name: 'loadDataOnce',
|
738
|
-
label: '一次性拉取',
|
739
|
-
labelRemark: {
|
740
|
-
className: 'm-l-xs',
|
741
|
-
trigger: 'click',
|
742
|
-
rootClose: true,
|
743
|
-
content: '开启后,数据只会在初始的时候拉取,后续分页、排序不再请求接口,都由前端直接完成。',
|
744
|
-
placement: 'left'
|
745
|
-
}
|
746
|
-
}),
|
747
|
-
AMisCodeEditor.getSchemaTpl('switch', {
|
748
|
-
label: '开启定时刷新',
|
749
|
-
name: 'interval',
|
750
|
-
visibleOn: 'data.api',
|
751
|
-
pipeIn: function (value) { return !!value; },
|
752
|
-
pipeOut: function (value) { return (value ? 3000 : undefined); }
|
753
|
-
}),
|
754
|
-
{
|
755
|
-
name: 'interval',
|
756
|
-
type: 'input-number',
|
757
|
-
visibleOn: 'typeof data.interval === "number"',
|
758
|
-
step: 500,
|
759
|
-
className: 'm-t-n-sm',
|
760
|
-
description: '设置后将自动定时刷新,单位 ms'
|
761
|
-
},
|
762
|
-
AMisCodeEditor.getSchemaTpl('switch', {
|
763
|
-
name: 'silentPolling',
|
764
|
-
label: '静默刷新',
|
765
|
-
visibleOn: '!!data.interval',
|
766
|
-
description: '设置自动定时刷新时是否显示loading'
|
767
|
-
}),
|
768
|
-
{
|
769
|
-
name: 'stopAutoRefreshWhen',
|
770
|
-
label: '停止定时刷新检测表达式',
|
771
|
-
type: 'input-text',
|
772
|
-
visibleOn: '!!data.interval',
|
773
|
-
description: '定时刷新一旦设置会一直刷新,除非给出表达式,条件满足后则不刷新了。'
|
774
|
-
},
|
775
|
-
AMisCodeEditor.getSchemaTpl('switch', {
|
776
|
-
name: 'stopAutoRefreshWhenModalIsOpen',
|
777
|
-
label: '当有弹框时关闭自动刷新',
|
778
|
-
visibleOn: '!!data.interval',
|
779
|
-
description: '弹框打开关闭自动刷新,关闭弹框又恢复'
|
780
|
-
}),
|
781
|
-
{
|
782
|
-
type: 'divider'
|
783
|
-
},
|
784
|
-
AMisCodeEditor.getSchemaTpl('switch', {
|
785
|
-
name: 'draggable',
|
786
|
-
label: '是否可拖拽排序'
|
787
|
-
}),
|
788
|
-
AMisCodeEditor.getSchemaTpl('api', {
|
789
|
-
label: '顺序保存接口',
|
790
|
-
name: 'saveOrderApi',
|
791
|
-
visibleOn: 'data.draggable'
|
792
|
-
}),
|
793
|
-
{
|
794
|
-
type: 'divider'
|
795
|
-
},
|
796
|
-
AMisCodeEditor.getSchemaTpl('api', {
|
797
|
-
label: '快速保存接口',
|
798
|
-
name: 'quickSaveApi',
|
799
|
-
description: '当 column 中设置了快速编辑后将使用此接口批量保存数据。'
|
800
|
-
}),
|
801
|
-
{
|
802
|
-
type: 'divider'
|
803
|
-
},
|
804
|
-
AMisCodeEditor.getSchemaTpl('api', {
|
805
|
-
label: '快速保存单条接口',
|
806
|
-
name: 'quickSaveItemApi',
|
807
|
-
description: '当 column 中设置了快速编辑且设置了立即保存,将使用此接口保存数据。'
|
808
|
-
}),
|
809
|
-
{
|
810
|
-
type: 'divider'
|
811
|
-
},
|
812
|
-
{
|
813
|
-
label: '默认消息提示',
|
814
|
-
type: 'combo',
|
815
|
-
name: 'messages',
|
816
|
-
multiLine: true,
|
817
|
-
description: '覆盖默认消息提示,但如果 api 返回 msg 则会优先使用这个 msg',
|
818
|
-
items: [
|
819
|
-
{
|
820
|
-
label: '获取成功提示',
|
821
|
-
type: 'input-text',
|
822
|
-
name: 'fetchSuccess'
|
823
|
-
},
|
824
|
-
{
|
825
|
-
label: '获取失败提示',
|
826
|
-
type: 'input-text',
|
827
|
-
name: 'fetchFailed'
|
828
|
-
},
|
829
|
-
{
|
830
|
-
label: '保存顺序成功提示',
|
831
|
-
type: 'input-text',
|
832
|
-
name: 'saveOrderSuccess'
|
833
|
-
},
|
834
|
-
{
|
835
|
-
label: '保存顺序失败提示',
|
836
|
-
type: 'input-text',
|
837
|
-
name: 'saveOrderFailed'
|
838
|
-
},
|
839
|
-
{
|
840
|
-
label: '快速保存成功提示',
|
841
|
-
type: 'input-text',
|
842
|
-
name: 'quickSaveSuccess'
|
843
|
-
},
|
844
|
-
{
|
845
|
-
label: '快速保存失败提示',
|
846
|
-
type: 'input-text',
|
847
|
-
name: 'quickSaveFailed'
|
848
|
-
}
|
849
|
-
]
|
850
|
-
}
|
851
|
-
]
|
852
|
-
},
|
853
|
-
{
|
854
|
-
title: '外观',
|
855
|
-
body: [
|
856
|
-
{
|
857
|
-
label: '内容展示模式',
|
858
|
-
name: 'mode',
|
859
|
-
type: 'button-group-select',
|
860
|
-
size: 'xs',
|
861
|
-
pipeIn: function (value, values) { var _a; return (_a = (value === 'grid' ? 'cards' : value)) !== null && _a !== void 0 ? _a : 'table'; },
|
862
|
-
onChange: function (value, oldValue, model, form) {
|
863
|
-
var _a, _b, _c, _d, _e;
|
864
|
-
var headerHasColumnsToggle = (_b = (_a = form === null || form === void 0 ? void 0 : form.data) === null || _a === void 0 ? void 0 : _a.headerToolbar) === null || _b === void 0 ? void 0 : _b.some(function (item) { return item.type === 'columns-toggler'; });
|
865
|
-
var headerToolbar = cloneDeep__default["default"]((_c = form === null || form === void 0 ? void 0 : form.data) === null || _c === void 0 ? void 0 : _c.headerToolbar);
|
866
|
-
var columnsToggler;
|
867
|
-
if (value !== 'table' && oldValue === 'table') {
|
868
|
-
// 存储table模式是否有 columns-toggler
|
869
|
-
columnsToggler = (headerToolbar === null || headerToolbar === void 0 ? void 0 : headerToolbar.find(function (item) { return item.type === 'columns-toggler'; })) || {
|
870
|
-
type: 'columns-toggler',
|
871
|
-
align: 'right'
|
872
|
-
};
|
873
|
-
form.setValues({
|
874
|
-
__headerHasColumnsToggler: headerHasColumnsToggle
|
875
|
-
});
|
876
|
-
}
|
877
|
-
headerToolbar =
|
878
|
-
value === 'table'
|
879
|
-
? headerToolbar
|
880
|
-
: headerToolbar === null || headerToolbar === void 0 ? void 0 : headerToolbar.filter(function (item) { return item.type !== 'columns-toggler'; });
|
881
|
-
if (value === 'table') {
|
882
|
-
if (((_d = form === null || form === void 0 ? void 0 : form.data) === null || _d === void 0 ? void 0 : _d.__headerHasColumnsToggler) &&
|
883
|
-
!headerHasColumnsToggle) {
|
884
|
-
headerToolbar === null || headerToolbar === void 0 ? void 0 : headerToolbar.push(((_e = form === null || form === void 0 ? void 0 : form.data) === null || _e === void 0 ? void 0 : _e.__cacheColumnsToggler) || {
|
885
|
-
type: 'columns-toggler',
|
886
|
-
align: 'right'
|
887
|
-
});
|
888
|
-
}
|
889
|
-
form.setValues({
|
890
|
-
headerToolbar: headerToolbar,
|
891
|
-
columns: form.data.__columns || [
|
892
|
-
{
|
893
|
-
label: 'ID',
|
894
|
-
name: 'id'
|
895
|
-
},
|
896
|
-
{
|
897
|
-
label: '列信息',
|
898
|
-
name: 'name'
|
899
|
-
}
|
900
|
-
],
|
901
|
-
__headerHasColumnsToggler: headerHasColumnsToggle,
|
902
|
-
__card: form.data.card || form.data.__card,
|
903
|
-
__listItem: form.data.listItem || form.data.__listItem
|
904
|
-
});
|
905
|
-
form.deleteValueByName('card');
|
906
|
-
form.deleteValueByName('listItem');
|
907
|
-
}
|
908
|
-
else if (value === 'cards') {
|
909
|
-
oldValue === 'table' &&
|
910
|
-
form.setValues({
|
911
|
-
__cacheColumnsToggler: columnsToggler
|
912
|
-
});
|
913
|
-
form.setValues({
|
914
|
-
headerToolbar: headerToolbar,
|
915
|
-
card: form.data.__card || {
|
916
|
-
type: 'card',
|
917
|
-
header: {
|
918
|
-
title: '标题',
|
919
|
-
subTitle: '副标题'
|
920
|
-
},
|
921
|
-
body: [
|
922
|
-
{
|
923
|
-
name: 'a',
|
924
|
-
label: 'A'
|
925
|
-
},
|
926
|
-
{
|
927
|
-
name: 'b',
|
928
|
-
label: 'B'
|
929
|
-
}
|
930
|
-
],
|
931
|
-
actions: [
|
932
|
-
{
|
933
|
-
label: '详情',
|
934
|
-
type: 'button'
|
935
|
-
}
|
936
|
-
]
|
937
|
-
},
|
938
|
-
__columns: form.data.columns || form.data.__columns,
|
939
|
-
__listItem: form.data.listItem || form.data.__listItem
|
940
|
-
});
|
941
|
-
form.deleteValueByName('columns');
|
942
|
-
form.deleteValueByName('listItem');
|
943
|
-
}
|
944
|
-
else {
|
945
|
-
oldValue === 'table' &&
|
946
|
-
form.setValues({
|
947
|
-
__cacheColumnsToggler: columnsToggler
|
948
|
-
});
|
949
|
-
form.setValues({
|
950
|
-
headerToolbar: headerToolbar,
|
951
|
-
listItem: form.data.__listItem || {
|
952
|
-
body: [
|
953
|
-
{
|
954
|
-
type: 'tpl',
|
955
|
-
tpl: '简单的展示数据:$a $b'
|
956
|
-
}
|
957
|
-
],
|
958
|
-
actions: [
|
959
|
-
{
|
960
|
-
icon: 'fa fa-eye',
|
961
|
-
type: 'button'
|
962
|
-
}
|
963
|
-
]
|
964
|
-
},
|
965
|
-
__columns: form.data.columns || form.data.__columns,
|
966
|
-
__card: form.data.card || form.data.__card
|
967
|
-
});
|
968
|
-
form.deleteValueByName('columns');
|
969
|
-
form.deleteValueByName('card');
|
970
|
-
}
|
971
|
-
},
|
972
|
-
options: [
|
973
|
-
{
|
974
|
-
value: 'table',
|
975
|
-
label: '表格'
|
976
|
-
},
|
977
|
-
{
|
978
|
-
value: 'cards',
|
979
|
-
label: '卡片'
|
980
|
-
},
|
981
|
-
{
|
982
|
-
value: 'list',
|
983
|
-
label: '列表'
|
984
|
-
}
|
985
|
-
]
|
986
|
-
},
|
987
|
-
{
|
988
|
-
name: 'headerToolbar',
|
989
|
-
type: 'combo',
|
990
|
-
draggable: true,
|
991
|
-
draggableTip: '',
|
992
|
-
descrition: '非内建内容请在预览区选中后编辑',
|
993
|
-
label: '顶部工具栏配置',
|
994
|
-
pipeIn: function (value) {
|
995
|
-
if (!Array.isArray(value)) {
|
996
|
-
value = value ? [value] : ['bulkActions'];
|
997
|
-
}
|
998
|
-
return value.map(function (item) {
|
999
|
-
var type = item.type;
|
1000
|
-
if (typeof item === 'string' &&
|
1001
|
-
~[
|
1002
|
-
'bulkActions',
|
1003
|
-
'bulk-actions',
|
1004
|
-
'pagination',
|
1005
|
-
'statistics',
|
1006
|
-
'switch-per-page',
|
1007
|
-
'filter-toggler',
|
1008
|
-
'load-more',
|
1009
|
-
'export-csv',
|
1010
|
-
'export-excel'
|
1011
|
-
].indexOf(item)) {
|
1012
|
-
type = item === 'bulkActions' ? 'bulk-actions' : item;
|
1013
|
-
item = { type: type };
|
1014
|
-
}
|
1015
|
-
else if (typeof item === 'string') {
|
1016
|
-
type = 'tpl';
|
1017
|
-
item =
|
1018
|
-
typeof item === 'string' ? { type: 'tpl', tpl: item } : item;
|
1019
|
-
}
|
1020
|
-
return tslib.__assign({ type: type }, item);
|
1021
|
-
});
|
1022
|
-
},
|
1023
|
-
pipeOut: function (value) {
|
1024
|
-
if (Array.isArray(value)) {
|
1025
|
-
return value.map(function (item) {
|
1026
|
-
if (item.type === 'button') {
|
1027
|
-
return AMisCodeEditor.JSONPipeIn(tslib.__assign({ label: '按钮', type: 'button' }, item));
|
1028
|
-
}
|
1029
|
-
else if (item.type === 'tpl') {
|
1030
|
-
return AMisCodeEditor.JSONPipeIn(tslib.__assign({ type: 'tpl', tpl: '内容' }, item));
|
1031
|
-
}
|
1032
|
-
return item;
|
1033
|
-
});
|
1034
|
-
}
|
1035
|
-
return [];
|
1036
|
-
},
|
1037
|
-
scaffold: {
|
1038
|
-
type: 'tpl',
|
1039
|
-
tpl: '内容'
|
1040
|
-
},
|
1041
|
-
multiple: true,
|
1042
|
-
items: [
|
1043
|
-
{
|
1044
|
-
type: 'select',
|
1045
|
-
name: 'type',
|
1046
|
-
columnClassName: 'w-ssm',
|
1047
|
-
options: [
|
1048
|
-
{
|
1049
|
-
value: 'bulk-actions',
|
1050
|
-
label: '操作栏'
|
1051
|
-
},
|
1052
|
-
{
|
1053
|
-
value: 'pagination',
|
1054
|
-
label: '分页'
|
1055
|
-
},
|
1056
|
-
{
|
1057
|
-
value: 'statistics',
|
1058
|
-
label: '统计数据'
|
1059
|
-
},
|
1060
|
-
{
|
1061
|
-
value: 'switch-per-page',
|
1062
|
-
label: '切换页码'
|
1063
|
-
},
|
1064
|
-
{
|
1065
|
-
value: 'load-more',
|
1066
|
-
label: '加载更多'
|
1067
|
-
},
|
1068
|
-
{
|
1069
|
-
value: 'export-csv',
|
1070
|
-
label: '导出 CSV'
|
1071
|
-
},
|
1072
|
-
{
|
1073
|
-
value: 'export-excel',
|
1074
|
-
label: '导出 Excel'
|
1075
|
-
},
|
1076
|
-
{
|
1077
|
-
value: 'columns-toggler',
|
1078
|
-
label: '列选择器',
|
1079
|
-
visibleOn: '!this.mode || this.mode === "table"'
|
1080
|
-
},
|
1081
|
-
{
|
1082
|
-
value: 'filter-toggler',
|
1083
|
-
label: '查询条件切换'
|
1084
|
-
},
|
1085
|
-
{
|
1086
|
-
value: 'drag-toggler',
|
1087
|
-
label: '拖拽切换'
|
1088
|
-
},
|
1089
|
-
{
|
1090
|
-
value: 'check-all',
|
1091
|
-
label: '全选',
|
1092
|
-
hiddenOn: '!this.mode || this.mode === "table"'
|
1093
|
-
},
|
1094
|
-
{
|
1095
|
-
value: 'tpl',
|
1096
|
-
label: '文本'
|
1097
|
-
},
|
1098
|
-
{
|
1099
|
-
value: 'button',
|
1100
|
-
label: '按钮'
|
1101
|
-
}
|
1102
|
-
]
|
1103
|
-
},
|
1104
|
-
{
|
1105
|
-
name: 'align',
|
1106
|
-
placeholder: '对齐方式',
|
1107
|
-
type: 'select',
|
1108
|
-
size: 'xs',
|
1109
|
-
options: [
|
1110
|
-
{
|
1111
|
-
label: '左对齐',
|
1112
|
-
value: 'left'
|
1113
|
-
},
|
1114
|
-
{
|
1115
|
-
label: '右对齐',
|
1116
|
-
value: 'right'
|
1117
|
-
}
|
1118
|
-
]
|
1119
|
-
}
|
1120
|
-
// {
|
1121
|
-
// type: 'remark',
|
1122
|
-
// content: '详情请在预览区域选中后进行编辑。',
|
1123
|
-
// trigger: ['click'],
|
1124
|
-
// rootClose: true,
|
1125
|
-
// placement: 'left',
|
1126
|
-
// visibleOn:
|
1127
|
-
// '!~["bulkActions", "drag-toggler", "check-all", "bulk-actions", "pagination", "statistics", "switch-per-page", "filter-toggler", "load-more"].indexOf(this.type)',
|
1128
|
-
// columnClassName: 'no-grow w-3x p-t-xs',
|
1129
|
-
// className: 'm-l-none'
|
1130
|
-
// }
|
1131
|
-
]
|
1132
|
-
},
|
1133
|
-
{
|
1134
|
-
name: 'footerToolbar',
|
1135
|
-
type: 'combo',
|
1136
|
-
draggable: true,
|
1137
|
-
draggableTip: '',
|
1138
|
-
descrition: '非内建内容请在预览区选中后编辑',
|
1139
|
-
label: '底部工具栏配置',
|
1140
|
-
pipeIn: function (value) {
|
1141
|
-
if (!Array.isArray(value)) {
|
1142
|
-
value = value ? [value] : ['statistics', 'pagination'];
|
1143
|
-
}
|
1144
|
-
return value.map(function (item) {
|
1145
|
-
var type = item.type;
|
1146
|
-
if (typeof item === 'string' &&
|
1147
|
-
~[
|
1148
|
-
'bulkActions',
|
1149
|
-
'bulk-actions',
|
1150
|
-
'pagination',
|
1151
|
-
'statistics',
|
1152
|
-
'switch-per-page',
|
1153
|
-
'filter-toggler',
|
1154
|
-
'load-more',
|
1155
|
-
'export-csv',
|
1156
|
-
'export-excel'
|
1157
|
-
].indexOf(item)) {
|
1158
|
-
type = item === 'bulkActions' ? 'bulk-actions' : item;
|
1159
|
-
item = { type: type };
|
1160
|
-
}
|
1161
|
-
else if (typeof item === 'string') {
|
1162
|
-
type = 'tpl';
|
1163
|
-
item =
|
1164
|
-
typeof item === 'string' ? { type: 'tpl', tpl: item } : item;
|
1165
|
-
}
|
1166
|
-
return tslib.__assign({ type: type }, item);
|
1167
|
-
});
|
1168
|
-
},
|
1169
|
-
pipeOut: function (value) {
|
1170
|
-
if (Array.isArray(value)) {
|
1171
|
-
return value.map(function (item) {
|
1172
|
-
if (item.type === 'button') {
|
1173
|
-
return AMisCodeEditor.JSONPipeIn(tslib.__assign({ label: '按钮', type: 'button' }, item));
|
1174
|
-
}
|
1175
|
-
else if (item.type === 'tpl') {
|
1176
|
-
return AMisCodeEditor.JSONPipeIn(tslib.__assign({ type: 'tpl', tpl: '内容' }, item));
|
1177
|
-
}
|
1178
|
-
return item;
|
1179
|
-
});
|
1180
|
-
}
|
1181
|
-
return [];
|
1182
|
-
},
|
1183
|
-
scaffold: {
|
1184
|
-
type: 'tpl',
|
1185
|
-
tpl: '内容'
|
1186
|
-
},
|
1187
|
-
multiple: true,
|
1188
|
-
items: [
|
1189
|
-
{
|
1190
|
-
type: 'select',
|
1191
|
-
name: 'type',
|
1192
|
-
columnClassName: 'w-ssm',
|
1193
|
-
options: [
|
1194
|
-
{
|
1195
|
-
value: 'bulk-actions',
|
1196
|
-
label: '操作栏'
|
1197
|
-
},
|
1198
|
-
{
|
1199
|
-
value: 'pagination',
|
1200
|
-
label: '分页'
|
1201
|
-
},
|
1202
|
-
{
|
1203
|
-
value: 'statistics',
|
1204
|
-
label: '统计数据'
|
1205
|
-
},
|
1206
|
-
{
|
1207
|
-
value: 'switch-per-page',
|
1208
|
-
label: '切换页码'
|
1209
|
-
},
|
1210
|
-
{
|
1211
|
-
value: 'load-more',
|
1212
|
-
label: '加载更多'
|
1213
|
-
},
|
1214
|
-
{
|
1215
|
-
value: 'export-csv',
|
1216
|
-
label: '导出 CSV'
|
1217
|
-
},
|
1218
|
-
{
|
1219
|
-
value: 'export-excel',
|
1220
|
-
label: '导出 Excel'
|
1221
|
-
},
|
1222
|
-
{
|
1223
|
-
value: 'columns-toggler',
|
1224
|
-
label: '列选择器',
|
1225
|
-
hiddenOn: '["grid", "cards", "list"].indexOf(this.mode)'
|
1226
|
-
},
|
1227
|
-
{
|
1228
|
-
value: 'filter-toggler',
|
1229
|
-
label: '查询条件切换'
|
1230
|
-
},
|
1231
|
-
{
|
1232
|
-
value: 'drag-toggler',
|
1233
|
-
label: '拖拽切换'
|
1234
|
-
},
|
1235
|
-
{
|
1236
|
-
value: 'check-all',
|
1237
|
-
label: '全选',
|
1238
|
-
hiddenOn: '!this.mode || this.mode === "table"'
|
1239
|
-
},
|
1240
|
-
{
|
1241
|
-
value: 'tpl',
|
1242
|
-
label: '文本'
|
1243
|
-
},
|
1244
|
-
{
|
1245
|
-
value: 'button',
|
1246
|
-
label: '按钮'
|
1247
|
-
}
|
1248
|
-
]
|
1249
|
-
},
|
1250
|
-
{
|
1251
|
-
name: 'align',
|
1252
|
-
placeholder: '对齐方式',
|
1253
|
-
size: 'xs',
|
1254
|
-
type: 'select',
|
1255
|
-
options: [
|
1256
|
-
{
|
1257
|
-
label: '左对齐',
|
1258
|
-
value: 'left'
|
1259
|
-
},
|
1260
|
-
{
|
1261
|
-
label: '右对齐',
|
1262
|
-
value: 'right'
|
1263
|
-
}
|
1264
|
-
]
|
1265
|
-
},
|
1266
|
-
{
|
1267
|
-
type: 'remark',
|
1268
|
-
content: '详情请在预览区域选中后进行编辑。',
|
1269
|
-
trigger: ['click'],
|
1270
|
-
rootClose: true,
|
1271
|
-
placement: 'left',
|
1272
|
-
visibleOn: '!~["bulkActions", "drag-toggler", "check-all", "bulk-actions", "pagination", "statistics", "switch-per-page", "filter-toggler", "load-more", "export-csv", "export-excel"].indexOf(this.type)',
|
1273
|
-
columnClassName: 'no-grow w-3x p-t-xs',
|
1274
|
-
className: 'm-l-none'
|
1275
|
-
}
|
1276
|
-
]
|
1277
|
-
},
|
1278
|
-
AMisCodeEditor.getSchemaTpl('switch', {
|
1279
|
-
name: 'filterTogglable',
|
1280
|
-
label: '是否可显隐查询条件',
|
1281
|
-
visibleOn: 'data.filter'
|
1282
|
-
}),
|
1283
|
-
AMisCodeEditor.getSchemaTpl('switch', {
|
1284
|
-
name: 'filterDefaultVisible',
|
1285
|
-
label: '查询条件默认是否可见',
|
1286
|
-
visibleOn: 'data.filter && data.filterTogglable',
|
1287
|
-
pipeIn: AMisCodeEditor.defaultValue(true)
|
1288
|
-
}),
|
1289
|
-
AMisCodeEditor.getSchemaTpl('switch', {
|
1290
|
-
name: 'hideQuickSaveBtn',
|
1291
|
-
label: '隐藏顶部快速保存提示'
|
1292
|
-
}),
|
1293
|
-
AMisCodeEditor.getSchemaTpl('switch', {
|
1294
|
-
name: 'alwaysShowPagination',
|
1295
|
-
label: '是否总是显示分页'
|
1296
|
-
}),
|
1297
|
-
AMisCodeEditor.getSchemaTpl('switch', {
|
1298
|
-
name: 'hideCheckToggler',
|
1299
|
-
label: '隐藏选择按钮',
|
1300
|
-
visibleOn: 'data.checkOnItemClick'
|
1301
|
-
}),
|
1302
|
-
AMisCodeEditor.getSchemaTpl('className'),
|
1303
|
-
AMisCodeEditor.getSchemaTpl('className', {
|
1304
|
-
name: 'bodyClassName',
|
1305
|
-
label: '内容 CSS 类名'
|
1306
|
-
})
|
1307
|
-
]
|
1308
|
-
},
|
1309
|
-
{
|
1310
|
-
title: '其他',
|
1311
|
-
body: [
|
1312
|
-
AMisCodeEditor.getSchemaTpl('ref'),
|
1313
|
-
{
|
1314
|
-
name: 'source',
|
1315
|
-
label: '数据源',
|
1316
|
-
type: 'input-text',
|
1317
|
-
description: '不填写,默认读取接口返回的 items 或者 rows 属性,如果是别的,请在此设置,如: <code>\\${xxxx}</code>'
|
1318
|
-
},
|
1319
|
-
{
|
1320
|
-
name: 'perPage',
|
1321
|
-
label: '每页数量',
|
1322
|
-
type: 'input-number'
|
1323
|
-
},
|
1324
|
-
AMisCodeEditor.getSchemaTpl('switch', {
|
1325
|
-
name: 'keepItemSelectionOnPageChange',
|
1326
|
-
label: '翻页时保留选择'
|
1327
|
-
}),
|
1328
|
-
{
|
1329
|
-
name: 'maxKeepItemSelectionLength',
|
1330
|
-
label: '最大选择数量',
|
1331
|
-
type: 'input-number',
|
1332
|
-
mode: 'inline',
|
1333
|
-
className: 'block'
|
1334
|
-
},
|
1335
|
-
{
|
1336
|
-
name: 'pageField',
|
1337
|
-
label: '页码字段名',
|
1338
|
-
type: 'input-text',
|
1339
|
-
pipeIn: AMisCodeEditor.defaultValue('page')
|
1340
|
-
},
|
1341
|
-
{
|
1342
|
-
name: 'perPageField',
|
1343
|
-
label: '分页步长字段名',
|
1344
|
-
type: 'input-text',
|
1345
|
-
pipeIn: AMisCodeEditor.defaultValue('perPage')
|
1346
|
-
},
|
1347
|
-
{
|
1348
|
-
name: 'orderField',
|
1349
|
-
label: '排序权重字段',
|
1350
|
-
type: 'input-text',
|
1351
|
-
labelRemark: {
|
1352
|
-
className: 'm-l-xs',
|
1353
|
-
trigger: 'click',
|
1354
|
-
rootClose: true,
|
1355
|
-
content: '设置用来确定位置的字段名,设置后新的顺序将被赋值到该字段中。',
|
1356
|
-
placement: 'left'
|
1357
|
-
}
|
1358
|
-
},
|
1359
|
-
{
|
1360
|
-
name: 'perPageAvailable',
|
1361
|
-
label: '切换每页数',
|
1362
|
-
type: 'input-array',
|
1363
|
-
hiddenOn: 'data.loadDataOnce',
|
1364
|
-
items: {
|
1365
|
-
type: 'input-number',
|
1366
|
-
required: true
|
1367
|
-
},
|
1368
|
-
value: [10]
|
1369
|
-
},
|
1370
|
-
AMisCodeEditor.getSchemaTpl('name'),
|
1371
|
-
{
|
1372
|
-
name: 'itemCheckableOn',
|
1373
|
-
type: 'input-text',
|
1374
|
-
label: '配置单条可选中的表达式',
|
1375
|
-
description: '请使用 js 表达式,不设置的话每条都可选中。',
|
1376
|
-
visibleOn: 'data.bulkActions && data.bulkActions.length || data.pickerMode'
|
1377
|
-
},
|
1378
|
-
AMisCodeEditor.getSchemaTpl('switch', {
|
1379
|
-
name: 'checkOnItemClick',
|
1380
|
-
label: '开启单条点击整个区域选中',
|
1381
|
-
visibleOn: 'data.bulkActions && data.bulkActions.length || data.pickerMode'
|
1382
|
-
}),
|
1383
|
-
AMisCodeEditor.getSchemaTpl('switch', {
|
1384
|
-
name: 'autoJumpToTopOnPagerChange',
|
1385
|
-
label: '自动跳顶部',
|
1386
|
-
description: '当切分页的时候,是否自动跳顶部'
|
1387
|
-
}),
|
1388
|
-
AMisCodeEditor.getSchemaTpl('switch', {
|
1389
|
-
name: 'syncResponse2Query',
|
1390
|
-
label: '同步查询条件',
|
1391
|
-
description: '查询后将返回的数据同步到查询条件上'
|
1392
|
-
})
|
1393
|
-
]
|
1394
|
-
}
|
1395
|
-
]);
|
1396
|
-
};
|
1397
|
-
_this.wrapperProps = {
|
1398
|
-
affixHeader: false
|
1399
|
-
};
|
1400
|
-
return _this;
|
1401
|
-
}
|
1402
|
-
CRUDPlugin.prototype.addItem = function (source, target) {
|
1403
|
-
var canAdd = source.find(function (item) { return item.label === target.label; });
|
1404
|
-
if (!canAdd) {
|
1405
|
-
source.push(target);
|
1406
|
-
}
|
29
|
+
|
30
|
+
var CRUDPlugin =
|
31
|
+
/** @class */
|
32
|
+
function (_super) {
|
33
|
+
tslib.__extends(CRUDPlugin, _super);
|
34
|
+
|
35
|
+
function CRUDPlugin() {
|
36
|
+
var _this = _super !== null && _super.apply(this, arguments) || this; // 关联渲染器名字
|
37
|
+
|
38
|
+
|
39
|
+
_this.rendererName = 'crud';
|
40
|
+
_this.$schema = '/schemas/CRUDSchema.json';
|
41
|
+
_this.order = -1000; // 组件名称
|
42
|
+
|
43
|
+
_this.name = i18nRuntime.i18n("d7213304d1a8a02a73a2f4010839e061");
|
44
|
+
_this.isBaseComponent = true;
|
45
|
+
_this.description = i18nRuntime.i18n("7a9f1ec32752de8b69ef21138970f64d");
|
46
|
+
_this.docLink = '/amis/zh-CN/components/crud';
|
47
|
+
_this.tags = [i18nRuntime.i18n("997c7a5d34f6fc628893f509d0df32e0")];
|
48
|
+
_this.icon = 'fa fa-table';
|
49
|
+
_this.pluginIcon = 'table-plugin';
|
50
|
+
_this.scaffold = {
|
51
|
+
type: 'crud',
|
52
|
+
syncLocation: false,
|
53
|
+
api: '',
|
54
|
+
columns: [{
|
55
|
+
name: 'id',
|
56
|
+
label: 'ID',
|
57
|
+
type: 'text'
|
58
|
+
}, {
|
59
|
+
name: 'engine',
|
60
|
+
label: i18nRuntime.i18n("48c68eb5a42e2b3e679c53b00f6e203f"),
|
61
|
+
type: 'text'
|
62
|
+
}],
|
63
|
+
bulkActions: [],
|
64
|
+
itemActions: []
|
1407
65
|
};
|
1408
|
-
|
1409
|
-
|
1410
|
-
|
1411
|
-
|
1412
|
-
|
1413
|
-
|
66
|
+
_this.actions = [{
|
67
|
+
actionType: 'reload',
|
68
|
+
actionLabel: i18nRuntime.i18n("64ca9bab920a2983bcf270320d850d00"),
|
69
|
+
description: i18nRuntime.i18n("9ef5597ac0b4da662bcd967da37eceb4")
|
70
|
+
}];
|
71
|
+
_this.btnSchemas = {
|
72
|
+
create: {
|
73
|
+
label: i18nRuntime.i18n("66ab5e9f24c8f46012a25c89919fb191"),
|
74
|
+
type: 'button',
|
75
|
+
actionType: 'dialog',
|
76
|
+
level: 'primary',
|
77
|
+
dialog: {
|
78
|
+
title: i18nRuntime.i18n("66ab5e9f24c8f46012a25c89919fb191"),
|
79
|
+
body: {
|
80
|
+
type: 'form',
|
81
|
+
api: 'xxx/create',
|
82
|
+
body: []
|
83
|
+
}
|
1414
84
|
}
|
1415
|
-
|
1416
|
-
|
1417
|
-
|
1418
|
-
|
1419
|
-
|
1420
|
-
|
1421
|
-
|
85
|
+
},
|
86
|
+
update: {
|
87
|
+
label: i18nRuntime.i18n("95b351c86267f3aedf89520959bce689"),
|
88
|
+
type: 'button',
|
89
|
+
actionType: 'dialog',
|
90
|
+
level: 'link',
|
91
|
+
dialog: {
|
92
|
+
title: i18nRuntime.i18n("95b351c86267f3aedf89520959bce689"),
|
93
|
+
body: {
|
94
|
+
type: 'form',
|
95
|
+
api: 'xxx/update',
|
96
|
+
body: []
|
97
|
+
}
|
1422
98
|
}
|
1423
|
-
|
1424
|
-
|
1425
|
-
|
1426
|
-
|
1427
|
-
|
1428
|
-
|
1429
|
-
|
1430
|
-
|
1431
|
-
|
1432
|
-
|
1433
|
-
|
1434
|
-
|
1435
|
-
|
1436
|
-
previewSchema: plugin.previewSchema,
|
1437
|
-
tags: plugin.tags,
|
1438
|
-
docLink: plugin.docLink,
|
1439
|
-
type: plugin.type,
|
1440
|
-
scaffold: plugin.scaffold,
|
1441
|
-
disabledRendererPlugin: plugin.disabledRendererPlugin,
|
1442
|
-
isBaseComponent: plugin.isBaseComponent,
|
1443
|
-
scaffoldForm: this.scaffoldForm,
|
1444
|
-
rendererName: plugin.rendererName
|
1445
|
-
};
|
99
|
+
},
|
100
|
+
view: {
|
101
|
+
label: i18nRuntime.i18n("607e7a4f377fa66b0b28ce318aab841f"),
|
102
|
+
type: 'button',
|
103
|
+
actionType: 'dialog',
|
104
|
+
level: 'link',
|
105
|
+
dialog: {
|
106
|
+
title: i18nRuntime.i18n("5b48dbb8dc710cffe6313bb56a7f6d47"),
|
107
|
+
body: {
|
108
|
+
type: 'form',
|
109
|
+
api: 'xxx/update',
|
110
|
+
body: []
|
111
|
+
}
|
1446
112
|
}
|
1447
|
-
|
1448
|
-
|
1449
|
-
|
1450
|
-
|
1451
|
-
|
113
|
+
},
|
114
|
+
delete: {
|
115
|
+
type: 'button',
|
116
|
+
label: i18nRuntime.i18n("2f4aaddde33c9b93c36fd2503f3d122b"),
|
117
|
+
actionType: 'ajax',
|
118
|
+
level: 'link',
|
119
|
+
className: 'text-danger',
|
120
|
+
confirmText: i18nRuntime.i18n("6c546666aab964c39cd8bfdf4fbd46b8"),
|
121
|
+
api: 'delete:/xxx/delete'
|
122
|
+
},
|
123
|
+
bulkDelete: {
|
124
|
+
type: 'button',
|
125
|
+
level: 'danger',
|
126
|
+
label: i18nRuntime.i18n("7fb62b30119c3797a843a48368463314"),
|
127
|
+
actionType: 'ajax',
|
128
|
+
confirmText: i18nRuntime.i18n("6c546666aab964c39cd8bfdf4fbd46b8"),
|
129
|
+
api: '/xxx/batch-delete'
|
130
|
+
},
|
131
|
+
bulkUpdate: {
|
132
|
+
type: 'button',
|
133
|
+
label: i18nRuntime.i18n("e73cefac9d030927da1618c7b15c98c9"),
|
134
|
+
actionType: 'dialog',
|
135
|
+
dialog: {
|
136
|
+
title: i18nRuntime.i18n("e73cefac9d030927da1618c7b15c98c9"),
|
137
|
+
size: 'md',
|
138
|
+
body: {
|
139
|
+
type: 'form',
|
140
|
+
api: '/xxx/bacth-edit',
|
141
|
+
body: [{
|
142
|
+
label: i18nRuntime.i18n("19c6b7463e1bf73bb4b12ba07abd5444"),
|
143
|
+
text: i18nRuntime.i18n("19c6b7463e1bf73bb4b12ba07abd5444"),
|
144
|
+
type: 'input-text'
|
145
|
+
}]
|
146
|
+
}
|
1452
147
|
}
|
1453
|
-
|
148
|
+
},
|
149
|
+
// itemDelete: {
|
150
|
+
// type: 'button',
|
151
|
+
// level: 'danger',
|
152
|
+
// label: '删除',
|
153
|
+
// api: '/xxx/delete-one',
|
154
|
+
// actionType: 'ajax',
|
155
|
+
// confirmText: '确定要删除?'
|
156
|
+
// },
|
157
|
+
filter: {
|
158
|
+
title: i18nRuntime.i18n("cf12e55021998a8328201800ec356773"),
|
159
|
+
body: [{
|
160
|
+
type: 'input-text',
|
161
|
+
name: 'keywords',
|
162
|
+
label: i18nRuntime.i18n("cfb5f18c43753ad5329348d626bd3739")
|
163
|
+
}]
|
164
|
+
}
|
1454
165
|
};
|
1455
|
-
|
1456
|
-
|
1457
|
-
|
1458
|
-
|
1459
|
-
|
1460
|
-
|
1461
|
-
|
1462
|
-
|
1463
|
-
|
1464
|
-
|
1465
|
-
|
1466
|
-
|
1467
|
-
|
166
|
+
_this.scaffoldForm = {
|
167
|
+
title: i18nRuntime.i18n("4a1e3c50547e61503a2d1c356005eb08"),
|
168
|
+
body: [amisEditorCore.getSchemaTpl('apiControl', {
|
169
|
+
label: i18nRuntime.i18n("85624c8e8b0fc98954eecbe508e8b59d"),
|
170
|
+
sampleBuilder: function (schema) {
|
171
|
+
return JSON.stringify({
|
172
|
+
status: 0,
|
173
|
+
msg: '',
|
174
|
+
data: [{
|
175
|
+
id: 1,
|
176
|
+
name: 'Jack'
|
177
|
+
}, {
|
178
|
+
id: 2,
|
179
|
+
name: 'Rose'
|
180
|
+
}]
|
181
|
+
}, null, 2);
|
1468
182
|
}
|
1469
|
-
|
1470
|
-
|
1471
|
-
|
1472
|
-
|
1473
|
-
|
1474
|
-
|
183
|
+
}), {
|
184
|
+
type: 'button',
|
185
|
+
label: i18nRuntime.i18n("3dd674542204724eb5417efc7354ec73"),
|
186
|
+
className: 'm-t-xs m-b-xs',
|
187
|
+
onClick: function (e, props) {
|
188
|
+
return tslib.__awaiter(_this, void 0, void 0, function () {
|
189
|
+
var data, schemaFilter, api, result, autoFillKeyValues, items;
|
190
|
+
|
191
|
+
var _a, _b;
|
192
|
+
|
193
|
+
return tslib.__generator(this, function (_c) {
|
194
|
+
switch (_c.label) {
|
195
|
+
case 0:
|
196
|
+
data = props.data;
|
197
|
+
schemaFilter = mobxStateTree.getEnv(window.editorStore).schemaFilter;
|
198
|
+
api = data.api; // 主要是给爱速搭中替换 url
|
199
|
+
|
200
|
+
if (schemaFilter) {
|
201
|
+
api = schemaFilter({
|
202
|
+
api: data.api
|
203
|
+
}).api;
|
204
|
+
}
|
205
|
+
|
206
|
+
return [4
|
207
|
+
/*yield*/
|
208
|
+
, props.env.fetcher(api, data)];
|
209
|
+
|
210
|
+
case 1:
|
211
|
+
result = _c.sent();
|
212
|
+
autoFillKeyValues = [];
|
213
|
+
items = ((_a = result.data) === null || _a === void 0 ? void 0 : _a.rows) || ((_b = result.data) === null || _b === void 0 ? void 0 : _b.items);
|
214
|
+
|
215
|
+
if (items === null || items === void 0 ? void 0 : items.length) {
|
216
|
+
Object.keys(items[0]).forEach(function (key) {
|
217
|
+
items[0][key];
|
218
|
+
autoFillKeyValues.push({
|
219
|
+
label: key,
|
220
|
+
type: 'text',
|
221
|
+
name: key
|
222
|
+
});
|
1475
223
|
});
|
1476
|
-
|
1477
|
-
|
1478
|
-
|
1479
|
-
|
1480
|
-
|
1481
|
-
|
1482
|
-
|
1483
|
-
|
1484
|
-
|
1485
|
-
|
1486
|
-
|
1487
|
-
|
1488
|
-
|
1489
|
-
|
1490
|
-
|
1491
|
-
|
1492
|
-
|
1493
|
-
|
1494
|
-
|
224
|
+
props.formStore.setValues({
|
225
|
+
columns: autoFillKeyValues
|
226
|
+
}); // 查询条件的字段列表
|
227
|
+
|
228
|
+
props.formStore.setValues({
|
229
|
+
filterSettingSource: autoFillKeyValues.map(function (column) {
|
230
|
+
return column.name;
|
231
|
+
})
|
232
|
+
});
|
233
|
+
} else {
|
234
|
+
amis.toast.warning("API\u8FD4\u56DE\u683C\u5F0F\u4E0D\u6B63\u786E\uFF0C\u8BF7\u70B9\u51FB\u63A5\u53E3\u5730\u5740\u53F3\u4FA7\u793A\u4F8B\u7684\u95EE\u53F7\u67E5\u770B\u793A\u4F8B");
|
235
|
+
}
|
236
|
+
|
237
|
+
return [2
|
238
|
+
/*return*/
|
239
|
+
];
|
240
|
+
}
|
241
|
+
});
|
242
|
+
});
|
1495
243
|
}
|
1496
|
-
|
244
|
+
}, {
|
245
|
+
name: 'features',
|
246
|
+
label: i18nRuntime.i18n("07b59fd09f6007bac246d9a73b793a49"),
|
247
|
+
type: 'checkboxes',
|
248
|
+
joinValues: false,
|
249
|
+
extractValue: true,
|
250
|
+
itemClassName: 'max-w-lg',
|
251
|
+
options: [{
|
252
|
+
label: i18nRuntime.i18n("66ab5e9f24c8f46012a25c89919fb191"),
|
253
|
+
value: 'create'
|
254
|
+
}, {
|
255
|
+
label: i18nRuntime.i18n("bee912d79eefb7335988c4997aa9138d"),
|
256
|
+
value: 'filter'
|
257
|
+
}, {
|
258
|
+
label: i18nRuntime.i18n("7fb62b30119c3797a843a48368463314"),
|
259
|
+
value: 'bulkDelete'
|
260
|
+
}, {
|
261
|
+
label: i18nRuntime.i18n("0f61da949d2b45534967e197cc2eee29"),
|
262
|
+
value: 'bulkUpdate'
|
263
|
+
}, {
|
264
|
+
label: i18nRuntime.i18n("aa85b3cd6aa4cdfd45bfe5a96678ad2f"),
|
265
|
+
value: 'update'
|
266
|
+
}, {
|
267
|
+
label: i18nRuntime.i18n("653eb2792d3126a60caa6982f89a906b"),
|
268
|
+
value: 'view'
|
269
|
+
}, {
|
270
|
+
label: i18nRuntime.i18n("8a4d6dfbcd8072555b5951091f171000"),
|
271
|
+
value: 'delete'
|
272
|
+
}]
|
273
|
+
}, {
|
274
|
+
type: 'group',
|
275
|
+
body: [{
|
276
|
+
columnRatio: 10,
|
277
|
+
type: 'checkboxes',
|
278
|
+
label: i18nRuntime.i18n("f4b368051b455e386a314688c7c75c1f"),
|
279
|
+
name: 'filterEnabledList',
|
280
|
+
joinValues: false,
|
281
|
+
source: '${filterSettingSource}'
|
282
|
+
}, {
|
283
|
+
columnRatio: 2,
|
284
|
+
type: 'input-number',
|
285
|
+
label: i18nRuntime.i18n("23c7ea8ee9519459598b2de65fe2a2eb"),
|
286
|
+
value: 3,
|
287
|
+
name: 'filterColumnCount'
|
288
|
+
}],
|
289
|
+
visibleOn: 'data.features && data.features.includes("filter")'
|
290
|
+
}, {
|
291
|
+
name: 'columns',
|
292
|
+
type: 'input-table',
|
293
|
+
label: false,
|
294
|
+
addable: true,
|
295
|
+
removable: true,
|
296
|
+
needConfirm: false,
|
297
|
+
columns: [{
|
298
|
+
type: 'input-text',
|
299
|
+
name: 'label',
|
300
|
+
label: i18nRuntime.i18n("32c65d8d7431e76029678ec7bb73a5ab")
|
301
|
+
}, {
|
302
|
+
type: 'input-text',
|
303
|
+
name: 'name',
|
304
|
+
label: i18nRuntime.i18n("41a344642681efaaa418c228ba7fb45c")
|
305
|
+
}, {
|
306
|
+
type: 'select',
|
307
|
+
name: 'type',
|
308
|
+
label: i18nRuntime.i18n("226b0912184333c81babf2f1894ec0c1"),
|
309
|
+
value: 'text',
|
310
|
+
options: [{
|
311
|
+
value: 'text',
|
312
|
+
label: i18nRuntime.i18n("ffb01e5bcf4c00447f5150d3cba81371")
|
313
|
+
}, {
|
314
|
+
value: 'tpl',
|
315
|
+
label: i18nRuntime.i18n("59cf15fe6b8d659c9bd2f86143534a06")
|
316
|
+
}, {
|
317
|
+
value: 'image',
|
318
|
+
label: i18nRuntime.i18n("20def7942674282277c3714ed7ea6ce0")
|
319
|
+
}, {
|
320
|
+
value: 'date',
|
321
|
+
label: i18nRuntime.i18n("4ff1e74e43a3586339251494117185ad")
|
322
|
+
}, {
|
323
|
+
value: 'progress',
|
324
|
+
label: i18nRuntime.i18n("c7bff79d059a0b7ff9b02441959d8be2")
|
325
|
+
}, {
|
326
|
+
value: 'status',
|
327
|
+
label: i18nRuntime.i18n("3fea7ca76cdece641436d7ab0d02ab1b")
|
328
|
+
}, {
|
329
|
+
value: 'mapping',
|
330
|
+
label: i18nRuntime.i18n("9da188491dd34c4382a5b9f006194e41")
|
331
|
+
}, {
|
332
|
+
value: 'operation',
|
333
|
+
label: i18nRuntime.i18n("8abc564260a1564521e0c3a1d5419b4a")
|
334
|
+
}]
|
335
|
+
}]
|
336
|
+
}],
|
337
|
+
pipeOut: function (value) {
|
338
|
+
var valueSchema = cloneDeep__default["default"](value); // 查看/删除 操作,可选择是否使用接口返回值预填充
|
339
|
+
|
340
|
+
var features = valueSchema.features;
|
341
|
+
var oper = {
|
342
|
+
type: 'operation',
|
343
|
+
label: i18nRuntime.i18n("2b6bc0f293f5ca01b006206c2535ccbc"),
|
344
|
+
buttons: []
|
345
|
+
};
|
346
|
+
var itemBtns = ['update', 'view', 'delete'];
|
347
|
+
var hasFeatures = get__default["default"](features, 'length');
|
348
|
+
valueSchema.bulkActions = [];
|
349
|
+
/** 统一api格式 */
|
350
|
+
|
351
|
+
valueSchema.api = typeof valueSchema.api === 'string' ? amisCore.normalizeApi(valueSchema.api) : valueSchema.api;
|
352
|
+
hasFeatures && features.forEach(function (item) {
|
353
|
+
var _a, _b, _c, _d;
|
354
|
+
|
355
|
+
if (itemBtns.includes(item)) {
|
356
|
+
var schema = void 0;
|
357
|
+
|
358
|
+
if (item === 'update') {
|
359
|
+
schema = cloneDeep__default["default"](_this.btnSchemas.update);
|
360
|
+
schema.dialog.body.body = value.columns.filter(function (_a) {
|
361
|
+
var type = _a.type;
|
362
|
+
return type !== 'progress' && type !== 'operation';
|
363
|
+
}).map(function (_a) {
|
364
|
+
var type = _a.type,
|
365
|
+
rest = tslib.__rest(_a, ["type"]);
|
366
|
+
|
367
|
+
return tslib.__assign(tslib.__assign({}, rest), {
|
368
|
+
type: viewTypeToEditType(type)
|
369
|
+
});
|
370
|
+
});
|
371
|
+
} else if (item === 'view') {
|
372
|
+
schema = cloneDeep__default["default"](_this.btnSchemas.view);
|
373
|
+
schema.dialog.body.body = value.columns.map(function (_a) {
|
374
|
+
_a.type;
|
375
|
+
var rest = tslib.__rest(_a, ["type"]);
|
376
|
+
|
377
|
+
return tslib.__assign(tslib.__assign({}, rest), {
|
378
|
+
type: 'static'
|
379
|
+
});
|
380
|
+
});
|
381
|
+
} else if (item === 'delete') {
|
382
|
+
schema = cloneDeep__default["default"](_this.btnSchemas.delete);
|
383
|
+
schema.api = ((_b = (_a = valueSchema.api) === null || _a === void 0 ? void 0 : _a.method) === null || _b === void 0 ? void 0 : _b.match(/^(post|delete)$/i)) ? valueSchema.api : tslib.__assign(tslib.__assign({}, valueSchema.api), {
|
384
|
+
method: 'post'
|
385
|
+
});
|
386
|
+
} // 添加操作按钮
|
387
|
+
|
388
|
+
|
389
|
+
_this.addItem(oper.buttons, schema);
|
390
|
+
} else {
|
391
|
+
// 批量操作
|
392
|
+
if (item === 'bulkUpdate') {
|
393
|
+
_this.addItem(valueSchema.bulkActions, cloneDeep__default["default"](_this.btnSchemas.bulkUpdate));
|
394
|
+
}
|
395
|
+
|
396
|
+
if (item === 'bulkDelete') {
|
397
|
+
_this.addItem(valueSchema.bulkActions, cloneDeep__default["default"](_this.btnSchemas.bulkDelete));
|
398
|
+
} // 创建
|
399
|
+
|
400
|
+
|
401
|
+
if (item === 'create') {
|
402
|
+
var createSchemaBase = _this.btnSchemas.create;
|
403
|
+
createSchemaBase.dialog.body = {
|
404
|
+
type: 'form',
|
405
|
+
api: ((_d = (_c = valueSchema.api) === null || _c === void 0 ? void 0 : _c.method) === null || _d === void 0 ? void 0 : _d.match(/^(post|put)$/i)) ? valueSchema.api : tslib.__assign(tslib.__assign({}, valueSchema.api), {
|
406
|
+
method: 'post'
|
407
|
+
}),
|
408
|
+
body: valueSchema.columns.map(function (column) {
|
409
|
+
var type = column.type;
|
410
|
+
return {
|
411
|
+
type: viewTypeToEditType(type),
|
412
|
+
name: column.name,
|
413
|
+
label: column.label
|
414
|
+
};
|
415
|
+
})
|
416
|
+
};
|
417
|
+
valueSchema.headerToolbar = [createSchemaBase, 'bulkActions'];
|
418
|
+
}
|
419
|
+
|
420
|
+
var keysFilter = Object.keys(valueSchema.filter || {});
|
421
|
+
|
422
|
+
if (item === 'filter' && !keysFilter.length) {
|
423
|
+
if (valueSchema.filterEnabledList) {
|
424
|
+
valueSchema.filter = {
|
425
|
+
title: i18nRuntime.i18n("cf12e55021998a8328201800ec356773")
|
426
|
+
};
|
427
|
+
valueSchema.filter.columnCount = value.filterColumnCount;
|
428
|
+
valueSchema.filter.mode = 'horizontal';
|
429
|
+
valueSchema.filter.body = valueSchema.filterEnabledList.map(function (item) {
|
430
|
+
return {
|
431
|
+
type: 'input-text',
|
432
|
+
label: item.label,
|
433
|
+
name: item.value
|
434
|
+
};
|
435
|
+
});
|
436
|
+
}
|
437
|
+
}
|
438
|
+
}
|
439
|
+
});
|
440
|
+
var hasOperate = valueSchema.columns.find(function (item) {
|
441
|
+
return item.type === 'operation';
|
442
|
+
});
|
443
|
+
hasFeatures && !hasOperate && valueSchema.columns.push(oper);
|
444
|
+
return valueSchema;
|
445
|
+
},
|
446
|
+
canRebuild: true
|
1497
447
|
};
|
1498
|
-
|
1499
|
-
|
1500
|
-
|
1501
|
-
|
1502
|
-
|
1503
|
-
|
1504
|
-
|
1505
|
-
|
1506
|
-
|
1507
|
-
|
1508
|
-
|
1509
|
-
}
|
448
|
+
_this.multifactor = true;
|
449
|
+
_this.previewSchema = {
|
450
|
+
syncLocation: false,
|
451
|
+
type: 'crud',
|
452
|
+
className: 'text-left',
|
453
|
+
bodyClassName: 'm-b-none',
|
454
|
+
affixHeader: false,
|
455
|
+
data: {
|
456
|
+
items: [{
|
457
|
+
a: 1,
|
458
|
+
b: 2
|
459
|
+
}, {
|
460
|
+
a: 3,
|
461
|
+
b: 4
|
462
|
+
}, {
|
463
|
+
a: 5,
|
464
|
+
b: 6
|
465
|
+
}]
|
466
|
+
},
|
467
|
+
source: '${items}',
|
468
|
+
columns: [{
|
469
|
+
label: 'A',
|
470
|
+
name: 'a'
|
471
|
+
}, {
|
472
|
+
label: 'B',
|
473
|
+
name: 'b'
|
474
|
+
}, {
|
475
|
+
type: 'operation',
|
476
|
+
label: i18nRuntime.i18n("2b6bc0f293f5ca01b006206c2535ccbc"),
|
477
|
+
buttons: [{
|
478
|
+
icon: 'fa fa-eye',
|
479
|
+
type: 'button'
|
480
|
+
}, {
|
481
|
+
icon: 'fa fa-edit',
|
482
|
+
type: 'button'
|
483
|
+
}]
|
484
|
+
}]
|
1510
485
|
};
|
1511
|
-
|
1512
|
-
|
1513
|
-
|
1514
|
-
|
1515
|
-
|
1516
|
-
|
1517
|
-
|
1518
|
-
|
486
|
+
_this.panelTitle = i18nRuntime.i18n("d7213304d1a8a02a73a2f4010839e061");
|
487
|
+
|
488
|
+
_this.panelBodyCreator = function (context) {
|
489
|
+
_this.manager.store;
|
490
|
+
var id = context.id;
|
491
|
+
return amisEditorCore.getSchemaTpl('tabs', [{
|
492
|
+
title: i18nRuntime.i18n("22b777e6fcb613b8ba83ced9594cd07e"),
|
493
|
+
body: [amisEditorCore.getSchemaTpl('switch', {
|
494
|
+
name: 'filter',
|
495
|
+
label: i18nRuntime.i18n("07a88fae7dd11f87891af91fb54a74bb"),
|
496
|
+
visibleOn: 'data.api && data.api.url',
|
497
|
+
pipeIn: function (value) {
|
498
|
+
return !!value;
|
499
|
+
},
|
500
|
+
pipeOut: function (value, originValue) {
|
501
|
+
if (value) {
|
502
|
+
return _this.oldFilter || amisEditorCore.JSONPipeIn({
|
503
|
+
title: i18nRuntime.i18n("cf12e55021998a8328201800ec356773"),
|
504
|
+
body: [{
|
505
|
+
type: 'input-text',
|
506
|
+
name: 'keywords',
|
507
|
+
label: i18nRuntime.i18n("cfb5f18c43753ad5329348d626bd3739")
|
508
|
+
}]
|
509
|
+
});
|
510
|
+
} else {
|
511
|
+
_this.oldFilter = originValue;
|
512
|
+
}
|
513
|
+
|
514
|
+
return null;
|
515
|
+
}
|
516
|
+
}), {
|
517
|
+
type: 'divider',
|
518
|
+
visibleOn: 'data.api && data.api.url'
|
519
|
+
}, {
|
520
|
+
label: i18nRuntime.i18n("7f7c624a843b0d539a4ea59a696702f9"),
|
521
|
+
name: 'bulkActions',
|
522
|
+
type: 'combo',
|
523
|
+
hiddenOn: 'data.pickerMode && data.multiple',
|
524
|
+
inputClassName: 'ae-BulkActions-control',
|
525
|
+
multiple: true,
|
526
|
+
draggable: true,
|
527
|
+
draggableTip: '',
|
528
|
+
scaffold: {
|
529
|
+
label: i18nRuntime.i18n("fa966345577ba81af19408f203db968f"),
|
530
|
+
type: 'button'
|
531
|
+
},
|
532
|
+
labelRemark: {
|
533
|
+
className: 'm-l-xs',
|
534
|
+
trigger: 'click',
|
535
|
+
rootClose: true,
|
536
|
+
content: i18nRuntime.i18n("46e6edaeb9968e7f7ab549d4f2f82d6d"),
|
537
|
+
placement: 'left'
|
538
|
+
},
|
539
|
+
items: [{
|
540
|
+
type: 'tpl',
|
541
|
+
tpl: '<span class="label label-success">${label}</span>',
|
542
|
+
columnClassName: 'p-t-xs'
|
543
|
+
}, {
|
544
|
+
columnClassName: 'p-t-xs col-edit',
|
545
|
+
children: function (_a) {
|
546
|
+
var index = _a.index;
|
547
|
+
return React__default["default"].createElement("button", {
|
548
|
+
onClick: _this.handleBulkActionEdit.bind(_this, id, index),
|
549
|
+
"data-tooltip": "\u4FEE\u6539",
|
550
|
+
"data-position": "bottom",
|
551
|
+
className: "text-muted"
|
552
|
+
}, React__default["default"].createElement("i", {
|
553
|
+
className: "fa fa-pencil"
|
554
|
+
}));
|
555
|
+
}
|
556
|
+
}]
|
557
|
+
}, // getSchemaTpl('switch', {
|
558
|
+
// name: 'defaultChecked',
|
559
|
+
// label: '默认是否全部勾选',
|
560
|
+
// visibleOn: 'data.bulkActions && data.bulkActions.length',
|
561
|
+
// pipeIn: defaultValue(false)
|
562
|
+
// }),
|
563
|
+
{
|
564
|
+
type: 'divider'
|
565
|
+
}, {
|
566
|
+
label: i18nRuntime.i18n("f13a0697d58d975d14eb3f3c72c2cbf2"),
|
567
|
+
name: 'itemActions',
|
568
|
+
type: 'combo',
|
569
|
+
labelRemark: {
|
570
|
+
className: 'm-l-xs',
|
571
|
+
trigger: 'click',
|
572
|
+
rootClose: true,
|
573
|
+
content: i18nRuntime.i18n("3674ea51498e7118732e5e1c53d4bc80"),
|
574
|
+
placement: 'left'
|
575
|
+
},
|
576
|
+
hiddenOn: 'this.mode && this.mode !== "table" || this.pickerMode',
|
577
|
+
inputClassName: 'ae-BulkActions-control',
|
578
|
+
multiple: true,
|
579
|
+
draggable: true,
|
580
|
+
scaffold: {
|
581
|
+
label: i18nRuntime.i18n("fa966345577ba81af19408f203db968f"),
|
582
|
+
type: 'button'
|
583
|
+
},
|
584
|
+
items: [{
|
585
|
+
type: 'tpl',
|
586
|
+
tpl: '<span class="label label-success">${label}</span>',
|
587
|
+
columnClassName: 'p-t-xs'
|
588
|
+
}, {
|
589
|
+
type: 'checkbox',
|
590
|
+
className: 'text-xs',
|
591
|
+
option: i18nRuntime.i18n("4916771d080ddf6d0551de4d6d2f42a4"),
|
592
|
+
name: 'hiddenOnHover'
|
593
|
+
}, {
|
594
|
+
columnClassName: 'p-t-xs col-edit',
|
595
|
+
children: function (_a) {
|
596
|
+
var index = _a.index;
|
597
|
+
return React__default["default"].createElement("button", {
|
598
|
+
onClick: _this.handleItemActionEdit.bind(_this, id, index),
|
599
|
+
"data-tooltip": "\u4FEE\u6539",
|
600
|
+
"data-position": "bottom",
|
601
|
+
className: "text-muted"
|
602
|
+
}, React__default["default"].createElement("i", {
|
603
|
+
className: "fa fa-pencil"
|
604
|
+
}));
|
605
|
+
}
|
606
|
+
}]
|
607
|
+
}, {
|
608
|
+
type: 'divider',
|
609
|
+
hiddenOn: 'this.mode && this.mode !== "table" || this.pickerMode'
|
610
|
+
}, amisEditorCore.getSchemaTpl('switch', {
|
611
|
+
name: 'syncLocation',
|
612
|
+
label: i18nRuntime.i18n("569343b4fe5e48131b78611c11eadbeb"),
|
613
|
+
pipeIn: amisEditorCore.defaultValue(true),
|
614
|
+
labelRemark: {
|
615
|
+
className: 'm-l-xs',
|
616
|
+
trigger: 'click',
|
617
|
+
rootClose: true,
|
618
|
+
content: i18nRuntime.i18n("6dbee29a8c54eef9d042ef3280999ad9"),
|
619
|
+
placement: 'left'
|
620
|
+
}
|
621
|
+
}), {
|
622
|
+
label: i18nRuntime.i18n("2171d1b07d045e796cba4a05bcf7d13f"),
|
623
|
+
type: 'input-kv',
|
624
|
+
name: 'defaultParams',
|
625
|
+
labelRemark: {
|
626
|
+
className: 'm-l-xs',
|
627
|
+
trigger: 'click',
|
628
|
+
rootClose: true,
|
629
|
+
content: i18nRuntime.i18n("01e7eb2256821085a14708d6ddf36814"),
|
630
|
+
placement: 'left'
|
631
|
+
}
|
632
|
+
}, {
|
633
|
+
type: 'divider'
|
634
|
+
}, amisEditorCore.getSchemaTpl('switch', {
|
635
|
+
name: 'keepItemSelectionOnPageChange',
|
636
|
+
label: i18nRuntime.i18n("58ed0a7a5a91996dbb4c7d6dc7679364"),
|
637
|
+
visbileOn: 'this.bulkActions && this.bulkActions.length || this.itemActions && this.itemActions.length',
|
638
|
+
labelRemark: {
|
639
|
+
className: 'm-l-xs',
|
640
|
+
trigger: 'click',
|
641
|
+
rootClose: true,
|
642
|
+
content: i18nRuntime.i18n("36ac0011faae6f88ee0ec3e642328327"),
|
643
|
+
placement: 'left'
|
644
|
+
}
|
645
|
+
}), {
|
646
|
+
name: 'labelTpl',
|
647
|
+
type: 'input-text',
|
648
|
+
label: i18nRuntime.i18n("2a0b47ba76e886070c3bd6abeae3d1c0"),
|
649
|
+
visibleOn: 'this.keepItemSelectionOnPageChange',
|
650
|
+
labelRemark: {
|
651
|
+
className: 'm-l-xs',
|
652
|
+
trigger: 'click',
|
653
|
+
rootClose: true,
|
654
|
+
content: i18nRuntime.i18n("6ab3e5b6c5d5d2cf621e911226495433"),
|
655
|
+
placement: 'left'
|
656
|
+
}
|
657
|
+
}, {
|
658
|
+
name: 'primaryField',
|
659
|
+
label: i18nRuntime.i18n("987b04af242bb2dafaf32d890ab952ff"),
|
660
|
+
type: 'input-text',
|
661
|
+
pipeIn: amisEditorCore.defaultValue('id'),
|
662
|
+
description: i18nRuntime.i18n("a270e70be12fb13a24ca3e4ac70fa838")
|
663
|
+
}]
|
664
|
+
}, {
|
665
|
+
title: i18nRuntime.i18n("54ea89b497ec3bb319c68844dfa3687f"),
|
666
|
+
body: [amisEditorCore.getSchemaTpl('apiControl', {
|
667
|
+
label: i18nRuntime.i18n("db7ee36de8063c2d5a6c123eac65641a"),
|
668
|
+
sampleBuilder: function () {
|
669
|
+
var _a, _b;
|
670
|
+
|
671
|
+
var data = {
|
672
|
+
items: [],
|
673
|
+
total: 0
|
674
|
+
};
|
675
|
+
var columns = (_b = (_a = context === null || context === void 0 ? void 0 : context.schema) === null || _a === void 0 ? void 0 : _a.columns) !== null && _b !== void 0 ? _b : [];
|
676
|
+
var row = {};
|
677
|
+
columns.forEach(function (column) {
|
678
|
+
if (column.name) {
|
679
|
+
amisCore.setVariable(row, column.name, 'sample');
|
680
|
+
}
|
681
|
+
});
|
682
|
+
data.items.push(row);
|
683
|
+
return JSON.stringify({
|
684
|
+
status: 0,
|
685
|
+
msg: '',
|
686
|
+
data: data
|
687
|
+
}, null, 2);
|
688
|
+
}
|
689
|
+
}), {
|
690
|
+
name: 'initFetch',
|
691
|
+
type: 'radios',
|
692
|
+
label: i18nRuntime.i18n("0951dad1723aa1191ce1a2e96db76051"),
|
693
|
+
pipeIn: function (value) {
|
694
|
+
return typeof value == 'boolean' && value || typeof value !== 'boolean' && '';
|
695
|
+
},
|
696
|
+
inline: true,
|
697
|
+
onChange: function () {},
|
698
|
+
options: [{
|
699
|
+
label: i18nRuntime.i18n("0a60ac8f02ccd2cf723f927284877851"),
|
700
|
+
value: true
|
701
|
+
}, {
|
702
|
+
label: i18nRuntime.i18n("c9744f45e76d885ae1c74d4f4a934b2e"),
|
703
|
+
value: false
|
704
|
+
}, {
|
705
|
+
label: i18nRuntime.i18n("a9400c408441f1f7f6d6954deb05ae9a"),
|
706
|
+
value: ''
|
707
|
+
}]
|
708
|
+
}, {
|
709
|
+
name: 'initFetch',
|
710
|
+
autoComplete: false,
|
711
|
+
visibleOn: 'typeof this.initFetch !== "boolean"',
|
712
|
+
type: 'input-text',
|
713
|
+
placeholder: i18nRuntime.i18n("55b22f5d136e73b26cef65aedd8ba86e"),
|
714
|
+
className: 'm-t-n-sm'
|
715
|
+
}, amisEditorCore.getSchemaTpl('switch', {
|
716
|
+
name: 'loadDataOnce',
|
717
|
+
label: i18nRuntime.i18n("bedc70d448b656d828bd3ed7926b3e4d"),
|
718
|
+
labelRemark: {
|
719
|
+
className: 'm-l-xs',
|
720
|
+
trigger: 'click',
|
721
|
+
rootClose: true,
|
722
|
+
content: i18nRuntime.i18n("559fa334442f0f75b0343bbf38b7ff05"),
|
723
|
+
placement: 'left'
|
724
|
+
}
|
725
|
+
}), amisEditorCore.getSchemaTpl('switch', {
|
726
|
+
label: i18nRuntime.i18n("1af68c43e1780249f11b9de1eeaeb281"),
|
727
|
+
name: 'interval',
|
728
|
+
visibleOn: 'data.api',
|
729
|
+
pipeIn: function (value) {
|
730
|
+
return !!value;
|
731
|
+
},
|
732
|
+
pipeOut: function (value) {
|
733
|
+
return value ? 3000 : undefined;
|
734
|
+
}
|
735
|
+
}), {
|
736
|
+
name: 'interval',
|
737
|
+
type: 'input-number',
|
738
|
+
visibleOn: 'typeof data.interval === "number"',
|
739
|
+
step: 500,
|
740
|
+
className: 'm-t-n-sm',
|
741
|
+
description: i18nRuntime.i18n("9800f1ce2f78a23b81c8d944ebf9cce9")
|
742
|
+
}, amisEditorCore.getSchemaTpl('switch', {
|
743
|
+
name: 'silentPolling',
|
744
|
+
label: i18nRuntime.i18n("19c5410b23fba4bbfd1a58bbd5268c9b"),
|
745
|
+
visibleOn: '!!data.interval',
|
746
|
+
description: i18nRuntime.i18n("04f840b0772f4b5d59954a29a76f4e7b")
|
747
|
+
}), {
|
748
|
+
name: 'stopAutoRefreshWhen',
|
749
|
+
label: i18nRuntime.i18n("6037dae99e9446deaed45f7e408f47ab"),
|
750
|
+
type: 'input-text',
|
751
|
+
visibleOn: '!!data.interval',
|
752
|
+
description: i18nRuntime.i18n("32e3a79e80dcf7f7304e8092dd7acc6f")
|
753
|
+
}, amisEditorCore.getSchemaTpl('switch', {
|
754
|
+
name: 'stopAutoRefreshWhenModalIsOpen',
|
755
|
+
label: i18nRuntime.i18n("154ef40e477c031f6c1ec15caefb570a"),
|
756
|
+
visibleOn: '!!data.interval',
|
757
|
+
description: i18nRuntime.i18n("50f7c85bf60a9f43522789644566c62b")
|
758
|
+
}), {
|
759
|
+
type: 'divider'
|
760
|
+
}, amisEditorCore.getSchemaTpl('switch', {
|
761
|
+
name: 'draggable',
|
762
|
+
label: i18nRuntime.i18n("d8905a70e93a33c7a86240f467c653d4")
|
763
|
+
}), amisEditorCore.getSchemaTpl('apiControl', {
|
764
|
+
label: i18nRuntime.i18n("040a78b24eaff47d4fa7e266473635b4"),
|
765
|
+
name: 'saveOrderApi',
|
766
|
+
visibleOn: 'data.draggable'
|
767
|
+
}), {
|
768
|
+
type: 'divider'
|
769
|
+
}, amisEditorCore.getSchemaTpl('apiControl', {
|
770
|
+
label: i18nRuntime.i18n("ee850a0e326b217bdeb61d936c521177"),
|
771
|
+
name: 'quickSaveApi',
|
772
|
+
description: i18nRuntime.i18n("8343f619879fa79bc8ef1a35b2fc3e78")
|
773
|
+
}), {
|
774
|
+
type: 'divider'
|
775
|
+
}, amisEditorCore.getSchemaTpl('apiControl', {
|
776
|
+
label: i18nRuntime.i18n("d891e79d4a8718a7dbd47ac68aaaa5cb"),
|
777
|
+
name: 'quickSaveItemApi',
|
778
|
+
description: i18nRuntime.i18n("38db6e045e214ffcd03ede695002271c")
|
779
|
+
}), {
|
780
|
+
type: 'divider'
|
781
|
+
}, {
|
782
|
+
label: i18nRuntime.i18n("522110866c19dace2ce38336617405c2"),
|
783
|
+
type: 'combo',
|
784
|
+
name: 'messages',
|
785
|
+
multiLine: true,
|
786
|
+
description: i18nRuntime.i18n("3b69c2e540c05e9ca530ed30cf224472"),
|
787
|
+
items: [{
|
788
|
+
label: i18nRuntime.i18n("fb24383a41f23196349548b5d0cb98ce"),
|
789
|
+
type: 'input-text',
|
790
|
+
name: 'fetchSuccess'
|
791
|
+
}, {
|
792
|
+
label: i18nRuntime.i18n("62e3e15c8fb9038f2780329bc26e8bab"),
|
793
|
+
type: 'input-text',
|
794
|
+
name: 'fetchFailed'
|
795
|
+
}, {
|
796
|
+
label: i18nRuntime.i18n("c62a1b7f314be10aead10475e7543f6a"),
|
797
|
+
type: 'input-text',
|
798
|
+
name: 'saveOrderSuccess'
|
799
|
+
}, {
|
800
|
+
label: i18nRuntime.i18n("c8035507b7a576d43e9f227c91c7a7b5"),
|
801
|
+
type: 'input-text',
|
802
|
+
name: 'saveOrderFailed'
|
803
|
+
}, {
|
804
|
+
label: i18nRuntime.i18n("7cb0932b806559be232d2a69453224e7"),
|
805
|
+
type: 'input-text',
|
806
|
+
name: 'quickSaveSuccess'
|
807
|
+
}, {
|
808
|
+
label: i18nRuntime.i18n("fd79a193a487b8c9d5a302d0d88c1c2c"),
|
809
|
+
type: 'input-text',
|
810
|
+
name: 'quickSaveFailed'
|
811
|
+
}]
|
812
|
+
}]
|
813
|
+
}, {
|
814
|
+
title: i18nRuntime.i18n("afcde2611bdd13c1e65b4fb6a2f13425"),
|
815
|
+
body: [{
|
816
|
+
label: i18nRuntime.i18n("ff57a3bf69a1065707e77c18c51f7bbb"),
|
817
|
+
name: 'mode',
|
818
|
+
type: 'button-group-select',
|
819
|
+
size: 'xs',
|
820
|
+
pipeIn: function (value, values) {
|
821
|
+
var _a;
|
822
|
+
|
823
|
+
return (_a = value === 'grid' ? 'cards' : value) !== null && _a !== void 0 ? _a : 'table';
|
824
|
+
},
|
825
|
+
onChange: function (value, oldValue, model, form) {
|
826
|
+
var _a, _b, _c, _d, _e;
|
827
|
+
|
828
|
+
var headerHasColumnsToggle = (_b = (_a = form === null || form === void 0 ? void 0 : form.data) === null || _a === void 0 ? void 0 : _a.headerToolbar) === null || _b === void 0 ? void 0 : _b.some(function (item) {
|
829
|
+
return item.type === 'columns-toggler';
|
830
|
+
});
|
831
|
+
var headerToolbar = cloneDeep__default["default"]((_c = form === null || form === void 0 ? void 0 : form.data) === null || _c === void 0 ? void 0 : _c.headerToolbar);
|
832
|
+
var columnsToggler;
|
833
|
+
|
834
|
+
if (value !== 'table' && oldValue === 'table') {
|
835
|
+
// 存储table模式是否有 columns-toggler
|
836
|
+
columnsToggler = (headerToolbar === null || headerToolbar === void 0 ? void 0 : headerToolbar.find(function (item) {
|
837
|
+
return item.type === 'columns-toggler';
|
838
|
+
})) || {
|
839
|
+
type: 'columns-toggler',
|
840
|
+
align: 'right'
|
841
|
+
};
|
842
|
+
form.setValues({
|
843
|
+
__headerHasColumnsToggler: headerHasColumnsToggle
|
844
|
+
});
|
845
|
+
}
|
846
|
+
|
847
|
+
headerToolbar = value === 'table' ? headerToolbar : headerToolbar === null || headerToolbar === void 0 ? void 0 : headerToolbar.filter(function (item) {
|
848
|
+
return item.type !== 'columns-toggler';
|
849
|
+
});
|
850
|
+
|
851
|
+
if (value === 'table') {
|
852
|
+
if (((_d = form === null || form === void 0 ? void 0 : form.data) === null || _d === void 0 ? void 0 : _d.__headerHasColumnsToggler) && !headerHasColumnsToggle) {
|
853
|
+
headerToolbar === null || headerToolbar === void 0 ? void 0 : headerToolbar.push(((_e = form === null || form === void 0 ? void 0 : form.data) === null || _e === void 0 ? void 0 : _e.__cacheColumnsToggler) || {
|
854
|
+
type: 'columns-toggler',
|
855
|
+
align: 'right'
|
856
|
+
});
|
857
|
+
}
|
858
|
+
|
859
|
+
form.setValues({
|
860
|
+
headerToolbar: headerToolbar,
|
861
|
+
columns: form.data.__columns || [{
|
862
|
+
label: 'ID',
|
863
|
+
name: 'id'
|
864
|
+
}, {
|
865
|
+
label: i18nRuntime.i18n("20aadc3f9b7edb564dc58898898e0dc8"),
|
866
|
+
name: 'name'
|
867
|
+
}],
|
868
|
+
__headerHasColumnsToggler: headerHasColumnsToggle,
|
869
|
+
__card: form.data.card || form.data.__card,
|
870
|
+
__listItem: form.data.listItem || form.data.__listItem
|
871
|
+
});
|
872
|
+
form.deleteValueByName('card');
|
873
|
+
form.deleteValueByName('listItem');
|
874
|
+
} else if (value === 'cards') {
|
875
|
+
oldValue === 'table' && form.setValues({
|
876
|
+
__cacheColumnsToggler: columnsToggler
|
877
|
+
});
|
878
|
+
form.setValues({
|
879
|
+
headerToolbar: headerToolbar,
|
880
|
+
card: form.data.__card || {
|
881
|
+
type: 'card',
|
882
|
+
header: {
|
883
|
+
title: i18nRuntime.i18n("32c65d8d7431e76029678ec7bb73a5ab"),
|
884
|
+
subTitle: i18nRuntime.i18n("72cf373be86a38b29f6d2f15900b0da1")
|
885
|
+
},
|
886
|
+
body: [{
|
887
|
+
name: 'a',
|
888
|
+
label: 'A'
|
889
|
+
}, {
|
890
|
+
name: 'b',
|
891
|
+
label: 'B'
|
892
|
+
}],
|
893
|
+
actions: [{
|
894
|
+
label: i18nRuntime.i18n("f26225bde6a250894a04db4c53ea03d0"),
|
895
|
+
type: 'button'
|
896
|
+
}]
|
897
|
+
},
|
898
|
+
__columns: form.data.columns || form.data.__columns,
|
899
|
+
__listItem: form.data.listItem || form.data.__listItem
|
900
|
+
});
|
901
|
+
form.deleteValueByName('columns');
|
902
|
+
form.deleteValueByName('listItem');
|
903
|
+
} else {
|
904
|
+
oldValue === 'table' && form.setValues({
|
905
|
+
__cacheColumnsToggler: columnsToggler
|
906
|
+
});
|
907
|
+
form.setValues({
|
908
|
+
headerToolbar: headerToolbar,
|
909
|
+
listItem: form.data.__listItem || {
|
910
|
+
body: [{
|
911
|
+
type: 'tpl',
|
912
|
+
tpl: i18nRuntime.i18n("3bb4d608c6bee2b7b6d788417cde04e3")
|
913
|
+
}],
|
914
|
+
actions: [{
|
915
|
+
icon: 'fa fa-eye',
|
916
|
+
type: 'button'
|
917
|
+
}]
|
918
|
+
},
|
919
|
+
__columns: form.data.columns || form.data.__columns,
|
920
|
+
__card: form.data.card || form.data.__card
|
921
|
+
});
|
922
|
+
form.deleteValueByName('columns');
|
923
|
+
form.deleteValueByName('card');
|
924
|
+
}
|
925
|
+
},
|
926
|
+
options: [{
|
927
|
+
value: 'table',
|
928
|
+
label: i18nRuntime.i18n("b339aa87104709397ba68e7ebbc6e5ba")
|
929
|
+
}, {
|
930
|
+
value: 'cards',
|
931
|
+
label: i18nRuntime.i18n("d87f215d9ac688b1d3399bf575a0ef6f")
|
932
|
+
}, {
|
933
|
+
value: 'list',
|
934
|
+
label: i18nRuntime.i18n("3712972d84adf48acbd6ad24b4d75ad0")
|
935
|
+
}]
|
936
|
+
}, {
|
937
|
+
name: 'headerToolbar',
|
938
|
+
type: 'combo',
|
939
|
+
draggable: true,
|
940
|
+
draggableTip: '',
|
941
|
+
descrition: i18nRuntime.i18n("e4fd8d64804a4f3d743eff384a6eb20a"),
|
942
|
+
label: i18nRuntime.i18n("14555503d6e09ecd66661d04c882e79b"),
|
943
|
+
pipeIn: function (value) {
|
944
|
+
if (!Array.isArray(value)) {
|
945
|
+
value = value ? [value] : ['bulkActions'];
|
946
|
+
}
|
947
|
+
|
948
|
+
return value.map(function (item) {
|
949
|
+
var type = item.type;
|
950
|
+
|
951
|
+
if (typeof item === 'string' && ~['bulkActions', 'bulk-actions', 'pagination', 'statistics', 'switch-per-page', 'filter-toggler', 'load-more', 'export-csv', 'export-excel'].indexOf(item)) {
|
952
|
+
type = item === 'bulkActions' ? 'bulk-actions' : item;
|
953
|
+
item = {
|
954
|
+
type: type
|
955
|
+
};
|
956
|
+
} else if (typeof item === 'string') {
|
957
|
+
type = 'tpl';
|
958
|
+
item = typeof item === 'string' ? {
|
959
|
+
type: 'tpl',
|
960
|
+
tpl: item
|
961
|
+
} : item;
|
962
|
+
}
|
963
|
+
|
964
|
+
return tslib.__assign({
|
965
|
+
type: type
|
966
|
+
}, item);
|
967
|
+
});
|
968
|
+
},
|
969
|
+
pipeOut: function (value) {
|
970
|
+
if (Array.isArray(value)) {
|
971
|
+
return value.map(function (item) {
|
972
|
+
if (item.type === 'button') {
|
973
|
+
return amisEditorCore.JSONPipeIn(tslib.__assign({
|
974
|
+
label: i18nRuntime.i18n("fa966345577ba81af19408f203db968f"),
|
975
|
+
type: 'button'
|
976
|
+
}, item));
|
977
|
+
} else if (item.type === 'tpl') {
|
978
|
+
return amisEditorCore.JSONPipeIn(tslib.__assign({
|
979
|
+
type: 'tpl',
|
980
|
+
tpl: i18nRuntime.i18n("2d711b09bd0db0ad240cc83b30dd8014")
|
981
|
+
}, item));
|
1519
982
|
}
|
1520
|
-
|
983
|
+
|
984
|
+
return item;
|
985
|
+
});
|
986
|
+
}
|
987
|
+
|
988
|
+
return [];
|
989
|
+
},
|
990
|
+
scaffold: {
|
991
|
+
type: 'tpl',
|
992
|
+
tpl: i18nRuntime.i18n("2d711b09bd0db0ad240cc83b30dd8014")
|
993
|
+
},
|
994
|
+
multiple: true,
|
995
|
+
items: [{
|
996
|
+
type: 'select',
|
997
|
+
name: 'type',
|
998
|
+
columnClassName: 'w-ssm',
|
999
|
+
options: [{
|
1000
|
+
value: 'bulk-actions',
|
1001
|
+
label: i18nRuntime.i18n("8abc564260a1564521e0c3a1d5419b4a")
|
1002
|
+
}, {
|
1003
|
+
value: 'pagination',
|
1004
|
+
label: i18nRuntime.i18n("3862626c138ce5945e0e273a1bdfbad0")
|
1005
|
+
}, {
|
1006
|
+
value: 'statistics',
|
1007
|
+
label: i18nRuntime.i18n("439a19857be1fb8d3e6017258e32c486")
|
1008
|
+
}, {
|
1009
|
+
value: 'switch-per-page',
|
1010
|
+
label: i18nRuntime.i18n("bc908986a4e4eec3dca3530afd1d4306")
|
1011
|
+
}, {
|
1012
|
+
value: 'load-more',
|
1013
|
+
label: i18nRuntime.i18n("77281549955309c49f5eef77838a85e5")
|
1014
|
+
}, {
|
1015
|
+
value: 'export-csv',
|
1016
|
+
label: i18nRuntime.i18n("1add12ff3338a990b60154b75019c348")
|
1017
|
+
}, {
|
1018
|
+
value: 'export-excel',
|
1019
|
+
label: i18nRuntime.i18n("7d57852b946d9d4d64fb2a48ca2b4a44")
|
1020
|
+
}, {
|
1021
|
+
value: 'columns-toggler',
|
1022
|
+
label: i18nRuntime.i18n("16c6099bc0efaa669d8de698c105e333"),
|
1023
|
+
visibleOn: '!this.mode || this.mode === "table"'
|
1024
|
+
}, {
|
1025
|
+
value: 'filter-toggler',
|
1026
|
+
label: i18nRuntime.i18n("073694928db5b0b5423ebe095ec62d39")
|
1027
|
+
}, {
|
1028
|
+
value: 'drag-toggler',
|
1029
|
+
label: i18nRuntime.i18n("5b9c3e6ce478196f802722cb09d61f0b")
|
1030
|
+
}, {
|
1031
|
+
value: 'check-all',
|
1032
|
+
label: i18nRuntime.i18n("66eeacd93a7c1bda93906fe908ad11a0"),
|
1033
|
+
hiddenOn: '!this.mode || this.mode === "table"'
|
1034
|
+
}, {
|
1035
|
+
value: 'tpl',
|
1036
|
+
label: i18nRuntime.i18n("97d07614380da93d257f9fbf81aa56fb")
|
1037
|
+
}, {
|
1038
|
+
value: 'button',
|
1039
|
+
label: i18nRuntime.i18n("fa966345577ba81af19408f203db968f")
|
1040
|
+
}]
|
1041
|
+
}, {
|
1042
|
+
name: 'align',
|
1043
|
+
placeholder: i18nRuntime.i18n("d5bc35360607472de4525358af126de4"),
|
1044
|
+
type: 'select',
|
1045
|
+
size: 'xs',
|
1046
|
+
options: [{
|
1047
|
+
label: i18nRuntime.i18n("413f48cc71f71083ce532a86e3efdc21"),
|
1048
|
+
value: 'left'
|
1049
|
+
}, {
|
1050
|
+
label: i18nRuntime.i18n("fd8e9572cc6bf87653c4d8f8b8dd0db9"),
|
1051
|
+
value: 'right'
|
1052
|
+
}]
|
1053
|
+
} // {
|
1054
|
+
// type: 'remark',
|
1055
|
+
// content: '详情请在预览区域选中后进行编辑。',
|
1056
|
+
// trigger: ['click'],
|
1057
|
+
// rootClose: true,
|
1058
|
+
// placement: 'left',
|
1059
|
+
// visibleOn:
|
1060
|
+
// '!~["bulkActions", "drag-toggler", "check-all", "bulk-actions", "pagination", "statistics", "switch-per-page", "filter-toggler", "load-more"].indexOf(this.type)',
|
1061
|
+
// columnClassName: 'no-grow w-3x p-t-xs',
|
1062
|
+
// className: 'm-l-none'
|
1063
|
+
// }
|
1064
|
+
]
|
1065
|
+
}, {
|
1066
|
+
name: 'footerToolbar',
|
1067
|
+
type: 'combo',
|
1068
|
+
draggable: true,
|
1069
|
+
draggableTip: '',
|
1070
|
+
descrition: i18nRuntime.i18n("e4fd8d64804a4f3d743eff384a6eb20a"),
|
1071
|
+
label: i18nRuntime.i18n("1325969c143a639294c1c6ab370b35a3"),
|
1072
|
+
pipeIn: function (value) {
|
1073
|
+
if (!Array.isArray(value)) {
|
1074
|
+
value = value ? [value] : ['statistics', 'pagination'];
|
1075
|
+
}
|
1076
|
+
|
1077
|
+
return value.map(function (item) {
|
1078
|
+
var type = item.type;
|
1079
|
+
|
1080
|
+
if (typeof item === 'string' && ~['bulkActions', 'bulk-actions', 'pagination', 'statistics', 'switch-per-page', 'filter-toggler', 'load-more', 'export-csv', 'export-excel'].indexOf(item)) {
|
1081
|
+
type = item === 'bulkActions' ? 'bulk-actions' : item;
|
1082
|
+
item = {
|
1083
|
+
type: type
|
1084
|
+
};
|
1085
|
+
} else if (typeof item === 'string') {
|
1086
|
+
type = 'tpl';
|
1087
|
+
item = typeof item === 'string' ? {
|
1088
|
+
type: 'tpl',
|
1089
|
+
tpl: item
|
1090
|
+
} : item;
|
1091
|
+
}
|
1092
|
+
|
1093
|
+
return tslib.__assign({
|
1094
|
+
type: type
|
1095
|
+
}, item);
|
1521
1096
|
});
|
1522
|
-
|
1097
|
+
},
|
1098
|
+
pipeOut: function (value) {
|
1099
|
+
if (Array.isArray(value)) {
|
1100
|
+
return value.map(function (item) {
|
1101
|
+
if (item.type === 'button') {
|
1102
|
+
return amisEditorCore.JSONPipeIn(tslib.__assign({
|
1103
|
+
label: i18nRuntime.i18n("fa966345577ba81af19408f203db968f"),
|
1104
|
+
type: 'button'
|
1105
|
+
}, item));
|
1106
|
+
} else if (item.type === 'tpl') {
|
1107
|
+
return amisEditorCore.JSONPipeIn(tslib.__assign({
|
1108
|
+
type: 'tpl',
|
1109
|
+
tpl: i18nRuntime.i18n("2d711b09bd0db0ad240cc83b30dd8014")
|
1110
|
+
}, item));
|
1111
|
+
}
|
1112
|
+
|
1113
|
+
return item;
|
1114
|
+
});
|
1115
|
+
}
|
1116
|
+
|
1117
|
+
return [];
|
1118
|
+
},
|
1119
|
+
scaffold: {
|
1120
|
+
type: 'tpl',
|
1121
|
+
tpl: i18nRuntime.i18n("2d711b09bd0db0ad240cc83b30dd8014")
|
1122
|
+
},
|
1123
|
+
multiple: true,
|
1124
|
+
items: [{
|
1125
|
+
type: 'select',
|
1126
|
+
name: 'type',
|
1127
|
+
columnClassName: 'w-ssm',
|
1128
|
+
options: [{
|
1129
|
+
value: 'bulk-actions',
|
1130
|
+
label: i18nRuntime.i18n("8abc564260a1564521e0c3a1d5419b4a")
|
1131
|
+
}, {
|
1132
|
+
value: 'pagination',
|
1133
|
+
label: i18nRuntime.i18n("3862626c138ce5945e0e273a1bdfbad0")
|
1134
|
+
}, {
|
1135
|
+
value: 'statistics',
|
1136
|
+
label: i18nRuntime.i18n("439a19857be1fb8d3e6017258e32c486")
|
1137
|
+
}, {
|
1138
|
+
value: 'switch-per-page',
|
1139
|
+
label: i18nRuntime.i18n("bc908986a4e4eec3dca3530afd1d4306")
|
1140
|
+
}, {
|
1141
|
+
value: 'load-more',
|
1142
|
+
label: i18nRuntime.i18n("77281549955309c49f5eef77838a85e5")
|
1143
|
+
}, {
|
1144
|
+
value: 'export-csv',
|
1145
|
+
label: i18nRuntime.i18n("1add12ff3338a990b60154b75019c348")
|
1146
|
+
}, {
|
1147
|
+
value: 'export-excel',
|
1148
|
+
label: i18nRuntime.i18n("7d57852b946d9d4d64fb2a48ca2b4a44")
|
1149
|
+
}, {
|
1150
|
+
value: 'columns-toggler',
|
1151
|
+
label: i18nRuntime.i18n("16c6099bc0efaa669d8de698c105e333"),
|
1152
|
+
hiddenOn: '["grid", "cards", "list"].indexOf(this.mode)'
|
1153
|
+
}, {
|
1154
|
+
value: 'filter-toggler',
|
1155
|
+
label: i18nRuntime.i18n("073694928db5b0b5423ebe095ec62d39")
|
1156
|
+
}, {
|
1157
|
+
value: 'drag-toggler',
|
1158
|
+
label: i18nRuntime.i18n("5b9c3e6ce478196f802722cb09d61f0b")
|
1159
|
+
}, {
|
1160
|
+
value: 'check-all',
|
1161
|
+
label: i18nRuntime.i18n("66eeacd93a7c1bda93906fe908ad11a0"),
|
1162
|
+
hiddenOn: '!this.mode || this.mode === "table"'
|
1163
|
+
}, {
|
1164
|
+
value: 'tpl',
|
1165
|
+
label: i18nRuntime.i18n("97d07614380da93d257f9fbf81aa56fb")
|
1166
|
+
}, {
|
1167
|
+
value: 'button',
|
1168
|
+
label: i18nRuntime.i18n("fa966345577ba81af19408f203db968f")
|
1169
|
+
}]
|
1170
|
+
}, {
|
1171
|
+
name: 'align',
|
1172
|
+
placeholder: i18nRuntime.i18n("d5bc35360607472de4525358af126de4"),
|
1173
|
+
size: 'xs',
|
1174
|
+
type: 'select',
|
1175
|
+
options: [{
|
1176
|
+
label: i18nRuntime.i18n("413f48cc71f71083ce532a86e3efdc21"),
|
1177
|
+
value: 'left'
|
1178
|
+
}, {
|
1179
|
+
label: i18nRuntime.i18n("fd8e9572cc6bf87653c4d8f8b8dd0db9"),
|
1180
|
+
value: 'right'
|
1181
|
+
}]
|
1182
|
+
}, {
|
1183
|
+
type: 'remark',
|
1184
|
+
content: i18nRuntime.i18n("440a3a2d7f1b123718be75e2baee8391"),
|
1185
|
+
trigger: ['click'],
|
1186
|
+
rootClose: true,
|
1187
|
+
placement: 'left',
|
1188
|
+
visibleOn: '!~["bulkActions", "drag-toggler", "check-all", "bulk-actions", "pagination", "statistics", "switch-per-page", "filter-toggler", "load-more", "export-csv", "export-excel"].indexOf(this.type)',
|
1189
|
+
columnClassName: 'no-grow w-3x p-t-xs',
|
1190
|
+
className: 'm-l-none'
|
1191
|
+
}]
|
1192
|
+
}, amisEditorCore.getSchemaTpl('switch', {
|
1193
|
+
name: 'filterTogglable',
|
1194
|
+
label: i18nRuntime.i18n("34da7e4a0ecdb63967427f43adf2de3e"),
|
1195
|
+
visibleOn: 'data.filter'
|
1196
|
+
}), amisEditorCore.getSchemaTpl('switch', {
|
1197
|
+
name: 'filterDefaultVisible',
|
1198
|
+
label: i18nRuntime.i18n("25c0db3ddce9bfffd497d0c824cf3c72"),
|
1199
|
+
visibleOn: 'data.filter && data.filterTogglable',
|
1200
|
+
pipeIn: amisEditorCore.defaultValue(true)
|
1201
|
+
}), amisEditorCore.getSchemaTpl('switch', {
|
1202
|
+
name: 'hideQuickSaveBtn',
|
1203
|
+
label: i18nRuntime.i18n("259d11c300a365b6767228c12d29ce53")
|
1204
|
+
}), amisEditorCore.getSchemaTpl('switch', {
|
1205
|
+
name: 'alwaysShowPagination',
|
1206
|
+
label: i18nRuntime.i18n("fa9417bacb7714e82663655345ca213d")
|
1207
|
+
}), amisEditorCore.getSchemaTpl('switch', {
|
1208
|
+
name: 'hideCheckToggler',
|
1209
|
+
label: i18nRuntime.i18n("e3d2a85f20608a5bde7d539969d03167"),
|
1210
|
+
visibleOn: 'data.checkOnItemClick'
|
1211
|
+
}), amisEditorCore.getSchemaTpl('className'), amisEditorCore.getSchemaTpl('className', {
|
1212
|
+
name: 'bodyClassName',
|
1213
|
+
label: i18nRuntime.i18n("af1af0a7fad9e8bdcd21694d0e036e12")
|
1214
|
+
})]
|
1215
|
+
}, {
|
1216
|
+
title: i18nRuntime.i18n("0d98c74797e49d00bcc4c17c9d557a2b"),
|
1217
|
+
body: [amisEditorCore.getSchemaTpl('ref'), {
|
1218
|
+
name: 'source',
|
1219
|
+
label: i18nRuntime.i18n("c11322c9cc43ce3c004cf03f5ac0acd0"),
|
1220
|
+
type: 'input-text',
|
1221
|
+
description: i18nRuntime.i18n("62569fcb0fc8314daea97989bba3877c")
|
1222
|
+
}, {
|
1223
|
+
name: 'perPage',
|
1224
|
+
label: i18nRuntime.i18n("606bc931d2b3ebba2569cb1494719e2c"),
|
1225
|
+
type: 'input-number'
|
1226
|
+
}, amisEditorCore.getSchemaTpl('switch', {
|
1227
|
+
name: 'keepItemSelectionOnPageChange',
|
1228
|
+
label: i18nRuntime.i18n("004d01f56242e07cbdc97256bb11c75b")
|
1229
|
+
}), {
|
1230
|
+
name: 'maxKeepItemSelectionLength',
|
1231
|
+
label: i18nRuntime.i18n("3d330edb46341a26ccc9aaa7f7938a8e"),
|
1232
|
+
type: 'input-number',
|
1233
|
+
mode: 'inline',
|
1234
|
+
className: 'block'
|
1235
|
+
}, {
|
1236
|
+
name: 'pageField',
|
1237
|
+
label: i18nRuntime.i18n("95e68bea2d8c8e41ffa619d4364a0d6f"),
|
1238
|
+
type: 'input-text',
|
1239
|
+
pipeIn: amisEditorCore.defaultValue('page')
|
1240
|
+
}, {
|
1241
|
+
name: 'perPageField',
|
1242
|
+
label: i18nRuntime.i18n("537f8b09437bdb7fac429dc4e8666763"),
|
1243
|
+
type: 'input-text',
|
1244
|
+
pipeIn: amisEditorCore.defaultValue('perPage')
|
1245
|
+
}, {
|
1246
|
+
name: 'orderField',
|
1247
|
+
label: i18nRuntime.i18n("30c7bd5acd4564057bd89e0846f01728"),
|
1248
|
+
type: 'input-text',
|
1249
|
+
labelRemark: {
|
1250
|
+
className: 'm-l-xs',
|
1251
|
+
trigger: 'click',
|
1252
|
+
rootClose: true,
|
1253
|
+
content: i18nRuntime.i18n("dd8d217677e4c5df28b7f46aa99b22a8"),
|
1254
|
+
placement: 'left'
|
1255
|
+
}
|
1256
|
+
}, {
|
1257
|
+
name: 'perPageAvailable',
|
1258
|
+
label: i18nRuntime.i18n("e04e8f570e2fb43a533b224f3c48523d"),
|
1259
|
+
type: 'input-array',
|
1260
|
+
hiddenOn: 'data.loadDataOnce',
|
1261
|
+
items: {
|
1262
|
+
type: 'input-number',
|
1263
|
+
required: true
|
1264
|
+
},
|
1265
|
+
value: [10]
|
1266
|
+
}, amisEditorCore.getSchemaTpl('name'), {
|
1267
|
+
name: 'itemCheckableOn',
|
1268
|
+
type: 'input-text',
|
1269
|
+
label: i18nRuntime.i18n("0fc1de8f71a7470213fc68f981abdbc2"),
|
1270
|
+
description: i18nRuntime.i18n("7d5fefd589000879088063dceb4b2552"),
|
1271
|
+
visibleOn: 'data.bulkActions && data.bulkActions.length || data.pickerMode'
|
1272
|
+
}, amisEditorCore.getSchemaTpl('switch', {
|
1273
|
+
name: 'checkOnItemClick',
|
1274
|
+
label: i18nRuntime.i18n("614ec7801e03f7ee009e4448e6ed4001"),
|
1275
|
+
visibleOn: 'data.bulkActions && data.bulkActions.length || data.pickerMode'
|
1276
|
+
}), amisEditorCore.getSchemaTpl('switch', {
|
1277
|
+
name: 'autoJumpToTopOnPagerChange',
|
1278
|
+
label: i18nRuntime.i18n("530ab79908eabe5b329ffe17695079e2"),
|
1279
|
+
description: i18nRuntime.i18n("9092afb1ccb692308ef06d8001da2208")
|
1280
|
+
}), amisEditorCore.getSchemaTpl('switch', {
|
1281
|
+
name: 'syncResponse2Query',
|
1282
|
+
label: i18nRuntime.i18n("c8cf39b24bb52d0562472c33b86824fe"),
|
1283
|
+
description: i18nRuntime.i18n("d3c172700af4f3f3afb028d6bb4a90a4")
|
1284
|
+
})]
|
1285
|
+
}]);
|
1523
1286
|
};
|
1524
|
-
|
1525
|
-
|
1526
|
-
|
1287
|
+
|
1288
|
+
_this.wrapperProps = {
|
1289
|
+
affixHeader: false
|
1290
|
+
};
|
1291
|
+
return _this;
|
1292
|
+
}
|
1293
|
+
|
1294
|
+
CRUDPlugin.prototype.addItem = function (source, target) {
|
1295
|
+
var canAdd = source.find(function (item) {
|
1296
|
+
return item.label === target.label;
|
1297
|
+
});
|
1298
|
+
|
1299
|
+
if (!canAdd) {
|
1300
|
+
source.push(target);
|
1301
|
+
}
|
1302
|
+
};
|
1303
|
+
|
1304
|
+
CRUDPlugin.prototype.handleBulkActionEdit = function (id, index) {
|
1305
|
+
var store = this.manager.store;
|
1306
|
+
var schema = store.getSchema(id);
|
1307
|
+
var action = schema === null || schema === void 0 ? void 0 : schema.bulkActions[index];
|
1308
|
+
|
1309
|
+
if (action && action.$$id) {
|
1310
|
+
store.setActiveId(action.$$id);
|
1311
|
+
}
|
1312
|
+
};
|
1313
|
+
|
1314
|
+
CRUDPlugin.prototype.handleItemActionEdit = function (id, index) {
|
1315
|
+
var store = this.manager.store;
|
1316
|
+
var schema = store.getSchema(id);
|
1317
|
+
var action = schema === null || schema === void 0 ? void 0 : schema.itemActions[index];
|
1318
|
+
|
1319
|
+
if (action && action.$$id) {
|
1320
|
+
store.setActiveId(action.$$id);
|
1321
|
+
}
|
1322
|
+
};
|
1323
|
+
/**
|
1324
|
+
* 默认什么组件都加入的子组件里面,子类里面可以复写这个改变行为。
|
1325
|
+
* @param context
|
1326
|
+
* @param renderers
|
1327
|
+
*/
|
1328
|
+
|
1329
|
+
|
1330
|
+
CRUDPlugin.prototype.buildSubRenderers = function (context, renderers) {
|
1331
|
+
var plugin = this;
|
1332
|
+
|
1333
|
+
if (plugin.name && plugin.description) {
|
1334
|
+
return {
|
1335
|
+
name: plugin.name,
|
1336
|
+
icon: plugin.icon,
|
1337
|
+
pluginIcon: plugin.pluginIcon,
|
1338
|
+
description: plugin.description,
|
1339
|
+
previewSchema: plugin.previewSchema,
|
1340
|
+
tags: plugin.tags,
|
1341
|
+
docLink: plugin.docLink,
|
1342
|
+
type: plugin.type,
|
1343
|
+
scaffold: plugin.scaffold,
|
1344
|
+
disabledRendererPlugin: plugin.disabledRendererPlugin,
|
1345
|
+
isBaseComponent: plugin.isBaseComponent,
|
1346
|
+
scaffoldForm: this.scaffoldForm,
|
1347
|
+
rendererName: plugin.rendererName
|
1348
|
+
};
|
1349
|
+
}
|
1350
|
+
};
|
1351
|
+
|
1352
|
+
CRUDPlugin.prototype.getRendererInfo = function (context) {
|
1353
|
+
var info = _super.prototype.getRendererInfo.call(this, context);
|
1354
|
+
|
1355
|
+
if (info) {
|
1356
|
+
info.scaffoldForm = this.scaffoldForm;
|
1357
|
+
}
|
1358
|
+
|
1359
|
+
return info;
|
1360
|
+
};
|
1361
|
+
|
1362
|
+
CRUDPlugin.prototype.renderEditableComponents = function (props) {
|
1363
|
+
var render = props.render;
|
1364
|
+
var bulkActions = props.bulkActions;
|
1365
|
+
var itemActions = props.itemActions;
|
1366
|
+
var doms = [];
|
1367
|
+
|
1368
|
+
if (Array.isArray(bulkActions) && bulkActions.length) {
|
1369
|
+
doms.push(React__default["default"].createElement("div", {
|
1370
|
+
key: "bulkActions",
|
1371
|
+
className: "ae-EditableRender"
|
1372
|
+
}, React__default["default"].createElement("div", {
|
1373
|
+
className: "ae-EditableRender-title"
|
1374
|
+
}, "\u6279\u91CF\u64CD\u4F5C"), React__default["default"].createElement("div", {
|
1375
|
+
className: "ae-EditableRender-body"
|
1376
|
+
}, bulkActions.map(function (action) {
|
1377
|
+
return render('bulk-action', tslib.__assign({
|
1378
|
+
type: 'button',
|
1379
|
+
size: 'sm'
|
1380
|
+
}, action), {
|
1381
|
+
key: action.$$id
|
1382
|
+
});
|
1383
|
+
}))));
|
1384
|
+
}
|
1385
|
+
|
1386
|
+
if (Array.isArray(itemActions) && itemActions.length) {
|
1387
|
+
doms.push(React__default["default"].createElement("div", {
|
1388
|
+
key: "itemActions",
|
1389
|
+
className: "ae-EditableRender"
|
1390
|
+
}, React__default["default"].createElement("div", {
|
1391
|
+
className: "ae-EditableRender-title"
|
1392
|
+
}, "\u5355\u6761\u64CD\u4F5C"), React__default["default"].createElement("div", {
|
1393
|
+
className: "ae-EditableRender-body"
|
1394
|
+
}, itemActions.map(function (action) {
|
1395
|
+
return render('bulk-action', tslib.__assign({
|
1396
|
+
type: 'button',
|
1397
|
+
size: 'sm'
|
1398
|
+
}, action), {
|
1399
|
+
key: action.$$id
|
1400
|
+
});
|
1401
|
+
}))));
|
1402
|
+
}
|
1403
|
+
|
1404
|
+
if (!doms.length) {
|
1405
|
+
return null;
|
1406
|
+
}
|
1407
|
+
|
1408
|
+
return React__default["default"].createElement("div", {
|
1409
|
+
className: "ae-EditableRenderers"
|
1410
|
+
}, React__default["default"].createElement("div", {
|
1411
|
+
className: "ae-EditableRenderers-tip"
|
1412
|
+
}, "\u300C\u589E\u5220\u6539\u67E5\u300D\u7F16\u8F91\u8F85\u52A9\u533A"), doms);
|
1413
|
+
};
|
1414
|
+
|
1415
|
+
CRUDPlugin.prototype.renderRenderer = function (props) {
|
1416
|
+
var $$editor = props.$$editor;
|
1417
|
+
var renderer = $$editor.renderer;
|
1418
|
+
return React__default["default"].createElement("div", {
|
1419
|
+
className: "ae-CRUDEditor"
|
1420
|
+
}, this.renderEditableComponents(props), React__default["default"].createElement(renderer.component, tslib.__assign({}, props)));
|
1421
|
+
};
|
1422
|
+
|
1423
|
+
CRUDPlugin.prototype.filterProps = function (props) {
|
1424
|
+
if (props.pickerMode) {
|
1425
|
+
props.options = props.data.options;
|
1426
|
+
}
|
1427
|
+
|
1428
|
+
return props;
|
1429
|
+
};
|
1430
|
+
|
1431
|
+
CRUDPlugin.prototype.afterUpdate = function (event) {
|
1432
|
+
var _this = this;
|
1433
|
+
|
1434
|
+
var _a;
|
1435
|
+
|
1436
|
+
var context = event.context; // mode 内容形式变化,需要重新构建面板。
|
1437
|
+
|
1438
|
+
if (context.info.plugin === this && ((_a = context.diff) === null || _a === void 0 ? void 0 : _a.some(function (change) {
|
1439
|
+
var _a;
|
1440
|
+
|
1441
|
+
return ((_a = change.path) === null || _a === void 0 ? void 0 : _a.join('.')) === 'mode';
|
1442
|
+
}))) {
|
1443
|
+
setTimeout(function () {
|
1444
|
+
_this.manager.buildPanels();
|
1445
|
+
|
1446
|
+
_this.manager.buildToolbars();
|
1447
|
+
}, 20);
|
1448
|
+
}
|
1449
|
+
};
|
1450
|
+
|
1451
|
+
CRUDPlugin.prototype.buildDataSchemas = function (node, region) {
|
1452
|
+
var _a, _b;
|
1453
|
+
|
1454
|
+
return tslib.__awaiter(this, void 0, void 0, function () {
|
1455
|
+
var child;
|
1456
|
+
return tslib.__generator(this, function (_c) {
|
1457
|
+
child = node.children.find(function (item) {
|
1458
|
+
return !!~['table', 'table2', 'cards', 'list'].indexOf(item.type);
|
1459
|
+
});
|
1460
|
+
|
1461
|
+
if (!((_b = (_a = child === null || child === void 0 ? void 0 : child.info) === null || _a === void 0 ? void 0 : _a.plugin) === null || _b === void 0 ? void 0 : _b.buildDataSchemas)) {
|
1462
|
+
return [2
|
1463
|
+
/*return*/
|
1464
|
+
];
|
1465
|
+
}
|
1466
|
+
|
1467
|
+
return [2
|
1468
|
+
/*return*/
|
1469
|
+
, child.info.plugin.buildDataSchemas(child)];
|
1470
|
+
});
|
1471
|
+
});
|
1472
|
+
};
|
1473
|
+
|
1474
|
+
return CRUDPlugin;
|
1475
|
+
}(amisEditorCore.BasePlugin);
|
1476
|
+
amisEditorCore.registerEditorPlugin(CRUDPlugin);
|
1527
1477
|
|
1528
1478
|
exports.CRUDPlugin = CRUDPlugin;
|