@g1cloud/page-builder-editor 1.0.0-alpha.10 → 1.0.0-alpha.12
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/page-builder-editor.scss +13 -0
- package/dist/HtmlEditorModal-CRzp6l55.js +131 -0
- package/dist/PageBuilderEditor.vue.d.ts +4 -2
- package/dist/{PbPropertyEditorColor-B9I99uQK.js → PbPropertyEditorColor-DXkzD-V2.js} +1 -1
- package/dist/{PbPropertyEditorHtml-BVT2SwoK.js → PbPropertyEditorHtml-CbEOlq-s.js} +9 -15
- package/dist/{PbPropertyEditorImage-DLwg5dJz.js → PbPropertyEditorImage-5RZoQbLF.js} +1 -1
- package/dist/{PbPropertyEditorMultilineText-Bv4luXWg.js → PbPropertyEditorMultilineText-BMF9jHpy.js} +25 -23
- package/dist/{PbPropertyEditorProduct-6STGd-Zs.js → PbPropertyEditorProduct-Dt5vraZc.js} +1 -1
- package/dist/components/modal/HtmlEditorModal.vue.d.ts +10 -8
- package/dist/components/sidebar/property/PbPropertyEditorMultilineText.vue.d.ts +3 -2
- package/dist/{index-jUNIezk-.js → index-BFtI1jYj.js} +161 -126
- package/dist/model/context.d.ts +4 -4
- package/dist/model/page-builder-editor.d.ts +9 -3
- package/dist/model/part-property.d.ts +1 -0
- package/dist/page-builder-editor.js +1 -1
- package/dist/page-builder-editor.umd.cjs +276 -214
- package/package.json +2 -2
- package/dist/HtmlEditorModal-oXFayeg-.js +0 -100
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.12",
|
|
5
5
|
"engins": {
|
|
6
6
|
"node": ">= 20.0.0"
|
|
7
7
|
},
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"vue-router": "^4.3.2",
|
|
29
29
|
"vue3-click-away": "^1.2.4",
|
|
30
30
|
"yjs": "^13.6.14",
|
|
31
|
-
"@g1cloud/page-builder-viewer": "1.0.0-alpha.
|
|
31
|
+
"@g1cloud/page-builder-viewer": "1.0.0-alpha.12"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/node": "^20.12.7",
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode } from "vue";
|
|
2
|
-
import { useModalHandle, BSModalFrame, BSCodeEditor } from "@g1cloud/bluesea";
|
|
3
|
-
const _hoisted_1 = { class: "bs-layout-vertical pb-html-editor-modal flex-grow-1 h-full" };
|
|
4
|
-
const _hoisted_2 = { class: "bs-layout-horizontal flex-grow-1" };
|
|
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: "HtmlEditorModal",
|
|
18
|
-
props: {
|
|
19
|
-
html: {}
|
|
20
|
-
},
|
|
21
|
-
emits: ["updateHtml"],
|
|
22
|
-
setup(__props, { emit: __emit }) {
|
|
23
|
-
var _a, _b;
|
|
24
|
-
const props = __props;
|
|
25
|
-
const emit = __emit;
|
|
26
|
-
const modalHandle = useModalHandle();
|
|
27
|
-
const tags = ref(((_a = props.html) == null ? void 0 : _a.tags) || "");
|
|
28
|
-
const style = ref(((_b = props.html) == null ? void 0 : _b.style) || "");
|
|
29
|
-
const html = computed(() => `${tags.value || ""}
|
|
30
|
-
<style>${style.value || ""}</style>`);
|
|
31
|
-
const updateHtml = (value) => {
|
|
32
|
-
};
|
|
33
|
-
const ok = () => {
|
|
34
|
-
emit("updateHtml", {
|
|
35
|
-
tags: tags.value || "",
|
|
36
|
-
style: style.value || ""
|
|
37
|
-
});
|
|
38
|
-
modalHandle.close();
|
|
39
|
-
};
|
|
40
|
-
return (_ctx, _cache) => {
|
|
41
|
-
return openBlock(), createBlock(unref(BSModalFrame), { title: "HTML Editor" }, {
|
|
42
|
-
default: withCtx(() => [
|
|
43
|
-
createElementVNode("div", _hoisted_1, [
|
|
44
|
-
createElementVNode("div", _hoisted_2, [
|
|
45
|
-
createElementVNode("div", _hoisted_3, [
|
|
46
|
-
createElementVNode("div", _hoisted_4, [
|
|
47
|
-
_hoisted_5,
|
|
48
|
-
createElementVNode("div", {
|
|
49
|
-
class: "content flex-grow-1",
|
|
50
|
-
innerHTML: html.value
|
|
51
|
-
}, null, 8, _hoisted_6)
|
|
52
|
-
])
|
|
53
|
-
]),
|
|
54
|
-
createElementVNode("div", _hoisted_7, [
|
|
55
|
-
createElementVNode("div", _hoisted_8, [
|
|
56
|
-
_hoisted_9,
|
|
57
|
-
createElementVNode("div", _hoisted_10, [
|
|
58
|
-
createVNode(unref(BSCodeEditor), {
|
|
59
|
-
modelValue: tags.value,
|
|
60
|
-
"onUpdate:modelValue": [
|
|
61
|
-
_cache[0] || (_cache[0] = ($event) => tags.value = $event),
|
|
62
|
-
updateHtml
|
|
63
|
-
],
|
|
64
|
-
"editor-height": "100%",
|
|
65
|
-
lang: "html"
|
|
66
|
-
}, null, 8, ["modelValue"])
|
|
67
|
-
])
|
|
68
|
-
]),
|
|
69
|
-
createElementVNode("div", _hoisted_11, [
|
|
70
|
-
_hoisted_12,
|
|
71
|
-
createElementVNode("div", _hoisted_13, [
|
|
72
|
-
createVNode(unref(BSCodeEditor), {
|
|
73
|
-
modelValue: style.value,
|
|
74
|
-
"onUpdate:modelValue": [
|
|
75
|
-
_cache[1] || (_cache[1] = ($event) => style.value = $event),
|
|
76
|
-
updateHtml
|
|
77
|
-
],
|
|
78
|
-
"editor-height": "100%",
|
|
79
|
-
lang: "css"
|
|
80
|
-
}, null, 8, ["modelValue"])
|
|
81
|
-
])
|
|
82
|
-
])
|
|
83
|
-
])
|
|
84
|
-
]),
|
|
85
|
-
createElementVNode("div", { class: "buttons pt-24" }, [
|
|
86
|
-
createElementVNode("button", {
|
|
87
|
-
class: "mr-4",
|
|
88
|
-
onClick: ok
|
|
89
|
-
}, "OK")
|
|
90
|
-
])
|
|
91
|
-
])
|
|
92
|
-
]),
|
|
93
|
-
_: 1
|
|
94
|
-
});
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
export {
|
|
99
|
-
_sfc_main as default
|
|
100
|
-
};
|