@g1cloud/page-builder-editor 1.0.0-alpha.1 → 1.0.0-alpha.10
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/README.md +31 -6
- package/css/canvas.scss +1 -0
- package/css/page-builder-editor.scss +99 -19
- package/css/property-editor-color.scss +5 -0
- package/css/property-editor-html.scss +16 -0
- package/css/property-group-editor-background.scss +0 -12
- package/css/property-group-editor-border.scss +6 -12
- package/css/property-group-editor-margin.scss +0 -11
- package/css/property-group-editor-padding.scss +0 -11
- package/css/property-group-editor-position.scss +0 -11
- package/css/property-group-editor-size.scss +0 -11
- package/css/property-localpart.scss +2 -2
- package/dist/HtmlEditorModal-oXFayeg-.js +100 -0
- package/dist/PageBuilderEditor.vue.d.ts +5 -1
- package/dist/PbPropertyEditorColor-B9I99uQK.js +57 -0
- package/dist/PbPropertyEditorHtml-BVT2SwoK.js +64 -0
- package/dist/{PbPropertyEditorImage-BFIqG-bL.js → PbPropertyEditorImage-DLwg5dJz.js} +2 -2
- package/dist/PbPropertyEditorMultilineText-Bv4luXWg.js +65 -0
- package/dist/{PbPropertyEditorProduct--cf9LI2Z.js → PbPropertyEditorProduct-6STGd-Zs.js} +2 -2
- package/dist/{PbPropertyEditorReadonlyText-Bk0WJxA0.js → PbPropertyEditorReadonlyText-Dgp_AVOD.js} +1 -1
- package/dist/{PbPropertyEditorSelect-BJovN1su.js → PbPropertyEditorSelect-CWedbXJI.js} +1 -1
- package/dist/{PbPropertyEditorText-DNdXl-Tr.js → PbPropertyEditorText-BWOKvwD9.js} +1 -1
- package/dist/components/modal/HtmlEditorModal.vue.d.ts +23 -0
- package/dist/components/sidebar/property/PbPropertyEditorColor.vue.d.ts +23 -0
- package/dist/components/sidebar/property/PbPropertyEditorHtml.vue.d.ts +23 -0
- package/dist/components/sidebar/property/PbPropertyEditorMultilineText.vue.d.ts +5 -4
- package/dist/components/ui/PbColorPicker.vue.d.ts +2 -2
- package/dist/{index-BtILenNo.js → index-jUNIezk-.js} +874 -439
- package/dist/model/context.d.ts +15 -6
- package/dist/model/event.d.ts +9 -4
- package/dist/model/model.d.ts +6 -4
- package/dist/model/page-builder-editor.d.ts +8 -2
- package/dist/model/page-builder-util.d.ts +2 -2
- package/dist/model/part-definintion.d.ts +1 -0
- package/dist/model/part-manager.d.ts +1 -0
- package/dist/page-builder-editor.js +23 -19
- package/dist/page-builder-editor.umd.cjs +1346 -674
- package/dist/style.css +0 -167
- package/package.json +4 -3
- package/dist/PbPropertyEditorMultilineText-BMeNUGm8.js +0 -42
- /package/dist/components/sidebar/property/{PbPropertyLocalPart.vue.d.ts → PbPropertyLocalMarketingPart.vue.d.ts} +0 -0
|
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
7
|
import { ref, defineComponent, openBlock, createElementBlock, createCommentVNode, computed, normalizeClass, createElementVNode, mergeProps, toDisplayString, onMounted, watch, Fragment, renderList, provide, inject, createBlock as createBlock$1, resolveDynamicComponent, reactive, defineAsyncComponent, withDirectives, unref, createVNode, normalizeStyle, resolveComponent, vModelText, onBeforeUnmount, resolveDirective, withModifiers, renderSlot, normalizeProps, guardReactiveProps, markRaw, Teleport, withCtx } from "vue";
|
|
8
|
-
import { notNull, BSTextInput, vClickOutside,
|
|
8
|
+
import { notNull, BSTextInput, vClickOutside, useContextMenu, BSSelect, BSTabSheet, BSTree, useModal, BSDateRange } from "@g1cloud/bluesea";
|
|
9
9
|
const create$5 = () => /* @__PURE__ */ new Map();
|
|
10
10
|
const copy = (m) => {
|
|
11
11
|
const r = create$5();
|
|
@@ -6628,8 +6628,8 @@ const PageBuilderEditorEvent = {
|
|
|
6628
6628
|
requestProducts: (listener) => {
|
|
6629
6629
|
emitter$1.on("requestProducts", listener);
|
|
6630
6630
|
},
|
|
6631
|
-
|
|
6632
|
-
emitter$1.on("
|
|
6631
|
+
requestLocalMarketingPartSchedule: (listener) => {
|
|
6632
|
+
emitter$1.on("requestLocalMarketingPartSchedule", listener);
|
|
6633
6633
|
}
|
|
6634
6634
|
},
|
|
6635
6635
|
off: {
|
|
@@ -6645,8 +6645,8 @@ const PageBuilderEditorEvent = {
|
|
|
6645
6645
|
requestProducts: (listener) => {
|
|
6646
6646
|
emitter$1.off("requestProducts", listener);
|
|
6647
6647
|
},
|
|
6648
|
-
|
|
6649
|
-
emitter$1.off("
|
|
6648
|
+
requestLocalMarketingPartSchedule: (listener) => {
|
|
6649
|
+
emitter$1.off("requestLocalMarketingPartSchedule", listener);
|
|
6650
6650
|
}
|
|
6651
6651
|
},
|
|
6652
6652
|
emit: {
|
|
@@ -6662,8 +6662,8 @@ const PageBuilderEditorEvent = {
|
|
|
6662
6662
|
requestProducts: (param) => {
|
|
6663
6663
|
emitter$1.emit("requestProducts", param);
|
|
6664
6664
|
},
|
|
6665
|
-
|
|
6666
|
-
emitter$1.emit("
|
|
6665
|
+
requestLocalMarketingPartSchedule: (param) => {
|
|
6666
|
+
emitter$1.emit("requestLocalMarketingPartSchedule", param);
|
|
6667
6667
|
}
|
|
6668
6668
|
}
|
|
6669
6669
|
};
|
|
@@ -6721,7 +6721,7 @@ class Part {
|
|
|
6721
6721
|
return "";
|
|
6722
6722
|
}
|
|
6723
6723
|
getStyles() {
|
|
6724
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
|
|
6724
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J;
|
|
6725
6725
|
const style = {};
|
|
6726
6726
|
if (((_a = this.properties) == null ? void 0 : _a.direction) === "horizontal") {
|
|
6727
6727
|
style.display = "flex";
|
|
@@ -6765,6 +6765,40 @@ class Part {
|
|
|
6765
6765
|
style.width = this.properties.width;
|
|
6766
6766
|
if ((_s = this.properties) == null ? void 0 : _s.height)
|
|
6767
6767
|
style.height = this.properties.height;
|
|
6768
|
+
if ((_t = this.properties) == null ? void 0 : _t.backgroundColor)
|
|
6769
|
+
style.backgroundColor = this.properties.backgroundColor;
|
|
6770
|
+
if ((_u = this.properties) == null ? void 0 : _u.borderLeftWidth)
|
|
6771
|
+
style.borderLeftWidth = this.properties.borderLeftWidth;
|
|
6772
|
+
if ((_v = this.properties) == null ? void 0 : _v.borderRightWidth)
|
|
6773
|
+
style.borderRightWidth = this.properties.borderRightWidth;
|
|
6774
|
+
if ((_w = this.properties) == null ? void 0 : _w.borderTopWidth)
|
|
6775
|
+
style.borderTopWidth = this.properties.borderTopWidth;
|
|
6776
|
+
if ((_x = this.properties) == null ? void 0 : _x.borderBottomWidth)
|
|
6777
|
+
style.borderBottomWidth = this.properties.borderBottomWidth;
|
|
6778
|
+
if ((_y = this.properties) == null ? void 0 : _y.borderTopLeftRadius)
|
|
6779
|
+
style.borderTopLeftRadius = this.properties.borderTopLeftRadius;
|
|
6780
|
+
if ((_z = this.properties) == null ? void 0 : _z.borderTopRightRadius)
|
|
6781
|
+
style.borderTopRightRadius = this.properties.borderTopRightRadius;
|
|
6782
|
+
if ((_A = this.properties) == null ? void 0 : _A.borderBottomLeftRadius)
|
|
6783
|
+
style.borderBottomLeftRadius = this.properties.borderBottomLeftRadius;
|
|
6784
|
+
if ((_B = this.properties) == null ? void 0 : _B.borderBottomRightRadius)
|
|
6785
|
+
style.borderBottomRightRadius = this.properties.borderBottomRightRadius;
|
|
6786
|
+
if (((_C = this.properties) == null ? void 0 : _C.borderColor) && style.borderLeftWidth) {
|
|
6787
|
+
style.borderLeftStyle = "solid";
|
|
6788
|
+
style.borderLeftColor = (_D = this.properties) == null ? void 0 : _D.borderColor;
|
|
6789
|
+
}
|
|
6790
|
+
if (((_E = this.properties) == null ? void 0 : _E.borderColor) && style.borderRightWidth) {
|
|
6791
|
+
style.borderRightStyle = "solid";
|
|
6792
|
+
style.borderRightColor = (_F = this.properties) == null ? void 0 : _F.borderColor;
|
|
6793
|
+
}
|
|
6794
|
+
if (((_G = this.properties) == null ? void 0 : _G.borderColor) && style.borderTopWidth) {
|
|
6795
|
+
style.borderTopStyle = "solid";
|
|
6796
|
+
style.borderTopColor = (_H = this.properties) == null ? void 0 : _H.borderColor;
|
|
6797
|
+
}
|
|
6798
|
+
if (((_I = this.properties) == null ? void 0 : _I.borderColor) && style.borderBottomWidth) {
|
|
6799
|
+
style.borderBottomStyle = "solid";
|
|
6800
|
+
style.borderBottomColor = (_J = this.properties) == null ? void 0 : _J.borderColor;
|
|
6801
|
+
}
|
|
6768
6802
|
return style;
|
|
6769
6803
|
}
|
|
6770
6804
|
getPageBuilderId() {
|
|
@@ -6773,12 +6807,23 @@ class Part {
|
|
|
6773
6807
|
if (this.parent)
|
|
6774
6808
|
return this.parent.getPageBuilderId();
|
|
6775
6809
|
}
|
|
6810
|
+
isGlobalDesignPart() {
|
|
6811
|
+
return false;
|
|
6812
|
+
}
|
|
6813
|
+
isLocalDesignPart() {
|
|
6814
|
+
return false;
|
|
6815
|
+
}
|
|
6816
|
+
isLocalMarketingPart() {
|
|
6817
|
+
return false;
|
|
6818
|
+
}
|
|
6776
6819
|
}
|
|
6777
6820
|
class RootPart extends Part {
|
|
6778
6821
|
constructor() {
|
|
6779
6822
|
super();
|
|
6780
6823
|
__publicField2(this, "pageBuilderId");
|
|
6824
|
+
__publicField2(this, "language");
|
|
6781
6825
|
this.pageBuilderId = "";
|
|
6826
|
+
this.language = "en";
|
|
6782
6827
|
this.partType = ROOT_TYPE$1;
|
|
6783
6828
|
this.partName = ROOT_TYPE$1;
|
|
6784
6829
|
}
|
|
@@ -6805,6 +6850,18 @@ class Section extends Part {
|
|
|
6805
6850
|
isSection() {
|
|
6806
6851
|
return true;
|
|
6807
6852
|
}
|
|
6853
|
+
isGlobalDesignPart() {
|
|
6854
|
+
var _a;
|
|
6855
|
+
return ((_a = this.properties) == null ? void 0 : _a.sectionType) === "GlobalDesignPart";
|
|
6856
|
+
}
|
|
6857
|
+
isLocalDesignPart() {
|
|
6858
|
+
var _a;
|
|
6859
|
+
return ((_a = this.properties) == null ? void 0 : _a.sectionType) === "LocalDesignPart";
|
|
6860
|
+
}
|
|
6861
|
+
isLocalMarketingPart() {
|
|
6862
|
+
var _a;
|
|
6863
|
+
return ((_a = this.properties) == null ? void 0 : _a.sectionType) === "LocalMarketingPart";
|
|
6864
|
+
}
|
|
6808
6865
|
}
|
|
6809
6866
|
class Block extends Part {
|
|
6810
6867
|
constructor() {
|
|
@@ -6836,11 +6893,11 @@ let Model$1 = class Model {
|
|
|
6836
6893
|
}
|
|
6837
6894
|
};
|
|
6838
6895
|
const _hoisted_1$8$1 = ["data-model-id"];
|
|
6839
|
-
const _hoisted_2$
|
|
6896
|
+
const _hoisted_2$4$1 = {
|
|
6840
6897
|
key: 1,
|
|
6841
6898
|
class: "pb-nested-widget"
|
|
6842
6899
|
};
|
|
6843
|
-
const _sfc_main$
|
|
6900
|
+
const _sfc_main$9$1 = /* @__PURE__ */ defineComponent({
|
|
6844
6901
|
__name: "PbWidget",
|
|
6845
6902
|
props: {
|
|
6846
6903
|
part: {}
|
|
@@ -6862,7 +6919,7 @@ const _sfc_main$8$1 = /* @__PURE__ */ defineComponent({
|
|
|
6862
6919
|
key: 0,
|
|
6863
6920
|
part: _ctx.part
|
|
6864
6921
|
}, null, 8, ["part"])) : createCommentVNode("", true),
|
|
6865
|
-
childComponents.value && childComponents.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
6922
|
+
childComponents.value && childComponents.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_2$4$1, [
|
|
6866
6923
|
(openBlock(true), createElementBlock(Fragment, null, renderList(childComponents.value, (child) => {
|
|
6867
6924
|
return openBlock(), createBlock$1(resolveDynamicComponent(child.component), {
|
|
6868
6925
|
key: child.part.partId,
|
|
@@ -6875,7 +6932,7 @@ const _sfc_main$8$1 = /* @__PURE__ */ defineComponent({
|
|
|
6875
6932
|
}
|
|
6876
6933
|
});
|
|
6877
6934
|
const _hoisted_1$7$1 = ["data-model-id"];
|
|
6878
|
-
const _sfc_main$
|
|
6935
|
+
const _sfc_main$8$1 = /* @__PURE__ */ defineComponent({
|
|
6879
6936
|
__name: "PbBlock",
|
|
6880
6937
|
props: {
|
|
6881
6938
|
part: {}
|
|
@@ -6893,7 +6950,7 @@ const _sfc_main$7$1 = /* @__PURE__ */ defineComponent({
|
|
|
6893
6950
|
style: (_a = _ctx.part.properties) == null ? void 0 : _a.css
|
|
6894
6951
|
}, properties.value), [
|
|
6895
6952
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.part.children, (child) => {
|
|
6896
|
-
return openBlock(), createBlock$1(_sfc_main$
|
|
6953
|
+
return openBlock(), createBlock$1(_sfc_main$9$1, {
|
|
6897
6954
|
key: child.partId,
|
|
6898
6955
|
part: child
|
|
6899
6956
|
}, null, 8, ["part"]);
|
|
@@ -6903,7 +6960,7 @@ const _sfc_main$7$1 = /* @__PURE__ */ defineComponent({
|
|
|
6903
6960
|
}
|
|
6904
6961
|
});
|
|
6905
6962
|
const _hoisted_1$6$1 = { class: "pb-block" };
|
|
6906
|
-
const _hoisted_2$
|
|
6963
|
+
const _hoisted_2$3$1 = /* @__PURE__ */ createElementVNode("div", {
|
|
6907
6964
|
class: "pb-widget",
|
|
6908
6965
|
style: { "margin": "0 auto" }
|
|
6909
6966
|
}, [
|
|
@@ -6912,9 +6969,9 @@ const _hoisted_2$2$1 = /* @__PURE__ */ createElementVNode("div", {
|
|
|
6912
6969
|
])
|
|
6913
6970
|
], -1);
|
|
6914
6971
|
const _hoisted_3$2$1 = [
|
|
6915
|
-
_hoisted_2$
|
|
6972
|
+
_hoisted_2$3$1
|
|
6916
6973
|
];
|
|
6917
|
-
const _sfc_main$
|
|
6974
|
+
const _sfc_main$7$1 = /* @__PURE__ */ defineComponent({
|
|
6918
6975
|
__name: "PbLoginDepart",
|
|
6919
6976
|
props: {
|
|
6920
6977
|
part: {}
|
|
@@ -6926,7 +6983,7 @@ const _sfc_main$6$1 = /* @__PURE__ */ defineComponent({
|
|
|
6926
6983
|
}
|
|
6927
6984
|
});
|
|
6928
6985
|
const _hoisted_1$5$1 = ["data-model-id"];
|
|
6929
|
-
const _sfc_main$
|
|
6986
|
+
const _sfc_main$6$1 = /* @__PURE__ */ defineComponent({
|
|
6930
6987
|
__name: "PbSection",
|
|
6931
6988
|
props: {
|
|
6932
6989
|
part: {}
|
|
@@ -6942,11 +6999,11 @@ const _sfc_main$5$1 = /* @__PURE__ */ defineComponent({
|
|
|
6942
6999
|
"data-model-id": _ctx.part.partId,
|
|
6943
7000
|
style: (_a = _ctx.part.properties) == null ? void 0 : _a.css
|
|
6944
7001
|
}, properties.value), [
|
|
6945
|
-
((_b = _ctx.part.properties) == null ? void 0 : _b.name) === "Login Design Part" ? (openBlock(), createBlock$1(_sfc_main$
|
|
7002
|
+
((_b = _ctx.part.properties) == null ? void 0 : _b.name) === "Login Design Part" ? (openBlock(), createBlock$1(_sfc_main$7$1, {
|
|
6946
7003
|
key: 0,
|
|
6947
7004
|
part: _ctx.part
|
|
6948
7005
|
}, null, 8, ["part"])) : _ctx.part.children && _ctx.part.children.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.part.children, (block) => {
|
|
6949
|
-
return openBlock(), createBlock$1(_sfc_main$
|
|
7006
|
+
return openBlock(), createBlock$1(_sfc_main$8$1, {
|
|
6950
7007
|
key: block.partId,
|
|
6951
7008
|
part: block
|
|
6952
7009
|
}, null, 8, ["part"]);
|
|
@@ -6956,7 +7013,7 @@ const _sfc_main$5$1 = /* @__PURE__ */ defineComponent({
|
|
|
6956
7013
|
}
|
|
6957
7014
|
});
|
|
6958
7015
|
const _hoisted_1$4$1 = { class: "pb-image-widget" };
|
|
6959
|
-
const _hoisted_2$
|
|
7016
|
+
const _hoisted_2$2$1 = ["src"];
|
|
6960
7017
|
const _hoisted_3$1$1 = {
|
|
6961
7018
|
key: 1,
|
|
6962
7019
|
class: "empty"
|
|
@@ -6965,7 +7022,7 @@ const _hoisted_4$1$1 = /* @__PURE__ */ createElementVNode("span", { class: "font
|
|
|
6965
7022
|
const _hoisted_5$1$1 = [
|
|
6966
7023
|
_hoisted_4$1$1
|
|
6967
7024
|
];
|
|
6968
|
-
const _sfc_main$
|
|
7025
|
+
const _sfc_main$5$1 = /* @__PURE__ */ defineComponent({
|
|
6969
7026
|
__name: "PbImageWidget",
|
|
6970
7027
|
props: {
|
|
6971
7028
|
part: {},
|
|
@@ -6980,13 +7037,13 @@ const _sfc_main$4$1 = /* @__PURE__ */ defineComponent({
|
|
|
6980
7037
|
src: (_b = _ctx.part.properties) == null ? void 0 : _b.image,
|
|
6981
7038
|
alt: "",
|
|
6982
7039
|
class: "image"
|
|
6983
|
-
}, null, 8, _hoisted_2$
|
|
7040
|
+
}, null, 8, _hoisted_2$2$1)) : !_ctx.viewMode ? (openBlock(), createElementBlock("div", _hoisted_3$1$1, _hoisted_5$1$1)) : createCommentVNode("", true)
|
|
6984
7041
|
]);
|
|
6985
7042
|
};
|
|
6986
7043
|
}
|
|
6987
7044
|
});
|
|
6988
7045
|
const _hoisted_1$3$1 = ["textContent"];
|
|
6989
|
-
const _sfc_main$
|
|
7046
|
+
const _sfc_main$4$1 = /* @__PURE__ */ defineComponent({
|
|
6990
7047
|
__name: "PbTextWidget",
|
|
6991
7048
|
props: {
|
|
6992
7049
|
part: {},
|
|
@@ -6994,26 +7051,114 @@ const _sfc_main$3$1 = /* @__PURE__ */ defineComponent({
|
|
|
6994
7051
|
},
|
|
6995
7052
|
setup(__props) {
|
|
6996
7053
|
const props = __props;
|
|
6997
|
-
const
|
|
7054
|
+
const pageBuilder = usePageBuilder();
|
|
7055
|
+
const emptyClass = computed(() => {
|
|
7056
|
+
var _a;
|
|
7057
|
+
if (props.viewMode) {
|
|
7058
|
+
return false;
|
|
7059
|
+
} else if ((_a = props.part.properties) == null ? void 0 : _a.text) {
|
|
7060
|
+
if (typeof props.part.properties.text === "string") {
|
|
7061
|
+
return true;
|
|
7062
|
+
} else {
|
|
7063
|
+
return !props.part.properties.text[pageBuilder.language.value];
|
|
7064
|
+
}
|
|
7065
|
+
} else {
|
|
7066
|
+
return true;
|
|
7067
|
+
}
|
|
7068
|
+
});
|
|
7069
|
+
const text = computed(() => {
|
|
6998
7070
|
var _a;
|
|
7071
|
+
if ((_a = props.part.properties) == null ? void 0 : _a.text) {
|
|
7072
|
+
if (typeof props.part.properties.text === "string") {
|
|
7073
|
+
if (props.viewMode) {
|
|
7074
|
+
return "";
|
|
7075
|
+
} else {
|
|
7076
|
+
return "Empty text";
|
|
7077
|
+
}
|
|
7078
|
+
} else {
|
|
7079
|
+
const t = props.part.properties.text[pageBuilder.language.value];
|
|
7080
|
+
if (props.viewMode) {
|
|
7081
|
+
return t || "";
|
|
7082
|
+
} else {
|
|
7083
|
+
return t || "Empty text";
|
|
7084
|
+
}
|
|
7085
|
+
}
|
|
7086
|
+
} else if (props.viewMode) {
|
|
7087
|
+
return "";
|
|
7088
|
+
} else {
|
|
7089
|
+
return "Empty text";
|
|
7090
|
+
}
|
|
7091
|
+
});
|
|
7092
|
+
const style = computed(() => {
|
|
7093
|
+
var _a, _b;
|
|
6999
7094
|
return {
|
|
7000
7095
|
style: {
|
|
7001
|
-
fontSize: (_a = props.part.properties) == null ? void 0 : _a.fontSize
|
|
7096
|
+
fontSize: (_a = props.part.properties) == null ? void 0 : _a.fontSize,
|
|
7097
|
+
color: (_b = props.part.properties) == null ? void 0 : _b.color
|
|
7002
7098
|
}
|
|
7003
7099
|
};
|
|
7004
7100
|
});
|
|
7005
7101
|
return (_ctx, _cache) => {
|
|
7006
|
-
var _a, _b;
|
|
7007
7102
|
return openBlock(), createElementBlock("div", {
|
|
7008
|
-
class: normalizeClass([[
|
|
7103
|
+
class: normalizeClass([[emptyClass.value ? "empty" : ""], "pb-text-widget"])
|
|
7009
7104
|
}, [
|
|
7010
7105
|
createElementVNode("div", mergeProps({ class: "text" }, style.value, {
|
|
7011
|
-
textContent: toDisplayString(
|
|
7106
|
+
textContent: toDisplayString(text.value)
|
|
7012
7107
|
}), null, 16, _hoisted_1$3$1)
|
|
7013
7108
|
], 2);
|
|
7014
7109
|
};
|
|
7015
7110
|
}
|
|
7016
7111
|
});
|
|
7112
|
+
const _hoisted_1$2$1 = ["innerHTML"];
|
|
7113
|
+
const _hoisted_2$1$1 = { key: 1 };
|
|
7114
|
+
const _sfc_main$3$1 = /* @__PURE__ */ defineComponent({
|
|
7115
|
+
__name: "PbHtmlWidget",
|
|
7116
|
+
props: {
|
|
7117
|
+
part: {},
|
|
7118
|
+
viewMode: { type: Boolean, default: false }
|
|
7119
|
+
},
|
|
7120
|
+
setup(__props) {
|
|
7121
|
+
const props = __props;
|
|
7122
|
+
const pageBuilder = usePageBuilder();
|
|
7123
|
+
const getHtml = (html2) => {
|
|
7124
|
+
if (!html2)
|
|
7125
|
+
return;
|
|
7126
|
+
if (typeof html2 !== "object")
|
|
7127
|
+
return;
|
|
7128
|
+
const language = pageBuilder.language.value;
|
|
7129
|
+
let _html = html2[language];
|
|
7130
|
+
if (!_html && html2.tags) {
|
|
7131
|
+
_html = html2;
|
|
7132
|
+
}
|
|
7133
|
+
return `${_html.tags}
|
|
7134
|
+
<style>
|
|
7135
|
+
${_html.style}
|
|
7136
|
+
</style>`;
|
|
7137
|
+
};
|
|
7138
|
+
const html = computed(() => {
|
|
7139
|
+
var _a;
|
|
7140
|
+
return getHtml((_a = props.part.properties) == null ? void 0 : _a.html);
|
|
7141
|
+
});
|
|
7142
|
+
const emptyClass = computed(() => {
|
|
7143
|
+
if (props.viewMode) {
|
|
7144
|
+
return false;
|
|
7145
|
+
} else {
|
|
7146
|
+
return !html.value;
|
|
7147
|
+
}
|
|
7148
|
+
});
|
|
7149
|
+
return (_ctx, _cache) => {
|
|
7150
|
+
return openBlock(), createElementBlock("div", {
|
|
7151
|
+
class: normalizeClass([[emptyClass.value ? "empty" : ""], "pb-html-widget"])
|
|
7152
|
+
}, [
|
|
7153
|
+
html.value ? (openBlock(), createElementBlock("div", {
|
|
7154
|
+
key: 0,
|
|
7155
|
+
class: "html",
|
|
7156
|
+
innerHTML: html.value
|
|
7157
|
+
}, null, 8, _hoisted_1$2$1)) : (openBlock(), createElementBlock("span", _hoisted_2$1$1, "Empty HTML"))
|
|
7158
|
+
], 2);
|
|
7159
|
+
};
|
|
7160
|
+
}
|
|
7161
|
+
});
|
|
7017
7162
|
function mitt(n) {
|
|
7018
7163
|
return { all: n = n || /* @__PURE__ */ new Map(), on: function(t, e) {
|
|
7019
7164
|
var i = n.get(t);
|
|
@@ -7048,18 +7193,18 @@ const PageBuilderViewerEvent = {
|
|
|
7048
7193
|
}
|
|
7049
7194
|
}
|
|
7050
7195
|
};
|
|
7051
|
-
const _hoisted_1$
|
|
7196
|
+
const _hoisted_1$1$1 = { class: "pb-product-list-widget" };
|
|
7052
7197
|
const _hoisted_2$l = { class: "product" };
|
|
7053
|
-
const _hoisted_3$
|
|
7054
|
-
const _hoisted_4$
|
|
7055
|
-
const _hoisted_5$
|
|
7056
|
-
const _hoisted_6$
|
|
7198
|
+
const _hoisted_3$h = { class: "image" };
|
|
7199
|
+
const _hoisted_4$e = ["src"];
|
|
7200
|
+
const _hoisted_5$7 = { class: "name" };
|
|
7201
|
+
const _hoisted_6$6 = { class: "price" };
|
|
7057
7202
|
const _hoisted_7$5 = {
|
|
7058
7203
|
key: 1,
|
|
7059
7204
|
class: "empty"
|
|
7060
7205
|
};
|
|
7061
7206
|
const _hoisted_8$5 = /* @__PURE__ */ createElementVNode("span", { class: "font-icon" }, "image", -1);
|
|
7062
|
-
const _hoisted_9$
|
|
7207
|
+
const _hoisted_9$5 = [
|
|
7063
7208
|
_hoisted_8$5
|
|
7064
7209
|
];
|
|
7065
7210
|
const _sfc_main$2$1 = /* @__PURE__ */ defineComponent({
|
|
@@ -7090,7 +7235,7 @@ const _sfc_main$2$1 = /* @__PURE__ */ defineComponent({
|
|
|
7090
7235
|
return (_a = props.part.properties) == null ? void 0 : _a.products;
|
|
7091
7236
|
}, () => updateProducts());
|
|
7092
7237
|
return (_ctx, _cache) => {
|
|
7093
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
7238
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1$1, [
|
|
7094
7239
|
products.value ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(productCount.value, (index) => {
|
|
7095
7240
|
return openBlock(), createElementBlock("div", {
|
|
7096
7241
|
key: index,
|
|
@@ -7098,15 +7243,15 @@ const _sfc_main$2$1 = /* @__PURE__ */ defineComponent({
|
|
|
7098
7243
|
}, [
|
|
7099
7244
|
createElementVNode("div", _hoisted_2$l, [
|
|
7100
7245
|
products.value[index - 1] ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
7101
|
-
createElementVNode("div", _hoisted_3$
|
|
7246
|
+
createElementVNode("div", _hoisted_3$h, [
|
|
7102
7247
|
createElementVNode("img", {
|
|
7103
7248
|
src: products.value[index - 1].image,
|
|
7104
7249
|
alt: ""
|
|
7105
|
-
}, null, 8, _hoisted_4$
|
|
7250
|
+
}, null, 8, _hoisted_4$e)
|
|
7106
7251
|
]),
|
|
7107
|
-
createElementVNode("div", _hoisted_5$
|
|
7108
|
-
createElementVNode("div", _hoisted_6$
|
|
7109
|
-
], 64)) : (openBlock(), createElementBlock("div", _hoisted_7$5, _hoisted_9$
|
|
7252
|
+
createElementVNode("div", _hoisted_5$7, toDisplayString(products.value[index - 1].itemName), 1),
|
|
7253
|
+
createElementVNode("div", _hoisted_6$6, toDisplayString(products.value[index - 1].price), 1)
|
|
7254
|
+
], 64)) : (openBlock(), createElementBlock("div", _hoisted_7$5, _hoisted_9$5))
|
|
7110
7255
|
])
|
|
7111
7256
|
]);
|
|
7112
7257
|
}), 128)) : createCommentVNode("", true)
|
|
@@ -7118,37 +7263,42 @@ const partDefinitions$1 = {
|
|
|
7118
7263
|
"Section": {
|
|
7119
7264
|
partType: "Section",
|
|
7120
7265
|
partName: "Section",
|
|
7121
|
-
creator: () => _sfc_main$
|
|
7266
|
+
creator: () => _sfc_main$6$1
|
|
7122
7267
|
},
|
|
7123
7268
|
"GlobalDesignPart": {
|
|
7124
7269
|
partType: "Section",
|
|
7125
7270
|
partName: "GlobalDesignPart",
|
|
7126
|
-
creator: () => _sfc_main$
|
|
7271
|
+
creator: () => _sfc_main$6$1
|
|
7127
7272
|
},
|
|
7128
7273
|
"LocalDesignPart": {
|
|
7129
7274
|
partType: "Section",
|
|
7130
7275
|
partName: "LocalDesignPart",
|
|
7131
|
-
creator: () => _sfc_main$
|
|
7276
|
+
creator: () => _sfc_main$6$1
|
|
7132
7277
|
},
|
|
7133
7278
|
"LocalMarketingPart": {
|
|
7134
7279
|
partType: "Section",
|
|
7135
7280
|
partName: "LocalMarketingPart",
|
|
7136
|
-
creator: () => _sfc_main$
|
|
7281
|
+
creator: () => _sfc_main$6$1
|
|
7137
7282
|
},
|
|
7138
7283
|
"Block": {
|
|
7139
7284
|
partType: "Block",
|
|
7140
7285
|
partName: "Block",
|
|
7141
|
-
creator: () => _sfc_main$
|
|
7286
|
+
creator: () => _sfc_main$8$1
|
|
7142
7287
|
},
|
|
7143
7288
|
"TextWidget": {
|
|
7144
7289
|
partType: "Widget",
|
|
7145
7290
|
partName: "TextWidget",
|
|
7146
|
-
creator: () => _sfc_main$
|
|
7291
|
+
creator: () => _sfc_main$4$1
|
|
7147
7292
|
},
|
|
7148
7293
|
"ImageWidget": {
|
|
7149
7294
|
partType: "Widget",
|
|
7150
7295
|
partName: "ImageWidget",
|
|
7151
|
-
creator: () => _sfc_main$
|
|
7296
|
+
creator: () => _sfc_main$5$1
|
|
7297
|
+
},
|
|
7298
|
+
"HtmlWidget": {
|
|
7299
|
+
partType: "Widget",
|
|
7300
|
+
partName: "HtmlWidget",
|
|
7301
|
+
creator: () => _sfc_main$3$1
|
|
7152
7302
|
},
|
|
7153
7303
|
"ProductListWidget": {
|
|
7154
7304
|
partType: "Widget",
|
|
@@ -7156,13 +7306,21 @@ const partDefinitions$1 = {
|
|
|
7156
7306
|
creator: () => _sfc_main$2$1
|
|
7157
7307
|
}
|
|
7158
7308
|
};
|
|
7309
|
+
const PAGE_BUILDER_KEY = "PageBuilder";
|
|
7159
7310
|
const PAGE_BUILDER_VIEWER_KEY = "PageBuilderViewer";
|
|
7160
7311
|
class PageBuilderViewerImpl {
|
|
7161
7312
|
constructor() {
|
|
7162
7313
|
__publicField2(this, "instanceId");
|
|
7163
7314
|
__publicField2(this, "model");
|
|
7315
|
+
__publicField2(this, "language", ref("en"));
|
|
7164
7316
|
this.model = new Model$1();
|
|
7165
7317
|
}
|
|
7318
|
+
getLanguage() {
|
|
7319
|
+
return this.language.value;
|
|
7320
|
+
}
|
|
7321
|
+
setLanguage(language) {
|
|
7322
|
+
this.language.value = language || "en";
|
|
7323
|
+
}
|
|
7166
7324
|
render(pageContent) {
|
|
7167
7325
|
const rootPart = new RootPart();
|
|
7168
7326
|
rootPart.pageBuilderId = this.instanceId;
|
|
@@ -7184,7 +7342,12 @@ class PageBuilderViewerImpl {
|
|
|
7184
7342
|
part.partType = partContent.partType;
|
|
7185
7343
|
part.partName = partContent.partName;
|
|
7186
7344
|
part.properties = partContent.properties ? JSON.parse(JSON.stringify(partContent.properties)) : null;
|
|
7187
|
-
part.children = (partContent.children || []).map((child) =>
|
|
7345
|
+
part.children = (partContent.children || []).map((child) => {
|
|
7346
|
+
const childPart = this.parsePartContent(child);
|
|
7347
|
+
if (childPart)
|
|
7348
|
+
childPart.parent = part;
|
|
7349
|
+
return childPart;
|
|
7350
|
+
}).filter((part2) => !!part2);
|
|
7188
7351
|
return part;
|
|
7189
7352
|
}
|
|
7190
7353
|
createPart(partType) {
|
|
@@ -7204,13 +7367,22 @@ const createPageBuilderViewer = () => {
|
|
|
7204
7367
|
const viewer = new PageBuilderViewerImpl();
|
|
7205
7368
|
return viewer;
|
|
7206
7369
|
};
|
|
7370
|
+
const providePageBuilder = (pageBuilder) => {
|
|
7371
|
+
provide(PAGE_BUILDER_KEY, pageBuilder);
|
|
7372
|
+
};
|
|
7207
7373
|
const providePageBuilderViewer = (pageBuilderViewer) => {
|
|
7208
7374
|
provide(PAGE_BUILDER_VIEWER_KEY, pageBuilderViewer);
|
|
7209
7375
|
};
|
|
7376
|
+
const usePageBuilder = () => {
|
|
7377
|
+
const pageBuilder = inject(PAGE_BUILDER_KEY);
|
|
7378
|
+
if (!pageBuilder)
|
|
7379
|
+
throw Error("PageBuilder not found");
|
|
7380
|
+
return pageBuilder;
|
|
7381
|
+
};
|
|
7210
7382
|
const usePageBuilderViewer = () => {
|
|
7211
7383
|
const pageBuilderViewer = inject(PAGE_BUILDER_VIEWER_KEY);
|
|
7212
7384
|
if (!pageBuilderViewer)
|
|
7213
|
-
throw Error("
|
|
7385
|
+
throw Error("PageBuilderViewer not found");
|
|
7214
7386
|
return pageBuilderViewer;
|
|
7215
7387
|
};
|
|
7216
7388
|
const createPartComponents = (parts) => {
|
|
@@ -7228,11 +7400,11 @@ const createPartComponent = (part) => {
|
|
|
7228
7400
|
}
|
|
7229
7401
|
};
|
|
7230
7402
|
const getPartDefinition = (partName) => partDefinitions$1[partName];
|
|
7231
|
-
const _hoisted_1$1$1 = { class: "pb-page-content" };
|
|
7232
7403
|
const _sfc_main$1$1 = /* @__PURE__ */ defineComponent({
|
|
7233
7404
|
__name: "PbPage",
|
|
7234
7405
|
props: {
|
|
7235
|
-
page: {}
|
|
7406
|
+
page: {},
|
|
7407
|
+
isMobilePage: { type: Boolean }
|
|
7236
7408
|
},
|
|
7237
7409
|
setup(__props) {
|
|
7238
7410
|
const properties = computed(() => ({
|
|
@@ -7243,14 +7415,16 @@ const _sfc_main$1$1 = /* @__PURE__ */ defineComponent({
|
|
|
7243
7415
|
return (_ctx, _cache) => {
|
|
7244
7416
|
var _a;
|
|
7245
7417
|
return openBlock(), createElementBlock("div", mergeProps({ class: "pb-page" }, properties.value), [
|
|
7246
|
-
createElementVNode("div",
|
|
7418
|
+
createElementVNode("div", {
|
|
7419
|
+
class: normalizeClass([[_ctx.isMobilePage ? "mobile" : "pc"], "pb-page-content"])
|
|
7420
|
+
}, [
|
|
7247
7421
|
(openBlock(true), createElementBlock(Fragment, null, renderList((_a = _ctx.page) == null ? void 0 : _a.children, (section) => {
|
|
7248
|
-
return openBlock(), createBlock$1(_sfc_main$
|
|
7422
|
+
return openBlock(), createBlock$1(_sfc_main$6$1, {
|
|
7249
7423
|
key: section.partId,
|
|
7250
7424
|
part: section
|
|
7251
7425
|
}, null, 8, ["part"]);
|
|
7252
7426
|
}), 128))
|
|
7253
|
-
])
|
|
7427
|
+
], 2)
|
|
7254
7428
|
], 16);
|
|
7255
7429
|
};
|
|
7256
7430
|
}
|
|
@@ -7260,14 +7434,23 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
7260
7434
|
__name: "PageBuilderViewer",
|
|
7261
7435
|
props: {
|
|
7262
7436
|
instanceId: {},
|
|
7263
|
-
pageContent: {}
|
|
7437
|
+
pageContent: {},
|
|
7438
|
+
isMobilePage: { type: Boolean },
|
|
7439
|
+
language: {}
|
|
7264
7440
|
},
|
|
7265
7441
|
setup(__props) {
|
|
7266
7442
|
const props = __props;
|
|
7267
7443
|
const pageBuilderViewer = createPageBuilderViewer();
|
|
7268
7444
|
pageBuilderViewer.instanceId = props.instanceId;
|
|
7445
|
+
pageBuilderViewer.setLanguage(props.language);
|
|
7269
7446
|
providePageBuilderViewer(pageBuilderViewer);
|
|
7270
|
-
|
|
7447
|
+
providePageBuilder(pageBuilderViewer);
|
|
7448
|
+
const page = computed(() => pageBuilderViewer.model.rootPart.value.children && pageBuilderViewer.model.rootPart.value.children[props.isMobilePage ? 0 : 1]);
|
|
7449
|
+
onMounted(() => {
|
|
7450
|
+
if (props.pageContent) {
|
|
7451
|
+
pageBuilderViewer.render(props.pageContent);
|
|
7452
|
+
}
|
|
7453
|
+
});
|
|
7271
7454
|
watch(
|
|
7272
7455
|
() => props.pageContent,
|
|
7273
7456
|
(pageContent) => {
|
|
@@ -7280,8 +7463,9 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
7280
7463
|
return openBlock(), createElementBlock("div", _hoisted_1$u, [
|
|
7281
7464
|
page.value ? (openBlock(), createBlock$1(_sfc_main$1$1, {
|
|
7282
7465
|
key: 0,
|
|
7466
|
+
"is-mobile-page": _ctx.isMobilePage,
|
|
7283
7467
|
page: page.value
|
|
7284
|
-
}, null, 8, ["page"])) : createCommentVNode("", true)
|
|
7468
|
+
}, null, 8, ["is-mobile-page", "page"])) : createCommentVNode("", true)
|
|
7285
7469
|
]);
|
|
7286
7470
|
};
|
|
7287
7471
|
}
|
|
@@ -7342,12 +7526,12 @@ const partToJsonObject = (part) => {
|
|
|
7342
7526
|
}
|
|
7343
7527
|
return object;
|
|
7344
7528
|
};
|
|
7345
|
-
const partsFromJsonString = (jsonString) => {
|
|
7529
|
+
const partsFromJsonString = (jsonString, keepPartId = false) => {
|
|
7346
7530
|
const objects = JSON.parse(jsonString);
|
|
7347
7531
|
const parts = [];
|
|
7348
7532
|
if (objects && objects instanceof Array) {
|
|
7349
7533
|
objects.forEach((object) => {
|
|
7350
|
-
const part = partFromJsonObject(object);
|
|
7534
|
+
const part = partFromJsonObject(object, keepPartId);
|
|
7351
7535
|
if (part) {
|
|
7352
7536
|
parts.push(part);
|
|
7353
7537
|
}
|
|
@@ -7355,10 +7539,13 @@ const partsFromJsonString = (jsonString) => {
|
|
|
7355
7539
|
}
|
|
7356
7540
|
return parts;
|
|
7357
7541
|
};
|
|
7358
|
-
const partFromJsonObject = (object) => {
|
|
7542
|
+
const partFromJsonObject = (object, keepPartId = false) => {
|
|
7359
7543
|
const part = createPart(object.partType, object.partName);
|
|
7360
7544
|
if (!part)
|
|
7361
7545
|
return;
|
|
7546
|
+
if (keepPartId && object.partId) {
|
|
7547
|
+
part.partId = object.partId;
|
|
7548
|
+
}
|
|
7362
7549
|
if (object.properties) {
|
|
7363
7550
|
part.properties = {};
|
|
7364
7551
|
for (const name in object.properties) {
|
|
@@ -7369,7 +7556,7 @@ const partFromJsonObject = (object) => {
|
|
|
7369
7556
|
part.children = [];
|
|
7370
7557
|
object.children.forEach((childJson) => {
|
|
7371
7558
|
var _a;
|
|
7372
|
-
const childPart = partFromJsonObject(childJson);
|
|
7559
|
+
const childPart = partFromJsonObject(childJson, keepPartId);
|
|
7373
7560
|
if (childPart) {
|
|
7374
7561
|
childPart.parent = part;
|
|
7375
7562
|
(_a = part.children) == null ? void 0 : _a.push(childPart);
|
|
@@ -7401,14 +7588,20 @@ const syncProperties = (part, element) => {
|
|
|
7401
7588
|
for (const name in attrs) {
|
|
7402
7589
|
if (!RESERVED_ATTRIBUTES.includes(name)) {
|
|
7403
7590
|
const value = attrs[name];
|
|
7404
|
-
if (value)
|
|
7405
|
-
|
|
7406
|
-
|
|
7591
|
+
if (value) {
|
|
7592
|
+
if (name.indexOf(".object") > 0) {
|
|
7593
|
+
const _name = name.substring(0, name.length - ".object".length);
|
|
7594
|
+
part.properties[_name] = JSON.parse(value);
|
|
7595
|
+
} else {
|
|
7596
|
+
part.properties[name] = value;
|
|
7597
|
+
}
|
|
7598
|
+
} else {
|
|
7407
7599
|
delete part.properties[name];
|
|
7600
|
+
}
|
|
7408
7601
|
}
|
|
7409
7602
|
}
|
|
7410
7603
|
for (const name in part.properties) {
|
|
7411
|
-
if (!attrs[name])
|
|
7604
|
+
if (!attrs[name] && !attrs[`${name}.object`])
|
|
7412
7605
|
delete part.properties[name];
|
|
7413
7606
|
}
|
|
7414
7607
|
if (Object.keys(part.properties).length === 0) {
|
|
@@ -7564,10 +7757,10 @@ class Model2 {
|
|
|
7564
7757
|
});
|
|
7565
7758
|
return parts;
|
|
7566
7759
|
}
|
|
7567
|
-
parsePageModel(json,
|
|
7568
|
-
return partsFromJsonString(json);
|
|
7760
|
+
parsePageModel(json, keepPartId = false) {
|
|
7761
|
+
return partsFromJsonString(json, keepPartId);
|
|
7569
7762
|
}
|
|
7570
|
-
moveElements(partId, destPartId, destIndex, update) {
|
|
7763
|
+
moveElements(partId, destPartId, destIndex, update, doNotChangeIndex) {
|
|
7571
7764
|
var _a;
|
|
7572
7765
|
if (partId === destPartId)
|
|
7573
7766
|
return;
|
|
@@ -7575,7 +7768,7 @@ class Model2 {
|
|
|
7575
7768
|
if (element) {
|
|
7576
7769
|
if (((_a = element.parent) == null ? void 0 : _a.getAttribute(PART_ID_KEY)) === destPartId) {
|
|
7577
7770
|
const index = this.getIndexOfElement(element);
|
|
7578
|
-
if (index !== void 0 && index < destIndex)
|
|
7771
|
+
if (!doNotChangeIndex && index !== void 0 && index < destIndex)
|
|
7579
7772
|
destIndex--;
|
|
7580
7773
|
}
|
|
7581
7774
|
const parts = this.findPartsByIds([partId]);
|
|
@@ -7633,13 +7826,14 @@ class Model2 {
|
|
|
7633
7826
|
if (element) {
|
|
7634
7827
|
for (const name in param.properties) {
|
|
7635
7828
|
if (!RESERVED_ATTRIBUTES.includes(name)) {
|
|
7636
|
-
|
|
7829
|
+
this.setElementAttribute(element, name, param.properties[name]);
|
|
7637
7830
|
}
|
|
7638
7831
|
}
|
|
7639
7832
|
if (param.removeOtherAttributes) {
|
|
7640
7833
|
const allAttributes = element.getAttributes();
|
|
7641
7834
|
for (const name in allAttributes) {
|
|
7642
|
-
|
|
7835
|
+
const _name = name.indexOf(".object") > 0 ? name.substring(0, name.length - ".object".length) : name;
|
|
7836
|
+
if (!RESERVED_ATTRIBUTES.includes(name) && !param.properties.hasOwnProperty(_name)) {
|
|
7643
7837
|
element.removeAttribute(name);
|
|
7644
7838
|
}
|
|
7645
7839
|
}
|
|
@@ -7672,18 +7866,33 @@ class Model2 {
|
|
|
7672
7866
|
if (part.properties) {
|
|
7673
7867
|
for (const name in part.properties) {
|
|
7674
7868
|
if (!RESERVED_ATTRIBUTES.includes(name)) {
|
|
7675
|
-
|
|
7869
|
+
this.setElementAttribute(node, name, part.properties[name]);
|
|
7676
7870
|
}
|
|
7677
7871
|
}
|
|
7678
7872
|
}
|
|
7679
7873
|
node.setAttribute(PART_NAME_KEY, part.partName);
|
|
7680
|
-
node.setAttribute(PART_ID_KEY, getNewPartId());
|
|
7874
|
+
node.setAttribute(PART_ID_KEY, part.partId || getNewPartId());
|
|
7681
7875
|
if (part.children) {
|
|
7682
7876
|
const childNodes = part.children.map((child) => this.createElement(child));
|
|
7683
7877
|
node.insert(0, childNodes);
|
|
7684
7878
|
}
|
|
7685
7879
|
return node;
|
|
7686
7880
|
}
|
|
7881
|
+
setElementAttribute(node, name, value) {
|
|
7882
|
+
if (!value || typeof value === "string") {
|
|
7883
|
+
node.setAttribute(name, value ? value : "");
|
|
7884
|
+
} else if (typeof value === "object") {
|
|
7885
|
+
node.setAttribute(`${name}.object`, JSON.stringify(value));
|
|
7886
|
+
}
|
|
7887
|
+
}
|
|
7888
|
+
getElementAttribute(node, name) {
|
|
7889
|
+
let value = node.getAttribute(name);
|
|
7890
|
+
if (value)
|
|
7891
|
+
return value;
|
|
7892
|
+
value = node.getAttribute(`${name}.object`);
|
|
7893
|
+
if (value)
|
|
7894
|
+
return JSON.parse(value);
|
|
7895
|
+
}
|
|
7687
7896
|
getIndexOfElement(element) {
|
|
7688
7897
|
if (element.parent instanceof YXmlElement) {
|
|
7689
7898
|
let index = 0;
|
|
@@ -7725,7 +7934,7 @@ class Model2 {
|
|
|
7725
7934
|
const properties = {};
|
|
7726
7935
|
event.changes.keys.forEach((_, key) => {
|
|
7727
7936
|
if (!RESERVED_ATTRIBUTES.includes(key)) {
|
|
7728
|
-
properties[key] =
|
|
7937
|
+
properties[key] = this.getElementAttribute(element, key) || "";
|
|
7729
7938
|
}
|
|
7730
7939
|
});
|
|
7731
7940
|
(_a = result.updated) == null ? void 0 : _a.push({ element, properties });
|
|
@@ -7761,6 +7970,20 @@ class PartManager {
|
|
|
7761
7970
|
}
|
|
7762
7971
|
}
|
|
7763
7972
|
}
|
|
7973
|
+
getLocalDesignPartPropertyDefinitions(partName) {
|
|
7974
|
+
let properties;
|
|
7975
|
+
const partDef = this.getPartDefinition(partName);
|
|
7976
|
+
if (!partDef || !partDef.propertyGroups)
|
|
7977
|
+
return;
|
|
7978
|
+
for (const group of partDef.propertyGroups) {
|
|
7979
|
+
for (const property of group.properties) {
|
|
7980
|
+
if (property.localized) {
|
|
7981
|
+
properties = [...properties || [], property];
|
|
7982
|
+
}
|
|
7983
|
+
}
|
|
7984
|
+
}
|
|
7985
|
+
return properties;
|
|
7986
|
+
}
|
|
7764
7987
|
createPartComponent(part) {
|
|
7765
7988
|
if (part) {
|
|
7766
7989
|
const def = this.getPartDefinition(part.partName);
|
|
@@ -7838,16 +8061,24 @@ class PartManager {
|
|
|
7838
8061
|
}
|
|
7839
8062
|
const defaultPartPropertyEditors = () => {
|
|
7840
8063
|
return {
|
|
7841
|
-
"readonly-text": () => defineAsyncComponent(() => import("./PbPropertyEditorReadonlyText-
|
|
7842
|
-
"text": () => defineAsyncComponent(() => import("./PbPropertyEditorText-
|
|
7843
|
-
"multiline-text": () => defineAsyncComponent(() => import("./PbPropertyEditorMultilineText-
|
|
7844
|
-
"select": () => defineAsyncComponent(() => import("./PbPropertyEditorSelect-
|
|
7845
|
-
"
|
|
7846
|
-
"
|
|
8064
|
+
"readonly-text": () => defineAsyncComponent(() => import("./PbPropertyEditorReadonlyText-Dgp_AVOD.js")),
|
|
8065
|
+
"text": () => defineAsyncComponent(() => import("./PbPropertyEditorText-BWOKvwD9.js")),
|
|
8066
|
+
"multiline-text": () => defineAsyncComponent(() => import("./PbPropertyEditorMultilineText-Bv4luXWg.js")),
|
|
8067
|
+
"select": () => defineAsyncComponent(() => import("./PbPropertyEditorSelect-CWedbXJI.js")),
|
|
8068
|
+
"color": () => defineAsyncComponent(() => import("./PbPropertyEditorColor-B9I99uQK.js")),
|
|
8069
|
+
"image": () => defineAsyncComponent(() => import("./PbPropertyEditorImage-DLwg5dJz.js")),
|
|
8070
|
+
"html": () => defineAsyncComponent(() => import("./PbPropertyEditorHtml-BVT2SwoK.js")),
|
|
8071
|
+
"product": () => defineAsyncComponent(() => import("./PbPropertyEditorProduct-6STGd-Zs.js"))
|
|
7847
8072
|
};
|
|
7848
8073
|
};
|
|
7849
8074
|
const getPropertyValueOfParts = (parts, propertyName) => {
|
|
7850
|
-
|
|
8075
|
+
if (parts.length === 1) {
|
|
8076
|
+
return parts[0].getProperty(propertyName);
|
|
8077
|
+
}
|
|
8078
|
+
const values = parts.map((part) => {
|
|
8079
|
+
const val = part.getProperty(propertyName);
|
|
8080
|
+
return val && typeof val === "string" ? val : "";
|
|
8081
|
+
});
|
|
7851
8082
|
const unique = values.filter((val, index) => values.indexOf(val) === index);
|
|
7852
8083
|
return unique.length === 1 ? unique[0] : void 0;
|
|
7853
8084
|
};
|
|
@@ -8070,16 +8301,16 @@ const _export_sfc = (sfc, props) => {
|
|
|
8070
8301
|
const _sfc_main$p = {};
|
|
8071
8302
|
const _hoisted_1$t = { class: "pb-add-widget-button" };
|
|
8072
8303
|
const _hoisted_2$k = /* @__PURE__ */ createElementVNode("span", { class: "icon material-icons-outlined" }, "add_box", -1);
|
|
8073
|
-
const _hoisted_3$
|
|
8074
|
-
const _hoisted_4$
|
|
8304
|
+
const _hoisted_3$g = /* @__PURE__ */ createElementVNode("span", { class: "text" }, "Add Widget", -1);
|
|
8305
|
+
const _hoisted_4$d = [
|
|
8075
8306
|
_hoisted_2$k,
|
|
8076
|
-
_hoisted_3$
|
|
8307
|
+
_hoisted_3$g
|
|
8077
8308
|
];
|
|
8078
8309
|
function _sfc_render$1(_ctx, _cache) {
|
|
8079
8310
|
return openBlock(), createElementBlock("div", _hoisted_1$t, [
|
|
8080
8311
|
createElementVNode("button", {
|
|
8081
8312
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("add-widget", $event))
|
|
8082
|
-
}, _hoisted_4$
|
|
8313
|
+
}, _hoisted_4$d)
|
|
8083
8314
|
]);
|
|
8084
8315
|
}
|
|
8085
8316
|
const PbAddWidgetButton = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$1]]);
|
|
@@ -8799,7 +9030,7 @@ const _hoisted_2$i = /* @__PURE__ */ createElementVNode("div", {
|
|
|
8799
9030
|
/* @__PURE__ */ createElementVNode("h3", null, "Login Design Part")
|
|
8800
9031
|
])
|
|
8801
9032
|
], -1);
|
|
8802
|
-
const _hoisted_3$
|
|
9033
|
+
const _hoisted_3$f = [
|
|
8803
9034
|
_hoisted_2$i
|
|
8804
9035
|
];
|
|
8805
9036
|
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
@@ -8809,7 +9040,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
8809
9040
|
},
|
|
8810
9041
|
setup(__props) {
|
|
8811
9042
|
return (_ctx, _cache) => {
|
|
8812
|
-
return openBlock(), createElementBlock("div", _hoisted_1$q, _hoisted_3$
|
|
9043
|
+
return openBlock(), createElementBlock("div", _hoisted_1$q, _hoisted_3$f);
|
|
8813
9044
|
};
|
|
8814
9045
|
}
|
|
8815
9046
|
});
|
|
@@ -8832,12 +9063,12 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
8832
9063
|
});
|
|
8833
9064
|
const properties = computed(() => ({ style: props.part.getStyles() }));
|
|
8834
9065
|
const disabled = computed(() => {
|
|
8835
|
-
var _a
|
|
9066
|
+
var _a;
|
|
8836
9067
|
if (["static"].includes(((_a = props.part.properties) == null ? void 0 : _a.sectionType) || ""))
|
|
8837
9068
|
return true;
|
|
8838
|
-
if (pageBuilder.editMode === "local" &&
|
|
9069
|
+
if (pageBuilder.editMode === "local" && props.part.isGlobalDesignPart())
|
|
8839
9070
|
return true;
|
|
8840
|
-
if (pageBuilder.editMode === "global" &&
|
|
9071
|
+
if (pageBuilder.editMode === "global" && (props.part.isLocalDesignPart() || props.part.isLocalMarketingPart()))
|
|
8841
9072
|
return true;
|
|
8842
9073
|
return false;
|
|
8843
9074
|
});
|
|
@@ -8948,14 +9179,20 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
8948
9179
|
});
|
|
8949
9180
|
const _hoisted_1$o = { class: "group-editor group-editor-position" };
|
|
8950
9181
|
const _hoisted_2$h = { class: "flex-align-center" };
|
|
8951
|
-
const _hoisted_3$
|
|
8952
|
-
/* @__PURE__ */ createElementVNode("label",
|
|
9182
|
+
const _hoisted_3$e = /* @__PURE__ */ createElementVNode("div", { class: "title" }, [
|
|
9183
|
+
/* @__PURE__ */ createElementVNode("label", { textContent: "Position" })
|
|
8953
9184
|
], -1);
|
|
8954
|
-
const _hoisted_4$
|
|
8955
|
-
const _hoisted_5$
|
|
8956
|
-
const _hoisted_6$
|
|
8957
|
-
const _hoisted_7$4 =
|
|
8958
|
-
const _hoisted_8$4 = /* @__PURE__ */ createElementVNode("
|
|
9185
|
+
const _hoisted_4$c = { class: "flex-grow-1" };
|
|
9186
|
+
const _hoisted_5$6 = { class: "bg-gray-100 py-5 rounded-8" };
|
|
9187
|
+
const _hoisted_6$5 = { class: "text-center" };
|
|
9188
|
+
const _hoisted_7$4 = { class: "bs-layout-horizontal justify-content-center align-items-center" };
|
|
9189
|
+
const _hoisted_8$4 = /* @__PURE__ */ createElementVNode("div", {
|
|
9190
|
+
class: "d-inline-block text-center text-gray-300",
|
|
9191
|
+
style: { "width": "30%", "font-size": "12px" }
|
|
9192
|
+
}, [
|
|
9193
|
+
/* @__PURE__ */ createElementVNode("span", { class: "font-icon" }, "add")
|
|
9194
|
+
], -1);
|
|
9195
|
+
const _hoisted_9$4 = { class: "text-center" };
|
|
8959
9196
|
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
8960
9197
|
__name: "PbPropertyGroupEditorPosition",
|
|
8961
9198
|
props: {
|
|
@@ -8982,37 +9219,44 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
8982
9219
|
return (_ctx, _cache) => {
|
|
8983
9220
|
return openBlock(), createElementBlock("div", _hoisted_1$o, [
|
|
8984
9221
|
createElementVNode("div", _hoisted_2$h, [
|
|
8985
|
-
_hoisted_3$
|
|
8986
|
-
createElementVNode("div", _hoisted_4$
|
|
8987
|
-
createElementVNode("div",
|
|
8988
|
-
|
|
8989
|
-
|
|
8990
|
-
|
|
8991
|
-
|
|
8992
|
-
|
|
8993
|
-
|
|
8994
|
-
|
|
8995
|
-
|
|
8996
|
-
|
|
8997
|
-
|
|
8998
|
-
|
|
8999
|
-
|
|
9000
|
-
|
|
9001
|
-
|
|
9002
|
-
|
|
9003
|
-
|
|
9004
|
-
"model-value"
|
|
9005
|
-
|
|
9006
|
-
|
|
9007
|
-
|
|
9008
|
-
|
|
9009
|
-
|
|
9010
|
-
|
|
9011
|
-
|
|
9012
|
-
|
|
9013
|
-
|
|
9014
|
-
|
|
9015
|
-
|
|
9222
|
+
_hoisted_3$e,
|
|
9223
|
+
createElementVNode("div", _hoisted_4$c, [
|
|
9224
|
+
createElementVNode("div", _hoisted_5$6, [
|
|
9225
|
+
createElementVNode("div", _hoisted_6$5, [
|
|
9226
|
+
createVNode(unref(BSTextInput), {
|
|
9227
|
+
"model-value": top.value,
|
|
9228
|
+
class: "ml-4",
|
|
9229
|
+
prefix: "T",
|
|
9230
|
+
width: "30%",
|
|
9231
|
+
"onUpdate:modelValue": updateTop
|
|
9232
|
+
}, null, 8, ["model-value"])
|
|
9233
|
+
]),
|
|
9234
|
+
createElementVNode("div", _hoisted_7$4, [
|
|
9235
|
+
createVNode(unref(BSTextInput), {
|
|
9236
|
+
"model-value": left.value,
|
|
9237
|
+
class: "ml-4",
|
|
9238
|
+
prefix: "L",
|
|
9239
|
+
width: "30%",
|
|
9240
|
+
"onUpdate:modelValue": updateLeft
|
|
9241
|
+
}, null, 8, ["model-value"]),
|
|
9242
|
+
_hoisted_8$4,
|
|
9243
|
+
createVNode(unref(BSTextInput), {
|
|
9244
|
+
"model-value": right.value,
|
|
9245
|
+
class: "ml-4",
|
|
9246
|
+
prefix: "R",
|
|
9247
|
+
width: "30%",
|
|
9248
|
+
"onUpdate:modelValue": updateRight
|
|
9249
|
+
}, null, 8, ["model-value"])
|
|
9250
|
+
]),
|
|
9251
|
+
createElementVNode("div", _hoisted_9$4, [
|
|
9252
|
+
createVNode(unref(BSTextInput), {
|
|
9253
|
+
"model-value": bottom.value,
|
|
9254
|
+
class: "ml-4",
|
|
9255
|
+
prefix: "B",
|
|
9256
|
+
width: "30%",
|
|
9257
|
+
"onUpdate:modelValue": updateBottom
|
|
9258
|
+
}, null, 8, ["model-value"])
|
|
9259
|
+
])
|
|
9016
9260
|
])
|
|
9017
9261
|
])
|
|
9018
9262
|
])
|
|
@@ -9022,12 +9266,10 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
9022
9266
|
});
|
|
9023
9267
|
const _hoisted_1$n = { class: "group-editor group-editor-size" };
|
|
9024
9268
|
const _hoisted_2$g = { class: "flex-align-center" };
|
|
9025
|
-
const _hoisted_3$
|
|
9026
|
-
/* @__PURE__ */ createElementVNode("label",
|
|
9269
|
+
const _hoisted_3$d = /* @__PURE__ */ createElementVNode("div", { class: "title" }, [
|
|
9270
|
+
/* @__PURE__ */ createElementVNode("label", { textContent: "Size" })
|
|
9027
9271
|
], -1);
|
|
9028
|
-
const _hoisted_4$
|
|
9029
|
-
const _hoisted_5$6 = /* @__PURE__ */ createElementVNode("span", null, "W", -1);
|
|
9030
|
-
const _hoisted_6$5 = /* @__PURE__ */ createElementVNode("span", { class: "ml-16" }, "H", -1);
|
|
9272
|
+
const _hoisted_4$b = { class: "flex-grow-1 bs-layout-horizontal" };
|
|
9031
9273
|
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
9032
9274
|
__name: "PbPropertyGroupEditorSize",
|
|
9033
9275
|
props: {
|
|
@@ -9050,20 +9292,18 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
9050
9292
|
return (_ctx, _cache) => {
|
|
9051
9293
|
return openBlock(), createElementBlock("div", _hoisted_1$n, [
|
|
9052
9294
|
createElementVNode("div", _hoisted_2$g, [
|
|
9053
|
-
_hoisted_3$
|
|
9054
|
-
createElementVNode("div", _hoisted_4$
|
|
9055
|
-
_hoisted_5$6,
|
|
9295
|
+
_hoisted_3$d,
|
|
9296
|
+
createElementVNode("div", _hoisted_4$b, [
|
|
9056
9297
|
createVNode(unref(BSTextInput), {
|
|
9057
9298
|
"model-value": width.value,
|
|
9058
|
-
class: "
|
|
9059
|
-
|
|
9299
|
+
class: "flex-grow-1 mr-2",
|
|
9300
|
+
prefix: "W",
|
|
9060
9301
|
"onUpdate:modelValue": updateWidth
|
|
9061
9302
|
}, null, 8, ["model-value"]),
|
|
9062
|
-
_hoisted_6$5,
|
|
9063
9303
|
createVNode(unref(BSTextInput), {
|
|
9064
9304
|
"model-value": height.value,
|
|
9065
|
-
class: "ml-
|
|
9066
|
-
|
|
9305
|
+
class: "flex-grow-1 ml-2",
|
|
9306
|
+
prefix: "H",
|
|
9067
9307
|
"onUpdate:modelValue": updateHeight
|
|
9068
9308
|
}, null, 8, ["model-value"])
|
|
9069
9309
|
])
|
|
@@ -9231,15 +9471,15 @@ var script$4 = {
|
|
|
9231
9471
|
};
|
|
9232
9472
|
const _hoisted_1$m = { class: "vc-alpha" };
|
|
9233
9473
|
const _hoisted_2$f = { class: "vc-alpha-checkboard-wrap" };
|
|
9234
|
-
const _hoisted_3$
|
|
9474
|
+
const _hoisted_3$c = /* @__PURE__ */ createElementVNode(
|
|
9235
9475
|
"div",
|
|
9236
9476
|
{ class: "vc-alpha-picker" },
|
|
9237
9477
|
null,
|
|
9238
9478
|
-1
|
|
9239
9479
|
/* HOISTED */
|
|
9240
9480
|
);
|
|
9241
|
-
const _hoisted_4$
|
|
9242
|
-
_hoisted_3$
|
|
9481
|
+
const _hoisted_4$a = [
|
|
9482
|
+
_hoisted_3$c
|
|
9243
9483
|
];
|
|
9244
9484
|
function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
9245
9485
|
const _component_Checkboard = resolveComponent("Checkboard");
|
|
@@ -9273,7 +9513,7 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
9273
9513
|
class: "vc-alpha-pointer",
|
|
9274
9514
|
style: normalizeStyle({ left: `${$options.colors.a * 100}%` })
|
|
9275
9515
|
},
|
|
9276
|
-
_hoisted_4$
|
|
9516
|
+
_hoisted_4$a,
|
|
9277
9517
|
4
|
|
9278
9518
|
/* STYLE */
|
|
9279
9519
|
)
|
|
@@ -10349,8 +10589,8 @@ var script$3 = {
|
|
|
10349
10589
|
};
|
|
10350
10590
|
const _hoisted_1$l = { class: "vc-editable-input" };
|
|
10351
10591
|
const _hoisted_2$e = ["aria-labelledby"];
|
|
10352
|
-
const _hoisted_3$
|
|
10353
|
-
const _hoisted_4$
|
|
10592
|
+
const _hoisted_3$b = ["id", "for"];
|
|
10593
|
+
const _hoisted_4$9 = { class: "vc-input__desc" };
|
|
10354
10594
|
function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
10355
10595
|
return openBlock(), createElementBlock("div", _hoisted_1$l, [
|
|
10356
10596
|
withDirectives(createElementVNode("input", {
|
|
@@ -10367,10 +10607,10 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
10367
10607
|
id: $options.labelId,
|
|
10368
10608
|
for: $props.label,
|
|
10369
10609
|
class: "vc-input__label"
|
|
10370
|
-
}, toDisplayString($options.labelSpanText), 9, _hoisted_3$
|
|
10610
|
+
}, toDisplayString($options.labelSpanText), 9, _hoisted_3$b),
|
|
10371
10611
|
createElementVNode(
|
|
10372
10612
|
"span",
|
|
10373
|
-
_hoisted_4$
|
|
10613
|
+
_hoisted_4$9,
|
|
10374
10614
|
toDisplayString($props.desc),
|
|
10375
10615
|
1
|
|
10376
10616
|
/* TEXT */
|
|
@@ -10461,15 +10701,15 @@ const _hoisted_2$d = /* @__PURE__ */ createElementVNode(
|
|
|
10461
10701
|
-1
|
|
10462
10702
|
/* HOISTED */
|
|
10463
10703
|
);
|
|
10464
|
-
const _hoisted_3$
|
|
10704
|
+
const _hoisted_3$a = /* @__PURE__ */ createElementVNode(
|
|
10465
10705
|
"div",
|
|
10466
10706
|
{ class: "vc-saturation-circle" },
|
|
10467
10707
|
null,
|
|
10468
10708
|
-1
|
|
10469
10709
|
/* HOISTED */
|
|
10470
10710
|
);
|
|
10471
|
-
const _hoisted_4$
|
|
10472
|
-
_hoisted_3$
|
|
10711
|
+
const _hoisted_4$8 = [
|
|
10712
|
+
_hoisted_3$a
|
|
10473
10713
|
];
|
|
10474
10714
|
function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
10475
10715
|
return openBlock(), createElementBlock(
|
|
@@ -10491,7 +10731,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
10491
10731
|
class: "vc-saturation-pointer",
|
|
10492
10732
|
style: normalizeStyle({ top: $options.pointerTop, left: $options.pointerLeft })
|
|
10493
10733
|
},
|
|
10494
|
-
_hoisted_4$
|
|
10734
|
+
_hoisted_4$8,
|
|
10495
10735
|
4
|
|
10496
10736
|
/* STYLE */
|
|
10497
10737
|
)
|
|
@@ -10640,7 +10880,7 @@ const _hoisted_2$c = /* @__PURE__ */ createElementVNode(
|
|
|
10640
10880
|
-1
|
|
10641
10881
|
/* HOISTED */
|
|
10642
10882
|
);
|
|
10643
|
-
const _hoisted_3$
|
|
10883
|
+
const _hoisted_3$9 = [
|
|
10644
10884
|
_hoisted_2$c
|
|
10645
10885
|
];
|
|
10646
10886
|
function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
@@ -10668,7 +10908,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
10668
10908
|
style: normalizeStyle({ top: $options.pointerTop, left: $options.pointerLeft }),
|
|
10669
10909
|
role: "presentation"
|
|
10670
10910
|
},
|
|
10671
|
-
_hoisted_3$
|
|
10911
|
+
_hoisted_3$9,
|
|
10672
10912
|
4
|
|
10673
10913
|
/* STYLE */
|
|
10674
10914
|
)
|
|
@@ -10770,8 +11010,8 @@ var script = {
|
|
|
10770
11010
|
};
|
|
10771
11011
|
const _hoisted_1$i = { class: "vc-sketch-saturation-wrap" };
|
|
10772
11012
|
const _hoisted_2$b = { class: "vc-sketch-controls" };
|
|
10773
|
-
const _hoisted_3$
|
|
10774
|
-
const _hoisted_4$
|
|
11013
|
+
const _hoisted_3$8 = { class: "vc-sketch-sliders" };
|
|
11014
|
+
const _hoisted_4$7 = { class: "vc-sketch-hue-wrap" };
|
|
10775
11015
|
const _hoisted_5$5 = {
|
|
10776
11016
|
key: 0,
|
|
10777
11017
|
class: "vc-sketch-alpha-wrap"
|
|
@@ -10782,7 +11022,7 @@ const _hoisted_8$3 = {
|
|
|
10782
11022
|
key: 0,
|
|
10783
11023
|
class: "vc-sketch-field"
|
|
10784
11024
|
};
|
|
10785
|
-
const _hoisted_9$
|
|
11025
|
+
const _hoisted_9$3 = { class: "vc-sketch-field--double" };
|
|
10786
11026
|
const _hoisted_10$1 = { class: "vc-sketch-field--single" };
|
|
10787
11027
|
const _hoisted_11$1 = { class: "vc-sketch-field--single" };
|
|
10788
11028
|
const _hoisted_12$1 = { class: "vc-sketch-field--single" };
|
|
@@ -10795,8 +11035,8 @@ const _hoisted_14$1 = {
|
|
|
10795
11035
|
role: "group",
|
|
10796
11036
|
"aria-label": "A color preset, pick one to set as current color"
|
|
10797
11037
|
};
|
|
10798
|
-
const _hoisted_15 = ["aria-label", "onClick"];
|
|
10799
|
-
const _hoisted_16 = ["aria-label", "onClick"];
|
|
11038
|
+
const _hoisted_15$1 = ["aria-label", "onClick"];
|
|
11039
|
+
const _hoisted_16$1 = ["aria-label", "onClick"];
|
|
10800
11040
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
10801
11041
|
const _component_Saturation = resolveComponent("Saturation");
|
|
10802
11042
|
const _component_Hue = resolveComponent("Hue");
|
|
@@ -10818,8 +11058,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
10818
11058
|
}, null, 8, ["value", "onChange"])
|
|
10819
11059
|
]),
|
|
10820
11060
|
createElementVNode("div", _hoisted_2$b, [
|
|
10821
|
-
createElementVNode("div", _hoisted_3$
|
|
10822
|
-
createElementVNode("div", _hoisted_4$
|
|
11061
|
+
createElementVNode("div", _hoisted_3$8, [
|
|
11062
|
+
createElementVNode("div", _hoisted_4$7, [
|
|
10823
11063
|
createVNode(_component_Hue, {
|
|
10824
11064
|
value: _ctx.colors,
|
|
10825
11065
|
onChange: $options.childChange
|
|
@@ -10843,7 +11083,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
10843
11083
|
]),
|
|
10844
11084
|
!$props.disableFields ? (openBlock(), createElementBlock("div", _hoisted_8$3, [
|
|
10845
11085
|
createCommentVNode(" rgba "),
|
|
10846
|
-
createElementVNode("div", _hoisted_9$
|
|
11086
|
+
createElementVNode("div", _hoisted_9$3, [
|
|
10847
11087
|
createVNode(_component_EdIn, {
|
|
10848
11088
|
label: "hex",
|
|
10849
11089
|
value: $options.hex,
|
|
@@ -10896,14 +11136,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
10896
11136
|
"aria-label": `Color:${c}`,
|
|
10897
11137
|
style: normalizeStyle({ background: c }),
|
|
10898
11138
|
onClick: ($event) => $options.handlePreset(c)
|
|
10899
|
-
}, null, 12, _hoisted_15)) : (openBlock(), createElementBlock("div", {
|
|
11139
|
+
}, null, 12, _hoisted_15$1)) : (openBlock(), createElementBlock("div", {
|
|
10900
11140
|
key: c,
|
|
10901
11141
|
"aria-label": `Color:${c}`,
|
|
10902
11142
|
class: "vc-sketch-presets-color",
|
|
10903
11143
|
onClick: ($event) => $options.handlePreset(c)
|
|
10904
11144
|
}, [
|
|
10905
11145
|
createVNode(_component_Checkboard)
|
|
10906
|
-
], 8, _hoisted_16))
|
|
11146
|
+
], 8, _hoisted_16$1))
|
|
10907
11147
|
],
|
|
10908
11148
|
64
|
|
10909
11149
|
/* STABLE_FRAGMENT */
|
|
@@ -10940,7 +11180,14 @@ const _sfc_main$i = defineComponent({
|
|
|
10940
11180
|
},
|
|
10941
11181
|
setup(props, { emit }) {
|
|
10942
11182
|
const color = ref(props.value);
|
|
10943
|
-
const appliedColor = computed(() =>
|
|
11183
|
+
const appliedColor = computed(() => {
|
|
11184
|
+
if (typeof color.value === "string")
|
|
11185
|
+
return color.value;
|
|
11186
|
+
else if (typeof color.value === "object" && color.value.hasOwnProperty("hex"))
|
|
11187
|
+
return color.value.hex;
|
|
11188
|
+
else
|
|
11189
|
+
return;
|
|
11190
|
+
});
|
|
10944
11191
|
const isShowColorPicker = ref(false);
|
|
10945
11192
|
const toggle = (value) => {
|
|
10946
11193
|
isShowColorPicker.value = value !== void 0 ? value : !isShowColorPicker.value;
|
|
@@ -10953,7 +11200,7 @@ const _sfc_main$i = defineComponent({
|
|
|
10953
11200
|
}
|
|
10954
11201
|
);
|
|
10955
11202
|
watch(
|
|
10956
|
-
color,
|
|
11203
|
+
() => color.value,
|
|
10957
11204
|
() => setTimeout(() => {
|
|
10958
11205
|
if (appliedColor.value)
|
|
10959
11206
|
emit("change-color", appliedColor.value);
|
|
@@ -10963,8 +11210,7 @@ const _sfc_main$i = defineComponent({
|
|
|
10963
11210
|
watch(
|
|
10964
11211
|
() => props.value,
|
|
10965
11212
|
(value) => {
|
|
10966
|
-
|
|
10967
|
-
color.value = value;
|
|
11213
|
+
color.value = value;
|
|
10968
11214
|
},
|
|
10969
11215
|
{ deep: true }
|
|
10970
11216
|
);
|
|
@@ -10983,10 +11229,10 @@ const _sfc_main$i = defineComponent({
|
|
|
10983
11229
|
});
|
|
10984
11230
|
const _hoisted_1$h = { class: "buttons" };
|
|
10985
11231
|
const _hoisted_2$a = /* @__PURE__ */ createElementVNode("i", { class: "material-icons-outlined" }, "delete", -1);
|
|
10986
|
-
const _hoisted_3$
|
|
11232
|
+
const _hoisted_3$7 = [
|
|
10987
11233
|
_hoisted_2$a
|
|
10988
11234
|
];
|
|
10989
|
-
const _hoisted_4$
|
|
11235
|
+
const _hoisted_4$6 = { class: "sketch-wrap" };
|
|
10990
11236
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
10991
11237
|
const _component_Sketch = resolveComponent("Sketch");
|
|
10992
11238
|
const _directive_click_outside = resolveDirective("click-outside");
|
|
@@ -11007,9 +11253,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11007
11253
|
key: 0,
|
|
11008
11254
|
class: "pb-button",
|
|
11009
11255
|
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.emptyColor && _ctx.emptyColor(...args))
|
|
11010
|
-
}, _hoisted_3$
|
|
11256
|
+
}, _hoisted_3$7)) : createCommentVNode("", true)
|
|
11011
11257
|
]),
|
|
11012
|
-
createElementVNode("div", _hoisted_4$
|
|
11258
|
+
createElementVNode("div", _hoisted_4$6, [
|
|
11013
11259
|
_ctx.isShowColorPicker ? (openBlock(), createBlock$1(_component_Sketch, {
|
|
11014
11260
|
key: 0,
|
|
11015
11261
|
modelValue: _ctx.color,
|
|
@@ -11024,10 +11270,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11024
11270
|
const PbColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render]]);
|
|
11025
11271
|
const _hoisted_1$g = { class: "group-editor group-editor-background" };
|
|
11026
11272
|
const _hoisted_2$9 = { class: "flex-align-center" };
|
|
11027
|
-
const _hoisted_3$
|
|
11028
|
-
/* @__PURE__ */ createElementVNode("label",
|
|
11273
|
+
const _hoisted_3$6 = /* @__PURE__ */ createElementVNode("div", { class: "title" }, [
|
|
11274
|
+
/* @__PURE__ */ createElementVNode("label", { textContent: "Background" })
|
|
11029
11275
|
], -1);
|
|
11030
|
-
const _hoisted_4$
|
|
11276
|
+
const _hoisted_4$5 = { class: "bs-layout-horizontal" };
|
|
11031
11277
|
const _hoisted_5$4 = { class: "color" };
|
|
11032
11278
|
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
11033
11279
|
__name: "PbPropertyGroupEditorBackground",
|
|
@@ -11038,7 +11284,6 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
11038
11284
|
setup(__props) {
|
|
11039
11285
|
const props = __props;
|
|
11040
11286
|
const pageBuilder = usePageBuilderEditor();
|
|
11041
|
-
useModal();
|
|
11042
11287
|
const color = computed(() => getPropertyValueOfParts(props.selectedParts, "backgroundColor"));
|
|
11043
11288
|
const emptyColor = () => {
|
|
11044
11289
|
};
|
|
@@ -11062,8 +11307,8 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
11062
11307
|
return (_ctx, _cache) => {
|
|
11063
11308
|
return openBlock(), createElementBlock("div", _hoisted_1$g, [
|
|
11064
11309
|
createElementVNode("div", _hoisted_2$9, [
|
|
11065
|
-
_hoisted_3$
|
|
11066
|
-
createElementVNode("div", _hoisted_4$
|
|
11310
|
+
_hoisted_3$6,
|
|
11311
|
+
createElementVNode("div", _hoisted_4$5, [
|
|
11067
11312
|
createElementVNode("div", _hoisted_5$4, [
|
|
11068
11313
|
createVNode(PbColorPicker, {
|
|
11069
11314
|
value: color.value,
|
|
@@ -11089,22 +11334,43 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
11089
11334
|
};
|
|
11090
11335
|
}
|
|
11091
11336
|
});
|
|
11337
|
+
const TopLeftCornerIcon = "data:image/svg+xml,%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Transformed%20by:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23000000'%20transform='rotate(270)'%3e%3cg%20id='SVGRepo_bgCarrier'%20stroke-width='0'/%3e%3cg%20id='SVGRepo_tracerCarrier'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cg%20id='SVGRepo_iconCarrier'%3e%3cg%3e%3cpath%20fill='none'%20d='M0%200H24V24H0z'/%3e%3cpath%20d='M21%2019v2h-2v-2h2zm-4%200v2h-2v-2h2zm-4%200v2h-2v-2h2zm-4%200v2H7v-2h2zm-4%200v2H3v-2h2zm16-4v2h-2v-2h2zM5%2015v2H3v-2h2zm0-4v2H3v-2h2zm11-8c2.687%200%204.882%202.124%204.995%204.783L21%208v5h-2V8c0-1.591-1.255-2.903-2.824-2.995L16%205h-5V3h5zM5%207v2H3V7h2zm0-4v2H3V3h2zm4%200v2H7V3h2z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e";
|
|
11338
|
+
const TopRightCornerIcon = "data:image/svg+xml,%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Transformed%20by:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23000000'%3e%3cg%20id='SVGRepo_bgCarrier'%20stroke-width='0'/%3e%3cg%20id='SVGRepo_tracerCarrier'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cg%20id='SVGRepo_iconCarrier'%3e%3cg%3e%3cpath%20fill='none'%20d='M0%200H24V24H0z'/%3e%3cpath%20d='M21%2019v2h-2v-2h2zm-4%200v2h-2v-2h2zm-4%200v2h-2v-2h2zm-4%200v2H7v-2h2zm-4%200v2H3v-2h2zm16-4v2h-2v-2h2zM5%2015v2H3v-2h2zm0-4v2H3v-2h2zm11-8c2.687%200%204.882%202.124%204.995%204.783L21%208v5h-2V8c0-1.591-1.255-2.903-2.824-2.995L16%205h-5V3h5zM5%207v2H3V7h2zm0-4v2H3V3h2zm4%200v2H7V3h2z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e";
|
|
11339
|
+
const BottomLeftCornerIcon = "data:image/svg+xml,%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Transformed%20by:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23000000'%20transform='rotate(180)'%3e%3cg%20id='SVGRepo_bgCarrier'%20stroke-width='0'/%3e%3cg%20id='SVGRepo_tracerCarrier'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cg%20id='SVGRepo_iconCarrier'%3e%3cg%3e%3cpath%20fill='none'%20d='M0%200H24V24H0z'/%3e%3cpath%20d='M21%2019v2h-2v-2h2zm-4%200v2h-2v-2h2zm-4%200v2h-2v-2h2zm-4%200v2H7v-2h2zm-4%200v2H3v-2h2zm16-4v2h-2v-2h2zM5%2015v2H3v-2h2zm0-4v2H3v-2h2zm11-8c2.687%200%204.882%202.124%204.995%204.783L21%208v5h-2V8c0-1.591-1.255-2.903-2.824-2.995L16%205h-5V3h5zM5%207v2H3V7h2zm0-4v2H3V3h2zm4%200v2H7V3h2z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e";
|
|
11340
|
+
const BottomRightCornerIcon = "data:image/svg+xml,%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Transformed%20by:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23000000'%20transform='rotate(90)'%3e%3cg%20id='SVGRepo_bgCarrier'%20stroke-width='0'/%3e%3cg%20id='SVGRepo_tracerCarrier'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cg%20id='SVGRepo_iconCarrier'%3e%3cg%3e%3cpath%20fill='none'%20d='M0%200H24V24H0z'/%3e%3cpath%20d='M21%2019v2h-2v-2h2zm-4%200v2h-2v-2h2zm-4%200v2h-2v-2h2zm-4%200v2H7v-2h2zm-4%200v2H3v-2h2zm16-4v2h-2v-2h2zM5%2015v2H3v-2h2zm0-4v2H3v-2h2zm11-8c2.687%200%204.882%202.124%204.995%204.783L21%208v5h-2V8c0-1.591-1.255-2.903-2.824-2.995L16%205h-5V3h5zM5%207v2H3V7h2zm0-4v2H3V3h2zm4%200v2H7V3h2z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e";
|
|
11092
11341
|
const _hoisted_1$f = { class: "group-editor group-editor-border" };
|
|
11093
11342
|
const _hoisted_2$8 = { class: "flex-align-center" };
|
|
11094
|
-
const _hoisted_3$
|
|
11095
|
-
/* @__PURE__ */ createElementVNode("label",
|
|
11343
|
+
const _hoisted_3$5 = /* @__PURE__ */ createElementVNode("div", { class: "title" }, [
|
|
11344
|
+
/* @__PURE__ */ createElementVNode("label", { textContent: "Border" })
|
|
11345
|
+
], -1);
|
|
11346
|
+
const _hoisted_4$4 = { class: "" };
|
|
11347
|
+
const _hoisted_5$3 = /* @__PURE__ */ createElementVNode("div", { class: "sub-title" }, [
|
|
11348
|
+
/* @__PURE__ */ createElementVNode("label", { textContent: "Color" })
|
|
11349
|
+
], -1);
|
|
11350
|
+
const _hoisted_6$3 = { class: "color" };
|
|
11351
|
+
const _hoisted_7$2 = { class: "mt-8" };
|
|
11352
|
+
const _hoisted_8$2 = /* @__PURE__ */ createElementVNode("div", { class: "sub-title" }, [
|
|
11353
|
+
/* @__PURE__ */ createElementVNode("label", { textContent: "Border Width" })
|
|
11354
|
+
], -1);
|
|
11355
|
+
const _hoisted_9$2 = { class: "flex-grow-1 mt-4" };
|
|
11356
|
+
const _hoisted_10 = { class: "bg-gray-100 py-5 rounded-8" };
|
|
11357
|
+
const _hoisted_11 = { class: "text-center" };
|
|
11358
|
+
const _hoisted_12 = { class: "bs-layout-horizontal justify-content-center align-items-center" };
|
|
11359
|
+
const _hoisted_13 = /* @__PURE__ */ createElementVNode("div", {
|
|
11360
|
+
class: "d-inline-block text-center text-gray-300",
|
|
11361
|
+
style: { "width": "30%", "font-size": "12px" }
|
|
11362
|
+
}, [
|
|
11363
|
+
/* @__PURE__ */ createElementVNode("span", { class: "font-icon" }, "add")
|
|
11364
|
+
], -1);
|
|
11365
|
+
const _hoisted_14 = { class: "text-center" };
|
|
11366
|
+
const _hoisted_15 = { class: "mt-8" };
|
|
11367
|
+
const _hoisted_16 = /* @__PURE__ */ createElementVNode("div", { class: "sub-title" }, [
|
|
11368
|
+
/* @__PURE__ */ createElementVNode("label", { textContent: "Border Radius" })
|
|
11096
11369
|
], -1);
|
|
11097
|
-
const
|
|
11098
|
-
const
|
|
11099
|
-
const
|
|
11100
|
-
const
|
|
11101
|
-
const _hoisted_8$2 = /* @__PURE__ */ createElementVNode("span", { class: "ml-8" }, "WT", -1);
|
|
11102
|
-
const _hoisted_9 = /* @__PURE__ */ createElementVNode("span", { class: "ml-8" }, "WB", -1);
|
|
11103
|
-
const _hoisted_10 = { class: "bs-layout-horizontal mt-8" };
|
|
11104
|
-
const _hoisted_11 = /* @__PURE__ */ createElementVNode("span", null, "RTL", -1);
|
|
11105
|
-
const _hoisted_12 = /* @__PURE__ */ createElementVNode("span", { class: "ml-8" }, "RTR", -1);
|
|
11106
|
-
const _hoisted_13 = /* @__PURE__ */ createElementVNode("span", { class: "ml-8" }, "RBL", -1);
|
|
11107
|
-
const _hoisted_14 = /* @__PURE__ */ createElementVNode("span", { class: "ml-8" }, "RBR", -1);
|
|
11370
|
+
const _hoisted_17 = { class: "flex-grow-1 mt-4" };
|
|
11371
|
+
const _hoisted_18 = { class: "bg-gray-100 py-5 rounded-8" };
|
|
11372
|
+
const _hoisted_19 = { class: "" };
|
|
11373
|
+
const _hoisted_20 = { class: "mt-2" };
|
|
11108
11374
|
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
11109
11375
|
__name: "PbPropertyGroupEditorBorder",
|
|
11110
11376
|
props: {
|
|
@@ -11118,7 +11384,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
11118
11384
|
const emptyColor = () => {
|
|
11119
11385
|
};
|
|
11120
11386
|
const borderLeftWidth = computed(() => getPropertyValueOfParts(props.selectedParts, "borderLeftWidth"));
|
|
11121
|
-
const borderRightWidth = computed(() => getPropertyValueOfParts(props.selectedParts, "
|
|
11387
|
+
const borderRightWidth = computed(() => getPropertyValueOfParts(props.selectedParts, "borderRightWidth"));
|
|
11122
11388
|
const borderTopWidth = computed(() => getPropertyValueOfParts(props.selectedParts, "borderTopWidth"));
|
|
11123
11389
|
const borderBottomWidth = computed(() => getPropertyValueOfParts(props.selectedParts, "borderBottomWidth"));
|
|
11124
11390
|
const borderTopLeftRadius = computed(() => getPropertyValueOfParts(props.selectedParts, "borderTopLeftRadius"));
|
|
@@ -11145,85 +11411,106 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
11145
11411
|
return (_ctx, _cache) => {
|
|
11146
11412
|
return openBlock(), createElementBlock("div", _hoisted_1$f, [
|
|
11147
11413
|
createElementVNode("div", _hoisted_2$8, [
|
|
11148
|
-
_hoisted_3$
|
|
11149
|
-
createElementVNode("div", _hoisted_4$
|
|
11150
|
-
|
|
11151
|
-
|
|
11152
|
-
|
|
11153
|
-
|
|
11154
|
-
|
|
11155
|
-
|
|
11156
|
-
|
|
11157
|
-
|
|
11158
|
-
|
|
11159
|
-
"
|
|
11160
|
-
class: "ml-4",
|
|
11161
|
-
width: "",
|
|
11162
|
-
"onUpdate:modelValue": updateColor
|
|
11163
|
-
}, null, 8, ["model-value"])
|
|
11164
|
-
]),
|
|
11165
|
-
createElementVNode("div", _hoisted_5$3, [
|
|
11166
|
-
createElementVNode("div", null, [
|
|
11167
|
-
_hoisted_6$3,
|
|
11168
|
-
createVNode(unref(BSTextInput), {
|
|
11169
|
-
"model-value": borderLeftWidth.value,
|
|
11170
|
-
class: "ml-4",
|
|
11171
|
-
width: "3em",
|
|
11172
|
-
"onUpdate:modelValue": updateBorderLeftWidth
|
|
11173
|
-
}, null, 8, ["model-value"]),
|
|
11174
|
-
_hoisted_7$2,
|
|
11175
|
-
createVNode(unref(BSTextInput), {
|
|
11176
|
-
"model-value": borderRightWidth.value,
|
|
11177
|
-
class: "ml-4",
|
|
11178
|
-
width: "3em",
|
|
11179
|
-
"onUpdate:modelValue": updateBorderRightWidth
|
|
11180
|
-
}, null, 8, ["model-value"]),
|
|
11181
|
-
_hoisted_8$2,
|
|
11182
|
-
createVNode(unref(BSTextInput), {
|
|
11183
|
-
"model-value": borderTopWidth.value,
|
|
11184
|
-
class: "ml-4",
|
|
11185
|
-
width: "3em",
|
|
11186
|
-
"onUpdate:modelValue": updateBorderTopWidth
|
|
11187
|
-
}, null, 8, ["model-value"]),
|
|
11188
|
-
_hoisted_9,
|
|
11414
|
+
_hoisted_3$5,
|
|
11415
|
+
createElementVNode("div", _hoisted_4$4, [
|
|
11416
|
+
_hoisted_5$3,
|
|
11417
|
+
createElementVNode("div", _hoisted_6$3, [
|
|
11418
|
+
createVNode(PbColorPicker, {
|
|
11419
|
+
value: color.value,
|
|
11420
|
+
"hide-delete": "",
|
|
11421
|
+
onEmpty: _cache[0] || (_cache[0] = ($event) => emptyColor()),
|
|
11422
|
+
onHide: _cache[1] || (_cache[1] = ($event) => updateColor($event)),
|
|
11423
|
+
onShow: saveOriginalColor,
|
|
11424
|
+
onChangeColor: _cache[2] || (_cache[2] = ($event) => updateColor($event))
|
|
11425
|
+
}, null, 8, ["value"]),
|
|
11189
11426
|
createVNode(unref(BSTextInput), {
|
|
11190
|
-
"model-value":
|
|
11427
|
+
"model-value": color.value,
|
|
11428
|
+
prefix: { type: "font-icon", value: "palette" },
|
|
11191
11429
|
class: "ml-4",
|
|
11192
|
-
width: "
|
|
11193
|
-
"onUpdate:modelValue":
|
|
11430
|
+
width: "",
|
|
11431
|
+
"onUpdate:modelValue": updateColor
|
|
11194
11432
|
}, null, 8, ["model-value"])
|
|
11195
11433
|
])
|
|
11196
11434
|
]),
|
|
11197
|
-
createElementVNode("div",
|
|
11198
|
-
|
|
11199
|
-
|
|
11200
|
-
|
|
11201
|
-
"
|
|
11202
|
-
|
|
11203
|
-
|
|
11204
|
-
|
|
11205
|
-
|
|
11206
|
-
|
|
11207
|
-
|
|
11208
|
-
|
|
11209
|
-
|
|
11210
|
-
|
|
11211
|
-
|
|
11212
|
-
|
|
11213
|
-
|
|
11214
|
-
|
|
11215
|
-
|
|
11216
|
-
|
|
11217
|
-
|
|
11218
|
-
|
|
11219
|
-
|
|
11220
|
-
|
|
11221
|
-
|
|
11222
|
-
|
|
11223
|
-
|
|
11224
|
-
|
|
11225
|
-
|
|
11226
|
-
|
|
11435
|
+
createElementVNode("div", _hoisted_7$2, [
|
|
11436
|
+
_hoisted_8$2,
|
|
11437
|
+
createElementVNode("div", _hoisted_9$2, [
|
|
11438
|
+
createElementVNode("div", _hoisted_10, [
|
|
11439
|
+
createElementVNode("div", _hoisted_11, [
|
|
11440
|
+
createVNode(unref(BSTextInput), {
|
|
11441
|
+
"model-value": borderTopWidth.value,
|
|
11442
|
+
class: "ml-4",
|
|
11443
|
+
prefix: "T",
|
|
11444
|
+
width: "30%",
|
|
11445
|
+
"onUpdate:modelValue": updateBorderTopWidth
|
|
11446
|
+
}, null, 8, ["model-value"])
|
|
11447
|
+
]),
|
|
11448
|
+
createElementVNode("div", _hoisted_12, [
|
|
11449
|
+
createVNode(unref(BSTextInput), {
|
|
11450
|
+
"model-value": borderLeftWidth.value,
|
|
11451
|
+
class: "ml-4",
|
|
11452
|
+
prefix: "L",
|
|
11453
|
+
width: "30%",
|
|
11454
|
+
"onUpdate:modelValue": updateBorderLeftWidth
|
|
11455
|
+
}, null, 8, ["model-value"]),
|
|
11456
|
+
_hoisted_13,
|
|
11457
|
+
createVNode(unref(BSTextInput), {
|
|
11458
|
+
"model-value": borderRightWidth.value,
|
|
11459
|
+
class: "ml-4",
|
|
11460
|
+
prefix: "R",
|
|
11461
|
+
width: "30%",
|
|
11462
|
+
"onUpdate:modelValue": updateBorderRightWidth
|
|
11463
|
+
}, null, 8, ["model-value"])
|
|
11464
|
+
]),
|
|
11465
|
+
createElementVNode("div", _hoisted_14, [
|
|
11466
|
+
createVNode(unref(BSTextInput), {
|
|
11467
|
+
"model-value": borderBottomWidth.value,
|
|
11468
|
+
class: "ml-4",
|
|
11469
|
+
prefix: "B",
|
|
11470
|
+
width: "30%",
|
|
11471
|
+
"onUpdate:modelValue": updateBorderBottomWidth
|
|
11472
|
+
}, null, 8, ["model-value"])
|
|
11473
|
+
])
|
|
11474
|
+
])
|
|
11475
|
+
])
|
|
11476
|
+
]),
|
|
11477
|
+
createElementVNode("div", _hoisted_15, [
|
|
11478
|
+
_hoisted_16,
|
|
11479
|
+
createElementVNode("div", _hoisted_17, [
|
|
11480
|
+
createElementVNode("div", _hoisted_18, [
|
|
11481
|
+
createElementVNode("div", _hoisted_19, [
|
|
11482
|
+
createVNode(unref(BSTextInput), {
|
|
11483
|
+
"model-value": borderTopLeftRadius.value,
|
|
11484
|
+
prefix: { type: "image-url", value: unref(TopLeftCornerIcon) },
|
|
11485
|
+
class: "ml-4",
|
|
11486
|
+
width: "48%",
|
|
11487
|
+
"onUpdate:modelValue": updateBorderTopLeftRadius
|
|
11488
|
+
}, null, 8, ["model-value", "prefix"]),
|
|
11489
|
+
createVNode(unref(BSTextInput), {
|
|
11490
|
+
"model-value": borderTopRightRadius.value,
|
|
11491
|
+
prefix: { type: "image-url", value: unref(TopRightCornerIcon) },
|
|
11492
|
+
class: "ml-4",
|
|
11493
|
+
width: "48%",
|
|
11494
|
+
"onUpdate:modelValue": updateBorderTopRightRadius
|
|
11495
|
+
}, null, 8, ["model-value", "prefix"])
|
|
11496
|
+
]),
|
|
11497
|
+
createElementVNode("div", _hoisted_20, [
|
|
11498
|
+
createVNode(unref(BSTextInput), {
|
|
11499
|
+
"model-value": borderBottomLeftRadius.value,
|
|
11500
|
+
prefix: { type: "image-url", value: unref(BottomLeftCornerIcon) },
|
|
11501
|
+
class: "ml-4",
|
|
11502
|
+
width: "48%",
|
|
11503
|
+
"onUpdate:modelValue": updateBorderBottomLeftRadius
|
|
11504
|
+
}, null, 8, ["model-value", "prefix"]),
|
|
11505
|
+
createVNode(unref(BSTextInput), {
|
|
11506
|
+
"model-value": borderBottomRightRadius.value,
|
|
11507
|
+
prefix: { type: "image-url", value: unref(BottomRightCornerIcon) },
|
|
11508
|
+
class: "ml-4",
|
|
11509
|
+
width: "48%",
|
|
11510
|
+
"onUpdate:modelValue": updateBorderBottomRightRadius
|
|
11511
|
+
}, null, 8, ["model-value", "prefix"])
|
|
11512
|
+
])
|
|
11513
|
+
])
|
|
11227
11514
|
])
|
|
11228
11515
|
])
|
|
11229
11516
|
])
|
|
@@ -11233,14 +11520,20 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
11233
11520
|
});
|
|
11234
11521
|
const _hoisted_1$e = { class: "group-editor group-editor-margin" };
|
|
11235
11522
|
const _hoisted_2$7 = { class: "flex-align-center" };
|
|
11236
|
-
const _hoisted_3$
|
|
11237
|
-
/* @__PURE__ */ createElementVNode("label",
|
|
11523
|
+
const _hoisted_3$4 = /* @__PURE__ */ createElementVNode("div", { class: "title" }, [
|
|
11524
|
+
/* @__PURE__ */ createElementVNode("label", { textContent: "Margin" })
|
|
11238
11525
|
], -1);
|
|
11239
|
-
const _hoisted_4$
|
|
11240
|
-
const _hoisted_5$2 =
|
|
11241
|
-
const _hoisted_6$2 =
|
|
11242
|
-
const _hoisted_7$1 =
|
|
11243
|
-
const _hoisted_8$1 = /* @__PURE__ */ createElementVNode("
|
|
11526
|
+
const _hoisted_4$3 = { class: "flex-grow-1" };
|
|
11527
|
+
const _hoisted_5$2 = { class: "bg-gray-100 py-5 rounded-8" };
|
|
11528
|
+
const _hoisted_6$2 = { class: "text-center" };
|
|
11529
|
+
const _hoisted_7$1 = { class: "bs-layout-horizontal justify-content-center align-items-center" };
|
|
11530
|
+
const _hoisted_8$1 = /* @__PURE__ */ createElementVNode("div", {
|
|
11531
|
+
class: "d-inline-block text-center text-gray-300",
|
|
11532
|
+
style: { "width": "30%", "font-size": "12px" }
|
|
11533
|
+
}, [
|
|
11534
|
+
/* @__PURE__ */ createElementVNode("span", { class: "font-icon" }, "add")
|
|
11535
|
+
], -1);
|
|
11536
|
+
const _hoisted_9$1 = { class: "text-center" };
|
|
11244
11537
|
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
11245
11538
|
__name: "PbPropertyGroupEditorMargin",
|
|
11246
11539
|
props: {
|
|
@@ -11267,37 +11560,44 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
11267
11560
|
return (_ctx, _cache) => {
|
|
11268
11561
|
return openBlock(), createElementBlock("div", _hoisted_1$e, [
|
|
11269
11562
|
createElementVNode("div", _hoisted_2$7, [
|
|
11270
|
-
_hoisted_3$
|
|
11271
|
-
createElementVNode("div", _hoisted_4$
|
|
11272
|
-
createElementVNode("div",
|
|
11273
|
-
|
|
11274
|
-
|
|
11275
|
-
|
|
11276
|
-
|
|
11277
|
-
|
|
11278
|
-
|
|
11279
|
-
|
|
11280
|
-
|
|
11281
|
-
|
|
11282
|
-
|
|
11283
|
-
|
|
11284
|
-
|
|
11285
|
-
|
|
11286
|
-
|
|
11287
|
-
|
|
11288
|
-
|
|
11289
|
-
"model-value"
|
|
11290
|
-
|
|
11291
|
-
|
|
11292
|
-
|
|
11293
|
-
|
|
11294
|
-
|
|
11295
|
-
|
|
11296
|
-
|
|
11297
|
-
|
|
11298
|
-
|
|
11299
|
-
|
|
11300
|
-
|
|
11563
|
+
_hoisted_3$4,
|
|
11564
|
+
createElementVNode("div", _hoisted_4$3, [
|
|
11565
|
+
createElementVNode("div", _hoisted_5$2, [
|
|
11566
|
+
createElementVNode("div", _hoisted_6$2, [
|
|
11567
|
+
createVNode(unref(BSTextInput), {
|
|
11568
|
+
"model-value": top.value,
|
|
11569
|
+
class: "ml-4",
|
|
11570
|
+
prefix: "T",
|
|
11571
|
+
width: "30%",
|
|
11572
|
+
"onUpdate:modelValue": updateTop
|
|
11573
|
+
}, null, 8, ["model-value"])
|
|
11574
|
+
]),
|
|
11575
|
+
createElementVNode("div", _hoisted_7$1, [
|
|
11576
|
+
createVNode(unref(BSTextInput), {
|
|
11577
|
+
"model-value": left.value,
|
|
11578
|
+
class: "ml-4",
|
|
11579
|
+
prefix: "L",
|
|
11580
|
+
width: "30%",
|
|
11581
|
+
"onUpdate:modelValue": updateLeft
|
|
11582
|
+
}, null, 8, ["model-value"]),
|
|
11583
|
+
_hoisted_8$1,
|
|
11584
|
+
createVNode(unref(BSTextInput), {
|
|
11585
|
+
"model-value": right.value,
|
|
11586
|
+
class: "ml-4",
|
|
11587
|
+
prefix: "R",
|
|
11588
|
+
width: "30%",
|
|
11589
|
+
"onUpdate:modelValue": updateRight
|
|
11590
|
+
}, null, 8, ["model-value"])
|
|
11591
|
+
]),
|
|
11592
|
+
createElementVNode("div", _hoisted_9$1, [
|
|
11593
|
+
createVNode(unref(BSTextInput), {
|
|
11594
|
+
"model-value": bottom.value,
|
|
11595
|
+
class: "ml-4",
|
|
11596
|
+
prefix: "B",
|
|
11597
|
+
width: "30%",
|
|
11598
|
+
"onUpdate:modelValue": updateBottom
|
|
11599
|
+
}, null, 8, ["model-value"])
|
|
11600
|
+
])
|
|
11301
11601
|
])
|
|
11302
11602
|
])
|
|
11303
11603
|
])
|
|
@@ -11305,16 +11605,22 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
11305
11605
|
};
|
|
11306
11606
|
}
|
|
11307
11607
|
});
|
|
11308
|
-
const _hoisted_1$d = { class: "group-editor group-editor-
|
|
11608
|
+
const _hoisted_1$d = { class: "group-editor group-editor-padding" };
|
|
11309
11609
|
const _hoisted_2$6 = { class: "flex-align-center" };
|
|
11310
|
-
const _hoisted_3$
|
|
11311
|
-
/* @__PURE__ */ createElementVNode("label",
|
|
11610
|
+
const _hoisted_3$3 = /* @__PURE__ */ createElementVNode("div", { class: "title" }, [
|
|
11611
|
+
/* @__PURE__ */ createElementVNode("label", { textContent: "Padding" })
|
|
11312
11612
|
], -1);
|
|
11313
|
-
const _hoisted_4$
|
|
11314
|
-
const _hoisted_5$1 =
|
|
11315
|
-
const _hoisted_6$1 =
|
|
11316
|
-
const _hoisted_7 =
|
|
11317
|
-
const _hoisted_8 = /* @__PURE__ */ createElementVNode("
|
|
11613
|
+
const _hoisted_4$2 = { class: "flex-grow-1" };
|
|
11614
|
+
const _hoisted_5$1 = { class: "bg-gray-100 py-5 rounded-8" };
|
|
11615
|
+
const _hoisted_6$1 = { class: "text-center" };
|
|
11616
|
+
const _hoisted_7 = { class: "bs-layout-horizontal justify-content-center align-items-center" };
|
|
11617
|
+
const _hoisted_8 = /* @__PURE__ */ createElementVNode("div", {
|
|
11618
|
+
class: "d-inline-block text-center text-gray-300",
|
|
11619
|
+
style: { "width": "30%", "font-size": "12px" }
|
|
11620
|
+
}, [
|
|
11621
|
+
/* @__PURE__ */ createElementVNode("span", { class: "font-icon" }, "add")
|
|
11622
|
+
], -1);
|
|
11623
|
+
const _hoisted_9 = { class: "text-center" };
|
|
11318
11624
|
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
11319
11625
|
__name: "PbPropertyGroupEditorPadding",
|
|
11320
11626
|
props: {
|
|
@@ -11341,37 +11647,44 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
11341
11647
|
return (_ctx, _cache) => {
|
|
11342
11648
|
return openBlock(), createElementBlock("div", _hoisted_1$d, [
|
|
11343
11649
|
createElementVNode("div", _hoisted_2$6, [
|
|
11344
|
-
_hoisted_3$
|
|
11345
|
-
createElementVNode("div", _hoisted_4$
|
|
11346
|
-
createElementVNode("div",
|
|
11347
|
-
|
|
11348
|
-
|
|
11349
|
-
|
|
11350
|
-
|
|
11351
|
-
|
|
11352
|
-
|
|
11353
|
-
|
|
11354
|
-
|
|
11355
|
-
|
|
11356
|
-
|
|
11357
|
-
|
|
11358
|
-
|
|
11359
|
-
|
|
11360
|
-
|
|
11361
|
-
|
|
11362
|
-
|
|
11363
|
-
"model-value"
|
|
11364
|
-
|
|
11365
|
-
|
|
11366
|
-
|
|
11367
|
-
|
|
11368
|
-
|
|
11369
|
-
|
|
11370
|
-
|
|
11371
|
-
|
|
11372
|
-
|
|
11373
|
-
|
|
11374
|
-
|
|
11650
|
+
_hoisted_3$3,
|
|
11651
|
+
createElementVNode("div", _hoisted_4$2, [
|
|
11652
|
+
createElementVNode("div", _hoisted_5$1, [
|
|
11653
|
+
createElementVNode("div", _hoisted_6$1, [
|
|
11654
|
+
createVNode(unref(BSTextInput), {
|
|
11655
|
+
"model-value": top.value,
|
|
11656
|
+
class: "ml-4",
|
|
11657
|
+
prefix: "T",
|
|
11658
|
+
width: "30%",
|
|
11659
|
+
"onUpdate:modelValue": updateTop
|
|
11660
|
+
}, null, 8, ["model-value"])
|
|
11661
|
+
]),
|
|
11662
|
+
createElementVNode("div", _hoisted_7, [
|
|
11663
|
+
createVNode(unref(BSTextInput), {
|
|
11664
|
+
"model-value": left.value,
|
|
11665
|
+
class: "ml-4",
|
|
11666
|
+
prefix: "L",
|
|
11667
|
+
width: "30%",
|
|
11668
|
+
"onUpdate:modelValue": updateLeft
|
|
11669
|
+
}, null, 8, ["model-value"]),
|
|
11670
|
+
_hoisted_8,
|
|
11671
|
+
createVNode(unref(BSTextInput), {
|
|
11672
|
+
"model-value": right.value,
|
|
11673
|
+
class: "ml-4",
|
|
11674
|
+
prefix: "R",
|
|
11675
|
+
width: "30%",
|
|
11676
|
+
"onUpdate:modelValue": updateRight
|
|
11677
|
+
}, null, 8, ["model-value"])
|
|
11678
|
+
]),
|
|
11679
|
+
createElementVNode("div", _hoisted_9, [
|
|
11680
|
+
createVNode(unref(BSTextInput), {
|
|
11681
|
+
"model-value": bottom.value,
|
|
11682
|
+
class: "ml-4",
|
|
11683
|
+
prefix: "B",
|
|
11684
|
+
width: "30%",
|
|
11685
|
+
"onUpdate:modelValue": updateBottom
|
|
11686
|
+
}, null, 8, ["model-value"])
|
|
11687
|
+
])
|
|
11375
11688
|
])
|
|
11376
11689
|
])
|
|
11377
11690
|
])
|
|
@@ -11637,6 +11950,7 @@ const designParts = [
|
|
|
11637
11950
|
partType: "Section",
|
|
11638
11951
|
partName: "GlobalDesignPart",
|
|
11639
11952
|
caption: "Global Design Part",
|
|
11953
|
+
icon: "rectangle",
|
|
11640
11954
|
propertyGroups: [
|
|
11641
11955
|
...defaultPropertyGroups()
|
|
11642
11956
|
],
|
|
@@ -11652,6 +11966,7 @@ const designParts = [
|
|
|
11652
11966
|
partType: "Section",
|
|
11653
11967
|
partName: "LocalDesignPart",
|
|
11654
11968
|
caption: "Local Design Part",
|
|
11969
|
+
icon: "rectangle",
|
|
11655
11970
|
propertyGroups: [
|
|
11656
11971
|
...defaultPropertyGroups()
|
|
11657
11972
|
],
|
|
@@ -11667,6 +11982,7 @@ const designParts = [
|
|
|
11667
11982
|
partType: "Section",
|
|
11668
11983
|
partName: "LocalMarketingPart",
|
|
11669
11984
|
caption: "Local Marketing Part",
|
|
11985
|
+
icon: "rectangle",
|
|
11670
11986
|
propertyGroups: [
|
|
11671
11987
|
...defaultPropertyGroups()
|
|
11672
11988
|
],
|
|
@@ -11684,6 +12000,7 @@ const sectionParts = [
|
|
|
11684
12000
|
partType: "Section",
|
|
11685
12001
|
partName: "Section",
|
|
11686
12002
|
caption: "Section",
|
|
12003
|
+
icon: "rectangle",
|
|
11687
12004
|
propertyGroups: [
|
|
11688
12005
|
...defaultPropertyGroups()
|
|
11689
12006
|
],
|
|
@@ -11700,6 +12017,7 @@ const blockParts = [
|
|
|
11700
12017
|
partType: "Block",
|
|
11701
12018
|
partName: "Block",
|
|
11702
12019
|
caption: "Block",
|
|
12020
|
+
icon: "space_dashboard",
|
|
11703
12021
|
propertyGroups: [
|
|
11704
12022
|
...defaultPropertyGroups()
|
|
11705
12023
|
],
|
|
@@ -11714,6 +12032,7 @@ const widgets = [
|
|
|
11714
12032
|
partType: "Widget",
|
|
11715
12033
|
partName: "TextWidget",
|
|
11716
12034
|
caption: "Text Widget",
|
|
12035
|
+
icon: "insert_text",
|
|
11717
12036
|
propertyGroups: [
|
|
11718
12037
|
{
|
|
11719
12038
|
groupName: "text",
|
|
@@ -11731,6 +12050,12 @@ const widgets = [
|
|
|
11731
12050
|
caption: "Font Size",
|
|
11732
12051
|
propertyType: "text",
|
|
11733
12052
|
params: ""
|
|
12053
|
+
},
|
|
12054
|
+
{
|
|
12055
|
+
propertyName: "color",
|
|
12056
|
+
caption: "Font Color",
|
|
12057
|
+
propertyType: "color",
|
|
12058
|
+
params: ""
|
|
11734
12059
|
}
|
|
11735
12060
|
]
|
|
11736
12061
|
},
|
|
@@ -11743,12 +12068,13 @@ const widgets = [
|
|
|
11743
12068
|
},
|
|
11744
12069
|
localized: true,
|
|
11745
12070
|
allowsChild: () => false,
|
|
11746
|
-
creator: () => _sfc_main$
|
|
12071
|
+
creator: () => _sfc_main$4$1
|
|
11747
12072
|
},
|
|
11748
12073
|
{
|
|
11749
12074
|
partType: "Widget",
|
|
11750
12075
|
partName: "ImageWidget",
|
|
11751
12076
|
caption: "Image Widget",
|
|
12077
|
+
icon: "imagesmode",
|
|
11752
12078
|
propertyGroups: [
|
|
11753
12079
|
{
|
|
11754
12080
|
groupName: "image",
|
|
@@ -11768,12 +12094,39 @@ const widgets = [
|
|
|
11768
12094
|
initialProperties: {},
|
|
11769
12095
|
localized: true,
|
|
11770
12096
|
allowsChild: () => false,
|
|
11771
|
-
creator: () => _sfc_main$
|
|
12097
|
+
creator: () => _sfc_main$5$1
|
|
12098
|
+
},
|
|
12099
|
+
{
|
|
12100
|
+
partType: "Widget",
|
|
12101
|
+
partName: "HtmlWidget",
|
|
12102
|
+
caption: "HTML Widget",
|
|
12103
|
+
icon: "code",
|
|
12104
|
+
propertyGroups: [
|
|
12105
|
+
{
|
|
12106
|
+
groupName: "html",
|
|
12107
|
+
caption: "HTML",
|
|
12108
|
+
properties: [
|
|
12109
|
+
{
|
|
12110
|
+
propertyName: "html",
|
|
12111
|
+
caption: "HTML",
|
|
12112
|
+
propertyType: "html",
|
|
12113
|
+
params: "",
|
|
12114
|
+
localized: true
|
|
12115
|
+
}
|
|
12116
|
+
]
|
|
12117
|
+
},
|
|
12118
|
+
...defaultWidgetPropertyGroups()
|
|
12119
|
+
],
|
|
12120
|
+
initialProperties: {},
|
|
12121
|
+
localized: true,
|
|
12122
|
+
allowsChild: () => false,
|
|
12123
|
+
creator: () => _sfc_main$3$1
|
|
11772
12124
|
},
|
|
11773
12125
|
{
|
|
11774
12126
|
partType: "Widget",
|
|
11775
12127
|
partName: "ProductListWidget",
|
|
11776
12128
|
caption: "Product List Widget",
|
|
12129
|
+
icon: "lists",
|
|
11777
12130
|
propertyGroups: [
|
|
11778
12131
|
{
|
|
11779
12132
|
groupName: "productList",
|
|
@@ -12482,7 +12835,7 @@ const _PastePartCommand = class _PastePartCommand {
|
|
|
12482
12835
|
const { target, index = 0 } = findInsertTargetAndIndex(pageBuilder);
|
|
12483
12836
|
if (target) {
|
|
12484
12837
|
const json = await navigator.clipboard.readText();
|
|
12485
|
-
const parts = pageBuilder.model.parsePageModel(json
|
|
12838
|
+
const parts = pageBuilder.model.parsePageModel(json);
|
|
12486
12839
|
if (parts) {
|
|
12487
12840
|
insertParts(pageBuilder, target.partId, index, parts, false);
|
|
12488
12841
|
}
|
|
@@ -12755,16 +13108,6 @@ const createDefaultKeyHandlers = () => {
|
|
|
12755
13108
|
};
|
|
12756
13109
|
const createDefaultToolButtonGroups = () => {
|
|
12757
13110
|
const groups = [
|
|
12758
|
-
{
|
|
12759
|
-
groupId: "file",
|
|
12760
|
-
buttons: [
|
|
12761
|
-
{
|
|
12762
|
-
buttonId: "core:template",
|
|
12763
|
-
caption: "Load Template",
|
|
12764
|
-
icon: "account_balance"
|
|
12765
|
-
}
|
|
12766
|
-
]
|
|
12767
|
-
},
|
|
12768
13111
|
{
|
|
12769
13112
|
groupId: "edit",
|
|
12770
13113
|
buttons: [
|
|
@@ -12812,13 +13155,13 @@ const createDefaultToolButtonGroups = () => {
|
|
|
12812
13155
|
{
|
|
12813
13156
|
buttonId: "core:openAddPartLayer",
|
|
12814
13157
|
caption: "Add Design Part...",
|
|
12815
|
-
icon: "
|
|
13158
|
+
icon: "add_row_below",
|
|
12816
13159
|
handler: (modeler) => modeler.commandRegistry.executeCommand(OpenAddPartModalCommand.COMMAND_ID)
|
|
12817
13160
|
},
|
|
12818
13161
|
{
|
|
12819
13162
|
buttonId: "core:openAddWidgetLayer",
|
|
12820
13163
|
caption: "Add Widget...",
|
|
12821
|
-
icon: "
|
|
13164
|
+
icon: "desktop_landscape_add",
|
|
12822
13165
|
handler: (modeler) => modeler.commandRegistry.executeCommand(OpenAddWidgetModalCommand.COMMAND_ID)
|
|
12823
13166
|
}
|
|
12824
13167
|
]
|
|
@@ -13021,12 +13364,19 @@ class PageBuilderEditorImpl {
|
|
|
13021
13364
|
__publicField(this, "title");
|
|
13022
13365
|
__publicField(this, "editMode");
|
|
13023
13366
|
__publicField(this, "scale", ref(1));
|
|
13367
|
+
__publicField(this, "language", ref("en"));
|
|
13024
13368
|
this.model = new Model2();
|
|
13025
13369
|
this.context = new PageBuilderContextImpl(this);
|
|
13026
13370
|
this.editMode = "free";
|
|
13027
13371
|
this.scale.value = 1;
|
|
13028
13372
|
this.initPlugins();
|
|
13029
13373
|
}
|
|
13374
|
+
getLanguage() {
|
|
13375
|
+
return this.language.value;
|
|
13376
|
+
}
|
|
13377
|
+
setLanguage(language) {
|
|
13378
|
+
this.language.value = language || "en";
|
|
13379
|
+
}
|
|
13030
13380
|
registerPlugin(plugin) {
|
|
13031
13381
|
if (plugin.partDefinitions)
|
|
13032
13382
|
this.partManager.registerPartDefinitions(plugin.partDefinitions);
|
|
@@ -13045,11 +13395,16 @@ class PageBuilderEditorImpl {
|
|
|
13045
13395
|
}
|
|
13046
13396
|
initData(content) {
|
|
13047
13397
|
this.model.rootPart.pageBuilderId = this.instanceId;
|
|
13398
|
+
this.model.rootPart.language = this.language.value;
|
|
13048
13399
|
let parts;
|
|
13049
13400
|
if (content) {
|
|
13050
|
-
const
|
|
13051
|
-
|
|
13052
|
-
|
|
13401
|
+
for (const p of content) {
|
|
13402
|
+
const page = partFromJsonObject(p, true);
|
|
13403
|
+
if (page) {
|
|
13404
|
+
if (!parts)
|
|
13405
|
+
parts = [];
|
|
13406
|
+
parts.push(page);
|
|
13407
|
+
}
|
|
13053
13408
|
}
|
|
13054
13409
|
}
|
|
13055
13410
|
if (!parts) {
|
|
@@ -13213,7 +13568,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
13213
13568
|
};
|
|
13214
13569
|
}
|
|
13215
13570
|
});
|
|
13216
|
-
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.empty .text {\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-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 {\n width: 95%;\n margin: 0 auto;\n padding-top: 8px;\n padding-bottom: 8px;\n}\n.pb-product-list-widget img {\n width: 100%;\n}\n.pb-product-list-widget .name {\n margin-top: 8px;\n font-size: 14px;\n}\n.pb-product-list-widget .price {\n margin-top: 8px;\n font-size: 14px;\n font-weight: bold;\n}\n.pb-product-list-widget .empty {\n height: 200px;\n background-color: #eee;\n text-align: center;\n}\n.pb-product-list-widget .empty span {\n font-size: 40px;\n color: #999;\n line-height: 200px;\n vertical-align: middle;\n}\n
|
|
13571
|
+
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.empty .text {\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.empty {\n padding: 4px 0;\n font-size: 18px;\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 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}';
|
|
13217
13572
|
const _hoisted_1$a = { class: "pb-canvas-frame" };
|
|
13218
13573
|
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
13219
13574
|
__name: "PbCanvasFrame",
|
|
@@ -13294,7 +13649,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
13294
13649
|
}, [
|
|
13295
13650
|
_ctx.button.icon ? (openBlock(), createElementBlock("span", {
|
|
13296
13651
|
key: 0,
|
|
13297
|
-
style: normalizeStyle({ fontSize: _ctx.button.iconFontSize || "
|
|
13652
|
+
style: normalizeStyle({ fontSize: _ctx.button.iconFontSize || "20px" }),
|
|
13298
13653
|
class: "font-icon"
|
|
13299
13654
|
}, toDisplayString(_ctx.button.icon), 5)) : createCommentVNode("", true)
|
|
13300
13655
|
])
|
|
@@ -13322,8 +13677,9 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
13322
13677
|
}
|
|
13323
13678
|
});
|
|
13324
13679
|
const _hoisted_1$7 = { class: "pb-toolbar bs-layout-horizontal align-items-center" };
|
|
13325
|
-
const _hoisted_2$4 = { class: "
|
|
13326
|
-
const _hoisted_3$
|
|
13680
|
+
const _hoisted_2$4 = { class: "bs-layout-horizontal" };
|
|
13681
|
+
const _hoisted_3$2 = /* @__PURE__ */ createElementVNode("div", { class: "flex-grow-1" }, null, -1);
|
|
13682
|
+
const _hoisted_4$1 = { class: "ml-8 w-64" };
|
|
13327
13683
|
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
13328
13684
|
__name: "PbToolbar",
|
|
13329
13685
|
setup(__props) {
|
|
@@ -13336,16 +13692,18 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
13336
13692
|
const scale2 = parseInt(scaleString.replaceAll(/[^0-9]+/g, "")) / 100;
|
|
13337
13693
|
pageBuilder.zoom(scale2);
|
|
13338
13694
|
};
|
|
13339
|
-
const lang = ref("English");
|
|
13340
13695
|
return (_ctx, _cache) => {
|
|
13341
13696
|
return openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
13342
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(buttonGroups), (group) => {
|
|
13343
|
-
return openBlock(), createBlock$1(_sfc_main$9, {
|
|
13344
|
-
key: group.groupId,
|
|
13345
|
-
group
|
|
13346
|
-
}, null, 8, ["group"]);
|
|
13347
|
-
}), 128)),
|
|
13348
13697
|
createElementVNode("div", _hoisted_2$4, [
|
|
13698
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(buttonGroups), (group) => {
|
|
13699
|
+
return openBlock(), createBlock$1(_sfc_main$9, {
|
|
13700
|
+
key: group.groupId,
|
|
13701
|
+
group
|
|
13702
|
+
}, null, 8, ["group"]);
|
|
13703
|
+
}), 128))
|
|
13704
|
+
]),
|
|
13705
|
+
_hoisted_3$2,
|
|
13706
|
+
createElementVNode("div", _hoisted_4$1, [
|
|
13349
13707
|
createVNode(unref(BSSelect), {
|
|
13350
13708
|
modelValue: scale.value,
|
|
13351
13709
|
"onUpdate:modelValue": [
|
|
@@ -13356,15 +13714,6 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
13356
13714
|
"view-mode": false,
|
|
13357
13715
|
placeholder: "Scale"
|
|
13358
13716
|
}, null, 8, ["modelValue"])
|
|
13359
|
-
]),
|
|
13360
|
-
createElementVNode("div", _hoisted_3$1, [
|
|
13361
|
-
createVNode(unref(BSSelect), {
|
|
13362
|
-
modelValue: lang.value,
|
|
13363
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => lang.value = $event),
|
|
13364
|
-
items: ["English", "日本語", "한국어"],
|
|
13365
|
-
"view-mode": false,
|
|
13366
|
-
placeholder: "English"
|
|
13367
|
-
}, null, 8, ["modelValue"])
|
|
13368
13717
|
])
|
|
13369
13718
|
]);
|
|
13370
13719
|
};
|
|
@@ -13388,8 +13737,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
13388
13737
|
setup(__props) {
|
|
13389
13738
|
const pageBuilder = usePageBuilderEditor();
|
|
13390
13739
|
const tabs = [
|
|
13391
|
-
{ tabId: "pageS", caption: "Mobile" },
|
|
13392
|
-
{ tabId: "pageL", caption: "PC" }
|
|
13740
|
+
{ tabId: "pageS", caption: "Mobile", icon: "phone_iphone" },
|
|
13741
|
+
{ tabId: "pageL", caption: "PC", icon: "desktop_windows" }
|
|
13393
13742
|
];
|
|
13394
13743
|
const pageS = computed(() => (pageBuilder.model.rootPart.children || [])[0].children || []);
|
|
13395
13744
|
const pageL = computed(() => (pageBuilder.model.rootPart.children || [])[1].children || []);
|
|
@@ -13402,6 +13751,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
13402
13751
|
set(value) {
|
|
13403
13752
|
}
|
|
13404
13753
|
});
|
|
13754
|
+
let savedPartSelection = null;
|
|
13405
13755
|
const treeDragAndDropPolicy = {
|
|
13406
13756
|
dropStep: () => 3,
|
|
13407
13757
|
isDroppable(_srcRow, _srcParentRow, _destRow, _destParentRow) {
|
|
@@ -13454,7 +13804,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
13454
13804
|
}
|
|
13455
13805
|
}
|
|
13456
13806
|
if (ok) {
|
|
13457
|
-
|
|
13807
|
+
backupPartSelection();
|
|
13808
|
+
pageBuilder.model.moveElements(event.row.partId, parentPartId, event.destIndex, void 0, true);
|
|
13458
13809
|
}
|
|
13459
13810
|
};
|
|
13460
13811
|
const selectedRows = computed({
|
|
@@ -13470,6 +13821,10 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
13470
13821
|
const selectedRowsChanged = (rows) => {
|
|
13471
13822
|
pageBuilder.context.setSelection([...rows]);
|
|
13472
13823
|
};
|
|
13824
|
+
const iconProvider = (part) => {
|
|
13825
|
+
const def = pageBuilder.partManager.getPartDefinition(part.partName);
|
|
13826
|
+
return (def == null ? void 0 : def.icon) || "";
|
|
13827
|
+
};
|
|
13473
13828
|
const labelProvider = (part) => {
|
|
13474
13829
|
var _a;
|
|
13475
13830
|
return part.getName() || ((_a = pageBuilder.partManager.getPartDefinition(part.partName)) == null ? void 0 : _a.caption) || part.partName;
|
|
@@ -13490,6 +13845,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
13490
13845
|
const modelUpdateHandler = (event) => {
|
|
13491
13846
|
var _a;
|
|
13492
13847
|
(_a = event.inserted) == null ? void 0 : _a.map((target) => findLeafPart(pageBuilder.model.findPartById(target.partId))).filter(notNull).forEach((part) => expandParent(part));
|
|
13848
|
+
if (savedPartSelection) {
|
|
13849
|
+
restorePartSelection();
|
|
13850
|
+
}
|
|
13493
13851
|
};
|
|
13494
13852
|
const expandParent = (part) => {
|
|
13495
13853
|
if (part.parent && part.parent.partName !== PAGE_TYPE) {
|
|
@@ -13497,6 +13855,15 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
13497
13855
|
expandParent(part.parent);
|
|
13498
13856
|
}
|
|
13499
13857
|
};
|
|
13858
|
+
const backupPartSelection = () => {
|
|
13859
|
+
savedPartSelection = [...pageBuilder.context.getSelectedParts()];
|
|
13860
|
+
};
|
|
13861
|
+
const restorePartSelection = () => {
|
|
13862
|
+
if (savedPartSelection) {
|
|
13863
|
+
pageBuilder.context.setSelection(savedPartSelection);
|
|
13864
|
+
savedPartSelection = null;
|
|
13865
|
+
}
|
|
13866
|
+
};
|
|
13500
13867
|
onMounted(() => {
|
|
13501
13868
|
PageBuilderEditorEvent.on.modelUpdatedByUI(modelUpdateHandler);
|
|
13502
13869
|
});
|
|
@@ -13524,6 +13891,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
13524
13891
|
],
|
|
13525
13892
|
data: pageS.value,
|
|
13526
13893
|
"enable-drag-and-drop": treeDragAndDropPolicy,
|
|
13894
|
+
"icon-provider": iconProvider,
|
|
13527
13895
|
"key-provider": (part) => part.partId,
|
|
13528
13896
|
"label-provider": labelProvider,
|
|
13529
13897
|
class: "max-w-320",
|
|
@@ -13548,6 +13916,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
13548
13916
|
],
|
|
13549
13917
|
data: pageL.value,
|
|
13550
13918
|
"enable-drag-and-drop": treeDragAndDropPolicy,
|
|
13919
|
+
"icon-provider": iconProvider,
|
|
13551
13920
|
"key-provider": (part) => part.partId,
|
|
13552
13921
|
"label-provider": labelProvider,
|
|
13553
13922
|
class: "max-w-320",
|
|
@@ -13572,13 +13941,13 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
13572
13941
|
const props = __props;
|
|
13573
13942
|
const pageBuilder = usePageBuilderEditor();
|
|
13574
13943
|
const propertyEditor = computed(() => {
|
|
13575
|
-
var _a
|
|
13944
|
+
var _a;
|
|
13576
13945
|
if (pageBuilder.editMode === "local" && props.selectedParts.length > 0) {
|
|
13577
13946
|
const section = pageBuilder.partManager.findNearestSection(props.selectedParts[0]);
|
|
13578
|
-
if (section &&
|
|
13947
|
+
if (section && section.isGlobalDesignPart()) {
|
|
13579
13948
|
return;
|
|
13580
13949
|
}
|
|
13581
|
-
if (section &&
|
|
13950
|
+
if (section && (section.isLocalDesignPart() || section.isLocalMarketingPart())) {
|
|
13582
13951
|
if (!props.property.localized) {
|
|
13583
13952
|
return;
|
|
13584
13953
|
}
|
|
@@ -13586,7 +13955,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
13586
13955
|
}
|
|
13587
13956
|
if (pageBuilder.editMode === "template" && props.selectedParts.length > 0) {
|
|
13588
13957
|
const section = pageBuilder.partManager.findNearestSection(props.selectedParts[0]);
|
|
13589
|
-
if (section &&
|
|
13958
|
+
if (section && (section.isLocalDesignPart() || section.isLocalMarketingPart())) {
|
|
13590
13959
|
if (props.property.localized) {
|
|
13591
13960
|
return;
|
|
13592
13961
|
}
|
|
@@ -13597,7 +13966,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
13597
13966
|
if (editor)
|
|
13598
13967
|
return editor;
|
|
13599
13968
|
}
|
|
13600
|
-
return (
|
|
13969
|
+
return (_a = pageBuilder.partManager.getPartPropertyEditor(props.property.propertyType)) == null ? void 0 : _a(props.property, props.selectedParts);
|
|
13601
13970
|
});
|
|
13602
13971
|
const value = computed(() => getPropertyValueOfParts(props.selectedParts, props.property.propertyName));
|
|
13603
13972
|
const updatePropertyValue = (properties) => {
|
|
@@ -13618,7 +13987,11 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
13618
13987
|
}
|
|
13619
13988
|
});
|
|
13620
13989
|
const _hoisted_1$4 = { class: "pb-sidebar-property-group" };
|
|
13621
|
-
const _hoisted_2$2 =
|
|
13990
|
+
const _hoisted_2$2 = {
|
|
13991
|
+
key: 0,
|
|
13992
|
+
class: "group-title"
|
|
13993
|
+
};
|
|
13994
|
+
const _hoisted_3$1 = ["textContent"];
|
|
13622
13995
|
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
13623
13996
|
__name: "PbSidebarPropertyGroupEditor",
|
|
13624
13997
|
props: {
|
|
@@ -13630,13 +14003,13 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
13630
14003
|
const props = __props;
|
|
13631
14004
|
const pageBuilder = usePageBuilderEditor();
|
|
13632
14005
|
const groupEditor = computed(() => {
|
|
13633
|
-
var _a, _b
|
|
14006
|
+
var _a, _b;
|
|
13634
14007
|
if (pageBuilder.editMode === "local" && props.selectedParts.length > 0) {
|
|
13635
14008
|
const section = pageBuilder.partManager.findNearestSection(props.selectedParts[0]);
|
|
13636
|
-
if (section &&
|
|
14009
|
+
if (section && section.isGlobalDesignPart()) {
|
|
13637
14010
|
return;
|
|
13638
14011
|
}
|
|
13639
|
-
if (section &&
|
|
14012
|
+
if (section && (section.isLocalDesignPart() || section.isLocalMarketingPart())) {
|
|
13640
14013
|
if (!props.group.localized) {
|
|
13641
14014
|
return;
|
|
13642
14015
|
}
|
|
@@ -13644,21 +14017,21 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
13644
14017
|
}
|
|
13645
14018
|
if (pageBuilder.editMode === "template" && props.selectedParts.length > 0) {
|
|
13646
14019
|
const section = pageBuilder.partManager.findNearestSection(props.selectedParts[0]);
|
|
13647
|
-
if (section &&
|
|
14020
|
+
if (section && (section.isLocalDesignPart() || section.isLocalMarketingPart())) {
|
|
13648
14021
|
if (props.group.localized) {
|
|
13649
14022
|
return;
|
|
13650
14023
|
}
|
|
13651
14024
|
}
|
|
13652
14025
|
}
|
|
13653
|
-
return (
|
|
14026
|
+
return (_b = (_a = props.group).propertyGroupEditor) == null ? void 0 : _b.call(_a, props.group, props.selectedParts);
|
|
13654
14027
|
});
|
|
13655
14028
|
return (_ctx, _cache) => {
|
|
13656
14029
|
return openBlock(), createElementBlock("div", _hoisted_1$4, [
|
|
13657
|
-
_ctx.group.showGroupName ? (openBlock(), createElementBlock("div",
|
|
13658
|
-
|
|
13659
|
-
|
|
13660
|
-
|
|
13661
|
-
|
|
14030
|
+
_ctx.group.showGroupName ? (openBlock(), createElementBlock("div", _hoisted_2$2, [
|
|
14031
|
+
createElementVNode("label", {
|
|
14032
|
+
textContent: toDisplayString(_ctx.group.caption)
|
|
14033
|
+
}, null, 8, _hoisted_3$1)
|
|
14034
|
+
])) : createCommentVNode("", true),
|
|
13662
14035
|
_ctx.partsKey ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
13663
14036
|
groupEditor.value ? (openBlock(), createBlock$1(resolveDynamicComponent(groupEditor.value), {
|
|
13664
14037
|
key: 0,
|
|
@@ -13677,7 +14050,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
13677
14050
|
}
|
|
13678
14051
|
});
|
|
13679
14052
|
const _hoisted_1$3 = { class: "property-editor property-editor-local-part flex-align-center pt-16" };
|
|
13680
|
-
const _hoisted_2$1 = /* @__PURE__ */ createElementVNode("div", { class: "
|
|
14053
|
+
const _hoisted_2$1 = /* @__PURE__ */ createElementVNode("div", { class: "title" }, [
|
|
14054
|
+
/* @__PURE__ */ createElementVNode("label", { textContent: "Display Schedule" })
|
|
14055
|
+
], -1);
|
|
13681
14056
|
const _hoisted_3 = { class: "bs-layout-horizontal" };
|
|
13682
14057
|
const _hoisted_4 = { class: "mr-2" };
|
|
13683
14058
|
const _hoisted_5 = /* @__PURE__ */ createElementVNode("span", { class: "font-icon" }, "more_horiz", -1);
|
|
@@ -13685,7 +14060,7 @@ const _hoisted_6 = [
|
|
|
13685
14060
|
_hoisted_5
|
|
13686
14061
|
];
|
|
13687
14062
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
13688
|
-
__name: "
|
|
14063
|
+
__name: "PbPropertyLocalMarketingPart",
|
|
13689
14064
|
props: {
|
|
13690
14065
|
selectedPart: {}
|
|
13691
14066
|
},
|
|
@@ -13697,18 +14072,19 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
13697
14072
|
const endDt = ref("");
|
|
13698
14073
|
const pageBuilder = usePageBuilderEditor();
|
|
13699
14074
|
const selectSchedule = () => {
|
|
13700
|
-
PageBuilderEditorEvent.emit.
|
|
14075
|
+
PageBuilderEditorEvent.emit.requestLocalMarketingPartSchedule({
|
|
13701
14076
|
pageBuilderId: pageBuilder.instanceId,
|
|
14077
|
+
partId: props.selectedPart.partId,
|
|
13702
14078
|
callback: (schedule) => {
|
|
13703
14079
|
startDt.value = schedule.startDt;
|
|
13704
14080
|
endDt.value = schedule.endDt;
|
|
13705
14081
|
if (props.selectedPart && props.selectedPart.isSection()) {
|
|
13706
14082
|
clearContents(props.selectedPart);
|
|
13707
|
-
if (schedule.
|
|
13708
|
-
for (const
|
|
13709
|
-
const part = findWidget(props.selectedPart,
|
|
14083
|
+
if (schedule.data) {
|
|
14084
|
+
for (const partId in schedule.data) {
|
|
14085
|
+
const part = findWidget(props.selectedPart, partId);
|
|
13710
14086
|
if (part) {
|
|
13711
|
-
Object.entries(schedule.
|
|
14087
|
+
Object.entries(schedule.data[partId]).forEach(([key, value]) => {
|
|
13712
14088
|
if (!value)
|
|
13713
14089
|
return;
|
|
13714
14090
|
part.properties = part.properties || {};
|
|
@@ -13721,15 +14097,14 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
13721
14097
|
}
|
|
13722
14098
|
});
|
|
13723
14099
|
};
|
|
13724
|
-
const findWidget = (part,
|
|
13725
|
-
var _a;
|
|
14100
|
+
const findWidget = (part, partId) => {
|
|
13726
14101
|
if (!part)
|
|
13727
14102
|
return;
|
|
13728
|
-
if (
|
|
14103
|
+
if (part.partId === partId)
|
|
13729
14104
|
return part;
|
|
13730
14105
|
if (part.children) {
|
|
13731
14106
|
for (const child of part.children) {
|
|
13732
|
-
const found = findWidget(child,
|
|
14107
|
+
const found = findWidget(child, partId);
|
|
13733
14108
|
if (found)
|
|
13734
14109
|
return found;
|
|
13735
14110
|
}
|
|
@@ -13790,21 +14165,17 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
13790
14165
|
return [];
|
|
13791
14166
|
}
|
|
13792
14167
|
});
|
|
13793
|
-
const
|
|
13794
|
-
var _a;
|
|
14168
|
+
const showLocalMarketingPart = computed(() => {
|
|
13795
14169
|
if (pageBuilder.editMode === "template")
|
|
13796
14170
|
return false;
|
|
13797
14171
|
if (!selectedParts.length || selectedParts.length !== 1)
|
|
13798
14172
|
return false;
|
|
13799
14173
|
const part = selectedParts[0];
|
|
13800
|
-
|
|
13801
|
-
return true;
|
|
13802
|
-
}
|
|
13803
|
-
return false;
|
|
14174
|
+
return part.isLocalMarketingPart();
|
|
13804
14175
|
});
|
|
13805
14176
|
return (_ctx, _cache) => {
|
|
13806
14177
|
return openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
13807
|
-
|
|
14178
|
+
showLocalMarketingPart.value ? (openBlock(), createBlock$1(_sfc_main$3, {
|
|
13808
14179
|
key: 0,
|
|
13809
14180
|
"selected-part": unref(selectedParts)[0]
|
|
13810
14181
|
}, null, 8, ["selected-part"])) : createCommentVNode("", true),
|
|
@@ -13842,25 +14213,84 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13842
14213
|
instanceId: {},
|
|
13843
14214
|
title: {},
|
|
13844
14215
|
editMode: {},
|
|
13845
|
-
pageContent: {}
|
|
14216
|
+
pageContent: {},
|
|
14217
|
+
language: {}
|
|
13846
14218
|
},
|
|
13847
|
-
setup(__props) {
|
|
14219
|
+
setup(__props, { expose: __expose }) {
|
|
13848
14220
|
const props = __props;
|
|
13849
14221
|
const modal = useModal();
|
|
13850
14222
|
const pageBuilderEditor = createPageBuilderEditor();
|
|
13851
14223
|
pageBuilderEditor.instanceId = props.instanceId;
|
|
13852
14224
|
pageBuilderEditor.title = props.title;
|
|
13853
14225
|
pageBuilderEditor.editMode = props.editMode || "free";
|
|
14226
|
+
if (props.language)
|
|
14227
|
+
pageBuilderEditor.setLanguage(props.language);
|
|
13854
14228
|
pageBuilderEditor.registerPlugin({
|
|
13855
14229
|
// TODO
|
|
13856
14230
|
commands: createDefaultCommands(modal)
|
|
13857
14231
|
});
|
|
13858
14232
|
pageBuilderEditor.keyHandlers.addDocumentKeyEventListener(window.document);
|
|
13859
14233
|
providePageBuilderEditor(pageBuilderEditor);
|
|
14234
|
+
providePageBuilder(pageBuilderEditor);
|
|
13860
14235
|
onMounted(() => pageBuilderEditor.initData(props.pageContent));
|
|
13861
14236
|
watch(() => props.pageContent, (pageContent) => pageContent && pageBuilderEditor.initData(pageContent));
|
|
14237
|
+
watch(() => props.language, (language) => {
|
|
14238
|
+
pageBuilderEditor.setLanguage(language);
|
|
14239
|
+
});
|
|
13862
14240
|
const colorHistory = ref([]);
|
|
13863
14241
|
provide("colorHistory", colorHistory);
|
|
14242
|
+
const getLocalDesignPartContent = () => {
|
|
14243
|
+
let content;
|
|
14244
|
+
if (pageBuilderEditor.model.rootPart) {
|
|
14245
|
+
content = doGetLocalDesignPartContent(pageBuilderEditor.model.rootPart);
|
|
14246
|
+
}
|
|
14247
|
+
return content;
|
|
14248
|
+
};
|
|
14249
|
+
const doGetLocalDesignPartContent = (part) => {
|
|
14250
|
+
let content;
|
|
14251
|
+
if (part.isGlobalDesignPart() || part.isLocalMarketingPart()) {
|
|
14252
|
+
const properties = getLocalDesignPartProperties(part);
|
|
14253
|
+
if (properties) {
|
|
14254
|
+
if (!content)
|
|
14255
|
+
content = [];
|
|
14256
|
+
content.push({ partId: part.partId, data: properties });
|
|
14257
|
+
}
|
|
14258
|
+
}
|
|
14259
|
+
if (part.children) {
|
|
14260
|
+
for (const child of part.children) {
|
|
14261
|
+
const childContent = doGetLocalDesignPartContent(child);
|
|
14262
|
+
if (childContent)
|
|
14263
|
+
content = [...content || [], ...childContent];
|
|
14264
|
+
}
|
|
14265
|
+
}
|
|
14266
|
+
return content;
|
|
14267
|
+
};
|
|
14268
|
+
const getLocalDesignPartProperties = (part) => {
|
|
14269
|
+
let properties;
|
|
14270
|
+
if (part.isWidget()) {
|
|
14271
|
+
const defs = pageBuilderEditor.partManager.getLocalDesignPartPropertyDefinitions(part.partName);
|
|
14272
|
+
if (defs) {
|
|
14273
|
+
const data = {};
|
|
14274
|
+
for (const def of defs) {
|
|
14275
|
+
if (part.properties)
|
|
14276
|
+
data[def.propertyName] = part.properties[def.propertyName];
|
|
14277
|
+
}
|
|
14278
|
+
properties = { [part.partId]: data };
|
|
14279
|
+
}
|
|
14280
|
+
}
|
|
14281
|
+
if (part.children) {
|
|
14282
|
+
for (const child of part.children) {
|
|
14283
|
+
const childProperties = getLocalDesignPartProperties(child);
|
|
14284
|
+
if (childProperties) {
|
|
14285
|
+
properties = { ...properties, ...childProperties };
|
|
14286
|
+
}
|
|
14287
|
+
}
|
|
14288
|
+
}
|
|
14289
|
+
return properties;
|
|
14290
|
+
};
|
|
14291
|
+
__expose({
|
|
14292
|
+
getLocalDesignPartContent
|
|
14293
|
+
});
|
|
13864
14294
|
return (_ctx, _cache) => {
|
|
13865
14295
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
13866
14296
|
createVNode(_sfc_main$7),
|
|
@@ -13876,27 +14306,32 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13876
14306
|
export {
|
|
13877
14307
|
BLOCK_TYPE$1 as B,
|
|
13878
14308
|
Model$1 as M,
|
|
13879
|
-
|
|
14309
|
+
PbColorPicker as P,
|
|
13880
14310
|
ROOT_TYPE$1 as R,
|
|
13881
14311
|
SECTION_TYPE$1 as S,
|
|
13882
14312
|
WIDGET_TYPE$1 as W,
|
|
13883
14313
|
_sfc_main as _,
|
|
13884
|
-
|
|
13885
|
-
|
|
13886
|
-
|
|
13887
|
-
|
|
13888
|
-
|
|
13889
|
-
|
|
13890
|
-
|
|
13891
|
-
|
|
14314
|
+
PageBuilderEditorEvent as a,
|
|
14315
|
+
Block as b,
|
|
14316
|
+
PAGE_BUILDER_KEY as c,
|
|
14317
|
+
PAGE_TYPE$1 as d,
|
|
14318
|
+
Page as e,
|
|
14319
|
+
_sfc_main$q as f,
|
|
14320
|
+
PageBuilderViewerEvent as g,
|
|
14321
|
+
Part as h,
|
|
13892
14322
|
_sfc_main$3$1 as i,
|
|
13893
|
-
|
|
13894
|
-
|
|
13895
|
-
|
|
13896
|
-
|
|
13897
|
-
|
|
13898
|
-
|
|
13899
|
-
|
|
13900
|
-
|
|
13901
|
-
|
|
14323
|
+
_sfc_main$5$1 as j,
|
|
14324
|
+
_sfc_main$2$1 as k,
|
|
14325
|
+
_sfc_main$4$1 as l,
|
|
14326
|
+
RootPart as m,
|
|
14327
|
+
Section as n,
|
|
14328
|
+
Widget as o,
|
|
14329
|
+
createPageBuilderViewer as p,
|
|
14330
|
+
createPartComponent as q,
|
|
14331
|
+
createPartComponents as r,
|
|
14332
|
+
providePageBuilder as s,
|
|
14333
|
+
providePageBuilderViewer as t,
|
|
14334
|
+
usePageBuilderEditor as u,
|
|
14335
|
+
usePageBuilder as v,
|
|
14336
|
+
usePageBuilderViewer as w
|
|
13902
14337
|
};
|