@g1cloud/page-builder-editor 1.0.0-alpha.22 → 1.0.0-alpha.25

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 (68) hide show
  1. package/css/canvas.scss +16 -114
  2. package/css/{canvas-block.scss → page-block.scss} +15 -3
  3. package/css/page-builder-editor.scss +1 -11
  4. package/css/{canvas-page.scss → page-page.scss} +18 -4
  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-pn7PlMQg.js → PbHtmlEditorModal-dDR38rNy.js} +33 -18
  11. package/dist/{PbPropertyEditorColor-C554e0iO.js → PbPropertyEditorColor-CjVPQ69L.js} +1 -1
  12. package/dist/{PbPropertyEditorHtml-CB99C_DG.js → PbPropertyEditorHtml-BA2fVHPA.js} +2 -2
  13. package/dist/{PbPropertyEditorImage-CMPr66Dx.js → PbPropertyEditorImage-DAGrURID.js} +3 -3
  14. package/dist/{PbPropertyEditorMultilineText-BR1FNVi6.js → PbPropertyEditorMultilineText-ru4ikHma.js} +1 -1
  15. package/dist/{PbPropertyEditorText-CWmfX2bt.js → PbPropertyEditorText-tVPcjTNt.js} +1 -1
  16. package/dist/PbPropertyEditorYoutube-Dlfj7kat.js +39 -0
  17. package/dist/{PbScreenSelectModal-DDATc9n1.js → PbScreenSelectModal-CnI1IsvW.js} +3 -4
  18. package/dist/{PbWidgetAddModal-haOQfRIi.js → PbWidgetAddModal-sKV_WrZY.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 +4 -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 +3 -3
  36. package/dist/components/part/{PbPageWrapper.vue.d.ts → PbPageFrame.vue.d.ts} +3 -3
  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-Bss8IrUk.js → index-B7bPjhdc.js} +1243 -1275
  59. package/dist/model/default-part-property-group.d.ts +1 -0
  60. package/dist/model/page-builder-editor.d.ts +1 -1
  61. package/dist/model/page-builder-util.d.ts +2 -0
  62. package/dist/model/part-definintion.d.ts +1 -1
  63. package/dist/model/part-manager.d.ts +2 -0
  64. package/dist/model/part-property.d.ts +0 -2
  65. package/dist/page-builder-editor.js +19 -16
  66. package/dist/page-builder-editor.umd.cjs +1484 -1403
  67. package/package.json +8 -6
  68. package/dist/components/canvas/PbCanvasFrame.vue.d.ts +0 -2
package/css/canvas.scss CHANGED
@@ -1,124 +1,26 @@
1
- @import 'variable';
2
- @import 'canvas-page';
3
- @import 'canvas-section';
4
- @import 'canvas-block';
5
- @import 'canvas-widget';
6
1
 
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;
2
+ .pb-canvas-wrapper {
21
3
  background-color: $color-canvas-frame-bg;
4
+ flex-grow: 1;
5
+ min-width: 0;
6
+ width: 0;
7
+ height: 100%;
8
+ padding: 20px;
22
9
  overflow: auto;
23
10
  }
24
11
 
