@g1cloud/page-builder-editor 1.0.0-alpha.21 → 1.0.0-alpha.23

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.
Files changed (70) hide show
  1. package/css/canvas.scss +16 -136
  2. package/css/{canvas-block.scss → page-block.scss} +15 -3
  3. package/css/page-builder-editor.scss +6 -14
  4. package/css/{canvas-page.scss → page-page.scss} +23 -16
  5. package/css/{canvas-section.scss → page-section.scss} +15 -3
  6. package/css/{canvas-widget.scss → page-widget.scss} +15 -3
  7. package/css/page.scss +79 -0
  8. package/css/property-editor-youtube.scss +16 -0
  9. package/dist/PageBuilderEditor.vue.d.ts +4 -4
  10. package/dist/PbHtmlEditorModal-dDR38rNy.js +187 -0
  11. package/dist/{PbPropertyEditorColor-BFMkFOYX.js → PbPropertyEditorColor-B6yhXmGL.js} +1 -1
  12. package/dist/{PbPropertyEditorHtml-DZw8qbJH.js → PbPropertyEditorHtml-fgIO3jaY.js} +4 -3
  13. package/dist/{PbPropertyEditorImage-BQhiQyNM.js → PbPropertyEditorImage-6WNkin_o.js} +3 -3
  14. package/dist/{PbPropertyEditorMultilineText-CT3vTbYY.js → PbPropertyEditorMultilineText-3hJVRryR.js} +1 -1
  15. package/dist/{PbPropertyEditorText-DmM_LMjC.js → PbPropertyEditorText-DZA84Sn1.js} +1 -1
  16. package/dist/PbPropertyEditorYoutube-DtcxO2uZ.js +39 -0
  17. package/dist/{PbScreenSelectModal-DDATc9n1.js → PbScreenSelectModal-CnI1IsvW.js} +3 -4
  18. package/dist/{PbWidgetAddModal-BoYfb0dm.js → PbWidgetAddModal-DO1t-xsl.js} +19 -21
  19. package/dist/PbYoutubeModal-DFb6CQyW.js +68 -0
  20. package/dist/components/canvas/PbCanvas.vue.d.ts +1 -1
  21. package/dist/components/depart/PbLoginDepart.vue.d.ts +3 -3
  22. package/dist/components/menu/PbMenu.vue.d.ts +3 -3
  23. package/dist/components/menu/PbToolbar.vue.d.ts +3 -3
  24. package/dist/components/menu/PbToolbarButton.vue.d.ts +3 -3
  25. package/dist/components/menu/PbToolbarButtonGroup.vue.d.ts +3 -3
  26. package/dist/components/modal/PbHtmlEditorModal.vue.d.ts +7 -4
  27. package/dist/components/modal/PbPartAddModal.vue.d.ts +4 -4
  28. package/dist/components/modal/PbScreenSelectModal.vue.d.ts +2 -2
  29. package/dist/components/modal/PbWidgetAddModal.vue.d.ts +4 -4
  30. package/dist/components/modal/PbYoutubeModal.vue.d.ts +19 -0
  31. package/dist/components/navigator/PbNavigator.vue.d.ts +1 -1
  32. package/dist/components/part/PbAddWidgetButton.vue.d.ts +1 -1
  33. package/dist/components/part/PbBlock.vue.d.ts +3 -3
  34. package/dist/components/part/PbContainerWidget.vue.d.ts +19 -0
  35. package/dist/components/part/PbPage.vue.d.ts +5 -5
  36. package/dist/components/part/PbPageFrame.vue.d.ts +21 -0
  37. package/dist/components/part/PbSection.vue.d.ts +3 -3
  38. package/dist/components/part/PbWidget.vue.d.ts +3 -3
  39. package/dist/components/sidebar/PbSidebar.vue.d.ts +1 -1
  40. package/dist/components/sidebar/PbSidebarProperties.vue.d.ts +1 -1
  41. package/dist/components/sidebar/PbSidebarPropertyEditor.vue.d.ts +3 -3
  42. package/dist/components/sidebar/PbSidebarPropertyGroupEditor.vue.d.ts +3 -3
  43. package/dist/components/sidebar/property/PbPropertyEditorColor.vue.d.ts +4 -4
  44. package/dist/components/sidebar/property/PbPropertyEditorHtml.vue.d.ts +4 -4
  45. package/dist/components/sidebar/property/PbPropertyEditorImage.vue.d.ts +7 -6
  46. package/dist/components/sidebar/property/PbPropertyEditorMultilineText.vue.d.ts +4 -4
  47. package/dist/components/sidebar/property/PbPropertyEditorReadonlyText.vue.d.ts +3 -3
  48. package/dist/components/sidebar/property/PbPropertyEditorSelect.vue.d.ts +4 -4
  49. package/dist/components/sidebar/property/PbPropertyEditorText.vue.d.ts +4 -4
  50. package/dist/components/sidebar/property/PbPropertyEditorYoutube.vue.d.ts +23 -0
  51. package/dist/components/sidebar/property/PbPropertyGroupEditorBackground.vue.d.ts +3 -3
  52. package/dist/components/sidebar/property/PbPropertyGroupEditorBorder.vue.d.ts +3 -3
  53. package/dist/components/sidebar/property/PbPropertyGroupEditorMargin.vue.d.ts +3 -3
  54. package/dist/components/sidebar/property/PbPropertyGroupEditorPadding.vue.d.ts +3 -3
  55. package/dist/components/sidebar/property/PbPropertyGroupEditorPosition.vue.d.ts +3 -3
  56. package/dist/components/sidebar/property/PbPropertyGroupEditorSize.vue.d.ts +3 -3
  57. package/dist/components/ui/PbColorPicker.vue.d.ts +20 -7
  58. package/dist/{index-Cr-_-n9T.js → index-JVyoOgGq.js} +1530 -1262
  59. package/dist/model/context.d.ts +6 -0
  60. package/dist/model/default-part-property-group.d.ts +1 -0
  61. package/dist/model/page-builder-editor.d.ts +4 -0
  62. package/dist/model/page-builder-util.d.ts +2 -0
  63. package/dist/model/part-definintion.d.ts +1 -1
  64. package/dist/model/part-manager.d.ts +2 -0
  65. package/dist/model/part-property.d.ts +0 -2
  66. package/dist/page-builder-editor.js +19 -16
  67. package/dist/page-builder-editor.umd.cjs +1831 -1408
  68. package/package.json +8 -6
  69. package/dist/PbHtmlEditorModal-aaecwH7V.js +0 -131
  70. package/dist/components/canvas/PbCanvasFrame.vue.d.ts +0 -2
