@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
|
@@ -18,6 +18,7 @@ var monaco = _interopRequireWildcard3(require("monaco-editor"));
|
|
|
18
18
|
var _lodash = require("lodash");
|
|
19
19
|
var _standalone = _interopRequireDefault(require("prettier/standalone"));
|
|
20
20
|
var _parserBabel = _interopRequireDefault(require("prettier/parser-babel"));
|
|
21
|
+
var _useCombinedRefs = _interopRequireDefault(require("../../../engine/tools/useCombinedRefs"));
|
|
21
22
|
var _BaseEditor = _interopRequireDefault(require("./BaseEditor"));
|
|
22
23
|
var _excluded = ["children", "keywords"];
|
|
23
24
|
function capitalizeFirstLetter(string) {
|
|
@@ -115,31 +116,32 @@ var prettierFormetter = function prettierFormetter(unformattedCode) {
|
|
|
115
116
|
}
|
|
116
117
|
};
|
|
117
118
|
|
|
118
|
-
/**
|
|
119
|
-
* JSEditor 组件是一个专为 JavaScript 编辑设计的 React 组件,它基于 BaseEditor 组件构建,并集成了自动完成功能。
|
|
120
|
-
* 该组件利用 monaco-editor 提供的 API,通过 setupAutocomplete 函数设置自动完成项,从而增强代码编辑体验。
|
|
121
|
-
* 自动完成逻辑包括从预定义的自动完成模块中加载补全项,以及在编辑器中键入特定字符(如".")时触发补全建议。
|
|
122
|
-
*
|
|
123
|
-
* @component
|
|
124
|
-
* @example
|
|
125
|
-
* <JSEditor
|
|
126
|
-
* language="javascript"
|
|
127
|
-
* options={{ fontSize: 14 }}
|
|
128
|
-
* >
|
|
129
|
-
* {`function sayHello() {\n console.log('Hello, World!');\n}`}
|
|
130
|
-
* </JSEditor>
|
|
131
|
-
*
|
|
132
|
-
* @param {Object} props - 组件的属性。
|
|
133
|
-
* @param {React.ReactNode} children - 传递给 BaseEditor 的 children,通常是初始代码或内容。
|
|
134
|
-
* @param {Object} rest - 传递给 BaseEditor 组件的其他属性。
|
|
135
|
-
* @param {React.Ref} ref - React ref 引用,用于在外部组件中访问 BaseEditor 实例的方法。
|
|
136
|
-
*
|
|
137
|
-
* @returns {ReactElement} 返回一个 React 元素,其中包含了一个具有自动完成功能的 JavaScript 编辑器实例。
|
|
119
|
+
/**
|
|
120
|
+
* JSEditor 组件是一个专为 JavaScript 编辑设计的 React 组件,它基于 BaseEditor 组件构建,并集成了自动完成功能。
|
|
121
|
+
* 该组件利用 monaco-editor 提供的 API,通过 setupAutocomplete 函数设置自动完成项,从而增强代码编辑体验。
|
|
122
|
+
* 自动完成逻辑包括从预定义的自动完成模块中加载补全项,以及在编辑器中键入特定字符(如".")时触发补全建议。
|
|
123
|
+
*
|
|
124
|
+
* @component
|
|
125
|
+
* @example
|
|
126
|
+
* <JSEditor
|
|
127
|
+
* language="javascript"
|
|
128
|
+
* options={{ fontSize: 14 }}
|
|
129
|
+
* >
|
|
130
|
+
* {`function sayHello() {\n console.log('Hello, World!');\n}`}
|
|
131
|
+
* </JSEditor>
|
|
132
|
+
*
|
|
133
|
+
* @param {Object} props - 组件的属性。
|
|
134
|
+
* @param {React.ReactNode} children - 传递给 BaseEditor 的 children,通常是初始代码或内容。
|
|
135
|
+
* @param {Object} rest - 传递给 BaseEditor 组件的其他属性。
|
|
136
|
+
* @param {React.Ref} ref - React ref 引用,用于在外部组件中访问 BaseEditor 实例的方法。
|
|
137
|
+
*
|
|
138
|
+
* @returns {ReactElement} 返回一个 React 元素,其中包含了一个具有自动完成功能的 JavaScript 编辑器实例。
|
|
138
139
|
*/
|
|
139
|
-
var JSEditor = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2,
|
|
140
|
+
var JSEditor = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, outRef) {
|
|
140
141
|
var children = _ref2.children,
|
|
141
142
|
keywords = _ref2.keywords,
|
|
142
143
|
rest = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
|
|
144
|
+
var ref = (0, _useCombinedRefs.default)(outRef);
|
|
143
145
|
(0, _react.useEffect)(function () {
|
|
144
146
|
var originalGetValue = ref.current.editor.getValue.bind(ref.current.editor);
|
|
145
147
|
ref.current.editor.getValue = function () {
|
|
@@ -11,31 +11,31 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _BaseEditor = _interopRequireDefault(require("./BaseEditor"));
|
|
13
13
|
var _excluded = ["children"];
|
|
14
|
-
/**
|
|
15
|
-
* JsonEditor 组件是一个专门用于编辑 CSS 代码的 React 组件,它基于 BaseEditor 组件构建。
|
|
16
|
-
* 该组件通过将 language 属性固定设置为 "css",确保编辑器环境专门用于 CSS 代码编辑。
|
|
17
|
-
* 用户可以传入 CSS 代码作为 children,并通过其他 props 控制 BaseEditor 提供的额外功能。
|
|
18
|
-
*
|
|
19
|
-
* @component
|
|
20
|
-
* @example
|
|
21
|
-
* const handleCssChange = (newCss, event) => {
|
|
22
|
-
* console.log('CSS changed: ', newCss);
|
|
23
|
-
* };
|
|
24
|
-
* <JsonEditor
|
|
25
|
-
* onChange={handleCssChange}
|
|
26
|
-
* isFullscreen={false}
|
|
27
|
-
* width="600px"
|
|
28
|
-
* height="400px"
|
|
29
|
-
* >
|
|
30
|
-
* {`body { margin: 0; font-family: Arial, sans-serif; }`}
|
|
31
|
-
* </JsonEditor>
|
|
32
|
-
*
|
|
33
|
-
* @param {Object} props - 组件的属性。
|
|
34
|
-
* @param {React.ReactNode} children - 子组件,通常是编辑器的初始 CSS 代码。
|
|
35
|
-
* @param {Object} rest - 传递给 BaseEditor 组件的其他属性。
|
|
36
|
-
* @param {React.Ref} ref - React ref 引用,用于外部组件调用编辑器实例的方法。
|
|
37
|
-
*
|
|
38
|
-
* @returns {ReactElement} 返回一个 React 元素,该元素内部是一个专门用于 CSS 编辑的 BaseEditor 组件实例。
|
|
14
|
+
/**
|
|
15
|
+
* JsonEditor 组件是一个专门用于编辑 CSS 代码的 React 组件,它基于 BaseEditor 组件构建。
|
|
16
|
+
* 该组件通过将 language 属性固定设置为 "css",确保编辑器环境专门用于 CSS 代码编辑。
|
|
17
|
+
* 用户可以传入 CSS 代码作为 children,并通过其他 props 控制 BaseEditor 提供的额外功能。
|
|
18
|
+
*
|
|
19
|
+
* @component
|
|
20
|
+
* @example
|
|
21
|
+
* const handleCssChange = (newCss, event) => {
|
|
22
|
+
* console.log('CSS changed: ', newCss);
|
|
23
|
+
* };
|
|
24
|
+
* <JsonEditor
|
|
25
|
+
* onChange={handleCssChange}
|
|
26
|
+
* isFullscreen={false}
|
|
27
|
+
* width="600px"
|
|
28
|
+
* height="400px"
|
|
29
|
+
* >
|
|
30
|
+
* {`body { margin: 0; font-family: Arial, sans-serif; }`}
|
|
31
|
+
* </JsonEditor>
|
|
32
|
+
*
|
|
33
|
+
* @param {Object} props - 组件的属性。
|
|
34
|
+
* @param {React.ReactNode} children - 子组件,通常是编辑器的初始 CSS 代码。
|
|
35
|
+
* @param {Object} rest - 传递给 BaseEditor 组件的其他属性。
|
|
36
|
+
* @param {React.Ref} ref - React ref 引用,用于外部组件调用编辑器实例的方法。
|
|
37
|
+
*
|
|
38
|
+
* @returns {ReactElement} 返回一个 React 元素,该元素内部是一个专门用于 CSS 编辑的 BaseEditor 组件实例。
|
|
39
39
|
*/
|
|
40
40
|
var JsonEditor = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
41
41
|
var children = _ref.children,
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var monaco = _interopRequireWildcard(require("monaco-editor"));
|
|
13
|
+
var _BaseEditor = _interopRequireDefault(require("./BaseEditor"));
|
|
14
|
+
var _excluded = ["children"];
|
|
15
|
+
// 定义一个简单的JavaScript语言
|
|
16
|
+
monaco.languages.register({
|
|
17
|
+
id: 'vision'
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
// 定义语言的配置
|
|
21
|
+
monaco.languages.setLanguageConfiguration('vision', {
|
|
22
|
+
brackets: [['{', '}'], ['[', ']'], ['(', ')']],
|
|
23
|
+
autoClosingPairs: [{
|
|
24
|
+
open: '{',
|
|
25
|
+
close: '}'
|
|
26
|
+
}, {
|
|
27
|
+
open: '[',
|
|
28
|
+
close: ']'
|
|
29
|
+
}, {
|
|
30
|
+
open: '(',
|
|
31
|
+
close: ')'
|
|
32
|
+
}, {
|
|
33
|
+
open: '"',
|
|
34
|
+
close: '"',
|
|
35
|
+
notIn: ['string']
|
|
36
|
+
}, {
|
|
37
|
+
open: "'",
|
|
38
|
+
close: "'",
|
|
39
|
+
notIn: ['string']
|
|
40
|
+
}]
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
// 定义语言的词法规则
|
|
44
|
+
monaco.languages.setMonarchTokensProvider('vision', {
|
|
45
|
+
tokenizer: {
|
|
46
|
+
root: [[/\b(true|false|null)\b/, 'constant'], [/[{}()\[\]]/, '@brackets'], [/[0-9]+/, 'number'], [/["'](.*?)["']/, 'string'],
|
|
47
|
+
// 新增模板字符串的词法规则
|
|
48
|
+
[/\$\{/, 'delimiter.curly'],
|
|
49
|
+
// 添加对模板表达式起始的支持
|
|
50
|
+
[/\`/, {
|
|
51
|
+
token: 'string.quote',
|
|
52
|
+
bracket: '@open',
|
|
53
|
+
next: '@template_string'
|
|
54
|
+
}] // 处理模板字符串
|
|
55
|
+
],
|
|
56
|
+
template_string: [[/\$\{/, {
|
|
57
|
+
token: 'delimiter.curly',
|
|
58
|
+
next: '@expression'
|
|
59
|
+
}],
|
|
60
|
+
// 模板表达式开始
|
|
61
|
+
[/\`/, {
|
|
62
|
+
token: 'string.quote',
|
|
63
|
+
bracket: '@close',
|
|
64
|
+
next: '@pop'
|
|
65
|
+
}],
|
|
66
|
+
// 模板字符串结束
|
|
67
|
+
[/./, 'string'] // 模板字符串内的内容
|
|
68
|
+
],
|
|
69
|
+
expression: [[/\}/, {
|
|
70
|
+
token: 'delimiter.curly',
|
|
71
|
+
next: '@pop'
|
|
72
|
+
}],
|
|
73
|
+
// 模板表达式结束
|
|
74
|
+
[/[0-9]+/, 'number'],
|
|
75
|
+
// 在模板表达式内的数字
|
|
76
|
+
[/[a-zA-Z_]\w*/, 'identifier'] // 在模板表达式内的标识符
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
var VisionEditor = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
81
|
+
var children = _ref.children,
|
|
82
|
+
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
83
|
+
return /*#__PURE__*/_react.default.createElement(_BaseEditor.default, (0, _extends2.default)({
|
|
84
|
+
ref: ref,
|
|
85
|
+
language: "vision"
|
|
86
|
+
}, rest), children);
|
|
87
|
+
});
|
|
88
|
+
var _default = exports.default = /*#__PURE__*/_react.default.memo(VisionEditor);
|
|
@@ -21,6 +21,7 @@ var _Collapse = _interopRequireDefault(require("../../components/Collapse"));
|
|
|
21
21
|
var _PanelItem = _interopRequireDefault(require("../../components/PanelItem"));
|
|
22
22
|
var _ListEditor = require("../../components/ListEditor");
|
|
23
23
|
var _WidthHeight = _interopRequireDefault(require("../../panel-section/WidthHeight"));
|
|
24
|
+
var _JSEditor = _interopRequireDefault(require("../../panel-section/JSEditor"));
|
|
24
25
|
var _FieldAttrsModal = _interopRequireDefault(require("./FieldAttrsModal"));
|
|
25
26
|
var _FieldRulesModal = _interopRequireDefault(require("./FieldRulesModal"));
|
|
26
27
|
var _apiUrl = require("../../../constants/api-url");
|
|
@@ -65,6 +66,19 @@ var _PINNED_OPTIONS_ = [{
|
|
|
65
66
|
}),
|
|
66
67
|
value: 'right'
|
|
67
68
|
}];
|
|
69
|
+
var _FORM_MODE_OPTIONS_ = [{
|
|
70
|
+
label: (0, _utils.formatMessage)({
|
|
71
|
+
id: "".concat(_I18N_PREFIX_, ".formMode.single"),
|
|
72
|
+
label: '单行'
|
|
73
|
+
}),
|
|
74
|
+
value: 'single'
|
|
75
|
+
}, {
|
|
76
|
+
label: (0, _utils.formatMessage)({
|
|
77
|
+
id: "".concat(_I18N_PREFIX_, ".formMode.bulk"),
|
|
78
|
+
label: '批量'
|
|
79
|
+
}),
|
|
80
|
+
value: 'bulk'
|
|
81
|
+
}];
|
|
68
82
|
var _TRUE_FALSE_ = ['__TRUE__', '__FALSE__'];
|
|
69
83
|
var CoderWrapper = _styledComponents.default.div.withConfig({
|
|
70
84
|
displayName: "CoderWrapper",
|
|
@@ -78,6 +92,11 @@ var StyledRadio = (0, _styledComponents.default)(_antd.Radio.Group).withConfig({
|
|
|
78
92
|
displayName: "StyledRadio",
|
|
79
93
|
componentId: "luckda-6530__sc-1n41f3z-2"
|
|
80
94
|
})(["span.ant-radio + *{padding-left:4px;padding-right:4px;}"]);
|
|
95
|
+
var StyledCheckbox = (0, _styledComponents.default)(_antd.Checkbox.Group).withConfig({
|
|
96
|
+
displayName: "StyledCheckbox",
|
|
97
|
+
componentId: "luckda-6530__sc-1n41f3z-3"
|
|
98
|
+
})([".ant-checkbox-wrapper{font-size:12px;}"]);
|
|
99
|
+
var _DEFAULT_RENDER_CODE = "function render(value, data, rowIndex, params) { \n return value;\n}";
|
|
81
100
|
var SettingUI = function SettingUI(_ref) {
|
|
82
101
|
var loading = _ref.loading,
|
|
83
102
|
data = _ref.data,
|
|
@@ -323,7 +342,18 @@ var SettingUI = function SettingUI(_ref) {
|
|
|
323
342
|
onChange: function onChange(val) {
|
|
324
343
|
return run('tip', val);
|
|
325
344
|
}
|
|
326
|
-
}))), component === '
|
|
345
|
+
}))), component === 'tableForm' && /*#__PURE__*/_react.default.createElement(_PanelItem.default, {
|
|
346
|
+
label: (0, _utils.formatMessage)({
|
|
347
|
+
id: "".concat(_I18N_PREFIX_, ".formMode"),
|
|
348
|
+
label: '修改方式'
|
|
349
|
+
})
|
|
350
|
+
}, /*#__PURE__*/_react.default.createElement(StyledCheckbox, {
|
|
351
|
+
options: _FORM_MODE_OPTIONS_,
|
|
352
|
+
defaultValue: fieldData.formMode ? [fieldData.formMode] : ['single', 'bulk'],
|
|
353
|
+
onChange: function onChange(val) {
|
|
354
|
+
return run('formMode', val);
|
|
355
|
+
}
|
|
356
|
+
})), component === 'form' && /*#__PURE__*/_react.default.createElement(_PanelItem.default, {
|
|
327
357
|
label: (0, _utils.formatMessage)({
|
|
328
358
|
id: "".concat(_I18N_PREFIX_, ".fieldColumn"),
|
|
329
359
|
label: '占列数'
|
|
@@ -357,7 +387,7 @@ var SettingUI = function SettingUI(_ref) {
|
|
|
357
387
|
id: "".concat(_I18N_PREFIX_, ".required"),
|
|
358
388
|
label: '是否必填'
|
|
359
389
|
})
|
|
360
|
-
}, renderCodeIcon(fieldRequired, _constants.FIELD_SCOPES.FIELD_REQUIRED)), ['table', 'tableForm'].includes && /*#__PURE__*/_react.default.createElement(_PanelItem.default, {
|
|
390
|
+
}, renderCodeIcon(fieldRequired, _constants.FIELD_SCOPES.FIELD_REQUIRED)), ['table', 'tableForm'].includes(component) && /*#__PURE__*/_react.default.createElement(_PanelItem.default, {
|
|
361
391
|
label: (0, _utils.formatMessage)({
|
|
362
392
|
id: "".concat(_I18N_PREFIX_, ".table.display"),
|
|
363
393
|
label: '表格中显示'
|
|
@@ -377,7 +407,19 @@ var SettingUI = function SettingUI(_ref) {
|
|
|
377
407
|
id: "".concat(_I18N_PREFIX_, ".readonly"),
|
|
378
408
|
label: '是否只读'
|
|
379
409
|
})
|
|
380
|
-
}, renderCodeIcon(fieldReadonly, _constants.FIELD_SCOPES.FIELD_READONLY)), !isBatch ? /*#__PURE__*/_react.default.createElement(_Collapse.default, {
|
|
410
|
+
}, renderCodeIcon(fieldReadonly, _constants.FIELD_SCOPES.FIELD_READONLY)), !isBatch ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, ['table', 'tableForm'].includes(component) ? /*#__PURE__*/_react.default.createElement(_Collapse.default, {
|
|
411
|
+
label: (0, _utils.formatMessage)({
|
|
412
|
+
id: "".concat(_I18N_PREFIX_, ".render"),
|
|
413
|
+
label: '内容定制渲染'
|
|
414
|
+
})
|
|
415
|
+
}, /*#__PURE__*/_react.default.createElement(_JSEditor.default, {
|
|
416
|
+
defaultValue: fieldData.render,
|
|
417
|
+
onChange: function onChange(val) {
|
|
418
|
+
return run('render', val);
|
|
419
|
+
},
|
|
420
|
+
mustConfirm: true,
|
|
421
|
+
defaultCode: _DEFAULT_RENDER_CODE
|
|
422
|
+
})) : null, /*#__PURE__*/_react.default.createElement(_Collapse.default, {
|
|
381
423
|
label: (0, _utils.formatMessage)({
|
|
382
424
|
id: "".concat(_I18N_PREFIX_, ".defaultValue"),
|
|
383
425
|
label: '默认值'
|
|
@@ -392,7 +434,7 @@ var SettingUI = function SettingUI(_ref) {
|
|
|
392
434
|
}), "\n \u3010").concat(fieldDefaultValue.expression, "\u3011") : (0, _utils.formatMessage)({
|
|
393
435
|
id: 'luckda.lowcode.painter.setting',
|
|
394
436
|
label: '设置'
|
|
395
|
-
})))
|
|
437
|
+
}))), /*#__PURE__*/_react.default.createElement(_Collapse.default, {
|
|
396
438
|
label: (0, _utils.formatMessage)({
|
|
397
439
|
id: "".concat(_I18N_PREFIX_, ".rules.front"),
|
|
398
440
|
label: '前端校验规则'
|
|
@@ -231,30 +231,44 @@ var FieldSetting = function FieldSetting(_ref) {
|
|
|
231
231
|
moduleUid: moduleId
|
|
232
232
|
}, val ? 'uniqueFieldUid' : 'noUniqueFieldUid', fieldData.uid));
|
|
233
233
|
case 3:
|
|
234
|
-
_context.next =
|
|
234
|
+
_context.next = 38;
|
|
235
235
|
break;
|
|
236
236
|
case 5:
|
|
237
|
-
if (!(key === 'align' || key === 'headerAlign' || key === 'pinned' || key === 'tip')) {
|
|
237
|
+
if (!(key === 'align' || key === 'headerAlign' || key === 'pinned' || key === 'tip' || key === 'render')) {
|
|
238
238
|
_context.next = 9;
|
|
239
239
|
break;
|
|
240
240
|
}
|
|
241
241
|
handleUIChange(key, val);
|
|
242
|
-
_context.next =
|
|
242
|
+
_context.next = 38;
|
|
243
243
|
break;
|
|
244
244
|
case 9:
|
|
245
|
-
if (!(key === '
|
|
245
|
+
if (!(key === 'formMode')) {
|
|
246
246
|
_context.next = 13;
|
|
247
247
|
break;
|
|
248
248
|
}
|
|
249
|
-
|
|
250
|
-
|
|
249
|
+
if (val.includes('single') && !val.includes('bulk')) {
|
|
250
|
+
handleUIChange(key, 'single');
|
|
251
|
+
} else if (!val.includes('single') && val.includes('bulk')) {
|
|
252
|
+
handleUIChange(key, 'bulk');
|
|
253
|
+
} else {
|
|
254
|
+
handleUIChange(key, void 0);
|
|
255
|
+
}
|
|
256
|
+
_context.next = 38;
|
|
251
257
|
break;
|
|
252
258
|
case 13:
|
|
259
|
+
if (!(key === 'col' || key === 'row')) {
|
|
260
|
+
_context.next = 17;
|
|
261
|
+
break;
|
|
262
|
+
}
|
|
263
|
+
handleUIChange(key, val);
|
|
264
|
+
_context.next = 38;
|
|
265
|
+
break;
|
|
266
|
+
case 17:
|
|
253
267
|
if (!(key === 'delRule')) {
|
|
254
|
-
_context.next =
|
|
268
|
+
_context.next = 25;
|
|
255
269
|
break;
|
|
256
270
|
}
|
|
257
|
-
_context.next =
|
|
271
|
+
_context.next = 20;
|
|
258
272
|
return (0, _apiUrl.fetchDelAttrs)({
|
|
259
273
|
moduleDatasetUid: fieldData.datasetFieldUid,
|
|
260
274
|
ccmModuleFieldVerifies: [{
|
|
@@ -262,11 +276,11 @@ var FieldSetting = function FieldSetting(_ref) {
|
|
|
262
276
|
}],
|
|
263
277
|
scope: _constants.FIELD_SCOPES.CHECK_RULES
|
|
264
278
|
});
|
|
265
|
-
case
|
|
279
|
+
case 20:
|
|
266
280
|
_yield$fetchDelAttrs = _context.sent;
|
|
267
281
|
code = _yield$fetchDelAttrs.code;
|
|
268
282
|
return _context.abrupt("return", code === 1);
|
|
269
|
-
case
|
|
283
|
+
case 25:
|
|
270
284
|
mapping = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _constants.FIELD_SCOPES.FIELD_REQUIRED, {
|
|
271
285
|
key: 'fieldRequired',
|
|
272
286
|
refresh: requiredRefresh
|
|
@@ -302,15 +316,15 @@ var FieldSetting = function FieldSetting(_ref) {
|
|
|
302
316
|
if (!_stateItem) {
|
|
303
317
|
d.datasetBusinessUids = [fieldData.uid];
|
|
304
318
|
}
|
|
305
|
-
_context.next =
|
|
319
|
+
_context.next = 35;
|
|
306
320
|
return request(d);
|
|
307
|
-
case
|
|
321
|
+
case 35:
|
|
308
322
|
_yield$request = _context.sent;
|
|
309
323
|
_code = _yield$request.code;
|
|
310
324
|
if (_code === 1) {
|
|
311
325
|
mapping[key].refresh();
|
|
312
326
|
}
|
|
313
|
-
case
|
|
327
|
+
case 38:
|
|
314
328
|
case "end":
|
|
315
329
|
return _context.stop();
|
|
316
330
|
}
|
|
@@ -11,6 +11,7 @@ var getFrontRules = exports.getFrontRules = function getFrontRules(property) {
|
|
|
11
11
|
case 'money':
|
|
12
12
|
case 'decimal':
|
|
13
13
|
case 'sint':
|
|
14
|
+
case 'long':
|
|
14
15
|
rules = [{
|
|
15
16
|
label: '最小值',
|
|
16
17
|
key: 'min',
|
|
@@ -53,7 +54,7 @@ var getFrontRules = exports.getFrontRules = function getFrontRules(property) {
|
|
|
53
54
|
rules.push({
|
|
54
55
|
label: '自定义',
|
|
55
56
|
key: 'rules',
|
|
56
|
-
defaultCode: "function validator(cValue, rule, value, callback) { \n if(!value) callback('errorMsg'); \n callback(); \n}"
|
|
57
|
+
defaultCode: "function validator(cValue, rule, value, callback) { \n if(!value) callback('errorMsg'); \n else callback(); \n}"
|
|
57
58
|
});
|
|
58
59
|
return rules;
|
|
59
60
|
};
|
|
@@ -20,6 +20,7 @@ var Painter = function Painter(_ref) {
|
|
|
20
20
|
var className = _ref.className,
|
|
21
21
|
code = _ref.code;
|
|
22
22
|
return /*#__PURE__*/_react.default.createElement(_EventBusProvider.default, {
|
|
23
|
+
key: code,
|
|
23
24
|
runtime: _index.RUNTIME.DESIGN
|
|
24
25
|
}, /*#__PURE__*/_react.default.createElement(_ContextProvider.default, {
|
|
25
26
|
code: code
|
|
@@ -8,6 +8,12 @@ exports.default = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _ahooks = require("ahooks");
|
|
10
10
|
var _antd = require("luck-design/antd");
|
|
11
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
12
|
+
var Paragraph = _antd.Typography.Paragraph;
|
|
13
|
+
var BlockIdSpan = (0, _styledComponents.default)(Paragraph).withConfig({
|
|
14
|
+
displayName: "BlockIdSpan",
|
|
15
|
+
componentId: "luckda-6530__sc-gbohir-0"
|
|
16
|
+
})(["display:inline-block;margin:0;color:#595959;text-decoration:var(--ant-primary-color) wavy underline;cursor:copy;padding:0 4px;"]);
|
|
11
17
|
var BlockEditor = function BlockEditor(_ref) {
|
|
12
18
|
var blockName = _ref.blockName,
|
|
13
19
|
blockId = _ref.blockId,
|
|
@@ -18,17 +24,25 @@ var BlockEditor = function BlockEditor(_ref) {
|
|
|
18
24
|
blockId: blockId
|
|
19
25
|
});
|
|
20
26
|
});
|
|
21
|
-
|
|
27
|
+
var handleCopyBlockId = (0, _ahooks.useMemoizedFn)(function (e) {
|
|
28
|
+
e.stopPropagation();
|
|
29
|
+
});
|
|
30
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("span", {
|
|
22
31
|
onClick: handleClick,
|
|
23
32
|
style: next ? {
|
|
24
33
|
color: 'var(--ant-primary-color)',
|
|
25
34
|
cursor: 'pointer'
|
|
26
35
|
} : {}
|
|
27
|
-
}, blockName
|
|
28
|
-
|
|
36
|
+
}, blockName, /*#__PURE__*/_react.default.createElement("span", {
|
|
37
|
+
onClick: handleCopyBlockId
|
|
38
|
+
}, /*#__PURE__*/_react.default.createElement(BlockIdSpan, {
|
|
29
39
|
style: {
|
|
30
|
-
|
|
40
|
+
display: 'inline-block',
|
|
41
|
+
margin: 0
|
|
42
|
+
},
|
|
43
|
+
copyable: {
|
|
44
|
+
text: blockId
|
|
31
45
|
}
|
|
32
|
-
}));
|
|
46
|
+
}, blockId))));
|
|
33
47
|
};
|
|
34
48
|
var _default = exports.default = BlockEditor;
|
|
@@ -50,7 +50,7 @@ var addOptions = [{
|
|
|
50
50
|
}),
|
|
51
51
|
value: 'blank'
|
|
52
52
|
}];
|
|
53
|
-
var
|
|
53
|
+
var BlocksEditor = function BlocksEditor(_ref) {
|
|
54
54
|
var onChange = _ref.onChange,
|
|
55
55
|
nodeId = _ref.nodeId,
|
|
56
56
|
renderPanelItems = _ref.renderPanelItems,
|
|
@@ -233,4 +233,4 @@ var BlockEditor = function BlockEditor(_ref) {
|
|
|
233
233
|
label: '新增区块'
|
|
234
234
|
}))))) : null;
|
|
235
235
|
};
|
|
236
|
-
var _default = exports.default =
|
|
236
|
+
var _default = exports.default = BlocksEditor;
|