@g1cloud/page-builder-editor 1.0.0-alpha.15 → 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-DI5Bm25g.js → PbPropertyEditorColor-DEVkcUND.js} +1 -1
- package/dist/{PbPropertyEditorHtml-Bb_kuc4m.js → PbPropertyEditorHtml-CxPlqBYx.js} +1 -1
- package/dist/{PbPropertyEditorImage-DbxF_eg7.js → PbPropertyEditorImage-DAEVOkpl.js} +7 -7
- package/dist/{PbPropertyEditorMultilineText-CefJbbiM.js → PbPropertyEditorMultilineText-zmUCXJQZ.js} +1 -1
- package/dist/{PbPropertyEditorText-BWOKvwD9.js → PbPropertyEditorText-CleInrev.js} +14 -4
- package/dist/{PbWidgetAddModal-CQvFYzfU.js → PbWidgetAddModal-DoR8HJUd.js} +32 -8
- package/dist/components/sidebar/property/PbPropertyEditorText.vue.d.ts +5 -4
- package/dist/{index-BIoyBfxM.js → index-rPBXWjSz.js} +313 -185
- package/dist/model/command.d.ts +17 -1
- package/dist/model/page-builder-editor.d.ts +9 -0
- package/dist/model/part-definintion.d.ts +2 -0
- package/dist/model/part-manager.d.ts +0 -1
- package/dist/page-builder-editor.js +14 -13
- package/dist/page-builder-editor.umd.cjs +389 -230
- 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
|
-
const _hoisted_5$
|
|
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
|
};
|
|
@@ -7225,15 +7262,25 @@ ${_html.style}
|
|
|
7225
7262
|
registerCustomPlugin(plugin) {
|
|
7226
7263
|
if (plugin.widgets) {
|
|
7227
7264
|
plugin.widgets.forEach((v) => {
|
|
7228
|
-
|
|
7229
|
-
|
|
7230
|
-
|
|
7231
|
-
|
|
7232
|
-
component: v.component
|
|
7233
|
-
};
|
|
7265
|
+
const w = { ...v };
|
|
7266
|
+
w.partType = "Widget";
|
|
7267
|
+
w.creator = () => _sfc_main$B;
|
|
7268
|
+
partDefinitions$1[v.partName] = w;
|
|
7234
7269
|
});
|
|
7235
7270
|
}
|
|
7236
7271
|
}
|
|
7272
|
+
watchCustomWidgetData(part) {
|
|
7273
|
+
const def = partDefinitions$1[part.partName];
|
|
7274
|
+
if (!def || !def.dataWatcher)
|
|
7275
|
+
return false;
|
|
7276
|
+
return def.dataWatcher(part.properties);
|
|
7277
|
+
}
|
|
7278
|
+
provideCustomWidgetData(part) {
|
|
7279
|
+
const def = partDefinitions$1[part.partName];
|
|
7280
|
+
if (!def || !def.dataProvider)
|
|
7281
|
+
return Promise.resolve();
|
|
7282
|
+
return def.dataProvider(part.properties);
|
|
7283
|
+
}
|
|
7237
7284
|
render(pageContent) {
|
|
7238
7285
|
const rootPart = new RootPart();
|
|
7239
7286
|
rootPart.pageBuilderId = this.instanceId;
|
|
@@ -7338,7 +7385,7 @@ ${_html.style}
|
|
|
7338
7385
|
class: vue.normalizeClass([[_ctx.isMobilePage ? "mobile" : "pc"], "pb-page-content"])
|
|
7339
7386
|
}, [
|
|
7340
7387
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList((_a = _ctx.page) == null ? void 0 : _a.children, (section) => {
|
|
7341
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
7388
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$7$1, {
|
|
7342
7389
|
key: section.partId,
|
|
7343
7390
|
part: section
|
|
7344
7391
|
}, null, 8, ["part"]);
|
|
@@ -7396,17 +7443,28 @@ ${_html.style}
|
|
|
7396
7443
|
__name: "PbCustomWidget",
|
|
7397
7444
|
props: {
|
|
7398
7445
|
part: {},
|
|
7399
|
-
|
|
7446
|
+
dataWatcher: { type: Function },
|
|
7447
|
+
dataProvider: { type: Function }
|
|
7400
7448
|
},
|
|
7401
7449
|
setup(__props) {
|
|
7402
7450
|
const props = __props;
|
|
7403
7451
|
const pageBuilder = usePageBuilder();
|
|
7404
7452
|
const comp = vue.computed(() => pageBuilder.getCustomWidgetComponent(props.part));
|
|
7453
|
+
const data = vue.ref({});
|
|
7405
7454
|
const bind = vue.computed(() => ({
|
|
7406
7455
|
pageBuilderId: pageBuilder.instanceId,
|
|
7407
|
-
|
|
7408
|
-
placeholder: true
|
|
7456
|
+
...props.part.properties || {},
|
|
7457
|
+
placeholder: true,
|
|
7458
|
+
...data.value || {}
|
|
7409
7459
|
}));
|
|
7460
|
+
const updateData = async () => {
|
|
7461
|
+
data.value = await pageBuilder.provideCustomWidgetData(props.part);
|
|
7462
|
+
};
|
|
7463
|
+
vue.onMounted(updateData);
|
|
7464
|
+
vue.watch(
|
|
7465
|
+
() => pageBuilder.watchCustomWidgetData(props.part),
|
|
7466
|
+
() => updateData()
|
|
7467
|
+
);
|
|
7410
7468
|
return (_ctx, _cache) => {
|
|
7411
7469
|
return comp.value ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(comp.value), vue.normalizeProps(vue.mergeProps({ key: 0 }, bind.value)), null, 16)) : vue.createCommentVNode("", true);
|
|
7412
7470
|
};
|
|
@@ -7938,20 +7996,6 @@ ${_html.style}
|
|
|
7938
7996
|
}
|
|
7939
7997
|
}
|
|
7940
7998
|
}
|
|
7941
|
-
getLocalDesignPartPropertyDefinitions(partName) {
|
|
7942
|
-
let properties;
|
|
7943
|
-
const partDef = this.getPartDefinition(partName);
|
|
7944
|
-
if (!partDef || !partDef.propertyGroups)
|
|
7945
|
-
return;
|
|
7946
|
-
for (const group of partDef.propertyGroups) {
|
|
7947
|
-
for (const property of group.properties) {
|
|
7948
|
-
if (property.localized) {
|
|
7949
|
-
properties = [...properties || [], property];
|
|
7950
|
-
}
|
|
7951
|
-
}
|
|
7952
|
-
}
|
|
7953
|
-
return properties;
|
|
7954
|
-
}
|
|
7955
7999
|
createPartComponent(part) {
|
|
7956
8000
|
if (part) {
|
|
7957
8001
|
const def = this.getPartDefinition(part.partName);
|
|
@@ -8760,13 +8804,15 @@ ${_html.style}
|
|
|
8760
8804
|
}, properties.value), [
|
|
8761
8805
|
thisComponent.value ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(thisComponent.value), {
|
|
8762
8806
|
key: 0,
|
|
8763
|
-
part: _ctx.part
|
|
8807
|
+
part: _ctx.part,
|
|
8808
|
+
placeholder: true
|
|
8764
8809
|
}, null, 8, ["part"])) : vue.createCommentVNode("", true),
|
|
8765
8810
|
childComponents.value && childComponents.value.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$t, [
|
|
8766
8811
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(childComponents.value, (child) => {
|
|
8767
8812
|
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(child.component), {
|
|
8768
8813
|
key: child.part.partId,
|
|
8769
|
-
part: child.part
|
|
8814
|
+
part: child.part,
|
|
8815
|
+
placeholder: true
|
|
8770
8816
|
}, null, 8, ["part"]);
|
|
8771
8817
|
}), 128))
|
|
8772
8818
|
])) : vue.createCommentVNode("", true),
|
|
@@ -9150,10 +9196,10 @@ ${_html.style}
|
|
|
9150
9196
|
/* @__PURE__ */ vue.createElementVNode("label", { textContent: "Position" })
|
|
9151
9197
|
], -1);
|
|
9152
9198
|
const _hoisted_4$g = { class: "flex-grow-1" };
|
|
9153
|
-
const _hoisted_5$
|
|
9154
|
-
const _hoisted_6$
|
|
9155
|
-
const _hoisted_7$
|
|
9156
|
-
const _hoisted_8$
|
|
9199
|
+
const _hoisted_5$8 = { class: "bg-gray-100 py-5 rounded-8" };
|
|
9200
|
+
const _hoisted_6$7 = { class: "text-center" };
|
|
9201
|
+
const _hoisted_7$6 = { class: "bs-layout-horizontal justify-content-center align-items-center" };
|
|
9202
|
+
const _hoisted_8$6 = /* @__PURE__ */ vue.createElementVNode("div", {
|
|
9157
9203
|
class: "d-inline-block text-center text-gray-300",
|
|
9158
9204
|
style: { "width": "30%", "font-size": "12px" }
|
|
9159
9205
|
}, [
|
|
@@ -9188,8 +9234,8 @@ ${_html.style}
|
|
|
9188
9234
|
vue.createElementVNode("div", _hoisted_2$r, [
|
|
9189
9235
|
_hoisted_3$p,
|
|
9190
9236
|
vue.createElementVNode("div", _hoisted_4$g, [
|
|
9191
|
-
vue.createElementVNode("div", _hoisted_5$
|
|
9192
|
-
vue.createElementVNode("div", _hoisted_6$
|
|
9237
|
+
vue.createElementVNode("div", _hoisted_5$8, [
|
|
9238
|
+
vue.createElementVNode("div", _hoisted_6$7, [
|
|
9193
9239
|
vue.createVNode(vue.unref(bluesea.BSTextInput), {
|
|
9194
9240
|
"model-value": top.value,
|
|
9195
9241
|
class: "ml-4",
|
|
@@ -9198,7 +9244,7 @@ ${_html.style}
|
|
|
9198
9244
|
"onUpdate:modelValue": updateTop
|
|
9199
9245
|
}, null, 8, ["model-value"])
|
|
9200
9246
|
]),
|
|
9201
|
-
vue.createElementVNode("div", _hoisted_7$
|
|
9247
|
+
vue.createElementVNode("div", _hoisted_7$6, [
|
|
9202
9248
|
vue.createVNode(vue.unref(bluesea.BSTextInput), {
|
|
9203
9249
|
"model-value": left.value,
|
|
9204
9250
|
class: "ml-4",
|
|
@@ -9206,7 +9252,7 @@ ${_html.style}
|
|
|
9206
9252
|
width: "30%",
|
|
9207
9253
|
"onUpdate:modelValue": updateLeft
|
|
9208
9254
|
}, null, 8, ["model-value"]),
|
|
9209
|
-
_hoisted_8$
|
|
9255
|
+
_hoisted_8$6,
|
|
9210
9256
|
vue.createVNode(vue.unref(bluesea.BSTextInput), {
|
|
9211
9257
|
"model-value": right.value,
|
|
9212
9258
|
class: "ml-4",
|
|
@@ -10979,13 +11025,13 @@ ${_html.style}
|
|
|
10979
11025
|
const _hoisted_2$l = { class: "vc-sketch-controls" };
|
|
10980
11026
|
const _hoisted_3$j = { class: "vc-sketch-sliders" };
|
|
10981
11027
|
const _hoisted_4$b = { class: "vc-sketch-hue-wrap" };
|
|
10982
|
-
const _hoisted_5$
|
|
11028
|
+
const _hoisted_5$7 = {
|
|
10983
11029
|
key: 0,
|
|
10984
11030
|
class: "vc-sketch-alpha-wrap"
|
|
10985
11031
|
};
|
|
10986
|
-
const _hoisted_6$
|
|
10987
|
-
const _hoisted_7$
|
|
10988
|
-
const _hoisted_8$
|
|
11032
|
+
const _hoisted_6$6 = { class: "vc-sketch-color-wrap" };
|
|
11033
|
+
const _hoisted_7$5 = ["aria-label"];
|
|
11034
|
+
const _hoisted_8$5 = {
|
|
10989
11035
|
key: 0,
|
|
10990
11036
|
class: "vc-sketch-field"
|
|
10991
11037
|
};
|
|
@@ -11032,23 +11078,23 @@ ${_html.style}
|
|
|
11032
11078
|
onChange: $options.childChange
|
|
11033
11079
|
}, null, 8, ["value", "onChange"])
|
|
11034
11080
|
]),
|
|
11035
|
-
!$props.disableAlpha ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$
|
|
11081
|
+
!$props.disableAlpha ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$7, [
|
|
11036
11082
|
vue.createVNode(_component_Alpha, {
|
|
11037
11083
|
value: _ctx.colors,
|
|
11038
11084
|
onChange: $options.childChange
|
|
11039
11085
|
}, null, 8, ["value", "onChange"])
|
|
11040
11086
|
])) : vue.createCommentVNode("v-if", true)
|
|
11041
11087
|
]),
|
|
11042
|
-
vue.createElementVNode("div", _hoisted_6$
|
|
11088
|
+
vue.createElementVNode("div", _hoisted_6$6, [
|
|
11043
11089
|
vue.createElementVNode("div", {
|
|
11044
11090
|
"aria-label": `Current color is ${$options.activeColor}`,
|
|
11045
11091
|
class: "vc-sketch-active-color",
|
|
11046
11092
|
style: vue.normalizeStyle({ background: $options.activeColor })
|
|
11047
|
-
}, null, 12, _hoisted_7$
|
|
11093
|
+
}, null, 12, _hoisted_7$5),
|
|
11048
11094
|
vue.createVNode(_component_Checkboard)
|
|
11049
11095
|
])
|
|
11050
11096
|
]),
|
|
11051
|
-
!$props.disableFields ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$
|
|
11097
|
+
!$props.disableFields ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$5, [
|
|
11052
11098
|
vue.createCommentVNode(" rgba "),
|
|
11053
11099
|
vue.createElementVNode("div", _hoisted_9$4, [
|
|
11054
11100
|
vue.createVNode(_component_EdIn, {
|
|
@@ -11241,7 +11287,7 @@ ${_html.style}
|
|
|
11241
11287
|
/* @__PURE__ */ vue.createElementVNode("label", { textContent: "Background" })
|
|
11242
11288
|
], -1);
|
|
11243
11289
|
const _hoisted_4$9 = { class: "bs-layout-horizontal" };
|
|
11244
|
-
const _hoisted_5$
|
|
11290
|
+
const _hoisted_5$6 = { class: "color" };
|
|
11245
11291
|
const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
11246
11292
|
__name: "PbPropertyGroupEditorBackground",
|
|
11247
11293
|
props: {
|
|
@@ -11276,7 +11322,7 @@ ${_html.style}
|
|
|
11276
11322
|
vue.createElementVNode("div", _hoisted_2$j, [
|
|
11277
11323
|
_hoisted_3$h,
|
|
11278
11324
|
vue.createElementVNode("div", _hoisted_4$9, [
|
|
11279
|
-
vue.createElementVNode("div", _hoisted_5$
|
|
11325
|
+
vue.createElementVNode("div", _hoisted_5$6, [
|
|
11280
11326
|
vue.createVNode(PbColorPicker, {
|
|
11281
11327
|
value: color.value,
|
|
11282
11328
|
"hide-delete": "",
|
|
@@ -11311,12 +11357,12 @@ ${_html.style}
|
|
|
11311
11357
|
/* @__PURE__ */ vue.createElementVNode("label", { textContent: "Border" })
|
|
11312
11358
|
], -1);
|
|
11313
11359
|
const _hoisted_4$8 = { class: "" };
|
|
11314
|
-
const _hoisted_5$
|
|
11360
|
+
const _hoisted_5$5 = /* @__PURE__ */ vue.createElementVNode("div", { class: "sub-title" }, [
|
|
11315
11361
|
/* @__PURE__ */ vue.createElementVNode("label", { textContent: "Color" })
|
|
11316
11362
|
], -1);
|
|
11317
|
-
const _hoisted_6$
|
|
11318
|
-
const _hoisted_7$
|
|
11319
|
-
const _hoisted_8$
|
|
11363
|
+
const _hoisted_6$5 = { class: "color" };
|
|
11364
|
+
const _hoisted_7$4 = { class: "mt-8" };
|
|
11365
|
+
const _hoisted_8$4 = /* @__PURE__ */ vue.createElementVNode("div", { class: "sub-title" }, [
|
|
11320
11366
|
/* @__PURE__ */ vue.createElementVNode("label", { textContent: "Border Width" })
|
|
11321
11367
|
], -1);
|
|
11322
11368
|
const _hoisted_9$3 = { class: "flex-grow-1 mt-4" };
|
|
@@ -11380,8 +11426,8 @@ ${_html.style}
|
|
|
11380
11426
|
vue.createElementVNode("div", _hoisted_2$i, [
|
|
11381
11427
|
_hoisted_3$g,
|
|
11382
11428
|
vue.createElementVNode("div", _hoisted_4$8, [
|
|
11383
|
-
_hoisted_5$
|
|
11384
|
-
vue.createElementVNode("div", _hoisted_6$
|
|
11429
|
+
_hoisted_5$5,
|
|
11430
|
+
vue.createElementVNode("div", _hoisted_6$5, [
|
|
11385
11431
|
vue.createVNode(PbColorPicker, {
|
|
11386
11432
|
value: color.value,
|
|
11387
11433
|
"hide-delete": "",
|
|
@@ -11399,8 +11445,8 @@ ${_html.style}
|
|
|
11399
11445
|
}, null, 8, ["model-value"])
|
|
11400
11446
|
])
|
|
11401
11447
|
]),
|
|
11402
|
-
vue.createElementVNode("div", _hoisted_7$
|
|
11403
|
-
_hoisted_8$
|
|
11448
|
+
vue.createElementVNode("div", _hoisted_7$4, [
|
|
11449
|
+
_hoisted_8$4,
|
|
11404
11450
|
vue.createElementVNode("div", _hoisted_9$3, [
|
|
11405
11451
|
vue.createElementVNode("div", _hoisted_10$1, [
|
|
11406
11452
|
vue.createElementVNode("div", _hoisted_11$1, [
|
|
@@ -11491,10 +11537,10 @@ ${_html.style}
|
|
|
11491
11537
|
/* @__PURE__ */ vue.createElementVNode("label", { textContent: "Margin" })
|
|
11492
11538
|
], -1);
|
|
11493
11539
|
const _hoisted_4$7 = { class: "flex-grow-1" };
|
|
11494
|
-
const _hoisted_5$
|
|
11495
|
-
const _hoisted_6$
|
|
11496
|
-
const _hoisted_7$
|
|
11497
|
-
const _hoisted_8$
|
|
11540
|
+
const _hoisted_5$4 = { class: "bg-gray-100 py-5 rounded-8" };
|
|
11541
|
+
const _hoisted_6$4 = { class: "text-center" };
|
|
11542
|
+
const _hoisted_7$3 = { class: "bs-layout-horizontal justify-content-center align-items-center" };
|
|
11543
|
+
const _hoisted_8$3 = /* @__PURE__ */ vue.createElementVNode("div", {
|
|
11498
11544
|
class: "d-inline-block text-center text-gray-300",
|
|
11499
11545
|
style: { "width": "30%", "font-size": "12px" }
|
|
11500
11546
|
}, [
|
|
@@ -11529,8 +11575,8 @@ ${_html.style}
|
|
|
11529
11575
|
vue.createElementVNode("div", _hoisted_2$h, [
|
|
11530
11576
|
_hoisted_3$f,
|
|
11531
11577
|
vue.createElementVNode("div", _hoisted_4$7, [
|
|
11532
|
-
vue.createElementVNode("div", _hoisted_5$
|
|
11533
|
-
vue.createElementVNode("div", _hoisted_6$
|
|
11578
|
+
vue.createElementVNode("div", _hoisted_5$4, [
|
|
11579
|
+
vue.createElementVNode("div", _hoisted_6$4, [
|
|
11534
11580
|
vue.createVNode(vue.unref(bluesea.BSTextInput), {
|
|
11535
11581
|
"model-value": top.value,
|
|
11536
11582
|
class: "ml-4",
|
|
@@ -11539,7 +11585,7 @@ ${_html.style}
|
|
|
11539
11585
|
"onUpdate:modelValue": updateTop
|
|
11540
11586
|
}, null, 8, ["model-value"])
|
|
11541
11587
|
]),
|
|
11542
|
-
vue.createElementVNode("div", _hoisted_7$
|
|
11588
|
+
vue.createElementVNode("div", _hoisted_7$3, [
|
|
11543
11589
|
vue.createVNode(vue.unref(bluesea.BSTextInput), {
|
|
11544
11590
|
"model-value": left.value,
|
|
11545
11591
|
class: "ml-4",
|
|
@@ -11547,7 +11593,7 @@ ${_html.style}
|
|
|
11547
11593
|
width: "30%",
|
|
11548
11594
|
"onUpdate:modelValue": updateLeft
|
|
11549
11595
|
}, null, 8, ["model-value"]),
|
|
11550
|
-
_hoisted_8$
|
|
11596
|
+
_hoisted_8$3,
|
|
11551
11597
|
vue.createVNode(vue.unref(bluesea.BSTextInput), {
|
|
11552
11598
|
"model-value": right.value,
|
|
11553
11599
|
class: "ml-4",
|
|
@@ -11578,10 +11624,10 @@ ${_html.style}
|
|
|
11578
11624
|
/* @__PURE__ */ vue.createElementVNode("label", { textContent: "Padding" })
|
|
11579
11625
|
], -1);
|
|
11580
11626
|
const _hoisted_4$6 = { class: "flex-grow-1" };
|
|
11581
|
-
const _hoisted_5$
|
|
11582
|
-
const _hoisted_6$
|
|
11583
|
-
const _hoisted_7$
|
|
11584
|
-
const _hoisted_8$
|
|
11627
|
+
const _hoisted_5$3 = { class: "bg-gray-100 py-5 rounded-8" };
|
|
11628
|
+
const _hoisted_6$3 = { class: "text-center" };
|
|
11629
|
+
const _hoisted_7$2 = { class: "bs-layout-horizontal justify-content-center align-items-center" };
|
|
11630
|
+
const _hoisted_8$2 = /* @__PURE__ */ vue.createElementVNode("div", {
|
|
11585
11631
|
class: "d-inline-block text-center text-gray-300",
|
|
11586
11632
|
style: { "width": "30%", "font-size": "12px" }
|
|
11587
11633
|
}, [
|
|
@@ -11616,8 +11662,8 @@ ${_html.style}
|
|
|
11616
11662
|
vue.createElementVNode("div", _hoisted_2$g, [
|
|
11617
11663
|
_hoisted_3$e,
|
|
11618
11664
|
vue.createElementVNode("div", _hoisted_4$6, [
|
|
11619
|
-
vue.createElementVNode("div", _hoisted_5$
|
|
11620
|
-
vue.createElementVNode("div", _hoisted_6$
|
|
11665
|
+
vue.createElementVNode("div", _hoisted_5$3, [
|
|
11666
|
+
vue.createElementVNode("div", _hoisted_6$3, [
|
|
11621
11667
|
vue.createVNode(vue.unref(bluesea.BSTextInput), {
|
|
11622
11668
|
"model-value": top.value,
|
|
11623
11669
|
class: "ml-4",
|
|
@@ -11626,7 +11672,7 @@ ${_html.style}
|
|
|
11626
11672
|
"onUpdate:modelValue": updateTop
|
|
11627
11673
|
}, null, 8, ["model-value"])
|
|
11628
11674
|
]),
|
|
11629
|
-
vue.createElementVNode("div", _hoisted_7$
|
|
11675
|
+
vue.createElementVNode("div", _hoisted_7$2, [
|
|
11630
11676
|
vue.createVNode(vue.unref(bluesea.BSTextInput), {
|
|
11631
11677
|
"model-value": left.value,
|
|
11632
11678
|
class: "ml-4",
|
|
@@ -11634,7 +11680,7 @@ ${_html.style}
|
|
|
11634
11680
|
width: "30%",
|
|
11635
11681
|
"onUpdate:modelValue": updateLeft
|
|
11636
11682
|
}, null, 8, ["model-value"]),
|
|
11637
|
-
_hoisted_8$
|
|
11683
|
+
_hoisted_8$2,
|
|
11638
11684
|
vue.createVNode(vue.unref(bluesea.BSTextInput), {
|
|
11639
11685
|
"model-value": right.value,
|
|
11640
11686
|
class: "ml-4",
|
|
@@ -11998,7 +12044,7 @@ ${_html.style}
|
|
|
11998
12044
|
{
|
|
11999
12045
|
partType: "Widget",
|
|
12000
12046
|
partName: "TextWidget",
|
|
12001
|
-
caption: "Text
|
|
12047
|
+
caption: "Text",
|
|
12002
12048
|
icon: "insert_text",
|
|
12003
12049
|
propertyGroups: [
|
|
12004
12050
|
{
|
|
@@ -12036,12 +12082,12 @@ ${_html.style}
|
|
|
12036
12082
|
},
|
|
12037
12083
|
localized: true,
|
|
12038
12084
|
allowsChild: () => false,
|
|
12039
|
-
creator: () => _sfc_main$
|
|
12085
|
+
creator: () => _sfc_main$5$1
|
|
12040
12086
|
},
|
|
12041
12087
|
{
|
|
12042
12088
|
partType: "Widget",
|
|
12043
12089
|
partName: "ImageWidget",
|
|
12044
|
-
caption: "Image
|
|
12090
|
+
caption: "Image",
|
|
12045
12091
|
icon: "imagesmode",
|
|
12046
12092
|
propertyGroups: [
|
|
12047
12093
|
{
|
|
@@ -12062,12 +12108,12 @@ ${_html.style}
|
|
|
12062
12108
|
initialProperties: {},
|
|
12063
12109
|
localized: true,
|
|
12064
12110
|
allowsChild: () => false,
|
|
12065
|
-
creator: () => _sfc_main$
|
|
12111
|
+
creator: () => _sfc_main$6$1
|
|
12066
12112
|
},
|
|
12067
12113
|
{
|
|
12068
12114
|
partType: "Widget",
|
|
12069
12115
|
partName: "HtmlWidget",
|
|
12070
|
-
caption: "HTML
|
|
12116
|
+
caption: "HTML",
|
|
12071
12117
|
icon: "code",
|
|
12072
12118
|
propertyGroups: [
|
|
12073
12119
|
{
|
|
@@ -12089,6 +12135,33 @@ ${_html.style}
|
|
|
12089
12135
|
initialProperties: {},
|
|
12090
12136
|
localized: true,
|
|
12091
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,
|
|
12092
12165
|
creator: () => _sfc_main$3$1
|
|
12093
12166
|
}
|
|
12094
12167
|
];
|
|
@@ -12122,6 +12195,13 @@ ${_html.style}
|
|
|
12122
12195
|
]
|
|
12123
12196
|
}
|
|
12124
12197
|
];
|
|
12198
|
+
const widgetPartDefinitions = [
|
|
12199
|
+
{
|
|
12200
|
+
groupName: "Widget",
|
|
12201
|
+
caption: "Widget",
|
|
12202
|
+
partDefinitions: widgets
|
|
12203
|
+
}
|
|
12204
|
+
];
|
|
12125
12205
|
const blockWidgetPartDefinitions = [
|
|
12126
12206
|
{
|
|
12127
12207
|
groupName: "Block",
|
|
@@ -12315,6 +12395,36 @@ ${_html.style}
|
|
|
12315
12395
|
};
|
|
12316
12396
|
__publicField(_AddPartCommand, "COMMAND_ID", "AddPart");
|
|
12317
12397
|
let AddPartCommand = _AddPartCommand;
|
|
12398
|
+
const _AddSectionCommand = class _AddSectionCommand {
|
|
12399
|
+
constructor(modal) {
|
|
12400
|
+
__publicField(this, "commandId", _AddSectionCommand.COMMAND_ID);
|
|
12401
|
+
__publicField(this, "caption", "Add Section");
|
|
12402
|
+
this.modal = modal;
|
|
12403
|
+
}
|
|
12404
|
+
execute(pageBuilder, args) {
|
|
12405
|
+
const def = pageBuilder.partManager.getSectionDefinition();
|
|
12406
|
+
if (!def)
|
|
12407
|
+
return;
|
|
12408
|
+
addPart(pageBuilder, def);
|
|
12409
|
+
}
|
|
12410
|
+
};
|
|
12411
|
+
__publicField(_AddSectionCommand, "COMMAND_ID", "AddSection");
|
|
12412
|
+
let AddSectionCommand = _AddSectionCommand;
|
|
12413
|
+
const _AddBlockCommand = class _AddBlockCommand {
|
|
12414
|
+
constructor(modal) {
|
|
12415
|
+
__publicField(this, "commandId", _AddBlockCommand.COMMAND_ID);
|
|
12416
|
+
__publicField(this, "caption", "Add Block");
|
|
12417
|
+
this.modal = modal;
|
|
12418
|
+
}
|
|
12419
|
+
execute(pageBuilder, args) {
|
|
12420
|
+
const def = pageBuilder.partManager.getBlockDefinition();
|
|
12421
|
+
if (!def)
|
|
12422
|
+
return;
|
|
12423
|
+
addPart(pageBuilder, def);
|
|
12424
|
+
}
|
|
12425
|
+
};
|
|
12426
|
+
__publicField(_AddBlockCommand, "COMMAND_ID", "AddBlock");
|
|
12427
|
+
let AddBlockCommand = _AddBlockCommand;
|
|
12318
12428
|
const addPart = (pageBuilder, def, attrs) => {
|
|
12319
12429
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
12320
12430
|
const selected = pageBuilder.context.getSelectedParts()[0];
|
|
@@ -12403,29 +12513,13 @@ ${_html.style}
|
|
|
12403
12513
|
}
|
|
12404
12514
|
};
|
|
12405
12515
|
const addSectionBefore = (pageBuilder, modal, args) => {
|
|
12406
|
-
const def = args && args.partDefinition;
|
|
12407
|
-
if (!def) {
|
|
12408
|
-
const partDefinitionGroups = designPartDefinitions;
|
|
12409
|
-
openPartAddModal(modal, {
|
|
12410
|
-
...args || {},
|
|
12411
|
-
pageBuilder,
|
|
12412
|
-
partDefinitionGroups
|
|
12413
|
-
}, (part, attrs) => {
|
|
12414
|
-
addSectionBefore(pageBuilder, modal, {
|
|
12415
|
-
...args || {},
|
|
12416
|
-
partDefinition: part,
|
|
12417
|
-
...attrs || {}
|
|
12418
|
-
});
|
|
12419
|
-
});
|
|
12420
|
-
return;
|
|
12421
|
-
}
|
|
12422
12516
|
const selected = pageBuilder.context.getSelectedParts()[0];
|
|
12423
12517
|
if (!selected)
|
|
12424
12518
|
return;
|
|
12425
12519
|
const section = pageBuilder.partManager.findNearestSection(selected);
|
|
12426
12520
|
if (!section || !section.parent || !section.parent.children)
|
|
12427
12521
|
return;
|
|
12428
|
-
const newSection =
|
|
12522
|
+
const newSection = createSection(pageBuilder);
|
|
12429
12523
|
if (!newSection)
|
|
12430
12524
|
return;
|
|
12431
12525
|
const child = createBlock(pageBuilder);
|
|
@@ -12434,29 +12528,13 @@ ${_html.style}
|
|
|
12434
12528
|
insertParts(pageBuilder, section.parent.partId, index, [newSection], true);
|
|
12435
12529
|
};
|
|
12436
12530
|
const addSectionAfter = (pageBuilder, modal, args) => {
|
|
12437
|
-
const def = args && args.partDefinition;
|
|
12438
|
-
if (!def) {
|
|
12439
|
-
const partDefinitionGroups = designPartDefinitions;
|
|
12440
|
-
openPartAddModal(modal, {
|
|
12441
|
-
...args || {},
|
|
12442
|
-
pageBuilder,
|
|
12443
|
-
partDefinitionGroups
|
|
12444
|
-
}, (part, attrs) => {
|
|
12445
|
-
addSectionAfter(pageBuilder, modal, {
|
|
12446
|
-
...args || {},
|
|
12447
|
-
partDefinition: part,
|
|
12448
|
-
...attrs || {}
|
|
12449
|
-
});
|
|
12450
|
-
});
|
|
12451
|
-
return;
|
|
12452
|
-
}
|
|
12453
12531
|
const selected = pageBuilder.context.getSelectedParts()[0];
|
|
12454
12532
|
if (!selected)
|
|
12455
12533
|
return;
|
|
12456
12534
|
const section = pageBuilder.partManager.findNearestSection(selected);
|
|
12457
12535
|
if (!section || !section.parent || !section.parent.children)
|
|
12458
12536
|
return;
|
|
12459
|
-
const newSection =
|
|
12537
|
+
const newSection = createSection(pageBuilder);
|
|
12460
12538
|
if (!newSection)
|
|
12461
12539
|
return;
|
|
12462
12540
|
const child = createBlock(pageBuilder);
|
|
@@ -12579,7 +12657,7 @@ ${_html.style}
|
|
|
12579
12657
|
this.modal = modal;
|
|
12580
12658
|
}
|
|
12581
12659
|
execute(pageBuilder, args) {
|
|
12582
|
-
addSectionBefore(pageBuilder, this.modal
|
|
12660
|
+
addSectionBefore(pageBuilder, this.modal);
|
|
12583
12661
|
}
|
|
12584
12662
|
};
|
|
12585
12663
|
__publicField(_AddSectionAboveCommand, "COMMAND_ID", "AddSectionAbove");
|
|
@@ -12592,7 +12670,7 @@ ${_html.style}
|
|
|
12592
12670
|
this.modal = modal;
|
|
12593
12671
|
}
|
|
12594
12672
|
execute(pageBuilder, args) {
|
|
12595
|
-
addSectionAfter(pageBuilder, this.modal
|
|
12673
|
+
addSectionAfter(pageBuilder, this.modal);
|
|
12596
12674
|
}
|
|
12597
12675
|
};
|
|
12598
12676
|
__publicField(_AddSectionBelowCommand, "COMMAND_ID", "AddSectionBelow");
|
|
@@ -12804,6 +12882,8 @@ ${_html.style}
|
|
|
12804
12882
|
new OpenAddPartModalCommand(modal),
|
|
12805
12883
|
new OpenAddWidgetModalCommand(modal),
|
|
12806
12884
|
new AddPartCommand(modal),
|
|
12885
|
+
new AddSectionCommand(modal),
|
|
12886
|
+
new AddBlockCommand(modal),
|
|
12807
12887
|
new AddSectionAboveCommand(modal),
|
|
12808
12888
|
new AddSectionBelowCommand(modal),
|
|
12809
12889
|
new AddBlockLeftCommand(),
|
|
@@ -13096,14 +13176,20 @@ ${_html.style}
|
|
|
13096
13176
|
groupId: "add",
|
|
13097
13177
|
buttons: [
|
|
13098
13178
|
{
|
|
13099
|
-
buttonId: "core:
|
|
13100
|
-
caption: "Add
|
|
13179
|
+
buttonId: "core:addSection",
|
|
13180
|
+
caption: "Add Section",
|
|
13101
13181
|
icon: "add_row_below",
|
|
13102
|
-
handler: (modeler) => modeler.commandRegistry.executeCommand(
|
|
13182
|
+
handler: (modeler) => modeler.commandRegistry.executeCommand(AddSectionCommand.COMMAND_ID)
|
|
13183
|
+
},
|
|
13184
|
+
{
|
|
13185
|
+
buttonId: "core:addBlock",
|
|
13186
|
+
caption: "Add Block",
|
|
13187
|
+
icon: "add_column_right",
|
|
13188
|
+
handler: (modeler) => modeler.commandRegistry.executeCommand(AddBlockCommand.COMMAND_ID)
|
|
13103
13189
|
},
|
|
13104
13190
|
{
|
|
13105
|
-
buttonId: "core:
|
|
13106
|
-
caption: "Add Widget
|
|
13191
|
+
buttonId: "core:addWidget",
|
|
13192
|
+
caption: "Add Widget",
|
|
13107
13193
|
icon: "desktop_landscape_add",
|
|
13108
13194
|
handler: (modeler) => modeler.commandRegistry.executeCommand(OpenAddWidgetModalCommand.COMMAND_ID)
|
|
13109
13195
|
}
|
|
@@ -13309,6 +13395,8 @@ ${_html.style}
|
|
|
13309
13395
|
__publicField(this, "scale", vue.ref(1));
|
|
13310
13396
|
__publicField(this, "locale", vue.ref("en"));
|
|
13311
13397
|
__publicField(this, "locales", vue.ref(["en"]));
|
|
13398
|
+
__publicField(this, "customWidgets", []);
|
|
13399
|
+
__publicField(this, "providers", {});
|
|
13312
13400
|
this.model = new Model();
|
|
13313
13401
|
this.context = new PageBuilderContextImpl(this);
|
|
13314
13402
|
this.editMode = "free";
|
|
@@ -13333,6 +13421,21 @@ ${_html.style}
|
|
|
13333
13421
|
return def.component;
|
|
13334
13422
|
}
|
|
13335
13423
|
}
|
|
13424
|
+
getProvider(name) {
|
|
13425
|
+
return this.providers[name];
|
|
13426
|
+
}
|
|
13427
|
+
watchCustomWidgetData(part) {
|
|
13428
|
+
const def = this.partManager.getPartDefinition(part.partName);
|
|
13429
|
+
if (!def || !def.dataWatcher)
|
|
13430
|
+
return false;
|
|
13431
|
+
return def.dataWatcher(part.properties);
|
|
13432
|
+
}
|
|
13433
|
+
provideCustomWidgetData(part) {
|
|
13434
|
+
const def = this.partManager.getPartDefinition(part.partName);
|
|
13435
|
+
if (!def || !def.dataProvider)
|
|
13436
|
+
return Promise.resolve();
|
|
13437
|
+
return def.dataProvider(part.properties);
|
|
13438
|
+
}
|
|
13336
13439
|
registerPlugin(plugin) {
|
|
13337
13440
|
if (plugin.partDefinitions)
|
|
13338
13441
|
this.partManager.registerPartDefinitions(plugin.partDefinitions);
|
|
@@ -13354,13 +13457,23 @@ ${_html.style}
|
|
|
13354
13457
|
const partDefinitions2 = {};
|
|
13355
13458
|
plugin.widgets.forEach((v) => {
|
|
13356
13459
|
const w = { ...v };
|
|
13357
|
-
w.
|
|
13460
|
+
w.partType = "Widget";
|
|
13358
13461
|
w.creator = () => _sfc_main$B;
|
|
13359
13462
|
w.propertyGroups = [...w.propertyGroups, ...defaultWidgetPropertyGroups()];
|
|
13360
13463
|
partDefinitions2[v.partName] = w;
|
|
13464
|
+
const found = this.customWidgets.find((x) => x.partName === v.partName);
|
|
13465
|
+
if (!found) {
|
|
13466
|
+
this.customWidgets.push(w);
|
|
13467
|
+
}
|
|
13361
13468
|
});
|
|
13362
13469
|
this.partManager.registerPartDefinitions(partDefinitions2);
|
|
13363
13470
|
}
|
|
13471
|
+
if (plugin.providers) {
|
|
13472
|
+
this.providers = {
|
|
13473
|
+
...this.providers,
|
|
13474
|
+
...plugin.providers
|
|
13475
|
+
};
|
|
13476
|
+
}
|
|
13364
13477
|
if (plugin.propertyEditors) {
|
|
13365
13478
|
this.partManager.registerPartPropertyEditors(plugin.propertyEditors);
|
|
13366
13479
|
}
|
|
@@ -13436,6 +13549,9 @@ ${_html.style}
|
|
|
13436
13549
|
]
|
|
13437
13550
|
});
|
|
13438
13551
|
}
|
|
13552
|
+
getCustomWidgets() {
|
|
13553
|
+
return this.customWidgets;
|
|
13554
|
+
}
|
|
13439
13555
|
getEmptyPageContent() {
|
|
13440
13556
|
const block = new Block();
|
|
13441
13557
|
const section = new Section();
|
|
@@ -13481,7 +13597,7 @@ ${_html.style}
|
|
|
13481
13597
|
const insertSection = (index) => {
|
|
13482
13598
|
if (!props.page)
|
|
13483
13599
|
return;
|
|
13484
|
-
editor.commandRegistry.executeCommand(
|
|
13600
|
+
editor.commandRegistry.executeCommand(AddSectionCommand.COMMAND_ID);
|
|
13485
13601
|
};
|
|
13486
13602
|
return (_ctx, _cache) => {
|
|
13487
13603
|
var _a;
|
|
@@ -13574,7 +13690,7 @@ ${_html.style}
|
|
|
13574
13690
|
};
|
|
13575
13691
|
}
|
|
13576
13692
|
});
|
|
13577
|
-
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}';
|
|
13578
13694
|
const _hoisted_1$l = { class: "pb-canvas-frame" };
|
|
13579
13695
|
const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
|
|
13580
13696
|
__name: "PbCanvasFrame",
|
|
@@ -13588,7 +13704,7 @@ ${_html.style}
|
|
|
13588
13704
|
return (_b = (_a = iframeRef.value) == null ? void 0 : _a.contentWindow) == null ? void 0 : _b.document;
|
|
13589
13705
|
},
|
|
13590
13706
|
() => {
|
|
13591
|
-
var _a, _b, _c, _d, _e;
|
|
13707
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
13592
13708
|
if ((_c = (_b = (_a = iframeRef.value) == null ? void 0 : _a.contentWindow) == null ? void 0 : _b.document) == null ? void 0 : _c.head) {
|
|
13593
13709
|
const head = (_e = (_d = iframeRef.value) == null ? void 0 : _d.contentWindow) == null ? void 0 : _e.document.head;
|
|
13594
13710
|
head.innerHTML = `
|
|
@@ -13611,6 +13727,16 @@ ${_html.style}
|
|
|
13611
13727
|
<link href="https://fonts.googleapis.com/css2?family=Material+Icons+Outlined" rel="stylesheet" />
|
|
13612
13728
|
<style>${canvasStyle}</style>
|
|
13613
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);
|
|
13614
13740
|
pageBuilderEditor.keyHandlers.addDocumentKeyEventListener(iframeRef.value.contentWindow.document.body);
|
|
13615
13741
|
stopIframeWatch();
|
|
13616
13742
|
}
|
|
@@ -14171,9 +14297,9 @@ ${_html.style}
|
|
|
14171
14297
|
], -1);
|
|
14172
14298
|
const _hoisted_3$b = { class: "bs-layout-horizontal" };
|
|
14173
14299
|
const _hoisted_4$4 = { class: "mr-2" };
|
|
14174
|
-
const _hoisted_5$
|
|
14175
|
-
const _hoisted_6$
|
|
14176
|
-
_hoisted_5$
|
|
14300
|
+
const _hoisted_5$2 = /* @__PURE__ */ vue.createElementVNode("span", { class: "font-icon" }, "more_horiz", -1);
|
|
14301
|
+
const _hoisted_6$2 = [
|
|
14302
|
+
_hoisted_5$2
|
|
14177
14303
|
];
|
|
14178
14304
|
const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
14179
14305
|
__name: "PbPropertyLocalMarketingPart",
|
|
@@ -14256,7 +14382,7 @@ ${_html.style}
|
|
|
14256
14382
|
}, null, 8, ["from-value", "to-value"])
|
|
14257
14383
|
]),
|
|
14258
14384
|
vue.createElementVNode("div", null, [
|
|
14259
|
-
vue.createElementVNode("button", { onClick: selectSchedule }, _hoisted_6$
|
|
14385
|
+
vue.createElementVNode("button", { onClick: selectSchedule }, _hoisted_6$2)
|
|
14260
14386
|
])
|
|
14261
14387
|
])
|
|
14262
14388
|
]);
|
|
@@ -14427,6 +14553,8 @@ ${_html.style}
|
|
|
14427
14553
|
setup(__props, { emit: __emit }) {
|
|
14428
14554
|
const props = __props;
|
|
14429
14555
|
const emit = __emit;
|
|
14556
|
+
const pageBuilder = usePageBuilderEditor();
|
|
14557
|
+
const locales = vue.computed(() => pageBuilder.getLocales());
|
|
14430
14558
|
const emitUpdatePropertyValue = (value) => {
|
|
14431
14559
|
const properties = {};
|
|
14432
14560
|
properties[props.property.propertyName] = value;
|
|
@@ -14440,11 +14568,18 @@ ${_html.style}
|
|
|
14440
14568
|
}, null, 8, _hoisted_3$9)
|
|
14441
14569
|
]),
|
|
14442
14570
|
vue.createElementVNode("div", null, [
|
|
14443
|
-
vue.
|
|
14571
|
+
_ctx.property.multiLang ? (vue.openBlock(), vue.createBlock(vue.unref(bluesea.BSMultiLangTextInput), {
|
|
14572
|
+
key: 0,
|
|
14573
|
+
locales: locales.value,
|
|
14444
14574
|
"model-value": _ctx.value,
|
|
14445
14575
|
width: "100%",
|
|
14446
14576
|
"onUpdate:modelValue": emitUpdatePropertyValue
|
|
14447
|
-
}, 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"]))
|
|
14448
14583
|
])
|
|
14449
14584
|
]);
|
|
14450
14585
|
};
|
|
@@ -14628,16 +14763,16 @@ ${_html.style}
|
|
|
14628
14763
|
},
|
|
14629
14764
|
emits: ["update-property-value"],
|
|
14630
14765
|
setup(__props, { emit: __emit }) {
|
|
14631
|
-
bluesea.useModal();
|
|
14632
14766
|
const pageBuilder = usePageBuilderEditor();
|
|
14767
|
+
const modal = bluesea.useModal();
|
|
14633
14768
|
const emit = __emit;
|
|
14634
14769
|
const selectImage = () => {
|
|
14635
|
-
|
|
14636
|
-
|
|
14637
|
-
|
|
14770
|
+
const imageProvider = pageBuilder.getProvider("image");
|
|
14771
|
+
if (imageProvider) {
|
|
14772
|
+
imageProvider({ modal }, (url) => {
|
|
14638
14773
|
emit("update-property-value", { image: url });
|
|
14639
|
-
}
|
|
14640
|
-
}
|
|
14774
|
+
});
|
|
14775
|
+
}
|
|
14641
14776
|
};
|
|
14642
14777
|
return (_ctx, _cache) => {
|
|
14643
14778
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$5, [
|
|
@@ -14763,9 +14898,19 @@ ${_html.style}
|
|
|
14763
14898
|
default: _sfc_main$3
|
|
14764
14899
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
14765
14900
|
const _hoisted_1$2 = { class: "bs-layout-vertical pb-part-add-modal" };
|
|
14766
|
-
const _hoisted_2$2 =
|
|
14901
|
+
const _hoisted_2$2 = /* @__PURE__ */ vue.createElementVNode("div", {
|
|
14902
|
+
class: "mb-8",
|
|
14903
|
+
textContent: "Basic Widgets"
|
|
14904
|
+
}, null, -1);
|
|
14767
14905
|
const _hoisted_3$2 = { class: "bs-layout-horizontal-wrap ml-16 mb-8 gap-8" };
|
|
14768
14906
|
const _hoisted_4$1 = ["onClick", "textContent"];
|
|
14907
|
+
const _hoisted_5$1 = { class: "group mb-16" };
|
|
14908
|
+
const _hoisted_6$1 = /* @__PURE__ */ vue.createElementVNode("div", {
|
|
14909
|
+
class: "mb-8",
|
|
14910
|
+
textContent: "Custom Widgets"
|
|
14911
|
+
}, null, -1);
|
|
14912
|
+
const _hoisted_7$1 = { class: "bs-layout-horizontal-wrap ml-16 mb-8 gap-8" };
|
|
14913
|
+
const _hoisted_8$1 = ["onClick", "textContent"];
|
|
14769
14914
|
const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
14770
14915
|
__name: "PbWidgetAddModal",
|
|
14771
14916
|
props: {
|
|
@@ -14774,9 +14919,12 @@ ${_html.style}
|
|
|
14774
14919
|
},
|
|
14775
14920
|
emits: ["selectHandler"],
|
|
14776
14921
|
setup(__props, { emit: __emit }) {
|
|
14922
|
+
const props = __props;
|
|
14777
14923
|
const emit = __emit;
|
|
14778
14924
|
const modalHandle = bluesea.useModalHandle();
|
|
14925
|
+
const customWidgets = vue.computed(() => props.pageBuilder.getCustomWidgets());
|
|
14779
14926
|
const select = (partDefinition) => {
|
|
14927
|
+
console.log(partDefinition);
|
|
14780
14928
|
emit("selectHandler", partDefinition);
|
|
14781
14929
|
modalHandle.close();
|
|
14782
14930
|
};
|
|
@@ -14784,15 +14932,12 @@ ${_html.style}
|
|
|
14784
14932
|
return vue.openBlock(), vue.createBlock(vue.unref(bluesea.BSModalFrame), { title: "Add Block/Widget" }, {
|
|
14785
14933
|
default: vue.withCtx(() => [
|
|
14786
14934
|
vue.createElementVNode("div", _hoisted_1$2, [
|
|
14787
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(
|
|
14935
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(widgetPartDefinitions), (group) => {
|
|
14788
14936
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
14789
14937
|
key: group.groupName,
|
|
14790
14938
|
class: "group mb-16"
|
|
14791
14939
|
}, [
|
|
14792
|
-
|
|
14793
|
-
class: "mb-8",
|
|
14794
|
-
textContent: vue.toDisplayString(group.caption)
|
|
14795
|
-
}, null, 8, _hoisted_2$2),
|
|
14940
|
+
_hoisted_2$2,
|
|
14796
14941
|
vue.createElementVNode("div", _hoisted_3$2, [
|
|
14797
14942
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group.partDefinitions, (part) => {
|
|
14798
14943
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -14804,7 +14949,20 @@ ${_html.style}
|
|
|
14804
14949
|
}), 128))
|
|
14805
14950
|
])
|
|
14806
14951
|
]);
|
|
14807
|
-
}), 128))
|
|
14952
|
+
}), 128)),
|
|
14953
|
+
vue.createElementVNode("div", _hoisted_5$1, [
|
|
14954
|
+
_hoisted_6$1,
|
|
14955
|
+
vue.createElementVNode("div", _hoisted_7$1, [
|
|
14956
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(customWidgets.value, (part) => {
|
|
14957
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
14958
|
+
key: part.partName,
|
|
14959
|
+
class: "part",
|
|
14960
|
+
onClick: ($event) => select(part),
|
|
14961
|
+
textContent: vue.toDisplayString(part.caption)
|
|
14962
|
+
}, null, 8, _hoisted_8$1);
|
|
14963
|
+
}), 128))
|
|
14964
|
+
])
|
|
14965
|
+
])
|
|
14808
14966
|
])
|
|
14809
14967
|
]),
|
|
14810
14968
|
_: 1
|
|
@@ -15024,9 +15182,10 @@ ${_html.style}
|
|
|
15024
15182
|
exports2.PageBuilderViewerEvent = PageBuilderViewerEvent;
|
|
15025
15183
|
exports2.Part = Part;
|
|
15026
15184
|
exports2.PbCustomWidget = _sfc_main$B;
|
|
15027
|
-
exports2.PbHtmlWidget = _sfc_main$
|
|
15028
|
-
exports2.
|
|
15029
|
-
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;
|
|
15030
15189
|
exports2.ROOT_TYPE = ROOT_TYPE$1;
|
|
15031
15190
|
exports2.RootPart = RootPart;
|
|
15032
15191
|
exports2.SECTION_TYPE = SECTION_TYPE$1;
|