@g1cloud/page-builder-editor 1.0.0-alpha.1 → 1.0.0-alpha.100
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/README.md +31 -6
- package/css/page-builder-editor.css +391 -0
- package/css/page-builder-viewer.css +200 -0
- package/dist/PageBuilderEditor.vue.d.ts +22 -7
- package/dist/PbHtmlEditorModal-C0MLYY66.js +193 -0
- package/dist/PbPropertyEditorBoolean-c5CNiTpt.js +38 -0
- package/dist/PbPropertyEditorColor-CwgsFX20.js +56 -0
- package/dist/{PbPropertyEditorText-DNdXl-Tr.js → PbPropertyEditorCssLength-BimevQPh.js} +11 -10
- package/dist/PbPropertyEditorHtml-Dq5TqAEK.js +62 -0
- package/dist/PbPropertyEditorImage-Bn9LMbEK.js +122 -0
- package/dist/PbPropertyEditorMultilineText-gDifsouH.js +66 -0
- package/dist/PbPropertyEditorNumber-B76ArSb5.js +47 -0
- package/dist/{PbPropertyEditorReadonlyText-Bk0WJxA0.js → PbPropertyEditorReadonlyText-BJ5qx69O.js} +7 -7
- package/dist/{PbPropertyEditorSelect-BJovN1su.js → PbPropertyEditorSelect-B5sfulvx.js} +6 -7
- package/dist/PbPropertyEditorText-C7Tr7KGc.js +50 -0
- package/dist/PbPropertyEditorYoutube-Ci8_jXBk.js +62 -0
- package/dist/PbScreenSelectModal-57LXAzjs.js +69 -0
- package/dist/PbWidgetAddModal-BdTUeERo.js +79 -0
- package/dist/PbYoutubeModal-CU8sClMD.js +73 -0
- package/dist/components/canvas/PbCanvas.vue.d.ts +1 -1
- package/dist/components/depart/PbLoginDepart.vue.d.ts +3 -3
- package/dist/components/menu/PbMenu.vue.d.ts +16 -1
- package/dist/components/menu/PbToolbar.vue.d.ts +16 -1
- package/dist/components/menu/PbToolbarButton.vue.d.ts +3 -3
- package/dist/components/menu/PbToolbarButtonGroup.vue.d.ts +3 -3
- package/dist/components/modal/PbHtmlEditorModal.vue.d.ts +28 -0
- package/dist/components/modal/PbPartAddModal.vue.d.ts +4 -4
- package/dist/components/modal/PbScreenSelectModal.vue.d.ts +6 -0
- package/dist/components/modal/PbWidgetAddModal.vue.d.ts +4 -4
- package/dist/components/modal/PbYoutubeModal.vue.d.ts +19 -0
- package/dist/components/navigator/PbNavigator.vue.d.ts +1 -1
- package/dist/components/part/PbAddWidgetButton.vue.d.ts +1 -1
- package/dist/components/part/PbBlock.vue.d.ts +7 -3
- package/dist/components/part/PbPage.vue.d.ts +5 -5
- package/dist/components/part/PbPageFrame.vue.d.ts +19 -0
- package/dist/components/part/PbSection.vue.d.ts +7 -3
- package/dist/components/part/PbWidget.vue.d.ts +5 -3
- package/dist/components/sidebar/PbSidebar.vue.d.ts +1 -1
- package/dist/components/sidebar/PbSidebarProperties.vue.d.ts +1 -1
- package/dist/components/sidebar/PbSidebarPropertyEditor.vue.d.ts +3 -3
- package/dist/components/sidebar/PbSidebarPropertyGroupEditor.vue.d.ts +3 -3
- package/dist/components/sidebar/property/{PbPropertyEditorProduct.vue.d.ts → PbPropertyEditorBoolean.vue.d.ts} +4 -4
- package/dist/components/sidebar/property/{PbPropertyLocalPart.vue.d.ts → PbPropertyEditorColor.vue.d.ts} +9 -9
- package/dist/components/sidebar/property/PbPropertyEditorCssLength.vue.d.ts +23 -0
- package/dist/components/sidebar/property/PbPropertyEditorHtml.vue.d.ts +23 -0
- package/dist/components/sidebar/property/PbPropertyEditorImage.vue.d.ts +5 -9
- package/dist/components/sidebar/property/PbPropertyEditorMultilineText.vue.d.ts +10 -8
- package/dist/components/sidebar/property/PbPropertyEditorNumber.vue.d.ts +23 -0
- package/dist/components/sidebar/property/PbPropertyEditorReadonlyText.vue.d.ts +3 -3
- package/dist/components/sidebar/property/PbPropertyEditorSelect.vue.d.ts +4 -4
- package/dist/components/sidebar/property/PbPropertyEditorText.vue.d.ts +9 -8
- package/dist/components/sidebar/property/PbPropertyEditorYoutube.vue.d.ts +23 -0
- package/dist/components/sidebar/property/PbPropertyGroupEditorBackground.vue.d.ts +3 -3
- package/dist/components/sidebar/property/PbPropertyGroupEditorBorder.vue.d.ts +3 -3
- package/dist/components/sidebar/property/PbPropertyGroupEditorMargin.vue.d.ts +3 -3
- package/dist/components/sidebar/property/PbPropertyGroupEditorMedia.vue.d.ts +20 -0
- package/dist/components/sidebar/property/PbPropertyGroupEditorPadding.vue.d.ts +3 -3
- package/dist/components/sidebar/property/PbPropertyGroupEditorPosition.vue.d.ts +3 -3
- package/dist/components/sidebar/property/PbPropertyGroupEditorSize.vue.d.ts +3 -3
- package/dist/components/ui/PbColorPicker.vue.d.ts +17 -8
- package/dist/directives/vPartHandler.d.ts +1 -0
- package/dist/{index-BtILenNo.js → index-gTlPRaWE.js} +5857 -2158
- package/dist/index.d.ts +6 -0
- package/dist/model/command.d.ts +47 -34
- package/dist/model/context.d.ts +25 -16
- package/dist/model/default-part-property-group.d.ts +8 -2
- package/dist/model/event.d.ts +0 -51
- package/dist/model/model.d.ts +11 -5
- package/dist/model/page-builder-editor.d.ts +42 -7
- package/dist/model/page-builder-util.d.ts +4 -2
- package/dist/model/part-definintion.d.ts +3 -2
- package/dist/model/part-manager.d.ts +2 -0
- package/dist/model/part-property.d.ts +4 -3
- package/dist/model/plugin.d.ts +24 -0
- package/dist/page-builder-editor.js +26 -19
- package/dist/page-builder-editor.umd.cjs +6692 -2335
- package/dist/style.css +342 -127
- package/dist/text/text.d.ts +1 -0
- package/dist/utils/common.d.ts +1 -0
- package/package.json +14 -8
- package/scss/canvas.scss +29 -0
- package/{css/canvas-block.scss → scss/page-block.scss} +15 -3
- package/scss/page-builder-editor.scss +326 -0
- package/scss/page-builder-viewer.scss +1 -0
- package/{css/canvas-page.scss → scss/page-page.scss} +25 -16
- package/{css/canvas-section.scss → scss/page-section.scss} +15 -4
- package/scss/page-widget.scss +66 -0
- package/scss/page.scss +73 -0
- package/scss/property-editor-color.scss +5 -0
- package/scss/property-editor-html.scss +17 -0
- package/scss/property-editor-image.scss +17 -0
- package/{css → scss}/property-editor-product.scss +4 -3
- package/scss/property-editor-text.scss +10 -0
- package/{css/property-editor-image.scss → scss/property-editor-youtube.scss} +4 -4
- package/scss/property-group-editor-background.scss +39 -0
- package/{css → scss}/property-group-editor-border.scss +6 -12
- package/scss/property-group-editor-margin.scss +2 -0
- package/scss/property-group-editor-media.scss +22 -0
- package/scss/property-group-editor-padding.scss +2 -0
- package/scss/property-group-editor-position.scss +2 -0
- package/scss/property-group-editor-size.scss +2 -0
- package/{css → scss}/property-localpart.scss +4 -4
- package/css/bluesea.scss +0 -8244
- package/css/canvas-widget.scss +0 -41
- package/css/canvas.scss +0 -146
- package/css/page-builder-editor.scss +0 -185
- package/css/page-builder-viewer.scss +0 -1
- package/css/property-group-editor-background.scss +0 -40
- package/css/property-group-editor-margin.scss +0 -13
- package/css/property-group-editor-padding.scss +0 -13
- package/css/property-group-editor-position.scss +0 -13
- package/css/property-group-editor-size.scss +0 -13
- package/css/variable.scss +0 -1
- package/dist/PbPartAddModal-DuLpnV4E.js +0 -50
- package/dist/PbPropertyEditorImage-BFIqG-bL.js +0 -42
- package/dist/PbPropertyEditorMultilineText-BMeNUGm8.js +0 -42
- package/dist/PbPropertyEditorProduct--cf9LI2Z.js +0 -49
- package/dist/PbWidgetAddModal-CQvFYzfU.js +0 -55
- package/dist/components/canvas/PbCanvasFrame.vue.d.ts +0 -2
- /package/{css → scss}/property-editor-multiline-text.scss +0 -0
- /package/{css/property-editor-text.scss → scss/property-editor-number.scss} +0 -0
- /package/{css → scss}/property-editor-readonly-text.scss +0 -0
- /package/{css → scss}/property-editor-select.scss +0 -0
package/css/canvas-widget.scss
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
.pb-widget {
|
|
2
|
-
position: relative;
|
|
3
|
-
outline: 1px dashed #ccc;
|
|
4
|
-
background-position: 50% 50%;
|
|
5
|
-
background-repeat: no-repeat;
|
|
6
|
-
background-size: cover;
|
|
7
|
-
|
|
8
|
-
&.selected {
|
|
9
|
-
outline: 2px solid #27ae60;
|
|
10
|
-
outline-offset: 1px;
|
|
11
|
-
z-index: 999;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.children {
|
|
15
|
-
position: absolute;
|
|
16
|
-
width: 100%;
|
|
17
|
-
height: 100%;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.pan-handle {
|
|
21
|
-
position: absolute;
|
|
22
|
-
left: -6px;
|
|
23
|
-
top: -6px;
|
|
24
|
-
width: 12px;
|
|
25
|
-
height: 12px;
|
|
26
|
-
background-color: #27ae60;
|
|
27
|
-
cursor: move;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.resize-handle {
|
|
31
|
-
position: absolute;
|
|
32
|
-
right: -6px;
|
|
33
|
-
bottom: -6px;
|
|
34
|
-
width: 12px;
|
|
35
|
-
height: 12px;
|
|
36
|
-
background-color: #27ae60;
|
|
37
|
-
cursor: nwse-resize;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
@import "@g1cloud/page-builder-viewer/css/widget";
|
package/css/canvas.scss
DELETED
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
@import 'variable';
|
|
2
|
-
@import 'canvas-page';
|
|
3
|
-
@import 'canvas-section';
|
|
4
|
-
@import 'canvas-block';
|
|
5
|
-
@import 'canvas-widget';
|
|
6
|
-
|
|
7
|
-
.font-icon {
|
|
8
|
-
font-family: Material Symbols Outlined, monospace;
|
|
9
|
-
font-size: 1rem;
|
|
10
|
-
max-width: 1em;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
html, body {
|
|
14
|
-
font-family: Noto Sans, Noto Sans KR, Noto Sans JP, Arial, sans-serif;
|
|
15
|
-
font-size: 12px;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
body {
|
|
19
|
-
background-color: white;
|
|
20
|
-
height: 100%;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.pb-canvas-wrapper {
|
|
24
|
-
padding: 32px 40px 56px 40px;
|
|
25
|
-
height: 100%;
|
|
26
|
-
background-color: $color-canvas-frame-bg;
|
|
27
|
-
overflow: auto;
|
|
28
|
-
|
|
29
|
-
.pb-canvas {
|
|
30
|
-
// background-color: white;
|
|
31
|
-
display: flex;
|
|
32
|
-
flex-direction: row;
|
|
33
|
-
transform-origin: top left;
|
|
34
|
-
|
|
35
|
-
width: fit-content;
|
|
36
|
-
min-width: 40px;
|
|
37
|
-
min-height: 40px;
|
|
38
|
-
// box-shadow: 4px 4px 8px $color-gray;
|
|
39
|
-
margin: 0 auto;
|
|
40
|
-
// margin-bottom: 100px;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.pb-position-mark {
|
|
45
|
-
background-color: #ff3333;
|
|
46
|
-
opacity: 0.5;
|
|
47
|
-
border-radius: 2px;
|
|
48
|
-
// z-index: 999;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.pb-add-section-handle {
|
|
52
|
-
position: relative;
|
|
53
|
-
// width: 33.33%;
|
|
54
|
-
// background: rgba(230, 126, 34, 0.5);
|
|
55
|
-
// position: relative;
|
|
56
|
-
text-align: center;
|
|
57
|
-
cursor: pointer;
|
|
58
|
-
z-index: 5;
|
|
59
|
-
height: 0;
|
|
60
|
-
// opacity: 0;
|
|
61
|
-
// margin: 0;
|
|
62
|
-
|
|
63
|
-
&.top::before,
|
|
64
|
-
&.bottom::before,
|
|
65
|
-
&.middle::before {
|
|
66
|
-
content: '';
|
|
67
|
-
position: absolute;
|
|
68
|
-
left: 0;
|
|
69
|
-
right: 0;
|
|
70
|
-
top: 0;
|
|
71
|
-
// height: 2px;
|
|
72
|
-
// background: rgba(0, 0, 0, 0.5);
|
|
73
|
-
opacity: 0;
|
|
74
|
-
pointer-events: none;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
&.top {
|
|
78
|
-
// top: 0;
|
|
79
|
-
// left: 50%;
|
|
80
|
-
// transform: translate(-50%, -50%);
|
|
81
|
-
// margin-top: 24px;
|
|
82
|
-
// margin-bottom: 24px;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
&.middle {
|
|
86
|
-
// top: 0;
|
|
87
|
-
// left: 50%;
|
|
88
|
-
// transform: translate(-50%, -50%);
|
|
89
|
-
// margin-top: 24px;
|
|
90
|
-
// margin-bottom: 24px;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
&.bottom {
|
|
94
|
-
// bottom: 0;
|
|
95
|
-
left: 50%;
|
|
96
|
-
bottom: -32px;
|
|
97
|
-
// transform: translate(-50%, 50%);
|
|
98
|
-
// margin-top: 24px;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
&:hover {
|
|
102
|
-
// opacity: 1;
|
|
103
|
-
|
|
104
|
-
&.top::before,
|
|
105
|
-
&.bottom::before,
|
|
106
|
-
&.middle::before,
|
|
107
|
-
> i {
|
|
108
|
-
opacity: 1;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
> i {
|
|
113
|
-
vertical-align: middle;
|
|
114
|
-
position: absolute;
|
|
115
|
-
top: 50%;
|
|
116
|
-
// left: 50%;
|
|
117
|
-
left: -20px;
|
|
118
|
-
font-size: 2rem;
|
|
119
|
-
transform: translate(-50%, -50%);
|
|
120
|
-
opacity: 0.2;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.pb-button {
|
|
125
|
-
background: none;
|
|
126
|
-
border: none;
|
|
127
|
-
cursor: pointer;
|
|
128
|
-
vertical-align: middle;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.pb-guideline {
|
|
132
|
-
position: absolute;
|
|
133
|
-
top: 0;
|
|
134
|
-
left: 0;
|
|
135
|
-
width: 100%;
|
|
136
|
-
height: 100%;
|
|
137
|
-
pointer-events: none;
|
|
138
|
-
|
|
139
|
-
&.selected {
|
|
140
|
-
z-index: 3;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
&.preselect {
|
|
144
|
-
z-index: 4;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
@import 'variable';
|
|
2
|
-
|
|
3
|
-
.pb-canvas-frame {
|
|
4
|
-
background-color: $color-canvas-frame-bg;
|
|
5
|
-
|
|
6
|
-
iframe.canvas-frame {
|
|
7
|
-
width: 100%;
|
|
8
|
-
height: 100%;
|
|
9
|
-
border: 0;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.pb-menu {
|
|
14
|
-
width: 100%;
|
|
15
|
-
|
|
16
|
-
.pb-toolbar {
|
|
17
|
-
padding: 0 8px;
|
|
18
|
-
margin: 6px 0;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
.pb-tool-button-group {
|
|
22
|
-
&::after {
|
|
23
|
-
content: '';
|
|
24
|
-
height: 80%;
|
|
25
|
-
border-right: 1px solid $color-border-light;
|
|
26
|
-
align-self: center;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.pb-tool-button {
|
|
30
|
-
padding: 2px;
|
|
31
|
-
|
|
32
|
-
.tool-button {
|
|
33
|
-
width: 28px;
|
|
34
|
-
height: 28px;
|
|
35
|
-
display: flex;
|
|
36
|
-
align-items: center;
|
|
37
|
-
justify-content: center;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.pb-navigator {
|
|
45
|
-
width: 200px;
|
|
46
|
-
height: 100%;
|
|
47
|
-
overflow: auto;
|
|
48
|
-
border-right: 1px solid $color-border-light;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.pb-sidebar {
|
|
52
|
-
width: 300px;
|
|
53
|
-
overflow: auto;
|
|
54
|
-
border-left: 1px solid $color-border-light;
|
|
55
|
-
|
|
56
|
-
.pb-sidebar-properties {
|
|
57
|
-
padding: 4px 0;
|
|
58
|
-
|
|
59
|
-
.pb-sidebar-property-group {
|
|
60
|
-
|
|
61
|
-
padding: 4px 0;
|
|
62
|
-
|
|
63
|
-
.group-title {
|
|
64
|
-
padding: 4px 8px;
|
|
65
|
-
font-size: 90%;
|
|
66
|
-
font-weight: bold;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.group-editor {
|
|
70
|
-
padding: 4px 8px;
|
|
71
|
-
font-size: 0.9em;
|
|
72
|
-
|
|
73
|
-
.label {
|
|
74
|
-
padding: 0 0 8px 0;
|
|
75
|
-
|
|
76
|
-
label {
|
|
77
|
-
min-width: 6em;
|
|
78
|
-
max-width: 6em;
|
|
79
|
-
padding-right: 0.5em;
|
|
80
|
-
font-weight: bold;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.property-editor {
|
|
86
|
-
padding: 4px 8px;
|
|
87
|
-
font-size: 0.9em;
|
|
88
|
-
|
|
89
|
-
> .label {
|
|
90
|
-
padding: 0 0 8px 0;
|
|
91
|
-
|
|
92
|
-
label {
|
|
93
|
-
min-width: 6em;
|
|
94
|
-
max-width: 6em;
|
|
95
|
-
padding-right: 0.5em;
|
|
96
|
-
font-weight: bold;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.property-editor:nth-child(n+2) {
|
|
102
|
-
margin-top: 4px
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
@import "./property-editor-image";
|
|
106
|
-
@import "./property-editor-multiline-text";
|
|
107
|
-
@import "./property-editor-product";
|
|
108
|
-
@import "./property-editor-readonly-text";
|
|
109
|
-
@import "./property-editor-select";
|
|
110
|
-
@import "./property-editor-text";
|
|
111
|
-
|
|
112
|
-
@import "./property-group-editor-background";
|
|
113
|
-
@import "./property-group-editor-border";
|
|
114
|
-
@import "./property-group-editor-position";
|
|
115
|
-
@import "./property-group-editor-size";
|
|
116
|
-
|
|
117
|
-
@import "./property-localpart";
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.pb-color-picker {
|
|
123
|
-
display: inline-flex;
|
|
124
|
-
position: relative;
|
|
125
|
-
|
|
126
|
-
.buttons {
|
|
127
|
-
display: flex;
|
|
128
|
-
padding: 0;
|
|
129
|
-
|
|
130
|
-
button {
|
|
131
|
-
width: 24px;
|
|
132
|
-
height: 24px;
|
|
133
|
-
display: flex;
|
|
134
|
-
justify-content: center;
|
|
135
|
-
align-items: center;
|
|
136
|
-
|
|
137
|
-
&.none {
|
|
138
|
-
position: relative;
|
|
139
|
-
overflow: hidden;
|
|
140
|
-
|
|
141
|
-
&::after {
|
|
142
|
-
content: "\00A0";
|
|
143
|
-
display: inline-block;
|
|
144
|
-
width: 100px;
|
|
145
|
-
height: 1px;
|
|
146
|
-
background: red;
|
|
147
|
-
position: absolute;
|
|
148
|
-
top: 50%;
|
|
149
|
-
left: 50%;
|
|
150
|
-
transform: translate(-50%, -50%) rotate(45deg);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
&.picker-button {
|
|
155
|
-
border: 1px solid #cccccc;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
i {
|
|
159
|
-
font-size: 1.4rem;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.sketch-wrap {
|
|
165
|
-
width: 220px;
|
|
166
|
-
position: absolute;
|
|
167
|
-
z-index: 10;
|
|
168
|
-
left: -12px;
|
|
169
|
-
top: 24px;
|
|
170
|
-
white-space: break-spaces;
|
|
171
|
-
text-align: left;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.pb-part-add-modal {
|
|
176
|
-
.group {
|
|
177
|
-
|
|
178
|
-
.part {
|
|
179
|
-
@extend .bs-clickable;
|
|
180
|
-
border: 1px solid $color-border-light;
|
|
181
|
-
border-radius: 4px;
|
|
182
|
-
padding: 8px 16px;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@import '@g1cloud/page-builder-viewer/css/page-builder-viewer';
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
.group-editor-background {
|
|
2
|
-
padding: 4px 8px;
|
|
3
|
-
font-size: 0.9em;
|
|
4
|
-
|
|
5
|
-
> div {
|
|
6
|
-
> label {
|
|
7
|
-
min-width: 6em;
|
|
8
|
-
max-width: 6em;
|
|
9
|
-
padding-right: 0.5em;
|
|
10
|
-
font-weight: bold;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.color {
|
|
15
|
-
flex: 1;
|
|
16
|
-
display: flex;
|
|
17
|
-
flex-direction: row;
|
|
18
|
-
align-items: center;
|
|
19
|
-
|
|
20
|
-
.bs-text-input {
|
|
21
|
-
flex-grow: 1;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.image {
|
|
26
|
-
flex: 1;
|
|
27
|
-
padding-left: 8px;
|
|
28
|
-
|
|
29
|
-
button {
|
|
30
|
-
color: #fff;
|
|
31
|
-
border: none;
|
|
32
|
-
padding: 4px 12px;
|
|
33
|
-
cursor: pointer;
|
|
34
|
-
line-height: 1;
|
|
35
|
-
width: 100px;
|
|
36
|
-
height: 28px;
|
|
37
|
-
background-color: #1f8fff;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
package/css/variable.scss
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
$color-canvas-frame-bg: #aaa;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { defineComponent, openBlock, createBlock, unref, withCtx, createElementVNode, createElementBlock, Fragment, renderList, toDisplayString } from "vue";
|
|
2
|
-
import { useModalHandle, BSModalFrame } from "@g1cloud/bluesea";
|
|
3
|
-
const _hoisted_1 = { class: "bs-layout-vertical pb-part-add-modal" };
|
|
4
|
-
const _hoisted_2 = { class: "bs-layout-horizontal-wrap ml-16 mb-8 gap-8" };
|
|
5
|
-
const _hoisted_3 = ["onClick", "textContent"];
|
|
6
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
-
__name: "PbPartAddModal",
|
|
8
|
-
props: {
|
|
9
|
-
pageBuilder: {},
|
|
10
|
-
partDefinitionGroups: {}
|
|
11
|
-
},
|
|
12
|
-
emits: ["selectHandler"],
|
|
13
|
-
setup(__props, { emit: __emit }) {
|
|
14
|
-
const emit = __emit;
|
|
15
|
-
const modalHandle = useModalHandle();
|
|
16
|
-
const select = (partDefinition) => {
|
|
17
|
-
emit("selectHandler", partDefinition);
|
|
18
|
-
modalHandle.close();
|
|
19
|
-
};
|
|
20
|
-
return (_ctx, _cache) => {
|
|
21
|
-
return openBlock(), createBlock(unref(BSModalFrame), { title: "Add Design Part" }, {
|
|
22
|
-
default: withCtx(() => [
|
|
23
|
-
createElementVNode("div", _hoisted_1, [
|
|
24
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.partDefinitionGroups, (group) => {
|
|
25
|
-
return openBlock(), createElementBlock("div", {
|
|
26
|
-
key: group.groupName,
|
|
27
|
-
class: "group mb-16"
|
|
28
|
-
}, [
|
|
29
|
-
createElementVNode("div", _hoisted_2, [
|
|
30
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(group.partDefinitions, (part) => {
|
|
31
|
-
return openBlock(), createElementBlock("div", {
|
|
32
|
-
key: part.partName,
|
|
33
|
-
class: "part",
|
|
34
|
-
onClick: ($event) => select(part),
|
|
35
|
-
textContent: toDisplayString(part.caption)
|
|
36
|
-
}, null, 8, _hoisted_3);
|
|
37
|
-
}), 128))
|
|
38
|
-
])
|
|
39
|
-
]);
|
|
40
|
-
}), 128))
|
|
41
|
-
])
|
|
42
|
-
]),
|
|
43
|
-
_: 1
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
export {
|
|
49
|
-
_sfc_main as default
|
|
50
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { defineComponent, openBlock, createElementBlock, createElementVNode, toDisplayString } from "vue";
|
|
2
|
-
import { useModal } from "@g1cloud/bluesea";
|
|
3
|
-
import { u as usePageBuilderEditor, P as PageBuilderEditorEvent } from "./index-BtILenNo.js";
|
|
4
|
-
const _hoisted_1 = { class: "property-editor property-editor-image flex-align-center" };
|
|
5
|
-
const _hoisted_2 = { class: "label" };
|
|
6
|
-
const _hoisted_3 = ["textContent"];
|
|
7
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
|
-
__name: "PbPropertyEditorImage",
|
|
9
|
-
props: {
|
|
10
|
-
property: {},
|
|
11
|
-
value: {}
|
|
12
|
-
},
|
|
13
|
-
emits: ["update-property-value"],
|
|
14
|
-
setup(__props, { emit: __emit }) {
|
|
15
|
-
useModal();
|
|
16
|
-
const pageBuilder = usePageBuilderEditor();
|
|
17
|
-
const emit = __emit;
|
|
18
|
-
const selectImage = () => {
|
|
19
|
-
PageBuilderEditorEvent.emit.requestImage({
|
|
20
|
-
pageBuilderId: pageBuilder.instanceId,
|
|
21
|
-
callback: (url) => {
|
|
22
|
-
emit("update-property-value", { image: url });
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
return (_ctx, _cache) => {
|
|
27
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
28
|
-
createElementVNode("div", _hoisted_2, [
|
|
29
|
-
createElementVNode("label", {
|
|
30
|
-
textContent: toDisplayString(_ctx.property.caption)
|
|
31
|
-
}, null, 8, _hoisted_3)
|
|
32
|
-
]),
|
|
33
|
-
createElementVNode("div", null, [
|
|
34
|
-
createElementVNode("button", { onClick: selectImage }, "Select Image")
|
|
35
|
-
])
|
|
36
|
-
]);
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
export {
|
|
41
|
-
_sfc_main as default
|
|
42
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { defineComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, createVNode, unref } from "vue";
|
|
2
|
-
import { BSTextArea } from "@g1cloud/bluesea";
|
|
3
|
-
const _hoisted_1 = { class: "property-editor property-editor-multiline-text" };
|
|
4
|
-
const _hoisted_2 = { class: "label" };
|
|
5
|
-
const _hoisted_3 = ["textContent"];
|
|
6
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
-
__name: "PbPropertyEditorMultilineText",
|
|
8
|
-
props: {
|
|
9
|
-
property: {},
|
|
10
|
-
value: {}
|
|
11
|
-
},
|
|
12
|
-
emits: ["update-property-value"],
|
|
13
|
-
setup(__props, { emit: __emit }) {
|
|
14
|
-
const props = __props;
|
|
15
|
-
const emit = __emit;
|
|
16
|
-
const emitUpdatePropertyValue = (value) => {
|
|
17
|
-
const properties = {};
|
|
18
|
-
properties[props.property.propertyName] = value;
|
|
19
|
-
emit("update-property-value", properties);
|
|
20
|
-
};
|
|
21
|
-
return (_ctx, _cache) => {
|
|
22
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
23
|
-
createElementVNode("div", _hoisted_2, [
|
|
24
|
-
createElementVNode("label", {
|
|
25
|
-
textContent: toDisplayString(_ctx.property.caption)
|
|
26
|
-
}, null, 8, _hoisted_3)
|
|
27
|
-
]),
|
|
28
|
-
createElementVNode("div", null, [
|
|
29
|
-
createVNode(unref(BSTextArea), {
|
|
30
|
-
"model-value": _ctx.value,
|
|
31
|
-
height: "60px",
|
|
32
|
-
width: "100%",
|
|
33
|
-
"onUpdate:modelValue": emitUpdatePropertyValue
|
|
34
|
-
}, null, 8, ["model-value"])
|
|
35
|
-
])
|
|
36
|
-
]);
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
export {
|
|
41
|
-
_sfc_main as default
|
|
42
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { defineComponent, openBlock, createElementBlock, createElementVNode, toDisplayString } from "vue";
|
|
2
|
-
import { useModal } from "@g1cloud/bluesea";
|
|
3
|
-
import { u as usePageBuilderEditor, P as PageBuilderEditorEvent } from "./index-BtILenNo.js";
|
|
4
|
-
const _hoisted_1 = { class: "property-editor property-editor-product flex-align-center" };
|
|
5
|
-
const _hoisted_2 = { class: "label" };
|
|
6
|
-
const _hoisted_3 = ["textContent"];
|
|
7
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
|
-
__name: "PbPropertyEditorProduct",
|
|
9
|
-
props: {
|
|
10
|
-
property: {},
|
|
11
|
-
value: {}
|
|
12
|
-
},
|
|
13
|
-
emits: ["update-property-value"],
|
|
14
|
-
setup(__props, { emit: __emit }) {
|
|
15
|
-
const pageBuilder = usePageBuilderEditor();
|
|
16
|
-
useModal();
|
|
17
|
-
const emit = __emit;
|
|
18
|
-
const selectProducts = () => {
|
|
19
|
-
var _a;
|
|
20
|
-
let itemCodes = "";
|
|
21
|
-
const selectedParts = pageBuilder.context.getSelectedParts();
|
|
22
|
-
if (selectedParts && selectedParts.length === 1) {
|
|
23
|
-
itemCodes = ((_a = selectedParts[0].properties) == null ? void 0 : _a.products) || "";
|
|
24
|
-
}
|
|
25
|
-
PageBuilderEditorEvent.emit.requestProducts({
|
|
26
|
-
pageBuilderId: pageBuilder.instanceId,
|
|
27
|
-
itemCodes,
|
|
28
|
-
callback: (products) => {
|
|
29
|
-
emit("update-property-value", { products: products.map((v) => v.itemCode).join(",") });
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
return (_ctx, _cache) => {
|
|
34
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
35
|
-
createElementVNode("div", _hoisted_2, [
|
|
36
|
-
createElementVNode("label", {
|
|
37
|
-
textContent: toDisplayString(_ctx.property.caption)
|
|
38
|
-
}, null, 8, _hoisted_3)
|
|
39
|
-
]),
|
|
40
|
-
createElementVNode("div", null, [
|
|
41
|
-
createElementVNode("button", { onClick: selectProducts }, "Select Product")
|
|
42
|
-
])
|
|
43
|
-
]);
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
export {
|
|
48
|
-
_sfc_main as default
|
|
49
|
-
};
|