amis 1.9.1-beta.13 → 1.9.1-beta.17
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/Root.js +2 -2
- package/lib/Root.js.map +1 -1
- package/lib/RootRenderer.js +1 -1
- package/lib/RootRenderer.js.map +1 -1
- package/lib/SchemaRenderer.js +4 -4
- package/lib/SchemaRenderer.js.map +1 -1
- package/lib/Scoped.js +1 -1
- package/lib/Scoped.js.map +1 -1
- package/lib/WithRootStore.js +1 -1
- package/lib/WithRootStore.js.map +1 -1
- package/lib/WithStore.js +1 -1
- package/lib/WithStore.js.map +1 -1
- package/lib/actions/AjaxAction.js +1 -1
- package/lib/actions/AjaxAction.js.map +1 -1
- package/lib/actions/Decorators.js +1 -1
- package/lib/actions/Decorators.js.map +1 -1
- package/lib/actions/EmailAction.js +1 -1
- package/lib/actions/EmailAction.js.map +1 -1
- package/lib/actions/LoopAction.js +2 -2
- package/lib/actions/LoopAction.js.map +1 -1
- package/lib/compat.js +1 -1
- package/lib/compat.js.map +1 -1
- package/lib/components/Alert2.d.ts +10 -10
- package/lib/components/Alert2.js +2 -2
- package/lib/components/Alert2.js.map +1 -1
- package/lib/components/AnchorNav.js +1 -1
- package/lib/components/AnchorNav.js.map +1 -1
- package/lib/components/ArrayInput.js +2 -2
- package/lib/components/ArrayInput.js.map +1 -1
- package/lib/components/AsideNav.js +4 -4
- package/lib/components/AsideNav.js.map +1 -1
- package/lib/components/Avatar.js +3 -3
- package/lib/components/Avatar.js.map +1 -1
- package/lib/components/Badge.js +10 -10
- package/lib/components/Badge.js.map +1 -1
- package/lib/components/BaiduMapPicker.js +1 -1
- package/lib/components/BaiduMapPicker.js.map +1 -1
- package/lib/components/Breadcrumb.js +1 -1
- package/lib/components/Breadcrumb.js.map +1 -1
- package/lib/components/Button.js +3 -3
- package/lib/components/Button.js.map +1 -1
- package/lib/components/CalendarMobile.js +2 -2
- package/lib/components/CalendarMobile.js.map +1 -1
- package/lib/components/Card.js +1 -1
- package/lib/components/Card.js.map +1 -1
- package/lib/components/ChainedSelection.js +1 -1
- package/lib/components/ChainedSelection.js.map +1 -1
- package/lib/components/Checkbox.js +2 -2
- package/lib/components/Checkbox.js.map +1 -1
- package/lib/components/Collapse.js +3 -3
- package/lib/components/Collapse.js.map +1 -1
- package/lib/components/ColorPicker.js +5 -5
- package/lib/components/ColorPicker.js.map +1 -1
- package/lib/components/ContextMenu.js +3 -3
- package/lib/components/ContextMenu.js.map +1 -1
- package/lib/components/DatePicker.js +3 -3
- package/lib/components/DatePicker.js.map +1 -1
- package/lib/components/DateRangePicker.js +14 -14
- package/lib/components/DateRangePicker.js.map +1 -1
- package/lib/components/Drawer.js +10 -10
- package/lib/components/Drawer.js.map +1 -1
- package/lib/components/Editor.js +3 -3
- package/lib/components/Editor.js.map +1 -1
- package/lib/components/GridNav.js +11 -11
- package/lib/components/GridNav.js.map +1 -1
- package/lib/components/InputBox.js +1 -1
- package/lib/components/InputBox.js.map +1 -1
- package/lib/components/Layout.js +1 -1
- package/lib/components/Layout.js.map +1 -1
- package/lib/components/ListGroup.js +1 -1
- package/lib/components/ListGroup.js.map +1 -1
- package/lib/components/Modal.js +4 -4
- package/lib/components/Modal.js.map +1 -1
- package/lib/components/MonthRangePicker.js +13 -13
- package/lib/components/MonthRangePicker.js.map +1 -1
- package/lib/components/NumberInput.js +3 -3
- package/lib/components/NumberInput.js.map +1 -1
- package/lib/components/Picker.js +4 -4
- package/lib/components/Picker.js.map +1 -1
- package/lib/components/PickerColumn.js +4 -4
- package/lib/components/PickerColumn.js.map +1 -1
- package/lib/components/PopOver.js +2 -2
- package/lib/components/PopOver.js.map +1 -1
- package/lib/components/PopUp.js +10 -10
- package/lib/components/PopUp.js.map +1 -1
- package/lib/components/Progress.js +5 -5
- package/lib/components/Progress.js.map +1 -1
- package/lib/components/PullRefresh.js +2 -2
- package/lib/components/PullRefresh.js.map +1 -1
- package/lib/components/Radios.d.ts +10 -10
- package/lib/components/Radios.js +2 -2
- package/lib/components/Radios.js.map +1 -1
- package/lib/components/Range.js +1 -1
- package/lib/components/Range.js.map +1 -1
- package/lib/components/Rating.js +1 -1
- package/lib/components/Rating.js.map +1 -1
- package/lib/components/ResultBox.js +2 -2
- package/lib/components/ResultBox.js.map +1 -1
- package/lib/components/ResultList.js +5 -5
- package/lib/components/ResultList.js.map +1 -1
- package/lib/components/ResultTreeList.js +1 -1
- package/lib/components/ResultTreeList.js.map +1 -1
- package/lib/components/SearchBox.d.ts +40 -40
- package/lib/components/Select.d.ts +389 -193
- package/lib/components/Select.js +14 -12
- package/lib/components/Select.js.map +2 -2
- package/lib/components/SparkLine.js +3 -3
- package/lib/components/SparkLine.js.map +1 -1
- package/lib/components/Spinner.js +2 -2
- package/lib/components/Spinner.js.map +1 -1
- package/lib/components/Steps.js +3 -3
- package/lib/components/Steps.js.map +1 -1
- package/lib/components/Switch.js +2 -2
- package/lib/components/Switch.js.map +1 -1
- package/lib/components/Tabs.js +5 -5
- package/lib/components/Tabs.js.map +1 -1
- package/lib/components/Tag.js +3 -3
- package/lib/components/Tag.js.map +1 -1
- package/lib/components/Textarea.js +2 -2
- package/lib/components/Textarea.js.map +1 -1
- package/lib/components/Timeline.js +1 -1
- package/lib/components/Timeline.js.map +1 -1
- package/lib/components/TimelineItem.js +3 -3
- package/lib/components/TimelineItem.js.map +1 -1
- package/lib/components/Toast.js +3 -3
- package/lib/components/Toast.js.map +1 -1
- package/lib/components/Tooltip.js +1 -1
- package/lib/components/Tooltip.js.map +1 -1
- package/lib/components/TransferSearch.js +1 -1
- package/lib/components/TransferSearch.js.map +1 -1
- package/lib/components/Tree.js +5 -5
- package/lib/components/Tree.js.map +1 -1
- package/lib/components/TreeSelection.js +2 -2
- package/lib/components/TreeSelection.js.map +1 -1
- package/lib/components/UserSelect.js +4 -4
- package/lib/components/UserSelect.js.map +1 -1
- package/lib/components/WithRemoteConfig.js +1 -1
- package/lib/components/WithRemoteConfig.js.map +1 -1
- package/lib/components/WithStore.js +1 -1
- package/lib/components/WithStore.js.map +1 -1
- package/lib/components/calendar/DaysView.js +2 -2
- package/lib/components/calendar/DaysView.js.map +1 -1
- package/lib/components/calendar/QuartersView.js +1 -1
- package/lib/components/calendar/QuartersView.js.map +1 -1
- package/lib/components/calendar/TimeView.js +2 -2
- package/lib/components/calendar/TimeView.js.map +1 -1
- package/lib/components/condition-builder/Group.js +2 -2
- package/lib/components/condition-builder/Group.js.map +1 -1
- package/lib/components/condition-builder/GroupOrItem.js +1 -1
- package/lib/components/condition-builder/GroupOrItem.js.map +1 -1
- package/lib/components/formula/Editor.d.ts +44 -40
- package/lib/components/formula/Editor.js +20 -9
- package/lib/components/formula/Editor.js.map +2 -2
- package/lib/components/formula/Picker.d.ts +88 -41
- package/lib/components/formula/Picker.js +49 -22
- package/lib/components/formula/Picker.js.map +2 -2
- package/lib/components/formula/VariableList.js +7 -7
- package/lib/components/formula/VariableList.js.map +1 -1
- package/lib/components/formula/plugin.js +1 -1
- package/lib/components/formula/plugin.js.map +1 -1
- package/lib/components/icons.js +1 -1
- package/lib/components/icons.js.map +1 -1
- package/lib/components/schema-editor/SchemaVariableList.js +1 -1
- package/lib/components/schema-editor/SchemaVariableList.js.map +1 -1
- package/lib/components/table/Cell.js +2 -2
- package/lib/components/table/Cell.js.map +1 -1
- package/lib/components/table/HeadCellFilter.js +1 -1
- package/lib/components/table/HeadCellFilter.js.map +1 -1
- package/lib/components/table/HeadCellSelect.js +1 -1
- package/lib/components/table/HeadCellSelect.js.map +1 -1
- package/lib/components/table/index.js +9 -9
- package/lib/components/table/index.js.map +1 -1
- package/lib/components/virtual-list/SizeAndPositionManager.js +4 -4
- package/lib/components/virtual-list/SizeAndPositionManager.js.map +1 -1
- package/lib/env.js +1 -1
- package/lib/env.js.map +1 -1
- package/lib/factory.js +3 -3
- package/lib/factory.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/locale/de-DE.js +1 -1
- package/lib/locale/de-DE.js.map +2 -2
- package/lib/locale/en-US.js +1 -1
- package/lib/locale/en-US.js.map +2 -2
- package/lib/locale/zh-CN.js +1 -1
- package/lib/locale/zh-CN.js.map +2 -2
- package/lib/locale.js +1 -1
- package/lib/locale.js.map +1 -1
- package/lib/renderers/Action.js +2 -1
- package/lib/renderers/Action.js.map +2 -2
- package/lib/renderers/AnchorNav.js +1 -1
- package/lib/renderers/AnchorNav.js.map +1 -1
- package/lib/renderers/App.js +2 -2
- package/lib/renderers/App.js.map +1 -1
- package/lib/renderers/Audio.js +2 -2
- package/lib/renderers/Audio.js.map +1 -1
- package/lib/renderers/CRUD.js +11 -8
- package/lib/renderers/CRUD.js.map +2 -2
- package/lib/renderers/Card.js +6 -6
- package/lib/renderers/Card.js.map +1 -1
- package/lib/renderers/Cards.js +10 -10
- package/lib/renderers/Cards.js.map +1 -1
- package/lib/renderers/Carousel.js +2 -2
- package/lib/renderers/Carousel.js.map +1 -1
- package/lib/renderers/Chart.js +2 -2
- package/lib/renderers/Chart.js.map +1 -1
- package/lib/renderers/Dialog.js +5 -5
- package/lib/renderers/Dialog.js.map +1 -1
- package/lib/renderers/Divider.js +1 -1
- package/lib/renderers/Divider.js.map +1 -1
- package/lib/renderers/Drawer.js +4 -4
- package/lib/renderers/Drawer.js.map +1 -1
- package/lib/renderers/DropDownButton.js +5 -5
- package/lib/renderers/DropDownButton.js.map +1 -1
- package/lib/renderers/Each.js +1 -1
- package/lib/renderers/Each.js.map +1 -1
- package/lib/renderers/Flex.js +2 -2
- package/lib/renderers/Flex.js.map +1 -1
- package/lib/renderers/Form/ButtonGroupSelect.js +4 -4
- package/lib/renderers/Form/ButtonGroupSelect.js.map +1 -1
- package/lib/renderers/Form/ButtonToolbar.js +1 -1
- package/lib/renderers/Form/ButtonToolbar.js.map +1 -1
- package/lib/renderers/Form/ChainedSelect.js +2 -2
- package/lib/renderers/Form/ChainedSelect.js.map +1 -1
- package/lib/renderers/Form/ChartRadios.js +1 -1
- package/lib/renderers/Form/ChartRadios.js.map +1 -1
- package/lib/renderers/Form/Checkbox.js +1 -1
- package/lib/renderers/Form/Checkbox.js.map +1 -1
- package/lib/renderers/Form/Combo.js +8 -8
- package/lib/renderers/Form/Combo.js.map +1 -1
- package/lib/renderers/Form/DiffEditor.js +2 -2
- package/lib/renderers/Form/DiffEditor.js.map +1 -1
- package/lib/renderers/Form/Editor.js +4 -4
- package/lib/renderers/Form/Editor.js.map +1 -1
- package/lib/renderers/Form/FieldSet.js +1 -1
- package/lib/renderers/Form/FieldSet.js.map +1 -1
- package/lib/renderers/Form/Group.js +4 -4
- package/lib/renderers/Form/Group.js.map +1 -1
- package/lib/renderers/Form/IconPicker.js +2 -2
- package/lib/renderers/Form/IconPicker.js.map +1 -1
- package/lib/renderers/Form/InputColor.js +1 -1
- package/lib/renderers/Form/InputColor.js.map +1 -1
- package/lib/renderers/Form/InputDateRange.js +1 -1
- package/lib/renderers/Form/InputDateRange.js.map +1 -1
- package/lib/renderers/Form/InputFile.js +5 -5
- package/lib/renderers/Form/InputFile.js.map +1 -1
- package/lib/renderers/Form/InputFormula.d.ts +6 -2
- package/lib/renderers/Form/InputFormula.js +4 -3
- package/lib/renderers/Form/InputFormula.js.map +2 -2
- package/lib/renderers/Form/InputGroup.js +1 -1
- package/lib/renderers/Form/InputGroup.js.map +1 -1
- package/lib/renderers/Form/InputImage.js +2 -2
- package/lib/renderers/Form/InputImage.js.map +2 -2
- package/lib/renderers/Form/InputMonthRange.js +1 -1
- package/lib/renderers/Form/InputMonthRange.js.map +1 -1
- package/lib/renderers/Form/InputNumber.js +2 -2
- package/lib/renderers/Form/InputNumber.js.map +1 -1
- package/lib/renderers/Form/InputQuarterRange.js +1 -1
- package/lib/renderers/Form/InputQuarterRange.js.map +1 -1
- package/lib/renderers/Form/InputRange.js +2 -2
- package/lib/renderers/Form/InputRange.js.map +1 -1
- package/lib/renderers/Form/InputRepeat.js +2 -2
- package/lib/renderers/Form/InputRepeat.js.map +1 -1
- package/lib/renderers/Form/InputRichText.js +2 -2
- package/lib/renderers/Form/InputRichText.js.map +1 -1
- package/lib/renderers/Form/InputSubForm.js +5 -5
- package/lib/renderers/Form/InputSubForm.js.map +1 -1
- package/lib/renderers/Form/InputTable.js +2 -2
- package/lib/renderers/Form/InputTable.js.map +1 -1
- package/lib/renderers/Form/InputTag.js +1 -1
- package/lib/renderers/Form/InputTag.js.map +1 -1
- package/lib/renderers/Form/InputText.js +12 -12
- package/lib/renderers/Form/InputText.js.map +1 -1
- package/lib/renderers/Form/InputTree.d.ts +4 -0
- package/lib/renderers/Form/InputTree.js +3 -3
- package/lib/renderers/Form/InputTree.js.map +2 -2
- package/lib/renderers/Form/InputYearRange.js +1 -1
- package/lib/renderers/Form/InputYearRange.js.map +1 -1
- package/lib/renderers/Form/Item.js +7 -7
- package/lib/renderers/Form/Item.js.map +1 -1
- package/lib/renderers/Form/ListSelect.js +2 -2
- package/lib/renderers/Form/ListSelect.js.map +1 -1
- package/lib/renderers/Form/NestedSelect.js +1 -1
- package/lib/renderers/Form/NestedSelect.js.map +1 -1
- package/lib/renderers/Form/Options.js +2 -2
- package/lib/renderers/Form/Options.js.map +1 -1
- package/lib/renderers/Form/Picker.js +3 -3
- package/lib/renderers/Form/Picker.js.map +1 -1
- package/lib/renderers/Form/Radios.js +1 -1
- package/lib/renderers/Form/Radios.js.map +1 -1
- package/lib/renderers/Form/Select.d.ts +8 -0
- package/lib/renderers/Form/Select.js +3 -3
- package/lib/renderers/Form/Select.js.map +2 -2
- package/lib/renderers/Form/Static.js +1 -1
- package/lib/renderers/Form/Static.js.map +1 -1
- package/lib/renderers/Form/TabsTransfer.js +1 -1
- package/lib/renderers/Form/TabsTransfer.js.map +1 -1
- package/lib/renderers/Form/TabsTransferPicker.js +1 -1
- package/lib/renderers/Form/TabsTransferPicker.js.map +1 -1
- package/lib/renderers/Form/Transfer.js +3 -3
- package/lib/renderers/Form/Transfer.js.map +1 -1
- package/lib/renderers/Form/TreeSelect.js +4 -4
- package/lib/renderers/Form/TreeSelect.js.map +1 -1
- package/lib/renderers/Form/index.js +6 -6
- package/lib/renderers/Form/index.js.map +1 -1
- package/lib/renderers/Grid.js +7 -7
- package/lib/renderers/Grid.js.map +1 -1
- package/lib/renderers/Grid2D.js +1 -1
- package/lib/renderers/Grid2D.js.map +1 -1
- package/lib/renderers/HBox.js +5 -5
- package/lib/renderers/HBox.js.map +1 -1
- package/lib/renderers/IFrame.js +1 -1
- package/lib/renderers/IFrame.js.map +1 -1
- package/lib/renderers/Icon.js +3 -3
- package/lib/renderers/Icon.js.map +1 -1
- package/lib/renderers/Image.js +3 -3
- package/lib/renderers/Image.js.map +1 -1
- package/lib/renderers/List.js +14 -14
- package/lib/renderers/List.js.map +1 -1
- package/lib/renderers/Mapping.js +1 -1
- package/lib/renderers/Mapping.js.map +1 -1
- package/lib/renderers/Operation.js +1 -1
- package/lib/renderers/Operation.js.map +1 -1
- package/lib/renderers/Page.js +7 -7
- package/lib/renderers/Page.js.map +1 -1
- package/lib/renderers/Panel.js +2 -2
- package/lib/renderers/Panel.js.map +1 -1
- package/lib/renderers/PopOver.js +2 -2
- package/lib/renderers/PopOver.js.map +1 -1
- package/lib/renderers/Portlet.js +10 -10
- package/lib/renderers/Portlet.js.map +1 -1
- package/lib/renderers/Property.js +3 -3
- package/lib/renderers/Property.js.map +1 -1
- package/lib/renderers/QRCode.js +1 -1
- package/lib/renderers/QRCode.js.map +1 -1
- package/lib/renderers/QuickEdit.js +11 -11
- package/lib/renderers/QuickEdit.js.map +1 -1
- package/lib/renderers/Remark.js +1 -1
- package/lib/renderers/Remark.js.map +1 -1
- package/lib/renderers/Service.js +2 -2
- package/lib/renderers/Service.js.map +1 -1
- package/lib/renderers/Status.js +1 -1
- package/lib/renderers/Status.js.map +1 -1
- package/lib/renderers/Table/ColumnToggler.js +5 -5
- package/lib/renderers/Table/ColumnToggler.js.map +1 -1
- package/lib/renderers/Table/HeadCellFilterDropdown.js +2 -2
- package/lib/renderers/Table/HeadCellFilterDropdown.js.map +1 -1
- package/lib/renderers/Table/HeadCellSearchDropdown.js +2 -2
- package/lib/renderers/Table/HeadCellSearchDropdown.js.map +1 -1
- package/lib/renderers/Table/ItemActionsWrapper.js +2 -2
- package/lib/renderers/Table/ItemActionsWrapper.js.map +1 -1
- package/lib/renderers/Table/TableBody.js +3 -3
- package/lib/renderers/Table/TableBody.js.map +1 -1
- package/lib/renderers/Table/TableContent.js +1 -1
- package/lib/renderers/Table/TableContent.js.map +1 -1
- package/lib/renderers/Table/TableRow.js +4 -4
- package/lib/renderers/Table/TableRow.js.map +1 -1
- package/lib/renderers/Table/index.js +30 -29
- package/lib/renderers/Table/index.js.map +2 -2
- package/lib/renderers/Table-v2/HeadCellSearchDropdown.js +1 -1
- package/lib/renderers/Table-v2/HeadCellSearchDropdown.js.map +1 -1
- package/lib/renderers/Table-v2/index.js +5 -5
- package/lib/renderers/Table-v2/index.js.map +1 -1
- package/lib/renderers/TableView.js +4 -4
- package/lib/renderers/TableView.js.map +1 -1
- package/lib/renderers/Tabs.d.ts +6 -2
- package/lib/renderers/Tabs.js +25 -4
- package/lib/renderers/Tabs.js.map +2 -2
- package/lib/renderers/Tasks.js +1 -1
- package/lib/renderers/Tasks.js.map +1 -1
- package/lib/renderers/Tpl.js +1 -1
- package/lib/renderers/Tpl.js.map +1 -1
- package/lib/renderers/VBox.js +2 -2
- package/lib/renderers/VBox.js.map +1 -1
- package/lib/renderers/Video.js +4 -4
- package/lib/renderers/Video.js.map +1 -1
- package/lib/renderers/Wizard.js +7 -7
- package/lib/renderers/Wizard.js.map +1 -1
- package/lib/renderers/Wrapper.js +1 -1
- package/lib/renderers/Wrapper.js.map +1 -1
- package/lib/store/app.js +3 -3
- package/lib/store/app.js.map +1 -1
- package/lib/store/crud.js +1 -1
- package/lib/store/crud.js.map +1 -1
- package/lib/store/form.js +2 -2
- package/lib/store/form.js.map +1 -1
- package/lib/store/formItem.js +3 -3
- package/lib/store/formItem.js.map +1 -1
- package/lib/store/node.js +2 -2
- package/lib/store/node.js.map +1 -1
- package/lib/store/table-v2.js +7 -7
- package/lib/store/table-v2.js.map +1 -1
- package/lib/store/table.js +6 -6
- package/lib/store/table.js.map +1 -1
- package/lib/theme.js +1 -1
- package/lib/theme.js.map +1 -1
- package/lib/themes/ang-ie11.css +49 -27
- package/lib/themes/ang.css +44 -21
- package/lib/themes/ang.css.map +1 -1
- package/lib/themes/antd-ie11.css +49 -27
- package/lib/themes/antd.css +44 -21
- package/lib/themes/antd.css.map +1 -1
- package/lib/themes/cxd-ie11.css +49 -27
- package/lib/themes/cxd.css +44 -21
- package/lib/themes/cxd.css.map +1 -1
- package/lib/themes/dark-ie11.css +49 -27
- package/lib/themes/dark.css +44 -21
- package/lib/themes/dark.css.map +1 -1
- package/lib/themes/default-ie11.css +49 -27
- package/lib/themes/default.css +44 -21
- package/lib/themes/default.css.map +1 -1
- package/lib/utils/ColorScale.js +4 -4
- package/lib/utils/ColorScale.js.map +1 -1
- package/lib/utils/api.js +7 -7
- package/lib/utils/api.js.map +1 -1
- package/lib/utils/autobind.js +2 -2
- package/lib/utils/autobind.js.map +1 -1
- package/lib/utils/columnsSplit.js +2 -2
- package/lib/utils/columnsSplit.js.map +1 -1
- package/lib/utils/debug.js +13 -13
- package/lib/utils/debug.js.map +1 -1
- package/lib/utils/dom.js +1 -1
- package/lib/utils/dom.js.map +1 -1
- package/lib/utils/filter-schema.js +1 -1
- package/lib/utils/filter-schema.js.map +1 -1
- package/lib/utils/formula.js +5 -4
- package/lib/utils/formula.js.map +2 -2
- package/lib/utils/helper.js +6 -6
- package/lib/utils/helper.js.map +1 -1
- package/lib/utils/resize-sensor.js +1 -1
- package/lib/utils/resize-sensor.js.map +1 -1
- package/lib/utils/style.js +1 -1
- package/lib/utils/style.js.map +1 -1
- package/lib/utils/tpl-builtin.js +1 -1
- package/lib/utils/tpl-builtin.js.map +1 -1
- package/lib/utils/tpl-lodash.js +1 -1
- package/lib/utils/tpl-lodash.js.map +1 -1
- package/lib/utils/tpl.js +2 -2
- package/lib/utils/tpl.js.map +1 -1
- package/lib/utils/validations.js +2 -2
- package/lib/utils/validations.js.map +1 -1
- package/package.json +2 -2
- package/schema.json +240 -361
- package/scss/components/_formula.scss +45 -4
- package/scss/components/form/_checks.scss +47 -44
- package/scss/components/form/_date.scss +28 -19
- package/scss/components/form/_select.scss +3 -2
- package/sdk/ang-ie11.css +56 -29
- package/sdk/ang.css +51 -23
- package/sdk/antd-ie11.css +56 -29
- package/sdk/antd.css +51 -23
- package/sdk/barcode.js +51 -51
- package/sdk/charts.js +18 -18
- package/sdk/codemirror.js +7 -7
- package/sdk/color-picker.js +65 -65
- package/sdk/cropperjs.js +3 -3
- package/sdk/cxd-ie11.css +56 -29
- package/sdk/cxd.css +51 -23
- package/sdk/dark-ie11.css +56 -29
- package/sdk/dark.css +51 -23
- package/sdk/exceljs.js +1 -1
- package/sdk/locale/de-DE.js +2 -2
- package/sdk/markdown.js +69 -69
- package/sdk/papaparse.js +3 -3
- package/sdk/renderers/Form/CityDB.js +1 -1
- package/sdk/rest.js +16 -16
- package/sdk/rich-text.js +62 -62
- package/sdk/sdk-ie11.css +56 -29
- package/sdk/sdk.css +51 -23
- package/sdk/sdk.js +1655 -1767
- package/sdk/thirds/hls.js/hls.js +19 -19
- package/sdk/thirds/mpegts.js/mpegts.js +2 -2
- package/sdk/tinymce.js +57 -57
- package/src/components/Select.tsx +14 -12
- package/src/components/formula/Editor.tsx +51 -23
- package/src/components/formula/Picker.tsx +67 -9
- package/src/locale/de-DE.ts +2 -2
- package/src/locale/en-US.ts +2 -2
- package/src/locale/zh-CN.ts +1 -1
- package/src/renderers/Action.tsx +2 -1
- package/src/renderers/CRUD.tsx +2 -0
- package/src/renderers/Form/InputFormula.tsx +11 -3
- package/src/renderers/Form/InputImage.tsx +4 -2
- package/src/renderers/Form/InputTree.tsx +7 -0
- package/src/renderers/Form/Select.tsx +13 -0
- package/src/renderers/Table/index.tsx +9 -7
- package/src/renderers/Tabs.tsx +33 -3
- package/src/utils/formula.ts +5 -3
@@ -42,6 +42,10 @@ export interface FormulaEditorProps extends ThemeProps, LocaleProps {
|
|
42
42
|
* 变量展现模式,可选值:'tabs' | 'tree'
|
43
43
|
*/
|
44
44
|
variableMode?: 'tabs' | 'tree';
|
45
|
+
/**
|
46
|
+
* 只展示变量,不需要其他面板
|
47
|
+
*/
|
48
|
+
onlyVariable?: boolean;
|
45
49
|
/**
|
46
50
|
* 函数集合,默认不需要传,即 amis-formula 里面那个函数
|
47
51
|
* 如果有扩充,则需要传。
|
@@ -92,7 +96,7 @@ export declare class FormulaEditor extends React.Component<FormulaEditorProps, F
|
|
92
96
|
render(): JSX.Element;
|
93
97
|
}
|
94
98
|
declare const _default: {
|
95
|
-
new (props: Omit<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
99
|
+
new (props: Omit<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
96
100
|
locale?: string | undefined;
|
97
101
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
98
102
|
}, keyof ThemeProps> & import("../../theme").ThemeOutterProps): {
|
@@ -101,12 +105,12 @@ declare const _default: {
|
|
101
105
|
getWrappedInstance(): any;
|
102
106
|
render(): JSX.Element;
|
103
107
|
context: any;
|
104
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
108
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
105
109
|
locale?: string | undefined;
|
106
110
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
107
111
|
}, keyof ThemeProps> & import("../../theme").ThemeOutterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
108
112
|
forceUpdate(callback?: (() => void) | undefined): void;
|
109
|
-
readonly props: Readonly<Omit<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
113
|
+
readonly props: Readonly<Omit<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
110
114
|
locale?: string | undefined;
|
111
115
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
112
116
|
}, keyof ThemeProps> & import("../../theme").ThemeOutterProps> & Readonly<{
|
@@ -117,35 +121,35 @@ declare const _default: {
|
|
117
121
|
[key: string]: React.ReactInstance;
|
118
122
|
};
|
119
123
|
componentDidMount?(): void;
|
120
|
-
shouldComponentUpdate?(nextProps: Readonly<Omit<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
124
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
121
125
|
locale?: string | undefined;
|
122
126
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
123
127
|
}, keyof ThemeProps> & import("../../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
124
128
|
componentWillUnmount?(): void;
|
125
129
|
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
126
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
130
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
127
131
|
locale?: string | undefined;
|
128
132
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
129
133
|
}, keyof ThemeProps> & import("../../theme").ThemeOutterProps>, prevState: Readonly<{}>): any;
|
130
|
-
componentDidUpdate?(prevProps: Readonly<Omit<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
134
|
+
componentDidUpdate?(prevProps: Readonly<Omit<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
131
135
|
locale?: string | undefined;
|
132
136
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
133
137
|
}, keyof ThemeProps> & import("../../theme").ThemeOutterProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
134
138
|
componentWillMount?(): void;
|
135
139
|
UNSAFE_componentWillMount?(): void;
|
136
|
-
componentWillReceiveProps?(nextProps: Readonly<Omit<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
140
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
137
141
|
locale?: string | undefined;
|
138
142
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
139
143
|
}, keyof ThemeProps> & import("../../theme").ThemeOutterProps>, nextContext: any): void;
|
140
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
144
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
141
145
|
locale?: string | undefined;
|
142
146
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
143
147
|
}, keyof ThemeProps> & import("../../theme").ThemeOutterProps>, nextContext: any): void;
|
144
|
-
componentWillUpdate?(nextProps: Readonly<Omit<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
148
|
+
componentWillUpdate?(nextProps: Readonly<Omit<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
145
149
|
locale?: string | undefined;
|
146
150
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
147
151
|
}, keyof ThemeProps> & import("../../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
148
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
152
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
149
153
|
locale?: string | undefined;
|
150
154
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
151
155
|
}, keyof ThemeProps> & import("../../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
@@ -153,7 +157,7 @@ declare const _default: {
|
|
153
157
|
displayName: string;
|
154
158
|
contextType: React.Context<string>;
|
155
159
|
ComposedComponent: React.ComponentType<{
|
156
|
-
new (props: Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
160
|
+
new (props: Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
157
161
|
locale?: string | undefined;
|
158
162
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
159
163
|
}): {
|
@@ -162,12 +166,12 @@ declare const _default: {
|
|
162
166
|
getWrappedInstance(): any;
|
163
167
|
render(): JSX.Element;
|
164
168
|
context: any;
|
165
|
-
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
169
|
+
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
166
170
|
locale?: string | undefined;
|
167
171
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
168
172
|
}>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
|
169
173
|
forceUpdate(callback?: (() => void) | undefined): void;
|
170
|
-
readonly props: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
174
|
+
readonly props: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
171
175
|
locale?: string | undefined;
|
172
176
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
173
177
|
}> & Readonly<{
|
@@ -178,35 +182,35 @@ declare const _default: {
|
|
178
182
|
[key: string]: React.ReactInstance;
|
179
183
|
};
|
180
184
|
componentDidMount?(): void;
|
181
|
-
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
185
|
+
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
182
186
|
locale?: string | undefined;
|
183
187
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
184
188
|
}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
185
189
|
componentWillUnmount?(): void;
|
186
190
|
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
187
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
191
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
188
192
|
locale?: string | undefined;
|
189
193
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
190
194
|
}>, prevState: Readonly<{}>): any;
|
191
|
-
componentDidUpdate?(prevProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
195
|
+
componentDidUpdate?(prevProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
192
196
|
locale?: string | undefined;
|
193
197
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
194
198
|
}>, prevState: Readonly<{}>, snapshot?: any): void;
|
195
199
|
componentWillMount?(): void;
|
196
200
|
UNSAFE_componentWillMount?(): void;
|
197
|
-
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
201
|
+
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
198
202
|
locale?: string | undefined;
|
199
203
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
200
204
|
}>, nextContext: any): void;
|
201
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
205
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
202
206
|
locale?: string | undefined;
|
203
207
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
204
208
|
}>, nextContext: any): void;
|
205
|
-
componentWillUpdate?(nextProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
209
|
+
componentWillUpdate?(nextProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
206
210
|
locale?: string | undefined;
|
207
211
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
208
212
|
}>, nextState: Readonly<{}>, nextContext: any): void;
|
209
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
213
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
210
214
|
locale?: string | undefined;
|
211
215
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
212
216
|
}>, nextState: Readonly<{}>, nextContext: any): void;
|
@@ -218,7 +222,7 @@ declare const _default: {
|
|
218
222
|
ComposedComponent: typeof FormulaEditor;
|
219
223
|
}>;
|
220
224
|
} & import("hoist-non-react-statics").NonReactStatics<{
|
221
|
-
new (props: Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
225
|
+
new (props: Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
222
226
|
locale?: string | undefined;
|
223
227
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
224
228
|
}): {
|
@@ -227,12 +231,12 @@ declare const _default: {
|
|
227
231
|
getWrappedInstance(): any;
|
228
232
|
render(): JSX.Element;
|
229
233
|
context: any;
|
230
|
-
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
234
|
+
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
231
235
|
locale?: string | undefined;
|
232
236
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
233
237
|
}>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
|
234
238
|
forceUpdate(callback?: (() => void) | undefined): void;
|
235
|
-
readonly props: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
239
|
+
readonly props: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
236
240
|
locale?: string | undefined;
|
237
241
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
238
242
|
}> & Readonly<{
|
@@ -243,35 +247,35 @@ declare const _default: {
|
|
243
247
|
[key: string]: React.ReactInstance;
|
244
248
|
};
|
245
249
|
componentDidMount?(): void;
|
246
|
-
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
250
|
+
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
247
251
|
locale?: string | undefined;
|
248
252
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
249
253
|
}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
250
254
|
componentWillUnmount?(): void;
|
251
255
|
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
252
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
256
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
253
257
|
locale?: string | undefined;
|
254
258
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
255
259
|
}>, prevState: Readonly<{}>): any;
|
256
|
-
componentDidUpdate?(prevProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
260
|
+
componentDidUpdate?(prevProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
257
261
|
locale?: string | undefined;
|
258
262
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
259
263
|
}>, prevState: Readonly<{}>, snapshot?: any): void;
|
260
264
|
componentWillMount?(): void;
|
261
265
|
UNSAFE_componentWillMount?(): void;
|
262
|
-
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
266
|
+
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
263
267
|
locale?: string | undefined;
|
264
268
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
265
269
|
}>, nextContext: any): void;
|
266
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
270
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
267
271
|
locale?: string | undefined;
|
268
272
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
269
273
|
}>, nextContext: any): void;
|
270
|
-
componentWillUpdate?(nextProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
274
|
+
componentWillUpdate?(nextProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
271
275
|
locale?: string | undefined;
|
272
276
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
273
277
|
}>, nextState: Readonly<{}>, nextContext: any): void;
|
274
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
278
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
275
279
|
locale?: string | undefined;
|
276
280
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
277
281
|
}>, nextState: Readonly<{}>, nextContext: any): void;
|
@@ -283,7 +287,7 @@ declare const _default: {
|
|
283
287
|
ComposedComponent: typeof FormulaEditor;
|
284
288
|
}, {}> & {
|
285
289
|
ComposedComponent: {
|
286
|
-
new (props: Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
290
|
+
new (props: Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
287
291
|
locale?: string | undefined;
|
288
292
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
289
293
|
}): {
|
@@ -292,12 +296,12 @@ declare const _default: {
|
|
292
296
|
getWrappedInstance(): any;
|
293
297
|
render(): JSX.Element;
|
294
298
|
context: any;
|
295
|
-
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
299
|
+
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
296
300
|
locale?: string | undefined;
|
297
301
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
298
302
|
}>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
|
299
303
|
forceUpdate(callback?: (() => void) | undefined): void;
|
300
|
-
readonly props: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
304
|
+
readonly props: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
301
305
|
locale?: string | undefined;
|
302
306
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
303
307
|
}> & Readonly<{
|
@@ -308,35 +312,35 @@ declare const _default: {
|
|
308
312
|
[key: string]: React.ReactInstance;
|
309
313
|
};
|
310
314
|
componentDidMount?(): void;
|
311
|
-
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
315
|
+
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
312
316
|
locale?: string | undefined;
|
313
317
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
314
318
|
}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
315
319
|
componentWillUnmount?(): void;
|
316
320
|
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
317
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
321
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
318
322
|
locale?: string | undefined;
|
319
323
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
320
324
|
}>, prevState: Readonly<{}>): any;
|
321
|
-
componentDidUpdate?(prevProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
325
|
+
componentDidUpdate?(prevProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
322
326
|
locale?: string | undefined;
|
323
327
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
324
328
|
}>, prevState: Readonly<{}>, snapshot?: any): void;
|
325
329
|
componentWillMount?(): void;
|
326
330
|
UNSAFE_componentWillMount?(): void;
|
327
|
-
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
331
|
+
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
328
332
|
locale?: string | undefined;
|
329
333
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
330
334
|
}>, nextContext: any): void;
|
331
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
335
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
332
336
|
locale?: string | undefined;
|
333
337
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
334
338
|
}>, nextContext: any): void;
|
335
|
-
componentWillUpdate?(nextProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
339
|
+
componentWillUpdate?(nextProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
336
340
|
locale?: string | undefined;
|
337
341
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
338
342
|
}>, nextState: Readonly<{}>, nextContext: any): void;
|
339
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
343
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "header" | "className" | "theme" | "value" | "onChange" | "functions" | "variableMode" | "onlyVariable" | "variableClassName" | "functionClassName"> & Partial<Pick<Omit<FormulaEditorProps, keyof LocaleProps>, "evalMode" | "variables">> & Partial<Pick<Pick<FormulaEditorProps, "evalMode" | "variables">, never>> & {
|
340
344
|
locale?: string | undefined;
|
341
345
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
342
346
|
}>, nextState: Readonly<{}>, nextContext: any): void;
|
@@ -60,13 +60,13 @@ var FormulaEditor = /** @class */ (function (_super) {
|
|
60
60
|
var html = '';
|
61
61
|
// 标记方法调用
|
62
62
|
html = content.replace(/([A-Z]+)\s*\(/g, function (_, func, pos) {
|
63
|
-
return _ === null || _ === void 0 ? void 0 : _.replace(func, "<span class=\"c-func\">"
|
63
|
+
return _ === null || _ === void 0 ? void 0 : _.replace(func, "<span class=\"c-func\">" + func + "</span>");
|
64
64
|
});
|
65
65
|
vars.forEach(function (v) {
|
66
66
|
var from = 0;
|
67
67
|
var idx = -1;
|
68
68
|
while (~(idx = content.indexOf(v, from))) {
|
69
|
-
html = html.replace(v, "<span class=\"c-field\">"
|
69
|
+
html = html.replace(v, "<span class=\"c-field\">" + varMap[v] + "</span>");
|
70
70
|
from = idx + v.length;
|
71
71
|
}
|
72
72
|
});
|
@@ -110,10 +110,21 @@ var FormulaEditor = /** @class */ (function (_super) {
|
|
110
110
|
};
|
111
111
|
FormulaEditor.prototype.handleFunctionSelect = function (item) {
|
112
112
|
var _a;
|
113
|
-
(_a = this.editorPlugin) === null || _a === void 0 ? void 0 : _a.insertContent(""
|
113
|
+
(_a = this.editorPlugin) === null || _a === void 0 ? void 0 : _a.insertContent("" + item.name, 'func');
|
114
114
|
};
|
115
115
|
FormulaEditor.prototype.handleVariableSelect = function (item) {
|
116
116
|
var _a;
|
117
|
+
var _b = this.props, onlyVariable = _b.onlyVariable, evalMode = _b.evalMode;
|
118
|
+
// 只展示变量时,选择即提交
|
119
|
+
if (onlyVariable) {
|
120
|
+
var onChange = this.props.onChange;
|
121
|
+
var value = item.value
|
122
|
+
? evalMode
|
123
|
+
? item.value
|
124
|
+
: '${' + item.value + '}'
|
125
|
+
: '';
|
126
|
+
return onChange === null || onChange === void 0 ? void 0 : onChange(value);
|
127
|
+
}
|
117
128
|
(_a = this.editorPlugin) === null || _a === void 0 ? void 0 : _a.insertContent({
|
118
129
|
key: item.value,
|
119
130
|
name: item.label
|
@@ -127,22 +138,22 @@ var FormulaEditor = /** @class */ (function (_super) {
|
|
127
138
|
return (0, plugin_1.editorFactory)(dom, cm, this.props);
|
128
139
|
};
|
129
140
|
FormulaEditor.prototype.render = function () {
|
130
|
-
var _a = this.props, variables = _a.variables, header = _a.header, value = _a.value, functions = _a.functions, variableMode = _a.variableMode, __ = _a.translate, cx = _a.classnames, variableClassName = _a.variableClassName, functionClassName = _a.functionClassName, classPrefix = _a.classPrefix;
|
141
|
+
var _a = this.props, variables = _a.variables, header = _a.header, value = _a.value, functions = _a.functions, variableMode = _a.variableMode, onlyVariable = _a.onlyVariable, __ = _a.translate, cx = _a.classnames, variableClassName = _a.variableClassName, functionClassName = _a.functionClassName, classPrefix = _a.classPrefix;
|
131
142
|
var focused = this.state.focused;
|
132
143
|
var customFunctions = Array.isArray(functions) ? functions : [];
|
133
144
|
var functionList = (0, tslib_1.__spreadArray)((0, tslib_1.__spreadArray)([], FormulaEditor.buildDefaultFunctions(doc_1.doc), true), customFunctions, true);
|
134
145
|
return (react_1.default.createElement("div", { className: cx("FormulaEditor", {
|
135
146
|
'is-focused': focused
|
136
147
|
}) },
|
137
|
-
react_1.default.createElement("section", { className: cx("FormulaEditor-content") },
|
148
|
+
onlyVariable ? null : (react_1.default.createElement("section", { className: cx("FormulaEditor-content") },
|
138
149
|
react_1.default.createElement("header", { className: cx("FormulaEditor-header") }, __(header || 'FormulaEditor.title')),
|
139
|
-
react_1.default.createElement(CodeMirror_1.default, { className: cx('FormulaEditor-editor'), value: value, onChange: this.handleOnChange, editorFactory: this.editorFactory, editorDidMount: this.handleEditorMounted, onFocus: this.handleFocus, onBlur: this.handleBlur })),
|
140
|
-
react_1.default.createElement("section", { className: cx('FormulaEditor-settings') },
|
150
|
+
react_1.default.createElement(CodeMirror_1.default, { className: cx('FormulaEditor-editor'), value: value, onChange: this.handleOnChange, editorFactory: this.editorFactory, editorDidMount: this.handleEditorMounted, onFocus: this.handleFocus, onBlur: this.handleBlur }))),
|
151
|
+
react_1.default.createElement("section", { className: cx('FormulaEditor-settings', onlyVariable ? 'only-variable' : '') },
|
141
152
|
react_1.default.createElement("div", { className: cx('FormulaEditor-panel') },
|
142
153
|
variableMode !== 'tabs' ? (react_1.default.createElement("div", { className: cx('FormulaEditor-panel-header') }, __('FormulaEditor.variable'))) : null,
|
143
|
-
react_1.default.createElement("div", { className: cx('FormulaEditor-panel-body', variableMode && "FormulaEditor-panel-body--"
|
154
|
+
react_1.default.createElement("div", { className: cx('FormulaEditor-panel-body', variableMode && "FormulaEditor-panel-body--" + variableMode) },
|
144
155
|
react_1.default.createElement(VariableList_1.default, { classPrefix: classPrefix, className: cx('FormulaEditor-VariableList', 'FormulaEditor-VariableList-root', variableClassName), selectMode: variableMode, data: variables, onSelect: this.handleVariableSelect }))),
|
145
|
-
react_1.default.createElement(FuncList_1.default, { className: functionClassName, title: __('FormulaEditor.function'), data: functionList, onSelect: this.handleFunctionSelect }))));
|
156
|
+
onlyVariable ? null : (react_1.default.createElement(FuncList_1.default, { className: functionClassName, title: __('FormulaEditor.function'), data: functionList, onSelect: this.handleFunctionSelect })))));
|
146
157
|
};
|
147
158
|
var _a;
|
148
159
|
FormulaEditor.defaultProps = {
|
@@ -6,8 +6,8 @@
|
|
6
6
|
"/src/components/formula/Editor.tsx"
|
7
7
|
],
|
8
8
|
"names": [],
|
9
|
-
"mappings": ";;;;AAAA;;GAEG;AACH,6DAA0B;AAC1B,iDAA8C;AAC9C,6CAAmC;AACnC,6CAA0C;AAE1C,mCAAsD;AACtD,qEAAkC;AAClC,6EAA0C;AAC1C,0EAA6C;AAC7C,6CAAsD;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AAU,EAAE,YAAY,EACxB,IAAI,EAAE,SAAU,EAChB,QAAQ,EAAE,IAAI,CAAC,oBAAoB,GACnC,CACE,CACF;gBAEL,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACrB,8BAAC,kBAAQ,IACP,SAAS,EAAE,iBAAiB,EAC5B,KAAK,EAAE,EAAE,CAAC,wBAAwB,CAAC,EACnC,IAAI,EAAE,YAAY,EAClB,QAAQ,EAAE,IAAI,CAAC,oBAAoB,GACnC,CACH,CACO,CACN,CACP,CAAC;IACJ,CAAC;;IA7NM,0BAAY,GAAuD;QACxE,SAAS,EAAE,EAAE;QACb,QAAQ,EAAE,IAAI;KACf,CAAC;IAkDF;QADC,iBAAQ;;;;oDAKR;IAGD;QADC,iBAAQ;;;;mDAKR;IAGD;QADC,iBAAQ;;;;oDAGR;IAGD;QADC,iBAAQ;;;;4DAGR;IAGD;QADC,iBAAQ;;;;iDAeR;IAGD;QADC,iBAAQ;;;;6DAGR;IAGD;QADC,iBAAQ;;;;6DAsBR;IAGD;QADC,iBAAQ;;;;uDAIR;IAGD;QADC,iBAAQ;;0EACU,WAAW,oBAAX,WAAW;;sDAE7B;IA2FH,oBAAC;CAAA,AAhQD,CAAmC,eAAK,CAAC,SAAS,GAgQjD;AAhQY,sCAAa;AAkQ1B,kBAAe,IAAA,+BAAc,EAC3B,IAAA,iBAAS,EAAC,IAAA,mBAAU,EAAC,aAAa,CAAC,CAAC,EACpC;IACE,KAAK,EAAE,UAAU;CAClB,EACD,CAAC,UAAU,CAAC,CACb,CAAC",
|
10
10
|
"sourcesContent": [
|
11
|
-
"/**\n * @file 公式编辑器\n */\nimport React from 'react';\nimport {uncontrollable} from 'uncontrollable';\nimport {parse} from 'amis-formula';\nimport {doc} from 'amis-formula/dist/doc';\n\nimport {FormulaPlugin, editorFactory} from './plugin';\nimport FuncList from './FuncList';\nimport VariableList from './VariableList';\nimport CodeMirrorEditor from '../CodeMirror';\nimport {autobind, eachTree} from '../../utils/helper';\nimport {themeable, ThemeProps} from '../../theme';\nimport {localeable, LocaleProps} from '../../locale';\n\nexport interface VariableItem {\n label: string;\n value?: string;\n children?: Array<VariableItem>;\n type: '';\n tag?: string;\n selectMode?: 'tree' | 'tabs';\n}\n\nexport interface FuncGroup {\n groupName: string;\n items: Array<FuncItem>;\n}\n\nexport interface FuncItem {\n name: string; // 函数名\n example?: string; // 示例\n description?: string; // 描述\n [propName: string]: any;\n}\n\nexport interface FormulaEditorProps extends ThemeProps, LocaleProps {\n onChange?: (value: string) => void;\n value?: string;\n /**\n * evalMode 即直接就是表达式,否则\n * 需要 ${这里面才是表达式}\n * 默认为 true\n */\n evalMode?: boolean;\n\n /**\n * 用于提示的变量集合,默认为空\n */\n variables?: Array<VariableItem>;\n\n /**\n * 变量展现模式,可选值:'tabs' | 'tree'\n */\n variableMode?: 'tabs' | 'tree';\n\n /**\n * 函数集合,默认不需要传,即 amis-formula 里面那个函数\n * 如果有扩充,则需要传。\n */\n functions?: Array<FuncGroup>;\n\n /**\n * 顶部标题,默认为表达式\n */\n header: string;\n\n variableClassName?: string;\n\n functionClassName?: string;\n}\n\nexport interface FunctionsProps {\n name: string;\n items: FunctionProps[];\n}\n\nexport interface FunctionProps {\n name: string;\n intro: string;\n usage: string;\n example: string;\n}\n\nexport interface FormulaState {\n focused: boolean;\n}\n\nexport class FormulaEditor extends React.Component<\n FormulaEditorProps,\n FormulaState\n> {\n state: FormulaState = {\n focused: false\n };\n editorPlugin?: FormulaPlugin;\n\n static buildDefaultFunctions(\n doc: Array<{\n namespace: string;\n name: string;\n [propName: string]: any;\n }>\n ) {\n const funcs: Array<FuncGroup> = [];\n\n doc.forEach(item => {\n const namespace = item.namespace || 'Others';\n let exists = funcs.find(item => item.groupName === namespace);\n if (!exists) {\n exists = {\n groupName: namespace,\n items: []\n };\n funcs.push(exists);\n }\n exists.items.push(item);\n });\n\n return funcs;\n }\n\n static defaultProps: Pick<FormulaEditorProps, 'variables' | 'evalMode'> = {\n variables: [],\n evalMode: true\n };\n\n static highlightValue(\n value: string,\n variables: Array<VariableItem>,\n evalMode: boolean = true\n ) {\n if (!Array.isArray(variables) || !variables.length || !value) {\n return;\n }\n\n const varMap: {\n [propname: string]: string;\n } = {};\n\n eachTree(variables, item => {\n if (item.value) {\n const key = item.value;\n varMap[key] = item.label;\n }\n });\n const vars = Object.keys(varMap)\n .filter(item => item)\n .sort((a, b) => b.length - a.length);\n\n const content = value || '';\n let html = '';\n\n // 标记方法调用\n html = content.replace(/([A-Z]+)\\s*\\(/g, (_, func, pos) => {\n return _?.replace(func, `<span class=\"c-func\">${func}</span>`);\n });\n\n vars.forEach(v => {\n let from = 0;\n let idx = -1;\n while (~(idx = content.indexOf(v, from))) {\n html = html.replace(v, `<span class=\"c-field\">${varMap[v]}</span>`);\n from = idx + v.length;\n }\n });\n\n return {html};\n }\n\n componentWillUnmount() {\n this.editorPlugin?.dispose();\n }\n\n @autobind\n handleFocus() {\n this.setState({\n focused: true\n });\n }\n\n @autobind\n handleBlur() {\n this.setState({\n focused: false\n });\n }\n\n @autobind\n insertValue(value: any, type: 'variable' | 'func') {\n this.editorPlugin?.insertContent(value, type);\n }\n\n @autobind\n handleEditorMounted(cm: any, editor: any) {\n this.editorPlugin = new FormulaPlugin(editor, cm, () => this.props);\n }\n\n @autobind\n validate() {\n const value = this.props.value;\n\n try {\n value\n ? parse(value, {\n evalMode: this.props.evalMode\n })\n : null;\n } catch (e) {\n return e.message;\n }\n\n return;\n }\n\n @autobind\n handleFunctionSelect(item: FuncItem) {\n this.editorPlugin?.insertContent(`${item.name}`, 'func');\n }\n\n @autobind\n handleVariableSelect(item: VariableItem) {\n this.editorPlugin?.insertContent(\n {\n key: item.value,\n name: item.label\n },\n 'variable'\n );\n }\n\n @autobind\n handleOnChange(value: any) {\n const onChange = this.props.onChange;\n onChange?.(value);\n }\n\n @autobind\n editorFactory(dom: HTMLElement, cm: any) {\n return editorFactory(dom, cm, this.props);\n }\n\n render() {\n const {\n variables,\n header,\n value,\n functions,\n variableMode,\n translate: __,\n classnames: cx,\n variableClassName,\n functionClassName,\n classPrefix\n } = this.props;\n const {focused} = this.state;\n const customFunctions = Array.isArray(functions) ? functions : [];\n const functionList = [\n ...FormulaEditor.buildDefaultFunctions(doc),\n ...customFunctions\n ];\n\n return (\n <div\n className={cx(`FormulaEditor`, {\n 'is-focused': focused\n })}\n >\n <section className={cx(`FormulaEditor-content`)}>\n
|
11
|
+
"/**\n * @file 公式编辑器\n */\nimport React from 'react';\nimport {uncontrollable} from 'uncontrollable';\nimport {parse} from 'amis-formula';\nimport {doc} from 'amis-formula/dist/doc';\n\nimport {FormulaPlugin, editorFactory} from './plugin';\nimport FuncList from './FuncList';\nimport VariableList from './VariableList';\nimport CodeMirrorEditor from '../CodeMirror';\nimport {autobind, eachTree} from '../../utils/helper';\nimport {themeable, ThemeProps} from '../../theme';\nimport {localeable, LocaleProps} from '../../locale';\n\nexport interface VariableItem {\n label: string;\n value?: string;\n children?: Array<VariableItem>;\n type: '';\n tag?: string;\n selectMode?: 'tree' | 'tabs';\n}\n\nexport interface FuncGroup {\n groupName: string;\n items: Array<FuncItem>;\n}\n\nexport interface FuncItem {\n name: string; // 函数名\n example?: string; // 示例\n description?: string; // 描述\n [propName: string]: any;\n}\n\nexport interface FormulaEditorProps extends ThemeProps, LocaleProps {\n onChange?: (value: string) => void;\n value?: string;\n /**\n * evalMode 即直接就是表达式,否则\n * 需要 ${这里面才是表达式}\n * 默认为 true\n */\n evalMode?: boolean;\n\n /**\n * 用于提示的变量集合,默认为空\n */\n variables?: Array<VariableItem>;\n\n /**\n * 变量展现模式,可选值:'tabs' | 'tree'\n */\n variableMode?: 'tabs' | 'tree';\n\n /**\n * 只展示变量,不需要其他面板\n */\n onlyVariable?: boolean;\n\n /**\n * 函数集合,默认不需要传,即 amis-formula 里面那个函数\n * 如果有扩充,则需要传。\n */\n functions?: Array<FuncGroup>;\n\n /**\n * 顶部标题,默认为表达式\n */\n header: string;\n\n variableClassName?: string;\n\n functionClassName?: string;\n}\n\nexport interface FunctionsProps {\n name: string;\n items: FunctionProps[];\n}\n\nexport interface FunctionProps {\n name: string;\n intro: string;\n usage: string;\n example: string;\n}\n\nexport interface FormulaState {\n focused: boolean;\n}\n\nexport class FormulaEditor extends React.Component<\n FormulaEditorProps,\n FormulaState\n> {\n state: FormulaState = {\n focused: false\n };\n editorPlugin?: FormulaPlugin;\n\n static buildDefaultFunctions(\n doc: Array<{\n namespace: string;\n name: string;\n [propName: string]: any;\n }>\n ) {\n const funcs: Array<FuncGroup> = [];\n\n doc.forEach(item => {\n const namespace = item.namespace || 'Others';\n let exists = funcs.find(item => item.groupName === namespace);\n if (!exists) {\n exists = {\n groupName: namespace,\n items: []\n };\n funcs.push(exists);\n }\n exists.items.push(item);\n });\n\n return funcs;\n }\n\n static defaultProps: Pick<FormulaEditorProps, 'variables' | 'evalMode'> = {\n variables: [],\n evalMode: true\n };\n\n static highlightValue(\n value: string,\n variables: Array<VariableItem>,\n evalMode: boolean = true\n ) {\n if (!Array.isArray(variables) || !variables.length || !value) {\n return;\n }\n\n const varMap: {\n [propname: string]: string;\n } = {};\n\n eachTree(variables, item => {\n if (item.value) {\n const key = item.value;\n varMap[key] = item.label;\n }\n });\n const vars = Object.keys(varMap)\n .filter(item => item)\n .sort((a, b) => b.length - a.length);\n\n const content = value || '';\n let html = '';\n\n // 标记方法调用\n html = content.replace(/([A-Z]+)\\s*\\(/g, (_, func, pos) => {\n return _?.replace(func, `<span class=\"c-func\">${func}</span>`);\n });\n\n vars.forEach(v => {\n let from = 0;\n let idx = -1;\n while (~(idx = content.indexOf(v, from))) {\n html = html.replace(v, `<span class=\"c-field\">${varMap[v]}</span>`);\n from = idx + v.length;\n }\n });\n\n return {html};\n }\n\n componentWillUnmount() {\n this.editorPlugin?.dispose();\n }\n\n @autobind\n handleFocus() {\n this.setState({\n focused: true\n });\n }\n\n @autobind\n handleBlur() {\n this.setState({\n focused: false\n });\n }\n\n @autobind\n insertValue(value: any, type: 'variable' | 'func') {\n this.editorPlugin?.insertContent(value, type);\n }\n\n @autobind\n handleEditorMounted(cm: any, editor: any) {\n this.editorPlugin = new FormulaPlugin(editor, cm, () => this.props);\n }\n\n @autobind\n validate() {\n const value = this.props.value;\n\n try {\n value\n ? parse(value, {\n evalMode: this.props.evalMode\n })\n : null;\n } catch (e) {\n return e.message;\n }\n\n return;\n }\n\n @autobind\n handleFunctionSelect(item: FuncItem) {\n this.editorPlugin?.insertContent(`${item.name}`, 'func');\n }\n\n @autobind\n handleVariableSelect(item: VariableItem) {\n const {onlyVariable, evalMode} = this.props;\n\n // 只展示变量时,选择即提交\n if (onlyVariable) {\n const onChange = this.props.onChange;\n const value = item.value\n ? evalMode\n ? item.value\n : '${' + item.value + '}'\n : '';\n return onChange?.(value);\n }\n\n this.editorPlugin?.insertContent(\n {\n key: item.value,\n name: item.label\n },\n 'variable'\n );\n }\n\n @autobind\n handleOnChange(value: any) {\n const onChange = this.props.onChange;\n onChange?.(value);\n }\n\n @autobind\n editorFactory(dom: HTMLElement, cm: any) {\n return editorFactory(dom, cm, this.props);\n }\n\n render() {\n const {\n variables,\n header,\n value,\n functions,\n variableMode,\n onlyVariable,\n translate: __,\n classnames: cx,\n variableClassName,\n functionClassName,\n classPrefix\n } = this.props;\n const {focused} = this.state;\n const customFunctions = Array.isArray(functions) ? functions : [];\n const functionList = [\n ...FormulaEditor.buildDefaultFunctions(doc),\n ...customFunctions\n ];\n\n return (\n <div\n className={cx(`FormulaEditor`, {\n 'is-focused': focused\n })}\n >\n {onlyVariable ? null : (\n <section className={cx(`FormulaEditor-content`)}>\n <header className={cx(`FormulaEditor-header`)}>\n {__(header || 'FormulaEditor.title')}\n </header>\n\n <CodeMirrorEditor\n className={cx('FormulaEditor-editor')}\n value={value}\n onChange={this.handleOnChange}\n editorFactory={this.editorFactory}\n editorDidMount={this.handleEditorMounted}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n </section>\n )}\n\n <section\n className={cx(\n 'FormulaEditor-settings',\n onlyVariable ? 'only-variable' : ''\n )}\n >\n <div className={cx('FormulaEditor-panel')}>\n {variableMode !== 'tabs' ? (\n <div className={cx('FormulaEditor-panel-header')}>\n {__('FormulaEditor.variable')}\n </div>\n ) : null}\n <div\n className={cx(\n 'FormulaEditor-panel-body',\n variableMode && `FormulaEditor-panel-body--${variableMode}`\n )}\n >\n <VariableList\n classPrefix={classPrefix}\n className={cx(\n 'FormulaEditor-VariableList',\n 'FormulaEditor-VariableList-root',\n variableClassName\n )}\n selectMode={variableMode}\n data={variables!}\n onSelect={this.handleVariableSelect}\n />\n </div>\n </div>\n\n {onlyVariable ? null : (\n <FuncList\n className={functionClassName}\n title={__('FormulaEditor.function')}\n data={functionList}\n onSelect={this.handleFunctionSelect}\n />\n )}\n </section>\n </div>\n );\n }\n}\n\nexport default uncontrollable(\n themeable(localeable(FormulaEditor)),\n {\n value: 'onChange'\n },\n ['validate']\n);\n"
|
12
12
|
]
|
13
13
|
}
|