amis-editor 5.2.5-beta.1 → 5.2.5-beta.5
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-top.svg.js +1 -1
- package/esm/icons/layout/layout-fixed.svg.js +15 -20
- package/esm/icons/layout/layout-free-container.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 +3 -0
- package/esm/index.js +4 -1
- package/esm/locale/en-US.js +41 -3
- package/esm/locale/zh-CN.js +42 -4
- package/esm/plugin/Alert.d.ts +1 -0
- package/esm/plugin/Alert.js +7 -1
- package/esm/plugin/AnchorNav.js +1 -1
- package/esm/plugin/Audio.d.ts +1 -0
- package/esm/plugin/Audio.js +7 -1
- package/esm/plugin/Avatar.d.ts +1 -0
- package/esm/plugin/Avatar.js +7 -1
- package/esm/plugin/Breadcrumb.js +1 -1
- package/esm/plugin/Button.d.ts +1 -0
- package/esm/plugin/Button.js +15 -6
- package/esm/plugin/ButtonGroup.d.ts +1 -0
- package/esm/plugin/ButtonGroup.js +7 -1
- package/esm/plugin/CRUD.d.ts +22 -0
- package/esm/plugin/CRUD.js +75 -37
- package/esm/plugin/CRUD2.js +5 -4
- package/esm/plugin/Card.d.ts +1 -0
- package/esm/plugin/Card.js +7 -1
- package/esm/plugin/Card2.d.ts +1 -0
- package/esm/plugin/Card2.js +7 -1
- package/esm/plugin/Cards.d.ts +1 -0
- package/esm/plugin/Cards.js +7 -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 +1 -1
- package/esm/plugin/CollapseGroup.js +1 -1
- package/esm/plugin/ColumnToggler.js +1 -1
- package/esm/plugin/Container.d.ts +1 -0
- package/esm/plugin/Container.js +7 -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 +7 -1
- package/esm/plugin/Datetime.d.ts +1 -0
- package/esm/plugin/Datetime.js +7 -1
- package/esm/plugin/Dialog.js +1 -1
- package/esm/plugin/Divider.d.ts +1 -0
- package/esm/plugin/Divider.js +7 -1
- package/esm/plugin/Drawer.js +1 -1
- package/esm/plugin/DropDownButton.d.ts +1 -0
- package/esm/plugin/DropDownButton.js +7 -1
- package/esm/plugin/Each.d.ts +1 -0
- package/esm/plugin/Each.js +7 -1
- package/esm/plugin/Flex.d.ts +1 -0
- package/esm/plugin/Flex.js +7 -1
- package/esm/plugin/Form/ButtonGroupSelect.js +2 -2
- package/esm/plugin/Form/ButtonToolbar.d.ts +1 -0
- package/esm/plugin/Form/ButtonToolbar.js +7 -1
- package/esm/plugin/Form/ChainedSelect.js +1 -1
- package/esm/plugin/Form/Checkbox.d.ts +1 -0
- package/esm/plugin/Form/Checkbox.js +7 -1
- package/esm/plugin/Form/Checkboxes.js +1 -1
- package/esm/plugin/Form/CodeEditor.js +1 -1
- package/esm/plugin/Form/Combo.js +4 -3
- 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.js +1 -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 +1 -0
- package/esm/plugin/Form/InputCity.js +7 -1
- package/esm/plugin/Form/InputColor.d.ts +1 -0
- package/esm/plugin/Form/InputColor.js +7 -1
- package/esm/plugin/Form/InputDate.js +1 -1
- package/esm/plugin/Form/InputDateRange.js +1 -1
- 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 +1 -0
- package/esm/plugin/Form/InputGroup.js +7 -1
- package/esm/plugin/Form/InputImage.js +1 -1
- package/esm/plugin/Form/InputKV.d.ts +1 -0
- package/esm/plugin/Form/InputKV.js +7 -1
- package/esm/plugin/Form/InputMonth.js +1 -1
- package/esm/plugin/Form/InputMonthRange.js +1 -1
- package/esm/plugin/Form/InputNumber.js +1 -1
- 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 +1 -1
- package/esm/plugin/Form/InputRepeat.js +1 -1
- package/esm/plugin/Form/InputRichText.js +1 -3
- package/esm/plugin/Form/InputSubForm.js +1 -1
- package/esm/plugin/Form/InputTable.js +3 -3
- package/esm/plugin/Form/InputTag.d.ts +1 -0
- package/esm/plugin/Form/InputTag.js +7 -1
- package/esm/plugin/Form/InputText.d.ts +1 -0
- package/esm/plugin/Form/InputText.js +7 -1
- package/esm/plugin/Form/InputTime.js +1 -1
- package/esm/plugin/Form/InputTimeRange.js +1 -1
- package/esm/plugin/Form/InputTree.js +4 -3
- 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.d.ts +1 -2
- package/esm/plugin/Form/LocationPicker.js +26 -70
- 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.d.ts +1 -0
- package/esm/plugin/Form/Radios.js +7 -1
- package/esm/plugin/Form/Select.d.ts +1 -0
- package/esm/plugin/Form/Select.js +7 -1
- package/esm/plugin/Form/Static.d.ts +1 -0
- package/esm/plugin/Form/Static.js +7 -1
- package/esm/plugin/Form/Switch.d.ts +1 -0
- package/esm/plugin/Form/Switch.js +7 -1
- 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.js +1 -1
- package/esm/plugin/Form/UUID.js +1 -1
- package/esm/plugin/Grid.d.ts +1 -0
- package/esm/plugin/Grid.js +7 -1
- package/esm/plugin/HBox.d.ts +1 -0
- package/esm/plugin/HBox.js +7 -1
- package/esm/plugin/IFrame.js +4 -3
- package/esm/plugin/Image.d.ts +1 -0
- package/esm/plugin/Image.js +7 -1
- package/esm/plugin/Images.d.ts +1 -0
- package/esm/plugin/Images.js +7 -1
- package/esm/plugin/Json.js +1 -1
- package/esm/plugin/Layout/FlexPluginBase.js +1 -1
- package/esm/plugin/Layout/Layout1_2_v4.d.ts +1 -0
- package/esm/plugin/Layout/Layout_fixed.d.ts +1 -0
- package/esm/plugin/Layout/Layout_fixed.js +7 -1
- package/esm/plugin/Layout/Layout_free_container.js +1 -1
- package/esm/plugin/Layout/Layout_sorption_container.d.ts +1 -0
- package/esm/plugin/Layout/Layout_sorption_container.js +7 -1
- package/esm/plugin/Link.d.ts +1 -0
- package/esm/plugin/Link.js +7 -1
- package/esm/plugin/List.d.ts +1 -0
- package/esm/plugin/List.js +7 -1
- package/esm/plugin/ListItem.d.ts +1 -0
- package/esm/plugin/ListItem.js +7 -1
- package/esm/plugin/Log.js +1 -1
- package/esm/plugin/Mapping.d.ts +1 -0
- package/esm/plugin/Mapping.js +7 -1
- package/esm/plugin/Markdown.d.ts +1 -0
- package/esm/plugin/Markdown.js +7 -1
- package/esm/plugin/Nav.d.ts +6 -2
- package/esm/plugin/Nav.js +225 -28
- 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 +1 -1
- package/esm/plugin/Pagination.js +1 -1
- package/esm/plugin/Panel.js +1 -1
- package/esm/plugin/Plain.js +1 -1
- package/esm/plugin/Progress.d.ts +1 -0
- package/esm/plugin/Progress.js +7 -1
- package/esm/plugin/Property.js +1 -1
- package/esm/plugin/QRCode.d.ts +1 -0
- package/esm/plugin/QRCode.js +7 -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.d.ts +1 -0
- package/esm/plugin/Status.js +7 -1
- package/esm/plugin/Steps.js +1 -1
- package/esm/plugin/Submit.js +1 -1
- package/esm/plugin/Table.js +5 -4
- package/esm/plugin/Table2.js +15 -10
- package/esm/plugin/TableCell2.js +6 -4
- package/esm/plugin/TableView.js +1 -1
- package/esm/plugin/Tabs.js +7 -5
- package/esm/plugin/Tag.js +1 -1
- package/esm/plugin/Tasks.js +1 -1
- package/esm/plugin/Time.js +1 -1
- package/esm/plugin/Timeline.js +1 -1
- package/esm/plugin/TooltipWrapper.d.ts +1 -0
- package/esm/plugin/TooltipWrapper.js +7 -1
- package/esm/plugin/Tpl.d.ts +1 -0
- package/esm/plugin/Tpl.js +10 -3
- package/esm/plugin/Video.js +1 -1
- package/esm/plugin/WebComponent.js +1 -1
- package/esm/plugin/Wizard.js +5 -4
- package/esm/plugin/Wrapper.d.ts +1 -0
- package/esm/plugin/Wrapper.js +7 -1
- package/esm/renderer/APIControl.d.ts +26 -20
- package/esm/renderer/APIControl.js +5 -4
- package/esm/renderer/BadgeControl.d.ts +2 -2
- package/esm/renderer/BadgeControl.js +1 -1
- package/esm/renderer/DataBindingControl.js +1 -1
- package/esm/renderer/DataMappingControl.js +5 -4
- package/esm/renderer/DataPickerControl.js +2 -2
- 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 +1 -1
- package/esm/renderer/GoConfigControl.js +1 -1
- package/esm/renderer/MapSourceControl.js +1 -1
- package/esm/renderer/NavBadgeControl.d.ts +82 -0
- package/esm/renderer/NavBadgeControl.js +318 -0
- package/esm/renderer/NavDefaultActive.d.ts +19 -0
- package/esm/renderer/NavDefaultActive.js +114 -0
- package/esm/renderer/NavSourceControl.d.ts +68 -0
- package/esm/renderer/NavSourceControl.js +464 -0
- package/esm/renderer/OptionControl.js +1 -1
- package/esm/renderer/RangePartsControl.js +1 -1
- package/esm/renderer/StatusControl.js +5 -4
- 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 +13 -6
- package/esm/renderer/ValidationControl.js +1 -1
- package/esm/renderer/ValidationItem.js +1 -1
- package/esm/renderer/event-control/action-config-dialog.js +7 -5
- 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 +57 -40
- 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.js +1 -1
- 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 +2 -3
- 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 +37 -19
- package/esm/tpl/horizontal.js +1 -1
- package/esm/tpl/layout.js +1 -1
- package/esm/tpl/options.js +9 -1
- package/esm/tpl/remark.js +1 -1
- package/esm/tpl/style.js +1 -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-top.svg.js +1 -1
- package/lib/icons/layout/layout-fixed.svg.js +30 -35
- package/lib/icons/layout/layout-free-container.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 +3 -0
- package/lib/index.js +4 -1
- package/lib/locale/en-US.js +41 -3
- package/lib/locale/zh-CN.js +42 -4
- package/lib/plugin/Alert.d.ts +1 -0
- package/lib/plugin/Alert.js +7 -1
- package/lib/plugin/AnchorNav.js +1 -1
- package/lib/plugin/Audio.d.ts +1 -0
- package/lib/plugin/Audio.js +7 -1
- package/lib/plugin/Avatar.d.ts +1 -0
- package/lib/plugin/Avatar.js +7 -1
- package/lib/plugin/Breadcrumb.js +1 -1
- package/lib/plugin/Button.d.ts +1 -0
- package/lib/plugin/Button.js +15 -6
- package/lib/plugin/ButtonGroup.d.ts +1 -0
- package/lib/plugin/ButtonGroup.js +7 -1
- package/lib/plugin/CRUD.d.ts +22 -0
- package/lib/plugin/CRUD.js +76 -37
- package/lib/plugin/CRUD2.js +4 -3
- package/lib/plugin/Card.d.ts +1 -0
- package/lib/plugin/Card.js +7 -1
- package/lib/plugin/Card2.d.ts +1 -0
- package/lib/plugin/Card2.js +7 -1
- package/lib/plugin/Cards.d.ts +1 -0
- package/lib/plugin/Cards.js +7 -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 +1 -1
- package/lib/plugin/CollapseGroup.js +1 -1
- package/lib/plugin/ColumnToggler.js +1 -1
- package/lib/plugin/Container.d.ts +1 -0
- package/lib/plugin/Container.js +7 -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 +7 -1
- package/lib/plugin/Datetime.d.ts +1 -0
- package/lib/plugin/Datetime.js +7 -1
- package/lib/plugin/Dialog.js +1 -1
- package/lib/plugin/Divider.d.ts +1 -0
- package/lib/plugin/Divider.js +7 -1
- package/lib/plugin/Drawer.js +1 -1
- package/lib/plugin/DropDownButton.d.ts +1 -0
- package/lib/plugin/DropDownButton.js +7 -1
- package/lib/plugin/Each.d.ts +1 -0
- package/lib/plugin/Each.js +7 -1
- package/lib/plugin/Flex.d.ts +1 -0
- package/lib/plugin/Flex.js +7 -1
- package/lib/plugin/Form/ButtonGroupSelect.js +2 -2
- package/lib/plugin/Form/ButtonToolbar.d.ts +1 -0
- package/lib/plugin/Form/ButtonToolbar.js +7 -1
- package/lib/plugin/Form/ChainedSelect.js +1 -1
- package/lib/plugin/Form/Checkbox.d.ts +1 -0
- package/lib/plugin/Form/Checkbox.js +7 -1
- package/lib/plugin/Form/Checkboxes.js +1 -1
- package/lib/plugin/Form/CodeEditor.js +1 -1
- package/lib/plugin/Form/Combo.js +4 -3
- 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.js +1 -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 +1 -0
- package/lib/plugin/Form/InputCity.js +7 -1
- package/lib/plugin/Form/InputColor.d.ts +1 -0
- package/lib/plugin/Form/InputColor.js +7 -1
- package/lib/plugin/Form/InputDate.js +1 -1
- package/lib/plugin/Form/InputDateRange.js +1 -1
- 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 +1 -0
- package/lib/plugin/Form/InputGroup.js +7 -1
- package/lib/plugin/Form/InputImage.js +1 -1
- package/lib/plugin/Form/InputKV.d.ts +1 -0
- package/lib/plugin/Form/InputKV.js +7 -1
- package/lib/plugin/Form/InputMonth.js +1 -1
- package/lib/plugin/Form/InputMonthRange.js +1 -1
- package/lib/plugin/Form/InputNumber.js +1 -1
- 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 +1 -1
- package/lib/plugin/Form/InputRepeat.js +1 -1
- package/lib/plugin/Form/InputRichText.js +1 -3
- package/lib/plugin/Form/InputSubForm.js +1 -1
- package/lib/plugin/Form/InputTable.js +3 -3
- package/lib/plugin/Form/InputTag.d.ts +1 -0
- package/lib/plugin/Form/InputTag.js +7 -1
- package/lib/plugin/Form/InputText.d.ts +1 -0
- package/lib/plugin/Form/InputText.js +7 -1
- package/lib/plugin/Form/InputTime.js +1 -1
- package/lib/plugin/Form/InputTimeRange.js +1 -1
- package/lib/plugin/Form/InputTree.js +4 -3
- 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.d.ts +1 -2
- package/lib/plugin/Form/LocationPicker.js +26 -70
- 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.d.ts +1 -0
- package/lib/plugin/Form/Radios.js +7 -1
- package/lib/plugin/Form/Select.d.ts +1 -0
- package/lib/plugin/Form/Select.js +7 -1
- package/lib/plugin/Form/Static.d.ts +1 -0
- package/lib/plugin/Form/Static.js +7 -1
- package/lib/plugin/Form/Switch.d.ts +1 -0
- package/lib/plugin/Form/Switch.js +7 -1
- 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.js +1 -1
- package/lib/plugin/Form/UUID.js +1 -1
- package/lib/plugin/Grid.d.ts +1 -0
- package/lib/plugin/Grid.js +7 -1
- package/lib/plugin/HBox.d.ts +1 -0
- package/lib/plugin/HBox.js +7 -1
- package/lib/plugin/IFrame.js +4 -3
- package/lib/plugin/Image.d.ts +1 -0
- package/lib/plugin/Image.js +7 -1
- package/lib/plugin/Images.d.ts +1 -0
- package/lib/plugin/Images.js +7 -1
- package/lib/plugin/Json.js +1 -1
- package/lib/plugin/Layout/FlexPluginBase.js +1 -1
- package/lib/plugin/Layout/Layout1_2_v4.d.ts +1 -0
- package/lib/plugin/Layout/Layout_fixed.d.ts +1 -0
- package/lib/plugin/Layout/Layout_fixed.js +7 -1
- package/lib/plugin/Layout/Layout_free_container.js +1 -1
- package/lib/plugin/Layout/Layout_sorption_container.d.ts +1 -0
- package/lib/plugin/Layout/Layout_sorption_container.js +7 -1
- package/lib/plugin/Link.d.ts +1 -0
- package/lib/plugin/Link.js +7 -1
- package/lib/plugin/List.d.ts +1 -0
- package/lib/plugin/List.js +7 -1
- package/lib/plugin/ListItem.d.ts +1 -0
- package/lib/plugin/ListItem.js +7 -1
- package/lib/plugin/Log.js +1 -1
- package/lib/plugin/Mapping.d.ts +1 -0
- package/lib/plugin/Mapping.js +7 -1
- package/lib/plugin/Markdown.d.ts +1 -0
- package/lib/plugin/Markdown.js +7 -1
- package/lib/plugin/Nav.d.ts +6 -2
- package/lib/plugin/Nav.js +228 -27
- 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 +1 -1
- package/lib/plugin/Pagination.js +1 -1
- package/lib/plugin/Panel.js +1 -1
- package/lib/plugin/Plain.js +1 -1
- package/lib/plugin/Progress.d.ts +1 -0
- package/lib/plugin/Progress.js +7 -1
- package/lib/plugin/Property.js +1 -1
- package/lib/plugin/QRCode.d.ts +1 -0
- package/lib/plugin/QRCode.js +7 -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.d.ts +1 -0
- package/lib/plugin/Status.js +7 -1
- package/lib/plugin/Steps.js +1 -1
- package/lib/plugin/Submit.js +1 -1
- package/lib/plugin/Table.js +4 -3
- package/lib/plugin/Table2.js +15 -10
- package/lib/plugin/TableCell2.js +6 -4
- package/lib/plugin/TableView.js +1 -1
- package/lib/plugin/Tabs.js +7 -5
- package/lib/plugin/Tag.js +1 -1
- package/lib/plugin/Tasks.js +1 -1
- package/lib/plugin/Time.js +1 -1
- package/lib/plugin/Timeline.js +1 -1
- package/lib/plugin/TooltipWrapper.d.ts +1 -0
- package/lib/plugin/TooltipWrapper.js +7 -1
- package/lib/plugin/Tpl.d.ts +1 -0
- package/lib/plugin/Tpl.js +10 -3
- package/lib/plugin/Video.js +1 -1
- package/lib/plugin/WebComponent.js +1 -1
- package/lib/plugin/Wizard.js +4 -3
- package/lib/plugin/Wrapper.d.ts +1 -0
- package/lib/plugin/Wrapper.js +7 -1
- package/lib/renderer/APIControl.d.ts +26 -20
- package/lib/renderer/APIControl.js +4 -3
- package/lib/renderer/BadgeControl.d.ts +2 -2
- package/lib/renderer/BadgeControl.js +1 -1
- package/lib/renderer/DataBindingControl.js +1 -1
- package/lib/renderer/DataMappingControl.js +4 -3
- package/lib/renderer/DataPickerControl.js +2 -2
- 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 +1 -1
- package/lib/renderer/GoConfigControl.js +1 -1
- package/lib/renderer/MapSourceControl.js +1 -1
- package/lib/renderer/NavBadgeControl.d.ts +82 -0
- package/lib/renderer/NavBadgeControl.js +327 -0
- package/lib/renderer/NavDefaultActive.d.ts +19 -0
- package/lib/renderer/NavDefaultActive.js +124 -0
- package/lib/renderer/NavSourceControl.d.ts +68 -0
- package/lib/renderer/NavSourceControl.js +475 -0
- package/lib/renderer/OptionControl.js +1 -1
- package/lib/renderer/RangePartsControl.js +1 -1
- package/lib/renderer/StatusControl.js +4 -3
- 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 +13 -6
- package/lib/renderer/ValidationControl.js +1 -1
- package/lib/renderer/ValidationItem.js +1 -1
- package/lib/renderer/event-control/action-config-dialog.js +6 -4
- 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 +56 -39
- 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.js +1 -1
- 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 +2 -3
- 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 +37 -19
- package/lib/tpl/horizontal.js +1 -1
- package/lib/tpl/layout.js +1 -1
- package/lib/tpl/options.js +9 -1
- package/lib/tpl/remark.js +1 -1
- package/lib/tpl/style.js +1 -1
- package/lib/tpl/validations.js +1 -1
- package/lib/util.js +1 -1
- package/lib/validator.js +1 -1
- package/package.json +2 -2
@@ -0,0 +1,82 @@
|
|
1
|
+
/**
|
2
|
+
* @file 角标控件
|
3
|
+
*/
|
4
|
+
import React from 'react';
|
5
|
+
import type { FormControlProps } from 'amis-core';
|
6
|
+
import type { SchemaExpression } from 'amis/lib/Schema';
|
7
|
+
export interface BadgeControlProps extends FormControlProps {
|
8
|
+
/**
|
9
|
+
* 角标类型
|
10
|
+
*/
|
11
|
+
mode?: 'text' | 'dot' | 'ribbon';
|
12
|
+
/**
|
13
|
+
* 角标大小
|
14
|
+
*/
|
15
|
+
size?: any;
|
16
|
+
/**
|
17
|
+
* 角标位置,优先级大于position
|
18
|
+
*/
|
19
|
+
offset?: [number, number];
|
20
|
+
/**
|
21
|
+
* 角标位置
|
22
|
+
*/
|
23
|
+
position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
|
24
|
+
/**
|
25
|
+
* 封顶的数字值
|
26
|
+
*/
|
27
|
+
overflowCount?: number;
|
28
|
+
/**
|
29
|
+
* 提示类型
|
30
|
+
*/
|
31
|
+
level?: 'info' | 'warning' | 'success' | 'danger' | SchemaExpression;
|
32
|
+
}
|
33
|
+
interface BadgeControlState {
|
34
|
+
checked: boolean;
|
35
|
+
}
|
36
|
+
interface BadgeForm extends Partial<Pick<BadgeControlProps, 'mode' | 'text' | 'size' | 'position' | 'overflowCount' | 'visibleOn' | 'animation' | 'style' | 'level'>> {
|
37
|
+
offset: [number, number];
|
38
|
+
}
|
39
|
+
export default class BadgeControl extends React.Component<BadgeControlProps, BadgeControlState> {
|
40
|
+
static defaultProps: {
|
41
|
+
mode: string;
|
42
|
+
overflowCount: number;
|
43
|
+
position: string;
|
44
|
+
level: string;
|
45
|
+
};
|
46
|
+
constructor(props: BadgeControlProps);
|
47
|
+
transformBadgeValue(): BadgeForm;
|
48
|
+
normalizeBadgeValue(form: BadgeForm): {
|
49
|
+
offset: number[];
|
50
|
+
size?: any;
|
51
|
+
style?: {
|
52
|
+
[propName: string]: any;
|
53
|
+
} | undefined;
|
54
|
+
visibleOn?: any;
|
55
|
+
text?: any;
|
56
|
+
mode?: "text" | "dot" | "ribbon" | undefined;
|
57
|
+
animation?: any;
|
58
|
+
level?: string | undefined;
|
59
|
+
position?: "top-right" | "top-left" | "bottom-left" | "bottom-right" | undefined;
|
60
|
+
overflowCount?: number | undefined;
|
61
|
+
} | {
|
62
|
+
offset: [number, number];
|
63
|
+
size?: any;
|
64
|
+
style?: {
|
65
|
+
[propName: string]: any;
|
66
|
+
} | undefined;
|
67
|
+
visibleOn?: any;
|
68
|
+
text?: any;
|
69
|
+
mode?: "text" | "dot" | "ribbon" | undefined;
|
70
|
+
animation?: any;
|
71
|
+
level?: string | undefined;
|
72
|
+
position?: "top-right" | "top-left" | "bottom-left" | "bottom-right" | undefined;
|
73
|
+
overflowCount?: number | undefined;
|
74
|
+
};
|
75
|
+
handleSwitchChange(checked: boolean): void;
|
76
|
+
handleSubmit(form: BadgeForm, action: any): void;
|
77
|
+
renderBody(): JSX.Element;
|
78
|
+
render(): JSX.Element;
|
79
|
+
}
|
80
|
+
export declare class BadgeControlRenderer extends BadgeControl {
|
81
|
+
}
|
82
|
+
export {};
|
@@ -0,0 +1,318 @@
|
|
1
|
+
/**
|
2
|
+
* amis-editor v5.2.5-beta.5
|
3
|
+
* Copyright 2018-2023 @fex
|
4
|
+
*/
|
5
|
+
|
6
|
+
import { __extends, __assign, __decorate, __metadata } from 'tslib';
|
7
|
+
import React__default from 'react';
|
8
|
+
import cx from 'classnames';
|
9
|
+
import { FormItem } from 'amis';
|
10
|
+
import { isObject, getI18nEnabled, defaultValue, tipedLabel, getSchemaTpl, autobind } from 'amis-editor-core';
|
11
|
+
import { i18n } from 'i18n-runtime';
|
12
|
+
|
13
|
+
/**
|
14
|
+
* @file 角标控件
|
15
|
+
*/
|
16
|
+
var BadgeControl = /** @class */function (_super) {
|
17
|
+
__extends(BadgeControl, _super);
|
18
|
+
function BadgeControl(props) {
|
19
|
+
var _this = _super.call(this, props) || this;
|
20
|
+
_this.state = {
|
21
|
+
checked: !!isObject(props === null || props === void 0 ? void 0 : props.value)
|
22
|
+
};
|
23
|
+
return _this;
|
24
|
+
}
|
25
|
+
Object.defineProperty(BadgeControl.prototype, "transformBadgeValue", {
|
26
|
+
enumerable: false,
|
27
|
+
configurable: true,
|
28
|
+
writable: true,
|
29
|
+
value: function () {
|
30
|
+
var _a, _b;
|
31
|
+
var ctx = this.props.data;
|
32
|
+
var badge = (_a = ctx === null || ctx === void 0 ? void 0 : ctx.badge) !== null && _a !== void 0 ? _a : {};
|
33
|
+
// 避免获取到上层的size
|
34
|
+
var size = (_b = ctx === null || ctx === void 0 ? void 0 : ctx.badge) === null || _b === void 0 ? void 0 : _b.size;
|
35
|
+
var offset = [0, 0];
|
36
|
+
// 转换成combo可以识别的格式
|
37
|
+
if (Array.isArray(badge === null || badge === void 0 ? void 0 : badge.offset) && (badge === null || badge === void 0 ? void 0 : badge.offset.length) >= 2) {
|
38
|
+
offset[0] = badge.offset[0];
|
39
|
+
offset[1] = badge.offset[1];
|
40
|
+
}
|
41
|
+
return __assign(__assign({}, badge), {
|
42
|
+
size: size,
|
43
|
+
offset: offset
|
44
|
+
});
|
45
|
+
}
|
46
|
+
});
|
47
|
+
Object.defineProperty(BadgeControl.prototype, "normalizeBadgeValue", {
|
48
|
+
enumerable: false,
|
49
|
+
configurable: true,
|
50
|
+
writable: true,
|
51
|
+
value: function (form) {
|
52
|
+
var _a, _b;
|
53
|
+
var offset = isObject(form === null || form === void 0 ? void 0 : form.offset) && ((_a = form === null || form === void 0 ? void 0 : form.offset) === null || _a === void 0 ? void 0 : _a[0]) && ((_b = form === null || form === void 0 ? void 0 : form.offset) === null || _b === void 0 ? void 0 : _b[1]) ? {
|
54
|
+
offset: [form.offset[0], form.offset[1]]
|
55
|
+
} : {};
|
56
|
+
return __assign(__assign({}, form), offset);
|
57
|
+
}
|
58
|
+
});
|
59
|
+
Object.defineProperty(BadgeControl.prototype, "handleSwitchChange", {
|
60
|
+
enumerable: false,
|
61
|
+
configurable: true,
|
62
|
+
writable: true,
|
63
|
+
value: function (checked) {
|
64
|
+
var _a = this.props,
|
65
|
+
onBulkChange = _a.onBulkChange,
|
66
|
+
data = _a.data;
|
67
|
+
this.setState({
|
68
|
+
checked: checked
|
69
|
+
});
|
70
|
+
if (checked) {
|
71
|
+
if (data.badge) {
|
72
|
+
onBulkChange === null || onBulkChange === void 0 ? void 0 : onBulkChange({
|
73
|
+
badge: data.badge
|
74
|
+
});
|
75
|
+
} else {
|
76
|
+
onBulkChange === null || onBulkChange === void 0 ? void 0 : onBulkChange({
|
77
|
+
badge: {
|
78
|
+
mode: 'dot'
|
79
|
+
}
|
80
|
+
});
|
81
|
+
}
|
82
|
+
} else {
|
83
|
+
onBulkChange === null || onBulkChange === void 0 ? void 0 : onBulkChange({
|
84
|
+
badge: undefined
|
85
|
+
});
|
86
|
+
}
|
87
|
+
}
|
88
|
+
});
|
89
|
+
Object.defineProperty(BadgeControl.prototype, "handleSubmit", {
|
90
|
+
enumerable: false,
|
91
|
+
configurable: true,
|
92
|
+
writable: true,
|
93
|
+
value: function (form, action) {
|
94
|
+
form.visibleOn = '${badge}';
|
95
|
+
if (form.mode === 'dot') {
|
96
|
+
form.text = undefined;
|
97
|
+
} else {
|
98
|
+
form.text = '${badge}';
|
99
|
+
}
|
100
|
+
var onBulkChange = this.props.onBulkChange;
|
101
|
+
if ((action === null || action === void 0 ? void 0 : action.type) === 'submit') {
|
102
|
+
onBulkChange === null || onBulkChange === void 0 ? void 0 : onBulkChange({
|
103
|
+
badge: this.normalizeBadgeValue(form)
|
104
|
+
});
|
105
|
+
}
|
106
|
+
}
|
107
|
+
});
|
108
|
+
Object.defineProperty(BadgeControl.prototype, "renderBody", {
|
109
|
+
enumerable: false,
|
110
|
+
configurable: true,
|
111
|
+
writable: true,
|
112
|
+
value: function () {
|
113
|
+
var render = this.props.render;
|
114
|
+
var data = this.transformBadgeValue();
|
115
|
+
getI18nEnabled();
|
116
|
+
return render('badge-form', {
|
117
|
+
type: 'form',
|
118
|
+
className: 'ae-BadgeControl-form w-full',
|
119
|
+
wrapWithPanel: false,
|
120
|
+
panelClassName: 'border-none shadow-none mb-0',
|
121
|
+
bodyClassName: 'p-none',
|
122
|
+
actionsClassName: 'border-none mt-2.5',
|
123
|
+
wrapperComponent: 'div',
|
124
|
+
preventEnterSubmit: true,
|
125
|
+
submitOnChange: true,
|
126
|
+
body: [{
|
127
|
+
label: i18n("a7999d1390b7dc775e4287511c395d6c"),
|
128
|
+
name: 'mode',
|
129
|
+
type: 'button-group-select',
|
130
|
+
size: 'sm',
|
131
|
+
tiled: true,
|
132
|
+
className: 'ae-BadgeControl-buttonGroup',
|
133
|
+
options: [{
|
134
|
+
label: i18n("be604f8b7ec5e80288b091ee12bbab7f"),
|
135
|
+
value: 'dot'
|
136
|
+
}, {
|
137
|
+
label: i18n("ca746b1ff10193a3ce20878dec04a733"),
|
138
|
+
value: 'text'
|
139
|
+
}, {
|
140
|
+
label: i18n("9adcfe38533f68035b2bf7831d310381"),
|
141
|
+
value: 'ribbon'
|
142
|
+
}],
|
143
|
+
mode: 'horizontal',
|
144
|
+
horizontal: {
|
145
|
+
justify: true,
|
146
|
+
left: 4
|
147
|
+
},
|
148
|
+
pipeIn: defaultValue('dot')
|
149
|
+
}, {
|
150
|
+
label: tipedLabel(i18n("29e13ada94b145a1359291d5e1564655"), i18n("31175366279c15232e27b6736ccb2fd4")),
|
151
|
+
name: 'overflowCount',
|
152
|
+
type: 'input-number',
|
153
|
+
size: 'sm',
|
154
|
+
visibleOn: "data.mode === 'text'",
|
155
|
+
mode: 'horizontal',
|
156
|
+
horizontal: {
|
157
|
+
justify: true,
|
158
|
+
left: 4
|
159
|
+
}
|
160
|
+
}, {
|
161
|
+
label: i18n("58f966670529f4753fb3c5a0647606be"),
|
162
|
+
name: 'size',
|
163
|
+
type: 'input-number',
|
164
|
+
size: 'sm',
|
165
|
+
suffix: 'px',
|
166
|
+
mode: 'horizontal',
|
167
|
+
horizontal: {
|
168
|
+
justify: true,
|
169
|
+
left: 4
|
170
|
+
}
|
171
|
+
}, {
|
172
|
+
label: i18n("9970ad07468267e2f309f1467c75bb80"),
|
173
|
+
name: 'level',
|
174
|
+
type: 'select',
|
175
|
+
size: 'sm',
|
176
|
+
mode: 'horizontal',
|
177
|
+
horizontal: {
|
178
|
+
justify: true,
|
179
|
+
left: 4
|
180
|
+
},
|
181
|
+
tiled: true,
|
182
|
+
className: 'input-select',
|
183
|
+
options: [{
|
184
|
+
label: i18n("330363dfc524cff2488f2ebde0500896"),
|
185
|
+
value: 'success'
|
186
|
+
}, {
|
187
|
+
label: i18n("900c70fa5f7dbc014e6f762d5e0e885c"),
|
188
|
+
value: 'warning'
|
189
|
+
}, {
|
190
|
+
label: i18n("540f84ddc0883866b229f71c2844199a"),
|
191
|
+
value: 'danger'
|
192
|
+
}, {
|
193
|
+
label: i18n("d8c7e04c8e2be23dd3b81a31db6e04f1"),
|
194
|
+
value: 'info'
|
195
|
+
}],
|
196
|
+
pipeIn: defaultValue('danger')
|
197
|
+
}, {
|
198
|
+
label: i18n("d4d2a66820d30e07b44c850eb3f116c0"),
|
199
|
+
name: 'position',
|
200
|
+
type: 'select',
|
201
|
+
size: 'sm',
|
202
|
+
mode: 'horizontal',
|
203
|
+
horizontal: {
|
204
|
+
justify: true,
|
205
|
+
left: 4
|
206
|
+
},
|
207
|
+
tiled: true,
|
208
|
+
className: 'input-select',
|
209
|
+
options: [{
|
210
|
+
label: i18n("df68a5dc8f8847179b7afdf943f80796"),
|
211
|
+
value: 'top-left'
|
212
|
+
}, {
|
213
|
+
label: i18n("e717b4ae480e7c073fd5a44647a7f0da"),
|
214
|
+
value: 'top-right'
|
215
|
+
}, {
|
216
|
+
label: i18n("2a97dfb2d236c87c41fd588f006111dc"),
|
217
|
+
value: 'bottom-left'
|
218
|
+
}, {
|
219
|
+
label: i18n("1c9bc9dab33944e953412f8b22cb024a"),
|
220
|
+
value: 'bottom-right'
|
221
|
+
}],
|
222
|
+
pipeIn: defaultValue('top-right')
|
223
|
+
}, {
|
224
|
+
type: 'group',
|
225
|
+
mode: 'horizontal',
|
226
|
+
horizontal: {
|
227
|
+
justify: true,
|
228
|
+
left: 4
|
229
|
+
},
|
230
|
+
label: tipedLabel(i18n("ebc556841a9264ebaab728efad7af777"), i18n("81cdf47e8d8adfc70faac2cbc55e4067")),
|
231
|
+
body: [{
|
232
|
+
type: 'input-text',
|
233
|
+
name: 'offset[0]',
|
234
|
+
label: false,
|
235
|
+
addOn: {
|
236
|
+
label: 'X',
|
237
|
+
type: 'text',
|
238
|
+
position: 'left'
|
239
|
+
},
|
240
|
+
validateOnChange: true,
|
241
|
+
validations: {
|
242
|
+
isNumeric: true
|
243
|
+
}
|
244
|
+
}, {
|
245
|
+
type: 'input-text',
|
246
|
+
label: false,
|
247
|
+
name: 'offset[1]',
|
248
|
+
addOn: {
|
249
|
+
label: 'Y',
|
250
|
+
type: 'text',
|
251
|
+
position: 'left'
|
252
|
+
},
|
253
|
+
validateOnChange: true,
|
254
|
+
validations: {
|
255
|
+
isNumeric: true
|
256
|
+
}
|
257
|
+
}]
|
258
|
+
}]
|
259
|
+
}, {
|
260
|
+
data: data,
|
261
|
+
onSubmit: this.handleSubmit.bind(this)
|
262
|
+
});
|
263
|
+
}
|
264
|
+
});
|
265
|
+
Object.defineProperty(BadgeControl.prototype, "render", {
|
266
|
+
enumerable: false,
|
267
|
+
configurable: true,
|
268
|
+
writable: true,
|
269
|
+
value: function () {
|
270
|
+
var _this = this;
|
271
|
+
var _a = this.props;
|
272
|
+
_a.classPrefix;
|
273
|
+
var className = _a.className;
|
274
|
+
_a.labelClassName;
|
275
|
+
_a.label;
|
276
|
+
_a.disabled;
|
277
|
+
var render = _a.render;
|
278
|
+
var checked = this.state.checked;
|
279
|
+
return React__default.createElement("div", {
|
280
|
+
className: cx('ae-BadgeControl', className)
|
281
|
+
}, render('', getSchemaTpl('switch', {
|
282
|
+
label: tipedLabel(i18n("b8c467fce096a649583c0bc9d9281a5c"), i18n("b3c1b71ed42c7f2fe55f3c64346f1ae6")),
|
283
|
+
name: 'checked',
|
284
|
+
mode: 'horizontal',
|
285
|
+
value: checked,
|
286
|
+
onChange: function (checked) {
|
287
|
+
return _this.handleSwitchChange(checked);
|
288
|
+
}
|
289
|
+
})), checked ? this.renderBody() : null);
|
290
|
+
}
|
291
|
+
});
|
292
|
+
Object.defineProperty(BadgeControl, "defaultProps", {
|
293
|
+
enumerable: true,
|
294
|
+
configurable: true,
|
295
|
+
writable: true,
|
296
|
+
value: {
|
297
|
+
mode: 'dot',
|
298
|
+
overflowCount: 99,
|
299
|
+
position: 'top-right',
|
300
|
+
level: 'danger'
|
301
|
+
}
|
302
|
+
});
|
303
|
+
__decorate([autobind, __metadata("design:type", Function), __metadata("design:paramtypes", [Boolean]), __metadata("design:returntype", void 0)], BadgeControl.prototype, "handleSwitchChange", null);
|
304
|
+
return BadgeControl;
|
305
|
+
}(React__default.Component);
|
306
|
+
/** @class */(function (_super) {
|
307
|
+
__extends(BadgeControlRenderer, _super);
|
308
|
+
function BadgeControlRenderer() {
|
309
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
310
|
+
}
|
311
|
+
BadgeControlRenderer = __decorate([FormItem({
|
312
|
+
type: 'ae-nav-badge',
|
313
|
+
renderLabel: false
|
314
|
+
})], BadgeControlRenderer);
|
315
|
+
return BadgeControlRenderer;
|
316
|
+
})(BadgeControl);
|
317
|
+
|
318
|
+
export { BadgeControl as default };
|
@@ -0,0 +1,19 @@
|
|
1
|
+
/**
|
2
|
+
* @file 角标控件
|
3
|
+
*/
|
4
|
+
import React from 'react';
|
5
|
+
import type { FormControlProps } from 'amis-core';
|
6
|
+
export interface BadgeControlProps extends FormControlProps {
|
7
|
+
}
|
8
|
+
interface BadgeControlState {
|
9
|
+
}
|
10
|
+
export default class NavDefaultActiveControl extends React.Component<BadgeControlProps, BadgeControlState> {
|
11
|
+
activeKey: string;
|
12
|
+
constructor(props: BadgeControlProps);
|
13
|
+
deleteActive(data: any): void;
|
14
|
+
findActiveKey(data: any, index?: string): void;
|
15
|
+
render(): JSX.Element;
|
16
|
+
}
|
17
|
+
export declare class NavDefaultActive extends NavDefaultActiveControl {
|
18
|
+
}
|
19
|
+
export {};
|
@@ -0,0 +1,114 @@
|
|
1
|
+
/**
|
2
|
+
* amis-editor v5.2.5-beta.5
|
3
|
+
* Copyright 2018-2023 @fex
|
4
|
+
*/
|
5
|
+
|
6
|
+
import { __extends, __decorate } from 'tslib';
|
7
|
+
import React__default from 'react';
|
8
|
+
import { FormItem } from 'amis';
|
9
|
+
import { tipedLabel } from 'amis-editor-core';
|
10
|
+
import set from 'lodash/set';
|
11
|
+
import get from 'lodash/get';
|
12
|
+
import { i18n } from 'i18n-runtime';
|
13
|
+
|
14
|
+
/**
|
15
|
+
* @file 角标控件
|
16
|
+
*/
|
17
|
+
var NavDefaultActiveControl = /** @class */function (_super) {
|
18
|
+
__extends(NavDefaultActiveControl, _super);
|
19
|
+
function NavDefaultActiveControl(props) {
|
20
|
+
var _this = _super.call(this, props) || this;
|
21
|
+
Object.defineProperty(_this, "activeKey", {
|
22
|
+
enumerable: true,
|
23
|
+
configurable: true,
|
24
|
+
writable: true,
|
25
|
+
value: void 0
|
26
|
+
});
|
27
|
+
return _this;
|
28
|
+
}
|
29
|
+
Object.defineProperty(NavDefaultActiveControl.prototype, "deleteActive", {
|
30
|
+
enumerable: false,
|
31
|
+
configurable: true,
|
32
|
+
writable: true,
|
33
|
+
value: function (data) {
|
34
|
+
for (var _i = 0, data_1 = data; _i < data_1.length; _i++) {
|
35
|
+
var item = data_1[_i];
|
36
|
+
if (item.active) {
|
37
|
+
delete item.active;
|
38
|
+
}
|
39
|
+
if (item.children) {
|
40
|
+
this.deleteActive(item.children);
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}
|
44
|
+
});
|
45
|
+
Object.defineProperty(NavDefaultActiveControl.prototype, "findActiveKey", {
|
46
|
+
enumerable: false,
|
47
|
+
configurable: true,
|
48
|
+
writable: true,
|
49
|
+
value: function (data, index) {
|
50
|
+
for (var i = 0; i < data.length; i++) {
|
51
|
+
var item = data[i];
|
52
|
+
if (item.active) {
|
53
|
+
this.activeKey = index ? "".concat(index, "_").concat(i) : "".concat(i);
|
54
|
+
return;
|
55
|
+
}
|
56
|
+
if (item.children && item.children.length) {
|
57
|
+
this.findActiveKey(item.children, "".concat(i));
|
58
|
+
}
|
59
|
+
}
|
60
|
+
}
|
61
|
+
});
|
62
|
+
Object.defineProperty(NavDefaultActiveControl.prototype, "render", {
|
63
|
+
enumerable: false,
|
64
|
+
configurable: true,
|
65
|
+
writable: true,
|
66
|
+
value: function () {
|
67
|
+
var _this = this;
|
68
|
+
var _a = this.props,
|
69
|
+
render = _a.render,
|
70
|
+
data = _a.data,
|
71
|
+
onBulkChange = _a.onBulkChange;
|
72
|
+
this.findActiveKey(data.links);
|
73
|
+
return render('', {
|
74
|
+
type: 'tree-select',
|
75
|
+
name: 'treeSelect',
|
76
|
+
label: tipedLabel(i18n("515e8b11c3c24c6c3b03c6c76b1da496"), i18n("4f80ea1e761598ba9fe393e7c745468d")),
|
77
|
+
valueField: 'id',
|
78
|
+
options: data.links,
|
79
|
+
mode: 'horizontal',
|
80
|
+
value: this.activeKey,
|
81
|
+
horizontal: {
|
82
|
+
justify: true,
|
83
|
+
left: 4
|
84
|
+
},
|
85
|
+
onChange: function (value) {
|
86
|
+
var pathArr = value && value.split('_') || [];
|
87
|
+
var links = data.links;
|
88
|
+
_this.deleteActive(links);
|
89
|
+
var path = "[".concat(pathArr.join('].children['), "]");
|
90
|
+
if (get(links, path + '.label')) {
|
91
|
+
set(links, path + '.active', true);
|
92
|
+
}
|
93
|
+
onBulkChange && onBulkChange({
|
94
|
+
links: links
|
95
|
+
});
|
96
|
+
}
|
97
|
+
});
|
98
|
+
}
|
99
|
+
});
|
100
|
+
return NavDefaultActiveControl;
|
101
|
+
}(React__default.Component);
|
102
|
+
/** @class */(function (_super) {
|
103
|
+
__extends(NavDefaultActive, _super);
|
104
|
+
function NavDefaultActive() {
|
105
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
106
|
+
}
|
107
|
+
NavDefaultActive = __decorate([FormItem({
|
108
|
+
type: 'ae-nav-default-active',
|
109
|
+
renderLabel: false
|
110
|
+
})], NavDefaultActive);
|
111
|
+
return NavDefaultActive;
|
112
|
+
})(NavDefaultActiveControl);
|
113
|
+
|
114
|
+
export { NavDefaultActiveControl as default };
|
@@ -0,0 +1,68 @@
|
|
1
|
+
/**
|
2
|
+
* @file 组件选项组件的可视化编辑控件
|
3
|
+
*/
|
4
|
+
import React from 'react';
|
5
|
+
import Sortable from 'sortablejs';
|
6
|
+
import type { FormControlProps } from 'amis-core';
|
7
|
+
import { SchemaApi } from 'amis/lib/Schema';
|
8
|
+
export type valueType = 'text' | 'boolean' | 'number';
|
9
|
+
export type NavControlItem = {
|
10
|
+
label: string;
|
11
|
+
to: string;
|
12
|
+
target: string;
|
13
|
+
icon?: string;
|
14
|
+
unfolded?: boolean;
|
15
|
+
active?: boolean;
|
16
|
+
activeOn?: string;
|
17
|
+
overflow?: {
|
18
|
+
enable: boolean;
|
19
|
+
overflowLabel: string;
|
20
|
+
overflowIndicator: string;
|
21
|
+
maxVisibleCount: number;
|
22
|
+
};
|
23
|
+
children?: Array<any>;
|
24
|
+
};
|
25
|
+
export interface NavControlProps extends FormControlProps {
|
26
|
+
}
|
27
|
+
export interface OptionControlState {
|
28
|
+
links: Array<NavControlItem>;
|
29
|
+
api: SchemaApi;
|
30
|
+
source: 'custom' | 'api' | 'apicenter';
|
31
|
+
}
|
32
|
+
type IconType = {
|
33
|
+
id: string;
|
34
|
+
name: string;
|
35
|
+
};
|
36
|
+
export default class NavSourceControl extends React.Component<NavControlProps, OptionControlState> {
|
37
|
+
sortable?: Sortable;
|
38
|
+
drag?: HTMLElement | null;
|
39
|
+
target: HTMLElement | null;
|
40
|
+
$comp: string;
|
41
|
+
internalProps: string[];
|
42
|
+
constructor(props: NavControlProps);
|
43
|
+
transformOptions(props: NavControlProps): any[];
|
44
|
+
/**
|
45
|
+
* 更新options字段的统一出口
|
46
|
+
*/
|
47
|
+
onChange(): void;
|
48
|
+
/**
|
49
|
+
* 切换选项类型
|
50
|
+
*/
|
51
|
+
handleSourceChange(source: 'custom' | 'api' | 'apicenter'): void;
|
52
|
+
/**
|
53
|
+
* 删除选项
|
54
|
+
*/
|
55
|
+
handleDelete(index: string): void;
|
56
|
+
handleAdd(): void;
|
57
|
+
renderHeader(): JSX.Element;
|
58
|
+
handleEditLabel(index: string, value: string | boolean | IconType, key: string): void;
|
59
|
+
handleAddChildren(index: string, value: boolean): void;
|
60
|
+
renderNav(props: any): JSX.Element;
|
61
|
+
renderOption(props: any): JSX.Element;
|
62
|
+
handleAPIChange(source: SchemaApi): void;
|
63
|
+
renderApiPanel(): JSX.Element | null;
|
64
|
+
render(): JSX.Element;
|
65
|
+
}
|
66
|
+
export declare class NavSourceControlRenderer extends NavSourceControl {
|
67
|
+
}
|
68
|
+
export {};
|