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/CRUD.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
|
|
@@ -16,1451 +16,1526 @@ import { i18n } from 'i18n-runtime';
|
|
16
16
|
var viewTypeToEditType = function (type) {
|
17
17
|
return type === 'tpl' ? 'input-text' : type === 'status' || type === 'mapping' ? 'select' : "input-".concat(type);
|
18
18
|
};
|
19
|
-
|
20
|
-
var CRUDPlugin =
|
21
|
-
/** @class */
|
22
|
-
function (_super) {
|
19
|
+
var CRUDPlugin = /** @class */function (_super) {
|
23
20
|
__extends(CRUDPlugin, _super);
|
24
|
-
|
25
21
|
function CRUDPlugin() {
|
26
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
_this
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
_this
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
22
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
23
|
+
// 关联渲染器名字
|
24
|
+
Object.defineProperty(_this, "rendererName", {
|
25
|
+
enumerable: true,
|
26
|
+
configurable: true,
|
27
|
+
writable: true,
|
28
|
+
value: 'crud'
|
29
|
+
});
|
30
|
+
Object.defineProperty(_this, "$schema", {
|
31
|
+
enumerable: true,
|
32
|
+
configurable: true,
|
33
|
+
writable: true,
|
34
|
+
value: '/schemas/CRUDSchema.json'
|
35
|
+
});
|
36
|
+
Object.defineProperty(_this, "order", {
|
37
|
+
enumerable: true,
|
38
|
+
configurable: true,
|
39
|
+
writable: true,
|
40
|
+
value: -1000
|
41
|
+
});
|
42
|
+
// 组件名称
|
43
|
+
Object.defineProperty(_this, "name", {
|
44
|
+
enumerable: true,
|
45
|
+
configurable: true,
|
46
|
+
writable: true,
|
47
|
+
value: i18n("d7213304d1a8a02a73a2f4010839e061")
|
48
|
+
});
|
49
|
+
Object.defineProperty(_this, "isBaseComponent", {
|
50
|
+
enumerable: true,
|
51
|
+
configurable: true,
|
52
|
+
writable: true,
|
53
|
+
value: true
|
54
|
+
});
|
55
|
+
Object.defineProperty(_this, "description", {
|
56
|
+
enumerable: true,
|
57
|
+
configurable: true,
|
58
|
+
writable: true,
|
59
|
+
value: i18n("7a9f1ec32752de8b69ef21138970f64d")
|
60
|
+
});
|
61
|
+
Object.defineProperty(_this, "docLink", {
|
62
|
+
enumerable: true,
|
63
|
+
configurable: true,
|
64
|
+
writable: true,
|
65
|
+
value: '/amis/zh-CN/components/crud'
|
66
|
+
});
|
67
|
+
Object.defineProperty(_this, "tags", {
|
68
|
+
enumerable: true,
|
69
|
+
configurable: true,
|
70
|
+
writable: true,
|
71
|
+
value: [i18n("997c7a5d34f6fc628893f509d0df32e0")]
|
72
|
+
});
|
73
|
+
Object.defineProperty(_this, "icon", {
|
74
|
+
enumerable: true,
|
75
|
+
configurable: true,
|
76
|
+
writable: true,
|
77
|
+
value: 'fa fa-table'
|
78
|
+
});
|
79
|
+
Object.defineProperty(_this, "pluginIcon", {
|
80
|
+
enumerable: true,
|
81
|
+
configurable: true,
|
82
|
+
writable: true,
|
83
|
+
value: 'table-plugin'
|
84
|
+
});
|
85
|
+
Object.defineProperty(_this, "scaffold", {
|
86
|
+
enumerable: true,
|
87
|
+
configurable: true,
|
88
|
+
writable: true,
|
89
|
+
value: {
|
90
|
+
type: 'crud',
|
91
|
+
syncLocation: false,
|
92
|
+
api: '',
|
93
|
+
columns: [{
|
94
|
+
name: 'id',
|
95
|
+
label: 'ID',
|
96
|
+
type: 'text'
|
97
|
+
}, {
|
98
|
+
name: 'engine',
|
99
|
+
label: i18n("48c68eb5a42e2b3e679c53b00f6e203f"),
|
100
|
+
type: 'text'
|
101
|
+
}],
|
102
|
+
bulkActions: [],
|
103
|
+
itemActions: []
|
104
|
+
}
|
105
|
+
});
|
106
|
+
Object.defineProperty(_this, "actions", {
|
107
|
+
enumerable: true,
|
108
|
+
configurable: true,
|
109
|
+
writable: true,
|
110
|
+
value: [{
|
111
|
+
actionType: 'reload',
|
112
|
+
actionLabel: i18n("64ca9bab920a2983bcf270320d850d00"),
|
113
|
+
description: i18n("9ef5597ac0b4da662bcd967da37eceb4")
|
114
|
+
}]
|
115
|
+
});
|
116
|
+
Object.defineProperty(_this, "btnSchemas", {
|
117
|
+
enumerable: true,
|
118
|
+
configurable: true,
|
119
|
+
writable: true,
|
120
|
+
value: {
|
121
|
+
create: {
|
122
|
+
label: i18n("66ab5e9f24c8f46012a25c89919fb191"),
|
123
|
+
type: 'button',
|
124
|
+
actionType: 'dialog',
|
125
|
+
level: 'primary',
|
126
|
+
dialog: {
|
127
|
+
title: i18n("66ab5e9f24c8f46012a25c89919fb191"),
|
128
|
+
body: {
|
129
|
+
type: 'form',
|
130
|
+
api: 'xxx/create',
|
131
|
+
body: []
|
132
|
+
}
|
73
133
|
}
|
74
|
-
}
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
134
|
+
},
|
135
|
+
update: {
|
136
|
+
label: i18n("95b351c86267f3aedf89520959bce689"),
|
137
|
+
type: 'button',
|
138
|
+
actionType: 'dialog',
|
139
|
+
level: 'link',
|
140
|
+
dialog: {
|
141
|
+
title: i18n("95b351c86267f3aedf89520959bce689"),
|
142
|
+
body: {
|
143
|
+
type: 'form',
|
144
|
+
api: 'xxx/update',
|
145
|
+
body: []
|
146
|
+
}
|
87
147
|
}
|
88
|
-
}
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
148
|
+
},
|
149
|
+
view: {
|
150
|
+
label: i18n("607e7a4f377fa66b0b28ce318aab841f"),
|
151
|
+
type: 'button',
|
152
|
+
actionType: 'dialog',
|
153
|
+
level: 'link',
|
154
|
+
dialog: {
|
155
|
+
title: i18n("5b48dbb8dc710cffe6313bb56a7f6d47"),
|
156
|
+
body: {
|
157
|
+
type: 'form',
|
158
|
+
api: 'xxx/update',
|
159
|
+
body: []
|
160
|
+
}
|
101
161
|
}
|
102
|
-
}
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
}
|
162
|
+
},
|
163
|
+
delete: {
|
164
|
+
type: 'button',
|
165
|
+
label: i18n("2f4aaddde33c9b93c36fd2503f3d122b"),
|
166
|
+
actionType: 'ajax',
|
167
|
+
level: 'link',
|
168
|
+
className: 'text-danger',
|
169
|
+
confirmText: i18n("6c546666aab964c39cd8bfdf4fbd46b8"),
|
170
|
+
api: 'delete:/xxx/delete'
|
171
|
+
},
|
172
|
+
bulkDelete: {
|
173
|
+
type: 'button',
|
174
|
+
level: 'danger',
|
175
|
+
label: i18n("7fb62b30119c3797a843a48368463314"),
|
176
|
+
actionType: 'ajax',
|
177
|
+
confirmText: i18n("6c546666aab964c39cd8bfdf4fbd46b8"),
|
178
|
+
api: '/xxx/batch-delete'
|
179
|
+
},
|
180
|
+
bulkUpdate: {
|
181
|
+
type: 'button',
|
182
|
+
label: i18n("e73cefac9d030927da1618c7b15c98c9"),
|
183
|
+
actionType: 'dialog',
|
184
|
+
dialog: {
|
185
|
+
title: i18n("e73cefac9d030927da1618c7b15c98c9"),
|
186
|
+
size: 'md',
|
187
|
+
body: {
|
188
|
+
type: 'form',
|
189
|
+
api: '/xxx/bacth-edit',
|
190
|
+
body: [{
|
191
|
+
label: i18n("19c6b7463e1bf73bb4b12ba07abd5444"),
|
192
|
+
text: i18n("19c6b7463e1bf73bb4b12ba07abd5444"),
|
193
|
+
type: 'input-text'
|
194
|
+
}]
|
195
|
+
}
|
136
196
|
}
|
197
|
+
},
|
198
|
+
// itemDelete: {
|
199
|
+
// type: 'button',
|
200
|
+
// level: 'danger',
|
201
|
+
// label: '删除',
|
202
|
+
// api: '/xxx/delete-one',
|
203
|
+
// actionType: 'ajax',
|
204
|
+
// confirmText: '确定要删除?'
|
205
|
+
// },
|
206
|
+
filter: {
|
207
|
+
title: i18n("cf12e55021998a8328201800ec356773"),
|
208
|
+
body: [{
|
209
|
+
type: 'input-text',
|
210
|
+
name: 'keywords',
|
211
|
+
label: i18n("cfb5f18c43753ad5329348d626bd3739")
|
212
|
+
}]
|
137
213
|
}
|
138
|
-
},
|
139
|
-
// itemDelete: {
|
140
|
-
// type: 'button',
|
141
|
-
// level: 'danger',
|
142
|
-
// label: '删除',
|
143
|
-
// api: '/xxx/delete-one',
|
144
|
-
// actionType: 'ajax',
|
145
|
-
// confirmText: '确定要删除?'
|
146
|
-
// },
|
147
|
-
filter: {
|
148
|
-
title: i18n("cf12e55021998a8328201800ec356773"),
|
149
|
-
body: [{
|
150
|
-
type: 'input-text',
|
151
|
-
name: 'keywords',
|
152
|
-
label: i18n("cfb5f18c43753ad5329348d626bd3739")
|
153
|
-
}]
|
154
214
|
}
|
155
|
-
};
|
156
|
-
_this
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
type: 'text',
|
211
|
-
name: key
|
215
|
+
});
|
216
|
+
Object.defineProperty(_this, "scaffoldForm", {
|
217
|
+
enumerable: true,
|
218
|
+
configurable: true,
|
219
|
+
writable: true,
|
220
|
+
value: {
|
221
|
+
title: i18n("4a1e3c50547e61503a2d1c356005eb08"),
|
222
|
+
body: [getSchemaTpl('apiControl', {
|
223
|
+
label: i18n("85624c8e8b0fc98954eecbe508e8b59d"),
|
224
|
+
sampleBuilder: function (schema) {
|
225
|
+
return JSON.stringify({
|
226
|
+
status: 0,
|
227
|
+
msg: '',
|
228
|
+
data: [{
|
229
|
+
id: 1,
|
230
|
+
name: 'Jack'
|
231
|
+
}, {
|
232
|
+
id: 2,
|
233
|
+
name: 'Rose'
|
234
|
+
}]
|
235
|
+
}, null, 2);
|
236
|
+
}
|
237
|
+
}), {
|
238
|
+
type: 'button',
|
239
|
+
label: i18n("3dd674542204724eb5417efc7354ec73"),
|
240
|
+
className: 'm-t-xs m-b-xs',
|
241
|
+
onClick: function (e, props) {
|
242
|
+
return __awaiter(_this, void 0, void 0, function () {
|
243
|
+
var data, schemaFilter, api, result, autoFillKeyValues, items;
|
244
|
+
var _a, _b;
|
245
|
+
return __generator(this, function (_c) {
|
246
|
+
switch (_c.label) {
|
247
|
+
case 0:
|
248
|
+
data = props.data;
|
249
|
+
schemaFilter = getEnv(window.editorStore).schemaFilter;
|
250
|
+
api = data.api;
|
251
|
+
// 主要是给爱速搭中替换 url
|
252
|
+
if (schemaFilter) {
|
253
|
+
api = schemaFilter({
|
254
|
+
api: data.api
|
255
|
+
}).api;
|
256
|
+
}
|
257
|
+
return [4 /*yield*/, props.env.fetcher(api, data)];
|
258
|
+
case 1:
|
259
|
+
result = _c.sent();
|
260
|
+
autoFillKeyValues = [];
|
261
|
+
items = ((_a = result.data) === null || _a === void 0 ? void 0 : _a.rows) || ((_b = result.data) === null || _b === void 0 ? void 0 : _b.items);
|
262
|
+
if (items === null || items === void 0 ? void 0 : items.length) {
|
263
|
+
Object.keys(items[0]).forEach(function (key) {
|
264
|
+
items[0][key];
|
265
|
+
autoFillKeyValues.push({
|
266
|
+
label: key,
|
267
|
+
type: 'text',
|
268
|
+
name: key
|
269
|
+
});
|
212
270
|
});
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
})
|
222
|
-
}
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
/*return*/
|
229
|
-
];
|
230
|
-
}
|
271
|
+
props.formStore.setValues({
|
272
|
+
columns: autoFillKeyValues
|
273
|
+
});
|
274
|
+
// 查询条件的字段列表
|
275
|
+
props.formStore.setValues({
|
276
|
+
filterSettingSource: autoFillKeyValues.map(function (column) {
|
277
|
+
return column.name;
|
278
|
+
})
|
279
|
+
});
|
280
|
+
} else {
|
281
|
+
toast.warning(i18n("3266535dc49863d976b9960adad29fef"));
|
282
|
+
}
|
283
|
+
return [2 /*return*/];
|
284
|
+
}
|
285
|
+
});
|
231
286
|
});
|
232
|
-
}
|
233
|
-
}
|
234
|
-
}, {
|
235
|
-
name: 'features',
|
236
|
-
label: i18n("07b59fd09f6007bac246d9a73b793a49"),
|
237
|
-
type: 'checkboxes',
|
238
|
-
joinValues: false,
|
239
|
-
extractValue: true,
|
240
|
-
itemClassName: 'max-w-lg',
|
241
|
-
options: [{
|
242
|
-
label: i18n("66ab5e9f24c8f46012a25c89919fb191"),
|
243
|
-
value: 'create'
|
244
|
-
}, {
|
245
|
-
label: i18n("bee912d79eefb7335988c4997aa9138d"),
|
246
|
-
value: 'filter'
|
247
|
-
}, {
|
248
|
-
label: i18n("7fb62b30119c3797a843a48368463314"),
|
249
|
-
value: 'bulkDelete'
|
250
|
-
}, {
|
251
|
-
label: i18n("0f61da949d2b45534967e197cc2eee29"),
|
252
|
-
value: 'bulkUpdate'
|
253
|
-
}, {
|
254
|
-
label: i18n("aa85b3cd6aa4cdfd45bfe5a96678ad2f"),
|
255
|
-
value: 'update'
|
256
|
-
}, {
|
257
|
-
label: i18n("653eb2792d3126a60caa6982f89a906b"),
|
258
|
-
value: 'view'
|
287
|
+
}
|
259
288
|
}, {
|
260
|
-
|
261
|
-
|
262
|
-
}]
|
263
|
-
}, {
|
264
|
-
type: 'group',
|
265
|
-
body: [{
|
266
|
-
columnRatio: 10,
|
289
|
+
name: 'features',
|
290
|
+
label: i18n("07b59fd09f6007bac246d9a73b793a49"),
|
267
291
|
type: 'checkboxes',
|
268
|
-
label: i18n("f4b368051b455e386a314688c7c75c1f"),
|
269
|
-
name: 'filterEnabledList',
|
270
292
|
joinValues: false,
|
271
|
-
|
272
|
-
|
273
|
-
columnRatio: 2,
|
274
|
-
type: 'input-number',
|
275
|
-
label: i18n("23c7ea8ee9519459598b2de65fe2a2eb"),
|
276
|
-
value: 3,
|
277
|
-
name: 'filterColumnCount'
|
278
|
-
}],
|
279
|
-
visibleOn: 'data.features && data.features.includes("filter")'
|
280
|
-
}, {
|
281
|
-
name: 'columns',
|
282
|
-
type: 'input-table',
|
283
|
-
label: false,
|
284
|
-
addable: true,
|
285
|
-
removable: true,
|
286
|
-
needConfirm: false,
|
287
|
-
columns: [{
|
288
|
-
type: 'input-text',
|
289
|
-
name: 'label',
|
290
|
-
label: i18n("32c65d8d7431e76029678ec7bb73a5ab")
|
291
|
-
}, {
|
292
|
-
type: 'input-text',
|
293
|
-
name: 'name',
|
294
|
-
label: i18n("41a344642681efaaa418c228ba7fb45c")
|
295
|
-
}, {
|
296
|
-
type: 'select',
|
297
|
-
name: 'type',
|
298
|
-
label: i18n("226b0912184333c81babf2f1894ec0c1"),
|
299
|
-
value: 'text',
|
293
|
+
extractValue: true,
|
294
|
+
itemClassName: 'max-w-lg',
|
300
295
|
options: [{
|
301
|
-
|
302
|
-
|
296
|
+
label: i18n("66ab5e9f24c8f46012a25c89919fb191"),
|
297
|
+
value: 'create'
|
303
298
|
}, {
|
304
|
-
|
305
|
-
|
299
|
+
label: i18n("bee912d79eefb7335988c4997aa9138d"),
|
300
|
+
value: 'filter'
|
306
301
|
}, {
|
307
|
-
|
308
|
-
|
302
|
+
label: i18n("7fb62b30119c3797a843a48368463314"),
|
303
|
+
value: 'bulkDelete'
|
309
304
|
}, {
|
310
|
-
|
311
|
-
|
305
|
+
label: i18n("0f61da949d2b45534967e197cc2eee29"),
|
306
|
+
value: 'bulkUpdate'
|
312
307
|
}, {
|
313
|
-
|
314
|
-
|
308
|
+
label: i18n("aa85b3cd6aa4cdfd45bfe5a96678ad2f"),
|
309
|
+
value: 'update'
|
315
310
|
}, {
|
316
|
-
|
317
|
-
|
311
|
+
label: i18n("653eb2792d3126a60caa6982f89a906b"),
|
312
|
+
value: 'view'
|
318
313
|
}, {
|
319
|
-
|
320
|
-
|
314
|
+
label: i18n("8a4d6dfbcd8072555b5951091f171000"),
|
315
|
+
value: 'delete'
|
316
|
+
}]
|
317
|
+
}, {
|
318
|
+
type: 'group',
|
319
|
+
body: [{
|
320
|
+
columnRatio: 10,
|
321
|
+
type: 'checkboxes',
|
322
|
+
label: i18n("f4b368051b455e386a314688c7c75c1f"),
|
323
|
+
name: 'filterEnabledList',
|
324
|
+
joinValues: false,
|
325
|
+
source: '${filterSettingSource}'
|
326
|
+
}, {
|
327
|
+
columnRatio: 2,
|
328
|
+
type: 'input-number',
|
329
|
+
label: i18n("23c7ea8ee9519459598b2de65fe2a2eb"),
|
330
|
+
value: 3,
|
331
|
+
name: 'filterColumnCount'
|
332
|
+
}],
|
333
|
+
visibleOn: 'data.features && data.features.includes("filter")'
|
334
|
+
}, {
|
335
|
+
name: 'columns',
|
336
|
+
type: 'input-table',
|
337
|
+
label: false,
|
338
|
+
addable: true,
|
339
|
+
removable: true,
|
340
|
+
needConfirm: false,
|
341
|
+
columns: [{
|
342
|
+
type: 'input-text',
|
343
|
+
name: 'label',
|
344
|
+
label: i18n("32c65d8d7431e76029678ec7bb73a5ab")
|
345
|
+
}, {
|
346
|
+
type: 'input-text',
|
347
|
+
name: 'name',
|
348
|
+
label: i18n("41a344642681efaaa418c228ba7fb45c")
|
321
349
|
}, {
|
322
|
-
|
323
|
-
|
350
|
+
type: 'select',
|
351
|
+
name: 'type',
|
352
|
+
label: i18n("226b0912184333c81babf2f1894ec0c1"),
|
353
|
+
value: 'text',
|
354
|
+
options: [{
|
355
|
+
value: 'text',
|
356
|
+
label: i18n("ffb01e5bcf4c00447f5150d3cba81371")
|
357
|
+
}, {
|
358
|
+
value: 'tpl',
|
359
|
+
label: i18n("59cf15fe6b8d659c9bd2f86143534a06")
|
360
|
+
}, {
|
361
|
+
value: 'image',
|
362
|
+
label: i18n("20def7942674282277c3714ed7ea6ce0")
|
363
|
+
}, {
|
364
|
+
value: 'date',
|
365
|
+
label: i18n("4ff1e74e43a3586339251494117185ad")
|
366
|
+
}, {
|
367
|
+
value: 'progress',
|
368
|
+
label: i18n("c7bff79d059a0b7ff9b02441959d8be2")
|
369
|
+
}, {
|
370
|
+
value: 'status',
|
371
|
+
label: i18n("3fea7ca76cdece641436d7ab0d02ab1b")
|
372
|
+
}, {
|
373
|
+
value: 'mapping',
|
374
|
+
label: i18n("9da188491dd34c4382a5b9f006194e41")
|
375
|
+
}, {
|
376
|
+
value: 'operation',
|
377
|
+
label: i18n("8abc564260a1564521e0c3a1d5419b4a")
|
378
|
+
}]
|
324
379
|
}]
|
325
|
-
}]
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
var type = _a.type;
|
352
|
-
return type !== 'progress' && type !== 'operation';
|
353
|
-
}).map(function (_a) {
|
354
|
-
var type = _a.type,
|
380
|
+
}],
|
381
|
+
pipeOut: function (value) {
|
382
|
+
var valueSchema = cloneDeep(value);
|
383
|
+
// 查看/删除 操作,可选择是否使用接口返回值预填充
|
384
|
+
var features = valueSchema.features;
|
385
|
+
var oper = {
|
386
|
+
type: 'operation',
|
387
|
+
label: i18n("2b6bc0f293f5ca01b006206c2535ccbc"),
|
388
|
+
buttons: []
|
389
|
+
};
|
390
|
+
var itemBtns = ['update', 'view', 'delete'];
|
391
|
+
var hasFeatures = get(features, 'length');
|
392
|
+
valueSchema.bulkActions = [];
|
393
|
+
/** 统一api格式 */
|
394
|
+
valueSchema.api = typeof valueSchema.api === 'string' ? normalizeApi(valueSchema.api) : valueSchema.api;
|
395
|
+
hasFeatures && features.forEach(function (item) {
|
396
|
+
var _a, _b, _c, _d;
|
397
|
+
if (itemBtns.includes(item)) {
|
398
|
+
var schema = void 0;
|
399
|
+
if (item === 'update') {
|
400
|
+
schema = cloneDeep(_this.btnSchemas.update);
|
401
|
+
schema.dialog.body.body = value.columns.filter(function (_a) {
|
402
|
+
var type = _a.type;
|
403
|
+
return type !== 'progress' && type !== 'operation';
|
404
|
+
}).map(function (_a) {
|
405
|
+
var type = _a.type,
|
355
406
|
rest = __rest(_a, ["type"]);
|
356
|
-
|
357
|
-
|
358
|
-
|
407
|
+
return __assign(__assign({}, rest), {
|
408
|
+
type: viewTypeToEditType(type)
|
409
|
+
});
|
359
410
|
});
|
360
|
-
})
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
_a.type;
|
411
|
+
} else if (item === 'view') {
|
412
|
+
schema = cloneDeep(_this.btnSchemas.view);
|
413
|
+
schema.dialog.body.body = value.columns.map(function (_a) {
|
414
|
+
_a.type;
|
365
415
|
var rest = __rest(_a, ["type"]);
|
366
|
-
|
367
|
-
|
368
|
-
|
416
|
+
return __assign(__assign({}, rest), {
|
417
|
+
type: 'static'
|
418
|
+
});
|
369
419
|
});
|
370
|
-
})
|
371
|
-
|
372
|
-
|
373
|
-
schema.api = ((_b = (_a = valueSchema.api) === null || _a === void 0 ? void 0 : _a.method) === null || _b === void 0 ? void 0 : _b.match(/^(post|delete)$/i)) ? valueSchema.api : __assign(__assign({}, valueSchema.api), {
|
374
|
-
method: 'post'
|
375
|
-
});
|
376
|
-
} // 添加操作按钮
|
377
|
-
|
378
|
-
|
379
|
-
_this.addItem(oper.buttons, schema);
|
380
|
-
} else {
|
381
|
-
// 批量操作
|
382
|
-
if (item === 'bulkUpdate') {
|
383
|
-
_this.addItem(valueSchema.bulkActions, cloneDeep(_this.btnSchemas.bulkUpdate));
|
384
|
-
}
|
385
|
-
|
386
|
-
if (item === 'bulkDelete') {
|
387
|
-
_this.addItem(valueSchema.bulkActions, cloneDeep(_this.btnSchemas.bulkDelete));
|
388
|
-
} // 创建
|
389
|
-
|
390
|
-
|
391
|
-
if (item === 'create') {
|
392
|
-
var createSchemaBase = _this.btnSchemas.create;
|
393
|
-
createSchemaBase.dialog.body = {
|
394
|
-
type: 'form',
|
395
|
-
api: ((_d = (_c = valueSchema.api) === null || _c === void 0 ? void 0 : _c.method) === null || _d === void 0 ? void 0 : _d.match(/^(post|put)$/i)) ? valueSchema.api : __assign(__assign({}, valueSchema.api), {
|
420
|
+
} else if (item === 'delete') {
|
421
|
+
schema = cloneDeep(_this.btnSchemas.delete);
|
422
|
+
schema.api = ((_b = (_a = valueSchema.api) === null || _a === void 0 ? void 0 : _a.method) === null || _b === void 0 ? void 0 : _b.match(/^(post|delete)$/i)) ? valueSchema.api : __assign(__assign({}, valueSchema.api), {
|
396
423
|
method: 'post'
|
397
|
-
}),
|
398
|
-
body: valueSchema.columns.map(function (column) {
|
399
|
-
var type = column.type;
|
400
|
-
return {
|
401
|
-
type: viewTypeToEditType(type),
|
402
|
-
name: column.name,
|
403
|
-
label: column.label
|
404
|
-
};
|
405
|
-
})
|
406
|
-
};
|
407
|
-
valueSchema.headerToolbar = [createSchemaBase, 'bulkActions'];
|
408
|
-
}
|
409
|
-
|
410
|
-
var keysFilter = Object.keys(valueSchema.filter || {});
|
411
|
-
|
412
|
-
if (item === 'filter' && !keysFilter.length) {
|
413
|
-
if (valueSchema.filterEnabledList) {
|
414
|
-
valueSchema.filter = {
|
415
|
-
title: i18n("cf12e55021998a8328201800ec356773")
|
416
|
-
};
|
417
|
-
valueSchema.filter.columnCount = value.filterColumnCount;
|
418
|
-
valueSchema.filter.mode = 'horizontal';
|
419
|
-
valueSchema.filter.body = valueSchema.filterEnabledList.map(function (item) {
|
420
|
-
return {
|
421
|
-
type: 'input-text',
|
422
|
-
label: item.label,
|
423
|
-
name: item.value
|
424
|
-
};
|
425
424
|
});
|
426
425
|
}
|
427
|
-
|
428
|
-
|
429
|
-
});
|
430
|
-
var hasOperate = valueSchema.columns.find(function (item) {
|
431
|
-
return item.type === 'operation';
|
432
|
-
});
|
433
|
-
hasFeatures && !hasOperate && valueSchema.columns.push(oper);
|
434
|
-
return valueSchema;
|
435
|
-
},
|
436
|
-
canRebuild: true
|
437
|
-
};
|
438
|
-
_this.multifactor = true;
|
439
|
-
_this.previewSchema = {
|
440
|
-
syncLocation: false,
|
441
|
-
type: 'crud',
|
442
|
-
className: 'text-left',
|
443
|
-
bodyClassName: 'm-b-none',
|
444
|
-
affixHeader: false,
|
445
|
-
data: {
|
446
|
-
items: [{
|
447
|
-
a: 1,
|
448
|
-
b: 2
|
449
|
-
}, {
|
450
|
-
a: 3,
|
451
|
-
b: 4
|
452
|
-
}, {
|
453
|
-
a: 5,
|
454
|
-
b: 6
|
455
|
-
}]
|
456
|
-
},
|
457
|
-
source: '${items}',
|
458
|
-
columns: [{
|
459
|
-
label: 'A',
|
460
|
-
name: 'a'
|
461
|
-
}, {
|
462
|
-
label: 'B',
|
463
|
-
name: 'b'
|
464
|
-
}, {
|
465
|
-
type: 'operation',
|
466
|
-
label: i18n("2b6bc0f293f5ca01b006206c2535ccbc"),
|
467
|
-
buttons: [{
|
468
|
-
icon: 'fa fa-eye',
|
469
|
-
type: 'button'
|
470
|
-
}, {
|
471
|
-
icon: 'fa fa-edit',
|
472
|
-
type: 'button'
|
473
|
-
}]
|
474
|
-
}]
|
475
|
-
};
|
476
|
-
_this.panelTitle = i18n("d7213304d1a8a02a73a2f4010839e061");
|
477
|
-
|
478
|
-
_this.panelBodyCreator = function (context) {
|
479
|
-
_this.manager.store;
|
480
|
-
var id = context.id;
|
481
|
-
return getSchemaTpl('tabs', [{
|
482
|
-
title: i18n("22b777e6fcb613b8ba83ced9594cd07e"),
|
483
|
-
body: [getSchemaTpl('switch', {
|
484
|
-
name: 'filter',
|
485
|
-
label: i18n("07a88fae7dd11f87891af91fb54a74bb"),
|
486
|
-
visibleOn: 'data.api && data.api.url',
|
487
|
-
pipeIn: function (value) {
|
488
|
-
return !!value;
|
489
|
-
},
|
490
|
-
pipeOut: function (value, originValue) {
|
491
|
-
if (value) {
|
492
|
-
return _this.oldFilter || JSONPipeIn({
|
493
|
-
title: i18n("cf12e55021998a8328201800ec356773"),
|
494
|
-
body: [{
|
495
|
-
type: 'input-text',
|
496
|
-
name: 'keywords',
|
497
|
-
label: i18n("cfb5f18c43753ad5329348d626bd3739")
|
498
|
-
}]
|
499
|
-
});
|
426
|
+
// 添加操作按钮
|
427
|
+
_this.addItem(oper.buttons, schema);
|
500
428
|
} else {
|
501
|
-
|
429
|
+
// 批量操作
|
430
|
+
if (item === 'bulkUpdate') {
|
431
|
+
_this.addItem(valueSchema.bulkActions, cloneDeep(_this.btnSchemas.bulkUpdate));
|
432
|
+
}
|
433
|
+
if (item === 'bulkDelete') {
|
434
|
+
_this.addItem(valueSchema.bulkActions, cloneDeep(_this.btnSchemas.bulkDelete));
|
435
|
+
}
|
436
|
+
// 创建
|
437
|
+
if (item === 'create') {
|
438
|
+
var createSchemaBase = _this.btnSchemas.create;
|
439
|
+
createSchemaBase.dialog.body = {
|
440
|
+
type: 'form',
|
441
|
+
api: ((_d = (_c = valueSchema.api) === null || _c === void 0 ? void 0 : _c.method) === null || _d === void 0 ? void 0 : _d.match(/^(post|put)$/i)) ? valueSchema.api : __assign(__assign({}, valueSchema.api), {
|
442
|
+
method: 'post'
|
443
|
+
}),
|
444
|
+
body: valueSchema.columns.map(function (column) {
|
445
|
+
var type = column.type;
|
446
|
+
return {
|
447
|
+
type: viewTypeToEditType(type),
|
448
|
+
name: column.name,
|
449
|
+
label: column.label
|
450
|
+
};
|
451
|
+
})
|
452
|
+
};
|
453
|
+
valueSchema.headerToolbar = [createSchemaBase, 'bulkActions'];
|
454
|
+
}
|
455
|
+
var keysFilter = Object.keys(valueSchema.filter || {});
|
456
|
+
if (item === 'filter' && !keysFilter.length) {
|
457
|
+
if (valueSchema.filterEnabledList) {
|
458
|
+
valueSchema.filter = {
|
459
|
+
title: i18n("cf12e55021998a8328201800ec356773")
|
460
|
+
};
|
461
|
+
valueSchema.filter.columnCount = value.filterColumnCount;
|
462
|
+
valueSchema.filter.mode = 'horizontal';
|
463
|
+
valueSchema.filter.body = valueSchema.filterEnabledList.map(function (item) {
|
464
|
+
return {
|
465
|
+
type: 'input-text',
|
466
|
+
label: item.label,
|
467
|
+
name: item.value
|
468
|
+
};
|
469
|
+
});
|
470
|
+
}
|
471
|
+
}
|
502
472
|
}
|
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
|
-
|
528
|
-
|
473
|
+
});
|
474
|
+
var hasOperate = valueSchema.columns.find(function (item) {
|
475
|
+
return item.type === 'operation';
|
476
|
+
});
|
477
|
+
hasFeatures && !hasOperate && valueSchema.columns.push(oper);
|
478
|
+
return valueSchema;
|
479
|
+
},
|
480
|
+
canRebuild: true
|
481
|
+
}
|
482
|
+
});
|
483
|
+
Object.defineProperty(_this, "multifactor", {
|
484
|
+
enumerable: true,
|
485
|
+
configurable: true,
|
486
|
+
writable: true,
|
487
|
+
value: true
|
488
|
+
});
|
489
|
+
Object.defineProperty(_this, "previewSchema", {
|
490
|
+
enumerable: true,
|
491
|
+
configurable: true,
|
492
|
+
writable: true,
|
493
|
+
value: {
|
494
|
+
syncLocation: false,
|
495
|
+
type: 'crud',
|
496
|
+
className: 'text-left',
|
497
|
+
bodyClassName: 'm-b-none',
|
498
|
+
affixHeader: false,
|
499
|
+
data: {
|
529
500
|
items: [{
|
530
|
-
|
531
|
-
|
532
|
-
columnClassName: 'p-t-xs'
|
501
|
+
a: 1,
|
502
|
+
b: 2
|
533
503
|
}, {
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
"data-tooltip": "\u4FEE\u6539",
|
540
|
-
"data-position": "bottom",
|
541
|
-
className: "text-muted"
|
542
|
-
}, React__default.createElement("i", {
|
543
|
-
className: "fa fa-pencil"
|
544
|
-
}));
|
545
|
-
}
|
504
|
+
a: 3,
|
505
|
+
b: 4
|
506
|
+
}, {
|
507
|
+
a: 5,
|
508
|
+
b: 6
|
546
509
|
}]
|
547
|
-
},
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
// }),
|
553
|
-
{
|
554
|
-
type: 'divider'
|
510
|
+
},
|
511
|
+
source: '${items}',
|
512
|
+
columns: [{
|
513
|
+
label: 'A',
|
514
|
+
name: 'a'
|
555
515
|
}, {
|
556
|
-
label:
|
557
|
-
name: '
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
content: i18n("3674ea51498e7118732e5e1c53d4bc80"),
|
564
|
-
placement: 'left'
|
565
|
-
},
|
566
|
-
hiddenOn: 'this.mode && this.mode !== "table" || this.pickerMode',
|
567
|
-
inputClassName: 'ae-BulkActions-control',
|
568
|
-
multiple: true,
|
569
|
-
draggable: true,
|
570
|
-
scaffold: {
|
571
|
-
label: i18n("fa966345577ba81af19408f203db968f"),
|
516
|
+
label: 'B',
|
517
|
+
name: 'b'
|
518
|
+
}, {
|
519
|
+
type: 'operation',
|
520
|
+
label: i18n("2b6bc0f293f5ca01b006206c2535ccbc"),
|
521
|
+
buttons: [{
|
522
|
+
icon: 'fa fa-eye',
|
572
523
|
type: 'button'
|
573
|
-
},
|
574
|
-
items: [{
|
575
|
-
type: 'tpl',
|
576
|
-
tpl: '<span class="label label-success">${label}</span>',
|
577
|
-
columnClassName: 'p-t-xs'
|
578
|
-
}, {
|
579
|
-
type: 'checkbox',
|
580
|
-
className: 'text-xs',
|
581
|
-
option: i18n("4916771d080ddf6d0551de4d6d2f42a4"),
|
582
|
-
name: 'hiddenOnHover'
|
583
524
|
}, {
|
584
|
-
|
585
|
-
|
586
|
-
var index = _a.index;
|
587
|
-
return React__default.createElement("button", {
|
588
|
-
onClick: _this.handleItemActionEdit.bind(_this, id, index),
|
589
|
-
"data-tooltip": "\u4FEE\u6539",
|
590
|
-
"data-position": "bottom",
|
591
|
-
className: "text-muted"
|
592
|
-
}, React__default.createElement("i", {
|
593
|
-
className: "fa fa-pencil"
|
594
|
-
}));
|
595
|
-
}
|
525
|
+
icon: 'fa fa-edit',
|
526
|
+
type: 'button'
|
596
527
|
}]
|
597
|
-
}, {
|
598
|
-
type: 'divider',
|
599
|
-
hiddenOn: 'this.mode && this.mode !== "table" || this.pickerMode'
|
600
|
-
}, getSchemaTpl('switch', {
|
601
|
-
name: 'syncLocation',
|
602
|
-
label: i18n("569343b4fe5e48131b78611c11eadbeb"),
|
603
|
-
pipeIn: defaultValue(true),
|
604
|
-
labelRemark: {
|
605
|
-
className: 'm-l-xs',
|
606
|
-
trigger: 'click',
|
607
|
-
rootClose: true,
|
608
|
-
content: i18n("6dbee29a8c54eef9d042ef3280999ad9"),
|
609
|
-
placement: 'left'
|
610
|
-
}
|
611
|
-
}), {
|
612
|
-
label: i18n("2171d1b07d045e796cba4a05bcf7d13f"),
|
613
|
-
type: 'input-kv',
|
614
|
-
name: 'defaultParams',
|
615
|
-
labelRemark: {
|
616
|
-
className: 'm-l-xs',
|
617
|
-
trigger: 'click',
|
618
|
-
rootClose: true,
|
619
|
-
content: i18n("01e7eb2256821085a14708d6ddf36814"),
|
620
|
-
placement: 'left'
|
621
|
-
}
|
622
|
-
}, {
|
623
|
-
type: 'divider'
|
624
|
-
}, getSchemaTpl('switch', {
|
625
|
-
name: 'keepItemSelectionOnPageChange',
|
626
|
-
label: i18n("58ed0a7a5a91996dbb4c7d6dc7679364"),
|
627
|
-
visbileOn: 'this.bulkActions && this.bulkActions.length || this.itemActions && this.itemActions.length',
|
628
|
-
labelRemark: {
|
629
|
-
className: 'm-l-xs',
|
630
|
-
trigger: 'click',
|
631
|
-
rootClose: true,
|
632
|
-
content: i18n("36ac0011faae6f88ee0ec3e642328327"),
|
633
|
-
placement: 'left'
|
634
|
-
}
|
635
|
-
}), {
|
636
|
-
name: 'labelTpl',
|
637
|
-
type: 'input-text',
|
638
|
-
label: i18n("2a0b47ba76e886070c3bd6abeae3d1c0"),
|
639
|
-
visibleOn: 'this.keepItemSelectionOnPageChange',
|
640
|
-
labelRemark: {
|
641
|
-
className: 'm-l-xs',
|
642
|
-
trigger: 'click',
|
643
|
-
rootClose: true,
|
644
|
-
content: i18n("6ab3e5b6c5d5d2cf621e911226495433"),
|
645
|
-
placement: 'left'
|
646
|
-
}
|
647
|
-
}, {
|
648
|
-
name: 'primaryField',
|
649
|
-
label: i18n("987b04af242bb2dafaf32d890ab952ff"),
|
650
|
-
type: 'input-text',
|
651
|
-
pipeIn: defaultValue('id'),
|
652
|
-
description: i18n("a270e70be12fb13a24ca3e4ac70fa838")
|
653
528
|
}]
|
654
|
-
}
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
529
|
+
}
|
530
|
+
});
|
531
|
+
Object.defineProperty(_this, "oldFilter", {
|
532
|
+
enumerable: true,
|
533
|
+
configurable: true,
|
534
|
+
writable: true,
|
535
|
+
value: void 0
|
536
|
+
});
|
537
|
+
Object.defineProperty(_this, "panelTitle", {
|
538
|
+
enumerable: true,
|
539
|
+
configurable: true,
|
540
|
+
writable: true,
|
541
|
+
value: i18n("d7213304d1a8a02a73a2f4010839e061")
|
542
|
+
});
|
543
|
+
Object.defineProperty(_this, "panelBodyCreator", {
|
544
|
+
enumerable: true,
|
545
|
+
configurable: true,
|
546
|
+
writable: true,
|
547
|
+
value: function (context) {
|
548
|
+
_this.manager.store;
|
549
|
+
var id = context.id;
|
550
|
+
return getSchemaTpl('tabs', [{
|
551
|
+
title: i18n("22b777e6fcb613b8ba83ced9594cd07e"),
|
552
|
+
body: [getSchemaTpl('switch', {
|
553
|
+
name: 'filter',
|
554
|
+
label: i18n("07a88fae7dd11f87891af91fb54a74bb"),
|
555
|
+
visibleOn: 'data.api && data.api.url',
|
556
|
+
pipeIn: function (value) {
|
557
|
+
return !!value;
|
558
|
+
},
|
559
|
+
pipeOut: function (value, originValue) {
|
560
|
+
if (value) {
|
561
|
+
return _this.oldFilter || JSONPipeIn({
|
562
|
+
title: i18n("cf12e55021998a8328201800ec356773"),
|
563
|
+
body: [{
|
564
|
+
type: 'input-text',
|
565
|
+
name: 'keywords',
|
566
|
+
label: i18n("cfb5f18c43753ad5329348d626bd3739")
|
567
|
+
}]
|
568
|
+
});
|
569
|
+
} else {
|
570
|
+
_this.oldFilter = originValue;
|
670
571
|
}
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
}
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
visibleOn: 'data.
|
719
|
-
pipeIn:
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
572
|
+
return null;
|
573
|
+
}
|
574
|
+
}), {
|
575
|
+
type: 'divider',
|
576
|
+
visibleOn: 'data.api && data.api.url'
|
577
|
+
}, getSchemaTpl('combo-container', {
|
578
|
+
label: i18n("7f7c624a843b0d539a4ea59a696702f9"),
|
579
|
+
name: 'bulkActions',
|
580
|
+
type: 'combo',
|
581
|
+
hiddenOn: 'data.pickerMode && data.multiple',
|
582
|
+
inputClassName: 'ae-BulkActions-control',
|
583
|
+
multiple: true,
|
584
|
+
draggable: true,
|
585
|
+
draggableTip: '',
|
586
|
+
scaffold: {
|
587
|
+
label: i18n("fa966345577ba81af19408f203db968f"),
|
588
|
+
type: 'button'
|
589
|
+
},
|
590
|
+
labelRemark: {
|
591
|
+
className: 'm-l-xs',
|
592
|
+
trigger: 'click',
|
593
|
+
rootClose: true,
|
594
|
+
content: i18n("46e6edaeb9968e7f7ab549d4f2f82d6d"),
|
595
|
+
placement: 'left'
|
596
|
+
},
|
597
|
+
items: [{
|
598
|
+
type: 'tpl',
|
599
|
+
tpl: '<span class="label label-success">${label}</span>',
|
600
|
+
columnClassName: 'p-t-xs'
|
601
|
+
}, {
|
602
|
+
columnClassName: 'p-t-xs col-edit',
|
603
|
+
children: function (_a) {
|
604
|
+
var index = _a.index;
|
605
|
+
return React__default.createElement("button", {
|
606
|
+
onClick: _this.handleBulkActionEdit.bind(_this, id, index),
|
607
|
+
"data-tooltip": "\u4FEE\u6539",
|
608
|
+
"data-position": "bottom",
|
609
|
+
className: "text-muted"
|
610
|
+
}, React__default.createElement("i", {
|
611
|
+
className: "fa fa-pencil"
|
612
|
+
}));
|
613
|
+
}
|
614
|
+
}]
|
615
|
+
}),
|
616
|
+
// getSchemaTpl('switch', {
|
617
|
+
// name: 'defaultChecked',
|
618
|
+
// label: '默认是否全部勾选',
|
619
|
+
// visibleOn: 'data.bulkActions && data.bulkActions.length',
|
620
|
+
// pipeIn: defaultValue(false)
|
621
|
+
// }),
|
622
|
+
{
|
623
|
+
type: 'divider'
|
624
|
+
}, getSchemaTpl('combo-container', {
|
625
|
+
label: i18n("f13a0697d58d975d14eb3f3c72c2cbf2"),
|
626
|
+
name: 'itemActions',
|
627
|
+
type: 'combo',
|
628
|
+
labelRemark: {
|
629
|
+
className: 'm-l-xs',
|
630
|
+
trigger: 'click',
|
631
|
+
rootClose: true,
|
632
|
+
content: i18n("3674ea51498e7118732e5e1c53d4bc80"),
|
633
|
+
placement: 'left'
|
634
|
+
},
|
635
|
+
hiddenOn: 'this.mode && this.mode !== "table" || this.pickerMode',
|
636
|
+
inputClassName: 'ae-BulkActions-control',
|
637
|
+
multiple: true,
|
638
|
+
draggable: true,
|
639
|
+
scaffold: {
|
640
|
+
label: i18n("fa966345577ba81af19408f203db968f"),
|
641
|
+
type: 'button'
|
642
|
+
},
|
643
|
+
items: [{
|
644
|
+
type: 'tpl',
|
645
|
+
tpl: '<span class="label label-success">${label}</span>',
|
646
|
+
columnClassName: 'p-t-xs'
|
647
|
+
}, {
|
648
|
+
type: 'checkbox',
|
649
|
+
className: 'text-xs',
|
650
|
+
option: i18n("4916771d080ddf6d0551de4d6d2f42a4"),
|
651
|
+
name: 'hiddenOnHover'
|
652
|
+
}, {
|
653
|
+
columnClassName: 'p-t-xs col-edit',
|
654
|
+
children: function (_a) {
|
655
|
+
var index = _a.index;
|
656
|
+
return React__default.createElement("button", {
|
657
|
+
onClick: _this.handleItemActionEdit.bind(_this, id, index),
|
658
|
+
"data-tooltip": "\u4FEE\u6539",
|
659
|
+
"data-position": "bottom",
|
660
|
+
className: "text-muted"
|
661
|
+
}, React__default.createElement("i", {
|
662
|
+
className: "fa fa-pencil"
|
663
|
+
}));
|
664
|
+
}
|
665
|
+
}]
|
666
|
+
}), {
|
667
|
+
type: 'divider',
|
668
|
+
hiddenOn: 'this.mode && this.mode !== "table" || this.pickerMode'
|
669
|
+
}, getSchemaTpl('switch', {
|
670
|
+
name: 'syncLocation',
|
671
|
+
label: i18n("569343b4fe5e48131b78611c11eadbeb"),
|
672
|
+
pipeIn: defaultValue(true),
|
673
|
+
labelRemark: {
|
674
|
+
className: 'm-l-xs',
|
675
|
+
trigger: 'click',
|
676
|
+
rootClose: true,
|
677
|
+
content: i18n("6dbee29a8c54eef9d042ef3280999ad9"),
|
678
|
+
placement: 'left'
|
679
|
+
}
|
680
|
+
}), getSchemaTpl('combo-container', {
|
681
|
+
label: i18n("2171d1b07d045e796cba4a05bcf7d13f"),
|
682
|
+
type: 'input-kv',
|
683
|
+
name: 'defaultParams',
|
684
|
+
labelRemark: {
|
685
|
+
className: 'm-l-xs',
|
686
|
+
trigger: 'click',
|
687
|
+
rootClose: true,
|
688
|
+
content: i18n("01e7eb2256821085a14708d6ddf36814"),
|
689
|
+
placement: 'left'
|
690
|
+
}
|
691
|
+
}), {
|
692
|
+
type: 'divider'
|
693
|
+
}, getSchemaTpl('switch', {
|
694
|
+
name: 'keepItemSelectionOnPageChange',
|
695
|
+
label: i18n("58ed0a7a5a91996dbb4c7d6dc7679364"),
|
696
|
+
visbileOn: 'this.bulkActions && this.bulkActions.length || this.itemActions && this.itemActions.length',
|
697
|
+
labelRemark: {
|
698
|
+
className: 'm-l-xs',
|
699
|
+
trigger: 'click',
|
700
|
+
rootClose: true,
|
701
|
+
content: i18n("36ac0011faae6f88ee0ec3e642328327"),
|
702
|
+
placement: 'left'
|
703
|
+
}
|
704
|
+
}), {
|
705
|
+
name: 'labelTpl',
|
783
706
|
type: 'input-text',
|
784
|
-
|
707
|
+
label: i18n("2a0b47ba76e886070c3bd6abeae3d1c0"),
|
708
|
+
visibleOn: 'this.keepItemSelectionOnPageChange',
|
709
|
+
labelRemark: {
|
710
|
+
className: 'm-l-xs',
|
711
|
+
trigger: 'click',
|
712
|
+
rootClose: true,
|
713
|
+
content: i18n("6ab3e5b6c5d5d2cf621e911226495433"),
|
714
|
+
placement: 'left'
|
715
|
+
}
|
785
716
|
}, {
|
786
|
-
|
717
|
+
name: 'primaryField',
|
718
|
+
label: i18n("987b04af242bb2dafaf32d890ab952ff"),
|
787
719
|
type: 'input-text',
|
788
|
-
|
720
|
+
pipeIn: defaultValue('id'),
|
721
|
+
description: i18n("a270e70be12fb13a24ca3e4ac70fa838")
|
722
|
+
}]
|
723
|
+
}, {
|
724
|
+
title: i18n("54ea89b497ec3bb319c68844dfa3687f"),
|
725
|
+
body: [getSchemaTpl('apiControl', {
|
726
|
+
label: i18n("db7ee36de8063c2d5a6c123eac65641a"),
|
727
|
+
sampleBuilder: function () {
|
728
|
+
var _a, _b;
|
729
|
+
var data = {
|
730
|
+
items: [],
|
731
|
+
total: 0
|
732
|
+
};
|
733
|
+
var columns = (_b = (_a = context === null || context === void 0 ? void 0 : context.schema) === null || _a === void 0 ? void 0 : _a.columns) !== null && _b !== void 0 ? _b : [];
|
734
|
+
var row = {};
|
735
|
+
columns.forEach(function (column) {
|
736
|
+
if (column.name) {
|
737
|
+
setVariable(row, column.name, 'sample');
|
738
|
+
}
|
739
|
+
});
|
740
|
+
data.items.push(row);
|
741
|
+
return JSON.stringify({
|
742
|
+
status: 0,
|
743
|
+
msg: '',
|
744
|
+
data: data
|
745
|
+
}, null, 2);
|
746
|
+
}
|
747
|
+
}), {
|
748
|
+
name: 'initFetch',
|
749
|
+
type: 'radios',
|
750
|
+
label: i18n("0951dad1723aa1191ce1a2e96db76051"),
|
751
|
+
pipeIn: function (value) {
|
752
|
+
return typeof value == 'boolean' && value || typeof value !== 'boolean' && '';
|
753
|
+
},
|
754
|
+
inline: true,
|
755
|
+
onChange: function () {},
|
756
|
+
options: [{
|
757
|
+
label: i18n("0a60ac8f02ccd2cf723f927284877851"),
|
758
|
+
value: true
|
759
|
+
}, {
|
760
|
+
label: i18n("c9744f45e76d885ae1c74d4f4a934b2e"),
|
761
|
+
value: false
|
762
|
+
}, {
|
763
|
+
label: i18n("a9400c408441f1f7f6d6954deb05ae9a"),
|
764
|
+
value: ''
|
765
|
+
}]
|
789
766
|
}, {
|
790
|
-
|
767
|
+
name: 'initFetch',
|
768
|
+
autoComplete: false,
|
769
|
+
visibleOn: 'typeof this.initFetch !== "boolean"',
|
791
770
|
type: 'input-text',
|
792
|
-
|
793
|
-
|
794
|
-
|
771
|
+
placeholder: i18n("55b22f5d136e73b26cef65aedd8ba86e"),
|
772
|
+
className: 'm-t-n-sm'
|
773
|
+
}, getSchemaTpl('switch', {
|
774
|
+
name: 'loadDataOnce',
|
775
|
+
label: i18n("bedc70d448b656d828bd3ed7926b3e4d"),
|
776
|
+
labelRemark: {
|
777
|
+
className: 'm-l-xs',
|
778
|
+
trigger: 'click',
|
779
|
+
rootClose: true,
|
780
|
+
content: i18n("559fa334442f0f75b0343bbf38b7ff05"),
|
781
|
+
placement: 'left'
|
782
|
+
}
|
783
|
+
}), getSchemaTpl('switch', {
|
784
|
+
label: i18n("1af68c43e1780249f11b9de1eeaeb281"),
|
785
|
+
name: 'interval',
|
786
|
+
visibleOn: 'data.api',
|
787
|
+
pipeIn: function (value) {
|
788
|
+
return !!value;
|
789
|
+
},
|
790
|
+
pipeOut: function (value) {
|
791
|
+
return value ? 3000 : undefined;
|
792
|
+
}
|
793
|
+
}), {
|
794
|
+
name: 'interval',
|
795
|
+
type: 'input-number',
|
796
|
+
visibleOn: 'typeof data.interval === "number"',
|
797
|
+
step: 500,
|
798
|
+
className: 'm-t-n-sm',
|
799
|
+
description: i18n("9800f1ce2f78a23b81c8d944ebf9cce9")
|
800
|
+
}, getSchemaTpl('switch', {
|
801
|
+
name: 'silentPolling',
|
802
|
+
label: i18n("19c5410b23fba4bbfd1a58bbd5268c9b"),
|
803
|
+
visibleOn: '!!data.interval',
|
804
|
+
description: i18n("04f840b0772f4b5d59954a29a76f4e7b")
|
805
|
+
}), {
|
806
|
+
name: 'stopAutoRefreshWhen',
|
807
|
+
label: i18n("6037dae99e9446deaed45f7e408f47ab"),
|
795
808
|
type: 'input-text',
|
796
|
-
|
809
|
+
visibleOn: '!!data.interval',
|
810
|
+
description: i18n("32e3a79e80dcf7f7304e8092dd7acc6f")
|
811
|
+
}, getSchemaTpl('switch', {
|
812
|
+
name: 'stopAutoRefreshWhenModalIsOpen',
|
813
|
+
label: i18n("154ef40e477c031f6c1ec15caefb570a"),
|
814
|
+
visibleOn: '!!data.interval',
|
815
|
+
description: i18n("50f7c85bf60a9f43522789644566c62b")
|
816
|
+
}), {
|
817
|
+
type: 'divider'
|
818
|
+
}, getSchemaTpl('switch', {
|
819
|
+
name: 'draggable',
|
820
|
+
label: i18n("d8905a70e93a33c7a86240f467c653d4")
|
821
|
+
}), getSchemaTpl('apiControl', {
|
822
|
+
label: i18n("040a78b24eaff47d4fa7e266473635b4"),
|
823
|
+
name: 'saveOrderApi',
|
824
|
+
visibleOn: 'data.draggable'
|
825
|
+
}), {
|
826
|
+
type: 'divider'
|
827
|
+
}, getSchemaTpl('apiControl', {
|
828
|
+
label: i18n("ee850a0e326b217bdeb61d936c521177"),
|
829
|
+
name: 'quickSaveApi',
|
830
|
+
description: i18n("8343f619879fa79bc8ef1a35b2fc3e78")
|
831
|
+
}), {
|
832
|
+
type: 'divider'
|
833
|
+
}, getSchemaTpl('apiControl', {
|
834
|
+
label: i18n("d891e79d4a8718a7dbd47ac68aaaa5cb"),
|
835
|
+
name: 'quickSaveItemApi',
|
836
|
+
description: i18n("38db6e045e214ffcd03ede695002271c")
|
837
|
+
}), {
|
838
|
+
type: 'divider'
|
797
839
|
}, {
|
798
|
-
label: i18n("
|
799
|
-
type: '
|
800
|
-
name: '
|
840
|
+
label: i18n("522110866c19dace2ce38336617405c2"),
|
841
|
+
type: 'combo',
|
842
|
+
name: 'messages',
|
843
|
+
multiLine: true,
|
844
|
+
description: i18n("3b69c2e540c05e9ca530ed30cf224472"),
|
845
|
+
items: [{
|
846
|
+
label: i18n("fb24383a41f23196349548b5d0cb98ce"),
|
847
|
+
type: 'input-text',
|
848
|
+
name: 'fetchSuccess'
|
849
|
+
}, {
|
850
|
+
label: i18n("62e3e15c8fb9038f2780329bc26e8bab"),
|
851
|
+
type: 'input-text',
|
852
|
+
name: 'fetchFailed'
|
853
|
+
}, {
|
854
|
+
label: i18n("c62a1b7f314be10aead10475e7543f6a"),
|
855
|
+
type: 'input-text',
|
856
|
+
name: 'saveOrderSuccess'
|
857
|
+
}, {
|
858
|
+
label: i18n("c8035507b7a576d43e9f227c91c7a7b5"),
|
859
|
+
type: 'input-text',
|
860
|
+
name: 'saveOrderFailed'
|
861
|
+
}, {
|
862
|
+
label: i18n("7cb0932b806559be232d2a69453224e7"),
|
863
|
+
type: 'input-text',
|
864
|
+
name: 'quickSaveSuccess'
|
865
|
+
}, {
|
866
|
+
label: i18n("fd79a193a487b8c9d5a302d0d88c1c2c"),
|
867
|
+
type: 'input-text',
|
868
|
+
name: 'quickSaveFailed'
|
869
|
+
}]
|
801
870
|
}]
|
802
|
-
}
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
var _a, _b, _c, _d, _e;
|
817
|
-
|
818
|
-
var headerHasColumnsToggle = (_b = (_a = form === null || form === void 0 ? void 0 : form.data) === null || _a === void 0 ? void 0 : _a.headerToolbar) === null || _b === void 0 ? void 0 : _b.some(function (item) {
|
819
|
-
return item.type === 'columns-toggler';
|
820
|
-
});
|
821
|
-
var headerToolbar = cloneDeep((_c = form === null || form === void 0 ? void 0 : form.data) === null || _c === void 0 ? void 0 : _c.headerToolbar);
|
822
|
-
var columnsToggler;
|
823
|
-
|
824
|
-
if (value !== 'table' && oldValue === 'table') {
|
825
|
-
// 存储table模式是否有 columns-toggler
|
826
|
-
columnsToggler = (headerToolbar === null || headerToolbar === void 0 ? void 0 : headerToolbar.find(function (item) {
|
871
|
+
}, {
|
872
|
+
title: i18n("afcde2611bdd13c1e65b4fb6a2f13425"),
|
873
|
+
body: [{
|
874
|
+
label: i18n("ff57a3bf69a1065707e77c18c51f7bbb"),
|
875
|
+
name: 'mode',
|
876
|
+
type: 'button-group-select',
|
877
|
+
size: 'xs',
|
878
|
+
pipeIn: function (value, values) {
|
879
|
+
var _a;
|
880
|
+
return (_a = value === 'grid' ? 'cards' : value) !== null && _a !== void 0 ? _a : 'table';
|
881
|
+
},
|
882
|
+
onChange: function (value, oldValue, model, form) {
|
883
|
+
var _a, _b, _c, _d, _e;
|
884
|
+
var headerHasColumnsToggle = (_b = (_a = form === null || form === void 0 ? void 0 : form.data) === null || _a === void 0 ? void 0 : _a.headerToolbar) === null || _b === void 0 ? void 0 : _b.some(function (item) {
|
827
885
|
return item.type === 'columns-toggler';
|
828
|
-
})) || {
|
829
|
-
type: 'columns-toggler',
|
830
|
-
align: 'right'
|
831
|
-
};
|
832
|
-
form.setValues({
|
833
|
-
__headerHasColumnsToggler: headerHasColumnsToggle
|
834
886
|
});
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
if (((_d = form === null || form === void 0 ? void 0 : form.data) === null || _d === void 0 ? void 0 : _d.__headerHasColumnsToggler) && !headerHasColumnsToggle) {
|
843
|
-
headerToolbar === null || headerToolbar === void 0 ? void 0 : headerToolbar.push(((_e = form === null || form === void 0 ? void 0 : form.data) === null || _e === void 0 ? void 0 : _e.__cacheColumnsToggler) || {
|
887
|
+
var headerToolbar = cloneDeep((_c = form === null || form === void 0 ? void 0 : form.data) === null || _c === void 0 ? void 0 : _c.headerToolbar);
|
888
|
+
var columnsToggler;
|
889
|
+
if (value !== 'table' && oldValue === 'table') {
|
890
|
+
// 存储table模式是否有 columns-toggler
|
891
|
+
columnsToggler = (headerToolbar === null || headerToolbar === void 0 ? void 0 : headerToolbar.find(function (item) {
|
892
|
+
return item.type === 'columns-toggler';
|
893
|
+
})) || {
|
844
894
|
type: 'columns-toggler',
|
845
895
|
align: 'right'
|
896
|
+
};
|
897
|
+
form.setValues({
|
898
|
+
__headerHasColumnsToggler: headerHasColumnsToggle
|
846
899
|
});
|
847
900
|
}
|
848
|
-
|
849
|
-
|
850
|
-
headerToolbar: headerToolbar,
|
851
|
-
columns: form.data.__columns || [{
|
852
|
-
label: 'ID',
|
853
|
-
name: 'id'
|
854
|
-
}, {
|
855
|
-
label: i18n("20aadc3f9b7edb564dc58898898e0dc8"),
|
856
|
-
name: 'name'
|
857
|
-
}],
|
858
|
-
__headerHasColumnsToggler: headerHasColumnsToggle,
|
859
|
-
__card: form.data.card || form.data.__card,
|
860
|
-
__listItem: form.data.listItem || form.data.__listItem
|
901
|
+
headerToolbar = value === 'table' ? headerToolbar : headerToolbar === null || headerToolbar === void 0 ? void 0 : headerToolbar.filter(function (item) {
|
902
|
+
return item.type !== 'columns-toggler';
|
861
903
|
});
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
subTitle: i18n("72cf373be86a38b29f6d2f15900b0da1")
|
875
|
-
},
|
876
|
-
body: [{
|
877
|
-
name: 'a',
|
878
|
-
label: 'A'
|
904
|
+
if (value === 'table') {
|
905
|
+
if (((_d = form === null || form === void 0 ? void 0 : form.data) === null || _d === void 0 ? void 0 : _d.__headerHasColumnsToggler) && !headerHasColumnsToggle) {
|
906
|
+
headerToolbar === null || headerToolbar === void 0 ? void 0 : headerToolbar.push(((_e = form === null || form === void 0 ? void 0 : form.data) === null || _e === void 0 ? void 0 : _e.__cacheColumnsToggler) || {
|
907
|
+
type: 'columns-toggler',
|
908
|
+
align: 'right'
|
909
|
+
});
|
910
|
+
}
|
911
|
+
form.setValues({
|
912
|
+
headerToolbar: headerToolbar,
|
913
|
+
columns: form.data.__columns || [{
|
914
|
+
label: 'ID',
|
915
|
+
name: 'id'
|
879
916
|
}, {
|
880
|
-
|
881
|
-
|
882
|
-
}],
|
883
|
-
actions: [{
|
884
|
-
label: i18n("f26225bde6a250894a04db4c53ea03d0"),
|
885
|
-
type: 'button'
|
886
|
-
}]
|
887
|
-
},
|
888
|
-
__columns: form.data.columns || form.data.__columns,
|
889
|
-
__listItem: form.data.listItem || form.data.__listItem
|
890
|
-
});
|
891
|
-
form.deleteValueByName('columns');
|
892
|
-
form.deleteValueByName('listItem');
|
893
|
-
} else {
|
894
|
-
oldValue === 'table' && form.setValues({
|
895
|
-
__cacheColumnsToggler: columnsToggler
|
896
|
-
});
|
897
|
-
form.setValues({
|
898
|
-
headerToolbar: headerToolbar,
|
899
|
-
listItem: form.data.__listItem || {
|
900
|
-
body: [{
|
901
|
-
type: 'tpl',
|
902
|
-
tpl: i18n("3bb4d608c6bee2b7b6d788417cde04e3")
|
917
|
+
label: i18n("20aadc3f9b7edb564dc58898898e0dc8"),
|
918
|
+
name: 'name'
|
903
919
|
}],
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
920
|
+
__headerHasColumnsToggler: headerHasColumnsToggle,
|
921
|
+
__card: form.data.card || form.data.__card,
|
922
|
+
__listItem: form.data.listItem || form.data.__listItem
|
923
|
+
});
|
924
|
+
form.deleteValueByName('card');
|
925
|
+
form.deleteValueByName('listItem');
|
926
|
+
} else if (value === 'cards') {
|
927
|
+
oldValue === 'table' && form.setValues({
|
928
|
+
__cacheColumnsToggler: columnsToggler
|
929
|
+
});
|
930
|
+
form.setValues({
|
931
|
+
headerToolbar: headerToolbar,
|
932
|
+
card: form.data.__card || {
|
933
|
+
type: 'card',
|
934
|
+
header: {
|
935
|
+
title: i18n("32c65d8d7431e76029678ec7bb73a5ab"),
|
936
|
+
subTitle: i18n("72cf373be86a38b29f6d2f15900b0da1")
|
937
|
+
},
|
938
|
+
body: [{
|
939
|
+
name: 'a',
|
940
|
+
label: 'A'
|
941
|
+
}, {
|
942
|
+
name: 'b',
|
943
|
+
label: 'B'
|
944
|
+
}],
|
945
|
+
actions: [{
|
946
|
+
label: i18n("f26225bde6a250894a04db4c53ea03d0"),
|
947
|
+
type: 'button'
|
948
|
+
}]
|
949
|
+
},
|
950
|
+
__columns: form.data.columns || form.data.__columns,
|
951
|
+
__listItem: form.data.listItem || form.data.__listItem
|
952
|
+
});
|
953
|
+
form.deleteValueByName('columns');
|
954
|
+
form.deleteValueByName('listItem');
|
955
|
+
} else {
|
956
|
+
oldValue === 'table' && form.setValues({
|
957
|
+
__cacheColumnsToggler: columnsToggler
|
958
|
+
});
|
959
|
+
form.setValues({
|
960
|
+
headerToolbar: headerToolbar,
|
961
|
+
listItem: form.data.__listItem || {
|
962
|
+
body: [{
|
963
|
+
type: 'tpl',
|
964
|
+
tpl: i18n("3bb4d608c6bee2b7b6d788417cde04e3")
|
965
|
+
}],
|
966
|
+
actions: [{
|
967
|
+
icon: 'fa fa-eye',
|
968
|
+
type: 'button'
|
969
|
+
}]
|
970
|
+
},
|
971
|
+
__columns: form.data.columns || form.data.__columns,
|
972
|
+
__card: form.data.card || form.data.__card
|
973
|
+
});
|
974
|
+
form.deleteValueByName('columns');
|
975
|
+
form.deleteValueByName('card');
|
952
976
|
}
|
953
|
-
|
954
|
-
return __assign({
|
955
|
-
type: type
|
956
|
-
}, item);
|
957
|
-
});
|
958
|
-
},
|
959
|
-
pipeOut: function (value) {
|
960
|
-
if (Array.isArray(value)) {
|
961
|
-
return value.map(function (item) {
|
962
|
-
if (item.type === 'button') {
|
963
|
-
return JSONPipeIn(__assign({
|
964
|
-
label: i18n("fa966345577ba81af19408f203db968f"),
|
965
|
-
type: 'button'
|
966
|
-
}, item));
|
967
|
-
} else if (item.type === 'tpl') {
|
968
|
-
return JSONPipeIn(__assign({
|
969
|
-
type: 'tpl',
|
970
|
-
tpl: i18n("2d711b09bd0db0ad240cc83b30dd8014")
|
971
|
-
}, item));
|
972
|
-
}
|
973
|
-
|
974
|
-
return item;
|
975
|
-
});
|
976
|
-
}
|
977
|
-
|
978
|
-
return [];
|
979
|
-
},
|
980
|
-
scaffold: {
|
981
|
-
type: 'tpl',
|
982
|
-
tpl: i18n("2d711b09bd0db0ad240cc83b30dd8014")
|
983
|
-
},
|
984
|
-
multiple: true,
|
985
|
-
items: [{
|
986
|
-
type: 'select',
|
987
|
-
name: 'type',
|
988
|
-
columnClassName: 'w-ssm',
|
977
|
+
},
|
989
978
|
options: [{
|
990
|
-
value: '
|
991
|
-
label: i18n("
|
992
|
-
}, {
|
993
|
-
value: 'pagination',
|
994
|
-
label: i18n("3862626c138ce5945e0e273a1bdfbad0")
|
995
|
-
}, {
|
996
|
-
value: 'statistics',
|
997
|
-
label: i18n("439a19857be1fb8d3e6017258e32c486")
|
998
|
-
}, {
|
999
|
-
value: 'switch-per-page',
|
1000
|
-
label: i18n("bc908986a4e4eec3dca3530afd1d4306")
|
979
|
+
value: 'table',
|
980
|
+
label: i18n("b339aa87104709397ba68e7ebbc6e5ba")
|
1001
981
|
}, {
|
1002
|
-
value: '
|
1003
|
-
label: i18n("
|
982
|
+
value: 'cards',
|
983
|
+
label: i18n("d87f215d9ac688b1d3399bf575a0ef6f")
|
1004
984
|
}, {
|
1005
|
-
value: '
|
1006
|
-
label: i18n("
|
1007
|
-
}, {
|
1008
|
-
value: 'export-excel',
|
1009
|
-
label: i18n("7d57852b946d9d4d64fb2a48ca2b4a44")
|
1010
|
-
}, {
|
1011
|
-
value: 'columns-toggler',
|
1012
|
-
label: i18n("16c6099bc0efaa669d8de698c105e333"),
|
1013
|
-
visibleOn: '!this.mode || this.mode === "table"'
|
1014
|
-
}, {
|
1015
|
-
value: 'filter-toggler',
|
1016
|
-
label: i18n("073694928db5b0b5423ebe095ec62d39")
|
1017
|
-
}, {
|
1018
|
-
value: 'drag-toggler',
|
1019
|
-
label: i18n("5b9c3e6ce478196f802722cb09d61f0b")
|
1020
|
-
}, {
|
1021
|
-
value: 'check-all',
|
1022
|
-
label: i18n("66eeacd93a7c1bda93906fe908ad11a0"),
|
1023
|
-
hiddenOn: '!this.mode || this.mode === "table"'
|
1024
|
-
}, {
|
1025
|
-
value: 'tpl',
|
1026
|
-
label: i18n("97d07614380da93d257f9fbf81aa56fb")
|
1027
|
-
}, {
|
1028
|
-
value: 'button',
|
1029
|
-
label: i18n("fa966345577ba81af19408f203db968f")
|
985
|
+
value: 'list',
|
986
|
+
label: i18n("3712972d84adf48acbd6ad24b4d75ad0")
|
1030
987
|
}]
|
1031
|
-
}, {
|
1032
|
-
name: '
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
988
|
+
}, getSchemaTpl('combo-container', {
|
989
|
+
name: 'headerToolbar',
|
990
|
+
type: 'combo',
|
991
|
+
draggable: true,
|
992
|
+
draggableTip: '',
|
993
|
+
descrition: i18n("e4fd8d64804a4f3d743eff384a6eb20a"),
|
994
|
+
label: i18n("14555503d6e09ecd66661d04c882e79b"),
|
995
|
+
pipeIn: function (value) {
|
996
|
+
if (!Array.isArray(value)) {
|
997
|
+
value = value ? [value] : ['bulkActions'];
|
998
|
+
}
|
999
|
+
return value.map(function (item) {
|
1000
|
+
var type = item.type;
|
1001
|
+
if (typeof item === 'string' && ~['bulkActions', 'bulk-actions', 'pagination', 'statistics', 'switch-per-page', 'filter-toggler', 'load-more', 'export-csv', 'export-excel'].indexOf(item)) {
|
1002
|
+
type = item === 'bulkActions' ? 'bulk-actions' : item;
|
1003
|
+
item = {
|
1004
|
+
type: type
|
1005
|
+
};
|
1006
|
+
} else if (typeof item === 'string') {
|
1007
|
+
type = 'tpl';
|
1008
|
+
item = typeof item === 'string' ? {
|
1009
|
+
type: 'tpl',
|
1010
|
+
tpl: item
|
1011
|
+
} : item;
|
1012
|
+
}
|
1013
|
+
return __assign({
|
1014
|
+
type: type
|
1015
|
+
}, item);
|
1016
|
+
});
|
1017
|
+
},
|
1018
|
+
pipeOut: function (value) {
|
1019
|
+
if (Array.isArray(value)) {
|
1020
|
+
return value.map(function (item) {
|
1021
|
+
if (item.type === 'button') {
|
1022
|
+
return JSONPipeIn(__assign({
|
1023
|
+
label: i18n("fa966345577ba81af19408f203db968f"),
|
1024
|
+
type: 'button'
|
1025
|
+
}, item));
|
1026
|
+
} else if (item.type === 'tpl') {
|
1027
|
+
return JSONPipeIn(__assign({
|
1028
|
+
type: 'tpl',
|
1029
|
+
tpl: i18n("2d711b09bd0db0ad240cc83b30dd8014")
|
1030
|
+
}, item));
|
1031
|
+
}
|
1032
|
+
return item;
|
1033
|
+
});
|
1034
|
+
}
|
1035
|
+
return [];
|
1036
|
+
},
|
1037
|
+
scaffold: {
|
1038
|
+
type: 'tpl',
|
1039
|
+
tpl: i18n("2d711b09bd0db0ad240cc83b30dd8014")
|
1040
|
+
},
|
1041
|
+
multiple: true,
|
1042
|
+
items: [{
|
1043
|
+
type: 'select',
|
1044
|
+
name: 'type',
|
1045
|
+
columnClassName: 'w-ssm',
|
1046
|
+
options: [{
|
1047
|
+
value: 'bulk-actions',
|
1048
|
+
label: i18n("8abc564260a1564521e0c3a1d5419b4a")
|
1049
|
+
}, {
|
1050
|
+
value: 'pagination',
|
1051
|
+
label: i18n("3862626c138ce5945e0e273a1bdfbad0")
|
1052
|
+
}, {
|
1053
|
+
value: 'statistics',
|
1054
|
+
label: i18n("439a19857be1fb8d3e6017258e32c486")
|
1055
|
+
}, {
|
1056
|
+
value: 'switch-per-page',
|
1057
|
+
label: i18n("bc908986a4e4eec3dca3530afd1d4306")
|
1058
|
+
}, {
|
1059
|
+
value: 'load-more',
|
1060
|
+
label: i18n("77281549955309c49f5eef77838a85e5")
|
1061
|
+
}, {
|
1062
|
+
value: 'export-csv',
|
1063
|
+
label: i18n("1add12ff3338a990b60154b75019c348")
|
1064
|
+
}, {
|
1065
|
+
value: 'export-excel',
|
1066
|
+
label: i18n("7d57852b946d9d4d64fb2a48ca2b4a44")
|
1067
|
+
}, {
|
1068
|
+
value: 'columns-toggler',
|
1069
|
+
label: i18n("16c6099bc0efaa669d8de698c105e333"),
|
1070
|
+
visibleOn: '!this.mode || this.mode === "table"'
|
1071
|
+
}, {
|
1072
|
+
value: 'filter-toggler',
|
1073
|
+
label: i18n("073694928db5b0b5423ebe095ec62d39")
|
1074
|
+
}, {
|
1075
|
+
value: 'drag-toggler',
|
1076
|
+
label: i18n("5b9c3e6ce478196f802722cb09d61f0b")
|
1077
|
+
}, {
|
1078
|
+
value: 'check-all',
|
1079
|
+
label: i18n("66eeacd93a7c1bda93906fe908ad11a0"),
|
1080
|
+
hiddenOn: '!this.mode || this.mode === "table"'
|
1081
|
+
}, {
|
1082
|
+
value: 'tpl',
|
1083
|
+
label: i18n("97d07614380da93d257f9fbf81aa56fb")
|
1084
|
+
}, {
|
1085
|
+
value: 'button',
|
1086
|
+
label: i18n("fa966345577ba81af19408f203db968f")
|
1087
|
+
}]
|
1039
1088
|
}, {
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
// columnClassName: 'no-grow w-3x p-t-xs',
|
1052
|
-
// className: 'm-l-none'
|
1053
|
-
// }
|
1054
|
-
]
|
1055
|
-
}, {
|
1056
|
-
name: 'footerToolbar',
|
1057
|
-
type: 'combo',
|
1058
|
-
draggable: true,
|
1059
|
-
draggableTip: '',
|
1060
|
-
descrition: i18n("e4fd8d64804a4f3d743eff384a6eb20a"),
|
1061
|
-
label: i18n("1325969c143a639294c1c6ab370b35a3"),
|
1062
|
-
pipeIn: function (value) {
|
1063
|
-
if (!Array.isArray(value)) {
|
1064
|
-
value = value ? [value] : ['statistics', 'pagination'];
|
1089
|
+
name: 'align',
|
1090
|
+
placeholder: i18n("d5bc35360607472de4525358af126de4"),
|
1091
|
+
type: 'select',
|
1092
|
+
size: 'xs',
|
1093
|
+
options: [{
|
1094
|
+
label: i18n("413f48cc71f71083ce532a86e3efdc21"),
|
1095
|
+
value: 'left'
|
1096
|
+
}, {
|
1097
|
+
label: i18n("fd8e9572cc6bf87653c4d8f8b8dd0db9"),
|
1098
|
+
value: 'right'
|
1099
|
+
}]
|
1065
1100
|
}
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1101
|
+
// {
|
1102
|
+
// type: 'remark',
|
1103
|
+
// content: '详情请在预览区域选中后进行编辑。',
|
1104
|
+
// trigger: ['click'],
|
1105
|
+
// rootClose: true,
|
1106
|
+
// placement: 'left',
|
1107
|
+
// visibleOn:
|
1108
|
+
// '!~["bulkActions", "drag-toggler", "check-all", "bulk-actions", "pagination", "statistics", "switch-per-page", "filter-toggler", "load-more"].indexOf(this.type)',
|
1109
|
+
// columnClassName: 'no-grow w-3x p-t-xs',
|
1110
|
+
// className: 'm-l-none'
|
1111
|
+
// }
|
1112
|
+
]
|
1113
|
+
}), getSchemaTpl('combo-container', {
|
1114
|
+
name: 'footerToolbar',
|
1115
|
+
type: 'combo',
|
1116
|
+
draggable: true,
|
1117
|
+
draggableTip: '',
|
1118
|
+
descrition: i18n("e4fd8d64804a4f3d743eff384a6eb20a"),
|
1119
|
+
label: i18n("1325969c143a639294c1c6ab370b35a3"),
|
1120
|
+
pipeIn: function (value) {
|
1121
|
+
if (!Array.isArray(value)) {
|
1122
|
+
value = value ? [value] : ['statistics', 'pagination'];
|
1081
1123
|
}
|
1082
|
-
|
1083
|
-
return __assign({
|
1084
|
-
type: type
|
1085
|
-
}, item);
|
1086
|
-
});
|
1087
|
-
},
|
1088
|
-
pipeOut: function (value) {
|
1089
|
-
if (Array.isArray(value)) {
|
1090
1124
|
return value.map(function (item) {
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1125
|
+
var type = item.type;
|
1126
|
+
if (typeof item === 'string' && ~['bulkActions', 'bulk-actions', 'pagination', 'statistics', 'switch-per-page', 'filter-toggler', 'load-more', 'export-csv', 'export-excel'].indexOf(item)) {
|
1127
|
+
type = item === 'bulkActions' ? 'bulk-actions' : item;
|
1128
|
+
item = {
|
1129
|
+
type: type
|
1130
|
+
};
|
1131
|
+
} else if (typeof item === 'string') {
|
1132
|
+
type = 'tpl';
|
1133
|
+
item = typeof item === 'string' ? {
|
1098
1134
|
type: 'tpl',
|
1099
|
-
tpl:
|
1100
|
-
}
|
1135
|
+
tpl: item
|
1136
|
+
} : item;
|
1101
1137
|
}
|
1102
|
-
|
1103
|
-
|
1138
|
+
return __assign({
|
1139
|
+
type: type
|
1140
|
+
}, item);
|
1104
1141
|
});
|
1105
|
-
}
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
|
1115
|
-
|
1116
|
-
|
1117
|
-
|
1118
|
-
|
1119
|
-
|
1120
|
-
|
1121
|
-
|
1122
|
-
|
1123
|
-
|
1124
|
-
},
|
1125
|
-
|
1126
|
-
|
1127
|
-
|
1128
|
-
|
1129
|
-
|
1130
|
-
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1153
|
-
|
1154
|
-
|
1155
|
-
|
1142
|
+
},
|
1143
|
+
pipeOut: function (value) {
|
1144
|
+
if (Array.isArray(value)) {
|
1145
|
+
return value.map(function (item) {
|
1146
|
+
if (item.type === 'button') {
|
1147
|
+
return JSONPipeIn(__assign({
|
1148
|
+
label: i18n("fa966345577ba81af19408f203db968f"),
|
1149
|
+
type: 'button'
|
1150
|
+
}, item));
|
1151
|
+
} else if (item.type === 'tpl') {
|
1152
|
+
return JSONPipeIn(__assign({
|
1153
|
+
type: 'tpl',
|
1154
|
+
tpl: i18n("2d711b09bd0db0ad240cc83b30dd8014")
|
1155
|
+
}, item));
|
1156
|
+
}
|
1157
|
+
return item;
|
1158
|
+
});
|
1159
|
+
}
|
1160
|
+
return [];
|
1161
|
+
},
|
1162
|
+
scaffold: {
|
1163
|
+
type: 'tpl',
|
1164
|
+
tpl: i18n("2d711b09bd0db0ad240cc83b30dd8014")
|
1165
|
+
},
|
1166
|
+
multiple: true,
|
1167
|
+
items: [{
|
1168
|
+
type: 'select',
|
1169
|
+
name: 'type',
|
1170
|
+
columnClassName: 'w-ssm',
|
1171
|
+
options: [{
|
1172
|
+
value: 'bulk-actions',
|
1173
|
+
label: i18n("8abc564260a1564521e0c3a1d5419b4a")
|
1174
|
+
}, {
|
1175
|
+
value: 'pagination',
|
1176
|
+
label: i18n("3862626c138ce5945e0e273a1bdfbad0")
|
1177
|
+
}, {
|
1178
|
+
value: 'statistics',
|
1179
|
+
label: i18n("439a19857be1fb8d3e6017258e32c486")
|
1180
|
+
}, {
|
1181
|
+
value: 'switch-per-page',
|
1182
|
+
label: i18n("bc908986a4e4eec3dca3530afd1d4306")
|
1183
|
+
}, {
|
1184
|
+
value: 'load-more',
|
1185
|
+
label: i18n("77281549955309c49f5eef77838a85e5")
|
1186
|
+
}, {
|
1187
|
+
value: 'export-csv',
|
1188
|
+
label: i18n("1add12ff3338a990b60154b75019c348")
|
1189
|
+
}, {
|
1190
|
+
value: 'export-excel',
|
1191
|
+
label: i18n("7d57852b946d9d4d64fb2a48ca2b4a44")
|
1192
|
+
}, {
|
1193
|
+
value: 'columns-toggler',
|
1194
|
+
label: i18n("16c6099bc0efaa669d8de698c105e333"),
|
1195
|
+
hiddenOn: '["grid", "cards", "list"].indexOf(this.mode)'
|
1196
|
+
}, {
|
1197
|
+
value: 'filter-toggler',
|
1198
|
+
label: i18n("073694928db5b0b5423ebe095ec62d39")
|
1199
|
+
}, {
|
1200
|
+
value: 'drag-toggler',
|
1201
|
+
label: i18n("5b9c3e6ce478196f802722cb09d61f0b")
|
1202
|
+
}, {
|
1203
|
+
value: 'check-all',
|
1204
|
+
label: i18n("66eeacd93a7c1bda93906fe908ad11a0"),
|
1205
|
+
hiddenOn: '!this.mode || this.mode === "table"'
|
1206
|
+
}, {
|
1207
|
+
value: 'tpl',
|
1208
|
+
label: i18n("97d07614380da93d257f9fbf81aa56fb")
|
1209
|
+
}, {
|
1210
|
+
value: 'button',
|
1211
|
+
label: i18n("fa966345577ba81af19408f203db968f")
|
1212
|
+
}]
|
1156
1213
|
}, {
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
1161
|
-
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1214
|
+
name: 'align',
|
1215
|
+
placeholder: i18n("d5bc35360607472de4525358af126de4"),
|
1216
|
+
size: 'xs',
|
1217
|
+
type: 'select',
|
1218
|
+
options: [{
|
1219
|
+
label: i18n("413f48cc71f71083ce532a86e3efdc21"),
|
1220
|
+
value: 'left'
|
1221
|
+
}, {
|
1222
|
+
label: i18n("fd8e9572cc6bf87653c4d8f8b8dd0db9"),
|
1223
|
+
value: 'right'
|
1224
|
+
}]
|
1168
1225
|
}, {
|
1169
|
-
|
1170
|
-
|
1226
|
+
type: 'remark',
|
1227
|
+
content: i18n("440a3a2d7f1b123718be75e2baee8391"),
|
1228
|
+
trigger: ['click'],
|
1229
|
+
rootClose: true,
|
1230
|
+
placement: 'left',
|
1231
|
+
visibleOn: '!~["bulkActions", "drag-toggler", "check-all", "bulk-actions", "pagination", "statistics", "switch-per-page", "filter-toggler", "load-more", "export-csv", "export-excel"].indexOf(this.type)',
|
1232
|
+
columnClassName: 'no-grow w-3x p-t-xs',
|
1233
|
+
className: 'm-l-none'
|
1171
1234
|
}]
|
1172
|
-
}, {
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
}
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
1194
|
-
|
1195
|
-
name: 'alwaysShowPagination',
|
1196
|
-
label: i18n("fa9417bacb7714e82663655345ca213d")
|
1197
|
-
}), getSchemaTpl('switch', {
|
1198
|
-
name: 'hideCheckToggler',
|
1199
|
-
label: i18n("e3d2a85f20608a5bde7d539969d03167"),
|
1200
|
-
visibleOn: 'data.checkOnItemClick'
|
1201
|
-
}), getSchemaTpl('className'), getSchemaTpl('className', {
|
1202
|
-
name: 'bodyClassName',
|
1203
|
-
label: i18n("af1af0a7fad9e8bdcd21694d0e036e12")
|
1204
|
-
})]
|
1205
|
-
}, {
|
1206
|
-
title: i18n("0d98c74797e49d00bcc4c17c9d557a2b"),
|
1207
|
-
body: [getSchemaTpl('ref'), {
|
1208
|
-
name: 'source',
|
1209
|
-
label: i18n("c11322c9cc43ce3c004cf03f5ac0acd0"),
|
1210
|
-
type: 'input-text',
|
1211
|
-
description: i18n("62569fcb0fc8314daea97989bba3877c")
|
1212
|
-
}, {
|
1213
|
-
name: 'perPage',
|
1214
|
-
label: i18n("606bc931d2b3ebba2569cb1494719e2c"),
|
1215
|
-
type: 'input-number'
|
1216
|
-
}, getSchemaTpl('switch', {
|
1217
|
-
name: 'keepItemSelectionOnPageChange',
|
1218
|
-
label: i18n("004d01f56242e07cbdc97256bb11c75b")
|
1219
|
-
}), {
|
1220
|
-
name: 'maxKeepItemSelectionLength',
|
1221
|
-
label: i18n("3d330edb46341a26ccc9aaa7f7938a8e"),
|
1222
|
-
type: 'input-number',
|
1223
|
-
mode: 'inline',
|
1224
|
-
className: 'block'
|
1225
|
-
}, {
|
1226
|
-
name: 'pageField',
|
1227
|
-
label: i18n("95e68bea2d8c8e41ffa619d4364a0d6f"),
|
1228
|
-
type: 'input-text',
|
1229
|
-
pipeIn: defaultValue('page')
|
1235
|
+
}), getSchemaTpl('switch', {
|
1236
|
+
name: 'filterTogglable',
|
1237
|
+
label: i18n("34da7e4a0ecdb63967427f43adf2de3e"),
|
1238
|
+
visibleOn: 'data.filter'
|
1239
|
+
}), getSchemaTpl('switch', {
|
1240
|
+
name: 'filterDefaultVisible',
|
1241
|
+
label: i18n("25c0db3ddce9bfffd497d0c824cf3c72"),
|
1242
|
+
visibleOn: 'data.filter && data.filterTogglable',
|
1243
|
+
pipeIn: defaultValue(true)
|
1244
|
+
}), getSchemaTpl('switch', {
|
1245
|
+
name: 'hideQuickSaveBtn',
|
1246
|
+
label: i18n("259d11c300a365b6767228c12d29ce53")
|
1247
|
+
}), getSchemaTpl('switch', {
|
1248
|
+
name: 'alwaysShowPagination',
|
1249
|
+
label: i18n("fa9417bacb7714e82663655345ca213d")
|
1250
|
+
}), getSchemaTpl('switch', {
|
1251
|
+
name: 'hideCheckToggler',
|
1252
|
+
label: i18n("e3d2a85f20608a5bde7d539969d03167"),
|
1253
|
+
visibleOn: 'data.checkOnItemClick'
|
1254
|
+
}), getSchemaTpl('className'), getSchemaTpl('className', {
|
1255
|
+
name: 'bodyClassName',
|
1256
|
+
label: i18n("af1af0a7fad9e8bdcd21694d0e036e12")
|
1257
|
+
})]
|
1230
1258
|
}, {
|
1231
|
-
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
|
1236
|
-
|
1237
|
-
|
1238
|
-
|
1239
|
-
|
1240
|
-
|
1241
|
-
|
1242
|
-
|
1243
|
-
|
1244
|
-
|
1245
|
-
|
1246
|
-
|
1247
|
-
name: 'perPageAvailable',
|
1248
|
-
label: i18n("e04e8f570e2fb43a533b224f3c48523d"),
|
1249
|
-
type: 'input-array',
|
1250
|
-
hiddenOn: 'data.loadDataOnce',
|
1251
|
-
items: {
|
1259
|
+
title: i18n("0d98c74797e49d00bcc4c17c9d557a2b"),
|
1260
|
+
body: [getSchemaTpl('ref'), {
|
1261
|
+
name: 'source',
|
1262
|
+
label: i18n("c11322c9cc43ce3c004cf03f5ac0acd0"),
|
1263
|
+
type: 'input-text',
|
1264
|
+
description: i18n("62569fcb0fc8314daea97989bba3877c")
|
1265
|
+
}, {
|
1266
|
+
name: 'perPage',
|
1267
|
+
label: i18n("606bc931d2b3ebba2569cb1494719e2c"),
|
1268
|
+
type: 'input-number'
|
1269
|
+
}, getSchemaTpl('switch', {
|
1270
|
+
name: 'keepItemSelectionOnPageChange',
|
1271
|
+
label: i18n("004d01f56242e07cbdc97256bb11c75b")
|
1272
|
+
}), {
|
1273
|
+
name: 'maxKeepItemSelectionLength',
|
1274
|
+
label: i18n("3d330edb46341a26ccc9aaa7f7938a8e"),
|
1252
1275
|
type: 'input-number',
|
1253
|
-
|
1254
|
-
|
1255
|
-
|
1256
|
-
|
1257
|
-
|
1258
|
-
|
1259
|
-
|
1260
|
-
|
1261
|
-
|
1262
|
-
|
1263
|
-
|
1264
|
-
|
1265
|
-
|
1266
|
-
|
1267
|
-
|
1268
|
-
|
1269
|
-
|
1270
|
-
|
1271
|
-
|
1272
|
-
|
1273
|
-
|
1274
|
-
|
1275
|
-
|
1276
|
-
|
1277
|
-
|
1278
|
-
|
1279
|
-
|
1280
|
-
|
1276
|
+
mode: 'inline',
|
1277
|
+
className: 'block'
|
1278
|
+
}, {
|
1279
|
+
name: 'pageField',
|
1280
|
+
label: i18n("95e68bea2d8c8e41ffa619d4364a0d6f"),
|
1281
|
+
type: 'input-text',
|
1282
|
+
pipeIn: defaultValue('page')
|
1283
|
+
}, {
|
1284
|
+
name: 'perPageField',
|
1285
|
+
label: i18n("537f8b09437bdb7fac429dc4e8666763"),
|
1286
|
+
type: 'input-text',
|
1287
|
+
pipeIn: defaultValue('perPage')
|
1288
|
+
}, {
|
1289
|
+
name: 'orderField',
|
1290
|
+
label: i18n("30c7bd5acd4564057bd89e0846f01728"),
|
1291
|
+
type: 'input-text',
|
1292
|
+
labelRemark: {
|
1293
|
+
className: 'm-l-xs',
|
1294
|
+
trigger: 'click',
|
1295
|
+
rootClose: true,
|
1296
|
+
content: i18n("dd8d217677e4c5df28b7f46aa99b22a8"),
|
1297
|
+
placement: 'left'
|
1298
|
+
}
|
1299
|
+
}, {
|
1300
|
+
name: 'perPageAvailable',
|
1301
|
+
label: i18n("e04e8f570e2fb43a533b224f3c48523d"),
|
1302
|
+
type: 'input-array',
|
1303
|
+
hiddenOn: 'data.loadDataOnce',
|
1304
|
+
items: {
|
1305
|
+
type: 'input-number',
|
1306
|
+
required: true
|
1307
|
+
},
|
1308
|
+
value: [10]
|
1309
|
+
}, getSchemaTpl('name'), {
|
1310
|
+
name: 'itemCheckableOn',
|
1311
|
+
type: 'input-text',
|
1312
|
+
label: i18n("0fc1de8f71a7470213fc68f981abdbc2"),
|
1313
|
+
description: i18n("7d5fefd589000879088063dceb4b2552"),
|
1314
|
+
visibleOn: 'data.bulkActions && data.bulkActions.length || data.pickerMode'
|
1315
|
+
}, getSchemaTpl('switch', {
|
1316
|
+
name: 'checkOnItemClick',
|
1317
|
+
label: i18n("614ec7801e03f7ee009e4448e6ed4001"),
|
1318
|
+
visibleOn: 'data.bulkActions && data.bulkActions.length || data.pickerMode'
|
1319
|
+
}), getSchemaTpl('switch', {
|
1320
|
+
name: 'autoJumpToTopOnPagerChange',
|
1321
|
+
label: i18n("530ab79908eabe5b329ffe17695079e2"),
|
1322
|
+
description: i18n("9092afb1ccb692308ef06d8001da2208")
|
1323
|
+
}), getSchemaTpl('switch', {
|
1324
|
+
name: 'syncResponse2Query',
|
1325
|
+
label: i18n("c8cf39b24bb52d0562472c33b86824fe"),
|
1326
|
+
description: i18n("d3c172700af4f3f3afb028d6bb4a90a4")
|
1327
|
+
})]
|
1328
|
+
}]);
|
1329
|
+
}
|
1330
|
+
});
|
1331
|
+
Object.defineProperty(_this, "wrapperProps", {
|
1332
|
+
enumerable: true,
|
1333
|
+
configurable: true,
|
1334
|
+
writable: true,
|
1335
|
+
value: {
|
1336
|
+
affixHeader: false
|
1337
|
+
}
|
1338
|
+
});
|
1281
1339
|
return _this;
|
1282
1340
|
}
|
1283
|
-
|
1284
|
-
|
1285
|
-
|
1286
|
-
|
1287
|
-
|
1288
|
-
|
1289
|
-
|
1290
|
-
|
1341
|
+
Object.defineProperty(CRUDPlugin.prototype, "addItem", {
|
1342
|
+
enumerable: false,
|
1343
|
+
configurable: true,
|
1344
|
+
writable: true,
|
1345
|
+
value: function (source, target) {
|
1346
|
+
var canAdd = source.find(function (item) {
|
1347
|
+
return item.label === target.label;
|
1348
|
+
});
|
1349
|
+
if (!canAdd) {
|
1350
|
+
source.push(target);
|
1351
|
+
}
|
1291
1352
|
}
|
1292
|
-
};
|
1293
|
-
|
1294
|
-
|
1295
|
-
|
1296
|
-
|
1297
|
-
|
1298
|
-
|
1299
|
-
|
1300
|
-
|
1353
|
+
});
|
1354
|
+
Object.defineProperty(CRUDPlugin.prototype, "handleBulkActionEdit", {
|
1355
|
+
enumerable: false,
|
1356
|
+
configurable: true,
|
1357
|
+
writable: true,
|
1358
|
+
value: function (id, index) {
|
1359
|
+
var store = this.manager.store;
|
1360
|
+
var schema = store.getSchema(id);
|
1361
|
+
var action = schema === null || schema === void 0 ? void 0 : schema.bulkActions[index];
|
1362
|
+
if (action && action.$$id) {
|
1363
|
+
store.setActiveId(action.$$id);
|
1364
|
+
}
|
1301
1365
|
}
|
1302
|
-
};
|
1303
|
-
|
1304
|
-
|
1305
|
-
|
1306
|
-
|
1307
|
-
|
1308
|
-
|
1309
|
-
|
1310
|
-
|
1366
|
+
});
|
1367
|
+
Object.defineProperty(CRUDPlugin.prototype, "handleItemActionEdit", {
|
1368
|
+
enumerable: false,
|
1369
|
+
configurable: true,
|
1370
|
+
writable: true,
|
1371
|
+
value: function (id, index) {
|
1372
|
+
var store = this.manager.store;
|
1373
|
+
var schema = store.getSchema(id);
|
1374
|
+
var action = schema === null || schema === void 0 ? void 0 : schema.itemActions[index];
|
1375
|
+
if (action && action.$$id) {
|
1376
|
+
store.setActiveId(action.$$id);
|
1377
|
+
}
|
1311
1378
|
}
|
1312
|
-
};
|
1379
|
+
});
|
1313
1380
|
/**
|
1314
1381
|
* 默认什么组件都加入的子组件里面,子类里面可以复写这个改变行为。
|
1315
1382
|
* @param context
|
1316
1383
|
* @param renderers
|
1317
1384
|
*/
|
1318
|
-
|
1319
|
-
|
1320
|
-
|
1321
|
-
|
1322
|
-
|
1323
|
-
|
1324
|
-
|
1325
|
-
|
1326
|
-
|
1327
|
-
|
1328
|
-
|
1329
|
-
|
1330
|
-
|
1331
|
-
|
1332
|
-
|
1333
|
-
|
1334
|
-
|
1335
|
-
|
1336
|
-
|
1337
|
-
|
1338
|
-
|
1339
|
-
|
1340
|
-
|
1341
|
-
|
1342
|
-
CRUDPlugin.prototype.getRendererInfo = function (context) {
|
1343
|
-
var info = _super.prototype.getRendererInfo.call(this, context);
|
1344
|
-
|
1345
|
-
if (info) {
|
1346
|
-
info.scaffoldForm = this.scaffoldForm;
|
1385
|
+
Object.defineProperty(CRUDPlugin.prototype, "buildSubRenderers", {
|
1386
|
+
enumerable: false,
|
1387
|
+
configurable: true,
|
1388
|
+
writable: true,
|
1389
|
+
value: function (context, renderers) {
|
1390
|
+
var plugin = this;
|
1391
|
+
if (plugin.name && plugin.description) {
|
1392
|
+
return {
|
1393
|
+
name: plugin.name,
|
1394
|
+
icon: plugin.icon,
|
1395
|
+
pluginIcon: plugin.pluginIcon,
|
1396
|
+
description: plugin.description,
|
1397
|
+
previewSchema: plugin.previewSchema,
|
1398
|
+
tags: plugin.tags,
|
1399
|
+
docLink: plugin.docLink,
|
1400
|
+
type: plugin.type,
|
1401
|
+
scaffold: plugin.scaffold,
|
1402
|
+
disabledRendererPlugin: plugin.disabledRendererPlugin,
|
1403
|
+
isBaseComponent: plugin.isBaseComponent,
|
1404
|
+
scaffoldForm: this.scaffoldForm,
|
1405
|
+
rendererName: plugin.rendererName
|
1406
|
+
};
|
1407
|
+
}
|
1347
1408
|
}
|
1348
|
-
|
1349
|
-
|
1350
|
-
|
1351
|
-
|
1352
|
-
|
1353
|
-
|
1354
|
-
|
1355
|
-
|
1356
|
-
|
1357
|
-
|
1358
|
-
|
1359
|
-
doms.push(React__default.createElement("div", {
|
1360
|
-
key: "bulkActions",
|
1361
|
-
className: "ae-EditableRender"
|
1362
|
-
}, React__default.createElement("div", {
|
1363
|
-
className: "ae-EditableRender-title"
|
1364
|
-
}, "\u6279\u91CF\u64CD\u4F5C"), React__default.createElement("div", {
|
1365
|
-
className: "ae-EditableRender-body"
|
1366
|
-
}, bulkActions.map(function (action) {
|
1367
|
-
return render('bulk-action', __assign({
|
1368
|
-
type: 'button',
|
1369
|
-
size: 'sm'
|
1370
|
-
}, action), {
|
1371
|
-
key: action.$$id
|
1372
|
-
});
|
1373
|
-
}))));
|
1409
|
+
});
|
1410
|
+
Object.defineProperty(CRUDPlugin.prototype, "getRendererInfo", {
|
1411
|
+
enumerable: false,
|
1412
|
+
configurable: true,
|
1413
|
+
writable: true,
|
1414
|
+
value: function (context) {
|
1415
|
+
var info = _super.prototype.getRendererInfo.call(this, context);
|
1416
|
+
if (info) {
|
1417
|
+
info.scaffoldForm = this.scaffoldForm;
|
1418
|
+
}
|
1419
|
+
return info;
|
1374
1420
|
}
|
1375
|
-
|
1376
|
-
|
1377
|
-
|
1378
|
-
|
1379
|
-
|
1421
|
+
});
|
1422
|
+
Object.defineProperty(CRUDPlugin.prototype, "renderEditableComponents", {
|
1423
|
+
enumerable: false,
|
1424
|
+
configurable: true,
|
1425
|
+
writable: true,
|
1426
|
+
value: function (props) {
|
1427
|
+
var render = props.render;
|
1428
|
+
var bulkActions = props.bulkActions;
|
1429
|
+
var itemActions = props.itemActions;
|
1430
|
+
var doms = [];
|
1431
|
+
if (Array.isArray(bulkActions) && bulkActions.length) {
|
1432
|
+
doms.push(React__default.createElement("div", {
|
1433
|
+
key: "bulkActions",
|
1434
|
+
className: "ae-EditableRender"
|
1435
|
+
}, React__default.createElement("div", {
|
1436
|
+
className: "ae-EditableRender-title"
|
1437
|
+
}, "\u6279\u91CF\u64CD\u4F5C"), React__default.createElement("div", {
|
1438
|
+
className: "ae-EditableRender-body"
|
1439
|
+
}, bulkActions.map(function (action) {
|
1440
|
+
return render('bulk-action', __assign({
|
1441
|
+
type: 'button',
|
1442
|
+
size: 'sm'
|
1443
|
+
}, action), {
|
1444
|
+
key: action.$$id
|
1445
|
+
});
|
1446
|
+
}))));
|
1447
|
+
}
|
1448
|
+
if (Array.isArray(itemActions) && itemActions.length) {
|
1449
|
+
doms.push(React__default.createElement("div", {
|
1450
|
+
key: "itemActions",
|
1451
|
+
className: "ae-EditableRender"
|
1452
|
+
}, React__default.createElement("div", {
|
1453
|
+
className: "ae-EditableRender-title"
|
1454
|
+
}, "\u5355\u6761\u64CD\u4F5C"), React__default.createElement("div", {
|
1455
|
+
className: "ae-EditableRender-body"
|
1456
|
+
}, itemActions.map(function (action) {
|
1457
|
+
return render('bulk-action', __assign({
|
1458
|
+
type: 'button',
|
1459
|
+
size: 'sm'
|
1460
|
+
}, action), {
|
1461
|
+
key: action.$$id
|
1462
|
+
});
|
1463
|
+
}))));
|
1464
|
+
}
|
1465
|
+
if (!doms.length) {
|
1466
|
+
return null;
|
1467
|
+
}
|
1468
|
+
return React__default.createElement("div", {
|
1469
|
+
className: "ae-EditableRenderers"
|
1380
1470
|
}, React__default.createElement("div", {
|
1381
|
-
className: "ae-
|
1382
|
-
}, "\
|
1383
|
-
className: "ae-EditableRender-body"
|
1384
|
-
}, itemActions.map(function (action) {
|
1385
|
-
return render('bulk-action', __assign({
|
1386
|
-
type: 'button',
|
1387
|
-
size: 'sm'
|
1388
|
-
}, action), {
|
1389
|
-
key: action.$$id
|
1390
|
-
});
|
1391
|
-
}))));
|
1471
|
+
className: "ae-EditableRenderers-tip"
|
1472
|
+
}, "\u300C\u589E\u5220\u6539\u67E5\u300D\u7F16\u8F91\u8F85\u52A9\u533A"), doms);
|
1392
1473
|
}
|
1393
|
-
|
1394
|
-
|
1395
|
-
|
1474
|
+
});
|
1475
|
+
Object.defineProperty(CRUDPlugin.prototype, "renderRenderer", {
|
1476
|
+
enumerable: false,
|
1477
|
+
configurable: true,
|
1478
|
+
writable: true,
|
1479
|
+
value: function (props) {
|
1480
|
+
var $$editor = props.$$editor;
|
1481
|
+
var renderer = $$editor.renderer;
|
1482
|
+
return React__default.createElement("div", {
|
1483
|
+
className: "ae-CRUDEditor"
|
1484
|
+
}, this.renderEditableComponents(props), React__default.createElement(renderer.component, __assign({}, props)));
|
1396
1485
|
}
|
1397
|
-
|
1398
|
-
|
1399
|
-
|
1400
|
-
|
1401
|
-
|
1402
|
-
|
1403
|
-
|
1404
|
-
|
1405
|
-
|
1406
|
-
|
1407
|
-
var renderer = $$editor.renderer;
|
1408
|
-
return React__default.createElement("div", {
|
1409
|
-
className: "ae-CRUDEditor"
|
1410
|
-
}, this.renderEditableComponents(props), React__default.createElement(renderer.component, __assign({}, props)));
|
1411
|
-
};
|
1412
|
-
|
1413
|
-
CRUDPlugin.prototype.filterProps = function (props) {
|
1414
|
-
if (props.pickerMode) {
|
1415
|
-
props.options = props.data.options;
|
1486
|
+
});
|
1487
|
+
Object.defineProperty(CRUDPlugin.prototype, "filterProps", {
|
1488
|
+
enumerable: false,
|
1489
|
+
configurable: true,
|
1490
|
+
writable: true,
|
1491
|
+
value: function (props) {
|
1492
|
+
if (props.pickerMode) {
|
1493
|
+
props.options = props.data.options;
|
1494
|
+
}
|
1495
|
+
return props;
|
1416
1496
|
}
|
1417
|
-
|
1418
|
-
|
1419
|
-
|
1420
|
-
|
1421
|
-
|
1422
|
-
|
1423
|
-
|
1424
|
-
var _a;
|
1425
|
-
|
1426
|
-
var context = event.context; // mode 内容形式变化,需要重新构建面板。
|
1427
|
-
|
1428
|
-
if (context.info.plugin === this && ((_a = context.diff) === null || _a === void 0 ? void 0 : _a.some(function (change) {
|
1497
|
+
});
|
1498
|
+
Object.defineProperty(CRUDPlugin.prototype, "afterUpdate", {
|
1499
|
+
enumerable: false,
|
1500
|
+
configurable: true,
|
1501
|
+
writable: true,
|
1502
|
+
value: function (event) {
|
1503
|
+
var _this = this;
|
1429
1504
|
var _a;
|
1430
|
-
|
1431
|
-
|
1432
|
-
|
1433
|
-
|
1434
|
-
|
1435
|
-
|
1436
|
-
|
1437
|
-
|
1505
|
+
var context = event.context;
|
1506
|
+
// mode 内容形式变化,需要重新构建面板。
|
1507
|
+
if (context.info.plugin === this && ((_a = context.diff) === null || _a === void 0 ? void 0 : _a.some(function (change) {
|
1508
|
+
var _a;
|
1509
|
+
return ((_a = change.path) === null || _a === void 0 ? void 0 : _a.join('.')) === 'mode';
|
1510
|
+
}))) {
|
1511
|
+
setTimeout(function () {
|
1512
|
+
_this.manager.buildPanels();
|
1513
|
+
_this.manager.buildToolbars();
|
1514
|
+
}, 20);
|
1515
|
+
}
|
1438
1516
|
}
|
1439
|
-
};
|
1440
|
-
|
1441
|
-
|
1442
|
-
|
1517
|
+
});
|
1518
|
+
Object.defineProperty(CRUDPlugin.prototype, "buildDataSchemas", {
|
1519
|
+
enumerable: false,
|
1520
|
+
configurable: true,
|
1521
|
+
writable: true,
|
1522
|
+
value: function (node, region) {
|
1523
|
+
var _a, _b;
|
1524
|
+
return __awaiter(this, void 0, void 0, function () {
|
1525
|
+
var child;
|
1526
|
+
return __generator(this, function (_c) {
|
1527
|
+
child = node.children.find(function (item) {
|
1528
|
+
return !!~['table', 'table2', 'cards', 'list'].indexOf(item.type);
|
1529
|
+
});
|
1530
|
+
if (!((_b = (_a = child === null || child === void 0 ? void 0 : child.info) === null || _a === void 0 ? void 0 : _a.plugin) === null || _b === void 0 ? void 0 : _b.buildDataSchemas)) {
|
1531
|
+
return [2 /*return*/];
|
1532
|
+
}
|
1443
1533
|
|
1444
|
-
|
1445
|
-
var child;
|
1446
|
-
return __generator(this, function (_c) {
|
1447
|
-
child = node.children.find(function (item) {
|
1448
|
-
return !!~['table', 'table2', 'cards', 'list'].indexOf(item.type);
|
1534
|
+
return [2 /*return*/, child.info.plugin.buildDataSchemas(child)];
|
1449
1535
|
});
|
1450
|
-
|
1451
|
-
if (!((_b = (_a = child === null || child === void 0 ? void 0 : child.info) === null || _a === void 0 ? void 0 : _a.plugin) === null || _b === void 0 ? void 0 : _b.buildDataSchemas)) {
|
1452
|
-
return [2
|
1453
|
-
/*return*/
|
1454
|
-
];
|
1455
|
-
}
|
1456
|
-
|
1457
|
-
return [2
|
1458
|
-
/*return*/
|
1459
|
-
, child.info.plugin.buildDataSchemas(child)];
|
1460
1536
|
});
|
1461
|
-
}
|
1462
|
-
};
|
1463
|
-
|
1537
|
+
}
|
1538
|
+
});
|
1464
1539
|
return CRUDPlugin;
|
1465
1540
|
}(BasePlugin);
|
1466
1541
|
registerEditorPlugin(CRUDPlugin);
|