amis 1.5.7 → 1.6.1
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/.husky/pre-commit +1 -1
- package/README.md +1 -0
- package/lib/RootRenderer.d.ts +2 -0
- package/lib/RootRenderer.js +19 -1
- package/lib/RootRenderer.js.map +2 -2
- package/lib/Schema.d.ts +3 -2
- package/lib/Schema.js.map +1 -1
- package/lib/SchemaRenderer.js +52 -1
- package/lib/SchemaRenderer.js.map +2 -2
- package/lib/Scoped.d.ts +2 -0
- package/lib/Scoped.js +27 -1
- package/lib/Scoped.js.map +2 -2
- package/lib/actions/Action.d.ts +33 -0
- package/lib/actions/Action.js +100 -0
- package/lib/actions/Action.js.map +13 -0
- package/lib/actions/AjaxAction.d.ts +14 -0
- package/lib/actions/AjaxAction.js +68 -0
- package/lib/actions/AjaxAction.js.map +13 -0
- package/lib/actions/BreakAction.d.ts +12 -0
- package/lib/actions/BreakAction.js +28 -0
- package/lib/actions/BreakAction.js.map +13 -0
- package/lib/actions/BroadcastAction.d.ts +12 -0
- package/lib/actions/BroadcastAction.js +40 -0
- package/lib/actions/BroadcastAction.js.map +13 -0
- package/lib/actions/CmptAction.d.ts +12 -0
- package/lib/actions/CmptAction.js +40 -0
- package/lib/actions/CmptAction.js.map +13 -0
- package/lib/actions/ContinueAction.d.ts +12 -0
- package/lib/actions/ContinueAction.js +28 -0
- package/lib/actions/ContinueAction.js.map +13 -0
- package/lib/actions/CopyAction.d.ts +12 -0
- package/lib/actions/CopyAction.js +35 -0
- package/lib/actions/CopyAction.js.map +13 -0
- package/lib/actions/CustomAction.d.ts +12 -0
- package/lib/actions/CustomAction.js +43 -0
- package/lib/actions/CustomAction.js.map +13 -0
- package/lib/actions/DialogAction.d.ts +12 -0
- package/lib/actions/DialogAction.js +31 -0
- package/lib/actions/DialogAction.js.map +13 -0
- package/lib/actions/DrawerAction.d.ts +12 -0
- package/lib/actions/DrawerAction.js +31 -0
- package/lib/actions/DrawerAction.js.map +13 -0
- package/lib/actions/EmailAction.d.ts +12 -0
- package/lib/actions/EmailAction.js +37 -0
- package/lib/actions/EmailAction.js.map +13 -0
- package/lib/actions/LoopAction.d.ts +12 -0
- package/lib/actions/LoopAction.js +93 -0
- package/lib/actions/LoopAction.js.map +13 -0
- package/lib/actions/OpenPageAction.d.ts +12 -0
- package/lib/actions/OpenPageAction.js +33 -0
- package/lib/actions/OpenPageAction.js.map +13 -0
- package/lib/actions/ParallelAction.d.ts +5 -0
- package/lib/actions/ParallelAction.js +33 -0
- package/lib/actions/ParallelAction.js.map +13 -0
- package/lib/actions/SwitchAction.d.ts +8 -0
- package/lib/actions/SwitchAction.js +45 -0
- package/lib/actions/SwitchAction.js.map +13 -0
- package/lib/actions/index.d.ts +18 -0
- package/lib/actions/index.js +22 -0
- package/lib/actions/index.js.map +13 -0
- package/lib/components/AnchorNav.d.ts +20 -20
- package/lib/components/AssociatedSelection.d.ts +84 -84
- package/lib/components/AssociatedSelection.js +2 -2
- package/lib/components/AssociatedSelection.js.map +2 -2
- package/lib/components/Avatar.d.ts +135 -0
- package/lib/components/Avatar.js +120 -0
- package/lib/components/Avatar.js.map +13 -0
- package/lib/components/BaiduMapPicker.js.map +2 -2
- package/lib/components/Button.d.ts +20 -20
- package/lib/components/CalendarMobile.d.ts +573 -0
- package/lib/components/CalendarMobile.js +486 -0
- package/lib/components/CalendarMobile.js.map +13 -0
- package/lib/components/Cascader.d.ts +123 -0
- package/lib/components/Cascader.js +487 -0
- package/lib/components/Cascader.js.map +13 -0
- package/lib/components/ChainedSelection.d.ts +84 -84
- package/lib/components/ChainedSelection.js +15 -3
- package/lib/components/ChainedSelection.js.map +2 -2
- package/lib/components/CityArea.d.ts +527 -0
- package/lib/components/CityArea.js +177 -0
- package/lib/components/CityArea.js.map +13 -0
- package/lib/components/Collapse.d.ts +20 -20
- package/lib/components/ColorPicker.d.ts +84 -84
- package/lib/components/ColorPicker.js +4 -3
- package/lib/components/ColorPicker.js.map +2 -2
- package/lib/components/DatePicker.d.ts +85 -84
- package/lib/components/DatePicker.js +21 -8
- package/lib/components/DatePicker.js.map +2 -2
- package/lib/components/DateRangePicker.d.ts +85 -84
- package/lib/components/DateRangePicker.js +19 -6
- package/lib/components/DateRangePicker.js.map +2 -2
- package/lib/components/GroupedSelection.d.ts +84 -84
- package/lib/components/GroupedSelection.js +14 -2
- package/lib/components/GroupedSelection.js.map +2 -2
- package/lib/components/InputBox.d.ts +21 -21
- package/lib/components/ListGroup.d.ts +21 -21
- package/lib/components/ListMenu.d.ts +84 -84
- package/lib/components/MonthRangePicker.d.ts +85 -84
- package/lib/components/MonthRangePicker.js +18 -7
- package/lib/components/MonthRangePicker.js.map +2 -2
- package/lib/components/Overlay.d.ts +1 -1
- package/lib/components/Overlay.js.map +1 -1
- package/lib/components/Picker.d.ts +1 -0
- package/lib/components/Picker.js +16 -7
- package/lib/components/Picker.js.map +2 -2
- package/lib/components/PickerColumn.d.ts +1 -0
- package/lib/components/PickerColumn.js +21 -18
- package/lib/components/PickerColumn.js.map +2 -2
- package/lib/components/PickerContainer.d.ts +3 -0
- package/lib/components/PickerContainer.js +12 -5
- package/lib/components/PickerContainer.js.map +2 -2
- package/lib/components/PopOverContainer.d.ts +1 -0
- package/lib/components/PopOverContainer.js +5 -3
- package/lib/components/PopOverContainer.js.map +2 -2
- package/lib/components/PopUp.d.ts +1041 -28
- package/lib/components/PopUp.js +32 -8
- package/lib/components/PopUp.js.map +2 -2
- package/lib/components/Radios.d.ts +21 -21
- package/lib/components/Rating.d.ts +21 -21
- package/lib/components/ResultBox.d.ts +85 -84
- package/lib/components/ResultBox.js +9 -4
- package/lib/components/ResultBox.js.map +2 -2
- package/lib/components/ResultList.d.ts +9 -2
- package/lib/components/ResultList.js +22 -2
- package/lib/components/ResultList.js.map +2 -2
- package/lib/components/Select.d.ts +238 -238
- package/lib/components/Select.js +13 -9
- package/lib/components/Select.js.map +2 -2
- package/lib/components/Selection.d.ts +94 -86
- package/lib/components/Selection.js +11 -2
- package/lib/components/Selection.js.map +2 -2
- package/lib/components/Steps.js.map +2 -2
- package/lib/components/TableSelection.d.ts +85 -85
- package/lib/components/TableSelection.js +1 -9
- package/lib/components/TableSelection.js.map +2 -2
- package/lib/components/Tabs.js +31 -33
- package/lib/components/Tabs.js.map +2 -2
- package/lib/components/TabsTransfer.d.ts +87 -256
- package/lib/components/TabsTransfer.js +52 -9
- package/lib/components/TabsTransfer.js.map +2 -2
- package/lib/components/TabsTransferPicker.d.ts +1 -1
- package/lib/components/TabsTransferPicker.js +20 -18
- package/lib/components/TabsTransferPicker.js.map +2 -2
- package/lib/components/Timeline.d.ts +69 -0
- package/lib/components/Timeline.js +16 -0
- package/lib/components/Timeline.js.map +13 -0
- package/lib/components/TimelineItem.d.ts +517 -0
- package/lib/components/TimelineItem.js +40 -0
- package/lib/components/TimelineItem.js.map +13 -0
- package/lib/components/Transfer.d.ts +100 -98
- package/lib/components/Transfer.js +2 -3
- package/lib/components/Transfer.js.map +2 -2
- package/lib/components/TransferDropDown.d.ts +85 -84
- package/lib/components/TransferDropDown.js +9 -10
- package/lib/components/TransferDropDown.js.map +2 -2
- package/lib/components/TransferPicker.d.ts +1 -0
- package/lib/components/TransferPicker.js +19 -4
- package/lib/components/TransferPicker.js.map +2 -2
- package/lib/components/Tree.d.ts +84 -84
- package/lib/components/TreeSelection.d.ts +85 -85
- package/lib/components/TreeSelection.js +7 -1
- package/lib/components/TreeSelection.js.map +2 -2
- package/lib/components/calendar/Calendar.d.ts +19 -0
- package/lib/components/calendar/Calendar.js +71 -1
- package/lib/components/calendar/Calendar.js.map +2 -2
- package/lib/components/calendar/DaysView.d.ts +21 -0
- package/lib/components/calendar/DaysView.js +76 -17
- package/lib/components/calendar/DaysView.js.map +2 -2
- package/lib/components/calendar/MonthsView.d.ts +34 -0
- package/lib/components/calendar/MonthsView.js +68 -3
- package/lib/components/calendar/MonthsView.js.map +2 -2
- package/lib/components/calendar/QuartersView.d.ts +1 -0
- package/lib/components/calendar/QuartersView.js +2 -2
- package/lib/components/calendar/QuartersView.js.map +2 -2
- package/lib/components/calendar/TimeView.d.ts +30 -18
- package/lib/components/calendar/TimeView.js +47 -8
- package/lib/components/calendar/TimeView.js.map +2 -2
- package/lib/components/calendar/YearsView.d.ts +6 -0
- package/lib/components/calendar/YearsView.js +21 -10
- package/lib/components/calendar/YearsView.js.map +2 -2
- package/lib/components/condition-builder/Field.js +1 -4
- package/lib/components/condition-builder/Field.js.map +2 -2
- package/lib/components/condition-builder/Func.js +1 -1
- package/lib/components/condition-builder/Func.js.map +2 -2
- package/lib/components/formula/Editor.d.ts +3 -0
- package/lib/components/formula/Editor.js +3 -2
- package/lib/components/formula/Editor.js.map +2 -2
- package/lib/components/formula/FuncList.js +2 -1
- package/lib/components/formula/FuncList.js.map +2 -2
- package/lib/components/formula/Picker.js +1 -1
- package/lib/components/formula/Picker.js.map +2 -2
- package/lib/components/formula/plugin.js +0 -1
- package/lib/components/formula/plugin.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 +2 -1
- package/lib/components/index.js +4 -2
- package/lib/components/index.js.map +2 -2
- package/lib/components/virtual-list/SizeAndPositionManager.js.map +2 -2
- package/lib/components/virtual-list/index.js +1 -2
- package/lib/components/virtual-list/index.js.map +2 -2
- package/lib/env.d.ts +4 -0
- package/lib/env.js.map +2 -2
- package/lib/factory.d.ts +2 -1
- package/lib/factory.js +83 -0
- package/lib/factory.js.map +2 -2
- package/lib/helper.css.map +1 -1
- package/lib/icons/tree-down.js +7 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +4 -1
- package/lib/index.js.map +2 -2
- package/lib/locale/de-DE.js +17 -2
- package/lib/locale/de-DE.js.map +2 -2
- package/lib/locale/en-US.js +17 -2
- package/lib/locale/en-US.js.map +2 -2
- package/lib/locale/zh-CN.js +16 -1
- package/lib/locale/zh-CN.js.map +2 -2
- package/lib/renderers/Action.d.ts +1 -1
- package/lib/renderers/Action.js +26 -10
- package/lib/renderers/Action.js.map +2 -2
- package/lib/renderers/Avatar.d.ts +35 -26
- package/lib/renderers/Avatar.js +14 -19
- package/lib/renderers/Avatar.js.map +2 -2
- package/lib/renderers/Card.js +6 -5
- package/lib/renderers/Card.js.map +2 -2
- package/lib/renderers/Custom.d.ts +1 -1
- package/lib/renderers/Custom.js +1 -1
- package/lib/renderers/Custom.js.map +2 -2
- package/lib/renderers/DropDownButton.d.ts +11 -2
- package/lib/renderers/DropDownButton.js +30 -12
- package/lib/renderers/DropDownButton.js.map +2 -2
- package/lib/renderers/Each.js +5 -2
- package/lib/renderers/Each.js.map +2 -2
- package/lib/renderers/Flex.js +1 -5
- package/lib/renderers/Flex.js.map +2 -2
- package/lib/renderers/Form/ChartRadios.js.map +2 -2
- package/lib/renderers/Form/Checkboxes.js.map +2 -2
- package/lib/renderers/Form/CityDB.js +526 -2
- package/lib/renderers/Form/CityDB.js.map +2 -2
- package/lib/renderers/Form/DiffEditor.d.ts +6 -0
- package/lib/renderers/Form/DiffEditor.js +2 -1
- package/lib/renderers/Form/DiffEditor.js.map +2 -2
- package/lib/renderers/Form/Editor.d.ts +6 -0
- package/lib/renderers/Form/InputCity.d.ts +85 -84
- package/lib/renderers/Form/InputCity.js +4 -2
- package/lib/renderers/Form/InputCity.js.map +2 -2
- package/lib/renderers/Form/InputColor.d.ts +84 -84
- package/lib/renderers/Form/InputColor.js +6 -2
- package/lib/renderers/Form/InputColor.js.map +2 -2
- package/lib/renderers/Form/InputDate.js +10 -5
- package/lib/renderers/Form/InputDate.js.map +2 -2
- package/lib/renderers/Form/InputDateRange.js +6 -2
- package/lib/renderers/Form/InputDateRange.js.map +2 -2
- package/lib/renderers/Form/InputFormula.d.ts +4 -1
- package/lib/renderers/Form/InputFormula.js +2 -2
- package/lib/renderers/Form/InputFormula.js.map +2 -2
- package/lib/renderers/Form/InputImage.d.ts +1 -0
- package/lib/renderers/Form/InputImage.js +8 -4
- package/lib/renderers/Form/InputImage.js.map +2 -2
- package/lib/renderers/Form/InputMonthRange.js +1 -1
- package/lib/renderers/Form/InputMonthRange.js.map +2 -2
- package/lib/renderers/Form/InputQuarterRange.js +1 -1
- package/lib/renderers/Form/InputQuarterRange.js.map +2 -2
- package/lib/renderers/Form/InputRichText.d.ts +4 -0
- package/lib/renderers/Form/InputRichText.js +2 -1
- package/lib/renderers/Form/InputRichText.js.map +2 -2
- package/lib/renderers/Form/InputYearRange.js +1 -1
- package/lib/renderers/Form/InputYearRange.js.map +2 -2
- package/lib/renderers/Form/Item.d.ts +10 -14
- package/lib/renderers/Form/Item.js +18 -9
- package/lib/renderers/Form/Item.js.map +2 -2
- package/lib/renderers/Form/NestedSelect.d.ts +1 -0
- package/lib/renderers/Form/NestedSelect.js +8 -4
- package/lib/renderers/Form/NestedSelect.js.map +2 -2
- package/lib/renderers/Form/Options.js +9 -7
- package/lib/renderers/Form/Options.js.map +2 -2
- package/lib/renderers/Form/Select.d.ts +2 -0
- package/lib/renderers/Form/Select.js +9 -6
- package/lib/renderers/Form/Select.js.map +2 -2
- package/lib/renderers/Form/TabsTransfer.d.ts +5 -32
- package/lib/renderers/Form/TabsTransfer.js +20 -1
- package/lib/renderers/Form/TabsTransfer.js.map +2 -2
- package/lib/renderers/Form/TabsTransferPicker.d.ts +5 -35
- package/lib/renderers/Form/TabsTransferPicker.js +21 -2
- package/lib/renderers/Form/TabsTransferPicker.js.map +2 -2
- package/lib/renderers/Form/Transfer.d.ts +15 -4
- package/lib/renderers/Form/Transfer.js +55 -18
- package/lib/renderers/Form/Transfer.js.map +2 -2
- package/lib/renderers/Form/TransferPicker.d.ts +3 -32
- package/lib/renderers/Form/TransferPicker.js +1 -1
- package/lib/renderers/Form/TransferPicker.js.map +2 -2
- package/lib/renderers/Form/TreeSelect.js +4 -4
- package/lib/renderers/Form/TreeSelect.js.map +2 -2
- package/lib/renderers/Form/index.js +8 -1
- package/lib/renderers/Form/index.js.map +2 -2
- package/lib/renderers/IFrame.js +0 -2
- package/lib/renderers/IFrame.js.map +2 -2
- package/lib/renderers/Link.d.ts +1 -1
- package/lib/renderers/Link.js +27 -6
- package/lib/renderers/Link.js.map +2 -2
- package/lib/renderers/Log.js +15 -10
- package/lib/renderers/Log.js.map +2 -2
- package/lib/renderers/Nav.d.ts +21 -21
- package/lib/renderers/Remark.d.ts +5 -1
- package/lib/renderers/Remark.js +39 -7
- package/lib/renderers/Remark.js.map +2 -2
- package/lib/renderers/Steps.js +5 -5
- package/lib/renderers/Steps.js.map +2 -2
- package/lib/renderers/Table/index.js +4 -1
- package/lib/renderers/Table/index.js.map +2 -2
- package/lib/renderers/Tabs.js +1 -1
- package/lib/renderers/Tabs.js.map +2 -2
- package/lib/renderers/Timeline.d.ts +65 -0
- package/lib/renderers/Timeline.js +54 -0
- package/lib/renderers/Timeline.js.map +13 -0
- package/lib/renderers/Video.js.map +2 -2
- package/lib/schemaExtend.js +23 -9
- package/lib/schemaExtend.js.map +2 -2
- package/lib/store/combo.js.map +2 -2
- package/lib/store/formItem.js +1 -1
- package/lib/store/formItem.js.map +2 -2
- package/lib/themes/ang-ie11.css +1149 -53
- package/lib/themes/ang.css +1149 -53
- package/lib/themes/ang.css.map +1 -1
- package/lib/themes/antd-ie11.css +1187 -53
- package/lib/themes/antd.css +1187 -53
- package/lib/themes/antd.css.map +1 -1
- package/lib/themes/cxd-ie11.css +1189 -70
- package/lib/themes/cxd.css +1189 -70
- package/lib/themes/cxd.css.map +1 -1
- package/lib/themes/dark-ie11.css +1152 -53
- package/lib/themes/dark.css +1152 -53
- package/lib/themes/dark.css.map +1 -1
- package/lib/themes/default.css +1189 -70
- package/lib/themes/default.css.map +1 -1
- package/lib/utils/RootClose.js +3 -1
- package/lib/utils/RootClose.js.map +2 -2
- package/lib/utils/api.js +14 -3
- package/lib/utils/api.js.map +2 -2
- package/lib/utils/debug.d.ts +26 -0
- package/lib/utils/debug.js +351 -0
- package/lib/utils/debug.js.map +13 -0
- package/lib/utils/helper.d.ts +1 -6
- package/lib/utils/helper.js +6 -17
- package/lib/utils/helper.js.map +2 -2
- package/lib/utils/renderer-event.d.ts +38 -0
- package/lib/utils/renderer-event.js +28 -0
- package/lib/utils/renderer-event.js.map +13 -0
- package/package.json +12 -6
- package/schema.json +3516 -839
- package/scss/_properties.scss +20 -6
- package/scss/_variables.scss +1 -0
- package/scss/components/_avatar.scss +27 -9
- package/scss/components/_calendar.scss +291 -0
- package/scss/components/_card.scss +1 -1
- package/scss/components/_cascader.scss +102 -0
- package/scss/components/_city-area.scss +27 -0
- package/scss/components/_collapse-group.scss +1 -3
- package/scss/components/_debug.scss +167 -0
- package/scss/components/_dropdown.scss +39 -9
- package/scss/components/_formula.scss +30 -6
- package/scss/components/_modal.scss +18 -0
- package/scss/components/_panel.scss +45 -0
- package/scss/components/_picker-columns.scss +15 -5
- package/scss/components/_popup.scss +43 -16
- package/scss/components/_result-box.scss +31 -0
- package/scss/components/_timeline.scss +198 -0
- package/scss/components/form/_checks.scss +2 -0
- package/scss/components/form/_color.scss +2 -2
- package/scss/components/form/_date-range.scss +34 -1
- package/scss/components/form/_date.scss +46 -1
- package/scss/components/form/_form.scss +170 -0
- package/scss/components/form/_nested-select.scss +3 -0
- package/scss/components/form/_result-list.scss +2 -0
- package/scss/components/form/_select.scss +32 -3
- package/scss/components/form/_selection.scss +5 -4
- package/scss/components/form/_transfer.scss +3 -0
- package/scss/components/form/_tree-select.scss +1 -1
- package/scss/themes/_antd-variables.scss +45 -0
- package/scss/themes/_common.scss +5 -0
- package/scss/themes/_cxd-variables.scss +50 -1
- package/scss/themes/_dark-variables.scss +4 -0
- package/scss/themes/cxd.scss +0 -19
- package/sdk/ang-ie11.css +1450 -142
- package/sdk/ang.css +1473 -159
- package/sdk/antd-ie11.css +1451 -142
- package/sdk/antd.css +1511 -159
- package/sdk/charts.js +15 -15
- package/sdk/codemirror.js +7 -7
- package/sdk/color-picker.js +65 -65
- package/sdk/cropperjs.js +2 -2
- package/sdk/cxd-ie11.css +1448 -158
- package/sdk/cxd.css +1513 -178
- package/sdk/dark-ie11.css +1450 -142
- package/sdk/dark.css +1476 -159
- package/sdk/exceljs.js +1 -1
- package/sdk/helper.css.map +1 -1
- package/sdk/locale/de-DE.js +17 -2
- package/sdk/markdown.js +69 -69
- package/sdk/papaparse.js +1 -1
- package/sdk/renderers/Form/CityDB.js +1 -1
- package/sdk/rest.js +18 -18
- package/sdk/rich-text.js +62 -62
- package/sdk/sdk-ie11.css +1448 -158
- package/sdk/sdk.css +1513 -178
- package/sdk/sdk.js +1309 -1251
- 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/RootRenderer.tsx +27 -1
- package/src/Schema.ts +3 -0
- package/src/SchemaRenderer.tsx +70 -4
- package/src/Scoped.tsx +46 -4
- package/src/actions/Action.ts +138 -0
- package/src/actions/AjaxAction.ts +58 -0
- package/src/actions/BreakAction.ts +27 -0
- package/src/actions/BroadcastAction.ts +41 -0
- package/src/actions/CmptAction.ts +36 -0
- package/src/actions/ContinueAction.ts +27 -0
- package/src/actions/CopyAction.ts +41 -0
- package/src/actions/CustomAction.ts +46 -0
- package/src/actions/DialogAction.ts +28 -0
- package/src/actions/DrawerAction.ts +28 -0
- package/src/actions/EmailAction.ts +38 -0
- package/src/actions/LoopAction.ts +77 -0
- package/src/actions/OpenPageAction.ts +39 -0
- package/src/actions/ParallelAction.ts +26 -0
- package/src/actions/SwitchAction.ts +35 -0
- package/src/actions/index.ts +20 -0
- package/src/components/AssociatedSelection.tsx +5 -1
- package/src/components/Avatar.tsx +253 -0
- package/src/components/BaiduMapPicker.tsx +19 -14
- package/src/components/CalendarMobile.tsx +658 -0
- package/src/components/Cascader.tsx +564 -0
- package/src/components/ChainedSelection.tsx +16 -3
- package/src/components/CityArea.tsx +315 -0
- package/src/components/ColorPicker.tsx +41 -40
- package/src/components/DatePicker.tsx +80 -34
- package/src/components/DateRangePicker.tsx +85 -30
- package/src/components/GroupedSelection.tsx +14 -2
- package/src/components/MonthRangePicker.tsx +78 -31
- package/src/components/Overlay.tsx +1 -1
- package/src/components/Picker.tsx +55 -35
- package/src/components/PickerColumn.tsx +43 -36
- package/src/components/PickerContainer.tsx +13 -1
- package/src/components/PopOverContainer.tsx +31 -17
- package/src/components/PopUp.tsx +84 -57
- package/src/components/ResultBox.tsx +14 -2
- package/src/components/ResultList.tsx +36 -6
- package/src/components/Select.tsx +24 -26
- package/src/components/Selection.tsx +21 -3
- package/src/components/Steps.tsx +23 -10
- package/src/components/TableSelection.tsx +1 -44
- package/src/components/Tabs.tsx +65 -54
- package/src/components/TabsTransfer.tsx +78 -9
- package/src/components/TabsTransferPicker.tsx +25 -13
- package/src/components/Timeline.tsx +36 -0
- package/src/components/TimelineItem.tsx +140 -0
- package/src/components/Transfer.tsx +11 -8
- package/src/components/TransferDropDown.tsx +20 -12
- package/src/components/TransferPicker.tsx +25 -4
- package/src/components/TreeSelection.tsx +7 -1
- package/src/components/calendar/Calendar.tsx +101 -4
- package/src/components/calendar/DaysView.tsx +165 -33
- package/src/components/calendar/MonthsView.tsx +108 -1
- package/src/components/calendar/QuartersView.tsx +3 -2
- package/src/components/calendar/TimeView.tsx +104 -41
- package/src/components/calendar/YearsView.tsx +34 -17
- package/src/components/condition-builder/Field.tsx +1 -3
- package/src/components/condition-builder/Func.tsx +1 -1
- package/src/components/formula/Editor.tsx +16 -11
- package/src/components/formula/FuncList.tsx +3 -1
- package/src/components/formula/Picker.tsx +2 -1
- package/src/components/formula/plugin.ts +0 -2
- package/src/components/icons.tsx +2 -0
- package/src/components/index.tsx +2 -0
- package/src/components/virtual-list/SizeAndPositionManager.ts +6 -3
- package/src/components/virtual-list/index.tsx +4 -6
- package/src/env.tsx +22 -0
- package/src/factory.tsx +93 -1
- package/src/icons/tree-down.svg +5 -0
- package/src/index.tsx +5 -0
- package/src/locale/de-DE.ts +17 -2
- package/src/locale/en-US.ts +17 -2
- package/src/locale/zh-CN.ts +16 -1
- package/src/renderers/Action.tsx +11 -2
- package/src/renderers/Avatar.tsx +83 -74
- package/src/renderers/Card.tsx +10 -6
- package/src/renderers/Custom.tsx +7 -4
- package/src/renderers/DropDownButton.tsx +69 -35
- package/src/renderers/Each.tsx +4 -4
- package/src/renderers/Flex.tsx +3 -7
- package/src/renderers/Form/ChartRadios.tsx +2 -7
- package/src/renderers/Form/Checkboxes.tsx +1 -1
- package/src/renderers/Form/CityDB.ts +526 -2
- package/src/renderers/Form/DiffEditor.tsx +2 -3
- package/src/renderers/Form/InputCity.tsx +23 -3
- package/src/renderers/Form/InputColor.tsx +21 -2
- package/src/renderers/Form/InputDate.tsx +48 -20
- package/src/renderers/Form/InputDateRange.tsx +9 -2
- package/src/renderers/Form/InputFormula.tsx +9 -4
- package/src/renderers/Form/InputImage.tsx +9 -4
- package/src/renderers/Form/InputMonthRange.tsx +0 -1
- package/src/renderers/Form/InputQuarterRange.tsx +0 -1
- package/src/renderers/Form/InputRichText.tsx +11 -1
- package/src/renderers/Form/InputYearRange.tsx +0 -1
- package/src/renderers/Form/Item.tsx +29 -8
- package/src/renderers/Form/NestedSelect.tsx +32 -4
- package/src/renderers/Form/Options.tsx +15 -7
- package/src/renderers/Form/Select.tsx +21 -5
- package/src/renderers/Form/TabsTransfer.tsx +28 -38
- package/src/renderers/Form/TabsTransferPicker.tsx +28 -46
- package/src/renderers/Form/Transfer.tsx +75 -24
- package/src/renderers/Form/TransferPicker.tsx +6 -38
- package/src/renderers/Form/TreeSelect.tsx +18 -16
- package/src/renderers/Form/index.tsx +7 -1
- package/src/renderers/IFrame.tsx +0 -2
- package/src/renderers/Link.tsx +18 -3
- package/src/renderers/Log.tsx +5 -1
- package/src/renderers/Remark.tsx +68 -18
- package/src/renderers/Steps.tsx +11 -13
- package/src/renderers/Table/index.tsx +7 -1
- package/src/renderers/Tabs.tsx +6 -2
- package/src/renderers/Timeline.tsx +141 -0
- package/src/renderers/Video.tsx +4 -20
- package/src/schemaExtend.ts +22 -10
- package/src/store/combo.ts +1 -3
- package/src/store/formItem.ts +1 -1
- package/src/utils/RootClose.ts +5 -1
- package/src/utils/api.ts +15 -2
- package/src/utils/debug.tsx +438 -0
- package/src/utils/helper.ts +6 -16
- package/src/utils/renderer-event.ts +75 -0
package/src/renderers/Remark.tsx
CHANGED
@@ -2,11 +2,12 @@ import React from 'react';
|
|
2
2
|
import {Renderer, RendererProps} from '../factory';
|
3
3
|
import {Api, SchemaNode, Schema, Action} from '../types';
|
4
4
|
import cx from 'classnames';
|
5
|
-
import TooltipWrapper from '../components/TooltipWrapper';
|
5
|
+
import TooltipWrapper, {TooltipObject} from '../components/TooltipWrapper';
|
6
6
|
import {filter} from '../utils/tpl';
|
7
|
-
import {themeable} from '../theme';
|
7
|
+
import {ClassNamesFn, themeable} from '../theme';
|
8
8
|
import {hasIcon, Icon} from '../components/icons';
|
9
9
|
import {BaseSchema, SchemaClassName, SchemaIcon, SchemaTpl} from '../Schema';
|
10
|
+
import {autobind, isMobile} from '../utils/helper';
|
10
11
|
|
11
12
|
/**
|
12
13
|
* 提示渲染器,默认会显示个小图标,鼠标放上来的时候显示配置的内容。
|
@@ -91,6 +92,51 @@ class Remark extends React.Component<RemarkProps> {
|
|
91
92
|
trigger: ['hover', 'focus'] as Array<'hover' | 'click' | 'focus'>
|
92
93
|
};
|
93
94
|
|
95
|
+
@autobind
|
96
|
+
showModalTip(tooltip?: string | TooltipObject) {
|
97
|
+
let {onAction, data} = this.props;
|
98
|
+
return (e: React.MouseEvent) => {
|
99
|
+
onAction &&
|
100
|
+
onAction(
|
101
|
+
e,
|
102
|
+
{
|
103
|
+
actionType: 'dialog',
|
104
|
+
dialog: {
|
105
|
+
title:
|
106
|
+
tooltip && typeof tooltip !== 'string' ? tooltip.title : '',
|
107
|
+
body:
|
108
|
+
tooltip && typeof tooltip !== 'string'
|
109
|
+
? tooltip.content
|
110
|
+
: tooltip,
|
111
|
+
actions: []
|
112
|
+
}
|
113
|
+
},
|
114
|
+
data
|
115
|
+
);
|
116
|
+
};
|
117
|
+
}
|
118
|
+
|
119
|
+
renderLabel(finalIcon: any, finalLabel: string, cx: ClassNamesFn) {
|
120
|
+
return (
|
121
|
+
<>
|
122
|
+
{finalLabel ? <span>{finalLabel}</span> : null}
|
123
|
+
{finalIcon ? (
|
124
|
+
hasIcon(finalIcon) ? (
|
125
|
+
<span className={cx('Remark-icon')}>
|
126
|
+
<Icon icon={finalIcon} />
|
127
|
+
</span>
|
128
|
+
) : (
|
129
|
+
<i className={cx('Remark-icon', finalIcon)} />
|
130
|
+
)
|
131
|
+
) : finalIcon === false && finalLabel ? null : (
|
132
|
+
<span className={cx('Remark-icon icon')}>
|
133
|
+
<Icon icon="question-mark" />
|
134
|
+
</span>
|
135
|
+
)}
|
136
|
+
</>
|
137
|
+
);
|
138
|
+
}
|
139
|
+
|
94
140
|
render() {
|
95
141
|
const {
|
96
142
|
className,
|
@@ -106,17 +152,34 @@ class Remark extends React.Component<RemarkProps> {
|
|
106
152
|
content,
|
107
153
|
data,
|
108
154
|
env,
|
109
|
-
tooltipClassName
|
155
|
+
tooltipClassName,
|
156
|
+
useMobileUI
|
110
157
|
} = this.props;
|
111
158
|
|
112
159
|
const finalIcon = tooltip?.icon ?? icon;
|
113
160
|
const finalLabel = tooltip?.label ?? label;
|
161
|
+
const parsedTip = filterContents(tooltip || content, data);
|
162
|
+
|
163
|
+
// 移动端使用弹框提示
|
164
|
+
if (isMobile() && useMobileUI) {
|
165
|
+
return (
|
166
|
+
<div
|
167
|
+
className={cx(
|
168
|
+
`Remark`,
|
169
|
+
(tooltip && tooltip.className) || className || `Remark--warning`
|
170
|
+
)}
|
171
|
+
onClick={this.showModalTip(parsedTip)}
|
172
|
+
>
|
173
|
+
{this.renderLabel(finalIcon, finalLabel, cx)}
|
174
|
+
</div>
|
175
|
+
);
|
176
|
+
}
|
114
177
|
|
115
178
|
return (
|
116
179
|
<TooltipWrapper
|
117
180
|
classPrefix={ns}
|
118
181
|
classnames={cx}
|
119
|
-
tooltip={
|
182
|
+
tooltip={parsedTip}
|
120
183
|
tooltipClassName={
|
121
184
|
(tooltip && tooltip.tooltipClassName) || tooltipClassName
|
122
185
|
}
|
@@ -132,20 +195,7 @@ class Remark extends React.Component<RemarkProps> {
|
|
132
195
|
(tooltip && tooltip.className) || className || `Remark--warning`
|
133
196
|
)}
|
134
197
|
>
|
135
|
-
{
|
136
|
-
{finalIcon ? (
|
137
|
-
hasIcon(finalIcon) ? (
|
138
|
-
<span className={cx('Remark-icon')}>
|
139
|
-
<Icon icon={finalIcon} />
|
140
|
-
</span>
|
141
|
-
) : (
|
142
|
-
<i className={cx('Remark-icon', finalIcon)} />
|
143
|
-
)
|
144
|
-
) : finalIcon === false && finalLabel ? null : (
|
145
|
-
<span className={cx('Remark-icon icon')}>
|
146
|
-
<Icon icon="question-mark" />
|
147
|
-
</span>
|
148
|
-
)}
|
198
|
+
{this.renderLabel(finalIcon, finalLabel, cx)}
|
149
199
|
</div>
|
150
200
|
</TooltipWrapper>
|
151
201
|
);
|
package/src/renderers/Steps.tsx
CHANGED
@@ -60,9 +60,11 @@ export interface StepsSchema extends BaseSchema {
|
|
60
60
|
*/
|
61
61
|
name?: string;
|
62
62
|
|
63
|
-
status?:
|
64
|
-
|
65
|
-
|
63
|
+
status?:
|
64
|
+
| StepStatus
|
65
|
+
| {
|
66
|
+
[propName: string]: StepStatus;
|
67
|
+
};
|
66
68
|
|
67
69
|
/**
|
68
70
|
* 展示模式
|
@@ -84,7 +86,7 @@ export function StepsCmpt(props: StepsProps) {
|
|
84
86
|
source,
|
85
87
|
config,
|
86
88
|
render,
|
87
|
-
|
89
|
+
useMobileUI
|
88
90
|
} = props;
|
89
91
|
|
90
92
|
const stepsRow =
|
@@ -92,9 +94,8 @@ export function StepsCmpt(props: StepsProps) {
|
|
92
94
|
config ||
|
93
95
|
steps ||
|
94
96
|
[];
|
95
|
-
const resolveRender = (val?: string | SchemaCollection) =>
|
96
|
-
? filter(val, data)
|
97
|
-
: val && render('inner', val);
|
97
|
+
const resolveRender = (val?: string | SchemaCollection) =>
|
98
|
+
typeof val === 'string' ? filter(val, data) : val && render('inner', val);
|
98
99
|
const value = getPropValue(props) ?? 0;
|
99
100
|
const resolveValue =
|
100
101
|
typeof value === 'string' && isNaN(+value)
|
@@ -112,13 +113,10 @@ export function StepsCmpt(props: StepsProps) {
|
|
112
113
|
title: resolveRender(step.title),
|
113
114
|
subTitle: resolveRender(step.subTitle),
|
114
115
|
description: resolveRender(step.description)
|
115
|
-
}
|
116
|
+
};
|
116
117
|
});
|
117
118
|
|
118
|
-
function getStepStatus(
|
119
|
-
step: StepSchema,
|
120
|
-
i: number
|
121
|
-
): StepStatus {
|
119
|
+
function getStepStatus(step: StepSchema, i: number): StepStatus {
|
122
120
|
let stepStatus;
|
123
121
|
|
124
122
|
if (typeof status === 'string') {
|
@@ -141,7 +139,7 @@ export function StepsCmpt(props: StepsProps) {
|
|
141
139
|
className={className}
|
142
140
|
status={status}
|
143
141
|
mode={mode}
|
144
|
-
useMobileUI={
|
142
|
+
useMobileUI={useMobileUI}
|
145
143
|
></Steps>
|
146
144
|
);
|
147
145
|
}
|
@@ -1173,6 +1173,7 @@ export default class Table extends React.Component<TableProps, object> {
|
|
1173
1173
|
group: 'table',
|
1174
1174
|
animation: 150,
|
1175
1175
|
handle: `.${ns}Table-dragCell`,
|
1176
|
+
filter: `.${ns}Table-dragCell.is-dragDisabled`,
|
1176
1177
|
ghostClass: 'is-dragging',
|
1177
1178
|
onEnd: (e: any) => {
|
1178
1179
|
// 没有移动
|
@@ -1857,7 +1858,12 @@ export default class Table extends React.Component<TableProps, object> {
|
|
1857
1858
|
);
|
1858
1859
|
} else if (column.type === '__dragme') {
|
1859
1860
|
return (
|
1860
|
-
<td
|
1861
|
+
<td
|
1862
|
+
key={props.key}
|
1863
|
+
className={cx(column.pristine.className, {
|
1864
|
+
'is-dragDisabled': !item.draggable
|
1865
|
+
})}
|
1866
|
+
>
|
1861
1867
|
{item.draggable ? <Icon icon="drag-bar" className="icon" /> : null}
|
1862
1868
|
</td>
|
1863
1869
|
);
|
package/src/renderers/Tabs.tsx
CHANGED
@@ -21,7 +21,11 @@ import {
|
|
21
21
|
} from '../Schema';
|
22
22
|
import {ActionSchema} from './Action';
|
23
23
|
import {filter} from '../utils/tpl';
|
24
|
-
import {
|
24
|
+
import {
|
25
|
+
resolveVariable,
|
26
|
+
tokenize,
|
27
|
+
resolveVariableAndFilter
|
28
|
+
} from '../utils/tpl-builtin';
|
25
29
|
import {FormSchemaHorizontal} from './Form/index';
|
26
30
|
import {str2AsyncFunction} from '../utils/api';
|
27
31
|
|
@@ -461,7 +465,7 @@ export default class Tabs extends React.Component<TabsProps, TabsState> {
|
|
461
465
|
} = this.props;
|
462
466
|
|
463
467
|
const mode = tabsMode || dMode;
|
464
|
-
const arr =
|
468
|
+
const arr = resolveVariableAndFilter(source, data, '| raw');
|
465
469
|
let mountOnEnter = this.props.mountOnEnter;
|
466
470
|
|
467
471
|
// 如果在form下面,其他tabs默认需要渲染出来
|
@@ -0,0 +1,141 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import {Renderer, RendererProps} from '../factory';
|
3
|
+
import {BaseSchema, SchemaApi, SchemaCollection, SchemaTokenizeableString} from '../Schema';
|
4
|
+
import {resolveVariable} from '../utils/tpl-builtin';
|
5
|
+
import Timeline from '../components/Timeline';
|
6
|
+
import {filter} from '../utils/tpl';
|
7
|
+
import { RemoteOptionsProps, withRemoteConfig } from '../components/WithRemoteConfig';
|
8
|
+
|
9
|
+
export interface TimelineItemSchema extends Omit<BaseSchema, 'type'> {
|
10
|
+
/**
|
11
|
+
* 时间点
|
12
|
+
*/
|
13
|
+
time: string;
|
14
|
+
|
15
|
+
/**
|
16
|
+
* 时间节点标题
|
17
|
+
*/
|
18
|
+
title?: SchemaCollection;
|
19
|
+
|
20
|
+
/**
|
21
|
+
* 详细内容
|
22
|
+
*/
|
23
|
+
detail?: string;
|
24
|
+
|
25
|
+
/**
|
26
|
+
* detail折叠时文案
|
27
|
+
*/
|
28
|
+
detailCollapsedText?: string;
|
29
|
+
|
30
|
+
/**
|
31
|
+
* detail展开时文案
|
32
|
+
*/
|
33
|
+
detailExpandedText?: string;
|
34
|
+
|
35
|
+
/**
|
36
|
+
* 时间点圆圈颜色
|
37
|
+
*/
|
38
|
+
color?: string;
|
39
|
+
|
40
|
+
/**
|
41
|
+
* 图标
|
42
|
+
*/
|
43
|
+
icon?: SchemaCollection;
|
44
|
+
}
|
45
|
+
|
46
|
+
export interface TimelineSchema extends BaseSchema {
|
47
|
+
/**
|
48
|
+
* 指定为 Timeline 时间轴渲染器
|
49
|
+
*/
|
50
|
+
type: 'timeline';
|
51
|
+
|
52
|
+
/**
|
53
|
+
* 节点数据
|
54
|
+
*/
|
55
|
+
items?: Array<TimelineItemSchema>;
|
56
|
+
|
57
|
+
/**
|
58
|
+
* API 或 数据映射
|
59
|
+
*/
|
60
|
+
source?: SchemaApi | SchemaTokenizeableString;
|
61
|
+
|
62
|
+
/**
|
63
|
+
* 文字相对于时间轴展示方向
|
64
|
+
*/
|
65
|
+
mode?: 'left' | 'right' | 'alternate';
|
66
|
+
|
67
|
+
/**
|
68
|
+
* 展示方向
|
69
|
+
*/
|
70
|
+
direction?: 'horizontal' | 'vertical'
|
71
|
+
|
72
|
+
/**
|
73
|
+
* 节点倒序
|
74
|
+
*/
|
75
|
+
reverse?: boolean,
|
76
|
+
}
|
77
|
+
|
78
|
+
export interface TimelineProps
|
79
|
+
extends RendererProps,
|
80
|
+
Omit<TimelineSchema, 'className'> {}
|
81
|
+
|
82
|
+
export function TimelineCmpt(props: TimelineProps) {
|
83
|
+
const {
|
84
|
+
items,
|
85
|
+
mode,
|
86
|
+
direction,
|
87
|
+
reverse,
|
88
|
+
data,
|
89
|
+
config,
|
90
|
+
source,
|
91
|
+
render
|
92
|
+
} = props;
|
93
|
+
|
94
|
+
// 获取源数据
|
95
|
+
const timelineItemsRow: Array<TimelineItemSchema> = config || items || [];
|
96
|
+
|
97
|
+
// 渲染内容
|
98
|
+
const resolveRender = (region: string, val?: SchemaCollection) => typeof val === 'string'
|
99
|
+
? filter(val, data)
|
100
|
+
: (val && render(region, val));
|
101
|
+
|
102
|
+
// 处理源数据
|
103
|
+
const resolveTimelineItems =
|
104
|
+
timelineItemsRow?.map((timelineItem: TimelineItemSchema) => {
|
105
|
+
return {
|
106
|
+
...timelineItem,
|
107
|
+
icon: resolveRender('icon', timelineItem.icon),
|
108
|
+
title: resolveRender('title', timelineItem.title),
|
109
|
+
}
|
110
|
+
});
|
111
|
+
|
112
|
+
|
113
|
+
return (<Timeline
|
114
|
+
items = {resolveTimelineItems}
|
115
|
+
direction = {direction}
|
116
|
+
reverse = {reverse}
|
117
|
+
mode = {mode}
|
118
|
+
/>)
|
119
|
+
}
|
120
|
+
|
121
|
+
const TimelineWithRemoteConfig = withRemoteConfig({
|
122
|
+
adaptor: data => data.items || data
|
123
|
+
})(
|
124
|
+
class extends React.Component<
|
125
|
+
RemoteOptionsProps & React.ComponentProps<typeof TimelineCmpt>
|
126
|
+
> {
|
127
|
+
render() {
|
128
|
+
const {config, deferLoad, loading, updateConfig, ...rest} = this.props;
|
129
|
+
return <TimelineCmpt config={config} {...rest} />;
|
130
|
+
}
|
131
|
+
}
|
132
|
+
);
|
133
|
+
|
134
|
+
@Renderer({
|
135
|
+
type: 'timeline'
|
136
|
+
})
|
137
|
+
export class TimelineRenderer extends React.Component<TimelineProps> {
|
138
|
+
render() {
|
139
|
+
return <TimelineWithRemoteConfig {...this.props} />;
|
140
|
+
}
|
141
|
+
}
|
package/src/renderers/Video.tsx
CHANGED
@@ -149,16 +149,8 @@ export class FlvSource extends React.Component<FlvSourceProps, any> {
|
|
149
149
|
unsubscribe: any;
|
150
150
|
|
151
151
|
componentDidMount() {
|
152
|
-
let {
|
153
|
-
|
154
|
-
video,
|
155
|
-
config,
|
156
|
-
manager,
|
157
|
-
isLive,
|
158
|
-
autoPlay,
|
159
|
-
actions,
|
160
|
-
setError
|
161
|
-
} = this.props;
|
152
|
+
let {src, video, config, manager, isLive, autoPlay, actions, setError} =
|
153
|
+
this.props;
|
162
154
|
|
163
155
|
this.initFlv({
|
164
156
|
video,
|
@@ -174,16 +166,8 @@ export class FlvSource extends React.Component<FlvSourceProps, any> {
|
|
174
166
|
|
175
167
|
componentDidUpdate(prevProps: FlvSourceProps) {
|
176
168
|
const props = this.props;
|
177
|
-
let {
|
178
|
-
|
179
|
-
actions,
|
180
|
-
src,
|
181
|
-
setError,
|
182
|
-
isLive,
|
183
|
-
config,
|
184
|
-
video,
|
185
|
-
manager
|
186
|
-
} = props;
|
169
|
+
let {autoPlay, actions, src, setError, isLive, config, video, manager} =
|
170
|
+
props;
|
187
171
|
|
188
172
|
if (src !== prevProps.src) {
|
189
173
|
setError('');
|
package/src/schemaExtend.ts
CHANGED
@@ -18,15 +18,22 @@ addSchemaFilter(function (schema: Schema, renderer, props?: any) {
|
|
18
18
|
const arr: Array<any> = [];
|
19
19
|
Object.keys(value).forEach(key => {
|
20
20
|
const valueType = typeof value[key];
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
21
|
+
if (key.endsWith('___tmp')) {
|
22
|
+
arr.push({
|
23
|
+
key: key.replace('___tmp', ''),
|
24
|
+
value: ''
|
25
|
+
});
|
26
|
+
} else {
|
27
|
+
arr.push({
|
28
|
+
key: key || '',
|
29
|
+
value:
|
30
|
+
valueType === 'string' ||
|
31
|
+
valueType === 'number' ||
|
32
|
+
valueType === 'boolean'
|
33
|
+
? value[key]
|
34
|
+
: JSON.stringify(value[key])
|
35
|
+
});
|
36
|
+
}
|
30
37
|
});
|
31
38
|
return arr;
|
32
39
|
},
|
@@ -41,7 +48,12 @@ addSchemaFilter(function (schema: Schema, renderer, props?: any) {
|
|
41
48
|
try {
|
42
49
|
value = JSON.parse(value);
|
43
50
|
} catch (e) {}
|
44
|
-
|
51
|
+
// 如果先输入了 a 作为 key,想输入 aa 的时候会先进入这里,导致无法输入 aa,因此当遇到 key 相同的时候加个 ___tmp 后缀
|
52
|
+
if (key in obj && typeof value === 'undefined') {
|
53
|
+
obj[key + '___tmp'] = '';
|
54
|
+
} else {
|
55
|
+
obj[key] = value;
|
56
|
+
}
|
45
57
|
});
|
46
58
|
return obj;
|
47
59
|
},
|
package/src/store/combo.ts
CHANGED
@@ -11,9 +11,7 @@ export const UniqueGroup = types
|
|
11
11
|
})
|
12
12
|
.views(self => ({
|
13
13
|
get items() {
|
14
|
-
return self.itemsRef.map(
|
15
|
-
id => (getStoreById(id) as any) as IFormItemStore
|
16
|
-
);
|
14
|
+
return self.itemsRef.map(id => getStoreById(id) as any as IFormItemStore);
|
17
15
|
}
|
18
16
|
}))
|
19
17
|
.actions(self => ({
|
package/src/store/formItem.ts
CHANGED
@@ -595,7 +595,7 @@ export const FormItemStore = StoreNode.named('FormItemStore')
|
|
595
595
|
json.data ||
|
596
596
|
[];
|
597
597
|
|
598
|
-
options = normalizeOptions(options as any);
|
598
|
+
options = normalizeOptions(options as any, undefined, self.valueField);
|
599
599
|
|
600
600
|
if (config?.extendsOptions && self.selectedOptions.length > 0) {
|
601
601
|
self.selectedOptions.forEach((item: any) => {
|
package/src/utils/RootClose.ts
CHANGED
@@ -4,9 +4,13 @@
|
|
4
4
|
|
5
5
|
import React, {useState} from 'react';
|
6
6
|
import useRootClose from 'react-overlays/useRootClose';
|
7
|
+
import {findDOMNode} from 'react-dom';
|
7
8
|
|
8
9
|
export const RootClose = ({children, onRootClose, ...props}: any) => {
|
9
|
-
const [
|
10
|
+
const [rootComponent, attachRef] = useState(null);
|
11
|
+
const rootElement = findDOMNode(rootComponent) as Element;
|
12
|
+
|
10
13
|
useRootClose(rootElement, onRootClose, props);
|
14
|
+
|
11
15
|
return typeof children === 'function' ? children(attachRef) : children;
|
12
16
|
};
|
package/src/utils/api.ts
CHANGED
@@ -15,6 +15,7 @@ import {
|
|
15
15
|
uuid
|
16
16
|
} from './helper';
|
17
17
|
import isPlainObject from 'lodash/isPlainObject';
|
18
|
+
import {debug} from './debug';
|
18
19
|
|
19
20
|
const rSchema = /(?:^|raw\:)(get|post|put|delete|patch|options|head|jsonp):/i;
|
20
21
|
|
@@ -265,7 +266,10 @@ export function responseAdaptor(ret: fetcherResult, api: ApiObject) {
|
|
265
266
|
payload.errors = data.errors;
|
266
267
|
}
|
267
268
|
|
269
|
+
debug('api', 'response', payload);
|
270
|
+
|
268
271
|
if (payload.ok && api.responseData) {
|
272
|
+
debug('api', 'before dataMapping', payload.data);
|
269
273
|
const responseData = dataMapping(
|
270
274
|
api.responseData,
|
271
275
|
|
@@ -280,7 +284,7 @@ export function responseAdaptor(ret: fetcherResult, api: ApiObject) {
|
|
280
284
|
undefined,
|
281
285
|
api.convertKeyToPath
|
282
286
|
);
|
283
|
-
|
287
|
+
debug('api', 'after dataMapping', responseData);
|
284
288
|
payload.data = responseData;
|
285
289
|
}
|
286
290
|
|
@@ -294,7 +298,11 @@ export function wrapFetcher(
|
|
294
298
|
return function (api, data, options) {
|
295
299
|
api = buildApi(api, data, options) as ApiObject;
|
296
300
|
|
297
|
-
|
301
|
+
if (api.requestAdaptor) {
|
302
|
+
debug('api', 'before requestAdaptor', api);
|
303
|
+
api = api.requestAdaptor(api) || api;
|
304
|
+
debug('api', 'after requestAdaptor', api);
|
305
|
+
}
|
298
306
|
|
299
307
|
if (api.data && (hasFile(api.data) || api.dataType === 'form-data')) {
|
300
308
|
api.data =
|
@@ -319,6 +327,8 @@ export function wrapFetcher(
|
|
319
327
|
api.headers['Content-Type'] = 'application/json';
|
320
328
|
}
|
321
329
|
|
330
|
+
debug('api', 'request api', api);
|
331
|
+
|
322
332
|
tracker?.(
|
323
333
|
{eventType: 'api', eventData: omit(api, ['config', 'data', 'body'])},
|
324
334
|
api.data
|
@@ -355,12 +365,15 @@ export function wrapAdaptor(promise: Promise<fetcherResult>, api: ApiObject) {
|
|
355
365
|
return adaptor
|
356
366
|
? promise
|
357
367
|
.then(async response => {
|
368
|
+
debug('api', 'before adaptor data', (response as any).data);
|
358
369
|
let result = adaptor((response as any).data, response, api);
|
359
370
|
|
360
371
|
if (result?.then) {
|
361
372
|
result = await result;
|
362
373
|
}
|
363
374
|
|
375
|
+
debug('api', 'after adaptor data', result);
|
376
|
+
|
364
377
|
return {
|
365
378
|
...response,
|
366
379
|
data: result
|