@g1cloud/page-builder-editor 1.0.0-alpha.7 → 1.0.0-alpha.9
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 +1 -4
- package/dist/{HtmlEditorModal-BV5E6G70.js → HtmlEditorModal-DDoVYM6n.js} +18 -14
- package/dist/{PbPropertyEditorColor-y7y6ZUQs.js → PbPropertyEditorColor-BKtQDQKF.js} +1 -1
- package/dist/{PbPropertyEditorHtml-CbQR_BzH.js → PbPropertyEditorHtml-Co4dM1CR.js} +3 -6
- package/dist/{PbPropertyEditorImage-BXEXm2Px.js → PbPropertyEditorImage-DRDbq11U.js} +1 -1
- package/dist/{PbPropertyEditorMultilineText-sb-oS_gz.js → PbPropertyEditorMultilineText-DT15P558.js} +1 -1
- package/dist/{PbPropertyEditorProduct-p0zOCA9R.js → PbPropertyEditorProduct-Xh2k14LD.js} +1 -1
- package/dist/{index-BTlwA7HP.js → index-DQ22qk5v.js} +8 -12
- package/dist/model/model.d.ts +2 -2
- package/dist/page-builder-editor.js +1 -1
- package/dist/page-builder-editor.umd.cjs +20 -23
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, onMounted, openBlock, createBlock, unref, withCtx, createElementVNode,
|
|
2
|
-
import { useModalHandle, BSModalFrame } from "@g1cloud/bluesea";
|
|
1
|
+
import { defineComponent, ref, computed, onMounted, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode } from "vue";
|
|
2
|
+
import { useModalHandle, BSModalFrame, BSCodeEditor } from "@g1cloud/bluesea";
|
|
3
3
|
const _hoisted_1 = { class: "bs-layout-vertical pb-html-editor-modal flex-grow-1 h-full" };
|
|
4
4
|
const _hoisted_2 = { class: "bs-layout-horizontal flex-grow-1" };
|
|
5
5
|
const _hoisted_3 = { class: "preview flex-grow-1" };
|
|
@@ -20,10 +20,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
20
20
|
},
|
|
21
21
|
emits: ["updateHtml"],
|
|
22
22
|
setup(__props, { emit: __emit }) {
|
|
23
|
+
var _a, _b;
|
|
24
|
+
const props = __props;
|
|
23
25
|
const emit = __emit;
|
|
24
26
|
const modalHandle = useModalHandle();
|
|
25
|
-
const tags = ref();
|
|
26
|
-
const style = ref();
|
|
27
|
+
const tags = ref(((_a = props.html) == null ? void 0 : _a.tags) || "");
|
|
28
|
+
const style = ref(((_b = props.html) == null ? void 0 : _b.style) || "");
|
|
27
29
|
const html = computed(() => `${tags.value || ""}
|
|
28
30
|
<style>${style.value || ""}</style>`);
|
|
29
31
|
onMounted(async () => {
|
|
@@ -53,21 +55,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
53
55
|
createElementVNode("div", _hoisted_8, [
|
|
54
56
|
_hoisted_9,
|
|
55
57
|
createElementVNode("div", _hoisted_10, [
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
createVNode(unref(BSCodeEditor), {
|
|
59
|
+
modelValue: tags.value,
|
|
60
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => tags.value = $event),
|
|
61
|
+
"editor-height": "100%",
|
|
62
|
+
lang: "html"
|
|
63
|
+
}, null, 8, ["modelValue"])
|
|
61
64
|
])
|
|
62
65
|
]),
|
|
63
66
|
createElementVNode("div", _hoisted_11, [
|
|
64
67
|
_hoisted_12,
|
|
65
68
|
createElementVNode("div", _hoisted_13, [
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
createVNode(unref(BSCodeEditor), {
|
|
70
|
+
modelValue: style.value,
|
|
71
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => style.value = $event),
|
|
72
|
+
"editor-height": "100%",
|
|
73
|
+
lang: "css"
|
|
74
|
+
}, null, 8, ["modelValue"])
|
|
71
75
|
])
|
|
72
76
|
])
|
|
73
77
|
])
|
|
@@ -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-
|
|
3
|
+
import { P as PbColorPicker } from "./index-DQ22qk5v.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-
|
|
3
|
+
import { u as usePageBuilderEditor } from "./index-DQ22qk5v.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"];
|
|
@@ -23,26 +23,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23
23
|
html = props.value[language];
|
|
24
24
|
}
|
|
25
25
|
modal.openModal({
|
|
26
|
-
component: defineAsyncComponent(() => import("./HtmlEditorModal-
|
|
26
|
+
component: defineAsyncComponent(() => import("./HtmlEditorModal-DDoVYM6n.js")),
|
|
27
27
|
style: {
|
|
28
28
|
width: "80%",
|
|
29
29
|
height: "80%",
|
|
30
|
-
maxWidth: "800px",
|
|
31
30
|
minWidth: "500px",
|
|
32
|
-
|
|
31
|
+
minHeight: "400px"
|
|
33
32
|
},
|
|
34
33
|
bind: {
|
|
35
34
|
html
|
|
36
35
|
},
|
|
37
36
|
on: {
|
|
38
37
|
updateHtml: (html2) => {
|
|
39
|
-
console.log(html2);
|
|
40
38
|
const language2 = pageBuilder.getLanguage();
|
|
41
39
|
const value = {
|
|
42
40
|
...props.value || {},
|
|
43
41
|
[language2]: html2
|
|
44
42
|
};
|
|
45
|
-
console.log(value);
|
|
46
43
|
emit("update-property-value", { html: value });
|
|
47
44
|
}
|
|
48
45
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createElementBlock, createElementVNode, toDisplayString } from "vue";
|
|
2
2
|
import { useModal } from "@g1cloud/bluesea";
|
|
3
|
-
import { u as usePageBuilderEditor, a as PageBuilderEditorEvent } from "./index-
|
|
3
|
+
import { u as usePageBuilderEditor, a as PageBuilderEditorEvent } from "./index-DQ22qk5v.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"];
|
package/dist/{PbPropertyEditorMultilineText-sb-oS_gz.js → PbPropertyEditorMultilineText-DT15P558.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, computed, openBlock, createElementBlock, createElementVNode, toDisplayString, createVNode, unref } from "vue";
|
|
2
2
|
import { BSTextArea } from "@g1cloud/bluesea";
|
|
3
|
-
import { u as usePageBuilderEditor } from "./index-
|
|
3
|
+
import { u as usePageBuilderEditor } from "./index-DQ22qk5v.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, openBlock, createElementBlock, createElementVNode, toDisplayString } from "vue";
|
|
2
2
|
import { useModal } from "@g1cloud/bluesea";
|
|
3
|
-
import { u as usePageBuilderEditor, a as PageBuilderEditorEvent } from "./index-
|
|
3
|
+
import { u as usePageBuilderEditor, a as PageBuilderEditorEvent } from "./index-DQ22qk5v.js";
|
|
4
4
|
const _hoisted_1 = { class: "property-editor property-editor-product flex-align-center" };
|
|
5
5
|
const _hoisted_2 = { class: "title" };
|
|
6
6
|
const _hoisted_3 = ["textContent"];
|
|
@@ -7136,12 +7136,8 @@ ${_html.style}
|
|
|
7136
7136
|
</style>`;
|
|
7137
7137
|
};
|
|
7138
7138
|
const html = computed(() => {
|
|
7139
|
-
var _a
|
|
7140
|
-
|
|
7141
|
-
console.log((_a = props.part.properties) == null ? void 0 : _a.html);
|
|
7142
|
-
console.log("---------");
|
|
7143
|
-
console.log(props.part);
|
|
7144
|
-
return getHtml((_b = props.part.properties) == null ? void 0 : _b.html);
|
|
7139
|
+
var _a;
|
|
7140
|
+
return getHtml((_a = props.part.properties) == null ? void 0 : _a.html);
|
|
7145
7141
|
});
|
|
7146
7142
|
const emptyClass = computed(() => {
|
|
7147
7143
|
if (props.viewMode) {
|
|
@@ -7605,7 +7601,7 @@ const syncProperties = (part, element) => {
|
|
|
7605
7601
|
}
|
|
7606
7602
|
}
|
|
7607
7603
|
for (const name in part.properties) {
|
|
7608
|
-
if (!attrs[name])
|
|
7604
|
+
if (!attrs[name] && !attrs[`${name}.object`])
|
|
7609
7605
|
delete part.properties[name];
|
|
7610
7606
|
}
|
|
7611
7607
|
if (Object.keys(part.properties).length === 0) {
|
|
@@ -8067,12 +8063,12 @@ const defaultPartPropertyEditors = () => {
|
|
|
8067
8063
|
return {
|
|
8068
8064
|
"readonly-text": () => defineAsyncComponent(() => import("./PbPropertyEditorReadonlyText-Dgp_AVOD.js")),
|
|
8069
8065
|
"text": () => defineAsyncComponent(() => import("./PbPropertyEditorText-BWOKvwD9.js")),
|
|
8070
|
-
"multiline-text": () => defineAsyncComponent(() => import("./PbPropertyEditorMultilineText-
|
|
8066
|
+
"multiline-text": () => defineAsyncComponent(() => import("./PbPropertyEditorMultilineText-DT15P558.js")),
|
|
8071
8067
|
"select": () => defineAsyncComponent(() => import("./PbPropertyEditorSelect-CWedbXJI.js")),
|
|
8072
|
-
"color": () => defineAsyncComponent(() => import("./PbPropertyEditorColor-
|
|
8073
|
-
"image": () => defineAsyncComponent(() => import("./PbPropertyEditorImage-
|
|
8074
|
-
"html": () => defineAsyncComponent(() => import("./PbPropertyEditorHtml-
|
|
8075
|
-
"product": () => defineAsyncComponent(() => import("./PbPropertyEditorProduct-
|
|
8068
|
+
"color": () => defineAsyncComponent(() => import("./PbPropertyEditorColor-BKtQDQKF.js")),
|
|
8069
|
+
"image": () => defineAsyncComponent(() => import("./PbPropertyEditorImage-DRDbq11U.js")),
|
|
8070
|
+
"html": () => defineAsyncComponent(() => import("./PbPropertyEditorHtml-Co4dM1CR.js")),
|
|
8071
|
+
"product": () => defineAsyncComponent(() => import("./PbPropertyEditorProduct-Xh2k14LD.js"))
|
|
8076
8072
|
};
|
|
8077
8073
|
};
|
|
8078
8074
|
const getPropertyValueOfParts = (parts, propertyName) => {
|
package/dist/model/model.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IPart
|
|
1
|
+
import { IPart } from '@g1cloud/page-builder-viewer';
|
|
2
2
|
import * as Y from 'yjs';
|
|
3
3
|
export declare const ROOT_TYPE = "Root";
|
|
4
4
|
export declare const PAGE_TYPE = "Page";
|
|
@@ -49,7 +49,7 @@ export type PartInsertResult = {
|
|
|
49
49
|
};
|
|
50
50
|
export type PartUpdateResult = {
|
|
51
51
|
element: Y.XmlElement;
|
|
52
|
-
properties: Record<string,
|
|
52
|
+
properties: Record<string, unknown>;
|
|
53
53
|
removeOtherProperties?: boolean;
|
|
54
54
|
};
|
|
55
55
|
export type PartDeleteResult = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B, b, M, c, d, e, _, a, f, g, h, i, j, k, l, R, m, S, n, W, o, p, q, r, s, t, v, w } from "./index-
|
|
1
|
+
import { B, b, M, c, d, e, _, a, f, g, h, i, j, k, l, R, m, S, n, W, o, p, q, r, s, t, v, w } from "./index-DQ22qk5v.js";
|
|
2
2
|
export {
|
|
3
3
|
B as BLOCK_TYPE,
|
|
4
4
|
b as Block,
|
|
@@ -7138,12 +7138,8 @@ ${_html.style}
|
|
|
7138
7138
|
</style>`;
|
|
7139
7139
|
};
|
|
7140
7140
|
const html = vue.computed(() => {
|
|
7141
|
-
var _a
|
|
7142
|
-
|
|
7143
|
-
console.log((_a = props.part.properties) == null ? void 0 : _a.html);
|
|
7144
|
-
console.log("---------");
|
|
7145
|
-
console.log(props.part);
|
|
7146
|
-
return getHtml((_b = props.part.properties) == null ? void 0 : _b.html);
|
|
7141
|
+
var _a;
|
|
7142
|
+
return getHtml((_a = props.part.properties) == null ? void 0 : _a.html);
|
|
7147
7143
|
});
|
|
7148
7144
|
const emptyClass = vue.computed(() => {
|
|
7149
7145
|
if (props.viewMode) {
|
|
@@ -7607,7 +7603,7 @@ ${_html.style}
|
|
|
7607
7603
|
}
|
|
7608
7604
|
}
|
|
7609
7605
|
for (const name in part.properties) {
|
|
7610
|
-
if (!attrs[name])
|
|
7606
|
+
if (!attrs[name] && !attrs[`${name}.object`])
|
|
7611
7607
|
delete part.properties[name];
|
|
7612
7608
|
}
|
|
7613
7609
|
if (Object.keys(part.properties).length === 0) {
|
|
@@ -14607,22 +14603,19 @@ ${_html.style}
|
|
|
14607
14603
|
style: {
|
|
14608
14604
|
width: "80%",
|
|
14609
14605
|
height: "80%",
|
|
14610
|
-
maxWidth: "800px",
|
|
14611
14606
|
minWidth: "500px",
|
|
14612
|
-
|
|
14607
|
+
minHeight: "400px"
|
|
14613
14608
|
},
|
|
14614
14609
|
bind: {
|
|
14615
14610
|
html
|
|
14616
14611
|
},
|
|
14617
14612
|
on: {
|
|
14618
14613
|
updateHtml: (html2) => {
|
|
14619
|
-
console.log(html2);
|
|
14620
14614
|
const language2 = pageBuilder.getLanguage();
|
|
14621
14615
|
const value = {
|
|
14622
14616
|
...props.value || {},
|
|
14623
14617
|
[language2]: html2
|
|
14624
14618
|
};
|
|
14625
|
-
console.log(value);
|
|
14626
14619
|
emit("update-property-value", { html: value });
|
|
14627
14620
|
}
|
|
14628
14621
|
}
|
|
@@ -14816,10 +14809,12 @@ ${_html.style}
|
|
|
14816
14809
|
},
|
|
14817
14810
|
emits: ["updateHtml"],
|
|
14818
14811
|
setup(__props, { emit: __emit }) {
|
|
14812
|
+
var _a, _b;
|
|
14813
|
+
const props = __props;
|
|
14819
14814
|
const emit = __emit;
|
|
14820
14815
|
const modalHandle = bluesea.useModalHandle();
|
|
14821
|
-
const tags = vue.ref();
|
|
14822
|
-
const style = vue.ref();
|
|
14816
|
+
const tags = vue.ref(((_a = props.html) == null ? void 0 : _a.tags) || "");
|
|
14817
|
+
const style = vue.ref(((_b = props.html) == null ? void 0 : _b.style) || "");
|
|
14823
14818
|
const html = vue.computed(() => `${tags.value || ""}
|
|
14824
14819
|
<style>${style.value || ""}</style>`);
|
|
14825
14820
|
vue.onMounted(async () => {
|
|
@@ -14849,21 +14844,23 @@ ${_html.style}
|
|
|
14849
14844
|
vue.createElementVNode("div", _hoisted_8, [
|
|
14850
14845
|
_hoisted_9,
|
|
14851
14846
|
vue.createElementVNode("div", _hoisted_10, [
|
|
14852
|
-
vue.
|
|
14853
|
-
|
|
14854
|
-
|
|
14855
|
-
|
|
14856
|
-
|
|
14847
|
+
vue.createVNode(vue.unref(bluesea.BSCodeEditor), {
|
|
14848
|
+
modelValue: tags.value,
|
|
14849
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => tags.value = $event),
|
|
14850
|
+
"editor-height": "100%",
|
|
14851
|
+
lang: "html"
|
|
14852
|
+
}, null, 8, ["modelValue"])
|
|
14857
14853
|
])
|
|
14858
14854
|
]),
|
|
14859
14855
|
vue.createElementVNode("div", _hoisted_11, [
|
|
14860
14856
|
_hoisted_12,
|
|
14861
14857
|
vue.createElementVNode("div", _hoisted_13, [
|
|
14862
|
-
vue.
|
|
14863
|
-
|
|
14864
|
-
|
|
14865
|
-
|
|
14866
|
-
|
|
14858
|
+
vue.createVNode(vue.unref(bluesea.BSCodeEditor), {
|
|
14859
|
+
modelValue: style.value,
|
|
14860
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => style.value = $event),
|
|
14861
|
+
"editor-height": "100%",
|
|
14862
|
+
lang: "css"
|
|
14863
|
+
}, null, 8, ["modelValue"])
|
|
14867
14864
|
])
|
|
14868
14865
|
])
|
|
14869
14866
|
])
|
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.9",
|
|
5
5
|
"engins": {
|
|
6
6
|
"node": ">= 20.0.0"
|
|
7
7
|
},
|
|
@@ -16,7 +16,7 @@
|
|
|
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.60"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@ckpack/vue-color": "^1.5.0",
|
|
@@ -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.9"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/node": "^20.12.7",
|