amis-editor 5.2.3-beta.16 → 5.2.3
Sign up to get free protection for your applications and to get access to all the features.
- package/esm/component/BaseControl.js +1 -1
- package/esm/component/InputComponentName.js +1 -1
- package/esm/component/TableViewEditor.js +1 -1
- package/esm/icons/btn/btn-group.svg.js +1 -1
- package/esm/icons/btn/btn-select.svg.js +1 -1
- package/esm/icons/btn/btn-toolbar.svg.js +1 -1
- package/esm/icons/btn/button.svg.js +1 -1
- package/esm/icons/btn/dropdown-btn.svg.js +1 -1
- package/esm/icons/container/anchor-nav.svg.js +1 -1
- package/esm/icons/container/collapse.svg.js +1 -1
- package/esm/icons/container/container.svg.js +1 -1
- package/esm/icons/container/flex-container.svg.js +1 -1
- package/esm/icons/container/form-group.svg.js +1 -1
- package/esm/icons/container/grid.svg.js +1 -1
- package/esm/icons/container/iframe.svg.js +1 -1
- package/esm/icons/container/panel.svg.js +1 -1
- package/esm/icons/container/table-view.svg.js +1 -1
- package/esm/icons/container/tabs.svg.js +1 -1
- package/esm/icons/container/tooltip-wrapper.svg.js +1 -1
- package/esm/icons/container/web-component.svg.js +1 -1
- package/esm/icons/feat/audio.svg.js +1 -1
- package/esm/icons/feat/custom.svg.js +1 -1
- package/esm/icons/feat/each.svg.js +1 -1
- package/esm/icons/feat/form.svg.js +1 -1
- package/esm/icons/feat/nav.svg.js +1 -1
- package/esm/icons/feat/qrcode.svg.js +1 -1
- package/esm/icons/feat/service.svg.js +1 -1
- package/esm/icons/feat/table.svg.js +1 -1
- package/esm/icons/feat/tasks.svg.js +1 -1
- package/esm/icons/feat/video.svg.js +1 -1
- package/esm/icons/feat/wizard.svg.js +1 -1
- package/esm/icons/form/chained-select.svg.js +1 -1
- package/esm/icons/form/checkbox.svg.js +1 -1
- package/esm/icons/form/checkboxes.svg.js +1 -1
- package/esm/icons/form/combo.svg.js +1 -1
- package/esm/icons/form/condition-builder.svg.js +1 -1
- package/esm/icons/form/diff-editor.svg.js +1 -1
- package/esm/icons/form/editor.svg.js +1 -1
- package/esm/icons/form/formula.svg.js +1 -1
- package/esm/icons/form/hidden.svg.js +1 -1
- package/esm/icons/form/input-city.svg.js +1 -1
- package/esm/icons/form/input-color.svg.js +1 -1
- package/esm/icons/form/input-date-range.svg.js +1 -1
- package/esm/icons/form/input-date.svg.js +1 -1
- package/esm/icons/form/input-datetime.svg.js +1 -1
- package/esm/icons/form/input-email.svg.js +1 -1
- package/esm/icons/form/input-excel.svg.js +1 -1
- package/esm/icons/form/input-file.svg.js +1 -1
- package/esm/icons/form/input-group.svg.js +1 -1
- package/esm/icons/form/input-image.svg.js +1 -1
- package/esm/icons/form/input-kv.svg.js +1 -1
- package/esm/icons/form/input-month-range.svg.js +1 -1
- package/esm/icons/form/input-number.svg.js +1 -1
- package/esm/icons/form/input-password.svg.js +1 -1
- package/esm/icons/form/input-quarter-range.svg.js +1 -1
- package/esm/icons/form/input-range.svg.js +1 -1
- package/esm/icons/form/input-rating.svg.js +1 -1
- package/esm/icons/form/input-repeat.svg.js +1 -1
- package/esm/icons/form/input-rich-text.svg.js +1 -1
- package/esm/icons/form/input-tag.svg.js +1 -1
- package/esm/icons/form/input-text.svg.js +1 -1
- package/esm/icons/form/input-time-range.svg.js +1 -1
- package/esm/icons/form/input-time.svg.js +1 -1
- package/esm/icons/form/input-tree.svg.js +1 -1
- package/esm/icons/form/input-url.svg.js +1 -1
- package/esm/icons/form/input-year.svg.js +1 -1
- package/esm/icons/form/inputArray.svg.js +1 -1
- package/esm/icons/form/list-select.svg.js +1 -1
- package/esm/icons/form/location-picker.svg.js +1 -1
- package/esm/icons/form/matrix-checkboxes.svg.js +1 -1
- package/esm/icons/form/month.svg.js +1 -1
- package/esm/icons/form/nested-select.svg.js +1 -1
- package/esm/icons/form/picker.svg.js +1 -1
- package/esm/icons/form/quarter.svg.js +1 -1
- package/esm/icons/form/radios.svg.js +1 -1
- package/esm/icons/form/select.svg.js +1 -1
- package/esm/icons/form/static.svg.js +1 -1
- package/esm/icons/form/sub-form.svg.js +1 -1
- package/esm/icons/form/switch.svg.js +1 -1
- package/esm/icons/form/tabs-transfer.svg.js +1 -1
- package/esm/icons/form/textarea.svg.js +1 -1
- package/esm/icons/form/transfer.svg.js +1 -1
- package/esm/icons/form/tree-select.svg.js +1 -1
- package/esm/icons/form/uuid.svg.js +1 -1
- package/esm/icons/index.js +1 -1
- package/esm/icons/layout/layout-1with2.svg.js +1 -1
- package/esm/icons/layout/layout-2cols.svg.js +1 -1
- package/esm/icons/layout/layout-2row.svg.js +1 -1
- package/esm/icons/layout/layout-2with1.svg.js +1 -1
- package/esm/icons/layout/layout-3cols.svg.js +1 -1
- package/esm/icons/layout/layout-3row.svg.js +1 -1
- package/esm/icons/layout/layout-absolute.svg.js +1 -1
- package/esm/icons/layout/layout-fixed.svg.js +1 -1
- package/esm/icons/layout/layout-full.svg.js +1 -1
- package/esm/icons/layout/layout1-2.svg.js +1 -1
- package/esm/icons/layout/layout2-1.svg.js +1 -1
- package/esm/icons/layout/layout3-1.svg.js +1 -1
- package/esm/icons/layout/layout3-2.svg.js +1 -1
- package/esm/icons/other/divider.svg.js +1 -1
- package/esm/icons/other/property-sheet.svg.js +1 -1
- package/esm/icons/other/tooltip.svg.js +1 -1
- package/esm/icons/show/URL.svg.js +1 -1
- package/esm/icons/show/avatar.svg.js +1 -1
- package/esm/icons/show/breadcrumb.svg.js +1 -1
- package/esm/icons/show/card.svg.js +1 -1
- package/esm/icons/show/cards.svg.js +1 -1
- package/esm/icons/show/carousel.svg.js +1 -1
- package/esm/icons/show/chart.svg.js +1 -1
- package/esm/icons/show/code.svg.js +1 -1
- package/esm/icons/show/date.svg.js +1 -1
- package/esm/icons/show/datetime.svg.js +1 -1
- package/esm/icons/show/image.svg.js +1 -1
- package/esm/icons/show/images.svg.js +1 -1
- package/esm/icons/show/json-view.svg.js +1 -1
- package/esm/icons/show/list.svg.js +1 -1
- package/esm/icons/show/log.svg.js +1 -1
- package/esm/icons/show/mapping.svg.js +1 -1
- package/esm/icons/show/markdown.svg.js +1 -1
- package/esm/icons/show/plain.svg.js +1 -1
- package/esm/icons/show/progress.svg.js +1 -1
- package/esm/icons/show/sparkline.svg.js +1 -1
- package/esm/icons/show/status.svg.js +1 -1
- package/esm/icons/show/steps.svg.js +1 -1
- package/esm/icons/show/time.svg.js +1 -1
- package/esm/index.d.ts +11 -0
- package/esm/index.js +12 -1
- package/esm/locale/en-US.js +11 -2
- package/esm/locale/zh-CN.js +11 -2
- package/esm/plugin/Alert.js +1 -1
- package/esm/plugin/AnchorNav.js +1 -1
- package/esm/plugin/Audio.js +1 -1
- package/esm/plugin/Avatar.js +1 -1
- package/esm/plugin/Breadcrumb.js +1 -1
- package/esm/plugin/Button.js +44 -13
- package/esm/plugin/ButtonGroup.js +1 -1
- package/esm/plugin/CRUD.js +1 -1
- package/esm/plugin/CRUD2.js +1 -1
- package/esm/plugin/Card.js +1 -1
- package/esm/plugin/Card2.js +1 -1
- package/esm/plugin/Cards.js +1 -1
- package/esm/plugin/Carousel.js +1 -1
- package/esm/plugin/Chart.js +1 -1
- package/esm/plugin/CodeView.js +1 -1
- package/esm/plugin/Collapse.js +15 -2
- package/esm/plugin/CollapseGroup.js +1 -1
- package/esm/plugin/ColumnToggler.js +1 -1
- package/esm/plugin/Container.js +1 -1
- package/esm/plugin/Custom.js +1 -1
- package/esm/plugin/CustomRegion.js +1 -1
- package/esm/plugin/Date.d.ts +1 -0
- package/esm/plugin/Date.js +32 -33
- package/esm/plugin/Datetime.d.ts +1 -0
- package/esm/plugin/Datetime.js +32 -33
- package/esm/plugin/Dialog.js +1 -1
- package/esm/plugin/Divider.js +1 -1
- package/esm/plugin/Drawer.js +1 -1
- package/esm/plugin/DropDownButton.js +1 -1
- package/esm/plugin/Each.js +1 -1
- package/esm/plugin/Flex.js +1 -1
- package/esm/plugin/Form/ButtonGroupSelect.js +1 -1
- package/esm/plugin/Form/ButtonToolbar.js +1 -1
- package/esm/plugin/Form/ChainedSelect.js +1 -1
- package/esm/plugin/Form/Checkbox.js +1 -1
- package/esm/plugin/Form/Checkboxes.js +1 -1
- package/esm/plugin/Form/CodeEditor.js +1 -1
- package/esm/plugin/Form/Combo.d.ts +14 -6
- package/esm/plugin/Form/Combo.js +352 -373
- package/esm/plugin/Form/ConditionBuilder.js +1 -1
- package/esm/plugin/Form/Control.js +1 -1
- package/esm/plugin/Form/DiffEditor.js +1 -1
- package/esm/plugin/Form/FieldSet.js +1 -1
- package/esm/plugin/Form/Form.js +1 -1
- package/esm/plugin/Form/Formula.d.ts +1 -0
- package/esm/plugin/Form/Formula.js +7 -1
- package/esm/plugin/Form/Group.js +1 -1
- package/esm/plugin/Form/Hidden.js +1 -1
- package/esm/plugin/Form/InputArray.js +1 -1
- package/esm/plugin/Form/InputCity.d.ts +3 -0
- package/esm/plugin/Form/InputCity.js +40 -10
- package/esm/plugin/Form/InputColor.js +1 -1
- package/esm/plugin/Form/InputDate.js +2 -2
- package/esm/plugin/Form/InputDateRange.js +2 -2
- package/esm/plugin/Form/InputDateTime.js +1 -1
- package/esm/plugin/Form/InputDateTimeRange.js +1 -1
- package/esm/plugin/Form/InputEmail.js +1 -1
- package/esm/plugin/Form/InputExcel.js +1 -1
- package/esm/plugin/Form/InputFile.js +1 -1
- package/esm/plugin/Form/InputGroup.d.ts +12 -2
- package/esm/plugin/Form/InputGroup.js +56 -42
- package/esm/plugin/Form/InputImage.js +1 -1
- package/esm/plugin/Form/InputKV.js +1 -1
- package/esm/plugin/Form/InputMonth.js +1 -1
- package/esm/plugin/Form/InputMonthRange.js +1 -1
- package/esm/plugin/Form/InputNumber.js +33 -3
- package/esm/plugin/Form/InputPassword.js +1 -1
- package/esm/plugin/Form/InputQuarter.js +1 -1
- package/esm/plugin/Form/InputQuarterRange.js +1 -1
- package/esm/plugin/Form/InputRange.js +1 -1
- package/esm/plugin/Form/InputRating.js +23 -2
- package/esm/plugin/Form/InputRepeat.js +1 -1
- package/esm/plugin/Form/InputRichText.js +1 -1
- package/esm/plugin/Form/InputSubForm.js +1 -1
- package/esm/plugin/Form/InputTable.js +1 -1
- package/esm/plugin/Form/InputTag.js +1 -1
- package/esm/plugin/Form/InputText.js +61 -10
- package/esm/plugin/Form/InputTime.js +1 -1
- package/esm/plugin/Form/InputTimeRange.js +1 -1
- package/esm/plugin/Form/InputTree.d.ts +1 -0
- package/esm/plugin/Form/InputTree.js +49 -7
- package/esm/plugin/Form/InputURL.js +1 -1
- package/esm/plugin/Form/InputYear.js +1 -1
- package/esm/plugin/Form/InputYearRange.js +1 -1
- package/esm/plugin/Form/Item.js +1 -1
- package/esm/plugin/Form/ListSelect.js +1 -1
- package/esm/plugin/Form/LocationPicker.js +1 -1
- package/esm/plugin/Form/MatrixCheckboxes.js +1 -1
- package/esm/plugin/Form/NestedSelect.js +1 -1
- package/esm/plugin/Form/Picker.js +1 -1
- package/esm/plugin/Form/Radios.js +1 -1
- package/esm/plugin/Form/Select.js +1 -1
- package/esm/plugin/Form/Static.d.ts +1 -0
- package/esm/plugin/Form/Static.js +232 -203
- package/esm/plugin/Form/Switch.js +2 -2
- package/esm/plugin/Form/TabsTransfer.js +1 -1
- package/esm/plugin/Form/Textarea.js +1 -1
- package/esm/plugin/Form/Transfer.js +1 -1
- package/esm/plugin/Form/TreeSelect.d.ts +1 -0
- package/esm/plugin/Form/TreeSelect.js +71 -36
- package/esm/plugin/Form/UUID.js +1 -1
- package/esm/plugin/Grid.js +1 -1
- package/esm/plugin/HBox.js +1 -1
- package/esm/plugin/IFrame.js +1 -1
- package/esm/plugin/Image.d.ts +2 -1
- package/esm/plugin/Image.js +131 -100
- package/esm/plugin/Images.d.ts +2 -1
- package/esm/plugin/Images.js +129 -115
- package/esm/plugin/Json.d.ts +1 -0
- package/esm/plugin/Json.js +23 -23
- package/esm/plugin/Layout/FlexPluginBase.js +1 -1
- package/esm/plugin/Layout/Layout1_2_v4.js +1 -1
- package/esm/plugin/Layout/Layout_fixed.js +1 -1
- package/esm/plugin/Layout/Layout_free_container.js +1 -1
- package/esm/plugin/Layout/Layout_sorption_container.js +1 -1
- package/esm/plugin/Link.js +1 -1
- package/esm/plugin/List.d.ts +3 -0
- package/esm/plugin/List.js +145 -48
- package/esm/plugin/ListItem.js +1 -1
- package/esm/plugin/Log.d.ts +2 -0
- package/esm/plugin/Log.js +85 -15
- package/esm/plugin/Mapping.d.ts +15 -3
- package/esm/plugin/Mapping.js +158 -81
- package/esm/plugin/Markdown.js +1 -1
- package/esm/plugin/Nav.js +1 -1
- package/esm/plugin/Operation.js +1 -1
- package/esm/plugin/Others/Action.js +1 -1
- package/esm/plugin/Others/TableCell.js +2 -2
- package/esm/plugin/Page.js +2 -2
- package/esm/plugin/Pagination.js +1 -1
- package/esm/plugin/Panel.js +1 -1
- package/esm/plugin/Plain.d.ts +2 -4
- package/esm/plugin/Plain.js +34 -85
- package/esm/plugin/Progress.js +1 -1
- package/esm/plugin/Property.js +1 -1
- package/esm/plugin/QRCode.js +1 -1
- package/esm/plugin/Reset.js +1 -1
- package/esm/plugin/Service.js +1 -1
- package/esm/plugin/Sparkline.js +1 -1
- package/esm/plugin/Status.js +1 -1
- package/esm/plugin/Steps.js +1 -1
- package/esm/plugin/Submit.js +1 -1
- package/esm/plugin/Table.d.ts +3 -0
- package/esm/plugin/Table.js +237 -127
- package/esm/plugin/Table2.js +1 -1
- package/esm/plugin/TableCell2.js +1 -1
- package/esm/plugin/TableView.js +1 -1
- package/esm/plugin/Tabs.js +1 -1
- package/esm/plugin/Tag.d.ts +24 -0
- package/esm/plugin/Tag.js +234 -0
- package/esm/plugin/Tasks.js +1 -1
- package/esm/plugin/Time.d.ts +1 -0
- package/esm/plugin/Time.js +34 -35
- package/esm/plugin/Timeline.js +1 -1
- package/esm/plugin/TooltipWrapper.js +1 -1
- package/esm/plugin/Tpl.js +1 -1
- package/esm/plugin/Video.js +1 -1
- package/esm/plugin/WebComponent.js +1 -1
- package/esm/plugin/Wizard.js +1 -1
- package/esm/plugin/Wrapper.js +1 -1
- package/esm/renderer/APIControl.js +3 -2
- package/esm/renderer/BadgeControl.js +1 -1
- package/esm/renderer/DataBindingControl.js +1 -1
- package/esm/renderer/DataMappingControl.js +1 -1
- package/esm/renderer/DataPickerControl.js +1 -1
- package/esm/renderer/DateShortCutControl.js +1 -1
- package/esm/renderer/ExpressionFormulaControl.js +1 -1
- package/esm/renderer/FeatureControl.js +1 -1
- package/esm/renderer/FormulaControl.js +2 -2
- package/esm/renderer/GoConfigControl.js +1 -1
- package/esm/renderer/MapSourceControl.d.ts +1658 -0
- package/esm/renderer/MapSourceControl.js +428 -0
- package/esm/renderer/OptionControl.js +1 -1
- package/esm/renderer/RangePartsControl.js +1 -1
- package/esm/renderer/StatusControl.js +1 -1
- package/esm/renderer/SwitchMoreControl.js +1 -1
- package/esm/renderer/TimelineItemControl.js +1 -1
- package/esm/renderer/TransferTableControl.js +1 -1
- package/esm/renderer/TreeOptionControl.js +1 -1
- package/esm/renderer/ValidationControl.js +1 -1
- package/esm/renderer/ValidationItem.js +1 -1
- package/esm/renderer/event-control/action-config-dialog.js +1 -1
- package/esm/renderer/event-control/action-config-panel.js +1 -1
- package/esm/renderer/event-control/comp-action-select.js +1 -1
- package/esm/renderer/event-control/helper.js +20 -9
- package/esm/renderer/event-control/index.js +1 -1
- package/esm/renderer/style-control/Background.js +1 -1
- package/esm/renderer/style-control/Border.js +1 -1
- package/esm/renderer/style-control/BoxModel.js +1 -1
- package/esm/renderer/style-control/BoxShadow.js +1 -1
- package/esm/renderer/style-control/Display.js +1 -1
- package/esm/renderer/style-control/Font.js +1 -1
- package/esm/renderer/style-control/InsetBoxModel.js +1 -1
- package/esm/renderer/style-control/ThemeClassName.d.ts +8 -0
- package/esm/renderer/style-control/ThemeClassName.js +228 -0
- package/esm/renderer/style-control/font-family.js +1 -1
- package/esm/renderer/style-control/transformation.js +1 -1
- package/esm/renderer/textarea-formula/FormulaPicker.js +1 -1
- package/esm/renderer/textarea-formula/TextareaFormulaControl.js +1 -1
- package/esm/renderer/textarea-formula/plugin.js +1 -1
- package/esm/renderer/textarea-formula/utils.js +1 -1
- package/esm/tpl/api.js +1 -1
- package/esm/tpl/common.js +17 -67
- package/esm/tpl/horizontal.js +1 -1
- package/esm/tpl/layout.js +1 -1
- package/esm/tpl/options.js +10 -1
- package/esm/tpl/style.js +188 -1
- package/esm/tpl/validations.js +1 -1
- package/esm/util.js +1 -1
- package/esm/validator.js +1 -1
- package/lib/component/BaseControl.js +1 -1
- package/lib/component/InputComponentName.js +1 -1
- package/lib/component/TableViewEditor.js +1 -1
- package/lib/icons/btn/btn-group.svg.js +1 -1
- package/lib/icons/btn/btn-select.svg.js +1 -1
- package/lib/icons/btn/btn-toolbar.svg.js +1 -1
- package/lib/icons/btn/button.svg.js +1 -1
- package/lib/icons/btn/dropdown-btn.svg.js +1 -1
- package/lib/icons/container/anchor-nav.svg.js +1 -1
- package/lib/icons/container/collapse.svg.js +1 -1
- package/lib/icons/container/container.svg.js +1 -1
- package/lib/icons/container/flex-container.svg.js +1 -1
- package/lib/icons/container/form-group.svg.js +1 -1
- package/lib/icons/container/grid.svg.js +1 -1
- package/lib/icons/container/iframe.svg.js +1 -1
- package/lib/icons/container/panel.svg.js +1 -1
- package/lib/icons/container/table-view.svg.js +1 -1
- package/lib/icons/container/tabs.svg.js +1 -1
- package/lib/icons/container/tooltip-wrapper.svg.js +1 -1
- package/lib/icons/container/web-component.svg.js +1 -1
- package/lib/icons/feat/audio.svg.js +1 -1
- package/lib/icons/feat/custom.svg.js +1 -1
- package/lib/icons/feat/each.svg.js +1 -1
- package/lib/icons/feat/form.svg.js +1 -1
- package/lib/icons/feat/nav.svg.js +1 -1
- package/lib/icons/feat/qrcode.svg.js +1 -1
- package/lib/icons/feat/service.svg.js +1 -1
- package/lib/icons/feat/table.svg.js +1 -1
- package/lib/icons/feat/tasks.svg.js +1 -1
- package/lib/icons/feat/video.svg.js +1 -1
- package/lib/icons/feat/wizard.svg.js +1 -1
- package/lib/icons/form/chained-select.svg.js +1 -1
- package/lib/icons/form/checkbox.svg.js +1 -1
- package/lib/icons/form/checkboxes.svg.js +1 -1
- package/lib/icons/form/combo.svg.js +1 -1
- package/lib/icons/form/condition-builder.svg.js +1 -1
- package/lib/icons/form/diff-editor.svg.js +1 -1
- package/lib/icons/form/editor.svg.js +1 -1
- package/lib/icons/form/formula.svg.js +1 -1
- package/lib/icons/form/hidden.svg.js +1 -1
- package/lib/icons/form/input-city.svg.js +1 -1
- package/lib/icons/form/input-color.svg.js +1 -1
- package/lib/icons/form/input-date-range.svg.js +1 -1
- package/lib/icons/form/input-date.svg.js +1 -1
- package/lib/icons/form/input-datetime.svg.js +1 -1
- package/lib/icons/form/input-email.svg.js +1 -1
- package/lib/icons/form/input-excel.svg.js +1 -1
- package/lib/icons/form/input-file.svg.js +1 -1
- package/lib/icons/form/input-group.svg.js +1 -1
- package/lib/icons/form/input-image.svg.js +1 -1
- package/lib/icons/form/input-kv.svg.js +1 -1
- package/lib/icons/form/input-month-range.svg.js +1 -1
- package/lib/icons/form/input-number.svg.js +1 -1
- package/lib/icons/form/input-password.svg.js +1 -1
- package/lib/icons/form/input-quarter-range.svg.js +1 -1
- package/lib/icons/form/input-range.svg.js +1 -1
- package/lib/icons/form/input-rating.svg.js +1 -1
- package/lib/icons/form/input-repeat.svg.js +1 -1
- package/lib/icons/form/input-rich-text.svg.js +1 -1
- package/lib/icons/form/input-tag.svg.js +1 -1
- package/lib/icons/form/input-text.svg.js +1 -1
- package/lib/icons/form/input-time-range.svg.js +1 -1
- package/lib/icons/form/input-time.svg.js +1 -1
- package/lib/icons/form/input-tree.svg.js +1 -1
- package/lib/icons/form/input-url.svg.js +1 -1
- package/lib/icons/form/input-year.svg.js +1 -1
- package/lib/icons/form/inputArray.svg.js +1 -1
- package/lib/icons/form/list-select.svg.js +1 -1
- package/lib/icons/form/location-picker.svg.js +1 -1
- package/lib/icons/form/matrix-checkboxes.svg.js +1 -1
- package/lib/icons/form/month.svg.js +1 -1
- package/lib/icons/form/nested-select.svg.js +1 -1
- package/lib/icons/form/picker.svg.js +1 -1
- package/lib/icons/form/quarter.svg.js +1 -1
- package/lib/icons/form/radios.svg.js +1 -1
- package/lib/icons/form/select.svg.js +1 -1
- package/lib/icons/form/static.svg.js +1 -1
- package/lib/icons/form/sub-form.svg.js +1 -1
- package/lib/icons/form/switch.svg.js +1 -1
- package/lib/icons/form/tabs-transfer.svg.js +1 -1
- package/lib/icons/form/textarea.svg.js +1 -1
- package/lib/icons/form/transfer.svg.js +1 -1
- package/lib/icons/form/tree-select.svg.js +1 -1
- package/lib/icons/form/uuid.svg.js +1 -1
- package/lib/icons/index.js +1 -1
- package/lib/icons/layout/layout-1with2.svg.js +1 -1
- package/lib/icons/layout/layout-2cols.svg.js +1 -1
- package/lib/icons/layout/layout-2row.svg.js +1 -1
- package/lib/icons/layout/layout-2with1.svg.js +1 -1
- package/lib/icons/layout/layout-3cols.svg.js +1 -1
- package/lib/icons/layout/layout-3row.svg.js +1 -1
- package/lib/icons/layout/layout-absolute.svg.js +1 -1
- package/lib/icons/layout/layout-fixed.svg.js +1 -1
- package/lib/icons/layout/layout-full.svg.js +1 -1
- package/lib/icons/layout/layout1-2.svg.js +1 -1
- package/lib/icons/layout/layout2-1.svg.js +1 -1
- package/lib/icons/layout/layout3-1.svg.js +1 -1
- package/lib/icons/layout/layout3-2.svg.js +1 -1
- package/lib/icons/other/divider.svg.js +1 -1
- package/lib/icons/other/property-sheet.svg.js +1 -1
- package/lib/icons/other/tooltip.svg.js +1 -1
- package/lib/icons/show/URL.svg.js +1 -1
- package/lib/icons/show/avatar.svg.js +1 -1
- package/lib/icons/show/breadcrumb.svg.js +1 -1
- package/lib/icons/show/card.svg.js +1 -1
- package/lib/icons/show/cards.svg.js +1 -1
- package/lib/icons/show/carousel.svg.js +1 -1
- package/lib/icons/show/chart.svg.js +1 -1
- package/lib/icons/show/code.svg.js +1 -1
- package/lib/icons/show/date.svg.js +1 -1
- package/lib/icons/show/datetime.svg.js +1 -1
- package/lib/icons/show/image.svg.js +1 -1
- package/lib/icons/show/images.svg.js +1 -1
- package/lib/icons/show/json-view.svg.js +1 -1
- package/lib/icons/show/list.svg.js +1 -1
- package/lib/icons/show/log.svg.js +1 -1
- package/lib/icons/show/mapping.svg.js +1 -1
- package/lib/icons/show/markdown.svg.js +1 -1
- package/lib/icons/show/plain.svg.js +1 -1
- package/lib/icons/show/progress.svg.js +1 -1
- package/lib/icons/show/sparkline.svg.js +1 -1
- package/lib/icons/show/status.svg.js +1 -1
- package/lib/icons/show/steps.svg.js +1 -1
- package/lib/icons/show/time.svg.js +1 -1
- package/lib/index.d.ts +11 -0
- package/lib/index.js +12 -1
- package/lib/locale/en-US.js +11 -2
- package/lib/locale/zh-CN.js +11 -2
- package/lib/plugin/Alert.js +1 -1
- package/lib/plugin/AnchorNav.js +1 -1
- package/lib/plugin/Audio.js +1 -1
- package/lib/plugin/Avatar.js +1 -1
- package/lib/plugin/Breadcrumb.js +1 -1
- package/lib/plugin/Button.js +43 -12
- package/lib/plugin/ButtonGroup.js +1 -1
- package/lib/plugin/CRUD.js +1 -1
- package/lib/plugin/CRUD2.js +1 -1
- package/lib/plugin/Card.js +1 -1
- package/lib/plugin/Card2.js +1 -1
- package/lib/plugin/Cards.js +1 -1
- package/lib/plugin/Carousel.js +1 -1
- package/lib/plugin/Chart.js +1 -1
- package/lib/plugin/CodeView.js +1 -1
- package/lib/plugin/Collapse.js +15 -2
- package/lib/plugin/CollapseGroup.js +1 -1
- package/lib/plugin/ColumnToggler.js +1 -1
- package/lib/plugin/Container.js +1 -1
- package/lib/plugin/Custom.js +1 -1
- package/lib/plugin/CustomRegion.js +1 -1
- package/lib/plugin/Date.d.ts +1 -0
- package/lib/plugin/Date.js +32 -33
- package/lib/plugin/Datetime.d.ts +1 -0
- package/lib/plugin/Datetime.js +32 -33
- package/lib/plugin/Dialog.js +1 -1
- package/lib/plugin/Divider.js +1 -1
- package/lib/plugin/Drawer.js +1 -1
- package/lib/plugin/DropDownButton.js +1 -1
- package/lib/plugin/Each.js +1 -1
- package/lib/plugin/Flex.js +1 -1
- package/lib/plugin/Form/ButtonGroupSelect.js +1 -1
- package/lib/plugin/Form/ButtonToolbar.js +1 -1
- package/lib/plugin/Form/ChainedSelect.js +1 -1
- package/lib/plugin/Form/Checkbox.js +1 -1
- package/lib/plugin/Form/Checkboxes.js +1 -1
- package/lib/plugin/Form/CodeEditor.js +1 -1
- package/lib/plugin/Form/Combo.d.ts +14 -6
- package/lib/plugin/Form/Combo.js +351 -376
- package/lib/plugin/Form/ConditionBuilder.js +1 -1
- package/lib/plugin/Form/Control.js +1 -1
- package/lib/plugin/Form/DiffEditor.js +1 -1
- package/lib/plugin/Form/FieldSet.js +1 -1
- package/lib/plugin/Form/Form.js +1 -1
- package/lib/plugin/Form/Formula.d.ts +1 -0
- package/lib/plugin/Form/Formula.js +7 -1
- package/lib/plugin/Form/Group.js +1 -1
- package/lib/plugin/Form/Hidden.js +1 -1
- package/lib/plugin/Form/InputArray.js +1 -1
- package/lib/plugin/Form/InputCity.d.ts +3 -0
- package/lib/plugin/Form/InputCity.js +44 -10
- package/lib/plugin/Form/InputColor.js +1 -1
- package/lib/plugin/Form/InputDate.js +2 -2
- package/lib/plugin/Form/InputDateRange.js +2 -2
- package/lib/plugin/Form/InputDateTime.js +1 -1
- package/lib/plugin/Form/InputDateTimeRange.js +1 -1
- package/lib/plugin/Form/InputEmail.js +1 -1
- package/lib/plugin/Form/InputExcel.js +1 -1
- package/lib/plugin/Form/InputFile.js +1 -1
- package/lib/plugin/Form/InputGroup.d.ts +11 -2
- package/lib/plugin/Form/InputGroup.js +55 -45
- package/lib/plugin/Form/InputImage.js +1 -1
- package/lib/plugin/Form/InputKV.js +1 -1
- package/lib/plugin/Form/InputMonth.js +1 -1
- package/lib/plugin/Form/InputMonthRange.js +1 -1
- package/lib/plugin/Form/InputNumber.js +32 -2
- package/lib/plugin/Form/InputPassword.js +1 -1
- package/lib/plugin/Form/InputQuarter.js +1 -1
- package/lib/plugin/Form/InputQuarterRange.js +1 -1
- package/lib/plugin/Form/InputRange.js +1 -1
- package/lib/plugin/Form/InputRating.js +23 -2
- package/lib/plugin/Form/InputRepeat.js +1 -1
- package/lib/plugin/Form/InputRichText.js +1 -1
- package/lib/plugin/Form/InputSubForm.js +1 -1
- package/lib/plugin/Form/InputTable.js +1 -1
- package/lib/plugin/Form/InputTag.js +1 -1
- package/lib/plugin/Form/InputText.js +60 -9
- package/lib/plugin/Form/InputTime.js +1 -1
- package/lib/plugin/Form/InputTimeRange.js +1 -1
- package/lib/plugin/Form/InputTree.d.ts +1 -0
- package/lib/plugin/Form/InputTree.js +48 -6
- package/lib/plugin/Form/InputURL.js +1 -1
- package/lib/plugin/Form/InputYear.js +1 -1
- package/lib/plugin/Form/InputYearRange.js +1 -1
- package/lib/plugin/Form/Item.js +1 -1
- package/lib/plugin/Form/ListSelect.js +1 -1
- package/lib/plugin/Form/LocationPicker.js +1 -1
- package/lib/plugin/Form/MatrixCheckboxes.js +1 -1
- package/lib/plugin/Form/NestedSelect.js +1 -1
- package/lib/plugin/Form/Picker.js +1 -1
- package/lib/plugin/Form/Radios.js +1 -1
- package/lib/plugin/Form/Select.js +1 -1
- package/lib/plugin/Form/Static.d.ts +1 -0
- package/lib/plugin/Form/Static.js +230 -201
- package/lib/plugin/Form/Switch.js +2 -2
- package/lib/plugin/Form/TabsTransfer.js +1 -1
- package/lib/plugin/Form/Textarea.js +1 -1
- package/lib/plugin/Form/Transfer.js +1 -1
- package/lib/plugin/Form/TreeSelect.d.ts +1 -0
- package/lib/plugin/Form/TreeSelect.js +70 -35
- package/lib/plugin/Form/UUID.js +1 -1
- package/lib/plugin/Grid.js +1 -1
- package/lib/plugin/HBox.js +1 -1
- package/lib/plugin/IFrame.js +1 -1
- package/lib/plugin/Image.d.ts +2 -1
- package/lib/plugin/Image.js +130 -99
- package/lib/plugin/Images.d.ts +2 -1
- package/lib/plugin/Images.js +128 -114
- package/lib/plugin/Json.d.ts +1 -0
- package/lib/plugin/Json.js +23 -27
- package/lib/plugin/Layout/FlexPluginBase.js +1 -1
- package/lib/plugin/Layout/Layout1_2_v4.js +1 -1
- package/lib/plugin/Layout/Layout_fixed.js +1 -1
- package/lib/plugin/Layout/Layout_free_container.js +1 -1
- package/lib/plugin/Layout/Layout_sorption_container.js +1 -1
- package/lib/plugin/Link.js +1 -1
- package/lib/plugin/List.d.ts +3 -0
- package/lib/plugin/List.js +145 -48
- package/lib/plugin/ListItem.js +1 -1
- package/lib/plugin/Log.d.ts +2 -0
- package/lib/plugin/Log.js +84 -14
- package/lib/plugin/Mapping.d.ts +15 -3
- package/lib/plugin/Mapping.js +157 -80
- package/lib/plugin/Markdown.js +1 -1
- package/lib/plugin/Nav.js +1 -1
- package/lib/plugin/Operation.js +1 -1
- package/lib/plugin/Others/Action.js +1 -1
- package/lib/plugin/Others/TableCell.js +2 -2
- package/lib/plugin/Page.js +2 -2
- package/lib/plugin/Pagination.js +1 -1
- package/lib/plugin/Panel.js +1 -1
- package/lib/plugin/Plain.d.ts +2 -4
- package/lib/plugin/Plain.js +33 -84
- package/lib/plugin/Progress.js +1 -1
- package/lib/plugin/Property.js +1 -1
- package/lib/plugin/QRCode.js +1 -1
- package/lib/plugin/Reset.js +1 -1
- package/lib/plugin/Service.js +1 -1
- package/lib/plugin/Sparkline.js +1 -1
- package/lib/plugin/Status.js +1 -1
- package/lib/plugin/Steps.js +1 -1
- package/lib/plugin/Submit.js +1 -1
- package/lib/plugin/Table.d.ts +3 -0
- package/lib/plugin/Table.js +239 -125
- package/lib/plugin/Table2.js +1 -1
- package/lib/plugin/TableCell2.js +1 -1
- package/lib/plugin/TableView.js +1 -1
- package/lib/plugin/Tabs.js +1 -1
- package/lib/plugin/Tag.d.ts +24 -0
- package/lib/plugin/Tag.js +238 -0
- package/lib/plugin/Tasks.js +1 -1
- package/lib/plugin/Time.d.ts +1 -0
- package/lib/plugin/Time.js +34 -35
- package/lib/plugin/Timeline.js +1 -1
- package/lib/plugin/TooltipWrapper.js +1 -1
- package/lib/plugin/Tpl.js +1 -1
- package/lib/plugin/Video.js +1 -1
- package/lib/plugin/WebComponent.js +1 -1
- package/lib/plugin/Wizard.js +1 -1
- package/lib/plugin/Wrapper.js +1 -1
- package/lib/renderer/APIControl.d.ts +0 -78
- package/lib/renderer/APIControl.js +3 -2
- package/lib/renderer/BadgeControl.d.ts +6 -6
- package/lib/renderer/BadgeControl.js +1 -1
- package/lib/renderer/DataBindingControl.js +1 -1
- package/lib/renderer/DataMappingControl.js +1 -1
- package/lib/renderer/DataPickerControl.js +1 -1
- package/lib/renderer/DateShortCutControl.js +1 -1
- package/lib/renderer/ExpressionFormulaControl.js +1 -1
- package/lib/renderer/FeatureControl.js +1 -1
- package/lib/renderer/FormulaControl.js +2 -2
- package/lib/renderer/GoConfigControl.js +1 -1
- package/lib/renderer/MapSourceControl.d.ts +1658 -0
- package/lib/renderer/MapSourceControl.js +438 -0
- package/lib/renderer/OptionControl.js +1 -1
- package/lib/renderer/RangePartsControl.js +1 -1
- package/lib/renderer/StatusControl.js +1 -1
- package/lib/renderer/SwitchMoreControl.d.ts +24 -24
- package/lib/renderer/SwitchMoreControl.js +1 -1
- package/lib/renderer/TimelineItemControl.js +1 -1
- package/lib/renderer/TransferTableControl.js +1 -1
- package/lib/renderer/TreeOptionControl.js +1 -1
- package/lib/renderer/ValidationControl.js +1 -1
- package/lib/renderer/ValidationItem.js +1 -1
- package/lib/renderer/event-control/action-config-dialog.js +1 -1
- package/lib/renderer/event-control/action-config-panel.js +1 -1
- package/lib/renderer/event-control/comp-action-select.js +1 -1
- package/lib/renderer/event-control/helper.js +20 -9
- package/lib/renderer/event-control/index.js +1 -1
- package/lib/renderer/style-control/Background.js +1 -1
- package/lib/renderer/style-control/Border.js +1 -1
- package/lib/renderer/style-control/BoxModel.js +1 -1
- package/lib/renderer/style-control/BoxShadow.js +1 -1
- package/lib/renderer/style-control/Display.js +1 -1
- package/lib/renderer/style-control/Font.js +1 -1
- package/lib/renderer/style-control/InsetBoxModel.js +1 -1
- package/lib/renderer/style-control/ThemeClassName.d.ts +8 -0
- package/lib/renderer/style-control/ThemeClassName.js +234 -0
- package/lib/renderer/style-control/font-family.js +1 -1
- package/lib/renderer/style-control/transformation.js +1 -1
- package/lib/renderer/textarea-formula/FormulaPicker.js +1 -1
- package/lib/renderer/textarea-formula/TextareaFormulaControl.js +1 -1
- package/lib/renderer/textarea-formula/plugin.js +1 -1
- package/lib/renderer/textarea-formula/utils.js +1 -1
- package/lib/tpl/api.js +1 -1
- package/lib/tpl/common.js +17 -67
- package/lib/tpl/horizontal.js +1 -1
- package/lib/tpl/layout.js +1 -1
- package/lib/tpl/options.js +10 -1
- package/lib/tpl/style.js +188 -1
- package/lib/tpl/validations.js +1 -1
- package/lib/util.js +1 -1
- package/lib/validator.js +1 -1
- package/package.json +5 -2
@@ -0,0 +1,438 @@
|
|
1
|
+
/**
|
2
|
+
* amis-editor v5.2.3
|
3
|
+
* Copyright 2018-2023 @fex
|
4
|
+
*/
|
5
|
+
|
6
|
+
'use strict';
|
7
|
+
|
8
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
9
|
+
|
10
|
+
var tslib = require('tslib');
|
11
|
+
var React = require('react');
|
12
|
+
var cx = require('classnames');
|
13
|
+
var amis = require('amis');
|
14
|
+
var amisEditorCore = require('amis-editor-core');
|
15
|
+
var amisCore = require('amis-core');
|
16
|
+
var debounce = require('lodash/debounce');
|
17
|
+
var i18nRuntime = require('i18n-runtime');
|
18
|
+
|
19
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
20
|
+
|
21
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
22
|
+
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
23
|
+
var debounce__default = /*#__PURE__*/_interopDefaultLegacy(debounce);
|
24
|
+
|
25
|
+
/**
|
26
|
+
* @file mapping 映射源配置
|
27
|
+
*/
|
28
|
+
var MapType;
|
29
|
+
(function (MapType) {
|
30
|
+
MapType["CUSTOM"] = "custom";
|
31
|
+
MapType["API"] = "api";
|
32
|
+
})(MapType || (MapType = {}));
|
33
|
+
var MapSourceControl = /** @class */function (_super) {
|
34
|
+
tslib.__extends(MapSourceControl, _super);
|
35
|
+
function MapSourceControl(props) {
|
36
|
+
var _this = _super.call(this, props) || this;
|
37
|
+
Object.defineProperty(_this, "$comp", {
|
38
|
+
enumerable: true,
|
39
|
+
configurable: true,
|
40
|
+
writable: true,
|
41
|
+
value: void 0
|
42
|
+
}); // 记录一下路径,不再从外部同步内部,只从内部同步外部
|
43
|
+
Object.defineProperty(_this, "debounceMapChange", {
|
44
|
+
enumerable: true,
|
45
|
+
configurable: true,
|
46
|
+
writable: true,
|
47
|
+
value: debounce__default["default"](_this.handleMapChange, 250)
|
48
|
+
});
|
49
|
+
var mapType = MapType.CUSTOM;
|
50
|
+
if (props.data.hasOwnProperty('source') && props.data.source) {
|
51
|
+
mapType = MapType.API;
|
52
|
+
}
|
53
|
+
_this.state = {
|
54
|
+
map: props.data.map,
|
55
|
+
source: props.data.source,
|
56
|
+
labelField: props.data.labelField,
|
57
|
+
valueField: props.data.valueField,
|
58
|
+
mapType: mapType
|
59
|
+
};
|
60
|
+
return _this;
|
61
|
+
}
|
62
|
+
Object.defineProperty(MapSourceControl.prototype, "componentDidUpdate", {
|
63
|
+
enumerable: false,
|
64
|
+
configurable: true,
|
65
|
+
writable: true,
|
66
|
+
value: function (prevProps, prevState, snapshot) {
|
67
|
+
var _a, _b, _c;
|
68
|
+
var isArrayOld = Array.isArray((_a = prevProps.data) === null || _a === void 0 ? void 0 : _a.map);
|
69
|
+
var isArrayNew = Array.isArray((_b = this.props.data) === null || _b === void 0 ? void 0 : _b.map);
|
70
|
+
// map 类型改变了
|
71
|
+
if (isArrayOld !== isArrayNew) {
|
72
|
+
this.setState({
|
73
|
+
map: (_c = this.props.data) === null || _c === void 0 ? void 0 : _c.map
|
74
|
+
});
|
75
|
+
}
|
76
|
+
}
|
77
|
+
});
|
78
|
+
/**
|
79
|
+
* 更新map字段的统一出口
|
80
|
+
*/
|
81
|
+
Object.defineProperty(MapSourceControl.prototype, "onChange", {
|
82
|
+
enumerable: false,
|
83
|
+
configurable: true,
|
84
|
+
writable: true,
|
85
|
+
value: function () {
|
86
|
+
var _a = this.state,
|
87
|
+
mapType = _a.mapType,
|
88
|
+
source = _a.source,
|
89
|
+
map = _a.map,
|
90
|
+
labelField = _a.labelField,
|
91
|
+
valueField = _a.valueField;
|
92
|
+
var onBulkChange = this.props.onBulkChange;
|
93
|
+
labelField = labelField === '' ? undefined : labelField;
|
94
|
+
valueField = valueField === '' ? undefined : valueField;
|
95
|
+
if (mapType === MapType.CUSTOM) {
|
96
|
+
onBulkChange && onBulkChange({
|
97
|
+
map: map,
|
98
|
+
source: undefined,
|
99
|
+
labelField: labelField,
|
100
|
+
valueField: valueField
|
101
|
+
});
|
102
|
+
return;
|
103
|
+
}
|
104
|
+
if (mapType === MapType.API) {
|
105
|
+
onBulkChange && onBulkChange({
|
106
|
+
source: source,
|
107
|
+
map: undefined,
|
108
|
+
labelField: labelField,
|
109
|
+
valueField: valueField
|
110
|
+
});
|
111
|
+
return;
|
112
|
+
}
|
113
|
+
}
|
114
|
+
});
|
115
|
+
/**
|
116
|
+
* 切换选项类型
|
117
|
+
*/
|
118
|
+
Object.defineProperty(MapSourceControl.prototype, "handleMapTypeChange", {
|
119
|
+
enumerable: false,
|
120
|
+
configurable: true,
|
121
|
+
writable: true,
|
122
|
+
value: function (mapType) {
|
123
|
+
this.setState({
|
124
|
+
mapType: mapType,
|
125
|
+
labelField: undefined,
|
126
|
+
valueField: undefined
|
127
|
+
}, this.onChange);
|
128
|
+
}
|
129
|
+
});
|
130
|
+
Object.defineProperty(MapSourceControl.prototype, "renderHeader", {
|
131
|
+
enumerable: false,
|
132
|
+
configurable: true,
|
133
|
+
writable: true,
|
134
|
+
value: function () {
|
135
|
+
var _this = this;
|
136
|
+
var _a;
|
137
|
+
var _b = this.props,
|
138
|
+
render = _b.render,
|
139
|
+
label = _b.label,
|
140
|
+
labelRemark = _b.labelRemark,
|
141
|
+
useMobileUI = _b.useMobileUI,
|
142
|
+
env = _b.env,
|
143
|
+
popOverContainer = _b.popOverContainer;
|
144
|
+
var classPrefix = (_a = env === null || env === void 0 ? void 0 : env.theme) === null || _a === void 0 ? void 0 : _a.classPrefix;
|
145
|
+
var mapType = this.state.mapType;
|
146
|
+
var optionSourceList = [{
|
147
|
+
label: i18nRuntime.i18n("01820262aa9ad5b130f8f5b86bfd2968"),
|
148
|
+
value: MapType.CUSTOM
|
149
|
+
}, {
|
150
|
+
label: i18nRuntime.i18n("f99603414a616bdee85de0e6e3938b65"),
|
151
|
+
value: MapType.API
|
152
|
+
}].map(function (item) {
|
153
|
+
return tslib.__assign(tslib.__assign({}, item), {
|
154
|
+
onClick: function () {
|
155
|
+
return _this.handleMapTypeChange(item.value);
|
156
|
+
}
|
157
|
+
});
|
158
|
+
});
|
159
|
+
return React__default["default"].createElement("header", {
|
160
|
+
className: "ae-OptionControl-header"
|
161
|
+
}, React__default["default"].createElement("label", {
|
162
|
+
className: cx__default["default"]("".concat(classPrefix, "Form-label")),
|
163
|
+
style: {
|
164
|
+
marginBottom: 0
|
165
|
+
}
|
166
|
+
}, label || '', labelRemark ? render('label-remark', {
|
167
|
+
type: 'remark',
|
168
|
+
icon: labelRemark.icon || 'warning-mark',
|
169
|
+
tooltip: labelRemark,
|
170
|
+
className: cx__default["default"]("Form-lableRemark", labelRemark === null || labelRemark === void 0 ? void 0 : labelRemark.className),
|
171
|
+
useMobileUI: useMobileUI,
|
172
|
+
container: popOverContainer ? popOverContainer : env && env.getModalContainer ? env.getModalContainer : undefined
|
173
|
+
}) : null), React__default["default"].createElement("div", null, render('validation-control-addBtn', {
|
174
|
+
type: 'dropdown-button',
|
175
|
+
level: 'link',
|
176
|
+
size: 'sm',
|
177
|
+
label: '${selected}',
|
178
|
+
align: 'right',
|
179
|
+
closeOnClick: true,
|
180
|
+
closeOnOutside: true,
|
181
|
+
buttons: optionSourceList
|
182
|
+
}, {
|
183
|
+
popOverContainer: null,
|
184
|
+
data: {
|
185
|
+
selected: optionSourceList.find(function (item) {
|
186
|
+
return item.value === mapType;
|
187
|
+
}).label
|
188
|
+
}
|
189
|
+
})));
|
190
|
+
}
|
191
|
+
});
|
192
|
+
Object.defineProperty(MapSourceControl.prototype, "handleMapChange", {
|
193
|
+
enumerable: false,
|
194
|
+
configurable: true,
|
195
|
+
writable: true,
|
196
|
+
value: function (map) {
|
197
|
+
this.setState({
|
198
|
+
map: map
|
199
|
+
}, this.onChange);
|
200
|
+
}
|
201
|
+
});
|
202
|
+
Object.defineProperty(MapSourceControl.prototype, "handleAPIChange", {
|
203
|
+
enumerable: false,
|
204
|
+
configurable: true,
|
205
|
+
writable: true,
|
206
|
+
value: function (source) {
|
207
|
+
this.setState({
|
208
|
+
source: source
|
209
|
+
}, this.onChange);
|
210
|
+
}
|
211
|
+
});
|
212
|
+
Object.defineProperty(MapSourceControl.prototype, "handleLabelFieldChange", {
|
213
|
+
enumerable: false,
|
214
|
+
configurable: true,
|
215
|
+
writable: true,
|
216
|
+
value: function (labelField) {
|
217
|
+
this.setState({
|
218
|
+
labelField: labelField
|
219
|
+
}, this.onChange);
|
220
|
+
}
|
221
|
+
});
|
222
|
+
Object.defineProperty(MapSourceControl.prototype, "handleValueFieldChange", {
|
223
|
+
enumerable: false,
|
224
|
+
configurable: true,
|
225
|
+
writable: true,
|
226
|
+
value: function (valueField) {
|
227
|
+
this.setState({
|
228
|
+
valueField: valueField
|
229
|
+
}, this.onChange);
|
230
|
+
}
|
231
|
+
});
|
232
|
+
Object.defineProperty(MapSourceControl.prototype, "renderOtherFields", {
|
233
|
+
enumerable: false,
|
234
|
+
configurable: true,
|
235
|
+
writable: true,
|
236
|
+
value: function () {
|
237
|
+
return [{
|
238
|
+
label: amisEditorCore.tipedLabel('值匹配字段', '映射表是数组对象,且对象有多个key时,用来匹配值的字段, 默认为value'),
|
239
|
+
type: 'input-text',
|
240
|
+
name: 'valueField',
|
241
|
+
placeholder: '匹配字段,默认为value',
|
242
|
+
onChange: this.handleValueFieldChange
|
243
|
+
}, {
|
244
|
+
label: amisEditorCore.tipedLabel(i18nRuntime.i18n("7e9c83e86beb612377a94e6e8d1fc644"), '映射表是数组对象时,用作显示的字段,显示多字段请使用自定义显示模板,默认为label'),
|
245
|
+
type: 'input-text',
|
246
|
+
name: 'labelField',
|
247
|
+
placeholder: '显示字段,默认为label',
|
248
|
+
onChange: this.handleLabelFieldChange,
|
249
|
+
visibleOn: '${!itemSchema}'
|
250
|
+
}];
|
251
|
+
}
|
252
|
+
});
|
253
|
+
Object.defineProperty(MapSourceControl.prototype, "renderApiPanel", {
|
254
|
+
enumerable: false,
|
255
|
+
configurable: true,
|
256
|
+
writable: true,
|
257
|
+
value: function () {
|
258
|
+
var render = this.props.render;
|
259
|
+
var _a = this.state,
|
260
|
+
mapType = _a.mapType,
|
261
|
+
source = _a.source;
|
262
|
+
_a.labelField;
|
263
|
+
_a.valueField;
|
264
|
+
if (mapType === MapType.CUSTOM) {
|
265
|
+
return null;
|
266
|
+
}
|
267
|
+
return render('api', amisEditorCore.getSchemaTpl('apiControl', {
|
268
|
+
label: i18nRuntime.i18n("54ea89b497ec3bb319c68844dfa3687f"),
|
269
|
+
name: 'source',
|
270
|
+
mode: 'normal',
|
271
|
+
className: 'ae-ExtendMore',
|
272
|
+
visibleOn: 'data.autoComplete !== false',
|
273
|
+
value: source,
|
274
|
+
onChange: this.handleAPIChange,
|
275
|
+
sourceType: mapType,
|
276
|
+
footer: this.renderOtherFields()
|
277
|
+
}));
|
278
|
+
}
|
279
|
+
});
|
280
|
+
Object.defineProperty(MapSourceControl.prototype, "renderObjectMap", {
|
281
|
+
enumerable: false,
|
282
|
+
configurable: true,
|
283
|
+
writable: true,
|
284
|
+
value: function () {
|
285
|
+
var _this = this;
|
286
|
+
var render = this.props.render;
|
287
|
+
return render('objectMap', amisEditorCore.getSchemaTpl('combo-container', {
|
288
|
+
label: '',
|
289
|
+
type: 'combo',
|
290
|
+
mode: 'normal',
|
291
|
+
scaffold: {
|
292
|
+
key: 'key-{index}',
|
293
|
+
value: 'value-{index}'
|
294
|
+
},
|
295
|
+
required: true,
|
296
|
+
name: 'map',
|
297
|
+
descriptionClassName: 'help-block text-xs m-b-none',
|
298
|
+
description: '<p>当值命中左侧 Key 时,展示右侧内容<br />当没有命中时,默认展示 Key 为 <code>*</code>的内容</div><br />(请确保key值唯一)',
|
299
|
+
multiple: true,
|
300
|
+
pipeIn: function (value) {
|
301
|
+
if (!amisCore.isObject(value)) {
|
302
|
+
return [{
|
303
|
+
key: 'key0',
|
304
|
+
value: 'value1'
|
305
|
+
}];
|
306
|
+
}
|
307
|
+
var arr = [];
|
308
|
+
Object.keys(value).forEach(function (key) {
|
309
|
+
arr.push({
|
310
|
+
key: key || '',
|
311
|
+
value: typeof value[key] === 'string' ? value[key] : JSON.stringify(value[key])
|
312
|
+
});
|
313
|
+
});
|
314
|
+
return arr;
|
315
|
+
},
|
316
|
+
pipeOut: function (value) {
|
317
|
+
if (!Array.isArray(value)) {
|
318
|
+
return value;
|
319
|
+
}
|
320
|
+
var obj = {};
|
321
|
+
value.forEach(function (item, idx) {
|
322
|
+
var key = item.key || '';
|
323
|
+
var value = item.value;
|
324
|
+
if (key === 'key-{index}' && value === 'value-{index}') {
|
325
|
+
key = key.replace('-{index}', "".concat(idx));
|
326
|
+
value = value.replace('-{index}', "".concat(idx));
|
327
|
+
}
|
328
|
+
try {
|
329
|
+
value = JSON.parse(value);
|
330
|
+
} catch (e) {}
|
331
|
+
obj[key] = value;
|
332
|
+
});
|
333
|
+
return obj;
|
334
|
+
},
|
335
|
+
onChange: function (value) {
|
336
|
+
_this.handleMapChange(value || {
|
337
|
+
'*': i18nRuntime.i18n("2b10dfa6dbdf8775ab2b38fc67e7ea49")
|
338
|
+
});
|
339
|
+
},
|
340
|
+
items: [{
|
341
|
+
placeholder: 'Key',
|
342
|
+
type: 'input-text',
|
343
|
+
unique: true,
|
344
|
+
name: 'key',
|
345
|
+
required: true,
|
346
|
+
columnClassName: 'w-xs'
|
347
|
+
}, {
|
348
|
+
placeholder: i18nRuntime.i18n("2d711b09bd0db0ad240cc83b30dd8014"),
|
349
|
+
type: 'input-text',
|
350
|
+
name: 'value'
|
351
|
+
}]
|
352
|
+
}));
|
353
|
+
}
|
354
|
+
});
|
355
|
+
Object.defineProperty(MapSourceControl.prototype, "handleMapItemChange", {
|
356
|
+
enumerable: false,
|
357
|
+
configurable: true,
|
358
|
+
writable: true,
|
359
|
+
value: function (index, item) {
|
360
|
+
var _a = this.state.map,
|
361
|
+
map = _a === void 0 ? [] : _a;
|
362
|
+
var newMap = map.slice();
|
363
|
+
try {
|
364
|
+
item = JSON.parse(item);
|
365
|
+
} catch (e) {}
|
366
|
+
newMap.splice(index, 1, item);
|
367
|
+
this.handleMapChange(newMap);
|
368
|
+
}
|
369
|
+
});
|
370
|
+
Object.defineProperty(MapSourceControl.prototype, "renderArrayMap", {
|
371
|
+
enumerable: false,
|
372
|
+
configurable: true,
|
373
|
+
writable: true,
|
374
|
+
value: function () {
|
375
|
+
var _this = this;
|
376
|
+
var render = this.props.render;
|
377
|
+
return React__default["default"].createElement("div", {
|
378
|
+
className: 'ae-ExtendMore'
|
379
|
+
}, render('arrayMap', tslib.__spreadArray([{
|
380
|
+
type: 'json-editor',
|
381
|
+
name: 'map',
|
382
|
+
label: false,
|
383
|
+
placeholder: '请保持数组成员结构相同',
|
384
|
+
onChange: function (value) {
|
385
|
+
try {
|
386
|
+
var map = JSON.parse(value);
|
387
|
+
_this.debounceMapChange(map);
|
388
|
+
} catch (e) {
|
389
|
+
console.error();
|
390
|
+
}
|
391
|
+
}
|
392
|
+
}], this.renderOtherFields(), true)));
|
393
|
+
}
|
394
|
+
});
|
395
|
+
Object.defineProperty(MapSourceControl.prototype, "renderMap", {
|
396
|
+
enumerable: false,
|
397
|
+
configurable: true,
|
398
|
+
writable: true,
|
399
|
+
value: function () {
|
400
|
+
var map = this.state.map;
|
401
|
+
if (map && Array.isArray(map)) {
|
402
|
+
return this.renderArrayMap();
|
403
|
+
}
|
404
|
+
return this.renderObjectMap();
|
405
|
+
}
|
406
|
+
});
|
407
|
+
Object.defineProperty(MapSourceControl.prototype, "render", {
|
408
|
+
enumerable: false,
|
409
|
+
configurable: true,
|
410
|
+
writable: true,
|
411
|
+
value: function () {
|
412
|
+
var mapType = this.state.mapType;
|
413
|
+
var className = this.props.className;
|
414
|
+
return React__default["default"].createElement("div", {
|
415
|
+
className: cx__default["default"]('ae-OptionControl', className)
|
416
|
+
}, this.renderHeader(), mapType === MapType.CUSTOM ? this.renderMap() : this.renderApiPanel());
|
417
|
+
}
|
418
|
+
});
|
419
|
+
tslib.__decorate([amisEditorCore.autobind, tslib.__metadata("design:type", Function), tslib.__metadata("design:paramtypes", [String]), tslib.__metadata("design:returntype", void 0)], MapSourceControl.prototype, "handleMapTypeChange", null);
|
420
|
+
tslib.__decorate([amisEditorCore.autobind, tslib.__metadata("design:type", Function), tslib.__metadata("design:paramtypes", [Object]), tslib.__metadata("design:returntype", void 0)], MapSourceControl.prototype, "handleMapChange", null);
|
421
|
+
tslib.__decorate([amisEditorCore.autobind, tslib.__metadata("design:type", Function), tslib.__metadata("design:paramtypes", [Object]), tslib.__metadata("design:returntype", void 0)], MapSourceControl.prototype, "handleAPIChange", null);
|
422
|
+
tslib.__decorate([amisEditorCore.autobind, tslib.__metadata("design:type", Function), tslib.__metadata("design:paramtypes", [String]), tslib.__metadata("design:returntype", void 0)], MapSourceControl.prototype, "handleLabelFieldChange", null);
|
423
|
+
tslib.__decorate([amisEditorCore.autobind, tslib.__metadata("design:type", Function), tslib.__metadata("design:paramtypes", [String]), tslib.__metadata("design:returntype", void 0)], MapSourceControl.prototype, "handleValueFieldChange", null);
|
424
|
+
return MapSourceControl;
|
425
|
+
}(React__default["default"].Component);
|
426
|
+
/** @class */(function (_super) {
|
427
|
+
tslib.__extends(MapSourceControlRenderer, _super);
|
428
|
+
function MapSourceControlRenderer() {
|
429
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
430
|
+
}
|
431
|
+
MapSourceControlRenderer = tslib.__decorate([amis.FormItem({
|
432
|
+
type: 'ae-mapSourceControl',
|
433
|
+
renderLabel: false
|
434
|
+
})], MapSourceControlRenderer);
|
435
|
+
return MapSourceControlRenderer;
|
436
|
+
})(MapSourceControl);
|
437
|
+
|
438
|
+
exports["default"] = MapSourceControl;
|
@@ -76,6 +76,12 @@ export default class SwitchMore extends React.Component<SwitchMoreProps, SwitchM
|
|
76
76
|
hidden?: boolean | undefined;
|
77
77
|
hiddenOn?: string | undefined;
|
78
78
|
className?: import("amis").SchemaClassName | undefined;
|
79
|
+
name?: string | undefined;
|
80
|
+
disabled?: boolean | undefined;
|
81
|
+
autoFocus: boolean | undefined;
|
82
|
+
mode: string;
|
83
|
+
$ref?: string | undefined;
|
84
|
+
disabledOn?: string | undefined;
|
79
85
|
onEvent?: {
|
80
86
|
[propName: string]: {
|
81
87
|
weight?: number | undefined;
|
@@ -83,15 +89,6 @@ export default class SwitchMore extends React.Component<SwitchMoreProps, SwitchM
|
|
83
89
|
debounce?: import("amis").debounceConfig | undefined;
|
84
90
|
};
|
85
91
|
} | undefined;
|
86
|
-
name?: string | undefined;
|
87
|
-
actions?: import("amis/lib/renderers/Action").ActionSchema[] | undefined;
|
88
|
-
submitText?: string | undefined;
|
89
|
-
api?: string | import("amis").BaseApiObject | undefined;
|
90
|
-
submitOnChange: boolean;
|
91
|
-
horizontal: import("amis").FormHorizontal;
|
92
|
-
$ref?: string | undefined;
|
93
|
-
disabled?: boolean | undefined;
|
94
|
-
disabledOn?: string | undefined;
|
95
92
|
static?: boolean | undefined;
|
96
93
|
staticOn?: string | undefined;
|
97
94
|
staticPlaceholder?: string | undefined;
|
@@ -104,18 +101,20 @@ export default class SwitchMore extends React.Component<SwitchMoreProps, SwitchM
|
|
104
101
|
validateFailed?: string | undefined;
|
105
102
|
} | undefined;
|
106
103
|
reload?: string | undefined;
|
104
|
+
actions?: import("amis/lib/renderers/Action").ActionSchema[] | undefined;
|
105
|
+
tabs?: any;
|
106
|
+
horizontal: import("amis").FormHorizontal;
|
107
107
|
labelAlign?: import("amis-core/lib/renderers/Item").LabelAlign | undefined;
|
108
108
|
labelWidth?: string | number | undefined;
|
109
|
-
|
109
|
+
submitOnChange: boolean;
|
110
110
|
initFetchOn?: string | undefined;
|
111
111
|
initFetch?: boolean | undefined;
|
112
|
-
tabs?: any;
|
113
112
|
fieldSet?: any;
|
114
|
-
autoFocus: boolean | undefined;
|
115
113
|
initApi?: string | import("amis").BaseApiObject | undefined;
|
116
114
|
interval?: number | undefined;
|
117
115
|
silentPolling?: boolean | undefined;
|
118
116
|
stopAutoRefreshWhen?: string | undefined;
|
117
|
+
api?: string | import("amis").BaseApiObject | undefined;
|
119
118
|
feedback?: any;
|
120
119
|
redirect?: string | undefined;
|
121
120
|
affixFooter?: boolean | undefined;
|
@@ -142,6 +141,7 @@ export default class SwitchMore extends React.Component<SwitchMoreProps, SwitchM
|
|
142
141
|
columnCount?: number | undefined;
|
143
142
|
panelClassName: import("amis").ClassName;
|
144
143
|
submitOnInit?: boolean | undefined;
|
144
|
+
submitText?: string | undefined;
|
145
145
|
wrapWithPanel: boolean;
|
146
146
|
promptPageLeave?: boolean | undefined;
|
147
147
|
promptPageLeaveMessage?: string | undefined;
|
@@ -168,6 +168,12 @@ export default class SwitchMore extends React.Component<SwitchMoreProps, SwitchM
|
|
168
168
|
hidden?: boolean | undefined;
|
169
169
|
hiddenOn?: string | undefined;
|
170
170
|
className?: import("amis").SchemaClassName | undefined;
|
171
|
+
name?: string | undefined;
|
172
|
+
disabled?: boolean | undefined;
|
173
|
+
autoFocus: boolean | undefined;
|
174
|
+
mode: string;
|
175
|
+
$ref?: string | undefined;
|
176
|
+
disabledOn?: string | undefined;
|
171
177
|
onEvent?: {
|
172
178
|
[propName: string]: {
|
173
179
|
weight?: number | undefined;
|
@@ -175,15 +181,6 @@ export default class SwitchMore extends React.Component<SwitchMoreProps, SwitchM
|
|
175
181
|
debounce?: import("amis").debounceConfig | undefined;
|
176
182
|
};
|
177
183
|
} | undefined;
|
178
|
-
name?: string | undefined;
|
179
|
-
actions?: import("amis/lib/renderers/Action").ActionSchema[] | undefined;
|
180
|
-
submitText?: string | undefined;
|
181
|
-
api?: string | import("amis").BaseApiObject | undefined;
|
182
|
-
submitOnChange: boolean;
|
183
|
-
horizontal: import("amis").FormHorizontal;
|
184
|
-
$ref?: string | undefined;
|
185
|
-
disabled?: boolean | undefined;
|
186
|
-
disabledOn?: string | undefined;
|
187
184
|
static?: boolean | undefined;
|
188
185
|
staticOn?: string | undefined;
|
189
186
|
staticPlaceholder?: string | undefined;
|
@@ -196,18 +193,20 @@ export default class SwitchMore extends React.Component<SwitchMoreProps, SwitchM
|
|
196
193
|
validateFailed?: string | undefined;
|
197
194
|
} | undefined;
|
198
195
|
reload?: string | undefined;
|
196
|
+
actions?: import("amis/lib/renderers/Action").ActionSchema[] | undefined;
|
197
|
+
tabs?: any;
|
198
|
+
horizontal: import("amis").FormHorizontal;
|
199
199
|
labelAlign?: import("amis-core/lib/renderers/Item").LabelAlign | undefined;
|
200
200
|
labelWidth?: string | number | undefined;
|
201
|
-
|
201
|
+
submitOnChange: boolean;
|
202
202
|
initFetchOn?: string | undefined;
|
203
203
|
initFetch?: boolean | undefined;
|
204
|
-
tabs?: any;
|
205
204
|
fieldSet?: any;
|
206
|
-
autoFocus: boolean | undefined;
|
207
205
|
initApi?: string | import("amis").BaseApiObject | undefined;
|
208
206
|
interval?: number | undefined;
|
209
207
|
silentPolling?: boolean | undefined;
|
210
208
|
stopAutoRefreshWhen?: string | undefined;
|
209
|
+
api?: string | import("amis").BaseApiObject | undefined;
|
211
210
|
feedback?: any;
|
212
211
|
redirect?: string | undefined;
|
213
212
|
affixFooter?: boolean | undefined;
|
@@ -234,6 +233,7 @@ export default class SwitchMore extends React.Component<SwitchMoreProps, SwitchM
|
|
234
233
|
columnCount?: number | undefined;
|
235
234
|
panelClassName: import("amis").ClassName;
|
236
235
|
submitOnInit?: boolean | undefined;
|
236
|
+
submitText?: string | undefined;
|
237
237
|
wrapWithPanel: boolean;
|
238
238
|
promptPageLeave?: boolean | undefined;
|
239
239
|
promptPageLeaveMessage?: string | undefined;
|