amis-editor 5.5.0 → 5.6.1
Sign up to get free protection for your applications and to get access to all the features.
- package/esm/builder/ApiDSBuilder.d.ts +491 -0
- package/esm/builder/ApiDSBuilder.js +1212 -0
- package/esm/builder/DSBuilder.d.ts +171 -0
- package/esm/builder/DSBuilder.js +49 -0
- package/esm/builder/DSBuilderManager.d.ts +62 -0
- package/esm/builder/DSBuilderManager.js +207 -0
- package/esm/builder/constants.d.ts +97 -0
- package/esm/builder/constants.js +135 -0
- package/esm/builder/index.d.ts +6 -0
- package/esm/builder/type.d.ts +96 -0
- package/esm/builder/utils.d.ts +10 -0
- package/esm/builder/utils.js +93 -0
- package/esm/component/BaseControl.js +5 -3
- package/esm/component/InputComponentName.js +3 -1
- package/esm/component/TableViewEditor.d.ts +2 -2
- package/esm/component/TableViewEditor.js +4 -2
- package/esm/icons/btn/btn-group.svg.js +3 -1
- package/esm/icons/btn/btn-select.svg.js +3 -1
- package/esm/icons/btn/btn-toolbar.svg.js +3 -1
- package/esm/icons/btn/button.svg.js +3 -1
- package/esm/icons/btn/dropdown-btn.svg.js +3 -1
- package/esm/icons/container/anchor-nav.svg.js +3 -1
- package/esm/icons/container/collapse.svg.js +3 -1
- package/esm/icons/container/container.svg.js +3 -1
- package/esm/icons/container/flex-container.svg.js +3 -1
- package/esm/icons/container/form-group.svg.js +3 -1
- package/esm/icons/container/grid.svg.js +3 -1
- package/esm/icons/container/iframe.svg.js +3 -1
- package/esm/icons/container/panel.svg.js +3 -1
- package/esm/icons/container/table-view.svg.js +3 -1
- package/esm/icons/container/tabs.svg.js +3 -1
- package/esm/icons/container/tooltip-wrapper.svg.js +3 -1
- package/esm/icons/container/web-component.svg.js +3 -1
- package/esm/icons/crud/column-add.svg.js +26 -0
- package/esm/icons/crud/column-delete.svg.js +24 -0
- package/esm/icons/crud/column-setting.svg.js +24 -0
- package/esm/icons/crud/share-link.svg.js +22 -0
- package/esm/icons/display/aBaseline.svg.js +4 -1
- package/esm/icons/display/aCenter.svg.js +4 -1
- package/esm/icons/display/aFlexEnd.svg.js +4 -1
- package/esm/icons/display/aFlexStart.svg.js +4 -1
- package/esm/icons/display/aStretch.svg.js +4 -1
- package/esm/icons/display/block.svg.js +4 -1
- package/esm/icons/display/dcolumn.svg.js +4 -1
- package/esm/icons/display/dcolumnReverse.svg.js +4 -1
- package/esm/icons/display/drow.svg.js +4 -1
- package/esm/icons/display/drowReverse.svg.js +4 -1
- package/esm/icons/display/flex.svg.js +4 -1
- package/esm/icons/display/inline-block.svg.js +4 -1
- package/esm/icons/display/inline.svg.js +4 -1
- package/esm/icons/display/jCenter.svg.js +4 -1
- package/esm/icons/display/jFlexEnd.svg.js +4 -1
- package/esm/icons/display/jFlexStart.svg.js +4 -1
- package/esm/icons/display/jSpaceAround.svg.js +4 -1
- package/esm/icons/display/jSpaceBetween.svg.js +4 -1
- package/esm/icons/feat/audio.svg.js +3 -1
- package/esm/icons/feat/custom.svg.js +3 -1
- package/esm/icons/feat/each.svg.js +3 -1
- package/esm/icons/feat/form.svg.js +3 -1
- package/esm/icons/feat/nav.svg.js +3 -1
- package/esm/icons/feat/qrcode.svg.js +3 -1
- package/esm/icons/feat/service.svg.js +3 -1
- package/esm/icons/feat/table.svg.js +3 -1
- package/esm/icons/feat/tasks.svg.js +3 -1
- package/esm/icons/feat/video.svg.js +3 -1
- package/esm/icons/feat/wizard.svg.js +3 -1
- package/esm/icons/form/chained-select.svg.js +3 -1
- package/esm/icons/form/checkbox.svg.js +3 -1
- package/esm/icons/form/checkboxes.svg.js +3 -1
- package/esm/icons/form/combo.svg.js +3 -1
- package/esm/icons/form/condition-builder.svg.js +3 -1
- package/esm/icons/form/diff-editor.svg.js +3 -1
- package/esm/icons/form/editor.svg.js +3 -1
- package/esm/icons/form/formula.svg.js +3 -1
- package/esm/icons/form/hidden.svg.js +3 -1
- package/esm/icons/form/input-city.svg.js +3 -1
- package/esm/icons/form/input-color.svg.js +3 -1
- package/esm/icons/form/input-date-range.svg.js +3 -1
- package/esm/icons/form/input-date.svg.js +3 -1
- package/esm/icons/form/input-datetime.svg.js +3 -1
- package/esm/icons/form/input-email.svg.js +3 -1
- package/esm/icons/form/input-excel.svg.js +3 -1
- package/esm/icons/form/input-file.svg.js +3 -1
- package/esm/icons/form/input-group.svg.js +3 -1
- package/esm/icons/form/input-image.svg.js +3 -1
- package/esm/icons/form/input-kv.svg.js +3 -1
- package/esm/icons/form/input-month-range.svg.js +3 -1
- package/esm/icons/form/input-number.svg.js +3 -1
- package/esm/icons/form/input-password.svg.js +3 -1
- package/esm/icons/form/input-quarter-range.svg.js +3 -1
- package/esm/icons/form/input-range.svg.js +3 -1
- package/esm/icons/form/input-rating.svg.js +3 -1
- package/esm/icons/form/input-repeat.svg.js +3 -1
- package/esm/icons/form/input-rich-text.svg.js +3 -1
- package/esm/icons/form/input-tag.svg.js +3 -1
- package/esm/icons/form/input-text.svg.js +3 -1
- package/esm/icons/form/input-time-range.svg.js +3 -1
- package/esm/icons/form/input-time.svg.js +3 -1
- package/esm/icons/form/input-tree.svg.js +3 -1
- package/esm/icons/form/input-url.svg.js +3 -1
- package/esm/icons/form/input-year.svg.js +3 -1
- package/esm/icons/form/inputArray.svg.js +3 -1
- package/esm/icons/form/list-select.svg.js +3 -1
- package/esm/icons/form/location-picker.svg.js +3 -1
- package/esm/icons/form/matrix-checkboxes.svg.js +3 -1
- package/esm/icons/form/month.svg.js +3 -1
- package/esm/icons/form/nested-select.svg.js +3 -1
- package/esm/icons/form/picker.svg.js +3 -1
- package/esm/icons/form/quarter.svg.js +3 -1
- package/esm/icons/form/radios.svg.js +3 -1
- package/esm/icons/form/select.svg.js +3 -1
- package/esm/icons/form/static.svg.js +3 -1
- package/esm/icons/form/sub-form.svg.js +3 -1
- package/esm/icons/form/switch.svg.js +3 -1
- package/esm/icons/form/tabs-transfer.svg.js +3 -1
- package/esm/icons/form/textarea.svg.js +3 -1
- package/esm/icons/form/transfer.svg.js +3 -1
- package/esm/icons/form/tree-select.svg.js +3 -1
- package/esm/icons/form/uuid.svg.js +3 -1
- package/esm/icons/index.js +12 -1
- package/esm/icons/layout/layout-1with2.svg.js +3 -1
- package/esm/icons/layout/layout-2cols.svg.js +3 -1
- package/esm/icons/layout/layout-2row.svg.js +3 -1
- package/esm/icons/layout/layout-2with1.svg.js +3 -1
- package/esm/icons/layout/layout-3cols.svg.js +3 -1
- package/esm/icons/layout/layout-3row.svg.js +3 -1
- package/esm/icons/layout/layout-absolute.svg.js +3 -1
- package/esm/icons/layout/layout-fixed-top.svg.js +3 -1
- package/esm/icons/layout/layout-fixed.svg.js +3 -1
- package/esm/icons/layout/layout-free-container.svg.js +3 -1
- package/esm/icons/layout/layout-full.svg.js +3 -1
- package/esm/icons/layout/layout1-2.svg.js +3 -1
- package/esm/icons/layout/layout2-1.svg.js +3 -1
- package/esm/icons/layout/layout3-1.svg.js +3 -1
- package/esm/icons/layout/layout3-2.svg.js +3 -1
- package/esm/icons/other/_fx.svg.js +3 -1
- package/esm/icons/other/divider.svg.js +3 -1
- package/esm/icons/other/fx.svg.js +3 -1
- package/esm/icons/other/property-sheet.svg.js +3 -1
- package/esm/icons/other/tooltip.svg.js +3 -1
- package/esm/icons/show/URL.svg.js +3 -1
- package/esm/icons/show/avatar.svg.js +3 -1
- package/esm/icons/show/breadcrumb.svg.js +3 -1
- package/esm/icons/show/card.svg.js +3 -1
- package/esm/icons/show/cards.svg.js +3 -1
- package/esm/icons/show/carousel.svg.js +3 -1
- package/esm/icons/show/chart.svg.js +3 -1
- package/esm/icons/show/code.svg.js +3 -1
- package/esm/icons/show/date.svg.js +3 -1
- package/esm/icons/show/datetime.svg.js +3 -1
- package/esm/icons/show/image.svg.js +3 -1
- package/esm/icons/show/images.svg.js +3 -1
- package/esm/icons/show/json-view.svg.js +3 -1
- package/esm/icons/show/list.svg.js +3 -1
- package/esm/icons/show/log.svg.js +3 -1
- package/esm/icons/show/mapping.svg.js +3 -1
- package/esm/icons/show/markdown.svg.js +3 -1
- package/esm/icons/show/plain.svg.js +3 -1
- package/esm/icons/show/progress.svg.js +3 -1
- package/esm/icons/show/sparkline.svg.js +3 -1
- package/esm/icons/show/status.svg.js +3 -1
- package/esm/icons/show/steps.svg.js +3 -1
- package/esm/icons/show/time.svg.js +3 -1
- package/esm/icons/theme/css.svg.js +3 -1
- package/esm/index.d.ts +9 -145
- package/esm/index.js +154 -139
- package/esm/locale/en-US.js +307 -2
- package/esm/locale/zh-CN.js +315 -4
- package/esm/plugin/Alert.js +3 -1
- package/esm/plugin/AnchorNav.js +5 -3
- package/esm/plugin/Audio.js +3 -1
- package/esm/plugin/Avatar.js +3 -1
- package/esm/plugin/Breadcrumb.js +3 -1
- package/esm/plugin/Button.js +5 -3
- package/esm/plugin/ButtonGroup.js +3 -1
- package/esm/plugin/CRUD.d.ts +4 -3
- package/esm/plugin/CRUD.js +29 -23
- package/esm/plugin/CRUD2/BaseCRUD.d.ts +233 -0
- package/esm/plugin/CRUD2/BaseCRUD.js +1045 -0
- package/esm/plugin/CRUD2/CRUDCards.d.ts +53 -0
- package/esm/plugin/CRUD2/CRUDList.d.ts +53 -0
- package/esm/plugin/CRUD2/CRUDTable.d.ts +21 -0
- package/esm/plugin/CRUD2/CRUDTable.js +48 -0
- package/esm/plugin/CRUD2/constants.d.ts +32 -0
- package/esm/plugin/CRUD2/constants.js +75 -0
- package/esm/plugin/CRUD2/utils.d.ts +8 -0
- package/esm/plugin/CRUD2/utils.js +91 -0
- package/esm/plugin/Card.js +10 -4
- package/esm/plugin/Card2.js +3 -1
- package/esm/plugin/Cards.d.ts +547 -41
- package/esm/plugin/Cards.js +368 -174
- package/esm/plugin/Carousel.js +122 -97
- package/esm/plugin/Chart.d.ts +3 -0
- package/esm/plugin/Chart.js +147 -91
- package/esm/plugin/CodeView.js +3 -1
- package/esm/plugin/Collapse.d.ts +2 -1
- package/esm/plugin/Collapse.js +56 -8
- package/esm/plugin/CollapseGroup.js +14 -13
- package/esm/plugin/ColumnToggler.d.ts +11 -6
- package/esm/plugin/ColumnToggler.js +69 -10
- package/esm/plugin/Container.d.ts +4 -1
- package/esm/plugin/Container.js +79 -9
- package/esm/plugin/Custom.js +5 -3
- package/esm/plugin/CustomRegion.js +5 -2
- package/esm/plugin/Date.js +3 -1
- package/esm/plugin/Datetime.js +3 -1
- package/esm/plugin/Dialog.d.ts +26 -3
- package/esm/plugin/Dialog.js +217 -23
- package/esm/plugin/Divider.js +72 -6
- package/esm/plugin/Drawer.d.ts +7 -1
- package/esm/plugin/Drawer.js +134 -44
- package/esm/plugin/DropDownButton.js +4 -2
- package/esm/plugin/Each.d.ts +226 -11
- package/esm/plugin/Each.js +238 -89
- package/esm/plugin/Flex.js +3 -1
- package/esm/plugin/Form/ButtonGroupSelect.d.ts +2 -0
- package/esm/plugin/Form/ButtonGroupSelect.js +52 -2
- package/esm/plugin/Form/ButtonToolbar.js +3 -1
- package/esm/plugin/Form/ChainedSelect.d.ts +2 -0
- package/esm/plugin/Form/ChainedSelect.js +43 -3
- package/esm/plugin/Form/Checkbox.d.ts +6 -0
- package/esm/plugin/Form/Checkbox.js +61 -12
- package/esm/plugin/Form/Checkboxes.d.ts +2 -0
- package/esm/plugin/Form/Checkboxes.js +66 -22
- package/esm/plugin/Form/CodeEditor.js +3 -1
- package/esm/plugin/Form/Combo.d.ts +4 -2
- package/esm/plugin/Form/Combo.js +79 -6
- package/esm/plugin/Form/ConditionBuilder.js +5 -2
- package/esm/plugin/Form/Control.js +5 -3
- package/esm/plugin/Form/DiffEditor.js +3 -1
- package/esm/plugin/Form/FieldSet.js +4 -2
- package/esm/plugin/Form/Form.d.ts +37 -8
- package/esm/plugin/Form/Form.js +629 -491
- package/esm/plugin/Form/Formula.js +3 -1
- package/esm/plugin/Form/Group.js +5 -3
- package/esm/plugin/Form/Hidden.js +3 -1
- package/esm/plugin/Form/InputArray.js +4 -2
- package/esm/plugin/Form/InputCity.d.ts +2 -0
- package/esm/plugin/Form/InputCity.js +56 -2
- package/esm/plugin/Form/InputColor.js +3 -1
- package/esm/plugin/Form/InputDate.js +29 -43
- package/esm/plugin/Form/InputDateRange.js +42 -31
- package/esm/plugin/Form/InputDateTime.js +3 -1
- package/esm/plugin/Form/InputDateTimeRange.js +3 -1
- package/esm/plugin/Form/InputEmail.js +3 -1
- package/esm/plugin/Form/InputExcel.js +3 -1
- package/esm/plugin/Form/InputFile.js +8 -2
- package/esm/plugin/Form/InputGroup.d.ts +1 -0
- package/esm/plugin/Form/InputGroup.js +3 -1
- package/esm/plugin/Form/InputImage.js +12 -6
- package/esm/plugin/Form/InputKV.js +3 -1
- package/esm/plugin/Form/InputMonth.js +3 -1
- package/esm/plugin/Form/InputMonthRange.js +3 -1
- package/esm/plugin/Form/InputNumber.d.ts +6 -1
- package/esm/plugin/Form/InputNumber.js +12 -1
- package/esm/plugin/Form/InputPassword.js +3 -1
- package/esm/plugin/Form/InputQuarter.js +3 -1
- package/esm/plugin/Form/InputQuarterRange.js +3 -1
- package/esm/plugin/Form/InputRange.d.ts +21 -1
- package/esm/plugin/Form/InputRange.js +50 -35
- package/esm/plugin/Form/InputRating.d.ts +6 -0
- package/esm/plugin/Form/InputRating.js +12 -1
- package/esm/plugin/Form/InputRepeat.js +3 -1
- package/esm/plugin/Form/InputRichText.js +3 -1
- package/esm/plugin/Form/InputSubForm.js +5 -3
- package/esm/plugin/Form/InputTable.d.ts +4 -3
- package/esm/plugin/Form/InputTable.js +85 -64
- package/esm/plugin/Form/InputTag.d.ts +6 -1
- package/esm/plugin/Form/InputTag.js +54 -4
- package/esm/plugin/Form/InputText.d.ts +2 -0
- package/esm/plugin/Form/InputText.js +51 -1
- package/esm/plugin/Form/InputTime.js +3 -1
- package/esm/plugin/Form/InputTimeRange.js +3 -1
- package/esm/plugin/Form/InputTree.d.ts +2 -1
- package/esm/plugin/Form/InputTree.js +98 -35
- package/esm/plugin/Form/InputURL.js +3 -1
- package/esm/plugin/Form/InputYear.js +3 -1
- package/esm/plugin/Form/InputYearRange.js +3 -1
- package/esm/plugin/Form/Item.js +20 -15
- package/esm/plugin/Form/ListSelect.d.ts +2 -0
- package/esm/plugin/Form/ListSelect.js +52 -2
- package/esm/plugin/Form/LocationPicker.d.ts +28 -0
- package/esm/plugin/Form/LocationPicker.js +34 -1
- package/esm/plugin/Form/MatrixCheckboxes.d.ts +1 -2
- package/esm/plugin/Form/MatrixCheckboxes.js +32 -6
- package/esm/plugin/Form/NestedSelect.d.ts +2 -1
- package/esm/plugin/Form/NestedSelect.js +52 -2
- package/esm/plugin/Form/Picker.d.ts +2 -1
- package/esm/plugin/Form/Picker.js +51 -3
- package/esm/plugin/Form/Radios.d.ts +2 -0
- package/esm/plugin/Form/Radios.js +33 -2
- package/esm/plugin/Form/Select.d.ts +9 -7
- package/esm/plugin/Form/Select.js +68 -51
- package/esm/plugin/Form/Static.js +5 -3
- package/esm/plugin/Form/Switch.d.ts +6 -1
- package/esm/plugin/Form/Switch.js +13 -1
- package/esm/plugin/Form/TabsTransfer.d.ts +4 -3
- package/esm/plugin/Form/TabsTransfer.js +81 -28
- package/esm/plugin/Form/Textarea.js +3 -1
- package/esm/plugin/Form/Transfer.d.ts +2 -0
- package/esm/plugin/Form/Transfer.js +46 -5
- package/esm/plugin/Form/TreeSelect.d.ts +2 -1
- package/esm/plugin/Form/TreeSelect.js +86 -30
- package/esm/plugin/Form/UUID.js +3 -1
- package/esm/plugin/Grid.js +13 -8
- package/esm/plugin/HBox.js +10 -8
- package/esm/plugin/IFrame.js +3 -1
- package/esm/plugin/Icon.js +5 -3
- package/esm/plugin/Image.js +54 -31
- package/esm/plugin/Images.js +22 -10
- package/esm/plugin/Json.js +3 -1
- package/esm/plugin/Layout/FlexPluginBase.js +18 -16
- package/esm/plugin/Layout/Layout_fixed.js +3 -1
- package/esm/plugin/Layout/Layout_free_container.js +3 -1
- package/esm/plugin/Layout/Layout_sorption_container.js +3 -1
- package/esm/plugin/Link.js +17 -5
- package/esm/plugin/List.d.ts +5 -0
- package/esm/plugin/List.js +59 -23
- package/esm/plugin/List2.d.ts +545 -0
- package/esm/plugin/List2.js +380 -0
- package/esm/plugin/ListItem.js +4 -2
- package/esm/plugin/Log.js +6 -4
- package/esm/plugin/Mapping.js +3 -1
- package/esm/plugin/Markdown.js +3 -1
- package/esm/plugin/Nav.d.ts +2 -0
- package/esm/plugin/Nav.js +7 -3
- package/esm/plugin/OfficeViewer.js +3 -1
- package/esm/plugin/Operation.js +4 -3
- package/esm/plugin/Others/Action.js +7 -5
- package/esm/plugin/Others/TableCell.js +5 -3
- package/esm/plugin/Page.d.ts +1 -1
- package/esm/plugin/Page.js +66 -20
- package/esm/plugin/Pagination.d.ts +0 -1
- package/esm/plugin/Pagination.js +35 -19
- package/esm/plugin/Panel.js +4 -2
- package/esm/plugin/Plain.js +3 -1
- package/esm/plugin/Progress.js +37 -10
- package/esm/plugin/Property.js +3 -1
- package/esm/plugin/QRCode.js +3 -1
- package/esm/plugin/Reset.js +3 -1
- package/esm/plugin/SearchBox.d.ts +3 -1
- package/esm/plugin/SearchBox.js +14 -1
- package/esm/plugin/Service.d.ts +20 -13
- package/esm/plugin/Service.js +203 -94
- package/esm/plugin/Sparkline.d.ts +2 -1
- package/esm/plugin/Sparkline.js +32 -9
- package/esm/plugin/Status.js +3 -1
- package/esm/plugin/Steps.js +3 -1
- package/esm/plugin/Submit.js +3 -1
- package/esm/plugin/Table.d.ts +10 -1
- package/esm/plugin/Table.js +160 -107
- package/esm/plugin/Table2.d.ts +24 -10
- package/esm/plugin/Table2.js +668 -420
- package/esm/plugin/TableCell2.d.ts +14 -2
- package/esm/plugin/TableCell2.js +510 -365
- package/esm/plugin/TableView.d.ts +2 -1
- package/esm/plugin/TableView.js +3 -1
- package/esm/plugin/Tabs.d.ts +2 -1
- package/esm/plugin/Tabs.js +6 -4
- package/esm/plugin/Tag.js +10 -2
- package/esm/plugin/Tasks.js +3 -1
- package/esm/plugin/Time.js +3 -1
- package/esm/plugin/Timeline.d.ts +2 -1
- package/esm/plugin/Timeline.js +77 -4
- package/esm/plugin/TooltipWrapper.js +12 -9
- package/esm/plugin/Tpl.js +21 -3
- package/esm/plugin/Video.js +3 -1
- package/esm/plugin/WebComponent.js +3 -1
- package/esm/plugin/Wizard.js +7 -5
- package/esm/plugin/Wrapper.js +10 -8
- package/esm/plugin/index.d.ts +144 -0
- package/esm/renderer/APIAdaptorControl.d.ts +16 -2
- package/esm/renderer/APIAdaptorControl.js +33 -47
- package/esm/renderer/APIControl.d.ts +4 -4
- package/esm/renderer/APIControl.js +13 -3
- package/esm/renderer/ActionApiControl.d.ts +9 -3
- package/esm/renderer/BadgeControl.d.ts +7 -7
- package/esm/renderer/BadgeControl.js +8 -3
- package/esm/renderer/ButtonGroupControl.d.ts +1 -1
- package/esm/renderer/ButtonGroupControl.js +3 -1
- package/esm/renderer/ColumnControl.d.ts +1 -1
- package/esm/renderer/DataBindingControl.d.ts +3 -3
- package/esm/renderer/DataBindingControl.js +12 -6
- package/esm/renderer/DataMappingControl.js +3 -1
- package/esm/renderer/DataPickerControl.d.ts +1 -1
- package/esm/renderer/DataPickerControl.js +3 -1
- package/esm/renderer/DateShortCutControl.d.ts +3 -2
- package/esm/renderer/DateShortCutControl.js +10 -6
- package/esm/renderer/ExpressionFormulaControl.d.ts +1 -1
- package/esm/renderer/ExpressionFormulaControl.js +4 -2
- package/esm/renderer/FeatureControl.d.ts +18 -5
- package/esm/renderer/FeatureControl.js +74 -12
- package/esm/renderer/FieldSetting.d.ts +66 -0
- package/esm/renderer/FieldSetting.js +492 -0
- package/esm/renderer/FlexSettingControl.d.ts +1 -1
- package/esm/renderer/FlexSettingControl.js +4 -2
- package/esm/renderer/FormulaControl.d.ts +8 -3
- package/esm/renderer/FormulaControl.js +24 -7
- package/esm/renderer/FunctionEditorControl.d.ts +79 -0
- package/esm/renderer/FunctionEditorControl.js +107 -0
- package/esm/renderer/GoConfigControl.d.ts +1 -1
- package/esm/renderer/GoConfigControl.js +4 -2
- package/esm/renderer/InputRangeValueControl.d.ts +15 -0
- package/esm/renderer/InputRangeValueControl.js +121 -0
- package/esm/renderer/MapSourceControl.d.ts +3 -3
- package/esm/renderer/MapSourceControl.js +4 -2
- package/esm/renderer/NavBadgeControl.d.ts +7 -7
- package/esm/renderer/NavBadgeControl.js +3 -1
- package/esm/renderer/NavDefaultActive.js +3 -1
- package/esm/renderer/NavSourceControl.d.ts +53 -35
- package/esm/renderer/NavSourceControl.js +601 -230
- package/esm/renderer/OptionControl.d.ts +5 -3
- package/esm/renderer/OptionControl.js +37 -25
- package/esm/renderer/RangePartsControl.d.ts +5 -5
- package/esm/renderer/RangePartsControl.js +6 -4
- package/esm/renderer/StatusControl.d.ts +2 -2
- package/esm/renderer/StatusControl.js +19 -3
- package/esm/renderer/SwitchMoreControl.d.ts +12 -5
- package/esm/renderer/SwitchMoreControl.js +23 -8
- package/esm/renderer/TableColumnWidthControl.d.ts +29 -0
- package/esm/renderer/TableColumnWidthControl.js +177 -0
- package/esm/renderer/TimelineItemControl.d.ts +6 -6
- package/esm/renderer/TimelineItemControl.js +26 -7
- package/esm/renderer/TplFormulaControl.d.ts +1 -1
- package/esm/renderer/TplFormulaControl.js +3 -1
- package/esm/renderer/TransferTableControl.d.ts +3 -3
- package/esm/renderer/TransferTableControl.js +4 -2
- package/esm/renderer/TreeOptionControl.d.ts +4 -4
- package/esm/renderer/TreeOptionControl.js +15 -13
- package/esm/renderer/ValidationControl.d.ts +4 -4
- package/esm/renderer/ValidationControl.js +4 -2
- package/esm/renderer/ValidationItem.d.ts +3 -3
- package/esm/renderer/ValidationItem.js +3 -1
- package/esm/renderer/crud2-control/AddColumnModal.d.ts +6 -0
- package/esm/renderer/crud2-control/AddColumnModal.js +256 -0
- package/esm/renderer/crud2-control/CRUDColumnControl.d.ts +68 -0
- package/esm/renderer/crud2-control/CRUDColumnControl.js +473 -0
- package/esm/renderer/crud2-control/CRUDFiltersControl.d.ts +53 -0
- package/esm/renderer/crud2-control/CRUDFiltersControl.js +691 -0
- package/esm/renderer/crud2-control/CRUDToolbarControl.d.ts +49 -0
- package/esm/renderer/crud2-control/CRUDToolbarControl.js +417 -0
- package/esm/renderer/event-control/action-config-dialog.d.ts +1 -1
- package/esm/renderer/event-control/action-config-dialog.js +30 -4
- package/esm/renderer/event-control/action-config-panel.js +3 -1
- package/esm/renderer/event-control/comp-action-select.d.ts +1 -1
- package/esm/renderer/event-control/comp-action-select.js +3 -1
- package/esm/renderer/event-control/helper.d.ts +2 -1
- package/esm/renderer/event-control/helper.js +307 -206
- package/esm/renderer/event-control/index.d.ts +28 -19
- package/esm/renderer/event-control/index.js +115 -22
- package/esm/renderer/style-control/Background.d.ts +1 -1
- package/esm/renderer/style-control/Background.js +3 -1
- package/esm/renderer/style-control/Border.d.ts +2 -2
- package/esm/renderer/style-control/Border.js +10 -8
- package/esm/renderer/style-control/BoxModel.d.ts +2 -2
- package/esm/renderer/style-control/BoxModel.js +3 -1
- package/esm/renderer/style-control/BoxShadow.d.ts +2 -2
- package/esm/renderer/style-control/BoxShadow.js +3 -1
- package/esm/renderer/style-control/Display.d.ts +1 -1
- package/esm/renderer/style-control/Display.js +3 -1
- package/esm/renderer/style-control/Font.d.ts +1 -1
- package/esm/renderer/style-control/Font.js +3 -1
- package/esm/renderer/style-control/InsetBoxModel.d.ts +2 -2
- package/esm/renderer/style-control/InsetBoxModel.js +3 -1
- package/esm/renderer/style-control/ThemeCssCode.d.ts +1 -1
- package/esm/renderer/style-control/ThemeCssCode.js +134 -282
- package/esm/renderer/style-control/font-family.js +3 -1
- package/esm/renderer/style-control/helper.js +3 -1
- package/esm/renderer/style-control/transformation.js +3 -1
- package/esm/renderer/textarea-formula/FormulaPicker.js +5 -3
- package/esm/renderer/textarea-formula/TextareaFormulaControl.d.ts +3 -1
- package/esm/renderer/textarea-formula/TextareaFormulaControl.js +77 -8
- package/esm/renderer/textarea-formula/plugin.js +5 -3
- package/esm/tpl/api.js +16 -11
- package/esm/tpl/common.js +60 -18
- package/esm/tpl/horizontal.js +4 -2
- package/esm/tpl/layout.js +16 -10
- package/esm/tpl/options.d.ts +10 -1
- package/esm/tpl/options.js +251 -11
- package/esm/tpl/remark.js +3 -1
- package/esm/tpl/style.js +99 -60
- package/esm/tpl/validations.js +3 -1
- package/esm/util.d.ts +14 -0
- package/esm/util.js +39 -3
- package/esm/validator.js +7 -5
- package/lib/builder/ApiDSBuilder.d.ts +491 -0
- package/lib/builder/ApiDSBuilder.js +1226 -0
- package/lib/builder/DSBuilder.d.ts +171 -0
- package/lib/builder/DSBuilder.js +55 -0
- package/lib/builder/DSBuilderManager.d.ts +62 -0
- package/lib/builder/DSBuilderManager.js +211 -0
- package/lib/builder/constants.d.ts +97 -0
- package/lib/builder/constants.js +144 -0
- package/lib/builder/index.d.ts +6 -0
- package/lib/builder/type.d.ts +96 -0
- package/lib/builder/utils.d.ts +10 -0
- package/lib/builder/utils.js +104 -0
- package/lib/component/BaseControl.js +5 -3
- package/lib/component/InputComponentName.js +3 -1
- package/lib/component/TableViewEditor.d.ts +2 -2
- package/lib/component/TableViewEditor.js +4 -2
- package/lib/icons/btn/btn-group.svg.js +3 -1
- package/lib/icons/btn/btn-select.svg.js +3 -1
- package/lib/icons/btn/btn-toolbar.svg.js +3 -1
- package/lib/icons/btn/button.svg.js +3 -1
- package/lib/icons/btn/dropdown-btn.svg.js +3 -1
- package/lib/icons/container/anchor-nav.svg.js +3 -1
- package/lib/icons/container/collapse.svg.js +3 -1
- package/lib/icons/container/container.svg.js +3 -1
- package/lib/icons/container/flex-container.svg.js +3 -1
- package/lib/icons/container/form-group.svg.js +3 -1
- package/lib/icons/container/grid.svg.js +3 -1
- package/lib/icons/container/iframe.svg.js +3 -1
- package/lib/icons/container/panel.svg.js +3 -1
- package/lib/icons/container/table-view.svg.js +3 -1
- package/lib/icons/container/tabs.svg.js +3 -1
- package/lib/icons/container/tooltip-wrapper.svg.js +3 -1
- package/lib/icons/container/web-component.svg.js +3 -1
- package/lib/icons/crud/column-add.svg.js +50 -0
- package/lib/icons/crud/column-delete.svg.js +48 -0
- package/lib/icons/crud/column-setting.svg.js +48 -0
- package/lib/icons/crud/share-link.svg.js +46 -0
- package/lib/icons/display/aBaseline.svg.js +19 -16
- package/lib/icons/display/aCenter.svg.js +19 -16
- package/lib/icons/display/aFlexEnd.svg.js +19 -16
- package/lib/icons/display/aFlexStart.svg.js +19 -16
- package/lib/icons/display/aStretch.svg.js +19 -16
- package/lib/icons/display/block.svg.js +19 -16
- package/lib/icons/display/dcolumn.svg.js +19 -16
- package/lib/icons/display/dcolumnReverse.svg.js +19 -16
- package/lib/icons/display/drow.svg.js +19 -16
- package/lib/icons/display/drowReverse.svg.js +19 -16
- package/lib/icons/display/flex.svg.js +19 -16
- package/lib/icons/display/inline-block.svg.js +19 -16
- package/lib/icons/display/inline.svg.js +19 -16
- package/lib/icons/display/jCenter.svg.js +19 -16
- package/lib/icons/display/jFlexEnd.svg.js +19 -16
- package/lib/icons/display/jFlexStart.svg.js +19 -16
- package/lib/icons/display/jSpaceAround.svg.js +19 -16
- package/lib/icons/display/jSpaceBetween.svg.js +19 -16
- package/lib/icons/feat/audio.svg.js +3 -1
- package/lib/icons/feat/custom.svg.js +3 -1
- package/lib/icons/feat/each.svg.js +3 -1
- package/lib/icons/feat/form.svg.js +3 -1
- package/lib/icons/feat/nav.svg.js +3 -1
- package/lib/icons/feat/qrcode.svg.js +3 -1
- package/lib/icons/feat/service.svg.js +3 -1
- package/lib/icons/feat/table.svg.js +3 -1
- package/lib/icons/feat/tasks.svg.js +3 -1
- package/lib/icons/feat/video.svg.js +3 -1
- package/lib/icons/feat/wizard.svg.js +3 -1
- package/lib/icons/form/chained-select.svg.js +3 -1
- package/lib/icons/form/checkbox.svg.js +3 -1
- package/lib/icons/form/checkboxes.svg.js +3 -1
- package/lib/icons/form/combo.svg.js +3 -1
- package/lib/icons/form/condition-builder.svg.js +3 -1
- package/lib/icons/form/diff-editor.svg.js +3 -1
- package/lib/icons/form/editor.svg.js +3 -1
- package/lib/icons/form/formula.svg.js +3 -1
- package/lib/icons/form/hidden.svg.js +3 -1
- package/lib/icons/form/input-city.svg.js +3 -1
- package/lib/icons/form/input-color.svg.js +3 -1
- package/lib/icons/form/input-date-range.svg.js +3 -1
- package/lib/icons/form/input-date.svg.js +3 -1
- package/lib/icons/form/input-datetime.svg.js +3 -1
- package/lib/icons/form/input-email.svg.js +3 -1
- package/lib/icons/form/input-excel.svg.js +3 -1
- package/lib/icons/form/input-file.svg.js +3 -1
- package/lib/icons/form/input-group.svg.js +3 -1
- package/lib/icons/form/input-image.svg.js +3 -1
- package/lib/icons/form/input-kv.svg.js +3 -1
- package/lib/icons/form/input-month-range.svg.js +3 -1
- package/lib/icons/form/input-number.svg.js +3 -1
- package/lib/icons/form/input-password.svg.js +3 -1
- package/lib/icons/form/input-quarter-range.svg.js +3 -1
- package/lib/icons/form/input-range.svg.js +3 -1
- package/lib/icons/form/input-rating.svg.js +3 -1
- package/lib/icons/form/input-repeat.svg.js +3 -1
- package/lib/icons/form/input-rich-text.svg.js +3 -1
- package/lib/icons/form/input-tag.svg.js +3 -1
- package/lib/icons/form/input-text.svg.js +3 -1
- package/lib/icons/form/input-time-range.svg.js +3 -1
- package/lib/icons/form/input-time.svg.js +3 -1
- package/lib/icons/form/input-tree.svg.js +3 -1
- package/lib/icons/form/input-url.svg.js +3 -1
- package/lib/icons/form/input-year.svg.js +3 -1
- package/lib/icons/form/inputArray.svg.js +3 -1
- package/lib/icons/form/list-select.svg.js +3 -1
- package/lib/icons/form/location-picker.svg.js +3 -1
- package/lib/icons/form/matrix-checkboxes.svg.js +3 -1
- package/lib/icons/form/month.svg.js +3 -1
- package/lib/icons/form/nested-select.svg.js +3 -1
- package/lib/icons/form/picker.svg.js +3 -1
- package/lib/icons/form/quarter.svg.js +3 -1
- package/lib/icons/form/radios.svg.js +3 -1
- package/lib/icons/form/select.svg.js +3 -1
- package/lib/icons/form/static.svg.js +3 -1
- package/lib/icons/form/sub-form.svg.js +3 -1
- package/lib/icons/form/switch.svg.js +3 -1
- package/lib/icons/form/tabs-transfer.svg.js +3 -1
- package/lib/icons/form/textarea.svg.js +3 -1
- package/lib/icons/form/transfer.svg.js +3 -1
- package/lib/icons/form/tree-select.svg.js +3 -1
- package/lib/icons/form/uuid.svg.js +3 -1
- package/lib/icons/index.js +12 -1
- package/lib/icons/layout/layout-1with2.svg.js +3 -1
- package/lib/icons/layout/layout-2cols.svg.js +3 -1
- package/lib/icons/layout/layout-2row.svg.js +3 -1
- package/lib/icons/layout/layout-2with1.svg.js +3 -1
- package/lib/icons/layout/layout-3cols.svg.js +3 -1
- package/lib/icons/layout/layout-3row.svg.js +3 -1
- package/lib/icons/layout/layout-absolute.svg.js +3 -1
- package/lib/icons/layout/layout-fixed-top.svg.js +3 -1
- package/lib/icons/layout/layout-fixed.svg.js +3 -1
- package/lib/icons/layout/layout-free-container.svg.js +3 -1
- package/lib/icons/layout/layout-full.svg.js +3 -1
- package/lib/icons/layout/layout1-2.svg.js +3 -1
- package/lib/icons/layout/layout2-1.svg.js +3 -1
- package/lib/icons/layout/layout3-1.svg.js +3 -1
- package/lib/icons/layout/layout3-2.svg.js +3 -1
- package/lib/icons/other/_fx.svg.js +3 -1
- package/lib/icons/other/divider.svg.js +3 -1
- package/lib/icons/other/fx.svg.js +3 -1
- package/lib/icons/other/property-sheet.svg.js +3 -1
- package/lib/icons/other/tooltip.svg.js +3 -1
- package/lib/icons/show/URL.svg.js +3 -1
- package/lib/icons/show/avatar.svg.js +3 -1
- package/lib/icons/show/breadcrumb.svg.js +3 -1
- package/lib/icons/show/card.svg.js +3 -1
- package/lib/icons/show/cards.svg.js +3 -1
- package/lib/icons/show/carousel.svg.js +3 -1
- package/lib/icons/show/chart.svg.js +3 -1
- package/lib/icons/show/code.svg.js +3 -1
- package/lib/icons/show/date.svg.js +3 -1
- package/lib/icons/show/datetime.svg.js +3 -1
- package/lib/icons/show/image.svg.js +3 -1
- package/lib/icons/show/images.svg.js +3 -1
- package/lib/icons/show/json-view.svg.js +3 -1
- package/lib/icons/show/list.svg.js +3 -1
- package/lib/icons/show/log.svg.js +3 -1
- package/lib/icons/show/mapping.svg.js +3 -1
- package/lib/icons/show/markdown.svg.js +3 -1
- package/lib/icons/show/plain.svg.js +3 -1
- package/lib/icons/show/progress.svg.js +3 -1
- package/lib/icons/show/sparkline.svg.js +3 -1
- package/lib/icons/show/status.svg.js +3 -1
- package/lib/icons/show/steps.svg.js +3 -1
- package/lib/icons/show/time.svg.js +3 -1
- package/lib/icons/theme/css.svg.js +3 -1
- package/lib/index.d.ts +9 -145
- package/lib/index.js +322 -139
- package/lib/locale/en-US.js +307 -2
- package/lib/locale/zh-CN.js +315 -4
- package/lib/plugin/Alert.js +3 -1
- package/lib/plugin/AnchorNav.js +5 -3
- package/lib/plugin/Audio.js +3 -1
- package/lib/plugin/Avatar.js +3 -1
- package/lib/plugin/Breadcrumb.js +3 -1
- package/lib/plugin/Button.js +5 -3
- package/lib/plugin/ButtonGroup.js +3 -1
- package/lib/plugin/CRUD.d.ts +4 -3
- package/lib/plugin/CRUD.js +29 -23
- package/lib/plugin/CRUD2/BaseCRUD.d.ts +233 -0
- package/lib/plugin/CRUD2/BaseCRUD.js +1060 -0
- package/lib/plugin/CRUD2/CRUDCards.d.ts +53 -0
- package/lib/plugin/CRUD2/CRUDList.d.ts +53 -0
- package/lib/plugin/CRUD2/CRUDTable.d.ts +21 -0
- package/lib/plugin/CRUD2/CRUDTable.js +52 -0
- package/lib/plugin/CRUD2/constants.d.ts +32 -0
- package/lib/plugin/CRUD2/constants.js +81 -0
- package/lib/plugin/CRUD2/utils.d.ts +8 -0
- package/lib/plugin/CRUD2/utils.js +103 -0
- package/lib/plugin/Card.js +10 -4
- package/lib/plugin/Card2.js +3 -1
- package/lib/plugin/Cards.d.ts +547 -41
- package/lib/plugin/Cards.js +365 -171
- package/lib/plugin/Carousel.js +122 -97
- package/lib/plugin/Chart.d.ts +3 -0
- package/lib/plugin/Chart.js +145 -89
- package/lib/plugin/CodeView.js +3 -1
- package/lib/plugin/Collapse.d.ts +2 -1
- package/lib/plugin/Collapse.js +56 -8
- package/lib/plugin/CollapseGroup.js +14 -13
- package/lib/plugin/ColumnToggler.d.ts +11 -6
- package/lib/plugin/ColumnToggler.js +72 -9
- package/lib/plugin/Container.d.ts +4 -1
- package/lib/plugin/Container.js +79 -9
- package/lib/plugin/Custom.js +5 -3
- package/lib/plugin/CustomRegion.js +5 -2
- package/lib/plugin/Date.js +3 -1
- package/lib/plugin/Datetime.js +3 -1
- package/lib/plugin/Dialog.d.ts +26 -3
- package/lib/plugin/Dialog.js +215 -20
- package/lib/plugin/Divider.js +72 -6
- package/lib/plugin/Drawer.d.ts +7 -1
- package/lib/plugin/Drawer.js +136 -42
- package/lib/plugin/DropDownButton.js +4 -2
- package/lib/plugin/Each.d.ts +226 -11
- package/lib/plugin/Each.js +234 -89
- package/lib/plugin/Flex.js +3 -1
- package/lib/plugin/Form/ButtonGroupSelect.d.ts +2 -0
- package/lib/plugin/Form/ButtonGroupSelect.js +52 -2
- package/lib/plugin/Form/ButtonToolbar.js +3 -1
- package/lib/plugin/Form/ChainedSelect.d.ts +2 -0
- package/lib/plugin/Form/ChainedSelect.js +43 -3
- package/lib/plugin/Form/Checkbox.d.ts +6 -0
- package/lib/plugin/Form/Checkbox.js +65 -12
- package/lib/plugin/Form/Checkboxes.d.ts +2 -0
- package/lib/plugin/Form/Checkboxes.js +66 -22
- package/lib/plugin/Form/CodeEditor.js +3 -1
- package/lib/plugin/Form/Combo.d.ts +4 -2
- package/lib/plugin/Form/Combo.js +78 -5
- package/lib/plugin/Form/ConditionBuilder.js +9 -4
- package/lib/plugin/Form/Control.js +5 -3
- package/lib/plugin/Form/DiffEditor.js +3 -1
- package/lib/plugin/Form/FieldSet.js +4 -2
- package/lib/plugin/Form/Form.d.ts +37 -8
- package/lib/plugin/Form/Form.js +633 -489
- package/lib/plugin/Form/Formula.js +3 -1
- package/lib/plugin/Form/Group.js +5 -3
- package/lib/plugin/Form/Hidden.js +3 -1
- package/lib/plugin/Form/InputArray.js +4 -2
- package/lib/plugin/Form/InputCity.d.ts +2 -0
- package/lib/plugin/Form/InputCity.js +56 -2
- package/lib/plugin/Form/InputColor.js +3 -1
- package/lib/plugin/Form/InputDate.js +29 -43
- package/lib/plugin/Form/InputDateRange.js +42 -31
- package/lib/plugin/Form/InputDateTime.js +3 -1
- package/lib/plugin/Form/InputDateTimeRange.js +3 -1
- package/lib/plugin/Form/InputEmail.js +3 -1
- package/lib/plugin/Form/InputExcel.js +3 -1
- package/lib/plugin/Form/InputFile.js +8 -2
- package/lib/plugin/Form/InputGroup.d.ts +1 -0
- package/lib/plugin/Form/InputGroup.js +3 -1
- package/lib/plugin/Form/InputImage.js +12 -6
- package/lib/plugin/Form/InputKV.js +3 -1
- package/lib/plugin/Form/InputMonth.js +3 -1
- package/lib/plugin/Form/InputMonthRange.js +3 -1
- package/lib/plugin/Form/InputNumber.d.ts +6 -1
- package/lib/plugin/Form/InputNumber.js +12 -1
- package/lib/plugin/Form/InputPassword.js +3 -1
- package/lib/plugin/Form/InputQuarter.js +3 -1
- package/lib/plugin/Form/InputQuarterRange.js +3 -1
- package/lib/plugin/Form/InputRange.d.ts +21 -1
- package/lib/plugin/Form/InputRange.js +50 -35
- package/lib/plugin/Form/InputRating.d.ts +6 -0
- package/lib/plugin/Form/InputRating.js +12 -1
- package/lib/plugin/Form/InputRepeat.js +3 -1
- package/lib/plugin/Form/InputRichText.js +3 -1
- package/lib/plugin/Form/InputSubForm.js +5 -3
- package/lib/plugin/Form/InputTable.d.ts +4 -3
- package/lib/plugin/Form/InputTable.js +82 -61
- package/lib/plugin/Form/InputTag.d.ts +6 -1
- package/lib/plugin/Form/InputTag.js +54 -4
- package/lib/plugin/Form/InputText.d.ts +2 -0
- package/lib/plugin/Form/InputText.js +51 -1
- package/lib/plugin/Form/InputTime.js +3 -1
- package/lib/plugin/Form/InputTimeRange.js +3 -1
- package/lib/plugin/Form/InputTree.d.ts +2 -1
- package/lib/plugin/Form/InputTree.js +98 -35
- package/lib/plugin/Form/InputURL.js +3 -1
- package/lib/plugin/Form/InputYear.js +3 -1
- package/lib/plugin/Form/InputYearRange.js +3 -1
- package/lib/plugin/Form/Item.js +20 -15
- package/lib/plugin/Form/ListSelect.d.ts +2 -0
- package/lib/plugin/Form/ListSelect.js +52 -2
- package/lib/plugin/Form/LocationPicker.d.ts +28 -0
- package/lib/plugin/Form/LocationPicker.js +34 -1
- package/lib/plugin/Form/MatrixCheckboxes.d.ts +1 -2
- package/lib/plugin/Form/MatrixCheckboxes.js +32 -6
- package/lib/plugin/Form/NestedSelect.d.ts +2 -1
- package/lib/plugin/Form/NestedSelect.js +52 -2
- package/lib/plugin/Form/Picker.d.ts +2 -1
- package/lib/plugin/Form/Picker.js +51 -3
- package/lib/plugin/Form/Radios.d.ts +2 -0
- package/lib/plugin/Form/Radios.js +33 -2
- package/lib/plugin/Form/Select.d.ts +9 -7
- package/lib/plugin/Form/Select.js +68 -51
- package/lib/plugin/Form/Static.js +5 -3
- package/lib/plugin/Form/Switch.d.ts +6 -1
- package/lib/plugin/Form/Switch.js +13 -1
- package/lib/plugin/Form/TabsTransfer.d.ts +4 -3
- package/lib/plugin/Form/TabsTransfer.js +80 -27
- package/lib/plugin/Form/Textarea.js +3 -1
- package/lib/plugin/Form/Transfer.d.ts +2 -0
- package/lib/plugin/Form/Transfer.js +46 -5
- package/lib/plugin/Form/TreeSelect.d.ts +2 -1
- package/lib/plugin/Form/TreeSelect.js +86 -30
- package/lib/plugin/Form/UUID.js +3 -1
- package/lib/plugin/Grid.js +13 -8
- package/lib/plugin/HBox.js +10 -8
- package/lib/plugin/IFrame.js +3 -1
- package/lib/plugin/Icon.js +5 -3
- package/lib/plugin/Image.js +54 -31
- package/lib/plugin/Images.js +22 -10
- package/lib/plugin/Json.js +3 -1
- package/lib/plugin/Layout/FlexPluginBase.js +18 -16
- package/lib/plugin/Layout/Layout_fixed.js +3 -1
- package/lib/plugin/Layout/Layout_free_container.js +3 -1
- package/lib/plugin/Layout/Layout_sorption_container.js +3 -1
- package/lib/plugin/Link.js +17 -5
- package/lib/plugin/List.d.ts +5 -0
- package/lib/plugin/List.js +58 -21
- package/lib/plugin/List2.d.ts +545 -0
- package/lib/plugin/List2.js +388 -0
- package/lib/plugin/ListItem.js +4 -2
- package/lib/plugin/Log.js +6 -4
- package/lib/plugin/Mapping.js +3 -1
- package/lib/plugin/Markdown.js +3 -1
- package/lib/plugin/Nav.d.ts +2 -0
- package/lib/plugin/Nav.js +7 -3
- package/lib/plugin/OfficeViewer.js +3 -1
- package/lib/plugin/Operation.js +4 -3
- package/lib/plugin/Others/Action.js +7 -5
- package/lib/plugin/Others/TableCell.js +5 -3
- package/lib/plugin/Page.d.ts +1 -1
- package/lib/plugin/Page.js +65 -23
- package/lib/plugin/Pagination.d.ts +0 -1
- package/lib/plugin/Pagination.js +38 -18
- package/lib/plugin/Panel.js +4 -2
- package/lib/plugin/Plain.js +3 -1
- package/lib/plugin/Progress.js +37 -10
- package/lib/plugin/Property.js +3 -1
- package/lib/plugin/QRCode.js +3 -1
- package/lib/plugin/Reset.js +3 -1
- package/lib/plugin/SearchBox.d.ts +3 -1
- package/lib/plugin/SearchBox.js +14 -1
- package/lib/plugin/Service.d.ts +20 -13
- package/lib/plugin/Service.js +201 -92
- package/lib/plugin/Sparkline.d.ts +2 -1
- package/lib/plugin/Sparkline.js +31 -8
- package/lib/plugin/Status.js +3 -1
- package/lib/plugin/Steps.js +3 -1
- package/lib/plugin/Submit.js +3 -1
- package/lib/plugin/Table.d.ts +10 -1
- package/lib/plugin/Table.js +159 -106
- package/lib/plugin/Table2.d.ts +24 -10
- package/lib/plugin/Table2.js +672 -418
- package/lib/plugin/TableCell2.d.ts +14 -2
- package/lib/plugin/TableCell2.js +509 -362
- package/lib/plugin/TableView.d.ts +2 -1
- package/lib/plugin/TableView.js +3 -1
- package/lib/plugin/Tabs.d.ts +2 -1
- package/lib/plugin/Tabs.js +6 -4
- package/lib/plugin/Tag.js +10 -2
- package/lib/plugin/Tasks.js +3 -1
- package/lib/plugin/Time.js +3 -1
- package/lib/plugin/Timeline.d.ts +2 -1
- package/lib/plugin/Timeline.js +76 -3
- package/lib/plugin/TooltipWrapper.js +12 -9
- package/lib/plugin/Tpl.js +21 -3
- package/lib/plugin/Video.js +3 -1
- package/lib/plugin/WebComponent.js +3 -1
- package/lib/plugin/Wizard.js +7 -5
- package/lib/plugin/Wrapper.js +10 -8
- package/lib/plugin/index.d.ts +144 -0
- package/lib/renderer/APIAdaptorControl.d.ts +16 -2
- package/lib/renderer/APIAdaptorControl.js +34 -46
- package/lib/renderer/APIControl.d.ts +4 -4
- package/lib/renderer/APIControl.js +13 -3
- package/lib/renderer/ActionApiControl.d.ts +9 -3
- package/lib/renderer/BadgeControl.d.ts +9 -9
- package/lib/renderer/BadgeControl.js +8 -3
- package/lib/renderer/ButtonGroupControl.d.ts +1 -1
- package/lib/renderer/ButtonGroupControl.js +3 -1
- package/lib/renderer/ColumnControl.d.ts +1 -1
- package/lib/renderer/DataBindingControl.d.ts +3 -3
- package/lib/renderer/DataBindingControl.js +13 -6
- package/lib/renderer/DataMappingControl.js +3 -1
- package/lib/renderer/DataPickerControl.d.ts +1 -1
- package/lib/renderer/DataPickerControl.js +3 -1
- package/lib/renderer/DateShortCutControl.d.ts +3 -2
- package/lib/renderer/DateShortCutControl.js +10 -6
- package/lib/renderer/ExpressionFormulaControl.d.ts +1 -1
- package/lib/renderer/ExpressionFormulaControl.js +4 -2
- package/lib/renderer/FeatureControl.d.ts +18 -5
- package/lib/renderer/FeatureControl.js +81 -16
- package/lib/renderer/FieldSetting.d.ts +66 -0
- package/lib/renderer/FieldSetting.js +503 -0
- package/lib/renderer/FlexSettingControl.d.ts +1 -1
- package/lib/renderer/FlexSettingControl.js +4 -2
- package/lib/renderer/FormulaControl.d.ts +8 -3
- package/lib/renderer/FormulaControl.js +23 -6
- package/lib/renderer/FunctionEditorControl.d.ts +79 -0
- package/lib/renderer/FunctionEditorControl.js +115 -0
- package/lib/renderer/GoConfigControl.d.ts +1 -1
- package/lib/renderer/GoConfigControl.js +4 -2
- package/lib/renderer/InputRangeValueControl.d.ts +15 -0
- package/lib/renderer/InputRangeValueControl.js +127 -0
- package/lib/renderer/MapSourceControl.d.ts +3 -3
- package/lib/renderer/MapSourceControl.js +4 -2
- package/lib/renderer/NavBadgeControl.d.ts +7 -7
- package/lib/renderer/NavBadgeControl.js +3 -1
- package/lib/renderer/NavDefaultActive.js +3 -1
- package/lib/renderer/NavSourceControl.d.ts +53 -35
- package/lib/renderer/NavSourceControl.js +600 -227
- package/lib/renderer/OptionControl.d.ts +5 -3
- package/lib/renderer/OptionControl.js +37 -25
- package/lib/renderer/RangePartsControl.d.ts +5 -5
- package/lib/renderer/RangePartsControl.js +6 -4
- package/lib/renderer/StatusControl.d.ts +2 -2
- package/lib/renderer/StatusControl.js +19 -3
- package/lib/renderer/SwitchMoreControl.d.ts +12 -5
- package/lib/renderer/SwitchMoreControl.js +26 -9
- package/lib/renderer/TableColumnWidthControl.d.ts +29 -0
- package/lib/renderer/TableColumnWidthControl.js +186 -0
- package/lib/renderer/TimelineItemControl.d.ts +6 -6
- package/lib/renderer/TimelineItemControl.js +26 -7
- package/lib/renderer/TplFormulaControl.d.ts +1 -1
- package/lib/renderer/TplFormulaControl.js +3 -1
- package/lib/renderer/TransferTableControl.d.ts +3 -3
- package/lib/renderer/TransferTableControl.js +4 -2
- package/lib/renderer/TreeOptionControl.d.ts +4 -4
- package/lib/renderer/TreeOptionControl.js +15 -13
- package/lib/renderer/ValidationControl.d.ts +4 -4
- package/lib/renderer/ValidationControl.js +4 -2
- package/lib/renderer/ValidationItem.d.ts +3 -3
- package/lib/renderer/ValidationItem.js +3 -1
- package/lib/renderer/crud2-control/AddColumnModal.d.ts +6 -0
- package/lib/renderer/crud2-control/AddColumnModal.js +265 -0
- package/lib/renderer/crud2-control/CRUDColumnControl.d.ts +68 -0
- package/lib/renderer/crud2-control/CRUDColumnControl.js +482 -0
- package/lib/renderer/crud2-control/CRUDFiltersControl.d.ts +53 -0
- package/lib/renderer/crud2-control/CRUDFiltersControl.js +701 -0
- package/lib/renderer/crud2-control/CRUDToolbarControl.d.ts +49 -0
- package/lib/renderer/crud2-control/CRUDToolbarControl.js +426 -0
- package/lib/renderer/event-control/action-config-dialog.d.ts +1 -1
- package/lib/renderer/event-control/action-config-dialog.js +29 -3
- package/lib/renderer/event-control/action-config-panel.js +3 -1
- package/lib/renderer/event-control/comp-action-select.d.ts +1 -1
- package/lib/renderer/event-control/comp-action-select.js +3 -1
- package/lib/renderer/event-control/helper.d.ts +2 -1
- package/lib/renderer/event-control/helper.js +305 -204
- package/lib/renderer/event-control/index.d.ts +28 -19
- package/lib/renderer/event-control/index.js +115 -22
- package/lib/renderer/style-control/Background.d.ts +1 -1
- package/lib/renderer/style-control/Background.js +3 -1
- package/lib/renderer/style-control/Border.d.ts +2 -2
- package/lib/renderer/style-control/Border.js +10 -8
- package/lib/renderer/style-control/BoxModel.d.ts +2 -2
- package/lib/renderer/style-control/BoxModel.js +3 -1
- package/lib/renderer/style-control/BoxShadow.d.ts +2 -2
- package/lib/renderer/style-control/BoxShadow.js +3 -1
- package/lib/renderer/style-control/Display.d.ts +1 -1
- package/lib/renderer/style-control/Display.js +3 -1
- package/lib/renderer/style-control/Font.d.ts +1 -1
- package/lib/renderer/style-control/Font.js +3 -1
- package/lib/renderer/style-control/InsetBoxModel.d.ts +2 -2
- package/lib/renderer/style-control/InsetBoxModel.js +3 -1
- package/lib/renderer/style-control/ThemeCssCode.d.ts +1 -1
- package/lib/renderer/style-control/ThemeCssCode.js +136 -282
- package/lib/renderer/style-control/font-family.js +3 -1
- package/lib/renderer/style-control/helper.js +3 -1
- package/lib/renderer/style-control/transformation.js +3 -1
- package/lib/renderer/textarea-formula/FormulaPicker.js +5 -3
- package/lib/renderer/textarea-formula/TextareaFormulaControl.d.ts +3 -1
- package/lib/renderer/textarea-formula/TextareaFormulaControl.js +76 -7
- package/lib/renderer/textarea-formula/plugin.js +5 -3
- package/lib/tpl/api.js +19 -13
- package/lib/tpl/common.js +63 -18
- package/lib/tpl/horizontal.js +9 -3
- package/lib/tpl/layout.js +17 -10
- package/lib/tpl/options.d.ts +10 -1
- package/lib/tpl/options.js +251 -10
- package/lib/tpl/remark.js +3 -1
- package/lib/tpl/style.js +99 -60
- package/lib/tpl/validations.js +3 -1
- package/lib/util.d.ts +14 -0
- package/lib/util.js +39 -1
- package/lib/validator.js +7 -5
- package/package.json +2 -1
- package/esm/plugin/CRUD2.d.ts +0 -78
- package/esm/plugin/CRUD2.js +0 -1553
- package/esm/renderer/style-control/themeLanguage.d.ts +0 -1
- package/esm/renderer/style-control/themeLanguage.js +0 -1894
- package/lib/plugin/CRUD2.d.ts +0 -78
- package/lib/plugin/CRUD2.js +0 -1565
- package/lib/renderer/style-control/themeLanguage.d.ts +0 -1
- package/lib/renderer/style-control/themeLanguage.js +0 -1898
package/lib/plugin/Table2.js
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
/**
|
2
|
-
* amis-editor v5.5.
|
2
|
+
* amis-editor v5.5.2-beta.2
|
3
|
+
* build time: 2023-09-28
|
3
4
|
* Copyright 2018-2023 @fex
|
4
5
|
*/
|
5
6
|
|
@@ -8,27 +9,255 @@
|
|
8
9
|
Object.defineProperty(exports, '__esModule', { value: true });
|
9
10
|
|
10
11
|
var tslib = require('tslib');
|
12
|
+
var React = require('react');
|
13
|
+
var amis = require('amis');
|
11
14
|
var amisCore = require('amis-core');
|
12
15
|
var amisEditorCore = require('amis-editor-core');
|
16
|
+
var DSBuilderManager = require('../builder/DSBuilderManager.js');
|
13
17
|
var helper = require('../renderer/event-control/helper.js');
|
14
18
|
var util = require('../util.js');
|
15
19
|
var i18nRuntime = require('i18n-runtime');
|
16
20
|
|
21
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
22
|
+
|
23
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
24
|
+
|
25
|
+
var Table2RenderereEvent = [{
|
26
|
+
eventName: 'selectedChange',
|
27
|
+
eventLabel: i18nRuntime.i18n("257f5a3886d87d2255206f86b880d07e"),
|
28
|
+
description: i18nRuntime.i18n("6130b1f75d624b2f73f5d923492e92f7"),
|
29
|
+
dataSchema: [{
|
30
|
+
type: 'object',
|
31
|
+
properties: {
|
32
|
+
data: {
|
33
|
+
type: 'object',
|
34
|
+
title: i18nRuntime.i18n("0d83078816aa273f2941c9b55ec82bf3"),
|
35
|
+
properties: {
|
36
|
+
selectedItems: {
|
37
|
+
type: 'array',
|
38
|
+
title: i18nRuntime.i18n("94935dfa6c9b908515a593956ee7d07c")
|
39
|
+
},
|
40
|
+
unSelectedItems: {
|
41
|
+
type: 'array',
|
42
|
+
title: i18nRuntime.i18n("f10b94a4ac77878be53fad599a761928")
|
43
|
+
}
|
44
|
+
}
|
45
|
+
}
|
46
|
+
}
|
47
|
+
}]
|
48
|
+
}, {
|
49
|
+
eventName: 'columnSort',
|
50
|
+
eventLabel: i18nRuntime.i18n("f3d21138c8ecf5683503c4f814cc7199"),
|
51
|
+
description: i18nRuntime.i18n("d84464cfb2a5828a200fe9c28a323122"),
|
52
|
+
dataSchema: [{
|
53
|
+
type: 'object',
|
54
|
+
properties: {
|
55
|
+
data: {
|
56
|
+
type: 'object',
|
57
|
+
title: i18nRuntime.i18n("0d83078816aa273f2941c9b55ec82bf3"),
|
58
|
+
properties: {
|
59
|
+
orderBy: {
|
60
|
+
type: 'string',
|
61
|
+
title: i18nRuntime.i18n("8f98291c9fa89c0bfce463c0a2eaf97c")
|
62
|
+
},
|
63
|
+
orderDir: {
|
64
|
+
type: 'string',
|
65
|
+
title: i18nRuntime.i18n("c35c1a13309c6f9da9837857517e65fc")
|
66
|
+
}
|
67
|
+
}
|
68
|
+
}
|
69
|
+
}
|
70
|
+
}]
|
71
|
+
}, {
|
72
|
+
eventName: 'columnFilter',
|
73
|
+
eventLabel: i18nRuntime.i18n("3d0b957a99d0c366612c01913e17a0c7"),
|
74
|
+
description: i18nRuntime.i18n("b35963687361af98e6acdc004e87fc3c"),
|
75
|
+
dataSchema: [{
|
76
|
+
type: 'object',
|
77
|
+
properties: {
|
78
|
+
data: {
|
79
|
+
type: 'object',
|
80
|
+
title: i18nRuntime.i18n("0d83078816aa273f2941c9b55ec82bf3"),
|
81
|
+
properties: {
|
82
|
+
filterName: {
|
83
|
+
type: 'string',
|
84
|
+
title: i18nRuntime.i18n("8f98291c9fa89c0bfce463c0a2eaf97c")
|
85
|
+
},
|
86
|
+
filterValue: {
|
87
|
+
type: 'string',
|
88
|
+
title: i18nRuntime.i18n("e125986c2ba6783c4297ffe5405cc8bc")
|
89
|
+
}
|
90
|
+
}
|
91
|
+
}
|
92
|
+
}
|
93
|
+
}]
|
94
|
+
}, {
|
95
|
+
eventName: 'columnSearch',
|
96
|
+
eventLabel: i18nRuntime.i18n("93a5a0253f11e3a2e58f4e87a52fb094"),
|
97
|
+
description: i18nRuntime.i18n("6d4c4990ab2c32efe8a17c5f22e10cb5"),
|
98
|
+
dataSchema: [{
|
99
|
+
type: 'object',
|
100
|
+
properties: {
|
101
|
+
data: {
|
102
|
+
type: 'object',
|
103
|
+
title: i18nRuntime.i18n("0d83078816aa273f2941c9b55ec82bf3"),
|
104
|
+
properties: {
|
105
|
+
searchName: {
|
106
|
+
type: 'string',
|
107
|
+
title: i18nRuntime.i18n("8f98291c9fa89c0bfce463c0a2eaf97c")
|
108
|
+
},
|
109
|
+
searchValue: {
|
110
|
+
type: 'object',
|
111
|
+
title: i18nRuntime.i18n("caafbcb52c70ad0bbbbf127ee7b08b89")
|
112
|
+
}
|
113
|
+
}
|
114
|
+
}
|
115
|
+
}
|
116
|
+
}]
|
117
|
+
}, {
|
118
|
+
eventName: 'orderChange',
|
119
|
+
eventLabel: i18nRuntime.i18n("85ddd38957256b6e9026f42ed570bc35"),
|
120
|
+
description: i18nRuntime.i18n("d7a66def82af88cd5d408e38feb8a65a"),
|
121
|
+
dataSchema: [{
|
122
|
+
type: 'object',
|
123
|
+
properties: {
|
124
|
+
data: {
|
125
|
+
type: 'object',
|
126
|
+
title: i18nRuntime.i18n("0d83078816aa273f2941c9b55ec82bf3"),
|
127
|
+
properties: {
|
128
|
+
movedItems: {
|
129
|
+
type: 'array',
|
130
|
+
title: i18nRuntime.i18n("64ef585f778c9d1b010e86b032398ab6")
|
131
|
+
}
|
132
|
+
}
|
133
|
+
}
|
134
|
+
}
|
135
|
+
}]
|
136
|
+
}, {
|
137
|
+
eventName: 'columnToggled',
|
138
|
+
eventLabel: i18nRuntime.i18n("ecfebbc91e2c18a512aeb11b7da15193"),
|
139
|
+
description: i18nRuntime.i18n("c94f45773a42dc386b9c9dcdc6fa542b"),
|
140
|
+
dataSchema: [{
|
141
|
+
type: 'object',
|
142
|
+
properties: {
|
143
|
+
data: {
|
144
|
+
type: 'object',
|
145
|
+
title: i18nRuntime.i18n("0d83078816aa273f2941c9b55ec82bf3"),
|
146
|
+
properties: {
|
147
|
+
columns: {
|
148
|
+
type: 'array',
|
149
|
+
title: i18nRuntime.i18n("db9df54392e408520ca12c6a56113b5a")
|
150
|
+
}
|
151
|
+
}
|
152
|
+
}
|
153
|
+
}
|
154
|
+
}]
|
155
|
+
}, {
|
156
|
+
eventName: 'rowClick',
|
157
|
+
eventLabel: i18nRuntime.i18n("76e47871d654c3b0b0e301c0a076e55a"),
|
158
|
+
description: i18nRuntime.i18n("cc13521eab2c7423b3fb857772405cc3"),
|
159
|
+
dataSchema: [{
|
160
|
+
type: 'object',
|
161
|
+
properties: {
|
162
|
+
data: {
|
163
|
+
type: 'object',
|
164
|
+
title: i18nRuntime.i18n("0d83078816aa273f2941c9b55ec82bf3"),
|
165
|
+
properties: {
|
166
|
+
item: {
|
167
|
+
type: 'object',
|
168
|
+
title: i18nRuntime.i18n("bf2a4fd8ecd654982e2d466f10f54d3f")
|
169
|
+
},
|
170
|
+
index: {
|
171
|
+
type: 'number',
|
172
|
+
title: i18nRuntime.i18n("f74fd69ce55e3f96fe9a032c0da42330")
|
173
|
+
}
|
174
|
+
}
|
175
|
+
}
|
176
|
+
}
|
177
|
+
}]
|
178
|
+
}, {
|
179
|
+
eventName: 'rowMouseEnter',
|
180
|
+
eventLabel: i18nRuntime.i18n("5db079b140feffa84c84d1b51d824dea"),
|
181
|
+
description: i18nRuntime.i18n("90a5608bcd85a3cfcfbb5263a229915c"),
|
182
|
+
dataSchema: [{
|
183
|
+
type: 'object',
|
184
|
+
properties: {
|
185
|
+
data: {
|
186
|
+
type: 'object',
|
187
|
+
title: i18nRuntime.i18n("0d83078816aa273f2941c9b55ec82bf3"),
|
188
|
+
properties: {
|
189
|
+
item: {
|
190
|
+
type: 'object',
|
191
|
+
title: i18nRuntime.i18n("bf2a4fd8ecd654982e2d466f10f54d3f")
|
192
|
+
},
|
193
|
+
index: {
|
194
|
+
type: 'number',
|
195
|
+
title: i18nRuntime.i18n("f74fd69ce55e3f96fe9a032c0da42330")
|
196
|
+
}
|
197
|
+
}
|
198
|
+
}
|
199
|
+
}
|
200
|
+
}]
|
201
|
+
}, {
|
202
|
+
eventName: 'rowMouseLeave',
|
203
|
+
eventLabel: i18nRuntime.i18n("e8bf039de5dc6751c4045f55930e0c83"),
|
204
|
+
description: i18nRuntime.i18n("f1ca0d305f3251a81f361a2dc8e11fff"),
|
205
|
+
dataSchema: [{
|
206
|
+
type: 'object',
|
207
|
+
properties: {
|
208
|
+
data: {
|
209
|
+
type: 'object',
|
210
|
+
title: i18nRuntime.i18n("0d83078816aa273f2941c9b55ec82bf3"),
|
211
|
+
properties: {
|
212
|
+
item: {
|
213
|
+
type: 'object',
|
214
|
+
title: i18nRuntime.i18n("bf2a4fd8ecd654982e2d466f10f54d3f")
|
215
|
+
},
|
216
|
+
index: {
|
217
|
+
type: 'number',
|
218
|
+
title: i18nRuntime.i18n("f74fd69ce55e3f96fe9a032c0da42330")
|
219
|
+
}
|
220
|
+
}
|
221
|
+
}
|
222
|
+
}
|
223
|
+
}]
|
224
|
+
}];
|
225
|
+
var Table2RendererAction = [{
|
226
|
+
actionType: 'select',
|
227
|
+
actionLabel: i18nRuntime.i18n("8eb3c8b16106e5487cd1fa3b8a1342ce"),
|
228
|
+
description: i18nRuntime.i18n("908cc16fe4f7972450167e26276ac726"),
|
229
|
+
schema: helper.getArgsWrapper([amisEditorCore.getSchemaTpl('formulaControl', {
|
230
|
+
name: 'selected',
|
231
|
+
label: i18nRuntime.i18n("a2b39e5a8b5015234dcd8e07a2e00e3d"),
|
232
|
+
variables: '${variables}',
|
233
|
+
size: 'lg',
|
234
|
+
mode: 'horizontal'
|
235
|
+
})])
|
236
|
+
}, {
|
237
|
+
actionType: 'selectAll',
|
238
|
+
actionLabel: i18nRuntime.i18n("366a3c07289bd6efb7c2a182f7a12772"),
|
239
|
+
description: i18nRuntime.i18n("e97c09cd119b64ae0a8dfd42a1d449cb")
|
240
|
+
}, {
|
241
|
+
actionType: 'clearAll',
|
242
|
+
actionLabel: i18nRuntime.i18n("c3e8652924c258e121eed16414d3a9e5"),
|
243
|
+
description: i18nRuntime.i18n("7619ec29c0a854dd49e0a7a47bf1a127")
|
244
|
+
}];
|
17
245
|
var Table2Plugin = /** @class */function (_super) {
|
18
246
|
tslib.__extends(Table2Plugin, _super);
|
19
|
-
function Table2Plugin() {
|
20
|
-
var _this = _super
|
21
|
-
|
247
|
+
function Table2Plugin(manager) {
|
248
|
+
var _this = _super.call(this, manager) || this;
|
249
|
+
_this.disabledRendererPlugin = true;
|
250
|
+
_this.name = i18nRuntime.i18n("b339aa87104709397ba68e7ebbc6e5ba");
|
251
|
+
_this.panelTitle = i18nRuntime.i18n("b339aa87104709397ba68e7ebbc6e5ba");
|
252
|
+
_this.icon = 'fa fa-table';
|
253
|
+
_this.panelIcon = 'fa fa-table';
|
254
|
+
_this.pluginIcon = 'table-plugin';
|
22
255
|
_this.rendererName = 'table2';
|
23
|
-
_this.$schema = '/schemas/TableSchema.json';
|
24
|
-
// 组件名称
|
25
|
-
_this.name = i18nRuntime.i18n("0d1f68afa19f3f3dd88e28d17c98ddf9");
|
26
256
|
_this.isBaseComponent = true;
|
27
257
|
_this.panelJustify = true;
|
28
|
-
_this
|
258
|
+
_this.$schema = '/schemas/TableSchema2.json';
|
29
259
|
_this.description = i18nRuntime.i18n("ea2b32f5d78d2305b9b7bc21e056a009");
|
30
260
|
_this.docLink = '/amis/zh-CN/components/table2';
|
31
|
-
_this.icon = 'fa fa-table';
|
32
261
|
_this.scaffold = {
|
33
262
|
type: 'table2',
|
34
263
|
columns: [{
|
@@ -70,6 +299,7 @@ var Table2Plugin = /** @class */function (_super) {
|
|
70
299
|
};
|
71
300
|
_this.scaffoldForm = {
|
72
301
|
title: i18nRuntime.i18n("6b93fcfc1a5795189c6072fa6e86d4f6"),
|
302
|
+
canRebuild: true,
|
73
303
|
body: [{
|
74
304
|
name: 'columns',
|
75
305
|
type: 'combo',
|
@@ -119,245 +349,96 @@ var Table2Plugin = /** @class */function (_super) {
|
|
119
349
|
label: i18nRuntime.i18n("8abc564260a1564521e0c3a1d5419b4a")
|
120
350
|
}]
|
121
351
|
}]
|
122
|
-
}],
|
123
|
-
canRebuild: true
|
124
|
-
};
|
125
|
-
_this.panelTitle = i18nRuntime.i18n("b339aa87104709397ba68e7ebbc6e5ba");
|
126
|
-
_this.events = [{
|
127
|
-
eventName: 'selectedChange',
|
128
|
-
eventLabel: i18nRuntime.i18n("257f5a3886d87d2255206f86b880d07e"),
|
129
|
-
description: i18nRuntime.i18n("6130b1f75d624b2f73f5d923492e92f7"),
|
130
|
-
dataSchema: [{
|
131
|
-
type: 'object',
|
132
|
-
properties: {
|
133
|
-
data: {
|
134
|
-
type: 'object',
|
135
|
-
title: i18nRuntime.i18n("0d83078816aa273f2941c9b55ec82bf3"),
|
136
|
-
properties: {
|
137
|
-
selectedItems: {
|
138
|
-
type: 'array',
|
139
|
-
title: i18nRuntime.i18n("94935dfa6c9b908515a593956ee7d07c")
|
140
|
-
},
|
141
|
-
unSelectedItems: {
|
142
|
-
type: 'array',
|
143
|
-
title: i18nRuntime.i18n("f10b94a4ac77878be53fad599a761928")
|
144
|
-
}
|
145
|
-
}
|
146
|
-
}
|
147
|
-
}
|
148
|
-
}]
|
149
|
-
}, {
|
150
|
-
eventName: 'columnSort',
|
151
|
-
eventLabel: i18nRuntime.i18n("f3d21138c8ecf5683503c4f814cc7199"),
|
152
|
-
description: i18nRuntime.i18n("d84464cfb2a5828a200fe9c28a323122"),
|
153
|
-
dataSchema: [{
|
154
|
-
type: 'object',
|
155
|
-
properties: {
|
156
|
-
data: {
|
157
|
-
type: 'object',
|
158
|
-
title: i18nRuntime.i18n("0d83078816aa273f2941c9b55ec82bf3"),
|
159
|
-
properties: {
|
160
|
-
orderBy: {
|
161
|
-
type: 'string',
|
162
|
-
title: i18nRuntime.i18n("8f98291c9fa89c0bfce463c0a2eaf97c")
|
163
|
-
},
|
164
|
-
orderDir: {
|
165
|
-
type: 'string',
|
166
|
-
title: i18nRuntime.i18n("c35c1a13309c6f9da9837857517e65fc")
|
167
|
-
}
|
168
|
-
}
|
169
|
-
}
|
170
|
-
}
|
171
|
-
}]
|
172
|
-
}, {
|
173
|
-
eventName: 'columnFilter',
|
174
|
-
eventLabel: i18nRuntime.i18n("3d0b957a99d0c366612c01913e17a0c7"),
|
175
|
-
description: i18nRuntime.i18n("b35963687361af98e6acdc004e87fc3c"),
|
176
|
-
dataSchema: [{
|
177
|
-
type: 'object',
|
178
|
-
properties: {
|
179
|
-
data: {
|
180
|
-
type: 'object',
|
181
|
-
title: i18nRuntime.i18n("0d83078816aa273f2941c9b55ec82bf3"),
|
182
|
-
properties: {
|
183
|
-
filterName: {
|
184
|
-
type: 'string',
|
185
|
-
title: i18nRuntime.i18n("8f98291c9fa89c0bfce463c0a2eaf97c")
|
186
|
-
},
|
187
|
-
filterValue: {
|
188
|
-
type: 'string',
|
189
|
-
title: i18nRuntime.i18n("e125986c2ba6783c4297ffe5405cc8bc")
|
190
|
-
}
|
191
|
-
}
|
192
|
-
}
|
193
|
-
}
|
194
352
|
}]
|
195
|
-
}
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
}
|
214
|
-
}
|
215
|
-
}
|
216
|
-
}
|
217
|
-
}]
|
218
|
-
}, {
|
219
|
-
eventName: 'orderChange',
|
220
|
-
eventLabel: i18nRuntime.i18n("85ddd38957256b6e9026f42ed570bc35"),
|
221
|
-
description: i18nRuntime.i18n("d7a66def82af88cd5d408e38feb8a65a"),
|
222
|
-
dataSchema: [{
|
223
|
-
type: 'object',
|
224
|
-
properties: {
|
225
|
-
data: {
|
226
|
-
type: 'object',
|
227
|
-
title: i18nRuntime.i18n("0d83078816aa273f2941c9b55ec82bf3"),
|
228
|
-
properties: {
|
229
|
-
movedItems: {
|
230
|
-
type: 'array',
|
231
|
-
title: i18nRuntime.i18n("64ef585f778c9d1b010e86b032398ab6")
|
232
|
-
}
|
233
|
-
}
|
234
|
-
}
|
235
|
-
}
|
236
|
-
}]
|
237
|
-
}, {
|
238
|
-
eventName: 'columnToggled',
|
239
|
-
eventLabel: i18nRuntime.i18n("ecfebbc91e2c18a512aeb11b7da15193"),
|
240
|
-
description: i18nRuntime.i18n("c94f45773a42dc386b9c9dcdc6fa542b"),
|
241
|
-
dataSchema: [{
|
242
|
-
type: 'object',
|
243
|
-
properties: {
|
244
|
-
data: {
|
245
|
-
type: 'object',
|
246
|
-
title: i18nRuntime.i18n("0d83078816aa273f2941c9b55ec82bf3"),
|
247
|
-
properties: {
|
248
|
-
columns: {
|
249
|
-
type: 'array',
|
250
|
-
title: i18nRuntime.i18n("db9df54392e408520ca12c6a56113b5a")
|
251
|
-
}
|
252
|
-
}
|
253
|
-
}
|
254
|
-
}
|
255
|
-
}]
|
256
|
-
}, {
|
257
|
-
eventName: 'rowClick',
|
258
|
-
eventLabel: i18nRuntime.i18n("76e47871d654c3b0b0e301c0a076e55a"),
|
259
|
-
description: i18nRuntime.i18n("cc13521eab2c7423b3fb857772405cc3"),
|
260
|
-
dataSchema: [{
|
261
|
-
type: 'object',
|
262
|
-
properties: {
|
263
|
-
data: {
|
264
|
-
type: 'object',
|
265
|
-
title: i18nRuntime.i18n("0d83078816aa273f2941c9b55ec82bf3"),
|
266
|
-
properties: {
|
267
|
-
item: {
|
268
|
-
type: 'object',
|
269
|
-
title: i18nRuntime.i18n("bf2a4fd8ecd654982e2d466f10f54d3f")
|
270
|
-
},
|
271
|
-
index: {
|
272
|
-
type: 'number',
|
273
|
-
title: i18nRuntime.i18n("f74fd69ce55e3f96fe9a032c0da42330")
|
274
|
-
}
|
275
|
-
}
|
353
|
+
};
|
354
|
+
_this.events = Table2RenderereEvent;
|
355
|
+
_this.actions = Table2RendererAction;
|
356
|
+
_this._dynamicControls = {
|
357
|
+
primaryField: function (context) {
|
358
|
+
return amisEditorCore.getSchemaTpl('primaryField', {
|
359
|
+
/** CRUD下,该项配置提升到CRUD中 */
|
360
|
+
hiddenOn: "data.type && (data.type === \"crud\" || data.type === \"crud2\")"
|
361
|
+
});
|
362
|
+
},
|
363
|
+
quickSaveApi: function (context) {
|
364
|
+
return amisEditorCore.getSchemaTpl('apiControl', {
|
365
|
+
name: 'quickSaveApi',
|
366
|
+
renderLabel: false,
|
367
|
+
label: {
|
368
|
+
type: 'tpl',
|
369
|
+
tpl: i18nRuntime.i18n("33eaf97ecb3465754855e847f14d129c"),
|
370
|
+
className: 'flex items-end'
|
276
371
|
}
|
277
|
-
}
|
278
|
-
}
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
type: 'object',
|
288
|
-
title: i18nRuntime.i18n("0d83078816aa273f2941c9b55ec82bf3"),
|
289
|
-
properties: {
|
290
|
-
item: {
|
291
|
-
type: 'object',
|
292
|
-
title: i18nRuntime.i18n("bf2a4fd8ecd654982e2d466f10f54d3f")
|
293
|
-
},
|
294
|
-
index: {
|
295
|
-
type: 'number',
|
296
|
-
title: i18nRuntime.i18n("f74fd69ce55e3f96fe9a032c0da42330")
|
297
|
-
}
|
298
|
-
}
|
372
|
+
});
|
373
|
+
},
|
374
|
+
quickSaveItemApi: function (context) {
|
375
|
+
return amisEditorCore.getSchemaTpl('apiControl', {
|
376
|
+
name: 'quickSaveItemApi',
|
377
|
+
renderLabel: false,
|
378
|
+
label: {
|
379
|
+
type: 'tpl',
|
380
|
+
tpl: i18nRuntime.i18n("ce7d31d64f2315e1d4cede288b9dfc60"),
|
381
|
+
className: 'flex items-end'
|
299
382
|
}
|
300
|
-
}
|
301
|
-
}
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
383
|
+
});
|
384
|
+
},
|
385
|
+
rowSelectionKeyField: function (context) {
|
386
|
+
return {
|
387
|
+
type: 'input-text',
|
388
|
+
name: 'rowSelection.keyField',
|
389
|
+
label: i18nRuntime.i18n("dad6519c7c75a23bee8ccb576e4609a2")
|
390
|
+
};
|
391
|
+
},
|
392
|
+
expandableKeyField: function (context) {
|
393
|
+
return {
|
394
|
+
type: 'input-text',
|
395
|
+
name: 'rowSelection.keyField',
|
396
|
+
label: i18nRuntime.i18n("dad6519c7c75a23bee8ccb576e4609a2")
|
397
|
+
};
|
398
|
+
},
|
399
|
+
draggable: function (context) {
|
400
|
+
return amisEditorCore.getSchemaTpl('switch', {
|
401
|
+
name: 'draggable',
|
402
|
+
label: i18nRuntime.i18n("5bdff9fd07d2a2430ac50e1559dbee27")
|
403
|
+
});
|
404
|
+
},
|
405
|
+
itemDraggableOn: function (context) {
|
406
|
+
return amisEditorCore.getSchemaTpl('formulaControl', {
|
407
|
+
label: i18nRuntime.i18n("cba09997ca646e67544f880c80ab97cb"),
|
408
|
+
name: 'itemDraggableOn'
|
409
|
+
});
|
410
|
+
},
|
411
|
+
saveOrderApi: function (context) {
|
412
|
+
return amisEditorCore.getSchemaTpl('apiControl', {
|
413
|
+
name: 'saveOrderApi',
|
414
|
+
renderLabel: false,
|
415
|
+
label: {
|
416
|
+
type: 'tpl',
|
417
|
+
tpl: i18nRuntime.i18n("cbe89f133fda6e0d1bec31eaf6aa7853"),
|
418
|
+
className: 'flex items-end'
|
322
419
|
}
|
323
|
-
}
|
324
|
-
}
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
description: i18nRuntime.i18n("908cc16fe4f7972450167e26276ac726"),
|
330
|
-
schema: helper.getArgsWrapper([amisEditorCore.getSchemaTpl('formulaControl', {
|
331
|
-
name: 'selected',
|
332
|
-
label: i18nRuntime.i18n("a2b39e5a8b5015234dcd8e07a2e00e3d"),
|
333
|
-
variables: '${variables}',
|
334
|
-
size: 'lg',
|
335
|
-
mode: 'horizontal'
|
336
|
-
})])
|
337
|
-
}, {
|
338
|
-
actionType: 'selectAll',
|
339
|
-
actionLabel: i18nRuntime.i18n("366a3c07289bd6efb7c2a182f7a12772"),
|
340
|
-
description: i18nRuntime.i18n("e97c09cd119b64ae0a8dfd42a1d449cb")
|
341
|
-
}, {
|
342
|
-
actionType: 'clearAll',
|
343
|
-
actionLabel: i18nRuntime.i18n("c3e8652924c258e121eed16414d3a9e5"),
|
344
|
-
description: i18nRuntime.i18n("7619ec29c0a854dd49e0a7a47bf1a127")
|
345
|
-
}];
|
420
|
+
});
|
421
|
+
},
|
422
|
+
columnTogglable: function (context) {
|
423
|
+
return false;
|
424
|
+
}
|
425
|
+
};
|
346
426
|
_this.panelBodyCreator = function (context) {
|
347
|
-
var
|
427
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
428
|
+
var isCRUDContext = _this.isCRUDContext(context);
|
429
|
+
var dc = _this.dynamicControls;
|
348
430
|
return amisEditorCore.getSchemaTpl('tabs', [{
|
349
431
|
title: i18nRuntime.i18n("24d67862f87f439db7ca957aecb77cce"),
|
350
432
|
body: [amisEditorCore.getSchemaTpl('collapseGroup', [{
|
351
433
|
title: i18nRuntime.i18n("4092ed98e9035652d4c9ca9441701ed7"),
|
352
434
|
body: [amisEditorCore.getSchemaTpl('layout:originPosition', {
|
353
435
|
value: 'left-top'
|
354
|
-
}), {
|
436
|
+
}), amisEditorCore.getSchemaTpl('formulaControl', {
|
437
|
+
label: amisEditorCore.tipedLabel(i18nRuntime.i18n("c11322c9cc43ce3c004cf03f5ac0acd0"), i18nRuntime.i18n("5b11953888d7c376458b397f222d4533")),
|
438
|
+
hidden: isCRUDContext,
|
355
439
|
name: 'source',
|
356
|
-
type: 'input-text',
|
357
|
-
label: amisEditorCore.tipedLabel(i18nRuntime.i18n("c11322c9cc43ce3c004cf03f5ac0acd0"), i18nRuntime.i18n("8369004103635f8e75026217ebf237da")),
|
358
|
-
hidden: isCRUDBody,
|
359
440
|
pipeIn: amisEditorCore.defaultValue('${items}')
|
360
|
-
}, amisEditorCore.getSchemaTpl('switch', {
|
441
|
+
}), isCRUDContext ? null : (_a = dc === null || dc === void 0 ? void 0 : dc.primaryField) === null || _a === void 0 ? void 0 : _a.call(dc, context), isCRUDContext ? null : (_b = dc === null || dc === void 0 ? void 0 : dc.quickSaveApi) === null || _b === void 0 ? void 0 : _b.call(dc, context), isCRUDContext ? null : (_c = dc === null || dc === void 0 ? void 0 : dc.quickSaveItemApi) === null || _c === void 0 ? void 0 : _c.call(dc, context), amisEditorCore.getSchemaTpl('switch', {
|
361
442
|
name: 'title',
|
362
443
|
label: i18nRuntime.i18n("bd3e7a1b636e4477a4ea59922ed2cc1e"),
|
363
444
|
pipeIn: function (value) {
|
@@ -418,69 +499,19 @@ var Table2Plugin = /** @class */function (_super) {
|
|
418
499
|
}
|
419
500
|
return null;
|
420
501
|
}
|
421
|
-
}), {
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
options: [{
|
432
|
-
label: i18nRuntime.i18n("4db804afe5c99f7ca4fe988ada35c77f"),
|
433
|
-
value: false
|
434
|
-
}, {
|
435
|
-
label: i18nRuntime.i18n("1ef8fd21130d17cb7c1613eaed6ca1e4"),
|
436
|
-
value: true
|
437
|
-
}]
|
438
|
-
}, {
|
439
|
-
type: 'input-group',
|
440
|
-
visibleOn: 'data.scroll && data.scroll.y !== null',
|
441
|
-
label: i18nRuntime.i18n("ee18dc475df8654cb13ad67dd84eec28"),
|
442
|
-
body: [{
|
443
|
-
type: 'input-number',
|
444
|
-
name: 'scroll.y'
|
445
|
-
}, {
|
446
|
-
type: 'tpl',
|
447
|
-
addOnclassName: 'border-0 bg-none',
|
448
|
-
tpl: 'px'
|
449
|
-
}]
|
450
|
-
}, {
|
451
|
-
name: 'scroll.x',
|
452
|
-
label: amisEditorCore.tipedLabel(i18nRuntime.i18n("8bb5781dc5f2745e6356cdc5e6d76b16"), i18nRuntime.i18n("88a364068f684dc77aca5b6c006ef576")),
|
453
|
-
type: 'button-group-select',
|
454
|
-
pipeIn: function (v) {
|
455
|
-
return v != null;
|
456
|
-
},
|
457
|
-
pipeOut: function (v) {
|
458
|
-
return v ? '' : null;
|
459
|
-
},
|
460
|
-
options: [{
|
461
|
-
label: i18nRuntime.i18n("4db804afe5c99f7ca4fe988ada35c77f"),
|
462
|
-
value: false
|
463
|
-
}, {
|
464
|
-
label: i18nRuntime.i18n("1ef8fd21130d17cb7c1613eaed6ca1e4"),
|
465
|
-
value: true
|
466
|
-
}]
|
467
|
-
}, {
|
468
|
-
type: 'input-group',
|
469
|
-
visibleOn: 'data.scroll && data.scroll.x !== null',
|
470
|
-
name: 'scroll.x',
|
471
|
-
label: i18nRuntime.i18n("6e3d35b57c29b1b419569cc55b3a5d33"),
|
472
|
-
body: [{
|
473
|
-
type: 'input-number',
|
474
|
-
name: 'scroll.x'
|
475
|
-
}, {
|
476
|
-
type: 'tpl',
|
477
|
-
addOnclassName: 'border-0 bg-none',
|
478
|
-
tpl: 'px'
|
479
|
-
}]
|
480
|
-
}, amisEditorCore.getSchemaTpl('tablePlaceholder')]
|
502
|
+
}), amisEditorCore.getSchemaTpl('tablePlaceholder', {
|
503
|
+
hidden: isCRUDContext
|
504
|
+
})
|
505
|
+
// TODD: 组件功能没有支持,暂时隐藏
|
506
|
+
// {
|
507
|
+
// type: 'input-number',
|
508
|
+
// name: 'combineNum',
|
509
|
+
// label: '合并单元格'
|
510
|
+
// }
|
511
|
+
].filter(Boolean)
|
481
512
|
}, {
|
482
513
|
title: i18nRuntime.i18n("949a8b7bd2c10070a2fae16f9c66afbb"),
|
483
|
-
body: [amisEditorCore.getSchemaTpl('switch', {
|
514
|
+
body: [(_d = dc === null || dc === void 0 ? void 0 : dc.columnTogglable) === null || _d === void 0 ? void 0 : _d.call(dc, context), amisEditorCore.getSchemaTpl('switch', {
|
484
515
|
name: 'resizable',
|
485
516
|
label: amisEditorCore.tipedLabel(i18nRuntime.i18n("ba4f461832cbdb7fbdb170fc9c1db647"), i18nRuntime.i18n("aa2bd9f54608c0c85d3ceecb707938c9")),
|
486
517
|
pipeIn: function (value) {
|
@@ -489,7 +520,7 @@ var Table2Plugin = /** @class */function (_super) {
|
|
489
520
|
pipeOut: function (value) {
|
490
521
|
return value;
|
491
522
|
}
|
492
|
-
}),
|
523
|
+
}), isCRUDContext ? null : {
|
493
524
|
type: 'ae-Switch-More',
|
494
525
|
mode: 'normal',
|
495
526
|
name: 'columnsTogglable',
|
@@ -512,7 +543,7 @@ var Table2Plugin = /** @class */function (_super) {
|
|
512
543
|
type: 'ae-columnControl'
|
513
544
|
}]
|
514
545
|
}
|
515
|
-
}]
|
546
|
+
}].filter(Boolean)
|
516
547
|
}, {
|
517
548
|
title: i18nRuntime.i18n("ed85be57262e5a0c3116293e88278fef"),
|
518
549
|
body: [{
|
@@ -532,26 +563,55 @@ var Table2Plugin = /** @class */function (_super) {
|
|
532
563
|
}],
|
533
564
|
clearable: false,
|
534
565
|
value: ''
|
535
|
-
},
|
566
|
+
}, {
|
536
567
|
type: 'ae-Switch-More',
|
537
568
|
mode: 'normal',
|
538
569
|
name: 'rowSelection',
|
539
|
-
label: i18nRuntime.i18n("
|
540
|
-
visibleOn: 'data.selectable',
|
570
|
+
label: i18nRuntime.i18n("240145572215920ae06db1eeb85b29c0"),
|
541
571
|
hiddenOnDefault: true,
|
542
572
|
formType: 'extend',
|
543
573
|
form: {
|
544
|
-
body: [
|
574
|
+
body: [/** 如果为 CRUD 背景下,主键配置、选择类型在 CRUD 面板中,此处应该隐藏 */
|
575
|
+
isCRUDContext ? null : (_e = dc === null || dc === void 0 ? void 0 : dc.rowSelectionKeyField) === null || _e === void 0 ? void 0 : _e.call(dc, context), isCRUDContext ? null : {
|
576
|
+
name: 'rowSelection.type',
|
577
|
+
label: i18nRuntime.i18n("5e1872b4afc82fc5114b32aaf4477500"),
|
578
|
+
type: 'button-group-select',
|
579
|
+
options: [{
|
580
|
+
label: i18nRuntime.i18n("443f46c76ebe6ec4eb502f95c451e4b0"),
|
581
|
+
value: 'checkbox'
|
582
|
+
}, {
|
583
|
+
label: i18nRuntime.i18n("9fd1b7cb41cfa3b83bdfd2a44381417f"),
|
584
|
+
value: 'radio'
|
585
|
+
}],
|
586
|
+
pipeIn: function (value, formStore) {
|
587
|
+
if (value != null && typeof value === 'string') {
|
588
|
+
return value;
|
589
|
+
}
|
590
|
+
var schema = formStore === null || formStore === void 0 ? void 0 : formStore.data;
|
591
|
+
return (schema === null || schema === void 0 ? void 0 : schema.selectable) === true ? schema.multiple ? 'checkbox' : 'radio' : 'checkbox';
|
592
|
+
}
|
593
|
+
}, amisEditorCore.getSchemaTpl('switch', {
|
594
|
+
name: 'rowSelection.fixed',
|
595
|
+
label: i18nRuntime.i18n("9c5c1f96ba29b9c0a8915be950e91cb3")
|
596
|
+
}), {
|
597
|
+
type: 'input-number',
|
598
|
+
name: 'rowSelection.columnWidth',
|
599
|
+
label: i18nRuntime.i18n("5fd9a061aa8d25137801caf78d8d0f42"),
|
600
|
+
min: 0,
|
601
|
+
pipeOut: function (data) {
|
602
|
+
return data || undefined;
|
603
|
+
}
|
604
|
+
}, {
|
545
605
|
label: i18nRuntime.i18n("1f1ca9df5fa3648c718ad04649888943"),
|
546
606
|
name: 'rowSelection.rowClick',
|
547
607
|
type: 'button-group-select',
|
548
608
|
value: false,
|
549
609
|
options: [{
|
550
|
-
label: 'CheckBox',
|
551
|
-
value: false
|
552
|
-
}, {
|
553
610
|
label: i18nRuntime.i18n("596171970b639a35dadde2aa930d666a"),
|
554
611
|
value: true
|
612
|
+
}, {
|
613
|
+
label: i18nRuntime.i18n("454e60f5759903d7d3dba58e3f9bd590"),
|
614
|
+
value: false
|
555
615
|
}]
|
556
616
|
}, amisEditorCore.getSchemaTpl('formulaControl', {
|
557
617
|
name: 'rowSelection.disableOn',
|
@@ -564,19 +624,19 @@ var Table2Plugin = /** @class */function (_super) {
|
|
564
624
|
inline: false,
|
565
625
|
itemClassName: 'text-sm',
|
566
626
|
options: [{
|
567
|
-
label: i18nRuntime.i18n("
|
627
|
+
label: i18nRuntime.i18n("107ce5ae5c46f0e63565c593eb09a312"),
|
568
628
|
value: 'all'
|
569
629
|
}, {
|
570
|
-
label: i18nRuntime.i18n("
|
630
|
+
label: i18nRuntime.i18n("f3993a00b12133950b96199dbf08fc43"),
|
571
631
|
value: 'invert'
|
572
632
|
}, {
|
573
|
-
label: i18nRuntime.i18n("
|
633
|
+
label: i18nRuntime.i18n("0cf1882623b2b50f0416030c980c3179"),
|
574
634
|
value: 'none'
|
575
635
|
}, {
|
576
|
-
label: i18nRuntime.i18n("
|
636
|
+
label: i18nRuntime.i18n("b5a34b813ffd5d7d776eb8ca56a1b45d"),
|
577
637
|
value: 'odd'
|
578
638
|
}, {
|
579
|
-
label: i18nRuntime.i18n("
|
639
|
+
label: i18nRuntime.i18n("0c2a525c7e183c05b46caa6b52a21b9f"),
|
580
640
|
value: 'even'
|
581
641
|
}],
|
582
642
|
pipeIn: function (v) {
|
@@ -601,9 +661,16 @@ var Table2Plugin = /** @class */function (_super) {
|
|
601
661
|
};
|
602
662
|
});
|
603
663
|
}
|
604
|
-
}]
|
664
|
+
}].filter(Boolean)
|
605
665
|
}
|
606
|
-
}
|
666
|
+
}, amisEditorCore.getSchemaTpl('formulaControl', {
|
667
|
+
label: i18nRuntime.i18n("df5a3392ee995cfaa13787b11a1e2652"),
|
668
|
+
name: 'itemCheckableOn'
|
669
|
+
}), {
|
670
|
+
type: 'input-number',
|
671
|
+
name: 'maxKeepItemSelectionLength',
|
672
|
+
label: i18nRuntime.i18n("76417db4eeb031b0bc15f4cf8178ae46")
|
673
|
+
}, {
|
607
674
|
type: 'ae-Switch-More',
|
608
675
|
mode: 'normal',
|
609
676
|
name: 'expandable',
|
@@ -611,48 +678,118 @@ var Table2Plugin = /** @class */function (_super) {
|
|
611
678
|
hiddenOnDefault: true,
|
612
679
|
formType: 'extend',
|
613
680
|
form: {
|
614
|
-
body: [
|
681
|
+
body: [(_f = dc === null || dc === void 0 ? void 0 : dc.expandableKeyField) === null || _f === void 0 ? void 0 : _f.call(dc, context), {
|
682
|
+
type: 'select',
|
683
|
+
label: i18nRuntime.i18n("4d250d2754fbdc9cbd131bf48d445894"),
|
684
|
+
name: 'expandable.position',
|
685
|
+
options: [{
|
686
|
+
label: i18nRuntime.i18n("18c63459a2c069022c7790430f761214"),
|
687
|
+
value: ''
|
688
|
+
}, {
|
689
|
+
label: i18nRuntime.i18n("39a2cb79c6d9762783e20522ea86dcff"),
|
690
|
+
value: 'left'
|
691
|
+
}, {
|
692
|
+
label: i18nRuntime.i18n("de2a774bf98944b8f0ec8755d5f59d64"),
|
693
|
+
value: 'right'
|
694
|
+
}, {
|
695
|
+
label: i18nRuntime.i18n("dce5379cb978a8259ecfca8f08f00817"),
|
696
|
+
value: 'none'
|
697
|
+
}]
|
698
|
+
}, amisEditorCore.getSchemaTpl('formulaControl', {
|
615
699
|
name: 'expandable.expandableOn',
|
616
700
|
visibleOn: 'data.expandable',
|
617
|
-
label: i18nRuntime.i18n("
|
618
|
-
})
|
701
|
+
label: i18nRuntime.i18n("ea7026a83bf0b63ecc31fd8e215766de")
|
702
|
+
}), {
|
703
|
+
name: 'expandable',
|
704
|
+
asFormItem: true,
|
705
|
+
label: false,
|
706
|
+
children: function (_a) {
|
707
|
+
var value = _a.value,
|
708
|
+
onBulkChange = _a.onBulkChange;
|
709
|
+
_a.onChange;
|
710
|
+
var name = _a.name;
|
711
|
+
_a.data;
|
712
|
+
_a.form;
|
713
|
+
var newValue = tslib.__assign(tslib.__assign({}, value), value && value.type ? {} : {
|
714
|
+
type: 'container',
|
715
|
+
body: [{
|
716
|
+
type: 'tpl',
|
717
|
+
tpl: i18nRuntime.i18n("1a7bd457c08093cf2cf887403dc249d8"),
|
718
|
+
inline: false
|
719
|
+
}]
|
720
|
+
});
|
721
|
+
return React__default["default"].createElement(amis.Button, {
|
722
|
+
className: "w-full flex flex-col items-center",
|
723
|
+
onClick: function () {
|
724
|
+
_this.manager.openSubEditor({
|
725
|
+
title: i18nRuntime.i18n("9e9b4716c08d4f15d9d52e00281f4265"),
|
726
|
+
value: newValue,
|
727
|
+
onChange: function (value) {
|
728
|
+
var _a;
|
729
|
+
onBulkChange((_a = {}, _a[name] = value, _a));
|
730
|
+
},
|
731
|
+
data: tslib.__assign({}, _this.manager.store.ctx) //默认数据
|
732
|
+
});
|
733
|
+
}
|
734
|
+
}, React__default["default"].createElement("span", {
|
735
|
+
className: "inline-flex items-center"
|
736
|
+
}, React__default["default"].createElement(amis.Icon, {
|
737
|
+
icon: "edit",
|
738
|
+
className: "mr-1 w-3"
|
739
|
+
}), i18nRuntime.i18n("9e9b4716c08d4f15d9d52e00281f4265")));
|
740
|
+
}
|
741
|
+
}]
|
619
742
|
}
|
620
|
-
},
|
743
|
+
}, {
|
744
|
+
type: 'input-text',
|
745
|
+
label: amisEditorCore.tipedLabel(i18nRuntime.i18n("f09e007fa1c2e7eb9ec01f8481104d94"), i18nRuntime.i18n("1b4b8d809a7d253bb650d0f104d24ea2")),
|
621
746
|
name: 'childrenColumnName',
|
622
|
-
|
623
|
-
|
624
|
-
|
747
|
+
pipeIn: amisEditorCore.defaultValue('children')
|
748
|
+
}, (_g = dc === null || dc === void 0 ? void 0 : dc.draggable) === null || _g === void 0 ? void 0 : _g.call(dc, context), (_h = dc === null || dc === void 0 ? void 0 : dc.itemDraggableOn) === null || _h === void 0 ? void 0 : _h.call(dc, context), (_j = dc === null || dc === void 0 ? void 0 : dc.saveOrderApi) === null || _j === void 0 ? void 0 : _j.call(dc, context), {
|
749
|
+
name: 'showBadge',
|
750
|
+
label: i18nRuntime.i18n("f53160d07e516a3b0d38d61822944b03"),
|
751
|
+
type: 'ae-switch-more',
|
752
|
+
mode: 'normal',
|
753
|
+
formType: 'extend',
|
754
|
+
bulk: true,
|
755
|
+
defaultData: {
|
756
|
+
itemBadge: {
|
757
|
+
mode: 'dot'
|
758
|
+
}
|
625
759
|
},
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
name: 'draggable',
|
631
|
-
label: i18nRuntime.i18n("5bdff9fd07d2a2430ac50e1559dbee27"),
|
632
|
-
pipeIn: function (value) {
|
633
|
-
return !!value;
|
760
|
+
isChecked: function (e) {
|
761
|
+
var data = e.data,
|
762
|
+
name = e.name;
|
763
|
+
return data[name];
|
634
764
|
},
|
635
|
-
|
636
|
-
|
765
|
+
form: {
|
766
|
+
body: [{
|
767
|
+
type: 'ae-badge',
|
768
|
+
label: false,
|
769
|
+
name: 'itemBadge',
|
770
|
+
contentsOnly: true
|
771
|
+
}]
|
637
772
|
}
|
638
|
-
}
|
773
|
+
}]
|
774
|
+
}, {
|
775
|
+
title: i18nRuntime.i18n("e821ce185e41eac2ab846ef5cfde2363"),
|
776
|
+
body: [amisEditorCore.getSchemaTpl('switch', {
|
777
|
+
name: 'keepItemSelectionOnPageChange',
|
778
|
+
label: amisEditorCore.tipedLabel(i18nRuntime.i18n("099cf136d6a4b6ed4646af4a2ed066b2"), i18nRuntime.i18n("60011314ed92794f3d4f3e874c359279")),
|
779
|
+
/** 目前仅支持2种类型,默认是 pagination */
|
780
|
+
visibleOn: '!data.loadType || data.loadType !== "more"'
|
781
|
+
}), {
|
782
|
+
name: 'maxKeepItemSelectionLength',
|
783
|
+
type: 'input-number',
|
784
|
+
label: i18nRuntime.i18n("76417db4eeb031b0bc15f4cf8178ae46"),
|
785
|
+
visibleOn: 'data.keepItemSelectionOnPageChange'
|
786
|
+
}]
|
639
787
|
}, {
|
640
788
|
title: i18nRuntime.i18n("3fea7ca76cdece641436d7ab0d02ab1b"),
|
641
789
|
body: [amisEditorCore.getSchemaTpl('hidden', {
|
642
790
|
label: i18nRuntime.i18n("dce5379cb978a8259ecfca8f08f00817")
|
643
791
|
})]
|
644
|
-
}
|
645
|
-
title: i18nRuntime.i18n("dfac151de712ab0b3618072c8a7f0a0f"),
|
646
|
-
body: [amisEditorCore.getSchemaTpl('apiControl', {
|
647
|
-
label: i18nRuntime.i18n("33eaf97ecb3465754855e847f14d129c"),
|
648
|
-
name: 'quickSaveApi'
|
649
|
-
}), amisEditorCore.getSchemaTpl('apiControl', {
|
650
|
-
label: i18nRuntime.i18n("ce7d31d64f2315e1d4cede288b9dfc60"),
|
651
|
-
name: 'quickSaveItemApi'
|
652
|
-
})]
|
653
|
-
}]), isCRUDBody ? null : {
|
654
|
-
type: 'divider'
|
655
|
-
}]
|
792
|
+
}])]
|
656
793
|
}, {
|
657
794
|
title: i18nRuntime.i18n("afcde2611bdd13c1e65b4fb6a2f13425"),
|
658
795
|
body: [amisEditorCore.getSchemaTpl('collapseGroup', [{
|
@@ -662,9 +799,82 @@ var Table2Plugin = /** @class */function (_super) {
|
|
662
799
|
label: i18nRuntime.i18n("961534b4ea37e4e88aada736b299d063"),
|
663
800
|
pipeIn: amisEditorCore.defaultValue(false)
|
664
801
|
}), {
|
802
|
+
name: 'size',
|
803
|
+
label: i18nRuntime.i18n("b3b97a293baac13db6367aba5539a09c"),
|
804
|
+
type: 'select',
|
805
|
+
pipeIn: amisEditorCore.defaultValue('default'),
|
806
|
+
options: [{
|
807
|
+
label: i18nRuntime.i18n("391b8fa9c747a1799353ab856e666ad5"),
|
808
|
+
value: 'small'
|
809
|
+
}, {
|
810
|
+
label: i18nRuntime.i18n("18c63459a2c069022c7790430f761214"),
|
811
|
+
value: 'default'
|
812
|
+
}, {
|
813
|
+
label: i18nRuntime.i18n("ab18e30c0dc4093ceeda8961fac3d1f4"),
|
814
|
+
value: 'large'
|
815
|
+
}]
|
816
|
+
}, amisEditorCore.getSchemaTpl('switch', {
|
817
|
+
name: 'autoFillHeight',
|
818
|
+
label: i18nRuntime.i18n("8952f4e24070a79741a505dc20bad8f0")
|
819
|
+
}), {
|
820
|
+
name: 'scroll.y',
|
821
|
+
label: i18nRuntime.i18n("a5baa4818b14f4680955aa34dd559d02"),
|
822
|
+
type: 'button-group-select',
|
823
|
+
pipeIn: function (v) {
|
824
|
+
return v != null;
|
825
|
+
},
|
826
|
+
pipeOut: function (v) {
|
827
|
+
return v ? '' : null;
|
828
|
+
},
|
829
|
+
options: [{
|
830
|
+
label: i18nRuntime.i18n("4db804afe5c99f7ca4fe988ada35c77f"),
|
831
|
+
value: false
|
832
|
+
}, {
|
833
|
+
label: i18nRuntime.i18n("1ef8fd21130d17cb7c1613eaed6ca1e4"),
|
834
|
+
value: true
|
835
|
+
}]
|
836
|
+
}, {
|
837
|
+
type: 'input-group',
|
838
|
+
visibleOn: 'data.scroll && data.scroll.y !== null',
|
839
|
+
label: i18nRuntime.i18n("ee18dc475df8654cb13ad67dd84eec28"),
|
840
|
+
body: [{
|
841
|
+
type: 'input-number',
|
842
|
+
name: 'scroll.y'
|
843
|
+
}, {
|
844
|
+
type: 'tpl',
|
845
|
+
addOnclassName: 'border-0 bg-none',
|
846
|
+
tpl: 'px'
|
847
|
+
}]
|
848
|
+
}, {
|
665
849
|
name: 'scroll.x',
|
666
|
-
|
667
|
-
|
850
|
+
label: amisEditorCore.tipedLabel(i18nRuntime.i18n("8bb5781dc5f2745e6356cdc5e6d76b16"), i18nRuntime.i18n("88a364068f684dc77aca5b6c006ef576")),
|
851
|
+
type: 'button-group-select',
|
852
|
+
pipeIn: function (v) {
|
853
|
+
return v != null;
|
854
|
+
},
|
855
|
+
pipeOut: function (v) {
|
856
|
+
return v ? '' : null;
|
857
|
+
},
|
858
|
+
options: [{
|
859
|
+
label: i18nRuntime.i18n("4db804afe5c99f7ca4fe988ada35c77f"),
|
860
|
+
value: false
|
861
|
+
}, {
|
862
|
+
label: i18nRuntime.i18n("1ef8fd21130d17cb7c1613eaed6ca1e4"),
|
863
|
+
value: true
|
864
|
+
}]
|
865
|
+
}, {
|
866
|
+
type: 'input-group',
|
867
|
+
visibleOn: 'data.scroll && data.scroll.x !== null',
|
868
|
+
name: 'scroll.x',
|
869
|
+
label: i18nRuntime.i18n("6e3d35b57c29b1b419569cc55b3a5d33"),
|
870
|
+
body: [{
|
871
|
+
type: 'input-number',
|
872
|
+
name: 'scroll.x'
|
873
|
+
}, {
|
874
|
+
type: 'tpl',
|
875
|
+
addOnclassName: 'border-0 bg-none',
|
876
|
+
tpl: 'px'
|
877
|
+
}]
|
668
878
|
}, {
|
669
879
|
name: 'indentSize',
|
670
880
|
visibleOn: 'data.childrenColumnName',
|
@@ -673,7 +883,7 @@ var Table2Plugin = /** @class */function (_super) {
|
|
673
883
|
label: 'px',
|
674
884
|
value: 'px'
|
675
885
|
}],
|
676
|
-
label: i18nRuntime.i18n("
|
886
|
+
label: amisEditorCore.tipedLabel(i18nRuntime.i18n("dd7befc8e7c124f6f4ba9bbf3de9dc53"), i18nRuntime.i18n("eedd7279409d000114e27194f3c8a5ea"))
|
677
887
|
}, {
|
678
888
|
name: 'rowSelection.columnWidth',
|
679
889
|
visibleOn: 'data.rowSelection',
|
@@ -688,8 +898,11 @@ var Table2Plugin = /** @class */function (_super) {
|
|
688
898
|
description: i18nRuntime.i18n("81ccf26d9622d139a13ba2a61bd9fea4")
|
689
899
|
}]
|
690
900
|
}, amisEditorCore.getSchemaTpl('style:classNames', {
|
691
|
-
isFormItem:
|
692
|
-
schema: [amisEditorCore.getSchemaTpl('
|
901
|
+
isFormItem: false,
|
902
|
+
schema: [amisEditorCore.getSchemaTpl('className', {
|
903
|
+
label: i18nRuntime.i18n("4bf8b7a0b3385fcd34a8e0cd355d7964"),
|
904
|
+
name: 'rowClassName'
|
905
|
+
}), amisEditorCore.getSchemaTpl('formulaControl', {
|
693
906
|
name: 'rowClassNameExpr',
|
694
907
|
label: i18nRuntime.i18n("68e9249db7bd12ab17994b1761b049f5")
|
695
908
|
}), amisEditorCore.getSchemaTpl('formulaControl', {
|
@@ -700,13 +913,88 @@ var Table2Plugin = /** @class */function (_super) {
|
|
700
913
|
})])]
|
701
914
|
}, {
|
702
915
|
title: i18nRuntime.i18n("10b2761db5a8e089049df39675abc550"),
|
916
|
+
className: 'p-none',
|
703
917
|
body: [amisEditorCore.getSchemaTpl('eventControl', tslib.__assign({
|
704
918
|
name: 'onEvent'
|
705
919
|
}, helper.getEventControlConfig(_this.manager, context)))]
|
706
920
|
}]);
|
707
921
|
};
|
922
|
+
_this.dsManager = new DSBuilderManager.DSBuilderManager(manager);
|
708
923
|
return _this;
|
709
924
|
}
|
925
|
+
// 为了能够自动注入数据。
|
926
|
+
Table2Plugin.prototype.getRendererInfo = function (context) {
|
927
|
+
var _a, _b, _c, _d, _e;
|
928
|
+
var plugin = this;
|
929
|
+
var schema = context.schema,
|
930
|
+
renderer = context.renderer;
|
931
|
+
var isCRUD = ['crud', 'crud2'].includes((_b = (_a = context === null || context === void 0 ? void 0 : context.schema) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : (_e = (_d = (_c = context === null || context === void 0 ? void 0 : context.schema) === null || _c === void 0 ? void 0 : _c.$$editor) === null || _d === void 0 ? void 0 : _d.renderer) === null || _e === void 0 ? void 0 : _e.name);
|
932
|
+
if (!schema.$$id && isCRUD && renderer.name === 'table2') {
|
933
|
+
return tslib.__assign(tslib.__assign({}, {
|
934
|
+
id: schema.$$editor.id
|
935
|
+
}), {
|
936
|
+
name: plugin.name,
|
937
|
+
regions: plugin.regions,
|
938
|
+
patchContainers: plugin.patchContainers,
|
939
|
+
vRendererConfig: plugin.vRendererConfig,
|
940
|
+
wrapperProps: plugin.wrapperProps,
|
941
|
+
wrapperResolve: plugin.wrapperResolve,
|
942
|
+
filterProps: plugin.filterProps,
|
943
|
+
$schema: plugin.$schema,
|
944
|
+
renderRenderer: plugin.renderRenderer
|
945
|
+
});
|
946
|
+
}
|
947
|
+
return _super.prototype.getRendererInfo.call(this, context);
|
948
|
+
};
|
949
|
+
Table2Plugin.prototype.filterProps = function (props) {
|
950
|
+
var arr = util.resolveArrayDatasource(props);
|
951
|
+
if (!Array.isArray(arr) || !arr.length) {
|
952
|
+
var mockedData_1 = {};
|
953
|
+
if (Array.isArray(props.columns)) {
|
954
|
+
props.columns.forEach(function (column) {
|
955
|
+
if (column.name) {
|
956
|
+
amisCore.setVariable(mockedData_1, column.name, amisEditorCore.mockValue(column));
|
957
|
+
}
|
958
|
+
});
|
959
|
+
}
|
960
|
+
props.value = amisEditorCore.repeatArray(mockedData_1, 10).map(function (item, index) {
|
961
|
+
return tslib.__assign(tslib.__assign({}, item), {
|
962
|
+
id: index + 1
|
963
|
+
});
|
964
|
+
});
|
965
|
+
} else {
|
966
|
+
// 只取10条预览,否则太多卡顿
|
967
|
+
props.value = arr.slice(0, 10);
|
968
|
+
}
|
969
|
+
// 如果设置了可展开 默认把第一行展开
|
970
|
+
if (props.expandable) {
|
971
|
+
if (typeof props.expandable === 'boolean') {
|
972
|
+
props.expandable = {};
|
973
|
+
}
|
974
|
+
if (!props.expandable.type) {
|
975
|
+
props.expandable.type = 'container';
|
976
|
+
props.expandable.body = [{
|
977
|
+
type: 'tpl',
|
978
|
+
tpl: i18nRuntime.i18n("1a7bd457c08093cf2cf887403dc249d8"),
|
979
|
+
wrapperComponent: '',
|
980
|
+
inline: false
|
981
|
+
}];
|
982
|
+
}
|
983
|
+
props.expandable.keyField = 'id';
|
984
|
+
props.expandable.expandedRowKeys = [1];
|
985
|
+
}
|
986
|
+
return props;
|
987
|
+
};
|
988
|
+
// 自动插入 label
|
989
|
+
Table2Plugin.prototype.beforeInsert = function (event) {
|
990
|
+
var _a, _b, _c, _d;
|
991
|
+
var context = event.context;
|
992
|
+
if ((context.info.plugin === this || ((_a = context.node.sameIdChild) === null || _a === void 0 ? void 0 : _a.info.plugin) === this) && context.region === 'columns') {
|
993
|
+
context.data = tslib.__assign(tslib.__assign({}, context.data), {
|
994
|
+
title: (_d = (_b = context.data.label) !== null && _b !== void 0 ? _b : (_c = context.subRenderer) === null || _c === void 0 ? void 0 : _c.name) !== null && _d !== void 0 ? _d : i18nRuntime.i18n("bcee820bc20342a4d388a35ed32a35fe")
|
995
|
+
});
|
996
|
+
}
|
997
|
+
};
|
710
998
|
Table2Plugin.prototype.buildDataSchemas = function (node, region, trigger) {
|
711
999
|
var _a, _b;
|
712
1000
|
return tslib.__awaiter(this, void 0, void 0, function () {
|
@@ -796,84 +1084,47 @@ var Table2Plugin = /** @class */function (_super) {
|
|
796
1084
|
});
|
797
1085
|
};
|
798
1086
|
Table2Plugin.prototype.getAvailableContextFields = function (scopeNode, node, region) {
|
1087
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
799
1088
|
return tslib.__awaiter(this, void 0, void 0, function () {
|
800
|
-
|
1089
|
+
var builder;
|
1090
|
+
return tslib.__generator(this, function (_p) {
|
1091
|
+
if (((_b = (_a = node === null || node === void 0 ? void 0 : node.info) === null || _a === void 0 ? void 0 : _a.renderer) === null || _b === void 0 ? void 0 : _b.name) && ['table-cell', 'cell-field'].includes(node.info.renderer.name)) {
|
1092
|
+
if (((_c = scopeNode.parent) === null || _c === void 0 ? void 0 : _c.type) === 'crud2' && ((_e = (_d = scopeNode.parent) === null || _d === void 0 ? void 0 : _d.path) === null || _e === void 0 ? void 0 : _e.endsWith('crud2'))) {
|
1093
|
+
return [2 /*return*/, (_g = (_f = scopeNode.parent.info.plugin).getAvailableContextFields) === null || _g === void 0 ? void 0 : _g.call(_f, scopeNode.parent, node, region)];
|
1094
|
+
}
|
1095
|
+
if (((_h = scopeNode.parent) === null || _h === void 0 ? void 0 : _h.type) === 'service' && ((_l = (_k = (_j = scopeNode.parent) === null || _j === void 0 ? void 0 : _j.parent) === null || _k === void 0 ? void 0 : _k.path) === null || _l === void 0 ? void 0 : _l.endsWith('service'))) {
|
1096
|
+
return [2 /*return*/, (_o = (_m = scopeNode.parent.parent.info.plugin).getAvailableContextFields) === null || _o === void 0 ? void 0 : _o.call(_m, scopeNode.parent.parent, node, region)];
|
1097
|
+
}
|
1098
|
+
}
|
1099
|
+
builder = this.dsManager.getBuilderBySchema(scopeNode.schema);
|
1100
|
+
if (builder && scopeNode.schema.api) {
|
1101
|
+
return [2 /*return*/, builder.getAvailableContextFields({
|
1102
|
+
schema: scopeNode.schema,
|
1103
|
+
sourceKey: 'api',
|
1104
|
+
feat: 'List'
|
1105
|
+
}, node)];
|
1106
|
+
}
|
801
1107
|
return [2 /*return*/];
|
802
1108
|
});
|
803
1109
|
});
|
804
1110
|
};
|
805
1111
|
|
806
|
-
Table2Plugin.prototype
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
}
|
815
|
-
});
|
816
|
-
}
|
817
|
-
props.value = amisEditorCore.repeatArray(mockedData_1, 10).map(function (item, index) {
|
818
|
-
return tslib.__assign(tslib.__assign({}, item), {
|
819
|
-
id: index + 1
|
820
|
-
});
|
821
|
-
});
|
822
|
-
} else {
|
823
|
-
// 只取10条预览,否则太多卡顿
|
824
|
-
props.value = arr.slice(0, 10);
|
825
|
-
}
|
826
|
-
// 如果设置了可展开 默认把第一行展开
|
827
|
-
if (props.expandable) {
|
828
|
-
if (typeof props.expandable === 'boolean') {
|
829
|
-
props.expandable = {};
|
1112
|
+
Object.defineProperty(Table2Plugin.prototype, "dynamicControls", {
|
1113
|
+
/** 需要动态控制的控件 */
|
1114
|
+
get: function () {
|
1115
|
+
return this._dynamicControls;
|
1116
|
+
},
|
1117
|
+
set: function (controls) {
|
1118
|
+
if (!controls || !amisCore.isObject(controls)) {
|
1119
|
+
throw new Error(i18nRuntime.i18n("413c6b52c23a1bf5cbc9fba1485f88ff"));
|
830
1120
|
}
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
}];
|
839
|
-
}
|
840
|
-
props.expandable.keyField = 'id';
|
841
|
-
props.expandable.expandedRowKeys = [1];
|
842
|
-
}
|
843
|
-
return props;
|
844
|
-
};
|
845
|
-
// 为了能够自动注入数据。
|
846
|
-
Table2Plugin.prototype.getRendererInfo = function (context) {
|
847
|
-
var _a;
|
848
|
-
var plugin = this;
|
849
|
-
var schema = context.schema,
|
850
|
-
renderer = context.renderer;
|
851
|
-
if (!schema.$$id && ['crud', 'crud2'].includes((_a = schema.$$editor) === null || _a === void 0 ? void 0 : _a.renderer.name) && renderer.name === 'table2') {
|
852
|
-
return tslib.__assign(tslib.__assign({}, {
|
853
|
-
id: schema.$$editor.id
|
854
|
-
}), {
|
855
|
-
name: plugin.name,
|
856
|
-
regions: plugin.regions,
|
857
|
-
patchContainers: plugin.patchContainers,
|
858
|
-
vRendererConfig: plugin.vRendererConfig,
|
859
|
-
wrapperProps: plugin.wrapperProps,
|
860
|
-
wrapperResolve: plugin.wrapperResolve,
|
861
|
-
filterProps: plugin.filterProps,
|
862
|
-
$schema: plugin.$schema,
|
863
|
-
renderRenderer: plugin.renderRenderer
|
864
|
-
});
|
865
|
-
}
|
866
|
-
return _super.prototype.getRendererInfo.call(this, context);
|
867
|
-
};
|
868
|
-
// 自动插入 label
|
869
|
-
Table2Plugin.prototype.beforeInsert = function (event) {
|
870
|
-
var _a, _b, _c, _d;
|
871
|
-
var context = event.context;
|
872
|
-
if ((context.info.plugin === this || ((_a = context.node.sameIdChild) === null || _a === void 0 ? void 0 : _a.info.plugin) === this) && context.region === 'columns') {
|
873
|
-
context.data = tslib.__assign(tslib.__assign({}, context.data), {
|
874
|
-
title: (_d = (_b = context.data.label) !== null && _b !== void 0 ? _b : (_c = context.subRenderer) === null || _c === void 0 ? void 0 : _c.name) !== null && _d !== void 0 ? _d : i18nRuntime.i18n("bcee820bc20342a4d388a35ed32a35fe")
|
875
|
-
});
|
876
|
-
}
|
1121
|
+
this._dynamicControls = tslib.__assign(tslib.__assign({}, this._dynamicControls), controls);
|
1122
|
+
},
|
1123
|
+
enumerable: false,
|
1124
|
+
configurable: true
|
1125
|
+
});
|
1126
|
+
Table2Plugin.prototype.isCRUDContext = function (context) {
|
1127
|
+
return context.schema.type === 'crud2' || context.schema.type === 'crud';
|
877
1128
|
};
|
878
1129
|
Table2Plugin.id = 'Table2Plugin';
|
879
1130
|
return Table2Plugin;
|
@@ -881,3 +1132,6 @@ var Table2Plugin = /** @class */function (_super) {
|
|
881
1132
|
amisEditorCore.registerEditorPlugin(Table2Plugin);
|
882
1133
|
|
883
1134
|
exports.Table2Plugin = Table2Plugin;
|
1135
|
+
exports.Table2RendererAction = Table2RendererAction;
|
1136
|
+
exports.Table2RenderereEvent = Table2RenderereEvent;
|
1137
|
+
window.amisEditorVersionInfo={version:'5.5.2-beta.2',buildTime:'2023-09-28'};
|