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