amis-editor 5.2.0-beta.2 → 5.2.1-beta.15
Sign up to get free protection for your applications and to get access to all the features.
- package/esm/component/BaseControl.d.ts +5 -810
- package/esm/component/BaseControl.js +33 -43
- package/esm/component/InputComponentName.js +1 -1
- package/esm/component/TableViewEditor.js +547 -454
- package/esm/icons/btn/btn-group.svg.js +1 -3
- package/esm/icons/btn/btn-select.svg.js +1 -3
- package/esm/icons/btn/btn-toolbar.svg.js +1 -3
- package/esm/icons/btn/button.svg.js +1 -3
- package/esm/icons/btn/dropdown-btn.svg.js +1 -3
- package/esm/icons/container/anchor-nav.svg.js +1 -3
- package/esm/icons/container/collapse.svg.js +1 -3
- package/esm/icons/container/container.svg.js +1 -3
- package/esm/icons/container/flex-container.svg.js +1 -3
- package/esm/icons/container/form-group.svg.js +1 -3
- package/esm/icons/container/grid.svg.js +1 -3
- package/esm/icons/container/iframe.svg.js +1 -3
- package/esm/icons/container/panel.svg.js +1 -3
- package/esm/icons/container/table-view.svg.js +1 -3
- package/esm/icons/container/tabs.svg.js +1 -3
- package/esm/icons/container/tooltip-wrapper.svg.js +1 -3
- package/esm/icons/container/web-component.svg.js +1 -3
- package/esm/icons/feat/audio.svg.js +1 -3
- package/esm/icons/feat/custom.svg.js +1 -3
- package/esm/icons/feat/each.svg.js +1 -3
- package/esm/icons/feat/form.svg.js +1 -3
- package/esm/icons/feat/nav.svg.js +1 -3
- package/esm/icons/feat/qrcode.svg.js +1 -3
- package/esm/icons/feat/service.svg.js +1 -3
- package/esm/icons/feat/table.svg.js +1 -3
- package/esm/icons/feat/tasks.svg.js +1 -3
- package/esm/icons/feat/video.svg.js +1 -3
- package/esm/icons/feat/wizard.svg.js +1 -3
- package/esm/icons/form/chained-select.svg.js +1 -3
- package/esm/icons/form/checkbox.svg.js +1 -3
- package/esm/icons/form/checkboxes.svg.js +1 -3
- package/esm/icons/form/combo.svg.js +1 -3
- package/esm/icons/form/condition-builder.svg.js +1 -3
- package/esm/icons/form/diff-editor.svg.js +1 -3
- package/esm/icons/form/editor.svg.js +1 -3
- package/esm/icons/form/formula.svg.js +1 -3
- package/esm/icons/form/hidden.svg.js +1 -3
- package/esm/icons/form/input-city.svg.js +1 -3
- package/esm/icons/form/input-color.svg.js +1 -3
- package/esm/icons/form/input-date-range.svg.js +1 -3
- package/esm/icons/form/input-date.svg.js +1 -3
- package/esm/icons/form/input-datetime.svg.js +1 -3
- package/esm/icons/form/input-email.svg.js +1 -3
- package/esm/icons/form/input-excel.svg.js +1 -3
- package/esm/icons/form/input-file.svg.js +1 -3
- package/esm/icons/form/input-group.svg.js +1 -3
- package/esm/icons/form/input-image.svg.js +1 -3
- package/esm/icons/form/input-kv.svg.js +1 -3
- package/esm/icons/form/input-month-range.svg.js +1 -3
- package/esm/icons/form/input-number.svg.js +1 -3
- package/esm/icons/form/input-password.svg.js +1 -3
- package/esm/icons/form/input-quarter-range.svg.js +1 -3
- package/esm/icons/form/input-range.svg.js +1 -3
- package/esm/icons/form/input-rating.svg.js +1 -3
- package/esm/icons/form/input-repeat.svg.js +1 -3
- package/esm/icons/form/input-rich-text.svg.js +1 -3
- package/esm/icons/form/input-tag.svg.js +1 -3
- package/esm/icons/form/input-text.svg.js +1 -3
- package/esm/icons/form/input-time-range.svg.js +1 -3
- package/esm/icons/form/input-time.svg.js +1 -3
- package/esm/icons/form/input-tree.svg.js +1 -3
- package/esm/icons/form/input-url.svg.js +1 -3
- package/esm/icons/form/input-year.svg.js +1 -3
- package/esm/icons/form/inputArray.svg.js +1 -3
- package/esm/icons/form/list-select.svg.js +1 -3
- package/esm/icons/form/location-picker.svg.js +1 -3
- package/esm/icons/form/matrix-checkboxes.svg.js +1 -3
- package/esm/icons/form/month.svg.js +1 -3
- package/esm/icons/form/nested-select.svg.js +1 -3
- package/esm/icons/form/picker.svg.js +1 -3
- package/esm/icons/form/quarter.svg.js +1 -3
- package/esm/icons/form/radios.svg.js +1 -3
- package/esm/icons/form/select.svg.js +1 -3
- package/esm/icons/form/static.svg.js +1 -3
- package/esm/icons/form/sub-form.svg.js +1 -3
- package/esm/icons/form/switch.svg.js +1 -3
- package/esm/icons/form/tabs-transfer.svg.js +1 -3
- package/esm/icons/form/textarea.svg.js +1 -3
- package/esm/icons/form/transfer.svg.js +1 -3
- package/esm/icons/form/tree-select.svg.js +1 -3
- package/esm/icons/form/uuid.svg.js +1 -3
- package/esm/icons/index.js +28 -1
- package/esm/icons/layout/layout-1with2.svg.js +32 -0
- package/esm/icons/layout/layout-2cols.svg.js +32 -0
- package/esm/icons/layout/layout-2row.svg.js +32 -0
- package/esm/icons/layout/layout-2with1.svg.js +33 -0
- package/esm/icons/layout/layout-3cols.svg.js +32 -0
- package/esm/icons/layout/layout-3row.svg.js +33 -0
- package/esm/icons/layout/layout-absolute.svg.js +27 -0
- package/esm/icons/layout/layout-fixed.svg.js +27 -0
- package/esm/icons/layout/layout-full.svg.js +49 -0
- package/esm/icons/layout/layout1-2.svg.js +33 -0
- package/esm/icons/layout/layout2-1.svg.js +33 -0
- package/esm/icons/layout/layout3-1.svg.js +33 -0
- package/esm/icons/layout/layout3-2.svg.js +33 -0
- package/esm/icons/other/divider.svg.js +1 -3
- package/esm/icons/other/property-sheet.svg.js +1 -3
- package/esm/icons/other/tooltip.svg.js +1 -3
- package/esm/icons/show/URL.svg.js +1 -3
- package/esm/icons/show/avatar.svg.js +1 -3
- package/esm/icons/show/breadcrumb.svg.js +1 -3
- package/esm/icons/show/card.svg.js +1 -3
- package/esm/icons/show/cards.svg.js +1 -3
- package/esm/icons/show/carousel.svg.js +1 -3
- package/esm/icons/show/chart.svg.js +1 -3
- package/esm/icons/show/code.svg.js +1 -3
- package/esm/icons/show/date.svg.js +1 -3
- package/esm/icons/show/datetime.svg.js +1 -3
- package/esm/icons/show/image.svg.js +1 -3
- package/esm/icons/show/images.svg.js +1 -3
- package/esm/icons/show/json-view.svg.js +1 -3
- package/esm/icons/show/list.svg.js +1 -3
- package/esm/icons/show/log.svg.js +1 -3
- package/esm/icons/show/mapping.svg.js +1 -3
- package/esm/icons/show/markdown.svg.js +1 -3
- package/esm/icons/show/plain.svg.js +1 -3
- package/esm/icons/show/progress.svg.js +1 -3
- package/esm/icons/show/sparkline.svg.js +1 -3
- package/esm/icons/show/status.svg.js +1 -3
- package/esm/icons/show/steps.svg.js +1 -3
- package/esm/icons/show/time.svg.js +1 -3
- package/esm/index.d.ts +11 -2
- package/esm/index.js +13 -3
- package/esm/locale/en-US.js +315 -102
- package/esm/locale/zh-CN.js +218 -3
- package/esm/plugin/Alert.d.ts +1 -1
- package/esm/plugin/Alert.js +157 -89
- package/esm/plugin/AnchorNav.js +337 -263
- package/esm/plugin/Audio.d.ts +1 -1
- package/esm/plugin/Audio.js +165 -112
- package/esm/plugin/Avatar.d.ts +1 -1
- package/esm/plugin/Avatar.js +301 -238
- package/esm/plugin/Breadcrumb.js +138 -75
- package/esm/plugin/Button.d.ts +1 -1
- package/esm/plugin/Button.js +310 -228
- package/esm/plugin/ButtonGroup.d.ts +1 -1
- package/esm/plugin/ButtonGroup.js +174 -106
- package/esm/plugin/CRUD.d.ts +1 -1
- package/esm/plugin/CRUD.js +1426 -1351
- package/esm/plugin/CRUD2.d.ts +2 -3
- package/esm/plugin/CRUD2.js +1146 -1075
- package/esm/plugin/Card.d.ts +1 -1
- package/esm/plugin/Card.js +284 -208
- package/esm/plugin/Card2.d.ts +2 -1
- package/esm/plugin/Card2.js +139 -74
- package/esm/plugin/Cards.js +302 -234
- package/esm/plugin/Carousel.d.ts +2 -2
- package/esm/plugin/Carousel.js +344 -281
- package/esm/plugin/Chart.d.ts +2 -1
- package/esm/plugin/Chart.js +326 -158
- package/esm/plugin/CodeView.js +104 -44
- package/esm/plugin/Collapse.d.ts +1 -1
- package/esm/plugin/Collapse.js +168 -101
- package/esm/plugin/CollapseGroup.d.ts +1 -1
- package/esm/plugin/CollapseGroup.js +249 -187
- package/esm/plugin/ColumnToggler.d.ts +1 -1
- package/esm/plugin/ColumnToggler.js +140 -87
- package/esm/plugin/Container.d.ts +11 -9
- package/esm/plugin/Container.js +190 -68
- package/esm/plugin/Custom.js +144 -82
- package/esm/plugin/CustomRegion.js +173 -110
- package/esm/plugin/Date.d.ts +1 -1
- package/esm/plugin/Date.js +112 -59
- package/esm/plugin/Datetime.d.ts +0 -1
- package/esm/plugin/Datetime.js +81 -53
- package/esm/plugin/Dialog.d.ts +2 -2
- package/esm/plugin/Dialog.js +230 -179
- package/esm/plugin/Divider.js +82 -32
- package/esm/plugin/Drawer.d.ts +11 -2
- package/esm/plugin/Drawer.js +260 -194
- package/esm/plugin/DropDownButton.js +261 -182
- package/esm/plugin/Each.js +180 -115
- package/esm/plugin/Flex.d.ts +2 -27
- package/esm/plugin/Flex.js +25 -159
- package/esm/plugin/Form/ButtonGroupSelect.d.ts +2 -1
- package/esm/plugin/Form/ButtonGroupSelect.js +205 -126
- package/esm/plugin/Form/ButtonToolbar.d.ts +1 -1
- package/esm/plugin/Form/ButtonToolbar.js +168 -94
- package/esm/plugin/Form/ChainedSelect.d.ts +1 -1
- package/esm/plugin/Form/ChainedSelect.js +209 -130
- package/esm/plugin/Form/Checkbox.d.ts +1 -1
- package/esm/plugin/Form/Checkbox.js +208 -131
- package/esm/plugin/Form/Checkboxes.d.ts +1 -1
- package/esm/plugin/Form/Checkboxes.js +236 -153
- package/esm/plugin/Form/CodeEditor.d.ts +0 -1
- package/esm/plugin/Form/CodeEditor.js +245 -146
- package/esm/plugin/Form/Combo.js +532 -423
- package/esm/plugin/Form/ConditionBuilder.d.ts +1 -1
- package/esm/plugin/Form/ConditionBuilder.js +287 -221
- package/esm/plugin/Form/Control.d.ts +1 -1
- package/esm/plugin/Form/Control.js +130 -63
- package/esm/plugin/Form/DiffEditor.d.ts +0 -1
- package/esm/plugin/Form/DiffEditor.js +253 -151
- package/esm/plugin/Form/FieldSet.d.ts +1 -1
- package/esm/plugin/Form/FieldSet.js +174 -112
- package/esm/plugin/Form/Form.d.ts +1 -1
- package/esm/plugin/Form/Form.js +750 -705
- package/esm/plugin/Form/Formula.d.ts +1 -9
- package/esm/plugin/Form/Formula.js +126 -62
- package/esm/plugin/Form/Group.js +250 -183
- package/esm/plugin/Form/Hidden.js +106 -42
- package/esm/plugin/Form/InputArray.js +233 -157
- package/esm/plugin/Form/InputCity.d.ts +1 -1
- package/esm/plugin/Form/InputCity.js +181 -104
- package/esm/plugin/Form/InputColor.d.ts +1 -1
- package/esm/plugin/Form/InputColor.js +296 -224
- package/esm/plugin/Form/InputDate.d.ts +1 -1
- package/esm/plugin/Form/InputDate.js +299 -189
- package/esm/plugin/Form/InputDateRange.d.ts +1 -1
- package/esm/plugin/Form/InputDateRange.js +386 -265
- package/esm/plugin/Form/InputDateTime.js +93 -33
- package/esm/plugin/Form/InputDateTimeRange.js +99 -34
- package/esm/plugin/Form/InputEmail.js +80 -30
- package/esm/plugin/Form/InputExcel.d.ts +1 -1
- package/esm/plugin/Form/InputExcel.js +164 -91
- package/esm/plugin/Form/InputFile.d.ts +4 -1
- package/esm/plugin/Form/InputFile.js +352 -271
- package/esm/plugin/Form/InputGroup.js +132 -73
- package/esm/plugin/Form/InputImage.d.ts +4 -1
- package/esm/plugin/Form/InputImage.js +385 -303
- package/esm/plugin/Form/InputKV.d.ts +1 -1
- package/esm/plugin/Form/InputKV.js +168 -94
- package/esm/plugin/Form/InputMonth.js +91 -31
- package/esm/plugin/Form/InputMonthRange.js +99 -34
- package/esm/plugin/Form/InputNumber.d.ts +2 -1
- package/esm/plugin/Form/InputNumber.js +288 -201
- package/esm/plugin/Form/InputPassword.js +80 -30
- package/esm/plugin/Form/InputQuarter.js +91 -31
- package/esm/plugin/Form/InputQuarterRange.js +99 -34
- package/esm/plugin/Form/InputRange.d.ts +1 -1
- package/esm/plugin/Form/InputRange.js +316 -237
- package/esm/plugin/Form/InputRating.d.ts +1 -1
- package/esm/plugin/Form/InputRating.js +361 -293
- package/esm/plugin/Form/InputRepeat.js +105 -45
- package/esm/plugin/Form/InputRichText.d.ts +2 -1
- package/esm/plugin/Form/InputRichText.js +211 -152
- package/esm/plugin/Form/InputSubForm.js +225 -157
- package/esm/plugin/Form/InputTable.d.ts +1 -1
- package/esm/plugin/Form/InputTable.js +385 -320
- package/esm/plugin/Form/InputTag.d.ts +1 -1
- package/esm/plugin/Form/InputTag.js +208 -119
- package/esm/plugin/Form/InputText.d.ts +1 -1
- package/esm/plugin/Form/InputText.js +348 -263
- package/esm/plugin/Form/InputTime.js +93 -33
- package/esm/plugin/Form/InputTimeRange.js +99 -34
- package/esm/plugin/Form/InputTree.d.ts +1 -1
- package/esm/plugin/Form/InputTree.js +460 -367
- package/esm/plugin/Form/InputURL.js +86 -31
- package/esm/plugin/Form/InputYear.js +91 -31
- package/esm/plugin/Form/InputYearRange.js +99 -34
- package/esm/plugin/Form/Item.d.ts +1 -1
- package/esm/plugin/Form/Item.js +214 -190
- package/esm/plugin/Form/ListSelect.d.ts +1 -1
- package/esm/plugin/Form/ListSelect.js +174 -96
- package/esm/plugin/Form/LocationPicker.d.ts +1 -1
- package/esm/plugin/Form/LocationPicker.js +115 -57
- package/esm/plugin/Form/MatrixCheckboxes.d.ts +1 -1
- package/esm/plugin/Form/MatrixCheckboxes.js +247 -170
- package/esm/plugin/Form/NestedSelect.d.ts +1 -1
- package/esm/plugin/Form/NestedSelect.js +329 -246
- package/esm/plugin/Form/Picker.js +260 -178
- package/esm/plugin/Form/Radios.d.ts +1 -1
- package/esm/plugin/Form/Radios.js +228 -136
- package/esm/plugin/Form/Select.d.ts +1 -1
- package/esm/plugin/Form/Select.js +333 -228
- package/esm/plugin/Form/Static.d.ts +1 -1
- package/esm/plugin/Form/Static.js +358 -280
- package/esm/plugin/Form/Switch.d.ts +2 -1
- package/esm/plugin/Form/Switch.js +257 -172
- package/esm/plugin/Form/TabsTransfer.d.ts +1 -1
- package/esm/plugin/Form/TabsTransfer.js +316 -238
- package/esm/plugin/Form/Textarea.d.ts +0 -1
- package/esm/plugin/Form/Textarea.js +219 -130
- package/esm/plugin/Form/Transfer.d.ts +1 -1
- package/esm/plugin/Form/Transfer.js +349 -259
- package/esm/plugin/Form/TreeSelect.d.ts +2 -1
- package/esm/plugin/Form/TreeSelect.js +451 -363
- package/esm/plugin/Form/UUID.js +106 -42
- package/esm/plugin/Grid.d.ts +1 -1
- package/esm/plugin/Grid.js +629 -556
- package/esm/plugin/HBox.d.ts +1 -1
- package/esm/plugin/HBox.js +578 -508
- package/esm/plugin/IFrame.d.ts +2 -10
- package/esm/plugin/IFrame.js +127 -64
- package/esm/plugin/Image.d.ts +2 -2
- package/esm/plugin/Image.js +277 -218
- package/esm/plugin/Images.d.ts +3 -3
- package/esm/plugin/Images.js +214 -160
- package/esm/plugin/Json.d.ts +1 -1
- package/esm/plugin/Json.js +111 -53
- package/esm/plugin/Layout/FlexPluginBase.d.ts +40 -0
- package/esm/plugin/Layout/FlexPluginBase.js +327 -0
- package/esm/plugin/Layout/Layout1_2_v4.d.ts +10 -0
- package/esm/plugin/Layout/Layout1_2_v4.js +144 -0
- package/esm/plugin/Layout/Layout_fixed.d.ts +10 -0
- package/esm/plugin/Layout/Layout_fixed.js +76 -0
- package/esm/plugin/Layout/Layout_fixed_bottom.d.ts +10 -0
- package/esm/plugin/Layout/Layout_fixed_bottom.js +83 -0
- package/esm/plugin/Layout/Layout_fixed_top.d.ts +10 -0
- package/esm/plugin/Layout/Layout_fixed_top.js +82 -0
- package/esm/plugin/Layout/Layout_scroll_x.d.ts +10 -0
- package/esm/plugin/Layout/Layout_scroll_x.js +166 -0
- package/esm/plugin/Layout/Layout_scroll_y.d.ts +10 -0
- package/esm/plugin/Layout/Layout_scroll_y.js +154 -0
- package/esm/plugin/Link.js +132 -86
- package/esm/plugin/List.js +279 -208
- package/esm/plugin/ListItem.js +217 -176
- package/esm/plugin/Log.d.ts +1 -1
- package/esm/plugin/Log.js +102 -44
- package/esm/plugin/Mapping.d.ts +1 -1
- package/esm/plugin/Mapping.js +168 -115
- package/esm/plugin/Markdown.d.ts +1 -1
- package/esm/plugin/Markdown.js +98 -40
- package/esm/plugin/Nav.js +202 -139
- package/esm/plugin/Operation.d.ts +1 -1
- package/esm/plugin/Operation.js +116 -59
- package/esm/plugin/Others/Action.js +329 -317
- package/esm/plugin/Others/TableCell.d.ts +1 -1
- package/esm/plugin/Others/TableCell.js +341 -329
- package/esm/plugin/Page.d.ts +2 -3
- package/esm/plugin/Page.js +374 -283
- package/esm/plugin/Pagination.d.ts +2 -1
- package/esm/plugin/Pagination.js +299 -219
- package/esm/plugin/Panel.d.ts +1 -1
- package/esm/plugin/Panel.js +256 -190
- package/esm/plugin/Plain.d.ts +1 -1
- package/esm/plugin/Plain.js +126 -64
- package/esm/plugin/Progress.d.ts +3 -1
- package/esm/plugin/Progress.js +280 -202
- package/esm/plugin/Property.js +163 -103
- package/esm/plugin/QRCode.js +130 -70
- package/esm/plugin/Reset.js +61 -22
- package/esm/plugin/Service.d.ts +1 -1
- package/esm/plugin/Service.js +254 -167
- package/esm/plugin/Sparkline.js +91 -32
- package/esm/plugin/Status.d.ts +1 -1
- package/esm/plugin/Status.js +116 -58
- package/esm/plugin/Steps.js +153 -93
- package/esm/plugin/Submit.js +56 -22
- package/esm/plugin/Table.d.ts +1 -1
- package/esm/plugin/Table.js +595 -522
- package/esm/plugin/{Table-v2.d.ts → Table2.d.ts} +2 -2
- package/esm/plugin/Table2.js +887 -0
- package/{lib/plugin/TableCell-v2.d.ts → esm/plugin/TableCell2.d.ts} +1 -1
- package/esm/plugin/TableCell2.js +485 -0
- package/esm/plugin/TableView.js +648 -599
- package/esm/plugin/Tabs.d.ts +1 -1
- package/esm/plugin/Tabs.js +470 -360
- package/esm/plugin/Tasks.js +246 -186
- package/esm/plugin/Time.d.ts +0 -1
- package/esm/plugin/Time.js +81 -53
- package/esm/plugin/Timeline.d.ts +1 -1
- package/esm/plugin/Timeline.js +165 -92
- package/esm/plugin/TooltipWrapper.d.ts +1 -1
- package/esm/plugin/TooltipWrapper.js +265 -195
- package/esm/plugin/Tpl.d.ts +1 -1
- package/esm/plugin/Tpl.js +127 -62
- package/esm/plugin/Video.d.ts +2 -2
- package/esm/plugin/Video.js +173 -103
- package/esm/plugin/WebComponent.d.ts +1 -1
- package/esm/plugin/WebComponent.js +128 -62
- package/esm/plugin/Wizard.js +751 -659
- package/esm/plugin/Wrapper.d.ts +2 -1
- package/esm/plugin/Wrapper.js +198 -91
- package/esm/renderer/APIControl.d.ts +278 -5068
- package/esm/renderer/APIControl.js +662 -687
- package/esm/renderer/ActionApiControl.d.ts +8 -6384
- package/esm/renderer/BadgeControl.d.ts +2 -2
- package/esm/renderer/BadgeControl.js +263 -250
- package/esm/renderer/DataBindingControl.js +196 -211
- package/esm/renderer/DataMappingControl.js +39 -29
- package/esm/renderer/DataPickerControl.js +50 -35
- package/esm/renderer/DateShortCutControl.d.ts +26 -25
- package/esm/renderer/DateShortCutControl.js +420 -286
- package/esm/renderer/ExpressionFormulaControl.d.ts +45 -0
- package/esm/renderer/ExpressionFormulaControl.js +245 -0
- package/esm/renderer/FeatureControl.d.ts +1 -1
- package/esm/renderer/FeatureControl.js +228 -212
- package/esm/renderer/FormulaControl.d.ts +33 -16
- package/esm/renderer/FormulaControl.js +431 -355
- package/esm/renderer/GoConfigControl.js +30 -34
- package/esm/renderer/OptionControl.d.ts +2 -2
- package/esm/renderer/OptionControl.js +750 -688
- package/esm/renderer/RangePartsControl.d.ts +2 -2
- package/esm/renderer/RangePartsControl.js +320 -326
- package/esm/renderer/StatusControl.d.ts +1 -1
- package/esm/renderer/StatusControl.js +145 -136
- package/esm/renderer/SwitchMoreControl.d.ts +47 -31
- package/esm/renderer/SwitchMoreControl.js +366 -318
- package/esm/renderer/TimelineItemControl.d.ts +3 -83
- package/esm/renderer/TimelineItemControl.js +531 -464
- package/esm/renderer/TransferTableControl.d.ts +2 -4
- package/esm/renderer/TransferTableControl.js +394 -369
- package/esm/renderer/TreeOptionControl.d.ts +1 -1
- package/esm/renderer/TreeOptionControl.js +588 -563
- package/esm/renderer/ValidationControl.d.ts +1 -1
- package/esm/renderer/ValidationControl.js +277 -269
- package/esm/renderer/ValidationItem.d.ts +1 -1
- package/esm/renderer/ValidationItem.js +145 -134
- package/esm/renderer/event-control/action-config-dialog.js +214 -207
- package/esm/renderer/event-control/action-config-panel.js +37 -44
- package/esm/renderer/event-control/actions.js +466 -145
- package/esm/renderer/event-control/comp-action-select.js +37 -27
- package/esm/renderer/event-control/helper.d.ts +19 -19
- package/esm/renderer/event-control/helper.js +231 -221
- package/esm/renderer/event-control/index.d.ts +1 -1
- package/esm/renderer/event-control/index.js +641 -631
- package/esm/renderer/event-control/types.d.ts +1 -0
- package/esm/renderer/style-control/Background.js +64 -116
- package/esm/renderer/style-control/Border.js +27 -38
- package/esm/renderer/style-control/BoxModel.d.ts +1 -1
- package/esm/renderer/style-control/BoxModel.js +11 -4
- package/esm/renderer/style-control/BoxShadow.js +17 -19
- package/esm/renderer/style-control/Display.js +13 -17
- package/esm/renderer/style-control/Font.js +14 -17
- package/esm/renderer/style-control/InsetBoxModel.d.ts +17 -0
- package/esm/renderer/style-control/InsetBoxModel.js +69 -0
- package/esm/renderer/style-control/font-family.js +2 -3
- package/esm/renderer/style-control/transformation.js +1 -1
- package/esm/renderer/style-control/types.d.ts +4 -4
- package/esm/renderer/textarea-formula/FormulaPicker.d.ts +12 -0
- package/esm/renderer/textarea-formula/FormulaPicker.js +37 -0
- package/esm/renderer/textarea-formula/TextareaFormulaControl.d.ts +67 -0
- package/esm/renderer/textarea-formula/TextareaFormulaControl.js +334 -0
- package/esm/renderer/textarea-formula/plugin.d.ts +32 -0
- package/esm/renderer/textarea-formula/plugin.js +273 -0
- package/esm/renderer/textarea-formula/utils.d.ts +12 -0
- package/esm/renderer/textarea-formula/utils.js +76 -0
- package/esm/tpl/api.js +26 -37
- package/esm/tpl/common.js +192 -114
- package/esm/tpl/horizontal.js +4 -6
- package/esm/tpl/index.d.ts +1 -0
- package/esm/tpl/layout.d.ts +1 -0
- package/esm/tpl/layout.js +708 -0
- package/esm/tpl/options.js +5 -22
- package/esm/tpl/style.js +18 -18
- package/esm/tpl/validations.js +9 -24
- package/esm/util.d.ts +47 -0
- package/esm/util.js +22 -0
- package/esm/validator.d.ts +1 -2
- package/esm/validator.js +11 -24
- package/lib/component/BaseControl.d.ts +5 -810
- package/lib/component/BaseControl.js +32 -42
- package/lib/component/InputComponentName.js +1 -1
- package/lib/component/TableViewEditor.js +547 -454
- package/lib/icons/btn/btn-group.svg.js +1 -3
- package/lib/icons/btn/btn-select.svg.js +1 -3
- package/lib/icons/btn/btn-toolbar.svg.js +1 -3
- package/lib/icons/btn/button.svg.js +1 -3
- package/lib/icons/btn/dropdown-btn.svg.js +1 -3
- package/lib/icons/container/anchor-nav.svg.js +1 -3
- package/lib/icons/container/collapse.svg.js +1 -3
- package/lib/icons/container/container.svg.js +1 -3
- package/lib/icons/container/flex-container.svg.js +1 -3
- package/lib/icons/container/form-group.svg.js +1 -3
- package/lib/icons/container/grid.svg.js +1 -3
- package/lib/icons/container/iframe.svg.js +1 -3
- package/lib/icons/container/panel.svg.js +1 -3
- package/lib/icons/container/table-view.svg.js +1 -3
- package/lib/icons/container/tabs.svg.js +1 -3
- package/lib/icons/container/tooltip-wrapper.svg.js +1 -3
- package/lib/icons/container/web-component.svg.js +1 -3
- package/lib/icons/feat/audio.svg.js +1 -3
- package/lib/icons/feat/custom.svg.js +1 -3
- package/lib/icons/feat/each.svg.js +1 -3
- package/lib/icons/feat/form.svg.js +1 -3
- package/lib/icons/feat/nav.svg.js +1 -3
- package/lib/icons/feat/qrcode.svg.js +1 -3
- package/lib/icons/feat/service.svg.js +1 -3
- package/lib/icons/feat/table.svg.js +1 -3
- package/lib/icons/feat/tasks.svg.js +1 -3
- package/lib/icons/feat/video.svg.js +1 -3
- package/lib/icons/feat/wizard.svg.js +1 -3
- package/lib/icons/form/chained-select.svg.js +1 -3
- package/lib/icons/form/checkbox.svg.js +1 -3
- package/lib/icons/form/checkboxes.svg.js +1 -3
- package/lib/icons/form/combo.svg.js +1 -3
- package/lib/icons/form/condition-builder.svg.js +1 -3
- package/lib/icons/form/diff-editor.svg.js +1 -3
- package/lib/icons/form/editor.svg.js +1 -3
- package/lib/icons/form/formula.svg.js +1 -3
- package/lib/icons/form/hidden.svg.js +1 -3
- package/lib/icons/form/input-city.svg.js +1 -3
- package/lib/icons/form/input-color.svg.js +1 -3
- package/lib/icons/form/input-date-range.svg.js +1 -3
- package/lib/icons/form/input-date.svg.js +1 -3
- package/lib/icons/form/input-datetime.svg.js +1 -3
- package/lib/icons/form/input-email.svg.js +1 -3
- package/lib/icons/form/input-excel.svg.js +1 -3
- package/lib/icons/form/input-file.svg.js +1 -3
- package/lib/icons/form/input-group.svg.js +1 -3
- package/lib/icons/form/input-image.svg.js +1 -3
- package/lib/icons/form/input-kv.svg.js +1 -3
- package/lib/icons/form/input-month-range.svg.js +1 -3
- package/lib/icons/form/input-number.svg.js +1 -3
- package/lib/icons/form/input-password.svg.js +1 -3
- package/lib/icons/form/input-quarter-range.svg.js +1 -3
- package/lib/icons/form/input-range.svg.js +1 -3
- package/lib/icons/form/input-rating.svg.js +1 -3
- package/lib/icons/form/input-repeat.svg.js +1 -3
- package/lib/icons/form/input-rich-text.svg.js +1 -3
- package/lib/icons/form/input-tag.svg.js +1 -3
- package/lib/icons/form/input-text.svg.js +1 -3
- package/lib/icons/form/input-time-range.svg.js +1 -3
- package/lib/icons/form/input-time.svg.js +1 -3
- package/lib/icons/form/input-tree.svg.js +1 -3
- package/lib/icons/form/input-url.svg.js +1 -3
- package/lib/icons/form/input-year.svg.js +1 -3
- package/lib/icons/form/inputArray.svg.js +1 -3
- package/lib/icons/form/list-select.svg.js +1 -3
- package/lib/icons/form/location-picker.svg.js +1 -3
- package/lib/icons/form/matrix-checkboxes.svg.js +1 -3
- package/lib/icons/form/month.svg.js +1 -3
- package/lib/icons/form/nested-select.svg.js +1 -3
- package/lib/icons/form/picker.svg.js +1 -3
- package/lib/icons/form/quarter.svg.js +1 -3
- package/lib/icons/form/radios.svg.js +1 -3
- package/lib/icons/form/select.svg.js +1 -3
- package/lib/icons/form/static.svg.js +1 -3
- package/lib/icons/form/sub-form.svg.js +1 -3
- package/lib/icons/form/switch.svg.js +1 -3
- package/lib/icons/form/tabs-transfer.svg.js +1 -3
- package/lib/icons/form/textarea.svg.js +1 -3
- package/lib/icons/form/transfer.svg.js +1 -3
- package/lib/icons/form/tree-select.svg.js +1 -3
- package/lib/icons/form/uuid.svg.js +1 -3
- package/lib/icons/index.js +28 -1
- package/lib/icons/layout/layout-1with2.svg.js +56 -0
- package/lib/icons/layout/layout-2cols.svg.js +56 -0
- package/lib/icons/layout/layout-2row.svg.js +56 -0
- package/lib/icons/layout/layout-2with1.svg.js +57 -0
- package/lib/icons/layout/layout-3cols.svg.js +56 -0
- package/lib/icons/layout/layout-3row.svg.js +57 -0
- package/lib/icons/layout/layout-absolute.svg.js +51 -0
- package/lib/icons/layout/layout-fixed.svg.js +51 -0
- package/lib/icons/layout/layout-full.svg.js +73 -0
- package/lib/icons/layout/layout1-2.svg.js +57 -0
- package/lib/icons/layout/layout2-1.svg.js +57 -0
- package/lib/icons/layout/layout3-1.svg.js +57 -0
- package/lib/icons/layout/layout3-2.svg.js +57 -0
- package/lib/icons/other/divider.svg.js +1 -3
- package/lib/icons/other/property-sheet.svg.js +1 -3
- package/lib/icons/other/tooltip.svg.js +1 -3
- package/lib/icons/show/URL.svg.js +1 -3
- package/lib/icons/show/avatar.svg.js +1 -3
- package/lib/icons/show/breadcrumb.svg.js +1 -3
- package/lib/icons/show/card.svg.js +1 -3
- package/lib/icons/show/cards.svg.js +1 -3
- package/lib/icons/show/carousel.svg.js +1 -3
- package/lib/icons/show/chart.svg.js +1 -3
- package/lib/icons/show/code.svg.js +1 -3
- package/lib/icons/show/date.svg.js +1 -3
- package/lib/icons/show/datetime.svg.js +1 -3
- package/lib/icons/show/image.svg.js +1 -3
- package/lib/icons/show/images.svg.js +1 -3
- package/lib/icons/show/json-view.svg.js +1 -3
- package/lib/icons/show/list.svg.js +1 -3
- package/lib/icons/show/log.svg.js +1 -3
- package/lib/icons/show/mapping.svg.js +1 -3
- package/lib/icons/show/markdown.svg.js +1 -3
- package/lib/icons/show/plain.svg.js +1 -3
- package/lib/icons/show/progress.svg.js +1 -3
- package/lib/icons/show/sparkline.svg.js +1 -3
- package/lib/icons/show/status.svg.js +1 -3
- package/lib/icons/show/steps.svg.js +1 -3
- package/lib/icons/show/time.svg.js +1 -3
- package/lib/index.d.ts +11 -2
- package/lib/index.js +13 -3
- package/lib/locale/en-US.js +315 -102
- package/lib/locale/zh-CN.js +218 -3
- package/lib/plugin/Alert.d.ts +1 -1
- package/lib/plugin/Alert.js +157 -89
- package/lib/plugin/AnchorNav.js +337 -263
- package/lib/plugin/Audio.d.ts +1 -1
- package/lib/plugin/Audio.js +165 -112
- package/lib/plugin/Avatar.d.ts +1 -1
- package/lib/plugin/Avatar.js +301 -238
- package/lib/plugin/Breadcrumb.js +138 -75
- package/lib/plugin/Button.d.ts +1 -1
- package/lib/plugin/Button.js +310 -228
- package/lib/plugin/ButtonGroup.d.ts +1 -1
- package/lib/plugin/ButtonGroup.js +174 -106
- package/lib/plugin/CRUD.d.ts +1 -1
- package/lib/plugin/CRUD.js +1426 -1351
- package/lib/plugin/CRUD2.d.ts +2 -3
- package/lib/plugin/CRUD2.js +1152 -1081
- package/lib/plugin/Card.d.ts +1 -1
- package/lib/plugin/Card.js +284 -208
- package/lib/plugin/Card2.d.ts +2 -1
- package/lib/plugin/Card2.js +139 -74
- package/lib/plugin/Cards.js +302 -234
- package/lib/plugin/Carousel.d.ts +2 -2
- package/lib/plugin/Carousel.js +344 -281
- package/lib/plugin/Chart.d.ts +2 -1
- package/lib/plugin/Chart.js +326 -158
- package/lib/plugin/CodeView.js +104 -44
- package/lib/plugin/Collapse.d.ts +1 -1
- package/lib/plugin/Collapse.js +168 -101
- package/lib/plugin/CollapseGroup.d.ts +1 -1
- package/lib/plugin/CollapseGroup.js +249 -187
- package/lib/plugin/ColumnToggler.d.ts +1 -1
- package/lib/plugin/ColumnToggler.js +140 -87
- package/lib/plugin/Container.d.ts +11 -9
- package/lib/plugin/Container.js +190 -68
- package/lib/plugin/Custom.js +144 -82
- package/lib/plugin/CustomRegion.js +173 -110
- package/lib/plugin/Date.d.ts +1 -1
- package/lib/plugin/Date.js +112 -59
- package/lib/plugin/Datetime.d.ts +0 -1
- package/lib/plugin/Datetime.js +81 -53
- package/lib/plugin/Dialog.d.ts +2 -2
- package/lib/plugin/Dialog.js +230 -179
- package/lib/plugin/Divider.js +82 -32
- package/lib/plugin/Drawer.d.ts +11 -2
- package/lib/plugin/Drawer.js +260 -194
- package/lib/plugin/DropDownButton.js +261 -182
- package/lib/plugin/Each.js +180 -115
- package/lib/plugin/Flex.d.ts +2 -27
- package/lib/plugin/Flex.js +23 -157
- package/lib/plugin/Form/ButtonGroupSelect.d.ts +2 -1
- package/lib/plugin/Form/ButtonGroupSelect.js +205 -126
- package/lib/plugin/Form/ButtonToolbar.d.ts +1 -1
- package/lib/plugin/Form/ButtonToolbar.js +168 -94
- package/lib/plugin/Form/ChainedSelect.d.ts +1 -1
- package/lib/plugin/Form/ChainedSelect.js +209 -130
- package/lib/plugin/Form/Checkbox.d.ts +1 -1
- package/lib/plugin/Form/Checkbox.js +208 -131
- package/lib/plugin/Form/Checkboxes.d.ts +1 -1
- package/lib/plugin/Form/Checkboxes.js +236 -153
- package/lib/plugin/Form/CodeEditor.d.ts +0 -1
- package/lib/plugin/Form/CodeEditor.js +245 -146
- package/lib/plugin/Form/Combo.js +532 -423
- package/lib/plugin/Form/ConditionBuilder.d.ts +1 -1
- package/lib/plugin/Form/ConditionBuilder.js +288 -222
- package/lib/plugin/Form/Control.d.ts +1 -1
- package/lib/plugin/Form/Control.js +130 -63
- package/lib/plugin/Form/DiffEditor.d.ts +0 -1
- package/lib/plugin/Form/DiffEditor.js +252 -150
- package/lib/plugin/Form/FieldSet.d.ts +1 -1
- package/lib/plugin/Form/FieldSet.js +174 -112
- package/lib/plugin/Form/Form.d.ts +1 -1
- package/lib/plugin/Form/Form.js +750 -705
- package/lib/plugin/Form/Formula.d.ts +1 -9
- package/lib/plugin/Form/Formula.js +126 -62
- package/lib/plugin/Form/Group.js +250 -183
- package/lib/plugin/Form/Hidden.js +106 -42
- package/lib/plugin/Form/InputArray.js +233 -157
- package/lib/plugin/Form/InputCity.d.ts +1 -1
- package/lib/plugin/Form/InputCity.js +181 -104
- package/lib/plugin/Form/InputColor.d.ts +1 -1
- package/lib/plugin/Form/InputColor.js +296 -224
- package/lib/plugin/Form/InputDate.d.ts +1 -1
- package/lib/plugin/Form/InputDate.js +299 -189
- package/lib/plugin/Form/InputDateRange.d.ts +1 -1
- package/lib/plugin/Form/InputDateRange.js +385 -264
- package/lib/plugin/Form/InputDateTime.js +93 -33
- package/lib/plugin/Form/InputDateTimeRange.js +99 -34
- package/lib/plugin/Form/InputEmail.js +80 -30
- package/lib/plugin/Form/InputExcel.d.ts +1 -1
- package/lib/plugin/Form/InputExcel.js +164 -91
- package/lib/plugin/Form/InputFile.d.ts +4 -1
- package/lib/plugin/Form/InputFile.js +352 -271
- package/lib/plugin/Form/InputGroup.js +132 -73
- package/lib/plugin/Form/InputImage.d.ts +4 -1
- package/lib/plugin/Form/InputImage.js +385 -303
- package/lib/plugin/Form/InputKV.d.ts +1 -1
- package/lib/plugin/Form/InputKV.js +168 -94
- package/lib/plugin/Form/InputMonth.js +91 -31
- package/lib/plugin/Form/InputMonthRange.js +99 -34
- package/lib/plugin/Form/InputNumber.d.ts +2 -1
- package/lib/plugin/Form/InputNumber.js +287 -200
- package/lib/plugin/Form/InputPassword.js +80 -30
- package/lib/plugin/Form/InputQuarter.js +91 -31
- package/lib/plugin/Form/InputQuarterRange.js +99 -34
- package/lib/plugin/Form/InputRange.d.ts +1 -1
- package/lib/plugin/Form/InputRange.js +315 -236
- package/lib/plugin/Form/InputRating.d.ts +1 -1
- package/lib/plugin/Form/InputRating.js +361 -293
- package/lib/plugin/Form/InputRepeat.js +105 -45
- package/lib/plugin/Form/InputRichText.d.ts +2 -1
- package/lib/plugin/Form/InputRichText.js +211 -152
- package/lib/plugin/Form/InputSubForm.js +225 -157
- package/lib/plugin/Form/InputTable.d.ts +1 -1
- package/lib/plugin/Form/InputTable.js +385 -320
- package/lib/plugin/Form/InputTag.d.ts +1 -1
- package/lib/plugin/Form/InputTag.js +208 -119
- package/lib/plugin/Form/InputText.d.ts +1 -1
- package/lib/plugin/Form/InputText.js +348 -263
- package/lib/plugin/Form/InputTime.js +93 -33
- package/lib/plugin/Form/InputTimeRange.js +99 -34
- package/lib/plugin/Form/InputTree.d.ts +1 -1
- package/lib/plugin/Form/InputTree.js +460 -367
- package/lib/plugin/Form/InputURL.js +86 -31
- package/lib/plugin/Form/InputYear.js +91 -31
- package/lib/plugin/Form/InputYearRange.js +99 -34
- package/lib/plugin/Form/Item.d.ts +1 -1
- package/lib/plugin/Form/Item.js +213 -189
- package/lib/plugin/Form/ListSelect.d.ts +1 -1
- package/lib/plugin/Form/ListSelect.js +174 -96
- package/lib/plugin/Form/LocationPicker.d.ts +1 -1
- package/lib/plugin/Form/LocationPicker.js +115 -57
- package/lib/plugin/Form/MatrixCheckboxes.d.ts +1 -1
- package/lib/plugin/Form/MatrixCheckboxes.js +247 -170
- package/lib/plugin/Form/NestedSelect.d.ts +1 -1
- package/lib/plugin/Form/NestedSelect.js +329 -246
- package/lib/plugin/Form/Picker.js +260 -178
- package/lib/plugin/Form/Radios.d.ts +1 -1
- package/lib/plugin/Form/Radios.js +228 -136
- package/lib/plugin/Form/Select.d.ts +1 -1
- package/lib/plugin/Form/Select.js +333 -228
- package/lib/plugin/Form/Static.d.ts +1 -1
- package/lib/plugin/Form/Static.js +358 -280
- package/lib/plugin/Form/Switch.d.ts +2 -1
- package/lib/plugin/Form/Switch.js +257 -172
- package/lib/plugin/Form/TabsTransfer.d.ts +1 -1
- package/lib/plugin/Form/TabsTransfer.js +316 -238
- package/lib/plugin/Form/Textarea.d.ts +0 -1
- package/lib/plugin/Form/Textarea.js +219 -130
- package/lib/plugin/Form/Transfer.d.ts +1 -1
- package/lib/plugin/Form/Transfer.js +349 -259
- package/lib/plugin/Form/TreeSelect.d.ts +2 -1
- package/lib/plugin/Form/TreeSelect.js +451 -363
- package/lib/plugin/Form/UUID.js +106 -42
- package/lib/plugin/Grid.d.ts +1 -1
- package/lib/plugin/Grid.js +629 -556
- package/lib/plugin/HBox.d.ts +1 -1
- package/lib/plugin/HBox.js +578 -508
- package/lib/plugin/IFrame.d.ts +2 -10
- package/lib/plugin/IFrame.js +127 -64
- package/lib/plugin/Image.d.ts +2 -2
- package/lib/plugin/Image.js +277 -218
- package/lib/plugin/Images.d.ts +3 -3
- package/lib/plugin/Images.js +214 -160
- package/lib/plugin/Json.d.ts +1 -1
- package/lib/plugin/Json.js +111 -53
- package/lib/plugin/Layout/FlexPluginBase.d.ts +40 -0
- package/lib/plugin/Layout/FlexPluginBase.js +332 -0
- package/lib/plugin/Layout/Layout1_2_v4.d.ts +10 -0
- package/lib/plugin/Layout/Layout1_2_v4.js +148 -0
- package/lib/plugin/Layout/Layout_fixed.d.ts +10 -0
- package/lib/plugin/Layout/Layout_fixed.js +80 -0
- package/lib/plugin/Layout/Layout_fixed_bottom.d.ts +10 -0
- package/lib/plugin/Layout/Layout_fixed_bottom.js +87 -0
- package/lib/plugin/Layout/Layout_fixed_top.d.ts +10 -0
- package/lib/plugin/Layout/Layout_fixed_top.js +86 -0
- package/lib/plugin/Layout/Layout_scroll_x.d.ts +10 -0
- package/lib/plugin/Layout/Layout_scroll_x.js +170 -0
- package/lib/plugin/Layout/Layout_scroll_y.d.ts +10 -0
- package/lib/plugin/Layout/Layout_scroll_y.js +158 -0
- package/lib/plugin/Link.js +131 -85
- package/lib/plugin/List.js +279 -208
- package/lib/plugin/ListItem.js +217 -176
- package/lib/plugin/Log.d.ts +1 -1
- package/lib/plugin/Log.js +102 -44
- package/lib/plugin/Mapping.d.ts +1 -1
- package/lib/plugin/Mapping.js +168 -115
- package/lib/plugin/Markdown.d.ts +1 -1
- package/lib/plugin/Markdown.js +98 -40
- package/lib/plugin/Nav.js +202 -139
- package/lib/plugin/Operation.d.ts +1 -1
- package/lib/plugin/Operation.js +116 -59
- package/lib/plugin/Others/Action.js +329 -317
- package/lib/plugin/Others/TableCell.d.ts +1 -1
- package/lib/plugin/Others/TableCell.js +341 -329
- package/lib/plugin/Page.d.ts +2 -3
- package/lib/plugin/Page.js +374 -283
- package/lib/plugin/Pagination.d.ts +2 -1
- package/lib/plugin/Pagination.js +299 -219
- package/lib/plugin/Panel.d.ts +1 -1
- package/lib/plugin/Panel.js +256 -190
- package/lib/plugin/Plain.d.ts +1 -1
- package/lib/plugin/Plain.js +126 -64
- package/lib/plugin/Progress.d.ts +3 -1
- package/lib/plugin/Progress.js +280 -202
- package/lib/plugin/Property.js +163 -103
- package/lib/plugin/QRCode.js +130 -70
- package/lib/plugin/Reset.js +61 -22
- package/lib/plugin/Service.d.ts +1 -1
- package/lib/plugin/Service.js +254 -167
- package/lib/plugin/Sparkline.js +91 -32
- package/lib/plugin/Status.d.ts +1 -1
- package/lib/plugin/Status.js +116 -58
- package/lib/plugin/Steps.js +153 -93
- package/lib/plugin/Submit.js +56 -22
- package/lib/plugin/Table.d.ts +1 -1
- package/lib/plugin/Table.js +595 -522
- package/lib/plugin/{Table-v2.d.ts → Table2.d.ts} +2 -2
- package/lib/plugin/Table2.js +891 -0
- package/{esm/plugin/TableCell-v2.d.ts → lib/plugin/TableCell2.d.ts} +1 -1
- package/lib/plugin/TableCell2.js +493 -0
- package/lib/plugin/TableView.js +648 -599
- package/lib/plugin/Tabs.d.ts +1 -1
- package/lib/plugin/Tabs.js +470 -360
- package/lib/plugin/Tasks.js +246 -186
- package/lib/plugin/Time.d.ts +0 -1
- package/lib/plugin/Time.js +81 -53
- package/lib/plugin/Timeline.d.ts +1 -1
- package/lib/plugin/Timeline.js +165 -92
- package/lib/plugin/TooltipWrapper.d.ts +1 -1
- package/lib/plugin/TooltipWrapper.js +265 -195
- package/lib/plugin/Tpl.d.ts +1 -1
- package/lib/plugin/Tpl.js +126 -61
- package/lib/plugin/Video.d.ts +2 -2
- package/lib/plugin/Video.js +173 -103
- package/lib/plugin/WebComponent.d.ts +1 -1
- package/lib/plugin/WebComponent.js +128 -62
- package/lib/plugin/Wizard.js +751 -659
- package/lib/plugin/Wrapper.d.ts +2 -1
- package/lib/plugin/Wrapper.js +198 -91
- package/lib/renderer/APIControl.d.ts +278 -5068
- package/lib/renderer/APIControl.js +663 -688
- package/lib/renderer/ActionApiControl.d.ts +8 -6384
- package/lib/renderer/BadgeControl.d.ts +6 -6
- package/lib/renderer/BadgeControl.js +263 -250
- package/lib/renderer/DataBindingControl.js +197 -212
- package/lib/renderer/DataMappingControl.js +39 -29
- package/lib/renderer/DataPickerControl.js +50 -35
- package/lib/renderer/DateShortCutControl.d.ts +26 -25
- package/lib/renderer/DateShortCutControl.js +418 -284
- package/lib/renderer/ExpressionFormulaControl.d.ts +45 -0
- package/lib/renderer/ExpressionFormulaControl.js +254 -0
- package/lib/renderer/FeatureControl.d.ts +1 -1
- package/lib/renderer/FeatureControl.js +229 -213
- package/lib/renderer/FormulaControl.d.ts +33 -16
- package/lib/renderer/FormulaControl.js +429 -356
- package/lib/renderer/GoConfigControl.js +30 -34
- package/lib/renderer/OptionControl.d.ts +2 -2
- package/lib/renderer/OptionControl.js +750 -688
- package/lib/renderer/RangePartsControl.d.ts +2 -2
- package/lib/renderer/RangePartsControl.js +320 -326
- package/lib/renderer/StatusControl.d.ts +1 -1
- package/lib/renderer/StatusControl.js +145 -136
- package/lib/renderer/SwitchMoreControl.d.ts +67 -51
- package/lib/renderer/SwitchMoreControl.js +367 -319
- package/lib/renderer/TimelineItemControl.d.ts +3 -83
- package/lib/renderer/TimelineItemControl.js +531 -464
- package/lib/renderer/TransferTableControl.d.ts +2 -4
- package/lib/renderer/TransferTableControl.js +394 -369
- package/lib/renderer/TreeOptionControl.d.ts +1 -1
- package/lib/renderer/TreeOptionControl.js +588 -563
- package/lib/renderer/ValidationControl.d.ts +1 -1
- package/lib/renderer/ValidationControl.js +277 -269
- package/lib/renderer/ValidationItem.d.ts +1 -1
- package/lib/renderer/ValidationItem.js +145 -134
- package/lib/renderer/event-control/action-config-dialog.js +214 -207
- package/lib/renderer/event-control/action-config-panel.js +37 -44
- package/lib/renderer/event-control/actions.js +465 -144
- package/lib/renderer/event-control/comp-action-select.js +37 -27
- package/lib/renderer/event-control/helper.d.ts +19 -19
- package/lib/renderer/event-control/helper.js +232 -220
- package/lib/renderer/event-control/index.d.ts +1 -1
- package/lib/renderer/event-control/index.js +641 -630
- package/lib/renderer/event-control/types.d.ts +1 -0
- package/lib/renderer/style-control/Background.js +64 -116
- package/lib/renderer/style-control/Border.js +27 -38
- package/lib/renderer/style-control/BoxModel.d.ts +1 -1
- package/lib/renderer/style-control/BoxModel.js +11 -4
- package/lib/renderer/style-control/BoxShadow.js +17 -19
- package/lib/renderer/style-control/Display.js +13 -17
- package/lib/renderer/style-control/Font.js +14 -17
- package/lib/renderer/style-control/InsetBoxModel.d.ts +17 -0
- package/lib/renderer/style-control/InsetBoxModel.js +77 -0
- package/lib/renderer/style-control/font-family.js +2 -3
- package/lib/renderer/style-control/transformation.js +1 -1
- package/lib/renderer/style-control/types.d.ts +4 -4
- package/lib/renderer/textarea-formula/FormulaPicker.d.ts +12 -0
- package/lib/renderer/textarea-formula/FormulaPicker.js +47 -0
- package/lib/renderer/textarea-formula/TextareaFormulaControl.d.ts +67 -0
- package/lib/renderer/textarea-formula/TextareaFormulaControl.js +345 -0
- package/lib/renderer/textarea-formula/plugin.d.ts +32 -0
- package/lib/renderer/textarea-formula/plugin.js +278 -0
- package/lib/renderer/textarea-formula/utils.d.ts +12 -0
- package/lib/renderer/textarea-formula/utils.js +81 -0
- package/lib/tpl/api.js +30 -41
- package/lib/tpl/common.js +192 -113
- package/lib/tpl/horizontal.js +6 -8
- package/lib/tpl/index.d.ts +1 -0
- package/lib/tpl/layout.d.ts +1 -0
- package/lib/tpl/layout.js +715 -0
- package/lib/tpl/options.js +5 -22
- package/lib/tpl/style.js +18 -18
- package/lib/tpl/validations.js +9 -24
- package/lib/util.d.ts +47 -0
- package/lib/util.js +30 -0
- package/lib/validator.d.ts +1 -2
- package/lib/validator.js +11 -24
- package/package.json +10 -28
- package/esm/plugin/Table-v2.js +0 -819
- package/esm/plugin/TableCell-v2.js +0 -499
- package/lib/plugin/Table-v2.js +0 -823
- package/lib/plugin/TableCell-v2.js +0 -507
@@ -1,437 +1,513 @@
|
|
1
1
|
/**
|
2
|
-
* amis-editor v5.2.
|
2
|
+
* amis-editor v5.2.1-beta.15
|
3
3
|
* Copyright 2018-2022 @fex
|
4
4
|
*/
|
5
5
|
|
6
|
-
import { __extends,
|
6
|
+
import { __extends, __awaiter, __generator, __rest, __assign, __decorate, __metadata } from 'tslib';
|
7
7
|
import React__default from 'react';
|
8
|
-
import debounce from 'lodash/debounce';
|
9
|
-
import uniqBy from 'lodash/uniqBy';
|
10
8
|
import isNumber from 'lodash/isNumber';
|
11
9
|
import isBoolean from 'lodash/isBoolean';
|
12
10
|
import isPlainObject from 'lodash/isPlainObject';
|
13
11
|
import isArray from 'lodash/isArray';
|
14
12
|
import isString from 'lodash/isString';
|
15
|
-
import isEqual from 'lodash/isEqual';
|
16
13
|
import omit from 'lodash/omit';
|
17
14
|
import cx from 'classnames';
|
18
|
-
import { isExpression, FormulaExec, InputBox, ResultBox, PickerContainer, Button, Icon, FormItem } from 'amis';
|
15
|
+
import { isExpression, FormulaExec, InputBox, TooltipWrapper, ResultBox, PickerContainer, Button, Icon, FormItem } from 'amis';
|
19
16
|
import { FormulaEditor } from 'amis-ui/lib/components/formula/Editor';
|
20
17
|
import { autobind } from 'amis-editor-core';
|
21
|
-
import {
|
18
|
+
import { getVariables } from './textarea-formula/utils.js';
|
22
19
|
import { i18n } from 'i18n-runtime';
|
23
20
|
|
24
21
|
/**
|
25
22
|
* @file 表达式控件
|
26
23
|
*/
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
24
|
+
var FormulaDateType;
|
25
|
+
(function (FormulaDateType) {
|
26
|
+
FormulaDateType[FormulaDateType["NotDate"] = 0] = "NotDate";
|
27
|
+
FormulaDateType[FormulaDateType["IsDate"] = 1] = "IsDate";
|
28
|
+
FormulaDateType[FormulaDateType["IsRange"] = 2] = "IsRange"; // 日期时间范围类
|
29
|
+
})(FormulaDateType || (FormulaDateType = {}));
|
30
|
+
var FormulaControl = /** @class */function (_super) {
|
31
31
|
__extends(FormulaControl, _super);
|
32
|
-
|
33
32
|
function FormulaControl(props) {
|
34
33
|
var _this = _super.call(this, props) || this;
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
34
|
+
Object.defineProperty(_this, "isUnmount", {
|
35
|
+
enumerable: true,
|
36
|
+
configurable: true,
|
37
|
+
writable: true,
|
38
|
+
value: void 0
|
39
|
+
});
|
40
|
+
Object.defineProperty(_this, "handleSimpleInputChange", {
|
41
|
+
enumerable: true,
|
42
|
+
configurable: true,
|
43
|
+
writable: true,
|
44
|
+
value: function (value) {
|
45
|
+
var _a, _b;
|
46
|
+
var curValue = _this.outReplaceExpression(value);
|
47
|
+
(_b = (_a = _this.props) === null || _a === void 0 ? void 0 : _a.onChange) === null || _b === void 0 ? void 0 : _b.call(_a, curValue);
|
48
|
+
}
|
49
|
+
});
|
50
|
+
Object.defineProperty(_this, "handleInputChange", {
|
51
|
+
enumerable: true,
|
52
|
+
configurable: true,
|
53
|
+
writable: true,
|
54
|
+
value: function (value) {
|
55
|
+
var _a, _b;
|
56
|
+
(_b = (_a = _this.props) === null || _a === void 0 ? void 0 : _a.onChange) === null || _b === void 0 ? void 0 : _b.call(_a, value);
|
57
|
+
}
|
45
58
|
});
|
46
|
-
|
47
|
-
_this.handleInputChange = function (value) {
|
48
|
-
var _a, _b;
|
49
|
-
|
50
|
-
(_b = (_a = _this.props) === null || _a === void 0 ? void 0 : _a.onChange) === null || _b === void 0 ? void 0 : _b.call(_a, value);
|
51
|
-
};
|
52
|
-
|
53
59
|
_this.state = {
|
54
|
-
variables:
|
55
|
-
variableMode: 'tabs'
|
56
|
-
evalMode: true
|
60
|
+
variables: [],
|
61
|
+
variableMode: 'tabs'
|
57
62
|
};
|
58
63
|
return _this;
|
59
64
|
}
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
variables: vars
|
78
|
-
});
|
65
|
+
Object.defineProperty(FormulaControl.prototype, "componentDidMount", {
|
66
|
+
enumerable: false,
|
67
|
+
configurable: true,
|
68
|
+
writable: true,
|
69
|
+
value: function () {
|
70
|
+
return __awaiter(this, void 0, void 0, function () {
|
71
|
+
var variablesArr;
|
72
|
+
return __generator(this, function (_a) {
|
73
|
+
switch (_a.label) {
|
74
|
+
case 0:
|
75
|
+
return [4 /*yield*/, getVariables(this)];
|
76
|
+
case 1:
|
77
|
+
variablesArr = _a.sent();
|
78
|
+
this.setState({
|
79
|
+
variables: variablesArr
|
80
|
+
});
|
81
|
+
return [2 /*return*/];
|
79
82
|
}
|
80
|
-
}
|
83
|
+
});
|
81
84
|
});
|
82
85
|
}
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
86
|
+
});
|
87
|
+
|
88
|
+
Object.defineProperty(FormulaControl.prototype, "componentDidUpdate", {
|
89
|
+
enumerable: false,
|
90
|
+
configurable: true,
|
91
|
+
writable: true,
|
92
|
+
value: function (prevProps) {
|
93
|
+
return __awaiter(this, void 0, void 0, function () {
|
94
|
+
var variablesArr;
|
95
|
+
return __generator(this, function (_a) {
|
96
|
+
switch (_a.label) {
|
97
|
+
case 0:
|
98
|
+
if (!(this.props.data !== prevProps.data)) return [3 /*break*/, 2];
|
99
|
+
return [4 /*yield*/, getVariables(this)];
|
100
|
+
case 1:
|
101
|
+
variablesArr = _a.sent();
|
102
|
+
this.setState({
|
103
|
+
variables: variablesArr
|
104
|
+
});
|
105
|
+
_a.label = 2;
|
106
|
+
case 2:
|
107
|
+
return [2 /*return*/];
|
108
|
+
}
|
109
|
+
});
|
87
110
|
});
|
88
111
|
}
|
89
|
-
};
|
90
|
-
|
91
|
-
FormulaControl.prototype
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
var _a, _b, _c;
|
98
|
-
|
99
|
-
if (!variables) {
|
100
|
-
return [];
|
101
|
-
}
|
102
|
-
|
103
|
-
if (variables && variables.some(function (item) {
|
104
|
-
return isExpression(item.children);
|
105
|
-
})) {
|
106
|
-
variables = dataMapping(variables, this.props.data);
|
112
|
+
});
|
113
|
+
|
114
|
+
Object.defineProperty(FormulaControl.prototype, "componentWillUnmount", {
|
115
|
+
enumerable: false,
|
116
|
+
configurable: true,
|
117
|
+
writable: true,
|
118
|
+
value: function () {
|
119
|
+
this.isUnmount = true;
|
107
120
|
}
|
108
|
-
|
109
|
-
var _d = this.props,
|
110
|
-
context = _d.context,
|
111
|
-
evalMode = _d.evalMode; // 自身字段
|
112
|
-
|
113
|
-
var field = (_b = (_a = this.props) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.name;
|
114
|
-
var ancestorField = (_c = context === null || context === void 0 ? void 0 : context.node) === null || _c === void 0 ? void 0 : _c.ancestorField;
|
115
|
-
return uniqBy(__spreadArray(__spreadArray(__spreadArray([], Array.isArray(variables) ? variables : [], true), ancestorField ? ancestorField.map(function (item) {
|
116
|
-
return {
|
117
|
-
label: item,
|
118
|
-
value: evalMode ? "this.".concat(item) : item
|
119
|
-
};
|
120
|
-
}) : [], true), field ? [{
|
121
|
-
label: field,
|
122
|
-
value: "this.".concat(field)
|
123
|
-
}] : [], true), 'value');
|
124
|
-
};
|
121
|
+
});
|
125
122
|
/**
|
126
123
|
* 将 ${xx}(非 \${xx})替换成 \${xx}
|
127
124
|
* 备注: 手动编辑时,自动处理掉 ${xx},避免识别成 公式表达式
|
128
125
|
*/
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
126
|
+
Object.defineProperty(FormulaControl.prototype, "outReplaceExpression", {
|
127
|
+
enumerable: false,
|
128
|
+
configurable: true,
|
129
|
+
writable: true,
|
130
|
+
value: function (expression) {
|
131
|
+
if (expression && isString(expression) && isExpression(expression)) {
|
132
|
+
return expression.replace(/(^|[^\\])\$\{/g, '\\${');
|
133
|
+
}
|
134
|
+
return expression;
|
134
135
|
}
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
136
|
+
});
|
137
|
+
Object.defineProperty(FormulaControl.prototype, "inReplaceExpression", {
|
138
|
+
enumerable: false,
|
139
|
+
configurable: true,
|
140
|
+
writable: true,
|
141
|
+
value: function (expression) {
|
142
|
+
if (expression && isString(expression)) {
|
143
|
+
return expression.replace(/\\\$\{/g, '${');
|
144
|
+
}
|
145
|
+
return expression;
|
143
146
|
}
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
147
|
+
});
|
148
|
+
// 根据 name 值 判断当前表达式是否 存在循环引用问题
|
149
|
+
Object.defineProperty(FormulaControl.prototype, "isLoopExpression", {
|
150
|
+
enumerable: false,
|
151
|
+
configurable: true,
|
152
|
+
writable: true,
|
153
|
+
value: function (expression, selfName) {
|
154
|
+
if (!expression || !selfName || !isString(expression)) {
|
155
|
+
return false;
|
156
|
+
}
|
157
|
+
var variables = [];
|
158
|
+
try {
|
159
|
+
variables = FormulaExec.collect(expression);
|
160
|
+
} catch (e) {}
|
161
|
+
return variables.some(function (variable) {
|
162
|
+
return variable === selfName;
|
163
|
+
});
|
155
164
|
}
|
165
|
+
});
|
166
|
+
// 判断是否是期望类型
|
167
|
+
Object.defineProperty(FormulaControl.prototype, "isExpectType", {
|
168
|
+
enumerable: false,
|
169
|
+
configurable: true,
|
170
|
+
writable: true,
|
171
|
+
value: function (value) {
|
172
|
+
if (value === null || value === undefined) {
|
173
|
+
return true; // 数值为空不进行类型识别
|
174
|
+
}
|
156
175
|
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
if (
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
176
|
+
var rendererSchema = this.props.rendererSchema;
|
177
|
+
var expectType = this.props.valueType;
|
178
|
+
if (expectType === null || expectType === undefined) {
|
179
|
+
return true; // expectType为空,则不进行类型识别
|
180
|
+
}
|
181
|
+
// 当前数据域
|
182
|
+
var curData = this.getContextData();
|
183
|
+
if (rendererSchema.type === 'switch' && (rendererSchema.trueValue !== undefined || rendererSchema.falseValue !== undefined)) {
|
184
|
+
// 开关类型组件单独处理
|
185
|
+
return rendererSchema.trueValue === value || rendererSchema.falseValue === value;
|
186
|
+
} else if (expectType === 'number' && isNumber(value) || expectType === 'boolean' && isBoolean(value) || expectType === 'object' && isPlainObject(value) || expectType === 'array' && isArray(value)) {
|
187
|
+
return true;
|
188
|
+
} else if (isString(value)) {
|
189
|
+
if (isExpression(value)) {
|
190
|
+
// 根据公式运算结果判断类型
|
191
|
+
var formulaValue = FormulaExec.formula(value, curData);
|
192
|
+
if (expectType === 'number' && isNumber(formulaValue) || expectType === 'boolean' && isBoolean(formulaValue) || expectType === 'object' && isPlainObject(formulaValue) || expectType === 'array' && isArray(formulaValue) || expectType === 'string' && isString(formulaValue)) {
|
193
|
+
return true;
|
194
|
+
}
|
195
|
+
} else if (expectType === 'string') {
|
196
|
+
// 非公式字符串
|
174
197
|
return true;
|
175
198
|
}
|
176
|
-
}
|
177
|
-
|
199
|
+
}
|
200
|
+
return false;
|
201
|
+
}
|
202
|
+
});
|
203
|
+
Object.defineProperty(FormulaControl.prototype, "matchDate", {
|
204
|
+
enumerable: false,
|
205
|
+
configurable: true,
|
206
|
+
writable: true,
|
207
|
+
value: function (str) {
|
208
|
+
var matchDate = /^(.+)?(\+|-)(\d+)(minute|min|hour|day|week|month|year|weekday|second|millisecond)s?$/i;
|
209
|
+
var m = matchDate.exec(str);
|
210
|
+
return m ? m[1] ? this.matchDate(m[1]) : true : false;
|
211
|
+
}
|
212
|
+
});
|
213
|
+
Object.defineProperty(FormulaControl.prototype, "matchDateRange", {
|
214
|
+
enumerable: false,
|
215
|
+
configurable: true,
|
216
|
+
writable: true,
|
217
|
+
value: function (str) {
|
218
|
+
if (/^(now|today)$/.test(str)) {
|
178
219
|
return true;
|
179
220
|
}
|
221
|
+
return this.matchDate(str);
|
180
222
|
}
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
var
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
case 1:
|
200
|
-
_c.sent();
|
201
|
-
|
202
|
-
dataPropsAsOptions = (_a = manager === null || manager === void 0 ? void 0 : manager.dataSchema) === null || _a === void 0 ? void 0 : _a.getDataPropsAsOptions();
|
203
|
-
|
204
|
-
if (dataPropsAsOptions) {
|
205
|
-
return [2
|
206
|
-
/*return*/
|
207
|
-
, dataPropsAsOptions.map(function (item) {
|
208
|
-
return __assign({
|
209
|
-
selectMode: 'tree'
|
210
|
-
}, item);
|
211
|
-
})];
|
212
|
-
}
|
213
|
-
|
214
|
-
return [2
|
215
|
-
/*return*/
|
216
|
-
, []];
|
223
|
+
});
|
224
|
+
// 日期类组件 & 是否存在快捷键判断
|
225
|
+
Object.defineProperty(FormulaControl.prototype, "hasDateShortcutkey", {
|
226
|
+
enumerable: false,
|
227
|
+
configurable: true,
|
228
|
+
writable: true,
|
229
|
+
value: function (str) {
|
230
|
+
var _a;
|
231
|
+
var DateTimeType = this.props.DateTimeType;
|
232
|
+
if (DateTimeType === FormulaDateType.IsDate) {
|
233
|
+
if (/^(now|today)$/.test(str)) {
|
234
|
+
return true;
|
235
|
+
}
|
236
|
+
return this.matchDate(str);
|
237
|
+
} else if (DateTimeType === FormulaDateType.IsRange) {
|
238
|
+
var start_end = (_a = str === null || str === void 0 ? void 0 : str.split) === null || _a === void 0 ? void 0 : _a.call(str, ',');
|
239
|
+
if (start_end && start_end.length === 2) {
|
240
|
+
return this.matchDateRange(start_end[0].trim()) && this.matchDateRange(start_end[1].trim());
|
217
241
|
}
|
218
|
-
});
|
219
|
-
});
|
220
|
-
};
|
221
|
-
|
222
|
-
FormulaControl.prototype.handleConfirm = function (value) {
|
223
|
-
var _a, _b;
|
224
|
-
|
225
|
-
(_b = (_a = this.props) === null || _a === void 0 ? void 0 : _a.onChange) === null || _b === void 0 ? void 0 : _b.call(_a, value);
|
226
|
-
}; // 剔除掉一些用不上的属性
|
227
|
-
|
228
|
-
|
229
|
-
FormulaControl.prototype.filterCustomRendererProps = function (rendererSchema) {
|
230
|
-
var _a;
|
231
|
-
|
232
|
-
var _b = this.props,
|
233
|
-
data = _b.data,
|
234
|
-
name = _b.name;
|
235
|
-
var curRendererSchema = null;
|
236
|
-
|
237
|
-
if (rendererSchema) {
|
238
|
-
curRendererSchema = Object.assign({}, rendererSchema, data, {
|
239
|
-
type: (_a = rendererSchema.type) !== null && _a !== void 0 ? _a : data.type
|
240
|
-
}); // 默认要剔除的字段
|
241
|
-
|
242
|
-
var deleteProps = ['label', 'id', '$$id', 'className', 'style', 'readOnly', 'horizontal', 'size', 'remark', 'labelRemark', 'hidden', 'hiddenOn', 'visible', 'visibleOn', 'disabled', 'disabledOn', 'required', 'requiredOn', 'className', 'labelClassName', 'labelAlign', 'inputClassName', 'description', 'autoUpdate', 'prefix', 'suffix', 'unitOptions', 'keyboard', 'kilobitSeparator', 'value']; // 当前组件要剔除的字段
|
243
|
-
|
244
|
-
if (this.props.needDeleteProps) {
|
245
|
-
deleteProps.push.apply(deleteProps, this.props.needDeleteProps);
|
246
|
-
}
|
247
|
-
|
248
|
-
if (name && name === 'min') {
|
249
|
-
// 避免min影响自身默认值设置
|
250
|
-
deleteProps.push('min');
|
251
242
|
}
|
252
|
-
|
253
|
-
if (
|
254
|
-
|
255
|
-
|
243
|
+
// 非日期类组件使用,也直接false
|
244
|
+
// if (DateTimeType === FormulaDateType.NotDate) {
|
245
|
+
// return false;
|
246
|
+
// }
|
247
|
+
return false;
|
248
|
+
}
|
249
|
+
});
|
250
|
+
Object.defineProperty(FormulaControl.prototype, "transExpr", {
|
251
|
+
enumerable: false,
|
252
|
+
configurable: true,
|
253
|
+
writable: true,
|
254
|
+
value: function (str) {
|
255
|
+
if (typeof str === 'string' && (str === null || str === void 0 ? void 0 : str.slice(0, 2)) === '${' && (str === null || str === void 0 ? void 0 : str.slice(-1)) === '}') {
|
256
|
+
// 非最外层内容还存在表达式情况
|
257
|
+
if (isExpression(str.slice(2, -1))) {
|
258
|
+
return str;
|
259
|
+
}
|
260
|
+
if (str.lastIndexOf('${') > str.indexOf('}') && str.indexOf('}') > -1) {
|
261
|
+
return str;
|
262
|
+
}
|
263
|
+
return str.slice(2, -1);
|
256
264
|
}
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
265
|
+
return str;
|
266
|
+
}
|
267
|
+
});
|
268
|
+
Object.defineProperty(FormulaControl.prototype, "handleConfirm", {
|
269
|
+
enumerable: false,
|
270
|
+
configurable: true,
|
271
|
+
writable: true,
|
272
|
+
value: function (value) {
|
273
|
+
var _a, _b;
|
274
|
+
var val = !value ? undefined : isExpression(value) || this.hasDateShortcutkey(value) ? value : "${".concat(value, "}");
|
275
|
+
(_b = (_a = this.props) === null || _a === void 0 ? void 0 : _a.onChange) === null || _b === void 0 ? void 0 : _b.call(_a, val);
|
276
|
+
}
|
277
|
+
});
|
278
|
+
// 剔除掉一些用不上的属性
|
279
|
+
Object.defineProperty(FormulaControl.prototype, "filterCustomRendererProps", {
|
280
|
+
enumerable: false,
|
281
|
+
configurable: true,
|
282
|
+
writable: true,
|
283
|
+
value: function (rendererSchema) {
|
284
|
+
var _a, _b, _c;
|
285
|
+
var _d = this.props,
|
286
|
+
data = _d.data,
|
287
|
+
name = _d.name,
|
288
|
+
placeholder = _d.placeholder;
|
289
|
+
var curRendererSchema = null;
|
290
|
+
if (rendererSchema) {
|
291
|
+
curRendererSchema = Object.assign({}, rendererSchema, data, {
|
292
|
+
type: (_a = rendererSchema.type) !== null && _a !== void 0 ? _a : data.type,
|
293
|
+
name: (_c = (_b = rendererSchema.name) !== null && _b !== void 0 ? _b : data.name) !== null && _c !== void 0 ? _c : 'value'
|
294
|
+
});
|
295
|
+
// 默认要剔除的字段
|
296
|
+
var deleteProps = ['label', 'id', '$$id', 'className', 'style', 'readOnly', 'horizontal', 'size', 'remark', 'labelRemark', 'hidden', 'hiddenOn', 'visible', 'visibleOn', 'disabled', 'disabledOn', 'required', 'requiredOn', 'className', 'labelClassName', 'labelAlign', 'inputClassName', 'description', 'autoUpdate', 'prefix', 'suffix', 'unitOptions', 'keyboard', 'kilobitSeparator', 'value'];
|
297
|
+
// 当前组件要剔除的字段
|
298
|
+
if (this.props.needDeleteProps) {
|
299
|
+
deleteProps.push.apply(deleteProps, this.props.needDeleteProps);
|
300
|
+
}
|
301
|
+
if (name && name === 'min') {
|
302
|
+
// 避免min影响自身默认值设置
|
303
|
+
deleteProps.push('min');
|
304
|
+
}
|
305
|
+
if (name && name === 'max') {
|
306
|
+
// 避免max影响自身默认值设置
|
307
|
+
deleteProps.push('max');
|
308
|
+
}
|
309
|
+
curRendererSchema = omit(curRendererSchema, deleteProps);
|
310
|
+
// 设置可清空
|
261
311
|
curRendererSchema.clearable = true;
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
312
|
+
// 设置统一的占位提示
|
313
|
+
if (curRendererSchema.type === 'select') {
|
314
|
+
!curRendererSchema.placeholder && (curRendererSchema.placeholder = i18n("8f7ae284d0039fe05b9f57fd5ae3ede9"));
|
315
|
+
curRendererSchema.inputClassName = 'ae-editor-FormulaControl-select-style';
|
316
|
+
} else if (placeholder) {
|
317
|
+
curRendererSchema.placeholder = placeholder;
|
318
|
+
} else {
|
319
|
+
curRendererSchema.placeholder = i18n("e0c7ac5eb397512fdbe71600baa09dab");
|
320
|
+
}
|
321
|
+
// 设置popOverContainer
|
322
|
+
curRendererSchema.popOverContainer = window.document.body;
|
323
|
+
}
|
324
|
+
return curRendererSchema;
|
274
325
|
}
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
326
|
+
});
|
327
|
+
Object.defineProperty(FormulaControl.prototype, "renderFormulaValue", {
|
328
|
+
enumerable: false,
|
329
|
+
configurable: true,
|
330
|
+
writable: true,
|
331
|
+
value: function (item) {
|
332
|
+
var html = {
|
333
|
+
__html: item.html
|
334
|
+
};
|
335
|
+
// bca-disable-next-line
|
336
|
+
return React__default.createElement("span", {
|
337
|
+
dangerouslySetInnerHTML: html
|
338
|
+
});
|
339
|
+
}
|
340
|
+
});
|
341
|
+
Object.defineProperty(FormulaControl.prototype, "getContextData", {
|
342
|
+
enumerable: false,
|
343
|
+
configurable: true,
|
344
|
+
writable: true,
|
345
|
+
value: function () {
|
346
|
+
var _a, _b, _c, _d;
|
347
|
+
// 当前数据域
|
348
|
+
return ((_c = (_b = (_a = this.props.data) === null || _a === void 0 ? void 0 : _a.__super) === null || _b === void 0 ? void 0 : _b.__props__) === null || _c === void 0 ? void 0 : _c.data) || ((_d = this.props.manager) === null || _d === void 0 ? void 0 : _d.amisStore) || {};
|
349
|
+
}
|
350
|
+
});
|
351
|
+
Object.defineProperty(FormulaControl.prototype, "render", {
|
352
|
+
enumerable: false,
|
353
|
+
configurable: true,
|
354
|
+
writable: true,
|
355
|
+
value: function () {
|
356
|
+
var _this = this;
|
357
|
+
var _a, _b;
|
358
|
+
var _c = this.props,
|
359
|
+
className = _c.className;
|
360
|
+
_c.label;
|
361
|
+
var value = _c.value,
|
305
362
|
header = _c.header;
|
306
363
|
_c.variables;
|
307
364
|
var placeholder = _c.placeholder,
|
308
365
|
simple = _c.simple,
|
309
|
-
evalMode = _c.evalMode,
|
310
366
|
rendererSchema = _c.rendererSchema,
|
311
367
|
rendererWrapper = _c.rendererWrapper,
|
312
368
|
manager = _c.manager,
|
313
369
|
_d = _c.useExternalFormData,
|
314
370
|
useExternalFormData = _d === void 0 ? false : _d,
|
315
371
|
render = _c.render,
|
316
|
-
rest = __rest(_c, ["className", "label", "value", "header", "variables", "placeholder", "simple", "
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
if (isExpr && (rendererSchema === null || rendererSchema === void 0 ? void 0 : rendererSchema.name)) {
|
327
|
-
isLoop = (rendererSchema === null || rendererSchema === void 0 ? void 0 : rendererSchema.name) ? this.isLoopExpression(value, rendererSchema === null || rendererSchema === void 0 ? void 0 : rendererSchema.name) : false;
|
328
|
-
} // 判断是否含有公式表达式
|
329
|
-
|
330
|
-
|
331
|
-
var isTypeError = !this.isExpectType(value);
|
332
|
-
var isError = isLoop || isTypeError;
|
333
|
-
var highlightValue = isExpression(value) ? FormulaEditor.highlightValue(value, this.state.variables, evalMode !== null && evalMode !== void 0 ? evalMode : this.state.evalMode) : value;
|
334
|
-
return React__default.createElement("div", {
|
335
|
-
className: cx('ae-editor-FormulaControl', isError ? 'is-has-tooltip' : '', className)
|
336
|
-
}, !simple && !rendererSchema && !isExpr && React__default.createElement(InputBox, {
|
337
|
-
className: "ae-editor-FormulaControl-input",
|
338
|
-
value: value,
|
339
|
-
clearable: true,
|
340
|
-
placeholder: placeholder,
|
341
|
-
onChange: this.handleSimpleInputChange
|
342
|
-
}), !simple && rendererSchema && !isExpr && React__default.createElement("div", {
|
343
|
-
className: cx('ae-editor-FormulaControl-custom-renderer', rendererWrapper ? 'border-wrapper' : '')
|
344
|
-
}, render('inner', this.filterCustomRendererProps(rendererSchema), {
|
345
|
-
inputOnly: true,
|
346
|
-
value: value,
|
347
|
-
data: useExternalFormData ? __assign({}, this.props.data) : {},
|
348
|
-
onChange: this.handleSimpleInputChange,
|
349
|
-
manager: manager
|
350
|
-
})), !simple && isExpr && React__default.createElement(ResultBox, {
|
351
|
-
className: cx('ae-editor-FormulaControl-ResultBox', isError ? 'is-error' : ''),
|
352
|
-
allowInput: false,
|
353
|
-
clearable: true,
|
354
|
-
value: value,
|
355
|
-
result: highlightValue,
|
356
|
-
itemRender: this.renderFormulaValue,
|
357
|
-
onChange: this.handleInputChange,
|
358
|
-
onResultChange: function () {
|
359
|
-
_this.handleInputChange(undefined);
|
372
|
+
rest = __rest(_c, ["className", "label", "value", "header", "variables", "placeholder", "simple", "rendererSchema", "rendererWrapper", "manager", "useExternalFormData", "render"]);
|
373
|
+
// 自身字段
|
374
|
+
var selfName = (_b = (_a = this.props) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.name;
|
375
|
+
// 判断是否含有公式表达式
|
376
|
+
var isExpr = isExpression(value);
|
377
|
+
// 判断当前是否有循环引用,备注:非精准识别,待优化
|
378
|
+
var isLoop = false;
|
379
|
+
if (isExpr && (rendererSchema === null || rendererSchema === void 0 ? void 0 : rendererSchema.name)) {
|
380
|
+
isLoop = (rendererSchema === null || rendererSchema === void 0 ? void 0 : rendererSchema.name) ? this.isLoopExpression(value, rendererSchema === null || rendererSchema === void 0 ? void 0 : rendererSchema.name) : false;
|
360
381
|
}
|
361
|
-
|
362
|
-
|
363
|
-
|
382
|
+
// 判断是否含有公式表达式
|
383
|
+
var isTypeError = !this.isExpectType(value);
|
384
|
+
var exprValue = this.transExpr(value);
|
385
|
+
var isError = isLoop || isTypeError;
|
386
|
+
var highlightValue = isExpression(value) ? FormulaEditor.highlightValue(exprValue, this.state.variables) || {
|
387
|
+
html: exprValue
|
388
|
+
} : value;
|
389
|
+
// 公式表达式弹窗内容过滤
|
390
|
+
var filterValue = isExpression(value) ? exprValue : this.hasDateShortcutkey(value) ? value : undefined;
|
391
|
+
// 值 是表达式或日期快捷
|
392
|
+
var isFx = !simple && (isExpr || this.hasDateShortcutkey(value));
|
393
|
+
return React__default.createElement("div", {
|
394
|
+
className: cx('ae-editor-FormulaControl', isError ? 'is-has-tooltip' : '', className)
|
395
|
+
}, !simple && !isExpr && !this.hasDateShortcutkey(value) && !rendererSchema && React__default.createElement(InputBox, {
|
396
|
+
className: "ae-editor-FormulaControl-input",
|
397
|
+
value: this.inReplaceExpression(value),
|
398
|
+
clearable: true,
|
399
|
+
placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : i18n("e0c7ac5eb397512fdbe71600baa09dab"),
|
400
|
+
onChange: this.handleSimpleInputChange
|
401
|
+
}), !simple && !isExpr && !this.hasDateShortcutkey(value) && rendererSchema && React__default.createElement("div", {
|
402
|
+
className: cx('ae-editor-FormulaControl-custom-renderer', rendererWrapper ? 'border-wrapper' : '')
|
403
|
+
}, render('inner', this.filterCustomRendererProps(rendererSchema), {
|
404
|
+
inputOnly: true,
|
405
|
+
value: this.inReplaceExpression(value),
|
406
|
+
data: useExternalFormData ? __assign({}, this.props.data) : {},
|
407
|
+
onChange: this.handleSimpleInputChange,
|
408
|
+
manager: manager
|
409
|
+
})), isFx && React__default.createElement(TooltipWrapper, {
|
410
|
+
trigger: "hover",
|
411
|
+
placement: "top",
|
412
|
+
style: {
|
413
|
+
fontSize: '12px'
|
414
|
+
},
|
415
|
+
tooltip: {
|
416
|
+
tooltipTheme: 'dark',
|
417
|
+
mouseLeaveDelay: 20,
|
418
|
+
content: exprValue,
|
419
|
+
children: function () {
|
420
|
+
return _this.renderFormulaValue(highlightValue);
|
421
|
+
}
|
422
|
+
}
|
423
|
+
}, React__default.createElement("div", {
|
424
|
+
className: "ae-editor-FormulaControl-tooltipBox"
|
425
|
+
}, React__default.createElement(ResultBox, {
|
426
|
+
className: cx('ae-editor-FormulaControl-ResultBox', isError ? 'is-error' : ''),
|
427
|
+
allowInput: false,
|
428
|
+
clearable: true,
|
429
|
+
value: value,
|
430
|
+
result: {
|
431
|
+
html: this.hasDateShortcutkey(value) ? i18n("48942ef507ea38d8ead03f8bfdffae5a") : i18n("0d9d899edb456e8806a99850e9c38212")
|
432
|
+
},
|
433
|
+
itemRender: this.renderFormulaValue,
|
434
|
+
onChange: this.handleInputChange,
|
435
|
+
onResultChange: function () {
|
436
|
+
_this.handleInputChange(undefined);
|
437
|
+
}
|
438
|
+
}))), React__default.createElement(PickerContainer, {
|
439
|
+
showTitle: false,
|
440
|
+
bodyRender: function (_a) {
|
441
|
+
var _b;
|
442
|
+
_a.value;
|
443
|
+
var onChange = _a.onChange;
|
444
|
+
return React__default.createElement(FormulaEditor, __assign({}, rest, {
|
445
|
+
evalMode: true,
|
446
|
+
variableMode: (_b = rest.variableMode) !== null && _b !== void 0 ? _b : _this.state.variableMode,
|
447
|
+
variables: _this.state.variables,
|
448
|
+
header: header || i18n("a9400c408441f1f7f6d6954deb05ae9a"),
|
449
|
+
value: filterValue,
|
450
|
+
onChange: onChange,
|
451
|
+
selfVariableName: selfName
|
452
|
+
}));
|
453
|
+
},
|
454
|
+
value: value,
|
455
|
+
onConfirm: this.handleConfirm,
|
456
|
+
size: "md"
|
457
|
+
}, function (_a) {
|
364
458
|
var _b;
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
459
|
+
var onClick = _a.onClick;
|
460
|
+
return React__default.createElement(Button, {
|
461
|
+
className: "ae-editor-FormulaControl-button",
|
462
|
+
size: "sm",
|
463
|
+
tooltip: {
|
464
|
+
enterable: false,
|
465
|
+
content: i18n("303efd5ba79e639001b4328cd266dddc"),
|
466
|
+
placement: 'left',
|
467
|
+
mouseLeaveDelay: 0
|
468
|
+
},
|
469
|
+
onClick: onClick
|
470
|
+
}, React__default.createElement(Icon, {
|
471
|
+
icon: "function",
|
472
|
+
className: cx('ae-editor-FormulaControl-icon', 'icon', (_b = {}, _b['is-filled'] = !!isFx, _b))
|
376
473
|
}));
|
377
|
-
},
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
className: "desc-msg info-msg",
|
396
|
-
title: value
|
397
|
-
}, value), isError && React__default.createElement("div", {
|
398
|
-
className: "desc-msg error-msg"
|
399
|
-
}, isLoop ? i18n("7d92f998d24da41b58db140b1864f773") : i18n("b5cc1cd60cd694f45142dc52a5bf53fc")));
|
400
|
-
};
|
401
|
-
|
402
|
-
FormulaControl.defaultProps = {
|
403
|
-
simple: false
|
404
|
-
};
|
405
|
-
|
406
|
-
__decorate([autobind, __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", Object)], FormulaControl.prototype, "replaceExpression", null);
|
407
|
-
|
474
|
+
}), isError && React__default.createElement("div", {
|
475
|
+
className: "desc-msg error-msg"
|
476
|
+
}, isLoop ? i18n("7d92f998d24da41b58db140b1864f773") : i18n("b5cc1cd60cd694f45142dc52a5bf53fc")));
|
477
|
+
}
|
478
|
+
});
|
479
|
+
Object.defineProperty(FormulaControl, "defaultProps", {
|
480
|
+
enumerable: true,
|
481
|
+
configurable: true,
|
482
|
+
writable: true,
|
483
|
+
value: {
|
484
|
+
simple: false,
|
485
|
+
rendererWrapper: false,
|
486
|
+
DateTimeType: FormulaDateType.NotDate,
|
487
|
+
requiredDataPropsVariables: false
|
488
|
+
}
|
489
|
+
});
|
490
|
+
__decorate([autobind, __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", Object)], FormulaControl.prototype, "outReplaceExpression", null);
|
491
|
+
__decorate([autobind, __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", Object)], FormulaControl.prototype, "inReplaceExpression", null);
|
408
492
|
__decorate([autobind, __metadata("design:type", Function), __metadata("design:paramtypes", [Object, String]), __metadata("design:returntype", Boolean)], FormulaControl.prototype, "isLoopExpression", null);
|
409
|
-
|
410
493
|
__decorate([autobind, __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", Boolean)], FormulaControl.prototype, "isExpectType", null);
|
411
|
-
|
494
|
+
__decorate([autobind, __metadata("design:type", Function), __metadata("design:paramtypes", [String]), __metadata("design:returntype", Boolean)], FormulaControl.prototype, "hasDateShortcutkey", null);
|
495
|
+
__decorate([autobind, __metadata("design:type", Function), __metadata("design:paramtypes", [String]), __metadata("design:returntype", void 0)], FormulaControl.prototype, "transExpr", null);
|
412
496
|
__decorate([autobind, __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", void 0)], FormulaControl.prototype, "handleConfirm", null);
|
413
|
-
|
414
497
|
__decorate([autobind, __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", void 0)], FormulaControl.prototype, "filterCustomRendererProps", null);
|
415
|
-
|
416
498
|
__decorate([autobind, __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", void 0)], FormulaControl.prototype, "renderFormulaValue", null);
|
417
|
-
|
418
499
|
__decorate([autobind, __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", void 0)], FormulaControl.prototype, "getContextData", null);
|
419
|
-
|
420
500
|
return FormulaControl;
|
421
501
|
}(React__default.Component);
|
422
|
-
|
423
|
-
/** @class */
|
424
|
-
(function (_super) {
|
502
|
+
/** @class */(function (_super) {
|
425
503
|
__extends(FormulaControlRenderer, _super);
|
426
|
-
|
427
504
|
function FormulaControlRenderer() {
|
428
505
|
return _super !== null && _super.apply(this, arguments) || this;
|
429
506
|
}
|
430
|
-
|
431
507
|
FormulaControlRenderer = __decorate([FormItem({
|
432
508
|
type: 'ae-formulaControl'
|
433
509
|
})], FormulaControlRenderer);
|
434
510
|
return FormulaControlRenderer;
|
435
511
|
})(FormulaControl);
|
436
512
|
|
437
|
-
export { FormulaControl as default };
|
513
|
+
export { FormulaDateType, FormulaControl as default };
|