@g1cloud/page-builder-editor 1.0.0-alpha.16 → 1.0.0-alpha.17
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/property-editor-image.scss +1 -1
- package/css/property-group-editor-background.scss +1 -1
- package/dist/{PbPropertyEditorColor-Bw7qz0-r.js → PbPropertyEditorColor-DEVkcUND.js} +1 -1
- package/dist/{PbPropertyEditorHtml-DH2Qep1X.js → PbPropertyEditorHtml-CxPlqBYx.js} +1 -1
- package/dist/{PbPropertyEditorImage-GN536Jw2.js → PbPropertyEditorImage-DAEVOkpl.js} +1 -1
- package/dist/{PbPropertyEditorMultilineText-B5HryveI.js → PbPropertyEditorMultilineText-zmUCXJQZ.js} +1 -1
- package/dist/{PbPropertyEditorText-BWOKvwD9.js → PbPropertyEditorText-CleInrev.js} +14 -4
- package/dist/{PbWidgetAddModal-Zpo-ZeNH.js → PbWidgetAddModal-DoR8HJUd.js} +1 -1
- package/dist/components/sidebar/property/PbPropertyEditorText.vue.d.ts +5 -4
- package/dist/{index-BcD7YsdY.js → index-rPBXWjSz.js} +193 -116
- package/dist/page-builder-editor.js +14 -13
- package/dist/page-builder-editor.umd.cjs +187 -101
- package/package.json +3 -3
|
@@ -6894,12 +6894,12 @@ var __publicField = (obj, key, value) => {
|
|
|
6894
6894
|
this.rootPart = vue.ref(new RootPart());
|
|
6895
6895
|
}
|
|
6896
6896
|
};
|
|
6897
|
-
const _hoisted_1$
|
|
6898
|
-
const _hoisted_2$
|
|
6897
|
+
const _hoisted_1$8$1 = ["data-model-id"];
|
|
6898
|
+
const _hoisted_2$5$1 = {
|
|
6899
6899
|
key: 1,
|
|
6900
6900
|
class: "pb-nested-widget"
|
|
6901
6901
|
};
|
|
6902
|
-
const _sfc_main$
|
|
6902
|
+
const _sfc_main$a$1 = /* @__PURE__ */ vue.defineComponent({
|
|
6903
6903
|
__name: "PbWidget",
|
|
6904
6904
|
props: {
|
|
6905
6905
|
part: {}
|
|
@@ -6921,7 +6921,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6921
6921
|
key: 0,
|
|
6922
6922
|
part: _ctx.part
|
|
6923
6923
|
}, null, 8, ["part"])) : vue.createCommentVNode("", true),
|
|
6924
|
-
childComponents.value && childComponents.value.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
6924
|
+
childComponents.value && childComponents.value.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$5$1, [
|
|
6925
6925
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(childComponents.value, (child) => {
|
|
6926
6926
|
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(child.component), {
|
|
6927
6927
|
key: child.part.partId,
|
|
@@ -6929,12 +6929,12 @@ var __publicField = (obj, key, value) => {
|
|
|
6929
6929
|
}, null, 8, ["part"]);
|
|
6930
6930
|
}), 128))
|
|
6931
6931
|
])) : vue.createCommentVNode("", true)
|
|
6932
|
-
], 16, _hoisted_1$
|
|
6932
|
+
], 16, _hoisted_1$8$1);
|
|
6933
6933
|
};
|
|
6934
6934
|
}
|
|
6935
6935
|
});
|
|
6936
|
-
const _hoisted_1$
|
|
6937
|
-
const _sfc_main$
|
|
6936
|
+
const _hoisted_1$7$1 = ["data-model-id"];
|
|
6937
|
+
const _sfc_main$9$1 = /* @__PURE__ */ vue.defineComponent({
|
|
6938
6938
|
__name: "PbBlock",
|
|
6939
6939
|
props: {
|
|
6940
6940
|
part: {}
|
|
@@ -6952,17 +6952,17 @@ var __publicField = (obj, key, value) => {
|
|
|
6952
6952
|
style: (_a = _ctx.part.properties) == null ? void 0 : _a.css
|
|
6953
6953
|
}, properties.value), [
|
|
6954
6954
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.part.children, (child) => {
|
|
6955
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
6955
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$a$1, {
|
|
6956
6956
|
key: child.partId,
|
|
6957
6957
|
part: child
|
|
6958
6958
|
}, null, 8, ["part"]);
|
|
6959
6959
|
}), 128))
|
|
6960
|
-
], 16, _hoisted_1$
|
|
6960
|
+
], 16, _hoisted_1$7$1);
|
|
6961
6961
|
};
|
|
6962
6962
|
}
|
|
6963
6963
|
});
|
|
6964
|
-
const _hoisted_1$
|
|
6965
|
-
const _hoisted_2$
|
|
6964
|
+
const _hoisted_1$6$1 = { class: "pb-block" };
|
|
6965
|
+
const _hoisted_2$4$1 = /* @__PURE__ */ vue.createElementVNode("div", {
|
|
6966
6966
|
class: "pb-widget",
|
|
6967
6967
|
style: { "margin": "0 auto" }
|
|
6968
6968
|
}, [
|
|
@@ -6970,22 +6970,22 @@ var __publicField = (obj, key, value) => {
|
|
|
6970
6970
|
/* @__PURE__ */ vue.createElementVNode("h3", null, "Login Design Part")
|
|
6971
6971
|
])
|
|
6972
6972
|
], -1);
|
|
6973
|
-
const _hoisted_3$
|
|
6974
|
-
_hoisted_2$
|
|
6973
|
+
const _hoisted_3$4$1 = [
|
|
6974
|
+
_hoisted_2$4$1
|
|
6975
6975
|
];
|
|
6976
|
-
const _sfc_main$
|
|
6976
|
+
const _sfc_main$8$1 = /* @__PURE__ */ vue.defineComponent({
|
|
6977
6977
|
__name: "PbLoginDepart",
|
|
6978
6978
|
props: {
|
|
6979
6979
|
part: {}
|
|
6980
6980
|
},
|
|
6981
6981
|
setup(__props) {
|
|
6982
6982
|
return (_ctx, _cache) => {
|
|
6983
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
6983
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$6$1, _hoisted_3$4$1);
|
|
6984
6984
|
};
|
|
6985
6985
|
}
|
|
6986
6986
|
});
|
|
6987
|
-
const _hoisted_1$
|
|
6988
|
-
const _sfc_main$
|
|
6987
|
+
const _hoisted_1$5$1 = ["data-model-id"];
|
|
6988
|
+
const _sfc_main$7$1 = /* @__PURE__ */ vue.defineComponent({
|
|
6989
6989
|
__name: "PbSection",
|
|
6990
6990
|
props: {
|
|
6991
6991
|
part: {}
|
|
@@ -7001,94 +7001,74 @@ var __publicField = (obj, key, value) => {
|
|
|
7001
7001
|
"data-model-id": _ctx.part.partId,
|
|
7002
7002
|
style: (_a = _ctx.part.properties) == null ? void 0 : _a.css
|
|
7003
7003
|
}, properties.value), [
|
|
7004
|
-
((_b = _ctx.part.properties) == null ? void 0 : _b.name) === "Login Design Part" ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
7004
|
+
((_b = _ctx.part.properties) == null ? void 0 : _b.name) === "Login Design Part" ? (vue.openBlock(), vue.createBlock(_sfc_main$8$1, {
|
|
7005
7005
|
key: 0,
|
|
7006
7006
|
part: _ctx.part
|
|
7007
7007
|
}, null, 8, ["part"])) : _ctx.part.children && _ctx.part.children.length > 0 ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList(_ctx.part.children, (block) => {
|
|
7008
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
7008
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$9$1, {
|
|
7009
7009
|
key: block.partId,
|
|
7010
7010
|
part: block
|
|
7011
7011
|
}, null, 8, ["part"]);
|
|
7012
7012
|
}), 128)) : vue.createCommentVNode("", true)
|
|
7013
|
-
], 16, _hoisted_1$
|
|
7013
|
+
], 16, _hoisted_1$5$1);
|
|
7014
7014
|
};
|
|
7015
7015
|
}
|
|
7016
7016
|
});
|
|
7017
|
-
const _hoisted_1$
|
|
7018
|
-
const _hoisted_2$
|
|
7019
|
-
const _hoisted_3$
|
|
7017
|
+
const _hoisted_1$4$1 = { class: "pb-image-widget" };
|
|
7018
|
+
const _hoisted_2$3$1 = ["src"];
|
|
7019
|
+
const _hoisted_3$3$1 = {
|
|
7020
7020
|
key: 1,
|
|
7021
|
-
class: "
|
|
7021
|
+
class: "placeholder"
|
|
7022
7022
|
};
|
|
7023
7023
|
const _hoisted_4$i = /* @__PURE__ */ vue.createElementVNode("span", { class: "font-icon" }, "image", -1);
|
|
7024
7024
|
const _hoisted_5$9 = [
|
|
7025
7025
|
_hoisted_4$i
|
|
7026
7026
|
];
|
|
7027
|
-
const _sfc_main$
|
|
7027
|
+
const _sfc_main$6$1 = /* @__PURE__ */ vue.defineComponent({
|
|
7028
7028
|
__name: "PbImageWidget",
|
|
7029
7029
|
props: {
|
|
7030
7030
|
part: {},
|
|
7031
|
-
|
|
7031
|
+
placeholder: { type: Boolean }
|
|
7032
7032
|
},
|
|
7033
7033
|
setup(__props) {
|
|
7034
7034
|
return (_ctx, _cache) => {
|
|
7035
7035
|
var _a, _b;
|
|
7036
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
7036
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$4$1, [
|
|
7037
7037
|
((_a = _ctx.part.properties) == null ? void 0 : _a.image) ? (vue.openBlock(), vue.createElementBlock("img", {
|
|
7038
7038
|
key: 0,
|
|
7039
7039
|
src: (_b = _ctx.part.properties) == null ? void 0 : _b.image,
|
|
7040
7040
|
alt: "",
|
|
7041
7041
|
class: "image"
|
|
7042
|
-
}, null, 8, _hoisted_2$
|
|
7042
|
+
}, null, 8, _hoisted_2$3$1)) : _ctx.placeholder ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$3$1, _hoisted_5$9)) : vue.createCommentVNode("", true)
|
|
7043
7043
|
]);
|
|
7044
7044
|
};
|
|
7045
7045
|
}
|
|
7046
7046
|
});
|
|
7047
|
-
const _hoisted_1$
|
|
7048
|
-
const
|
|
7047
|
+
const _hoisted_1$3$1 = { class: "pb-text-widget" };
|
|
7048
|
+
const _hoisted_2$2$1 = ["textContent"];
|
|
7049
|
+
const _hoisted_3$2$1 = {
|
|
7050
|
+
key: 1,
|
|
7051
|
+
class: "placeholder",
|
|
7052
|
+
textContent: "Empty Text"
|
|
7053
|
+
};
|
|
7054
|
+
const _sfc_main$5$1 = /* @__PURE__ */ vue.defineComponent({
|
|
7049
7055
|
__name: "PbTextWidget",
|
|
7050
7056
|
props: {
|
|
7051
7057
|
part: {},
|
|
7052
|
-
|
|
7058
|
+
placeholder: { type: Boolean }
|
|
7053
7059
|
},
|
|
7054
7060
|
setup(__props) {
|
|
7055
7061
|
const props = __props;
|
|
7056
7062
|
const pageBuilder = usePageBuilder();
|
|
7057
|
-
const emptyClass = vue.computed(() => {
|
|
7058
|
-
var _a;
|
|
7059
|
-
if (props.viewMode) {
|
|
7060
|
-
return false;
|
|
7061
|
-
} else if ((_a = props.part.properties) == null ? void 0 : _a.text) {
|
|
7062
|
-
if (typeof props.part.properties.text === "string") {
|
|
7063
|
-
return true;
|
|
7064
|
-
} else {
|
|
7065
|
-
return !props.part.properties.text[pageBuilder.locale.value];
|
|
7066
|
-
}
|
|
7067
|
-
} else {
|
|
7068
|
-
return true;
|
|
7069
|
-
}
|
|
7070
|
-
});
|
|
7071
7063
|
const text = vue.computed(() => {
|
|
7072
7064
|
var _a;
|
|
7073
7065
|
if ((_a = props.part.properties) == null ? void 0 : _a.text) {
|
|
7074
7066
|
if (typeof props.part.properties.text === "string") {
|
|
7075
|
-
|
|
7076
|
-
return "";
|
|
7077
|
-
} else {
|
|
7078
|
-
return "Empty text";
|
|
7079
|
-
}
|
|
7067
|
+
return props.part.properties.text;
|
|
7080
7068
|
} else {
|
|
7081
|
-
const
|
|
7082
|
-
|
|
7083
|
-
return t || "";
|
|
7084
|
-
} else {
|
|
7085
|
-
return t || "Empty text";
|
|
7086
|
-
}
|
|
7069
|
+
const locale = pageBuilder.getLocale();
|
|
7070
|
+
return props.part.properties.text[locale] || "";
|
|
7087
7071
|
}
|
|
7088
|
-
} else if (props.viewMode) {
|
|
7089
|
-
return "";
|
|
7090
|
-
} else {
|
|
7091
|
-
return "Empty text";
|
|
7092
7072
|
}
|
|
7093
7073
|
});
|
|
7094
7074
|
const style = vue.computed(() => {
|
|
@@ -7101,23 +7081,29 @@ var __publicField = (obj, key, value) => {
|
|
|
7101
7081
|
};
|
|
7102
7082
|
});
|
|
7103
7083
|
return (_ctx, _cache) => {
|
|
7104
|
-
return vue.openBlock(), vue.createElementBlock("div",
|
|
7105
|
-
|
|
7106
|
-
|
|
7107
|
-
|
|
7084
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3$1, [
|
|
7085
|
+
text.value ? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
7086
|
+
key: 0,
|
|
7087
|
+
class: "text"
|
|
7088
|
+
}, style.value, {
|
|
7108
7089
|
textContent: vue.toDisplayString(text.value)
|
|
7109
|
-
}), null, 16,
|
|
7110
|
-
]
|
|
7090
|
+
}), null, 16, _hoisted_2$2$1)) : _ctx.placeholder ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$2$1)) : vue.createCommentVNode("", true)
|
|
7091
|
+
]);
|
|
7111
7092
|
};
|
|
7112
7093
|
}
|
|
7113
7094
|
});
|
|
7114
|
-
const _hoisted_1$
|
|
7115
|
-
const _hoisted_2$
|
|
7116
|
-
const
|
|
7095
|
+
const _hoisted_1$2$1 = { class: "pb-html-widget" };
|
|
7096
|
+
const _hoisted_2$1$1 = ["innerHTML"];
|
|
7097
|
+
const _hoisted_3$1$1 = {
|
|
7098
|
+
key: 1,
|
|
7099
|
+
class: "placeholder",
|
|
7100
|
+
textContent: "Empty HTML"
|
|
7101
|
+
};
|
|
7102
|
+
const _sfc_main$4$1 = /* @__PURE__ */ vue.defineComponent({
|
|
7117
7103
|
__name: "PbHtmlWidget",
|
|
7118
7104
|
props: {
|
|
7119
7105
|
part: {},
|
|
7120
|
-
|
|
7106
|
+
placeholder: { type: Boolean }
|
|
7121
7107
|
},
|
|
7122
7108
|
setup(__props) {
|
|
7123
7109
|
const props = __props;
|
|
@@ -7144,23 +7130,69 @@ ${_html.style}
|
|
|
7144
7130
|
var _a;
|
|
7145
7131
|
return getHtml((_a = props.part.properties) == null ? void 0 : _a.html);
|
|
7146
7132
|
});
|
|
7147
|
-
|
|
7148
|
-
if (props.viewMode) {
|
|
7149
|
-
return false;
|
|
7150
|
-
} else {
|
|
7151
|
-
return !html.value;
|
|
7152
|
-
}
|
|
7153
|
-
});
|
|
7133
|
+
vue.computed(() => props.placeholder ? !html.value : false);
|
|
7154
7134
|
return (_ctx, _cache) => {
|
|
7155
|
-
return vue.openBlock(), vue.createElementBlock("div",
|
|
7156
|
-
class: vue.normalizeClass([[emptyClass.value ? "empty" : ""], "pb-html-widget"])
|
|
7157
|
-
}, [
|
|
7135
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2$1, [
|
|
7158
7136
|
html.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
7159
7137
|
key: 0,
|
|
7160
7138
|
class: "html",
|
|
7161
7139
|
innerHTML: html.value
|
|
7162
|
-
}, null, 8,
|
|
7163
|
-
]
|
|
7140
|
+
}, null, 8, _hoisted_2$1$1)) : _ctx.placeholder ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$1$1)) : vue.createCommentVNode("", true)
|
|
7141
|
+
]);
|
|
7142
|
+
};
|
|
7143
|
+
}
|
|
7144
|
+
});
|
|
7145
|
+
const _hoisted_1$1$1 = { class: "pb-iframe-widget" };
|
|
7146
|
+
const _hoisted_2$v = ["src"];
|
|
7147
|
+
const _hoisted_3$s = {
|
|
7148
|
+
key: 1,
|
|
7149
|
+
class: "placeholder",
|
|
7150
|
+
textContent: "Empty URL"
|
|
7151
|
+
};
|
|
7152
|
+
const _sfc_main$3$1 = /* @__PURE__ */ vue.defineComponent({
|
|
7153
|
+
__name: "PbIframeWidget",
|
|
7154
|
+
props: {
|
|
7155
|
+
part: {},
|
|
7156
|
+
placeholder: { type: Boolean }
|
|
7157
|
+
},
|
|
7158
|
+
setup(__props) {
|
|
7159
|
+
const props = __props;
|
|
7160
|
+
const pageBuilder = usePageBuilder();
|
|
7161
|
+
const url = vue.computed(() => {
|
|
7162
|
+
var _a;
|
|
7163
|
+
const url2 = (_a = props.part.properties) == null ? void 0 : _a.url;
|
|
7164
|
+
if (!url2)
|
|
7165
|
+
return;
|
|
7166
|
+
if (typeof url2 !== "object")
|
|
7167
|
+
return;
|
|
7168
|
+
const locale = pageBuilder.getLocale();
|
|
7169
|
+
return url2[locale];
|
|
7170
|
+
});
|
|
7171
|
+
const style = vue.computed(() => ({
|
|
7172
|
+
style: {
|
|
7173
|
+
width: "100%",
|
|
7174
|
+
height: `${height.value}px`
|
|
7175
|
+
}
|
|
7176
|
+
}));
|
|
7177
|
+
const height = vue.ref(200);
|
|
7178
|
+
const updateHeight = (event) => {
|
|
7179
|
+
if (event.data && event.data.height) {
|
|
7180
|
+
height.value = event.data.height;
|
|
7181
|
+
}
|
|
7182
|
+
};
|
|
7183
|
+
vue.onMounted(() => {
|
|
7184
|
+
window.addEventListener("message", updateHeight);
|
|
7185
|
+
});
|
|
7186
|
+
vue.onBeforeUnmount(() => {
|
|
7187
|
+
window.removeEventListener("message", updateHeight);
|
|
7188
|
+
});
|
|
7189
|
+
return (_ctx, _cache) => {
|
|
7190
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1$1, [
|
|
7191
|
+
url.value ? (vue.openBlock(), vue.createElementBlock("iframe", vue.mergeProps({
|
|
7192
|
+
key: 0,
|
|
7193
|
+
src: url.value
|
|
7194
|
+
}, style.value), null, 16, _hoisted_2$v)) : _ctx.placeholder ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$s)) : vue.createCommentVNode("", true)
|
|
7195
|
+
]);
|
|
7164
7196
|
};
|
|
7165
7197
|
}
|
|
7166
7198
|
});
|
|
@@ -7168,41 +7200,46 @@ ${_html.style}
|
|
|
7168
7200
|
"Section": {
|
|
7169
7201
|
partType: "Section",
|
|
7170
7202
|
partName: "Section",
|
|
7171
|
-
creator: () => _sfc_main$
|
|
7203
|
+
creator: () => _sfc_main$7$1
|
|
7172
7204
|
},
|
|
7173
7205
|
"GlobalDesignPart": {
|
|
7174
7206
|
partType: "Section",
|
|
7175
7207
|
partName: "GlobalDesignPart",
|
|
7176
|
-
creator: () => _sfc_main$
|
|
7208
|
+
creator: () => _sfc_main$7$1
|
|
7177
7209
|
},
|
|
7178
7210
|
"LocalDesignPart": {
|
|
7179
7211
|
partType: "Section",
|
|
7180
7212
|
partName: "LocalDesignPart",
|
|
7181
|
-
creator: () => _sfc_main$
|
|
7213
|
+
creator: () => _sfc_main$7$1
|
|
7182
7214
|
},
|
|
7183
7215
|
"LocalMarketingPart": {
|
|
7184
7216
|
partType: "Section",
|
|
7185
7217
|
partName: "LocalMarketingPart",
|
|
7186
|
-
creator: () => _sfc_main$
|
|
7218
|
+
creator: () => _sfc_main$7$1
|
|
7187
7219
|
},
|
|
7188
7220
|
"Block": {
|
|
7189
7221
|
partType: "Block",
|
|
7190
7222
|
partName: "Block",
|
|
7191
|
-
creator: () => _sfc_main$
|
|
7223
|
+
creator: () => _sfc_main$9$1
|
|
7192
7224
|
},
|
|
7193
7225
|
"TextWidget": {
|
|
7194
7226
|
partType: "Widget",
|
|
7195
7227
|
partName: "TextWidget",
|
|
7196
|
-
creator: () => _sfc_main$
|
|
7228
|
+
creator: () => _sfc_main$5$1
|
|
7197
7229
|
},
|
|
7198
7230
|
"ImageWidget": {
|
|
7199
7231
|
partType: "Widget",
|
|
7200
7232
|
partName: "ImageWidget",
|
|
7201
|
-
creator: () => _sfc_main$
|
|
7233
|
+
creator: () => _sfc_main$6$1
|
|
7202
7234
|
},
|
|
7203
7235
|
"HtmlWidget": {
|
|
7204
7236
|
partType: "Widget",
|
|
7205
7237
|
partName: "HtmlWidget",
|
|
7238
|
+
creator: () => _sfc_main$4$1
|
|
7239
|
+
},
|
|
7240
|
+
"IframeWidget": {
|
|
7241
|
+
partType: "Widget",
|
|
7242
|
+
partName: "IframeWidget",
|
|
7206
7243
|
creator: () => _sfc_main$3$1
|
|
7207
7244
|
}
|
|
7208
7245
|
};
|
|
@@ -7348,7 +7385,7 @@ ${_html.style}
|
|
|
7348
7385
|
class: vue.normalizeClass([[_ctx.isMobilePage ? "mobile" : "pc"], "pb-page-content"])
|
|
7349
7386
|
}, [
|
|
7350
7387
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList((_a = _ctx.page) == null ? void 0 : _a.children, (section) => {
|
|
7351
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
7388
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$7$1, {
|
|
7352
7389
|
key: section.partId,
|
|
7353
7390
|
part: section
|
|
7354
7391
|
}, null, 8, ["part"]);
|
|
@@ -8767,13 +8804,15 @@ ${_html.style}
|
|
|
8767
8804
|
}, properties.value), [
|
|
8768
8805
|
thisComponent.value ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(thisComponent.value), {
|
|
8769
8806
|
key: 0,
|
|
8770
|
-
part: _ctx.part
|
|
8807
|
+
part: _ctx.part,
|
|
8808
|
+
placeholder: true
|
|
8771
8809
|
}, null, 8, ["part"])) : vue.createCommentVNode("", true),
|
|
8772
8810
|
childComponents.value && childComponents.value.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$t, [
|
|
8773
8811
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(childComponents.value, (child) => {
|
|
8774
8812
|
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(child.component), {
|
|
8775
8813
|
key: child.part.partId,
|
|
8776
|
-
part: child.part
|
|
8814
|
+
part: child.part,
|
|
8815
|
+
placeholder: true
|
|
8777
8816
|
}, null, 8, ["part"]);
|
|
8778
8817
|
}), 128))
|
|
8779
8818
|
])) : vue.createCommentVNode("", true),
|
|
@@ -12043,7 +12082,7 @@ ${_html.style}
|
|
|
12043
12082
|
},
|
|
12044
12083
|
localized: true,
|
|
12045
12084
|
allowsChild: () => false,
|
|
12046
|
-
creator: () => _sfc_main$
|
|
12085
|
+
creator: () => _sfc_main$5$1
|
|
12047
12086
|
},
|
|
12048
12087
|
{
|
|
12049
12088
|
partType: "Widget",
|
|
@@ -12069,7 +12108,7 @@ ${_html.style}
|
|
|
12069
12108
|
initialProperties: {},
|
|
12070
12109
|
localized: true,
|
|
12071
12110
|
allowsChild: () => false,
|
|
12072
|
-
creator: () => _sfc_main$
|
|
12111
|
+
creator: () => _sfc_main$6$1
|
|
12073
12112
|
},
|
|
12074
12113
|
{
|
|
12075
12114
|
partType: "Widget",
|
|
@@ -12096,6 +12135,33 @@ ${_html.style}
|
|
|
12096
12135
|
initialProperties: {},
|
|
12097
12136
|
localized: true,
|
|
12098
12137
|
allowsChild: () => false,
|
|
12138
|
+
creator: () => _sfc_main$4$1
|
|
12139
|
+
},
|
|
12140
|
+
{
|
|
12141
|
+
partType: "Widget",
|
|
12142
|
+
partName: "IframeWidget",
|
|
12143
|
+
caption: "IFrame",
|
|
12144
|
+
icon: "code",
|
|
12145
|
+
propertyGroups: [
|
|
12146
|
+
{
|
|
12147
|
+
groupName: "iframe",
|
|
12148
|
+
caption: "Iframe",
|
|
12149
|
+
properties: [
|
|
12150
|
+
{
|
|
12151
|
+
propertyName: "url",
|
|
12152
|
+
caption: "URL",
|
|
12153
|
+
propertyType: "text",
|
|
12154
|
+
params: "",
|
|
12155
|
+
localized: true,
|
|
12156
|
+
multiLang: true
|
|
12157
|
+
}
|
|
12158
|
+
]
|
|
12159
|
+
},
|
|
12160
|
+
...defaultWidgetPropertyGroups()
|
|
12161
|
+
],
|
|
12162
|
+
initialProperties: {},
|
|
12163
|
+
localized: true,
|
|
12164
|
+
allowsChild: () => false,
|
|
12099
12165
|
creator: () => _sfc_main$3$1
|
|
12100
12166
|
}
|
|
12101
12167
|
];
|
|
@@ -13624,7 +13690,7 @@ ${_html.style}
|
|
|
13624
13690
|
};
|
|
13625
13691
|
}
|
|
13626
13692
|
});
|
|
13627
|
-
const canvasStyle = '.pb-page {\n margin: 0 auto;\n margin-top: 20px;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: cover;\n}\n.pb-page .pb-page-content.selected {\n outline: 2px solid #4998f8;\n outline-offset: 5px;\n}\n.pb-page * {\n box-sizing: border-box;\n}\n.pb-add-widget-button {\n width: 100%;\n height: 100%;\n min-height: 200px;\n position: relative;\n}\n.pb-add-widget-button button {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n padding: 8px;\n background: none;\n border: none;\n cursor: pointer;\n}\n.pb-add-widget-button button:hover {\n background-color: #eeeeee;\n}\n.pb-add-widget-button .icon {\n font-size: 1rem;\n vertical-align: middle;\n}\n.pb-add-widget-button .text {\n font-size: 1rem;\n vertical-align: middle;\n margin-left: 0.4rem;\n}\n.pb-section {\n position: relative;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: cover;\n outline: 1px dashed #ccc;\n background-color: #fff;\n}\n.pb-section:hover:not(:has(.pb-block:hover)) {\n background-color: #f0f0f0;\n}\n.pb-section.selected {\n outline: 1px solid #e67e22;\n outline-offset: 1px;\n z-index: 999;\n}\n.pb-section.pb-section-static {\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n}\n.pb-section.pb-section-static:after {\n content: "";\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n background-color: rgba(0, 0, 0, 0.2);\n}\n.pb-section-static .pb-widget {\n outline: none;\n}\n.pb-block {\n display: flex;\n min-width: 1px;\n position: relative;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: cover;\n width: 100%;\n outline: 1px dashed #ccc;\n}\n.pb-block:hover:not(:has(.pb-widget:hover)) {\n background-color: #f0f0f0;\n}\n.pb-block.selected {\n outline: 1px solid #8e44ad;\n outline-offset: 1px;\n z-index: 999;\n}\n.pb-widget {\n position: relative;\n outline: 1px dashed #ccc;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: cover;\n}\n.pb-widget.selected {\n outline: 2px solid #27ae60;\n outline-offset: 1px;\n z-index: 999;\n}\n.pb-widget .children {\n position: absolute;\n width: 100%;\n height: 100%;\n}\n.pb-widget .pan-handle {\n position: absolute;\n left: -6px;\n top: -6px;\n width: 12px;\n height: 12px;\n background-color: #27ae60;\n cursor: move;\n}\n.pb-widget .resize-handle {\n position: absolute;\n right: -6px;\n bottom: -6px;\n width: 12px;\n height: 12px;\n background-color: #27ae60;\n cursor: nwse-resize;\n}\n.pb-widget {\n position: relative;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: cover;\n width: 100%;\n}\n.pb-widget .children {\n position: absolute;\n width: 100%;\n height: 100%;\n}\n.pb-text-widget {\n width: 100%;\n height: fit-content;\n}\n.pb-text-widget .text {\n color: #333;\n}\n.pb-text-widget
|
|
13693
|
+
const canvasStyle = '.pb-page {\n margin: 0 auto;\n margin-top: 20px;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: cover;\n}\n.pb-page .pb-page-content.selected {\n outline: 2px solid #4998f8;\n outline-offset: 5px;\n}\n.pb-page * {\n box-sizing: border-box;\n}\n.pb-add-widget-button {\n width: 100%;\n height: 100%;\n min-height: 200px;\n position: relative;\n}\n.pb-add-widget-button button {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n padding: 8px;\n background: none;\n border: none;\n cursor: pointer;\n}\n.pb-add-widget-button button:hover {\n background-color: #eeeeee;\n}\n.pb-add-widget-button .icon {\n font-size: 1rem;\n vertical-align: middle;\n}\n.pb-add-widget-button .text {\n font-size: 1rem;\n vertical-align: middle;\n margin-left: 0.4rem;\n}\n.pb-section {\n position: relative;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: cover;\n outline: 1px dashed #ccc;\n background-color: #fff;\n}\n.pb-section:hover:not(:has(.pb-block:hover)) {\n background-color: #f0f0f0;\n}\n.pb-section.selected {\n outline: 1px solid #e67e22;\n outline-offset: 1px;\n z-index: 999;\n}\n.pb-section.pb-section-static {\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n}\n.pb-section.pb-section-static:after {\n content: "";\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n background-color: rgba(0, 0, 0, 0.2);\n}\n.pb-section-static .pb-widget {\n outline: none;\n}\n.pb-block {\n display: flex;\n min-width: 1px;\n position: relative;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: cover;\n width: 100%;\n outline: 1px dashed #ccc;\n}\n.pb-block:hover:not(:has(.pb-widget:hover)) {\n background-color: #f0f0f0;\n}\n.pb-block.selected {\n outline: 1px solid #8e44ad;\n outline-offset: 1px;\n z-index: 999;\n}\n.pb-widget {\n position: relative;\n outline: 1px dashed #ccc;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: cover;\n}\n.pb-widget.selected {\n outline: 2px solid #27ae60;\n outline-offset: 1px;\n z-index: 999;\n}\n.pb-widget .children {\n position: absolute;\n width: 100%;\n height: 100%;\n}\n.pb-widget .pan-handle {\n position: absolute;\n left: -6px;\n top: -6px;\n width: 12px;\n height: 12px;\n background-color: #27ae60;\n cursor: move;\n}\n.pb-widget .resize-handle {\n position: absolute;\n right: -6px;\n bottom: -6px;\n width: 12px;\n height: 12px;\n background-color: #27ae60;\n cursor: nwse-resize;\n}\n.pb-widget {\n position: relative;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: cover;\n width: 100%;\n}\n.pb-widget .children {\n position: absolute;\n width: 100%;\n height: 100%;\n}\n.pb-text-widget {\n width: 100%;\n height: fit-content;\n}\n.pb-text-widget .text {\n color: #333;\n}\n.pb-text-widget .placeholder {\n padding: 4px 0;\n font-size: 18px;\n text-align: center;\n color: #999;\n}\n.pb-image-widget {\n width: 100%;\n}\n.pb-image-widget .image {\n width: 100%;\n}\n.pb-image-widget .empty {\n height: 100px;\n background-color: #eee;\n text-align: center;\n}\n.pb-image-widget .empty span {\n font-size: 40px;\n color: #999;\n line-height: 100px;\n vertical-align: middle;\n}\n.pb-html-widget {\n width: 100%;\n height: fit-content;\n}\n.pb-html-widget .placeholder {\n padding: 4px 0;\n font-size: 18px;\n text-align: center;\n color: #999;\n}\n.pb-iframe-widget {\n width: 100%;\n height: fit-content;\n}\n.pb-iframe-widget .placeholder {\n padding: 4px 0;\n font-size: 18px;\n text-align: center;\n color: #999;\n}\n.pb-product-list-widget {\n width: 100%;\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: flex-start;\n align-items: center;\n}\n.pb-product-list-widget .product-wrapper {\n width: 25%;\n}\n.pb-product-list-widget .product-wrapper .product {\n width: 95%;\n margin: 0 auto;\n padding-top: 8px;\n padding-bottom: 8px;\n}\n.pb-product-list-widget .product-wrapper img {\n width: 100%;\n}\n.pb-product-list-widget .product-wrapper .name {\n margin-top: 8px;\n font-size: 14px;\n}\n.pb-product-list-widget .product-wrapper .price {\n margin-top: 8px;\n font-size: 14px;\n font-weight: bold;\n}\n.pb-product-list-widget .product-wrapper .empty {\n height: 200px;\n background-color: #eee;\n text-align: center;\n}\n.pb-product-list-widget .product-wrapper .empty span {\n font-size: 40px;\n color: #999;\n line-height: 200px;\n vertical-align: middle;\n}\n@media (max-width: 768px) {\n .pb-product-list-widget .product-wrapper {\n width: 50%;\n }\n}\n.mobile .pb-product-list-widget .product-wrapper {\n width: 50%;\n}\n.pb-login-widget {\n height: 200px;\n text-align: center;\n}\n.pb-login-widget h3 {\n padding: 0;\n margin: 0;\n font-size: 32px;\n font-weight: bold;\n color: #ccc;\n line-height: 200px;\n vertical-align: middle;\n}\n.font-icon {\n font-family: Material Symbols Outlined, monospace;\n font-size: 1rem;\n max-width: 1em;\n}\nhtml, body {\n font-family: Noto Sans, Noto Sans KR, Noto Sans JP, Arial, sans-serif;\n font-size: 12px;\n}\nbody {\n background-color: white;\n height: 100%;\n margin: 0;\n}\n.pb-canvas-wrapper {\n padding: 32px 40px 56px 40px;\n height: 100%;\n background-color: #aaa;\n overflow: auto;\n}\n.pb-canvas-wrapper .pb-canvas {\n display: flex;\n flex-direction: row;\n transform-origin: top left;\n width: fit-content;\n min-width: 40px;\n min-height: 40px;\n margin: 0 auto;\n}\n.pb-position-mark {\n background-color: #ff3333;\n opacity: 0.5;\n border-radius: 2px;\n}\n.pb-add-section-handle {\n position: relative;\n text-align: center;\n cursor: pointer;\n z-index: 5;\n height: 0;\n}\n.pb-add-section-handle.top::before, .pb-add-section-handle.bottom::before, .pb-add-section-handle.middle::before {\n content: "";\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n opacity: 0;\n pointer-events: none;\n}\n.pb-add-section-handle.bottom {\n left: 50%;\n bottom: -32px;\n}\n.pb-add-section-handle:hover.top::before, .pb-add-section-handle:hover.bottom::before, .pb-add-section-handle:hover.middle::before,\n.pb-add-section-handle:hover > i {\n opacity: 1;\n}\n.pb-add-section-handle > i {\n vertical-align: middle;\n position: absolute;\n top: 50%;\n left: -20px;\n font-size: 2rem;\n transform: translate(-50%, -50%);\n opacity: 0.2;\n}\n.pb-button {\n background: none;\n border: none;\n cursor: pointer;\n vertical-align: middle;\n}\n.pb-guideline {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n}\n.pb-guideline.selected {\n z-index: 3;\n}\n.pb-guideline.preselect {\n z-index: 4;\n}';
|
|
13628
13694
|
const _hoisted_1$l = { class: "pb-canvas-frame" };
|
|
13629
13695
|
const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
|
|
13630
13696
|
__name: "PbCanvasFrame",
|
|
@@ -13638,7 +13704,7 @@ ${_html.style}
|
|
|
13638
13704
|
return (_b = (_a = iframeRef.value) == null ? void 0 : _a.contentWindow) == null ? void 0 : _b.document;
|
|
13639
13705
|
},
|
|
13640
13706
|
() => {
|
|
13641
|
-
var _a, _b, _c, _d, _e;
|
|
13707
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
13642
13708
|
if ((_c = (_b = (_a = iframeRef.value) == null ? void 0 : _a.contentWindow) == null ? void 0 : _b.document) == null ? void 0 : _c.head) {
|
|
13643
13709
|
const head = (_e = (_d = iframeRef.value) == null ? void 0 : _d.contentWindow) == null ? void 0 : _e.document.head;
|
|
13644
13710
|
head.innerHTML = `
|
|
@@ -13661,6 +13727,16 @@ ${_html.style}
|
|
|
13661
13727
|
<link href="https://fonts.googleapis.com/css2?family=Material+Icons+Outlined" rel="stylesheet" />
|
|
13662
13728
|
<style>${canvasStyle}</style>
|
|
13663
13729
|
`;
|
|
13730
|
+
const script2 = (_g = (_f = iframeRef.value) == null ? void 0 : _f.contentWindow) == null ? void 0 : _g.document.createElement("script");
|
|
13731
|
+
script2.innerHTML = `
|
|
13732
|
+
function forwardPostMessage(event) {
|
|
13733
|
+
if (event.data) {
|
|
13734
|
+
window.parent.postMessage(event.data, '*');
|
|
13735
|
+
}
|
|
13736
|
+
}
|
|
13737
|
+
window.addEventListener('message', forwardPostMessage);
|
|
13738
|
+
`;
|
|
13739
|
+
(_h = iframeRef.value) == null ? void 0 : _h.contentWindow.document.head.appendChild(script2);
|
|
13664
13740
|
pageBuilderEditor.keyHandlers.addDocumentKeyEventListener(iframeRef.value.contentWindow.document.body);
|
|
13665
13741
|
stopIframeWatch();
|
|
13666
13742
|
}
|
|
@@ -14477,6 +14553,8 @@ ${_html.style}
|
|
|
14477
14553
|
setup(__props, { emit: __emit }) {
|
|
14478
14554
|
const props = __props;
|
|
14479
14555
|
const emit = __emit;
|
|
14556
|
+
const pageBuilder = usePageBuilderEditor();
|
|
14557
|
+
const locales = vue.computed(() => pageBuilder.getLocales());
|
|
14480
14558
|
const emitUpdatePropertyValue = (value) => {
|
|
14481
14559
|
const properties = {};
|
|
14482
14560
|
properties[props.property.propertyName] = value;
|
|
@@ -14490,11 +14568,18 @@ ${_html.style}
|
|
|
14490
14568
|
}, null, 8, _hoisted_3$9)
|
|
14491
14569
|
]),
|
|
14492
14570
|
vue.createElementVNode("div", null, [
|
|
14493
|
-
vue.
|
|
14571
|
+
_ctx.property.multiLang ? (vue.openBlock(), vue.createBlock(vue.unref(bluesea.BSMultiLangTextInput), {
|
|
14572
|
+
key: 0,
|
|
14573
|
+
locales: locales.value,
|
|
14494
14574
|
"model-value": _ctx.value,
|
|
14495
14575
|
width: "100%",
|
|
14496
14576
|
"onUpdate:modelValue": emitUpdatePropertyValue
|
|
14497
|
-
}, null, 8, ["model-value"])
|
|
14577
|
+
}, null, 8, ["locales", "model-value"])) : (vue.openBlock(), vue.createBlock(vue.unref(bluesea.BSTextInput), {
|
|
14578
|
+
key: 1,
|
|
14579
|
+
"model-value": _ctx.value,
|
|
14580
|
+
width: "100%",
|
|
14581
|
+
"onUpdate:modelValue": emitUpdatePropertyValue
|
|
14582
|
+
}, null, 8, ["model-value"]))
|
|
14498
14583
|
])
|
|
14499
14584
|
]);
|
|
14500
14585
|
};
|
|
@@ -15097,9 +15182,10 @@ ${_html.style}
|
|
|
15097
15182
|
exports2.PageBuilderViewerEvent = PageBuilderViewerEvent;
|
|
15098
15183
|
exports2.Part = Part;
|
|
15099
15184
|
exports2.PbCustomWidget = _sfc_main$B;
|
|
15100
|
-
exports2.PbHtmlWidget = _sfc_main$
|
|
15101
|
-
exports2.
|
|
15102
|
-
exports2.
|
|
15185
|
+
exports2.PbHtmlWidget = _sfc_main$4$1;
|
|
15186
|
+
exports2.PbIframeWidget = _sfc_main$3$1;
|
|
15187
|
+
exports2.PbImageWidget = _sfc_main$6$1;
|
|
15188
|
+
exports2.PbTextWidget = _sfc_main$5$1;
|
|
15103
15189
|
exports2.ROOT_TYPE = ROOT_TYPE$1;
|
|
15104
15190
|
exports2.RootPart = RootPart;
|
|
15105
15191
|
exports2.SECTION_TYPE = SECTION_TYPE$1;
|
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.17",
|
|
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.66"
|
|
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.17"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/node": "^20.12.7",
|