@luck-design-biz/luckda 0.0.22-4 → 0.0.22-5
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 +1 -1
- package/es/components/LdGrid/index.js +4 -4
- package/es/components/LdGridForm/index.less +7 -7
- package/es/components/LdRuntimeCom/index.js +42 -0
- package/es/components/LdTree/index.less +36 -36
- package/es/helper/action.js +6 -6
- package/es/helper/form.js +14 -14
- package/es/helper/index.less +7 -7
- package/es/index.js +1 -0
- package/es/lowcode/constants/api-url.js +3 -0
- package/es/lowcode/constants/event-topics.js +31 -0
- package/es/lowcode/constants/index.js +12 -0
- package/es/lowcode/engine/factory/DataFactory.js +1 -0
- package/es/lowcode/engine/factory/panel-item-factory/DynamicStrategy.js +60 -0
- package/es/lowcode/engine/factory/panel-item-factory/SegmentedStrategy.js +32 -0
- package/es/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +32 -0
- package/es/lowcode/engine/factory/panel-item-factory/Strategy.js +21 -0
- package/es/lowcode/engine/factory/panel-item-factory/StringStrategy.js +32 -0
- package/es/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +32 -0
- package/es/lowcode/engine/factory/panel-item-factory/index.js +40 -0
- package/es/lowcode/engine/meta/box.props.default.json +10 -0
- package/es/lowcode/engine/meta/box.props.json +40 -0
- package/es/lowcode/engine/meta/button.props.default.json +16 -0
- package/es/lowcode/engine/meta/button.props.json +117 -0
- package/es/lowcode/engine/meta/cardlist.props.default.json +18 -0
- package/es/lowcode/engine/meta/cardlist.props.json +144 -0
- package/es/lowcode/engine/meta/components-list.json +128 -0
- package/es/lowcode/engine/meta/dialog.props.default.json +19 -0
- package/es/lowcode/engine/meta/dialog.props.json +121 -0
- package/es/lowcode/engine/meta/drawer.props.default.json +18 -0
- package/es/lowcode/engine/meta/drawer.props.json +144 -0
- package/es/lowcode/engine/meta/form.props.default.json +13 -0
- package/es/lowcode/engine/meta/form.props.json +117 -0
- package/es/lowcode/engine/meta/iframe.props.default.json +11 -0
- package/es/lowcode/engine/meta/iframe.props.json +32 -0
- package/es/lowcode/engine/meta/image.props.default.json +16 -0
- package/es/lowcode/engine/meta/image.props.json +114 -0
- package/es/lowcode/engine/meta/imex.props.default.json +12 -0
- package/es/lowcode/engine/meta/imex.props.json +82 -0
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +29 -0
- package/es/lowcode/engine/meta/jsx.props.default.json +10 -0
- package/es/lowcode/engine/meta/jsx.props.json +25 -0
- package/es/lowcode/engine/meta/layout.props.default.json +13 -0
- package/es/lowcode/engine/meta/layout.props.json +108 -0
- package/es/lowcode/engine/meta/link.props.default.json +14 -0
- package/es/lowcode/engine/meta/link.props.json +112 -0
- package/es/lowcode/engine/meta/section.props.default.json +17 -0
- package/es/lowcode/engine/meta/section.props.json +108 -0
- package/es/lowcode/engine/meta/split.props.default.json +13 -0
- package/es/lowcode/engine/meta/split.props.json +72 -0
- package/es/lowcode/engine/meta/table.props.default.json +18 -0
- package/es/lowcode/engine/meta/table.props.json +162 -0
- package/es/lowcode/engine/meta/tabs.props.default.json +18 -0
- package/es/lowcode/engine/meta/tabs.props.json +141 -0
- package/es/lowcode/engine/meta/text.props.default.json +12 -0
- package/es/lowcode/engine/meta/text.props.json +66 -0
- package/es/lowcode/engine/meta/tree.props.default.json +17 -0
- package/es/lowcode/engine/meta/tree.props.json +157 -0
- package/es/lowcode/engine/provider/ContextProvider.js +165 -0
- package/es/lowcode/engine/provider/EventBusProvider.js +120 -0
- package/es/lowcode/engine/tools/dataProcess.js +263 -0
- package/es/lowcode/engine/tools/helper.js +4 -0
- package/es/lowcode/engine/tools/lcid.js +16 -0
- package/es/lowcode/index.js +3 -0
- package/es/lowcode/painter/Components.js +104 -0
- package/es/lowcode/painter/Design.js +210 -0
- package/es/lowcode/painter/I18n.js +202 -0
- package/es/lowcode/painter/Outline.js +208 -0
- package/es/lowcode/painter/Panel.js +195 -0
- package/es/lowcode/painter/Ribbon.js +142 -0
- package/es/lowcode/painter/components/PanelItem.js +35 -0
- package/es/lowcode/painter/components/PopConfirm.js +20 -0
- package/es/lowcode/painter/components/PopForm.js +71 -0
- package/es/lowcode/painter/components/RuleInput.js +105 -0
- package/es/lowcode/painter/components/SortBox.js +92 -0
- package/es/lowcode/painter/components/TabEditor.js +88 -0
- package/es/lowcode/painter/components/code-editor/BaseEditor.js +49 -0
- package/es/lowcode/painter/components/code-editor/JSEditor.js +77 -0
- package/es/lowcode/painter/components/code-editor/index.js +2 -0
- package/es/lowcode/painter/index.js +45 -0
- package/es/lowcode/painter/panel-section/Icon.js +48 -0
- package/es/lowcode/painter/panel-section/IconSelector.js +139 -0
- package/es/lowcode/painter/panel-section/LayoutRatio.js +140 -0
- package/es/lowcode/painter/panel-section/TabItems.js +238 -0
- package/es/lowcode/painter/services/I18n.js +85 -0
- package/es/lowcode/painter/style/components.less +90 -0
- package/es/lowcode/painter/style/design.less +82 -0
- package/es/lowcode/painter/style/icon-selector.less +22 -0
- package/es/lowcode/painter/style/icon.less +11 -0
- package/es/lowcode/painter/style/index.less +6 -0
- package/es/lowcode/painter/style/layout-ratio.less +51 -0
- package/es/lowcode/painter/style/outline.less +28 -0
- package/es/lowcode/painter/style/panel-item.less +22 -0
- package/es/lowcode/painter/style/panel.less +119 -0
- package/es/lowcode/painter/style/pop-confirm.less +10 -0
- package/es/lowcode/painter/style/pop-form.less +20 -0
- package/es/lowcode/painter/style/radio.less +24 -0
- package/es/lowcode/painter/style/ribbon.less +5 -0
- package/es/lowcode/painter/style/rule-input.less +13 -0
- package/es/lowcode/painter/style/tabeditor.less +90 -0
- package/es/lowcode/painter/style/tabitems.less +90 -0
- package/es/lowcode/view/Canvas.js +135 -0
- package/es/lowcode/view/Loading.js +23 -0
- package/es/lowcode/view/Page.js +251 -0
- package/es/lowcode/view/index.js +18 -0
- package/es/lowcode/view/lc-components/Box/index.js +24 -0
- package/es/lowcode/view/lc-components/Box/meta.json +40 -0
- package/es/lowcode/view/lc-components/Button/index.js +37 -0
- package/es/lowcode/view/lc-components/Button/meta.json +117 -0
- package/es/lowcode/view/lc-components/CardList/index.js +20 -0
- package/es/lowcode/view/lc-components/CardList/meta.json +144 -0
- package/es/lowcode/view/lc-components/Dialog/index.js +61 -0
- package/es/lowcode/view/lc-components/Dialog/index.less +3 -0
- package/es/lowcode/view/lc-components/Dialog/meta.json +121 -0
- package/es/lowcode/view/lc-components/Drawer/index.js +62 -0
- package/es/lowcode/view/lc-components/Drawer/meta.json +144 -0
- package/es/lowcode/view/lc-components/Drawer/style.less +7 -0
- package/es/lowcode/view/lc-components/Form/index.js +20 -0
- package/es/lowcode/view/lc-components/Form/meta.json +117 -0
- package/es/lowcode/view/lc-components/Iframe/index.js +20 -0
- package/es/lowcode/view/lc-components/Iframe/meta.json +32 -0
- package/es/lowcode/view/lc-components/ImEx/index.js +20 -0
- package/es/lowcode/view/lc-components/ImEx/meta.json +82 -0
- package/es/lowcode/view/lc-components/Image/index.js +20 -0
- package/es/lowcode/view/lc-components/Image/meta.json +114 -0
- package/es/lowcode/view/lc-components/JSX/index.js +20 -0
- package/es/lowcode/view/lc-components/JSX/meta.json +25 -0
- package/es/lowcode/view/lc-components/Layout/index.js +98 -0
- package/es/lowcode/view/lc-components/Layout/index.less +9 -0
- package/es/lowcode/view/lc-components/Layout/meta.json +108 -0
- package/es/lowcode/view/lc-components/Link/index.js +20 -0
- package/es/lowcode/view/lc-components/Link/meta.json +112 -0
- package/es/lowcode/view/lc-components/Section/index.js +34 -0
- package/es/lowcode/view/lc-components/Section/meta.json +108 -0
- package/es/lowcode/view/lc-components/Split/index.js +21 -0
- package/es/lowcode/view/lc-components/Split/meta.json +72 -0
- package/es/lowcode/view/lc-components/Table/index.js +23 -0
- package/es/lowcode/view/lc-components/Table/meta.json +162 -0
- package/es/lowcode/view/lc-components/Tabs/index.js +21 -0
- package/es/lowcode/view/lc-components/Tabs/meta.json +141 -0
- package/es/lowcode/view/lc-components/Text/index.js +23 -0
- package/es/lowcode/view/lc-components/Text/meta.json +66 -0
- package/es/lowcode/view/lc-components/Tree/index.js +20 -0
- package/es/lowcode/view/lc-components/Tree/meta.json +157 -0
- package/es/lowcode/view/lc-components/Wrapper.js +52 -0
- package/es/lowcode/view/style/canvas.less +5 -0
- package/es/lowcode/view/style/loading.less +84 -0
- package/es/lowcode/view/style/page.less +5 -0
- package/es/upload/Form/index.less +7 -7
- package/es/upload/FormItem/index.js +15 -15
- package/es/utils/form.js +22 -22
- package/es/utils/grid.js +2 -2
- package/lib/components/Builder/index.js +1 -1
- package/lib/components/LdGrid/index.js +4 -4
- package/lib/components/LdGridForm/index.less +7 -7
- package/lib/components/LdRuntimeCom/index.js +49 -0
- package/lib/components/LdTree/index.less +36 -36
- package/lib/helper/action.js +6 -6
- package/lib/helper/form.js +14 -14
- package/lib/helper/index.less +7 -7
- package/lib/index.js +9 -1
- package/lib/lowcode/constants/api-url.js +9 -0
- package/lib/lowcode/constants/event-topics.js +37 -0
- package/lib/lowcode/constants/index.js +18 -0
- package/lib/lowcode/engine/factory/DataFactory.js +3 -0
- package/lib/lowcode/engine/factory/panel-item-factory/DynamicStrategy.js +73 -0
- package/lib/lowcode/engine/factory/panel-item-factory/SegmentedStrategy.js +38 -0
- package/lib/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +38 -0
- package/lib/lowcode/engine/factory/panel-item-factory/Strategy.js +27 -0
- package/lib/lowcode/engine/factory/panel-item-factory/StringStrategy.js +38 -0
- package/lib/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +38 -0
- package/lib/lowcode/engine/factory/panel-item-factory/index.js +46 -0
- package/lib/lowcode/engine/meta/box.props.default.json +10 -0
- package/lib/lowcode/engine/meta/box.props.json +40 -0
- package/lib/lowcode/engine/meta/button.props.default.json +16 -0
- package/lib/lowcode/engine/meta/button.props.json +117 -0
- package/lib/lowcode/engine/meta/cardlist.props.default.json +18 -0
- package/lib/lowcode/engine/meta/cardlist.props.json +144 -0
- package/lib/lowcode/engine/meta/components-list.json +128 -0
- package/lib/lowcode/engine/meta/dialog.props.default.json +19 -0
- package/lib/lowcode/engine/meta/dialog.props.json +121 -0
- package/lib/lowcode/engine/meta/drawer.props.default.json +18 -0
- package/lib/lowcode/engine/meta/drawer.props.json +144 -0
- package/lib/lowcode/engine/meta/form.props.default.json +13 -0
- package/lib/lowcode/engine/meta/form.props.json +117 -0
- package/lib/lowcode/engine/meta/iframe.props.default.json +11 -0
- package/lib/lowcode/engine/meta/iframe.props.json +32 -0
- package/lib/lowcode/engine/meta/image.props.default.json +16 -0
- package/lib/lowcode/engine/meta/image.props.json +114 -0
- package/lib/lowcode/engine/meta/imex.props.default.json +12 -0
- package/lib/lowcode/engine/meta/imex.props.json +82 -0
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +29 -0
- package/lib/lowcode/engine/meta/jsx.props.default.json +10 -0
- package/lib/lowcode/engine/meta/jsx.props.json +25 -0
- package/lib/lowcode/engine/meta/layout.props.default.json +13 -0
- package/lib/lowcode/engine/meta/layout.props.json +108 -0
- package/lib/lowcode/engine/meta/link.props.default.json +14 -0
- package/lib/lowcode/engine/meta/link.props.json +112 -0
- package/lib/lowcode/engine/meta/section.props.default.json +17 -0
- package/lib/lowcode/engine/meta/section.props.json +108 -0
- package/lib/lowcode/engine/meta/split.props.default.json +13 -0
- package/lib/lowcode/engine/meta/split.props.json +72 -0
- package/lib/lowcode/engine/meta/table.props.default.json +18 -0
- package/lib/lowcode/engine/meta/table.props.json +162 -0
- package/lib/lowcode/engine/meta/tabs.props.default.json +18 -0
- package/lib/lowcode/engine/meta/tabs.props.json +141 -0
- package/lib/lowcode/engine/meta/text.props.default.json +12 -0
- package/lib/lowcode/engine/meta/text.props.json +66 -0
- package/lib/lowcode/engine/meta/tree.props.default.json +17 -0
- package/lib/lowcode/engine/meta/tree.props.json +157 -0
- package/lib/lowcode/engine/provider/ContextProvider.js +173 -0
- package/lib/lowcode/engine/provider/EventBusProvider.js +128 -0
- package/lib/lowcode/engine/tools/dataProcess.js +277 -0
- package/lib/lowcode/engine/tools/helper.js +11 -0
- package/lib/lowcode/engine/tools/lcid.js +22 -0
- package/lib/lowcode/index.js +20 -0
- package/lib/lowcode/painter/Components.js +112 -0
- package/lib/lowcode/painter/Design.js +218 -0
- package/lib/lowcode/painter/I18n.js +209 -0
- package/lib/lowcode/painter/Outline.js +216 -0
- package/lib/lowcode/painter/Panel.js +203 -0
- package/lib/lowcode/painter/Ribbon.js +150 -0
- package/lib/lowcode/painter/components/PanelItem.js +41 -0
- package/lib/lowcode/painter/components/PopConfirm.js +26 -0
- package/lib/lowcode/painter/components/PopForm.js +77 -0
- package/lib/lowcode/painter/components/RuleInput.js +112 -0
- package/lib/lowcode/painter/components/SortBox.js +99 -0
- package/lib/lowcode/painter/components/TabEditor.js +94 -0
- package/lib/lowcode/painter/components/code-editor/BaseEditor.js +57 -0
- package/lib/lowcode/painter/components/code-editor/JSEditor.js +88 -0
- package/lib/lowcode/painter/components/code-editor/index.js +20 -0
- package/lib/lowcode/painter/index.js +54 -0
- package/lib/lowcode/painter/panel-section/Icon.js +54 -0
- package/lib/lowcode/painter/panel-section/IconSelector.js +146 -0
- package/lib/lowcode/painter/panel-section/LayoutRatio.js +148 -0
- package/lib/lowcode/painter/panel-section/TabItems.js +246 -0
- package/lib/lowcode/painter/services/I18n.js +95 -0
- package/lib/lowcode/painter/style/components.less +90 -0
- package/lib/lowcode/painter/style/design.less +82 -0
- package/lib/lowcode/painter/style/icon-selector.less +22 -0
- package/lib/lowcode/painter/style/icon.less +11 -0
- package/lib/lowcode/painter/style/index.less +6 -0
- package/lib/lowcode/painter/style/layout-ratio.less +51 -0
- package/lib/lowcode/painter/style/outline.less +28 -0
- package/lib/lowcode/painter/style/panel-item.less +22 -0
- package/lib/lowcode/painter/style/panel.less +119 -0
- package/lib/lowcode/painter/style/pop-confirm.less +10 -0
- package/lib/lowcode/painter/style/pop-form.less +20 -0
- package/lib/lowcode/painter/style/radio.less +24 -0
- package/lib/lowcode/painter/style/ribbon.less +5 -0
- package/lib/lowcode/painter/style/rule-input.less +13 -0
- package/lib/lowcode/painter/style/tabeditor.less +90 -0
- package/lib/lowcode/painter/style/tabitems.less +90 -0
- package/lib/lowcode/view/Canvas.js +150 -0
- package/lib/lowcode/view/Loading.js +30 -0
- package/lib/lowcode/view/Page.js +259 -0
- package/lib/lowcode/view/index.js +25 -0
- package/lib/lowcode/view/lc-components/Box/index.js +32 -0
- package/lib/lowcode/view/lc-components/Box/meta.json +40 -0
- package/lib/lowcode/view/lc-components/Button/index.js +45 -0
- package/lib/lowcode/view/lc-components/Button/meta.json +117 -0
- package/lib/lowcode/view/lc-components/CardList/index.js +28 -0
- package/lib/lowcode/view/lc-components/CardList/meta.json +144 -0
- package/lib/lowcode/view/lc-components/Dialog/index.js +69 -0
- package/lib/lowcode/view/lc-components/Dialog/index.less +3 -0
- package/lib/lowcode/view/lc-components/Dialog/meta.json +121 -0
- package/lib/lowcode/view/lc-components/Drawer/index.js +70 -0
- package/lib/lowcode/view/lc-components/Drawer/meta.json +144 -0
- package/lib/lowcode/view/lc-components/Drawer/style.less +7 -0
- package/lib/lowcode/view/lc-components/Form/index.js +28 -0
- package/lib/lowcode/view/lc-components/Form/meta.json +117 -0
- package/lib/lowcode/view/lc-components/Iframe/index.js +28 -0
- package/lib/lowcode/view/lc-components/Iframe/meta.json +32 -0
- package/lib/lowcode/view/lc-components/ImEx/index.js +28 -0
- package/lib/lowcode/view/lc-components/ImEx/meta.json +82 -0
- package/lib/lowcode/view/lc-components/Image/index.js +28 -0
- package/lib/lowcode/view/lc-components/Image/meta.json +114 -0
- package/lib/lowcode/view/lc-components/JSX/index.js +28 -0
- package/lib/lowcode/view/lc-components/JSX/meta.json +25 -0
- package/lib/lowcode/view/lc-components/Layout/index.js +106 -0
- package/lib/lowcode/view/lc-components/Layout/index.less +9 -0
- package/lib/lowcode/view/lc-components/Layout/meta.json +108 -0
- package/lib/lowcode/view/lc-components/Link/index.js +28 -0
- package/lib/lowcode/view/lc-components/Link/meta.json +112 -0
- package/lib/lowcode/view/lc-components/Section/index.js +42 -0
- package/lib/lowcode/view/lc-components/Section/meta.json +108 -0
- package/lib/lowcode/view/lc-components/Split/index.js +29 -0
- package/lib/lowcode/view/lc-components/Split/meta.json +72 -0
- package/lib/lowcode/view/lc-components/Table/index.js +31 -0
- package/lib/lowcode/view/lc-components/Table/meta.json +162 -0
- package/lib/lowcode/view/lc-components/Tabs/index.js +29 -0
- package/lib/lowcode/view/lc-components/Tabs/meta.json +141 -0
- package/lib/lowcode/view/lc-components/Text/index.js +31 -0
- package/lib/lowcode/view/lc-components/Text/meta.json +66 -0
- package/lib/lowcode/view/lc-components/Tree/index.js +28 -0
- package/lib/lowcode/view/lc-components/Tree/meta.json +157 -0
- package/lib/lowcode/view/lc-components/Wrapper.js +59 -0
- package/lib/lowcode/view/style/canvas.less +5 -0
- package/lib/lowcode/view/style/loading.less +84 -0
- package/lib/lowcode/view/style/page.less +5 -0
- package/lib/upload/Form/index.less +7 -7
- package/lib/upload/FormItem/index.js +15 -15
- package/lib/utils/form.js +22 -22
- package/lib/utils/grid.js +2 -2
- package/lowcode.js +1 -0
- package/package.json +163 -151
- package/upload.js +1 -1
- package/utils.js +1 -1
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
.lc-painter-panel {
|
|
2
|
+
position: relative;
|
|
3
|
+
width: 320px;
|
|
4
|
+
height: 100%;
|
|
5
|
+
border-left: 1px solid #e8e8e8;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
background-color: #fff;
|
|
9
|
+
|
|
10
|
+
&-empty {
|
|
11
|
+
position: absolute;
|
|
12
|
+
top: 0;
|
|
13
|
+
left: 0;
|
|
14
|
+
width: 100%;
|
|
15
|
+
height: 100%;
|
|
16
|
+
text-align: center;
|
|
17
|
+
padding-top: 64px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.hidden {
|
|
21
|
+
display: none;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&-topbar {
|
|
25
|
+
width: 100%;
|
|
26
|
+
height: 40px;
|
|
27
|
+
padding: 8px 16px;
|
|
28
|
+
border-bottom: 1px solid #e3e3e3;
|
|
29
|
+
background-color: white;
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
.active-node-level:hover {
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&-tabbar {
|
|
38
|
+
position: relative;
|
|
39
|
+
width: 100%;
|
|
40
|
+
height: 36px;
|
|
41
|
+
.headerList {
|
|
42
|
+
display: flex;
|
|
43
|
+
justify-content: space-around;
|
|
44
|
+
padding: 0 !important;
|
|
45
|
+
|
|
46
|
+
& > li {
|
|
47
|
+
padding: 8px;
|
|
48
|
+
font-size: 12px;
|
|
49
|
+
color: #a0a0a0;
|
|
50
|
+
cursor: pointer;
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
|
|
54
|
+
&:hover {
|
|
55
|
+
color: #363636;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&.actived {
|
|
59
|
+
color: #363636;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
& > i {
|
|
63
|
+
margin-right: 4px;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
:global {
|
|
68
|
+
li#header-active {
|
|
69
|
+
color: #363636;
|
|
70
|
+
position: relative;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.underline {
|
|
76
|
+
position: absolute;
|
|
77
|
+
bottom: 0;
|
|
78
|
+
height: 5px;
|
|
79
|
+
background: var(--ant-primary-color);
|
|
80
|
+
border-radius: 3px;
|
|
81
|
+
width: 20px;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&-content {
|
|
86
|
+
position: relative;
|
|
87
|
+
width: 100%;
|
|
88
|
+
flex: 1;
|
|
89
|
+
overflow-x: hidden;
|
|
90
|
+
overflow-y: auto;
|
|
91
|
+
padding: 8px 16px;
|
|
92
|
+
|
|
93
|
+
.next-content {
|
|
94
|
+
height: 100%;
|
|
95
|
+
display: flex;
|
|
96
|
+
flex-direction: column;
|
|
97
|
+
|
|
98
|
+
&-header {
|
|
99
|
+
height: 28px;
|
|
100
|
+
background-color: #e8e8e8;
|
|
101
|
+
display: flex;
|
|
102
|
+
align-items: center;
|
|
103
|
+
justify-content: space-between;
|
|
104
|
+
padding: 0 4px;
|
|
105
|
+
}
|
|
106
|
+
&-header:hover {
|
|
107
|
+
background-color: #e3e3e3;
|
|
108
|
+
cursor: pointer;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&-body {
|
|
112
|
+
flex: 1;
|
|
113
|
+
overflow-y: auto;
|
|
114
|
+
background-color: white;
|
|
115
|
+
padding: 16px 0 8px;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.lc-painter-panel-section-components-popform {
|
|
2
|
+
width: 240px;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
gap: 8px;
|
|
6
|
+
.item {
|
|
7
|
+
display: flex;
|
|
8
|
+
gap: 2px;
|
|
9
|
+
align-items: center;
|
|
10
|
+
font-size: 12px;
|
|
11
|
+
|
|
12
|
+
.left {
|
|
13
|
+
width: 55px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.right {
|
|
17
|
+
flex: 1;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
.lc-painter-panel-section-radio {
|
|
2
|
+
background-color: #f1f2f3;
|
|
3
|
+
border-radius: 6px;
|
|
4
|
+
height: 28px;
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
|
|
8
|
+
.radio-item {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex: 1;
|
|
11
|
+
text-align: center;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
height: 24px;
|
|
15
|
+
font-size: 12px;
|
|
16
|
+
margin: 2px;
|
|
17
|
+
border-radius: 6px;
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
|
|
20
|
+
&.active{
|
|
21
|
+
background-color: #ffffff;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
.lc-painter-components-ruleinput {
|
|
2
|
+
&.err, &.err:hover {
|
|
3
|
+
border-color: #ff4d4f;
|
|
4
|
+
color: red;
|
|
5
|
+
}
|
|
6
|
+
&.err:focus {
|
|
7
|
+
border-color: #ff4d4f;
|
|
8
|
+
border-right-width: 1px !important;
|
|
9
|
+
outline: 0;
|
|
10
|
+
-webkit-box-shadow: 0 0 0 2px rgba(245,34,45,.2);
|
|
11
|
+
box-shadow: 0 0 0 2px rgba(245,34,45,.2);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
.lc-painter-panel-section-components-tabeditor {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
|
|
6
|
+
.tabs-box {
|
|
7
|
+
width: 100%;
|
|
8
|
+
.tabitem {
|
|
9
|
+
height: 28px;
|
|
10
|
+
background: #fff;
|
|
11
|
+
border: 1px solid #e5e6e8;
|
|
12
|
+
border-radius: 6px;
|
|
13
|
+
margin-bottom: 8px;
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: space-between;
|
|
17
|
+
font-size: 12px;
|
|
18
|
+
gap: 2px;
|
|
19
|
+
|
|
20
|
+
.tabitem-left {
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
padding: 0 4px;
|
|
24
|
+
|
|
25
|
+
.dragicon {
|
|
26
|
+
cursor: move;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.tabitem-right {
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
padding: 0 4px;
|
|
34
|
+
gap: 4px;
|
|
35
|
+
|
|
36
|
+
.tabitem-action {
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.tabs-actions {
|
|
44
|
+
width: 100%;
|
|
45
|
+
.tabs-action {
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
height: 28px;
|
|
48
|
+
background: #fff;
|
|
49
|
+
border: 1px solid #e5e6e8;
|
|
50
|
+
border-radius: 6px;
|
|
51
|
+
display: flex;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
align-items: center;
|
|
54
|
+
font-size: 12px;
|
|
55
|
+
gap: 4px;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.lc-painter-panel-section-tabitems-editor {
|
|
61
|
+
width: 240px;
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
gap: 8px;
|
|
65
|
+
.item {
|
|
66
|
+
display: flex;
|
|
67
|
+
gap: 2px;
|
|
68
|
+
align-items: center;
|
|
69
|
+
font-size: 12px;
|
|
70
|
+
|
|
71
|
+
.left {
|
|
72
|
+
width: 55px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.right {
|
|
76
|
+
flex: 1;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.lc-painter-panel-section-tabitems-popconfirm {
|
|
82
|
+
:global {
|
|
83
|
+
.ant-popover-message-title {
|
|
84
|
+
padding: 0;
|
|
85
|
+
}
|
|
86
|
+
.ant-popover-buttons{
|
|
87
|
+
display: none;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
.lc-painter-panel-section-tabitems {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
|
|
6
|
+
.tabs-box {
|
|
7
|
+
width: 100%;
|
|
8
|
+
.tabitem {
|
|
9
|
+
height: 28px;
|
|
10
|
+
background: #fff;
|
|
11
|
+
border: 1px solid #e5e6e8;
|
|
12
|
+
border-radius: 6px;
|
|
13
|
+
margin-bottom: 8px;
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: space-between;
|
|
17
|
+
font-size: 12px;
|
|
18
|
+
gap: 2px;
|
|
19
|
+
|
|
20
|
+
.tabitem-left {
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
padding: 0 4px;
|
|
24
|
+
|
|
25
|
+
.dragicon {
|
|
26
|
+
cursor: move;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.tabitem-right {
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
padding: 0 4px;
|
|
34
|
+
gap: 4px;
|
|
35
|
+
|
|
36
|
+
.tabitem-action {
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.tabs-actions {
|
|
44
|
+
width: 100%;
|
|
45
|
+
.tabs-action {
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
height: 28px;
|
|
48
|
+
background: #fff;
|
|
49
|
+
border: 1px solid #e5e6e8;
|
|
50
|
+
border-radius: 6px;
|
|
51
|
+
display: flex;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
align-items: center;
|
|
54
|
+
font-size: 12px;
|
|
55
|
+
gap: 4px;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.lc-painter-panel-section-tabitems-editor {
|
|
61
|
+
width: 240px;
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
gap: 8px;
|
|
65
|
+
.item {
|
|
66
|
+
display: flex;
|
|
67
|
+
gap: 2px;
|
|
68
|
+
align-items: center;
|
|
69
|
+
font-size: 12px;
|
|
70
|
+
|
|
71
|
+
.left {
|
|
72
|
+
width: 55px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.right {
|
|
76
|
+
flex: 1;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.lc-painter-panel-section-tabitems-popconfirm {
|
|
82
|
+
:global {
|
|
83
|
+
.ant-popover-message-title {
|
|
84
|
+
padding: 0;
|
|
85
|
+
}
|
|
86
|
+
.ant-popover-buttons{
|
|
87
|
+
display: none;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
3
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
4
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
6
|
+
var _excluded = ["props", "children"],
|
|
7
|
+
_excluded2 = ["id", "component", "name", "desc", "icon", "group", "groupName", "order"];
|
|
8
|
+
import React, { useRef, useState } from 'react';
|
|
9
|
+
import { dynamic } from 'umi';
|
|
10
|
+
import { useMemoizedFn, useDeepCompareLayoutEffect } from 'ahooks';
|
|
11
|
+
import { reduce } from 'lodash';
|
|
12
|
+
import Box from "./lc-components/Box";
|
|
13
|
+
import { CELL_KEY } from "../constants";
|
|
14
|
+
import styles from "./style/canvas.less";
|
|
15
|
+
var PAGE_CELL = [CELL_KEY.PAGE_HEADER, CELL_KEY.PAGE_CONTENT, CELL_KEY.PAGE_FOOTER];
|
|
16
|
+
var Canvas = function Canvas(_ref) {
|
|
17
|
+
var dataSource = _ref.dataSource;
|
|
18
|
+
console.log('dataSource', dataSource);
|
|
19
|
+
var dynamicCompMap = useRef({});
|
|
20
|
+
var _useState = useState(null),
|
|
21
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
22
|
+
header = _useState2[0],
|
|
23
|
+
setHeader = _useState2[1];
|
|
24
|
+
var _useState3 = useState(null),
|
|
25
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
26
|
+
content = _useState4[0],
|
|
27
|
+
setContent = _useState4[1];
|
|
28
|
+
var _useState5 = useState(null),
|
|
29
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
30
|
+
footer = _useState6[0],
|
|
31
|
+
setFooter = _useState6[1];
|
|
32
|
+
var _useState7 = useState(null),
|
|
33
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
34
|
+
modal = _useState8[0],
|
|
35
|
+
setModal = _useState8[1];
|
|
36
|
+
var render = useMemoizedFn(function (_ref2) {
|
|
37
|
+
var props = _ref2.props,
|
|
38
|
+
children = _ref2.children,
|
|
39
|
+
childrenMap = _objectWithoutProperties(_ref2, _excluded);
|
|
40
|
+
if (props && !PAGE_CELL.includes(props.id)) {
|
|
41
|
+
var id = props.id,
|
|
42
|
+
component = props.component,
|
|
43
|
+
name = props.name,
|
|
44
|
+
desc = props.desc,
|
|
45
|
+
icon = props.icon,
|
|
46
|
+
group = props.group,
|
|
47
|
+
groupName = props.groupName,
|
|
48
|
+
order = props.order,
|
|
49
|
+
rest = _objectWithoutProperties(props, _excluded2);
|
|
50
|
+
if (!dynamicCompMap.current[component]) {
|
|
51
|
+
dynamicCompMap.current[component] = dynamic({
|
|
52
|
+
loader: function () {
|
|
53
|
+
var _loader = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
54
|
+
var _yield$import, _Comp;
|
|
55
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
56
|
+
while (1) switch (_context.prev = _context.next) {
|
|
57
|
+
case 0:
|
|
58
|
+
_context.next = 2;
|
|
59
|
+
return import("./lc-components/".concat(component));
|
|
60
|
+
case 2:
|
|
61
|
+
_yield$import = _context.sent;
|
|
62
|
+
_Comp = _yield$import.default;
|
|
63
|
+
return _context.abrupt("return", _Comp);
|
|
64
|
+
case 5:
|
|
65
|
+
case "end":
|
|
66
|
+
return _context.stop();
|
|
67
|
+
}
|
|
68
|
+
}, _callee);
|
|
69
|
+
}));
|
|
70
|
+
function loader() {
|
|
71
|
+
return _loader.apply(this, arguments);
|
|
72
|
+
}
|
|
73
|
+
return loader;
|
|
74
|
+
}()
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
var Comp = dynamicCompMap.current[component];
|
|
78
|
+
return /*#__PURE__*/React.createElement(Comp, _extends({
|
|
79
|
+
key: id,
|
|
80
|
+
id: id
|
|
81
|
+
}, rest), (children || []).map(function (_id) {
|
|
82
|
+
return render(childrenMap[_id]);
|
|
83
|
+
}));
|
|
84
|
+
}
|
|
85
|
+
return (children || []).map(function (_id) {
|
|
86
|
+
return render(childrenMap[_id]);
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
useDeepCompareLayoutEffect(function () {
|
|
90
|
+
setHeader(render(dataSource[CELL_KEY.PAGE_HEADER]));
|
|
91
|
+
}, [dataSource[CELL_KEY.PAGE_HEADER]]);
|
|
92
|
+
useDeepCompareLayoutEffect(function () {
|
|
93
|
+
setContent(render(dataSource[CELL_KEY.PAGE_CONTENT]));
|
|
94
|
+
}, [dataSource[CELL_KEY.PAGE_CONTENT]]);
|
|
95
|
+
useDeepCompareLayoutEffect(function () {
|
|
96
|
+
setFooter(render(dataSource[CELL_KEY.PAGE_FOOTER]));
|
|
97
|
+
}, [dataSource[CELL_KEY.PAGE_FOOTER]]);
|
|
98
|
+
useDeepCompareLayoutEffect(function () {
|
|
99
|
+
var pageModal = reduce(dataSource.children, function (result, _id) {
|
|
100
|
+
if (!PAGE_CELL.includes(_id)) {
|
|
101
|
+
result[_id] = dataSource[_id];
|
|
102
|
+
if (!result.children) {
|
|
103
|
+
result.children = [];
|
|
104
|
+
}
|
|
105
|
+
result.children.push(_id);
|
|
106
|
+
}
|
|
107
|
+
return result;
|
|
108
|
+
}, {});
|
|
109
|
+
setModal(render(pageModal));
|
|
110
|
+
}, [dataSource.children]);
|
|
111
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
112
|
+
id: "page-canvas",
|
|
113
|
+
className: styles['lc-view-canvas']
|
|
114
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
115
|
+
key: CELL_KEY.PAGE_HEADER,
|
|
116
|
+
id: CELL_KEY.PAGE_HEADER,
|
|
117
|
+
style: {
|
|
118
|
+
width: '100%',
|
|
119
|
+
height: 120,
|
|
120
|
+
backgroundColor: '#d3f261'
|
|
121
|
+
}
|
|
122
|
+
}, header), /*#__PURE__*/React.createElement(Box, {
|
|
123
|
+
key: CELL_KEY.PAGE_CONTENT,
|
|
124
|
+
id: CELL_KEY.PAGE_CONTENT
|
|
125
|
+
}, content), /*#__PURE__*/React.createElement(Box, {
|
|
126
|
+
key: CELL_KEY.PAGE_FOOTER,
|
|
127
|
+
id: CELL_KEY.PAGE_FOOTER,
|
|
128
|
+
style: {
|
|
129
|
+
width: '100%',
|
|
130
|
+
height: 80,
|
|
131
|
+
backgroundColor: '#69c0ff'
|
|
132
|
+
}
|
|
133
|
+
}, footer), modal);
|
|
134
|
+
};
|
|
135
|
+
export default Canvas;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import styles from "./style/loading.less";
|
|
4
|
+
var Loading = function Loading() {
|
|
5
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
6
|
+
className: styles['lc-painter-loading']
|
|
7
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
8
|
+
className: styles['cube']
|
|
9
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
10
|
+
className: classNames(styles['side'], styles['side1'])
|
|
11
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
12
|
+
className: classNames(styles['side'], styles['side2'])
|
|
13
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
14
|
+
className: classNames(styles['side'], styles['side3'])
|
|
15
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
16
|
+
className: classNames(styles['side'], styles['side4'])
|
|
17
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
18
|
+
className: classNames(styles['side'], styles['side5'])
|
|
19
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
20
|
+
className: classNames(styles['side'], styles['side6'])
|
|
21
|
+
})));
|
|
22
|
+
};
|
|
23
|
+
export default Loading;
|