@luck-design-biz/luckda 1.0.2-13 → 1.0.2-15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +40 -40
- package/es/components/Builder/index.js +13 -10
- package/es/components/LDActions/index.less +70 -70
- package/es/components/LdAutoForm/index.js +5 -4
- package/es/components/LdCom/index.js +3 -2
- package/es/components/LdFormList/index.js +4 -3
- package/es/components/LdGrid/index.js +4 -4
- package/es/components/LdGridForm/index.js +5 -4
- package/es/components/LdGridForm/index.less +7 -7
- package/es/components/LdTree/index.less +42 -42
- package/es/helper/FromItems.js +64 -5
- package/es/helper/action.js +6 -6
- package/es/helper/form.js +14 -14
- package/es/helper/index.less +7 -7
- package/es/helper/ldBuilder.js +5 -4
- package/es/helper/ldComBuild.js +16 -11
- package/es/locales/zh-CN.js +41 -5
- package/es/lowcode/constants/api-url.js +309 -261
- package/es/lowcode/constants/event-topics.js +2 -0
- package/es/lowcode/constants/index.js +5 -4
- package/es/lowcode/engine/meta/components-list.json +12 -6
- package/es/lowcode/engine/meta/fielddate.props.default.json +1 -0
- package/es/lowcode/engine/meta/fielddate.props.json +48 -0
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +35 -30
- package/es/lowcode/engine/meta/proxy.props.default.json +15 -0
- package/es/lowcode/engine/meta/proxy.props.json +66 -0
- package/es/lowcode/engine/provider/ContextProvider/index.js +87 -49
- package/es/lowcode/engine/provider/ContextProvider/usePageDataStore.js +49 -43
- package/es/lowcode/engine/provider/ContextProvider/usePageVar.js +11 -5
- package/es/lowcode/engine/provider/ContextProvider/useTodo.js +2 -4
- package/es/lowcode/engine/provider/EventBusProvider.js +14 -4
- package/es/lowcode/engine/provider/PageProxyProvider.js +95 -0
- package/es/lowcode/engine/provider/RemoteSourceProvider.js +10 -12
- package/es/lowcode/engine/tools/dataProcess.js +76 -76
- package/es/lowcode/engine/tools/helper.js +25 -1
- package/es/lowcode/engine/tools/initDS.js +4 -4
- package/es/lowcode/painter/Components.js +2 -2
- package/es/lowcode/painter/Design.js +1 -0
- package/es/lowcode/painter/DesignOperator.js +129 -27
- package/es/lowcode/painter/DesignToolbar.js +88 -173
- package/es/lowcode/painter/components/AdvancePanel.js +28 -10
- package/es/lowcode/painter/components/Collapse.js +26 -26
- 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 +28 -28
- 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 +12 -4
- package/es/lowcode/painter/components/TreeEditor.js +10 -10
- 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 +23 -23
- package/es/lowcode/painter/components/code-editor/JSEditor.js +20 -20
- package/es/lowcode/painter/components/code-editor/JsonEditor.js +25 -25
- package/es/lowcode/painter/components/field-setting/SettingUI.js +56 -4
- package/es/lowcode/painter/components/field-setting/index.js +24 -1
- package/es/lowcode/painter/components/shortcut-modal/KeyIcon.js +11 -0
- package/es/lowcode/painter/components/shortcut-modal/index.js +208 -0
- package/es/lowcode/painter/panel-section/BlockEditor/index.js +10 -19
- package/es/lowcode/painter/panel-section/BlocksEditor/index.js +4 -1
- package/es/lowcode/painter/panel-section/ConditionCheck.js +0 -1
- package/es/lowcode/painter/panel-section/DataSetSelector.js +6 -3
- package/es/lowcode/painter/panel-section/FieldsSetting.js +1 -1
- package/es/lowcode/painter/panel-section/Icon.js +23 -23
- package/es/lowcode/painter/panel-section/IconConditionSelector.js +2 -1
- package/es/lowcode/painter/panel-section/IconSelector.js +16 -16
- package/es/lowcode/painter/panel-section/JSEditor/ToolBar.js +7 -4
- package/es/lowcode/painter/panel-section/JSEditor/index.js +15 -5
- package/es/lowcode/painter/panel-section/JSEditor/index.less +4 -0
- package/es/lowcode/painter/panel-section/LayoutRatio.js +21 -21
- package/es/lowcode/painter/panel-section/ProxyLinker.js +137 -0
- package/es/lowcode/painter/panel-section/ProxyParams.js +28 -0
- package/es/lowcode/painter/panel-section/ProxyParamsSetter.js +240 -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 +2 -2
- 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/style/action-bind-modal.less +104 -104
- 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 +178 -178
- package/es/lowcode/painter/style/display.less +17 -17
- package/es/lowcode/painter/style/dragdrop.less +56 -56
- 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/history.less +46 -46
- 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 +97 -97
- package/es/lowcode/painter/style/number-input.less +19 -19
- package/es/lowcode/painter/style/outline.less +30 -30
- package/es/lowcode/painter/style/page-layout-display.less +27 -27
- package/es/lowcode/painter/style/page-vars.less +25 -25
- package/es/lowcode/painter/style/panel-attrs.less +47 -47
- package/es/lowcode/painter/style/panel-item.less +55 -54
- package/es/lowcode/painter/style/panel.less +100 -100
- 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 +7 -7
- 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/svg/code.svg +3 -3
- package/es/lowcode/painter/svg/expect.svg +9 -9
- package/es/lowcode/preview/DebugTool.js +78 -0
- package/es/lowcode/preview/DebugToolDetail.js +103 -0
- package/es/lowcode/preview/index.js +10 -17
- package/es/lowcode/preview/useDebugSettings.js +62 -0
- package/es/lowcode/view/Canvas.js +5 -1
- package/es/lowcode/view/Page.js +8 -3
- package/es/lowcode/view/lc-components/Box/index.js +4 -4
- 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 +33 -33
- 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/index.js +126 -123
- package/es/lowcode/view/lc-components/CardList/meta.json +332 -332
- package/es/lowcode/view/lc-components/Dialog/index.js +14 -13
- package/es/lowcode/view/lc-components/Dialog/index.less +12 -12
- package/es/lowcode/view/lc-components/Dialog/meta.json +224 -224
- package/es/lowcode/view/lc-components/Drawer/index.js +15 -13
- package/es/lowcode/view/lc-components/Drawer/index.less +13 -13
- package/es/lowcode/view/lc-components/Drawer/meta.json +242 -242
- package/es/lowcode/view/lc-components/FieldColor/meta.json +157 -157
- package/es/lowcode/view/lc-components/FieldComplex/meta.json +140 -140
- package/es/lowcode/view/lc-components/FieldDate/meta.json +188 -140
- package/es/lowcode/view/lc-components/FieldDict/meta.json +138 -138
- package/es/lowcode/view/lc-components/FieldEditor/meta.json +137 -137
- package/es/lowcode/view/lc-components/FieldGroup/meta.json +166 -166
- package/es/lowcode/view/lc-components/FieldNumber/meta.json +143 -143
- 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 +128 -128
- package/es/lowcode/view/lc-components/Form/index.js +23 -20
- package/es/lowcode/view/lc-components/Form/meta.json +629 -629
- package/es/lowcode/view/lc-components/GroupTree/index.js +23 -23
- package/es/lowcode/view/lc-components/GroupTree/index.less +11 -11
- package/es/lowcode/view/lc-components/GroupTree/meta.json +82 -82
- package/es/lowcode/view/lc-components/Iframe/meta.json +31 -31
- package/es/lowcode/view/lc-components/ImEx/index.js +25 -25
- package/es/lowcode/view/lc-components/ImEx/index.less +7 -7
- package/es/lowcode/view/lc-components/ImEx/meta.json +134 -134
- package/es/lowcode/view/lc-components/Image/index.less +27 -27
- package/es/lowcode/view/lc-components/Image/meta.json +149 -149
- package/es/lowcode/view/lc-components/JSX/RuntimeComp.js +4 -4
- package/es/lowcode/view/lc-components/JSX/meta.json +29 -29
- package/es/lowcode/view/lc-components/Layout/index.js +16 -16
- 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/index.less +15 -15
- package/es/lowcode/view/lc-components/Link/meta.json +112 -112
- package/es/lowcode/view/lc-components/Page/meta.json +61 -61
- 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/meta.json +59 -59
- package/es/lowcode/view/lc-components/Proxy/FunctionDesign.js +17 -0
- package/es/lowcode/view/lc-components/Proxy/FunctionLive.js +23 -0
- package/es/lowcode/view/lc-components/Proxy/FunctionPreview.js +23 -0
- package/es/lowcode/view/lc-components/Proxy/index.js +42 -0
- package/es/lowcode/view/lc-components/Proxy/index.less +5 -0
- package/es/lowcode/view/lc-components/Proxy/meta.json +66 -0
- package/es/lowcode/view/lc-components/Section/index.less +7 -7
- package/es/lowcode/view/lc-components/Section/meta.json +108 -108
- package/es/lowcode/view/lc-components/Split/meta.json +53 -53
- package/es/lowcode/view/lc-components/Table/index.js +156 -149
- package/es/lowcode/view/lc-components/Table/meta.json +443 -443
- package/es/lowcode/view/lc-components/Tabs/index.js +23 -23
- package/es/lowcode/view/lc-components/Tabs/meta.json +113 -113
- package/es/lowcode/view/lc-components/Text/meta.json +56 -56
- package/es/lowcode/view/lc-components/Tree/index.js +99 -96
- package/es/lowcode/view/lc-components/Tree/index.less +4 -4
- package/es/lowcode/view/lc-components/Tree/meta.json +353 -353
- package/es/lowcode/view/lc-components/Wrapper.js +7 -1
- package/es/lowcode/view/style/canvas.less +5 -5
- package/es/lowcode/view/style/loading.less +98 -98
- package/es/lowcode/view/style/page.less +7 -7
- package/es/upload/FilesWall/index.js +13 -13
- package/es/upload/FilesWall/index.less +74 -74
- package/es/upload/Form/index.less +7 -7
- package/es/upload/FormItem/index.js +15 -15
- package/es/utils/action.js +3 -2
- package/es/utils/form.js +21 -21
- package/lib/components/Builder/index.js +13 -10
- package/lib/components/LDActions/index.less +70 -70
- package/lib/components/LdAutoForm/index.js +3 -2
- package/lib/components/LdCom/index.js +3 -2
- package/lib/components/LdFormList/index.js +3 -2
- package/lib/components/LdGrid/index.js +4 -4
- package/lib/components/LdGridForm/index.js +3 -2
- package/lib/components/LdGridForm/index.less +7 -7
- package/lib/components/LdTree/index.less +42 -42
- package/lib/helper/FromItems.js +64 -5
- package/lib/helper/action.js +6 -6
- package/lib/helper/form.js +14 -14
- package/lib/helper/index.less +7 -7
- package/lib/helper/ldBuilder.js +4 -4
- package/lib/helper/ldComBuild.js +14 -9
- package/lib/locales/zh-CN.js +41 -5
- package/lib/lowcode/constants/api-url.js +309 -260
- package/lib/lowcode/constants/event-topics.js +3 -1
- package/lib/lowcode/constants/index.js +6 -5
- package/lib/lowcode/engine/meta/components-list.json +12 -6
- package/lib/lowcode/engine/meta/fielddate.props.default.json +1 -0
- package/lib/lowcode/engine/meta/fielddate.props.json +48 -0
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +35 -30
- package/lib/lowcode/engine/meta/proxy.props.default.json +15 -0
- package/lib/lowcode/engine/meta/proxy.props.json +66 -0
- package/lib/lowcode/engine/provider/ContextProvider/index.js +87 -49
- package/lib/lowcode/engine/provider/ContextProvider/usePageDataStore.js +50 -44
- package/lib/lowcode/engine/provider/ContextProvider/usePageVar.js +10 -4
- package/lib/lowcode/engine/provider/ContextProvider/useTodo.js +1 -3
- package/lib/lowcode/engine/provider/EventBusProvider.js +14 -4
- package/lib/lowcode/engine/provider/PageProxyProvider.js +103 -0
- package/lib/lowcode/engine/provider/RemoteSourceProvider.js +10 -12
- package/lib/lowcode/engine/tools/dataProcess.js +76 -76
- package/lib/lowcode/engine/tools/helper.js +25 -0
- package/lib/lowcode/engine/tools/initDS.js +4 -4
- package/lib/lowcode/painter/Components.js +2 -2
- package/lib/lowcode/painter/Design.js +1 -0
- package/lib/lowcode/painter/DesignOperator.js +126 -24
- package/lib/lowcode/painter/DesignToolbar.js +84 -169
- package/lib/lowcode/painter/components/AdvancePanel.js +27 -9
- package/lib/lowcode/painter/components/Collapse.js +26 -26
- 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 +28 -28
- 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 +12 -4
- package/lib/lowcode/painter/components/TreeEditor.js +10 -10
- 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 +23 -23
- package/lib/lowcode/painter/components/code-editor/JSEditor.js +20 -20
- package/lib/lowcode/painter/components/code-editor/JsonEditor.js +25 -25
- package/lib/lowcode/painter/components/field-setting/SettingUI.js +55 -3
- package/lib/lowcode/painter/components/field-setting/index.js +24 -1
- package/lib/lowcode/painter/components/shortcut-modal/KeyIcon.js +18 -0
- package/lib/lowcode/painter/components/shortcut-modal/index.js +215 -0
- package/lib/lowcode/painter/panel-section/BlockEditor/index.js +9 -18
- package/lib/lowcode/painter/panel-section/BlocksEditor/index.js +4 -1
- package/lib/lowcode/painter/panel-section/ConditionCheck.js +0 -1
- package/lib/lowcode/painter/panel-section/DataSetSelector.js +6 -3
- package/lib/lowcode/painter/panel-section/FieldsSetting.js +1 -1
- package/lib/lowcode/painter/panel-section/Icon.js +23 -23
- package/lib/lowcode/painter/panel-section/IconConditionSelector.js +2 -1
- package/lib/lowcode/painter/panel-section/IconSelector.js +16 -16
- package/lib/lowcode/painter/panel-section/JSEditor/ToolBar.js +7 -4
- package/lib/lowcode/painter/panel-section/JSEditor/index.js +14 -4
- package/lib/lowcode/painter/panel-section/JSEditor/index.less +4 -0
- package/lib/lowcode/painter/panel-section/LayoutRatio.js +21 -21
- package/lib/lowcode/painter/panel-section/ProxyLinker.js +145 -0
- package/lib/lowcode/painter/panel-section/ProxyParams.js +35 -0
- package/lib/lowcode/painter/panel-section/ProxyParamsSetter.js +248 -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 +2 -2
- 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/style/action-bind-modal.less +104 -104
- 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 +178 -178
- package/lib/lowcode/painter/style/display.less +17 -17
- package/lib/lowcode/painter/style/dragdrop.less +56 -56
- 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/history.less +46 -46
- 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 +97 -97
- package/lib/lowcode/painter/style/number-input.less +19 -19
- package/lib/lowcode/painter/style/outline.less +30 -30
- package/lib/lowcode/painter/style/page-layout-display.less +27 -27
- package/lib/lowcode/painter/style/page-vars.less +25 -25
- package/lib/lowcode/painter/style/panel-attrs.less +47 -47
- package/lib/lowcode/painter/style/panel-item.less +55 -54
- package/lib/lowcode/painter/style/panel.less +100 -100
- 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 +7 -7
- 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/svg/code.svg +3 -3
- package/lib/lowcode/painter/svg/expect.svg +9 -9
- package/lib/lowcode/preview/DebugTool.js +86 -0
- package/lib/lowcode/preview/DebugToolDetail.js +111 -0
- package/lib/lowcode/preview/index.js +10 -18
- package/lib/lowcode/preview/useDebugSettings.js +69 -0
- package/lib/lowcode/view/Canvas.js +5 -1
- package/lib/lowcode/view/Page.js +8 -3
- package/lib/lowcode/view/lc-components/Box/index.js +4 -4
- 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 +33 -33
- 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/index.js +126 -123
- package/lib/lowcode/view/lc-components/CardList/meta.json +332 -332
- package/lib/lowcode/view/lc-components/Dialog/index.js +14 -13
- package/lib/lowcode/view/lc-components/Dialog/index.less +12 -12
- package/lib/lowcode/view/lc-components/Dialog/meta.json +224 -224
- package/lib/lowcode/view/lc-components/Drawer/index.js +15 -13
- package/lib/lowcode/view/lc-components/Drawer/index.less +13 -13
- package/lib/lowcode/view/lc-components/Drawer/meta.json +242 -242
- package/lib/lowcode/view/lc-components/FieldColor/meta.json +157 -157
- package/lib/lowcode/view/lc-components/FieldComplex/meta.json +140 -140
- package/lib/lowcode/view/lc-components/FieldDate/meta.json +188 -140
- package/lib/lowcode/view/lc-components/FieldDict/meta.json +138 -138
- package/lib/lowcode/view/lc-components/FieldEditor/meta.json +137 -137
- package/lib/lowcode/view/lc-components/FieldGroup/meta.json +166 -166
- package/lib/lowcode/view/lc-components/FieldNumber/meta.json +143 -143
- 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 +128 -128
- package/lib/lowcode/view/lc-components/Form/index.js +23 -20
- package/lib/lowcode/view/lc-components/Form/meta.json +629 -629
- package/lib/lowcode/view/lc-components/GroupTree/index.js +23 -23
- package/lib/lowcode/view/lc-components/GroupTree/index.less +11 -11
- package/lib/lowcode/view/lc-components/GroupTree/meta.json +82 -82
- package/lib/lowcode/view/lc-components/Iframe/meta.json +31 -31
- package/lib/lowcode/view/lc-components/ImEx/index.js +25 -25
- package/lib/lowcode/view/lc-components/ImEx/index.less +7 -7
- package/lib/lowcode/view/lc-components/ImEx/meta.json +134 -134
- package/lib/lowcode/view/lc-components/Image/index.less +27 -27
- package/lib/lowcode/view/lc-components/Image/meta.json +149 -149
- package/lib/lowcode/view/lc-components/JSX/RuntimeComp.js +4 -4
- package/lib/lowcode/view/lc-components/JSX/meta.json +29 -29
- package/lib/lowcode/view/lc-components/Layout/index.js +16 -16
- 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/index.less +15 -15
- package/lib/lowcode/view/lc-components/Link/meta.json +112 -112
- package/lib/lowcode/view/lc-components/Page/meta.json +61 -61
- 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/meta.json +59 -59
- package/lib/lowcode/view/lc-components/Proxy/FunctionDesign.js +24 -0
- package/lib/lowcode/view/lc-components/Proxy/FunctionLive.js +30 -0
- package/lib/lowcode/view/lc-components/Proxy/FunctionPreview.js +30 -0
- package/lib/lowcode/view/lc-components/Proxy/index.js +50 -0
- package/lib/lowcode/view/lc-components/Proxy/index.less +5 -0
- package/lib/lowcode/view/lc-components/Proxy/meta.json +66 -0
- package/lib/lowcode/view/lc-components/Section/index.less +7 -7
- package/lib/lowcode/view/lc-components/Section/meta.json +108 -108
- package/lib/lowcode/view/lc-components/Split/meta.json +53 -53
- package/lib/lowcode/view/lc-components/Table/index.js +156 -149
- package/lib/lowcode/view/lc-components/Table/meta.json +443 -443
- package/lib/lowcode/view/lc-components/Tabs/index.js +23 -23
- package/lib/lowcode/view/lc-components/Tabs/meta.json +113 -113
- package/lib/lowcode/view/lc-components/Text/meta.json +56 -56
- package/lib/lowcode/view/lc-components/Tree/index.js +99 -96
- package/lib/lowcode/view/lc-components/Tree/index.less +4 -4
- package/lib/lowcode/view/lc-components/Tree/meta.json +353 -353
- package/lib/lowcode/view/lc-components/Wrapper.js +6 -0
- package/lib/lowcode/view/style/canvas.less +5 -5
- package/lib/lowcode/view/style/loading.less +98 -98
- package/lib/lowcode/view/style/page.less +7 -7
- package/lib/upload/FilesWall/index.js +13 -13
- package/lib/upload/FilesWall/index.less +74 -74
- package/lib/upload/Form/index.less +7 -7
- package/lib/upload/FormItem/index.js +15 -15
- package/lib/utils/action.js +6 -0
- package/lib/utils/form.js +21 -21
- package/lowcode.js +1 -1
- package/package.json +175 -175
- package/upload.js +1 -1
- package/utils.js +1 -1
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["title", "type"];
|
|
3
|
+
var _excluded = ["title", "type", "loading", "component"];
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { Icon, Tooltip } from 'luck-design/antd';
|
|
6
6
|
var TipIcon = function TipIcon(_ref) {
|
|
7
7
|
var title = _ref.title,
|
|
8
8
|
type = _ref.type,
|
|
9
|
+
loading = _ref.loading,
|
|
10
|
+
component = _ref.component,
|
|
9
11
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
10
12
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
11
|
-
title: title
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
title: title,
|
|
14
|
+
getPopupContainer: function getPopupContainer() {
|
|
15
|
+
return document.getElementById('lc-design-workspace');
|
|
16
|
+
}
|
|
17
|
+
}, loading ? /*#__PURE__*/React.createElement(Icon, _extends({
|
|
18
|
+
type: "loading"
|
|
19
|
+
}, rest)) : /*#__PURE__*/React.createElement(Icon, _extends({
|
|
20
|
+
type: type,
|
|
21
|
+
component: component
|
|
14
22
|
}, rest)));
|
|
15
23
|
};
|
|
16
24
|
export default TipIcon;
|
|
@@ -4,11 +4,11 @@ import TreeDragDropWrapper from "./DragDrop/TreeDragDropWrapper";
|
|
|
4
4
|
import { Input } from 'luck-design/antd';
|
|
5
5
|
import { modifyNode } from "../../engine/provider/ContextProvider";
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
* 树节点组件
|
|
9
|
-
* @param {Object} props - 组件属性
|
|
10
|
-
* @param {Object} props.item - 代表树节点的对象
|
|
11
|
-
* @returns {React.Component} 返回包裹在拖拽功能中的节点编辑组件
|
|
7
|
+
/**
|
|
8
|
+
* 树节点组件
|
|
9
|
+
* @param {Object} props - 组件属性
|
|
10
|
+
* @param {Object} props.item - 代表树节点的对象
|
|
11
|
+
* @returns {React.Component} 返回包裹在拖拽功能中的节点编辑组件
|
|
12
12
|
*/
|
|
13
13
|
export default function (_ref) {
|
|
14
14
|
var item = _ref.item;
|
|
@@ -19,11 +19,11 @@ export default function (_ref) {
|
|
|
19
19
|
}));
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
/**
|
|
23
|
-
* 编辑节点组件,提供查看和编辑树节点名称的功能
|
|
24
|
-
* @param {Object} props - 组件属性
|
|
25
|
-
* @param {Object} props.item - 代表树节点的对象
|
|
26
|
-
* @returns {React.Component} 根据编辑状态渲染输入框或仅文本
|
|
22
|
+
/**
|
|
23
|
+
* 编辑节点组件,提供查看和编辑树节点名称的功能
|
|
24
|
+
* @param {Object} props - 组件属性
|
|
25
|
+
* @param {Object} props.item - 代表树节点的对象
|
|
26
|
+
* @returns {React.Component} 根据编辑状态渲染输入框或仅文本
|
|
27
27
|
*/
|
|
28
28
|
var EditorNode = function EditorNode(_ref2) {
|
|
29
29
|
var item = _ref2.item;
|
|
@@ -6,38 +6,38 @@ var _excluded = ["onChange", "isFullscreen", "style", "onLoad"],
|
|
|
6
6
|
import React, { useEffect, useRef, useImperativeHandle, forwardRef } from 'react';
|
|
7
7
|
import * as monaco from 'monaco-editor';
|
|
8
8
|
|
|
9
|
-
/**
|
|
10
|
-
* BaseEditor 组件是一个封装了 monaco 编辑器的 React 组件,支持前向 ref 引用。
|
|
11
|
-
* 该组件允许用户编辑代码,并在代码发生变更时触发回调函数。
|
|
12
|
-
* 它还支持通过 props 控制编辑器的语言、选项以及是否全屏显示。
|
|
13
|
-
*
|
|
14
|
-
* @component
|
|
15
|
-
* @example
|
|
16
|
-
* const handleEditorChange = (newValue, event) => {
|
|
17
|
-
* console.log('Editor content changed: ', newValue);
|
|
18
|
-
* };
|
|
19
|
-
* <BaseEditor
|
|
20
|
-
* language="javascript"
|
|
21
|
-
* onChange={handleEditorChange}
|
|
22
|
-
* isFullscreen={false}
|
|
23
|
-
* width="600px"
|
|
24
|
-
* height="400px"
|
|
25
|
-
* >
|
|
26
|
-
* {`function sayHello() {\n console.log('Hello, World!');\n}`}
|
|
27
|
-
* </BaseEditor>
|
|
28
|
-
*
|
|
29
|
-
* @param {Object} props - 组件的属性。
|
|
30
|
-
* @param {Function} props.onChange - 当编辑器内容变更时调用的函数。接收最新的编辑器内容和事件对象作为参数。
|
|
31
|
-
* @param {boolean} props.isFullscreen - 控制编辑器是否全屏显示。
|
|
32
|
-
* @param {string} [props.language='javascript'] - 设置编辑器的编程语言,默认为 'javascript'。
|
|
33
|
-
* @param {Object} [props.options={}] - 用于自定义编辑器的选项。
|
|
34
|
-
* @param {React.ReactNode} children - 子组件,通常是编辑器的初始代码。
|
|
35
|
-
* @param {string} [props.width] - 编辑器的宽度,默认为 '100%'。
|
|
36
|
-
* @param {string} [props.height] - 编辑器的高度,默认为 '100%'。
|
|
37
|
-
* @param {Object} rest - 传递给 div 容器的其它属性。
|
|
38
|
-
* @param {React.Ref} ref - React ref 引用,用于外部组件调用编辑器实例的方法。
|
|
39
|
-
*
|
|
40
|
-
* @returns {ReactElement} 返回一个 React 元素,其中包含了一个配置好的 monaco 编辑器实例。
|
|
9
|
+
/**
|
|
10
|
+
* BaseEditor 组件是一个封装了 monaco 编辑器的 React 组件,支持前向 ref 引用。
|
|
11
|
+
* 该组件允许用户编辑代码,并在代码发生变更时触发回调函数。
|
|
12
|
+
* 它还支持通过 props 控制编辑器的语言、选项以及是否全屏显示。
|
|
13
|
+
*
|
|
14
|
+
* @component
|
|
15
|
+
* @example
|
|
16
|
+
* const handleEditorChange = (newValue, event) => {
|
|
17
|
+
* console.log('Editor content changed: ', newValue);
|
|
18
|
+
* };
|
|
19
|
+
* <BaseEditor
|
|
20
|
+
* language="javascript"
|
|
21
|
+
* onChange={handleEditorChange}
|
|
22
|
+
* isFullscreen={false}
|
|
23
|
+
* width="600px"
|
|
24
|
+
* height="400px"
|
|
25
|
+
* >
|
|
26
|
+
* {`function sayHello() {\n console.log('Hello, World!');\n}`}
|
|
27
|
+
* </BaseEditor>
|
|
28
|
+
*
|
|
29
|
+
* @param {Object} props - 组件的属性。
|
|
30
|
+
* @param {Function} props.onChange - 当编辑器内容变更时调用的函数。接收最新的编辑器内容和事件对象作为参数。
|
|
31
|
+
* @param {boolean} props.isFullscreen - 控制编辑器是否全屏显示。
|
|
32
|
+
* @param {string} [props.language='javascript'] - 设置编辑器的编程语言,默认为 'javascript'。
|
|
33
|
+
* @param {Object} [props.options={}] - 用于自定义编辑器的选项。
|
|
34
|
+
* @param {React.ReactNode} children - 子组件,通常是编辑器的初始代码。
|
|
35
|
+
* @param {string} [props.width] - 编辑器的宽度,默认为 '100%'。
|
|
36
|
+
* @param {string} [props.height] - 编辑器的高度,默认为 '100%'。
|
|
37
|
+
* @param {Object} rest - 传递给 div 容器的其它属性。
|
|
38
|
+
* @param {React.Ref} ref - React ref 引用,用于外部组件调用编辑器实例的方法。
|
|
39
|
+
*
|
|
40
|
+
* @returns {ReactElement} 返回一个 React 元素,其中包含了一个配置好的 monaco 编辑器实例。
|
|
41
41
|
*/
|
|
42
42
|
var BaseEditor = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
43
43
|
var onChange = _ref.onChange,
|
|
@@ -4,31 +4,31 @@ var _excluded = ["children"];
|
|
|
4
4
|
import React, { forwardRef } from 'react';
|
|
5
5
|
import BaseEditor from "./BaseEditor";
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
* CssEditor 组件是一个专门用于编辑 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
|
-
* <CssEditor
|
|
18
|
-
* onChange={handleCssChange}
|
|
19
|
-
* isFullscreen={false}
|
|
20
|
-
* width="600px"
|
|
21
|
-
* height="400px"
|
|
22
|
-
* >
|
|
23
|
-
* {`body { margin: 0; font-family: Arial, sans-serif; }`}
|
|
24
|
-
* </CssEditor>
|
|
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
|
+
* CssEditor 组件是一个专门用于编辑 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
|
+
* <CssEditor
|
|
18
|
+
* onChange={handleCssChange}
|
|
19
|
+
* isFullscreen={false}
|
|
20
|
+
* width="600px"
|
|
21
|
+
* height="400px"
|
|
22
|
+
* >
|
|
23
|
+
* {`body { margin: 0; font-family: Arial, sans-serif; }`}
|
|
24
|
+
* </CssEditor>
|
|
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 CssEditor = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
34
34
|
var children = _ref.children,
|
|
@@ -8,29 +8,29 @@ import { formatMessage } from '@luck-design-biz/base/utils';
|
|
|
8
8
|
import styles from "../../style/fullscreen-editor.less";
|
|
9
9
|
import { useFullscreen } from 'ahooks';
|
|
10
10
|
|
|
11
|
-
/**
|
|
12
|
-
* FullScreenEditor 组件是一个支持全屏编辑模式的 React 组件,它利用提供的 EditorComponent 来实现代码编辑功能。
|
|
13
|
-
* 该组件使用 ahooks 的 useFullscreen 钩子来实现全屏切换,并在全屏模式下调整编辑器布局。
|
|
14
|
-
* 全屏/非全屏模式下编辑器的某些选项可能会有所不同,以适应不同的布局需求。
|
|
15
|
-
*
|
|
16
|
-
* @component
|
|
17
|
-
* @example
|
|
18
|
-
* const MyEditor = React.forwardRef((props, ref) => <BaseEditor {...props} ref={ref} />);
|
|
19
|
-
* <FullScreenEditor
|
|
20
|
-
* EditorComponent={MyEditor}
|
|
21
|
-
* onLoad={() => console.log('Editor loaded')}
|
|
22
|
-
* >
|
|
23
|
-
* {`function sayHello() {\n console.log('Hello, World!');\n}`}
|
|
24
|
-
* </FullScreenEditor>
|
|
25
|
-
*
|
|
26
|
-
* @param {Object} props - 组件的属性。
|
|
27
|
-
* @param {Function} props.EditorComponent - 用于编辑的组件,该组件需要支持 ref 引用以调用编辑器的方法。
|
|
28
|
-
* @param {Function} [props.onLoad] - 编辑器加载完成时的回调函数。
|
|
29
|
-
* @param {React.ReactNode} children - 传递给 EditorComponent 的 children,通常是初始代码或内容。
|
|
30
|
-
* @param {Object} rest - 传递给 EditorComponent 的其他属性。
|
|
31
|
-
* @param {React.Ref} ref - React ref 引用,用于在外部组件中访问 EditorComponent 实例的方法。
|
|
32
|
-
*
|
|
33
|
-
* @returns {ReactElement} 返回一个 React 元素,其中包含了一个具有全屏切换功能的编辑器界面。
|
|
11
|
+
/**
|
|
12
|
+
* FullScreenEditor 组件是一个支持全屏编辑模式的 React 组件,它利用提供的 EditorComponent 来实现代码编辑功能。
|
|
13
|
+
* 该组件使用 ahooks 的 useFullscreen 钩子来实现全屏切换,并在全屏模式下调整编辑器布局。
|
|
14
|
+
* 全屏/非全屏模式下编辑器的某些选项可能会有所不同,以适应不同的布局需求。
|
|
15
|
+
*
|
|
16
|
+
* @component
|
|
17
|
+
* @example
|
|
18
|
+
* const MyEditor = React.forwardRef((props, ref) => <BaseEditor {...props} ref={ref} />);
|
|
19
|
+
* <FullScreenEditor
|
|
20
|
+
* EditorComponent={MyEditor}
|
|
21
|
+
* onLoad={() => console.log('Editor loaded')}
|
|
22
|
+
* >
|
|
23
|
+
* {`function sayHello() {\n console.log('Hello, World!');\n}`}
|
|
24
|
+
* </FullScreenEditor>
|
|
25
|
+
*
|
|
26
|
+
* @param {Object} props - 组件的属性。
|
|
27
|
+
* @param {Function} props.EditorComponent - 用于编辑的组件,该组件需要支持 ref 引用以调用编辑器的方法。
|
|
28
|
+
* @param {Function} [props.onLoad] - 编辑器加载完成时的回调函数。
|
|
29
|
+
* @param {React.ReactNode} children - 传递给 EditorComponent 的 children,通常是初始代码或内容。
|
|
30
|
+
* @param {Object} rest - 传递给 EditorComponent 的其他属性。
|
|
31
|
+
* @param {React.Ref} ref - React ref 引用,用于在外部组件中访问 EditorComponent 实例的方法。
|
|
32
|
+
*
|
|
33
|
+
* @returns {ReactElement} 返回一个 React 元素,其中包含了一个具有全屏切换功能的编辑器界面。
|
|
34
34
|
*/
|
|
35
35
|
var FullScreenEditor = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
36
36
|
var EditorComponent = _ref.EditorComponent,
|
|
@@ -105,26 +105,26 @@ var prettierFormetter = function prettierFormetter(unformattedCode) {
|
|
|
105
105
|
}
|
|
106
106
|
};
|
|
107
107
|
|
|
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 编辑器实例。
|
|
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 编辑器实例。
|
|
128
128
|
*/
|
|
129
129
|
var JSEditor = /*#__PURE__*/forwardRef(function (_ref2, outRef) {
|
|
130
130
|
var children = _ref2.children,
|
|
@@ -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,
|
|
@@ -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, Checkbox, Tooltip, Icon, Radio, Modal } from 'luck-design/antd';
|
|
8
|
+
import { Spin, Input, Segmented, Switch, Checkbox, Tooltip, Icon, Radio, Modal, Select } 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';
|
|
@@ -20,6 +20,37 @@ import { fetchFieldCondition, fetchAttrs } from "../../../constants/api-url";
|
|
|
20
20
|
import { getFrontRules } from "./meta/frontRules";
|
|
21
21
|
import { FIELD_SCOPES } from "../../../constants";
|
|
22
22
|
var _I18N_PREFIX_ = 'luckda.lowcode.painter.panel-section.fieldsSetting';
|
|
23
|
+
var _DATA_FORMAT_OPTIONS = [{
|
|
24
|
+
value: 'YYYY-MM-DD HH:mm:ss',
|
|
25
|
+
label: '年-月-日 时:分:秒'
|
|
26
|
+
}, {
|
|
27
|
+
value: 'YYYY-MM-DD HH:mm',
|
|
28
|
+
label: '年-月-日 时:分'
|
|
29
|
+
}, {
|
|
30
|
+
value: 'YYYY-MM-DD HH',
|
|
31
|
+
label: '年-月-日 时'
|
|
32
|
+
}, {
|
|
33
|
+
value: 'YYYY-MM-DD',
|
|
34
|
+
label: '年-月-日'
|
|
35
|
+
}, {
|
|
36
|
+
value: 'YYYY-MM',
|
|
37
|
+
label: '年-月'
|
|
38
|
+
}, {
|
|
39
|
+
value: 'YYYY',
|
|
40
|
+
label: '年'
|
|
41
|
+
}, {
|
|
42
|
+
value: 'HH:mm:ss',
|
|
43
|
+
label: '时:分:秒'
|
|
44
|
+
}, {
|
|
45
|
+
value: 'HH:mm',
|
|
46
|
+
label: '时:分'
|
|
47
|
+
}, {
|
|
48
|
+
value: 'mm:ss',
|
|
49
|
+
label: '分:秒'
|
|
50
|
+
}, {
|
|
51
|
+
value: 'YYYY-wo',
|
|
52
|
+
label: '年-周'
|
|
53
|
+
}];
|
|
23
54
|
var _ALIGN_OPTIONS_ = [{
|
|
24
55
|
label: formatMessage({
|
|
25
56
|
id: "".concat(_I18N_PREFIX_, ".align.left"),
|
|
@@ -399,7 +430,25 @@ var SettingUI = function SettingUI(_ref) {
|
|
|
399
430
|
id: "".concat(_I18N_PREFIX_, ".readonly"),
|
|
400
431
|
label: '是否只读'
|
|
401
432
|
})
|
|
402
|
-
}, renderCodeIcon(fieldReadonly, FIELD_SCOPES.FIELD_READONLY)), !isBatch ? /*#__PURE__*/React.createElement(React.Fragment, null, ['table', 'tableForm'].includes(component) ? /*#__PURE__*/React.createElement(
|
|
433
|
+
}, renderCodeIcon(fieldReadonly, FIELD_SCOPES.FIELD_READONLY)), !isBatch ? /*#__PURE__*/React.createElement(React.Fragment, null, ['table', 'tableForm'].includes(component) ? /*#__PURE__*/React.createElement(React.Fragment, null, fieldData.property === 'date' && /*#__PURE__*/React.createElement(PanelItem, {
|
|
434
|
+
label: formatMessage({
|
|
435
|
+
id: "".concat(_I18N_PREFIX_, ".dateFormat"),
|
|
436
|
+
label: '日期格式'
|
|
437
|
+
})
|
|
438
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
|
439
|
+
size: "small",
|
|
440
|
+
onChange: function onChange(val) {
|
|
441
|
+
return run('dateFormat', val);
|
|
442
|
+
},
|
|
443
|
+
defaultValue: fieldData.dateFormat || 'YYYY-MM-DD HH:mm:ss'
|
|
444
|
+
}, _DATA_FORMAT_OPTIONS.map(function (opt) {
|
|
445
|
+
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
446
|
+
key: opt.value,
|
|
447
|
+
value: opt.value
|
|
448
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
449
|
+
title: opt.label
|
|
450
|
+
}, opt.label));
|
|
451
|
+
}))), /*#__PURE__*/React.createElement(Collapse, {
|
|
403
452
|
label: formatMessage({
|
|
404
453
|
id: "".concat(_I18N_PREFIX_, ".render"),
|
|
405
454
|
label: '内容定制渲染'
|
|
@@ -409,8 +458,11 @@ var SettingUI = function SettingUI(_ref) {
|
|
|
409
458
|
onChange: function onChange(val) {
|
|
410
459
|
return run('render', val);
|
|
411
460
|
},
|
|
412
|
-
defaultCode: _DEFAULT_RENDER_CODE
|
|
413
|
-
|
|
461
|
+
defaultCode: _DEFAULT_RENDER_CODE,
|
|
462
|
+
onClear: function onClear() {
|
|
463
|
+
return run('render');
|
|
464
|
+
}
|
|
465
|
+
}))) : null, /*#__PURE__*/React.createElement(Collapse, {
|
|
414
466
|
label: formatMessage({
|
|
415
467
|
id: "".concat(_I18N_PREFIX_, ".defaultValue"),
|
|
416
468
|
label: '默认值'
|
|
@@ -5,9 +5,11 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { useRequest, useSetState, useDebounceFn, useMemoizedFn } from 'ahooks';
|
|
7
7
|
import { dropWhile, startsWith } from 'lodash';
|
|
8
|
+
import moment from 'moment';
|
|
8
9
|
import { useContext } from "../../../engine/provider/ContextProvider";
|
|
9
10
|
import SettingUI from "./SettingUI";
|
|
10
11
|
import { fetchUpdateUniqueField, fetchAttrs, fetchAddFieldAttrs, fetchUpdateFieldAttrs, fetchDelAttrs } from "../../../constants/api-url";
|
|
12
|
+
import RuntimeComp from "../../../view/lc-components/JSX/RuntimeComp";
|
|
11
13
|
import { FIELD_SCOPES } from "../../../constants";
|
|
12
14
|
var _TRUE_FALSE_ = ['__TRUE__', '__FALSE__'];
|
|
13
15
|
var FieldSetting = function FieldSetting(_ref) {
|
|
@@ -192,6 +194,27 @@ var FieldSetting = function FieldSetting(_ref) {
|
|
|
192
194
|
columns: [fieldData.field],
|
|
193
195
|
force: true
|
|
194
196
|
});
|
|
197
|
+
} else if ('dateFormat' === key && !fieldData.render) {
|
|
198
|
+
col.colDef.cellRendererFramework = function (params) {
|
|
199
|
+
return params.value ? moment(params.value).format(val) : '';
|
|
200
|
+
};
|
|
201
|
+
gridApi.api.refreshCells({
|
|
202
|
+
columns: [fieldData.field],
|
|
203
|
+
force: true
|
|
204
|
+
});
|
|
205
|
+
} else if ('render' === key) {
|
|
206
|
+
col.colDef.cellRendererFramework = function (params) {
|
|
207
|
+
return /*#__PURE__*/React.createElement(RuntimeComp, {
|
|
208
|
+
value: params.value,
|
|
209
|
+
data: params.data,
|
|
210
|
+
rowIndex: params.rowIndex,
|
|
211
|
+
params: params
|
|
212
|
+
}, val.replace(/(function\s*\w*\s*)\([^)]*\)(\s*{)/, '$1()$2'));
|
|
213
|
+
};
|
|
214
|
+
gridApi.api.refreshCells({
|
|
215
|
+
columns: [fieldData.field],
|
|
216
|
+
force: true
|
|
217
|
+
});
|
|
195
218
|
}
|
|
196
219
|
}
|
|
197
220
|
onChange(newFields);
|
|
@@ -227,7 +250,7 @@ var FieldSetting = function FieldSetting(_ref) {
|
|
|
227
250
|
_context.next = 38;
|
|
228
251
|
break;
|
|
229
252
|
case 5:
|
|
230
|
-
if (!(key === 'align' || key === 'headerAlign' || key === 'pinned' || key === 'tip' || key === 'render')) {
|
|
253
|
+
if (!(key === 'align' || key === 'headerAlign' || key === 'pinned' || key === 'tip' || key === 'render' || key === 'dateFormat')) {
|
|
231
254
|
_context.next = 9;
|
|
232
255
|
break;
|
|
233
256
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
var Wrapper = styled.div.withConfig({
|
|
4
|
+
displayName: "Wrapper",
|
|
5
|
+
componentId: "luckda-6530__sc-o36flt-0"
|
|
6
|
+
})(["min-width:12px;height:22px;line-height:22px;text-align:center;border:1px solid var(--ant-border-color-base,#d9d9d9);border-radius:3px;padding:0 7px;color:var(--ant-text-color,rgba(0,0,0,0.65));margin:0 2px;"]);
|
|
7
|
+
var KeyIcon = function KeyIcon(_ref) {
|
|
8
|
+
var children = _ref.children;
|
|
9
|
+
return /*#__PURE__*/React.createElement(Wrapper, null, children);
|
|
10
|
+
};
|
|
11
|
+
export default KeyIcon;
|