25
- .pb-canvas-wrapper {
26
- margin: 0;
27
- padding: 0;
12
+ .pb-canvas {
13
+ display: flex;
14
+ flex-direction: row;
15
+ transform-origin: top left;
28
16
  width: fit-content;
29
- //overflow: auto;
30
-
31
- .pb-canvas {
32
- display: flex;
33
- flex-direction: row;
34
- flex: 1 1 auto;
35
- //flex-grow: 1;
36
- //flex-shrink: 1;
37
- transform-origin: top left;
38
- width: fit-content;
39
- //margin: 0 auto;
40
- margin: 0;
41
- //padding: 0;
42
- padding: 32px 40px 56px 40px;
43
- }
44
- }
45
-
46
- .pb-position-mark {
47
- background-color: #ff3333;
48
- opacity: 0.5;
49
- border-radius: 2px;
50
- }
51
-
52
- .pb-add-section-handle {
53
- position: relative;
54
- text-align: center;
55
- cursor: pointer;
56
- z-index: 5;
57
- height: 0;
58
-
59
- &.top::before,
60
- &.bottom::before,
61
- &.middle::before {
62
- content: '';
63
- position: absolute;
64
- left: 0;
65
- right: 0;
66
- top: 0;
67
- opacity: 0;
68
- pointer-events: none;
69
- }
70
-
71
- &.top {
72
- }
73
-
74
- &.middle {
75
- }
76
-
77
- &.bottom {
78
- left: 50%;
79
- bottom: -32px;
80
- }
81
-
82
- &:hover {
83
- &.top::before,
84
- &.bottom::before,
85
- &.middle::before,
86
- > i {
87
- opacity: 1;
88
- }
89
- }
90
-
91
- > i {
92
- vertical-align: middle;
93
- position: absolute;
94
- top: 50%;
95
- left: 0;
96
- font-size: 2rem;
97
- transform: translate(-50%, -50%);
98
- opacity: 0.2;
99
- }
100
- }
101
-
102
- .pb-button {
103
- background: none;
104
- border: none;
105
- cursor: pointer;
106
- vertical-align: middle;
107
- }
108
-
109
- .pb-guideline {
110
- position: absolute;
111
- top: 0;
112
- left: 0;
113
- width: 100%;
114
17
  height: 100%;
115
- pointer-events: none;
18
+ margin: 0;
19
+ }
116
20
 
117
- &.selected {
118
- z-index: 3;
119
- }
21
+ .pb-page-frame {
120
22
 
121
- &.preselect {
122
- z-index: 4;
23
+ iframe.page-frame {
24
+ border: 0;
123
25
  }
124
- }
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;
@@ -4,15 +4,29 @@
4
4
  }
5
5
 
6
6
  .pb-page {
7
- margin: 20px 0 auto 0;
7
+ width: 100%;
8
+ margin: 0;
8
9
  background-position: 50% 50%;
9
10
  background-repeat: no-repeat;
10
11
  background-size: cover;
11
12
 
12
13
  .pb-page-content {
13
- &.selected {
14
- outline: 2px solid #4998f8;
15
- outline-offset: 5px;
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;
16
30
  }
17
31
  }
18
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> = {
@@ -1,11 +1,11 @@
1
- import { defineComponent, ref, computed, onMounted, onBeforeUnmount, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, createSlots, renderList } from "vue";
2
- import { useModalHandle, waitDuring, BSModalFrame, BSTabSheet, BSCodeEditor } from "@g1cloud/bluesea";
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
3
  const _hoisted_1 = { class: "bs-layout-vertical flex-grow-1 h-full" };
4
4
  const _hoisted_2 = { class: "bs-layout-horizontal h-full pt-8" };
5
5
  const _hoisted_3 = { class: "preview" };
6
6
  const _hoisted_4 = { class: "bs-layout-vertical w-full h-full" };
7
- const _hoisted_5 = /* @__PURE__ */ createElementVNode("div", { class: "title pb-4" }, "Preview", -1);
8
- const _hoisted_6 = { class: "content flex-grow-1" };
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
9
  const _hoisted_7 = ["srcdoc"];
10
10
  const _hoisted_8 = { class: "editor bs-layout-vertical pl-8 h-full" };
11
11
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -23,6 +23,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
23
23
  const localeTabId = ref(props.localeTabs && props.localeTabs[0].tabId);
24
24
  const modalHandle = useModalHandle();
25
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
+ }));
26
33
  const preview = computed(() => {
27
34
  var _a;
28
35
  let data = {};
@@ -41,17 +48,13 @@ ${_html.tags}` : "";
41
48
  ];
42
49
  const editorTabId = ref("tags");
43
50
  const updateTags = (locale, value) => {
44
- if (!html.value)
45
- html.value = {};
46
- if (!html.value[locale])
47
- html.value[locale] = {};
51
+ if (!html.value) html.value = {};
52
+ if (!html.value[locale]) html.value[locale] = {};
48
53
  html.value[locale].tags = value;
49
54
  };
50
55
  const updateStyle = (locale, value) => {
51
- if (!html.value)
52
- html.value = {};
53
- if (!html.value[locale])
54
- html.value[locale] = {};
56
+ if (!html.value) html.value = {};
57
+ if (!html.value[locale]) html.value[locale] = {};
55
58
  html.value[locale].style = value;
56
59
  };
57
60
  const ok = () => {
@@ -97,7 +100,7 @@ ${_html.tags}` : "";
97
100
  createVNode(unref(BSTabSheet), {
98
101
  "tab-id": localeTabId.value,
99
102
  "onUpdate:tabId": [
100
- _cache[1] || (_cache[1] = ($event) => localeTabId.value = $event),
103
+ _cache[2] || (_cache[2] = ($event) => localeTabId.value = $event),
101
104
  updateEditorHeight
102
105
  ],
103
106
  tabs: _ctx.localeTabs,
@@ -110,11 +113,21 @@ ${_html.tags}` : "";
110
113
  createElementVNode("div", _hoisted_2, [
111
114
  createElementVNode("div", _hoisted_3, [
112
115
  createElementVNode("div", _hoisted_4, [
113
- _hoisted_5,
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
+ ]),
114
126
  createElementVNode("div", _hoisted_6, [
115
127
  createElementVNode("iframe", {
116
- srcdoc: preview.value[locale]
117
- }, null, 8, _hoisted_7)
128
+ srcdoc: preview.value[locale],
129
+ style: normalizeStyle(previewStyle.value)
130
+ }, null, 12, _hoisted_7)
118
131
  ])
119
132
  ])
120
133
  ]),
@@ -122,15 +135,16 @@ ${_html.tags}` : "";
122
135
  createVNode(unref(BSTabSheet), {
123
136
  "tab-id": editorTabId.value,
124
137
  "onUpdate:tabId": [
125
- _cache[0] || (_cache[0] = ($event) => editorTabId.value = $event),
138
+ _cache[1] || (_cache[1] = ($event) => editorTabId.value = $event),
126
139
  updateEditorHeight
127
140
  ],
128
141
  tabs: editorTabs,
129
- class: "flex-grow-1"
142
+ class: "compact flex-grow-1"
130
143
  }, {
131
144
  tags: withCtx(() => [
132
145
  createVNode(unref(BSCodeEditor), {
133
146
  "model-value": (html.value[locale] || {}).tags,
147
+ class: "border-top-0",
134
148
  "editor-height": "100%",
135
149
  lang: "html",
136
150
  "onUpdate:modelValue": (value) => updateTags(locale, value)
@@ -139,6 +153,7 @@ ${_html.tags}` : "";
139
153
  style: withCtx(() => [
140
154
  createVNode(unref(BSCodeEditor), {
141
155
  "model-value": (html.value[locale] || {}).style,
156
+ class: "border-top-0",
142
157
  "editor-height": "100%",
143
158
  lang: "css",
144
159
  "onUpdate:modelValue": (value) => updateStyle(locale, value)
@@ -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-Bss8IrUk.js";
3
+ import { P as PbColorPicker } from "./index-B7bPjhdc.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-Bss8IrUk.js";
3
+ import { u as usePageBuilderEditor } from "./index-B7bPjhdc.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-pn7PlMQg.js")),
23
+ component: defineAsyncComponent(() => import("./PbHtmlEditorModal-dDR38rNy.js")),
24
24
  style: {
25
25
  width: "80%",
26
26
  height: "80%",
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, openBlock, createElementBlock, createElementVNode, toDisplayString } from "vue";
2
- import { u as usePageBuilderEditor } from "./index-Bss8IrUk.js";
2
+ import { u as usePageBuilderEditor } from "./index-B7bPjhdc.js";
3
3
  import { useModal } from "@g1cloud/bluesea";
4
4
  const _hoisted_1 = { class: "property-editor property-editor-image flex-align-center" };
5
5
  const _hoisted_2 = { class: "title" };
@@ -18,8 +18,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
18
18
  const selectImage = () => {
19
19
  const imageProvider = pageBuilder.getProvider("imageProvider");
20
20
  if (imageProvider) {
21
- imageProvider({ modal }, (url) => {
22
- emit("update-property-value", { image: url });
21
+ imageProvider({ modal }, (media) => {
22
+ emit("update-property-value", { media });
23
23
  });
24
24
  }
25
25
  };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, computed, openBlock, createElementBlock, createElementVNode, toDisplayString, createBlock, unref } from "vue";
2
2
  import { BSMultiLangTextArea, BSTextArea } from "@g1cloud/bluesea";
3
- import { u as usePageBuilderEditor } from "./index-Bss8IrUk.js";
3
+ import { u as usePageBuilderEditor } from "./index-B7bPjhdc.js";
4
4
  const _hoisted_1 = { class: "property-editor property-editor-multiline-text" };
5
5
  const _hoisted_2 = { class: "title" };
6
6
  const _hoisted_3 = ["textContent"];
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, computed, openBlock, createElementBlock, createElementVNode, toDisplayString, createBlock, unref } from "vue";
2
2
  import { BSMultiLangTextInput, BSTextInput } from "@g1cloud/bluesea";
3
- import { u as usePageBuilderEditor } from "./index-Bss8IrUk.js";
3
+ import { u as usePageBuilderEditor } from "./index-B7bPjhdc.js";
4
4
  const _hoisted_1 = { class: "property-editor property-editor-text flex-align-center" };
5
5
  const _hoisted_2 = { class: "title" };
6
6
  const _hoisted_3 = ["textContent"];
@@ -0,0 +1,39 @@
1
+ import { defineComponent, openBlock, createElementBlock, createElementVNode, toDisplayString } from "vue";
2
+ import { useModal } from "@g1cloud/bluesea";
3
+ import { s as selectYoutubeVideo } from "./index-B7bPjhdc.js";
4
+ const _hoisted_1 = { class: "property-editor property-editor-image flex-align-center" };
5
+ const _hoisted_2 = { class: "title" };
6
+ const _hoisted_3 = ["textContent"];
7
+ const _sfc_main = /* @__PURE__ */ defineComponent({
8
+ __name: "PbPropertyEditorYoutube",
9
+ props: {
10
+ property: {},
11
+ value: {}
12
+ },
13
+ emits: ["update-property-value"],
14
+ setup(__props, { emit: __emit }) {
15
+ const props = __props;
16
+ const modal = useModal();
17
+ const emit = __emit;
18
+ const selectVideo = () => {
19
+ selectYoutubeVideo(modal, props.value, (url) => {
20
+ emit("update-property-value", { url: url || "" });
21
+ });
22
+ };
23
+ return (_ctx, _cache) => {
24
+ return openBlock(), createElementBlock("div", _hoisted_1, [
25
+ createElementVNode("div", _hoisted_2, [
26
+ createElementVNode("label", {
27
+ textContent: toDisplayString(_ctx.property.caption)
28
+ }, null, 8, _hoisted_3)
29
+ ]),
30
+ createElementVNode("div", null, [
31
+ createElementVNode("button", { onClick: selectVideo }, "Select Video")
32
+ ])
33
+ ]);
34
+ };
35
+ }
36
+ });
37
+ export {
38
+ _sfc_main as default
39
+ };
@@ -1,8 +1,7 @@
1
1
  import { defineComponent, ref, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode } from "vue";
2
2
  import { useModalHandle, BSModalFrame, BSRadioButton, BSButton } from "@g1cloud/bluesea";
3
3
  const _hoisted_1 = { class: "mb-16" };
4
- const _hoisted_2 = /* @__PURE__ */ createElementVNode("label", { class: "mr-8" }, "Which screen do you want to keep?", -1);
5
- const _hoisted_3 = { class: "text-right" };
4
+ const _hoisted_2 = { class: "text-right" };
6
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
7
6
  __name: "PbScreenSelectModal",
8
7
  emits: ["select"],
@@ -22,7 +21,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
22
21
  default: withCtx(() => [
23
22
  createElementVNode("div", null, [
24
23
  createElementVNode("div", _hoisted_1, [
25
- _hoisted_2,
24
+ _cache[2] || (_cache[2] = createElementVNode("label", { class: "mr-8" }, "Which screen do you want to keep?", -1)),
26
25
  createElementVNode("div", null, [
27
26
  createVNode(unref(BSRadioButton), {
28
27
  modelValue: selection.value,
@@ -44,7 +43,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
44
43
  ])
45
44
  ]),
46
45
  buttons: withCtx(() => [
47
- createElementVNode("div", _hoisted_3, [
46
+ createElementVNode("div", _hoisted_2, [
48
47
  createVNode(unref(BSButton), {
49
48
  "button-color": "blue",
50
49
  caption: "OK",