amis-editor 5.2.5-beta.3 → 5.2.5-beta.6
Sign up to get free protection for your applications and to get access to all the features.
- package/esm/component/BaseControl.d.ts +1 -799
- package/esm/component/BaseControl.js +9 -9
- package/esm/component/InputComponentName.d.ts +1 -2
- package/esm/component/InputComponentName.js +3 -2
- package/esm/component/TableViewEditor.js +362 -524
- package/esm/icons/btn/btn-group.svg.js +1 -1
- package/esm/icons/btn/btn-select.svg.js +1 -1
- package/esm/icons/btn/btn-toolbar.svg.js +1 -1
- package/esm/icons/btn/button.svg.js +1 -1
- package/esm/icons/btn/dropdown-btn.svg.js +1 -1
- package/esm/icons/container/anchor-nav.svg.js +1 -1
- package/esm/icons/container/collapse.svg.js +1 -1
- package/esm/icons/container/container.svg.js +1 -1
- package/esm/icons/container/flex-container.svg.js +1 -1
- package/esm/icons/container/form-group.svg.js +1 -1
- package/esm/icons/container/grid.svg.js +1 -1
- package/esm/icons/container/iframe.svg.js +1 -1
- package/esm/icons/container/panel.svg.js +1 -1
- package/esm/icons/container/table-view.svg.js +1 -1
- package/esm/icons/container/tabs.svg.js +1 -1
- package/esm/icons/container/tooltip-wrapper.svg.js +1 -1
- package/esm/icons/container/web-component.svg.js +1 -1
- package/esm/icons/display/aBaseline.svg.js +28 -0
- package/esm/icons/display/aCenter.svg.js +28 -0
- package/esm/icons/display/aFlexEnd.svg.js +28 -0
- package/esm/icons/display/aFlexStart.svg.js +28 -0
- package/esm/icons/display/aStretch.svg.js +28 -0
- package/esm/icons/display/block.svg.js +25 -0
- package/esm/icons/display/dcolumn.svg.js +24 -0
- package/esm/icons/display/dcolumnReverse.svg.js +31 -0
- package/esm/icons/display/drow.svg.js +24 -0
- package/esm/icons/display/drowReverse.svg.js +25 -0
- package/esm/icons/display/flex.svg.js +37 -0
- package/esm/icons/display/inline-block.svg.js +25 -0
- package/esm/icons/display/inline.svg.js +19 -0
- package/esm/icons/display/jCenter.svg.js +28 -0
- package/esm/icons/display/jFlexEnd.svg.js +28 -0
- package/esm/icons/display/jFlexStart.svg.js +28 -0
- package/esm/icons/display/jSpaceAround.svg.js +28 -0
- package/esm/icons/display/jSpaceBetween.svg.js +28 -0
- package/esm/icons/feat/audio.svg.js +1 -1
- package/esm/icons/feat/custom.svg.js +1 -1
- package/esm/icons/feat/each.svg.js +1 -1
- package/esm/icons/feat/form.svg.js +1 -1
- package/esm/icons/feat/nav.svg.js +1 -1
- package/esm/icons/feat/qrcode.svg.js +1 -1
- package/esm/icons/feat/service.svg.js +1 -1
- package/esm/icons/feat/table.svg.js +1 -1
- package/esm/icons/feat/tasks.svg.js +1 -1
- package/esm/icons/feat/video.svg.js +1 -1
- package/esm/icons/feat/wizard.svg.js +1 -1
- package/esm/icons/form/chained-select.svg.js +1 -1
- package/esm/icons/form/checkbox.svg.js +1 -1
- package/esm/icons/form/checkboxes.svg.js +1 -1
- package/esm/icons/form/combo.svg.js +1 -1
- package/esm/icons/form/condition-builder.svg.js +1 -1
- package/esm/icons/form/diff-editor.svg.js +1 -1
- package/esm/icons/form/editor.svg.js +1 -1
- package/esm/icons/form/formula.svg.js +1 -1
- package/esm/icons/form/hidden.svg.js +1 -1
- package/esm/icons/form/input-city.svg.js +1 -1
- package/esm/icons/form/input-color.svg.js +1 -1
- package/esm/icons/form/input-date-range.svg.js +1 -1
- package/esm/icons/form/input-date.svg.js +1 -1
- package/esm/icons/form/input-datetime.svg.js +1 -1
- package/esm/icons/form/input-email.svg.js +1 -1
- package/esm/icons/form/input-excel.svg.js +1 -1
- package/esm/icons/form/input-file.svg.js +1 -1
- package/esm/icons/form/input-group.svg.js +1 -1
- package/esm/icons/form/input-image.svg.js +1 -1
- package/esm/icons/form/input-kv.svg.js +1 -1
- package/esm/icons/form/input-month-range.svg.js +1 -1
- package/esm/icons/form/input-number.svg.js +1 -1
- package/esm/icons/form/input-password.svg.js +1 -1
- package/esm/icons/form/input-quarter-range.svg.js +1 -1
- package/esm/icons/form/input-range.svg.js +1 -1
- package/esm/icons/form/input-rating.svg.js +1 -1
- package/esm/icons/form/input-repeat.svg.js +1 -1
- package/esm/icons/form/input-rich-text.svg.js +1 -1
- package/esm/icons/form/input-tag.svg.js +1 -1
- package/esm/icons/form/input-text.svg.js +1 -1
- package/esm/icons/form/input-time-range.svg.js +1 -1
- package/esm/icons/form/input-time.svg.js +1 -1
- package/esm/icons/form/input-tree.svg.js +1 -1
- package/esm/icons/form/input-url.svg.js +1 -1
- package/esm/icons/form/input-year.svg.js +1 -1
- package/esm/icons/form/inputArray.svg.js +1 -1
- package/esm/icons/form/list-select.svg.js +1 -1
- package/esm/icons/form/location-picker.svg.js +1 -1
- package/esm/icons/form/matrix-checkboxes.svg.js +1 -1
- package/esm/icons/form/month.svg.js +1 -1
- package/esm/icons/form/nested-select.svg.js +1 -1
- package/esm/icons/form/picker.svg.js +1 -1
- package/esm/icons/form/quarter.svg.js +1 -1
- package/esm/icons/form/radios.svg.js +1 -1
- package/esm/icons/form/select.svg.js +1 -1
- package/esm/icons/form/static.svg.js +1 -1
- package/esm/icons/form/sub-form.svg.js +1 -1
- package/esm/icons/form/switch.svg.js +1 -1
- package/esm/icons/form/tabs-transfer.svg.js +1 -1
- package/esm/icons/form/textarea.svg.js +1 -1
- package/esm/icons/form/transfer.svg.js +1 -1
- package/esm/icons/form/tree-select.svg.js +1 -1
- package/esm/icons/form/uuid.svg.js +1 -1
- package/esm/icons/index.js +39 -1
- package/esm/icons/layout/layout-1with2.svg.js +1 -1
- package/esm/icons/layout/layout-2cols.svg.js +1 -1
- package/esm/icons/layout/layout-2row.svg.js +1 -1
- package/esm/icons/layout/layout-2with1.svg.js +1 -1
- package/esm/icons/layout/layout-3cols.svg.js +1 -1
- package/esm/icons/layout/layout-3row.svg.js +1 -1
- package/esm/icons/layout/layout-absolute.svg.js +1 -1
- package/esm/icons/layout/layout-fixed-top.svg.js +1 -1
- package/esm/icons/layout/layout-fixed.svg.js +1 -1
- package/esm/icons/layout/layout-free-container.svg.js +1 -1
- package/esm/icons/layout/layout-full.svg.js +1 -1
- package/esm/icons/layout/layout1-2.svg.js +1 -1
- package/esm/icons/layout/layout2-1.svg.js +1 -1
- package/esm/icons/layout/layout3-1.svg.js +1 -1
- package/esm/icons/layout/layout3-2.svg.js +1 -1
- package/esm/icons/other/divider.svg.js +1 -1
- package/esm/icons/other/property-sheet.svg.js +1 -1
- package/esm/icons/other/tooltip.svg.js +1 -1
- package/esm/icons/show/URL.svg.js +1 -1
- package/esm/icons/show/avatar.svg.js +1 -1
- package/esm/icons/show/breadcrumb.svg.js +1 -1
- package/esm/icons/show/card.svg.js +1 -1
- package/esm/icons/show/cards.svg.js +1 -1
- package/esm/icons/show/carousel.svg.js +1 -1
- package/esm/icons/show/chart.svg.js +1 -1
- package/esm/icons/show/code.svg.js +1 -1
- package/esm/icons/show/date.svg.js +1 -1
- package/esm/icons/show/datetime.svg.js +1 -1
- package/esm/icons/show/image.svg.js +1 -1
- package/esm/icons/show/images.svg.js +1 -1
- package/esm/icons/show/json-view.svg.js +1 -1
- package/esm/icons/show/list.svg.js +1 -1
- package/esm/icons/show/log.svg.js +1 -1
- package/esm/icons/show/mapping.svg.js +1 -1
- package/esm/icons/show/markdown.svg.js +1 -1
- package/esm/icons/show/plain.svg.js +1 -1
- package/esm/icons/show/progress.svg.js +1 -1
- package/esm/icons/show/sparkline.svg.js +1 -1
- package/esm/icons/show/status.svg.js +1 -1
- package/esm/icons/show/steps.svg.js +1 -1
- package/esm/icons/show/time.svg.js +1 -1
- package/esm/index.d.ts +3 -0
- package/esm/index.js +4 -1
- package/esm/locale/en-US.js +1 -1
- package/esm/locale/zh-CN.js +1 -1
- package/esm/plugin/Alert.d.ts +1 -1
- package/esm/plugin/Alert.js +80 -160
- package/esm/plugin/AnchorNav.js +236 -331
- package/esm/plugin/Audio.d.ts +1 -1
- package/esm/plugin/Audio.js +104 -169
- package/esm/plugin/Avatar.d.ts +1 -1
- package/esm/plugin/Avatar.js +219 -299
- package/esm/plugin/Breadcrumb.js +66 -136
- package/esm/plugin/Button.d.ts +1 -1
- package/esm/plugin/Button.js +269 -367
- package/esm/plugin/ButtonGroup.d.ts +1 -1
- package/esm/plugin/ButtonGroup.js +101 -181
- package/esm/plugin/CRUD.d.ts +1 -2
- package/esm/plugin/CRUD.js +1077 -1215
- package/esm/plugin/CRUD2.d.ts +1 -2
- package/esm/plugin/CRUD2.js +867 -1136
- package/esm/plugin/Card.d.ts +1 -1
- package/esm/plugin/Card.js +175 -270
- package/esm/plugin/Card2.d.ts +1 -1
- package/esm/plugin/Card2.js +68 -143
- package/esm/plugin/Cards.js +212 -307
- package/esm/plugin/Carousel.d.ts +2 -2
- package/esm/plugin/Carousel.js +257 -332
- package/esm/plugin/Chart.d.ts +1 -1
- package/esm/plugin/Chart.js +194 -274
- package/esm/plugin/CodeView.d.ts +1 -1
- package/esm/plugin/CodeView.js +39 -104
- package/esm/plugin/Collapse.d.ts +1 -1
- package/esm/plugin/Collapse.js +89 -164
- package/esm/plugin/CollapseGroup.d.ts +1 -1
- package/esm/plugin/CollapseGroup.js +176 -251
- package/esm/plugin/ColumnToggler.d.ts +1 -1
- package/esm/plugin/ColumnToggler.js +72 -137
- package/esm/plugin/Container.d.ts +1 -1
- package/esm/plugin/Container.js +130 -283
- package/esm/plugin/Custom.js +72 -142
- package/esm/plugin/CustomRegion.js +98 -173
- package/esm/plugin/Date.d.ts +1 -1
- package/esm/plugin/Date.js +47 -117
- package/esm/plugin/Datetime.d.ts +0 -1
- package/esm/plugin/Datetime.js +42 -87
- package/esm/plugin/Dialog.d.ts +2 -2
- package/esm/plugin/Dialog.js +158 -228
- package/esm/plugin/Divider.js +29 -94
- package/esm/plugin/Drawer.d.ts +2 -2
- package/esm/plugin/Drawer.js +197 -257
- package/esm/plugin/DropDownButton.js +173 -268
- package/esm/plugin/Each.js +103 -188
- package/esm/plugin/Flex.js +5 -25
- package/esm/plugin/Form/ButtonGroupSelect.d.ts +1 -1
- package/esm/plugin/Form/ButtonGroupSelect.js +116 -201
- package/esm/plugin/Form/ButtonToolbar.d.ts +1 -1
- package/esm/plugin/Form/ButtonToolbar.js +89 -174
- package/esm/plugin/Form/ChainedSelect.d.ts +1 -1
- package/esm/plugin/Form/ChainedSelect.js +124 -209
- package/esm/plugin/Form/Checkbox.d.ts +1 -1
- package/esm/plugin/Form/Checkbox.js +121 -211
- package/esm/plugin/Form/Checkboxes.d.ts +1 -1
- package/esm/plugin/Form/Checkboxes.js +142 -232
- package/esm/plugin/Form/CodeEditor.d.ts +0 -1
- package/esm/plugin/Form/CodeEditor.js +152 -242
- package/esm/plugin/Form/Combo.d.ts +1 -1
- package/esm/plugin/Form/Combo.js +433 -529
- package/esm/plugin/Form/ConditionBuilder.d.ts +1 -1
- package/esm/plugin/Form/ConditionBuilder.js +88 -158
- package/esm/plugin/Form/Control.d.ts +1 -1
- package/esm/plugin/Form/Control.js +52 -127
- package/esm/plugin/Form/DiffEditor.d.ts +0 -1
- package/esm/plugin/Form/DiffEditor.js +159 -249
- package/esm/plugin/Form/FieldSet.d.ts +1 -1
- package/esm/plugin/Form/FieldSet.js +97 -167
- package/esm/plugin/Form/Form.d.ts +1 -1
- package/esm/plugin/Form/Form.js +581 -681
- package/esm/plugin/Form/Formula.d.ts +1 -10
- package/esm/plugin/Form/Formula.js +55 -130
- package/esm/plugin/Form/Group.js +173 -253
- package/esm/plugin/Form/Hidden.d.ts +1 -10
- package/esm/plugin/Form/Hidden.js +29 -99
- package/esm/plugin/Form/InputArray.js +145 -235
- package/esm/plugin/Form/InputCity.d.ts +1 -1
- package/esm/plugin/Form/InputCity.js +122 -212
- package/esm/plugin/Form/InputColor.d.ts +1 -1
- package/esm/plugin/Form/InputColor.js +201 -301
- package/esm/plugin/Form/InputDate.d.ts +1 -1
- package/esm/plugin/Form/InputDate.js +202 -297
- package/esm/plugin/Form/InputDateRange.d.ts +1 -1
- package/esm/plugin/Form/InputDateRange.js +255 -350
- package/esm/plugin/Form/InputDateTime.js +24 -89
- package/esm/plugin/Form/InputDateTimeRange.js +25 -95
- package/esm/plugin/Form/InputEmail.js +22 -77
- package/esm/plugin/Form/InputExcel.d.ts +1 -1
- package/esm/plugin/Form/InputExcel.js +80 -160
- package/esm/plugin/Form/InputFile.d.ts +1 -1
- package/esm/plugin/Form/InputFile.js +264 -344
- package/esm/plugin/Form/InputGroup.d.ts +1 -2
- package/esm/plugin/Form/InputGroup.js +65 -150
- package/esm/plugin/Form/InputImage.d.ts +1 -1
- package/esm/plugin/Form/InputImage.js +302 -382
- package/esm/plugin/Form/InputKV.js +90 -170
- package/esm/plugin/Form/InputMonth.js +21 -86
- package/esm/plugin/Form/InputMonthRange.js +25 -95
- package/esm/plugin/Form/InputNumber.d.ts +1 -1
- package/esm/plugin/Form/InputNumber.js +186 -276
- package/esm/plugin/Form/InputPassword.js +22 -77
- package/esm/plugin/Form/InputQuarter.js +21 -86
- package/esm/plugin/Form/InputQuarterRange.js +25 -95
- package/esm/plugin/Form/InputRange.d.ts +1 -1
- package/esm/plugin/Form/InputRange.js +220 -305
- package/esm/plugin/Form/InputRating.d.ts +1 -1
- package/esm/plugin/Form/InputRating.js +266 -356
- package/esm/plugin/Form/InputRepeat.js +38 -103
- package/esm/plugin/Form/InputRichText.d.ts +0 -1
- package/esm/plugin/Form/InputRichText.js +224 -297
- package/esm/plugin/Form/InputSubForm.js +155 -240
- package/esm/plugin/Form/InputTable.d.ts +1 -1
- package/esm/plugin/Form/InputTable.js +543 -643
- package/esm/plugin/Form/InputTag.d.ts +1 -1
- package/esm/plugin/Form/InputTag.js +115 -205
- package/esm/plugin/Form/InputText.d.ts +1 -1
- package/esm/plugin/Form/InputText.js +299 -399
- package/esm/plugin/Form/InputTime.js +24 -89
- package/esm/plugin/Form/InputTimeRange.js +25 -95
- package/esm/plugin/Form/InputTree.d.ts +1 -1
- package/esm/plugin/Form/InputTree.js +424 -520
- package/esm/plugin/Form/InputURL.js +23 -83
- package/esm/plugin/Form/InputYear.js +21 -86
- package/esm/plugin/Form/InputYearRange.js +25 -95
- package/esm/plugin/Form/Item.d.ts +1 -1
- package/esm/plugin/Form/Item.js +173 -213
- package/esm/plugin/Form/ListSelect.d.ts +1 -1
- package/esm/plugin/Form/ListSelect.js +86 -171
- package/esm/plugin/Form/LocationPicker.d.ts +3 -2
- package/esm/plugin/Form/LocationPicker.js +88 -114
- package/esm/plugin/Form/MatrixCheckboxes.d.ts +1 -1
- package/esm/plugin/Form/MatrixCheckboxes.js +148 -233
- package/esm/plugin/Form/NestedSelect.d.ts +1 -1
- package/esm/plugin/Form/NestedSelect.js +235 -325
- package/esm/plugin/Form/Picker.js +176 -261
- package/esm/plugin/Form/Radios.d.ts +1 -1
- package/esm/plugin/Form/Radios.js +135 -230
- package/esm/plugin/Form/Select.d.ts +1 -1
- package/esm/plugin/Form/Select.js +245 -340
- package/esm/plugin/Form/Static.d.ts +1 -1
- package/esm/plugin/Form/Static.js +109 -209
- package/esm/plugin/Form/Switch.d.ts +1 -1
- package/esm/plugin/Form/Switch.js +157 -252
- package/esm/plugin/Form/TabsTransfer.d.ts +1 -1
- package/esm/plugin/Form/TabsTransfer.js +227 -317
- package/esm/plugin/Form/Textarea.d.ts +0 -1
- package/esm/plugin/Form/Textarea.js +122 -212
- package/esm/plugin/Form/Transfer.d.ts +1 -1
- package/esm/plugin/Form/Transfer.js +256 -346
- package/esm/plugin/Form/TreeSelect.d.ts +1 -1
- package/esm/plugin/Form/TreeSelect.js +410 -505
- package/esm/plugin/Form/UUID.d.ts +1 -10
- package/esm/plugin/Form/UUID.js +29 -99
- package/esm/plugin/Grid.d.ts +0 -1
- package/esm/plugin/Grid.js +513 -643
- package/esm/plugin/HBox.d.ts +0 -1
- package/esm/plugin/HBox.js +463 -583
- package/esm/plugin/IFrame.d.ts +2 -11
- package/esm/plugin/IFrame.js +55 -126
- package/esm/plugin/Image.d.ts +2 -2
- package/esm/plugin/Image.js +219 -309
- package/esm/plugin/Images.d.ts +3 -3
- package/esm/plugin/Images.js +160 -230
- package/esm/plugin/Json.d.ts +1 -1
- package/esm/plugin/Json.js +40 -110
- package/esm/plugin/Layout/FlexPluginBase.js +180 -357
- package/esm/plugin/Layout/Layout_fixed.js +23 -63
- package/esm/plugin/Layout/Layout_free_container.js +18 -58
- package/esm/plugin/Layout/Layout_sorption_container.js +27 -70
- package/esm/plugin/Link.js +63 -133
- package/esm/plugin/List.js +267 -382
- package/esm/plugin/ListItem.d.ts +1 -1
- package/esm/plugin/ListItem.js +133 -193
- package/esm/plugin/Log.d.ts +1 -1
- package/esm/plugin/Log.js +96 -166
- package/esm/plugin/Mapping.js +147 -247
- package/esm/plugin/Markdown.d.ts +1 -1
- package/esm/plugin/Markdown.js +32 -102
- package/esm/plugin/Nav.d.ts +1 -1
- package/esm/plugin/Nav.js +301 -386
- package/esm/plugin/OfficeViewer.d.ts +22 -0
- package/esm/plugin/OfficeViewer.js +91 -0
- package/esm/plugin/Operation.d.ts +1 -1
- package/esm/plugin/Operation.js +47 -112
- package/esm/plugin/Others/Action.js +304 -329
- package/esm/plugin/Others/TableCell.d.ts +1 -1
- package/esm/plugin/Others/TableCell.js +304 -329
- package/esm/plugin/Page.d.ts +2 -3
- package/esm/plugin/Page.js +282 -377
- package/esm/plugin/Pagination.d.ts +1 -1
- package/esm/plugin/Pagination.js +211 -296
- package/esm/plugin/Panel.d.ts +1 -1
- package/esm/plugin/Panel.js +172 -252
- package/esm/plugin/Plain.d.ts +1 -1
- package/esm/plugin/Plain.js +101 -186
- package/esm/plugin/Progress.d.ts +1 -1
- package/esm/plugin/Progress.js +203 -283
- package/esm/plugin/Property.js +84 -149
- package/esm/plugin/QRCode.js +64 -134
- package/esm/plugin/Reset.js +13 -58
- package/esm/plugin/Service.d.ts +1 -1
- package/esm/plugin/Service.js +166 -251
- package/esm/plugin/Sparkline.js +24 -89
- package/esm/plugin/Status.d.ts +1 -1
- package/esm/plugin/Status.js +226 -304
- package/esm/plugin/Steps.js +76 -141
- package/esm/plugin/Submit.js +13 -53
- package/esm/plugin/Table.d.ts +1 -1
- package/esm/plugin/Table.js +544 -641
- package/esm/plugin/Table2.d.ts +1 -1
- package/esm/plugin/Table2.js +731 -827
- package/esm/plugin/TableCell2.js +410 -437
- package/esm/plugin/TableView.d.ts +0 -1
- package/esm/plugin/TableView.js +566 -622
- package/esm/plugin/Tabs.d.ts +0 -1
- package/esm/plugin/Tabs.js +341 -468
- package/esm/plugin/Tag.d.ts +1 -1
- package/esm/plugin/Tag.js +122 -202
- package/esm/plugin/Tasks.d.ts +0 -1
- package/esm/plugin/Tasks.js +162 -227
- package/esm/plugin/Time.d.ts +0 -1
- package/esm/plugin/Time.js +44 -84
- package/esm/plugin/Timeline.d.ts +1 -1
- package/esm/plugin/Timeline.js +91 -168
- package/esm/plugin/TooltipWrapper.d.ts +1 -1
- package/esm/plugin/TooltipWrapper.js +190 -270
- package/esm/plugin/Tpl.d.ts +1 -1
- package/esm/plugin/Tpl.js +93 -184
- package/esm/plugin/Video.d.ts +2 -2
- package/esm/plugin/Video.js +101 -171
- package/esm/plugin/WebComponent.d.ts +1 -1
- package/esm/plugin/WebComponent.js +45 -125
- package/esm/plugin/Wizard.js +624 -735
- package/esm/plugin/Wrapper.d.ts +1 -1
- package/esm/plugin/Wrapper.js +105 -258
- package/esm/renderer/APIControl.d.ts +128 -4854
- package/esm/renderer/APIControl.js +730 -837
- package/esm/renderer/ActionApiControl.d.ts +74 -6384
- package/esm/renderer/BadgeControl.d.ts +5 -5
- package/esm/renderer/BadgeControl.js +229 -269
- package/esm/renderer/ButtonGroupControl.d.ts +21 -0
- package/esm/renderer/ButtonGroupControl.js +37 -0
- package/esm/renderer/DataBindingControl.js +175 -210
- package/esm/renderer/DataMappingControl.d.ts +2 -2
- package/esm/renderer/DataMappingControl.js +29 -40
- package/esm/renderer/DataPickerControl.js +35 -50
- package/esm/renderer/DateShortCutControl.js +251 -346
- package/esm/renderer/ExpressionFormulaControl.js +169 -238
- package/esm/renderer/FeatureControl.d.ts +1 -1
- package/esm/renderer/FeatureControl.js +179 -241
- package/esm/renderer/FlexSettingControl.d.ts +20 -0
- package/esm/renderer/FlexSettingControl.js +152 -0
- package/esm/renderer/FormulaControl.js +344 -463
- package/esm/renderer/GoConfigControl.js +25 -35
- package/esm/renderer/MapSourceControl.d.ts +9 -1603
- package/esm/renderer/MapSourceControl.js +271 -357
- package/esm/renderer/NavBadgeControl.d.ts +11 -15
- package/esm/renderer/NavBadgeControl.js +228 -263
- package/esm/renderer/NavDefaultActive.d.ts +1 -1
- package/esm/renderer/NavDefaultActive.js +61 -70
- package/esm/renderer/NavSourceControl.d.ts +2 -2
- package/esm/renderer/NavSourceControl.js +296 -390
- package/esm/renderer/OptionControl.d.ts +3 -4
- package/esm/renderer/OptionControl.js +612 -781
- package/esm/renderer/RangePartsControl.js +264 -339
- package/esm/renderer/StatusControl.js +134 -170
- package/esm/renderer/SwitchMoreControl.d.ts +46 -86
- package/esm/renderer/SwitchMoreControl.js +311 -413
- package/esm/renderer/TimelineItemControl.d.ts +1 -1
- package/esm/renderer/TimelineItemControl.js +422 -540
- package/esm/renderer/TransferTableControl.d.ts +1 -1
- package/esm/renderer/TransferTableControl.js +332 -408
- package/esm/renderer/TreeOptionControl.d.ts +2 -2
- package/esm/renderer/TreeOptionControl.js +479 -611
- package/esm/renderer/ValidationControl.js +229 -283
- package/esm/renderer/ValidationItem.js +124 -160
- package/esm/renderer/event-control/action-config-dialog.js +200 -217
- package/esm/renderer/event-control/action-config-panel.d.ts +1 -1
- package/esm/renderer/event-control/action-config-panel.js +37 -42
- package/esm/renderer/event-control/comp-action-select.js +28 -38
- package/esm/renderer/event-control/helper.d.ts +18 -32
- package/esm/renderer/event-control/helper.js +57 -73
- package/esm/renderer/event-control/index.js +673 -816
- package/esm/renderer/style-control/Background.js +6 -11
- package/esm/renderer/style-control/Border.js +7 -12
- package/esm/renderer/style-control/BoxModel.js +4 -9
- package/esm/renderer/style-control/BoxShadow.js +7 -12
- package/esm/renderer/style-control/Display.js +4 -9
- package/esm/renderer/style-control/Font.js +4 -9
- package/esm/renderer/style-control/InsetBoxModel.js +4 -9
- package/esm/renderer/style-control/ThemeClassName.js +7 -12
- package/esm/renderer/style-control/font-family.js +1 -1
- package/esm/renderer/style-control/transformation.js +3 -2
- package/esm/renderer/textarea-formula/FormulaPicker.js +4 -3
- package/esm/renderer/textarea-formula/TextareaFormulaControl.js +223 -323
- package/esm/renderer/textarea-formula/plugin.js +157 -226
- package/esm/renderer/textarea-formula/utils.js +5 -5
- package/esm/tpl/api.js +1 -1
- package/esm/tpl/common.js +21 -22
- package/esm/tpl/horizontal.js +1 -1
- package/esm/tpl/layout.js +27 -12
- package/esm/tpl/options.js +3 -3
- package/esm/tpl/remark.js +1 -1
- package/esm/tpl/style.js +5 -5
- package/esm/tpl/validations.js +4 -4
- package/esm/util.d.ts +9 -33
- package/esm/util.js +1 -1
- package/esm/validator.js +5 -5
- package/lib/component/BaseControl.d.ts +1 -799
- package/lib/component/BaseControl.js +8 -8
- package/lib/component/InputComponentName.d.ts +1 -2
- package/lib/component/InputComponentName.js +3 -2
- package/lib/component/TableViewEditor.js +361 -523
- package/lib/icons/btn/btn-group.svg.js +1 -1
- package/lib/icons/btn/btn-select.svg.js +1 -1
- package/lib/icons/btn/btn-toolbar.svg.js +1 -1
- package/lib/icons/btn/button.svg.js +1 -1
- package/lib/icons/btn/dropdown-btn.svg.js +1 -1
- package/lib/icons/container/anchor-nav.svg.js +1 -1
- package/lib/icons/container/collapse.svg.js +1 -1
- package/lib/icons/container/container.svg.js +1 -1
- package/lib/icons/container/flex-container.svg.js +1 -1
- package/lib/icons/container/form-group.svg.js +1 -1
- package/lib/icons/container/grid.svg.js +1 -1
- package/lib/icons/container/iframe.svg.js +1 -1
- package/lib/icons/container/panel.svg.js +1 -1
- package/lib/icons/container/table-view.svg.js +1 -1
- package/lib/icons/container/tabs.svg.js +1 -1
- package/lib/icons/container/tooltip-wrapper.svg.js +1 -1
- package/lib/icons/container/web-component.svg.js +1 -1
- package/lib/icons/display/aBaseline.svg.js +52 -0
- package/lib/icons/display/aCenter.svg.js +52 -0
- package/lib/icons/display/aFlexEnd.svg.js +52 -0
- package/lib/icons/display/aFlexStart.svg.js +52 -0
- package/lib/icons/display/aStretch.svg.js +52 -0
- package/lib/icons/display/block.svg.js +49 -0
- package/lib/icons/display/dcolumn.svg.js +48 -0
- package/lib/icons/display/dcolumnReverse.svg.js +55 -0
- package/lib/icons/display/drow.svg.js +48 -0
- package/lib/icons/display/drowReverse.svg.js +49 -0
- package/lib/icons/display/flex.svg.js +61 -0
- package/lib/icons/display/inline-block.svg.js +49 -0
- package/lib/icons/display/inline.svg.js +43 -0
- package/lib/icons/display/jCenter.svg.js +52 -0
- package/lib/icons/display/jFlexEnd.svg.js +52 -0
- package/lib/icons/display/jFlexStart.svg.js +52 -0
- package/lib/icons/display/jSpaceAround.svg.js +52 -0
- package/lib/icons/display/jSpaceBetween.svg.js +52 -0
- package/lib/icons/feat/audio.svg.js +1 -1
- package/lib/icons/feat/custom.svg.js +1 -1
- package/lib/icons/feat/each.svg.js +1 -1
- package/lib/icons/feat/form.svg.js +1 -1
- package/lib/icons/feat/nav.svg.js +1 -1
- package/lib/icons/feat/qrcode.svg.js +1 -1
- package/lib/icons/feat/service.svg.js +1 -1
- package/lib/icons/feat/table.svg.js +1 -1
- package/lib/icons/feat/tasks.svg.js +1 -1
- package/lib/icons/feat/video.svg.js +1 -1
- package/lib/icons/feat/wizard.svg.js +1 -1
- package/lib/icons/form/chained-select.svg.js +1 -1
- package/lib/icons/form/checkbox.svg.js +1 -1
- package/lib/icons/form/checkboxes.svg.js +1 -1
- package/lib/icons/form/combo.svg.js +1 -1
- package/lib/icons/form/condition-builder.svg.js +1 -1
- package/lib/icons/form/diff-editor.svg.js +1 -1
- package/lib/icons/form/editor.svg.js +1 -1
- package/lib/icons/form/formula.svg.js +1 -1
- package/lib/icons/form/hidden.svg.js +1 -1
- package/lib/icons/form/input-city.svg.js +1 -1
- package/lib/icons/form/input-color.svg.js +1 -1
- package/lib/icons/form/input-date-range.svg.js +1 -1
- package/lib/icons/form/input-date.svg.js +1 -1
- package/lib/icons/form/input-datetime.svg.js +1 -1
- package/lib/icons/form/input-email.svg.js +1 -1
- package/lib/icons/form/input-excel.svg.js +1 -1
- package/lib/icons/form/input-file.svg.js +1 -1
- package/lib/icons/form/input-group.svg.js +1 -1
- package/lib/icons/form/input-image.svg.js +1 -1
- package/lib/icons/form/input-kv.svg.js +1 -1
- package/lib/icons/form/input-month-range.svg.js +1 -1
- package/lib/icons/form/input-number.svg.js +1 -1
- package/lib/icons/form/input-password.svg.js +1 -1
- package/lib/icons/form/input-quarter-range.svg.js +1 -1
- package/lib/icons/form/input-range.svg.js +1 -1
- package/lib/icons/form/input-rating.svg.js +1 -1
- package/lib/icons/form/input-repeat.svg.js +1 -1
- package/lib/icons/form/input-rich-text.svg.js +1 -1
- package/lib/icons/form/input-tag.svg.js +1 -1
- package/lib/icons/form/input-text.svg.js +1 -1
- package/lib/icons/form/input-time-range.svg.js +1 -1
- package/lib/icons/form/input-time.svg.js +1 -1
- package/lib/icons/form/input-tree.svg.js +1 -1
- package/lib/icons/form/input-url.svg.js +1 -1
- package/lib/icons/form/input-year.svg.js +1 -1
- package/lib/icons/form/inputArray.svg.js +1 -1
- package/lib/icons/form/list-select.svg.js +1 -1
- package/lib/icons/form/location-picker.svg.js +1 -1
- package/lib/icons/form/matrix-checkboxes.svg.js +1 -1
- package/lib/icons/form/month.svg.js +1 -1
- package/lib/icons/form/nested-select.svg.js +1 -1
- package/lib/icons/form/picker.svg.js +1 -1
- package/lib/icons/form/quarter.svg.js +1 -1
- package/lib/icons/form/radios.svg.js +1 -1
- package/lib/icons/form/select.svg.js +1 -1
- package/lib/icons/form/static.svg.js +1 -1
- package/lib/icons/form/sub-form.svg.js +1 -1
- package/lib/icons/form/switch.svg.js +1 -1
- package/lib/icons/form/tabs-transfer.svg.js +1 -1
- package/lib/icons/form/textarea.svg.js +1 -1
- package/lib/icons/form/transfer.svg.js +1 -1
- package/lib/icons/form/tree-select.svg.js +1 -1
- package/lib/icons/form/uuid.svg.js +1 -1
- package/lib/icons/index.js +39 -1
- package/lib/icons/layout/layout-1with2.svg.js +1 -1
- package/lib/icons/layout/layout-2cols.svg.js +1 -1
- package/lib/icons/layout/layout-2row.svg.js +1 -1
- package/lib/icons/layout/layout-2with1.svg.js +1 -1
- package/lib/icons/layout/layout-3cols.svg.js +1 -1
- package/lib/icons/layout/layout-3row.svg.js +1 -1
- package/lib/icons/layout/layout-absolute.svg.js +1 -1
- package/lib/icons/layout/layout-fixed-top.svg.js +1 -1
- package/lib/icons/layout/layout-fixed.svg.js +1 -1
- package/lib/icons/layout/layout-free-container.svg.js +1 -1
- package/lib/icons/layout/layout-full.svg.js +1 -1
- package/lib/icons/layout/layout1-2.svg.js +1 -1
- package/lib/icons/layout/layout2-1.svg.js +1 -1
- package/lib/icons/layout/layout3-1.svg.js +1 -1
- package/lib/icons/layout/layout3-2.svg.js +1 -1
- package/lib/icons/other/divider.svg.js +1 -1
- package/lib/icons/other/property-sheet.svg.js +1 -1
- package/lib/icons/other/tooltip.svg.js +1 -1
- package/lib/icons/show/URL.svg.js +1 -1
- package/lib/icons/show/avatar.svg.js +1 -1
- package/lib/icons/show/breadcrumb.svg.js +1 -1
- package/lib/icons/show/card.svg.js +1 -1
- package/lib/icons/show/cards.svg.js +1 -1
- package/lib/icons/show/carousel.svg.js +1 -1
- package/lib/icons/show/chart.svg.js +1 -1
- package/lib/icons/show/code.svg.js +1 -1
- package/lib/icons/show/date.svg.js +1 -1
- package/lib/icons/show/datetime.svg.js +1 -1
- package/lib/icons/show/image.svg.js +1 -1
- package/lib/icons/show/images.svg.js +1 -1
- package/lib/icons/show/json-view.svg.js +1 -1
- package/lib/icons/show/list.svg.js +1 -1
- package/lib/icons/show/log.svg.js +1 -1
- package/lib/icons/show/mapping.svg.js +1 -1
- package/lib/icons/show/markdown.svg.js +1 -1
- package/lib/icons/show/plain.svg.js +1 -1
- package/lib/icons/show/progress.svg.js +1 -1
- package/lib/icons/show/sparkline.svg.js +1 -1
- package/lib/icons/show/status.svg.js +1 -1
- package/lib/icons/show/steps.svg.js +1 -1
- package/lib/icons/show/time.svg.js +1 -1
- package/lib/index.d.ts +3 -0
- package/lib/index.js +4 -1
- package/lib/locale/en-US.js +1 -1
- package/lib/locale/zh-CN.js +1 -1
- package/lib/plugin/Alert.d.ts +1 -1
- package/lib/plugin/Alert.js +80 -160
- package/lib/plugin/AnchorNav.js +235 -330
- package/lib/plugin/Audio.d.ts +1 -1
- package/lib/plugin/Audio.js +104 -169
- package/lib/plugin/Avatar.d.ts +1 -1
- package/lib/plugin/Avatar.js +219 -299
- package/lib/plugin/Breadcrumb.js +66 -136
- package/lib/plugin/Button.d.ts +1 -1
- package/lib/plugin/Button.js +268 -366
- package/lib/plugin/ButtonGroup.d.ts +1 -1
- package/lib/plugin/ButtonGroup.js +101 -181
- package/lib/plugin/CRUD.d.ts +1 -2
- package/lib/plugin/CRUD.js +1076 -1214
- package/lib/plugin/CRUD2.d.ts +1 -2
- package/lib/plugin/CRUD2.js +865 -1134
- package/lib/plugin/Card.d.ts +1 -1
- package/lib/plugin/Card.js +175 -270
- package/lib/plugin/Card2.d.ts +1 -1
- package/lib/plugin/Card2.js +68 -143
- package/lib/plugin/Cards.js +212 -307
- package/lib/plugin/Carousel.d.ts +2 -2
- package/lib/plugin/Carousel.js +257 -332
- package/lib/plugin/Chart.d.ts +1 -1
- package/lib/plugin/Chart.js +194 -274
- package/lib/plugin/CodeView.d.ts +1 -1
- package/lib/plugin/CodeView.js +39 -104
- package/lib/plugin/Collapse.d.ts +1 -1
- package/lib/plugin/Collapse.js +89 -164
- package/lib/plugin/CollapseGroup.d.ts +1 -1
- package/lib/plugin/CollapseGroup.js +176 -251
- package/lib/plugin/ColumnToggler.d.ts +1 -1
- package/lib/plugin/ColumnToggler.js +72 -137
- package/lib/plugin/Container.d.ts +1 -1
- package/lib/plugin/Container.js +129 -282
- package/lib/plugin/Custom.js +72 -142
- package/lib/plugin/CustomRegion.js +98 -173
- package/lib/plugin/Date.d.ts +1 -1
- package/lib/plugin/Date.js +47 -117
- package/lib/plugin/Datetime.d.ts +0 -1
- package/lib/plugin/Datetime.js +42 -87
- package/lib/plugin/Dialog.d.ts +2 -2
- package/lib/plugin/Dialog.js +157 -227
- package/lib/plugin/Divider.js +29 -94
- package/lib/plugin/Drawer.d.ts +2 -2
- package/lib/plugin/Drawer.js +196 -256
- package/lib/plugin/DropDownButton.js +173 -268
- package/lib/plugin/Each.js +103 -188
- package/lib/plugin/Flex.js +5 -25
- package/lib/plugin/Form/ButtonGroupSelect.d.ts +1 -1
- package/lib/plugin/Form/ButtonGroupSelect.js +116 -201
- package/lib/plugin/Form/ButtonToolbar.d.ts +1 -1
- package/lib/plugin/Form/ButtonToolbar.js +89 -174
- package/lib/plugin/Form/ChainedSelect.d.ts +1 -1
- package/lib/plugin/Form/ChainedSelect.js +124 -209
- package/lib/plugin/Form/Checkbox.d.ts +1 -1
- package/lib/plugin/Form/Checkbox.js +121 -211
- package/lib/plugin/Form/Checkboxes.d.ts +1 -1
- package/lib/plugin/Form/Checkboxes.js +142 -232
- package/lib/plugin/Form/CodeEditor.d.ts +0 -1
- package/lib/plugin/Form/CodeEditor.js +152 -242
- package/lib/plugin/Form/Combo.d.ts +1 -1
- package/lib/plugin/Form/Combo.js +433 -529
- package/lib/plugin/Form/ConditionBuilder.d.ts +1 -1
- package/lib/plugin/Form/ConditionBuilder.js +88 -158
- package/lib/plugin/Form/Control.d.ts +1 -1
- package/lib/plugin/Form/Control.js +52 -127
- package/lib/plugin/Form/DiffEditor.d.ts +0 -1
- package/lib/plugin/Form/DiffEditor.js +159 -249
- package/lib/plugin/Form/FieldSet.d.ts +1 -1
- package/lib/plugin/Form/FieldSet.js +97 -167
- package/lib/plugin/Form/Form.d.ts +1 -1
- package/lib/plugin/Form/Form.js +580 -680
- package/lib/plugin/Form/Formula.d.ts +1 -10
- package/lib/plugin/Form/Formula.js +55 -130
- package/lib/plugin/Form/Group.js +173 -253
- package/lib/plugin/Form/Hidden.d.ts +1 -10
- package/lib/plugin/Form/Hidden.js +29 -99
- package/lib/plugin/Form/InputArray.js +145 -235
- package/lib/plugin/Form/InputCity.d.ts +1 -1
- package/lib/plugin/Form/InputCity.js +122 -212
- package/lib/plugin/Form/InputColor.d.ts +1 -1
- package/lib/plugin/Form/InputColor.js +200 -300
- package/lib/plugin/Form/InputDate.d.ts +1 -1
- package/lib/plugin/Form/InputDate.js +201 -296
- package/lib/plugin/Form/InputDateRange.d.ts +1 -1
- package/lib/plugin/Form/InputDateRange.js +255 -350
- package/lib/plugin/Form/InputDateTime.js +24 -89
- package/lib/plugin/Form/InputDateTimeRange.js +25 -95
- package/lib/plugin/Form/InputEmail.js +22 -77
- package/lib/plugin/Form/InputExcel.d.ts +1 -1
- package/lib/plugin/Form/InputExcel.js +80 -160
- package/lib/plugin/Form/InputFile.d.ts +1 -1
- package/lib/plugin/Form/InputFile.js +264 -344
- package/lib/plugin/Form/InputGroup.d.ts +1 -1
- package/lib/plugin/Form/InputGroup.js +65 -150
- package/lib/plugin/Form/InputImage.d.ts +1 -1
- package/lib/plugin/Form/InputImage.js +302 -382
- package/lib/plugin/Form/InputKV.js +90 -170
- package/lib/plugin/Form/InputMonth.js +21 -86
- package/lib/plugin/Form/InputMonthRange.js +25 -95
- package/lib/plugin/Form/InputNumber.d.ts +1 -1
- package/lib/plugin/Form/InputNumber.js +186 -276
- package/lib/plugin/Form/InputPassword.js +22 -77
- package/lib/plugin/Form/InputQuarter.js +21 -86
- package/lib/plugin/Form/InputQuarterRange.js +25 -95
- package/lib/plugin/Form/InputRange.d.ts +1 -1
- package/lib/plugin/Form/InputRange.js +220 -305
- package/lib/plugin/Form/InputRating.d.ts +1 -1
- package/lib/plugin/Form/InputRating.js +266 -356
- package/lib/plugin/Form/InputRepeat.js +38 -103
- package/lib/plugin/Form/InputRichText.d.ts +0 -1
- package/lib/plugin/Form/InputRichText.js +223 -296
- package/lib/plugin/Form/InputSubForm.js +155 -240
- package/lib/plugin/Form/InputTable.d.ts +1 -1
- package/lib/plugin/Form/InputTable.js +543 -643
- package/lib/plugin/Form/InputTag.d.ts +1 -1
- package/lib/plugin/Form/InputTag.js +115 -205
- package/lib/plugin/Form/InputText.d.ts +1 -1
- package/lib/plugin/Form/InputText.js +298 -398
- package/lib/plugin/Form/InputTime.js +24 -89
- package/lib/plugin/Form/InputTimeRange.js +25 -95
- package/lib/plugin/Form/InputTree.d.ts +1 -1
- package/lib/plugin/Form/InputTree.js +424 -520
- package/lib/plugin/Form/InputURL.js +23 -83
- package/lib/plugin/Form/InputYear.js +21 -86
- package/lib/plugin/Form/InputYearRange.js +25 -95
- package/lib/plugin/Form/Item.d.ts +1 -1
- package/lib/plugin/Form/Item.js +172 -212
- package/lib/plugin/Form/ListSelect.d.ts +1 -1
- package/lib/plugin/Form/ListSelect.js +86 -171
- package/lib/plugin/Form/LocationPicker.d.ts +3 -2
- package/lib/plugin/Form/LocationPicker.js +88 -114
- package/lib/plugin/Form/MatrixCheckboxes.d.ts +1 -1
- package/lib/plugin/Form/MatrixCheckboxes.js +148 -233
- package/lib/plugin/Form/NestedSelect.d.ts +1 -1
- package/lib/plugin/Form/NestedSelect.js +235 -325
- package/lib/plugin/Form/Picker.js +176 -261
- package/lib/plugin/Form/Radios.d.ts +1 -1
- package/lib/plugin/Form/Radios.js +135 -230
- package/lib/plugin/Form/Select.d.ts +1 -1
- package/lib/plugin/Form/Select.js +245 -340
- package/lib/plugin/Form/Static.d.ts +1 -1
- package/lib/plugin/Form/Static.js +109 -209
- package/lib/plugin/Form/Switch.d.ts +1 -1
- package/lib/plugin/Form/Switch.js +157 -252
- package/lib/plugin/Form/TabsTransfer.d.ts +1 -1
- package/lib/plugin/Form/TabsTransfer.js +227 -317
- package/lib/plugin/Form/Textarea.d.ts +0 -1
- package/lib/plugin/Form/Textarea.js +122 -212
- package/lib/plugin/Form/Transfer.d.ts +1 -1
- package/lib/plugin/Form/Transfer.js +256 -346
- package/lib/plugin/Form/TreeSelect.d.ts +1 -1
- package/lib/plugin/Form/TreeSelect.js +410 -505
- package/lib/plugin/Form/UUID.d.ts +1 -10
- package/lib/plugin/Form/UUID.js +29 -99
- package/lib/plugin/Grid.d.ts +0 -1
- package/lib/plugin/Grid.js +513 -643
- package/lib/plugin/HBox.d.ts +0 -1
- package/lib/plugin/HBox.js +463 -583
- package/lib/plugin/IFrame.d.ts +2 -11
- package/lib/plugin/IFrame.js +54 -125
- package/lib/plugin/Image.d.ts +2 -2
- package/lib/plugin/Image.js +219 -309
- package/lib/plugin/Images.d.ts +3 -3
- package/lib/plugin/Images.js +160 -230
- package/lib/plugin/Json.d.ts +1 -1
- package/lib/plugin/Json.js +40 -110
- package/lib/plugin/Layout/FlexPluginBase.js +179 -356
- package/lib/plugin/Layout/Layout_fixed.js +23 -63
- package/lib/plugin/Layout/Layout_free_container.js +18 -58
- package/lib/plugin/Layout/Layout_sorption_container.js +27 -70
- package/lib/plugin/Link.js +63 -133
- package/lib/plugin/List.js +267 -382
- package/lib/plugin/ListItem.d.ts +1 -1
- package/lib/plugin/ListItem.js +133 -193
- package/lib/plugin/Log.d.ts +1 -1
- package/lib/plugin/Log.js +96 -166
- package/lib/plugin/Mapping.js +147 -247
- package/lib/plugin/Markdown.d.ts +1 -1
- package/lib/plugin/Markdown.js +32 -102
- package/lib/plugin/Nav.d.ts +1 -1
- package/lib/plugin/Nav.js +301 -386
- package/lib/plugin/OfficeViewer.d.ts +22 -0
- package/lib/plugin/OfficeViewer.js +95 -0
- package/lib/plugin/Operation.d.ts +1 -1
- package/lib/plugin/Operation.js +47 -112
- package/lib/plugin/Others/Action.js +304 -329
- package/lib/plugin/Others/TableCell.d.ts +1 -1
- package/lib/plugin/Others/TableCell.js +304 -329
- package/lib/plugin/Page.d.ts +2 -3
- package/lib/plugin/Page.js +281 -376
- package/lib/plugin/Pagination.d.ts +1 -1
- package/lib/plugin/Pagination.js +211 -296
- package/lib/plugin/Panel.d.ts +1 -1
- package/lib/plugin/Panel.js +171 -251
- package/lib/plugin/Plain.d.ts +1 -1
- package/lib/plugin/Plain.js +101 -186
- package/lib/plugin/Progress.d.ts +1 -1
- package/lib/plugin/Progress.js +203 -283
- package/lib/plugin/Property.js +84 -149
- package/lib/plugin/QRCode.js +64 -134
- package/lib/plugin/Reset.js +13 -58
- package/lib/plugin/Service.d.ts +1 -1
- package/lib/plugin/Service.js +166 -251
- package/lib/plugin/Sparkline.js +24 -89
- package/lib/plugin/Status.d.ts +1 -1
- package/lib/plugin/Status.js +225 -303
- package/lib/plugin/Steps.js +76 -141
- package/lib/plugin/Submit.js +13 -53
- package/lib/plugin/Table.d.ts +1 -1
- package/lib/plugin/Table.js +542 -639
- package/lib/plugin/Table2.d.ts +1 -1
- package/lib/plugin/Table2.js +730 -826
- package/lib/plugin/TableCell2.js +409 -436
- package/lib/plugin/TableView.d.ts +0 -1
- package/lib/plugin/TableView.js +565 -621
- package/lib/plugin/Tabs.js +341 -468
- package/lib/plugin/Tag.d.ts +1 -1
- package/lib/plugin/Tag.js +122 -202
- package/lib/plugin/Tasks.d.ts +0 -1
- package/lib/plugin/Tasks.js +162 -227
- package/lib/plugin/Time.d.ts +0 -1
- package/lib/plugin/Time.js +44 -84
- package/lib/plugin/Timeline.d.ts +1 -1
- package/lib/plugin/Timeline.js +91 -168
- package/lib/plugin/TooltipWrapper.d.ts +1 -1
- package/lib/plugin/TooltipWrapper.js +189 -269
- package/lib/plugin/Tpl.d.ts +1 -1
- package/lib/plugin/Tpl.js +92 -183
- package/lib/plugin/Video.d.ts +2 -2
- package/lib/plugin/Video.js +101 -171
- package/lib/plugin/WebComponent.d.ts +1 -1
- package/lib/plugin/WebComponent.js +45 -125
- package/lib/plugin/Wizard.js +623 -734
- package/lib/plugin/Wrapper.d.ts +1 -1
- package/lib/plugin/Wrapper.js +104 -257
- package/lib/renderer/APIControl.d.ts +128 -4854
- package/lib/renderer/APIControl.js +729 -836
- package/lib/renderer/ActionApiControl.d.ts +74 -6384
- package/lib/renderer/BadgeControl.d.ts +13 -13
- package/lib/renderer/BadgeControl.js +229 -269
- package/lib/renderer/ButtonGroupControl.d.ts +21 -0
- package/lib/renderer/ButtonGroupControl.js +46 -0
- package/lib/renderer/DataBindingControl.js +174 -209
- package/lib/renderer/DataMappingControl.d.ts +2 -2
- package/lib/renderer/DataMappingControl.js +28 -39
- package/lib/renderer/DataPickerControl.js +35 -50
- package/lib/renderer/DateShortCutControl.js +250 -345
- package/lib/renderer/ExpressionFormulaControl.js +169 -238
- package/lib/renderer/FeatureControl.d.ts +1 -1
- package/lib/renderer/FeatureControl.js +179 -241
- package/lib/renderer/FlexSettingControl.d.ts +20 -0
- package/lib/renderer/FlexSettingControl.js +160 -0
- package/lib/renderer/FormulaControl.js +343 -462
- package/lib/renderer/GoConfigControl.js +25 -35
- package/lib/renderer/MapSourceControl.d.ts +9 -1603
- package/lib/renderer/MapSourceControl.js +270 -356
- package/lib/renderer/NavBadgeControl.d.ts +13 -17
- package/lib/renderer/NavBadgeControl.js +228 -263
- package/lib/renderer/NavDefaultActive.d.ts +1 -1
- package/lib/renderer/NavDefaultActive.js +60 -69
- package/lib/renderer/NavSourceControl.d.ts +2 -2
- package/lib/renderer/NavSourceControl.js +295 -389
- package/lib/renderer/OptionControl.d.ts +3 -4
- package/lib/renderer/OptionControl.js +611 -780
- package/lib/renderer/RangePartsControl.js +264 -339
- package/lib/renderer/StatusControl.js +133 -169
- package/lib/renderer/SwitchMoreControl.d.ts +64 -104
- package/lib/renderer/SwitchMoreControl.js +311 -413
- package/lib/renderer/TimelineItemControl.d.ts +1 -1
- package/lib/renderer/TimelineItemControl.js +421 -539
- package/lib/renderer/TransferTableControl.d.ts +1 -1
- package/lib/renderer/TransferTableControl.js +331 -407
- package/lib/renderer/TreeOptionControl.d.ts +2 -2
- package/lib/renderer/TreeOptionControl.js +478 -610
- package/lib/renderer/ValidationControl.js +228 -282
- package/lib/renderer/ValidationItem.js +124 -160
- package/lib/renderer/event-control/action-config-dialog.js +199 -216
- package/lib/renderer/event-control/action-config-panel.d.ts +1 -1
- package/lib/renderer/event-control/action-config-panel.js +36 -41
- package/lib/renderer/event-control/comp-action-select.js +27 -37
- package/lib/renderer/event-control/helper.d.ts +18 -32
- package/lib/renderer/event-control/helper.js +55 -71
- package/lib/renderer/event-control/index.js +672 -815
- package/lib/renderer/style-control/Background.js +5 -10
- package/lib/renderer/style-control/Border.js +6 -11
- package/lib/renderer/style-control/BoxModel.js +4 -9
- package/lib/renderer/style-control/BoxShadow.js +6 -11
- package/lib/renderer/style-control/Display.js +4 -9
- package/lib/renderer/style-control/Font.js +4 -9
- package/lib/renderer/style-control/InsetBoxModel.js +4 -9
- package/lib/renderer/style-control/ThemeClassName.js +6 -11
- package/lib/renderer/style-control/font-family.js +1 -1
- package/lib/renderer/style-control/transformation.js +3 -2
- package/lib/renderer/textarea-formula/FormulaPicker.js +4 -3
- package/lib/renderer/textarea-formula/TextareaFormulaControl.js +223 -323
- package/lib/renderer/textarea-formula/plugin.js +157 -226
- package/lib/renderer/textarea-formula/utils.js +4 -4
- package/lib/tpl/api.js +1 -1
- package/lib/tpl/common.js +20 -21
- package/lib/tpl/horizontal.js +1 -1
- package/lib/tpl/layout.js +27 -12
- package/lib/tpl/options.js +2 -2
- package/lib/tpl/remark.js +1 -1
- package/lib/tpl/style.js +4 -4
- package/lib/tpl/validations.js +3 -3
- package/lib/util.d.ts +9 -33
- package/lib/util.js +1 -1
- package/lib/validator.js +4 -4
- package/package.json +4 -3
package/lib/plugin/CRUD2.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* amis-editor v5.2.5-beta.
|
2
|
+
* amis-editor v5.2.5-beta.6
|
3
3
|
* Copyright 2018-2023 @fex
|
4
4
|
*/
|
5
5
|
|
@@ -26,7 +26,7 @@ var findObj = function (obj, predicate, stop) {
|
|
26
26
|
while (waitProcess.length) {
|
27
27
|
var item = waitProcess.pop();
|
28
28
|
if (Array.isArray(item)) {
|
29
|
-
waitProcess.push.apply(waitProcess, item);
|
29
|
+
waitProcess.push.apply(waitProcess, tslib.__spreadArray([], tslib.__read(item), false));
|
30
30
|
continue;
|
31
31
|
}
|
32
32
|
if (!_.isObject(item) || stop && stop(item)) {
|
@@ -35,7 +35,7 @@ var findObj = function (obj, predicate, stop) {
|
|
35
35
|
if (predicate(item)) {
|
36
36
|
return item;
|
37
37
|
}
|
38
|
-
waitProcess.push.apply(waitProcess, Object.values(item));
|
38
|
+
waitProcess.push.apply(waitProcess, tslib.__spreadArray([], tslib.__read(Object.values(item)), false));
|
39
39
|
}
|
40
40
|
};
|
41
41
|
var deepRemove = function (obj, predicate) {
|
@@ -44,15 +44,16 @@ var deepRemove = function (obj, predicate) {
|
|
44
44
|
var item = waitProcess.pop();
|
45
45
|
if (Array.isArray(item)) {
|
46
46
|
_.remove(item, predicate);
|
47
|
-
waitProcess.push.apply(waitProcess, item);
|
47
|
+
waitProcess.push.apply(waitProcess, tslib.__spreadArray([], tslib.__read(item), false));
|
48
48
|
return "continue";
|
49
49
|
}
|
50
50
|
if (!_.isObject(item)) {
|
51
51
|
return "continue";
|
52
52
|
}
|
53
53
|
Object.entries(item).forEach(function (_a) {
|
54
|
-
var
|
55
|
-
|
54
|
+
var _b = tslib.__read(_a, 2),
|
55
|
+
key = _b[0],
|
56
|
+
value = _b[1];
|
56
57
|
if (_.isObject(value) && predicate(value)) {
|
57
58
|
delete item[key];
|
58
59
|
}
|
@@ -434,771 +435,642 @@ var CRUDPlugin = /** @class */function (_super) {
|
|
434
435
|
tslib.__extends(CRUDPlugin, _super);
|
435
436
|
function CRUDPlugin(manager) {
|
436
437
|
var _this = _super.call(this, manager) || this;
|
437
|
-
|
438
|
-
enumerable: true,
|
439
|
-
configurable: true,
|
440
|
-
writable: true,
|
441
|
-
value: true
|
442
|
-
});
|
443
|
-
Object.defineProperty(_this, "dsBuilderMgr", {
|
444
|
-
enumerable: true,
|
445
|
-
configurable: true,
|
446
|
-
writable: true,
|
447
|
-
value: void 0
|
448
|
-
});
|
438
|
+
_this.disabledRendererPlugin = true;
|
449
439
|
// 关联渲染器名字
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
value: -1000
|
473
|
-
});
|
474
|
-
Object.defineProperty(_this, "docLink", {
|
475
|
-
enumerable: true,
|
476
|
-
configurable: true,
|
477
|
-
writable: true,
|
478
|
-
value: '/amis/zh-CN/components/crud'
|
479
|
-
});
|
480
|
-
Object.defineProperty(_this, "tags", {
|
481
|
-
enumerable: true,
|
482
|
-
configurable: true,
|
483
|
-
writable: true,
|
484
|
-
value: [i18nRuntime.i18n("73721e611daaafe5c34aa9f3f901d016")]
|
485
|
-
});
|
486
|
-
Object.defineProperty(_this, "scaffold", {
|
487
|
-
enumerable: true,
|
488
|
-
configurable: true,
|
489
|
-
writable: true,
|
490
|
-
value: void 0
|
491
|
-
});
|
492
|
-
Object.defineProperty(_this, "name", {
|
493
|
-
enumerable: true,
|
494
|
-
configurable: true,
|
495
|
-
writable: true,
|
496
|
-
value: void 0
|
497
|
-
});
|
498
|
-
Object.defineProperty(_this, "events", {
|
499
|
-
enumerable: true,
|
500
|
-
configurable: true,
|
501
|
-
writable: true,
|
502
|
-
value: [{
|
503
|
-
eventName: 'get-data',
|
504
|
-
eventLabel: i18nRuntime.i18n("1b79a4f49b7a21e62b8868f12189b0b0"),
|
505
|
-
description: i18nRuntime.i18n("5a28d015b7b3518f75bc4cc27d9f6c20")
|
506
|
-
}]
|
507
|
-
});
|
508
|
-
Object.defineProperty(_this, "actions", {
|
509
|
-
enumerable: true,
|
510
|
-
configurable: true,
|
511
|
-
writable: true,
|
512
|
-
value: [{
|
513
|
-
actionType: 'search',
|
514
|
-
actionLabel: i18nRuntime.i18n("cfd84204d9476936c949d071cc2338cf"),
|
515
|
-
description: i18nRuntime.i18n("c6bd3393c21379d3f75d179abe36da3d"),
|
516
|
-
descDetail: function (info) {
|
517
|
-
return React__default["default"].createElement("div", null, React__default["default"].createElement("span", {
|
518
|
-
className: "variable-right"
|
519
|
-
}, info === null || info === void 0 ? void 0 : info.__rendererLabel), "\u89E6\u53D1\u6570\u636E\u67E5\u8BE2");
|
520
|
-
},
|
521
|
-
schema: helper.getArgsWrapper(
|
522
|
-
/*
|
523
|
-
{
|
524
|
-
type: 'input-formula',
|
525
|
-
variables: '${variables}',
|
526
|
-
evalMode: false,
|
527
|
-
variableMode: 'tabs',
|
528
|
-
label: '查询条件',
|
529
|
-
size: 'md',
|
530
|
-
name: 'query',
|
531
|
-
mode: 'horizontal'
|
532
|
-
}
|
533
|
-
*/
|
440
|
+
_this.rendererName = 'crud2';
|
441
|
+
_this.multifactor = true;
|
442
|
+
_this.$schema = '/schemas/CRUD2Schema.json';
|
443
|
+
_this.order = -1000;
|
444
|
+
_this.docLink = '/amis/zh-CN/components/crud';
|
445
|
+
_this.tags = [i18nRuntime.i18n("73721e611daaafe5c34aa9f3f901d016")];
|
446
|
+
_this.events = [{
|
447
|
+
eventName: 'get-data',
|
448
|
+
eventLabel: i18nRuntime.i18n("1b79a4f49b7a21e62b8868f12189b0b0"),
|
449
|
+
description: i18nRuntime.i18n("5a28d015b7b3518f75bc4cc27d9f6c20")
|
450
|
+
}];
|
451
|
+
_this.actions = [{
|
452
|
+
actionType: 'search',
|
453
|
+
actionLabel: i18nRuntime.i18n("cfd84204d9476936c949d071cc2338cf"),
|
454
|
+
description: i18nRuntime.i18n("c6bd3393c21379d3f75d179abe36da3d"),
|
455
|
+
descDetail: function (info) {
|
456
|
+
return React__default["default"].createElement("div", null, React__default["default"].createElement("span", {
|
457
|
+
className: "variable-right"
|
458
|
+
}, info === null || info === void 0 ? void 0 : info.__rendererLabel), "\u89E6\u53D1\u6570\u636E\u67E5\u8BE2");
|
459
|
+
},
|
460
|
+
schema: helper.getArgsWrapper(
|
461
|
+
/*
|
534
462
|
{
|
535
|
-
|
536
|
-
label: i18nRuntime.i18n("cf12e55021998a8328201800ec356773"),
|
537
|
-
type: 'ae-formulaControl',
|
463
|
+
type: 'input-formula',
|
538
464
|
variables: '${variables}',
|
465
|
+
evalMode: false,
|
466
|
+
variableMode: 'tabs',
|
467
|
+
label: '查询条件',
|
539
468
|
size: 'md',
|
469
|
+
name: 'query',
|
540
470
|
mode: 'horizontal'
|
541
|
-
})
|
542
|
-
},
|
543
|
-
// {
|
544
|
-
// actionType: 'resetQuery',
|
545
|
-
// actionLabel: '重置查询',
|
546
|
-
// description: '重新恢复查询条件为初始值',
|
547
|
-
// descDetail: (info: any) => {
|
548
|
-
// return (
|
549
|
-
// <div>
|
550
|
-
// <span className="variable-right">{info?.__rendererLabel}</span>
|
551
|
-
// 重置初始查询条件
|
552
|
-
// </div>
|
553
|
-
// );
|
554
|
-
// }
|
555
|
-
// },
|
556
|
-
{
|
557
|
-
actionType: 'loadMore',
|
558
|
-
actionLabel: i18nRuntime.i18n("77281549955309c49f5eef77838a85e5"),
|
559
|
-
description: i18nRuntime.i18n("b3a4d6a345372c5def1d5a1bf6077bce"),
|
560
|
-
descDetail: function (info) {
|
561
|
-
return React__default["default"].createElement("div", null, React__default["default"].createElement("span", {
|
562
|
-
className: "variable-right"
|
563
|
-
}, info === null || info === void 0 ? void 0 : info.__rendererLabel), "\u52A0\u8F7D\u66F4\u591A\u6570\u636E");
|
564
471
|
}
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
472
|
+
*/
|
473
|
+
amisEditorCore.getSchemaTpl('formulaControl', {
|
474
|
+
name: 'query',
|
475
|
+
label: i18nRuntime.i18n("cf12e55021998a8328201800ec356773"),
|
476
|
+
variables: '${variables}',
|
477
|
+
size: 'md',
|
478
|
+
mode: 'horizontal'
|
479
|
+
}))
|
480
|
+
},
|
481
|
+
// {
|
482
|
+
// actionType: 'resetQuery',
|
483
|
+
// actionLabel: '重置查询',
|
484
|
+
// description: '重新恢复查询条件为初始值',
|
485
|
+
// descDetail: (info: any) => {
|
486
|
+
// return (
|
487
|
+
// <div>
|
488
|
+
// <span className="variable-right">{info?.__rendererLabel}</span>
|
489
|
+
// 重置初始查询条件
|
490
|
+
// </div>
|
491
|
+
// );
|
492
|
+
// }
|
493
|
+
// },
|
494
|
+
{
|
495
|
+
actionType: 'loadMore',
|
496
|
+
actionLabel: i18nRuntime.i18n("77281549955309c49f5eef77838a85e5"),
|
497
|
+
description: i18nRuntime.i18n("b3a4d6a345372c5def1d5a1bf6077bce"),
|
498
|
+
descDetail: function (info) {
|
499
|
+
return React__default["default"].createElement("div", null, React__default["default"].createElement("span", {
|
500
|
+
className: "variable-right"
|
501
|
+
}, info === null || info === void 0 ? void 0 : info.__rendererLabel), "\u52A0\u8F7D\u66F4\u591A\u6570\u636E");
|
502
|
+
}
|
503
|
+
}];
|
504
|
+
_this.previewSchema = {
|
505
|
+
syncLocation: false,
|
506
|
+
type: 'crud2',
|
507
|
+
className: 'text-left',
|
508
|
+
bodyClassName: 'm-b-none',
|
509
|
+
affixHeader: false,
|
510
|
+
data: {
|
511
|
+
items: [{
|
512
|
+
a: 1,
|
513
|
+
b: 2
|
593
514
|
}, {
|
594
|
-
|
595
|
-
|
515
|
+
a: 3,
|
516
|
+
b: 4
|
596
517
|
}, {
|
597
|
-
|
598
|
-
|
599
|
-
buttons: [{
|
600
|
-
icon: 'fa fa-eye',
|
601
|
-
type: 'button'
|
602
|
-
}, {
|
603
|
-
icon: 'fa fa-edit',
|
604
|
-
type: 'button'
|
605
|
-
}]
|
518
|
+
a: 5,
|
519
|
+
b: 6
|
606
520
|
}]
|
607
|
-
}
|
608
|
-
|
521
|
+
},
|
522
|
+
source: '${items}',
|
523
|
+
columns: [{
|
524
|
+
title: 'A',
|
525
|
+
name: 'a'
|
526
|
+
}, {
|
527
|
+
title: 'B',
|
528
|
+
name: 'b'
|
529
|
+
}, {
|
530
|
+
name: 'operation',
|
531
|
+
title: i18nRuntime.i18n("2b6bc0f293f5ca01b006206c2535ccbc"),
|
532
|
+
buttons: [{
|
533
|
+
icon: 'fa fa-eye',
|
534
|
+
type: 'button'
|
535
|
+
}, {
|
536
|
+
icon: 'fa fa-edit',
|
537
|
+
type: 'button'
|
538
|
+
}]
|
539
|
+
}]
|
540
|
+
};
|
609
541
|
_this.dsBuilderMgr = new amisEditorCore.DSBuilderManager('crud2', 'api');
|
610
542
|
return _this;
|
611
543
|
}
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
_b.label = 3;
|
634
|
-
case 3:
|
635
|
-
return [2 /*return*/];
|
636
|
-
}
|
637
|
-
});
|
544
|
+
CRUDPlugin.prototype.afterBuildPanelBody = function (event) {
|
545
|
+
var _a;
|
546
|
+
return tslib.__awaiter(this, void 0, void 0, function () {
|
547
|
+
var context;
|
548
|
+
return tslib.__generator(this, function (_b) {
|
549
|
+
switch (_b.label) {
|
550
|
+
case 0:
|
551
|
+
context = event.context.context;
|
552
|
+
if (!(((_a = context.info.renderer) === null || _a === void 0 ? void 0 : _a.isFormItem) && new RegExp('/crud2/filter/').test(context.path))) return [3 /*break*/, 2];
|
553
|
+
return [4 /*yield*/, this.addFilterPanelSetting(event.context)];
|
554
|
+
case 1:
|
555
|
+
_b.sent();
|
556
|
+
return [3 /*break*/, 3];
|
557
|
+
case 2:
|
558
|
+
if (context.schema.type === 'crud2' && context.schema.mode === this.scaffold.mode) {
|
559
|
+
this.addListPanelSetting(event.context);
|
560
|
+
}
|
561
|
+
_b.label = 3;
|
562
|
+
case 3:
|
563
|
+
return [2 /*return*/];
|
564
|
+
}
|
638
565
|
});
|
639
|
-
}
|
640
|
-
}
|
566
|
+
});
|
567
|
+
};
|
641
568
|
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
host = node.getClosestParentByType('crud2');
|
657
|
-
if (!host || !form || !form.schema.behavior || host.schema.mode !== this.scaffold.mode) {
|
658
|
-
return [2 /*return*/];
|
659
|
-
}
|
569
|
+
CRUDPlugin.prototype.addFilterPanelSetting = function (context) {
|
570
|
+
var _a;
|
571
|
+
return tslib.__awaiter(this, void 0, void 0, function () {
|
572
|
+
var _b, info, node, form, host, builder, body_1;
|
573
|
+
return tslib.__generator(this, function (_c) {
|
574
|
+
switch (_c.label) {
|
575
|
+
case 0:
|
576
|
+
_b = context.context, info = _b.info, node = _b.node;
|
577
|
+
if (!((_a = info.renderer) === null || _a === void 0 ? void 0 : _a.isFormItem)) return [3 /*break*/, 2];
|
578
|
+
form = node.getClosestParentByType('form');
|
579
|
+
host = node.getClosestParentByType('crud2');
|
580
|
+
if (!host || !form || !form.schema.behavior || host.schema.mode !== this.scaffold.mode) {
|
581
|
+
return [2 /*return*/];
|
582
|
+
}
|
660
583
|
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
return [2 /*return*/];
|
671
|
-
}
|
672
|
-
// 可能会出错,但是cards table2 list 配置面板结构统一,因此
|
673
|
-
context.data.tabs.forEach(function (tab) {
|
674
|
-
if (tab.title === i18nRuntime.i18n("24d67862f87f439db7ca957aecb77cce")) {
|
675
|
-
tab.body[0].body.forEach(function (collapse) {
|
676
|
-
var _a;
|
677
|
-
if (collapse.title === i18nRuntime.i18n("4092ed98e9035652d4c9ca9441701ed7")) {
|
678
|
-
// 在标题后面插入过滤条件
|
679
|
-
(_a = collapse.body).splice.apply(_a, tslib.__spreadArray([2, 0], body_1, false));
|
680
|
-
}
|
681
|
-
});
|
682
|
-
}
|
683
|
-
});
|
684
|
-
_c.label = 2;
|
685
|
-
case 2:
|
584
|
+
builder = this.dsBuilderMgr.resolveBuilderBySchema(host.schema, 'api');
|
585
|
+
return [4 /*yield*/, builder.makeFieldFilterSetting({
|
586
|
+
schema: host.schema,
|
587
|
+
sourceKey: 'api',
|
588
|
+
fieldName: node.schema.name
|
589
|
+
})];
|
590
|
+
case 1:
|
591
|
+
body_1 = _c.sent();
|
592
|
+
if (!body_1 || !body_1.length) {
|
686
593
|
return [2 /*return*/];
|
687
|
-
|
688
|
-
|
594
|
+
}
|
595
|
+
// 可能会出错,但是cards table2 list 配置面板结构统一,因此
|
596
|
+
context.data.tabs.forEach(function (tab) {
|
597
|
+
if (tab.title === i18nRuntime.i18n("24d67862f87f439db7ca957aecb77cce")) {
|
598
|
+
tab.body[0].body.forEach(function (collapse) {
|
599
|
+
var _a;
|
600
|
+
if (collapse.title === i18nRuntime.i18n("4092ed98e9035652d4c9ca9441701ed7")) {
|
601
|
+
// 在标题后面插入过滤条件
|
602
|
+
(_a = collapse.body).splice.apply(_a, tslib.__spreadArray([2, 0], tslib.__read(body_1), false));
|
603
|
+
}
|
604
|
+
});
|
605
|
+
}
|
606
|
+
});
|
607
|
+
_c.label = 2;
|
608
|
+
case 2:
|
609
|
+
return [2 /*return*/];
|
610
|
+
}
|
689
611
|
});
|
690
|
-
}
|
691
|
-
}
|
612
|
+
});
|
613
|
+
};
|
692
614
|
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
columnClassName: 'text-right',
|
711
|
-
body: []
|
712
|
-
}]
|
713
|
-
}];
|
714
|
-
// 尝试放到左面第一个,否则只能放外头了
|
715
|
-
try {
|
716
|
-
schema[region][0].columns[align === 'left' ? 0 : 1].body.unshift(content);
|
717
|
-
} catch (e) {
|
718
|
-
schema[region].unshift(content);
|
719
|
-
}
|
615
|
+
CRUDPlugin.prototype.addDataOperatorSchema = function (schema, content) {};
|
616
|
+
CRUDPlugin.prototype.addFeatToToolbar = function (schema, content, position, align) {
|
617
|
+
var region = "".concat(position, "Toolbar");
|
618
|
+
schema[region] = schema[region] || [{
|
619
|
+
type: 'grid',
|
620
|
+
columns: [{
|
621
|
+
body: []
|
622
|
+
}, {
|
623
|
+
columnClassName: 'text-right',
|
624
|
+
body: []
|
625
|
+
}]
|
626
|
+
}];
|
627
|
+
// 尝试放到左面第一个,否则只能放外头了
|
628
|
+
try {
|
629
|
+
schema[region][0].columns[align === 'left' ? 0 : 1].body.unshift(content);
|
630
|
+
} catch (e) {
|
631
|
+
schema[region].unshift(content);
|
720
632
|
}
|
721
|
-
}
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
633
|
+
};
|
634
|
+
CRUDPlugin.prototype.filterOperators = function (builder, context) {
|
635
|
+
var _this = this;
|
636
|
+
var operators = [];
|
637
|
+
Tools.forEach(function (tool) {
|
638
|
+
if (!builder.features.includes(tool.value)) {
|
639
|
+
return;
|
640
|
+
}
|
641
|
+
operators.push(tslib.__assign(tslib.__assign({}, tool), {
|
642
|
+
remove: function (schema) {
|
643
|
+
deepRemove(schema.headerToolbar, function (item) {
|
644
|
+
return item.behavior === tool.value;
|
645
|
+
});
|
646
|
+
deepRemove(schema.footerToolbar, function (item) {
|
647
|
+
return item.behavior === tool.value;
|
648
|
+
});
|
649
|
+
},
|
650
|
+
add: function (data) {
|
651
|
+
_this.addFeatToToolbar(data, tool.resolveSchema(data, builder), 'header', tool.align);
|
652
|
+
},
|
653
|
+
isActive: function (data) {
|
654
|
+
return _this.isFeatActive(data, tool.value, 'headerToolbar', 'footerToolbar');
|
655
|
+
}
|
656
|
+
}));
|
657
|
+
});
|
658
|
+
// 只有表格才能找到操作列放这个内容,卡片和列表不知道位置
|
659
|
+
if (context.schema.mode === 'table2') {
|
660
|
+
DataOperators.forEach(function (op) {
|
661
|
+
if (!builder.features.includes(op.value)) {
|
731
662
|
return;
|
732
663
|
}
|
733
|
-
operators.push(tslib.__assign(tslib.__assign({},
|
664
|
+
operators.push(tslib.__assign(tslib.__assign({}, op), {
|
734
665
|
remove: function (schema) {
|
735
|
-
deepRemove(schema.
|
736
|
-
return item.behavior ===
|
737
|
-
});
|
738
|
-
deepRemove(schema.footerToolbar, function (item) {
|
739
|
-
return item.behavior === tool.value;
|
666
|
+
deepRemove(schema.columns, function (item) {
|
667
|
+
return item.behavior === op.value;
|
740
668
|
});
|
741
669
|
},
|
742
670
|
add: function (data) {
|
743
|
-
_this.
|
671
|
+
_this.addDataOperatorSchema(data, op.resolveSchema(data, builder));
|
744
672
|
},
|
745
673
|
isActive: function (data) {
|
746
|
-
return _this.isFeatActive(data,
|
674
|
+
return _this.isFeatActive(data, op.value, 'columns');
|
747
675
|
}
|
748
676
|
}));
|
749
677
|
});
|
750
|
-
// 只有表格才能找到操作列放这个内容,卡片和列表不知道位置
|
751
|
-
if (context.schema.mode === 'table2') {
|
752
|
-
DataOperators.forEach(function (op) {
|
753
|
-
if (!builder.features.includes(op.value)) {
|
754
|
-
return;
|
755
|
-
}
|
756
|
-
operators.push(tslib.__assign(tslib.__assign({}, op), {
|
757
|
-
remove: function (schema) {
|
758
|
-
deepRemove(schema.columns, function (item) {
|
759
|
-
return item.behavior === op.value;
|
760
|
-
});
|
761
|
-
},
|
762
|
-
add: function (data) {
|
763
|
-
_this.addDataOperatorSchema(data, op.resolveSchema(data, builder));
|
764
|
-
},
|
765
|
-
isActive: function (data) {
|
766
|
-
return _this.isFeatActive(data, op.value, 'columns');
|
767
|
-
}
|
768
|
-
}));
|
769
|
-
});
|
770
|
-
}
|
771
|
-
return operators;
|
772
678
|
}
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
679
|
+
return operators;
|
680
|
+
};
|
681
|
+
CRUDPlugin.prototype.makeFeatSetting = function (feat, builder, inScaffold) {
|
682
|
+
if (feat.makeSetting) {
|
683
|
+
return feat.makeSetting(builder);
|
684
|
+
}
|
685
|
+
return builder.makeFieldsSettingForm({
|
686
|
+
feat: feat.value,
|
687
|
+
inCrud: true,
|
688
|
+
inScaffold: inScaffold
|
689
|
+
});
|
690
|
+
};
|
691
|
+
CRUDPlugin.prototype.isFeatActive = function (schema, feat) {
|
692
|
+
var scope = [];
|
693
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
694
|
+
scope[_i - 2] = arguments[_i];
|
695
|
+
}
|
696
|
+
if (scope.length === 0) {
|
697
|
+
return findObj(schema, function (item) {
|
698
|
+
return item.behavior === feat;
|
786
699
|
});
|
787
700
|
}
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
var scope = [];
|
795
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
796
|
-
scope[_i - 2] = arguments[_i];
|
797
|
-
}
|
798
|
-
if (scope.length === 0) {
|
799
|
-
return findObj(schema, function (item) {
|
800
|
-
return item.behavior === feat;
|
801
|
-
});
|
802
|
-
}
|
803
|
-
var region = null;
|
804
|
-
while (region = scope.shift()) {
|
805
|
-
if (findObj(schema[region], function (item) {
|
806
|
-
return item.behavior === feat;
|
807
|
-
})) {
|
808
|
-
return true;
|
809
|
-
}
|
701
|
+
var region = null;
|
702
|
+
while (region = scope.shift()) {
|
703
|
+
if (findObj(schema[region], function (item) {
|
704
|
+
return item.behavior === feat;
|
705
|
+
})) {
|
706
|
+
return true;
|
810
707
|
}
|
811
|
-
return false;
|
812
708
|
}
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
var scope = [];
|
820
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
821
|
-
scope[_i - 2] = arguments[_i];
|
822
|
-
}
|
823
|
-
if (scope.length === 0) {
|
824
|
-
return deepRemove(schema, function (item) {
|
825
|
-
return item.behavior === feat;
|
826
|
-
});
|
827
|
-
}
|
828
|
-
var region = null;
|
829
|
-
while (region = scope.shift()) {
|
830
|
-
deepRemove(schema[region], function (item) {
|
831
|
-
return item.behavior === feat;
|
832
|
-
});
|
833
|
-
}
|
834
|
-
return false;
|
709
|
+
return false;
|
710
|
+
};
|
711
|
+
CRUDPlugin.prototype.removeFeatSchema = function (schema, feat) {
|
712
|
+
var scope = [];
|
713
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
714
|
+
scope[_i - 2] = arguments[_i];
|
835
715
|
}
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
configurable: true,
|
840
|
-
writable: true,
|
841
|
-
value: function (builder, context) {
|
842
|
-
var _a, _b, _c;
|
843
|
-
var existColsName = [];
|
844
|
-
var columns = [];
|
845
|
-
// 实时获取,否则点击预览再回到编辑的时context中的node失效
|
846
|
-
var node = this.manager.store.getNodeById(context.id);
|
847
|
-
if (!node) {
|
848
|
-
return columns;
|
849
|
-
}
|
850
|
-
var existCols = ((_b = (_a = node.children.find(function (child) {
|
851
|
-
return child.type === 'table2';
|
852
|
-
})) === null || _a === void 0 ? void 0 : _a.children[0]) === null || _b === void 0 ? void 0 : _b.children) || [];
|
853
|
-
var hasOperatorCol = (_c = node.schema.columns) === null || _c === void 0 ? void 0 : _c.some(function (col) {
|
854
|
-
return col.type === 'operation';
|
716
|
+
if (scope.length === 0) {
|
717
|
+
return deepRemove(schema, function (item) {
|
718
|
+
return item.behavior === feat;
|
855
719
|
});
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
}
|
862
|
-
col.schema && columns.push({
|
863
|
-
label: col.schema.title,
|
864
|
-
value: col.id
|
865
|
-
});
|
866
|
-
((_a = col.schema) === null || _a === void 0 ? void 0 : _a.key) && existColsName.push(col.schema.key);
|
867
|
-
return false;
|
720
|
+
}
|
721
|
+
var region = null;
|
722
|
+
while (region = scope.shift()) {
|
723
|
+
deepRemove(schema[region], function (item) {
|
724
|
+
return item.behavior === feat;
|
868
725
|
});
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
726
|
+
}
|
727
|
+
return false;
|
728
|
+
};
|
729
|
+
CRUDPlugin.prototype.filterColumns = function (builder, context) {
|
730
|
+
var _a, _b, _c;
|
731
|
+
var existColsName = [];
|
732
|
+
var columns = [];
|
733
|
+
// 实时获取,否则点击预览再回到编辑的时context中的node失效
|
734
|
+
var node = this.manager.store.getNodeById(context.id);
|
735
|
+
if (!node) {
|
736
|
+
return columns;
|
737
|
+
}
|
738
|
+
var existCols = ((_b = (_a = node.children.find(function (child) {
|
739
|
+
return child.type === 'table2';
|
740
|
+
})) === null || _a === void 0 ? void 0 : _a.children[0]) === null || _b === void 0 ? void 0 : _b.children) || [];
|
741
|
+
var hasOperatorCol = (_c = node.schema.columns) === null || _c === void 0 ? void 0 : _c.some(function (col) {
|
742
|
+
return col.type === 'operation';
|
743
|
+
});
|
744
|
+
existCols.some(function (col, index) {
|
745
|
+
var _a;
|
746
|
+
// 严格来说是单元格的集合,因此要屏蔽掉
|
747
|
+
if (index !== 0 && col.id === existCols[0].id) {
|
748
|
+
return true;
|
888
749
|
}
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
|
750
|
+
col.schema && columns.push({
|
751
|
+
label: col.schema.title,
|
752
|
+
value: col.id
|
753
|
+
});
|
754
|
+
((_a = col.schema) === null || _a === void 0 ? void 0 : _a.key) && existColsName.push(col.schema.key);
|
755
|
+
return false;
|
756
|
+
});
|
757
|
+
if (node.schema.__fields) {
|
758
|
+
var appendCols = builder.makeTableColumnsByFields(node.schema.__fields);
|
759
|
+
if (appendCols === null || appendCols === void 0 ? void 0 : appendCols.length) {
|
760
|
+
appendCols.forEach(function (col) {
|
761
|
+
if (existColsName.includes(col.name)) {
|
762
|
+
return;
|
902
763
|
}
|
764
|
+
columns.push({
|
765
|
+
label: col.title,
|
766
|
+
value: null,
|
767
|
+
add: function (data) {
|
768
|
+
data.columns.push(col);
|
769
|
+
},
|
770
|
+
isActive: function () {
|
771
|
+
return false;
|
772
|
+
}
|
773
|
+
});
|
903
774
|
});
|
904
775
|
}
|
905
|
-
// context.node.
|
906
|
-
// // 只有表格才能找到操作列放这个内容,卡片和列表不知道位置
|
907
|
-
// if (context.schema.mode === 'table2') {
|
908
|
-
// DataOperators.forEach(op => {
|
909
|
-
// if (!builder.features.includes(op.value)) {
|
910
|
-
// return;
|
911
|
-
// }
|
912
|
-
// operators.push({
|
913
|
-
// ...op,
|
914
|
-
// remove: (schema: any) => {
|
915
|
-
// deepRemove(schema.columns, item => item.behavior === op.value);
|
916
|
-
// },
|
917
|
-
// add: (data: any) => {
|
918
|
-
// this.addDataOperatorSchema(data, op.resolveSchema(data, builder));
|
919
|
-
// },
|
920
|
-
// isActive:(data: any) => {
|
921
|
-
// return this.isFeatActive(data, op.value, 'columns');
|
922
|
-
// }
|
923
|
-
// });
|
924
|
-
// });
|
925
|
-
// }
|
926
|
-
return columns;
|
927
776
|
}
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
tab.body[0].body.forEach(function (collapse) {
|
941
|
-
var _a;
|
942
|
-
if (collapse.title === i18nRuntime.i18n("4092ed98e9035652d4c9ca9441701ed7")) {
|
943
|
-
(_a = collapse.body).unshift.apply(_a, tslib.__spreadArray(tslib.__spreadArray([], builder.makeSourceSettingForm({
|
944
|
-
name: 'api',
|
945
|
-
label: i18nRuntime.i18n("c11322c9cc43ce3c004cf03f5ac0acd0"),
|
946
|
-
feat: 'List',
|
947
|
-
inCrud: true
|
948
|
-
}), false), [amisEditorCore.getSchemaTpl('interval'), amisEditorCore.getSchemaTpl('switch', {
|
949
|
-
name: 'syncLocation',
|
950
|
-
label: amisEditorCore.tipedLabel(i18nRuntime.i18n("569343b4fe5e48131b78611c11eadbeb"), i18nRuntime.i18n("6dbee29a8c54eef9d042ef3280999ad9")),
|
951
|
-
pipeIn: amisEditorCore.defaultValue(true)
|
952
|
-
}), amisEditorCore.getSchemaTpl('switch', {
|
953
|
-
label: i18nRuntime.i18n("240145572215920ae06db1eeb85b29c0"),
|
954
|
-
name: 'selectable'
|
955
|
-
}), amisEditorCore.getSchemaTpl('switch', {
|
956
|
-
name: 'keepItemSelectionOnPageChange',
|
957
|
-
label: amisEditorCore.tipedLabel(i18nRuntime.i18n("099cf136d6a4b6ed4646af4a2ed066b2"), i18nRuntime.i18n("60011314ed92794f3d4f3e874c359279")),
|
958
|
-
visbileOn: 'this.selectable'
|
959
|
-
})], false));
|
960
|
-
}
|
961
|
-
if (collapse.title === i18nRuntime.i18n("949a8b7bd2c10070a2fae16f9c66afbb")) {
|
962
|
-
collapse.body.unshift(amisEditorCore.getSchemaTpl('switch', {
|
963
|
-
name: 'columnsTogglable',
|
964
|
-
label: amisEditorCore.tipedLabel(i18nRuntime.i18n("2816cea6c4887a53c417831deb5fbe00"), i18nRuntime.i18n("d3c5079f7e26b1a7374ff76341376de4")),
|
965
|
-
onChange: function (value, oldValue, model, form) {
|
966
|
-
var schema = cloneDeep__default["default"](form.data);
|
967
|
-
if (value === true) {
|
968
|
-
_this.addFeatToToolbar(schema, {
|
969
|
-
type: 'column-toggler'
|
970
|
-
}, 'header', 'right');
|
971
|
-
} else {
|
972
|
-
deepRemove(schema.headerToolbar, function (item) {
|
973
|
-
return item.type === 'column-toggler';
|
974
|
-
});
|
975
|
-
}
|
976
|
-
form.setValues(schema);
|
977
|
-
return undefined;
|
978
|
-
}
|
979
|
-
}));
|
980
|
-
collapse.body.unshift({
|
981
|
-
type: 'ae-feature-control',
|
982
|
-
label: false,
|
983
|
-
features: function () {
|
984
|
-
return _this.filterColumns(builder, context.context);
|
985
|
-
},
|
986
|
-
goFeatureComp: function (feat) {
|
987
|
-
return feat.value;
|
988
|
-
},
|
989
|
-
removeFeature: function (feat) {
|
990
|
-
_this.manager.del(feat.value);
|
991
|
-
},
|
992
|
-
manager: _this.manager,
|
993
|
-
addable: true,
|
994
|
-
removeable: true
|
995
|
-
});
|
996
|
-
}
|
777
|
+
if (!hasOperatorCol) {
|
778
|
+
columns.push({
|
779
|
+
label: i18nRuntime.i18n("39ccc34fa3ee9be12d8bae7e6fecbac2"),
|
780
|
+
value: null,
|
781
|
+
isActive: function () {
|
782
|
+
return false;
|
783
|
+
},
|
784
|
+
add: function (data) {
|
785
|
+
data.columns.push({
|
786
|
+
type: 'operation',
|
787
|
+
title: i18nRuntime.i18n("2b6bc0f293f5ca01b006206c2535ccbc"),
|
788
|
+
buttons: []
|
997
789
|
});
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1047
|
-
|
790
|
+
}
|
791
|
+
});
|
792
|
+
}
|
793
|
+
// context.node.
|
794
|
+
// // 只有表格才能找到操作列放这个内容,卡片和列表不知道位置
|
795
|
+
// if (context.schema.mode === 'table2') {
|
796
|
+
// DataOperators.forEach(op => {
|
797
|
+
// if (!builder.features.includes(op.value)) {
|
798
|
+
// return;
|
799
|
+
// }
|
800
|
+
// operators.push({
|
801
|
+
// ...op,
|
802
|
+
// remove: (schema: any) => {
|
803
|
+
// deepRemove(schema.columns, item => item.behavior === op.value);
|
804
|
+
// },
|
805
|
+
// add: (data: any) => {
|
806
|
+
// this.addDataOperatorSchema(data, op.resolveSchema(data, builder));
|
807
|
+
// },
|
808
|
+
// isActive:(data: any) => {
|
809
|
+
// return this.isFeatActive(data, op.value, 'columns');
|
810
|
+
// }
|
811
|
+
// });
|
812
|
+
// });
|
813
|
+
// }
|
814
|
+
return columns;
|
815
|
+
};
|
816
|
+
CRUDPlugin.prototype.addListPanelSetting = function (context) {
|
817
|
+
var _this = this;
|
818
|
+
var body = context.data;
|
819
|
+
var builder = this.dsBuilderMgr.resolveBuilderBySchema(context.context.schema, 'api');
|
820
|
+
body.tabs.forEach(function (tab) {
|
821
|
+
var _a, _b;
|
822
|
+
if (tab.title === i18nRuntime.i18n("24d67862f87f439db7ca957aecb77cce")) {
|
823
|
+
tab.body[0].body.forEach(function (collapse) {
|
824
|
+
var _a;
|
825
|
+
if (collapse.title === i18nRuntime.i18n("4092ed98e9035652d4c9ca9441701ed7")) {
|
826
|
+
(_a = collapse.body).unshift.apply(_a, tslib.__spreadArray(tslib.__spreadArray([], tslib.__read(builder.makeSourceSettingForm({
|
827
|
+
name: 'api',
|
828
|
+
label: i18nRuntime.i18n("c11322c9cc43ce3c004cf03f5ac0acd0"),
|
829
|
+
feat: 'List',
|
830
|
+
inCrud: true
|
831
|
+
})), false), [amisEditorCore.getSchemaTpl('interval'), amisEditorCore.getSchemaTpl('switch', {
|
832
|
+
name: 'syncLocation',
|
833
|
+
label: amisEditorCore.tipedLabel(i18nRuntime.i18n("569343b4fe5e48131b78611c11eadbeb"), i18nRuntime.i18n("6dbee29a8c54eef9d042ef3280999ad9")),
|
834
|
+
pipeIn: amisEditorCore.defaultValue(true)
|
835
|
+
}), amisEditorCore.getSchemaTpl('switch', {
|
836
|
+
label: i18nRuntime.i18n("240145572215920ae06db1eeb85b29c0"),
|
837
|
+
name: 'selectable'
|
838
|
+
}), amisEditorCore.getSchemaTpl('switch', {
|
839
|
+
name: 'keepItemSelectionOnPageChange',
|
840
|
+
label: amisEditorCore.tipedLabel(i18nRuntime.i18n("099cf136d6a4b6ed4646af4a2ed066b2"), i18nRuntime.i18n("60011314ed92794f3d4f3e874c359279")),
|
841
|
+
visbileOn: 'this.selectable'
|
842
|
+
})], false));
|
843
|
+
}
|
844
|
+
if (collapse.title === i18nRuntime.i18n("949a8b7bd2c10070a2fae16f9c66afbb")) {
|
845
|
+
collapse.body.unshift(amisEditorCore.getSchemaTpl('switch', {
|
846
|
+
name: 'columnsTogglable',
|
847
|
+
label: amisEditorCore.tipedLabel(i18nRuntime.i18n("2816cea6c4887a53c417831deb5fbe00"), i18nRuntime.i18n("d3c5079f7e26b1a7374ff76341376de4")),
|
848
|
+
onChange: function (value, oldValue, model, form) {
|
849
|
+
var schema = cloneDeep__default["default"](form.data);
|
850
|
+
if (value === true) {
|
851
|
+
_this.addFeatToToolbar(schema, {
|
852
|
+
type: 'column-toggler'
|
853
|
+
}, 'header', 'right');
|
854
|
+
} else {
|
855
|
+
deepRemove(schema.headerToolbar, function (item) {
|
856
|
+
return item.type === 'column-toggler';
|
857
|
+
});
|
1048
858
|
}
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
body: [{
|
859
|
+
form.setValues(schema);
|
860
|
+
return undefined;
|
861
|
+
}
|
862
|
+
}));
|
863
|
+
collapse.body.unshift({
|
1055
864
|
type: 'ae-feature-control',
|
1056
865
|
label: false,
|
1057
|
-
features:
|
866
|
+
features: function () {
|
867
|
+
return _this.filterColumns(builder, context.context);
|
868
|
+
},
|
1058
869
|
goFeatureComp: function (feat) {
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
}
|
1064
|
-
return (_a = amis.findTree(node.children, function (item) {
|
1065
|
-
return item.schema.behavior === feat.value;
|
1066
|
-
})) === null || _a === void 0 ? void 0 : _a.id;
|
870
|
+
return feat.value;
|
871
|
+
},
|
872
|
+
removeFeature: function (feat) {
|
873
|
+
_this.manager.del(feat.value);
|
1067
874
|
},
|
1068
875
|
manager: _this.manager,
|
1069
876
|
addable: true,
|
1070
|
-
addText: i18nRuntime.i18n("84a2f40385427bbf2edc79e3368e4e0f"),
|
1071
877
|
removeable: true
|
1072
|
-
}
|
1073
|
-
}
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1090
|
-
|
1091
|
-
|
878
|
+
});
|
879
|
+
}
|
880
|
+
});
|
881
|
+
var moreCollapse = amisEditorCore.getSchemaTpl('collapseGroup', [{
|
882
|
+
title: i18nRuntime.i18n("4a3ebd0ef27212de3b0c39e6a9701b1d"),
|
883
|
+
order: 2,
|
884
|
+
body: FilterTypes.map(function (item) {
|
885
|
+
// 当前数据源可能不开启这个功能
|
886
|
+
if (!builder.features.includes(item.value)) {
|
887
|
+
return null;
|
888
|
+
}
|
889
|
+
var fields = [];
|
890
|
+
// await builder.getContextFileds({
|
891
|
+
// schema: context.node.schema,
|
892
|
+
// feat: item.value,
|
893
|
+
// sourceKey: 'api'
|
894
|
+
// });
|
895
|
+
// 开关配置
|
896
|
+
// const moreConfig = builder.makeFieldsSettingForm({
|
897
|
+
// feat: item.value,
|
898
|
+
// inCrud: true,
|
899
|
+
// inScaffold: false
|
900
|
+
// });
|
901
|
+
var base = {
|
902
|
+
label: item.label,
|
903
|
+
name: "__".concat(item.value),
|
1092
904
|
pipeIn: function (value, form) {
|
1093
|
-
|
1094
|
-
return item
|
1095
|
-
}
|
1096
|
-
return (
|
905
|
+
if (item.value === 'FuzzyQuery') {
|
906
|
+
return _this.isFeatActive(form.data, item.value, 'headerToolbar', 'footerToolvar');
|
907
|
+
}
|
908
|
+
return _this.isFeatActive(form.data, item.value, 'filter');
|
1097
909
|
},
|
1098
910
|
onChange: function (value, oldValue, model, form) {
|
1099
911
|
var schema = cloneDeep__default["default"](form.data);
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
return item && ['Pagination', 'LoadMore'].includes(item.behavior);
|
1104
|
-
});
|
1105
|
-
} else {
|
1106
|
-
var remove_1;
|
1107
|
-
var content = void 0;
|
1108
|
-
if (value === 'Pagination') {
|
1109
|
-
remove_1 = 'LoadMore';
|
1110
|
-
content = {
|
1111
|
-
type: 'pagination',
|
1112
|
-
behavior: value,
|
1113
|
-
layout: ['total', 'perPage', 'pager', 'go']
|
1114
|
-
};
|
912
|
+
if (value === true) {
|
913
|
+
if (item.value === 'FuzzyQuery') {
|
914
|
+
_this.addFeatToToolbar(schema, item.resolveSchema(schema, builder), 'header', 'right');
|
1115
915
|
} else {
|
1116
|
-
|
1117
|
-
content = {
|
1118
|
-
type: 'button',
|
1119
|
-
behavior: value,
|
1120
|
-
label: i18nRuntime.i18n("77281549955309c49f5eef77838a85e5"),
|
1121
|
-
onEvent: {
|
1122
|
-
click: {
|
1123
|
-
actions: [{
|
1124
|
-
actionType: 'loadMore',
|
1125
|
-
componentId: schema.id
|
1126
|
-
}]
|
1127
|
-
}
|
1128
|
-
}
|
1129
|
-
};
|
916
|
+
schema.filter.push(item.resolveSchema(schema, builder));
|
1130
917
|
}
|
1131
|
-
|
1132
|
-
|
1133
|
-
});
|
1134
|
-
_this.addFeatToToolbar(schema, content, 'footer', 'right');
|
918
|
+
} else if (value === false) {
|
919
|
+
_this.removeFeatSchema(schema, item.value);
|
1135
920
|
}
|
1136
921
|
form.setValues(schema);
|
1137
922
|
return undefined;
|
1138
923
|
}
|
1139
|
-
}
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1153
|
-
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
1161
|
-
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
924
|
+
};
|
925
|
+
return fields && fields.length ? tslib.__assign(tslib.__assign({}, base), {
|
926
|
+
type: 'ae-switch-more',
|
927
|
+
formType: 'extend',
|
928
|
+
mode: 'normal',
|
929
|
+
form: {
|
930
|
+
body: fields
|
931
|
+
}
|
932
|
+
}) : amisEditorCore.getSchemaTpl('switch', base);
|
933
|
+
})
|
934
|
+
}, {
|
935
|
+
title: i18nRuntime.i18n("a9a3a4608d48214efbdfac99888f6e0f"),
|
936
|
+
order: 3,
|
937
|
+
body: [{
|
938
|
+
type: 'ae-feature-control',
|
939
|
+
label: false,
|
940
|
+
features: _this.filterOperators(builder, context.context),
|
941
|
+
goFeatureComp: function (feat) {
|
942
|
+
var _a;
|
943
|
+
var node = context.context.node;
|
944
|
+
if (node.isSecondFactor) {
|
945
|
+
node = node.parent;
|
946
|
+
}
|
947
|
+
return (_a = amis.findTree(node.children, function (item) {
|
948
|
+
return item.schema.behavior === feat.value;
|
949
|
+
})) === null || _a === void 0 ? void 0 : _a.id;
|
950
|
+
},
|
951
|
+
manager: _this.manager,
|
952
|
+
addable: true,
|
953
|
+
addText: i18nRuntime.i18n("84a2f40385427bbf2edc79e3368e4e0f"),
|
954
|
+
removeable: true
|
955
|
+
}]
|
956
|
+
}, {
|
957
|
+
title: i18nRuntime.i18n("cb43abed5ba14bf32fbb1058e12d2303"),
|
958
|
+
order: 4,
|
959
|
+
body: [{
|
960
|
+
type: 'select',
|
961
|
+
label: i18nRuntime.i18n("48b42e5c3ea447092eaf0a1a13195540"),
|
962
|
+
name: '__pgType',
|
963
|
+
options: [{
|
964
|
+
label: i18nRuntime.i18n("d81bb206a889656035b929cd8bb1ef10"),
|
965
|
+
value: 'none'
|
966
|
+
}, {
|
967
|
+
label: i18nRuntime.i18n("3862626c138ce5945e0e273a1bdfbad0"),
|
968
|
+
value: 'Pagination'
|
969
|
+
}, {
|
970
|
+
label: i18nRuntime.i18n("77281549955309c49f5eef77838a85e5"),
|
971
|
+
value: 'LoadMore'
|
972
|
+
}].filter(function (i) {
|
1171
973
|
return i;
|
1172
|
-
})
|
1173
|
-
|
1174
|
-
|
974
|
+
}),
|
975
|
+
pipeIn: function (value, form) {
|
976
|
+
var pg = findObj([].concat(form.data.headerToolbar).concat(form.data.footerToolbar), function (item) {
|
977
|
+
return item && ['Pagination', 'LoadMore'].includes(item.behavior);
|
1175
978
|
});
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1191
|
-
|
979
|
+
return (pg === null || pg === void 0 ? void 0 : pg.behavior) || 'none';
|
980
|
+
},
|
981
|
+
onChange: function (value, oldValue, model, form) {
|
982
|
+
var schema = cloneDeep__default["default"](form.data);
|
983
|
+
var region = [].concat(schema.headerToolbar).concat(schema.footerToolbar);
|
984
|
+
if (value === 'none') {
|
985
|
+
deepRemove(region, function (item) {
|
986
|
+
return item && ['Pagination', 'LoadMore'].includes(item.behavior);
|
987
|
+
});
|
988
|
+
} else {
|
989
|
+
var remove_1;
|
990
|
+
var content = void 0;
|
991
|
+
if (value === 'Pagination') {
|
992
|
+
remove_1 = 'LoadMore';
|
993
|
+
content = {
|
994
|
+
type: 'pagination',
|
995
|
+
behavior: value,
|
996
|
+
layout: ['total', 'perPage', 'pager', 'go']
|
997
|
+
};
|
998
|
+
} else {
|
999
|
+
remove_1 = 'Pagination';
|
1000
|
+
content = {
|
1001
|
+
type: 'button',
|
1002
|
+
behavior: value,
|
1003
|
+
label: i18nRuntime.i18n("77281549955309c49f5eef77838a85e5"),
|
1004
|
+
onEvent: {
|
1005
|
+
click: {
|
1006
|
+
actions: [{
|
1007
|
+
actionType: 'loadMore',
|
1008
|
+
componentId: schema.id
|
1009
|
+
}]
|
1010
|
+
}
|
1011
|
+
}
|
1012
|
+
};
|
1013
|
+
}
|
1014
|
+
deepRemove(region, function (item) {
|
1015
|
+
return item && item.behavior === remove_1;
|
1016
|
+
});
|
1017
|
+
_this.addFeatToToolbar(schema, content, 'footer', 'right');
|
1018
|
+
}
|
1019
|
+
form.setValues(schema);
|
1020
|
+
return undefined;
|
1021
|
+
}
|
1022
|
+
}, amisEditorCore.getSchemaTpl('switch', {
|
1023
|
+
label: amisEditorCore.tipedLabel(i18nRuntime.i18n("16b8ff2b147382be4cf8654f829df904"), i18nRuntime.i18n("d2e20bb1e977f9571a9e2d1b39a7ff10")),
|
1024
|
+
name: ''
|
1025
|
+
})]
|
1026
|
+
}]);
|
1027
|
+
(_a = tab.body[0].body).splice.apply(_a, tslib.__spreadArray([1, 0], tslib.__read(moreCollapse.body), false));
|
1028
|
+
// 让折叠器默认都展开
|
1029
|
+
(_b = tab.body[0].activeKey).push.apply(_b, tslib.__spreadArray([], tslib.__read(moreCollapse.activeKey), false));
|
1030
|
+
}
|
1031
|
+
});
|
1032
|
+
};
|
1033
|
+
CRUDPlugin.prototype.getScaffoldFeatureTab = function () {
|
1034
|
+
var _this = this;
|
1035
|
+
var generator = function (feat, featGroup) {
|
1036
|
+
return _this.dsBuilderMgr.collectFromBuilders(function (builder, builderName) {
|
1037
|
+
if (!builder.features.includes(feat.value)) {
|
1038
|
+
return null;
|
1039
|
+
}
|
1040
|
+
var content = _this.makeFeatSetting(feat, builder, true);
|
1041
|
+
if (!content || content.length === 0) {
|
1042
|
+
return null;
|
1043
|
+
}
|
1044
|
+
var isFeatOpened = featGroup ? "data['".concat(featGroup, "'] && ~data['").concat(featGroup, "'].indexOf('").concat(feat.value, "')") : true;
|
1045
|
+
return {
|
1046
|
+
title: feat.label,
|
1047
|
+
visibleOn: "(!data.dsType || data.dsType === '".concat(builderName, "') && ").concat(isFeatOpened),
|
1048
|
+
body: content.filter(function (i) {
|
1049
|
+
return i;
|
1050
|
+
}).map(function (formItem) {
|
1051
|
+
return tslib.__assign(tslib.__assign({}, formItem), {
|
1052
|
+
mode: 'normal'
|
1053
|
+
});
|
1054
|
+
})
|
1055
|
+
};
|
1192
1056
|
});
|
1193
|
-
}
|
1194
|
-
|
1057
|
+
};
|
1058
|
+
return _.flattenDeep([generator({
|
1059
|
+
label: i18nRuntime.i18n("46a0f3086dce242abe54e48bd86e0394"),
|
1060
|
+
value: 'List',
|
1061
|
+
resolveSchema: function () {}
|
1062
|
+
}), Tools.map(function (item) {
|
1063
|
+
return generator(item, 'tools');
|
1064
|
+
}), FilterTypes.map(function (item) {
|
1065
|
+
return generator(item, 'filters');
|
1066
|
+
}), DataOperators.map(function (item) {
|
1067
|
+
return generator(item, 'operators');
|
1068
|
+
})]).filter(function (i) {
|
1069
|
+
return i;
|
1070
|
+
});
|
1071
|
+
};
|
1195
1072
|
/** 将数据资源和数据操作进行填充 */
|
1196
|
-
|
1197
|
-
enumerable: false,
|
1198
|
-
configurable: true,
|
1199
|
-
writable: true,
|
1200
|
-
value: function (setting, schema, builder) {}
|
1201
|
-
});
|
1073
|
+
CRUDPlugin.prototype.resolveListField = function (setting, schema, builder) {};
|
1202
1074
|
Object.defineProperty(CRUDPlugin.prototype, "scaffoldForm", {
|
1203
1075
|
get: function () {
|
1204
1076
|
var _this = this;
|
@@ -1227,7 +1099,7 @@ var CRUDPlugin = /** @class */function (_super) {
|
|
1227
1099
|
}
|
1228
1100
|
return value;
|
1229
1101
|
}
|
1230
|
-
})], this.dsBuilderMgr.collectFromBuilders(function (builder, builderFlag) {
|
1102
|
+
})], tslib.__read(this.dsBuilderMgr.collectFromBuilders(function (builder, builderFlag) {
|
1231
1103
|
return {
|
1232
1104
|
type: 'container',
|
1233
1105
|
visibleOn: "dsType == null || dsType === '".concat(builderFlag, "'"),
|
@@ -1237,10 +1109,10 @@ var CRUDPlugin = /** @class */function (_super) {
|
|
1237
1109
|
inCrud: true
|
1238
1110
|
})])
|
1239
1111
|
};
|
1240
|
-
}),
|
1112
|
+
})), false)
|
1241
1113
|
}, {
|
1242
1114
|
title: i18nRuntime.i18n("c2f1f9254c245976e346377515c2e578"),
|
1243
|
-
body: tslib.__spreadArray(tslib.__spreadArray([], this.dsBuilderMgr.collectFromBuilders(function (builder, builderName) {
|
1115
|
+
body: tslib.__spreadArray(tslib.__spreadArray([], tslib.__read(this.dsBuilderMgr.collectFromBuilders(function (builder, builderName) {
|
1244
1116
|
var check = function (item) {
|
1245
1117
|
return amisEditorCore.DSFeature[item.value] == null || builder.features.includes(item.value);
|
1246
1118
|
};
|
@@ -1277,7 +1149,7 @@ var CRUDPlugin = /** @class */function (_super) {
|
|
1277
1149
|
type: 'container'
|
1278
1150
|
}]
|
1279
1151
|
};
|
1280
|
-
}),
|
1152
|
+
})), false), [{
|
1281
1153
|
type: 'tabs',
|
1282
1154
|
tabsMode: 'vertical',
|
1283
1155
|
className: 'ae-Scaffold-Modal-Tabs',
|
@@ -1348,111 +1220,96 @@ var CRUDPlugin = /** @class */function (_super) {
|
|
1348
1220
|
enumerable: false,
|
1349
1221
|
configurable: true
|
1350
1222
|
});
|
1351
|
-
|
1352
|
-
|
1353
|
-
|
1354
|
-
|
1355
|
-
|
1356
|
-
var renderer = context.renderer,
|
1357
|
-
schema = context.schema;
|
1358
|
-
if (this.scaffold && renderer.name === 'crud2' && schema.mode === this.scaffold.mode) {
|
1359
|
-
return _super.prototype.getRendererInfo.call(this, context);
|
1360
|
-
}
|
1223
|
+
CRUDPlugin.prototype.getRendererInfo = function (context) {
|
1224
|
+
var renderer = context.renderer,
|
1225
|
+
schema = context.schema;
|
1226
|
+
if (this.scaffold && renderer.name === 'crud2' && schema.mode === this.scaffold.mode) {
|
1227
|
+
return _super.prototype.getRendererInfo.call(this, context);
|
1361
1228
|
}
|
1362
|
-
}
|
1363
|
-
|
1364
|
-
|
1365
|
-
|
1366
|
-
|
1367
|
-
|
1368
|
-
|
1369
|
-
|
1370
|
-
|
1371
|
-
|
1372
|
-
|
1373
|
-
|
1374
|
-
|
1375
|
-
|
1376
|
-
|
1377
|
-
|
1378
|
-
|
1379
|
-
|
1380
|
-
|
1381
|
-
|
1382
|
-
|
1383
|
-
|
1384
|
-
case 1:
|
1385
|
-
fields = _d.sent();
|
1386
|
-
if (fields) {
|
1387
|
-
items = {
|
1388
|
-
type: 'object',
|
1389
|
-
properties: _.fromPairs(fields.map(function (field) {
|
1390
|
-
return [field.value, {
|
1391
|
-
type: field.valueType || 'string',
|
1392
|
-
title: field.label
|
1393
|
-
}];
|
1394
|
-
}))
|
1395
|
-
};
|
1396
|
-
}
|
1397
|
-
_d.label = 2;
|
1398
|
-
case 2:
|
1399
|
-
if (!(items == null)) return [3 /*break*/, 4];
|
1400
|
-
return [4 /*yield*/, (_b = child === null || child === void 0 ? void 0 : (_a = child.info.plugin).buildDataSchemas) === null || _b === void 0 ? void 0 : _b.call(_a, child, region)];
|
1401
|
-
case 3:
|
1402
|
-
childDataSchema = _d.sent();
|
1403
|
-
items = (_c = childDataSchema === null || childDataSchema === void 0 ? void 0 : childDataSchema.properties) === null || _c === void 0 ? void 0 : _c.items;
|
1404
|
-
_d.label = 4;
|
1405
|
-
case 4:
|
1406
|
-
schema = {
|
1407
|
-
$id: 'crud2',
|
1229
|
+
};
|
1230
|
+
CRUDPlugin.prototype.buildDataSchemas = function (node, region) {
|
1231
|
+
var _a, _b, _c;
|
1232
|
+
return tslib.__awaiter(this, void 0, void 0, function () {
|
1233
|
+
var child, items, builder, fields, childDataSchema, schema;
|
1234
|
+
return tslib.__generator(this, function (_d) {
|
1235
|
+
switch (_d.label) {
|
1236
|
+
case 0:
|
1237
|
+
child = node.children.find(function (item) {
|
1238
|
+
return !!~['table2', 'cards', 'list'].indexOf(item.type);
|
1239
|
+
});
|
1240
|
+
builder = this.dsBuilderMgr.resolveBuilderBySchema(node.schema, 'api');
|
1241
|
+
if (!(builder && node.schema.api)) return [3 /*break*/, 2];
|
1242
|
+
return [4 /*yield*/, builder.getContextFileds({
|
1243
|
+
schema: node.schema,
|
1244
|
+
sourceKey: 'api',
|
1245
|
+
feat: 'List'
|
1246
|
+
})];
|
1247
|
+
case 1:
|
1248
|
+
fields = _d.sent();
|
1249
|
+
if (fields) {
|
1250
|
+
items = {
|
1408
1251
|
type: 'object',
|
1409
|
-
properties:
|
1410
|
-
|
1411
|
-
|
1412
|
-
|
1413
|
-
|
1414
|
-
|
1415
|
-
}),
|
1416
|
-
unSelectedItems: tslib.__assign(tslib.__assign({}, items), {
|
1417
|
-
title: i18nRuntime.i18n("9c9153c49491c381dc2adb2c36fccb04")
|
1418
|
-
}),
|
1419
|
-
page: {
|
1420
|
-
type: 'number',
|
1421
|
-
title: i18nRuntime.i18n("9a4fe969f1066e197fd2369a44d879ac")
|
1422
|
-
},
|
1423
|
-
total: {
|
1424
|
-
type: 'number',
|
1425
|
-
title: i18nRuntime.i18n("a7f33a2d99056edcdaced5c8841a9bcb")
|
1426
|
-
}
|
1427
|
-
})
|
1252
|
+
properties: _.fromPairs(fields.map(function (field) {
|
1253
|
+
return [field.value, {
|
1254
|
+
type: field.valueType || 'string',
|
1255
|
+
title: field.label
|
1256
|
+
}];
|
1257
|
+
}))
|
1428
1258
|
};
|
1429
|
-
|
1430
|
-
|
1431
|
-
|
1259
|
+
}
|
1260
|
+
_d.label = 2;
|
1261
|
+
case 2:
|
1262
|
+
if (!(items == null)) return [3 /*break*/, 4];
|
1263
|
+
return [4 /*yield*/, (_b = child === null || child === void 0 ? void 0 : (_a = child.info.plugin).buildDataSchemas) === null || _b === void 0 ? void 0 : _b.call(_a, child, region)];
|
1264
|
+
case 3:
|
1265
|
+
childDataSchema = _d.sent();
|
1266
|
+
items = (_c = childDataSchema === null || childDataSchema === void 0 ? void 0 : childDataSchema.properties) === null || _c === void 0 ? void 0 : _c.items;
|
1267
|
+
_d.label = 4;
|
1268
|
+
case 4:
|
1269
|
+
schema = {
|
1270
|
+
$id: 'crud2',
|
1271
|
+
type: 'object',
|
1272
|
+
properties: tslib.__assign(tslib.__assign({}, items.properties), {
|
1273
|
+
items: tslib.__assign(tslib.__assign({}, items), {
|
1274
|
+
title: i18nRuntime.i18n("fe9e25f4e4b3aeefeb9b7a9c368ede7e")
|
1275
|
+
}),
|
1276
|
+
selectedItems: tslib.__assign(tslib.__assign({}, items), {
|
1277
|
+
title: i18nRuntime.i18n("2c77cfaef73ce2e81131861e9c6d670e")
|
1278
|
+
}),
|
1279
|
+
unSelectedItems: tslib.__assign(tslib.__assign({}, items), {
|
1280
|
+
title: i18nRuntime.i18n("9c9153c49491c381dc2adb2c36fccb04")
|
1281
|
+
}),
|
1282
|
+
page: {
|
1283
|
+
type: 'number',
|
1284
|
+
title: i18nRuntime.i18n("9a4fe969f1066e197fd2369a44d879ac")
|
1285
|
+
},
|
1286
|
+
total: {
|
1287
|
+
type: 'number',
|
1288
|
+
title: i18nRuntime.i18n("a7f33a2d99056edcdaced5c8841a9bcb")
|
1289
|
+
}
|
1290
|
+
})
|
1291
|
+
};
|
1292
|
+
return [2 /*return*/, schema];
|
1293
|
+
}
|
1432
1294
|
});
|
1433
|
-
}
|
1434
|
-
}
|
1435
|
-
|
1436
|
-
|
1437
|
-
|
1438
|
-
|
1439
|
-
|
1440
|
-
|
1441
|
-
|
1442
|
-
|
1443
|
-
|
1444
|
-
|
1445
|
-
|
1446
|
-
|
1447
|
-
|
1448
|
-
feat: 'List'
|
1449
|
-
}, node)];
|
1450
|
-
}
|
1451
|
-
return [2 /*return*/];
|
1452
|
-
});
|
1295
|
+
});
|
1296
|
+
};
|
1297
|
+
CRUDPlugin.prototype.getAvailableContextFields = function (scopeNode, node, region) {
|
1298
|
+
return tslib.__awaiter(this, void 0, void 0, function () {
|
1299
|
+
var builder;
|
1300
|
+
return tslib.__generator(this, function (_a) {
|
1301
|
+
builder = this.dsBuilderMgr.resolveBuilderBySchema(scopeNode.schema, 'api');
|
1302
|
+
if (builder && scopeNode.schema.api) {
|
1303
|
+
return [2 /*return*/, builder.getAvailableContextFileds({
|
1304
|
+
schema: scopeNode.schema,
|
1305
|
+
sourceKey: 'api',
|
1306
|
+
feat: 'List'
|
1307
|
+
}, node)];
|
1308
|
+
}
|
1309
|
+
return [2 /*return*/];
|
1453
1310
|
});
|
1454
|
-
}
|
1455
|
-
}
|
1311
|
+
});
|
1312
|
+
};
|
1456
1313
|
|
1457
1314
|
return CRUDPlugin;
|
1458
1315
|
}(amisEditorCore.BasePlugin);
|
@@ -1461,95 +1318,54 @@ var TableCRUDPlugin = /** @class */function (_super) {
|
|
1461
1318
|
function TableCRUDPlugin() {
|
1462
1319
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
1463
1320
|
// 组件名称
|
1464
|
-
|
1465
|
-
|
1466
|
-
|
1467
|
-
|
1468
|
-
|
1469
|
-
|
1470
|
-
|
1471
|
-
|
1472
|
-
|
1473
|
-
|
1474
|
-
|
1475
|
-
|
1476
|
-
|
1477
|
-
|
1478
|
-
configurable: true,
|
1479
|
-
writable: true,
|
1480
|
-
value: i18nRuntime.i18n("7a9f1ec32752de8b69ef21138970f64d")
|
1481
|
-
});
|
1482
|
-
Object.defineProperty(_this, "order", {
|
1483
|
-
enumerable: true,
|
1484
|
-
configurable: true,
|
1485
|
-
writable: true,
|
1486
|
-
value: -1000
|
1487
|
-
});
|
1488
|
-
Object.defineProperty(_this, "icon", {
|
1489
|
-
enumerable: true,
|
1490
|
-
configurable: true,
|
1491
|
-
writable: true,
|
1492
|
-
value: 'fa fa-table'
|
1493
|
-
});
|
1494
|
-
Object.defineProperty(_this, "scaffold", {
|
1495
|
-
enumerable: true,
|
1496
|
-
configurable: true,
|
1497
|
-
writable: true,
|
1498
|
-
value: {
|
1499
|
-
type: 'crud2',
|
1500
|
-
mode: 'table2',
|
1501
|
-
columns: [{
|
1502
|
-
name: 'id',
|
1503
|
-
title: 'ID',
|
1504
|
-
type: 'container',
|
1505
|
-
body: [{
|
1506
|
-
type: 'text'
|
1507
|
-
}]
|
1508
|
-
}, {
|
1509
|
-
name: 'engine',
|
1510
|
-
title: i18nRuntime.i18n("1a63ac23010e0573f7c0a8cd3314b8c6"),
|
1511
|
-
type: 'container',
|
1512
|
-
body: [{
|
1513
|
-
type: 'text'
|
1514
|
-
}]
|
1321
|
+
_this.name = i18nRuntime.i18n("b339aa87104709397ba68e7ebbc6e5ba");
|
1322
|
+
_this.isBaseComponent = true;
|
1323
|
+
_this.description = i18nRuntime.i18n("7a9f1ec32752de8b69ef21138970f64d");
|
1324
|
+
_this.order = -1000;
|
1325
|
+
_this.icon = 'fa fa-table';
|
1326
|
+
_this.scaffold = {
|
1327
|
+
type: 'crud2',
|
1328
|
+
mode: 'table2',
|
1329
|
+
columns: [{
|
1330
|
+
name: 'id',
|
1331
|
+
title: 'ID',
|
1332
|
+
type: 'container',
|
1333
|
+
body: [{
|
1334
|
+
type: 'text'
|
1515
1335
|
}]
|
1516
|
-
}
|
1517
|
-
|
1518
|
-
|
1519
|
-
|
1520
|
-
|
1521
|
-
|
1522
|
-
|
1523
|
-
|
1336
|
+
}, {
|
1337
|
+
name: 'engine',
|
1338
|
+
title: i18nRuntime.i18n("1a63ac23010e0573f7c0a8cd3314b8c6"),
|
1339
|
+
type: 'container',
|
1340
|
+
body: [{
|
1341
|
+
type: 'text'
|
1342
|
+
}]
|
1343
|
+
}]
|
1344
|
+
};
|
1524
1345
|
return _this;
|
1525
1346
|
}
|
1526
|
-
|
1527
|
-
|
1528
|
-
|
1529
|
-
|
1530
|
-
|
1531
|
-
|
1532
|
-
|
1533
|
-
|
1534
|
-
|
1535
|
-
|
1347
|
+
TableCRUDPlugin.prototype.resolveListField = function (setting, schema, builder) {
|
1348
|
+
var _a;
|
1349
|
+
builder.resolveTableSchema({
|
1350
|
+
schema: schema,
|
1351
|
+
setting: setting,
|
1352
|
+
inCrud: true
|
1353
|
+
});
|
1354
|
+
if ((_a = setting.operators) === null || _a === void 0 ? void 0 : _a.length) {
|
1355
|
+
var operators_1 = [];
|
1356
|
+
DataOperators.forEach(function (feat) {
|
1357
|
+
var _a;
|
1358
|
+
if ((_a = setting.operators) === null || _a === void 0 ? void 0 : _a.includes(feat.value)) {
|
1359
|
+
operators_1.push(feat.resolveSchema(setting, builder));
|
1360
|
+
}
|
1361
|
+
});
|
1362
|
+
schema.columns.push({
|
1363
|
+
type: 'operation',
|
1364
|
+
title: i18nRuntime.i18n("2b6bc0f293f5ca01b006206c2535ccbc"),
|
1365
|
+
buttons: operators_1
|
1536
1366
|
});
|
1537
|
-
if ((_a = setting.operators) === null || _a === void 0 ? void 0 : _a.length) {
|
1538
|
-
var operators_1 = [];
|
1539
|
-
DataOperators.forEach(function (feat) {
|
1540
|
-
var _a;
|
1541
|
-
if ((_a = setting.operators) === null || _a === void 0 ? void 0 : _a.includes(feat.value)) {
|
1542
|
-
operators_1.push(feat.resolveSchema(setting, builder));
|
1543
|
-
}
|
1544
|
-
});
|
1545
|
-
schema.columns.push({
|
1546
|
-
type: 'operation',
|
1547
|
-
title: i18nRuntime.i18n("2b6bc0f293f5ca01b006206c2535ccbc"),
|
1548
|
-
buttons: operators_1
|
1549
|
-
});
|
1550
|
-
}
|
1551
1367
|
}
|
1552
|
-
}
|
1368
|
+
};
|
1553
1369
|
return TableCRUDPlugin;
|
1554
1370
|
}(CRUDPlugin);
|
1555
1371
|
var CardsCRUDPlugin = /** @class */function (_super) {
|
@@ -1557,159 +1373,114 @@ var CardsCRUDPlugin = /** @class */function (_super) {
|
|
1557
1373
|
function CardsCRUDPlugin() {
|
1558
1374
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
1559
1375
|
// 组件名称
|
1560
|
-
|
1561
|
-
|
1562
|
-
|
1563
|
-
|
1564
|
-
|
1565
|
-
|
1566
|
-
|
1567
|
-
|
1568
|
-
|
1569
|
-
|
1570
|
-
|
1571
|
-
|
1572
|
-
Object.defineProperty(_this, "description", {
|
1573
|
-
enumerable: true,
|
1574
|
-
configurable: true,
|
1575
|
-
writable: true,
|
1576
|
-
value: i18nRuntime.i18n("a0c35361a003527d123cb581f5c68f4b")
|
1577
|
-
});
|
1578
|
-
Object.defineProperty(_this, "order", {
|
1579
|
-
enumerable: true,
|
1580
|
-
configurable: true,
|
1581
|
-
writable: true,
|
1582
|
-
value: -1000
|
1583
|
-
});
|
1584
|
-
Object.defineProperty(_this, "icon", {
|
1585
|
-
enumerable: true,
|
1586
|
-
configurable: true,
|
1587
|
-
writable: true,
|
1588
|
-
value: 'fa fa-table'
|
1589
|
-
});
|
1590
|
-
Object.defineProperty(_this, "scaffold", {
|
1591
|
-
enumerable: true,
|
1592
|
-
configurable: true,
|
1593
|
-
writable: true,
|
1594
|
-
value: {
|
1595
|
-
type: 'crud2',
|
1596
|
-
mode: 'cards',
|
1597
|
-
card: {
|
1598
|
-
type: 'card2',
|
1376
|
+
_this.name = i18nRuntime.i18n("093c340f7e1fbde1928ca56b5c7f9cc4");
|
1377
|
+
_this.isBaseComponent = true;
|
1378
|
+
_this.description = i18nRuntime.i18n("a0c35361a003527d123cb581f5c68f4b");
|
1379
|
+
_this.order = -1000;
|
1380
|
+
_this.icon = 'fa fa-table';
|
1381
|
+
_this.scaffold = {
|
1382
|
+
type: 'crud2',
|
1383
|
+
mode: 'cards',
|
1384
|
+
card: {
|
1385
|
+
type: 'card2',
|
1386
|
+
body: [{
|
1387
|
+
type: 'container',
|
1599
1388
|
body: [{
|
1600
|
-
type: '
|
1389
|
+
type: 'tpl',
|
1390
|
+
tpl: i18nRuntime.i18n("32c65d8d7431e76029678ec7bb73a5ab"),
|
1391
|
+
inline: false,
|
1392
|
+
style: {
|
1393
|
+
marginTop: '0',
|
1394
|
+
marginBottom: '0',
|
1395
|
+
paddingTop: '',
|
1396
|
+
paddingBottom: ''
|
1397
|
+
},
|
1398
|
+
wrapperComponent: 'h2'
|
1399
|
+
}, {
|
1400
|
+
type: 'form',
|
1601
1401
|
body: [{
|
1602
|
-
type: 'tpl',
|
1603
|
-
|
1604
|
-
|
1605
|
-
|
1606
|
-
|
1607
|
-
|
1608
|
-
|
1609
|
-
|
1610
|
-
|
1611
|
-
|
1612
|
-
|
1613
|
-
|
1614
|
-
|
1615
|
-
|
1616
|
-
|
1617
|
-
|
1618
|
-
|
1619
|
-
|
1620
|
-
|
1621
|
-
|
1622
|
-
|
1623
|
-
|
1624
|
-
|
1625
|
-
|
1626
|
-
|
1627
|
-
|
1628
|
-
|
1629
|
-
|
1630
|
-
|
1631
|
-
|
1632
|
-
|
1633
|
-
|
1634
|
-
// }
|
1635
|
-
]
|
1636
|
-
// style: {
|
1637
|
-
// borderStyle: 'solid',
|
1638
|
-
// borderColor: '#ebebeb',
|
1639
|
-
// borderWidth: '1px',
|
1640
|
-
// 'borderRadius': '5px',
|
1641
|
-
// 'paddingTop': '10px',
|
1642
|
-
// 'paddingRight': '10px',
|
1643
|
-
// 'paddingBottom': '0',
|
1644
|
-
// 'paddingLeft': '10px'
|
1645
|
-
// }
|
1646
|
-
}]
|
1647
|
-
}
|
1402
|
+
type: 'static-tpl',
|
1403
|
+
label: i18nRuntime.i18n("9caecd931b956381e0763d05aa42835c"),
|
1404
|
+
tpl: i18nRuntime.i18n("2d711b09bd0db0ad240cc83b30dd8014")
|
1405
|
+
}]
|
1406
|
+
}, {
|
1407
|
+
type: 'divider'
|
1408
|
+
}, {
|
1409
|
+
type: 'button-group'
|
1410
|
+
}
|
1411
|
+
// {
|
1412
|
+
// type: 'tpl',
|
1413
|
+
// tpl: '副标题内容',
|
1414
|
+
// inline: false,
|
1415
|
+
// wrapperComponent: '',
|
1416
|
+
// style: {
|
1417
|
+
// color: '#9b9b9b',
|
1418
|
+
// marginTop: '0',
|
1419
|
+
// marginBottom: '0'
|
1420
|
+
// }
|
1421
|
+
// }
|
1422
|
+
]
|
1423
|
+
// style: {
|
1424
|
+
// borderStyle: 'solid',
|
1425
|
+
// borderColor: '#ebebeb',
|
1426
|
+
// borderWidth: '1px',
|
1427
|
+
// 'borderRadius': '5px',
|
1428
|
+
// 'paddingTop': '10px',
|
1429
|
+
// 'paddingRight': '10px',
|
1430
|
+
// 'paddingBottom': '0',
|
1431
|
+
// 'paddingLeft': '10px'
|
1432
|
+
// }
|
1433
|
+
}]
|
1648
1434
|
}
|
1649
|
-
}
|
1435
|
+
};
|
1650
1436
|
|
1651
1437
|
return _this;
|
1652
1438
|
}
|
1653
|
-
|
1654
|
-
|
1655
|
-
|
1656
|
-
|
1657
|
-
|
1658
|
-
|
1659
|
-
|
1660
|
-
|
1661
|
-
|
1662
|
-
|
1663
|
-
|
1664
|
-
|
1665
|
-
|
1439
|
+
CardsCRUDPlugin.prototype.resolveListField = function (setting, schema, builder) {
|
1440
|
+
var _a;
|
1441
|
+
var fields = setting.listFields;
|
1442
|
+
if (!fields || !fields.length) {
|
1443
|
+
return;
|
1444
|
+
}
|
1445
|
+
schema.card.body[0].body = builder.resolveViewSchema({
|
1446
|
+
setting: setting,
|
1447
|
+
feat: 'List'
|
1448
|
+
});
|
1449
|
+
if ((_a = setting.operators) === null || _a === void 0 ? void 0 : _a.length) {
|
1450
|
+
var operators_2 = [];
|
1451
|
+
DataOperators.forEach(function (feat) {
|
1452
|
+
var _a;
|
1453
|
+
if ((_a = setting.operators) === null || _a === void 0 ? void 0 : _a.includes(feat.value)) {
|
1454
|
+
operators_2.push(feat.resolveSchema(setting, builder));
|
1455
|
+
}
|
1456
|
+
});
|
1457
|
+
schema.card.body.push({
|
1458
|
+
type: 'button-group',
|
1459
|
+
buttons: operators_2
|
1666
1460
|
});
|
1667
|
-
if ((_a = setting.operators) === null || _a === void 0 ? void 0 : _a.length) {
|
1668
|
-
var operators_2 = [];
|
1669
|
-
DataOperators.forEach(function (feat) {
|
1670
|
-
var _a;
|
1671
|
-
if ((_a = setting.operators) === null || _a === void 0 ? void 0 : _a.includes(feat.value)) {
|
1672
|
-
operators_2.push(feat.resolveSchema(setting, builder));
|
1673
|
-
}
|
1674
|
-
});
|
1675
|
-
schema.card.body.push({
|
1676
|
-
type: 'button-group',
|
1677
|
-
buttons: operators_2
|
1678
|
-
});
|
1679
|
-
}
|
1680
1461
|
}
|
1681
|
-
}
|
1462
|
+
};
|
1682
1463
|
/**填充一个数据操作 */
|
1683
|
-
|
1684
|
-
|
1685
|
-
|
1686
|
-
|
1687
|
-
|
1688
|
-
|
1689
|
-
|
1464
|
+
CardsCRUDPlugin.prototype.fillOperatorSchema = function (schema, content) {
|
1465
|
+
var col = schema.columns.find(function (item) {
|
1466
|
+
return item.type === 'operators';
|
1467
|
+
});
|
1468
|
+
if (!col) {
|
1469
|
+
schema.columns.push({
|
1470
|
+
type: 'operation',
|
1471
|
+
title: i18nRuntime.i18n("2b6bc0f293f5ca01b006206c2535ccbc"),
|
1472
|
+
buttons: [content]
|
1690
1473
|
});
|
1691
|
-
|
1692
|
-
schema.columns.push({
|
1693
|
-
type: 'operation',
|
1694
|
-
title: i18nRuntime.i18n("2b6bc0f293f5ca01b006206c2535ccbc"),
|
1695
|
-
buttons: [content]
|
1696
|
-
});
|
1697
|
-
return;
|
1698
|
-
}
|
1699
|
-
col.buttons.push(content);
|
1474
|
+
return;
|
1700
1475
|
}
|
1701
|
-
|
1476
|
+
col.buttons.push(content);
|
1477
|
+
};
|
1702
1478
|
/** 判断内容区是否有填充数据操作 */
|
1703
|
-
|
1704
|
-
|
1705
|
-
|
1706
|
-
|
1707
|
-
|
1708
|
-
return findObj(schema.card.body, function (item) {
|
1709
|
-
return item.behavior === feat;
|
1710
|
-
});
|
1711
|
-
}
|
1712
|
-
});
|
1479
|
+
CardsCRUDPlugin.prototype.existOperator = function (feat, schema) {
|
1480
|
+
return findObj(schema.card.body, function (item) {
|
1481
|
+
return item.behavior === feat;
|
1482
|
+
});
|
1483
|
+
};
|
1713
1484
|
return CardsCRUDPlugin;
|
1714
1485
|
}(CRUDPlugin);
|
1715
1486
|
var ListCRUDPlugin = /** @class */function (_super) {
|
@@ -1717,114 +1488,74 @@ var ListCRUDPlugin = /** @class */function (_super) {
|
|
1717
1488
|
function ListCRUDPlugin() {
|
1718
1489
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
1719
1490
|
// 组件名称
|
1720
|
-
|
1721
|
-
|
1722
|
-
|
1723
|
-
|
1724
|
-
|
1725
|
-
|
1726
|
-
|
1727
|
-
|
1728
|
-
|
1729
|
-
|
1730
|
-
|
1731
|
-
});
|
1732
|
-
Object.defineProperty(_this, "description", {
|
1733
|
-
enumerable: true,
|
1734
|
-
configurable: true,
|
1735
|
-
writable: true,
|
1736
|
-
value: i18nRuntime.i18n("860827796ce2fa94e9ee39e53f011ec0")
|
1737
|
-
});
|
1738
|
-
Object.defineProperty(_this, "order", {
|
1739
|
-
enumerable: true,
|
1740
|
-
configurable: true,
|
1741
|
-
writable: true,
|
1742
|
-
value: -1000
|
1743
|
-
});
|
1744
|
-
Object.defineProperty(_this, "icon", {
|
1745
|
-
enumerable: true,
|
1746
|
-
configurable: true,
|
1747
|
-
writable: true,
|
1748
|
-
value: 'fa fa-align-justify'
|
1749
|
-
});
|
1750
|
-
Object.defineProperty(_this, "scaffold", {
|
1751
|
-
enumerable: true,
|
1752
|
-
configurable: true,
|
1753
|
-
writable: true,
|
1754
|
-
value: {
|
1755
|
-
type: 'crud2',
|
1756
|
-
mode: 'list',
|
1757
|
-
listItem: {
|
1491
|
+
_this.name = i18nRuntime.i18n("3712972d84adf48acbd6ad24b4d75ad0");
|
1492
|
+
_this.isBaseComponent = true;
|
1493
|
+
_this.description = i18nRuntime.i18n("860827796ce2fa94e9ee39e53f011ec0");
|
1494
|
+
_this.order = -1000;
|
1495
|
+
_this.icon = 'fa fa-align-justify';
|
1496
|
+
_this.scaffold = {
|
1497
|
+
type: 'crud2',
|
1498
|
+
mode: 'list',
|
1499
|
+
listItem: {
|
1500
|
+
body: [{
|
1501
|
+
type: 'container',
|
1758
1502
|
body: [{
|
1759
|
-
type: '
|
1760
|
-
|
1761
|
-
|
1762
|
-
|
1763
|
-
|
1764
|
-
|
1765
|
-
|
1766
|
-
|
1767
|
-
|
1768
|
-
|
1769
|
-
|
1770
|
-
|
1771
|
-
|
1772
|
-
|
1773
|
-
|
1774
|
-
|
1775
|
-
|
1776
|
-
|
1777
|
-
|
1778
|
-
|
1779
|
-
marginBottom: '0'
|
1780
|
-
}
|
1781
|
-
}]
|
1503
|
+
type: 'tpl',
|
1504
|
+
tpl: i18nRuntime.i18n("32c65d8d7431e76029678ec7bb73a5ab"),
|
1505
|
+
inline: false,
|
1506
|
+
style: {
|
1507
|
+
marginTop: '0',
|
1508
|
+
marginBottom: '0',
|
1509
|
+
paddingTop: '',
|
1510
|
+
paddingBottom: ''
|
1511
|
+
},
|
1512
|
+
wrapperComponent: 'h2'
|
1513
|
+
}, {
|
1514
|
+
type: 'tpl',
|
1515
|
+
tpl: i18nRuntime.i18n("629645f147f378869fe9d7ee2bbc2857"),
|
1516
|
+
inline: false,
|
1517
|
+
wrapperComponent: '',
|
1518
|
+
style: {
|
1519
|
+
color: '#9b9b9b',
|
1520
|
+
marginTop: '0',
|
1521
|
+
marginBottom: '0'
|
1522
|
+
}
|
1782
1523
|
}]
|
1783
|
-
}
|
1524
|
+
}]
|
1784
1525
|
}
|
1785
|
-
}
|
1526
|
+
};
|
1786
1527
|
return _this;
|
1787
1528
|
}
|
1788
|
-
|
1789
|
-
|
1790
|
-
|
1791
|
-
|
1792
|
-
|
1793
|
-
var _a;
|
1794
|
-
var fields = setting.listFields;
|
1795
|
-
if (!fields || !fields.length) {
|
1796
|
-
return;
|
1797
|
-
}
|
1798
|
-
schema.listItem.body = builder.resolveViewSchema({
|
1799
|
-
setting: setting,
|
1800
|
-
feat: 'List'
|
1801
|
-
});
|
1802
|
-
if ((_a = setting.operators) === null || _a === void 0 ? void 0 : _a.length) {
|
1803
|
-
var operators_3 = [];
|
1804
|
-
DataOperators.forEach(function (feat) {
|
1805
|
-
var _a;
|
1806
|
-
if ((_a = setting.operators) === null || _a === void 0 ? void 0 : _a.includes(feat.value)) {
|
1807
|
-
operators_3.push(feat.resolveSchema(setting, builder));
|
1808
|
-
}
|
1809
|
-
});
|
1810
|
-
schema.listItem.body.push({
|
1811
|
-
type: 'button-group',
|
1812
|
-
buttons: operators_3
|
1813
|
-
});
|
1814
|
-
}
|
1529
|
+
ListCRUDPlugin.prototype.resolveListField = function (setting, schema, builder) {
|
1530
|
+
var _a;
|
1531
|
+
var fields = setting.listFields;
|
1532
|
+
if (!fields || !fields.length) {
|
1533
|
+
return;
|
1815
1534
|
}
|
1816
|
-
|
1817
|
-
|
1818
|
-
|
1819
|
-
|
1820
|
-
|
1821
|
-
|
1822
|
-
|
1823
|
-
|
1824
|
-
|
1535
|
+
schema.listItem.body = builder.resolveViewSchema({
|
1536
|
+
setting: setting,
|
1537
|
+
feat: 'List'
|
1538
|
+
});
|
1539
|
+
if ((_a = setting.operators) === null || _a === void 0 ? void 0 : _a.length) {
|
1540
|
+
var operators_3 = [];
|
1541
|
+
DataOperators.forEach(function (feat) {
|
1542
|
+
var _a;
|
1543
|
+
if ((_a = setting.operators) === null || _a === void 0 ? void 0 : _a.includes(feat.value)) {
|
1544
|
+
operators_3.push(feat.resolveSchema(setting, builder));
|
1545
|
+
}
|
1546
|
+
});
|
1547
|
+
schema.listItem.body.push({
|
1548
|
+
type: 'button-group',
|
1549
|
+
buttons: operators_3
|
1825
1550
|
});
|
1826
1551
|
}
|
1827
|
-
}
|
1552
|
+
};
|
1553
|
+
/** 判断内容区是否有填充数据操作 */
|
1554
|
+
ListCRUDPlugin.prototype.existOperator = function (feat, schema) {
|
1555
|
+
return findObj(schema.listItem.body, function (item) {
|
1556
|
+
return item.behavior === feat;
|
1557
|
+
});
|
1558
|
+
};
|
1828
1559
|
return ListCRUDPlugin;
|
1829
1560
|
}(CRUDPlugin);
|
1830
1561
|
amisEditorCore.registerEditorPlugin(TableCRUDPlugin);
|