@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.
- package/css/canvas.scss +16 -136
- package/css/{canvas-block.scss → page-block.scss} +15 -3
- package/css/page-builder-editor.scss +6 -14
- package/css/{canvas-page.scss → page-page.scss} +23 -16
- package/css/{canvas-section.scss → page-section.scss} +15 -3
- package/css/{canvas-widget.scss → page-widget.scss} +15 -3
- package/css/page.scss +79 -0
- package/css/property-editor-youtube.scss +16 -0
- package/dist/PageBuilderEditor.vue.d.ts +4 -4
- package/dist/PbHtmlEditorModal-dDR38rNy.js +187 -0
- package/dist/{PbPropertyEditorColor-BFMkFOYX.js → PbPropertyEditorColor-B6yhXmGL.js} +1 -1
- package/dist/{PbPropertyEditorHtml-DZw8qbJH.js → PbPropertyEditorHtml-fgIO3jaY.js} +4 -3
- package/dist/{PbPropertyEditorImage-BQhiQyNM.js → PbPropertyEditorImage-6WNkin_o.js} +3 -3
- package/dist/{PbPropertyEditorMultilineText-CT3vTbYY.js → PbPropertyEditorMultilineText-3hJVRryR.js} +1 -1
- package/dist/{PbPropertyEditorText-DmM_LMjC.js → PbPropertyEditorText-DZA84Sn1.js} +1 -1
- package/dist/PbPropertyEditorYoutube-DtcxO2uZ.js +39 -0
- package/dist/{PbScreenSelectModal-DDATc9n1.js → PbScreenSelectModal-CnI1IsvW.js} +3 -4
- package/dist/{PbWidgetAddModal-BoYfb0dm.js → PbWidgetAddModal-DO1t-xsl.js} +19 -21
- package/dist/PbYoutubeModal-DFb6CQyW.js +68 -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 +3 -3
- package/dist/components/menu/PbToolbar.vue.d.ts +3 -3
- 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 +7 -4
- package/dist/components/modal/PbPartAddModal.vue.d.ts +4 -4
- package/dist/components/modal/PbScreenSelectModal.vue.d.ts +2 -2
- 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 +3 -3
- package/dist/components/part/PbContainerWidget.vue.d.ts +19 -0
- package/dist/components/part/PbPage.vue.d.ts +5 -5
- package/dist/components/part/PbPageFrame.vue.d.ts +21 -0
- package/dist/components/part/PbSection.vue.d.ts +3 -3
- package/dist/components/part/PbWidget.vue.d.ts +3 -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/PbPropertyEditorColor.vue.d.ts +4 -4
- package/dist/components/sidebar/property/PbPropertyEditorHtml.vue.d.ts +4 -4
- package/dist/components/sidebar/property/PbPropertyEditorImage.vue.d.ts +7 -6
- package/dist/components/sidebar/property/PbPropertyEditorMultilineText.vue.d.ts +4 -4
- 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 +4 -4
- 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/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 +20 -7
- package/dist/{index-Cr-_-n9T.js → index-JVyoOgGq.js} +1530 -1262
- package/dist/model/context.d.ts +6 -0
- package/dist/model/default-part-property-group.d.ts +1 -0
- package/dist/model/page-builder-editor.d.ts +4 -0
- package/dist/model/page-builder-util.d.ts +2 -0
- package/dist/model/part-definintion.d.ts +1 -1
- package/dist/model/part-manager.d.ts +2 -0
- package/dist/model/part-property.d.ts +0 -2
- package/dist/page-builder-editor.js +19 -16
- package/dist/page-builder-editor.umd.cjs +1831 -1408
- package/package.json +8 -6
- package/dist/PbHtmlEditorModal-aaecwH7V.js +0 -131
- package/dist/components/canvas/PbCanvasFrame.vue.d.ts +0 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@g1cloud/page-builder-editor",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.0-alpha.
|
|
4
|
+
"version": "1.0.0-alpha.23",
|
|
5
5
|
"engins": {
|
|
6
6
|
"node": ">= 20.0.0"
|
|
7
7
|
},
|
|
@@ -16,19 +16,21 @@
|
|
|
16
16
|
"author": "zag@g1project.net",
|
|
17
17
|
"license": "LicenseRef-LICENSE",
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
"@g1cloud/bluesea": "5.0.0-alpha.
|
|
19
|
+
"@g1cloud/bluesea": "5.0.0-alpha.73",
|
|
20
|
+
"vue3-youtube": "^0.1.9"
|
|
20
21
|
},
|
|
21
22
|
"dependencies": {
|
|
22
23
|
"@ckpack/vue-color": "^1.5.0",
|
|
24
|
+
"@ctrl/tinycolor": "^3.6.1",
|
|
23
25
|
"dayjs": "^1.11.11",
|
|
24
26
|
"mitt": "^3.0.1",
|
|
25
27
|
"short-unique-id": "^5.0.3",
|
|
26
28
|
"vite-svg-loader": "^5.1.0",
|
|
27
|
-
"vue": "^3.
|
|
28
|
-
"vue-router": "^4.3
|
|
29
|
+
"vue": "^3.5.3",
|
|
30
|
+
"vue-router": "^4.4.3",
|
|
29
31
|
"vue3-click-away": "^1.2.4",
|
|
30
32
|
"yjs": "^13.6.14",
|
|
31
|
-
"@g1cloud/page-builder-viewer": "1.0.0-alpha.
|
|
33
|
+
"@g1cloud/page-builder-viewer": "1.0.0-alpha.23"
|
|
32
34
|
},
|
|
33
35
|
"devDependencies": {
|
|
34
36
|
"@types/node": "^20.12.7",
|
|
@@ -36,7 +38,7 @@
|
|
|
36
38
|
"jsdom": "^24.0.0",
|
|
37
39
|
"sass": "^1.75.0",
|
|
38
40
|
"typescript": "^5.4.5",
|
|
39
|
-
"vite": "^5.
|
|
41
|
+
"vite": "^5.4.3",
|
|
40
42
|
"vite-plugin-dts": "^3.9.0",
|
|
41
43
|
"vitest": "^1.5.0",
|
|
42
44
|
"vitest-canvas-mock": "^0.3.3",
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, createSlots, renderList } from "vue";
|
|
2
|
-
import { useModalHandle, BSModalFrame, BSTabSheet, 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 flex-grow-1" };
|
|
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 = ["innerHTML"];
|
|
9
|
-
const _hoisted_7 = { class: "editor bs-layout-vertical pl-8" };
|
|
10
|
-
const _hoisted_8 = { class: "tags bs-layout-vertical w-full" };
|
|
11
|
-
const _hoisted_9 = /* @__PURE__ */ createElementVNode("div", { class: "title pb-4" }, "HTML", -1);
|
|
12
|
-
const _hoisted_10 = { class: "content flex-grow-1" };
|
|
13
|
-
const _hoisted_11 = { class: "style bs-layout-vertical w-full pt-8" };
|
|
14
|
-
const _hoisted_12 = /* @__PURE__ */ createElementVNode("div", { class: "title pb-4" }, "Style", -1);
|
|
15
|
-
const _hoisted_13 = { class: "content flex-grow-1" };
|
|
16
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
17
|
-
__name: "PbHtmlEditorModal",
|
|
18
|
-
props: {
|
|
19
|
-
html: {},
|
|
20
|
-
locales: {},
|
|
21
|
-
localeTabs: {}
|
|
22
|
-
},
|
|
23
|
-
emits: ["updateHtml"],
|
|
24
|
-
setup(__props, { emit: __emit }) {
|
|
25
|
-
const props = __props;
|
|
26
|
-
const emit = __emit;
|
|
27
|
-
const tabId = ref(props.localeTabs && props.localeTabs[0].tabId);
|
|
28
|
-
const modalHandle = useModalHandle();
|
|
29
|
-
const html = ref(props.html || {});
|
|
30
|
-
const preview = computed(() => {
|
|
31
|
-
var _a;
|
|
32
|
-
let data = {};
|
|
33
|
-
(_a = props.locales) == null ? void 0 : _a.forEach((locale) => {
|
|
34
|
-
const _html = html.value[locale] || { tags: "", style: "" };
|
|
35
|
-
data[locale] = _html.tags ? `${_html.tags}
|
|
36
|
-
<style>${_html.style}</style>` : "";
|
|
37
|
-
});
|
|
38
|
-
return data;
|
|
39
|
-
});
|
|
40
|
-
const updateTags = (locale, value) => {
|
|
41
|
-
if (!html.value)
|
|
42
|
-
html.value = {};
|
|
43
|
-
if (!html.value[locale])
|
|
44
|
-
html.value[locale] = {};
|
|
45
|
-
html.value[locale].tags = value;
|
|
46
|
-
};
|
|
47
|
-
const updateStyle = (locale, value) => {
|
|
48
|
-
if (!html.value)
|
|
49
|
-
html.value = {};
|
|
50
|
-
if (!html.value[locale])
|
|
51
|
-
html.value[locale] = {};
|
|
52
|
-
html.value[locale].style = value;
|
|
53
|
-
};
|
|
54
|
-
const ok = () => {
|
|
55
|
-
emit("updateHtml", html.value);
|
|
56
|
-
modalHandle.close();
|
|
57
|
-
};
|
|
58
|
-
return (_ctx, _cache) => {
|
|
59
|
-
return openBlock(), createBlock(unref(BSModalFrame), {
|
|
60
|
-
class: "pb-html-editor-modal",
|
|
61
|
-
title: "HTML Editor"
|
|
62
|
-
}, {
|
|
63
|
-
default: withCtx(() => [
|
|
64
|
-
createElementVNode("div", _hoisted_1, [
|
|
65
|
-
createVNode(unref(BSTabSheet), {
|
|
66
|
-
"tab-id": tabId.value,
|
|
67
|
-
"onUpdate:tabId": _cache[0] || (_cache[0] = ($event) => tabId.value = $event),
|
|
68
|
-
tabs: _ctx.localeTabs,
|
|
69
|
-
class: "flex-grow-1"
|
|
70
|
-
}, createSlots({ _: 2 }, [
|
|
71
|
-
renderList(_ctx.locales, (locale) => {
|
|
72
|
-
return {
|
|
73
|
-
name: `tab-${locale}`,
|
|
74
|
-
fn: withCtx(() => [
|
|
75
|
-
createElementVNode("div", _hoisted_2, [
|
|
76
|
-
createElementVNode("div", _hoisted_3, [
|
|
77
|
-
createElementVNode("div", _hoisted_4, [
|
|
78
|
-
_hoisted_5,
|
|
79
|
-
createElementVNode("div", {
|
|
80
|
-
class: "content flex-grow-1",
|
|
81
|
-
innerHTML: preview.value[locale]
|
|
82
|
-
}, null, 8, _hoisted_6)
|
|
83
|
-
])
|
|
84
|
-
]),
|
|
85
|
-
createElementVNode("div", _hoisted_7, [
|
|
86
|
-
createElementVNode("div", _hoisted_8, [
|
|
87
|
-
_hoisted_9,
|
|
88
|
-
createElementVNode("div", _hoisted_10, [
|
|
89
|
-
createVNode(unref(BSCodeEditor), {
|
|
90
|
-
"model-value": (html.value[locale] || {}).tags,
|
|
91
|
-
"editor-height": "100%",
|
|
92
|
-
lang: "html",
|
|
93
|
-
"onUpdate:modelValue": (value) => updateTags(locale, value)
|
|
94
|
-
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
95
|
-
])
|
|
96
|
-
]),
|
|
97
|
-
createElementVNode("div", _hoisted_11, [
|
|
98
|
-
_hoisted_12,
|
|
99
|
-
createElementVNode("div", _hoisted_13, [
|
|
100
|
-
createVNode(unref(BSCodeEditor), {
|
|
101
|
-
"model-value": (html.value[locale] || {}).style,
|
|
102
|
-
"editor-height": "100%",
|
|
103
|
-
lang: "css",
|
|
104
|
-
"onUpdate:modelValue": (value) => updateStyle(locale, value)
|
|
105
|
-
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
106
|
-
])
|
|
107
|
-
])
|
|
108
|
-
])
|
|
109
|
-
])
|
|
110
|
-
])
|
|
111
|
-
};
|
|
112
|
-
})
|
|
113
|
-
]), 1032, ["tab-id", "tabs"])
|
|
114
|
-
])
|
|
115
|
-
]),
|
|
116
|
-
buttons: withCtx(() => [
|
|
117
|
-
createElementVNode("div", { class: "bs-layout-horizontal justify-content-center" }, [
|
|
118
|
-
createElementVNode("button", {
|
|
119
|
-
class: "mr-4",
|
|
120
|
-
onClick: ok
|
|
121
|
-
}, "OK")
|
|
122
|
-
])
|
|
123
|
-
]),
|
|
124
|
-
_: 1
|
|
125
|
-
});
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
export {
|
|
130
|
-
_sfc_main as default
|
|
131
|
-
};
|