@g1cloud/page-builder-editor 1.0.0-alpha.1 → 1.0.0-alpha.11
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 +109 -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-B2wOdZTD.js +98 -0
- package/dist/PageBuilderEditor.vue.d.ts +5 -1
- package/dist/PbPropertyEditorColor-D3brNT4U.js +57 -0
- package/dist/PbPropertyEditorHtml-D--QgdEp.js +64 -0
- package/dist/{PbPropertyEditorImage-BFIqG-bL.js → PbPropertyEditorImage-BB25lcTu.js} +2 -2
- package/dist/PbPropertyEditorMultilineText-BN2Q1P1o.js +65 -0
- package/dist/{PbPropertyEditorProduct--cf9LI2Z.js → PbPropertyEditorProduct-CBk2DLhW.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-DdC6jCrv.js} +987 -535
- package/dist/model/context.d.ts +19 -10
- 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 +1368 -681
- 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(() => {
|
|
6998
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(() => {
|
|
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$
|
|
7052
|
-
const _hoisted_2$
|
|
7053
|
-
const _hoisted_3$
|
|
7054
|
-
const _hoisted_4$
|
|
7055
|
-
const _hoisted_5$
|
|
7056
|
-
const _hoisted_6$
|
|
7196
|
+
const _hoisted_1$1$1 = { class: "pb-product-list-widget" };
|
|
7197
|
+
const _hoisted_2$k = { class: "product" };
|
|
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,23 +7235,23 @@ 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,
|
|
7097
7242
|
class: "product-wrapper"
|
|
7098
7243
|
}, [
|
|
7099
|
-
createElementVNode("div", _hoisted_2$
|
|
7244
|
+
createElementVNode("div", _hoisted_2$k, [
|
|
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,31 +7415,42 @@ 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
|
}
|
|
7257
7431
|
});
|
|
7258
|
-
const _hoisted_1$
|
|
7432
|
+
const _hoisted_1$t = { class: "pb-viewer" };
|
|
7259
7433
|
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) => {
|
|
@@ -7277,11 +7460,12 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
7277
7460
|
}
|
|
7278
7461
|
);
|
|
7279
7462
|
return (_ctx, _cache) => {
|
|
7280
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
7463
|
+
return openBlock(), createElementBlock("div", _hoisted_1$t, [
|
|
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-BN2Q1P1o.js")),
|
|
8067
|
+
"select": () => defineAsyncComponent(() => import("./PbPropertyEditorSelect-CWedbXJI.js")),
|
|
8068
|
+
"color": () => defineAsyncComponent(() => import("./PbPropertyEditorColor-D3brNT4U.js")),
|
|
8069
|
+
"image": () => defineAsyncComponent(() => import("./PbPropertyEditorImage-BB25lcTu.js")),
|
|
8070
|
+
"html": () => defineAsyncComponent(() => import("./PbPropertyEditorHtml-D--QgdEp.js")),
|
|
8071
|
+
"product": () => defineAsyncComponent(() => import("./PbPropertyEditorProduct-CBk2DLhW.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
|
};
|
|
@@ -8068,18 +8299,18 @@ const _export_sfc = (sfc, props) => {
|
|
|
8068
8299
|
return target;
|
|
8069
8300
|
};
|
|
8070
8301
|
const _sfc_main$p = {};
|
|
8071
|
-
const _hoisted_1$
|
|
8072
|
-
const _hoisted_2$
|
|
8073
|
-
const _hoisted_3$
|
|
8074
|
-
const _hoisted_4$
|
|
8075
|
-
_hoisted_2$
|
|
8076
|
-
_hoisted_3$
|
|
8302
|
+
const _hoisted_1$s = { class: "pb-add-widget-button" };
|
|
8303
|
+
const _hoisted_2$j = /* @__PURE__ */ createElementVNode("span", { class: "icon material-icons-outlined" }, "add_box", -1);
|
|
8304
|
+
const _hoisted_3$g = /* @__PURE__ */ createElementVNode("span", { class: "text" }, "Add Widget", -1);
|
|
8305
|
+
const _hoisted_4$d = [
|
|
8306
|
+
_hoisted_2$j,
|
|
8307
|
+
_hoisted_3$g
|
|
8077
8308
|
];
|
|
8078
8309
|
function _sfc_render$1(_ctx, _cache) {
|
|
8079
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
8310
|
+
return openBlock(), createElementBlock("div", _hoisted_1$s, [
|
|
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]]);
|
|
@@ -8113,8 +8344,8 @@ const useMouseTracker = () => {
|
|
|
8113
8344
|
throw Error(MOUSE_TRACKER_NOT_FOUND);
|
|
8114
8345
|
return mouseTracker;
|
|
8115
8346
|
};
|
|
8116
|
-
const _hoisted_1$
|
|
8117
|
-
const _hoisted_2$
|
|
8347
|
+
const _hoisted_1$r = ["data-model-id", "draggable"];
|
|
8348
|
+
const _hoisted_2$i = {
|
|
8118
8349
|
key: 1,
|
|
8119
8350
|
class: "children"
|
|
8120
8351
|
};
|
|
@@ -8564,7 +8795,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
8564
8795
|
key: 0,
|
|
8565
8796
|
part: _ctx.part
|
|
8566
8797
|
}, null, 8, ["part"])) : createCommentVNode("", true),
|
|
8567
|
-
childComponents.value && childComponents.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
8798
|
+
childComponents.value && childComponents.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_2$i, [
|
|
8568
8799
|
(openBlock(true), createElementBlock(Fragment, null, renderList(childComponents.value, (child) => {
|
|
8569
8800
|
return openBlock(), createBlock$1(resolveDynamicComponent(child.component), {
|
|
8570
8801
|
key: child.part.partId,
|
|
@@ -8582,13 +8813,13 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
8582
8813
|
class: "resize-handle",
|
|
8583
8814
|
onMousedown: _resize_mousedown
|
|
8584
8815
|
}, null, 32)) : createCommentVNode("", true)
|
|
8585
|
-
], 16, _hoisted_1$
|
|
8816
|
+
], 16, _hoisted_1$r)), [
|
|
8586
8817
|
[unref(vPartHandler), { pageBuilder: unref(pageBuilder), part: _ctx.part, droppable: true, locatePositionMark, calculateDropIndex, acceptChildPart }]
|
|
8587
8818
|
]);
|
|
8588
8819
|
};
|
|
8589
8820
|
}
|
|
8590
8821
|
});
|
|
8591
|
-
const _hoisted_1$
|
|
8822
|
+
const _hoisted_1$q = ["data-model-id"];
|
|
8592
8823
|
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
8593
8824
|
__name: "PbBlock",
|
|
8594
8825
|
props: {
|
|
@@ -8784,14 +9015,14 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
8784
9015
|
part: child
|
|
8785
9016
|
}, null, 8, ["part"]);
|
|
8786
9017
|
}), 128))
|
|
8787
|
-
], 16, _hoisted_1$
|
|
9018
|
+
], 16, _hoisted_1$q)), [
|
|
8788
9019
|
[unref(vPartHandler), { pageBuilder: unref(pageBuilder), part: _ctx.part, droppable: true, locatePositionMark, calculateDropIndex, acceptChildPart }]
|
|
8789
9020
|
]);
|
|
8790
9021
|
};
|
|
8791
9022
|
}
|
|
8792
9023
|
});
|
|
8793
|
-
const _hoisted_1$
|
|
8794
|
-
const _hoisted_2$
|
|
9024
|
+
const _hoisted_1$p = { class: "pb-block" };
|
|
9025
|
+
const _hoisted_2$h = /* @__PURE__ */ createElementVNode("div", {
|
|
8795
9026
|
class: "pb-widget",
|
|
8796
9027
|
style: { "margin": "0 auto" }
|
|
8797
9028
|
}, [
|
|
@@ -8799,8 +9030,8 @@ 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$
|
|
8803
|
-
_hoisted_2$
|
|
9033
|
+
const _hoisted_3$f = [
|
|
9034
|
+
_hoisted_2$h
|
|
8804
9035
|
];
|
|
8805
9036
|
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
8806
9037
|
__name: "PbLoginDepart",
|
|
@@ -8809,11 +9040,11 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
8809
9040
|
},
|
|
8810
9041
|
setup(__props) {
|
|
8811
9042
|
return (_ctx, _cache) => {
|
|
8812
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9043
|
+
return openBlock(), createElementBlock("div", _hoisted_1$p, _hoisted_3$f);
|
|
8813
9044
|
};
|
|
8814
9045
|
}
|
|
8815
9046
|
});
|
|
8816
|
-
const _hoisted_1$
|
|
9047
|
+
const _hoisted_1$o = ["data-model-id"];
|
|
8817
9048
|
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
8818
9049
|
__name: "PbSection",
|
|
8819
9050
|
props: {
|
|
@@ -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
|
});
|
|
@@ -8940,22 +9171,28 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
8940
9171
|
onAddWidget: addWidget
|
|
8941
9172
|
}))
|
|
8942
9173
|
], 64))
|
|
8943
|
-
], 16, _hoisted_1$
|
|
9174
|
+
], 16, _hoisted_1$o)), [
|
|
8944
9175
|
[unref(vPartHandler), { pageBuilder: unref(pageBuilder), part: _ctx.part, droppable: true, locatePositionMark, calculateDropIndex, acceptChildPart }]
|
|
8945
9176
|
]);
|
|
8946
9177
|
};
|
|
8947
9178
|
}
|
|
8948
9179
|
});
|
|
8949
|
-
const _hoisted_1$
|
|
8950
|
-
const _hoisted_2$
|
|
8951
|
-
const _hoisted_3$
|
|
8952
|
-
/* @__PURE__ */ createElementVNode("label",
|
|
9180
|
+
const _hoisted_1$n = { class: "group-editor group-editor-position" };
|
|
9181
|
+
const _hoisted_2$g = { class: "flex-align-center" };
|
|
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: {
|
|
@@ -8980,39 +9217,46 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
8980
9217
|
const updateTop = (value) => updatePropertyValue({ top: value });
|
|
8981
9218
|
const updateBottom = (value) => updatePropertyValue({ bottom: value });
|
|
8982
9219
|
return (_ctx, _cache) => {
|
|
8983
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
8984
|
-
createElementVNode("div", _hoisted_2$
|
|
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
|
-
|
|
9220
|
+
return openBlock(), createElementBlock("div", _hoisted_1$n, [
|
|
9221
|
+
createElementVNode("div", _hoisted_2$g, [
|
|
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
|
])
|
|
@@ -9020,14 +9264,12 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
9020
9264
|
};
|
|
9021
9265
|
}
|
|
9022
9266
|
});
|
|
9023
|
-
const _hoisted_1$
|
|
9024
|
-
const _hoisted_2$
|
|
9025
|
-
const _hoisted_3$
|
|
9026
|
-
/* @__PURE__ */ createElementVNode("label",
|
|
9267
|
+
const _hoisted_1$m = { class: "group-editor group-editor-size" };
|
|
9268
|
+
const _hoisted_2$f = { class: "flex-align-center" };
|
|
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: {
|
|
@@ -9048,22 +9290,20 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
9048
9290
|
const updateWidth = (value) => updatePropertyValue({ width: value });
|
|
9049
9291
|
const updateHeight = (value) => updatePropertyValue({ height: value });
|
|
9050
9292
|
return (_ctx, _cache) => {
|
|
9051
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9052
|
-
createElementVNode("div", _hoisted_2$
|
|
9053
|
-
_hoisted_3$
|
|
9054
|
-
createElementVNode("div", _hoisted_4$
|
|
9055
|
-
_hoisted_5$6,
|
|
9293
|
+
return openBlock(), createElementBlock("div", _hoisted_1$m, [
|
|
9294
|
+
createElementVNode("div", _hoisted_2$f, [
|
|
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
|
])
|
|
@@ -9229,22 +9469,22 @@ var script$4 = {
|
|
|
9229
9469
|
}
|
|
9230
9470
|
}
|
|
9231
9471
|
};
|
|
9232
|
-
const _hoisted_1$
|
|
9233
|
-
const _hoisted_2$
|
|
9234
|
-
const _hoisted_3$
|
|
9472
|
+
const _hoisted_1$l = { class: "vc-alpha" };
|
|
9473
|
+
const _hoisted_2$e = { class: "vc-alpha-checkboard-wrap" };
|
|
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");
|
|
9246
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9247
|
-
createElementVNode("div", _hoisted_2$
|
|
9486
|
+
return openBlock(), createElementBlock("div", _hoisted_1$l, [
|
|
9487
|
+
createElementVNode("div", _hoisted_2$e, [
|
|
9248
9488
|
createVNode(_component_Checkboard)
|
|
9249
9489
|
]),
|
|
9250
9490
|
createElementVNode(
|
|
@@ -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
|
)
|
|
@@ -10347,12 +10587,12 @@ var script$3 = {
|
|
|
10347
10587
|
// }
|
|
10348
10588
|
}
|
|
10349
10589
|
};
|
|
10350
|
-
const _hoisted_1$
|
|
10351
|
-
const _hoisted_2$
|
|
10352
|
-
const _hoisted_3$
|
|
10353
|
-
const _hoisted_4$
|
|
10590
|
+
const _hoisted_1$k = { class: "vc-editable-input" };
|
|
10591
|
+
const _hoisted_2$d = ["aria-labelledby"];
|
|
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
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
10595
|
+
return openBlock(), createElementBlock("div", _hoisted_1$k, [
|
|
10356
10596
|
withDirectives(createElementVNode("input", {
|
|
10357
10597
|
ref: "input",
|
|
10358
10598
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $options.val = $event),
|
|
@@ -10360,17 +10600,17 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
10360
10600
|
class: "vc-input__input",
|
|
10361
10601
|
onKeydown: _cache[1] || (_cache[1] = (...args) => $options.handleKeyDown && $options.handleKeyDown(...args)),
|
|
10362
10602
|
onInput: _cache[2] || (_cache[2] = (...args) => $options.update && $options.update(...args))
|
|
10363
|
-
}, null, 40, _hoisted_2$
|
|
10603
|
+
}, null, 40, _hoisted_2$d), [
|
|
10364
10604
|
[vModelText, $options.val]
|
|
10365
10605
|
]),
|
|
10366
10606
|
createElementVNode("span", {
|
|
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 */
|
|
@@ -10447,29 +10687,29 @@ var script$2 = {
|
|
|
10447
10687
|
}
|
|
10448
10688
|
}
|
|
10449
10689
|
};
|
|
10450
|
-
const _hoisted_1$
|
|
10690
|
+
const _hoisted_1$j = /* @__PURE__ */ createElementVNode(
|
|
10451
10691
|
"div",
|
|
10452
10692
|
{ class: "vc-saturation--white" },
|
|
10453
10693
|
null,
|
|
10454
10694
|
-1
|
|
10455
10695
|
/* HOISTED */
|
|
10456
10696
|
);
|
|
10457
|
-
const _hoisted_2$
|
|
10697
|
+
const _hoisted_2$c = /* @__PURE__ */ createElementVNode(
|
|
10458
10698
|
"div",
|
|
10459
10699
|
{ class: "vc-saturation--black" },
|
|
10460
10700
|
null,
|
|
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(
|
|
@@ -10483,15 +10723,15 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
10483
10723
|
onTouchstart: _cache[2] || (_cache[2] = (...args) => $options.handleChange && $options.handleChange(...args))
|
|
10484
10724
|
},
|
|
10485
10725
|
[
|
|
10486
|
-
_hoisted_1$
|
|
10487
|
-
_hoisted_2$
|
|
10726
|
+
_hoisted_1$j,
|
|
10727
|
+
_hoisted_2$c,
|
|
10488
10728
|
createElementVNode(
|
|
10489
10729
|
"div",
|
|
10490
10730
|
{
|
|
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
|
)
|
|
@@ -10632,16 +10872,16 @@ var script$1 = {
|
|
|
10632
10872
|
}
|
|
10633
10873
|
}
|
|
10634
10874
|
};
|
|
10635
|
-
const _hoisted_1$
|
|
10636
|
-
const _hoisted_2$
|
|
10875
|
+
const _hoisted_1$i = ["aria-valuenow"];
|
|
10876
|
+
const _hoisted_2$b = /* @__PURE__ */ createElementVNode(
|
|
10637
10877
|
"div",
|
|
10638
10878
|
{ class: "vc-hue-picker" },
|
|
10639
10879
|
null,
|
|
10640
10880
|
-1
|
|
10641
10881
|
/* HOISTED */
|
|
10642
10882
|
);
|
|
10643
|
-
const _hoisted_3$
|
|
10644
|
-
_hoisted_2$
|
|
10883
|
+
const _hoisted_3$9 = [
|
|
10884
|
+
_hoisted_2$b
|
|
10645
10885
|
];
|
|
10646
10886
|
function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
10647
10887
|
return openBlock(), createElementBlock(
|
|
@@ -10668,11 +10908,11 @@ 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
|
)
|
|
10675
|
-
], 40, _hoisted_1$
|
|
10915
|
+
], 40, _hoisted_1$i)
|
|
10676
10916
|
],
|
|
10677
10917
|
2
|
|
10678
10918
|
/* CLASS */
|
|
@@ -10768,10 +11008,10 @@ var script = {
|
|
|
10768
11008
|
}
|
|
10769
11009
|
}
|
|
10770
11010
|
};
|
|
10771
|
-
const _hoisted_1$
|
|
10772
|
-
const _hoisted_2$
|
|
10773
|
-
const _hoisted_3$
|
|
10774
|
-
const _hoisted_4$
|
|
11011
|
+
const _hoisted_1$h = { class: "vc-sketch-saturation-wrap" };
|
|
11012
|
+
const _hoisted_2$a = { class: "vc-sketch-controls" };
|
|
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");
|
|
@@ -10811,15 +11051,15 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
10811
11051
|
class: normalizeClass(["vc-sketch", [$props.disableAlpha ? "vc-sketch__disable-alpha" : ""]])
|
|
10812
11052
|
},
|
|
10813
11053
|
[
|
|
10814
|
-
createElementVNode("div", _hoisted_1$
|
|
11054
|
+
createElementVNode("div", _hoisted_1$h, [
|
|
10815
11055
|
createVNode(_component_Saturation, {
|
|
10816
11056
|
value: _ctx.colors,
|
|
10817
11057
|
onChange: $options.childChange
|
|
10818
11058
|
}, null, 8, ["value", "onChange"])
|
|
10819
11059
|
]),
|
|
10820
|
-
createElementVNode("div", _hoisted_2$
|
|
10821
|
-
createElementVNode("div", _hoisted_3$
|
|
10822
|
-
createElementVNode("div", _hoisted_4$
|
|
11060
|
+
createElementVNode("div", _hoisted_2$a, [
|
|
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,18 +11200,17 @@ 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);
|
|
10960
|
-
}),
|
|
11207
|
+
}, 100),
|
|
10961
11208
|
{ deep: true }
|
|
10962
11209
|
);
|
|
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
|
);
|
|
@@ -10981,12 +11227,12 @@ const _sfc_main$i = defineComponent({
|
|
|
10981
11227
|
};
|
|
10982
11228
|
}
|
|
10983
11229
|
});
|
|
10984
|
-
const _hoisted_1$
|
|
10985
|
-
const _hoisted_2$
|
|
10986
|
-
const _hoisted_3$
|
|
10987
|
-
_hoisted_2$
|
|
11230
|
+
const _hoisted_1$g = { class: "buttons" };
|
|
11231
|
+
const _hoisted_2$9 = /* @__PURE__ */ createElementVNode("i", { class: "material-icons-outlined" }, "delete", -1);
|
|
11232
|
+
const _hoisted_3$7 = [
|
|
11233
|
+
_hoisted_2$9
|
|
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");
|
|
@@ -10995,7 +11241,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
10995
11241
|
onKeydown: _cache[3] || (_cache[3] = withModifiers(() => {
|
|
10996
11242
|
}, ["stop"]))
|
|
10997
11243
|
}, [
|
|
10998
|
-
createElementVNode("div", _hoisted_1$
|
|
11244
|
+
createElementVNode("div", _hoisted_1$g, [
|
|
10999
11245
|
renderSlot(_ctx.$slots, "button", normalizeProps(guardReactiveProps({ toggle: _ctx.toggle, color: _ctx.color })), () => [
|
|
11000
11246
|
createElementVNode("button", {
|
|
11001
11247
|
class: normalizeClass([{ none: !_ctx.color }, "pb-button picker-button"]),
|
|
@@ -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,
|
|
@@ -11022,12 +11268,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11022
11268
|
]);
|
|
11023
11269
|
}
|
|
11024
11270
|
const PbColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render]]);
|
|
11025
|
-
const _hoisted_1$
|
|
11026
|
-
const _hoisted_2$
|
|
11027
|
-
const _hoisted_3$
|
|
11028
|
-
/* @__PURE__ */ createElementVNode("label",
|
|
11271
|
+
const _hoisted_1$f = { class: "group-editor group-editor-background" };
|
|
11272
|
+
const _hoisted_2$8 = { class: "flex-align-center" };
|
|
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
|
};
|
|
@@ -11060,10 +11305,10 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
11060
11305
|
});
|
|
11061
11306
|
};
|
|
11062
11307
|
return (_ctx, _cache) => {
|
|
11063
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
11064
|
-
createElementVNode("div", _hoisted_2$
|
|
11065
|
-
_hoisted_3$
|
|
11066
|
-
createElementVNode("div", _hoisted_4$
|
|
11308
|
+
return openBlock(), createElementBlock("div", _hoisted_1$f, [
|
|
11309
|
+
createElementVNode("div", _hoisted_2$8, [
|
|
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
|
});
|
|
11092
|
-
const
|
|
11093
|
-
const
|
|
11094
|
-
const
|
|
11095
|
-
|
|
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";
|
|
11341
|
+
const _hoisted_1$e = { class: "group-editor group-editor-border" };
|
|
11342
|
+
const _hoisted_2$7 = { class: "flex-align-center" };
|
|
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" })
|
|
11096
11349
|
], -1);
|
|
11097
|
-
const
|
|
11098
|
-
const
|
|
11099
|
-
const
|
|
11100
|
-
|
|
11101
|
-
|
|
11102
|
-
const _hoisted_9 =
|
|
11103
|
-
const _hoisted_10 = { class: "
|
|
11104
|
-
const _hoisted_11 =
|
|
11105
|
-
const _hoisted_12 =
|
|
11106
|
-
const _hoisted_13 = /* @__PURE__ */ createElementVNode("
|
|
11107
|
-
|
|
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" })
|
|
11369
|
+
], -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"));
|
|
@@ -11143,87 +11409,108 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
11143
11409
|
const updateBorderBottomLeftRadius = (value) => updatePropertyValue({ borderBottomLeftRadius: value });
|
|
11144
11410
|
const updateBorderBottomRightRadius = (value) => updatePropertyValue({ borderBottomRightRadius: value });
|
|
11145
11411
|
return (_ctx, _cache) => {
|
|
11146
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
11147
|
-
createElementVNode("div", _hoisted_2$
|
|
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,
|
|
11412
|
+
return openBlock(), createElementBlock("div", _hoisted_1$e, [
|
|
11413
|
+
createElementVNode("div", _hoisted_2$7, [
|
|
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
|
])
|
|
@@ -11231,16 +11518,22 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
11231
11518
|
};
|
|
11232
11519
|
}
|
|
11233
11520
|
});
|
|
11234
|
-
const _hoisted_1$
|
|
11235
|
-
const _hoisted_2$
|
|
11236
|
-
const _hoisted_3$
|
|
11237
|
-
/* @__PURE__ */ createElementVNode("label",
|
|
11521
|
+
const _hoisted_1$d = { class: "group-editor group-editor-margin" };
|
|
11522
|
+
const _hoisted_2$6 = { class: "flex-align-center" };
|
|
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: {
|
|
@@ -11265,39 +11558,46 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
11265
11558
|
const updateTop = (value) => updatePropertyValue({ marginTop: value });
|
|
11266
11559
|
const updateBottom = (value) => updatePropertyValue({ marginBottom: value });
|
|
11267
11560
|
return (_ctx, _cache) => {
|
|
11268
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
11269
|
-
createElementVNode("div", _hoisted_2$
|
|
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
|
-
|
|
11561
|
+
return openBlock(), createElementBlock("div", _hoisted_1$d, [
|
|
11562
|
+
createElementVNode("div", _hoisted_2$6, [
|
|
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$
|
|
11309
|
-
const _hoisted_2$
|
|
11310
|
-
const _hoisted_3$
|
|
11311
|
-
/* @__PURE__ */ createElementVNode("label",
|
|
11608
|
+
const _hoisted_1$c = { class: "group-editor group-editor-padding" };
|
|
11609
|
+
const _hoisted_2$5 = { class: "flex-align-center" };
|
|
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: {
|
|
@@ -11339,39 +11645,46 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
11339
11645
|
const updateTop = (value) => updatePropertyValue({ paddingTop: value });
|
|
11340
11646
|
const updateBottom = (value) => updatePropertyValue({ paddingBottom: value });
|
|
11341
11647
|
return (_ctx, _cache) => {
|
|
11342
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
11343
|
-
createElementVNode("div", _hoisted_2$
|
|
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
|
-
|
|
11648
|
+
return openBlock(), createElementBlock("div", _hoisted_1$c, [
|
|
11649
|
+
createElementVNode("div", _hoisted_2$5, [
|
|
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
|
]
|
|
@@ -12988,11 +13331,11 @@ class KeyHandlersImpl {
|
|
|
12988
13331
|
}
|
|
12989
13332
|
}
|
|
12990
13333
|
}
|
|
12991
|
-
addDocumentKeyEventListener(
|
|
12992
|
-
|
|
13334
|
+
addDocumentKeyEventListener(element) {
|
|
13335
|
+
element.addEventListener("keydown", this.handleKeyDownEvent.bind(this));
|
|
12993
13336
|
}
|
|
12994
|
-
removeDocumentKeyEventListener(
|
|
12995
|
-
|
|
13337
|
+
removeDocumentKeyEventListener(element) {
|
|
13338
|
+
element.removeEventListener("keydown", this.handleKeyDownEvent.bind(this));
|
|
12996
13339
|
}
|
|
12997
13340
|
}
|
|
12998
13341
|
const PAGE_BUILDER_EDITOR_KEY = "PageBuilderEditor";
|
|
@@ -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) {
|
|
@@ -13095,9 +13450,9 @@ class PageBuilderEditorImpl {
|
|
|
13095
13450
|
});
|
|
13096
13451
|
}
|
|
13097
13452
|
}
|
|
13098
|
-
const _hoisted_1$
|
|
13099
|
-
const _hoisted_2$
|
|
13100
|
-
_hoisted_1$
|
|
13453
|
+
const _hoisted_1$b = /* @__PURE__ */ createElementVNode("i", { class: "material-icons-outlined" }, "add_circle_outline", -1);
|
|
13454
|
+
const _hoisted_2$4 = [
|
|
13455
|
+
_hoisted_1$b
|
|
13101
13456
|
];
|
|
13102
13457
|
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
13103
13458
|
__name: "PbPage",
|
|
@@ -13144,12 +13499,12 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
13144
13499
|
var _a2, _b;
|
|
13145
13500
|
return insertSection(((_b = (_a2 = _ctx.page) == null ? void 0 : _a2.children) == null ? void 0 : _b.length) || 0);
|
|
13146
13501
|
})
|
|
13147
|
-
}, _hoisted_2$
|
|
13502
|
+
}, _hoisted_2$4)
|
|
13148
13503
|
], 4);
|
|
13149
13504
|
};
|
|
13150
13505
|
}
|
|
13151
13506
|
});
|
|
13152
|
-
const _hoisted_1$
|
|
13507
|
+
const _hoisted_1$a = /* @__PURE__ */ createElementVNode("div", { style: { "width": "20px" } }, null, -1);
|
|
13153
13508
|
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
13154
13509
|
__name: "PbCanvas",
|
|
13155
13510
|
setup(__props) {
|
|
@@ -13202,7 +13557,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
13202
13557
|
page: pageS.value,
|
|
13203
13558
|
width: 420
|
|
13204
13559
|
}, null, 8, ["page"]),
|
|
13205
|
-
_hoisted_1$
|
|
13560
|
+
_hoisted_1$a,
|
|
13206
13561
|
createVNode(_sfc_main$d, {
|
|
13207
13562
|
"is-mobile-page": false,
|
|
13208
13563
|
page: pageL.value,
|
|
@@ -13213,8 +13568,8 @@ 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
|
|
13217
|
-
const _hoisted_1$
|
|
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}';
|
|
13572
|
+
const _hoisted_1$9 = { class: "pb-canvas-frame" };
|
|
13218
13573
|
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
13219
13574
|
__name: "PbCanvasFrame",
|
|
13220
13575
|
setup(__props) {
|
|
@@ -13250,14 +13605,14 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
13250
13605
|
<link href="https://fonts.googleapis.com/css2?family=Material+Icons+Outlined" rel="stylesheet" />
|
|
13251
13606
|
<style>${canvasStyle}</style>
|
|
13252
13607
|
`;
|
|
13253
|
-
pageBuilderEditor.keyHandlers.addDocumentKeyEventListener(iframeRef.value.contentWindow.document);
|
|
13608
|
+
pageBuilderEditor.keyHandlers.addDocumentKeyEventListener(iframeRef.value.contentWindow.document.body);
|
|
13254
13609
|
stopIframeWatch();
|
|
13255
13610
|
}
|
|
13256
13611
|
}
|
|
13257
13612
|
);
|
|
13258
13613
|
return (_ctx, _cache) => {
|
|
13259
13614
|
var _a, _b, _c, _d;
|
|
13260
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
13615
|
+
return openBlock(), createElementBlock("div", _hoisted_1$9, [
|
|
13261
13616
|
createElementVNode("iframe", {
|
|
13262
13617
|
ref_key: "iframeRef",
|
|
13263
13618
|
ref: iframeRef,
|
|
@@ -13273,7 +13628,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
13273
13628
|
};
|
|
13274
13629
|
}
|
|
13275
13630
|
});
|
|
13276
|
-
const _hoisted_1$
|
|
13631
|
+
const _hoisted_1$8 = { class: "pb-tool-button bs-layout-horizontal flex-align-center" };
|
|
13277
13632
|
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
13278
13633
|
__name: "PbToolbarButton",
|
|
13279
13634
|
props: {
|
|
@@ -13287,14 +13642,14 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
13287
13642
|
(_b = (_a = props.button).handler) == null ? void 0 : _b.call(_a, pageBuilder);
|
|
13288
13643
|
};
|
|
13289
13644
|
return (_ctx, _cache) => {
|
|
13290
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
13645
|
+
return openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
13291
13646
|
createElementVNode("div", {
|
|
13292
13647
|
class: "tool-button bs-clickable",
|
|
13293
13648
|
onClick: handleClick
|
|
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
|
])
|
|
@@ -13302,7 +13657,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
13302
13657
|
};
|
|
13303
13658
|
}
|
|
13304
13659
|
});
|
|
13305
|
-
const _hoisted_1$
|
|
13660
|
+
const _hoisted_1$7 = { class: "pb-tool-button-group bs-layout-horizontal flex-align-center" };
|
|
13306
13661
|
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
13307
13662
|
__name: "PbToolbarButtonGroup",
|
|
13308
13663
|
props: {
|
|
@@ -13310,7 +13665,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
13310
13665
|
},
|
|
13311
13666
|
setup(__props) {
|
|
13312
13667
|
return (_ctx, _cache) => {
|
|
13313
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
13668
|
+
return openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
13314
13669
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.group.buttons, (button) => {
|
|
13315
13670
|
return openBlock(), createBlock$1(_sfc_main$a, {
|
|
13316
13671
|
key: button.buttonId,
|
|
@@ -13321,9 +13676,10 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
13321
13676
|
};
|
|
13322
13677
|
}
|
|
13323
13678
|
});
|
|
13324
|
-
const _hoisted_1$
|
|
13325
|
-
const _hoisted_2$
|
|
13326
|
-
const _hoisted_3$
|
|
13679
|
+
const _hoisted_1$6 = { class: "pb-toolbar bs-layout-horizontal align-items-center" };
|
|
13680
|
+
const _hoisted_2$3 = { 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
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
13342
|
-
(
|
|
13343
|
-
|
|
13344
|
-
|
|
13345
|
-
|
|
13346
|
-
|
|
13347
|
-
|
|
13348
|
-
|
|
13696
|
+
return openBlock(), createElementBlock("div", _hoisted_1$6, [
|
|
13697
|
+
createElementVNode("div", _hoisted_2$3, [
|
|
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,40 +13714,39 @@ 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
|
};
|
|
13371
13720
|
}
|
|
13372
13721
|
});
|
|
13373
|
-
const _hoisted_1$
|
|
13722
|
+
const _hoisted_1$5 = { class: "pb-menu bs-layout-vertical" };
|
|
13374
13723
|
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
13375
13724
|
__name: "PbMenu",
|
|
13376
13725
|
setup(__props) {
|
|
13377
13726
|
return (_ctx, _cache) => {
|
|
13378
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
13727
|
+
return openBlock(), createElementBlock("div", _hoisted_1$5, [
|
|
13379
13728
|
createVNode(_sfc_main$8)
|
|
13380
13729
|
]);
|
|
13381
13730
|
};
|
|
13382
13731
|
}
|
|
13383
13732
|
});
|
|
13384
|
-
const _hoisted_1$5 = { class: "pb-navigator" };
|
|
13385
|
-
const _hoisted_2$3 = { class: "pb-navigator" };
|
|
13386
13733
|
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
13387
13734
|
__name: "PbNavigator",
|
|
13388
13735
|
setup(__props) {
|
|
13389
13736
|
const pageBuilder = usePageBuilderEditor();
|
|
13737
|
+
const treeS = ref();
|
|
13738
|
+
const treeL = ref();
|
|
13739
|
+
watch(
|
|
13740
|
+
() => treeS.value,
|
|
13741
|
+
() => treeS.value && pageBuilder.keyHandlers.addDocumentKeyEventListener(treeS.value)
|
|
13742
|
+
);
|
|
13743
|
+
watch(
|
|
13744
|
+
() => treeL.value,
|
|
13745
|
+
() => treeL.value && pageBuilder.keyHandlers.addDocumentKeyEventListener(treeL.value)
|
|
13746
|
+
);
|
|
13390
13747
|
const tabs = [
|
|
13391
|
-
{ tabId: "pageS", caption: "Mobile" },
|
|
13392
|
-
{ tabId: "pageL", caption: "PC" }
|
|
13748
|
+
{ tabId: "pageS", caption: "Mobile", icon: "phone_iphone" },
|
|
13749
|
+
{ tabId: "pageL", caption: "PC", icon: "desktop_windows" }
|
|
13393
13750
|
];
|
|
13394
13751
|
const pageS = computed(() => (pageBuilder.model.rootPart.children || [])[0].children || []);
|
|
13395
13752
|
const pageL = computed(() => (pageBuilder.model.rootPart.children || [])[1].children || []);
|
|
@@ -13402,6 +13759,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
13402
13759
|
set(value) {
|
|
13403
13760
|
}
|
|
13404
13761
|
});
|
|
13762
|
+
let savedPartSelection = null;
|
|
13405
13763
|
const treeDragAndDropPolicy = {
|
|
13406
13764
|
dropStep: () => 3,
|
|
13407
13765
|
isDroppable(_srcRow, _srcParentRow, _destRow, _destParentRow) {
|
|
@@ -13454,7 +13812,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
13454
13812
|
}
|
|
13455
13813
|
}
|
|
13456
13814
|
if (ok) {
|
|
13457
|
-
|
|
13815
|
+
backupPartSelection();
|
|
13816
|
+
pageBuilder.model.moveElements(event.row.partId, parentPartId, event.destIndex, void 0, true);
|
|
13458
13817
|
}
|
|
13459
13818
|
};
|
|
13460
13819
|
const selectedRows = computed({
|
|
@@ -13470,6 +13829,10 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
13470
13829
|
const selectedRowsChanged = (rows) => {
|
|
13471
13830
|
pageBuilder.context.setSelection([...rows]);
|
|
13472
13831
|
};
|
|
13832
|
+
const iconProvider = (part) => {
|
|
13833
|
+
const def = pageBuilder.partManager.getPartDefinition(part.partName);
|
|
13834
|
+
return (def == null ? void 0 : def.icon) || "";
|
|
13835
|
+
};
|
|
13473
13836
|
const labelProvider = (part) => {
|
|
13474
13837
|
var _a;
|
|
13475
13838
|
return part.getName() || ((_a = pageBuilder.partManager.getPartDefinition(part.partName)) == null ? void 0 : _a.caption) || part.partName;
|
|
@@ -13490,6 +13853,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
13490
13853
|
const modelUpdateHandler = (event) => {
|
|
13491
13854
|
var _a;
|
|
13492
13855
|
(_a = event.inserted) == null ? void 0 : _a.map((target) => findLeafPart(pageBuilder.model.findPartById(target.partId))).filter(notNull).forEach((part) => expandParent(part));
|
|
13856
|
+
if (savedPartSelection) {
|
|
13857
|
+
restorePartSelection();
|
|
13858
|
+
}
|
|
13493
13859
|
};
|
|
13494
13860
|
const expandParent = (part) => {
|
|
13495
13861
|
if (part.parent && part.parent.partName !== PAGE_TYPE) {
|
|
@@ -13497,6 +13863,15 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
13497
13863
|
expandParent(part.parent);
|
|
13498
13864
|
}
|
|
13499
13865
|
};
|
|
13866
|
+
const backupPartSelection = () => {
|
|
13867
|
+
savedPartSelection = [...pageBuilder.context.getSelectedParts()];
|
|
13868
|
+
};
|
|
13869
|
+
const restorePartSelection = () => {
|
|
13870
|
+
if (savedPartSelection) {
|
|
13871
|
+
pageBuilder.context.setSelection(savedPartSelection);
|
|
13872
|
+
savedPartSelection = null;
|
|
13873
|
+
}
|
|
13874
|
+
};
|
|
13500
13875
|
onMounted(() => {
|
|
13501
13876
|
PageBuilderEditorEvent.on.modelUpdatedByUI(modelUpdateHandler);
|
|
13502
13877
|
});
|
|
@@ -13510,7 +13885,12 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
13510
13885
|
tabs
|
|
13511
13886
|
}, {
|
|
13512
13887
|
pageS: withCtx(() => [
|
|
13513
|
-
createElementVNode("div",
|
|
13888
|
+
createElementVNode("div", {
|
|
13889
|
+
ref_key: "treeS",
|
|
13890
|
+
ref: treeS,
|
|
13891
|
+
class: "pb-navigator",
|
|
13892
|
+
tabindex: "0"
|
|
13893
|
+
}, [
|
|
13514
13894
|
createVNode(unref(BSTree), {
|
|
13515
13895
|
expandedRows: expandedRows.value,
|
|
13516
13896
|
"onUpdate:expandedRows": [
|
|
@@ -13524,6 +13904,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
13524
13904
|
],
|
|
13525
13905
|
data: pageS.value,
|
|
13526
13906
|
"enable-drag-and-drop": treeDragAndDropPolicy,
|
|
13907
|
+
"icon-provider": iconProvider,
|
|
13527
13908
|
"key-provider": (part) => part.partId,
|
|
13528
13909
|
"label-provider": labelProvider,
|
|
13529
13910
|
class: "max-w-320",
|
|
@@ -13531,10 +13912,15 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
13531
13912
|
"show-move-button": "",
|
|
13532
13913
|
onRowMoved: rowMoved
|
|
13533
13914
|
}, null, 8, ["expandedRows", "selectedRows", "data", "key-provider"])
|
|
13534
|
-
])
|
|
13915
|
+
], 512)
|
|
13535
13916
|
]),
|
|
13536
13917
|
pageL: withCtx(() => [
|
|
13537
|
-
createElementVNode("div",
|
|
13918
|
+
createElementVNode("div", {
|
|
13919
|
+
ref_key: "treeL",
|
|
13920
|
+
ref: treeL,
|
|
13921
|
+
class: "pb-navigator",
|
|
13922
|
+
tabindex: "0"
|
|
13923
|
+
}, [
|
|
13538
13924
|
createVNode(unref(BSTree), {
|
|
13539
13925
|
expandedRows: expandedRows.value,
|
|
13540
13926
|
"onUpdate:expandedRows": [
|
|
@@ -13548,6 +13934,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
13548
13934
|
],
|
|
13549
13935
|
data: pageL.value,
|
|
13550
13936
|
"enable-drag-and-drop": treeDragAndDropPolicy,
|
|
13937
|
+
"icon-provider": iconProvider,
|
|
13551
13938
|
"key-provider": (part) => part.partId,
|
|
13552
13939
|
"label-provider": labelProvider,
|
|
13553
13940
|
class: "max-w-320",
|
|
@@ -13555,7 +13942,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
13555
13942
|
"show-move-button": "",
|
|
13556
13943
|
onRowMoved: rowMoved
|
|
13557
13944
|
}, null, 8, ["expandedRows", "selectedRows", "data", "key-provider"])
|
|
13558
|
-
])
|
|
13945
|
+
], 512)
|
|
13559
13946
|
]),
|
|
13560
13947
|
_: 1
|
|
13561
13948
|
}, 8, ["tab-id"]);
|
|
@@ -13572,13 +13959,13 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
13572
13959
|
const props = __props;
|
|
13573
13960
|
const pageBuilder = usePageBuilderEditor();
|
|
13574
13961
|
const propertyEditor = computed(() => {
|
|
13575
|
-
var _a
|
|
13962
|
+
var _a;
|
|
13576
13963
|
if (pageBuilder.editMode === "local" && props.selectedParts.length > 0) {
|
|
13577
13964
|
const section = pageBuilder.partManager.findNearestSection(props.selectedParts[0]);
|
|
13578
|
-
if (section &&
|
|
13965
|
+
if (section && section.isGlobalDesignPart()) {
|
|
13579
13966
|
return;
|
|
13580
13967
|
}
|
|
13581
|
-
if (section &&
|
|
13968
|
+
if (section && (section.isLocalDesignPart() || section.isLocalMarketingPart())) {
|
|
13582
13969
|
if (!props.property.localized) {
|
|
13583
13970
|
return;
|
|
13584
13971
|
}
|
|
@@ -13586,7 +13973,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
13586
13973
|
}
|
|
13587
13974
|
if (pageBuilder.editMode === "template" && props.selectedParts.length > 0) {
|
|
13588
13975
|
const section = pageBuilder.partManager.findNearestSection(props.selectedParts[0]);
|
|
13589
|
-
if (section &&
|
|
13976
|
+
if (section && (section.isLocalDesignPart() || section.isLocalMarketingPart())) {
|
|
13590
13977
|
if (props.property.localized) {
|
|
13591
13978
|
return;
|
|
13592
13979
|
}
|
|
@@ -13597,7 +13984,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
13597
13984
|
if (editor)
|
|
13598
13985
|
return editor;
|
|
13599
13986
|
}
|
|
13600
|
-
return (
|
|
13987
|
+
return (_a = pageBuilder.partManager.getPartPropertyEditor(props.property.propertyType)) == null ? void 0 : _a(props.property, props.selectedParts);
|
|
13601
13988
|
});
|
|
13602
13989
|
const value = computed(() => getPropertyValueOfParts(props.selectedParts, props.property.propertyName));
|
|
13603
13990
|
const updatePropertyValue = (properties) => {
|
|
@@ -13618,7 +14005,11 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
13618
14005
|
}
|
|
13619
14006
|
});
|
|
13620
14007
|
const _hoisted_1$4 = { class: "pb-sidebar-property-group" };
|
|
13621
|
-
const _hoisted_2$2 =
|
|
14008
|
+
const _hoisted_2$2 = {
|
|
14009
|
+
key: 0,
|
|
14010
|
+
class: "group-title"
|
|
14011
|
+
};
|
|
14012
|
+
const _hoisted_3$1 = ["textContent"];
|
|
13622
14013
|
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
13623
14014
|
__name: "PbSidebarPropertyGroupEditor",
|
|
13624
14015
|
props: {
|
|
@@ -13630,13 +14021,13 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
13630
14021
|
const props = __props;
|
|
13631
14022
|
const pageBuilder = usePageBuilderEditor();
|
|
13632
14023
|
const groupEditor = computed(() => {
|
|
13633
|
-
var _a, _b
|
|
14024
|
+
var _a, _b;
|
|
13634
14025
|
if (pageBuilder.editMode === "local" && props.selectedParts.length > 0) {
|
|
13635
14026
|
const section = pageBuilder.partManager.findNearestSection(props.selectedParts[0]);
|
|
13636
|
-
if (section &&
|
|
14027
|
+
if (section && section.isGlobalDesignPart()) {
|
|
13637
14028
|
return;
|
|
13638
14029
|
}
|
|
13639
|
-
if (section &&
|
|
14030
|
+
if (section && (section.isLocalDesignPart() || section.isLocalMarketingPart())) {
|
|
13640
14031
|
if (!props.group.localized) {
|
|
13641
14032
|
return;
|
|
13642
14033
|
}
|
|
@@ -13644,21 +14035,21 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
13644
14035
|
}
|
|
13645
14036
|
if (pageBuilder.editMode === "template" && props.selectedParts.length > 0) {
|
|
13646
14037
|
const section = pageBuilder.partManager.findNearestSection(props.selectedParts[0]);
|
|
13647
|
-
if (section &&
|
|
14038
|
+
if (section && (section.isLocalDesignPart() || section.isLocalMarketingPart())) {
|
|
13648
14039
|
if (props.group.localized) {
|
|
13649
14040
|
return;
|
|
13650
14041
|
}
|
|
13651
14042
|
}
|
|
13652
14043
|
}
|
|
13653
|
-
return (
|
|
14044
|
+
return (_b = (_a = props.group).propertyGroupEditor) == null ? void 0 : _b.call(_a, props.group, props.selectedParts);
|
|
13654
14045
|
});
|
|
13655
14046
|
return (_ctx, _cache) => {
|
|
13656
14047
|
return openBlock(), createElementBlock("div", _hoisted_1$4, [
|
|
13657
|
-
_ctx.group.showGroupName ? (openBlock(), createElementBlock("div",
|
|
13658
|
-
|
|
13659
|
-
|
|
13660
|
-
|
|
13661
|
-
|
|
14048
|
+
_ctx.group.showGroupName ? (openBlock(), createElementBlock("div", _hoisted_2$2, [
|
|
14049
|
+
createElementVNode("label", {
|
|
14050
|
+
textContent: toDisplayString(_ctx.group.caption)
|
|
14051
|
+
}, null, 8, _hoisted_3$1)
|
|
14052
|
+
])) : createCommentVNode("", true),
|
|
13662
14053
|
_ctx.partsKey ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
13663
14054
|
groupEditor.value ? (openBlock(), createBlock$1(resolveDynamicComponent(groupEditor.value), {
|
|
13664
14055
|
key: 0,
|
|
@@ -13677,7 +14068,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
13677
14068
|
}
|
|
13678
14069
|
});
|
|
13679
14070
|
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: "
|
|
14071
|
+
const _hoisted_2$1 = /* @__PURE__ */ createElementVNode("div", { class: "title" }, [
|
|
14072
|
+
/* @__PURE__ */ createElementVNode("label", { textContent: "Display Schedule" })
|
|
14073
|
+
], -1);
|
|
13681
14074
|
const _hoisted_3 = { class: "bs-layout-horizontal" };
|
|
13682
14075
|
const _hoisted_4 = { class: "mr-2" };
|
|
13683
14076
|
const _hoisted_5 = /* @__PURE__ */ createElementVNode("span", { class: "font-icon" }, "more_horiz", -1);
|
|
@@ -13685,7 +14078,7 @@ const _hoisted_6 = [
|
|
|
13685
14078
|
_hoisted_5
|
|
13686
14079
|
];
|
|
13687
14080
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
13688
|
-
__name: "
|
|
14081
|
+
__name: "PbPropertyLocalMarketingPart",
|
|
13689
14082
|
props: {
|
|
13690
14083
|
selectedPart: {}
|
|
13691
14084
|
},
|
|
@@ -13697,18 +14090,19 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
13697
14090
|
const endDt = ref("");
|
|
13698
14091
|
const pageBuilder = usePageBuilderEditor();
|
|
13699
14092
|
const selectSchedule = () => {
|
|
13700
|
-
PageBuilderEditorEvent.emit.
|
|
14093
|
+
PageBuilderEditorEvent.emit.requestLocalMarketingPartSchedule({
|
|
13701
14094
|
pageBuilderId: pageBuilder.instanceId,
|
|
14095
|
+
partId: props.selectedPart.partId,
|
|
13702
14096
|
callback: (schedule) => {
|
|
13703
14097
|
startDt.value = schedule.startDt;
|
|
13704
14098
|
endDt.value = schedule.endDt;
|
|
13705
14099
|
if (props.selectedPart && props.selectedPart.isSection()) {
|
|
13706
14100
|
clearContents(props.selectedPart);
|
|
13707
|
-
if (schedule.
|
|
13708
|
-
for (const
|
|
13709
|
-
const part = findWidget(props.selectedPart,
|
|
14101
|
+
if (schedule.data) {
|
|
14102
|
+
for (const partId in schedule.data) {
|
|
14103
|
+
const part = findWidget(props.selectedPart, partId);
|
|
13710
14104
|
if (part) {
|
|
13711
|
-
Object.entries(schedule.
|
|
14105
|
+
Object.entries(schedule.data[partId]).forEach(([key, value]) => {
|
|
13712
14106
|
if (!value)
|
|
13713
14107
|
return;
|
|
13714
14108
|
part.properties = part.properties || {};
|
|
@@ -13721,15 +14115,14 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
13721
14115
|
}
|
|
13722
14116
|
});
|
|
13723
14117
|
};
|
|
13724
|
-
const findWidget = (part,
|
|
13725
|
-
var _a;
|
|
14118
|
+
const findWidget = (part, partId) => {
|
|
13726
14119
|
if (!part)
|
|
13727
14120
|
return;
|
|
13728
|
-
if (
|
|
14121
|
+
if (part.partId === partId)
|
|
13729
14122
|
return part;
|
|
13730
14123
|
if (part.children) {
|
|
13731
14124
|
for (const child of part.children) {
|
|
13732
|
-
const found = findWidget(child,
|
|
14125
|
+
const found = findWidget(child, partId);
|
|
13733
14126
|
if (found)
|
|
13734
14127
|
return found;
|
|
13735
14128
|
}
|
|
@@ -13790,21 +14183,17 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
13790
14183
|
return [];
|
|
13791
14184
|
}
|
|
13792
14185
|
});
|
|
13793
|
-
const
|
|
13794
|
-
var _a;
|
|
14186
|
+
const showLocalMarketingPart = computed(() => {
|
|
13795
14187
|
if (pageBuilder.editMode === "template")
|
|
13796
14188
|
return false;
|
|
13797
14189
|
if (!selectedParts.length || selectedParts.length !== 1)
|
|
13798
14190
|
return false;
|
|
13799
14191
|
const part = selectedParts[0];
|
|
13800
|
-
|
|
13801
|
-
return true;
|
|
13802
|
-
}
|
|
13803
|
-
return false;
|
|
14192
|
+
return part.isLocalMarketingPart();
|
|
13804
14193
|
});
|
|
13805
14194
|
return (_ctx, _cache) => {
|
|
13806
14195
|
return openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
13807
|
-
|
|
14196
|
+
showLocalMarketingPart.value ? (openBlock(), createBlock$1(_sfc_main$3, {
|
|
13808
14197
|
key: 0,
|
|
13809
14198
|
"selected-part": unref(selectedParts)[0]
|
|
13810
14199
|
}, null, 8, ["selected-part"])) : createCommentVNode("", true),
|
|
@@ -13842,25 +14231,83 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13842
14231
|
instanceId: {},
|
|
13843
14232
|
title: {},
|
|
13844
14233
|
editMode: {},
|
|
13845
|
-
pageContent: {}
|
|
14234
|
+
pageContent: {},
|
|
14235
|
+
language: {}
|
|
13846
14236
|
},
|
|
13847
|
-
setup(__props) {
|
|
14237
|
+
setup(__props, { expose: __expose }) {
|
|
13848
14238
|
const props = __props;
|
|
13849
14239
|
const modal = useModal();
|
|
13850
14240
|
const pageBuilderEditor = createPageBuilderEditor();
|
|
13851
14241
|
pageBuilderEditor.instanceId = props.instanceId;
|
|
13852
14242
|
pageBuilderEditor.title = props.title;
|
|
13853
14243
|
pageBuilderEditor.editMode = props.editMode || "free";
|
|
14244
|
+
if (props.language)
|
|
14245
|
+
pageBuilderEditor.setLanguage(props.language);
|
|
13854
14246
|
pageBuilderEditor.registerPlugin({
|
|
13855
14247
|
// TODO
|
|
13856
14248
|
commands: createDefaultCommands(modal)
|
|
13857
14249
|
});
|
|
13858
|
-
pageBuilderEditor.keyHandlers.addDocumentKeyEventListener(window.document);
|
|
13859
14250
|
providePageBuilderEditor(pageBuilderEditor);
|
|
14251
|
+
providePageBuilder(pageBuilderEditor);
|
|
13860
14252
|
onMounted(() => pageBuilderEditor.initData(props.pageContent));
|
|
13861
14253
|
watch(() => props.pageContent, (pageContent) => pageContent && pageBuilderEditor.initData(pageContent));
|
|
14254
|
+
watch(() => props.language, (language) => {
|
|
14255
|
+
pageBuilderEditor.setLanguage(language);
|
|
14256
|
+
});
|
|
13862
14257
|
const colorHistory = ref([]);
|
|
13863
14258
|
provide("colorHistory", colorHistory);
|
|
14259
|
+
const getLocalDesignPartContent = () => {
|
|
14260
|
+
let content;
|
|
14261
|
+
if (pageBuilderEditor.model.rootPart) {
|
|
14262
|
+
content = doGetLocalDesignPartContent(pageBuilderEditor.model.rootPart);
|
|
14263
|
+
}
|
|
14264
|
+
return content;
|
|
14265
|
+
};
|
|
14266
|
+
const doGetLocalDesignPartContent = (part) => {
|
|
14267
|
+
let content;
|
|
14268
|
+
if (part.isGlobalDesignPart() || part.isLocalMarketingPart()) {
|
|
14269
|
+
const properties = getLocalDesignPartProperties(part);
|
|
14270
|
+
if (properties) {
|
|
14271
|
+
if (!content)
|
|
14272
|
+
content = [];
|
|
14273
|
+
content.push({ partId: part.partId, data: properties });
|
|
14274
|
+
}
|
|
14275
|
+
}
|
|
14276
|
+
if (part.children) {
|
|
14277
|
+
for (const child of part.children) {
|
|
14278
|
+
const childContent = doGetLocalDesignPartContent(child);
|
|
14279
|
+
if (childContent)
|
|
14280
|
+
content = [...content || [], ...childContent];
|
|
14281
|
+
}
|
|
14282
|
+
}
|
|
14283
|
+
return content;
|
|
14284
|
+
};
|
|
14285
|
+
const getLocalDesignPartProperties = (part) => {
|
|
14286
|
+
let properties;
|
|
14287
|
+
if (part.isWidget()) {
|
|
14288
|
+
const defs = pageBuilderEditor.partManager.getLocalDesignPartPropertyDefinitions(part.partName);
|
|
14289
|
+
if (defs) {
|
|
14290
|
+
const data = {};
|
|
14291
|
+
for (const def of defs) {
|
|
14292
|
+
if (part.properties)
|
|
14293
|
+
data[def.propertyName] = part.properties[def.propertyName];
|
|
14294
|
+
}
|
|
14295
|
+
properties = { [part.partId]: data };
|
|
14296
|
+
}
|
|
14297
|
+
}
|
|
14298
|
+
if (part.children) {
|
|
14299
|
+
for (const child of part.children) {
|
|
14300
|
+
const childProperties = getLocalDesignPartProperties(child);
|
|
14301
|
+
if (childProperties) {
|
|
14302
|
+
properties = { ...properties, ...childProperties };
|
|
14303
|
+
}
|
|
14304
|
+
}
|
|
14305
|
+
}
|
|
14306
|
+
return properties;
|
|
14307
|
+
};
|
|
14308
|
+
__expose({
|
|
14309
|
+
getLocalDesignPartContent
|
|
14310
|
+
});
|
|
13864
14311
|
return (_ctx, _cache) => {
|
|
13865
14312
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
13866
14313
|
createVNode(_sfc_main$7),
|
|
@@ -13876,27 +14323,32 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13876
14323
|
export {
|
|
13877
14324
|
BLOCK_TYPE$1 as B,
|
|
13878
14325
|
Model$1 as M,
|
|
13879
|
-
|
|
14326
|
+
PbColorPicker as P,
|
|
13880
14327
|
ROOT_TYPE$1 as R,
|
|
13881
14328
|
SECTION_TYPE$1 as S,
|
|
13882
14329
|
WIDGET_TYPE$1 as W,
|
|
13883
14330
|
_sfc_main as _,
|
|
13884
|
-
|
|
13885
|
-
|
|
13886
|
-
|
|
13887
|
-
|
|
13888
|
-
|
|
13889
|
-
|
|
13890
|
-
|
|
13891
|
-
|
|
14331
|
+
PageBuilderEditorEvent as a,
|
|
14332
|
+
Block as b,
|
|
14333
|
+
PAGE_BUILDER_KEY as c,
|
|
14334
|
+
PAGE_TYPE$1 as d,
|
|
14335
|
+
Page as e,
|
|
14336
|
+
_sfc_main$q as f,
|
|
14337
|
+
PageBuilderViewerEvent as g,
|
|
14338
|
+
Part as h,
|
|
13892
14339
|
_sfc_main$3$1 as i,
|
|
13893
|
-
|
|
13894
|
-
|
|
13895
|
-
|
|
13896
|
-
|
|
13897
|
-
|
|
13898
|
-
|
|
13899
|
-
|
|
13900
|
-
|
|
13901
|
-
|
|
14340
|
+
_sfc_main$5$1 as j,
|
|
14341
|
+
_sfc_main$2$1 as k,
|
|
14342
|
+
_sfc_main$4$1 as l,
|
|
14343
|
+
RootPart as m,
|
|
14344
|
+
Section as n,
|
|
14345
|
+
Widget as o,
|
|
14346
|
+
createPageBuilderViewer as p,
|
|
14347
|
+
createPartComponent as q,
|
|
14348
|
+
createPartComponents as r,
|
|
14349
|
+
providePageBuilder as s,
|
|
14350
|
+
providePageBuilderViewer as t,
|
|
14351
|
+
usePageBuilderEditor as u,
|
|
14352
|
+
usePageBuilder as v,
|
|
14353
|
+
usePageBuilderViewer as w
|
|
13902
14354
|
};
|