amis 1.4.2-beta.1 → 1.4.2-beta.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Schema.d.ts +11 -3
- package/lib/Schema.js.map +1 -1
- package/lib/components/AnchorNav.d.ts +22 -21
- package/lib/components/AnchorNav.js +7 -3
- package/lib/components/AnchorNav.js.map +2 -2
- package/lib/components/ArrayInput.d.ts +84 -84
- package/lib/components/AssociatedSelection.d.ts +930 -0
- package/lib/components/AssociatedSelection.js +89 -0
- package/lib/components/AssociatedSelection.js.map +13 -0
- package/lib/components/Badge.js +2 -2
- package/lib/components/Badge.js.map +2 -2
- package/lib/components/{ChainedCheckboxes.d.ts → ChainedSelection.d.ts} +267 -98
- package/lib/components/{ChainedCheckboxes.js → ChainedSelection.js} +30 -24
- package/lib/components/ChainedSelection.js.map +13 -0
- package/lib/components/Checkbox.d.ts +20 -20
- package/lib/components/Collapse.d.ts +51 -23
- package/lib/components/Collapse.js +69 -11
- package/lib/components/Collapse.js.map +2 -2
- package/lib/components/CollapseGroup.d.ts +88 -0
- package/lib/components/CollapseGroup.js +81 -0
- package/lib/components/CollapseGroup.js.map +13 -0
- package/lib/components/ColorPicker.d.ts +84 -84
- package/lib/components/DatePicker.d.ts +84 -84
- package/lib/components/DateRangePicker.d.ts +84 -84
- package/lib/components/Editor.d.ts +84 -84
- package/lib/components/GridNav.d.ts +52 -0
- package/lib/components/GridNav.js +123 -0
- package/lib/components/GridNav.js.map +13 -0
- package/lib/components/GroupedSelection.d.ts +907 -0
- package/lib/components/GroupedSelection.js +48 -0
- package/lib/components/GroupedSelection.js.map +13 -0
- package/lib/components/InputBox.d.ts +22 -21
- package/lib/components/InputBox.js +10 -2
- package/lib/components/InputBox.js.map +2 -2
- package/lib/components/Link.d.ts +29 -36
- package/lib/components/Link.js +14 -15
- package/lib/components/Link.js.map +2 -2
- package/lib/components/ListGroup.d.ts +21 -21
- package/lib/components/ModalManager.js +1 -1
- package/lib/components/ModalManager.js.map +2 -2
- package/lib/components/MonthRangePicker.d.ts +84 -84
- package/lib/components/NumberInput.d.ts +20 -20
- package/lib/components/PickerColumn.d.ts +514 -0
- package/lib/components/PickerColumn.js +279 -0
- package/lib/components/PickerColumn.js.map +13 -0
- package/lib/components/PickerContainer.d.ts +513 -0
- package/lib/components/PickerContainer.js +96 -0
- package/lib/components/PickerContainer.js.map +13 -0
- package/lib/components/Radios.d.ts +22 -21
- package/lib/components/Radios.js +1 -0
- package/lib/components/Radios.js.map +2 -2
- package/lib/components/Rating.d.ts +21 -21
- package/lib/components/ResultBox.d.ts +84 -84
- package/lib/components/ResultBox.js +10 -2
- package/lib/components/ResultBox.js.map +2 -2
- package/lib/components/SearchBox.d.ts +84 -84
- package/lib/components/SearchBox.js +4 -4
- package/lib/components/SearchBox.js.map +2 -2
- package/lib/components/Select.d.ts +245 -237
- package/lib/components/Select.js +25 -4
- package/lib/components/Select.js.map +2 -2
- package/lib/components/{Checkboxes.d.ts → Selection.d.ts} +273 -98
- package/lib/components/Selection.js +134 -0
- package/lib/components/Selection.js.map +13 -0
- package/lib/components/{TableCheckboxes.d.ts → TableSelection.d.ts} +266 -96
- package/lib/components/{TableCheckboxes.js → TableSelection.js} +30 -30
- package/lib/components/TableSelection.js.map +13 -0
- package/lib/components/Tabs.d.ts +20 -20
- package/lib/components/TabsTransfer.d.ts +84 -84
- package/lib/components/TabsTransfer.js +9 -9
- package/lib/components/TabsTransfer.js.map +2 -2
- package/lib/components/TabsTransferPicker.d.ts +489 -0
- package/lib/components/TabsTransferPicker.js +60 -0
- package/lib/components/TabsTransferPicker.js.map +13 -0
- package/lib/components/Toast.d.ts +86 -85
- package/lib/components/Toast.js +6 -3
- package/lib/components/Toast.js.map +2 -2
- package/lib/components/Transfer.d.ts +908 -274
- package/lib/components/Transfer.js +31 -24
- package/lib/components/Transfer.js.map +2 -2
- package/lib/components/TransferDropDown.d.ts +488 -0
- package/lib/components/TransferDropDown.js +59 -0
- package/lib/components/TransferDropDown.js.map +13 -0
- package/lib/components/TransferPicker.d.ts +493 -0
- package/lib/components/TransferPicker.js +60 -0
- package/lib/components/TransferPicker.js.map +13 -0
- package/lib/components/Tree.d.ts +115 -84
- package/lib/components/Tree.js +183 -30
- package/lib/components/Tree.js.map +2 -2
- package/lib/components/{TreeCheckboxes.d.ts → TreeSelection.d.ts} +269 -99
- package/lib/components/{TreeCheckboxes.js → TreeSelection.js} +36 -32
- package/lib/components/TreeSelection.js.map +13 -0
- package/lib/components/WithRemoteConfig.js +1 -1
- package/lib/components/WithRemoteConfig.js.map +2 -2
- package/lib/components/condition-builder/Field.js +5 -2
- package/lib/components/condition-builder/Field.js.map +2 -2
- package/lib/components/condition-builder/Func.js +2 -2
- package/lib/components/condition-builder/Func.js.map +2 -2
- package/lib/components/condition-builder/InputSwitch.js +2 -2
- package/lib/components/condition-builder/InputSwitch.js.map +2 -2
- package/lib/components/condition-builder/Item.js +3 -3
- package/lib/components/condition-builder/Item.js.map +2 -2
- package/lib/components/icons.js +2 -0
- package/lib/components/icons.js.map +2 -2
- package/lib/components/index.d.ts +8 -8
- package/lib/components/index.js +16 -16
- package/lib/components/index.js.map +2 -2
- package/lib/envOverwrite.d.ts +1 -1
- package/lib/envOverwrite.js +24 -9
- package/lib/envOverwrite.js.map +2 -2
- package/lib/factory.d.ts +15 -1
- package/lib/factory.js +35 -6
- package/lib/factory.js.map +2 -2
- package/lib/helper.css.map +1 -1
- package/lib/hooks/index.d.ts +5 -0
- package/lib/hooks/index.js +14 -0
- package/lib/hooks/index.js.map +13 -0
- package/lib/hooks/use-set-state.d.ts +2 -0
- package/lib/hooks/use-set-state.js +15 -0
- package/lib/hooks/use-set-state.js.map +13 -0
- package/lib/hooks/use-touch.d.ts +16 -0
- package/lib/hooks/use-touch.js +73 -0
- package/lib/hooks/use-touch.js.map +13 -0
- package/lib/hooks/use-update-effect.d.ts +3 -0
- package/lib/hooks/use-update-effect.js +17 -0
- package/lib/hooks/use-update-effect.js.map +13 -0
- package/lib/icons/download.js +7 -0
- package/lib/icons/drag-bar.js +10 -3
- package/lib/index.d.ts +5 -0
- package/lib/index.js +6 -1
- package/lib/index.js.map +2 -2
- package/lib/locale/de-DE.js +2 -0
- package/lib/locale/de-DE.js.map +2 -2
- package/lib/locale/en-US.js +3 -0
- package/lib/locale/en-US.js.map +2 -2
- package/lib/locale/zh-CN.js +5 -2
- package/lib/locale/zh-CN.js.map +2 -2
- package/lib/renderers/Action.d.ts +4 -3
- package/lib/renderers/Action.js +17 -4
- package/lib/renderers/Action.js.map +2 -2
- package/lib/renderers/AnchorNav.d.ts +1 -0
- package/lib/renderers/AnchorNav.js +2 -2
- package/lib/renderers/AnchorNav.js.map +2 -2
- package/lib/renderers/Avatar.js +3 -3
- package/lib/renderers/Avatar.js.map +2 -2
- package/lib/renderers/Breadcrumb.js +1 -1
- package/lib/renderers/Breadcrumb.js.map +2 -2
- package/lib/renderers/CRUD.d.ts +9 -0
- package/lib/renderers/CRUD.js +24 -4
- package/lib/renderers/CRUD.js.map +2 -2
- package/lib/renderers/Card.d.ts +4 -0
- package/lib/renderers/Card.js +29 -23
- package/lib/renderers/Card.js.map +2 -2
- package/lib/renderers/Chart.js +1 -1
- package/lib/renderers/Chart.js.map +2 -2
- package/lib/renderers/Collapse.d.ts +25 -20
- package/lib/renderers/Collapse.js +10 -72
- package/lib/renderers/Collapse.js.map +2 -2
- package/lib/renderers/CollapseGroup.d.ts +42 -0
- package/lib/renderers/CollapseGroup.js +33 -0
- package/lib/renderers/CollapseGroup.js.map +13 -0
- package/lib/renderers/DropDownButton.js +1 -1
- package/lib/renderers/DropDownButton.js.map +2 -2
- package/lib/renderers/Form/DiffEditor.d.ts +4 -3
- package/lib/renderers/Form/Editor.d.ts +3 -2
- package/lib/renderers/Form/InputCity.d.ts +84 -84
- package/lib/renderers/Form/InputCity.js +7 -6
- package/lib/renderers/Form/InputCity.js.map +2 -2
- package/lib/renderers/Form/InputColor.d.ts +84 -84
- package/lib/renderers/Form/InputFile.d.ts +6 -0
- package/lib/renderers/Form/InputFile.js +28 -8
- package/lib/renderers/Form/InputFile.js.map +2 -2
- package/lib/renderers/Form/InputImage.js +11 -4
- package/lib/renderers/Form/InputImage.js.map +2 -2
- package/lib/renderers/Form/Item.d.ts +1 -1
- package/lib/renderers/Form/Item.js +2 -1
- package/lib/renderers/Form/Item.js.map +2 -2
- package/lib/renderers/Form/Options.js +13 -3
- package/lib/renderers/Form/Options.js.map +2 -2
- package/lib/renderers/Form/Select.d.ts +42 -4
- package/lib/renderers/Form/Select.js +37 -3
- package/lib/renderers/Form/Select.js.map +2 -2
- package/lib/renderers/Form/TabsTransferPicker.d.ts +48 -0
- package/lib/renderers/Form/TabsTransferPicker.js +29 -0
- package/lib/renderers/Form/TabsTransferPicker.js.map +13 -0
- package/lib/renderers/Form/Transfer.js +18 -3
- package/lib/renderers/Form/Transfer.js.map +2 -2
- package/lib/renderers/Form/TransferPicker.d.ts +52 -0
- package/lib/renderers/Form/TransferPicker.js +43 -0
- package/lib/renderers/Form/TransferPicker.js.map +13 -0
- package/lib/renderers/Form/TreeSelect.js +2 -2
- package/lib/renderers/Form/TreeSelect.js.map +2 -2
- package/lib/renderers/Form/index.d.ts +5 -0
- package/lib/renderers/Form/index.js +5 -3
- package/lib/renderers/Form/index.js.map +2 -2
- package/lib/renderers/Form/wrapControl.js +13 -1
- package/lib/renderers/Form/wrapControl.js.map +2 -2
- package/lib/renderers/GridNav.d.ts +99 -0
- package/lib/renderers/GridNav.js +82 -0
- package/lib/renderers/GridNav.js.map +13 -0
- package/lib/renderers/IFrame.js +1 -3
- package/lib/renderers/IFrame.js.map +2 -2
- package/lib/renderers/Json.d.ts +4 -0
- package/lib/renderers/Json.js +4 -13
- package/lib/renderers/Json.js.map +2 -2
- package/lib/renderers/Link.d.ts +4 -2
- package/lib/renderers/Link.js +15 -6
- package/lib/renderers/Link.js.map +2 -2
- package/lib/renderers/List.js +1 -1
- package/lib/renderers/List.js.map +2 -2
- package/lib/renderers/Mapping.d.ts +9 -2
- package/lib/renderers/Mapping.js +18 -6
- package/lib/renderers/Mapping.js.map +2 -2
- package/lib/renderers/Nav.d.ts +21 -21
- package/lib/renderers/Nav.js +39 -21
- package/lib/renderers/Nav.js.map +2 -2
- package/lib/renderers/Portlet.d.ts +125 -0
- package/lib/renderers/Portlet.js +156 -0
- package/lib/renderers/Portlet.js.map +13 -0
- package/lib/renderers/Property.js +2 -1
- package/lib/renderers/Property.js.map +2 -2
- package/lib/renderers/SearchBox.d.ts +6 -1
- package/lib/renderers/SearchBox.js +19 -5
- package/lib/renderers/SearchBox.js.map +2 -2
- package/lib/renderers/Table/TableContent.d.ts +4 -1
- package/lib/renderers/Table/TableContent.js +21 -1
- package/lib/renderers/Table/TableContent.js.map +2 -2
- package/lib/renderers/Table/index.d.ts +5 -1
- package/lib/renderers/Table/index.js +65 -30
- package/lib/renderers/Table/index.js.map +2 -2
- package/lib/renderers/Tabs.js +9 -1
- package/lib/renderers/Tabs.js.map +2 -2
- package/lib/renderers/WebComponent.js +1 -1
- package/lib/renderers/WebComponent.js.map +2 -2
- package/lib/store/combo.d.ts +2 -16
- package/lib/store/crud.js +3 -7
- package/lib/store/crud.js.map +2 -2
- package/lib/store/form.d.ts +1 -1
- package/lib/store/form.js +5 -6
- package/lib/store/form.js.map +2 -2
- package/lib/store/formItem.js +44 -4
- package/lib/store/formItem.js.map +2 -2
- package/lib/store/service.js +5 -4
- package/lib/store/service.js.map +2 -2
- package/lib/store/table.d.ts +3 -2
- package/lib/store/table.js +35 -12
- package/lib/store/table.js.map +2 -2
- package/lib/themes/ang-ie11.css +689 -175
- package/lib/themes/ang.css +689 -175
- package/lib/themes/ang.css.map +1 -1
- package/lib/themes/antd-ie11.css +689 -175
- package/lib/themes/antd.css +689 -175
- package/lib/themes/antd.css.map +1 -1
- package/lib/themes/cxd-ie11.css +728 -213
- package/lib/themes/cxd.css +728 -213
- package/lib/themes/cxd.css.map +1 -1
- package/lib/themes/dark-ie11.css +689 -175
- package/lib/themes/dark.css +689 -175
- package/lib/themes/dark.css.map +1 -1
- package/lib/themes/default.css +728 -213
- package/lib/themes/default.css.map +1 -1
- package/lib/types.d.ts +38 -1
- package/lib/types.js +0 -5
- package/lib/types.js.map +2 -2
- package/lib/utils/api.d.ts +4 -2
- package/lib/utils/api.js +104 -17
- package/lib/utils/api.js.map +2 -2
- package/lib/utils/dom.d.ts +4 -0
- package/lib/utils/dom.js +11 -1
- package/lib/utils/dom.js.map +2 -2
- package/lib/utils/helper.d.ts +8 -0
- package/lib/utils/helper.js +28 -2
- package/lib/utils/helper.js.map +2 -2
- package/lib/utils/icon.js +3 -0
- package/lib/utils/icon.js.map +2 -2
- package/package.json +1 -1
- package/schema.json +3326 -836
- package/scss/_mixins.scss +1 -3
- package/scss/_properties.scss +25 -1
- package/scss/base/_common.scss +3 -0
- package/scss/base/_normalize.scss +2 -0
- package/scss/components/_anchor-nav.scss +89 -29
- package/scss/components/_card.scss +8 -14
- package/scss/components/_collapse-group.scss +11 -0
- package/scss/components/_collapse.scss +48 -22
- package/scss/components/_grid-nav.scss +128 -0
- package/scss/components/_input-box.scss +1 -0
- package/scss/components/_mapping.scss +6 -0
- package/scss/components/_nav.scss +2 -2
- package/scss/components/_picker-columns.scss +124 -0
- package/scss/components/_popover.scss +13 -0
- package/scss/components/_portlet.scss +51 -0
- package/scss/components/_result-box.scss +1 -0
- package/scss/components/_spinner.scss +5 -4
- package/scss/components/_status.scss +1 -1
- package/scss/components/_table.scss +32 -0
- package/scss/components/form/_checks.scss +0 -351
- package/scss/components/form/_combo.scss +4 -0
- package/scss/components/form/_fieldset.scss +5 -1
- package/scss/components/form/_file.scss +11 -0
- package/scss/components/form/_form.scss +48 -0
- package/scss/components/form/_selection.scss +354 -0
- package/scss/components/form/_transfer.scss +75 -18
- package/scss/components/form/_tree.scss +42 -0
- package/scss/themes/_common.scss +7 -0
- package/scss/themes/_cxd-variables.scss +8 -6
- package/scss/themes/cxd.scss +17 -12
- package/sdk/ang-ie11.css +786 -196
- package/sdk/ang.css +820 -213
- package/sdk/antd-ie11.css +786 -196
- package/sdk/antd.css +820 -213
- package/sdk/charts.js +13 -13
- package/sdk/color-picker.js +65 -69
- package/sdk/cropperjs.js +2 -2
- package/sdk/cxd-ie11.css +825 -236
- package/sdk/cxd.css +862 -254
- package/sdk/dark-ie11.css +787 -197
- package/sdk/dark.css +820 -213
- package/sdk/exceljs.js +1 -1
- package/sdk/helper.css.map +1 -1
- package/sdk/iconfont.svg +2513 -0
- package/sdk/iconfont.ttf +0 -0
- package/sdk/iconfont.woff +0 -0
- package/sdk/locale/de-DE.js +2 -0
- package/sdk/markdown.js +69 -69
- package/sdk/papaparse.js +1 -1
- package/sdk/renderers/Form/CityDB.js +1 -1
- package/sdk/rest.js +20 -28
- package/sdk/rich-text.js +62 -62
- package/sdk/sdk-ie11.css +825 -236
- package/sdk/sdk.css +862 -254
- package/sdk/sdk.js +1243 -1175
- package/sdk/thirds/hls.js/hls.js +1 -1
- package/sdk/thirds/mpegts.js/mpegts.js +1 -1
- package/sdk/tinymce.js +57 -57
- package/src/Schema.ts +19 -1
- package/src/components/AnchorNav.tsx +15 -4
- package/src/components/{AssociatedCheckboxes.tsx → AssociatedSelection.tsx} +43 -37
- package/src/components/Badge.tsx +3 -3
- package/src/components/{ChainedCheckboxes.tsx → ChainedSelection.tsx} +57 -40
- package/src/components/Collapse.tsx +144 -20
- package/src/components/CollapseGroup.tsx +130 -0
- package/src/components/GridNav.tsx +233 -0
- package/src/components/{ListCheckboxes.tsx → GroupedSelection.tsx} +26 -21
- package/src/components/InputBox.tsx +10 -9
- package/src/components/Link.tsx +28 -37
- package/src/components/ModalManager.ts +1 -1
- package/src/components/PickerColumn.tsx +429 -0
- package/src/components/PickerContainer.tsx +128 -0
- package/src/components/Radios.tsx +3 -8
- package/src/components/ResultBox.tsx +9 -9
- package/src/components/SearchBox.tsx +4 -5
- package/src/components/Select.tsx +57 -5
- package/src/components/{Checkboxes.tsx → Selection.tsx} +75 -21
- package/src/components/{TableCheckboxes.tsx → TableSelection.tsx} +46 -25
- package/src/components/TabsTransfer.tsx +13 -7
- package/src/components/TabsTransferPicker.tsx +85 -0
- package/src/components/Toast.tsx +23 -16
- package/src/components/Transfer.tsx +71 -50
- package/src/components/TransferDropDown.tsx +120 -0
- package/src/components/TransferPicker.tsx +91 -0
- package/src/components/Tree.tsx +194 -8
- package/src/components/{TreeCheckboxes.tsx → TreeSelection.tsx} +33 -26
- package/src/components/WithRemoteConfig.tsx +7 -2
- package/src/components/condition-builder/Field.tsx +5 -5
- package/src/components/condition-builder/Func.tsx +3 -3
- package/src/components/condition-builder/InputSwitch.tsx +3 -3
- package/src/components/condition-builder/Item.tsx +5 -12
- package/src/components/icons.tsx +2 -0
- package/src/components/index.tsx +13 -13
- package/src/envOverwrite.ts +20 -8
- package/src/factory.tsx +70 -9
- package/src/hooks/index.ts +5 -0
- package/src/hooks/use-set-state.ts +19 -0
- package/src/hooks/use-touch.ts +100 -0
- package/src/hooks/use-update-effect.ts +16 -0
- package/src/icons/download.svg +4 -0
- package/src/icons/drag-bar.svg +12 -6
- package/src/index.tsx +5 -0
- package/src/locale/de-DE.ts +2 -0
- package/src/locale/en-US.ts +3 -0
- package/src/locale/zh-CN.ts +5 -2
- package/src/renderers/Action.tsx +28 -2
- package/src/renderers/AnchorNav.tsx +4 -0
- package/src/renderers/Avatar.tsx +8 -4
- package/src/renderers/Breadcrumb.tsx +5 -1
- package/src/renderers/CRUD.tsx +33 -3
- package/src/renderers/Card.tsx +63 -34
- package/src/renderers/Chart.tsx +6 -2
- package/src/renderers/Collapse.tsx +70 -115
- package/src/renderers/CollapseGroup.tsx +80 -0
- package/src/renderers/DropDownButton.tsx +1 -1
- package/src/renderers/Form/InputCity.tsx +4 -8
- package/src/renderers/Form/InputFile.tsx +65 -24
- package/src/renderers/Form/InputImage.tsx +11 -3
- package/src/renderers/Form/Item.tsx +3 -2
- package/src/renderers/Form/Options.tsx +16 -2
- package/src/renderers/Form/Select.tsx +162 -21
- package/src/renderers/Form/TabsTransferPicker.tsx +123 -0
- package/src/renderers/Form/Transfer.tsx +19 -4
- package/src/renderers/Form/TransferPicker.tsx +145 -0
- package/src/renderers/Form/TreeSelect.tsx +25 -0
- package/src/renderers/Form/index.tsx +15 -2
- package/src/renderers/Form/wrapControl.tsx +26 -1
- package/src/renderers/GridNav.tsx +204 -0
- package/src/renderers/IFrame.tsx +2 -4
- package/src/renderers/Json.tsx +9 -9
- package/src/renderers/Link.tsx +27 -13
- package/src/renderers/List.tsx +1 -1
- package/src/renderers/Mapping.tsx +27 -11
- package/src/renderers/Nav.tsx +108 -60
- package/src/renderers/Portlet.tsx +423 -0
- package/src/renderers/Property.tsx +3 -2
- package/src/renderers/SearchBox.tsx +23 -4
- package/src/renderers/Table/TableContent.tsx +40 -2
- package/src/renderers/Table/index.tsx +88 -43
- package/src/renderers/Tabs.tsx +9 -1
- package/src/renderers/WebComponent.tsx +2 -2
- package/src/store/crud.ts +3 -8
- package/src/store/form.ts +5 -10
- package/src/store/formItem.ts +94 -2
- package/src/store/service.ts +5 -4
- package/src/store/table.ts +55 -14
- package/src/types.ts +58 -1
- package/src/utils/api.ts +133 -26
- package/src/utils/dom.tsx +12 -0
- package/src/utils/helper.ts +27 -0
- package/src/utils/icon.tsx +4 -0
- package/tsconfig-for-declaration.json +1 -1
- package/dump.rdb +0 -0
- package/lib/components/AssociatedCheckboxes.d.ts +0 -762
- package/lib/components/AssociatedCheckboxes.js +0 -90
- package/lib/components/AssociatedCheckboxes.js.map +0 -13
- package/lib/components/ChainedCheckboxes.js.map +0 -13
- package/lib/components/Checkboxes.js +0 -101
- package/lib/components/Checkboxes.js.map +0 -13
- package/lib/components/ListCheckboxes.d.ts +0 -739
- package/lib/components/ListCheckboxes.js +0 -48
- package/lib/components/ListCheckboxes.js.map +0 -13
- package/lib/components/ListRadios.d.ts +0 -763
- package/lib/components/ListRadios.js +0 -86
- package/lib/components/ListRadios.js.map +0 -13
- package/lib/components/TableCheckboxes.js.map +0 -13
- package/lib/components/TreeCheckboxes.js.map +0 -13
- package/lib/components/TreeRadios.d.ts +0 -838
- package/lib/components/TreeRadios.js +0 -116
- package/lib/components/TreeRadios.js.map +0 -13
- package/src/components/ListRadios.tsx +0 -159
- package/src/components/TreeRadios.tsx +0 -202
@@ -0,0 +1,145 @@
|
|
1
|
+
import {
|
2
|
+
OptionsControlProps,
|
3
|
+
OptionsControl,
|
4
|
+
FormOptionsControl
|
5
|
+
} from './Options';
|
6
|
+
import React from 'react';
|
7
|
+
import {Api} from '../../types';
|
8
|
+
import Spinner from '../../components/Spinner';
|
9
|
+
import {BaseTransferRenderer} from './Transfer';
|
10
|
+
import TabsTransfer from '../../components/TabsTransfer';
|
11
|
+
import {SchemaApi} from '../../Schema';
|
12
|
+
import TransferPicker from '../../components/TransferPicker';
|
13
|
+
|
14
|
+
/**
|
15
|
+
* TransferPicker 穿梭器的弹框形态
|
16
|
+
* 文档:https://baidu.gitee.io/amis/docs/components/form/transfer-picker
|
17
|
+
*/
|
18
|
+
export interface TransferPickerControlSchema extends FormOptionsControl {
|
19
|
+
type: 'transfer-picker';
|
20
|
+
/**
|
21
|
+
* 边框模式,全边框,还是半边框,或者没边框。
|
22
|
+
*/
|
23
|
+
borderMode?: 'full' | 'half' | 'none';
|
24
|
+
|
25
|
+
/**
|
26
|
+
* 是否显示剪头
|
27
|
+
*/
|
28
|
+
showArrow?: boolean;
|
29
|
+
|
30
|
+
/**
|
31
|
+
* 可排序?
|
32
|
+
*/
|
33
|
+
sortable?: boolean;
|
34
|
+
|
35
|
+
/**
|
36
|
+
* 搜索结果展示模式
|
37
|
+
*/
|
38
|
+
searchResultMode?: 'table' | 'list' | 'tree' | 'chained';
|
39
|
+
|
40
|
+
/**
|
41
|
+
* 可搜索?
|
42
|
+
*/
|
43
|
+
searchable?: boolean;
|
44
|
+
|
45
|
+
/**
|
46
|
+
* 搜索 API
|
47
|
+
*/
|
48
|
+
searchApi?: SchemaApi;
|
49
|
+
|
50
|
+
/**
|
51
|
+
* 左侧的标题文字
|
52
|
+
*/
|
53
|
+
selectTitle?: string;
|
54
|
+
|
55
|
+
/**
|
56
|
+
* 右侧结果的标题文字
|
57
|
+
*/
|
58
|
+
resultTitle?: string;
|
59
|
+
|
60
|
+
/**
|
61
|
+
* 弹窗大小
|
62
|
+
*/
|
63
|
+
pickerSize?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
64
|
+
}
|
65
|
+
|
66
|
+
export interface TabsTransferProps
|
67
|
+
extends OptionsControlProps,
|
68
|
+
Omit<
|
69
|
+
TransferPickerControlSchema,
|
70
|
+
| 'type'
|
71
|
+
| 'options'
|
72
|
+
| 'inputClassName'
|
73
|
+
| 'className'
|
74
|
+
| 'descriptionClassName'
|
75
|
+
> {}
|
76
|
+
|
77
|
+
@OptionsControl({
|
78
|
+
type: 'transfer-picker'
|
79
|
+
})
|
80
|
+
export class TransferPickerRenderer extends BaseTransferRenderer<TabsTransferProps> {
|
81
|
+
render() {
|
82
|
+
const {
|
83
|
+
className,
|
84
|
+
classnames: cx,
|
85
|
+
selectedOptions,
|
86
|
+
sortable,
|
87
|
+
loading,
|
88
|
+
searchable,
|
89
|
+
searchResultMode,
|
90
|
+
showArrow,
|
91
|
+
deferLoad,
|
92
|
+
disabled,
|
93
|
+
selectTitle,
|
94
|
+
resultTitle,
|
95
|
+
pickerSize,
|
96
|
+
columns,
|
97
|
+
leftMode,
|
98
|
+
selectMode,
|
99
|
+
borderMode
|
100
|
+
} = this.props;
|
101
|
+
|
102
|
+
// 目前 LeftOptions 没有接口可以动态加载
|
103
|
+
// 为了方便可以快速实现动态化,让选项的第一个成员携带
|
104
|
+
// LeftOptions 信息
|
105
|
+
let {options, leftOptions, leftDefaultValue} = this.props;
|
106
|
+
if (
|
107
|
+
selectMode === 'associated' &&
|
108
|
+
options &&
|
109
|
+
options.length === 1 &&
|
110
|
+
options[0].leftOptions &&
|
111
|
+
Array.isArray(options[0].children)
|
112
|
+
) {
|
113
|
+
leftOptions = options[0].leftOptions;
|
114
|
+
leftDefaultValue = options[0].leftDefaultValue ?? leftDefaultValue;
|
115
|
+
options = options[0].children;
|
116
|
+
}
|
117
|
+
|
118
|
+
return (
|
119
|
+
<div className={cx('TransferControl', className)}>
|
120
|
+
<TransferPicker
|
121
|
+
borderMode={borderMode}
|
122
|
+
selectMode={selectMode}
|
123
|
+
value={selectedOptions}
|
124
|
+
disabled={disabled}
|
125
|
+
options={options}
|
126
|
+
onChange={this.handleChange}
|
127
|
+
option2value={this.option2value}
|
128
|
+
sortable={sortable}
|
129
|
+
searchResultMode={searchResultMode}
|
130
|
+
onSearch={searchable ? this.handleSearch : undefined}
|
131
|
+
showArrow={showArrow}
|
132
|
+
onDeferLoad={deferLoad}
|
133
|
+
selectTitle={selectTitle}
|
134
|
+
resultTitle={resultTitle}
|
135
|
+
size={pickerSize}
|
136
|
+
columns={columns}
|
137
|
+
leftMode={leftMode}
|
138
|
+
leftOptions={leftOptions}
|
139
|
+
/>
|
140
|
+
|
141
|
+
<Spinner overlay key="info" show={loading} />
|
142
|
+
</div>
|
143
|
+
);
|
144
|
+
}
|
145
|
+
}
|
@@ -478,6 +478,19 @@ export default class TreeSelectControl extends React.Component<
|
|
478
478
|
minLength,
|
479
479
|
labelField,
|
480
480
|
nodePath,
|
481
|
+
onAdd,
|
482
|
+
creatable,
|
483
|
+
createTip,
|
484
|
+
addControls,
|
485
|
+
onEdit,
|
486
|
+
editable,
|
487
|
+
editTip,
|
488
|
+
editControls,
|
489
|
+
removable,
|
490
|
+
removeTip,
|
491
|
+
onDelete,
|
492
|
+
rootCreatable,
|
493
|
+
rootCreateTip,
|
481
494
|
translate: __,
|
482
495
|
deferLoad,
|
483
496
|
expandTreeOptions
|
@@ -533,6 +546,18 @@ export default class TreeSelectControl extends React.Component<
|
|
533
546
|
pathSeparator={pathSeparator}
|
534
547
|
maxLength={maxLength}
|
535
548
|
minLength={minLength}
|
549
|
+
onAdd={onAdd}
|
550
|
+
creatable={creatable}
|
551
|
+
createTip={createTip}
|
552
|
+
rootCreatable={rootCreatable}
|
553
|
+
rootCreateTip={rootCreateTip}
|
554
|
+
onEdit={onEdit}
|
555
|
+
editable={editable}
|
556
|
+
editTip={editTip}
|
557
|
+
removable={removable}
|
558
|
+
removeTip={removeTip}
|
559
|
+
onDelete={onDelete}
|
560
|
+
bultinCUD={!addControls && !editControls}
|
536
561
|
onDeferLoad={deferLoad}
|
537
562
|
onExpandTree={expandTreeOptions}
|
538
563
|
/>
|
@@ -202,6 +202,11 @@ export interface FormSchema extends BaseSchema {
|
|
202
202
|
*/
|
203
203
|
mode?: 'normal' | 'inline' | 'horizontal';
|
204
204
|
|
205
|
+
/**
|
206
|
+
* 表单项显示为几列
|
207
|
+
*/
|
208
|
+
columnCount?: number;
|
209
|
+
|
205
210
|
/**
|
206
211
|
* 如果是水平排版,这个属性可以细化水平排版的左右宽度占比。
|
207
212
|
*/
|
@@ -347,6 +352,7 @@ export default class Form extends React.Component<FormProps, object> {
|
|
347
352
|
right: 10,
|
348
353
|
offset: 2
|
349
354
|
},
|
355
|
+
columnCount: 0,
|
350
356
|
panelClassName: 'Panel--default',
|
351
357
|
messages: {
|
352
358
|
fetchFailed: 'fetchFailed',
|
@@ -367,6 +373,7 @@ export default class Form extends React.Component<FormProps, object> {
|
|
367
373
|
'initFetch',
|
368
374
|
'wrapWithPanel',
|
369
375
|
'mode',
|
376
|
+
'columnCount',
|
370
377
|
'collapsable',
|
371
378
|
'horizontal',
|
372
379
|
'panelClassName',
|
@@ -827,7 +834,7 @@ export default class Form extends React.Component<FormProps, object> {
|
|
827
834
|
);
|
828
835
|
}
|
829
836
|
|
830
|
-
if (store.persistData) {
|
837
|
+
if (store.persistData && store.inited) {
|
831
838
|
store.setLocalPersistData();
|
832
839
|
}
|
833
840
|
}
|
@@ -1418,6 +1425,7 @@ export default class Form extends React.Component<FormProps, object> {
|
|
1418
1425
|
debug,
|
1419
1426
|
$path,
|
1420
1427
|
store,
|
1428
|
+
columnCount,
|
1421
1429
|
render
|
1422
1430
|
} = this.props;
|
1423
1431
|
|
@@ -1429,7 +1437,12 @@ export default class Form extends React.Component<FormProps, object> {
|
|
1429
1437
|
|
1430
1438
|
return (
|
1431
1439
|
<WrapperComponent
|
1432
|
-
className={cx(
|
1440
|
+
className={cx(
|
1441
|
+
`Form`,
|
1442
|
+
`Form--${mode || 'normal'}`,
|
1443
|
+
columnCount ? `Form--column Form--column-${columnCount}` : null,
|
1444
|
+
className
|
1445
|
+
)}
|
1433
1446
|
onSubmit={this.handleFormSubmit}
|
1434
1447
|
noValidate
|
1435
1448
|
>
|
@@ -479,8 +479,17 @@ export function wrapControl<
|
|
479
479
|
const {
|
480
480
|
formStore: form,
|
481
481
|
onChange,
|
482
|
-
$schema: {
|
482
|
+
$schema: {
|
483
|
+
name,
|
484
|
+
id,
|
485
|
+
label,
|
486
|
+
type,
|
487
|
+
onChange: onFormItemChange,
|
488
|
+
maxLength,
|
489
|
+
minLength
|
490
|
+
},
|
483
491
|
data,
|
492
|
+
env,
|
484
493
|
validateOnChange,
|
485
494
|
formSubmited
|
486
495
|
} = this.props;
|
@@ -495,6 +504,22 @@ export function wrapControl<
|
|
495
504
|
return;
|
496
505
|
}
|
497
506
|
|
507
|
+
if (type !== 'input-password') {
|
508
|
+
env?.tracker(
|
509
|
+
{
|
510
|
+
eventType: 'formItemChange',
|
511
|
+
eventData: {
|
512
|
+
id,
|
513
|
+
name,
|
514
|
+
label,
|
515
|
+
type,
|
516
|
+
value
|
517
|
+
}
|
518
|
+
},
|
519
|
+
this.props
|
520
|
+
);
|
521
|
+
}
|
522
|
+
|
498
523
|
this.model.changeEmitedValue(value);
|
499
524
|
if (
|
500
525
|
onFormItemChange?.(value, oldValue, this.model, form) === false
|
@@ -0,0 +1,204 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import {Renderer, RendererProps} from '../factory';
|
3
|
+
import {autobind, getPropValue} from '../utils/helper';
|
4
|
+
import {isPureVariable, resolveVariableAndFilter} from '../utils/tpl-builtin';
|
5
|
+
import {
|
6
|
+
BaseSchema,
|
7
|
+
SchemaTokenizeableString,
|
8
|
+
SchemaTpl,
|
9
|
+
SchemaUrlPath
|
10
|
+
} from '../Schema';
|
11
|
+
import {ActionSchema} from './Action';
|
12
|
+
import GridNav, {GridNavDirection, GridNavItem} from '../components/GridNav';
|
13
|
+
import {BadgeSchema} from '../components/Badge';
|
14
|
+
import handleAction from '../utils/handleAction';
|
15
|
+
import {validations} from '../utils/validations';
|
16
|
+
|
17
|
+
export interface ListItemSchema extends Omit<BaseSchema, 'type'> {
|
18
|
+
/**
|
19
|
+
* 单项点击事件
|
20
|
+
*/
|
21
|
+
clickAction?: ActionSchema;
|
22
|
+
|
23
|
+
/**
|
24
|
+
* 跳转地址
|
25
|
+
*/
|
26
|
+
link?: string;
|
27
|
+
|
28
|
+
/**
|
29
|
+
* 打开方式
|
30
|
+
*/
|
31
|
+
blank?: string;
|
32
|
+
|
33
|
+
/**
|
34
|
+
* 图片地址
|
35
|
+
*/
|
36
|
+
icon?: SchemaUrlPath;
|
37
|
+
|
38
|
+
/**
|
39
|
+
* 描述
|
40
|
+
*/
|
41
|
+
text?: SchemaTpl;
|
42
|
+
|
43
|
+
/**
|
44
|
+
* 图标最大宽度比例 0-100
|
45
|
+
*/
|
46
|
+
iconRatio?: number;
|
47
|
+
|
48
|
+
/**
|
49
|
+
* 角标
|
50
|
+
*/
|
51
|
+
badge?: BadgeSchema;
|
52
|
+
}
|
53
|
+
|
54
|
+
/**
|
55
|
+
* List 列表展示控件。
|
56
|
+
* 文档:https://baidu.gitee.io/amis/docs/components/card
|
57
|
+
*/
|
58
|
+
export interface ListSchema extends BaseSchema {
|
59
|
+
/**
|
60
|
+
* 指定为 List 列表展示控件。
|
61
|
+
*/
|
62
|
+
type: 'grid-nav';
|
63
|
+
|
64
|
+
/**
|
65
|
+
* 列表项类名
|
66
|
+
*/
|
67
|
+
itemClassName?: string;
|
68
|
+
|
69
|
+
/**
|
70
|
+
* 静态图片列表配置
|
71
|
+
*/
|
72
|
+
options?: Array<ListItemSchema>;
|
73
|
+
|
74
|
+
/**
|
75
|
+
* 是否将列表项固定为正方形
|
76
|
+
*/
|
77
|
+
square?: boolean;
|
78
|
+
|
79
|
+
/**
|
80
|
+
* 是否将列表项内容居中显示
|
81
|
+
*/
|
82
|
+
center?: boolean;
|
83
|
+
|
84
|
+
/**
|
85
|
+
* 是否显示列表项边框
|
86
|
+
*/
|
87
|
+
border?: boolean;
|
88
|
+
|
89
|
+
/**
|
90
|
+
* 列表项之间的间距,默认单位为px
|
91
|
+
*/
|
92
|
+
gutter?: number;
|
93
|
+
|
94
|
+
/**
|
95
|
+
* 图标宽度占比, 1-100
|
96
|
+
*/
|
97
|
+
iconRatio?: number;
|
98
|
+
|
99
|
+
/**
|
100
|
+
* 列表项内容排列的方向,可选值为 horizontal 、vertical
|
101
|
+
*/
|
102
|
+
direction?: GridNavDirection;
|
103
|
+
|
104
|
+
/**
|
105
|
+
* 列数
|
106
|
+
*/
|
107
|
+
columnNum?: number;
|
108
|
+
|
109
|
+
/**
|
110
|
+
* 数据源: 绑定当前环境变量
|
111
|
+
*
|
112
|
+
* @default ${items}
|
113
|
+
*/
|
114
|
+
source?: SchemaTokenizeableString;
|
115
|
+
}
|
116
|
+
|
117
|
+
export interface Column {
|
118
|
+
type: string;
|
119
|
+
[propName: string]: any;
|
120
|
+
}
|
121
|
+
|
122
|
+
export interface ListProps
|
123
|
+
extends RendererProps,
|
124
|
+
Omit<ListSchema, 'type' | 'className'> {
|
125
|
+
handleClick: (item?: ListItemSchema) => void;
|
126
|
+
}
|
127
|
+
|
128
|
+
@Renderer({
|
129
|
+
type: 'grid-nav'
|
130
|
+
})
|
131
|
+
export default class List extends React.Component<ListProps, object> {
|
132
|
+
@autobind
|
133
|
+
handleClick(item: ListItemSchema) {
|
134
|
+
return (e: React.MouseEvent) => {
|
135
|
+
let action;
|
136
|
+
if (item.link) {
|
137
|
+
action = validations.isUrl({}, item.link)
|
138
|
+
? {
|
139
|
+
type: 'button',
|
140
|
+
actionType: 'url',
|
141
|
+
url: item.link,
|
142
|
+
blank: item.blank
|
143
|
+
}
|
144
|
+
: {
|
145
|
+
type: 'button',
|
146
|
+
actionType: 'link',
|
147
|
+
link: item.link
|
148
|
+
};
|
149
|
+
} else {
|
150
|
+
action = item.clickAction!;
|
151
|
+
}
|
152
|
+
handleAction(e, action as ActionSchema, this.props);
|
153
|
+
};
|
154
|
+
}
|
155
|
+
|
156
|
+
render() {
|
157
|
+
const {itemClassName, source, data, options, classnames} = this.props;
|
158
|
+
|
159
|
+
let value = getPropValue(this.props);
|
160
|
+
let list: any = [];
|
161
|
+
|
162
|
+
if (typeof source === 'string' && isPureVariable(source)) {
|
163
|
+
list = resolveVariableAndFilter(source, data, '| raw') || undefined;
|
164
|
+
} else if (Array.isArray(value)) {
|
165
|
+
list = value;
|
166
|
+
} else if (Array.isArray(options)) {
|
167
|
+
list = options;
|
168
|
+
}
|
169
|
+
|
170
|
+
if (list && !Array.isArray(list)) {
|
171
|
+
list = [list];
|
172
|
+
}
|
173
|
+
|
174
|
+
if (!list?.length) {
|
175
|
+
return null;
|
176
|
+
}
|
177
|
+
|
178
|
+
return (
|
179
|
+
<GridNav {...this.props}>
|
180
|
+
{list.map((item: ListItemSchema, index: number) => (
|
181
|
+
<GridNavItem
|
182
|
+
key={index}
|
183
|
+
onClick={
|
184
|
+
item.clickAction || item.link ? this.handleClick(item) : undefined
|
185
|
+
}
|
186
|
+
className={itemClassName}
|
187
|
+
text={item.text}
|
188
|
+
icon={item.icon}
|
189
|
+
classnames={classnames}
|
190
|
+
badge={
|
191
|
+
item.badge
|
192
|
+
? {
|
193
|
+
badge: item.badge,
|
194
|
+
data: data,
|
195
|
+
classnames
|
196
|
+
}
|
197
|
+
: undefined
|
198
|
+
}
|
199
|
+
/>
|
200
|
+
))}
|
201
|
+
</GridNav>
|
202
|
+
);
|
203
|
+
}
|
204
|
+
}
|
package/src/renderers/IFrame.tsx
CHANGED
@@ -6,7 +6,7 @@ import {ScopedContext, IScopedContext} from '../Scoped';
|
|
6
6
|
import {buildApi, isApiOutdated} from '../utils/api';
|
7
7
|
import {BaseSchema, SchemaUrlPath} from '../Schema';
|
8
8
|
import {ActionSchema} from './Action';
|
9
|
-
import {
|
9
|
+
import {dataMapping} from '../utils/tpl-builtin';
|
10
10
|
|
11
11
|
/**
|
12
12
|
* IFrame 渲染器
|
@@ -161,9 +161,7 @@ export default class IFrame extends React.Component<IFrameProps, object> {
|
|
161
161
|
...style
|
162
162
|
};
|
163
163
|
|
164
|
-
|
165
|
-
src = resolveVariableAndFilter(src, data, '| raw');
|
166
|
-
}
|
164
|
+
src = dataMapping(src, data);
|
167
165
|
|
168
166
|
const finalSrc = src ? buildApi(src, data).url : undefined;
|
169
167
|
|
package/src/renderers/Json.tsx
CHANGED
@@ -29,6 +29,11 @@ export interface JsonSchema extends BaseSchema {
|
|
29
29
|
* 是否可修改
|
30
30
|
*/
|
31
31
|
mutable?: boolean;
|
32
|
+
|
33
|
+
/**
|
34
|
+
* 是否显示数据类型
|
35
|
+
*/
|
36
|
+
displayDataTypes?: boolean;
|
32
37
|
}
|
33
38
|
|
34
39
|
export interface JSONProps extends RendererProps, JsonSchema {
|
@@ -44,7 +49,8 @@ export class JSONField extends React.Component<JSONProps, object> {
|
|
44
49
|
static defaultProps: Partial<JSONProps> = {
|
45
50
|
placeholder: '-',
|
46
51
|
levelExpand: 1,
|
47
|
-
source: ''
|
52
|
+
source: '',
|
53
|
+
displayDataTypes: false
|
48
54
|
};
|
49
55
|
|
50
56
|
@autobind
|
@@ -79,6 +85,7 @@ export class JSONField extends React.Component<JSONProps, object> {
|
|
79
85
|
source,
|
80
86
|
levelExpand,
|
81
87
|
mutable,
|
88
|
+
displayDataTypes,
|
82
89
|
name
|
83
90
|
} = this.props;
|
84
91
|
|
@@ -87,14 +94,6 @@ export class JSONField extends React.Component<JSONProps, object> {
|
|
87
94
|
let data = value;
|
88
95
|
if (source !== undefined && isPureVariable(source)) {
|
89
96
|
data = resolveVariableAndFilter(source, this.props.data, '| raw');
|
90
|
-
} else if (typeof value === 'string') {
|
91
|
-
try {
|
92
|
-
data = JSON.parse(value);
|
93
|
-
} catch (e) {
|
94
|
-
data = {
|
95
|
-
error: e.message
|
96
|
-
};
|
97
|
-
}
|
98
97
|
}
|
99
98
|
|
100
99
|
let jsonThemeValue = jsonTheme;
|
@@ -124,6 +123,7 @@ export class JSONField extends React.Component<JSONProps, object> {
|
|
124
123
|
theme={(jsonThemeValue as any) ?? 'rjv-default'}
|
125
124
|
shouldCollapse={this.shouldExpandNode}
|
126
125
|
enableClipboard={false}
|
126
|
+
displayDataTypes={displayDataTypes}
|
127
127
|
iconStyle="square"
|
128
128
|
onEdit={name && mutable ? this.emitChange : false}
|
129
129
|
onDelete={name && mutable ? this.emitChange : false}
|
package/src/renderers/Link.tsx
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import {Renderer, RendererProps} from '../factory';
|
3
3
|
import {BaseSchema, SchemaTpl} from '../Schema';
|
4
|
-
import {getPropValue} from '../utils/helper';
|
4
|
+
import {autobind, getPropValue} from '../utils/helper';
|
5
5
|
import {filter} from '../utils/tpl';
|
6
6
|
import {BadgeSchema, withBadge} from '../components/Badge';
|
7
7
|
import Link from '../components/Link';
|
@@ -42,9 +42,9 @@ export interface LinkSchema extends BaseSchema {
|
|
42
42
|
icon?: string;
|
43
43
|
|
44
44
|
/**
|
45
|
-
*
|
45
|
+
* 右侧图标
|
46
46
|
*/
|
47
|
-
|
47
|
+
rightIcon?: string;
|
48
48
|
}
|
49
49
|
|
50
50
|
export interface LinkProps
|
@@ -55,9 +55,23 @@ export class LinkCmpt extends React.Component<LinkProps, object> {
|
|
55
55
|
static defaultProps = {
|
56
56
|
blank: true,
|
57
57
|
disabled: false,
|
58
|
-
htmlTarget: '
|
58
|
+
htmlTarget: ''
|
59
59
|
};
|
60
60
|
|
61
|
+
handleClick(href: string) {
|
62
|
+
const {env, blank, body} = this.props;
|
63
|
+
env?.tracker(
|
64
|
+
{
|
65
|
+
eventType: 'url',
|
66
|
+
// 需要和 action 里命名一致方便后续分析
|
67
|
+
eventData: {url: href, blank, label: body}
|
68
|
+
},
|
69
|
+
this.props
|
70
|
+
);
|
71
|
+
}
|
72
|
+
|
73
|
+
getHref() {}
|
74
|
+
|
61
75
|
render() {
|
62
76
|
const {
|
63
77
|
className,
|
@@ -72,25 +86,25 @@ export class LinkCmpt extends React.Component<LinkProps, object> {
|
|
72
86
|
translate: __,
|
73
87
|
title,
|
74
88
|
icon,
|
75
|
-
|
89
|
+
rightIcon
|
76
90
|
} = this.props;
|
77
91
|
|
78
|
-
let value =
|
79
|
-
|
80
|
-
|
92
|
+
let value =
|
93
|
+
(typeof href === 'string' && href
|
94
|
+
? filter(href, data, '| raw')
|
95
|
+
: undefined) || getPropValue(this.props);
|
81
96
|
|
82
97
|
return (
|
83
98
|
<Link
|
84
99
|
className={className}
|
85
|
-
href={
|
86
|
-
body={text}
|
87
|
-
blank={blank}
|
100
|
+
href={value}
|
88
101
|
disabled={disabled}
|
89
102
|
title={title}
|
90
|
-
htmlTarget={htmlTarget}
|
103
|
+
htmlTarget={htmlTarget || (blank ? '_blank' : '_self')}
|
91
104
|
icon={icon}
|
92
|
-
|
105
|
+
rightIcon={rightIcon}
|
93
106
|
>
|
107
|
+
{body ? render('body', body) : value || __('link')}
|
94
108
|
</Link>
|
95
109
|
);
|
96
110
|
}
|
package/src/renderers/List.tsx
CHANGED
@@ -1189,7 +1189,7 @@ export class ListItem extends React.Component<ListItemProps> {
|
|
1189
1189
|
}
|
1190
1190
|
|
1191
1191
|
renderFeild(region: string, field: any, key: any, props: any) {
|
1192
|
-
const render = props
|
1192
|
+
const render = props?.render || this.props.render;
|
1193
1193
|
const data = this.props.data;
|
1194
1194
|
const cx = this.props.classnames;
|
1195
1195
|
const itemIndex = this.props.itemIndex;
|