package/css/canvas.scss CHANGED
@@ -1,146 +1,26 @@
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
- margin: 0;
22
- }
23
1
 
24
2
  .pb-canvas-wrapper {
25
- padding: 32px 40px 56px 40px;
26
- height: 100%;
27
3
  background-color: $color-canvas-frame-bg;
4
+ flex-grow: 1;
5
+ min-width: 0;
6
+ width: 0;
7
+ height: 100%;
8
+ padding: 20px;
28
9
  overflow: auto;
29
-
30
- .pb-canvas {
31
- // background-color: white;
32
- display: flex;
33
- flex-direction: row;
34
- transform-origin: top left;
35
-
36
- width: fit-content;
37
- min-width: 40px;
38
- min-height: 40px;
39
- // box-shadow: 4px 4px 8px $color-gray;
40
- margin: 0 auto;
41
- // margin-bottom: 100px;
42
- }
43
- }
44
-
45
- .pb-position-mark {
46
- background-color: #ff3333;
47
- opacity: 0.5;
48
- border-radius: 2px;
49
- // z-index: 999;
50
- }
51
-
52
- .pb-add-section-handle {
53
- position: relative;
54
- // width: 33.33%;
55
- // background: rgba(230, 126, 34, 0.5);
56
- // position: relative;
57
- text-align: center;
58
- cursor: pointer;
59
- z-index: 5;
60
- height: 0;
61
- // opacity: 0;
62
- // margin: 0;
63
-
64
- &.top::before,
65
- &.bottom::before,
66
- &.middle::before {
67
- content: '';
68
- position: absolute;
69
- left: 0;
70
- right: 0;
71
- top: 0;
72
- // height: 2px;
73
- // background: rgba(0, 0, 0, 0.5);
74
- opacity: 0;
75
- pointer-events: none;
76
- }
77
-
78
- &.top {
79
- // top: 0;
80
- // left: 50%;
81
- // transform: translate(-50%, -50%);
82
- // margin-top: 24px;
83
- // margin-bottom: 24px;
84
- }
85
-
86
- &.middle {
87
- // top: 0;
88
- // left: 50%;
89
- // transform: translate(-50%, -50%);
90
- // margin-top: 24px;
91
- // margin-bottom: 24px;
92
- }
93
-
94
- &.bottom {
95
- // bottom: 0;
96
- left: 50%;
97
- bottom: -32px;
98
- // transform: translate(-50%, 50%);
99
- // margin-top: 24px;
100
- }
101
-
102
- &:hover {
103
- // opacity: 1;
104
-
105
- &.top::before,
106
- &.bottom::before,
107
- &.middle::before,
108
- > i {
109
- opacity: 1;
110
- }
111
- }
112
-
113
- > i {
114
- vertical-align: middle;
115
- position: absolute;
116
- top: 50%;
117
- left: 0;
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
10
  }
130
11
 
131
- .pb-guideline {
132
- position: absolute;
133
- top: 0;
134
- left: 0;
135
- width: 100%;
12
+ .pb-canvas {
13
+ display: flex;
14
+ flex-direction: row;
15
+ transform-origin: top left;
16
+ width: fit-content;
136
17
  height: 100%;
137
- pointer-events: none;
18
+ margin: 0;
19
+ }
138
20
 
139
- &.selected {
140
- z-index: 3;
141
- }
21
+ .pb-page-frame {
142
22
 
143
- &.preselect {
144
- z-index: 4;
23
+ iframe.page-frame {
24
+ border: 0;
145
25
  }
146
- }
26
+ }
@@ -12,9 +12,21 @@
12
12
  background-color: #f0f0f0;
13
13
  }
14
14
 
15
- &.selected {
16
- outline: 2px solid #4998f8;
17
- outline-offset: 1px;
15
+ //&.selected {
16
+ // outline: 2px solid #4998f8;
17
+ // outline-offset: -2px;
18
+ // z-index: 999;
19
+ //}
20
+
21
+ &.selected::before {
22
+ content: "";
23
+ position: absolute;
24
+ top: 0;
25
+ left: 0;
26
+ right: 0;
27
+ bottom: 0;
28
+ border: 2px solid #4998f8;
18
29
  z-index: 999;
30
+ pointer-events: none;
19
31
  }
20
32
  }
@@ -1,14 +1,5 @@
1
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
- }
2
+ @import 'canvas';
12
3
 
