@luck-design-biz/luckda 1.0.0-alpha → 1.0.1-10
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/LICENSE +21 -21
- package/README.md +40 -40
- package/es/components/Builder/index.js +15 -3
- package/es/components/ComplexItem/index.js +65 -49
- package/es/components/LDActions/index.less +68 -68
- package/es/components/LdAutoForm/index.js +6 -4
- package/es/components/LdFormList/index.js +11 -10
- package/es/components/LdGrid/index.js +4 -4
- package/es/components/LdGridForm/index.js +40 -23
- package/es/components/LdGridForm/index.less +7 -7
- package/es/components/LdTree/index.less +40 -40
- package/es/helper/action.js +6 -6
- package/es/helper/form.js +15 -14
- package/es/helper/index.less +7 -7
- package/es/helper/ldBuilder.js +8 -3
- package/es/locales/zh-CN.js +41 -4
- package/es/lowcode/constants/api-url.js +87 -87
- package/es/lowcode/constants/event-topics.js +0 -2
- package/es/lowcode/engine/launcher.js +3 -1
- package/es/lowcode/engine/meta/box.props.json +3 -3
- package/es/lowcode/engine/meta/button.props.default.json +1 -1
- package/es/lowcode/engine/meta/button.props.json +2 -2
- package/es/lowcode/engine/meta/cardlist.props.default.json +1 -0
- package/es/lowcode/engine/meta/cardlist.props.json +2 -1
- package/es/lowcode/engine/meta/components-list.json +6 -126
- package/es/lowcode/engine/meta/dialog.props.default.json +4 -2
- package/es/lowcode/engine/meta/dialog.props.json +76 -20
- package/es/lowcode/engine/meta/drawer.props.default.json +15 -4
- package/es/lowcode/engine/meta/drawer.props.json +144 -24
- package/es/lowcode/engine/meta/fieldcomplex.props.default.json +1 -0
- package/es/lowcode/engine/meta/fieldcomplex.props.json +7 -0
- package/es/lowcode/engine/meta/fielddatadic.props.default.json +16 -0
- package/es/lowcode/engine/meta/fielddatadic.props.json +73 -0
- package/es/lowcode/engine/meta/fielddate.props.default.json +2 -0
- package/es/lowcode/engine/meta/fielddate.props.json +4 -2
- package/es/lowcode/engine/meta/fieldnumber.props.default.json +1 -0
- package/es/lowcode/engine/meta/fieldnumber.props.json +3 -2
- package/es/lowcode/engine/meta/fielduser.props.default.json +1 -1
- package/es/lowcode/engine/meta/fielduser.props.json +1 -1
- package/es/lowcode/engine/meta/form.props.default.json +14 -4
- package/es/lowcode/engine/meta/form.props.json +53 -14
- package/es/lowcode/engine/meta/grouptree.props.default.json +16 -0
- package/es/lowcode/engine/meta/grouptree.props.json +89 -0
- package/es/lowcode/engine/meta/iframe.props.default.json +2 -1
- package/es/lowcode/engine/meta/iframe.props.json +3 -2
- package/es/lowcode/engine/meta/image.props.default.json +2 -1
- package/es/lowcode/engine/meta/image.props.json +3 -2
- package/es/lowcode/engine/meta/imex.props.default.json +2 -1
- package/es/lowcode/engine/meta/imex.props.json +27 -6
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +65 -42
- package/es/lowcode/engine/meta/jsx.props.default.json +1 -1
- package/es/lowcode/engine/meta/jsx.props.json +1 -1
- package/es/lowcode/engine/meta/layout.props.default.json +1 -1
- package/es/lowcode/engine/meta/layout.props.json +5 -5
- package/es/lowcode/engine/meta/link.props.default.json +2 -1
- package/es/lowcode/engine/meta/link.props.json +3 -2
- package/es/lowcode/engine/meta/page.props.json +6 -0
- package/es/lowcode/engine/meta/pagelayout.props.default.json +1 -1
- package/es/lowcode/engine/meta/pagelayout.props.json +1 -1
- package/es/lowcode/engine/meta/section.props.json +2 -1
- package/es/lowcode/engine/meta/split.props.default.json +1 -1
- package/es/lowcode/engine/meta/split.props.json +1 -1
- package/es/lowcode/engine/meta/table.props.json +3 -3
- package/es/lowcode/engine/meta/text.props.default.json +4 -2
- package/es/lowcode/engine/meta/text.props.json +8 -6
- package/es/lowcode/engine/meta/tree.props.json +2 -2
- package/es/lowcode/engine/provider/ContextProvider/index.js +83 -66
- package/es/lowcode/engine/provider/ContextProvider/router.js +43 -0
- package/es/lowcode/engine/{tools → provider/ContextProvider}/usePageDataStore.js +9 -7
- package/es/lowcode/engine/provider/ContextProvider/usePageVar.js +38 -15
- package/es/lowcode/engine/{tools → provider/ContextProvider}/useTodo.js +5 -7
- package/es/lowcode/engine/provider/ContextProvider/utils.js +157 -0
- package/es/lowcode/engine/provider/RemoteSourceProvider.js +1 -2
- package/es/lowcode/engine/tools/dataProcess.js +76 -76
- package/es/lowcode/engine/tools/helper.js +28 -2
- package/es/lowcode/engine/tools/initDS.js +263 -0
- package/es/lowcode/engine/tools/useCanvasRender.js +13 -1
- package/es/lowcode/engine/tools/useCombinedRefs.js +3 -2
- package/es/lowcode/painter/Components.js +2 -2
- package/es/lowcode/painter/Design.js +1 -0
- package/es/lowcode/painter/DesignOperator.js +25 -11
- package/es/lowcode/painter/Panel.js +2 -2
- package/es/lowcode/painter/components/AdvancePanel.js +3 -3
- package/es/lowcode/painter/components/Collapse.js +31 -28
- package/es/lowcode/painter/components/ColorInput.js +24 -24
- package/es/lowcode/painter/components/ListEditor.js +24 -24
- package/es/lowcode/painter/components/NumberInput.js +29 -29
- package/es/lowcode/painter/components/PanelItem.js +24 -24
- package/es/lowcode/painter/components/PopConfirm.js +8 -8
- package/es/lowcode/painter/components/PopForm.js +27 -27
- package/es/lowcode/painter/components/RuleInput.js +30 -30
- package/es/lowcode/painter/components/SortBox.js +22 -22
- package/es/lowcode/painter/components/TipIcon.js +16 -0
- package/es/lowcode/painter/components/VarEditor.js +456 -0
- package/es/lowcode/painter/components/code-editor/BaseEditor.js +32 -32
- package/es/lowcode/painter/components/code-editor/CssEditor.js +25 -25
- package/es/lowcode/painter/components/code-editor/FullScreenEditor.js +25 -25
- package/es/lowcode/painter/components/code-editor/JSEditor.js +23 -21
- package/es/lowcode/painter/components/code-editor/JsonEditor.js +25 -25
- package/es/lowcode/painter/components/code-editor/VisionEditor.js +81 -0
- package/es/lowcode/painter/components/field-setting/SettingUI.js +47 -5
- package/es/lowcode/painter/components/field-setting/index.js +27 -13
- package/es/lowcode/painter/components/field-setting/meta/frontRules.js +2 -1
- package/es/lowcode/painter/index.js +1 -0
- package/es/lowcode/painter/panel-section/BlockEditor/index.js +20 -6
- package/es/lowcode/painter/panel-section/BlocksEditor/index.js +2 -2
- package/es/lowcode/painter/panel-section/ComplexPop.js +242 -0
- package/es/lowcode/painter/panel-section/DataSetSelector.js +8 -0
- package/es/lowcode/painter/panel-section/FieldsSetting.js +30 -4
- package/es/lowcode/painter/panel-section/GroupClassSelector.js +55 -0
- package/es/lowcode/painter/panel-section/I18nInput.js +4 -2
- package/es/lowcode/painter/panel-section/Icon.js +32 -27
- package/es/lowcode/painter/panel-section/IconConditionSelector.js +7 -7
- package/es/lowcode/painter/panel-section/IconSelector.js +17 -17
- package/es/lowcode/painter/panel-section/ImpExp.js +1 -27
- package/es/lowcode/painter/panel-section/ImpExpAlone.js +1 -2
- package/es/lowcode/painter/panel-section/LayoutRatio.js +22 -21
- package/es/lowcode/painter/panel-section/PageVars.js +300 -0
- package/es/lowcode/painter/panel-section/StylePanel/BackGround.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Border.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/BorderRadius.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/BorderRadiusSelector.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/BorderSelector.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Display.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Font.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/FontEditor.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/GapSelector.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/HighLightPanel.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/HighLigthtSpan.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/HightLightSvg.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/MainPanel.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Margin.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Opacity.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Padding.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Pointer.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Shadow.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Size.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/StyleContext.js +6 -5
- package/es/lowcode/painter/panel-section/StylePanel/StyleRow.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/WidthHeight.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/index.js +15 -15
- package/es/lowcode/painter/panel-section/TabItems.js +6 -42
- package/es/lowcode/painter/panel-section/TextContent.js +79 -0
- package/es/lowcode/painter/services/complexPop.js +21 -0
- package/es/lowcode/painter/style/action-bind-modal.less +102 -102
- package/es/lowcode/painter/style/actions-editor.less +15 -15
- package/es/lowcode/painter/style/border-editor.less +36 -36
- package/es/lowcode/painter/style/border-radius-selector.less +42 -42
- package/es/lowcode/painter/style/border-selector.less +39 -39
- package/es/lowcode/painter/style/button-type.less +5 -5
- package/es/lowcode/painter/style/collapse.less +28 -28
- package/es/lowcode/painter/style/color-input.less +19 -19
- package/es/lowcode/painter/style/components.less +91 -91
- package/es/lowcode/painter/style/design.less +166 -160
- package/es/lowcode/painter/style/display.less +17 -17
- package/es/lowcode/painter/style/dragdrop.less +10 -10
- package/es/lowcode/painter/style/fields-setting.less +25 -25
- package/es/lowcode/painter/style/font-editor.less +9 -9
- package/es/lowcode/painter/style/fullscreen-editor.less +17 -17
- package/es/lowcode/painter/style/icon-selector.less +22 -22
- package/es/lowcode/painter/style/icon.less +10 -10
- package/es/lowcode/painter/style/impexp.less +7 -7
- package/es/lowcode/painter/style/index.less +6 -6
- package/es/lowcode/painter/style/layout-ratio.less +51 -51
- package/es/lowcode/painter/style/list-editor.less +95 -95
- package/es/lowcode/painter/style/number-input.less +17 -17
- package/es/lowcode/painter/style/outline.less +28 -28
- package/es/lowcode/painter/style/page-layout-display.less +27 -27
- package/es/lowcode/painter/style/page-vars.less +25 -0
- package/es/lowcode/painter/style/panel-attrs.less +43 -43
- package/es/lowcode/painter/style/panel-item.less +54 -54
- package/es/lowcode/painter/style/panel.less +98 -98
- package/es/lowcode/painter/style/pop-confirm.less +17 -17
- package/es/lowcode/painter/style/pop-form.less +19 -19
- package/es/lowcode/painter/style/radio.less +24 -24
- package/es/lowcode/painter/style/ribbon.less +5 -5
- package/es/lowcode/painter/style/rule-input.less +12 -12
- package/es/lowcode/painter/style/split-display.less +18 -18
- package/es/lowcode/painter/style/style-panel.less +37 -37
- package/es/lowcode/painter/style/tabitems.less +90 -90
- package/es/lowcode/painter/style/treedragdrop.less +19 -19
- package/es/lowcode/preview/index.js +1 -0
- package/es/lowcode/view/Canvas.js +24 -22
- package/es/lowcode/view/Loading.js +5 -7
- package/es/lowcode/view/Page.js +37 -15
- package/es/lowcode/view/index.js +1 -0
- package/es/lowcode/view/lc-components/Box/index.js +22 -7
- package/es/lowcode/view/lc-components/Box/index.less +14 -14
- package/es/lowcode/view/lc-components/Box/meta.json +40 -40
- package/es/lowcode/view/lc-components/Button/index.js +40 -40
- package/es/lowcode/view/lc-components/Button/meta.json +127 -127
- package/es/lowcode/view/lc-components/Button/style.less +2 -2
- package/es/lowcode/view/lc-components/CardList/meta.json +154 -153
- package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +14 -6
- package/es/lowcode/view/lc-components/Dialog/index.js +34 -25
- package/es/lowcode/view/lc-components/Dialog/index.less +12 -8
- package/es/lowcode/view/lc-components/Dialog/meta.json +204 -150
- package/es/lowcode/view/lc-components/Drawer/FunctionDesign.js +51 -8
- package/es/lowcode/view/lc-components/Drawer/index.js +149 -34
- package/es/lowcode/view/lc-components/Drawer/index.less +13 -10
- package/es/lowcode/view/lc-components/Drawer/meta.json +242 -131
- package/es/lowcode/view/lc-components/FieldColor/meta.json +157 -157
- package/es/lowcode/view/lc-components/FieldComplex/meta.json +140 -133
- package/es/lowcode/view/lc-components/FieldDate/meta.json +141 -139
- package/es/lowcode/view/lc-components/FieldDict/meta.json +138 -138
- package/es/lowcode/view/lc-components/FieldEditor/meta.json +138 -138
- package/es/lowcode/view/lc-components/FieldGroup/meta.json +167 -167
- package/es/lowcode/view/lc-components/FieldNumber/meta.json +143 -142
- package/es/lowcode/view/lc-components/FieldRadio/meta.json +115 -115
- package/es/lowcode/view/lc-components/FieldRegion/meta.json +121 -121
- package/es/lowcode/view/lc-components/FieldSelect/meta.json +152 -152
- package/es/lowcode/view/lc-components/FieldString/meta.json +152 -152
- package/es/lowcode/view/lc-components/FieldSwitch/meta.json +125 -125
- package/es/lowcode/view/lc-components/FieldTextarea/meta.json +143 -143
- package/es/lowcode/view/lc-components/FieldUpload/meta.json +165 -165
- package/es/lowcode/view/lc-components/FieldUser/meta.json +176 -176
- package/es/lowcode/view/lc-components/FieldYear/meta.json +129 -129
- package/es/lowcode/view/lc-components/Form/FunctionDesign.js +2 -1
- package/es/lowcode/view/lc-components/Form/index.js +76 -51
- package/es/lowcode/view/lc-components/Form/meta.json +645 -610
- package/es/lowcode/view/lc-components/GroupTree/FunctionDesign.js +10 -0
- package/es/lowcode/view/lc-components/GroupTree/FunctionLive.js +10 -0
- package/es/lowcode/view/lc-components/GroupTree/FunctionPreview.js +10 -0
- package/es/lowcode/view/lc-components/GroupTree/index.js +201 -0
- package/es/lowcode/view/lc-components/GroupTree/meta.json +89 -0
- package/es/lowcode/view/lc-components/Iframe/meta.json +33 -32
- package/es/lowcode/view/lc-components/ImEx/index.js +199 -128
- package/es/lowcode/view/lc-components/ImEx/index.less +7 -7
- package/es/lowcode/view/lc-components/ImEx/meta.json +134 -113
- package/es/lowcode/view/lc-components/Image/meta.json +115 -114
- package/es/lowcode/view/lc-components/JSX/RuntimeComp.js +4 -4
- package/es/lowcode/view/lc-components/JSX/meta.json +28 -28
- package/es/lowcode/view/lc-components/Layout/index.js +38 -21
- package/es/lowcode/view/lc-components/Layout/index.less +5 -5
- package/es/lowcode/view/lc-components/Layout/meta.json +107 -107
- package/es/lowcode/view/lc-components/Link/meta.json +113 -112
- package/es/lowcode/view/lc-components/Page/meta.json +61 -55
- package/es/lowcode/view/lc-components/PageContent/meta.json +9 -9
- package/es/lowcode/view/lc-components/PageFooter/meta.json +9 -9
- package/es/lowcode/view/lc-components/PageHeader/meta.json +9 -9
- package/es/lowcode/view/lc-components/PageLayout/FunctionDesign.js +5 -1
- package/es/lowcode/view/lc-components/PageLayout/meta.json +59 -59
- package/es/lowcode/view/lc-components/Section/index.js +2 -6
- package/es/lowcode/view/lc-components/Section/index.less +7 -7
- package/es/lowcode/view/lc-components/Section/meta.json +108 -107
- package/es/lowcode/view/lc-components/Split/index.js +19 -4
- package/es/lowcode/view/lc-components/Split/meta.json +53 -53
- package/es/lowcode/view/lc-components/Table/index.js +175 -148
- package/es/lowcode/view/lc-components/Table/meta.json +450 -450
- package/es/lowcode/view/lc-components/Tabs/index.js +42 -39
- package/es/lowcode/view/lc-components/Tabs/meta.json +113 -113
- package/es/lowcode/view/lc-components/Text/index.js +9 -2
- package/es/lowcode/view/lc-components/Text/meta.json +56 -56
- package/es/lowcode/view/lc-components/Tree/index.js +102 -107
- package/es/lowcode/view/lc-components/Tree/index.less +4 -4
- package/es/lowcode/view/lc-components/Tree/meta.json +357 -357
- package/es/lowcode/view/lc-components/Wrapper.js +17 -2
- package/es/lowcode/view/style/canvas.less +5 -5
- package/es/lowcode/view/style/loading.less +98 -84
- package/es/lowcode/view/style/page.less +7 -7
- package/es/services.js +19 -0
- package/es/upload/FilesWall/index.js +13 -13
- package/es/upload/FilesWall/index.less +74 -74
- package/es/upload/Form/gridForm.js +17 -7
- package/es/upload/Form/index.less +7 -7
- package/es/upload/FormItem/index.js +18 -18
- package/es/utils/form.js +25 -25
- package/es/utils/grid.js +5 -4
- package/lib/components/Builder/index.js +13 -1
- package/lib/components/ComplexItem/index.js +62 -47
- package/lib/components/LDActions/index.less +68 -68
- package/lib/components/LdAutoForm/index.js +5 -3
- package/lib/components/LdFormList/index.js +12 -11
- package/lib/components/LdGrid/index.js +4 -4
- package/lib/components/LdGridForm/index.js +40 -23
- package/lib/components/LdGridForm/index.less +7 -7
- package/lib/components/LdTree/index.less +40 -40
- package/lib/helper/action.js +6 -6
- package/lib/helper/form.js +15 -14
- package/lib/helper/index.less +7 -7
- package/lib/helper/ldBuilder.js +8 -3
- package/lib/locales/zh-CN.js +41 -4
- package/lib/lowcode/constants/api-url.js +87 -87
- package/lib/lowcode/constants/event-topics.js +1 -3
- package/lib/lowcode/engine/launcher.js +3 -1
- package/lib/lowcode/engine/meta/box.props.json +3 -3
- package/lib/lowcode/engine/meta/button.props.default.json +1 -1
- package/lib/lowcode/engine/meta/button.props.json +2 -2
- package/lib/lowcode/engine/meta/cardlist.props.default.json +1 -0
- package/lib/lowcode/engine/meta/cardlist.props.json +2 -1
- package/lib/lowcode/engine/meta/components-list.json +6 -126
- package/lib/lowcode/engine/meta/dialog.props.default.json +4 -2
- package/lib/lowcode/engine/meta/dialog.props.json +76 -20
- package/lib/lowcode/engine/meta/drawer.props.default.json +15 -4
- package/lib/lowcode/engine/meta/drawer.props.json +144 -24
- package/lib/lowcode/engine/meta/fieldcomplex.props.default.json +1 -0
- package/lib/lowcode/engine/meta/fieldcomplex.props.json +7 -0
- package/lib/lowcode/engine/meta/fielddatadic.props.default.json +16 -0
- package/lib/lowcode/engine/meta/fielddatadic.props.json +73 -0
- package/lib/lowcode/engine/meta/fielddate.props.default.json +2 -0
- package/lib/lowcode/engine/meta/fielddate.props.json +4 -2
- package/lib/lowcode/engine/meta/fieldnumber.props.default.json +1 -0
- package/lib/lowcode/engine/meta/fieldnumber.props.json +3 -2
- package/lib/lowcode/engine/meta/fielduser.props.default.json +1 -1
- package/lib/lowcode/engine/meta/fielduser.props.json +1 -1
- package/lib/lowcode/engine/meta/form.props.default.json +14 -4
- package/lib/lowcode/engine/meta/form.props.json +53 -14
- package/lib/lowcode/engine/meta/grouptree.props.default.json +16 -0
- package/lib/lowcode/engine/meta/grouptree.props.json +89 -0
- package/lib/lowcode/engine/meta/iframe.props.default.json +2 -1
- package/lib/lowcode/engine/meta/iframe.props.json +3 -2
- package/lib/lowcode/engine/meta/image.props.default.json +2 -1
- package/lib/lowcode/engine/meta/image.props.json +3 -2
- package/lib/lowcode/engine/meta/imex.props.default.json +2 -1
- package/lib/lowcode/engine/meta/imex.props.json +27 -6
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +65 -42
- package/lib/lowcode/engine/meta/jsx.props.default.json +1 -1
- package/lib/lowcode/engine/meta/jsx.props.json +1 -1
- package/lib/lowcode/engine/meta/layout.props.default.json +1 -1
- package/lib/lowcode/engine/meta/layout.props.json +5 -5
- package/lib/lowcode/engine/meta/link.props.default.json +2 -1
- package/lib/lowcode/engine/meta/link.props.json +3 -2
- package/lib/lowcode/engine/meta/page.props.json +6 -0
- package/lib/lowcode/engine/meta/pagelayout.props.default.json +1 -1
- package/lib/lowcode/engine/meta/pagelayout.props.json +1 -1
- package/lib/lowcode/engine/meta/section.props.json +2 -1
- package/lib/lowcode/engine/meta/split.props.default.json +1 -1
- package/lib/lowcode/engine/meta/split.props.json +1 -1
- package/lib/lowcode/engine/meta/table.props.json +3 -3
- package/lib/lowcode/engine/meta/text.props.default.json +4 -2
- package/lib/lowcode/engine/meta/text.props.json +8 -6
- package/lib/lowcode/engine/meta/tree.props.json +2 -2
- package/lib/lowcode/engine/provider/ContextProvider/index.js +81 -64
- package/lib/lowcode/engine/provider/ContextProvider/router.js +57 -0
- package/lib/lowcode/engine/{tools → provider/ContextProvider}/usePageDataStore.js +9 -7
- package/lib/lowcode/engine/provider/ContextProvider/usePageVar.js +38 -16
- package/lib/lowcode/engine/{tools → provider/ContextProvider}/useTodo.js +5 -7
- package/lib/lowcode/engine/provider/ContextProvider/utils.js +170 -0
- package/lib/lowcode/engine/provider/RemoteSourceProvider.js +2 -3
- package/lib/lowcode/engine/tools/dataProcess.js +76 -76
- package/lib/lowcode/engine/tools/helper.js +29 -2
- package/lib/lowcode/engine/tools/initDS.js +270 -0
- package/lib/lowcode/engine/tools/useCanvasRender.js +13 -1
- package/lib/lowcode/engine/tools/useCombinedRefs.js +2 -1
- package/lib/lowcode/painter/Components.js +2 -2
- package/lib/lowcode/painter/Design.js +1 -0
- package/lib/lowcode/painter/DesignOperator.js +24 -10
- package/lib/lowcode/painter/Panel.js +2 -2
- package/lib/lowcode/painter/components/AdvancePanel.js +3 -3
- package/lib/lowcode/painter/components/Collapse.js +31 -28
- package/lib/lowcode/painter/components/ColorInput.js +24 -24
- package/lib/lowcode/painter/components/ListEditor.js +24 -24
- package/lib/lowcode/painter/components/NumberInput.js +29 -29
- package/lib/lowcode/painter/components/PanelItem.js +24 -24
- package/lib/lowcode/painter/components/PopConfirm.js +8 -8
- package/lib/lowcode/painter/components/PopForm.js +27 -27
- package/lib/lowcode/painter/components/RuleInput.js +30 -30
- package/lib/lowcode/painter/components/SortBox.js +22 -22
- package/lib/lowcode/painter/components/TipIcon.js +23 -0
- package/lib/lowcode/painter/components/VarEditor.js +463 -0
- package/lib/lowcode/painter/components/code-editor/BaseEditor.js +32 -32
- package/lib/lowcode/painter/components/code-editor/CssEditor.js +25 -25
- package/lib/lowcode/painter/components/code-editor/FullScreenEditor.js +25 -25
- package/lib/lowcode/painter/components/code-editor/JSEditor.js +23 -21
- package/lib/lowcode/painter/components/code-editor/JsonEditor.js +25 -25
- package/lib/lowcode/painter/components/code-editor/VisionEditor.js +88 -0
- package/lib/lowcode/painter/components/field-setting/SettingUI.js +46 -4
- package/lib/lowcode/painter/components/field-setting/index.js +27 -13
- package/lib/lowcode/painter/components/field-setting/meta/frontRules.js +2 -1
- package/lib/lowcode/painter/index.js +1 -0
- package/lib/lowcode/painter/panel-section/BlockEditor/index.js +19 -5
- package/lib/lowcode/painter/panel-section/BlocksEditor/index.js +2 -2
- package/lib/lowcode/painter/panel-section/ComplexPop.js +250 -0
- package/lib/lowcode/painter/panel-section/DataSetSelector.js +8 -0
- package/lib/lowcode/painter/panel-section/FieldsSetting.js +30 -4
- package/lib/lowcode/painter/panel-section/GroupClassSelector.js +63 -0
- package/lib/lowcode/painter/panel-section/I18nInput.js +4 -2
- package/lib/lowcode/painter/panel-section/Icon.js +31 -26
- package/lib/lowcode/painter/panel-section/IconConditionSelector.js +6 -6
- package/lib/lowcode/painter/panel-section/IconSelector.js +17 -17
- package/lib/lowcode/painter/panel-section/ImpExp.js +0 -26
- package/lib/lowcode/painter/panel-section/ImpExpAlone.js +0 -1
- package/lib/lowcode/painter/panel-section/LayoutRatio.js +22 -21
- package/lib/lowcode/painter/panel-section/PageVars.js +308 -0
- package/lib/lowcode/painter/panel-section/StylePanel/BackGround.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Border.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/BorderRadius.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/BorderRadiusSelector.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/BorderSelector.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Display.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Font.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/FontEditor.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/GapSelector.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/HighLightPanel.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/HighLigthtSpan.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/HightLightSvg.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/MainPanel.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Margin.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Opacity.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Padding.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Pointer.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Shadow.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Size.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/StyleContext.js +6 -5
- package/lib/lowcode/painter/panel-section/StylePanel/StyleRow.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/WidthHeight.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/index.js +15 -15
- package/lib/lowcode/painter/panel-section/TabItems.js +6 -42
- package/lib/lowcode/painter/panel-section/TextContent.js +87 -0
- package/lib/lowcode/painter/services/complexPop.js +28 -0
- package/lib/lowcode/painter/style/action-bind-modal.less +102 -102
- package/lib/lowcode/painter/style/actions-editor.less +15 -15
- package/lib/lowcode/painter/style/border-editor.less +36 -36
- package/lib/lowcode/painter/style/border-radius-selector.less +42 -42
- package/lib/lowcode/painter/style/border-selector.less +39 -39
- package/lib/lowcode/painter/style/button-type.less +5 -5
- package/lib/lowcode/painter/style/collapse.less +28 -28
- package/lib/lowcode/painter/style/color-input.less +19 -19
- package/lib/lowcode/painter/style/components.less +91 -91
- package/lib/lowcode/painter/style/design.less +166 -160
- package/lib/lowcode/painter/style/display.less +17 -17
- package/lib/lowcode/painter/style/dragdrop.less +10 -10
- package/lib/lowcode/painter/style/fields-setting.less +25 -25
- package/lib/lowcode/painter/style/font-editor.less +9 -9
- package/lib/lowcode/painter/style/fullscreen-editor.less +17 -17
- package/lib/lowcode/painter/style/icon-selector.less +22 -22
- package/lib/lowcode/painter/style/icon.less +10 -10
- package/lib/lowcode/painter/style/impexp.less +7 -7
- package/lib/lowcode/painter/style/index.less +6 -6
- package/lib/lowcode/painter/style/layout-ratio.less +51 -51
- package/lib/lowcode/painter/style/list-editor.less +95 -95
- package/lib/lowcode/painter/style/number-input.less +17 -17
- package/lib/lowcode/painter/style/outline.less +28 -28
- package/lib/lowcode/painter/style/page-layout-display.less +27 -27
- package/lib/lowcode/painter/style/page-vars.less +25 -0
- package/lib/lowcode/painter/style/panel-attrs.less +43 -43
- package/lib/lowcode/painter/style/panel-item.less +54 -54
- package/lib/lowcode/painter/style/panel.less +98 -98
- package/lib/lowcode/painter/style/pop-confirm.less +17 -17
- package/lib/lowcode/painter/style/pop-form.less +19 -19
- package/lib/lowcode/painter/style/radio.less +24 -24
- package/lib/lowcode/painter/style/ribbon.less +5 -5
- package/lib/lowcode/painter/style/rule-input.less +12 -12
- package/lib/lowcode/painter/style/split-display.less +18 -18
- package/lib/lowcode/painter/style/style-panel.less +37 -37
- package/lib/lowcode/painter/style/tabitems.less +90 -90
- package/lib/lowcode/painter/style/treedragdrop.less +19 -19
- package/lib/lowcode/preview/index.js +1 -0
- package/lib/lowcode/view/Canvas.js +24 -22
- package/lib/lowcode/view/Loading.js +5 -7
- package/lib/lowcode/view/Page.js +35 -13
- package/lib/lowcode/view/index.js +1 -0
- package/lib/lowcode/view/lc-components/Box/index.js +21 -6
- package/lib/lowcode/view/lc-components/Box/index.less +14 -14
- package/lib/lowcode/view/lc-components/Box/meta.json +40 -40
- package/lib/lowcode/view/lc-components/Button/index.js +38 -38
- package/lib/lowcode/view/lc-components/Button/meta.json +127 -127
- package/lib/lowcode/view/lc-components/Button/style.less +2 -2
- package/lib/lowcode/view/lc-components/CardList/meta.json +154 -153
- package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +13 -5
- package/lib/lowcode/view/lc-components/Dialog/index.js +34 -25
- package/lib/lowcode/view/lc-components/Dialog/index.less +12 -8
- package/lib/lowcode/view/lc-components/Dialog/meta.json +204 -150
- package/lib/lowcode/view/lc-components/Drawer/FunctionDesign.js +52 -8
- package/lib/lowcode/view/lc-components/Drawer/index.js +148 -33
- package/lib/lowcode/view/lc-components/Drawer/index.less +13 -10
- package/lib/lowcode/view/lc-components/Drawer/meta.json +242 -131
- package/lib/lowcode/view/lc-components/FieldColor/meta.json +157 -157
- package/lib/lowcode/view/lc-components/FieldComplex/meta.json +140 -133
- package/lib/lowcode/view/lc-components/FieldDate/meta.json +141 -139
- package/lib/lowcode/view/lc-components/FieldDict/meta.json +138 -138
- package/lib/lowcode/view/lc-components/FieldEditor/meta.json +138 -138
- package/lib/lowcode/view/lc-components/FieldGroup/meta.json +167 -167
- package/lib/lowcode/view/lc-components/FieldNumber/meta.json +143 -142
- package/lib/lowcode/view/lc-components/FieldRadio/meta.json +115 -115
- package/lib/lowcode/view/lc-components/FieldRegion/meta.json +121 -121
- package/lib/lowcode/view/lc-components/FieldSelect/meta.json +152 -152
- package/lib/lowcode/view/lc-components/FieldString/meta.json +152 -152
- package/lib/lowcode/view/lc-components/FieldSwitch/meta.json +125 -125
- package/lib/lowcode/view/lc-components/FieldTextarea/meta.json +143 -143
- package/lib/lowcode/view/lc-components/FieldUpload/meta.json +165 -165
- package/lib/lowcode/view/lc-components/FieldUser/meta.json +176 -176
- package/lib/lowcode/view/lc-components/FieldYear/meta.json +129 -129
- package/lib/lowcode/view/lc-components/Form/FunctionDesign.js +2 -1
- package/lib/lowcode/view/lc-components/Form/index.js +75 -50
- package/lib/lowcode/view/lc-components/Form/meta.json +645 -610
- package/lib/lowcode/view/lc-components/GroupTree/FunctionDesign.js +17 -0
- package/lib/lowcode/view/lc-components/GroupTree/FunctionLive.js +17 -0
- package/lib/lowcode/view/lc-components/GroupTree/FunctionPreview.js +17 -0
- package/lib/lowcode/view/lc-components/GroupTree/index.js +209 -0
- package/lib/lowcode/view/lc-components/GroupTree/meta.json +89 -0
- package/lib/lowcode/view/lc-components/Iframe/meta.json +33 -32
- package/lib/lowcode/view/lc-components/ImEx/index.js +197 -126
- package/lib/lowcode/view/lc-components/ImEx/index.less +7 -7
- package/lib/lowcode/view/lc-components/ImEx/meta.json +134 -113
- package/lib/lowcode/view/lc-components/Image/meta.json +115 -114
- package/lib/lowcode/view/lc-components/JSX/RuntimeComp.js +4 -4
- package/lib/lowcode/view/lc-components/JSX/meta.json +28 -28
- package/lib/lowcode/view/lc-components/Layout/index.js +37 -20
- package/lib/lowcode/view/lc-components/Layout/index.less +5 -5
- package/lib/lowcode/view/lc-components/Layout/meta.json +107 -107
- package/lib/lowcode/view/lc-components/Link/meta.json +113 -112
- package/lib/lowcode/view/lc-components/Page/meta.json +61 -55
- package/lib/lowcode/view/lc-components/PageContent/meta.json +9 -9
- package/lib/lowcode/view/lc-components/PageFooter/meta.json +9 -9
- package/lib/lowcode/view/lc-components/PageHeader/meta.json +9 -9
- package/lib/lowcode/view/lc-components/PageLayout/FunctionDesign.js +5 -1
- package/lib/lowcode/view/lc-components/PageLayout/meta.json +59 -59
- package/lib/lowcode/view/lc-components/Section/index.js +2 -6
- package/lib/lowcode/view/lc-components/Section/index.less +7 -7
- package/lib/lowcode/view/lc-components/Section/meta.json +108 -107
- package/lib/lowcode/view/lc-components/Split/index.js +18 -3
- package/lib/lowcode/view/lc-components/Split/meta.json +53 -53
- package/lib/lowcode/view/lc-components/Table/index.js +176 -149
- package/lib/lowcode/view/lc-components/Table/meta.json +450 -450
- package/lib/lowcode/view/lc-components/Tabs/index.js +40 -37
- package/lib/lowcode/view/lc-components/Tabs/meta.json +113 -113
- package/lib/lowcode/view/lc-components/Text/index.js +8 -1
- package/lib/lowcode/view/lc-components/Text/meta.json +56 -56
- package/lib/lowcode/view/lc-components/Tree/index.js +102 -107
- package/lib/lowcode/view/lc-components/Tree/index.less +4 -4
- package/lib/lowcode/view/lc-components/Tree/meta.json +357 -357
- package/lib/lowcode/view/lc-components/Wrapper.js +16 -1
- package/lib/lowcode/view/style/canvas.less +5 -5
- package/lib/lowcode/view/style/loading.less +98 -84
- package/lib/lowcode/view/style/page.less +7 -7
- package/lib/services.js +20 -0
- package/lib/upload/FilesWall/index.js +13 -13
- package/lib/upload/FilesWall/index.less +74 -74
- package/lib/upload/Form/gridForm.js +17 -7
- package/lib/upload/Form/index.less +7 -7
- package/lib/upload/FormItem/index.js +18 -18
- package/lib/utils/form.js +24 -24
- package/lib/utils/grid.js +4 -3
- package/lowcode.js +1 -1
- package/package.json +175 -175
- package/upload.js +1 -1
- package/utils.js +1 -1
- package/es/lowcode/view/lc-components/Form/index.less +0 -5
- package/lib/lowcode/view/lc-components/Form/index.less +0 -5
|
@@ -10,6 +10,7 @@ import * as monaco from 'monaco-editor';
|
|
|
10
10
|
import { isNil, uniqBy, compact } from 'lodash';
|
|
11
11
|
import prettier from 'prettier/standalone';
|
|
12
12
|
import parserBabel from 'prettier/parser-babel';
|
|
13
|
+
import useCombinedRefs from "../../../engine/tools/useCombinedRefs";
|
|
13
14
|
import BaseEditor from "./BaseEditor";
|
|
14
15
|
function capitalizeFirstLetter(string) {
|
|
15
16
|
if (isNil(string)) return null;
|
|
@@ -104,31 +105,32 @@ var prettierFormetter = function prettierFormetter(unformattedCode) {
|
|
|
104
105
|
}
|
|
105
106
|
};
|
|
106
107
|
|
|
107
|
-
/**
|
|
108
|
-
* JSEditor 组件是一个专为 JavaScript 编辑设计的 React 组件,它基于 BaseEditor 组件构建,并集成了自动完成功能。
|
|
109
|
-
* 该组件利用 monaco-editor 提供的 API,通过 setupAutocomplete 函数设置自动完成项,从而增强代码编辑体验。
|
|
110
|
-
* 自动完成逻辑包括从预定义的自动完成模块中加载补全项,以及在编辑器中键入特定字符(如".")时触发补全建议。
|
|
111
|
-
*
|
|
112
|
-
* @component
|
|
113
|
-
* @example
|
|
114
|
-
* <JSEditor
|
|
115
|
-
* language="javascript"
|
|
116
|
-
* options={{ fontSize: 14 }}
|
|
117
|
-
* >
|
|
118
|
-
* {`function sayHello() {\n console.log('Hello, World!');\n}`}
|
|
119
|
-
* </JSEditor>
|
|
120
|
-
*
|
|
121
|
-
* @param {Object} props - 组件的属性。
|
|
122
|
-
* @param {React.ReactNode} children - 传递给 BaseEditor 的 children,通常是初始代码或内容。
|
|
123
|
-
* @param {Object} rest - 传递给 BaseEditor 组件的其他属性。
|
|
124
|
-
* @param {React.Ref} ref - React ref 引用,用于在外部组件中访问 BaseEditor 实例的方法。
|
|
125
|
-
*
|
|
126
|
-
* @returns {ReactElement} 返回一个 React 元素,其中包含了一个具有自动完成功能的 JavaScript 编辑器实例。
|
|
108
|
+
/**
|
|
109
|
+
* JSEditor 组件是一个专为 JavaScript 编辑设计的 React 组件,它基于 BaseEditor 组件构建,并集成了自动完成功能。
|
|
110
|
+
* 该组件利用 monaco-editor 提供的 API,通过 setupAutocomplete 函数设置自动完成项,从而增强代码编辑体验。
|
|
111
|
+
* 自动完成逻辑包括从预定义的自动完成模块中加载补全项,以及在编辑器中键入特定字符(如".")时触发补全建议。
|
|
112
|
+
*
|
|
113
|
+
* @component
|
|
114
|
+
* @example
|
|
115
|
+
* <JSEditor
|
|
116
|
+
* language="javascript"
|
|
117
|
+
* options={{ fontSize: 14 }}
|
|
118
|
+
* >
|
|
119
|
+
* {`function sayHello() {\n console.log('Hello, World!');\n}`}
|
|
120
|
+
* </JSEditor>
|
|
121
|
+
*
|
|
122
|
+
* @param {Object} props - 组件的属性。
|
|
123
|
+
* @param {React.ReactNode} children - 传递给 BaseEditor 的 children,通常是初始代码或内容。
|
|
124
|
+
* @param {Object} rest - 传递给 BaseEditor 组件的其他属性。
|
|
125
|
+
* @param {React.Ref} ref - React ref 引用,用于在外部组件中访问 BaseEditor 实例的方法。
|
|
126
|
+
*
|
|
127
|
+
* @returns {ReactElement} 返回一个 React 元素,其中包含了一个具有自动完成功能的 JavaScript 编辑器实例。
|
|
127
128
|
*/
|
|
128
|
-
var JSEditor = /*#__PURE__*/forwardRef(function (_ref2,
|
|
129
|
+
var JSEditor = /*#__PURE__*/forwardRef(function (_ref2, outRef) {
|
|
129
130
|
var children = _ref2.children,
|
|
130
131
|
keywords = _ref2.keywords,
|
|
131
132
|
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
133
|
+
var ref = useCombinedRefs(outRef);
|
|
132
134
|
useEffect(function () {
|
|
133
135
|
var originalGetValue = ref.current.editor.getValue.bind(ref.current.editor);
|
|
134
136
|
ref.current.editor.getValue = function () {
|
|
@@ -4,31 +4,31 @@ var _excluded = ["children"];
|
|
|
4
4
|
import React, { forwardRef } from 'react';
|
|
5
5
|
import BaseEditor from "./BaseEditor";
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
* JsonEditor 组件是一个专门用于编辑 CSS 代码的 React 组件,它基于 BaseEditor 组件构建。
|
|
9
|
-
* 该组件通过将 language 属性固定设置为 "css",确保编辑器环境专门用于 CSS 代码编辑。
|
|
10
|
-
* 用户可以传入 CSS 代码作为 children,并通过其他 props 控制 BaseEditor 提供的额外功能。
|
|
11
|
-
*
|
|
12
|
-
* @component
|
|
13
|
-
* @example
|
|
14
|
-
* const handleCssChange = (newCss, event) => {
|
|
15
|
-
* console.log('CSS changed: ', newCss);
|
|
16
|
-
* };
|
|
17
|
-
* <JsonEditor
|
|
18
|
-
* onChange={handleCssChange}
|
|
19
|
-
* isFullscreen={false}
|
|
20
|
-
* width="600px"
|
|
21
|
-
* height="400px"
|
|
22
|
-
* >
|
|
23
|
-
* {`body { margin: 0; font-family: Arial, sans-serif; }`}
|
|
24
|
-
* </JsonEditor>
|
|
25
|
-
*
|
|
26
|
-
* @param {Object} props - 组件的属性。
|
|
27
|
-
* @param {React.ReactNode} children - 子组件,通常是编辑器的初始 CSS 代码。
|
|
28
|
-
* @param {Object} rest - 传递给 BaseEditor 组件的其他属性。
|
|
29
|
-
* @param {React.Ref} ref - React ref 引用,用于外部组件调用编辑器实例的方法。
|
|
30
|
-
*
|
|
31
|
-
* @returns {ReactElement} 返回一个 React 元素,该元素内部是一个专门用于 CSS 编辑的 BaseEditor 组件实例。
|
|
7
|
+
/**
|
|
8
|
+
* JsonEditor 组件是一个专门用于编辑 CSS 代码的 React 组件,它基于 BaseEditor 组件构建。
|
|
9
|
+
* 该组件通过将 language 属性固定设置为 "css",确保编辑器环境专门用于 CSS 代码编辑。
|
|
10
|
+
* 用户可以传入 CSS 代码作为 children,并通过其他 props 控制 BaseEditor 提供的额外功能。
|
|
11
|
+
*
|
|
12
|
+
* @component
|
|
13
|
+
* @example
|
|
14
|
+
* const handleCssChange = (newCss, event) => {
|
|
15
|
+
* console.log('CSS changed: ', newCss);
|
|
16
|
+
* };
|
|
17
|
+
* <JsonEditor
|
|
18
|
+
* onChange={handleCssChange}
|
|
19
|
+
* isFullscreen={false}
|
|
20
|
+
* width="600px"
|
|
21
|
+
* height="400px"
|
|
22
|
+
* >
|
|
23
|
+
* {`body { margin: 0; font-family: Arial, sans-serif; }`}
|
|
24
|
+
* </JsonEditor>
|
|
25
|
+
*
|
|
26
|
+
* @param {Object} props - 组件的属性。
|
|
27
|
+
* @param {React.ReactNode} children - 子组件,通常是编辑器的初始 CSS 代码。
|
|
28
|
+
* @param {Object} rest - 传递给 BaseEditor 组件的其他属性。
|
|
29
|
+
* @param {React.Ref} ref - React ref 引用,用于外部组件调用编辑器实例的方法。
|
|
30
|
+
*
|
|
31
|
+
* @returns {ReactElement} 返回一个 React 元素,该元素内部是一个专门用于 CSS 编辑的 BaseEditor 组件实例。
|
|
32
32
|
*/
|
|
33
33
|
var JsonEditor = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
34
34
|
var children = _ref.children,
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["children"];
|
|
4
|
+
import React, { forwardRef } from 'react';
|
|
5
|
+
import * as monaco from 'monaco-editor';
|
|
6
|
+
import BaseEditor from "./BaseEditor";
|
|
7
|
+
|
|
8
|
+
// 定义一个简单的JavaScript语言
|
|
9
|
+
monaco.languages.register({
|
|
10
|
+
id: 'vision'
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
// 定义语言的配置
|
|
14
|
+
monaco.languages.setLanguageConfiguration('vision', {
|
|
15
|
+
brackets: [['{', '}'], ['[', ']'], ['(', ')']],
|
|
16
|
+
autoClosingPairs: [{
|
|
17
|
+
open: '{',
|
|
18
|
+
close: '}'
|
|
19
|
+
}, {
|
|
20
|
+
open: '[',
|
|
21
|
+
close: ']'
|
|
22
|
+
}, {
|
|
23
|
+
open: '(',
|
|
24
|
+
close: ')'
|
|
25
|
+
}, {
|
|
26
|
+
open: '"',
|
|
27
|
+
close: '"',
|
|
28
|
+
notIn: ['string']
|
|
29
|
+
}, {
|
|
30
|
+
open: "'",
|
|
31
|
+
close: "'",
|
|
32
|
+
notIn: ['string']
|
|
33
|
+
}]
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
// 定义语言的词法规则
|
|
37
|
+
monaco.languages.setMonarchTokensProvider('vision', {
|
|
38
|
+
tokenizer: {
|
|
39
|
+
root: [[/\b(true|false|null)\b/, 'constant'], [/[{}()\[\]]/, '@brackets'], [/[0-9]+/, 'number'], [/["'](.*?)["']/, 'string'],
|
|
40
|
+
// 新增模板字符串的词法规则
|
|
41
|
+
[/\$\{/, 'delimiter.curly'],
|
|
42
|
+
// 添加对模板表达式起始的支持
|
|
43
|
+
[/\`/, {
|
|
44
|
+
token: 'string.quote',
|
|
45
|
+
bracket: '@open',
|
|
46
|
+
next: '@template_string'
|
|
47
|
+
}] // 处理模板字符串
|
|
48
|
+
],
|
|
49
|
+
template_string: [[/\$\{/, {
|
|
50
|
+
token: 'delimiter.curly',
|
|
51
|
+
next: '@expression'
|
|
52
|
+
}],
|
|
53
|
+
// 模板表达式开始
|
|
54
|
+
[/\`/, {
|
|
55
|
+
token: 'string.quote',
|
|
56
|
+
bracket: '@close',
|
|
57
|
+
next: '@pop'
|
|
58
|
+
}],
|
|
59
|
+
// 模板字符串结束
|
|
60
|
+
[/./, 'string'] // 模板字符串内的内容
|
|
61
|
+
],
|
|
62
|
+
expression: [[/\}/, {
|
|
63
|
+
token: 'delimiter.curly',
|
|
64
|
+
next: '@pop'
|
|
65
|
+
}],
|
|
66
|
+
// 模板表达式结束
|
|
67
|
+
[/[0-9]+/, 'number'],
|
|
68
|
+
// 在模板表达式内的数字
|
|
69
|
+
[/[a-zA-Z_]\w*/, 'identifier'] // 在模板表达式内的标识符
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
var VisionEditor = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
74
|
+
var children = _ref.children,
|
|
75
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
76
|
+
return /*#__PURE__*/React.createElement(BaseEditor, _extends({
|
|
77
|
+
ref: ref,
|
|
78
|
+
language: "vision"
|
|
79
|
+
}, rest), children);
|
|
80
|
+
});
|
|
81
|
+
export default /*#__PURE__*/React.memo(VisionEditor);
|
|
@@ -5,7 +5,7 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
|
5
5
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
6
6
|
import React, { useState } from 'react';
|
|
7
7
|
import { useRequest, useMemoizedFn, useCreation } from 'ahooks';
|
|
8
|
-
import { Spin, Input, Segmented, Switch, Tooltip, Icon, Radio, Modal } from 'luck-design/antd';
|
|
8
|
+
import { Spin, Input, Segmented, Switch, Checkbox, Tooltip, Icon, Radio, Modal } from 'luck-design/antd';
|
|
9
9
|
import styled from 'styled-components';
|
|
10
10
|
import { isArray, keyBy, isNil, groupBy } from 'lodash';
|
|
11
11
|
import { formatMessage } from '@luck-design-biz/base/utils';
|
|
@@ -13,6 +13,7 @@ import Collapse from "../../components/Collapse";
|
|
|
13
13
|
import PanelItem from "../../components/PanelItem";
|
|
14
14
|
import { ListEditor, ListEditorItem } from "../../components/ListEditor";
|
|
15
15
|
import WidthHeight from "../../panel-section/WidthHeight";
|
|
16
|
+
import JSEditor from "../../panel-section/JSEditor";
|
|
16
17
|
import FieldAttrsModal from "./FieldAttrsModal";
|
|
17
18
|
import FieldRulesModal from "./FieldRulesModal";
|
|
18
19
|
import { fetchFieldCondition, fetchAttrs } from "../../../constants/api-url";
|
|
@@ -57,6 +58,19 @@ var _PINNED_OPTIONS_ = [{
|
|
|
57
58
|
}),
|
|
58
59
|
value: 'right'
|
|
59
60
|
}];
|
|
61
|
+
var _FORM_MODE_OPTIONS_ = [{
|
|
62
|
+
label: formatMessage({
|
|
63
|
+
id: "".concat(_I18N_PREFIX_, ".formMode.single"),
|
|
64
|
+
label: '单行'
|
|
65
|
+
}),
|
|
66
|
+
value: 'single'
|
|
67
|
+
}, {
|
|
68
|
+
label: formatMessage({
|
|
69
|
+
id: "".concat(_I18N_PREFIX_, ".formMode.bulk"),
|
|
70
|
+
label: '批量'
|
|
71
|
+
}),
|
|
72
|
+
value: 'bulk'
|
|
73
|
+
}];
|
|
60
74
|
var _TRUE_FALSE_ = ['__TRUE__', '__FALSE__'];
|
|
61
75
|
var CoderWrapper = styled.div.withConfig({
|
|
62
76
|
displayName: "CoderWrapper",
|
|
@@ -70,6 +84,11 @@ var StyledRadio = styled(Radio.Group).withConfig({
|
|
|
70
84
|
displayName: "StyledRadio",
|
|
71
85
|
componentId: "luckda-6530__sc-1n41f3z-2"
|
|
72
86
|
})(["span.ant-radio + *{padding-left:4px;padding-right:4px;}"]);
|
|
87
|
+
var StyledCheckbox = styled(Checkbox.Group).withConfig({
|
|
88
|
+
displayName: "StyledCheckbox",
|
|
89
|
+
componentId: "luckda-6530__sc-1n41f3z-3"
|
|
90
|
+
})([".ant-checkbox-wrapper{font-size:12px;}"]);
|
|
91
|
+
var _DEFAULT_RENDER_CODE = "function render(value, data, rowIndex, params) { \n return value;\n}";
|
|
73
92
|
var SettingUI = function SettingUI(_ref) {
|
|
74
93
|
var loading = _ref.loading,
|
|
75
94
|
data = _ref.data,
|
|
@@ -315,7 +334,18 @@ var SettingUI = function SettingUI(_ref) {
|
|
|
315
334
|
onChange: function onChange(val) {
|
|
316
335
|
return run('tip', val);
|
|
317
336
|
}
|
|
318
|
-
}))), component === '
|
|
337
|
+
}))), component === 'tableForm' && /*#__PURE__*/React.createElement(PanelItem, {
|
|
338
|
+
label: formatMessage({
|
|
339
|
+
id: "".concat(_I18N_PREFIX_, ".formMode"),
|
|
340
|
+
label: '修改方式'
|
|
341
|
+
})
|
|
342
|
+
}, /*#__PURE__*/React.createElement(StyledCheckbox, {
|
|
343
|
+
options: _FORM_MODE_OPTIONS_,
|
|
344
|
+
defaultValue: fieldData.formMode ? [fieldData.formMode] : ['single', 'bulk'],
|
|
345
|
+
onChange: function onChange(val) {
|
|
346
|
+
return run('formMode', val);
|
|
347
|
+
}
|
|
348
|
+
})), component === 'form' && /*#__PURE__*/React.createElement(PanelItem, {
|
|
319
349
|
label: formatMessage({
|
|
320
350
|
id: "".concat(_I18N_PREFIX_, ".fieldColumn"),
|
|
321
351
|
label: '占列数'
|
|
@@ -349,7 +379,7 @@ var SettingUI = function SettingUI(_ref) {
|
|
|
349
379
|
id: "".concat(_I18N_PREFIX_, ".required"),
|
|
350
380
|
label: '是否必填'
|
|
351
381
|
})
|
|
352
|
-
}, renderCodeIcon(fieldRequired, FIELD_SCOPES.FIELD_REQUIRED)), ['table', 'tableForm'].includes && /*#__PURE__*/React.createElement(PanelItem, {
|
|
382
|
+
}, renderCodeIcon(fieldRequired, FIELD_SCOPES.FIELD_REQUIRED)), ['table', 'tableForm'].includes(component) && /*#__PURE__*/React.createElement(PanelItem, {
|
|
353
383
|
label: formatMessage({
|
|
354
384
|
id: "".concat(_I18N_PREFIX_, ".table.display"),
|
|
355
385
|
label: '表格中显示'
|
|
@@ -369,7 +399,19 @@ var SettingUI = function SettingUI(_ref) {
|
|
|
369
399
|
id: "".concat(_I18N_PREFIX_, ".readonly"),
|
|
370
400
|
label: '是否只读'
|
|
371
401
|
})
|
|
372
|
-
}, renderCodeIcon(fieldReadonly, FIELD_SCOPES.FIELD_READONLY)), !isBatch ? /*#__PURE__*/React.createElement(Collapse, {
|
|
402
|
+
}, renderCodeIcon(fieldReadonly, FIELD_SCOPES.FIELD_READONLY)), !isBatch ? /*#__PURE__*/React.createElement(React.Fragment, null, ['table', 'tableForm'].includes(component) ? /*#__PURE__*/React.createElement(Collapse, {
|
|
403
|
+
label: formatMessage({
|
|
404
|
+
id: "".concat(_I18N_PREFIX_, ".render"),
|
|
405
|
+
label: '内容定制渲染'
|
|
406
|
+
})
|
|
407
|
+
}, /*#__PURE__*/React.createElement(JSEditor, {
|
|
408
|
+
defaultValue: fieldData.render,
|
|
409
|
+
onChange: function onChange(val) {
|
|
410
|
+
return run('render', val);
|
|
411
|
+
},
|
|
412
|
+
mustConfirm: true,
|
|
413
|
+
defaultCode: _DEFAULT_RENDER_CODE
|
|
414
|
+
})) : null, /*#__PURE__*/React.createElement(Collapse, {
|
|
373
415
|
label: formatMessage({
|
|
374
416
|
id: "".concat(_I18N_PREFIX_, ".defaultValue"),
|
|
375
417
|
label: '默认值'
|
|
@@ -384,7 +426,7 @@ var SettingUI = function SettingUI(_ref) {
|
|
|
384
426
|
}), "\n \u3010").concat(fieldDefaultValue.expression, "\u3011") : formatMessage({
|
|
385
427
|
id: 'luckda.lowcode.painter.setting',
|
|
386
428
|
label: '设置'
|
|
387
|
-
})))
|
|
429
|
+
}))), /*#__PURE__*/React.createElement(Collapse, {
|
|
388
430
|
label: formatMessage({
|
|
389
431
|
id: "".concat(_I18N_PREFIX_, ".rules.front"),
|
|
390
432
|
label: '前端校验规则'
|
|
@@ -224,30 +224,44 @@ var FieldSetting = function FieldSetting(_ref) {
|
|
|
224
224
|
moduleUid: moduleId
|
|
225
225
|
}, val ? 'uniqueFieldUid' : 'noUniqueFieldUid', fieldData.uid));
|
|
226
226
|
case 3:
|
|
227
|
-
_context.next =
|
|
227
|
+
_context.next = 38;
|
|
228
228
|
break;
|
|
229
229
|
case 5:
|
|
230
|
-
if (!(key === 'align' || key === 'headerAlign' || key === 'pinned' || key === 'tip')) {
|
|
230
|
+
if (!(key === 'align' || key === 'headerAlign' || key === 'pinned' || key === 'tip' || key === 'render')) {
|
|
231
231
|
_context.next = 9;
|
|
232
232
|
break;
|
|
233
233
|
}
|
|
234
234
|
handleUIChange(key, val);
|
|
235
|
-
_context.next =
|
|
235
|
+
_context.next = 38;
|
|
236
236
|
break;
|
|
237
237
|
case 9:
|
|
238
|
-
if (!(key === '
|
|
238
|
+
if (!(key === 'formMode')) {
|
|
239
239
|
_context.next = 13;
|
|
240
240
|
break;
|
|
241
241
|
}
|
|
242
|
-
|
|
243
|
-
|
|
242
|
+
if (val.includes('single') && !val.includes('bulk')) {
|
|
243
|
+
handleUIChange(key, 'single');
|
|
244
|
+
} else if (!val.includes('single') && val.includes('bulk')) {
|
|
245
|
+
handleUIChange(key, 'bulk');
|
|
246
|
+
} else {
|
|
247
|
+
handleUIChange(key, void 0);
|
|
248
|
+
}
|
|
249
|
+
_context.next = 38;
|
|
244
250
|
break;
|
|
245
251
|
case 13:
|
|
252
|
+
if (!(key === 'col' || key === 'row')) {
|
|
253
|
+
_context.next = 17;
|
|
254
|
+
break;
|
|
255
|
+
}
|
|
256
|
+
handleUIChange(key, val);
|
|
257
|
+
_context.next = 38;
|
|
258
|
+
break;
|
|
259
|
+
case 17:
|
|
246
260
|
if (!(key === 'delRule')) {
|
|
247
|
-
_context.next =
|
|
261
|
+
_context.next = 25;
|
|
248
262
|
break;
|
|
249
263
|
}
|
|
250
|
-
_context.next =
|
|
264
|
+
_context.next = 20;
|
|
251
265
|
return fetchDelAttrs({
|
|
252
266
|
moduleDatasetUid: fieldData.datasetFieldUid,
|
|
253
267
|
ccmModuleFieldVerifies: [{
|
|
@@ -255,11 +269,11 @@ var FieldSetting = function FieldSetting(_ref) {
|
|
|
255
269
|
}],
|
|
256
270
|
scope: FIELD_SCOPES.CHECK_RULES
|
|
257
271
|
});
|
|
258
|
-
case
|
|
272
|
+
case 20:
|
|
259
273
|
_yield$fetchDelAttrs = _context.sent;
|
|
260
274
|
code = _yield$fetchDelAttrs.code;
|
|
261
275
|
return _context.abrupt("return", code === 1);
|
|
262
|
-
case
|
|
276
|
+
case 25:
|
|
263
277
|
mapping = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, FIELD_SCOPES.FIELD_REQUIRED, {
|
|
264
278
|
key: 'fieldRequired',
|
|
265
279
|
refresh: requiredRefresh
|
|
@@ -295,15 +309,15 @@ var FieldSetting = function FieldSetting(_ref) {
|
|
|
295
309
|
if (!_stateItem) {
|
|
296
310
|
d.datasetBusinessUids = [fieldData.uid];
|
|
297
311
|
}
|
|
298
|
-
_context.next =
|
|
312
|
+
_context.next = 35;
|
|
299
313
|
return request(d);
|
|
300
|
-
case
|
|
314
|
+
case 35:
|
|
301
315
|
_yield$request = _context.sent;
|
|
302
316
|
_code = _yield$request.code;
|
|
303
317
|
if (_code === 1) {
|
|
304
318
|
mapping[key].refresh();
|
|
305
319
|
}
|
|
306
|
-
case
|
|
320
|
+
case 38:
|
|
307
321
|
case "end":
|
|
308
322
|
return _context.stop();
|
|
309
323
|
}
|
|
@@ -5,6 +5,7 @@ export var getFrontRules = function getFrontRules(property) {
|
|
|
5
5
|
case 'money':
|
|
6
6
|
case 'decimal':
|
|
7
7
|
case 'sint':
|
|
8
|
+
case 'long':
|
|
8
9
|
rules = [{
|
|
9
10
|
label: '最小值',
|
|
10
11
|
key: 'min',
|
|
@@ -47,7 +48,7 @@ export var getFrontRules = function getFrontRules(property) {
|
|
|
47
48
|
rules.push({
|
|
48
49
|
label: '自定义',
|
|
49
50
|
key: 'rules',
|
|
50
|
-
defaultCode: "function validator(cValue, rule, value, callback) { \n if(!value) callback('errorMsg'); \n callback(); \n}"
|
|
51
|
+
defaultCode: "function validator(cValue, rule, value, callback) { \n if(!value) callback('errorMsg'); \n else callback(); \n}"
|
|
51
52
|
});
|
|
52
53
|
return rules;
|
|
53
54
|
};
|
|
@@ -13,6 +13,7 @@ var Painter = function Painter(_ref) {
|
|
|
13
13
|
var className = _ref.className,
|
|
14
14
|
code = _ref.code;
|
|
15
15
|
return /*#__PURE__*/React.createElement(EventBusProvider, {
|
|
16
|
+
key: code,
|
|
16
17
|
runtime: RUNTIME.DESIGN
|
|
17
18
|
}, /*#__PURE__*/React.createElement(ContextProvider, {
|
|
18
19
|
code: code
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useMemoizedFn } from 'ahooks';
|
|
3
|
-
import {
|
|
3
|
+
import { Typography } from 'luck-design/antd';
|
|
4
|
+
import styled from 'styled-components';
|
|
5
|
+
var Paragraph = Typography.Paragraph;
|
|
6
|
+
var BlockIdSpan = styled(Paragraph).withConfig({
|
|
7
|
+
displayName: "BlockIdSpan",
|
|
8
|
+
componentId: "luckda-6530__sc-gbohir-0"
|
|
9
|
+
})(["display:inline-block;margin:0;color:#595959;text-decoration:var(--ant-primary-color) wavy underline;cursor:copy;padding:0 4px;"]);
|
|
4
10
|
var BlockEditor = function BlockEditor(_ref) {
|
|
5
11
|
var blockName = _ref.blockName,
|
|
6
12
|
blockId = _ref.blockId,
|
|
@@ -11,17 +17,25 @@ var BlockEditor = function BlockEditor(_ref) {
|
|
|
11
17
|
blockId: blockId
|
|
12
18
|
});
|
|
13
19
|
});
|
|
14
|
-
|
|
20
|
+
var handleCopyBlockId = useMemoizedFn(function (e) {
|
|
21
|
+
e.stopPropagation();
|
|
22
|
+
});
|
|
23
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
15
24
|
onClick: handleClick,
|
|
16
25
|
style: next ? {
|
|
17
26
|
color: 'var(--ant-primary-color)',
|
|
18
27
|
cursor: 'pointer'
|
|
19
28
|
} : {}
|
|
20
|
-
}, blockName
|
|
21
|
-
|
|
29
|
+
}, blockName, /*#__PURE__*/React.createElement("span", {
|
|
30
|
+
onClick: handleCopyBlockId
|
|
31
|
+
}, /*#__PURE__*/React.createElement(BlockIdSpan, {
|
|
22
32
|
style: {
|
|
23
|
-
|
|
33
|
+
display: 'inline-block',
|
|
34
|
+
margin: 0
|
|
35
|
+
},
|
|
36
|
+
copyable: {
|
|
37
|
+
text: blockId
|
|
24
38
|
}
|
|
25
|
-
}));
|
|
39
|
+
}, blockId))));
|
|
26
40
|
};
|
|
27
41
|
export default BlockEditor;
|
|
@@ -43,7 +43,7 @@ var addOptions = [{
|
|
|
43
43
|
}),
|
|
44
44
|
value: 'blank'
|
|
45
45
|
}];
|
|
46
|
-
var
|
|
46
|
+
var BlocksEditor = function BlocksEditor(_ref) {
|
|
47
47
|
var onChange = _ref.onChange,
|
|
48
48
|
nodeId = _ref.nodeId,
|
|
49
49
|
renderPanelItems = _ref.renderPanelItems,
|
|
@@ -226,4 +226,4 @@ var BlockEditor = function BlockEditor(_ref) {
|
|
|
226
226
|
label: '新增区块'
|
|
227
227
|
}))))) : null;
|
|
228
228
|
};
|
|
229
|
-
export default
|
|
229
|
+
export default BlocksEditor;
|