@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
|
@@ -0,0 +1,250 @@
|
|
|
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 _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
12
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
14
|
+
var _ahooks = require("ahooks");
|
|
15
|
+
var _lodash = require("lodash");
|
|
16
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
17
|
+
var _antd = require("luck-design/antd");
|
|
18
|
+
var _utils = require("@luck-design-biz/base/utils");
|
|
19
|
+
var _ListEditor = require("../components/ListEditor");
|
|
20
|
+
var _Collapse = _interopRequireDefault(require("../components/Collapse"));
|
|
21
|
+
var _SortBox = require("../components/SortBox");
|
|
22
|
+
var _PanelItem = _interopRequireDefault(require("../components/PanelItem"));
|
|
23
|
+
var _complexPop = require("../services/complexPop");
|
|
24
|
+
var _excluded = ["field", "fieldName", "renderItemRight", "onChange", "sortable", "editable"];
|
|
25
|
+
var _I18N_PREFIX_ = 'luckda.lowcode.painter.panel-section.complexPop';
|
|
26
|
+
var DividerSpan = _styledComponents.default.span.withConfig({
|
|
27
|
+
displayName: "DividerSpan",
|
|
28
|
+
componentId: "luckda-6530__sc-lmsle1-0"
|
|
29
|
+
})(["font-size:12px;color:var(--luck-text-color);"]);
|
|
30
|
+
var FieldKey = _styledComponents.default.div.withConfig({
|
|
31
|
+
displayName: "FieldKey",
|
|
32
|
+
componentId: "luckda-6530__sc-lmsle1-1"
|
|
33
|
+
})(["width:200px;margin-left:4px;display:inline-block;white-space:nowrap;word-break:keep-all;text-overflow:ellipsis;overflow:hidden;"]);
|
|
34
|
+
var ListItem = function ListItem(_ref) {
|
|
35
|
+
var field = _ref.field,
|
|
36
|
+
fieldName = _ref.fieldName,
|
|
37
|
+
renderItemRight = _ref.renderItemRight,
|
|
38
|
+
_onChange = _ref.onChange,
|
|
39
|
+
sortable = _ref.sortable,
|
|
40
|
+
editable = _ref.editable,
|
|
41
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
42
|
+
return /*#__PURE__*/_react.default.createElement(_ListEditor.ListEditorItem, (0, _extends2.default)({
|
|
43
|
+
key: field,
|
|
44
|
+
left: /*#__PURE__*/_react.default.createElement(_antd.Tooltip, {
|
|
45
|
+
title: field
|
|
46
|
+
}, editable ? /*#__PURE__*/_react.default.createElement(_antd.Input, {
|
|
47
|
+
value: fieldName,
|
|
48
|
+
size: "small",
|
|
49
|
+
style: {
|
|
50
|
+
width: '200px'
|
|
51
|
+
},
|
|
52
|
+
onChange: function onChange(e) {
|
|
53
|
+
return _onChange(field, e.target.value);
|
|
54
|
+
}
|
|
55
|
+
}) : /*#__PURE__*/_react.default.createElement(FieldKey, null, " ", fieldName, " ")),
|
|
56
|
+
right: renderItemRight({
|
|
57
|
+
field: field,
|
|
58
|
+
title: fieldName
|
|
59
|
+
}),
|
|
60
|
+
item: field,
|
|
61
|
+
sortable: sortable
|
|
62
|
+
}, props));
|
|
63
|
+
};
|
|
64
|
+
var ComplexPop = function ComplexPop(_ref2) {
|
|
65
|
+
var nodeId = _ref2.nodeId,
|
|
66
|
+
settings = _ref2.settings,
|
|
67
|
+
defaultValue = _ref2.defaultValue,
|
|
68
|
+
onChange = _ref2.onChange;
|
|
69
|
+
var _useState = (0, _react.useState)(defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.show),
|
|
70
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
71
|
+
show = _useState2[0],
|
|
72
|
+
setShow = _useState2[1];
|
|
73
|
+
var _useState3 = (0, _react.useState)((defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.fields) || []),
|
|
74
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
75
|
+
fields = _useState4[0],
|
|
76
|
+
setFields = _useState4[1];
|
|
77
|
+
var _useState5 = (0, _react.useState)(null),
|
|
78
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
79
|
+
allFields = _useState6[0],
|
|
80
|
+
setAllFields = _useState6[1];
|
|
81
|
+
var _useCreation = (0, _ahooks.useCreation)(function () {
|
|
82
|
+
var _nodeId$split = nodeId.split('.'),
|
|
83
|
+
_nodeId$split2 = (0, _slicedToArray2.default)(_nodeId$split, 3),
|
|
84
|
+
_ = _nodeId$split2[0],
|
|
85
|
+
blockid = _nodeId$split2[1],
|
|
86
|
+
fieldid = _nodeId$split2[2];
|
|
87
|
+
var blocksObj = (0, _lodash.keyBy)(settings === null || settings === void 0 ? void 0 : settings.blocks, 'id');
|
|
88
|
+
if (blocksObj[blockid]) {
|
|
89
|
+
var _fieldObj$fieldid;
|
|
90
|
+
var fieldObj = (0, _lodash.keyBy)(blocksObj[blockid].fields, 'field');
|
|
91
|
+
return ((_fieldObj$fieldid = fieldObj[fieldid]) === null || _fieldObj$fieldid === void 0 ? void 0 : _fieldObj$fieldid.complexConfig) || {};
|
|
92
|
+
}
|
|
93
|
+
return {};
|
|
94
|
+
}, [nodeId, settings === null || settings === void 0 ? void 0 : settings.blocks]),
|
|
95
|
+
isTree = _useCreation.isTree,
|
|
96
|
+
datasetKey = _useCreation.datasetKey,
|
|
97
|
+
dataModelKey = _useCreation.dataModelKey;
|
|
98
|
+
(0, _react.useEffect)(function () {
|
|
99
|
+
if (!isTree && show && datasetKey && dataModelKey && !allFields) {
|
|
100
|
+
(0, _complexPop.getFields)({
|
|
101
|
+
datasetCode: datasetKey,
|
|
102
|
+
dataModelKey: dataModelKey
|
|
103
|
+
}).then(function (res) {
|
|
104
|
+
var code = res.code,
|
|
105
|
+
data = res.data;
|
|
106
|
+
if (code === 1) {
|
|
107
|
+
var _data = (0, _lodash.reduce)(data, function (result, item) {
|
|
108
|
+
result[item.field] = item.field_name;
|
|
109
|
+
return result;
|
|
110
|
+
}, {});
|
|
111
|
+
setAllFields(_data);
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
}, [isTree, show, datasetKey, dataModelKey, allFields]);
|
|
116
|
+
(0, _react.useLayoutEffect)(function () {
|
|
117
|
+
onChange({
|
|
118
|
+
show: show,
|
|
119
|
+
fields: fields
|
|
120
|
+
});
|
|
121
|
+
}, [show, fields]);
|
|
122
|
+
var renderItemDeleteRight = (0, _ahooks.useMemoizedFn)(function (data) {
|
|
123
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Icon, {
|
|
124
|
+
type: "delete",
|
|
125
|
+
style: {
|
|
126
|
+
margin: '0 4px',
|
|
127
|
+
cursor: 'pointer',
|
|
128
|
+
color: 'var(--luck-color-danger)'
|
|
129
|
+
},
|
|
130
|
+
onClick: function onClick() {
|
|
131
|
+
var _fields = (0, _lodash.cloneDeep)(fields);
|
|
132
|
+
(0, _lodash.remove)(_fields, function (item) {
|
|
133
|
+
return item.field === data.field;
|
|
134
|
+
});
|
|
135
|
+
setFields(_fields);
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
var renderItemAddRight = (0, _ahooks.useMemoizedFn)(function (data) {
|
|
140
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Icon, {
|
|
141
|
+
type: "plus-circle",
|
|
142
|
+
style: {
|
|
143
|
+
margin: '0 4px',
|
|
144
|
+
cursor: 'pointer',
|
|
145
|
+
color: 'var(--ant-primary-color)'
|
|
146
|
+
},
|
|
147
|
+
onClick: function onClick() {
|
|
148
|
+
return setFields(fields.concat(data));
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
var handleChange = (0, _ahooks.useMemoizedFn)(function (field, value) {
|
|
153
|
+
setFields(fields.map(function (item) {
|
|
154
|
+
return item.field === field ? (0, _objectSpread2.default)((0, _objectSpread2.default)({}, item), {}, {
|
|
155
|
+
title: value
|
|
156
|
+
}) : item;
|
|
157
|
+
}));
|
|
158
|
+
});
|
|
159
|
+
var handleSortFields = (0, _ahooks.useMemoizedFn)(function (sortItems) {
|
|
160
|
+
var oldItems = (0, _lodash.cloneDeep)(fields);
|
|
161
|
+
var newItems = oldItems.sort(function (a, b) {
|
|
162
|
+
var indexA = sortItems.indexOf(a.field);
|
|
163
|
+
var indexB = sortItems.indexOf(b.field);
|
|
164
|
+
return indexA - indexB;
|
|
165
|
+
});
|
|
166
|
+
setFields(newItems);
|
|
167
|
+
});
|
|
168
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_PanelItem.default, {
|
|
169
|
+
field: "showPop",
|
|
170
|
+
label: (0, _utils.formatMessage)({
|
|
171
|
+
id: "".concat(_I18N_PREFIX_, ".assisted"),
|
|
172
|
+
label: "辅助选择"
|
|
173
|
+
})
|
|
174
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Switch, {
|
|
175
|
+
size: "small",
|
|
176
|
+
defaultChecked: defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.show,
|
|
177
|
+
onChange: function onChange(val) {
|
|
178
|
+
setShow(val);
|
|
179
|
+
if (!val) setFields([]);
|
|
180
|
+
}
|
|
181
|
+
})), !isTree && show && /*#__PURE__*/_react.default.createElement(_Collapse.default, {
|
|
182
|
+
label: (0, _utils.formatMessage)({
|
|
183
|
+
id: "".concat(_I18N_PREFIX_, ".assistedGrid"),
|
|
184
|
+
label: '辅助弹窗显示字段'
|
|
185
|
+
})
|
|
186
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
187
|
+
style: {
|
|
188
|
+
height: 'auto',
|
|
189
|
+
padding: '0 16px'
|
|
190
|
+
}
|
|
191
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Spin, {
|
|
192
|
+
spinning: !allFields
|
|
193
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Divider, {
|
|
194
|
+
orientation: "left",
|
|
195
|
+
style: {
|
|
196
|
+
marginTop: 0
|
|
197
|
+
}
|
|
198
|
+
}, /*#__PURE__*/_react.default.createElement(DividerSpan, null, (0, _utils.formatMessage)({
|
|
199
|
+
id: "".concat(_I18N_PREFIX_, ".assistedGridFields"),
|
|
200
|
+
label: '展示区'
|
|
201
|
+
}))), /*#__PURE__*/_react.default.createElement(_SortBox.SortBox, {
|
|
202
|
+
datas: fields.map(function (f) {
|
|
203
|
+
return f.field;
|
|
204
|
+
}),
|
|
205
|
+
onChange: handleSortFields
|
|
206
|
+
}, /*#__PURE__*/_react.default.createElement(_ListEditor.ListEditor, {
|
|
207
|
+
style: {
|
|
208
|
+
marginTop: 8
|
|
209
|
+
},
|
|
210
|
+
suppressAdd: true
|
|
211
|
+
}, fields.map(function (_ref3) {
|
|
212
|
+
var field = _ref3.field,
|
|
213
|
+
title = _ref3.title;
|
|
214
|
+
return /*#__PURE__*/_react.default.createElement(_SortBox.SortItem, {
|
|
215
|
+
key: field,
|
|
216
|
+
id: field
|
|
217
|
+
}, /*#__PURE__*/_react.default.createElement(ListItem, {
|
|
218
|
+
field: field,
|
|
219
|
+
fieldName: title,
|
|
220
|
+
renderItemRight: renderItemDeleteRight,
|
|
221
|
+
sortable: true,
|
|
222
|
+
editable: true,
|
|
223
|
+
onChange: handleChange
|
|
224
|
+
}));
|
|
225
|
+
}))), /*#__PURE__*/_react.default.createElement(_antd.Divider, {
|
|
226
|
+
orientation: "left",
|
|
227
|
+
style: {
|
|
228
|
+
marginTop: 0
|
|
229
|
+
}
|
|
230
|
+
}, /*#__PURE__*/_react.default.createElement(DividerSpan, null, (0, _utils.formatMessage)({
|
|
231
|
+
id: "".concat(_I18N_PREFIX_, ".gridFields"),
|
|
232
|
+
label: '可选区'
|
|
233
|
+
}))), /*#__PURE__*/_react.default.createElement(_ListEditor.ListEditor, {
|
|
234
|
+
style: {
|
|
235
|
+
marginTop: 8
|
|
236
|
+
},
|
|
237
|
+
suppressAdd: true
|
|
238
|
+
}, (0, _lodash.map)((0, _lodash.omit)(allFields, fields.map(function (f) {
|
|
239
|
+
return f.field;
|
|
240
|
+
})), function (fieldName, field) {
|
|
241
|
+
return /*#__PURE__*/_react.default.createElement(ListItem, {
|
|
242
|
+
key: field,
|
|
243
|
+
field: field,
|
|
244
|
+
fieldName: fieldName,
|
|
245
|
+
renderItemRight: renderItemAddRight,
|
|
246
|
+
sortable: false
|
|
247
|
+
});
|
|
248
|
+
}))))));
|
|
249
|
+
};
|
|
250
|
+
var _default = exports.default = ComplexPop;
|
|
@@ -103,6 +103,14 @@ var DataSetSelector = function DataSetSelector(_ref) {
|
|
|
103
103
|
restProps.align = alignMapping[_extra.scell_alignment];
|
|
104
104
|
restProps.headerAlign = alignMapping[_extra.sheading_alignment];
|
|
105
105
|
}
|
|
106
|
+
if (f.property === "complex") {
|
|
107
|
+
var _extra2 = JSON.parse(f.extra || '{}');
|
|
108
|
+
restProps.complexConfig = {
|
|
109
|
+
isTree: _extra2.opt_show_tree,
|
|
110
|
+
datasetKey: _extra2.opt_dataset,
|
|
111
|
+
dataModelKey: _extra2.opt_data_model
|
|
112
|
+
};
|
|
113
|
+
}
|
|
106
114
|
return (0, _objectSpread2.default)({
|
|
107
115
|
uid: f.uid,
|
|
108
116
|
field: f.field
|
|
@@ -24,7 +24,7 @@ var _apiUrl = require("../../constants/api-url");
|
|
|
24
24
|
var _helper = require("../../engine/tools/helper");
|
|
25
25
|
var _fieldsSetting = _interopRequireDefault(require("../style/fields-setting.less"));
|
|
26
26
|
var _I18N_PREFIX_ = 'luckda.lowcode.painter.panel-section.fieldsSetting';
|
|
27
|
-
var _PICK_KEYS_ = ['id', 'uid', 'field', 'width', 'align', 'headerAlign', 'pinned', 'tip', 'col', 'row', 'note', 'placeholder', 'fieldAliasName'];
|
|
27
|
+
var _PICK_KEYS_ = ['id', 'uid', 'field', 'width', 'align', 'headerAlign', 'pinned', 'tip', 'render', 'col', 'row', 'note', 'placeholder', 'fieldAliasName', 'complexConfig', 'formMode'];
|
|
28
28
|
var Header = _styledComponents.default.div.withConfig({
|
|
29
29
|
displayName: "Header",
|
|
30
30
|
componentId: "luckda-6530__sc-gcwvp1-0"
|
|
@@ -108,6 +108,14 @@ var FieldsSetting = function FieldsSetting(_ref) {
|
|
|
108
108
|
restProps.align = alignMapping[extra.scell_alignment];
|
|
109
109
|
restProps.headerAlign = alignMapping[extra.sheading_alignment];
|
|
110
110
|
}
|
|
111
|
+
if (_fieldData.property === "complex") {
|
|
112
|
+
var _extra = JSON.parse(_fieldData.extra || '{}');
|
|
113
|
+
restProps.complexConfig = {
|
|
114
|
+
isTree: _extra.opt_show_tree,
|
|
115
|
+
datasetKey: _extra.opt_dataset,
|
|
116
|
+
dataModelKey: _extra.opt_data_model
|
|
117
|
+
};
|
|
118
|
+
}
|
|
111
119
|
return (0, _objectSpread2.default)({
|
|
112
120
|
uid: id,
|
|
113
121
|
field: detail[id].field
|
|
@@ -197,7 +205,7 @@ var FieldsSetting = function FieldsSetting(_ref) {
|
|
|
197
205
|
data: {
|
|
198
206
|
uid: groupId,
|
|
199
207
|
id: groupId,
|
|
200
|
-
field:
|
|
208
|
+
field: groupId,
|
|
201
209
|
fieldName: 'Group',
|
|
202
210
|
_type: 'divider'
|
|
203
211
|
}
|
|
@@ -221,7 +229,25 @@ var FieldsSetting = function FieldsSetting(_ref) {
|
|
|
221
229
|
onChange: function onChange(e) {
|
|
222
230
|
return handleAliasChange(field, e.target.value);
|
|
223
231
|
}
|
|
224
|
-
}), field._type
|
|
232
|
+
}), field._type === 'divider' ? /*#__PURE__*/_react.default.createElement(_antd.Tooltip, {
|
|
233
|
+
title: (0, _utils.formatMessage)({
|
|
234
|
+
id: 'luckda.lowcode.painter.delete',
|
|
235
|
+
label: '删除'
|
|
236
|
+
})
|
|
237
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Icon, {
|
|
238
|
+
type: "delete",
|
|
239
|
+
style: {
|
|
240
|
+
margin: '0 4px',
|
|
241
|
+
cursor: 'pointer'
|
|
242
|
+
},
|
|
243
|
+
onClick: function onClick() {
|
|
244
|
+
dispatch({
|
|
245
|
+
type: 'delete',
|
|
246
|
+
payload: field.id,
|
|
247
|
+
callback: handleChange
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
})) : /*#__PURE__*/_react.default.createElement(_antd.Tooltip, {
|
|
225
251
|
title: (0, _utils.formatMessage)({
|
|
226
252
|
id: 'luckda.lowcode.painter.edit',
|
|
227
253
|
label: '编辑'
|
|
@@ -298,7 +324,7 @@ var FieldsSetting = function FieldsSetting(_ref) {
|
|
|
298
324
|
tooltip: true,
|
|
299
325
|
lines: 1,
|
|
300
326
|
style: field._type === 'divider' ? {
|
|
301
|
-
|
|
327
|
+
marginLeft: 20
|
|
302
328
|
} : null
|
|
303
329
|
}, field.field)),
|
|
304
330
|
right: renderItemRight(field),
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
|
|
10
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
+
var _ahooks = require("ahooks");
|
|
14
|
+
var _antd = require("luck-design/antd");
|
|
15
|
+
var _services = require("@luck-design-biz/base/sys/services");
|
|
16
|
+
var GroupClassSelector = function GroupClassSelector(_ref) {
|
|
17
|
+
var defaultValue = _ref.defaultValue,
|
|
18
|
+
_onChange = _ref.onChange;
|
|
19
|
+
var _useState = (0, _react.useState)([]),
|
|
20
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
21
|
+
options = _useState2[0],
|
|
22
|
+
setOptions = _useState2[1];
|
|
23
|
+
(0, _ahooks.useAsyncEffect)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
|
|
24
|
+
var _yield$readAllClass, code, list, detail, data;
|
|
25
|
+
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
|
26
|
+
while (1) switch (_context.prev = _context.next) {
|
|
27
|
+
case 0:
|
|
28
|
+
_context.next = 2;
|
|
29
|
+
return (0, _services.readAllClass)();
|
|
30
|
+
case 2:
|
|
31
|
+
_yield$readAllClass = _context.sent;
|
|
32
|
+
code = _yield$readAllClass.code;
|
|
33
|
+
list = _yield$readAllClass.list;
|
|
34
|
+
detail = _yield$readAllClass.detail;
|
|
35
|
+
if (code === 1) {
|
|
36
|
+
data = list.map(function (id) {
|
|
37
|
+
return {
|
|
38
|
+
key: detail[id].skey,
|
|
39
|
+
label: detail[id].sname
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
setOptions(data);
|
|
43
|
+
}
|
|
44
|
+
case 7:
|
|
45
|
+
case "end":
|
|
46
|
+
return _context.stop();
|
|
47
|
+
}
|
|
48
|
+
}, _callee);
|
|
49
|
+
})), []);
|
|
50
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Select, {
|
|
51
|
+
defaultValue: defaultValue,
|
|
52
|
+
onChange: function onChange(val) {
|
|
53
|
+
return _onChange(val);
|
|
54
|
+
},
|
|
55
|
+
size: "small"
|
|
56
|
+
}, options.map(function (item) {
|
|
57
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Select.Option, {
|
|
58
|
+
key: item.key,
|
|
59
|
+
value: item.key
|
|
60
|
+
}, item.label);
|
|
61
|
+
}));
|
|
62
|
+
};
|
|
63
|
+
var _default = exports.default = GroupClassSelector;
|
|
@@ -12,7 +12,8 @@ var I18nInput = function I18nInput(_ref) {
|
|
|
12
12
|
var defaultValue = _ref.defaultValue,
|
|
13
13
|
onChange = _ref.onChange,
|
|
14
14
|
size = _ref.size,
|
|
15
|
-
wrapped = _ref.wrapped
|
|
15
|
+
wrapped = _ref.wrapped,
|
|
16
|
+
disabled = _ref.disabled;
|
|
16
17
|
var _useDebounceFn = (0, _ahooks.useDebounceFn)(onChange, {
|
|
17
18
|
wait: 400
|
|
18
19
|
}),
|
|
@@ -28,7 +29,8 @@ var I18nInput = function I18nInput(_ref) {
|
|
|
28
29
|
autoSize: false,
|
|
29
30
|
style: {
|
|
30
31
|
resize: 'none'
|
|
31
|
-
}
|
|
32
|
+
},
|
|
33
|
+
disabled: disabled
|
|
32
34
|
}) : /*#__PURE__*/_react.default.createElement(_antd.Input, {
|
|
33
35
|
defaultValue: defaultValue,
|
|
34
36
|
onChange: function onChange(e) {
|
|
@@ -10,41 +10,46 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _icon = _interopRequireDefault(require("../style/icon.less"));
|
|
12
12
|
var _IconFont = _interopRequireDefault(require("../../../components/IconFont"));
|
|
13
|
-
/**
|
|
14
|
-
* 一个简单的图标选择器组件,展示了一个图标并允许用户点击选择。
|
|
15
|
-
* 该组件使用了`Icon.createFromIconfontCN`来创建一个可以从Iconfont.cn加载图标的`IconFont`组件。
|
|
16
|
-
* 当图标被点击时,会调用`onSelect`回调函数,并传递一个对象,其中包含了`field`字段。
|
|
17
|
-
*
|
|
18
|
-
* @component
|
|
19
|
-
* @example
|
|
20
|
-
* ```jsx
|
|
21
|
-
* <IconSelector
|
|
22
|
-
* field="iconField"
|
|
23
|
-
* onSelect={({ field }) => console.log(`Selected icon field: ${field}`)}
|
|
24
|
-
* defaultValue="icon-example"
|
|
25
|
-
* />
|
|
26
|
-
* ```
|
|
27
|
-
*
|
|
28
|
-
* @param {Object} props 组件的props
|
|
29
|
-
* @param {string} props.field 用于识别选择的图标字段的标识符。
|
|
30
|
-
* @param {Function} props.onSelect 当图标被点击时触发的回调函数。
|
|
31
|
-
* 接收一个对象参数,该对象包含`field`字段。
|
|
32
|
-
* @param {string} [props.defaultValue='iconyingyongguanli'] 初始化时图标的类型,
|
|
33
|
-
* 默认为'iconyingyongguanli'。
|
|
34
|
-
*
|
|
35
|
-
* @returns {React.Element} 渲染的React元素。
|
|
13
|
+
/**
|
|
14
|
+
* 一个简单的图标选择器组件,展示了一个图标并允许用户点击选择。
|
|
15
|
+
* 该组件使用了`Icon.createFromIconfontCN`来创建一个可以从Iconfont.cn加载图标的`IconFont`组件。
|
|
16
|
+
* 当图标被点击时,会调用`onSelect`回调函数,并传递一个对象,其中包含了`field`字段。
|
|
17
|
+
*
|
|
18
|
+
* @component
|
|
19
|
+
* @example
|
|
20
|
+
* ```jsx
|
|
21
|
+
* <IconSelector
|
|
22
|
+
* field="iconField"
|
|
23
|
+
* onSelect={({ field }) => console.log(`Selected icon field: ${field}`)}
|
|
24
|
+
* defaultValue="icon-example"
|
|
25
|
+
* />
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @param {Object} props 组件的props
|
|
29
|
+
* @param {string} props.field 用于识别选择的图标字段的标识符。
|
|
30
|
+
* @param {Function} props.onSelect 当图标被点击时触发的回调函数。
|
|
31
|
+
* 接收一个对象参数,该对象包含`field`字段。
|
|
32
|
+
* @param {string} [props.defaultValue='iconyingyongguanli'] 初始化时图标的类型,
|
|
33
|
+
* 默认为'iconyingyongguanli'。
|
|
34
|
+
*
|
|
35
|
+
* @returns {React.Element} 渲染的React元素。
|
|
36
36
|
*/
|
|
37
37
|
function _default(_ref) {
|
|
38
38
|
var defaultValue = _ref.defaultValue,
|
|
39
|
-
next = _ref.next
|
|
40
|
-
|
|
39
|
+
next = _ref.next,
|
|
40
|
+
_onClick = _ref.onClick,
|
|
41
|
+
value = _ref.value;
|
|
42
|
+
var _useState = (0, _react.useState)(value || defaultValue),
|
|
41
43
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
42
44
|
val = _useState2[0],
|
|
43
45
|
setVal = _useState2[1];
|
|
46
|
+
(0, _react.useLayoutEffect)(function () {
|
|
47
|
+
setVal(value);
|
|
48
|
+
}, [value]);
|
|
44
49
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
45
50
|
className: _icon.default['lc-painter-panel-section-icon'],
|
|
46
51
|
onClick: function onClick() {
|
|
47
|
-
return next({
|
|
52
|
+
return _onClick ? _onClick.apply(void 0, arguments) : next({
|
|
48
53
|
onSelect: setVal
|
|
49
54
|
});
|
|
50
55
|
}
|
|
@@ -14,7 +14,6 @@ var _ahooks = require("ahooks");
|
|
|
14
14
|
var _antd = require("luck-design/antd");
|
|
15
15
|
var _utils = require("@luck-design-biz/base/utils");
|
|
16
16
|
var _ListEditor = require("../components/ListEditor");
|
|
17
|
-
var _PopConfirm = _interopRequireDefault(require("../components/PopConfirm"));
|
|
18
17
|
var _Icon = _interopRequireDefault(require("./Icon"));
|
|
19
18
|
var _IconSelector = _interopRequireDefault(require("./IconSelector"));
|
|
20
19
|
var _JSEditor = _interopRequireDefault(require("./JSEditor"));
|
|
@@ -32,7 +31,7 @@ var IconConditionSelector = function IconConditionSelector(_ref) {
|
|
|
32
31
|
switch (type) {
|
|
33
32
|
case 'icon':
|
|
34
33
|
_list[index] = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _list[index]), {}, {
|
|
35
|
-
icon:
|
|
34
|
+
icon: value
|
|
36
35
|
});
|
|
37
36
|
break;
|
|
38
37
|
case 'code':
|
|
@@ -101,14 +100,15 @@ var IconConditionSelector = function IconConditionSelector(_ref) {
|
|
|
101
100
|
}, list.map(function (item, index) {
|
|
102
101
|
return /*#__PURE__*/_react.default.createElement(_ListEditor.ListEditorItem, {
|
|
103
102
|
sortable: false,
|
|
104
|
-
left: /*#__PURE__*/_react.default.createElement(
|
|
103
|
+
left: /*#__PURE__*/_react.default.createElement(_antd.Popover, {
|
|
105
104
|
placement: "left",
|
|
106
|
-
|
|
105
|
+
content: /*#__PURE__*/_react.default.createElement(_IconSelector.default, {
|
|
107
106
|
value: item.icon,
|
|
108
107
|
onChange: function onChange(value) {
|
|
109
|
-
return handleChange('icon', index, value
|
|
108
|
+
return handleChange('icon', index, value);
|
|
110
109
|
}
|
|
111
|
-
})
|
|
110
|
+
}),
|
|
111
|
+
trigger: "click"
|
|
112
112
|
}, /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
113
113
|
value: item.icon
|
|
114
114
|
})),
|
|
@@ -17,22 +17,22 @@ var _utils = require("@luck-design-biz/base/utils");
|
|
|
17
17
|
var _apiUrl = require("../../constants/api-url");
|
|
18
18
|
var Search = _antd.Input.Search;
|
|
19
19
|
|
|
20
|
-
/**
|
|
21
|
-
* 一个用于选择图标的组件,提供了图标的搜索和选择功能。
|
|
22
|
-
*
|
|
23
|
-
* 该组件首先从预定义的URL加载图标列表,然后显示这些图标。用户可以通过输入框搜索图标,
|
|
24
|
-
* 点击图标时,会通过 `onChange` 回调将选中的图标信息返回给父组件。
|
|
25
|
-
*
|
|
26
|
-
* @component
|
|
27
|
-
* @example
|
|
28
|
-
* ```jsx
|
|
29
|
-
* <IconSelector
|
|
30
|
-
* onChange={(selectedIcon) => console.log(selectedIcon)}
|
|
31
|
-
* />
|
|
32
|
-
* ```
|
|
33
|
-
*
|
|
34
|
-
* @param {Object} props 组件接受的props
|
|
35
|
-
* @param {Function} props.onChange 当图标被选中时触发的回调函数,接受选中图标的信息作为参数
|
|
20
|
+
/**
|
|
21
|
+
* 一个用于选择图标的组件,提供了图标的搜索和选择功能。
|
|
22
|
+
*
|
|
23
|
+
* 该组件首先从预定义的URL加载图标列表,然后显示这些图标。用户可以通过输入框搜索图标,
|
|
24
|
+
* 点击图标时,会通过 `onChange` 回调将选中的图标信息返回给父组件。
|
|
25
|
+
*
|
|
26
|
+
* @component
|
|
27
|
+
* @example
|
|
28
|
+
* ```jsx
|
|
29
|
+
* <IconSelector
|
|
30
|
+
* onChange={(selectedIcon) => console.log(selectedIcon)}
|
|
31
|
+
* />
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* @param {Object} props 组件接受的props
|
|
35
|
+
* @param {Function} props.onChange 当图标被选中时触发的回调函数,接受选中图标的信息作为参数
|
|
36
36
|
*/
|
|
37
37
|
function _default(_ref) {
|
|
38
38
|
var onChange = _ref.onChange,
|
|
@@ -111,7 +111,7 @@ function _default(_ref) {
|
|
|
111
111
|
}, [iconData, searchTerm]);
|
|
112
112
|
var handleClick = (0, _ahooks.useMemoizedFn)(function (icon) {
|
|
113
113
|
var _iconfont = "".concat(iconData.css_prefix_text).concat(icon.font_class);
|
|
114
|
-
onSelect(_iconfont);
|
|
114
|
+
onSelect === null || onSelect === void 0 || onSelect(_iconfont);
|
|
115
115
|
onChange(_iconfont);
|
|
116
116
|
});
|
|
117
117
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -14,7 +14,6 @@ var _utils = require("@luck-design-biz/base/utils");
|
|
|
14
14
|
var _lodash = require("lodash");
|
|
15
15
|
var _ContextProvider = require("../../engine/provider/ContextProvider");
|
|
16
16
|
var _PanelItem = _interopRequireDefault(require("../components/PanelItem"));
|
|
17
|
-
var _impexp = _interopRequireDefault(require("../style/impexp.less"));
|
|
18
17
|
var _I18N_PREFIX_ = 'luckda.lowcode.painter.panel-section.impexp';
|
|
19
18
|
var ImpExp = function ImpExp(_ref) {
|
|
20
19
|
var defaultValue = _ref.defaultValue,
|
|
@@ -34,17 +33,6 @@ var ImpExp = function ImpExp(_ref) {
|
|
|
34
33
|
(0, _ahooks.useUpdateEffect)(function () {
|
|
35
34
|
onChange(state);
|
|
36
35
|
}, [state]);
|
|
37
|
-
var handleCheckboxChange = (0, _ahooks.useMemoizedFn)(function (e) {
|
|
38
|
-
if (e.target.value === 'import') {
|
|
39
|
-
setState({
|
|
40
|
-
import: e.target.checked
|
|
41
|
-
});
|
|
42
|
-
} else if (e.target.value === 'export') {
|
|
43
|
-
setState({
|
|
44
|
-
export: e.target.checked
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
36
|
var handleInputChange = (0, _ahooks.useMemoizedFn)(function (field, e) {
|
|
49
37
|
var value = e.target.value.trim();
|
|
50
38
|
var _val = value === '' ? true : value;
|
|
@@ -59,20 +47,6 @@ var ImpExp = function ImpExp(_ref) {
|
|
|
59
47
|
});
|
|
60
48
|
}
|
|
61
49
|
});
|
|
62
|
-
var handleSwitchChangeExport = (0, _ahooks.useMemoizedFn)(function (field, e) {
|
|
63
|
-
var _value = field;
|
|
64
|
-
setState({
|
|
65
|
-
exportType: _value,
|
|
66
|
-
export: true
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
var handleSwitchChangeImport = (0, _ahooks.useMemoizedFn)(function (field, e) {
|
|
70
|
-
var _value = field;
|
|
71
|
-
setState({
|
|
72
|
-
importType: _value,
|
|
73
|
-
import: true
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
50
|
var handleRadioChangeExport = (0, _ahooks.useMemoizedFn)(function (value, _ref2) {
|
|
77
51
|
var key = _ref2.key;
|
|
78
52
|
var _value = value;
|
|
@@ -13,7 +13,6 @@ var _utils = require("@luck-design-biz/base/utils");
|
|
|
13
13
|
var _PanelItem = _interopRequireDefault(require("../components/PanelItem"));
|
|
14
14
|
var _lodash = require("lodash");
|
|
15
15
|
var _ContextProvider = require("../../engine/provider/ContextProvider");
|
|
16
|
-
var _impexp = _interopRequireDefault(require("../style/impexp.less"));
|
|
17
16
|
var _I18N_PREFIX_ = 'luckda.lowcode.painter.panel-section.impexp';
|
|
18
17
|
var ImpExp = function ImpExp(_ref) {
|
|
19
18
|
var defaultValue = _ref.defaultValue,
|