13
4
  .pb-menu {
14
5
  width: 100%;
@@ -75,7 +66,6 @@
75
66
  }
76
67
  }
77
68
 
78
-
79
69
  .pb-sidebar {
80
70
  width: 300px;
81
71
  overflow: auto;
@@ -234,7 +224,11 @@
234
224
 
235
225
  .content {
236
226
  border: solid 1px #ccc;
237
- overflow-y: auto;
227
+
228
+ iframe {
229
+ width: 100%;
230
+ height: 100%;
231
+ }
238
232
  }
239
233
  }
240
234
 
@@ -245,7 +239,6 @@
245
239
  height: 60%;
246
240
 
247
241
  .content {
248
- overflow-y: auto;
249
242
  }
250
243
  }
251
244
 
@@ -253,7 +246,6 @@
253
246
  height: 40%;
254
247
 
255
248
  .content {
256
- overflow-y: auto;
257
249
  }
258
250
  }
259
251
 
@@ -1,25 +1,32 @@
1
- .pb-page {
2
- // @import "pb-simple-carousel";
3
- // @import "pb-simple-html";
4
- // @import "pb-simple-media";
5
- // @import "pb-simple-button";
6
- // @import "pb-animation";
7
- // @import "coupon-download";
8
- // @import "pb-tabs";
9
- // @import "pb-image-map";
10
-
1
+ .pb-page-wrapper {
11
2
  margin: 0 auto;
12
- margin-top: 20px;
3
+ padding: 0;
4
+ }
5
+
6
+ .pb-page {
7
+ width: 100%;
8
+ margin: 0;
13
9
  background-position: 50% 50%;
14
10
  background-repeat: no-repeat;
15
11
  background-size: cover;
16
- // background-color: white;
17
12
 
18
13
  .pb-page-content {
19
- &.selected {
20
- outline: 2px solid #4998f8;
21
- outline-offset: 5px;
22
- // z-index: 9999;
14
+ //&.selected {
15
+ // outline: 2px solid #4998f8;
16
+ // outline-offset: -2px;
17
+ // z-index: 999;
18
+ //}
19
+
20
+ &.selected::before {
21
+ content: "";
22
+ position: absolute;
23
+ top: 0;
24
+ left: 0;
25
+ right: 0;
26
+ bottom: 0;
27
+ border: 2px solid #4998f8;
28
+ z-index: 999;
29
+ pointer-events: none;
23
30
  }
24
31
  }
25
32
 
@@ -10,10 +10,22 @@
10
10
  background-color: #f0f0f0;
11
11
  }
12
12
 
13
- &.selected {
14
- outline: 2px solid #4998f8;
15
- outline-offset: 1px;
13
+ //&.selected {
14
+ // outline: 2px solid #4998f8;
15
+ // outline-offset: -2px;
16
+ // z-index: 999;
17
+ //}
18
+
19
+ &.selected::before {
20
+ content: "";
21
+ position: absolute;
22
+ top: 0;
23
+ left: 0;
24
+ right: 0;
25
+ bottom: 0;
26
+ border: 2px solid #4998f8;
16
27
  z-index: 999;
28
+ pointer-events: none;
17
29
  }
18
30
 
19
31
  &.pb-section-static {
@@ -5,10 +5,22 @@
5
5
  background-repeat: no-repeat;
6
6
  background-size: cover;
7
7
 
8
- &.selected {
9
- outline: 2px solid #4998f8;
10
- outline-offset: 1px;
8
+ //&.selected {
9
+ // outline: 2px solid #4998f8;
10
+ // outline-offset: -2px;
11
+ // z-index: 999;
12
+ //}
13
+
14
+ &.selected::before {
15
+ content: "";
16
+ position: absolute;
17
+ top: 0;
18
+ left: 0;
19
+ right: 0;
20
+ bottom: 0;
21
+ border: 2px solid #4998f8;
11
22
  z-index: 999;
23
+ pointer-events: none;
12
24
  }
13
25
 
14
26
  .children {
package/css/page.scss ADDED
@@ -0,0 +1,79 @@
1
+ @import 'variable';
2
+ @import 'page-page';
3
+ @import 'page-section';
4
+ @import 'page-block';
5
+ @import 'page-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
+ margin: 0;
20
+ padding: 0;
21
+ background-color: $color-canvas-frame-bg;
22
+ overflow: hidden;
23
+ }
24
+
25
+ .pb-position-mark {
26
+ background-color: #ff3333;
27
+ opacity: 0.5;
28
+ border-radius: 2px;
29
+ }
30
+
31
+ .pb-add-section-handle {
32
+ position: relative;
33
+ text-align: center;
34
+ cursor: pointer;
35
+ z-index: 5;
36
+ height: 0;
37
+
38
+ &.top::before,
39
+ &.bottom::before,
40
+ &.middle::before {
41
+ content: '';
42
+ position: absolute;
43
+ left: 0;
44
+ right: 0;
45
+ top: 0;
46
+ opacity: 0;
47
+ pointer-events: none;
48
+ }
49
+
50
+ &.top {
51
+ }
52
+
53
+ &.middle {
54
+ }
55
+
56
+ &.bottom {
57
+ left: 50%;
58
+ bottom: -32px;
59
+ }
60
+
61
+ &:hover {
62
+ &.top::before,
63
+ &.bottom::before,
64
+ &.middle::before,
65
+ > i {
66
+ opacity: 1;
67
+ }
68
+ }
69
+
70
+ > i {
71
+ vertical-align: middle;
72
+ position: absolute;
73
+ top: 50%;
74
+ left: 0;
75
+ font-size: 2rem;
76
+ transform: translate(-50%, -50%);
77
+ opacity: 0.2;
78
+ }
79
+ }
@@ -0,0 +1,16 @@
1
+ .property-editor-youtube {
2
+ button {
3
+ color: #fff;
4
+ border: none;
5
+ padding: 4px 12px;
6
+ cursor: pointer;
7
+ line-height: 1;
8
+ width: 120px;
9
+ height: 28px;
10
+ background-color: #1f8fff;
11
+ }
12
+
13
+ .input-area {
14
+ height: 24px;
15
+ }
16
+ }
@@ -1,6 +1,6 @@
1
1
  import { PageBuilderToolbarPlugin } from './model/plugin.ts';
2
2
 
3
- declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<{
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
4
4
  instanceId?: string | undefined;
5
5
  title?: string | undefined;
6
6
  pageContent?: string | undefined;
@@ -8,9 +8,9 @@ declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimePr
8
8
  locale?: string | undefined;
9
9
  toolbarPlugin?: PageBuilderToolbarPlugin | undefined;
10
10
  plugin?: unknown;
11
- }>, {
11
+ }>>, {
12
12
  getPageContent: () => string;
13
- }, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
13
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
14
14
  instanceId?: string | undefined;
15
15
  title?: string | undefined;
16
16
  pageContent?: string | undefined;
@@ -18,7 +18,7 @@ declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimePr
18
18
  locale?: string | undefined;
19
19
  toolbarPlugin?: PageBuilderToolbarPlugin | undefined;
20
20
  plugin?: unknown;
21
- }>>>, {}, {}>;
21
+ }>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
22
22
  export default _default;
23
23
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
24
24
  type __VLS_TypePropsToRuntimeProps<T> = {
@@ -0,0 +1,187 @@
1
+ import { defineComponent, ref, computed, onMounted, onBeforeUnmount, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, createSlots, renderList, normalizeStyle } from "vue";
2
+ import { useModalHandle, waitDuring, BSModalFrame, BSTabSheet, BSSelect, BSCodeEditor } from "@g1cloud/bluesea";
3
+ const _hoisted_1 = { class: "bs-layout-vertical flex-grow-1 h-full" };
4
+ const _hoisted_2 = { class: "bs-layout-horizontal h-full pt-8" };
5
+ const _hoisted_3 = { class: "preview" };
6
+ const _hoisted_4 = { class: "bs-layout-vertical w-full h-full" };
7
+ const _hoisted_5 = { class: "bs-layout-horizontal pb-4 align-items-center justify-content-between" };
8
+ const _hoisted_6 = { class: "content flex-grow-1 overflow-y-hidden" };
9
+ const _hoisted_7 = ["srcdoc"];
10
+ const _hoisted_8 = { class: "editor bs-layout-vertical pl-8 h-full" };
11
+ const _sfc_main = /* @__PURE__ */ defineComponent({
12
+ __name: "PbHtmlEditorModal",
13
+ props: {
14
+ html: {},
15
+ locales: {},
16
+ localeTabs: {},
17
+ pageBuilder: {}
18
+ },
19
+ emits: ["updateHtml"],
20
+ setup(__props, { emit: __emit }) {
21
+ const props = __props;
22
+ const emit = __emit;
23
+ const localeTabId = ref(props.localeTabs && props.localeTabs[0].tabId);
24
+ const modalHandle = useModalHandle();
25
+ const html = ref(props.html || {});
26
+ const previewWidth = ref(480);
27
+ const previewStyle = computed(() => ({
28
+ width: `${previewWidth.value}px`,
29
+ height: "100%",
30
+ overflow: "auto",
31
+ transformOrigin: `top left`
32
+ }));
33
+ const preview = computed(() => {
34
+ var _a;
35
+ let data = {};
36
+ const externalCss = props.pageBuilder.getExternalCss();
37
+ (_a = props.locales) == null ? void 0 : _a.forEach((locale) => {
38
+ const _html = html.value[locale] || { tags: "", style: "" };
39
+ data[locale] = _html.tags ? `${externalCss}
40
+ <style>${_html.style}</style>
41
+ ${_html.tags}` : "";
42
+ });
43
+ return data;
44
+ });
45
+ const editorTabs = [
46
+ { tabId: "tags", caption: "Tags" },
47
+ { tabId: "style", caption: "Style" }
48
+ ];
49
+ const editorTabId = ref("tags");
50
+ const updateTags = (locale, value) => {
51
+ if (!html.value) html.value = {};
52
+ if (!html.value[locale]) html.value[locale] = {};
53
+ html.value[locale].tags = value;
54
+ };
55
+ const updateStyle = (locale, value) => {
56
+ if (!html.value) html.value = {};
57
+ if (!html.value[locale]) html.value[locale] = {};
58
+ html.value[locale].style = value;
59
+ };
60
+ const ok = () => {
61
+ emit("updateHtml", html.value);
62
+ modalHandle.close();
63
+ };
64
+ const editorHeight = ref("");
65
+ const updateEditorHeight = async () => {
66
+ await waitDuring(50);
67
+ if (editorHeight.value) {
68
+ const editor = document.querySelector(".bs-code-editor");
69
+ if (editor) {
70
+ editor.style.height = editorHeight.value;
71
+ }
72
+ }
73
+ };
74
+ let resizeObserver;
75
+ onMounted(async () => {
76
+ await waitDuring(50);
77
+ const editorParent = document.querySelector(".editor > .bs-tab-sheet > .bs-layout-vertical");
78
+ resizeObserver = new ResizeObserver(() => {
79
+ if (editorParent && editorParent.clientHeight) {
80
+ editorHeight.value = `${editorParent.clientHeight}px`;
81
+ updateEditorHeight();
82
+ }
83
+ });
84
+ if (editorParent) {
85
+ resizeObserver.observe(editorParent);
86
+ }
87
+ });
88
+ onBeforeUnmount(() => {
89
+ if (resizeObserver) {
90
+ resizeObserver.disconnect();
91
+ }
92
+ });
93
+ return (_ctx, _cache) => {
94
+ return openBlock(), createBlock(unref(BSModalFrame), {
95
+ class: "pb-html-editor-modal",
96
+ title: "HTML Editor"
97
+ }, {
98
+ default: withCtx(() => [
99
+ createElementVNode("div", _hoisted_1, [
100
+ createVNode(unref(BSTabSheet), {
101
+ "tab-id": localeTabId.value,
102
+ "onUpdate:tabId": [
103
+ _cache[2] || (_cache[2] = ($event) => localeTabId.value = $event),
104
+ updateEditorHeight
105
+ ],
106
+ tabs: _ctx.localeTabs,
107
+ class: "flex-grow-1"
108
+ }, createSlots({ _: 2 }, [
109
+ renderList(_ctx.locales, (locale) => {
110
+ return {
111
+ name: `tab-${locale}`,
112
+ fn: withCtx(() => [
113
+ createElementVNode("div", _hoisted_2, [
114
+ createElementVNode("div", _hoisted_3, [
115
+ createElementVNode("div", _hoisted_4, [
116
+ createElementVNode("div", _hoisted_5, [
117
+ _cache[3] || (_cache[3] = createElementVNode("div", { class: "title pb-4" }, "Preview", -1)),
118
+ createVNode(unref(BSSelect), {
119
+ modelValue: previewWidth.value,
120
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => previewWidth.value = $event),
121
+ items: [480, 768, 1024, 1280],
122
+ "label-provider": (v) => `Screen Size: ${v}px`,
123
+ "view-model": false
124
+ }, null, 8, ["modelValue", "label-provider"])
125
+ ]),
126
+ createElementVNode("div", _hoisted_6, [
127
+ createElementVNode("iframe", {
128
+ srcdoc: preview.value[locale],
129
+ style: normalizeStyle(previewStyle.value)
130
+ }, null, 12, _hoisted_7)
131
+ ])
132
+ ])
133
+ ]),
134
+ createElementVNode("div", _hoisted_8, [
135
+ createVNode(unref(BSTabSheet), {
136
+ "tab-id": editorTabId.value,
137
+ "onUpdate:tabId": [
138
+ _cache[1] || (_cache[1] = ($event) => editorTabId.value = $event),
139
+ updateEditorHeight
140
+ ],
141
+ tabs: editorTabs,
142
+ class: "compact flex-grow-1"
143
+ }, {
144
+ tags: withCtx(() => [
145
+ createVNode(unref(BSCodeEditor), {
146
+ "model-value": (html.value[locale] || {}).tags,
147
+ class: "border-top-0",
148
+ "editor-height": "100%",
149
+ lang: "html",
150
+ "onUpdate:modelValue": (value) => updateTags(locale, value)
151
+ }, null, 8, ["model-value", "onUpdate:modelValue"])
152
+ ]),
153
+ style: withCtx(() => [
154
+ createVNode(unref(BSCodeEditor), {
155
+ "model-value": (html.value[locale] || {}).style,
156
+ class: "border-top-0",
157
+ "editor-height": "100%",
158
+ lang: "css",
159
+ "onUpdate:modelValue": (value) => updateStyle(locale, value)
160
+ }, null, 8, ["model-value", "onUpdate:modelValue"])
161
+ ]),
162
+ _: 2
163
+ }, 1032, ["tab-id"])
164
+ ])
165
+ ])
166
+ ])
167
+ };
168
+ })
169
+ ]), 1032, ["tab-id", "tabs"])
170
+ ])
171
+ ]),
172
+ buttons: withCtx(() => [
173
+ createElementVNode("div", { class: "bs-layout-horizontal justify-content-center" }, [
174
+ createElementVNode("button", {
175
+ class: "mr-4",
176
+ onClick: ok
177
+ }, "OK")
178
+ ])
179
+ ]),
180
+ _: 1
181
+ });
182
+ };
183
+ }
184
+ });
185
+ export {
186
+ _sfc_main as default
187
+ };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, createVNode, unref } from "vue";
2
2
  import { BSTextInput } from "@g1cloud/bluesea";
3
- import { P as PbColorPicker } from "./index-Cr-_-n9T.js";
3
+ import { P as PbColorPicker } from "./index-JVyoOgGq.js";
4
4
  const _hoisted_1 = { class: "property-editor property-editor-color" };
5
5
  const _hoisted_2 = { class: "title" };
6
6
  const _hoisted_3 = ["textContent"];
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, defineAsyncComponent } from "vue";
2
2
  import { useModal } from "@g1cloud/bluesea";
3
- import { u as usePageBuilderEditor } from "./index-Cr-_-n9T.js";
3
+ import { u as usePageBuilderEditor } from "./index-JVyoOgGq.js";
4
4
  const _hoisted_1 = { class: "property-editor property-editor-image flex-align-center" };
5
5
  const _hoisted_2 = { class: "title" };
6
6
  const _hoisted_3 = ["textContent"];
@@ -20,7 +20,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
20
20
  const locales = pageBuilder.getLocales();
21
21
  const localeTabs = locales.map((v) => ({ tabId: `tab-${v}`, caption: v }));
22
22
  modal.openModal({
23
- component: defineAsyncComponent(() => import("./PbHtmlEditorModal-aaecwH7V.js")),
23
+ component: defineAsyncComponent(() => import("./PbHtmlEditorModal-dDR38rNy.js")),
24
24
  style: {
25
25
  width: "80%",
26
26
  height: "80%",
@@ -30,7 +30,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
30
30
  bind: {
31
31
  html: JSON.parse(JSON.stringify(props.value || {})),
32
32
  locales,
33
- localeTabs
33
+ localeTabs,
34
+ pageBuilder
34
35
  },
35
36
  on: {
36
37
  updateHtml: (html) => {